Ver código fonte

Merge branch 'dev' of ssh://10.10.100.21/source/saas-platform into dev

guq 7 anos atrás
pai
commit
568a7ab600

+ 14 - 11
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/VerificationServiceImpl.java

@@ -179,19 +179,22 @@ public class VerificationServiceImpl extends CommonBaseServiceImpl<VerificationM
                 verificationdetMapper.insertSelective(detail);
             }
         }
-        for (VerificationdetailDTO item : items2) {
-            Verificationdetail detail = BeanMapper.map(item,Verificationdetail.class);
-            Long vcd_id = detail.getId();
-            detail.setVcd_vcid(id);
-            detail.setVcd_id(Math.toIntExact(vcd_id));
-            detail.setVcd_ym(numberYM);
-            detail.setCompanyId(companyId);
-            if(vcd_id>0){
-                verificationdetailMapper.updateByPrimaryKey(detail);
-            }else{
-                verificationdetailMapper.insertSelective(detail);
+        if(items2!=null){
+            for (VerificationdetailDTO item : items2) {
+                Verificationdetail detail = BeanMapper.map(item,Verificationdetail.class);
+                Long vcd_id = detail.getId();
+                detail.setVcd_vcid(id);
+                detail.setVcd_id(Math.toIntExact(vcd_id));
+                detail.setVcd_ym(numberYM);
+                detail.setCompanyId(companyId);
+                if(vcd_id>0){
+                    verificationdetailMapper.updateByPrimaryKey(detail);
+                }else{
+                    verificationdetailMapper.insertSelective(detail);
+                }
             }
         }
+
         updateCorrespondingData(id);
         return baseDTO;
     }

+ 2 - 2
frontend/saas-web/app/view/money/verification/FormPanel.js

@@ -548,9 +548,9 @@ Ext.define('saas.view.money.verification.FormPanel', {
                 'ifnull(sl_vendid,0)={vc_vendid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0'],
             receivable_offset_payable: ['ifnull(sl_custid,0)={vc_custid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0',
                 'ifnull(sl_vendid,0)={vc_vendid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0'],
-            receivable_to_receivable: ['ifnull(sl_custid,0)={vc_outcustid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0 ' +
+            receivable_to_receivable: ['ifnull(sl_custid,0)={vc_custid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0 ' +
             'and sl_kind in (\'期初余额\',\'出货单\',\'销售退货单\')'],
-            payable_to_payable: ['ifnull(sl_vendtid,0)={vc_outvendid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0 ' +
+            payable_to_payable: ['ifnull(sl_vendid,0)={vc_vendid} and ifnull(sl_preamount,0)=0 and ifnull(sl_namount,0)<>0 ' +
             'and sl_kind in (\'期初余额\',\'采购验收单\',\'采购验退单\')']
         }
     },

+ 1 - 8
frontend/saas-web/app/view/money/verification/FormPanelController.js

@@ -81,7 +81,7 @@ Ext.define('saas.view.money.verification.FormPanelController', {
                     Ext.apply(f, {
                         dbfinds: [{
                             from: 'id',
-                            to: 'vc_turncustid',
+                            to: 'vc_turnvendid',
                             ignore: true
                         }, {
                             from: 've_code',
@@ -285,7 +285,6 @@ Ext.define('saas.view.money.verification.FormPanelController', {
             saas.util.BaseUtil.showErrorToast(form.invalidText);
             return false;
         }
-        debugger
         var sum_detail1 = store1.sum('vd_nowbalance'); // 从表1核销合计
         var sum_detail2 = store2.sum('vcd_nowbalance'); // 从表2核销合计
 
@@ -313,12 +312,6 @@ Ext.define('saas.view.money.verification.FormPanelController', {
             params['items' + ( i + 1)] = formData['detail' + i];
         }
 
-        // // 只有一个从表时从表字段改为items
-        // if(detailCount == 1) {
-        //     params.items = params.items1;
-        //     delete params.items1;
-        // }
-
         saas.util.BaseUtil.request({
             url: form._saveUrl,
             params: JSON.stringify(params),