Browse Source

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

rainco 7 years ago
parent
commit
f9d9b6ea1e

+ 7 - 5
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductServiceImpl.java

@@ -123,16 +123,18 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
             if (productDetailList.size() > 0){
             if (productDetailList.size() > 0){
                 //找到原始单据,反过账并删除
                 //找到原始单据,反过账并删除
                 String inoutCode = getMapper().selectProdIOCode(product.getPr_code(), BaseContextHolder.getCompanyId(), "库存初始化");
                 String inoutCode = getMapper().selectProdIOCode(product.getPr_code(), BaseContextHolder.getCompanyId(), "库存初始化");
-                post(inoutCode, "反过账");
-                getMapper().deleteProdIODetailByCode(inoutCode, BaseContextHolder.getCompanyId());
-                getMapper().deleteProdIOByCode(inoutCode, BaseContextHolder.getCompanyId());
-
+                if (!StringUtils.isEmpty(inoutCode)) {
+                    post(inoutCode, "反过账");
+                    getMapper().deleteProdIODetailByCode(inoutCode, BaseContextHolder.getCompanyId());
+                    getMapper().deleteProdIOByCode(inoutCode, BaseContextHolder.getCompanyId());
+                }
                 //此种情况不可能发生明细行数量,只会发生明细行数据修改/新增明细行
                 //此种情况不可能发生明细行数量,只会发生明细行数据修改/新增明细行
                 //a.更新明细行数据
                 //a.更新明细行数据
                 List<ProductDetail> insertItems = new ArrayList<ProductDetail>();
                 List<ProductDetail> insertItems = new ArrayList<ProductDetail>();
                 List<ProductDetail> updateItems = new ArrayList<ProductDetail>();
                 List<ProductDetail> updateItems = new ArrayList<ProductDetail>();
                 for(ProductDetail productDetail : productDetailList){
                 for(ProductDetail productDetail : productDetailList){
                     if (productDetail.getId() == 0){
                     if (productDetail.getId() == 0){
+                        productDetail.setPd_prodid(product.getId());
                         productDetail.setUpdaterId(userId);
                         productDetail.setUpdaterId(userId);
                         productDetail.setUpdateTime(new Date());
                         productDetail.setUpdateTime(new Date());
                         insertItems.add(productDetail);
                         insertItems.add(productDetail);
@@ -373,8 +375,8 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
         validEnableDel(id);
         validEnableDel(id);
 
 
         String code = getMapper().getCodeById(id);
         String code = getMapper().getCodeById(id);
-        getMapper().deleteByPrimaryKey(id);
         productDetailMapper.deleteByProdId(id);
         productDetailMapper.deleteByProdId(id);
+        getMapper().deleteByPrimaryKey(id);
         DocBaseDTO docBaseDTO = generateMsgObj(id, code);
         DocBaseDTO docBaseDTO = generateMsgObj(id, code);
         //记录LOG
         //记录LOG
         messageLogService.delete(docBaseDTO);
         messageLogService.delete(docBaseDTO);

+ 10 - 15
applications/purchase/purchase-server/src/main/resources/mapper/PurchaseMapper.xml

@@ -110,9 +110,6 @@
       <if test="pu_totalupper != null" >
       <if test="pu_totalupper != null" >
         PU_TOTALUPPER,
         PU_TOTALUPPER,
       </if>
       </if>
-      <if test="createTime != null" >
-        PU_INDATE,
-      </if>
       <if test="pu_printstatus != null" >
       <if test="pu_printstatus != null" >
         PU_PRINTSTATUS,
         PU_PRINTSTATUS,
       </if>
       </if>
@@ -144,13 +141,13 @@
         updateTime,
         updateTime,
       </if>
       </if>
       <if test="creatorId != null" >
       <if test="creatorId != null" >
-      creatorId,
+        creatorId,
       </if>
       </if>
       <if test="creatorName != null" >
       <if test="creatorName != null" >
         creatorName,
         creatorName,
       </if>
       </if>
       <if test="createTime != null" >
       <if test="createTime != null" >
-      createTime,
+        createTime,
       </if>
       </if>
       <if test="pu_text1 != null" >
       <if test="pu_text1 != null" >
         pu_text1,
         pu_text1,
@@ -211,9 +208,6 @@
       <if test="pu_totalupper != null" >
       <if test="pu_totalupper != null" >
         #{pu_totalupper,jdbcType=VARCHAR},
         #{pu_totalupper,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="createTime != null" >
-        #{createTime,jdbcType=TIMESTAMP},
-      </if>
       <if test="pu_printstatus != null" >
       <if test="pu_printstatus != null" >
         #{pu_printstatus,jdbcType=VARCHAR},
         #{pu_printstatus,jdbcType=VARCHAR},
       </if>
       </if>
@@ -246,26 +240,27 @@
       </if>
       </if>
       <if test="creatorId != null" >
       <if test="creatorId != null" >
        #{creatorId,jdbcType=INTEGER},
        #{creatorId,jdbcType=INTEGER},
-      </if><if test="createTime != null" >
-       #{createTime,jdbcType=TIMESTAMP},
       </if>
       </if>
       <if test="creatorName != null" >
       <if test="creatorName != null" >
-       #{creatorName,jdbcType=VARCHAR},
+        #{creatorName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null" >
+       #{createTime,jdbcType=TIMESTAMP},
       </if>
       </if>
       <if test="pu_text1 != null" >
       <if test="pu_text1 != null" >
         #{pu_text1,jdbcType=VARCHAR},
         #{pu_text1,jdbcType=VARCHAR},
       </if>
       </if>
       <if test="pu_text2 != null" >
       <if test="pu_text2 != null" >
-        #{pu_text1,jdbcType=VARCHAR},
+        #{pu_text2,jdbcType=VARCHAR},
       </if>
       </if>
       <if test="pu_text3 != null" >
       <if test="pu_text3 != null" >
-        #{pu_text1,jdbcType=VARCHAR},
+        #{pu_text3,jdbcType=VARCHAR},
       </if>
       </if>
       <if test="pu_text4 != null" >
       <if test="pu_text4 != null" >
-        #{pu_text1,jdbcType=VARCHAR},
+        #{pu_text4,jdbcType=VARCHAR},
       </if>
       </if>
       <if test="pu_text5 != null" >
       <if test="pu_text5 != null" >
-        #{pu_text1,jdbcType=VARCHAR},
+        #{pu_text5,jdbcType=VARCHAR},
       </if>
       </if>
       <if test="pu_shipaddresscode != null" >
       <if test="pu_shipaddresscode != null" >
         #{pu_shipaddresscode,jdbcType=LONGVARCHAR},
         #{pu_shipaddresscode,jdbcType=LONGVARCHAR},

+ 11 - 10
frontend/saas-web/app/view/money/fundtransfer/FormPanel.js

@@ -139,15 +139,8 @@ Ext.define('saas.view.money.fundtransfer.FormPanel', {
                     return Ext.util.Format.number(v, format);
                     return Ext.util.Format.number(v, format);
                 }
                 }
             }, {
             }, {
-                text : "结算方式号", 
-                dataIndex : "ftd_paycode", 
-                width : 110,
-                editor:{
-                    xtype: ''  
-                }
-            }, {
-                text : "结算方式", 
-                width : 150.0, 
+                text : "结算方式",
+                width : 150.0,
                 dataIndex : "ftd_paymethod",
                 dataIndex : "ftd_paymethod",
                 editor : {
                 editor : {
                     xtype:'combo',
                     xtype:'combo',
@@ -167,7 +160,15 @@ Ext.define('saas.view.money.fundtransfer.FormPanel', {
                         ]
                         ]
                     })
                     })
                 }
                 }
-            }, {
+            },
+             {
+                text : "结算号",
+                dataIndex : "ftd_paycode",
+                width : 110,
+                editor:{
+                    xtype: ''
+                }
+            },{
                 text : "备注", 
                 text : "备注", 
                 dataIndex : "ftd_remark",
                 dataIndex : "ftd_remark",
                 width : 120.0, 
                 width : 120.0, 

+ 1 - 0
frontend/saas-web/app/view/purchase/purchase/FormPanel.js

@@ -56,6 +56,7 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
         name : "pu_delivery", 
         name : "pu_delivery", 
         fieldLabel : "交货日期",
         fieldLabel : "交货日期",
         allowBlank:false,
         allowBlank:false,
+        defaultValue: new Date(),
         columnWidth : 0.25,
         columnWidth : 0.25,
     },{
     },{
         name : "pu_shipaddresscode", 
         name : "pu_shipaddresscode",