|
@@ -1276,7 +1276,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
//map5.put("CGLTYPE","委外订单");//来源单据类型
|
|
|
map6.put("CGLTYPE","销售出库单");//来源单据类型
|
|
|
}else{
|
|
|
- mapt.put("ordertype","委外");
|
|
|
+ mapt.put("ordertype","采购");
|
|
|
if(mapt.get("orderNumber").equals("one")){
|
|
|
orderData=syPackingListTailoringMapper.getOmOrPo("PO_POMAIN","cPOID='"+mapt.get("mpOrder")+"'","POID");//委外订单号判断 第一次
|
|
|
}else{
|
|
@@ -1691,17 +1691,19 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
switch (maps.get(account).get("index")){
|
|
|
case "1": //代表已完成第一道
|
|
|
//JSONObject jsonObject1=resturn1.getJSONObject(0);//采购入库单
|
|
|
- String purchaseinName=maps.get(account).get("code");//获取销售发货单
|
|
|
+ String purchaseinName=maps.get(account).get("code");//获取采购入库单
|
|
|
//String purchaseinName=jsonObject1.get("U8ReceiptNo").toString();//获取销售发货单
|
|
|
List<Map<String,Object>> purchaseinMaps= syPackingListTailoringMapper.getRdRecord01(purchaseinName);
|
|
|
if(purchaseinMaps!=null){
|
|
|
for (Map map : purchaseinMaps){
|
|
|
JSONObject jsonObject=mapList5.getJSONObject(0);//循环迭代
|
|
|
List<Map<String,Object>> mapItems5= (List<Map<String,Object>>) jsonObject.get("DETAILList");
|
|
|
+ List<Object> ids=new ArrayList<>();
|
|
|
for (Map itemMap5 : mapItems5){
|
|
|
if((Double.parseDouble( itemMap5.get("IQUANTITY").toString())
|
|
|
- ==Double.parseDouble( map.get("iQuantity").toString()))&&!itemMap5.containsKey("AUTOID_PO")){//根据尺码判断
|
|
|
+ ==Double.parseDouble( map.get("iQuantity").toString()))&&!itemMap5.containsKey("AUTOID_PO")&&!ids.contains(map.get("AutoID"))){//根据尺码判断
|
|
|
//getcFree((JSONObject) itemMap5,map);
|
|
|
+ ids.add(map.get("AutoID"));
|
|
|
itemMap5.put("AUTOID_PO",map.get("AutoID"));
|
|
|
}
|
|
|
}
|
|
@@ -1736,10 +1738,12 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
for (Map map : consignmentMaps){
|
|
|
JSONObject jsonObject=mapList4.getJSONObject(0);//循环迭代
|
|
|
List<Map<String,Object>> mapItems4= (List<Map<String,Object>>) jsonObject.get("DETAILList");
|
|
|
+ List<Object> ids=new ArrayList<>();
|
|
|
for (Map itemMap4 : mapItems4){
|
|
|
/*itemMap4.get("size").equals(map.get("cFree2"))&& */
|
|
|
if((Double.parseDouble( itemMap4.get("IQUANTITY").toString())==Double.parseDouble( map.get("iQuantity").toString()))
|
|
|
- && !itemMap4.containsKey("AUTOID_SO")){
|
|
|
+ && !itemMap4.containsKey("AUTOID_SO")&&!ids.contains(map.get("iDLsID"))){
|
|
|
+ ids.add(map.get("iDLsID"));
|
|
|
getcFree((JSONObject) itemMap4,map);
|
|
|
itemMap4.put("AUTOID_SO",map.get("iDLsID"));
|
|
|
}
|
|
@@ -1764,10 +1768,13 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
for (Map map : saleoutMaps){
|
|
|
JSONObject jsonObject=mapList6.getJSONObject(0);//循环迭代
|
|
|
List<Map<String,Object>> mapItems6= (List<Map<String,Object>>) jsonObject.get("DETAILList");
|
|
|
+ List<Object> ids=new ArrayList<>();
|
|
|
for (Map itemMap6 : mapItems6){
|
|
|
itemMap6.put("DISAUTOIDCOL","AUTOID");
|
|
|
//itemMap6.get("size").equals(map.get("cFree2"))&&
|
|
|
- if((Double.parseDouble( itemMap6.get("IQUANTITY").toString()) ==Double.parseDouble( map.get("iQuantity").toString()))&&!itemMap6.containsKey("AUTOID_DIS")){
|
|
|
+ if((Double.parseDouble( itemMap6.get("IQUANTITY").toString()) ==Double.parseDouble( map.get("iQuantity").toString()))
|
|
|
+ &&!itemMap6.containsKey("AUTOID_DIS")&&!ids.contains(map.get("autoid"))){
|
|
|
+ ids.add(map.get("autoid"));
|
|
|
itemMap6.put("AUTOID_DIS",map.get("autoid"));
|
|
|
}
|
|
|
}
|
|
@@ -1795,9 +1802,11 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
for (Map map : purchaseinMaps){
|
|
|
JSONObject jsonObject=mapList5.getJSONObject(0);//循环迭代
|
|
|
List<Map<String,Object>> mapItems5= (List<Map<String,Object>>) jsonObject.get("DETAILList");
|
|
|
+ List<Object> ids=new ArrayList<>();
|
|
|
for (Map itemMap5 : mapItems5){
|
|
|
if((Double.parseDouble( itemMap5.get("IQUANTITY").toString())
|
|
|
- ==Double.parseDouble( map.get("iQuantity").toString()))&&!itemMap5.containsKey("AUTOID_PO")){//根据尺码判断
|
|
|
+ ==Double.parseDouble( map.get("iQuantity").toString()))&&!itemMap5.containsKey("AUTOID_PO")&&!ids.contains(map.get("AutoID"))){//根据尺码判断
|
|
|
+ ids.add(map.get("AutoID"));
|
|
|
//getcFree((JSONObject) itemMap5,map);
|
|
|
itemMap5.put("AUTOID_PO",map.get("AutoID"));
|
|
|
}
|
|
@@ -1832,9 +1841,11 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
for (Map map : consignmentMaps){
|
|
|
JSONObject jsonObject=mapList4.getJSONObject(0);//循环迭代
|
|
|
List<Map<String,Object>> mapItems4= (List<Map<String,Object>>) jsonObject.get("DETAILList");
|
|
|
+ List<Object> ids=new ArrayList<>();
|
|
|
for (Map itemMap4 : mapItems4){
|
|
|
if((Double.parseDouble( itemMap4.get("IQUANTITY").toString())
|
|
|
- ==Double.parseDouble( map.get("iQuantity").toString()))&&!itemMap4.containsKey("AUTOID_PO")){//根据尺码判断
|
|
|
+ ==Double.parseDouble( map.get("iQuantity").toString()))&&!itemMap4.containsKey("AUTOID_PO")&&!ids.contains(map.get("iDLsID"))){//根据尺码判断
|
|
|
+ ids.add(map.get("iDLsID"));
|
|
|
getcFree((JSONObject) itemMap4,map);
|
|
|
itemMap4.put("AUTOID_SO",map.get("iDLsID"));
|
|
|
}
|
|
@@ -1861,10 +1872,12 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
for (Map map : saleoutMaps){
|
|
|
JSONObject jsonObject=mapList6.getJSONObject(0);//循环迭代
|
|
|
List<Map<String,Object>> mapItems6= (List<Map<String,Object>>) jsonObject.get("DETAILList");
|
|
|
+ List<Object> ids=new ArrayList<>();
|
|
|
for (Map itemMap6 : mapItems6){
|
|
|
itemMap6.put("DISAUTOIDCOL","AUTOID");
|
|
|
if(itemMap6.get("size").equals(map.get("cFree2"))&&(Double.parseDouble( itemMap6.get("IQUANTITY").toString())
|
|
|
- ==Double.parseDouble( map.get("iQuantity").toString()))&&!itemMap6.containsKey("AUTOID_DIS")){
|
|
|
+ ==Double.parseDouble( map.get("iQuantity").toString()))&&!itemMap6.containsKey("AUTOID_DIS")&&!ids.contains(map.get("autoid"))){
|
|
|
+ ids.add(map.get("autoid"));
|
|
|
itemMap6.put("AUTOID_DIS",map.get("autoid"));
|
|
|
}
|
|
|
}
|
|
@@ -2287,7 +2300,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
if(gramWeight.intValue()==0||width.intValue()==0||netWeight.intValue()==0){
|
|
|
sy1.setActualDeclaredQuantity(null);
|
|
|
}else{
|
|
|
- BigDecimal meter=netWeight.multiply(gramWeight).multiply(width).divide(new BigDecimal("100000"));//米数
|
|
|
+ BigDecimal meter=netWeight.multiply(new BigDecimal("100000")).divide(width,2,BigDecimal.ROUND_HALF_UP).divide(gramWeight,2,BigDecimal.ROUND_HALF_UP);//米数
|
|
|
sy1.setMeter(meter);//米数
|
|
|
sy1.setActualDeclaredQuantity(sy1.getNetWeight());//获取米数
|
|
|
}
|