|
@@ -88,14 +88,16 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
|
item1.setSize(size.getSize());
|
|
|
item1.setTotalPrice(boxNumber.multiply(item1.getUnitPrice()));
|
|
|
|
|
|
- boxNumber=boxNumber.divide(item.getPiecesBox(),6,BigDecimal.ROUND_HALF_UP);
|
|
|
+
|
|
|
+
|
|
|
item1.setTotalNetWeight(boxNumber.multiply(item1.getNetWeight()));
|
|
|
item1.setTotalGrossWeight(boxNumber.multiply(item1.getGrossWeight()));
|
|
|
|
|
|
BigDecimal volume=boxNumber.multiply(item1.getOuterBoxHeight());
|
|
|
volume=volume.multiply(item1.getOuterBoxLength());
|
|
|
volume=volume.multiply(item1.getOuterBoxWidth());
|
|
|
- item1.setTotalVolume(volume.divide(new BigDecimal(1000000)));
|
|
|
+ item1.setTotalVolume(volume.divide(new BigDecimal(1000000)));
|
|
|
+
|
|
|
item1.setSyPreAssembledPackingListItemId(size.getItemId());
|
|
|
item1.setSort(size.getNum());
|
|
|
item1.setId(oConvertUtils.id());
|
|
@@ -111,6 +113,8 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
|
item1.setOmpoId(syPreItem.getOmpoId());
|
|
|
item1.setOmpoIdItem(syPreItem.getOmpoIdItem());
|
|
|
item1.setOmpoAccount(syPreItem.getOmpoAccount());
|
|
|
+ item1.setSupplier(syPreItem.getSupplier());
|
|
|
+ item1.setSupplierCode(syPreItem.getSupplierCode());
|
|
|
syPreAssembledPackingListItemMapper.updateById(syPreItem);
|
|
|
syPackingListTailoringItemMapper.insert(item1);
|
|
|
}
|
|
@@ -135,14 +139,14 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
|
item1.setActualPackingQty(boxNumber);
|
|
|
item1.setTotalPrice(boxNumber.multiply(item1.getUnitPrice()));
|
|
|
|
|
|
- boxNumber=boxNumber.divide(item.getPiecesBox(),6,BigDecimal.ROUND_HALF_UP);
|
|
|
+
|
|
|
item1.setTotalNetWeight(boxNumber.multiply(item1.getNetWeight()));
|
|
|
item1.setTotalGrossWeight(boxNumber.multiply(item1.getGrossWeight()));
|
|
|
|
|
|
BigDecimal volume=boxNumber.multiply(item1.getOuterBoxHeight());
|
|
|
volume=volume.multiply(item1.getOuterBoxLength());
|
|
|
volume=volume.multiply(item1.getOuterBoxWidth());
|
|
|
- item1.setTotalVolume(volume.divide(new BigDecimal(1000000)));
|
|
|
+ item1.setTotalVolume(volume.divide(new BigDecimal(1000000)));
|
|
|
|
|
|
|
|
|
item1.setId(size.getItemId());
|
|
@@ -264,6 +268,9 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
|
s1.setInventoryCcode(syPreAssembledPackingListItem.getInventoryCcode());
|
|
|
s1.setWithCode(syPreAssembledPackingListItem.getWithCode());
|
|
|
s1.setOmpoAccount(syPreAssembledPackingListItem.getOmpoAccount());
|
|
|
+
|
|
|
+ s1.setSupplier(syPreAssembledPackingListItem.getSupplier());
|
|
|
+ s1.setSupplierCode(syPreAssembledPackingListItem.getSupplierCode());
|
|
|
s1.setYmoney(syPreAssembledPackingListItem.getYmoney());
|
|
|
s1.setElementsId(syPackingListTailoring.getElementsId());
|
|
|
|
|
@@ -551,7 +558,7 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
|
item.setSyPackingListTailoringId(syPackingListTailoring.getId());
|
|
|
item.setElementsId(syPackingListTailoring.getElementsId());
|
|
|
BigDecimal boxNumber1=item.getBoxNumber();
|
|
|
- item.setGroupId(oConvertUtils.id());
|
|
|
+ item.setGroupId(oConvertUtils.id());
|
|
|
item.setDelFlag("0");
|
|
|
syPackingListTailoring.setTotal(syPackingListTailoring.getTotal().add(item.getTotal()));
|
|
|
item.setSmallPo(syPackingListTailoring.getSmallPo());
|
|
@@ -571,13 +578,16 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
|
item1.setActualPackingQty(boxNumber);
|
|
|
item1.setPlanQuantity(boxNumber);
|
|
|
item1.setSize(size.getSize());
|
|
|
- boxNumber=boxNumber.divide(item.getPiecesBox(),6,BigDecimal.ROUND_HALF_UP);
|
|
|
+
|
|
|
+
|
|
|
item1.setTotalNetWeight(boxNumber.multiply(item1.getNetWeight()));
|
|
|
item1.setTotalGrossWeight(boxNumber.multiply(item1.getGrossWeight()));
|
|
|
BigDecimal volume=boxNumber.multiply(item1.getOuterBoxHeight());
|
|
|
volume=volume.multiply(item1.getOuterBoxLength());
|
|
|
volume=volume.multiply(item1.getOuterBoxWidth());
|
|
|
- item1.setTotalVolume(volume.divide(new BigDecimal(1000000)));
|
|
|
+ item1.setTotalVolume(volume.divide(new BigDecimal(1000000)));
|
|
|
+
|
|
|
+
|
|
|
item1.setSyPreAssembledPackingListItemId(size.getItemId());
|
|
|
item1.setSort(size.getNum());
|
|
|
item1.setId(oConvertUtils.id());
|
|
@@ -589,7 +599,6 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
|
item1.setHod(new SimpleDateFormat("yyyy-MM-dd").parse(syPreItem.getHod()));
|
|
|
item1.setWithCode(syPreItem.getWithCode());
|
|
|
|
|
|
- item1.setOmpoIdItem(syPreItem.getOmpoIdItem());
|
|
|
item1.setUnitPrice(syPreItem.getUnitPrice());
|
|
|
|
|
|
item1.setInventoryName(syPreItem.getInventoryName());
|
|
@@ -603,6 +612,8 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
|
item1.setOmpoId(syPreItem.getOmpoId());
|
|
|
item1.setOmpoIdItem(syPreItem.getOmpoIdItem());
|
|
|
item1.setOmpoAccount(syPreItem.getOmpoAccount());
|
|
|
+ item1.setSupplier(syPreItem.getSupplier());
|
|
|
+ item1.setSupplierCode(syPreItem.getSupplierCode());
|
|
|
syPreAssembledPackingListItemMapper.updateById(syPreItem);
|
|
|
}
|
|
|
syPackingListTailoring.setTotalPrice(syPackingListTailoring.getTotalPrice().add(item1.getTotalPrice()));
|
|
@@ -689,6 +700,7 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
|
}
|
|
|
|
|
|
Map<String,Object> saveBatch(List<SyPackingListTailoring> mains,Map<String,Object> mapt){
|
|
|
+ mapt.put("customerCode","xxx");
|
|
|
if(mains==null||mains.size()==0){
|
|
|
return new HashMap();
|
|
|
}
|
|
@@ -707,40 +719,43 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
|
Map<String,String> mapSort=new HashMap<>();
|
|
|
|
|
|
String createBy="进出口平台管理员";
|
|
|
+
|
|
|
+ String createDate=new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(main.getCreateTime());
|
|
|
JSONObject map=new JSONObject();
|
|
|
- map.put("CVOUCHCODE",purchaseWarehousingMapper.getMaxCode("id+1","RdRecord01","dnmaketime"));
|
|
|
- map.put("DDATE",main.getCreateTime());
|
|
|
+ map.put("CVOUCHCODE", org.jeecg.modules.system.util.oConvertUtils.addOne(purchaseWarehousingMapper.getMaxCode("cCode","RdRecord01","dnmaketime")));
|
|
|
+ map.put("DDATE",createDate);
|
|
|
map.put("CMAKER",createBy);
|
|
|
map.put("cVouchType",1);
|
|
|
|
|
|
|
|
|
- map2.put("CVOUCHCODE",purchaseWarehousingMapper.getMaxCode("ID+1","rdrecord11","dnmaketime"));
|
|
|
+ map2.put("CVOUCHCODE",org.jeecg.modules.system.util.oConvertUtils.addOne(purchaseWarehousingMapper.getMaxCode("cCode","rdrecord11","dnmaketime")));
|
|
|
map2.put("DDATE",main.getCreateTime());
|
|
|
map2.put("CHANDLER",createBy);
|
|
|
map2.put("CMAKER",createBy);
|
|
|
map2.put("cOrderCode",main.getOrderNumber());
|
|
|
|
|
|
JSONObject map3=new JSONObject();
|
|
|
- map3.put("CVOUCHCODE",purchaseWarehousingMapper.getMaxCode("DLID+1","DispatchList","dcreatesystime"));
|
|
|
- map3.put("DDATE",main.getCreateTime());
|
|
|
+ map3.put("CVOUCHCODE",org.jeecg.modules.system.util.oConvertUtils.addOne(purchaseWarehousingMapper.getMaxCode("cDLCode","DispatchList","dcreatesystime")));
|
|
|
+ map3.put("DDATE",createDate);
|
|
|
map3.put("BRETURNFLAG","0");
|
|
|
map3.put("CMAKER",createBy);
|
|
|
+
|
|
|
|
|
|
JSONObject map4=new JSONObject();
|
|
|
- map4.put("CVOUCHCODE",purchaseWarehousingMapper.getMaxCode("ID+1","rdrecord32","dnmaketime"));
|
|
|
- map4.put("DDATE",main.getCreateTime());
|
|
|
+ map4.put("CVOUCHCODE",org.jeecg.modules.system.util.oConvertUtils.addOne(purchaseWarehousingMapper.getMaxCode("ccode","rdrecord32","dnmaketime")));
|
|
|
+ map4.put("DDATE",createDate);
|
|
|
map4.put("CMAKER",createBy);
|
|
|
|
|
|
JSONObject map5=new JSONObject();
|
|
|
- map5.put("CVOUCHCODE",purchaseWarehousingMapper.getMaxCode("PBVID+1","PurBillVouch","cmaketime"));
|
|
|
- map5.put("DDATE",main.getCreateTime());
|
|
|
- map5.put("CTYPE","x");
|
|
|
+ map5.put("CVOUCHCODE",org.jeecg.modules.system.util.oConvertUtils.addOne(purchaseWarehousingMapper.getMaxCode("cpbvcode ","PurBillVouch","cmaketime")));
|
|
|
+ map5.put("DDATE",createDate);
|
|
|
+ map5.put("CTYPE","普通");
|
|
|
map5.put("CMAKER",createBy);
|
|
|
|
|
|
JSONObject map6=new JSONObject();
|
|
|
- map6.put("CVOUCHCODE",purchaseWarehousingMapper.getMaxCode("SBVID+1","SaleBillVouch","dcreatesystime"));
|
|
|
- map6.put("DDATE",main.getCreateTime());
|
|
|
- map6.put("CTYPE","x");
|
|
|
+ map6.put("CVOUCHCODE",org.jeecg.modules.system.util.oConvertUtils.addOne(purchaseWarehousingMapper.getMaxCode("cSBVCode","SaleBillVouch","dcreatesystime")));
|
|
|
+ map6.put("DDATE",createDate);
|
|
|
+ map6.put("CTYPE","普通");
|
|
|
map6.put("CMAKER",createBy);
|
|
|
|
|
|
JSONArray mapItems=new JSONArray();
|
|
@@ -755,16 +770,22 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
|
if(mapt.get("account").equals("903")){
|
|
|
orderData=syPackingListTailoringMapper.getOmOrPo("om_momain","cCode='"+mapt.get("mpOrder")+"'","moid");
|
|
|
map.put("CRDCODE","委外入库");
|
|
|
- map.put("CGLTYPE","委外订单");
|
|
|
+ map.put("CGLTYPE","委外订单");
|
|
|
+ map4.put("CGLTYPE","销售发货单");
|
|
|
+ map5.put("CGLTYPE","委外订单");
|
|
|
+ map6.put("CGLTYPE","销售出库单");
|
|
|
|
|
|
- }else {
|
|
|
+ }else {
|
|
|
if(mapt.get("orderNumber").equals("one")){
|
|
|
- orderData=syPackingListTailoringMapper.getOmOrPo("PO_POMAIN","cPOID='"+mapt.get("mpOrder")+"'","POID");
|
|
|
+ orderData=syPackingListTailoringMapper.getOmOrPo("PO_POMAIN","cPOID='"+mapt.get("mpOrder")+"'","POID");
|
|
|
}else{
|
|
|
orderData=syPackingListTailoringMapper.getOmOrPo("PO_POMAIN","cPOID='"+mapt.get("orderNumber")+"'","POID");
|
|
|
}
|
|
|
map.put("CRDCODE","采购入库");
|
|
|
- map.put("CGLTYPE","采购订单");
|
|
|
+ map.put("CGLTYPE","采购订单");
|
|
|
+ map4.put("CGLTYPE","销售发货单");
|
|
|
+ map5.put("CGLTYPE","采购订单");
|
|
|
+ map6.put("CGLTYPE","销售出库单");
|
|
|
|
|
|
}
|
|
|
if(orderData!=null){
|
|
@@ -793,29 +814,33 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
|
|
|
|
Map<String,Object> orderDataItem=null;
|
|
|
if(!mapt.get("account").equals("903")){
|
|
|
+ System.out.println("mapt.get(\"orderNumber\")\n"+mapt.get("orderNumber"));
|
|
|
if(mapt.get("orderNumber").equals("one")){
|
|
|
orderDataItem=syPackingListTailoringMapper.getOmOrPoItem("PO_PoDetails", "ID='"+item.getOmpoIdItem()+"'","ID");
|
|
|
}else{
|
|
|
- orderDataItem=syPackingListTailoringMapper.getOmOrPoItem("PO_PoDetails", "poid='"+orderData.get("id")+"' and irowno=xxx" +
|
|
|
- "xxxxxxxxxxxxxxxx" +
|
|
|
- "xxxxxxxx" +
|
|
|
- "xxxxxxxxxx" +
|
|
|
- "xxxxxxxx" +
|
|
|
- "xxxxxxx","ID");
|
|
|
+ if(orderData!=null&&orderData.containsKey("id")){
|
|
|
+ orderDataItem=syPackingListTailoringMapper.getOmOrPoItem("PO_PoDetails", "poid='"+orderData.get("id")+"' and irowno='"+
|
|
|
+ ((Map<String,String>)mapt.get("itemSort")).get(item.getId())+"'","ID");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(orderDataItem!=null){
|
|
|
+ Map<String,Object> orderDataItem2=purchaseWarehousingMapper.getPOPodetails(orderDataItem.get("id").toString());
|
|
|
+ getcFree(mapItem,orderDataItem2);
|
|
|
+ getcFree(mapItem5,orderDataItem2);
|
|
|
+ mapItem.put("POAUTOIDCOL","ID");
|
|
|
+ mapItem.put("AUTOID_PO",orderDataItem.get("id"));
|
|
|
+ map5.put("CGLTYPE","采购订单");
|
|
|
+ mapItem5.put("POAUTOIDCOL","ID");
|
|
|
+ mapItem5.put("AUTOID_PO",orderDataItem.get("id"));
|
|
|
+ mapItem5.put("IORIMONEY",orderDataItem.get("iMoney"));
|
|
|
+ mapItem5.put("IMONEY",orderDataItem.get("iNatMoney"));
|
|
|
}
|
|
|
- Map<String,Object> orderDataItem2=purchaseWarehousingMapper.getPOPodetails(orderDataItem.get("id").toString());
|
|
|
- getcFree(mapItem,orderDataItem2);
|
|
|
- mapItem.put("POAUTOIDCOL","ID");
|
|
|
- mapItem.put("AUTOID_PO",orderDataItem.get("id"));
|
|
|
- map5.put("CGLTYPE","采购订单");
|
|
|
- mapItem5.put("POAUTOIDCOL","ID");
|
|
|
- mapItem5.put("AUTOID_PO",orderDataItem.get("id"));
|
|
|
}else{
|
|
|
|
|
|
orderDataItem=syPackingListTailoringMapper.getOmOrPoItem("OM_MODetails", "MODetailsID='"+item.getOmpoIdItem()+"'","MODetailsID");
|
|
|
Map<String,Object> orderDataItem2=purchaseWarehousingMapper.getOMMoDetails(item.getOmpoIdItem());
|
|
|
getcFree(mapItem,orderDataItem2);
|
|
|
- System.out.println("mapItem\t"+mapItem);
|
|
|
+ getcFree(mapItem5,orderDataItem2);
|
|
|
mapItem.put("POAUTOIDCOL","MODetailsID");
|
|
|
mapItem.put("AUTOID_PO",orderDataItem.get("id"));
|
|
|
map5.put("CGLTYPE","委外订单");
|
|
@@ -823,10 +848,9 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
|
mapItem2.put("ALLCAUTOIDCOL","AllocateId");
|
|
|
mapItem5.put("POAUTOIDCOL","MODetailsID");
|
|
|
mapItem5.put("AUTOID_PO",orderDataItem.get("id"));
|
|
|
+ mapItem5.put("IORIMONEY",orderDataItem.get("iMoney"));
|
|
|
+ mapItem5.put("IMONEY",orderDataItem.get("iNatMoney"));
|
|
|
}
|
|
|
- mapItem5.put("IORIMONEY",orderDataItem.get("iMoney"));
|
|
|
- mapItem5.put("IMONEY",orderDataItem.get("iNatMoney"));
|
|
|
-
|
|
|
if(!mapt.get("CVENCODE").equals("one")){
|
|
|
String wheCode=syPackingListTailoringMapper.getWhCodeByVenCode(mapt.get("CVENCODE").toString());
|
|
|
if(wheCode!=null){
|
|
@@ -837,24 +861,24 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
|
mapItem6.put("CWHCODE",wheCode);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ mapt.put("poid","one");
|
|
|
|
|
|
if(item.getSyOrderDataItemId()!=null){
|
|
|
- Map<String,Object> orderDataItem2=syPackingListTailoringMapper.getSoMainItem(orderDataItem.get("iSOsID").toString());
|
|
|
- System.out.println("irowno\t"+orderDataItem2.get("irowno"));
|
|
|
- System.out.println("id\t"+item.getId());
|
|
|
- mapSort.put(item.getId(),orderDataItem2.get("irowno").toString());
|
|
|
- mapItem3.put("ITAXUNITPRICE",orderDataItem2.get("iTaxUnitPrice"));
|
|
|
- mapItem3.put("ITAXRATE",orderDataItem2.get("iTaxRate"));
|
|
|
- mapItem3.put("SOAUTOIDCOL","ISOSID");
|
|
|
- mapItem3.put("AUTOID_SO",orderDataItem2.get("iSOsID"));
|
|
|
- mapt.put("orderNumber", orderDataItem2.get("id"));
|
|
|
+ if(orderDataItem!=null&&orderDataItem.containsKey("iSOsID")){
|
|
|
+ Map<String,Object> orderDataItem2=syPackingListTailoringMapper.getSoMainItem(orderDataItem.get("iSOsID").toString());
|
|
|
+ mapSort.put(item.getId(),orderDataItem2.get("irowno").toString());
|
|
|
+ mapItem3.put("ITAXUNITPRICE",orderDataItem2.get("iTaxUnitPrice"));
|
|
|
+ mapItem3.put("ITAXRATE",orderDataItem2.get("iTaxRate"));
|
|
|
+ mapItem3.put("SOAUTOIDCOL","ISOSID");
|
|
|
+ mapItem3.put("AUTOID_SO",orderDataItem2.get("iSOsID"));
|
|
|
+ mapt.put("poid", orderDataItem2.get("id"));
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- if(!mapt.get("orderNumber").equals("one")){
|
|
|
- Map<String,Object> order=syPackingListTailoringMapper.getSoMain(mapt.get("orderNumber").toString());
|
|
|
+ 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"));
|
|
|
+ mapt.put("customerCode",order.get("cCusCode"));
|
|
|
if(order!=null){
|
|
|
|
|
|
|
|
@@ -871,7 +895,7 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
|
|
|
|
mapItem.put("CINVCODE",item.getInventoryCode());
|
|
|
mapItem.put("IQUANTITY",item.getTotal());
|
|
|
- mapItem.put("INUM",orderDataItem.get("inum"));
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -884,13 +908,13 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
|
mapItem4.put("CINVCODE",item.getInventoryCode());
|
|
|
mapItem4.put("IQUANTITY",item.getTotal());
|
|
|
mapItem4.put("SOAUTOIDCOL","IDLSID");
|
|
|
- mapItem4.put("AUTOID_PO","10300001");
|
|
|
+
|
|
|
|
|
|
mapItem5.put("CINVCODE",item.getInventoryCode());
|
|
|
mapItem5.put("IQUANTITY",item.getTotal());
|
|
|
|
|
|
mapItem6.put("CINVCODE",item.getInventoryCode());
|
|
|
- mapItem6.put("IQUNTITY",item.getTotal());
|
|
|
+ mapItem6.put("IQUANTITY",item.getTotal());
|
|
|
|
|
|
mapItems.add(mapItem);
|
|
|
|
|
@@ -922,56 +946,105 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
|
|
|
}
|
|
|
mapt.put("itemSort",mapSort);
|
|
|
}
|
|
|
+ try{
|
|
|
+ String txtWorld=((Map)mapList.get(0)).get("CACCID")+"\t"+new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS").format(System.currentTimeMillis())+"\n\n";
|
|
|
+ txtWorld+=mapList.toString()+"\n\n";
|
|
|
+ txtWorld+=mapList3.toString()+"\n\n";
|
|
|
+ txtWorld+=mapList4.toString()+"\n\n";
|
|
|
+ txtWorld+=mapList5.toString()+"\n\n";
|
|
|
+ txtWorld+=mapList6.toString()+"\n\n";
|
|
|
+ FileWriter file =new FileWriter ("D:\\test1\\test.txt",true);
|
|
|
+ file.write(txtWorld);
|
|
|
+ file.close();
|
|
|
+ System.out.println("已创建test.txt文件,已写入内容");
|
|
|
+ }catch (Exception e){
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
|
|
|
- mapLists.addAll(mapList);
|
|
|
- String txtWorld=mapt.get("account")+"\t"+new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS").format(System.currentTimeMillis())+"\n\n";
|
|
|
- txtWorld+=mapList.toString()+"\n\n";
|
|
|
- txtWorld+=mapList3.toString()+"\n\n";
|
|
|
- txtWorld+=mapList4.toString()+"\n\n";
|
|
|
- txtWorld+=mapList5.toString()+"\n\n";
|
|
|
- txtWorld+=mapList6.toString()+"\n\n";
|
|
|
+
|
|
|
|
|
|
mapLists.addAll(mapList3);
|
|
|
mapLists.addAll(mapList4);
|
|
|
mapLists.addAll(mapList5);
|
|
|
- mapLists.addAll(mapList6);
|
|
|
-
|
|
|
- System.out.println("mapList1\n"+mapList);
|
|
|
-
|
|
|
- System.out.println("mapList3\n"+mapList3);
|
|
|
- System.out.println("mapList4\n"+mapList4);
|
|
|
- System.out.println("mapList5\n"+mapList5);
|
|
|
- System.out.println("mapList6\n"+mapList6);
|
|
|
+ mapLists.addAll(mapList6);*/
|
|
|
|
|
|
-
|
|
|
+ JSONArray resturn1 = InterfaceConnUtils.doPost(mapList,"purchasein_import");
|
|
|
|
|
|
JSONArray resturn3 = InterfaceConnUtils.doPost(mapList3,"consignment_import");
|
|
|
- JSONArray resturn4 = InterfaceConnUtils.doPost(mapList4,"saleout_import");
|
|
|
JSONArray resturn5 = InterfaceConnUtils.doPost(mapList5,"purinvoice_import");
|
|
|
- JSONArray resturn6 = InterfaceConnUtils.doPost(mapList6,"saleinvoice_import");
|
|
|
|
|
|
- System.out.println("调用接口后返回的信息resturn1\n"+resturn1);
|
|
|
-
|
|
|
- System.out.println("调用接口后返回的信息resturn3\n"+resturn3);
|
|
|
- System.out.println("调用接口后返回的信息resturn4\n"+resturn4);
|
|
|
- System.out.println("调用接口后返回的信息resturn5\n"+resturn5);
|
|
|
- System.out.println("调用接口后返回的信息resturn6\n"+resturn6);*/
|
|
|
+ result(resturn1,"采购入库单",((Map) mapList.get(0)).get("CACCID").toString(),mains.get(0).getId());
|
|
|
+ this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(resturn1.getJSONObject(0).get("U8ReceiptNo").toString()),"107");
|
|
|
|
|
|
- try{
|
|
|
- FileWriter file =new FileWriter ("D:\\test1\\test.txt",true);
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- file.write(txtWorld);
|
|
|
-
|
|
|
- file.close();
|
|
|
- System.out.println("已创建test.txt文件,已写入内容");
|
|
|
- }catch (Exception e){
|
|
|
- e.printStackTrace();
|
|
|
+ result(resturn3,"销售发货单",((Map) mapList.get(0)).get("CACCID").toString(),mains.get(0).getId());
|
|
|
+ String u8ReceiptNo103= resturn3.getJSONObject(0).get("U8ReceiptNo").toString();
|
|
|
+ this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(u8ReceiptNo103.substring(u8ReceiptNo103.length()-4 ) ),"108");
|
|
|
+
|
|
|
+
|
|
|
+ result(resturn5,"采购发票单",((Map) mapList.get(0)).get("CACCID").toString(),mains.get(0).getId());
|
|
|
+ this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(resturn5.getJSONObject(0).get("U8ReceiptNo").toString()),"109");
|
|
|
+
|
|
|
+
|
|
|
+ JSONObject jsonObject3=resturn3.getJSONObject(0);
|
|
|
+ String consignmentName=jsonObject3.get("U8ReceiptNo").toString();
|
|
|
+
|
|
|
+ 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("CINVCODE").equals(map.get("cinvcode"))&&itemMap4.get("IQUANTITY").equals(map.get("iQuantity"))&&!itemMap4.containsKey("AUTOID_SO")){
|
|
|
+ getcFree((JSONObject) itemMap4,map);
|
|
|
+ itemMap4.put("AUTOID_SO",map.get("iDLsID"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ JSONArray resturn4 = InterfaceConnUtils.doPost(mapList4,"saleout_import");
|
|
|
+ result(resturn4,"销售出库单",((Map) mapList.get(0)).get("CACCID").toString(),mains.get(0).getId());
|
|
|
+
|
|
|
+
|
|
|
+ JSONObject jsonObject4=resturn4.getJSONObject(0);
|
|
|
+ String saleoutName=jsonObject4.get("U8ReceiptNo").toString();
|
|
|
+
|
|
|
+ this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(saleoutName),"131");
|
|
|
+
|
|
|
+
|
|
|
+ List<Map<String,Object>> saleoutMaps= syPackingListTailoringMapper.getSaleBillVouchs(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");
|
|
|
+ for (Map itemMap6 : mapItems6){
|
|
|
+ itemMap6.put("DISAUTOIDCOL","AUTOID");
|
|
|
+ if(itemMap6.get("CINVCODE").equals(map.get("cinvcode"))&&itemMap6.get("IQUANTITY").equals(map.get("iQuantity"))&&!itemMap6.containsKey("AUTOID_DIS")){
|
|
|
+ itemMap6.put("AUTOID_DIS",map.get("autoid"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
+ JSONArray resturn6 = InterfaceConnUtils.doPost(mapList6,"saleinvoice_import");
|
|
|
+ result(resturn6,"销售发票单",((Map) mapList.get(0)).get("CACCID").toString(),mains.get(0).getId());
|
|
|
+ this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(resturn6.getJSONObject(0).get("U8ReceiptNo").toString()),"120");
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
return mapt;
|
|
|
}
|
|
|
|
|
|
+ public void result(JSONArray jsonArray,String tableName ,String account,String id){
|
|
|
+ JSONObject jsonObject=jsonArray.getJSONObject(0);
|
|
|
+ if(jsonObject.get("Result").equals("F")){
|
|
|
+
|
|
|
+ syPackingListTailoring.setRecording(account+"-"+tableName);
|
|
|
+ syPackingListTailoringMapper.updateById(syPackingListTailoring);*/
|
|
|
+ throw new JeecgBootException("报错接口"+tableName+",原因\t"+ jsonObject.get("Description"));
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
public void getcFree(JSONObject itemMap,Map<String,Object> mapPOPodetails){
|
|
|
itemMap.put("CDEFINE22",setNull(mapPOPodetails.get("cDefine22")));
|