Browse Source

出运明细调整

huxy 4 days ago
parent
commit
7f0900144b

+ 20 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/cost/service/impl/SyCostAllocationServiceImpl.java

@@ -323,12 +323,18 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
         //查询单证面损数据
         SyFabricLossReport syFabricLossReport = null;
         QueryWrapper<SyFabricLossReport> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("plan_code", syCostAllocation.getPlanNum());
+//        queryWrapper.eq("plan_code", syCostAllocation.getPlanNum());
+        queryWrapper.eq("plan_code",plannum);
         List<SyFabricLossReport> syFabricLossReportList = syFabricLossReportService.list(queryWrapper);
         for (int i=0;i<list3.size();i++) {
 
             SyCostAllocationFabric Fabric = list3.get(i);
 
+//            System.out.println("面料名称增加前\t"+Fabric.getGoodsName());
+//            Fabric.setGoodsName(Fabric.getGoodsName()+"--101采购");
+//            System.out.println("面料名称增加后\t"+Fabric.getGoodsName());
+//            System.out.println("面料名称增加后截取一\t"+Fabric.getGoodsName().substring(0,Fabric.getGoodsName().indexOf("--")));
+
             /*
             1.转入:从材料出库起手,找到委外订单下使用的出库,然后关联采购排除不是自己买的;
                   -- 1.委外订单关联材料出库单,根据计划号查出所有材料出库;
@@ -347,7 +353,13 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
             //转入数量、余下数量
             if(0!=Fabric.getFabrictransferQuantity().compareTo(BigDecimal.ZERO) || 0!=Fabric.getFabricremainingQuantity().compareTo(BigDecimal.ZERO)){
 //                List<SyTransfer> transferlist  = syCostAllocationFabricMapper.queryTransferByFabric(plannum,Fabric.getGoodsName());
-                List<SyTransfer> transferlist  = syTransferMaps.get(Fabric.getGoodsName());
+                List<SyTransfer> transferlist = null;
+                if (Fabric.getGoodsName().indexOf("--")==-1){
+                    transferlist=syTransferMaps.get(Fabric.getGoodsName());
+                }else{
+                    transferlist=syTransferMaps.get(Fabric.getGoodsName().substring(0,Fabric.getGoodsName().indexOf("--")));
+                }
+
                 if (transferlist==null || transferlist.size()==0){
                     transferlist=new ArrayList<>();
                 }
@@ -392,7 +404,12 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
 //                if (syRemaining.size()==0){
 //                    syRemaining=syCostAllocationFabricMapper.queryRemainingByFabric3(plannum,Fabric.getGoodsName());
 //                }
-                List<SyRemaining> syRemaining=syRemainingMaps.get(Fabric.getGoodsName());
+                List<SyRemaining> syRemaining=null;
+                if (Fabric.getGoodsName().indexOf("--")==-1){
+                    syRemaining=syRemainingMaps.get(Fabric.getGoodsName());
+                }else{
+                    syRemaining=syRemainingMaps.get(Fabric.getGoodsName().substring(0,Fabric.getGoodsName().indexOf("--")));
+                }
                 BigDecimal cost = new BigDecimal(BigInteger.ZERO);
                 if (syRemaining==null || syRemaining.size()==0){
                     syRemaining=new ArrayList<>();

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/mapper/xml/SyShippingDetailsMapper.xml

@@ -400,7 +400,7 @@ ${ew.customSqlSegment}
     </select>
 
     <select id="getStrings" resultType="org.jeecg.modules.documents.shippingDetails.entity.SyShippingDetails">
-        select distinct a.id,push_srm_state
+        select distinct a.id,b.push_srm_state
         from sy_shipping_details a
         left join sy_shipping_details_item b on a.id=b.shipping_details_id
         where b.group_id in

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

@@ -949,7 +949,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 				syPackingListFabric.setDocumentNo(documentNos.get(num));//单据号
 				num++;
 				syPackingListFabric.setStatus("0");//状态
-				syPackingListFabric.setMemo("新增测试数据");//备注
+//				syPackingListFabric.setMemo("新增测试数据");//备注
 				syPackingListFabric.setDataSource("excel导入");//excel导入
 				String username=getUsername(token);
 				syPackingListFabric.setPreparedBy(username);//将admin设置为制单人
@@ -963,7 +963,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
 				List<SyPackingListFabricItem> items=syPackingListFabric.getSyPackingListFabricItem();
 				for(SyPackingListFabricItem item :items){
 					item.setDelFlag("0");//是否删除
-					item.setMemo("新增测试数据");
+//					item.setMemo("新增测试数据");
 					item.setSyPackingListFabricId(syPackingListFabric.getId());
 //					SyShippingDetailsItem syShippingDetailsItem=syShippingDetailsItemMapper.selectById(item.getSyShippingDetailsItemId());//itemid
 					SyShippingDetailsItem syShippingDetailsItem=detailsItemMap.get(item.getSyShippingDetailsItemId());//出运明细记录