Ver Fonte

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

hy há 7 anos atrás
pai
commit
17fbfb674b

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

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

@@ -274,16 +274,25 @@ public class VerificationServiceImpl extends CommonBaseServiceImpl<VerificationM
         String kind = verification.getVc_kind();
         subledger.setCompanyId(BaseContextHolder.getCompanyId());
         subledger.setSl_code(verification.getVc_code());
-        kind = transferKind(kind);
-        subledger.setSl_kind(kind);
+
         if(kind.equals("receipts_offset_receivable") || kind.equals("prepaid_offset_payable") ||
                 kind.equals("receivable_offset_payable")){
+
+            /*
+             ['receipts_offset_receivable', '预收冲应收'],
+                ['prepaid_offset_payable', '预付冲应付'],
+                ['receivable_offset_payable', '应收冲应付'],
+                ['receivable_to_receivable', '应收转应收'],
+                ['payable_to_payable', '应付转应付']
+             */
             subledger.setSl_custid(0);
             subledger.setSl_vendid(verification.getVc_vendid());
         }else{
             subledger.setSl_custid(verification.getVc_custid());
             subledger.setSl_vendid(0);
         }
+        kind = transferKind(kind);
+        subledger.setSl_kind(kind);
         Double amount1 = verification.getVc_amount1()==null?new Double(0):verification.getVc_amount1();
         Double amount2 = verification.getVc_amount2()==null?new Double(0):verification.getVc_amount2();
         subledger.setSl_date(verification.getVc_date());

+ 14 - 1
applications/money/money-server/src/main/resources/mapper/ProfitdetailMapper.xml

@@ -77,6 +77,19 @@ prodinout.companyid= prodiodetail.companyid and prodiodetail.companyid = prodino
 
 	<select id="selectCalculateFields" resultType="string">
 		SELECT ${fields}
+		FROM
+		(
+		SELECT
+		a.pi_custcode,
+		a.pi_custname,
+		a.cu_type,
+		a.cu_sellername,
+		a.saamount,
+		a.netamount,
+		a.costamount,
+		SUM(a.netamount - a.costamount) as profit,
+		(SUM(a.netamount - a.costamount)/IFNULL(netamount,SUM(netamount - costamount))) as profitpresent
+
 		FROM
 		(
 		SELECT
@@ -117,7 +130,7 @@ prodinout.companyid= prodiodetail.companyid and prodiodetail.companyid = prodino
 		a.pi_custcode,
 		a.pi_custname,
 		a.cu_type,
-		a.cu_sellername
+		a.cu_sellername)b
 	</select>
 
 </mapper>

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

+ 19 - 0
base-servers/sms/sms-server/src/main/resources/config/application-docker-prod.yml

@@ -0,0 +1,19 @@
+eureka:
+  instance:
+    hostname: saas-sms-server
+    prefer-ip-address: false
+  client:
+    serviceUrl:
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@saas-eureka-server:8500/eureka/
+spring:
+  rabbitmq:
+    host: 10.10.100.103
+    port: 5672
+    virtual-host: docker
+    username: saas
+    password: select123***
+  redis:
+    host: 10.10.100.173
+    port: 6379
+logging:
+  destination: 10.10.100.160:5000

+ 7 - 0
frontend/saas-web/app/view/core/form/field/ConMonthField.scss

@@ -0,0 +1,7 @@
+.x-conmonthfield > div > div > div > div > div:nth-child(1) > div > div {
+    border-right: none;
+    border-radius: 4px 0 0 4px;
+}
+.x-conmonthfield > div > div > div > div > div:nth-child(2) > div > div {
+    border-radius: 0 4px 4px 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 - 1
frontend/saas-web/app/view/money/fundtransfer/FormPanel.js

@@ -39,7 +39,7 @@ Ext.define('saas.view.money.fundtransfer.FormPanel', {
         xtype : "detailGridField", 
         storeModel:'saas.model.money.FundTransfer',
         detnoColumn:  'ftd_detno',
-        deleteDetailUrl:'/api/money/fundtransfer/deleteItem',
+        deleteDetailUrl:'/api/money/fundtransfer/deleteDetail',
         columnWidth : 1,
         columns : [
             {

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

+ 19 - 0
frontend/saas-web/app/view/money/report/TotalPayDetail.js

@@ -83,6 +83,25 @@ Ext.define('saas.view.money.report.TotalPayDetail', {
             return Ext.util.Format.number(v, format);
         }
     }, {
+            text: '预付余额',
+            dataIndex: 'vm_endpreamount',
+            xtype: 'numbercolumn',
+            width: 110,
+            renderer : function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            },
+            summaryType: 'sum',
+            summaryRenderer: function(v) {
+                var arr = (v + '.').split('.');
+                var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+                var format = '0,000.' + xr.join();
+                return Ext.util.Format.number(v, format);
+            }
+            },
+        {
         text: '应付余额',
         dataIndex: 'vm_endamount',
         xtype: 'numbercolumn',

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

@@ -314,18 +314,21 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
             {
                 text : "采购单明细id", 
                 dataIndex : "pd_orderid", 
+                ignore:true,
                 hidden:true
             },
             {
                 text : "采购单号", 
                 dataIndex : "pd_ordercode", 
-                width : 150.0
+                width : 150.0,
+                ignore:true,
             },{
                 text : "采购序号",
                 dataIndex : "pd_orderdetno", 
                 xtype : "numbercolumn",
                 width : 110.0,
                 format: '0',
+                ignore:true,
                 renderer: function(v) {
                     if(v) {
                         return Ext.util.Format.number(v, '0');

+ 17 - 44
frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js

@@ -67,7 +67,6 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
     },{
         xtype : "textfield", 
         name : "pi_total", 
-        bind : "{pi_total}", 
         fieldLabel : "总额", 
         allowBlank : true,
         readOnly: true,
@@ -75,14 +74,12 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
     }, {
         xtype : "hidden", 
         name : "pi_puid", 
-        bind : "{pi_puid}", 
         fieldLabel : "采购单id", 
         allowBlank : true, 
         columnWidth : 0.25
     },{
         xtype : "hidden", 
         name : "pi_pucode", 
-        bind : "{pi_pucode}", 
         fieldLabel : "采购单号", 
         allowBlank : true, 
         columnWidth : 0.25
@@ -177,29 +174,16 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
                     var format = '0.' + xr.join();
                     return Ext.util.Format.number(v, format);
                 }
-            },            
-            // {
-            //     text : "已转数", 
-            //     dataIndex : "pd_yqty", 
-            //     width : 120.0, 
-            //     xtype : "numbercolumn", 
-            //     format:'0',
-            //     items : null,
-            //     summaryType: 'sum'
-            // },
-            
-            {
+            }, {
                 text : "仓库id", 
                 dataIndex : "pd_whid", 
                 xtype : "numbercolumn",
                 hidden:true
-            },
-            {
+            }, {
                 text : "仓库编号", 
                 dataIndex : "pd_whcode",
                 hidden:true
-            }, 
-            {
+            }, {
                 text : "仓库", 
                 dataIndex : "pd_whname", 
                 width : 150.0, 
@@ -217,8 +201,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
                     valueField : "value", 
                     xtype : "warehouseDbfindTrigger"
                 }
-            },
-            {
+            }, {
                 text : "单价",
                 xtype: 'numbercolumn', 
                 width : 110.0,
@@ -235,7 +218,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
                     var format = '0,000.' + xr.join();
                     return Ext.util.Format.number(v, format);
                 },
-            },{
+            }, {
                 text : "税率", 
                 xtype: 'numbercolumn',
                 dataIndex : "pd_taxrate", 
@@ -255,11 +238,6 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
                 xtype: 'numbercolumn',
                 dataIndex : "pd_ordertotal", 
                 width : 110.0, 
-                // editor : {
-                //     xtype : "numberfield",
-                //     decimalPrecision: 2,
-                //     editable : false
-                // },
                 renderer : function(v) {
                     var arr = (v + '.').split('.');
                     var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
@@ -279,11 +257,6 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
                 xtype: 'numbercolumn',
                 dataIndex : "pd_nettotal", 
                 width : 110.0, 
-                // editor : {
-                //     xtype : "numberfield",
-                //     decimalPrecision: 2,
-                //     editable : false
-                // },
                 renderer : function(v) {
                     var arr = (v + '.').split('.');
                     var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
@@ -297,21 +270,21 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
                     var format = '0,000.' + xr.join();
                     return Ext.util.Format.number(v, format);
                 }
-            },
-            {
-                text : "采购单明细id", 
-                dataIndex : "pd_orderid", 
+            }, {
+                text : "验收明细id", 
+                dataIndex : "pd_ioid", 
                 hidden:true
-            },
-            {
-                text : "采购单号", 
-                dataIndex : "pd_ordercode", 
-                width : 150.0
-            },{
-                text : "采购序号", 
-                dataIndex : "pd_orderdetno", 
+            }, {
+                text : "验收单号", 
+                dataIndex : "iocode", 
+                width : 150.0,
+                ignore:true
+            }, {
+                text : "验收序号", 
+                dataIndex : "iodetno", 
                 xtype : "numbercolumn", 
                 width : 110.0,
+                ignore:true,
                 renderer: function(v) {
                     if(v) {
                         return Ext.util.Format.number(v, '0');