fix:领料出库单据时间问题
This commit is contained in:
@@ -262,7 +262,7 @@ public class MesToWmsServiceImpl implements MesToWmsService {
|
|||||||
dataOut.put("biztype", "340");
|
dataOut.put("biztype", "340");
|
||||||
dataOut.put("invscheme", "002");
|
dataOut.put("invscheme", "002");
|
||||||
dataOut.put("transtype", "020");
|
dataOut.put("transtype", "020");
|
||||||
dataOut.put("biztime", LocalDate.now());
|
dataOut.put("biztime", LocalDate.now().toString());
|
||||||
dataOut.put("cztype", "02");
|
dataOut.put("cztype", "02");
|
||||||
JSONArray entrysOut = new JSONArray();
|
JSONArray entrysOut = new JSONArray();
|
||||||
for (WorkOrderBomDao item : orderBomItems) {
|
for (WorkOrderBomDao item : orderBomItems) {
|
||||||
@@ -515,7 +515,7 @@ public class MesToWmsServiceImpl implements MesToWmsService {
|
|||||||
dataIn.put("biztype", "390");
|
dataIn.put("biztype", "390");
|
||||||
dataIn.put("invscheme", "001");
|
dataIn.put("invscheme", "001");
|
||||||
dataIn.put("transtype", "024");
|
dataIn.put("transtype", "024");
|
||||||
dataIn.put("biztime", LocalDate.now());
|
dataIn.put("biztime", LocalDate.now().toString());
|
||||||
JSONArray entrysIn = new JSONArray();
|
JSONArray entrysIn = new JSONArray();
|
||||||
JSONObject entry = new JSONObject();
|
JSONObject entry = new JSONObject();
|
||||||
entry.put("srcbillno", orderCode);
|
entry.put("srcbillno", orderCode);
|
||||||
@@ -971,7 +971,7 @@ public class MesToWmsServiceImpl implements MesToWmsService {
|
|||||||
dataOut.put("biztype", "340");
|
dataOut.put("biztype", "340");
|
||||||
dataOut.put("invscheme", "002");
|
dataOut.put("invscheme", "002");
|
||||||
dataOut.put("transtype", "020");
|
dataOut.put("transtype", "020");
|
||||||
dataOut.put("biztime", LocalDate.now());
|
dataOut.put("biztime", LocalDate.now().toString());
|
||||||
dataOut.put("cztype", "02");
|
dataOut.put("cztype", "02");
|
||||||
JSONArray entrysOut = new JSONArray();
|
JSONArray entrysOut = new JSONArray();
|
||||||
for (WorkOrderBomDao item : orderBomItems) {
|
for (WorkOrderBomDao item : orderBomItems) {
|
||||||
@@ -1115,7 +1115,7 @@ public class MesToWmsServiceImpl implements MesToWmsService {
|
|||||||
dataIn.put("biztype", "390");
|
dataIn.put("biztype", "390");
|
||||||
dataIn.put("invscheme", "001");
|
dataIn.put("invscheme", "001");
|
||||||
dataIn.put("transtype", "024");
|
dataIn.put("transtype", "024");
|
||||||
dataIn.put("biztime", LocalDate.now());
|
dataIn.put("biztime", LocalDate.now().toString());
|
||||||
JSONArray entrysIn = new JSONArray();
|
JSONArray entrysIn = new JSONArray();
|
||||||
JSONObject entry = new JSONObject();
|
JSONObject entry = new JSONObject();
|
||||||
entry.put("srcbillno", orderCode);
|
entry.put("srcbillno", orderCode);
|
||||||
|
|||||||
@@ -322,7 +322,7 @@ public class StructOfflineService{
|
|||||||
dataIn.put("biztype", "390");
|
dataIn.put("biztype", "390");
|
||||||
dataIn.put("invscheme", "001");
|
dataIn.put("invscheme", "001");
|
||||||
dataIn.put("transtype", "024");
|
dataIn.put("transtype", "024");
|
||||||
dataIn.put("biztime", LocalDate.now());
|
dataIn.put("biztime", LocalDate.now().toString());
|
||||||
JSONArray entrysIn = new JSONArray();
|
JSONArray entrysIn = new JSONArray();
|
||||||
JSONObject entry = new JSONObject();
|
JSONObject entry = new JSONObject();
|
||||||
entry.put("srcbillno", orderCode);
|
entry.put("srcbillno", orderCode);
|
||||||
|
|||||||
@@ -863,7 +863,7 @@ public class InboundPdaServiceImpl implements InboundPdaService {
|
|||||||
dataIn.put("biztype", "390");
|
dataIn.put("biztype", "390");
|
||||||
dataIn.put("invscheme", "001");
|
dataIn.put("invscheme", "001");
|
||||||
dataIn.put("transtype", "024");
|
dataIn.put("transtype", "024");
|
||||||
dataIn.put("biztime", LocalDate.now());
|
dataIn.put("biztime", LocalDate.now().toString());
|
||||||
JSONArray entrysIn = new JSONArray();
|
JSONArray entrysIn = new JSONArray();
|
||||||
JSONObject entry = new JSONObject();
|
JSONObject entry = new JSONObject();
|
||||||
entry.put("srcbillno", workOrder.getOrder_code());
|
entry.put("srcbillno", workOrder.getOrder_code());
|
||||||
|
|||||||
@@ -377,7 +377,7 @@ public class PlatingDemandServiceImpl implements IPlatingDemandService {
|
|||||||
data.put("biztype", "340");
|
data.put("biztype", "340");
|
||||||
data.put("invscheme", "002");
|
data.put("invscheme", "002");
|
||||||
data.put("transtype", "020");
|
data.put("transtype", "020");
|
||||||
data.put("biztime", LocalDate.now());
|
data.put("biztime", LocalDate.now().toString());
|
||||||
data.put("cztype", "02");
|
data.put("cztype", "02");
|
||||||
data.put("entrys", entries);
|
data.put("entrys", entries);
|
||||||
JSONObject callback = new JSONObject();
|
JSONObject callback = new JSONObject();
|
||||||
|
|||||||
@@ -643,7 +643,7 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|||||||
dataOut.put("biztype", "340");
|
dataOut.put("biztype", "340");
|
||||||
dataOut.put("invscheme", "002");
|
dataOut.put("invscheme", "002");
|
||||||
dataOut.put("transtype", "020");
|
dataOut.put("transtype", "020");
|
||||||
dataOut.put("biztime", LocalDate.now());
|
dataOut.put("biztime", LocalDate.now().toString());
|
||||||
dataOut.put("cztype", "02");
|
dataOut.put("cztype", "02");
|
||||||
// 组装明细列表
|
// 组装明细列表
|
||||||
JSONArray entrysLLCK = new JSONArray();
|
JSONArray entrysLLCK = new JSONArray();
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ public class FeedingRecordServiceImpl extends ServiceImpl<FeedingRecordMapper, F
|
|||||||
dataOut.put("biztype", "340");
|
dataOut.put("biztype", "340");
|
||||||
dataOut.put("invscheme", "002");
|
dataOut.put("invscheme", "002");
|
||||||
dataOut.put("transtype", "020");
|
dataOut.put("transtype", "020");
|
||||||
dataOut.put("biztime", LocalDate.now());
|
dataOut.put("biztime", LocalDate.now().toString());
|
||||||
dataOut.put("cztype", "02");
|
dataOut.put("cztype", "02");
|
||||||
dataOut.put("entrys", entrysOut);
|
dataOut.put("entrys", entrysOut);
|
||||||
callbackOutData.put("data", dataOut);
|
callbackOutData.put("data", dataOut);
|
||||||
|
|||||||
@@ -5,11 +5,8 @@ import cn.hutool.json.JSONArray;
|
|||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.nl.common.exception.BadRequestException;
|
import org.nl.common.exception.BadRequestException;
|
||||||
import org.nl.common.utils.MapOf;
|
import org.nl.common.utils.MapOf;
|
||||||
import org.nl.wms.basedata_manage.service.IStructattrService;
|
|
||||||
import org.nl.wms.basedata_manage.service.dao.Structattr;
|
|
||||||
import org.nl.wms.ext_manage.api.MesApi;
|
import org.nl.wms.ext_manage.api.MesApi;
|
||||||
import org.nl.wms.ext_manage.mes.service.dto.WorkOrderBomItem;
|
import org.nl.wms.ext_manage.mes.service.dto.WorkOrderBomItem;
|
||||||
import org.nl.wms.pm_manage.demand.service.IPmDemandService;
|
import org.nl.wms.pm_manage.demand.service.IPmDemandService;
|
||||||
@@ -18,13 +15,11 @@ import org.nl.wms.pm_manage.demand.service.enums.DemandStatus;
|
|||||||
import org.nl.wms.sch_manage.service.ISchBaseRegionService;
|
import org.nl.wms.sch_manage.service.ISchBaseRegionService;
|
||||||
import org.nl.wms.sch_manage.service.dao.SchBaseRegion;
|
import org.nl.wms.sch_manage.service.dao.SchBaseRegion;
|
||||||
import org.nl.wms.warehouse_manage.enums.IOSEnum;
|
import org.nl.wms.warehouse_manage.enums.IOSEnum;
|
||||||
|
import org.nl.wms.warehouse_manage.inAndOut.service.dao.IOStorInv;
|
||||||
import org.nl.wms.warehouse_manage.inAndOut.service.dao.IOStorInvDtl;
|
import org.nl.wms.warehouse_manage.inAndOut.service.dao.IOStorInvDtl;
|
||||||
import org.nl.wms.warehouse_manage.inAndOut.service.dao.mapper.IOStorInvDisMapper;
|
import org.nl.wms.warehouse_manage.inAndOut.service.dao.mapper.IOStorInvDisMapper;
|
||||||
|
import org.nl.wms.warehouse_manage.inAndOut.service.dao.mapper.IOStorInvMapper;
|
||||||
import org.nl.wms.warehouse_manage.inAndOut.service.dto.IOStorInvDisDto;
|
import org.nl.wms.warehouse_manage.inAndOut.service.dto.IOStorInvDisDto;
|
||||||
import org.nl.wms.warehouse_manage.inventory.IStInventoryService;
|
|
||||||
import org.nl.wms.warehouse_manage.inventory.core.enums.InventoryChangeType;
|
|
||||||
import org.nl.wms.warehouse_manage.inventory.core.param.impl.AddInvParam;
|
|
||||||
import org.nl.wms.warehouse_manage.inventory.core.param.impl.InFinishParam;
|
|
||||||
import org.nl.wms.warehouse_manage.stockReturn.service.IPmStockReturnService;
|
import org.nl.wms.warehouse_manage.stockReturn.service.IPmStockReturnService;
|
||||||
import org.nl.wms.warehouse_manage.stockReturn.service.dao.PmStockReturn;
|
import org.nl.wms.warehouse_manage.stockReturn.service.dao.PmStockReturn;
|
||||||
import org.nl.wms.warehouse_manage.stockReturn.service.enums.StockReturnStatusEnum;
|
import org.nl.wms.warehouse_manage.stockReturn.service.enums.StockReturnStatusEnum;
|
||||||
@@ -32,7 +27,6 @@ import org.nl.wms.warehouse_manage.stockReturn.strategy.core.CallbackStrategy;
|
|||||||
import org.nl.wms.welding_manage.service.work_order.IWorkOrderService;
|
import org.nl.wms.welding_manage.service.work_order.IWorkOrderService;
|
||||||
import org.nl.wms.welding_manage.service.work_order.dao.WorkOrderBomDao;
|
import org.nl.wms.welding_manage.service.work_order.dao.WorkOrderBomDao;
|
||||||
import org.nl.wms.welding_manage.service.work_order.dao.WorkOrderDao;
|
import org.nl.wms.welding_manage.service.work_order.dao.WorkOrderDao;
|
||||||
import org.springframework.beans.BeanUtils;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@@ -61,9 +55,7 @@ public class DealLLCKBillPmDeamndCallBack implements CallbackStrategy {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ISchBaseRegionService iSchBaseRegionService;
|
private ISchBaseRegionService iSchBaseRegionService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IStructattrService iStructattrService;
|
private IOStorInvMapper ioStorInvMapper;
|
||||||
@Autowired
|
|
||||||
private IStInventoryService iStInventoryService;
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private MesApi mesApi;
|
private MesApi mesApi;
|
||||||
@Autowired
|
@Autowired
|
||||||
@@ -86,34 +78,10 @@ public class DealLLCKBillPmDeamndCallBack implements CallbackStrategy {
|
|||||||
String[] workOrders = one.getWork_order_code().split(Pattern.quote("|"));
|
String[] workOrders = one.getWork_order_code().split(Pattern.quote("|"));
|
||||||
List<WorkOrderDao> workOrderDaoList = workOrderService.list(new LambdaQueryWrapper<WorkOrderDao>()
|
List<WorkOrderDao> workOrderDaoList = workOrderService.list(new LambdaQueryWrapper<WorkOrderDao>()
|
||||||
.in(WorkOrderDao::getOrder_code, workOrders));
|
.in(WorkOrderDao::getOrder_code, workOrders));
|
||||||
//更新库存,查询托盘
|
|
||||||
final Structattr targetAttr = iStructattrService.getOne(new LambdaQueryWrapper<Structattr>()
|
|
||||||
.eq(Structattr::getSect_code, region.getPoint_type_explain()));
|
|
||||||
if (targetAttr ==null ||StringUtils.isEmpty(targetAttr.getStoragevehicle_code())){
|
|
||||||
throw new BadRequestException("调拨失败,当前调拨目标区域缺少仓库熟悉"+targetAttr.getStruct_code());
|
|
||||||
}
|
|
||||||
List<AddInvParam> addInvParams = new ArrayList<>();
|
|
||||||
AddInvParam addParam = new AddInvParam();
|
|
||||||
addParam.setPcsn(StringUtils.isEmpty(param.getPcsn())?"1":param.getPcsn());
|
|
||||||
addParam.setMaterialCode(param.getMaterial_code());
|
|
||||||
addParam.setStoragevehicleCode(targetAttr.getStoragevehicle_code());
|
|
||||||
addParam.setStructCode(targetAttr.getStruct_code());
|
|
||||||
addParam.setSectCode(targetAttr.getSect_code());
|
|
||||||
addParam.setStorCode(targetAttr.getStor_code());
|
|
||||||
addParam.setUnitName(param.getQty_unit_name());
|
|
||||||
addParam.setUnitId(param.getQty_unit_id());
|
|
||||||
addParam.setQty(param.getAssign_qty());
|
|
||||||
addInvParams.add(addParam);
|
|
||||||
iStInventoryService.changeInventory(InventoryChangeType.ADD_INV, addInvParams);
|
|
||||||
final List<InFinishParam> inFinishParams = new ArrayList<>();
|
|
||||||
InFinishParam inFinishParam = new InFinishParam();
|
|
||||||
BeanUtils.copyProperties(addParam,inFinishParam);
|
|
||||||
inFinishParam.setRemark("需求单库存调拨");
|
|
||||||
inFinishParams.add(inFinishParam);
|
|
||||||
iStInventoryService.changeInventory(InventoryChangeType.IN_FINISH, inFinishParams);
|
|
||||||
if (one.getStatus().equals(DemandStatus.FINISH.getValue())){
|
if (one.getStatus().equals(DemandStatus.FINISH.getValue())){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
final IOStorInv ioStorInv = ioStorInvMapper.selectById(param.getIostorinv_id());
|
||||||
one.setAssign_qty(param.getAssign_qty());
|
one.setAssign_qty(param.getAssign_qty());
|
||||||
if (one.getAssign_qty().intValue()>=one.getQty().intValue()){
|
if (one.getAssign_qty().intValue()>=one.getQty().intValue()){
|
||||||
one.setStatus(DemandStatus.FINISH.getValue());
|
one.setStatus(DemandStatus.FINISH.getValue());
|
||||||
@@ -131,7 +99,7 @@ public class DealLLCKBillPmDeamndCallBack implements CallbackStrategy {
|
|||||||
dataOut.put("biztype", "340");
|
dataOut.put("biztype", "340");
|
||||||
dataOut.put("invscheme", "002");
|
dataOut.put("invscheme", "002");
|
||||||
dataOut.put("transtype", "020");
|
dataOut.put("transtype", "020");
|
||||||
dataOut.put("biztime", LocalDate.now());
|
dataOut.put("biztime", LocalDate.now().toString());
|
||||||
dataOut.put("cztype", "02");
|
dataOut.put("cztype", "02");
|
||||||
// 组装明细列表
|
// 组装明细列表
|
||||||
JSONArray entrys = new JSONArray();
|
JSONArray entrys = new JSONArray();
|
||||||
@@ -154,6 +122,7 @@ public class DealLLCKBillPmDeamndCallBack implements CallbackStrategy {
|
|||||||
entry.put("srcbillentryid", item.getItemId());
|
entry.put("srcbillentryid", item.getItemId());
|
||||||
entry.put("qty", item.getBomQty());
|
entry.put("qty", item.getBomQty());
|
||||||
entry.put("warehouseno", one.getInventory_dis());
|
entry.put("warehouseno", one.getInventory_dis());
|
||||||
|
entry.put("materialno", item.getMaterialCode());
|
||||||
entrys.add(entry);
|
entrys.add(entry);
|
||||||
}
|
}
|
||||||
workOrderService.insertBomList(convertBomEnty(newTargetBomList));//更新bom
|
workOrderService.insertBomList(convertBomEnty(newTargetBomList));//更新bom
|
||||||
@@ -164,7 +133,9 @@ public class DealLLCKBillPmDeamndCallBack implements CallbackStrategy {
|
|||||||
entry.put("srcbillno", orderCode);
|
entry.put("srcbillno", orderCode);
|
||||||
entry.put("srcbillid", workOrder.getOrder_id());
|
entry.put("srcbillid", workOrder.getOrder_id());
|
||||||
entry.put("srcbillentryid", item.getItem_id());
|
entry.put("srcbillentryid", item.getItem_id());
|
||||||
|
entry.put("warehouseno", one.getInventory_dis());
|
||||||
entry.put("qty", item.getBom_qty());
|
entry.put("qty", item.getBom_qty());
|
||||||
|
entry.put("materialno", item.getMaterial_code());
|
||||||
entrys.add(entry);
|
entrys.add(entry);
|
||||||
}
|
}
|
||||||
dataOut.put("entrys", entrys);
|
dataOut.put("entrys", entrys);
|
||||||
@@ -172,6 +143,7 @@ public class DealLLCKBillPmDeamndCallBack implements CallbackStrategy {
|
|||||||
// ErpUtil.create().login().audit(callbackData.toString());
|
// ErpUtil.create().login().audit(callbackData.toString());
|
||||||
stockReturn.setRequest_Id(param.getIostorinv_id());
|
stockReturn.setRequest_Id(param.getIostorinv_id());
|
||||||
stockReturn.setRequest_type(IOSEnum.BILL_TYPE.code("生产出库"));
|
stockReturn.setRequest_type(IOSEnum.BILL_TYPE.code("生产出库"));
|
||||||
|
stockReturn.setBill_code(ioStorInv.getBill_code());
|
||||||
stockReturn.setStatus(StockReturnStatusEnum.TODO.getCode());
|
stockReturn.setStatus(StockReturnStatusEnum.TODO.getCode());
|
||||||
stockReturn.setCreate_time(now);
|
stockReturn.setCreate_time(now);
|
||||||
stockReturn.setRequest_data(callbackData.toString());
|
stockReturn.setRequest_data(callbackData.toString());
|
||||||
|
|||||||
Reference in New Issue
Block a user