opt:优化出库逻辑增加平库判断
This commit is contained in:
@@ -422,7 +422,7 @@
|
|||||||
document.getElementById('footer-sync').textContent = 'DATA SYNC: REALTIME';
|
document.getElementById('footer-sync').textContent = 'DATA SYNC: REALTIME';
|
||||||
document.getElementById('load-port-dot').style.display = 'block';
|
document.getElementById('load-port-dot').style.display = 'block';
|
||||||
fetchData();
|
fetchData();
|
||||||
fetchTimer = setInterval(fetchData, 1000);
|
fetchTimer = setInterval(fetchData, 5000);
|
||||||
}
|
}
|
||||||
|
|
||||||
function stopFetchData() {
|
function stopFetchData() {
|
||||||
|
|||||||
@@ -96,7 +96,6 @@ public class BsrealStorattrServiceImpl extends ServiceImpl<BsrealStorattrMapper,
|
|||||||
dto.setUpdate_optname(nickName);
|
dto.setUpdate_optname(nickName);
|
||||||
dto.setUpdate_time(now);
|
dto.setUpdate_time(now);
|
||||||
dto.setCreate_time(now);
|
dto.setCreate_time(now);
|
||||||
//TODO
|
|
||||||
dto.setSyscompanyid(9L);
|
dto.setSyscompanyid(9L);
|
||||||
dto.setSysdeptid(9L);
|
dto.setSysdeptid(9L);
|
||||||
dto.setSysownerid(9L);
|
dto.setSysownerid(9L);
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package org.nl.wms.bigscreen_manage.controller;
|
package org.nl.wms.bigscreen_manage.controller;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaIgnore;
|
import cn.dev33.satoken.annotation.SaIgnore;
|
||||||
|
import org.nl.common.annotation.Mock;
|
||||||
import org.nl.wms.bigscreen_manage.service.DisScreenService;
|
import org.nl.wms.bigscreen_manage.service.DisScreenService;
|
||||||
import org.nl.wms.bigscreen_manage.service.dto.DistributionModel;
|
import org.nl.wms.bigscreen_manage.service.dto.DistributionModel;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package org.nl.wms.bigscreen_manage.service.impl;
|
package org.nl.wms.bigscreen_manage.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import org.nl.common.annotation.Mock;
|
||||||
import org.nl.common.exception.BadRequestException;
|
import org.nl.common.exception.BadRequestException;
|
||||||
import org.nl.wms.bigscreen_manage.service.DisScreenService;
|
import org.nl.wms.bigscreen_manage.service.DisScreenService;
|
||||||
import org.nl.wms.bigscreen_manage.service.dto.DistributionModel;
|
import org.nl.wms.bigscreen_manage.service.dto.DistributionModel;
|
||||||
@@ -14,6 +15,7 @@ public class DisScreenServiceImpl implements DisScreenService {
|
|||||||
private ConcurrentHashMap<String,DistributionModel> modelMap = new ConcurrentHashMap<>();
|
private ConcurrentHashMap<String,DistributionModel> modelMap = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Mock
|
||||||
public DistributionModel getData(String curSect) {
|
public DistributionModel getData(String curSect) {
|
||||||
return modelMap.get(curSect);
|
return modelMap.get(curSect);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
unitCode,
|
unitCode,
|
||||||
unit,
|
unit,
|
||||||
trackNo
|
trackNo
|
||||||
FROM V_UC_CGRK06
|
FROM v_uc_cgrk06
|
||||||
WHERE billid = #{bill_id}
|
WHERE billid = #{bill_id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
modifyDate,
|
modifyDate,
|
||||||
status,
|
status,
|
||||||
red
|
red
|
||||||
FROM V_UC_CGRK06
|
FROM v_uc_cgrk06
|
||||||
WHERE billid = #{bill_id}
|
WHERE billid = #{bill_id}
|
||||||
GROUP BY billid
|
GROUP BY billid
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -159,7 +159,9 @@ public class PdaIosOutServiceImpl implements PdaIosOutService {
|
|||||||
final List<IOStorInvDis> invDis = ioStorInvDisMapper.selectList(new LambdaQueryWrapper<IOStorInvDis>()
|
final List<IOStorInvDis> invDis = ioStorInvDisMapper.selectList(new LambdaQueryWrapper<IOStorInvDis>()
|
||||||
.eq(IOStorInvDis::getSect_code, sectCode)
|
.eq(IOStorInvDis::getSect_code, sectCode)
|
||||||
.eq(IOStorInvDis::getWork_status, IOSEnum.INBILL_DIS_STATUS.code("生成"))
|
.eq(IOStorInvDis::getWork_status, IOSEnum.INBILL_DIS_STATUS.code("生成"))
|
||||||
.eq(IOStorInvDis::getHand_type, Boolean.getBoolean(IOSEnum.HAND_TYPE.code("手动搬运"))));
|
.isNull(IOStorInvDis::getTask_id)
|
||||||
|
);
|
||||||
|
// .eq(IOStorInvDis::getHand_type, Boolean.getBoolean(IOSEnum.HAND_TYPE.code("手动搬运")))
|
||||||
final ArrayList<OutBoundDis> result = new ArrayList<>();
|
final ArrayList<OutBoundDis> result = new ArrayList<>();
|
||||||
for (IOStorInvDis source : invDis) {
|
for (IOStorInvDis source : invDis) {
|
||||||
OutBoundDis target = new OutBoundDis();
|
OutBoundDis target = new OutBoundDis();
|
||||||
@@ -244,7 +246,7 @@ public class PdaIosOutServiceImpl implements PdaIosOutService {
|
|||||||
//主单
|
//主单
|
||||||
final IOStorInv ioStorInv = new IOStorInv();
|
final IOStorInv ioStorInv = new IOStorInv();
|
||||||
ioStorInv.setIostorinv_id(IdUtil.getStringId());
|
ioStorInv.setIostorinv_id(IdUtil.getStringId());
|
||||||
ioStorInv.setBill_code(CodeUtil.getNewCode("IN_STORE_CODE"));
|
ioStorInv.setBill_code(CodeUtil.getNewCode("OUT_STORE_CODE"));
|
||||||
ioStorInv.setIo_type(IOSEnum.IO_TYPE.code("出库"));
|
ioStorInv.setIo_type(IOSEnum.IO_TYPE.code("出库"));
|
||||||
ioStorInv.setBill_type(IOSEnum.BILL_TYPE.code("生产出库"));
|
ioStorInv.setBill_type(IOSEnum.BILL_TYPE.code("生产出库"));
|
||||||
ioStorInv.setBiz_date(DateUtil.today());
|
ioStorInv.setBiz_date(DateUtil.today());
|
||||||
@@ -263,6 +265,7 @@ public class PdaIosOutServiceImpl implements PdaIosOutService {
|
|||||||
ioStorInvMapper.insert(ioStorInv);
|
ioStorInvMapper.insert(ioStorInv);
|
||||||
//明细
|
//明细
|
||||||
int seq = 1;
|
int seq = 1;
|
||||||
|
//TODO:需要校验库存够不够
|
||||||
for (String materialCode : finalOutMaterials.keySet()) {
|
for (String materialCode : finalOutMaterials.keySet()) {
|
||||||
BigDecimal qty = param.getOutMaterials().get(materialCode);
|
BigDecimal qty = param.getOutMaterials().get(materialCode);
|
||||||
final IOStorInvDtl ioStorInvDtl = new IOStorInvDtl();
|
final IOStorInvDtl ioStorInvDtl = new IOStorInvDtl();
|
||||||
@@ -599,6 +602,10 @@ public class PdaIosOutServiceImpl implements PdaIosOutService {
|
|||||||
@Override
|
@Override
|
||||||
public void outDisFinish(OutBoundDis outBoundDis) {
|
public void outDisFinish(OutBoundDis outBoundDis) {
|
||||||
final IOStorInvDis ioStorInvDis = ioStorInvDisMapper.selectById(outBoundDis.getIostorinvdisId());
|
final IOStorInvDis ioStorInvDis = ioStorInvDisMapper.selectById(outBoundDis.getIostorinvdisId());
|
||||||
|
if (ioStorInvDis==null){
|
||||||
|
throw new BadRequestException("出库确认异常,当前出库明细在系统中不存在");
|
||||||
|
}
|
||||||
iOutBillService.disFinish(Arrays.asList(ioStorInvDis));
|
iOutBillService.disFinish(Arrays.asList(ioStorInvDis));
|
||||||
|
//平库出库的话需要调拨到目标参考
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ public class PdaIosOutController {
|
|||||||
|
|
||||||
@PostMapping("/assignOutDis")
|
@PostMapping("/assignOutDis")
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
public ResponseEntity<Object> assignOutDis(OutBoundDis outBoundDis) {
|
public ResponseEntity<Object> assignOutDis(@RequestBody OutBoundDis outBoundDis) {
|
||||||
pdaIosOutService.outDisFinish(outBoundDis);
|
pdaIosOutService.outDisFinish(outBoundDis);
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,17 @@
|
|||||||
package org.nl.wms.pm_manage.demand.listenerHandler;
|
package org.nl.wms.pm_manage.demand.listenerHandler;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import org.nl.wms.pm_manage.demand.service.IPmDemandService;
|
import org.nl.wms.pm_manage.demand.service.IPmDemandService;
|
||||||
import org.nl.wms.pm_manage.demand.service.dao.PmDemand;
|
import org.nl.wms.pm_manage.demand.service.dao.PmDemand;
|
||||||
import org.nl.wms.pm_manage.demand.service.enums.DemandStatus;
|
import org.nl.wms.pm_manage.demand.service.enums.DemandStatus;
|
||||||
import org.nl.wms.pm_manage.listener.core.BaseFormListenerHandler;
|
import org.nl.wms.pm_manage.listener.core.BaseFormListenerHandler;
|
||||||
|
import org.nl.wms.warehouse_manage.enums.IOSEnum;
|
||||||
|
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.enums.StockReturnStatusEnum;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
@@ -13,12 +19,25 @@ import org.springframework.stereotype.Component;
|
|||||||
public class DemandFormListenerHandler extends BaseFormListenerHandler<DemandListenerParams> {
|
public class DemandFormListenerHandler extends BaseFormListenerHandler<DemandListenerParams> {
|
||||||
@Autowired
|
@Autowired
|
||||||
IPmDemandService iPmDemandService;
|
IPmDemandService iPmDemandService;
|
||||||
|
@Autowired
|
||||||
|
IPmStockReturnService iPmStockReturnService;
|
||||||
@Override
|
@Override
|
||||||
public void onApplicationEvent(DemandListenerParams params) {
|
public void onApplicationEvent(DemandListenerParams params) {
|
||||||
iPmDemandService.update(new LambdaUpdateWrapper<PmDemand>()
|
iPmDemandService.update(new LambdaUpdateWrapper<PmDemand>()
|
||||||
.set(PmDemand::getAssign_qty,params.getQty())
|
.set(PmDemand::getAssign_qty,params.getQty())
|
||||||
.set(PmDemand::getStatus, DemandStatus.DORETURN.getValue())
|
.set(PmDemand::getStatus, DemandStatus.FINISH.getValue())
|
||||||
.eq(PmDemand::getId,params.getBillCode())
|
.eq(PmDemand::getId,params.getBillCode())
|
||||||
);
|
);
|
||||||
|
PmDemand one = iPmDemandService.getOne(new LambdaQueryWrapper<PmDemand>()
|
||||||
|
.eq(PmDemand::getId, params.getBillCode()));
|
||||||
|
if (one!=null){
|
||||||
|
final PmStockReturn stockReturn = new PmStockReturn();
|
||||||
|
stockReturn.setCreate_time(DateUtil.now());
|
||||||
|
stockReturn.setRequest_type(IOSEnum.BILL_TYPE.code("调拨出库"));
|
||||||
|
stockReturn.setStatus(StockReturnStatusEnum.TODO.getCode());
|
||||||
|
stockReturn.setRequest_data(JSON.toJSONString(one));
|
||||||
|
iPmStockReturnService.save(stockReturn);
|
||||||
|
}
|
||||||
|
//需求单昨晚,执行调拨流程
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ public enum DemandStatus {
|
|||||||
RUN("20","执行"),
|
RUN("20","执行"),
|
||||||
DORETURN("50","待回传"),
|
DORETURN("50","待回传"),
|
||||||
RETURN_FAIL("70","回传失败"),
|
RETURN_FAIL("70","回传失败"),
|
||||||
FINISH("80","回传完成"),
|
FINISH("80","完成"),
|
||||||
CANCEL("90","取消"),
|
CANCEL("90","取消"),
|
||||||
;
|
;
|
||||||
private String value;
|
private String value;
|
||||||
|
|||||||
@@ -92,6 +92,11 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void batchCreate(List<PmDemandParam> param) {
|
public void batchCreate(List<PmDemandParam> param) {
|
||||||
|
final List<String> collect = param.stream().map(PmDemandParam::getId).collect(Collectors.toList());
|
||||||
|
final List<PmDemand> pmDemands = this.listByIds(collect);
|
||||||
|
if (!CollectionUtils.isEmpty(pmDemands)){
|
||||||
|
throw new BadRequestException("MES推送需求单失败,需求单已存在");
|
||||||
|
}
|
||||||
for (PmDemandParam pmDemandParam : param) {
|
for (PmDemandParam pmDemandParam : param) {
|
||||||
this.create(pmDemandParam);
|
this.create(pmDemandParam);
|
||||||
}
|
}
|
||||||
@@ -214,7 +219,7 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|||||||
JSONObject billParam = new JSONObject();
|
JSONObject billParam = new JSONObject();
|
||||||
billParam.put("stor_code", inventoryDis.getString("horseCode"));
|
billParam.put("stor_code", inventoryDis.getString("horseCode"));
|
||||||
billParam.put("biz_date", DateUtil.today());
|
billParam.put("biz_date", DateUtil.today());
|
||||||
billParam.put("bill_type", IOSEnum.BILL_TYPE.code("生产出库"));
|
billParam.put("bill_type", IOSEnum.BILL_TYPE.code("调拨出库"));
|
||||||
billParam.put("remark", "需求单下推生成");
|
billParam.put("remark", "需求单下推生成");
|
||||||
|
|
||||||
List<JSONObject> tableData = new ArrayList<>();
|
List<JSONObject> tableData = new ArrayList<>();
|
||||||
@@ -238,6 +243,7 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|||||||
detailRow.put("source_bill_type", "pm_demand");
|
detailRow.put("source_bill_type", "pm_demand");
|
||||||
detailRow.put("source_billdtl_id", demand.getId());
|
detailRow.put("source_billdtl_id", demand.getId());
|
||||||
detailRow.put("remark", "关联工单:" + demand.getWorkOrder());
|
detailRow.put("remark", "关联工单:" + demand.getWorkOrder());
|
||||||
|
detailRow.put("load_port", demand.getTargetArea());
|
||||||
tableData.add(detailRow);
|
tableData.add(detailRow);
|
||||||
}
|
}
|
||||||
billParam.put("tableData", tableData);
|
billParam.put("tableData", tableData);
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ public enum IOSEnum {
|
|||||||
BILL_STATUS(MapOf.of("生成","10", "分配中", "20", "分配完", "30", "完成", "99")),
|
BILL_STATUS(MapOf.of("生成","10", "分配中", "20", "分配完", "30", "完成", "99")),
|
||||||
|
|
||||||
// 入库业务类型
|
// 入库业务类型
|
||||||
BILL_TYPE(MapOf.of("生产入库","0001", "采购入库", "0005", "手工入库", "0009","销售出库","1001","生产出库","1005", "手工出库", "1009")),
|
BILL_TYPE(MapOf.of("生产入库","0001", "采购入库", "0005", "手工入库", "0009","销售出库","1001","生产出库","1005","调拨出库","1004", "手工出库", "1009")),
|
||||||
|
|
||||||
//入库分配明细状态
|
//入库分配明细状态
|
||||||
INBILL_DIS_STATUS(MapOf.of("未生成", "00", "生成", "01", "执行中", "02", "完成", "99")),
|
INBILL_DIS_STATUS(MapOf.of("未生成", "00", "生成", "01", "执行中", "02", "完成", "99")),
|
||||||
|
|||||||
@@ -85,6 +85,10 @@ public class IOStorInvDtl implements Serializable {
|
|||||||
* 来源单编号
|
* 来源单编号
|
||||||
*/
|
*/
|
||||||
private String source_bill_code;
|
private String source_bill_code;
|
||||||
|
/**
|
||||||
|
* 来源单指定上料口
|
||||||
|
*/
|
||||||
|
private String source_load_port;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 来源单表名
|
* 来源单表名
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
qty_unit_name,
|
qty_unit_name,
|
||||||
source_bill_code,
|
source_bill_code,
|
||||||
source_bill_type,
|
source_bill_type,
|
||||||
|
source_load_port,
|
||||||
source_billdtl_id,
|
source_billdtl_id,
|
||||||
plan_qty,
|
plan_qty,
|
||||||
remark,
|
remark,
|
||||||
@@ -33,6 +34,7 @@
|
|||||||
#{item.qty_unit_name},
|
#{item.qty_unit_name},
|
||||||
#{item.source_bill_code},
|
#{item.source_bill_code},
|
||||||
#{item.source_bill_type},
|
#{item.source_bill_type},
|
||||||
|
#{item.source_load_port},
|
||||||
#{item.source_billdtl_id},
|
#{item.source_billdtl_id},
|
||||||
#{item.plan_qty},
|
#{item.plan_qty},
|
||||||
#{item.remark},
|
#{item.remark},
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ import org.nl.wms.basedata_manage.service.dto.*;
|
|||||||
import org.nl.wms.pm_manage.demand.listenerHandler.DemandListenerParams;
|
import org.nl.wms.pm_manage.demand.listenerHandler.DemandListenerParams;
|
||||||
import org.nl.wms.pm_manage.listener.PmManageEvent;
|
import org.nl.wms.pm_manage.listener.PmManageEvent;
|
||||||
import org.nl.wms.sch_manage.enums.TaskStatus;
|
import org.nl.wms.sch_manage.enums.TaskStatus;
|
||||||
|
import org.nl.wms.sch_manage.service.ISchBasePointService;
|
||||||
import org.nl.wms.sch_manage.service.ISchBaseTaskService;
|
import org.nl.wms.sch_manage.service.ISchBaseTaskService;
|
||||||
import org.nl.wms.sch_manage.service.dao.SchBasePoint;
|
import org.nl.wms.sch_manage.service.dao.SchBasePoint;
|
||||||
import org.nl.wms.sch_manage.service.dao.SchBaseTask;
|
import org.nl.wms.sch_manage.service.dao.SchBaseTask;
|
||||||
@@ -41,6 +42,7 @@ import org.nl.wms.warehouse_manage.enums.IOSConstant;
|
|||||||
import org.nl.wms.warehouse_manage.enums.IOSEnum;
|
import org.nl.wms.warehouse_manage.enums.IOSEnum;
|
||||||
import org.nl.wms.warehouse_manage.inventory.IStInventoryService;
|
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.enums.InventoryChangeType;
|
||||||
|
import org.nl.wms.warehouse_manage.inventory.core.param.impl.AddInvParam;
|
||||||
import org.nl.wms.warehouse_manage.inventory.core.param.impl.OutDisParam;
|
import org.nl.wms.warehouse_manage.inventory.core.param.impl.OutDisParam;
|
||||||
import org.nl.wms.warehouse_manage.inventory.core.param.impl.OutDisReverseParam;
|
import org.nl.wms.warehouse_manage.inventory.core.param.impl.OutDisReverseParam;
|
||||||
import org.nl.wms.warehouse_manage.inventory.core.param.impl.OutFinishParam;
|
import org.nl.wms.warehouse_manage.inventory.core.param.impl.OutFinishParam;
|
||||||
@@ -111,6 +113,8 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
|||||||
private ApplicationEventPublisher eventPublisher;
|
private ApplicationEventPublisher eventPublisher;
|
||||||
@Autowired
|
@Autowired
|
||||||
private MdPbStoragevehicleextMapper mdPbStoragevehicleextMapper;
|
private MdPbStoragevehicleextMapper mdPbStoragevehicleextMapper;
|
||||||
|
@Autowired
|
||||||
|
private ISchBasePointService iSchBasePointService;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -327,6 +331,7 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
|||||||
detail.setSource_bill_type(row.getString("source_bill_type"));
|
detail.setSource_bill_type(row.getString("source_bill_type"));
|
||||||
detail.setSource_billdtl_id(row.getString("source_billdtl_id"));
|
detail.setSource_billdtl_id(row.getString("source_billdtl_id"));
|
||||||
detail.setPlan_qty(planQty);
|
detail.setPlan_qty(planQty);
|
||||||
|
detail.setSource_load_port(row.getString("load_port"));
|
||||||
detail.setRemark(row.getString("remark"));
|
detail.setRemark(row.getString("remark"));
|
||||||
detail.setAssign_qty(BigDecimal.ZERO);
|
detail.setAssign_qty(BigDecimal.ZERO);
|
||||||
detail.setUnassign_qty(planQty);
|
detail.setUnassign_qty(planQty);
|
||||||
@@ -373,7 +378,9 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
|||||||
if (ObjectUtil.isEmpty(dtls)) {
|
if (ObjectUtil.isEmpty(dtls)) {
|
||||||
throw new BadRequestException("当前订单无可分配出库明细");
|
throw new BadRequestException("当前订单无可分配出库明细");
|
||||||
}
|
}
|
||||||
|
List<Sectattr> collect = iSectattrService.getSectType()
|
||||||
|
.getOrDefault(IOSEnum.ST_SECT_TYPE.code("平库"),Collections.emptyList());
|
||||||
|
final List<String> flatWarehouse = collect.stream().map(Sectattr::getSect_code).collect(Collectors.toList());
|
||||||
for (int i = 0; i < dtls.size(); i++) {
|
for (int i = 0; i < dtls.size(); i++) {
|
||||||
IOStorInvDtlDto dtl = dtls.get(i);
|
IOStorInvDtlDto dtl = dtls.get(i);
|
||||||
BigDecimal unassign_qty = dtl.getUnassign_qty();
|
BigDecimal unassign_qty = dtl.getUnassign_qty();
|
||||||
@@ -417,9 +424,13 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
|||||||
ioStorInvDis.setIs_issued(BaseDataEnum.IS_YES_NOT.code("否"));
|
ioStorInvDis.setIs_issued(BaseDataEnum.IS_YES_NOT.code("否"));
|
||||||
ioStorInvDis.setQty_unit_id(outAllocation.getQty_unit_id());
|
ioStorInvDis.setQty_unit_id(outAllocation.getQty_unit_id());
|
||||||
ioStorInvDis.setQty_unit_name(outAllocation.getQty_unit_name());
|
ioStorInvDis.setQty_unit_name(outAllocation.getQty_unit_name());
|
||||||
ioStorInvDis.setWork_status(IOSEnum.INBILL_DIS_STATUS.code("未生成"));
|
|
||||||
ioStorInvDis.setPlan_qty(outAllocation.getFrozen_qty());
|
ioStorInvDis.setPlan_qty(outAllocation.getFrozen_qty());
|
||||||
//锁定货位
|
//锁定货位
|
||||||
|
//五期特殊处理:平库则取source_load_port,需求单的
|
||||||
|
Boolean flat = flatWarehouse.contains(outAllocation.getStruct_code());
|
||||||
|
if (flat){
|
||||||
|
ioStorInvDis.setPoint_code(dtl.getSource_load_port());
|
||||||
|
}else {
|
||||||
JSONObject lock_map = new JSONObject();
|
JSONObject lock_map = new JSONObject();
|
||||||
lock_map.put("struct_code", outAllocation.getStruct_code());
|
lock_map.put("struct_code", outAllocation.getStruct_code());
|
||||||
lock_map.put("inv_id", ioStorInv.getIostorinv_id());
|
lock_map.put("inv_id", ioStorInv.getIostorinv_id());
|
||||||
@@ -427,6 +438,10 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
|||||||
lock_map.put("inv_type", ioStorInv.getBill_type());
|
lock_map.put("inv_type", ioStorInv.getBill_type());
|
||||||
lock_map.put("lock_type", IOSEnum.LOCK_TYPE.code("出库锁"));
|
lock_map.put("lock_type", IOSEnum.LOCK_TYPE.code("出库锁"));
|
||||||
iStructattrService.updateStatusByCode("0",lock_map);
|
iStructattrService.updateStatusByCode("0",lock_map);
|
||||||
|
}
|
||||||
|
ioStorInvDis.setWork_status(flat?
|
||||||
|
IOSEnum.INBILL_DIS_STATUS.code("生成")
|
||||||
|
:IOSEnum.INBILL_DIS_STATUS.code("未生成"));
|
||||||
//更新组盘表冻结数量状态
|
//更新组盘表冻结数量状态
|
||||||
iMdPbGroupPlateService.update(new LambdaUpdateWrapper<GroupPlate>()
|
iMdPbGroupPlateService.update(new LambdaUpdateWrapper<GroupPlate>()
|
||||||
.set(GroupPlate::getFrozen_qty, outAllocation.getFrozen_qty())
|
.set(GroupPlate::getFrozen_qty, outAllocation.getFrozen_qty())
|
||||||
@@ -753,6 +768,7 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
|||||||
BigDecimal allocation_canuse_qty = BigDecimal.ZERO;
|
BigDecimal allocation_canuse_qty = BigDecimal.ZERO;
|
||||||
List<OutDisParam> outDisParams = new ArrayList<>();
|
List<OutDisParam> outDisParams = new ArrayList<>();
|
||||||
List<IOStorInvDis> invDis = new ArrayList<>();
|
List<IOStorInvDis> invDis = new ArrayList<>();
|
||||||
|
List<String> structs = new ArrayList<>();
|
||||||
for (int i = 0; i < rows.size(); i++){
|
for (int i = 0; i < rows.size(); i++){
|
||||||
JSONObject ivt = rows.getJSONObject(i);
|
JSONObject ivt = rows.getJSONObject(i);
|
||||||
//库存可用
|
//库存可用
|
||||||
@@ -781,6 +797,12 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
|||||||
ioStorInvDis.setIs_issued(BaseDataEnum.IS_YES_NOT.code("否"));
|
ioStorInvDis.setIs_issued(BaseDataEnum.IS_YES_NOT.code("否"));
|
||||||
ioStorInvDis.setQty_unit_id(dtl.getQty_unit_id());
|
ioStorInvDis.setQty_unit_id(dtl.getQty_unit_id());
|
||||||
ioStorInvDis.setQty_unit_name(dtl.getQty_unit_name());
|
ioStorInvDis.setQty_unit_name(dtl.getQty_unit_name());
|
||||||
|
//五期特殊处理:平库则取source_load_port,需求单的
|
||||||
|
if (flat){
|
||||||
|
ioStorInvDis.setPoint_code(dtl.getSource_load_port());
|
||||||
|
}else {
|
||||||
|
structs.add(ivt.getString("struct_code"));
|
||||||
|
}
|
||||||
ioStorInvDis.setWork_status(flat?
|
ioStorInvDis.setWork_status(flat?
|
||||||
IOSEnum.INBILL_DIS_STATUS.code("生成")
|
IOSEnum.INBILL_DIS_STATUS.code("生成")
|
||||||
:IOSEnum.INBILL_DIS_STATUS.code("未生成"));
|
:IOSEnum.INBILL_DIS_STATUS.code("未生成"));
|
||||||
@@ -797,15 +819,15 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
|||||||
.pcsn(ivt.getString("pcsn"))
|
.pcsn(ivt.getString("pcsn"))
|
||||||
.frozenQty(change_qty).build());
|
.frozenQty(change_qty).build());
|
||||||
}
|
}
|
||||||
//锁定货位.生成分配明细,更新库存 加冻结减可用,锁定货位
|
//锁定货位,平库不锁定
|
||||||
final Set<String> structs = invDis.stream().map(IOStorInvDis::getStruct_code).collect(Collectors.toSet());
|
if (!CollectionUtils.isEmpty(structs)){
|
||||||
iStructattrService.update(new LambdaUpdateWrapper<>(Structattr.class)
|
iStructattrService.update(new LambdaUpdateWrapper<>(Structattr.class)
|
||||||
.set(Structattr::getInv_id,ioStorInv.getIostorinv_id())
|
.set(Structattr::getInv_id,ioStorInv.getIostorinv_id())
|
||||||
.set(Structattr::getInv_code,ioStorInv.getBill_code())
|
.set(Structattr::getInv_code,ioStorInv.getBill_code())
|
||||||
.set(Structattr::getInv_type,ioStorInv.getBill_type())
|
.set(Structattr::getInv_type,ioStorInv.getBill_type())
|
||||||
.set(Structattr::getLock_type, IOSEnum.LOCK_TYPE.code("出库锁"))
|
.set(Structattr::getLock_type, IOSEnum.LOCK_TYPE.code("出库锁"))
|
||||||
.in(Structattr::getStruct_code,structs)
|
.in(Structattr::getStruct_code,structs));
|
||||||
);
|
}
|
||||||
iStInventoryService.changeInventory(InventoryChangeType.OUT_DIS, outDisParams);
|
iStInventoryService.changeInventory(InventoryChangeType.OUT_DIS, outDisParams);
|
||||||
ioStorInvDisMapper.batchSave(invDis);
|
ioStorInvDisMapper.batchSave(invDis);
|
||||||
//更新详情
|
//更新详情
|
||||||
@@ -1093,61 +1115,93 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void taskFinish(SchBaseTask task) {
|
public void taskFinish(SchBaseTask task) {
|
||||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
|
||||||
String nickName = SecurityUtils.getCurrentNickName();
|
|
||||||
String now = DateUtil.now();
|
|
||||||
List<IOStorInvDis> disList = ioStorInvDisMapper.selectList(new LambdaQueryWrapper<>(IOStorInvDis.class)
|
List<IOStorInvDis> disList = ioStorInvDisMapper.selectList(new LambdaQueryWrapper<>(IOStorInvDis.class)
|
||||||
.eq(IOStorInvDis::getTask_id, task.getTask_id())
|
.eq(IOStorInvDis::getTask_id, task.getTask_id())
|
||||||
);
|
);
|
||||||
if (ObjectUtil.isEmpty(disList)) {
|
if (ObjectUtil.isEmpty(disList)) {
|
||||||
throw new BadRequestException("未找到任务对应的分配明细");
|
throw new BadRequestException("未找到任务对应的分配明细");
|
||||||
}
|
}
|
||||||
|
//完成任务,解锁仓位绑定载具号
|
||||||
|
iStructattrService.update(new LambdaUpdateWrapper<>(Structattr.class)
|
||||||
|
.set(Structattr::getInv_id,null)
|
||||||
|
.set(Structattr::getInv_code,null)
|
||||||
|
.set(Structattr::getInv_type,null)
|
||||||
|
.set(Structattr::getStoragevehicle_code,null)
|
||||||
|
.set(Structattr::getLock_type,IOSEnum.LOCK_TYPE.code("未锁定"))
|
||||||
|
.eq(Structattr::getStruct_code,task.getPoint_code1()));
|
||||||
disFinish(disList);
|
disFinish(disList);
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
|
//TODO:调拨还是直接出库
|
||||||
public void disFinish(List<IOStorInvDis> disList) {
|
public void disFinish(List<IOStorInvDis> disList) {
|
||||||
// 完成当前任务对应的所有分配明细
|
// 完成当前任务对应的所有分配明细
|
||||||
|
List<OutFinishParam> outFinsParams = new ArrayList<>();
|
||||||
for (IOStorInvDis ioStorInvDis : disList) {
|
for (IOStorInvDis ioStorInvDis : disList) {
|
||||||
ioStorInvDisMapper.update(ioStorInvDis,new LambdaUpdateWrapper<>(IOStorInvDis.class)
|
ioStorInvDisMapper.update(ioStorInvDis,new LambdaUpdateWrapper<>(IOStorInvDis.class)
|
||||||
.set(IOStorInvDis::getWork_status,IOSEnum.INBILL_DIS_STATUS.code("完成"))
|
.set(IOStorInvDis::getWork_status,IOSEnum.INBILL_DIS_STATUS.code("完成"))
|
||||||
.eq(IOStorInvDis::getIostorinvdis_id,ioStorInvDis.getIostorinvdis_id()));
|
.eq(IOStorInvDis::getIostorinvdis_id,ioStorInvDis.getIostorinvdis_id()));
|
||||||
|
outFinsParams.add(OutFinishParam.builder()
|
||||||
|
.storagevehicleCode(ioStorInvDis.getStoragevehicle_code())
|
||||||
|
.changeQty(ioStorInvDis.getPlan_qty())
|
||||||
|
.pcsn(ioStorInvDis.getPcsn())
|
||||||
|
.materialCode(ioStorInvDis.getMaterial_code())
|
||||||
|
.build());
|
||||||
|
|
||||||
}
|
}
|
||||||
IOStorInvDis item = disList.get(0);
|
|
||||||
//解锁库位
|
|
||||||
JSONObject finish_map = new JSONObject();
|
|
||||||
finish_map.put("struct_code", item.getStruct_code());
|
|
||||||
finish_map.put("storagevehicle_code",null);
|
|
||||||
finish_map.put("inv_type", null);
|
|
||||||
finish_map.put("inv_id", null);
|
|
||||||
finish_map.put("inv_code", null);
|
|
||||||
iStructattrService.updateStatusByCode("1",finish_map);
|
|
||||||
//库存变动:根据冻结数更新物料库存
|
//库存变动:根据冻结数更新物料库存
|
||||||
StructattrChangeDto changeDto = StructattrChangeDto.builder()
|
iStInventoryService.changeInventory(InventoryChangeType.OUT_FINS, outFinsParams);
|
||||||
.inv(item.getIostorinv_id())
|
IOStorInvDis item = disList.get(0);
|
||||||
.storagevehicleCode(item.getStoragevehicle_code())
|
|
||||||
.structCode(item.getStruct_code()).taskType(item.getStruct_code())
|
|
||||||
.inBound(false).build();
|
|
||||||
iStructattrService.changeStruct(changeDto);
|
|
||||||
// 查询该明细下是否还有未完成的分配明细
|
// 查询该明细下是否还有未完成的分配明细
|
||||||
int countDis = ioStorInvDisMapper.selectCount(new LambdaQueryWrapper<>(IOStorInvDis.class)
|
int countDis = ioStorInvDisMapper.selectCount(new LambdaQueryWrapper<>(IOStorInvDis.class)
|
||||||
.eq(IOStorInvDis::getIostorinvdtl_id,item.getIostorinvdtl_id())
|
.eq(IOStorInvDis::getIostorinvdtl_id,item.getIostorinvdtl_id())
|
||||||
.ne(IOStorInvDis::getWork_status,IOSEnum.INBILL_DIS_STATUS.code("完成"))
|
.ne(IOStorInvDis::getWork_status,IOSEnum.INBILL_DIS_STATUS.code("完成"))
|
||||||
);
|
);
|
||||||
|
//如果是调拨出库直接库存变更,如果是AGV的则需要走个入库
|
||||||
// 明细
|
// 明细
|
||||||
IOStorInvDtl ioStorInvDtl = ioStorInvDtlMapper.selectById(item.getIostorinvdtl_id());
|
IOStorInvDtl ioStorInvDtl = ioStorInvDtlMapper.selectById(item.getIostorinvdtl_id());
|
||||||
if (ObjectUtil.isEmpty(ioStorInvDtl)){
|
if (ObjectUtil.isEmpty(ioStorInvDtl)){
|
||||||
throw new BadRequestException("未找到明细");
|
throw new BadRequestException("未找到明细");
|
||||||
}
|
}
|
||||||
|
final IOStorInv ioStorInv = ioStorInvMapper.selectById(ioStorInvDtl.getIostorinv_id());
|
||||||
|
if (ioStorInv.getBill_type().equals(IOSEnum.BILL_TYPE.code("调拨出库"))){
|
||||||
|
List<AddInvParam> addInvParams = new ArrayList<>();
|
||||||
|
for (IOStorInvDis invDis : disList) {
|
||||||
|
if (invDis.getTask_id() == null && !StringUtils.isEmpty(invDis.getPoint_code())){
|
||||||
|
final SchBasePoint one = iSchBasePointService.getOne(new LambdaQueryWrapper<SchBasePoint>()
|
||||||
|
.eq(SchBasePoint::getPoint_code, invDis.getPoint_code()));
|
||||||
|
if (one ==null){
|
||||||
|
throw new BadRequestException("明细完成失败,当前点位未配置所属库区");
|
||||||
|
}
|
||||||
|
String regionCode = one.getRegion_code();
|
||||||
|
//更新库存,查询托盘
|
||||||
|
final Structattr targetAttr = iStructattrService.getOne(new LambdaQueryWrapper<Structattr>()
|
||||||
|
.eq(Structattr::getSect_code, regionCode));
|
||||||
|
if (targetAttr ==null ||StringUtils.isEmpty(targetAttr.getStoragevehicle_code())){
|
||||||
|
throw new BadRequestException("明细完成失败,当前调拨目标区域不存在"+invDis.getPoint_code());
|
||||||
|
}
|
||||||
|
AddInvParam addParam = new AddInvParam();
|
||||||
|
addParam.setPcsn(invDis.getPcsn());
|
||||||
|
addParam.setMaterialCode(invDis.getMaterial_code());
|
||||||
|
addParam.setStoragevehicleCode(targetAttr.getStoragevehicle_code());
|
||||||
|
addParam.setUnitName(invDis.getQty_unit_name());
|
||||||
|
addParam.setUnitId(invDis.getQty_unit_id());
|
||||||
|
addParam.setQty(invDis.getPlan_qty());
|
||||||
|
addInvParams.add(addParam);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
iStInventoryService.changeInventory(InventoryChangeType.ADD_INV, addInvParams);
|
||||||
|
//生成调拨入库单据
|
||||||
|
}
|
||||||
// 如果分配明细全部完成则更新明细表状态
|
// 如果分配明细全部完成则更新明细表状态
|
||||||
if (countDis == 0){
|
if (countDis == 0){
|
||||||
// 更新明细表状态
|
// 更新明细表状态
|
||||||
ioStorInvDtl.setBill_status(IOSEnum.BILL_STATUS.code("完成"));
|
ioStorInvDtl.setBill_status(IOSEnum.BILL_STATUS.code("完成"));
|
||||||
ioStorInvDtlMapper.updateById(ioStorInvDtl);
|
ioStorInvDtlMapper.updateById(ioStorInvDtl);
|
||||||
eventPublisher.publishEvent(new PmManageEvent(ioStorInvDtl.getSource_bill_type()
|
//TODO:这里不区分,后续在smart中区分,需求单出库才走这个
|
||||||
|
eventPublisher.publishEvent(
|
||||||
|
new PmManageEvent(ioStorInvDtl.getSource_bill_type()
|
||||||
,new DemandListenerParams(ioStorInvDtl.getSource_bill_code(),ioStorInvDtl.getAssign_qty(),ioStorInvDtl.getMaterial_code())));
|
,new DemandListenerParams(ioStorInvDtl.getSource_bill_code(),ioStorInvDtl.getAssign_qty(),ioStorInvDtl.getMaterial_code())));
|
||||||
|
|
||||||
// 查看明细是否全部完成
|
// 查看明细是否全部完成
|
||||||
int countDtl = ioStorInvDtlMapper.selectCount(new LambdaQueryWrapper<>(IOStorInvDtl.class)
|
int countDtl = ioStorInvDtlMapper.selectCount(new LambdaQueryWrapper<>(IOStorInvDtl.class)
|
||||||
.eq(IOStorInvDtl::getIostorinv_id,ioStorInvDtl.getIostorinv_id())
|
.eq(IOStorInvDtl::getIostorinv_id,ioStorInvDtl.getIostorinv_id())
|
||||||
@@ -1165,6 +1219,7 @@ public class OutBillServiceImpl extends ServiceImpl<IOStorInvMapper,IOStorInv> i
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ public class AddInvParam implements InventoryParam {
|
|||||||
private String extCode;
|
private String extCode;
|
||||||
private String extType;
|
private String extType;
|
||||||
private String unitName;
|
private String unitName;
|
||||||
|
private String unitId;
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -7,7 +7,9 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.nl.common.exception.BadRequestException;
|
import org.nl.common.exception.BadRequestException;
|
||||||
|
import org.nl.common.utils.IdUtil;
|
||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
|
import org.nl.wms.pm_manage.SourceBillTypeEnum;
|
||||||
import org.nl.wms.warehouse_manage.enums.IOSEnum;
|
import org.nl.wms.warehouse_manage.enums.IOSEnum;
|
||||||
import org.nl.wms.warehouse_manage.inventory.IStInventoryService;
|
import org.nl.wms.warehouse_manage.inventory.IStInventoryService;
|
||||||
import org.nl.wms.warehouse_manage.inventory.core.param.InventoryParam;
|
import org.nl.wms.warehouse_manage.inventory.core.param.InventoryParam;
|
||||||
@@ -25,6 +27,8 @@ import javax.annotation.Resource;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import static org.nl.wms.warehouse_manage.enums.IOSEnum.GROUP_PLATE_STATUS;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 库存查询服务
|
* 库存查询服务
|
||||||
*/
|
*/
|
||||||
@@ -59,14 +63,31 @@ public class StInventoryServiceImpl implements IStInventoryService {
|
|||||||
}
|
}
|
||||||
GroupPlate groupPlate = iMdPbGroupplateService.getOne(query);
|
GroupPlate groupPlate = iMdPbGroupplateService.getOne(query);
|
||||||
if (groupPlate == null){
|
if (groupPlate == null){
|
||||||
throw new BadRequestException("库存增加失败,当前库存不存在");
|
GroupPlate groupDao = GroupPlate.builder()
|
||||||
}
|
.group_id(IdUtil.getStringId())
|
||||||
|
.material_code(invParam.getMaterialCode())
|
||||||
|
.storagevehicle_code(invParam.getStoragevehicleCode())
|
||||||
|
.pcsn(invParam.getPcsn())
|
||||||
|
//TODO:先给默认个
|
||||||
|
.qty_unit_id(invParam.getUnitId())
|
||||||
|
.qty_unit_name(invParam.getUnitName())
|
||||||
|
.qty(invParam.getQty())
|
||||||
|
.status(GROUP_PLATE_STATUS.code("入库"))
|
||||||
|
.ext_code(invParam.getExtCode())
|
||||||
|
.ext_type(invParam.getExtType())
|
||||||
|
.create_id(SecurityUtils.getCurrentUserId())
|
||||||
|
.create_name(SecurityUtils.getCurrentNickName())
|
||||||
|
.create_time(DateUtil.now())
|
||||||
|
.build();
|
||||||
|
iMdPbGroupplateService.save(groupDao);
|
||||||
|
}else {
|
||||||
iMdPbGroupplateService.update(new LambdaUpdateWrapper<GroupPlate>()
|
iMdPbGroupplateService.update(new LambdaUpdateWrapper<GroupPlate>()
|
||||||
.set(GroupPlate::getQty,groupPlate.getQty().add(invParam.getQty()))
|
.set(GroupPlate::getQty,groupPlate.getQty().add(invParam.getQty()))
|
||||||
.set(GroupPlate::getRemark,invParam.getRemark())
|
.set(GroupPlate::getRemark,invParam.getRemark())
|
||||||
.set(GroupPlate::getUpdate_time,DateUtil.now())
|
.set(GroupPlate::getUpdate_time,DateUtil.now())
|
||||||
.eq(GroupPlate::getGroup_id,groupPlate.getGroup_id()));
|
.eq(GroupPlate::getGroup_id,groupPlate.getGroup_id()));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case "SubInvParam":
|
case "SubInvParam":
|
||||||
final List<SubInvParam> subInvParams = (List<SubInvParam>) params;
|
final List<SubInvParam> subInvParams = (List<SubInvParam>) params;
|
||||||
|
|||||||
@@ -1,7 +1,24 @@
|
|||||||
server:
|
server:
|
||||||
port: 8011
|
port: 8011
|
||||||
#配置数据源
|
#rabbitmq配置
|
||||||
spring:
|
spring:
|
||||||
|
rabbitmq:
|
||||||
|
addresses: 127.0.0.1
|
||||||
|
username: guest
|
||||||
|
password: guest
|
||||||
|
virtual-host: dev
|
||||||
|
publisher-confirm-type: correlated
|
||||||
|
listener:
|
||||||
|
simple:
|
||||||
|
acknowledge-mode: auto
|
||||||
|
retry:
|
||||||
|
enabled: true
|
||||||
|
max-attempts: 2
|
||||||
|
initial-interval: 2000
|
||||||
|
multiplier: 1.0
|
||||||
|
max-interval: 5000
|
||||||
|
default-requeue-rejected: false
|
||||||
|
#配置数据源
|
||||||
main:
|
main:
|
||||||
allow-bean-definition-overriding: true
|
allow-bean-definition-overriding: true
|
||||||
allow-circular-references: true
|
allow-circular-references: true
|
||||||
@@ -34,9 +51,9 @@ spring:
|
|||||||
master:
|
master:
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
# url: jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:wms_nlwq}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true
|
# url: jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:wms_nlwq}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true
|
||||||
url: jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:wms_standardv2}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true
|
url: jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:wms_standardv2}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||||
username: ${DB_USER:root}
|
username: ${DB_USER:root}
|
||||||
password: ${DB_PWD:123456}
|
password: ${DB_PWD:5XXX/3GEgdUnRZd4cbVnDL6BA6P9YToc}
|
||||||
druid:
|
druid:
|
||||||
# 基础连接池配置
|
# 基础连接池配置
|
||||||
initial-size: 15
|
initial-size: 15
|
||||||
@@ -61,9 +78,9 @@ spring:
|
|||||||
log-abandoned: false
|
log-abandoned: false
|
||||||
eas:
|
eas:
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
url: jdbc:mysql://${EAS_DB_HOST:localhost}:${EAS_DB_PORT:3306}/${EAS_DB_NAME:eas_db}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
|
url: jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:wms_standardv2}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||||
username: ${EAS_DB_USER:root}
|
username: ${EAS_DB_USER:root}
|
||||||
password: ${EAS_DB_PWD:123456}
|
password: ${DB_PWD:5XXX/3GEgdUnRZd4cbVnDL6BA6P9YToc}
|
||||||
druid:
|
druid:
|
||||||
initial-size: 5
|
initial-size: 5
|
||||||
min-idle: 5
|
min-idle: 5
|
||||||
@@ -158,3 +175,9 @@ sa-token:
|
|||||||
lucene:
|
lucene:
|
||||||
index:
|
index:
|
||||||
path: D:\lms\lucene\index
|
path: D:\lms\lucene\index
|
||||||
|
eas:
|
||||||
|
webservice:
|
||||||
|
wsdl: http://192.168.100.100:8080/ormrpc/services/WSNLWQFacade?wsdl
|
||||||
|
namespace: http://ws.eas.kingdee.com/
|
||||||
|
inbound:
|
||||||
|
liku-codes: LK01
|
||||||
|
|||||||
@@ -52,3 +52,6 @@ CREATE TABLE `sys_mock_config` (
|
|||||||
|
|
||||||
ALTER TABLE `st_ivt_iostorinvdis`
|
ALTER TABLE `st_ivt_iostorinvdis`
|
||||||
ADD COLUMN `hand_type` tinyint(1) NULL DEFAULT 0 COMMENT '出库类型:0自动搬运1手动搬运' AFTER `point_code`;
|
ADD COLUMN `hand_type` tinyint(1) NULL DEFAULT 0 COMMENT '出库类型:0自动搬运1手动搬运' AFTER `point_code`;
|
||||||
|
ALTER TABLE `st_ivt_iostorinvdtl`
|
||||||
|
DROP COLUMN `source_load_port`,
|
||||||
|
ADD COLUMN `source_load_port` varchar(255) NULL COMMENT '来源单指定上料口' AFTER `material_code`;
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 120 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 120 KiB |
@@ -2,7 +2,7 @@ export default {
|
|||||||
'lang': 'zh',
|
'lang': 'zh',
|
||||||
// 平台
|
// 平台
|
||||||
'platform': {
|
'platform': {
|
||||||
'title': 'WMS仓储系统',
|
'title': '诺力五期WMS仓储系统',
|
||||||
'tip1': '用户名不能为空',
|
'tip1': '用户名不能为空',
|
||||||
'tip2': '密码不能为空',
|
'tip2': '密码不能为空',
|
||||||
'tip3': '验证码不能为空'
|
'tip3': '验证码不能为空'
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: 'WMS系统',
|
title: '诺力五期WMS系统',
|
||||||
logo: Logo,
|
logo: Logo,
|
||||||
title_param: 'platform'
|
title_param: 'platform'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -133,10 +133,16 @@
|
|||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
@selection-change="crud.selectionChangeHandler"
|
@selection-change="crud.selectionChangeHandler"
|
||||||
>
|
>
|
||||||
|
<el-table-column prop="stor_name" label="仓库名称" width="150" />
|
||||||
<el-table-column prop="sect_code" sortable label="库区编码" />
|
<el-table-column prop="sect_code" sortable label="库区编码" />
|
||||||
<el-table-column prop="sect_name" label="库区名称" width="150" />
|
<el-table-column prop="sect_name" label="库区名称" width="150" />
|
||||||
<el-table-column prop="simple_name" label="库区简称" width="150" />
|
<el-table-column prop="simple_name" label="库区简称" width="150" />
|
||||||
<el-table-column prop="stor_name" label="仓库名称" width="150" />
|
<el-table-column
|
||||||
|
prop="sect_type_attr"
|
||||||
|
label="库区类型"
|
||||||
|
width="150"
|
||||||
|
:formatter="formatSectType"
|
||||||
|
/>
|
||||||
<el-table-column prop="capacity" label="容量" />
|
<el-table-column prop="capacity" label="容量" />
|
||||||
<el-table-column prop="sect_manager_name" label="负责人" />
|
<el-table-column prop="sect_manager_name" label="负责人" />
|
||||||
<el-table-column prop="mobile_no" label="联系电话" width="100px" />
|
<el-table-column prop="mobile_no" label="联系电话" width="100px" />
|
||||||
@@ -293,6 +299,10 @@ export default {
|
|||||||
[CRUD.HOOK.beforeRefresh]() {
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
|
formatSectType(row, column, cellValue) {
|
||||||
|
const item = this.dict.st_sect_type.find(d => d.value === cellValue)
|
||||||
|
return item ? item.label : cellValue
|
||||||
|
},
|
||||||
// 改变状态
|
// 改变状态
|
||||||
format_is_used(is_used) {
|
format_is_used(is_used) {
|
||||||
return is_used === '1'
|
return is_used === '1'
|
||||||
|
|||||||
@@ -299,6 +299,7 @@ export default {
|
|||||||
'0005': '采购入库',
|
'0005': '采购入库',
|
||||||
'0009': '手工入库',
|
'0009': '手工入库',
|
||||||
'1001': '销售出库',
|
'1001': '销售出库',
|
||||||
|
'1004': '库存调拨',
|
||||||
'1005': '生产出库',
|
'1005': '生产出库',
|
||||||
'1009': '手工出库'
|
'1009': '手工出库'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -127,6 +127,8 @@
|
|||||||
<el-table-column prop="bill_status" label="状态" align="center" width="110px" :formatter="bill_statusFormat" />
|
<el-table-column prop="bill_status" label="状态" align="center" width="110px" :formatter="bill_statusFormat" />
|
||||||
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
<el-table-column show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||||
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
<el-table-column show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="source_bill_code" label="源单编码" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="source_load_port" label="指定上料口" align="center" />
|
||||||
<el-table-column show-overflow-tooltip prop="pcsn" label="批次号" align="center" width="140px" />
|
<el-table-column show-overflow-tooltip prop="pcsn" label="批次号" align="center" width="140px" />
|
||||||
<el-table-column show-overflow-tooltip prop="plan_qty" label="重量" :formatter="crud.formatNum3" align="center" />
|
<el-table-column show-overflow-tooltip prop="plan_qty" label="重量" :formatter="crud.formatNum3" align="center" />
|
||||||
<el-table-column show-overflow-tooltip prop="assign_qty" label="已分配重量" :formatter="crud.formatNum3" align="center" />
|
<el-table-column show-overflow-tooltip prop="assign_qty" label="已分配重量" :formatter="crud.formatNum3" align="center" />
|
||||||
|
|||||||
@@ -134,6 +134,7 @@
|
|||||||
<el-table-column prop="unassign_qty" :formatter="crud.formatNum3" label="未分配重量" align="center" width="100px" />
|
<el-table-column prop="unassign_qty" :formatter="crud.formatNum3" label="未分配重量" align="center" width="100px" />
|
||||||
<el-table-column prop="qty_unit_name" label="单位" align="center" />
|
<el-table-column prop="qty_unit_name" label="单位" align="center" />
|
||||||
<el-table-column prop="source_bill_code" label="源单号" align="center" width="130px" />
|
<el-table-column prop="source_bill_code" label="源单号" align="center" width="130px" />
|
||||||
|
<el-table-column prop="source_load_port" label="指定上料口" align="center" width="130px" />
|
||||||
<el-table-column show-overflow-tooltip prop="remark" label="明细备注" align="center" />
|
<el-table-column show-overflow-tooltip prop="remark" label="明细备注" align="center" />
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -161,10 +162,10 @@
|
|||||||
<el-table-column prop="struct_code" label="仓位" align="center" show-overflow-tooltip />
|
<el-table-column prop="struct_code" label="仓位" align="center" show-overflow-tooltip />
|
||||||
<el-table-column prop="sect_name" label="区域" align="center" show-overflow-tooltip />
|
<el-table-column prop="sect_name" label="区域" align="center" show-overflow-tooltip />
|
||||||
<!-- <el-table-column show-overflow-tooltip prop="instorage_time" width="150px" label="入库时间" align="center" />-->
|
<!-- <el-table-column show-overflow-tooltip prop="instorage_time" width="150px" label="入库时间" align="center" />-->
|
||||||
<el-table-column prop="point_code" label="目的位置" align="center" />
|
<el-table-column prop="point_code" label="出库位置" align="center" />
|
||||||
<el-table-column prop="task_code" label="任务号" align="center" />
|
<el-table-column prop="task_code" label="任务号" align="center" />
|
||||||
<!-- <el-table-column prop="task_type" label="任务类型" align="center" width="150px" :formatter="taskdtl_typeFormat" />-->
|
<!-- <el-table-column prop="task_type" label="任务类型" align="center" width="150px" :formatter="taskdtl_typeFormat" />-->
|
||||||
<el-table-column prop="task_status" label="状态" align="center" width="110px" :formatter="task_statusFormat" />
|
<el-table-column prop="task_status" label="状态" align="center" width="110px" :formatter="work_statusFormat" />
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<link rel="icon" href="/favicon.ico">
|
<link rel="icon" href="/favicon.ico">
|
||||||
<meta name="viewport" content="width=750, maximum-scale=1.0, user-scalable=no">
|
<meta name="viewport" content="width=750, maximum-scale=1.0, user-scalable=no">
|
||||||
<title>诺力集成 WMS-PDA</title>
|
<title>诺力五期WMS手持系统</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
|||||||
@@ -25,7 +25,8 @@ const zh = {
|
|||||||
'平库上架',
|
'平库上架',
|
||||||
'平库库存查询',
|
'平库库存查询',
|
||||||
'库位绑定/解绑',
|
'库位绑定/解绑',
|
||||||
'平库出库'
|
'平库调拨出库',
|
||||||
|
'线边领料出库'
|
||||||
// '空托上架/下架/注册/呼叫',
|
// '空托上架/下架/注册/呼叫',
|
||||||
// 'AGV配送',
|
// 'AGV配送',
|
||||||
// '人工盘点',
|
// '人工盘点',
|
||||||
@@ -110,7 +111,7 @@ const zh = {
|
|||||||
vehicleCode: '托盘号',
|
vehicleCode: '托盘号',
|
||||||
vehicleCodePlaceholder: '请扫描或输入托盘号',
|
vehicleCodePlaceholder: '请扫描或输入托盘号',
|
||||||
vehicleCodeRequired: '请输入托盘号',
|
vehicleCodeRequired: '请输入托盘号',
|
||||||
sectCode: '库位号',
|
sectCode: '入库库区',
|
||||||
sectCodePlaceholder: '请扫描或输入库位号',
|
sectCodePlaceholder: '请扫描或输入库位号',
|
||||||
sectCodeRequired: '请输入库位号',
|
sectCodeRequired: '请输入库位号',
|
||||||
pointCode: '起始点位',
|
pointCode: '起始点位',
|
||||||
@@ -124,14 +125,14 @@ const zh = {
|
|||||||
vehicleCode: '托盘号',
|
vehicleCode: '托盘号',
|
||||||
vehicleCodePlaceholder: '请扫描或输入托盘号',
|
vehicleCodePlaceholder: '请扫描或输入托盘号',
|
||||||
vehicleCodeRequired: '请输入托盘号',
|
vehicleCodeRequired: '请输入托盘号',
|
||||||
sectCode: '库位号',
|
sectCode: '入库库区',
|
||||||
sectCodePlaceholder: '请扫描或输入库位号',
|
sectCodePlaceholder: '请扫描或输入库位号',
|
||||||
sectCodeRequired: '请输入库位号',
|
sectCodeRequired: '请输入库位号',
|
||||||
submit: '提交',
|
submit: '提交',
|
||||||
submitSuccess: '提交成功',
|
submitSuccess: '提交成功',
|
||||||
},
|
},
|
||||||
flatOutBound: {
|
flatOutBound: {
|
||||||
title: '平库出库',
|
title: '平库调拨出库',
|
||||||
sectCode: '库区',
|
sectCode: '库区',
|
||||||
sectCodePlaceholder: '请选择库区',
|
sectCodePlaceholder: '请选择库区',
|
||||||
sectCodeRequired: '请选择库区',
|
sectCodeRequired: '请选择库区',
|
||||||
|
|||||||
@@ -173,9 +173,7 @@ async function onComplete(item, idx) {
|
|||||||
if (item.submitting) return
|
if (item.submitting) return
|
||||||
item.submitting = true
|
item.submitting = true
|
||||||
try {
|
try {
|
||||||
const res = await request.post('/api/pda/iosOut/assignOutDis', {
|
const res = await request.post('/api/pda/iosOut/assignOutDis', item)
|
||||||
item
|
|
||||||
})
|
|
||||||
showToast({ message: res.message || t('flatOutBound.completeSuccess'), type: 'success' })
|
showToast({ message: res.message || t('flatOutBound.completeSuccess'), type: 'success' })
|
||||||
materialList.value.splice(idx, 1)
|
materialList.value.splice(idx, 1)
|
||||||
} catch {
|
} catch {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<div class="login-header">
|
<div class="login-header">
|
||||||
<div class="login-logo">
|
<div class="login-logo">
|
||||||
<div class="logo-box">诺力</div>
|
<div class="logo-box">诺力</div>
|
||||||
<div class="logo-text">WMS系统</div>
|
<div class="logo-text">诺力五期WMS系统</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="login-form">
|
<div class="login-form">
|
||||||
|
|||||||
Reference in New Issue
Block a user