Browse Source

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

rainco 7 years ago
parent
commit
ee5fe5d230

+ 3 - 3
applications/document/document-server/src/main/resources/mapper/ProductMapper.xml

@@ -464,7 +464,7 @@
         <result column="pw_amount" property="rc_amount" jdbcType="DOUBLE"/>
     </resultMap>
     <select id="selectReserveCost" resultMap="ProdReserveCostResultMap">
-        select * from productWH tab left join Product on pw_prodcode=pr_code left join warehouse on pw_whid=wh_id
+        select * from productWH tab left join Product on pw_prodid=pr_id left join warehouse on pw_whid=wh_id
         <where>
             <if test="con!=null">
                 ${con}
@@ -478,7 +478,7 @@
     </select>
     <select id="selectReserveCostByIgnoreWarehouse" resultMap="ProdReserveCostResultMap">
         select pr_code,pr_spec,pr_detail,pr_unit,sum(pw_onhand) pw_onhand,sum(pw_amount) pw_amount
-        from productWH tab left join Product on pw_prodcode=pr_code left join warehouse on pw_whid=wh_id
+        from productWH tab left join Product on pw_prodid=pr_id left join warehouse on pw_whid=wh_id
         <where>
             <if test="con!=null">
                 ${con}
@@ -493,7 +493,7 @@
     </select>
     <select id="selectCalculateFields" resultType="string">
         select   ${fields}
-        from productWH tab left join Product on pw_prodcode=pr_code left join warehouse on pw_whid=wh_id
+        from productWH tab left join Product on pw_prodid=pr_id left join warehouse on pw_whid=wh_id
         <where>
             <if test="con != null">
                 ${con}

+ 4 - 0
applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdIODetailDTO.java

@@ -87,6 +87,10 @@ public class ProdIODetailDTO extends CommonBaseDTO implements Serializable {
 
     private Long pd_ioid;
 
+    private String iocode;
+
+    private Integer iodetno;
+
     private ProductDTO productDTO;
 
 }

+ 4 - 0
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdIODetail.java

@@ -82,6 +82,10 @@ public class ProdIODetail extends CommonBaseEntity implements Serializable {
 
     private Long pd_ioid;
 
+    private String iocode;
+
+    private Integer iodetno;
+
     private ProductDTO productDTO;
 
 }

+ 6 - 2
applications/purchase/purchase-server/src/main/resources/mapper/ProdIODetailMapper.xml

@@ -43,6 +43,8 @@
     <result column="pd_ym" jdbcType="INTEGER" property="pd_ym" />
     <result column="pd_yqty" jdbcType="DOUBLE" property="pd_yqty" />
     <result column="pd_ioid" jdbcType="INTEGER" property="pd_ioid" />
+    <result column="iocode" jdbcType="VARCHAR" property="iocode" />
+    <result column="iodetno" jdbcType="INTEGER" property="iodetno" />
     <association property="productDTO" javaType="com.usoftchina.saas.document.dto.ProductDTO">
       <id column="pr_id" property="id"/>
       <result column="pr_code" property="pr_code"/>
@@ -644,8 +646,10 @@
 
 
   <select id="selectByFK" parameterType="long" resultMap="BaseResultMap">
-    select * from prodiodetail a left join product b on b.pr_id= a.pd_prodid and a.companyid = b.companyid
-    where pd_piid=#{id} order by pd_pdno
+    select pd.*,prod.*,iopd.pd_inoutno iocode,iopd.pd_pdno iodetno from prodiodetail pd
+     left join product prod on prod.pr_id= pd.pd_prodid and pd.companyid = prod.companyid
+     left join prodiodetail iopd on iopd.pd_id = pd.pd_ioid and iopd.companyid = pd.companyid
+    where pd.pd_piid=#{id} order by pd.pd_pdno
   </select>
 
   <delete id="deleteByFK" parameterType="java.lang.Long">

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

@@ -287,6 +287,11 @@ public class SaleServiceImpl implements SaleService{
         if (null != code) {
             throw new BizException(BizExceptionCode.SALE_ALREADY_UNAUDIT);
         }
+        //单据状态为已关闭,无法审核
+        code = saleMapper.validateCloseStatus(id);
+        if (null != code) {
+            throw new BizException(BizExceptionCode.SALE_CLOSE.getCode(),String.format(BizExceptionCode.SALE_CLOSE.getMessage(),"反审核"));
+        }
         //检测出货状态为未出货
         Integer num = saleMapper.checkSendStatus(id);
         if (num > 0) {

+ 2 - 1
frontend/saas-web/app/view/core/report/ReportPanel.js

@@ -213,7 +213,7 @@ Ext.define('saas.view.core.report.ReportPanel', {
                                 })
                                 if (type && d) {
                                     if(typeof c.mySummaryRenderer == 'function') {
-                                        c.summaryValue = c.mySummaryRenderer(grid, datas);
+                                        c.summaryValue = c.mySummaryRenderer(grid, c, datas);
                                     }else if (type == 'count') {
                                         c.summaryValue = Ext.util.Format.number(d[name], c.format || '0');
                                     } else if (typeof c.summaryRenderer == 'function') {
@@ -235,6 +235,7 @@ Ext.define('saas.view.core.report.ReportPanel', {
                             });
                             return datas;
                         } catch (e) {
+                            console.log(e);
                             saas.util.BaseUtil.showErrorToast(e.message);
                         }
                     },

+ 1 - 0
frontend/saas-web/app/view/money/report/RecDetail.js

@@ -122,6 +122,7 @@ Ext.define('saas.view.money.report.RecDetail', {
                 return Ext.util.Format.number(v, format);
             },
             mySummaryRenderer: function(grid, column, datas) {
+                datas = datas || [];
                 var store = grid.store,
                 dataIndex = column.dataIndex,
                 groupField = store.getGroupField(),