|
@@ -1522,35 +1522,34 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
|
if (maps.containsKey(account)){
|
|
|
switch (maps.get(account).get("index")){
|
|
|
case "1": //代表已完成第一道
|
|
|
- if(!account.equals("102")/*||mapt.get("CVENCODE").equals("T020001")*/){
|
|
|
- //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);
|
|
|
- }
|
|
|
- }
|
|
|
- text(mapList5,mapt.get("ordertype")+"发票单");
|
|
|
- JSONArray resturn5 = InterfaceConnUtils.doPost(mapList5,"purinvoice_import");//采购发票单
|
|
|
- recording=result(main,resturn5,mapt.get("ordertype")+"发票单",((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(!account.equals("102")/*||mapt.get("CVENCODE").equals("T020001")*/){
|
|
|
+// //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);
|
|
|
+// }
|
|
|
+// }
|
|
|
+// text(mapList5,mapt.get("ordertype")+"发票单");
|
|
|
+// JSONArray resturn5 = InterfaceConnUtils.doPost(mapList5,"purinvoice_import");//采购发票单
|
|
|
+// recording=result(main,resturn5,mapt.get("ordertype")+"发票单",((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":
|
|
|
text(mapList3,"销售发货单");
|
|
|
-
|
|
|
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());
|
|
@@ -1581,29 +1580,29 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
|
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);
|
|
|
- case "4":
|
|
|
- String saleoutName=maps.get(account).get("code");//销售出库单
|
|
|
- this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(saleoutName),"131");
|
|
|
- List<Map<String,Object>> saleoutMaps= syPackingListTailoringMapper.getRdrecord32(saleoutName);
|
|
|
- if(saleoutMaps!=null){
|
|
|
- for (Map map : saleoutMaps){
|
|
|
- JSONObject jsonObject=mapList6.getJSONObject(0);//循环迭代
|
|
|
- List<Map<String,Object>> mapItems6= (List<Map<String,Object>>) jsonObject.get("DETAILList");
|
|
|
- System.out.println("获取数据1\t"+saleoutMaps);
|
|
|
- System.out.println("获取数据2\t"+mapItems6);
|
|
|
- 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")){
|
|
|
- itemMap6.put("AUTOID_DIS",map.get("autoid"));
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- text(mapList6,"销售发票单");
|
|
|
- JSONArray resturn6 = InterfaceConnUtils.doPost(mapList6,"saleinvoice_import");//销售发票单
|
|
|
- recording=result(main,resturn6,"销售发票单",((Map) mapList.get(0)).get("CACCID").toString(),"5");//销售发票单
|
|
|
- recording(main,recording);
|
|
|
+// case "4":
|
|
|
+// String saleoutName=maps.get(account).get("code");//销售出库单编码
|
|
|
+// this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(saleoutName),"131");
|
|
|
+// List<Map<String,Object>> saleoutMaps= syPackingListTailoringMapper.getRdrecord32(saleoutName);
|
|
|
+// if(saleoutMaps!=null){
|
|
|
+// for (Map map : saleoutMaps){
|
|
|
+// JSONObject jsonObject=mapList6.getJSONObject(0);//循环迭代
|
|
|
+// List<Map<String,Object>> mapItems6= (List<Map<String,Object>>) jsonObject.get("DETAILList");
|
|
|
+// System.out.println("获取数据1\t"+saleoutMaps);
|
|
|
+// System.out.println("获取数据2\t"+mapItems6);
|
|
|
+// 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")){
|
|
|
+// itemMap6.put("AUTOID_DIS",map.get("autoid"));
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+// text(mapList6,"销售发票单");
|
|
|
+// JSONArray resturn6 = InterfaceConnUtils.doPost(mapList6,"saleinvoice_import");//销售发票单
|
|
|
+// recording=result(main,resturn6,"销售发票单",((Map) mapList.get(0)).get("CACCID").toString(),"5");//销售发票单
|
|
|
+// recording(main,recording);
|
|
|
}
|
|
|
return account+"账套推送成功!";
|
|
|
}
|
|
@@ -1614,31 +1613,31 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
|
recording(main,recording);
|
|
|
this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(resturn1.getJSONObject(0).get("U8ReceiptNo").toString()),"107");
|
|
|
|
|
|
- JSONObject jsonObject1=resturn1.getJSONObject(0);//采购入库单
|
|
|
- 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");
|
|
|
- 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_SO")){//根据尺码判断
|
|
|
- //getcFree((JSONObject) itemMap5,map);
|
|
|
- itemMap5.put("AUTOID_PO",map.get("AutoID"));
|
|
|
- }
|
|
|
- }
|
|
|
- System.out.println("mapItems4\t"+mapItems5);
|
|
|
- }
|
|
|
- }
|
|
|
+// JSONObject jsonObject1=resturn1.getJSONObject(0);//采购入库单
|
|
|
+// 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");
|
|
|
+// 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_SO")){//根据尺码判断
|
|
|
+// //getcFree((JSONObject) itemMap5,map);
|
|
|
+// itemMap5.put("AUTOID_PO",map.get("AutoID"));
|
|
|
+// }
|
|
|
+// }
|
|
|
+// System.out.println("mapItems4\t"+mapItems5);
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
- if(!((Map) mapList.get(0)).get("CACCID").toString().equals("102")/*||mapt.get("CVENCODE").equals("T020001")*/){
|
|
|
- text(mapList5,mapt.get("ordertype")+"发票单");
|
|
|
- JSONArray resturn5 = InterfaceConnUtils.doPost(mapList5,"purinvoice_import");//采购发票单
|
|
|
- recording=result(main,resturn5,mapt.get("ordertype")+"发票单",((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")*//*||mapt.get("CVENCODE").equals("T020001")*//*){
|
|
|
+// text(mapList5,mapt.get("ordertype")+"发票单");
|
|
|
+// JSONArray resturn5 = InterfaceConnUtils.doPost(mapList5,"purinvoice_import");//采购发票单
|
|
|
+// recording=result(main,resturn5,mapt.get("ordertype")+"发票单",((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,"销售发货单");
|
|
|
JSONArray resturn3 = InterfaceConnUtils.doPost(mapList3,"consignment_import");//销售发货单
|
|
@@ -1677,7 +1676,7 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
|
|
|
|
this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(saleoutName),"131");
|
|
|
|
|
|
- List<Map<String,Object>> saleoutMaps= syPackingListTailoringMapper.getRdrecord32(saleoutName);
|
|
|
+ /*List<Map<String,Object>> saleoutMaps= syPackingListTailoringMapper.getRdrecord32(saleoutName);
|
|
|
if(saleoutMaps!=null){
|
|
|
for (Map map : saleoutMaps){
|
|
|
JSONObject jsonObject=mapList6.getJSONObject(0);//循环迭代
|
|
@@ -1694,7 +1693,7 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
|
text(mapList6,"销售发票单");
|
|
|
JSONArray resturn6 = InterfaceConnUtils.doPost(mapList6,"saleinvoice_import");//销售发票单
|
|
|
recording=result(main,resturn6,"销售发票单",((Map) mapList.get(0)).get("CACCID").toString(),"5");//销售发票单
|
|
|
- recording(main,recording);
|
|
|
+ recording(main,recording);*/
|
|
|
//this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(resturn6.getJSONObject(0).get("U8ReceiptNo").toString()),"120");
|
|
|
return mapList.getJSONObject(0).get("CACCID").toString()+"账套推送成功!";
|
|
|
}
|
|
@@ -2033,7 +2032,17 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
|
jsonObject.put("CINVCODE",item.getInventoryCode());//存货编码
|
|
|
jsonObject.put("CDEFINE28",item.getSmallPo());//小po
|
|
|
jsonObject.put("POAUTOIDCOL","Autoid");//对应类型
|
|
|
- jsonObject.put("CBMEMO",syPackingListTailoring.getMemo());//备注
|
|
|
+
|
|
|
+ String istc2=item.getIsTc();
|
|
|
+ if (istc2!=null&&istc2.equals("1")){
|
|
|
+ if(item.getMemo()!=null){
|
|
|
+ item.setMemo(item.getMemo()+"TC证书");
|
|
|
+ }else{
|
|
|
+ item.setMemo("TC证书");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ jsonObject.put("CBMEMO",item.getMemo());//备注
|
|
|
+
|
|
|
for (Map<String,Object> map : invoices){
|
|
|
if(Double.parseDouble(map.get("iQuantity").toString())==Double.parseDouble(jsonObject.get("IQUANTITY").toString())&&
|
|
|
map.get("cInvCode").toString().equalsIgnoreCase(item.getInventoryCode())&&map.get("cFree2").equals(item.getSize())
|
|
@@ -2181,7 +2190,15 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
|
jsonObject.put("size",item.getSize());
|
|
|
jsonObject.put("CINVCODE",item.getInventoryCode());//存货编码
|
|
|
jsonObject.put("DISAUTOIDCOL","AUTOID");//对应类型
|
|
|
- jsonObject.put("CBMEMO",syPackingListTailoring.getMemo());//备注
|
|
|
+ String istc2=item.getIsTc();
|
|
|
+ if (istc2!=null&&istc2.equals("1")){
|
|
|
+ if(item.getMemo()!=null){
|
|
|
+ item.setMemo(item.getMemo()+"TC证书");
|
|
|
+ }else{
|
|
|
+ item.setMemo("TC证书");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ jsonObject.put("CBMEMO",item.getMemo());//备注
|
|
|
for (Map<String,Object> map : invoices){
|
|
|
if(Double.parseDouble(map.get("iQuantity").toString())==Double.parseDouble(jsonObject.get("IQUANTITY").toString())&&
|
|
|
map.get("cInvCode").toString().equalsIgnoreCase(item.getInventoryCode()) &&jsonObject.get("size").equals(item.getSize())
|