|
@@ -128,6 +128,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
entity.setInventoryQuantity(entity.getActualDeclaredQuantity());//入库数量=实际报关数量
|
|
entity.setInventoryQuantity(entity.getActualDeclaredQuantity());//入库数量=实际报关数量
|
|
entity.setDistributionPoint(detailsItem.getDistributionPoint());//分销点
|
|
entity.setDistributionPoint(detailsItem.getDistributionPoint());//分销点
|
|
entity.setPurOrSubOrder(detailsItem.getPurOrSubOrder());//采购委外订单号
|
|
entity.setPurOrSubOrder(detailsItem.getPurOrSubOrder());//采购委外订单号
|
|
|
|
+ entity.setPrice(detailsItem.getSalesUnitPrice());//单价
|
|
entity.setFactoryUnitPrice(detailsItem.getFactoryUnitPrice());//工厂单价
|
|
entity.setFactoryUnitPrice(detailsItem.getFactoryUnitPrice());//工厂单价
|
|
entity.setTotalPrice(entity.getActualDeclaredQuantity().multiply(entity.getPrice()));//实际报关数量*单价
|
|
entity.setTotalPrice(entity.getActualDeclaredQuantity().multiply(entity.getPrice()));//实际报关数量*单价
|
|
if((entity.getInventoryCode().indexOf("03")!=-1&&!entity.getInventoryCode().equals("0399")) ||
|
|
if((entity.getInventoryCode().indexOf("03")!=-1&&!entity.getInventoryCode().equals("0399")) ||
|
|
@@ -577,6 +578,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
throw new JeecgBootException("出运明细未找到对应数据");
|
|
throw new JeecgBootException("出运明细未找到对应数据");
|
|
}
|
|
}
|
|
if(item.getActualDeclaredQuantity()!=null){
|
|
if(item.getActualDeclaredQuantity()!=null){
|
|
|
|
+ item.setPrice(syShippingDetailsItem.getSalesUnitPrice());
|
|
item.setTotalPrice(item.getActualDeclaredQuantity().multiply(syShippingDetailsItem.getSalesUnitPrice()));//实际报关数量*单价
|
|
item.setTotalPrice(item.getActualDeclaredQuantity().multiply(syShippingDetailsItem.getSalesUnitPrice()));//实际报关数量*单价
|
|
}
|
|
}
|
|
if((syShippingDetailsItem.getInventoryCode().indexOf("03")!=-1&&!syShippingDetailsItem.getInventoryCode().equals("0399")) ||
|
|
if((syShippingDetailsItem.getInventoryCode().indexOf("03")!=-1&&!syShippingDetailsItem.getInventoryCode().equals("0399")) ||
|
|
@@ -610,7 +612,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
item.setSupplierCodeDyeingPlant(syShippingDetailsItem.getSupplierCode());//染厂编码
|
|
item.setSupplierCodeDyeingPlant(syShippingDetailsItem.getSupplierCode());//染厂编码
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
|
|
+ item.setGroupId(oConvertUtils.getId());
|
|
item.setManualYarnUnitPrice(syShippingDetailsItem.getManualYarnUnitPrice());//手册纱单价
|
|
item.setManualYarnUnitPrice(syShippingDetailsItem.getManualYarnUnitPrice());//手册纱单价
|
|
item.setManualYarnProportion(syShippingDetailsItem.getManualYarnProportion());//手册纱占比%
|
|
item.setManualYarnProportion(syShippingDetailsItem.getManualYarnProportion());//手册纱占比%
|
|
item.setInventoryName(syShippingDetailsItem.getInventoryName());//存货名称(辅料名称)
|
|
item.setInventoryName(syShippingDetailsItem.getInventoryName());//存货名称(辅料名称)
|
|
@@ -755,6 +757,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
JSONArray mapList4=new JSONArray();
|
|
JSONArray mapList4=new JSONArray();
|
|
JSONArray mapList5=new JSONArray();
|
|
JSONArray mapList5=new JSONArray();
|
|
JSONArray mapList6=new JSONArray();
|
|
JSONArray mapList6=new JSONArray();
|
|
|
|
+ JSONArray mapList7=new JSONArray();//印厂给染厂做的出库
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -776,9 +779,9 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
map2.put("CVOUCHCODE",org.jeecg.modules.system.util.oConvertUtils.addOne(purchaseWarehousingMapper.getMaxCode("cCode","rdrecord11","dnmaketime")));//单号
|
|
map2.put("CVOUCHCODE",org.jeecg.modules.system.util.oConvertUtils.addOne(purchaseWarehousingMapper.getMaxCode("cCode","rdrecord11","dnmaketime")));//单号
|
|
map2.put("DDATE",createDate);//日期(格式2015-01-01)
|
|
map2.put("DDATE",createDate);//日期(格式2015-01-01)
|
|
map2.put("CHANDLER",createBy);//审核人
|
|
map2.put("CHANDLER",createBy);//审核人
|
|
|
|
+ map2.put("CGLTYPE","委外订单");//出库类别
|
|
map2.put("CRDCODE","22");//暂时设置成默认 Rd_Style有相关数据
|
|
map2.put("CRDCODE","22");//暂时设置成默认 Rd_Style有相关数据
|
|
map2.put("CMAKER",createBy);//制单人
|
|
map2.put("CMAKER",createBy);//制单人
|
|
- map2.put("cOrderCode",main.getOrderNumber());//销售订单号
|
|
|
|
|
|
|
|
JSONObject map3=new JSONObject();//销售发货单
|
|
JSONObject map3=new JSONObject();//销售发货单
|
|
map3.put("CVOUCHCODE",org.jeecg.modules.system.util.oConvertUtils.addOne(purchaseWarehousingMapper.getMaxCode("cDLCode","DispatchList","dcreatesystime")));//发货单号
|
|
map3.put("CVOUCHCODE",org.jeecg.modules.system.util.oConvertUtils.addOne(purchaseWarehousingMapper.getMaxCode("cDLCode","DispatchList","dcreatesystime")));//发货单号
|
|
@@ -805,12 +808,22 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
map6.put("CTYPE","普通");//发票类型(普通,专用)
|
|
map6.put("CTYPE","普通");//发票类型(普通,专用)
|
|
map6.put("CMAKER",createBy);//制单人名称
|
|
map6.put("CMAKER",createBy);//制单人名称
|
|
|
|
|
|
|
|
+ JSONObject map7=new JSONObject();//采购(委外)入库单
|
|
|
|
+ map7.put("CVOUCHCODE", org.jeecg.modules.system.util.oConvertUtils.addOne(purchaseWarehousingMapper.getMaxCode("cCode+1","RdRecord01","dnmaketime")));//获取单据号
|
|
|
|
+ map7.put("DDATE",createDate);//日期(格式2015-01-01)
|
|
|
|
+ map7.put("CMAKER",createBy);//制单人
|
|
|
|
+ map7.put("cVouchType",1);//传1
|
|
|
|
+ map7.put("CRDCODE","委外入库");//入库类别
|
|
|
|
+ map7.put("CGLTYPE","委外订单");//来源单据类型
|
|
|
|
+
|
|
|
|
+
|
|
JSONArray mapItems=new JSONArray();
|
|
JSONArray mapItems=new JSONArray();
|
|
JSONArray mapItems2=new JSONArray();
|
|
JSONArray mapItems2=new JSONArray();
|
|
JSONArray mapItems3=new JSONArray();
|
|
JSONArray mapItems3=new JSONArray();
|
|
JSONArray mapItems4=new JSONArray();
|
|
JSONArray mapItems4=new JSONArray();
|
|
JSONArray mapItems5=new JSONArray();
|
|
JSONArray mapItems5=new JSONArray();
|
|
JSONArray mapItems6=new JSONArray();
|
|
JSONArray mapItems6=new JSONArray();
|
|
|
|
+ JSONArray mapItems7=new JSONArray();
|
|
|
|
|
|
Map<String,Object> orderData=null;
|
|
Map<String,Object> orderData=null;
|
|
|
|
|
|
@@ -821,7 +834,6 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
map4.put("CGLTYPE","销售发货单");//来源单据类型
|
|
map4.put("CGLTYPE","销售发货单");//来源单据类型
|
|
map5.put("CGLTYPE","委外订单");//来源单据类型
|
|
map5.put("CGLTYPE","委外订单");//来源单据类型
|
|
map6.put("CGLTYPE","销售出库单");//来源单据类型
|
|
map6.put("CGLTYPE","销售出库单");//来源单据类型
|
|
- map2.put("CGLTYPE","委外出库");//出库类别
|
|
|
|
}else {//查询采购订单表数据
|
|
}else {//查询采购订单表数据
|
|
if(mapt.get("orderNumber").equals("one")){
|
|
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");//委外订单号判断
|
|
@@ -833,7 +845,6 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
map4.put("CGLTYPE","销售发货单");//来源单据类型
|
|
map4.put("CGLTYPE","销售发货单");//来源单据类型
|
|
map5.put("CGLTYPE","采购订单");//来源单据类型
|
|
map5.put("CGLTYPE","采购订单");//来源单据类型
|
|
map6.put("CGLTYPE","销售出库单");//来源单据类型
|
|
map6.put("CGLTYPE","销售出库单");//来源单据类型
|
|
- map2.put("CGLTYPE","采购出库");//出库类别
|
|
|
|
}
|
|
}
|
|
if(orderData!=null){
|
|
if(orderData!=null){
|
|
map.put("CVENCODE",orderData.get("cvencode"));//供应商编码
|
|
map.put("CVENCODE",orderData.get("cvencode"));//供应商编码
|
|
@@ -843,7 +854,6 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
}
|
|
}
|
|
for (SyPackingListFabricItem item : main.getSyPackingListFabricItem()){
|
|
for (SyPackingListFabricItem item : main.getSyPackingListFabricItem()){
|
|
JSONObject mapItem=new JSONObject();
|
|
JSONObject mapItem=new JSONObject();
|
|
- JSONObject mapItem2=new JSONObject();
|
|
|
|
JSONObject mapItem3=new JSONObject();
|
|
JSONObject mapItem3=new JSONObject();
|
|
JSONObject mapItem4=new JSONObject();
|
|
JSONObject mapItem4=new JSONObject();
|
|
JSONObject mapItem5=new JSONObject();
|
|
JSONObject mapItem5=new JSONObject();
|
|
@@ -856,8 +866,10 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
map4.put("CACCID",mapt.get("account"));//账套号
|
|
map4.put("CACCID",mapt.get("account"));//账套号
|
|
map5.put("CACCID",mapt.get("account"));//账套号
|
|
map5.put("CACCID",mapt.get("account"));//账套号
|
|
map6.put("CACCID",mapt.get("account"));//账套号
|
|
map6.put("CACCID",mapt.get("account"));//账套号
|
|
|
|
+ map7.put("CACCID",mapt.get("account"));//账套号
|
|
|
|
|
|
|
|
|
|
|
|
+ mapItem.put("CBATCH",item.getDyelotNumber());//缸号
|
|
|
|
|
|
Map<String,Object> orderDataItem=null;// inum
|
|
Map<String,Object> orderDataItem=null;// inum
|
|
if(!mapt.get("account").equals("903")){ //采购订单子表数据 顺序---2
|
|
if(!mapt.get("account").equals("903")){ //采购订单子表数据 顺序---2
|
|
@@ -895,15 +907,36 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
mapItem.put("AUTOID_PO",orderDataItem.get("id"));//明细ID(采购订单行ID/委外订单行ID)
|
|
mapItem.put("AUTOID_PO",orderDataItem.get("id"));//明细ID(采购订单行ID/委外订单行ID)
|
|
map5.put("CGLTYPE","委外订单");
|
|
map5.put("CGLTYPE","委外订单");
|
|
|
|
|
|
- getcFree(mapItem2,orderDataItem2);
|
|
|
|
- System.out.println("orderDataItem2\n"+orderDataItem2);
|
|
|
|
- Map<String,Object> orderDataItem3 =syPackingListFabricMapper.getOM_MOMaterials(orderDataItem2);//委外订单子表
|
|
|
|
- System.out.println("orderDataItem3\n"+orderDataItem3);
|
|
|
|
- System.out.println("orderDataItem3.size\t"+orderDataItem3.size());
|
|
|
|
- /*for (Map<String,Object> stringObjectMap : orderDataItem3){
|
|
|
|
- mapItem2.put("AUTOID_ALL",stringObjectMap.get("MOMaterialsID"));//关联明细ID
|
|
|
|
- }*/
|
|
|
|
- mapItem2.put("ALLCAUTOIDCOL","MOMaterialsID");//订单明细ID对应字段名(固定MOMaterialsID) MOMaterialsID
|
|
|
|
|
|
+
|
|
|
|
+ if(item.getInventoryCcode()!=null&&item.getInventoryCcode().indexOf("040")>-1&&mapt.get("account").equals("903")){//903账套中物料分类为040的印花面料
|
|
|
|
+ List<Map<String,Object>> orderDataItem3 =syPackingListFabricMapper.getOM_MOMaterials(item.getOmpoIdItem(),item.getInventoryCode());//委外订单子表
|
|
|
|
+ Map<String,Object> mapStr1=syPackingListFabricMapper.getOM_MOMain(item.getOmpoIdItem(),item.getInventoryCode());//供应商编码,仓库编码
|
|
|
|
+ String cSOCode=syPackingListFabricMapper.getSO_SOMain(mapStr1.get("isosid").toString());
|
|
|
|
+ map7.put("CWHCODE",mapStr1.get("cVenDefine2"));
|
|
|
|
+ map7.put("CVENCODE",mapStr1.get("cVenCode"));
|
|
|
|
+ map7.put("cOrderCode",cSOCode);
|
|
|
|
+ for (Map<String,Object> stringObjectMap : orderDataItem3){
|
|
|
|
+ JSONObject mapItem2=new JSONObject();
|
|
|
|
+ getcFree(mapItem2,stringObjectMap);
|
|
|
|
+ mapItem2.put("ALLCAUTOIDCOL","MOMaterialsID");//订单明细ID对应字段名(固定MOMaterialsID) MOMaterialsID
|
|
|
|
+ mapItem2.put("AUTOID_ALL",stringObjectMap.get("MOMaterialsID"));//关联明细ID
|
|
|
|
+ mapItem2.put("CINVCODE",stringObjectMap.get("cInvCode"));//存货编码(如果来源单据是委外订单,此字段需要传该订单的子件编码)
|
|
|
|
+ mapItem2.put("IQUANTITY",stringObjectMap.get("iQuantity"));//数量
|
|
|
|
+ mapItem2.put("CBATCH",item.getDyelotNumber());//批号
|
|
|
|
+ mapItems2.add(mapItem2);
|
|
|
|
+
|
|
|
|
+ JSONObject mapItem7=new JSONObject();
|
|
|
|
+ getcFree(mapItem7,stringObjectMap);
|
|
|
|
+ mapItem7.put("ALLCAUTOIDCOL","MODetailsID");//订单明细ID对应字段名(固定MOMaterialsID) MOMaterialsID
|
|
|
|
+ mapItem7.put("AUTOID_ALL",stringObjectMap.get("MoDetailsID"));//关联明细ID
|
|
|
|
+ mapItem7.put("CINVCODE",stringObjectMap.get("cInvCode"));//存货编码(如果来源单据是委外订单,此字段需要传该订单的子件编码)
|
|
|
|
+ mapItem7.put("IQUANTITY",stringObjectMap.get("iQuantity"));//数量
|
|
|
|
+ mapItem7.put("CBATCH",item.getDyelotNumber());//批号
|
|
|
|
+ mapItems7.add(mapItem7);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
mapItem5.put("POAUTOIDCOL","MODetailsID");//明细ID对应字段名(关联单据类型为采购订单传ID,委外订单传MODetailsID,入库单为Autoid)
|
|
mapItem5.put("POAUTOIDCOL","MODetailsID");//明细ID对应字段名(关联单据类型为采购订单传ID,委外订单传MODetailsID,入库单为Autoid)
|
|
mapItem5.put("AUTOID_PO",orderDataItem.get("id"));//明细ID(采购订单行ID/委外订单行ID)
|
|
mapItem5.put("AUTOID_PO",orderDataItem.get("id"));//明细ID(采购订单行ID/委外订单行ID)
|
|
mapItem5.put("IORITAXCOST",orderDataItem.get("iTaxPrice"));//原币单价
|
|
mapItem5.put("IORITAXCOST",orderDataItem.get("iTaxPrice"));//原币单价
|
|
@@ -944,6 +977,7 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
map2.put("CEXCH_NAME",order.get("cexch_name"));//币种名称(如果传空,接口默认人民币)
|
|
map2.put("CEXCH_NAME",order.get("cexch_name"));//币种名称(如果传空,接口默认人民币)
|
|
map2.put("CPERSONCODE",order.get("cPersonCode"));//业务员编码(如果传空,取来源单据)
|
|
map2.put("CPERSONCODE",order.get("cPersonCode"));//业务员编码(如果传空,取来源单据)
|
|
map.put("cOrderCode",order.get("cSOCode"));//销售订单号
|
|
map.put("cOrderCode",order.get("cSOCode"));//销售订单号
|
|
|
|
+ map2.put("cOrderCode",order.get("cSOCode"));//销售订单号
|
|
map3.put("CBUSTYPE",order.get("cBusType"));//业务类型(普通销售、分期付款)(如果传空,取来源单据)
|
|
map3.put("CBUSTYPE",order.get("cBusType"));//业务类型(普通销售、分期付款)(如果传空,取来源单据)
|
|
map4.put("CEXCH_NAME",order.get("cexch_name"));//币种名称(如果传空,传来源单据;无来源单据,默认人民币)
|
|
map4.put("CEXCH_NAME",order.get("cexch_name"));//币种名称(如果传空,传来源单据;无来源单据,默认人民币)
|
|
map6.put("CBUSTYPE",order.get("cBusType"));//业务类型
|
|
map6.put("CBUSTYPE",order.get("cBusType"));//业务类型
|
|
@@ -963,8 +997,6 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
|
|
|
//mapItem.put("cBatch","x");//批号
|
|
//mapItem.put("cBatch","x");//批号
|
|
|
|
|
|
- mapItem2.put("CINVCODE",item.getInventoryCode());//存货编码(如果来源单据是委外订单,此字段需要传该订单的子件编码)
|
|
|
|
- mapItem2.put("IQUANTITY",item.getActualDeclaredQuantity());//数量
|
|
|
|
|
|
|
|
mapItem3.put("CINVCODE",item.getInventoryCode());//存货编码
|
|
mapItem3.put("CINVCODE",item.getInventoryCode());//存货编码
|
|
mapItem3.put("IQUANTITY",item.getActualDeclaredQuantity());//数量
|
|
mapItem3.put("IQUANTITY",item.getActualDeclaredQuantity());//数量
|
|
@@ -984,7 +1016,6 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
|
|
|
|
|
|
|
mapItems.add(mapItem);
|
|
mapItems.add(mapItem);
|
|
- mapItems2.add(mapItem2);
|
|
|
|
mapItems3.add(mapItem3);
|
|
mapItems3.add(mapItem3);
|
|
mapItems4.add(mapItem4);
|
|
mapItems4.add(mapItem4);
|
|
mapItems5.add(mapItem5);
|
|
mapItems5.add(mapItem5);
|
|
@@ -993,8 +1024,12 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
|
|
|
|
map.put("DETAILList",mapItems);//明细集合
|
|
map.put("DETAILList",mapItems);//明细集合
|
|
mapList.add(map);
|
|
mapList.add(map);
|
|
- map2.put("DETAILList",mapItems2);//明细集合
|
|
|
|
- mapList2.add(map2);
|
|
|
|
|
|
+ if(mapItems2!=null&&mapItems2.size()!=0){
|
|
|
|
+ map2.put("DETAILList",mapItems2);//明细集合
|
|
|
|
+ mapList2.add(map2);
|
|
|
|
+ map7.put("DETAILList",mapItems7);//明细集合
|
|
|
|
+ mapList7.add(map7);
|
|
|
|
+ }
|
|
map3.put("DETAILList",mapItems3);//明细集合
|
|
map3.put("DETAILList",mapItems3);//明细集合
|
|
mapList3.add(map3);
|
|
mapList3.add(map3);
|
|
map4.put("DETAILList",mapItems4);//明细集合
|
|
map4.put("DETAILList",mapItems4);//明细集合
|
|
@@ -1013,20 +1048,44 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
mapt.put("itemSort",mapSort);
|
|
mapt.put("itemSort",mapSort);
|
|
}
|
|
}
|
|
|
|
|
|
- if(true){
|
|
|
|
|
|
+ /*if(true){
|
|
text(mapList,"采购入库单");
|
|
text(mapList,"采购入库单");
|
|
- text(mapList2,"核销出库单");
|
|
|
|
|
|
+ if(mapList2!=null&&mapList2.size()>0){
|
|
|
|
+ text(mapList2,"核销出库单");
|
|
|
|
+ text(mapList7,"印厂采购入库单");
|
|
|
|
+ }
|
|
text(mapList3,"销售发货单");
|
|
text(mapList3,"销售发货单");
|
|
text(mapList4,"销售出库单");
|
|
text(mapList4,"销售出库单");
|
|
text(mapList5,"采购发票单");
|
|
text(mapList5,"采购发票单");
|
|
text(mapList6,"销售发票单");
|
|
text(mapList6,"销售发票单");
|
|
return "";
|
|
return "";
|
|
- }
|
|
|
|
|
|
+ }*/
|
|
|
|
|
|
text(mapList,"采购入库单");
|
|
text(mapList,"采购入库单");
|
|
text(mapList3,"销售发货单");
|
|
text(mapList3,"销售发货单");
|
|
text(mapList5,"采购发票单");
|
|
text(mapList5,"采购发票单");
|
|
|
|
+ if(mapList2!=null&&mapList2.size()>0){
|
|
|
|
+ text(mapList2,"核销出库单");
|
|
|
|
+ text(mapList7,"印厂采购入库单");
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ String isSucceed=null;
|
|
|
|
+ if(mapList2!=null&&mapList2.size()>0&&main.getIsSucceed()!=null){//印花
|
|
|
|
+ JSONArray resturn2 = InterfaceConnUtils.doPost(mapList2,"materialout_import");//采购入库单
|
|
|
|
+ isSucceed=result(main,resturn2,"材料出库单",((Map) mapList2.get(0)).get("CACCID").toString(),"2");//采购入库单
|
|
|
|
+ isSucceed(main,isSucceed);
|
|
|
|
+ this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(resturn2.getJSONObject(0).get("U8ReceiptNo").toString()),"107");
|
|
|
|
+ }else if(mapList2!=null&&mapList2.size()>0){
|
|
|
|
+ JSONArray resturn7 = InterfaceConnUtils.doPost(mapList7,"purchasein_import");//采购入库单
|
|
|
|
+ isSucceed=result(main,resturn7,"采购入库单",((Map) mapList.get(0)).get("CACCID").toString(),"7");//采购入库单
|
|
|
|
+ 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);
|
|
|
|
+ this.purchaseWarehousingMapper.updateVoucherHistoryCNumber(org.jeecg.modules.system.util.oConvertUtils.maxNumber(resturn2.getJSONObject(0).get("U8ReceiptNo").toString()),"107");
|
|
|
|
+ }
|
|
|
|
|
|
String recording=null;
|
|
String recording=null;
|
|
if(main.getRecording()!=null){
|
|
if(main.getRecording()!=null){
|
|
@@ -1178,7 +1237,6 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
FileWriter file =new FileWriter ("D:\\test1\\面辅料-"+tableName+".txt",true);
|
|
FileWriter file =new FileWriter ("D:\\test1\\面辅料-"+tableName+".txt",true);
|
|
file.write(txtWorld); //以字节数组类型写入内容
|
|
file.write(txtWorld); //以字节数组类型写入内容
|
|
file.close();
|
|
file.close();
|
|
- System.out.println("已创建test.txt文件,已写入内容");
|
|
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
@@ -1210,6 +1268,31 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public void isSucceed(SyPackingListFabric syPackingListTailoring,String recording){
|
|
|
|
+ if(syPackingListTailoring.getIsSucceed()!=null){
|
|
|
|
+ String[] recordings=syPackingListTailoring.getIsSucceed().split(",");
|
|
|
|
+ Map<String,Map<String,String>> maps=new HashMap<>();
|
|
|
|
+ for (int i=0;i<recordings.length;i++){
|
|
|
|
+ Map<String,String> map=new HashMap<>();
|
|
|
|
+ map.put("index",recordings[i].split("-")[1]);
|
|
|
|
+ map.put("code",recordings[i].split("-")[2]);
|
|
|
|
+ maps.put(recordings[i].split("-")[0],map);
|
|
|
|
+ }
|
|
|
|
+ Map<String,String> map=new HashMap<>();
|
|
|
|
+ String[] recording2s=recording.split("-");
|
|
|
|
+ map.put("index",recording2s[1]);
|
|
|
|
+ map.put("code",recording2s[2]);
|
|
|
|
+ maps.put(recording2s[0],map);
|
|
|
|
+ String recording3="";
|
|
|
|
+ for (String str1 : maps.keySet()){
|
|
|
|
+ Map<String,String> map1=maps.get(str1);
|
|
|
|
+ recording3+=str1+"-"+map1.get("index")+"-"+map1.get("code")+",";
|
|
|
|
+ }
|
|
|
|
+ syPackingListTailoring.setIsSucceed(recording3.substring(0,recording3.length()-1));//截取最后的逗号
|
|
|
|
+ }else{
|
|
|
|
+ syPackingListTailoring.setIsSucceed(recording);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
public String result(SyPackingListFabric main,JSONArray jsonArray,String tableName ,String account,String index){
|
|
public String result(SyPackingListFabric main,JSONArray jsonArray,String tableName ,String account,String index){
|
|
JSONObject jsonObject=jsonArray.getJSONObject(0);
|
|
JSONObject jsonObject=jsonArray.getJSONObject(0);
|
|
@@ -1550,7 +1633,9 @@ public class SyPackingListFabricServiceImpl extends ServiceImpl<SyPackingListFab
|
|
sy1.setId(sy1.getU8Id());
|
|
sy1.setId(sy1.getU8Id());
|
|
sy1.setIsosid(sy1.getAccount() + sy1.getIsosid());//账套号+销售订单id
|
|
sy1.setIsosid(sy1.getAccount() + sy1.getIsosid());//账套号+销售订单id
|
|
sy1.setActualDeclaredQuantity(sy1.getInventoryQuantity());//给报关数量赋值
|
|
sy1.setActualDeclaredQuantity(sy1.getInventoryQuantity());//给报关数量赋值
|
|
- sy1.setGroupId(sy1.getOrderNumber() + "-" + sy1.getInventoryCode() + "-" + sy1.getSize());
|
|
|
|
|
|
+
|
|
|
|
+ //sy1.setGroupId(sy1.getOrderNumber() + "-" + sy1.getInventoryCode() + "-" + sy1.getSize());
|
|
|
|
+ sy1.setGroupId(oConvertUtils.getId());
|
|
|
|
|
|
QueryWrapper<SyShippingDetailsItem> queryWrapper2 = new QueryWrapper<>();
|
|
QueryWrapper<SyShippingDetailsItem> queryWrapper2 = new QueryWrapper<>();
|
|
queryWrapper2.eq("sy_order_data_item_id", sy1.getIsosid());
|
|
queryWrapper2.eq("sy_order_data_item_id", sy1.getIsosid());
|