Sfoglia il codice sorgente

托书面辅料推送

zengtx 1 anno fa
parent
commit
7001bfe38a

+ 7 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/syShippingOrder/controller/SyShippingOrderController.java

@@ -1398,6 +1398,7 @@ public class SyShippingOrderController extends JeecgController<SyShippingOrder,
 		 List<Map<String,Object>> listmap = new ArrayList<>();
 		 List<Map<String,Object>> rmbmap = new ArrayList<>();
 		 List<Map<String,Object>> usdmap = new ArrayList<>();
+		 List<SyShippingOrderItem> itemList;
 
 		 try {
 			 //查询主表信息
@@ -1426,7 +1427,12 @@ public class SyShippingOrderController extends JeecgController<SyShippingOrder,
 			 }
 
 			 //查询子表信息
-			 List<SyShippingOrderItem> itemList = syShippingOrderMapper.qeuryItemInfo(entity.getId());
+			 if(entity.getReadyFabric().equals("成衣")){
+				 itemList  = syShippingOrderMapper.qeuryItemInfo(entity.getId());
+			 }else{
+				 itemList =syShippingOrderMapper.qeuryItemInfoTa(entity.getId());
+			 }
+
 			 //集合转map
 			 for (SyShippingOrderItem li : itemList) {
 				 totalNetWeight = totalNetWeight.add(li.getGrossWeight());

+ 3 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/syShippingOrder/mapper/SyShippingOrderMapper.java

@@ -63,8 +63,10 @@ public interface SyShippingOrderMapper extends BaseMapper<SyShippingOrder> {
     //查询美元信息
     public List<SyUsd> usdList(@Param("id") String id);
 
-    //查询子表信息
+    //查询成衣子表信息
     public List<SyShippingOrderItem> qeuryItemInfo(@Param("id") String id);
+    //查询面料子表信息
+    public List<SyShippingOrderItem> qeuryItemInfoTa(@Param("id") String id);
 
     //查询U8 服务供应商
     public List<SyShippingOrder> queryU8ventory();

+ 8 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/syShippingOrder/mapper/xml/SyShippingOrderMapper.xml

@@ -245,6 +245,14 @@ on a.tailoring_fabric_item_id = c.id
 where a.del_flag = 0 and a.sy_shipping_order_item_id = #{id}  group by c.group_id) t  group by t.orderNumber
     </select>
 
+    <select id="qeuryItemInfoTa" resultType="org.jeecg.modules.documents.syShippingOrder.entity.SyShippingOrderItem">
+
+select sum(t.grossWeight) as grossWeight,t.orderNumber,t.tailoringFabricItemId,t.pkOrg from (
+select a.purchase_outsourcing_order_no as orderNumber,sum(a.gross_weight) as grossWeight,
+a.tailoring_fabric_item_id as tailoringFabricItemId,a.pk_org as pkOrg
+from sy_shipping_order_item a
+where a.del_flag = 0 and a.sy_shipping_order_item_id = #{id}  group by a.group_id) t  group by t.orderNumber
+    </select>
 
 
     <select id="queryU8ventory" resultType="org.jeecg.modules.documents.syShippingOrder.entity.SyShippingOrder">

+ 3 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/syShippingOrder/service/impl/SyShippingOrderServiceImpl.java

@@ -732,8 +732,8 @@ public class SyShippingOrderServiceImpl extends ServiceImpl<SyShippingOrderMappe
                     sumImoney = sumImoney.add(new BigDecimal(df.format(imoney)));
 
 
-                    maps.put("iMoney", imoney);
-                    maps.put("INatMoney", imoney);
+                    maps.put("iMoney", df.format(imoney));
+                    maps.put("INatMoney", df.format(imoney));
                     maps.put("cExpCode", rmb.get("itemColumn"));//项目编码
                     maps.put("ID", id);
                     maps.put("irowno", "1");//行号
@@ -791,7 +791,7 @@ public class SyShippingOrderServiceImpl extends ServiceImpl<SyShippingOrderMappe
 
                     maps.put("cbSysBarCode", "||SA09|"+cCode+"|"+ii);
                     maps.put("INatMoney", df.format(imoney*Double.parseDouble(nflat)));
-                    maps.put("iMoney", imoney);
+                    maps.put("iMoney", df.format(imoney));
                     maps.put("cExpCode",usd.get("itemColumn"));//项目编码
                     maps.put("ID", id);
                     maps.put("irowno", "1");//行号