Browse Source

成本分配修改

huxy 1 year ago
parent
commit
a6c949e92c

+ 3 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/mapper/xml/SyCostAllocationMapper.xml

@@ -20,7 +20,7 @@
     <select id="queryByCostHead" resultType="org.jeecg.modules.cost.entity.SyCostAllocation">
     <select id="queryByCostHead" resultType="org.jeecg.modules.cost.entity.SyCostAllocation">
          SELECT max(ss.iExchRate) as exchangeRate,min(s.iTaxUnitPrice) as soPrice,'101' as pkOrg,
          SELECT max(ss.iExchRate) as exchangeRate,min(s.iTaxUnitPrice) as soPrice,'101' as pkOrg,
             max(o.omCode) as planNum,max(s.cdefine22) as poStyleNum,max(pe.cPersonName) as exportSales,
             max(o.omCode) as planNum,max(s.cdefine22) as poStyleNum,max(pe.cPersonName) as exportSales,
-            max(ss.cSOCode) as garmentContractno,max(de.cDepName) as department,
+            STRING_AGG(ss.cSOCode,',') as garmentContractno,max(de.cDepName) as department,
             max(cc.cCusAbbName) as customerShortame,v.cVenAbbName as processUnit,
             max(cc.cCusAbbName) as customerShortame,v.cVenAbbName as processUnit,
             max(ss.iTaxRate) as taxrate,max(ss.cMaker) as preparedBy,sum(s.iNatSum) as salesordersLocaltotal, 
             max(ss.iTaxRate) as taxrate,max(ss.cMaker) as preparedBy,sum(s.iNatSum) as salesordersLocaltotal, 
             sum(s.iSum) as salesrrdersOriginaltotal,sum(o.iQuantity) as planQuantity    
             sum(s.iSum) as salesrrdersOriginaltotal,sum(o.iQuantity) as planQuantity    
@@ -51,7 +51,7 @@
         
         
         SELECT max(ss.iExchRate) as exchangeRate,min(s.iTaxUnitPrice) as soPrice,'103' as pkOrg,
         SELECT max(ss.iExchRate) as exchangeRate,min(s.iTaxUnitPrice) as soPrice,'103' as pkOrg,
             max(o.omCode) as planNum,max(s.cdefine22) as poStyleNum,max(pe.cPersonName) as exportSales, 
             max(o.omCode) as planNum,max(s.cdefine22) as poStyleNum,max(pe.cPersonName) as exportSales, 
-            max(ss.cSOCode) as garmentContractno,max(de.cDepName) as department,
+            STRING_AGG(ss.cSOCode,',') as garmentContractno,max(de.cDepName) as department,
             max(cu.cCusAbbName) as customerShortame,v.cVenAbbName as processUnit,
             max(cu.cCusAbbName) as customerShortame,v.cVenAbbName as processUnit,
             max(ss.iTaxRate) as taxrate,max(ss.cMaker) as preparedBy,sum(s.iNatSum) as salesordersLocaltotal, 
             max(ss.iTaxRate) as taxrate,max(ss.cMaker) as preparedBy,sum(s.iNatSum) as salesordersLocaltotal, 
             sum(s.iSum) as salesrrdersOriginaltotal,sum(o.iQuantity) as planQuantity    
             sum(s.iSum) as salesrrdersOriginaltotal,sum(o.iQuantity) as planQuantity    
@@ -89,7 +89,7 @@
         
         
         SELECT max(ss.iExchRate) as exchangeRate,min(s.iTaxUnitPrice) as soPrice,'103' as pkOrg,
         SELECT max(ss.iExchRate) as exchangeRate,min(s.iTaxUnitPrice) as soPrice,'103' as pkOrg,
             max(o.omCode) as planNum,max(s.cdefine22) as poStyleNum,max(pe.cPersonName) as exportSales, 
             max(o.omCode) as planNum,max(s.cdefine22) as poStyleNum,max(pe.cPersonName) as exportSales, 
-            max(ss.cSOCode) as garmentContractno,max(de.cDepName) as department,
+            STRING_AGG(ss.cSOCode,',') as garmentContractno,max(de.cDepName) as department,
             max(cu.cCusAbbName) as customerShortame,v.cVenAbbName as processUnit,
             max(cu.cCusAbbName) as customerShortame,v.cVenAbbName as processUnit,
             max(ss.iTaxRate) as taxrate,max(ss.cMaker) as preparedBy,sum(s.iNatSum) as salesordersLocaltotal, 
             max(ss.iTaxRate) as taxrate,max(ss.cMaker) as preparedBy,sum(s.iNatSum) as salesordersLocaltotal, 
             sum(s.iSum) as salesrrdersOriginaltotal,sum(o.iQuantity) as planQuantity    
             sum(s.iSum) as salesrrdersOriginaltotal,sum(o.iQuantity) as planQuantity    

+ 5 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/splfi/service/impl/SyPackingListFabricServiceImpl.java

@@ -1299,8 +1299,8 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 			if(main.getShippingOrderNumber()!=null){
 			if(main.getShippingOrderNumber()!=null){
 				map.put("CDEFINE10",main.getShippingOrderNumber());
 				map.put("CDEFINE10",main.getShippingOrderNumber());
 				map2.put("CDEFINE10",main.getShippingOrderNumber());
 				map2.put("CDEFINE10",main.getShippingOrderNumber());
-				map3.put("CDEFINE10",main.getShippingOrderNumber());
-				map4.put("CDEFINE10",main.getShippingOrderNumber());
+				map3.put("CDEFINE10",main.getShippingOrderNumber().replace("&","(-)"));
+				map4.put("CDEFINE10",main.getShippingOrderNumber().replace("&","(-)"));
 				map5.put("CDEFINE10",main.getShippingOrderNumber());
 				map5.put("CDEFINE10",main.getShippingOrderNumber());
 				map6.put("CDEFINE10",main.getShippingOrderNumber());
 				map6.put("CDEFINE10",main.getShippingOrderNumber());
 				map7.put("CDEFINE10",main.getShippingOrderNumber());
 				map7.put("CDEFINE10",main.getShippingOrderNumber());
@@ -1661,6 +1661,9 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 						map3.put("CEXCH_NAME",order.get("cexch_name"));//币种名称(如果传空,传来源单据;无来源单据,默认人民币)
 						map3.put("CEXCH_NAME",order.get("cexch_name"));//币种名称(如果传空,传来源单据;无来源单据,默认人民币)
 						map4.put("CEXCH_NAME",order.get("cexch_name"));//CEXCH_NAME 币种名称
 						map4.put("CEXCH_NAME",order.get("cexch_name"));//CEXCH_NAME 币种名称
 						map6.put("CEXCH_NAME",order.get("cexch_name"));//CEXCH_NAME 币种名称
 						map6.put("CEXCH_NAME",order.get("cexch_name"));//CEXCH_NAME 币种名称
+						if (order.get("cDefine11")!=null&&order.get("cDefine11").toString().indexOf("&")>-1){
+							map3.put("CDEFINE11",order.get("cDefine11").toString().replace("&","(-)"));// 客户名称
+						}
 						if(!order.get("cexch_name").equals("人民币")){//不为人民币
 						if(!order.get("cexch_name").equals("人民币")){//不为人民币
 							SimpleDateFormat sf1 = new SimpleDateFormat("yyyy-M-dd");
 							SimpleDateFormat sf1 = new SimpleDateFormat("yyyy-M-dd");
 							String dd="";
 							String dd="";