|
@@ -10,6 +10,7 @@ import org.apache.shiro.SecurityUtils;
|
|
|
import org.jeecg.common.exception.JeecgBootException;
|
|
|
import org.jeecg.common.system.util.JwtUtil;
|
|
|
import org.jeecg.common.system.vo.LoginUser;
|
|
|
+import org.jeecg.common.util.RedisUtil;
|
|
|
import org.jeecg.config.InterfaceConnUtils;
|
|
|
import org.jeecg.modules.documents.orderData.entity.SyOrderData;
|
|
|
import org.jeecg.modules.documents.orderData.entity.SyOrderDataItem;
|
|
@@ -1139,6 +1140,8 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
@Autowired
|
|
|
private SyShippingOrderMapper syShippingOrderMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private RedisUtil redisUtil;
|
|
|
|
|
|
* 推送u8
|
|
|
* @param main
|
|
@@ -1160,6 +1163,13 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
|
|
|
JSONArray mapLists=new JSONArray();
|
|
|
|
|
|
+ String pushsno001=org.jeecg.modules.system.util.oConvertUtils.addOne(redisUtil.get("pushsno001").toString());
|
|
|
+ String pushsno002=org.jeecg.modules.system.util.oConvertUtils.addOne(redisUtil.get("pushsno002").toString());
|
|
|
+ String pushsno003=org.jeecg.modules.system.util.oConvertUtils.addOne(redisUtil.get("pushsno003").toString());
|
|
|
+ String pushsno004=org.jeecg.modules.system.util.oConvertUtils.addOne(redisUtil.get("pushsno004").toString());
|
|
|
+ String pushsno005=org.jeecg.modules.system.util.oConvertUtils.addOne(redisUtil.get("pushsno005").toString());
|
|
|
+ String pushsno006=org.jeecg.modules.system.util.oConvertUtils.addOne(redisUtil.get("pushsno006").toString());
|
|
|
+ String pushsno007=org.jeecg.modules.system.util.oConvertUtils.addOne(pushsno001);
|
|
|
if (main!=null){
|
|
|
Map<String, Order> mapSort=new HashMap<>();
|
|
|
String date2 = main.getLatestDateOfShipment2().substring(0,10);
|
|
@@ -1175,7 +1185,8 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
|
|
|
String createDate=main.getTheFinalShippingDate().substring(0,10);
|
|
|
JSONObject map=new JSONObject();
|
|
|
- map.put("CVOUCHCODE", org.jeecg.modules.system.util.oConvertUtils.addOne(purchaseWarehousingMapper.getMaxCode("cCode","RdRecord01","dnmaketime")));
|
|
|
+
|
|
|
+ map.put("CVOUCHCODE",pushsno001);
|
|
|
|
|
|
map.put("DDATE", date2);
|
|
|
map.put("CMAKER",createBy);
|
|
@@ -1183,17 +1194,20 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
map.put("CHANDLER",createBy);
|
|
|
map.put("cVouchType",1);
|
|
|
|
|
|
- JSONObject map2=new JSONObject();
|
|
|
- map2.put("CVOUCHCODE",org.jeecg.modules.system.util.oConvertUtils.addOne(purchaseWarehousingMapper.getMaxCode("cCode","rdrecord11","dnmaketime")));
|
|
|
- map2.put("DDATE",date2);
|
|
|
-
|
|
|
- map2.put("CGLTYPE","委外订单");
|
|
|
- map2.put("CRDCODE","22");
|
|
|
- map2.put("CMAKER",createBy);
|
|
|
- map2.put("CMEMO",main.getRemarks());
|
|
|
+
|
|
|
+ JSONObject map5=new JSONObject();
|
|
|
+
|
|
|
+ map5.put("CVOUCHCODE",pushsno002);
|
|
|
+ map5.put("DDATE",date2);
|
|
|
+ map5.put("CTYPE","专用");
|
|
|
+ map5.put("CMAKER",createBy);
|
|
|
+ map5.put("CGLTYPE","入库单");
|
|
|
+ map5.put("CHANDLER",createBy);
|
|
|
+ map5.put("CMEMO",main.getRemarks());
|
|
|
|
|
|
JSONObject map3=new JSONObject();
|
|
|
- map3.put("CVOUCHCODE",org.jeecg.modules.system.util.oConvertUtils.addOne(purchaseWarehousingMapper.getMaxCode("cDLCode","DispatchList","dcreatesystime")));
|
|
|
+
|
|
|
+ map3.put("CVOUCHCODE",pushsno003);
|
|
|
map3.put("DDATE",date2);
|
|
|
map3.put("BRETURNFLAG","0");
|
|
|
map3.put("CMAKER",createBy);
|
|
@@ -1201,32 +1215,38 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
map3.put("CMEMO",main.getRemarks());
|
|
|
|
|
|
JSONObject map4=new JSONObject();
|
|
|
- map4.put("CVOUCHCODE",org.jeecg.modules.system.util.oConvertUtils.addOne(purchaseWarehousingMapper.getMaxCode("ccode","rdrecord32","dnmaketime")));
|
|
|
+
|
|
|
+ map4.put("CVOUCHCODE",pushsno004);
|
|
|
map4.put("DDATE",date2);
|
|
|
map4.put("CHANDLER",createBy);
|
|
|
map4.put("CRDCODE","26");
|
|
|
map4.put("CMAKER",createBy);
|
|
|
map4.put("CMEMO",main.getRemarks());
|
|
|
|
|
|
- JSONObject map5=new JSONObject();
|
|
|
- map5.put("CVOUCHCODE",org.jeecg.modules.system.util.oConvertUtils.addOne(purchaseWarehousingMapper.getMaxCode("cpbvcode ","PurBillVouch","cmaketime")));
|
|
|
- map5.put("DDATE",date2);
|
|
|
- map5.put("CTYPE","专用");
|
|
|
- map5.put("CMAKER",createBy);
|
|
|
- map5.put("CGLTYPE","入库单");
|
|
|
- map5.put("CHANDLER",createBy);
|
|
|
- map5.put("CMEMO",main.getRemarks());
|
|
|
|
|
|
JSONObject map6=new JSONObject();
|
|
|
- map6.put("CVOUCHCODE",org.jeecg.modules.system.util.oConvertUtils.addOne(purchaseWarehousingMapper.getMaxCode("cSBVCode","SaleBillVouch where cvouchtype=27","cSBVCode")));
|
|
|
+
|
|
|
+ map6.put("CVOUCHCODE",pushsno005);
|
|
|
map6.put("DDATE",date2);
|
|
|
map6.put("CTYPE","普通");
|
|
|
map6.put("CMAKER",createBy);
|
|
|
map6.put("CVERIFIER",createBy);
|
|
|
map6.put("CMEMO",main.getRemarks());
|
|
|
|
|
|
+
|
|
|
+ JSONObject map2=new JSONObject();
|
|
|
+
|
|
|
+ map2.put("CVOUCHCODE",pushsno006);
|
|
|
+ map2.put("DDATE",date2);
|
|
|
+
|
|
|
+ map2.put("CGLTYPE","委外订单");
|
|
|
+ map2.put("CRDCODE","22");
|
|
|
+ map2.put("CMAKER",createBy);
|
|
|
+ map2.put("CMEMO",main.getRemarks());
|
|
|
+
|
|
|
JSONObject map7=new JSONObject();
|
|
|
- map7.put("CVOUCHCODE", org.jeecg.modules.system.util.oConvertUtils.addOne(org.jeecg.modules.system.util.oConvertUtils.addOne(purchaseWarehousingMapper.getMaxCode("cCode","RdRecord01","dnmaketime"))));
|
|
|
+
|
|
|
+ map7.put("CVOUCHCODE",pushsno007 );
|
|
|
map7.put("DDATE",date2);
|
|
|
map7.put("CMAKER",createBy);
|
|
|
map7.put("cVouchType",1);
|
|
@@ -1682,17 +1702,21 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
if(mapList2!=null&&mapList2.size()>0&&main.getIsSucceed()!=null&&main.getIsSucceed().indexOf("-7-")>0){
|
|
|
JSONArray resturn2 = InterfaceConnUtils.doPost(mapList2,"materialout_import");
|
|
|
isSucceed=result(main,resturn2,"材料出库单",((Map) mapList2.get(0)).get("CACCID").toString(),"2");
|
|
|
+ redisUtil.set("pushsno006", pushsno006);
|
|
|
isSucceed(main,isSucceed);
|
|
|
|
|
|
}else if(mapList2!=null&&mapList2.size()>0&&main.getIsSucceed()==null){
|
|
|
JSONArray resturn7 = InterfaceConnUtils.doPost(mapList7,"purchasein_import");
|
|
|
isSucceed=result(main,resturn7,"印厂采购入库单",((Map) mapList.get(0)).get("CACCID").toString(),"7");
|
|
|
+ redisUtil.set("pushsno001", pushsno007);
|
|
|
+ pushsno001=org.jeecg.modules.system.util.oConvertUtils.addOne(pushsno001);
|
|
|
isSucceed(main,isSucceed);
|
|
|
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,resturn2,"材料出库单",((Map) mapList2.get(0)).get("CACCID").toString(),"2");
|
|
|
isSucceed(main,isSucceed);
|
|
|
+ redisUtil.set("pushsno006", pushsno006);
|
|
|
|
|
|
}
|
|
|
}catch (Exception e){
|
|
@@ -1736,6 +1760,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
if(!((Map) mapList.get(0)).get("CACCID").toString().equals("103")){
|
|
|
JSONArray resturn5 = InterfaceConnUtils.doPost(mapList5,"purinvoice_import");
|
|
|
recording=result(main,resturn5,mapt.get("ordertype")+"发票单",((Map) mapList.get(0)).get("CACCID").toString(),"2");
|
|
|
+ redisUtil.set("pushsno002", pushsno002);
|
|
|
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("101")){
|
|
@@ -1749,6 +1774,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
text(mapList3,"销售发货单");
|
|
|
JSONArray resturn3 = InterfaceConnUtils.doPost(mapList3,"consignment_import");
|
|
|
recording=result(main,resturn3,"销售发货单",((Map) mapList.get(0)).get("CACCID").toString(),"3");
|
|
|
+ redisUtil.set("pushsno003", pushsno003);
|
|
|
maps.get(account).put("code",resturn3.getJSONObject(0).get("U8ReceiptNo").toString());
|
|
|
recording(main,recording);
|
|
|
String u8ReceiptNo103= resturn3.getJSONObject(0).get("U8ReceiptNo").toString();
|
|
@@ -1779,6 +1805,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
|
|
|
JSONArray resturn4 = InterfaceConnUtils.doPost(mapList4,"saleout_import");
|
|
|
recording=result(main,resturn4,"销售出库单",((Map) mapList.get(0)).get("CACCID").toString(),"4");
|
|
|
+ redisUtil.set("pushsno004", pushsno004);
|
|
|
maps.get(account).put("code",resturn4.getJSONObject(0).get("U8ReceiptNo").toString());
|
|
|
recording(main,recording);
|
|
|
case "4":
|
|
@@ -1807,6 +1834,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
text(mapList6,"销售发票单");
|
|
|
JSONArray resturn6 = InterfaceConnUtils.doPost(mapList6,"saleinvoice_import");
|
|
|
recording=result(main,resturn6,"销售发票单",((Map) mapList.get(0)).get("CACCID").toString(),"5");
|
|
|
+ redisUtil.set("pushsno005", pushsno005);
|
|
|
recording(main,recording);
|
|
|
}
|
|
|
return account+"账套推送成功!";
|
|
@@ -1815,6 +1843,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
|
|
|
JSONArray resturn1 = InterfaceConnUtils.doPost(mapList,"purchasein_import");
|
|
|
recording=result(main,resturn1,mapt.get("ordertype")+"入库单",((Map) mapList.get(0)).get("CACCID").toString(),"1");
|
|
|
+ redisUtil.set("pushsno001", pushsno001);
|
|
|
recording(main,recording);
|
|
|
this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(resturn1.getJSONObject(0).get("U8ReceiptNo").toString()),"107");
|
|
|
|
|
@@ -1843,6 +1872,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
if(!((Map) mapList.get(0)).get("CACCID").toString().equals("103")){
|
|
|
JSONArray resturn5 = InterfaceConnUtils.doPost(mapList5,"purinvoice_import");
|
|
|
recording=result(main,resturn5,mapt.get("ordertype")+"发票单",((Map) mapList.get(0)).get("CACCID").toString(),"2");
|
|
|
+ redisUtil.set("pushsno002", pushsno002);
|
|
|
recording(main,recording);
|
|
|
this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(resturn5.getJSONObject(0).get("U8ReceiptNo").toString()),"109");
|
|
|
|
|
@@ -1854,6 +1884,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
text(mapList3,"销售发货单");
|
|
|
JSONArray resturn3 = InterfaceConnUtils.doPost(mapList3,"consignment_import");
|
|
|
recording=result(main,resturn3,"销售发货单",((Map) mapList.get(0)).get("CACCID").toString(),"3");
|
|
|
+ redisUtil.set("pushsno003", pushsno003);
|
|
|
recording(main,recording);
|
|
|
String u8ReceiptNo103= resturn3.getJSONObject(0).get("U8ReceiptNo").toString();
|
|
|
this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(u8ReceiptNo103,"108");
|
|
@@ -1883,6 +1914,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
text(mapList4,"销售出库单");
|
|
|
JSONArray resturn4 = InterfaceConnUtils.doPost(mapList4,"saleout_import");
|
|
|
recording=result(main,resturn4,"销售出库单",((Map) mapList.get(0)).get("CACCID").toString(),"4");
|
|
|
+ redisUtil.set("pushsno004", pushsno004);
|
|
|
recording(main,recording);
|
|
|
|
|
|
JSONObject jsonObject4=resturn4.getJSONObject(0);
|
|
@@ -1912,6 +1944,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
text(mapList6,"销售发票单");
|
|
|
JSONArray resturn6 = InterfaceConnUtils.doPost(mapList6,"saleinvoice_import");
|
|
|
recording=result(main,resturn6,"销售发票单",((Map) mapList.get(0)).get("CACCID").toString(),"5");
|
|
|
+ redisUtil.set("pushsno005", pushsno005);
|
|
|
recording(main,recording);
|
|
|
|
|
|
return mapList.getJSONObject(0).get("CACCID").toString()+"账套推送成功!";
|
|
@@ -2438,7 +2471,8 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
Map<String,List<SyPackingListFabric>> listFabricMaps=getListFabricMaps(customers,listFabrics);
|
|
|
Map<String,List<SyPackingListFabric>> codeMaps=new HashMap<>();
|
|
|
JSONArray jsonArrays1=new JSONArray();
|
|
|
- String code=purchaseWarehousingMapper.getMaxCode("cSBVCode","SaleBillVouch where cvouchtype=27","cSBVCode");
|
|
|
+
|
|
|
+ String code=redisUtil.get("pushsno005").toString();
|
|
|
|
|
|
for (String customer : customers.keySet()){
|
|
|
SyPackingListFabric syPackingListFabric=listFabricMaps.get(customer).get(0);
|
|
@@ -2460,8 +2494,8 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
JSONObject jsonObject1=new JSONObject();
|
|
|
|
|
|
Map<String,Object> order=syPackingListTailoringMapper.getSoMainCode(syPackingListFabric.getRdrecord32Code());
|
|
|
- System.out.println("syPackingListFabric.getRdrecord32Code\t"+order);
|
|
|
code=org.jeecg.modules.system.util.oConvertUtils.addOne(code);
|
|
|
+ redisUtil.set("pushsno005", code);
|
|
|
codeMaps.put(code,listFabricMaps.get(customer));
|
|
|
jsonObject1.put("CVOUCHCODE",code);
|
|
|
jsonObject1.put("CMAKER","进出口平台管理员");
|