|
@@ -1265,6 +1265,7 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
|
getcFree(mapItem6,orderDataItem2);
|
|
|
mapItem.put("POAUTOIDCOL","ID");
|
|
|
mapItem.put("AUTOID_PO",orderDataItem.get("id"));
|
|
|
+ mapItem.put("IPROCESSCOST",orderDataItem.get("iUnitPrice"));
|
|
|
map5.put("CGLTYPE","入库单");
|
|
|
mapItem5.put("POAUTOIDCOL","Autoid");
|
|
|
|
|
@@ -1278,12 +1279,13 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
|
Map<String,Object> orderDataItem2=purchaseWarehousingMapper.getOMMoDetails(item.getOmpoIdItem());
|
|
|
getcFree(mapItem,orderDataItem2);
|
|
|
getcFree(mapItem3,orderDataItem2);
|
|
|
- getcFree(mapItem5,orderDataItem2);
|
|
|
+ getcFree(mapItem5,orderDataItem2);
|
|
|
mapItem5.put("CDEFINE23","");
|
|
|
- mapItem5.put("CDEFINE33","");
|
|
|
+ mapItem5.put("CDEFINE33","");
|
|
|
getcFree(mapItem6,orderDataItem2);
|
|
|
mapItem.put("POAUTOIDCOL","MODetailsID");
|
|
|
mapItem.put("AUTOID_PO",orderDataItem.get("id"));
|
|
|
+ mapItem.put("IPROCESSCOST",orderDataItem.get("iUnitPrice"));
|
|
|
map5.put("CGLTYPE","入库单");
|
|
|
mapItem5.put("POAUTOIDCOL","Autoid");
|
|
|
|
|
@@ -1322,12 +1324,24 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
|
|
|
|
item.getInventoryCode();
|
|
|
|
|
|
- mapItem5.put("CDEFINE23",syPackingListTailoringMapper.getUnit(item.getInventoryCode()) );
|
|
|
+ mapItem.put("CDEFINE23", item.getDeclarationUnit());
|
|
|
+ mapItem.put("CDEFINE33",item.getDeclarationName());
|
|
|
+
|
|
|
+
|
|
|
+ mapItem4.put("CDEFINE23", item.getDeclarationUnit());
|
|
|
+ mapItem4.put("CDEFINE31",item.getDeclarationName());
|
|
|
+ mapItem4.put("CDEFINE33",item.getDeclarationName());
|
|
|
+ mapItem5.put("CDEFINE23", item.getDeclarationUnit());
|
|
|
mapItem5.put("CDEFINE33",item.getDeclarationName());
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
if(!mapt.get("poid").equals("one")){
|
|
|
Map<String,Object> order=syPackingListTailoringMapper.getSoMain(mapt.get("poid").toString());
|
|
|
mapt.put("orderNumber",order.get("cSOCode"));
|
|
|
mapt.put("customerCode",order.get("cCusCode"));
|
|
|
+ System.out.println("mapt.customerCode\t"+order.get("cCusCode"));
|
|
|
if(order!=null){
|
|
|
map.put("cOrderCode",order.get("cSOCode"));
|
|
|
map3.put("CBUSTYPE",order.get("cBusType"));
|
|
@@ -1364,18 +1378,18 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
|
if(!mapt.get("account").equals("101")){
|
|
|
|
|
|
String params1="UFDATA_103_2021";
|
|
|
- String params2="UFDATA_101_2021";
|
|
|
- String params4="1000000001";
|
|
|
+ String params2="UFDATA_102_2021";
|
|
|
+ String params4="1000000001";
|
|
|
if(mapt.get("account").equals("102")){
|
|
|
- params1="UFDATA_102_2021";
|
|
|
+
|
|
|
+ params4="1000000002";
|
|
|
+ }else if(mapt.get("account").equals("101")){
|
|
|
+ params4="1000000003";
|
|
|
}
|
|
|
if(mapt.get("customerCode").equals("T020001")){
|
|
|
params2="UFDATA_101_2021";
|
|
|
- params4="1000000001";
|
|
|
- }
|
|
|
- if(mapt.get("customerCode").equals("0001")){
|
|
|
- params2="UFDATA_101_2021";
|
|
|
- params4="1000000002";
|
|
|
+ }else{
|
|
|
+
|
|
|
}
|
|
|
|
|
|
String params3= (String) map.get("cOrderCode");
|
|
@@ -1434,6 +1448,7 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
|
mapt.put("account","104");
|
|
|
}
|
|
|
mapt.put("itemSort",mapSort);
|
|
|
+ System.out.println("获取循环后当前是第几个账套\t"+mapt.get("account"));
|
|
|
}
|
|
|
text(mapList,"采购入库单");
|
|
|
text(mapList3,"销售发货单");
|
|
@@ -1455,33 +1470,33 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
|
if (maps.containsKey(account)){
|
|
|
switch (maps.get(account).get("index")){
|
|
|
case "1":
|
|
|
-
|
|
|
- String purchaseinName=maps.get(account).get("code");
|
|
|
-
|
|
|
- List<Map<String,Object>> purchaseinMaps= syPackingListTailoringMapper.getRdRecord01(purchaseinName);
|
|
|
- if(purchaseinMaps!=null){
|
|
|
- for (Map map : purchaseinMaps){
|
|
|
- System.out.println("mapt4\n"+map);
|
|
|
- JSONObject jsonObject=mapList5.getJSONObject(0);
|
|
|
- List<Map<String,Object>> mapItems5= (List<Map<String,Object>>) jsonObject.get("DETAILList");
|
|
|
-
|
|
|
- System.out.println("mapItems5\t"+mapItems5);
|
|
|
- for (Map itemMap5 : mapItems5){
|
|
|
- if(itemMap5.get("size").equals(map.get("cFree2"))&&(Double.parseDouble( itemMap5.get("IQUANTITY").toString())
|
|
|
- ==Double.parseDouble( map.get("iQuantity").toString()))&&!itemMap5.containsKey("AUTOID_PO")){
|
|
|
-
|
|
|
- itemMap5.put("AUTOID_PO",map.get("AutoID"));
|
|
|
+ if(!account.equals("102")){
|
|
|
+
|
|
|
+ String purchaseinName=maps.get(account).get("code");
|
|
|
+
|
|
|
+ List<Map<String,Object>> purchaseinMaps= syPackingListTailoringMapper.getRdRecord01(purchaseinName);
|
|
|
+ if(purchaseinMaps!=null){
|
|
|
+ for (Map map : purchaseinMaps){
|
|
|
+ System.out.println("mapt4\n"+map);
|
|
|
+ JSONObject jsonObject=mapList5.getJSONObject(0);
|
|
|
+ List<Map<String,Object>> mapItems5= (List<Map<String,Object>>) jsonObject.get("DETAILList");
|
|
|
+ for (Map itemMap5 : mapItems5){
|
|
|
+ if(itemMap5.get("size").equals(map.get("cFree2"))&&(Double.parseDouble( itemMap5.get("IQUANTITY").toString())
|
|
|
+ ==Double.parseDouble( map.get("iQuantity").toString()))&&!itemMap5.containsKey("AUTOID_PO")){
|
|
|
+
|
|
|
+ itemMap5.put("AUTOID_PO",map.get("AutoID"));
|
|
|
+ }
|
|
|
}
|
|
|
+ System.out.println("mapItems4\t"+mapItems5);
|
|
|
}
|
|
|
- System.out.println("mapItems4\t"+mapItems5);
|
|
|
}
|
|
|
+ text(mapList3,"销售发货单");
|
|
|
+ text(mapList5,"采购发票单");
|
|
|
+ JSONArray resturn5 = InterfaceConnUtils.doPost(mapList5,"purinvoice_import");
|
|
|
+ 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");
|
|
|
}
|
|
|
- text(mapList3,"销售发货单");
|
|
|
- text(mapList5,"采购发票单");
|
|
|
- JSONArray resturn5 = InterfaceConnUtils.doPost(mapList5,"purinvoice_import");
|
|
|
- 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");
|
|
|
case "2":
|
|
|
JSONArray resturn3 = InterfaceConnUtils.doPost(mapList3,"consignment_import");
|
|
|
recording=result(main,resturn3,"销售发货单",((Map) mapList.get(0)).get("CACCID").toString(),"3");
|
|
@@ -1562,11 +1577,12 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- JSONArray resturn5 = InterfaceConnUtils.doPost(mapList5,"purinvoice_import");
|
|
|
- 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("102")){
|
|
|
+ JSONArray resturn5 = InterfaceConnUtils.doPost(mapList5,"purinvoice_import");
|
|
|
+ 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");
|
|
|
+ }
|
|
|
|
|
|
JSONArray resturn3 = InterfaceConnUtils.doPost(mapList3,"consignment_import");
|
|
|
recording=result(main,resturn3,"销售发货单",((Map) mapList.get(0)).get("CACCID").toString(),"3");
|