|
@@ -407,8 +407,8 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
|
|
|
" left join OM_MOMaterials od on od.MoDetailsID=o.MODetailsID " +
|
|
|
" LEFT JOIN Inventory c on c.cInvCode=rs1.cInvCode " +
|
|
|
" LEFT JOIN Vendor v ON r1.cVenCode= v.cVenCode " +
|
|
|
- " where rs1.cPOID like '"+plannum+"%' and v.cVenName='"+Fabric.getProcessUnit()+
|
|
|
- "' and c.cInvName='"+Fabric.getGoodsName()+"' " +
|
|
|
+ " where rs1.cPOID like '"+plannum+"%'"+
|
|
|
+ " and c.cInvName='"+Fabric.getGoodsName()+"' " +
|
|
|
" group BY v.cVenName,c.cInvName,rs1.cPOID,rs1.cfree1,rs1.cInvCode,rs1.cBatch " +
|
|
|
" ) b on r.cBatch = b.cBatch and b.cInvCode=r.cInvCode " +
|
|
|
" JOIN ( " +
|
|
@@ -440,8 +440,8 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
|
|
|
" left join OM_MOMaterials od on od.MoDetailsID=o.MODetailsID " +
|
|
|
" LEFT JOIN Inventory c on c.cInvCode=rs1.cInvCode " +
|
|
|
" LEFT JOIN Vendor v ON r1.cVenCode= v.cVenCode " +
|
|
|
- " where rs1.cPOID not like '"+plannum+"%' and v.cVenName='"+Fabric.getProcessUnit()+
|
|
|
- "' and c.cInvName='"+Fabric.getGoodsName()+"' " +
|
|
|
+ " where rs1.cPOID not like '"+plannum+"%'"+
|
|
|
+ " and c.cInvName='"+Fabric.getGoodsName()+"' " +
|
|
|
" group BY v.cVenName,c.cInvName,rs1.cPOID,rs1.cfree1,rs1.cInvCode,rs1.cBatch " +
|
|
|
" ) b on r.cBatch = b.cBatch and b.cInvCode=r.cInvCode " +
|
|
|
" group by b.cVenName,b.cInvName,b.cPOID,b.cfree1";
|
|
@@ -450,7 +450,7 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
|
|
|
List<JSONObject> remainingJson = JsonChangeUtils.toJSONObject(remainingList);
|
|
|
List<SyRemaining> syRemainingList = new ArrayList<>();
|
|
|
for (int j=0;j<remainingJson.size();j++){
|
|
|
- SyRemaining syRemaining = JSONObject.toJavaObject(remainingJson.get(i), SyRemaining.class);
|
|
|
+ SyRemaining syRemaining = JSONObject.toJavaObject(remainingJson.get(j), SyRemaining.class);
|
|
|
syRemainingList.add(syRemaining);
|
|
|
}
|
|
|
Fabric.setSyRemaining(syRemainingList);
|
|
@@ -462,7 +462,7 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
|
|
|
List<JSONObject> transferJson = JsonChangeUtils.toJSONObject(transferlist);
|
|
|
List<SyTransfer> syTransferList = new ArrayList<>();
|
|
|
for (int j=0;j<transferJson.size();j++){
|
|
|
- SyTransfer transfer = JSONObject.toJavaObject(transferJson.get(i), SyTransfer.class);
|
|
|
+ SyTransfer transfer = JSONObject.toJavaObject(transferJson.get(j), SyTransfer.class);
|
|
|
syTransferList.add(transfer);
|
|
|
}
|
|
|
Fabric.setSyTransfers(syTransferList);
|
|
@@ -565,8 +565,8 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
|
|
|
" left join OM_MOMaterials od on od.MoDetailsID=o.MODetailsID " +
|
|
|
" LEFT JOIN Inventory c on c.cInvCode=rs1.cInvCode " +
|
|
|
" LEFT JOIN Vendor v ON r1.cVenCode= v.cVenCode " +
|
|
|
- " where rs1.cPOID like '"+plannum+"%' and v.cVenName='"+Ingredient.getProcessUnit()+
|
|
|
- "' and c.cInvName='"+Ingredient.getGoodsName()+"' " +
|
|
|
+ " where rs1.cPOID like '"+plannum+"%'"+
|
|
|
+ " and c.cInvName='"+Ingredient.getGoodsName()+"' " +
|
|
|
" group BY v.cVenName,c.cInvName,rs1.cPOID,rs1.cfree1,rs1.cInvCode,rs1.cBatch " +
|
|
|
" ) b on r.cBatch = b.cBatch and b.cInvCode=r.cInvCode " +
|
|
|
" JOIN ( " +
|
|
@@ -598,8 +598,8 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
|
|
|
" left join OM_MOMaterials od on od.MoDetailsID=o.MODetailsID " +
|
|
|
" LEFT JOIN Inventory c on c.cInvCode=rs1.cInvCode " +
|
|
|
" LEFT JOIN Vendor v ON r1.cVenCode= v.cVenCode " +
|
|
|
- " where rs1.cPOID not like '"+plannum+"%' and v.cVenName='"+Ingredient.getProcessUnit()+
|
|
|
- "' and c.cInvName='"+Ingredient.getGoodsName()+"' " +
|
|
|
+ " where rs1.cPOID not like '"+plannum+"%'"+
|
|
|
+ " and c.cInvName='"+Ingredient.getGoodsName()+"' " +
|
|
|
" group BY v.cVenName,c.cInvName,rs1.cPOID,rs1.cfree1,rs1.cInvCode,rs1.cBatch " +
|
|
|
" ) b on r.cBatch = b.cBatch and b.cInvCode=r.cInvCode " +
|
|
|
" group by b.cVenName,b.cInvName,b.cPOID,b.cfree1";
|
|
@@ -608,7 +608,7 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
|
|
|
List<JSONObject> remainingJson = JsonChangeUtils.toJSONObject(remainingList);
|
|
|
List<SyRemaining> syRemainingList = new ArrayList<>();
|
|
|
for (int j=0;j<remainingJson.size();j++){
|
|
|
- SyRemaining syRemaining = JSONObject.toJavaObject(remainingJson.get(i), SyRemaining.class);
|
|
|
+ SyRemaining syRemaining = JSONObject.toJavaObject(remainingJson.get(j), SyRemaining.class);
|
|
|
syRemainingList.add(syRemaining);
|
|
|
}
|
|
|
Ingredient.setSyRemaining(syRemainingList);
|
|
@@ -620,7 +620,7 @@ public class SyCostAllocationServiceImpl extends ServiceImpl<SyCostAllocationMap
|
|
|
List<JSONObject> transferJson = JsonChangeUtils.toJSONObject(transferlist);
|
|
|
List<SyTransfer> syTransferList = new ArrayList<>();
|
|
|
for (int j=0;j<transferJson.size();j++){
|
|
|
- SyTransfer transfer = JSONObject.toJavaObject(transferJson.get(i), SyTransfer.class);
|
|
|
+ SyTransfer transfer = JSONObject.toJavaObject(transferJson.get(j), SyTransfer.class);
|
|
|
syTransferList.add(transfer);
|
|
|
}
|
|
|
Ingredient.setSyTransfers(syTransferList);
|