|
@@ -676,6 +676,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
for(SyPackingListFabricItem item :items){
|
|
|
SyShippingDetailsItem syShippingDetailsItem=syShippingDetailsItemMapper.selectById(item.getSyShippingDetailsItemId());//itemid
|
|
|
if(syShippingDetailsItem==null){
|
|
|
+ System.out.println("ids\t"+item.getSyShippingDetailsItemId());
|
|
|
throw new JeecgBootException("出运明细未找到对应数据");
|
|
|
}
|
|
|
syPackingListFabric.setAccount(syShippingDetailsItem.getAccount());//获取账套号
|
|
@@ -833,7 +834,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
queryWrapper.select("sum(shipment_Quantity) as shipment_Quantity");
|
|
|
SyShippingDetailsItem syShippingDetails=syShippingDetailsItemMapper.selectOne(queryWrapper);
|
|
|
if(syShippingDetails==null){
|
|
|
- // throw new JeecgBootException("该单据在上游未找到");
|
|
|
+ throw new JeecgBootException("该单据在上游未找到");
|
|
|
}else{
|
|
|
total1=syShippingDetails.getShipmentQuantity();
|
|
|
}
|
|
@@ -1243,7 +1244,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(resturn7.getJSONObject(0).get("U8ReceiptNo").toString()),"107");
|
|
|
|
|
|
JSONArray resturn2 = InterfaceConnUtils.doPost(mapList2,"materialout_import");//材料出库单
|
|
|
- isSucceed=result(main,restu rn2,"材料出库单",((Map) mapList2.get(0)).get("CACCID").toString(),"2");//采购入库单
|
|
|
+ isSucceed=result(main,resturn2,"材料出库单",((Map) mapList2.get(0)).get("CACCID").toString(),"2");//采购入库单
|
|
|
isSucceed(main,isSucceed);
|
|
|
this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(resturn2.getJSONObject(0).get("U8ReceiptNo").toString()),"107");
|
|
|
}
|
|
@@ -1262,30 +1263,32 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
if (maps.containsKey(account)){
|
|
|
switch (maps.get(account).get("index")){
|
|
|
case "1": //代表已完成第一道
|
|
|
- JSONArray resturn3 = InterfaceConnUtils.doPost(mapList3,"consignment_import");//销售发货单
|
|
|
- recording=result(main,resturn3,"销售发货单",((Map) mapList.get(0)).get("CACCID").toString(),"2");//销售发货单
|
|
|
- maps.get(account).put("code",resturn3.getJSONObject(0).get("U8ReceiptNo").toString());
|
|
|
- recording(main,recording);
|
|
|
- String u8ReceiptNo103= resturn3.getJSONObject(0).get("U8ReceiptNo").toString();
|
|
|
- this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(u8ReceiptNo103.substring(u8ReceiptNo103.length()-4 ) ),"108");
|
|
|
- case "2":
|
|
|
JSONArray resturn5 = InterfaceConnUtils.doPost(mapList5,"purinvoice_import");//采购发票单
|
|
|
- recording=result(main,resturn5,"采购发票单",((Map) mapList.get(0)).get("CACCID").toString(),"3");//采购发票单
|
|
|
+ recording=result(main,resturn5,"采购发票单",((Map) mapList.get(0)).get("CACCID").toString(),"2");//采购发票单
|
|
|
recording(main,recording);
|
|
|
this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(resturn5.getJSONObject(0).get("U8ReceiptNo").toString()),"109");
|
|
|
if(((Map) mapList.get(0)).get("CACCID").toString().equals("901")){
|
|
|
return account+"账套推送成功!";
|
|
|
}
|
|
|
+ case "2":
|
|
|
+ JSONArray resturn3 = InterfaceConnUtils.doPost(mapList3,"consignment_import");//销售发货单
|
|
|
+ recording=result(main,resturn3,"销售发货单",((Map) mapList.get(0)).get("CACCID").toString(),"3");//销售发货单
|
|
|
+ maps.get(account).put("code",resturn3.getJSONObject(0).get("U8ReceiptNo").toString());
|
|
|
+ recording(main,recording);
|
|
|
+ String u8ReceiptNo103= resturn3.getJSONObject(0).get("U8ReceiptNo").toString();
|
|
|
+ this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(u8ReceiptNo103.substring(u8ReceiptNo103.length()-4 ) ),"108");
|
|
|
case "3":
|
|
|
String consignmentName=maps.get(account).get("code");//获取销售发货单
|
|
|
+ System.out.println("consignmentName\t"+consignmentName);
|
|
|
List<Map<String,Object>> consignmentMaps= syPackingListTailoringMapper.getDispatchLists(consignmentName);
|
|
|
if(consignmentMaps!=null){
|
|
|
for (Map map : consignmentMaps){
|
|
|
JSONObject jsonObject=mapList4.getJSONObject(0);//循环迭代
|
|
|
List<Map<String,Object>> mapItems4= (List<Map<String,Object>>) jsonObject.get("DETAILList");
|
|
|
for (Map itemMap4 : mapItems4){
|
|
|
- if(itemMap4.get("size").equals(map.get("cFree2"))&&(Double.parseDouble( itemMap4.get("IQUANTITY").toString())
|
|
|
- ==Double.parseDouble( map.get("iQuantity").toString()))&&!itemMap4.containsKey("AUTOID_SO")){//根据尺码判断
|
|
|
+ /*itemMap4.get("size").equals(map.get("cFree2"))&& */
|
|
|
+ if((Double.parseDouble( itemMap4.get("IQUANTITY").toString())==Double.parseDouble( map.get("iQuantity").toString()))
|
|
|
+ && !itemMap4.containsKey("AUTOID_SO")){
|
|
|
getcFree((JSONObject) itemMap4,map);
|
|
|
itemMap4.put("AUTOID_SO",map.get("iDLsID"));
|
|
|
}
|
|
@@ -1294,7 +1297,8 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
}
|
|
|
}
|
|
|
text(mapList4,"销售出库单");
|
|
|
- JSONArray resturn4 = InterfaceConnUtils.doPost(mapList4,"saleout_import");//
|
|
|
+ //return null;//提示报错测试数据
|
|
|
+ JSONArray resturn4 = InterfaceConnUtils.doPost(mapList4,"saleout_import");
|
|
|
recording=result(main,resturn4,"销售出库单",((Map) mapList.get(0)).get("CACCID").toString(),"4");//销售出库单
|
|
|
maps.get(account).put("code",resturn4.getJSONObject(0).get("U8ReceiptNo").toString());
|
|
|
recording(main,recording);
|
|
@@ -1332,7 +1336,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(resturn1.getJSONObject(0).get("U8ReceiptNo").toString()),"107");
|
|
|
|
|
|
JSONArray resturn5 = InterfaceConnUtils.doPost(mapList5,"purinvoice_import");//采购发票单
|
|
|
- recording=result(main,resturn5,"采购发票单",((Map) mapList.get(0)).get("CACCID").toString(),"3");//采购发票单
|
|
|
+ recording=result(main,resturn5,"采购发票单",((Map) mapList.get(0)).get("CACCID").toString(),"2");//采购发票单
|
|
|
recording(main,recording);
|
|
|
this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(resturn5.getJSONObject(0).get("U8ReceiptNo").toString()),"109");
|
|
|
|
|
@@ -1341,7 +1345,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
}
|
|
|
|
|
|
JSONArray resturn3 = InterfaceConnUtils.doPost(mapList3,"consignment_import");//销售发货单
|
|
|
- recording=result(main,resturn3,"销售发货单",((Map) mapList.get(0)).get("CACCID").toString(),"2");//销售发货单
|
|
|
+ recording=result(main,resturn3,"销售发货单",((Map) mapList.get(0)).get("CACCID").toString(),"3");//销售发货单
|
|
|
recording(main,recording);
|
|
|
String u8ReceiptNo103= resturn3.getJSONObject(0).get("U8ReceiptNo").toString();
|
|
|
this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(u8ReceiptNo103.substring(u8ReceiptNo103.length()-4 ) ),"108");
|