|
@@ -1265,6 +1265,7 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
|
getcFree(mapItem6,orderDataItem2);
|
|
|
mapItem.put("POAUTOIDCOL","ID");//订单明细ID对应字段名(关联单据类型为采购订单传ID,为采购到货单为Autoid,为委外订单传MODetailsID,为委外到货单为Autoid)
|
|
|
mapItem.put("AUTOID_PO",orderDataItem.get("id"));//明细ID(采购订单行ID/委外订单行ID)
|
|
|
+ mapItem.put("IPROCESSCOST",orderDataItem.get("iUnitPrice"));//明细ID(采购订单行ID/委外订单行ID)
|
|
|
map5.put("CGLTYPE","入库单");
|
|
|
mapItem5.put("POAUTOIDCOL","Autoid");//明细ID对应字段名(关联单据类型为采购订单传ID,委外订单传MODetailsID,入库单为Autoid)
|
|
|
//mapItem5.put("AUTOID_PO",orderDataItem.get("id"));//明细ID(采购订单行ID/委外订单行ID)
|
|
@@ -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");//订单明细ID对应字段名(关联单据类型为采购订单传ID,为采购到货单为Autoid,为委外订单传MODetailsID,为委外到货单为Autoid)
|
|
|
mapItem.put("AUTOID_PO",orderDataItem.get("id"));//明细ID(采购订单行ID/委外订单行ID)
|
|
|
+ mapItem.put("IPROCESSCOST",orderDataItem.get("iUnitPrice"));//明细ID(采购订单行ID/委外订单行ID)
|
|
|
map5.put("CGLTYPE","入库单");
|
|
|
mapItem5.put("POAUTOIDCOL","Autoid");//明细ID对应字段名(关联单据类型为采购订单传ID,委外订单传MODetailsID,入库单为Autoid)
|
|
|
//mapItem5.put("AUTOID_PO",orderDataItem.get("id"));//明细ID(采购订单行ID/委外订单行ID)
|
|
@@ -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());//报关品名
|
|
|
+ //mapItem3.put("CDEFINE23", item.getDeclarationUnit());//报关单位
|
|
|
+ //mapItem3.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());//报关品名
|
|
|
+ //mapItem6.put("CDEFINE23", item.getDeclarationUnit());//报关单位
|
|
|
+ //mapItem6.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")){
|
|
|
//Order order=mapSort.get(item.getId());
|
|
|
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")){//103
|
|
|
- params1="UFDATA_102_2021";//当前数据库
|
|
|
+ //params1="UFDATA_102_2021";//当前数据库
|
|
|
+ params4="1000000002";
|
|
|
+ }else if(mapt.get("account").equals("101")){
|
|
|
+ params4="1000000003";
|
|
|
}
|
|
|
if(mapt.get("customerCode").equals("T020001")){//101
|
|
|
params2="UFDATA_101_2021";
|
|
|
- params4="1000000001";
|
|
|
- }
|
|
|
- if(mapt.get("customerCode").equals("0001")){//102
|
|
|
- params2="UFDATA_101_2021";
|
|
|
- params4="1000000002";
|
|
|
+ }else{
|
|
|
+
|
|
|
}
|
|
|
//String params1="UFDATA_103_2021";//当前数据库
|
|
|
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": //代表已完成第一道
|
|
|
- //JSONObject jsonObject1=resturn1.getJSONObject(0);//采购入库单
|
|
|
- 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){
|
|
|
- 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")){//根据尺码判断
|
|
|
- //getcFree((JSONObject) itemMap5,map);
|
|
|
- itemMap5.put("AUTOID_PO",map.get("AutoID"));
|
|
|
+ if(!account.equals("102")){
|
|
|
+ //JSONObject jsonObject1=resturn1.getJSONObject(0);//采购入库单
|
|
|
+ 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){
|
|
|
+ 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")){//根据尺码判断
|
|
|
+ //getcFree((JSONObject) itemMap5,map);
|
|
|
+ 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");//销售发货单
|