Forráskód Böngészése

2022年12月15日18:12:20

纪新园 2 éve
szülő
commit
95b42793d5

+ 2 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/finance/domain/vo/FeeVO.java

@@ -102,5 +102,7 @@ public class FeeVO extends TFee {
 
     private String TfeesNameD;
 
+    private String corpName;
+
 
 }

+ 7 - 6
ruoyi-warehouse/src/main/java/com/ruoyi/finance/service/impl/TFeeServiceImpl.java

@@ -722,15 +722,15 @@ public class TFeeServiceImpl implements ITFeeService {
     @Override
     public List<FeeVO> warehouseBillsFeesList(TWareHouseFees tWareHouseFees) {
         if (tWareHouseFees.getSwitchSection() == 1) {
-            tWareHouseFees.setTimeExamine(tWareHouseFees.getTimeExamine());
-            tWareHouseFees.setfBstimeExamine(null);
-        } else {
             tWareHouseFees.setfBstimeExamine(tWareHouseFees.getTimeExamine());
             tWareHouseFees.setTimeExamine(null);
+        } else {
+            tWareHouseFees.setTimeExamine(tWareHouseFees.getTimeExamine());
+            tWareHouseFees.setfBstimeExamine(null);
         }
         List<FeeVO> list = tFeeMapper.selectFinancialLedgerList(tWareHouseFees);
         for (int i = 0; i < list.size(); i++) {
-            if (tWareHouseFees.getSwitchSection() == 0) {
+            if (tWareHouseFees.getSwitchSection() == 1) {
                 list.get(i).setReviewDate(list.get(i).getBstime());
             }
             FeeDTO feeDTO = new FeeDTO();
@@ -2423,10 +2423,11 @@ public class TFeeServiceImpl implements ITFeeService {
                 FeeVO feeVO = value.stream().findFirst().orElseThrow(() ->
                         new WarehouseException("获取费用异常"));
                 BeanUtils.copyProperties(feeVO, vo);
+                vo.setFFeesName(vo.getName());
                 BigDecimal D = new BigDecimal("0.00");
                 BigDecimal C = new BigDecimal("0.00");
                 if (ObjectUtils.isNotNull(feeVOD)) {
-                    if (ObjectUtils.isNotNull(feeVOD)) {
+                    if (ObjectUtils.isNotNull(feeVODList)) {
                         D = feeVODList.stream().map(FeeVO::getFAmount).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
                         vo.setReceivableAmount(D);
                     } else {
@@ -2439,7 +2440,7 @@ public class TFeeServiceImpl implements ITFeeService {
                     vo.setTfeesNameD(feeVOD.getName());
                 }
                 if (ObjectUtils.isNotNull(feeVOC)) {
-                    if (ObjectUtils.isNotNull(feeVOC.getFAmount())) {
+                    if (ObjectUtils.isNotNull(feeVOCList)) {
                         C = feeVOCList.stream().map(FeeVO::getFAmount).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
                         vo.setCopeWithAmount(C);
                     } else {

+ 11 - 3
ruoyi-warehouse/src/main/resources/mapper/finance/TFeeMapper.xml

@@ -2866,7 +2866,8 @@
             LEFT JOIN t_corps c ON c.f_id = w.f_corpid
             LEFT JOIN t_fees f ON w.f_feeid = f.f_id
         <where>
-            w.f_dc = #{fDc}
+            t.del_flag = '0'
+            and w.f_dc = #{fDc}
             <if test="fCorpid != null  and fCorpid != ''">and t.f_corpid = #{fCorpid}</if>
             <if test="fToCorpid != null  and fToCorpid != ''">and w.f_corpid = #{fToCorpid}</if>
             <if test="fMblno != null  and fMblno != ''">and w.f_mblno like concat('%', #{fMblno}, '%')</if>
@@ -2898,8 +2899,14 @@
     </select>
 
     <select id="selectFinancialLedgerDetails" resultMap="feeVOResult">
-        SELECT t.f_id AS f_srcpid, c.f_name AS f_fees_name, w.f_mblno AS f_mblno,
-            w.f_product_name, w.f_marks, t.f_billtype,
+        SELECT t.f_id AS f_srcpid,
+        CASE
+        WHEN w.f_dc = 'D' THEN c.f_name
+        WHEN w.f_dc = 'C' THEN c1.f_name
+        END
+        AS f_fees_name,
+        c.f_name AS corpName,
+        w.f_mblno AS f_mblno,w.f_product_name, w.f_marks, t.f_billtype,
         CASE
         WHEN t.f_billtype = 'SJRK' THEN '实际入库'
         WHEN t.f_billtype = 'SJCK' THEN '实际出库'
@@ -2923,6 +2930,7 @@
             LEFT JOIN sys_user u ON t.create_by = u.user_name
             LEFT JOIN sys_dept d ON t.f_bsdeptid = d.dept_id
             LEFT JOIN t_corps c ON c.f_id = t.f_corpid
+            LEFT JOIN t_corps c1 ON c1.f_id = w.f_corpid
             LEFT JOIN t_fees f ON w.f_feeid = f.f_id
         where
             t.del_flag = '0'