Selaa lähdekoodia

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

hy 7 vuotta sitten
vanhempi
commit
8dda318497

+ 5 - 0
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/po/Operation.java

@@ -82,6 +82,11 @@ public enum Operation {
      */
     TURNPRODOUT("msg.turnProdIO","msg.turnSuccess"),
 
+    /**
+     * 销售转采购
+     */
+    TURNPURCHASE("msg.turnPurchase","msg.turnSuccess"),
+
     /**
      * 转销售验退单
      */

+ 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;
     }

+ 5 - 1
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleServiceImpl.java

@@ -597,7 +597,11 @@ public class SaleServiceImpl implements SaleService{
         baseDTO.setCode(result);
         baseDTO.setId(Long.valueOf(String.valueOf(purchaseId)));
         baseDTO.setName(BillCodeSeq.PURCHASE.getName());
-        return baseDTO;
+
+
+        DocBaseDTO log = new DocBaseDTO(sale.getId(),sale.getSa_code(),BillCodeSeq.SALE.getCaller());
+        messageLogService.customizeLog(log, Operation.TURNPURCHASE);
+        return log;
     }
 
     //更新最新销售总额

+ 7 - 0
applications/sale/sale-server/src/main/resources/mapper/ProdInOutMapper.xml

@@ -37,6 +37,7 @@
     <result column="pi_address" jdbcType="VARCHAR" property="pi_address" />
     <result column="pi_remark" jdbcType="VARCHAR" property="pi_remark" />
     <result column="pi_iocode" jdbcType="VARCHAR" property="pi_iocode" />
+      <result column="pi_ioid" jdbcType="INTEGER" property="pi_ioid" />
   </resultMap>
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.usoftchina.saas.storage.po.ProdInOut">
     <result column="pi_address" jdbcType="LONGVARCHAR" property="pi_address" />
@@ -246,6 +247,9 @@
       <if test="pi_iocode != null">
         pi_iocode,
       </if>
+        <if test="pi_ioid != null">
+            pi_ioid,
+        </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
 
@@ -345,6 +349,9 @@
       <if test="pi_iocode != null">
         #{pi_iocode,jdbcType=LONGVARCHAR},
       </if>
+        <if test="pi_ioid != null">
+            #{pi_ioid},
+        </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.storage.po.ProdInOut">

+ 0 - 1
frontend/saas-web/app/view/core/form/RemoteCombo.js

@@ -32,7 +32,6 @@ Ext.define('saas.view.core.form.RemoteCombo', {
        me.store=store;
     },
     createPicker: function() {
-        debugger
         var me = this,
             picker;
         var count = this.store.getCount();

+ 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),

+ 2 - 2
frontend/saas-web/app/view/sale/sale/FormPanelController.js

@@ -63,7 +63,7 @@ Ext.define('saas.view.sale.sale.FormPanelController', {
         form = me.getView(),
         id = form.getForm().findField(form._idField);
         saas.util.BaseUtil.request({
-            url: form._turnOutUrl+id.value,
+            url: form._turnOutUrl+'/'+id.value,
             method: 'POST',
         })
         .then(function(localJson) {
@@ -88,7 +88,7 @@ Ext.define('saas.view.sale.sale.FormPanelController', {
             form = me.getView(),
             id = form.getForm().findField(form._idField);
         saas.util.BaseUtil.request({
-            url: form._turnPurchase+id.value,
+            url: form._turnPurchase+'/'+id.value,
             method: 'POST',
         })
             .then(function(localJson) {

+ 2 - 2
frontend/saas-web/app/view/sale/saleOut/FormPanelController.js

@@ -60,7 +60,7 @@ Ext.define('saas.view.sale.saleout.FormPanelController', {
         form = me.getView(),
         id = form.getForm().findField(form._idField);
         saas.util.BaseUtil.request({
-            url: form._turnInUrl+id.value,
+            url: form._turnInUrl + '/' + id.value,
             method: 'POST',
         })
         .then(function(localJson) {
@@ -76,7 +76,7 @@ Ext.define('saas.view.sale.saleout.FormPanelController', {
             }
         })
         .catch(function(res) {
-            console.error(res);
+           // console.error(res);
             saas.util.BaseUtil.showErrorToast('转单失败: ' + res.message);
         });
      }