|
@@ -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<>();
|