|
|
|
@ -98,7 +98,7 @@ public class IoSplitCodeService extends ServiceImpl<IoSplitCodeMapper, IoSplitCo
|
|
|
|
|
|
|
|
|
|
//2.如果拆零表为空,则自动从预出库队列中获拉取数据
|
|
|
|
|
if (CollUtil.isEmpty(ioSplitCodeEntities)) {
|
|
|
|
|
addFifoCode(collectOrderBiz.getRelId(), collectOrderBiz.getBatchNo(), IntUtil.value(collectOrderBiz.getUnTagCount()));
|
|
|
|
|
addFifoCode(collectOrderBiz.getRelId(), collectOrderBiz.getBatchNo(), IntUtil.value(collectOrderBiz.getUnTagCount()), putWorkPlaceCode);
|
|
|
|
|
ioSplitCodeEntities = findSplitCodes(collectOrderBiz.getRelId(), collectOrderBiz.getBatchNo(), putWorkPlaceCode);
|
|
|
|
|
}
|
|
|
|
|
//3.如果拆零表不为空,则开始扣除数量
|
|
|
|
@ -138,7 +138,7 @@ public class IoSplitCodeService extends ServiceImpl<IoSplitCodeMapper, IoSplitCo
|
|
|
|
|
|
|
|
|
|
if (unCount > 0) {
|
|
|
|
|
//4.拆零表数量不足,则从预出库队列中获取数据
|
|
|
|
|
Integer fifoCount = addFifoCode(collectOrderBiz.getRelId(), collectOrderBiz.getBatchNo(), unCount);
|
|
|
|
|
Integer fifoCount = addFifoCode(collectOrderBiz.getRelId(), collectOrderBiz.getBatchNo(), unCount, putWorkPlaceCode);
|
|
|
|
|
if (fifoCount == 0) {
|
|
|
|
|
//预出库队列数量不足
|
|
|
|
|
collectOrderBiz.setTagStatus(2);
|
|
|
|
@ -512,7 +512,7 @@ public class IoSplitCodeService extends ServiceImpl<IoSplitCodeMapper, IoSplitCo
|
|
|
|
|
public void preAutoTagCode(IoCollectOrder collectOrder) {
|
|
|
|
|
Long putWorkPlaceCode = null;
|
|
|
|
|
//获取上货工位
|
|
|
|
|
SysWorkplacePutRel sysWorkplacePutRel = workplacePutRelService.findPutWorkPlace(collectOrder.getWorkPlaceCode(), collectOrder.getBusType());
|
|
|
|
|
SysWorkplacePutRel sysWorkplacePutRel = workplacePutRelService.findPutWorkPlace(collectOrder.getWorkPlaceCode(), collectOrder.getBusType());
|
|
|
|
|
if (sysWorkplacePutRel != null)
|
|
|
|
|
putWorkPlaceCode = sysWorkplacePutRel.getWorkPlaceCode();
|
|
|
|
|
|
|
|
|
@ -566,12 +566,13 @@ public class IoSplitCodeService extends ServiceImpl<IoSplitCodeMapper, IoSplitCo
|
|
|
|
|
/**
|
|
|
|
|
* 从预出库队列里面取出数据,添加至拆零表
|
|
|
|
|
*/
|
|
|
|
|
public Integer addFifoCode(Long relId, String batchNo, Integer needCount) {
|
|
|
|
|
public Integer addFifoCode(Long relId, String batchNo, Integer needCount, Long putWorkPlaceCode) {
|
|
|
|
|
|
|
|
|
|
List<IoSplitFifoCodeEntity> splitFifoCodeEntities = splitFifoCodeService
|
|
|
|
|
.list(new LambdaQueryWrapper<IoSplitFifoCodeEntity>()
|
|
|
|
|
.eq(IoSplitFifoCodeEntity::getRelId, relId)
|
|
|
|
|
.eq(StrUtil.isNotEmpty(batchNo), IoSplitFifoCodeEntity::getBatchNo, batchNo)
|
|
|
|
|
.eq(putWorkPlaceCode != null, IoSplitFifoCodeEntity::getWorkPlaceCode, putWorkPlaceCode)
|
|
|
|
|
.orderByAsc(IoSplitFifoCodeEntity::getInBactchNo)
|
|
|
|
|
);
|
|
|
|
|
Integer count = 0;
|
|
|
|
|