Просмотр исходного кода

Merge branch 'master' of http://git.dongkesoft.com:9001/iBOSS-2.0-Mini/iboss-server-mdm

姜永辉 1 год назад
Родитель
Сommit
3b37563e92

+ 7 - 2
src/main/java/com/dk/mdm/mapper/mac/OtherPayableMapper.xml

@@ -145,7 +145,8 @@
                makestaff.staff_name as "makeStaffName",
                t.make_time,
                t.flg_valid,
-               t.cp_id
+               t.cp_id,
+               coalesce(tmrp.sum_amt_pay, 0) as "sumAmtPay"
         FROM dkic_b.t_mac_other_payable as t
                  left join dkic_b.t_mst_supplier as supplier
                            on supplier.sup_id = t.object_id and t.object_type in ('对象类型-供应商')
@@ -153,6 +154,7 @@
                  left join dkic_b.t_mst_staff tms on tms.staff_id = t.staff_id
                  left join dkic_b.t_mst_staff as makestaff on makestaff.staff_id = t.make_staff
                  left join sys.t_data_kind as tdk1 on tdk1.kind_code = t.object_type
+                 left join dkic_b.t_mac_rec_pay as tmrp on tmrp.flg_valid and tmrp.biznis_id = t.payable_id
         <include refid="Condition"/>
         <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
             limit #{end} offset #{start}
@@ -169,6 +171,7 @@
                  left join dkic_b.t_mst_staff tms on tms.staff_id = t.staff_id
                  left join dkic_b.t_mst_staff as makestaff on makestaff.staff_id = t.make_staff
                  left join sys.t_data_kind as tdk1 on tdk1.kind_code = t.object_type
+                 left join dkic_b.t_mac_rec_pay as tmrp on tmrp.flg_valid and tmrp.biznis_id = t.payable_id
         <include refid="Condition"/>
     </select>
 
@@ -195,7 +198,8 @@
                makestaff.staff_name as "makeStaffName",
                t.make_time,
                t.flg_valid,
-               t.cp_id
+               t.cp_id,
+               coalesce(tmrp.sum_amt_pay, 0) as "sumAmtPay"
         FROM dkic_b.t_mac_other_payable as t
                  left join dkic_b.t_mst_supplier as supplier
                            on supplier.sup_id = t.object_id and t.object_type in ('对象类型-供应商')
@@ -203,6 +207,7 @@
                  left join dkic_b.t_mst_staff tms on tms.staff_id = t.staff_id
                  left join dkic_b.t_mst_staff as makestaff on makestaff.staff_id = t.make_staff
                  left join sys.t_data_kind as tdk1 on tdk1.kind_code = t.object_type
+                 left join dkic_b.t_mac_rec_pay as tmrp on tmrp.flg_valid and tmrp.biznis_id = t.payable_id
         WHERE payable_id = #{id}::uuid
     </select>
 

+ 7 - 2
src/main/java/com/dk/mdm/mapper/mac/OtherReceivableMapper.xml

@@ -149,7 +149,8 @@
                makestaff.staff_name as "makeStaffName",
                t.make_time,
                t.flg_valid,
-               t.cp_id
+               t.cp_id,
+               coalesce(tmrp.sum_amt_rec, 0) as "sumAmtRec"
         FROM dkic_b.t_mac_other_receivable as t
                  left join dkic_b.t_mst_customer tmc
                            on tmc.cus_id = t.object_id and t.object_type in ('对象类型-客户')
@@ -157,6 +158,7 @@
                  left join dkic_b.t_mst_staff tms on tms.staff_id = t.staff_id
                  left join dkic_b.t_mst_staff as makestaff on makestaff.staff_id = t.make_staff
                  left join sys.t_data_kind as tdk1 on tdk1.kind_code = t.object_type
+                 left join dkic_b.t_mac_rec_pay as tmrp on tmrp.flg_valid and tmrp.biznis_id = t.receivable_id
         <include refid="Condition"/>
         order by t.op_create_time desc
         <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
@@ -175,6 +177,7 @@
                  left join dkic_b.t_mst_staff tms on tms.staff_id = t.staff_id
                  left join dkic_b.t_mst_staff as makestaff on makestaff.staff_id = t.make_staff
                  left join sys.t_data_kind as tdk1 on tdk1.kind_code = t.object_type
+                 left join dkic_b.t_mac_rec_pay as tmrp on tmrp.flg_valid and tmrp.biznis_id = t.receivable_id
         <include refid="Condition"/>
     </select>
 
@@ -203,7 +206,8 @@
                makestaff.staff_name as "makeStaffName",
                t.make_time,
                t.flg_valid,
-               t.cp_id
+               t.cp_id,
+               coalesce(tmrp.sum_amt_rec, 0) as "sumAmtRec"
         FROM dkic_b.t_mac_other_receivable as t
                  left join dkic_b.t_mst_customer tmc
                            on tmc.cus_id = t.object_id and t.object_type in ('对象类型-客户')
@@ -211,6 +215,7 @@
                  left join dkic_b.t_mst_staff tms on tms.staff_id = t.staff_id
                  left join dkic_b.t_mst_staff as makestaff on makestaff.staff_id = t.make_staff
                  left join sys.t_data_kind as tdk1 on tdk1.kind_code = t.object_type
+                 left join dkic_b.t_mac_rec_pay as tmrp on tmrp.flg_valid and tmrp.biznis_id = t.receivable_id
         WHERE receivable_id = #{id}::uuid
     </select>
 

+ 2 - 2
src/main/java/com/dk/mdm/service/ivt/outbound/OutboundSaleOrderService.java

@@ -1277,7 +1277,7 @@ public class OutboundSaleOrderService extends BaseService<Outbound> {
         //入库状态
         String outStatus = null;
         //入库中+已入库 小于 总数
-        if (intoingQty.add(intoingQty).compareTo(sumQty) < 0) {
+        if (intoingQty.add(intoQty).compareTo(sumQty) < 0) {
             //入库中
             outStatus =Constant.OutStatus.CHUKUZHONG.getName();
         }
@@ -1287,7 +1287,7 @@ public class OutboundSaleOrderService extends BaseService<Outbound> {
             outStatus =  Constant.OutStatus.DAICHUKU.getName();
         }
         //入库中+已入库 等于 总数
-        else if (intoingQty.add(intoingQty).compareTo(sumQty) == 0) {
+        else if (intoingQty.add(intoQty).compareTo(sumQty) == 0) {
             //已入库
             outStatus =  Constant.OutStatus.YICHUKU.getName();
         }

+ 0 - 2
src/main/java/com/dk/mdm/service/mac/OtherPayableService.java

@@ -527,11 +527,9 @@ public class OtherPayableService extends BaseService<OtherPayable> {
         // 付款明细
         RecPay recPayForUpdate = recPayMapper.selectByBiznisId(id);
         if (recPayForUpdate != null) {
-            otherPayableResponse.setSumAmtPay(recPayForUpdate.getSumAmtPay());
             List<RecPayItemResponse> recPayItemResponseList = recPayItemMapper.selectByCond(new RecPayItemQuery().setRpId(recPayForUpdate.getRpId()));
             dataInfo.put("paymentItem", recPayItemResponseList);
         } else {
-            otherPayableResponse.setSumAmtPay(BigDecimal.ZERO);
             dataInfo.put("paymentItem", new ArrayList<RecPayResponse>());
         }
 

+ 0 - 2
src/main/java/com/dk/mdm/service/mac/OtherReceivableService.java

@@ -528,11 +528,9 @@ public class OtherReceivableService extends BaseService<OtherReceivable> {
         // 收款明细
         RecPay recPayForUpdate = recPayMapper.selectByBiznisId(id);
         if (recPayForUpdate != null) {
-            otherReceivableResponse.setSumAmtRec(recPayForUpdate.getSumAmtRec());
             List<RecPayItemResponse> recPayItemResponseList = recPayItemMapper.selectByCond(new RecPayItemQuery().setRpId(recPayForUpdate.getRpId()));
             dataInfo.put("receiptItem", recPayItemResponseList);
         } else {
-            otherReceivableResponse.setSumAmtRec(BigDecimal.ZERO);
             dataInfo.put("receiptItem", new ArrayList<RecPayResponse>());
         }