|
|
|
@ -808,23 +808,33 @@ public class IoCodeTempController extends BaseController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//校验码表是否已经存在追溯码 io_code_temp
|
|
|
|
|
IoCodeTempEntity codeTempEntity1 = codeTempService.selectByCode(code, udiEntity.getBatchNo(), bussinessTypeEntity.getAction());
|
|
|
|
|
if (codeTempEntity1 != null) {
|
|
|
|
|
return ResultVOUtils.error(533, "扫码重复或当前追溯码已存在草稿单据中!");
|
|
|
|
|
}
|
|
|
|
|
//校验工位存量是否存在
|
|
|
|
|
if (bussinessTypeEntity.getAction().equals(ConstantType.SPLIT_OUT)) {
|
|
|
|
|
IoSplitFifoCodeEntity fifoCodeEntity = fifoCodeService.findByCode(code, null);
|
|
|
|
|
if (fifoCodeEntity != null && StrUtil.isNotEmpty(fifoCodeEntity.getSerialNo())) {
|
|
|
|
|
return ResultVOUtils.error(533, "当前追溯码已存在!");
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
//校验码表是否已经存在追溯码 io_code_temp
|
|
|
|
|
if (StrUtil.isNotEmpty(udiEntity.getSerialNo())) {
|
|
|
|
|
IoCodeTempEntity codeTempEntity1 = codeTempService.selectByCode(code, udiEntity.getBatchNo(), bussinessTypeEntity.getAction());
|
|
|
|
|
if (codeTempEntity1 != null) {
|
|
|
|
|
return ResultVOUtils.error(533, "扫码重复或当前追溯码已存在草稿单据中!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else if (bussinessTypeEntity.getAction().equals(ConstantType.SPLIT_RETURN)) {
|
|
|
|
|
|
|
|
|
|
IoSplitFifoCodeEntity fifoCodeEntity = fifoCodeService.findByCode(code, null);
|
|
|
|
|
if (fifoCodeEntity == null) {
|
|
|
|
|
return ResultVOUtils.error(500, "当前追溯码未上货!");
|
|
|
|
|
}
|
|
|
|
|
//校验码表是否已经存在追溯码 io_code_temp
|
|
|
|
|
if (StrUtil.isNotEmpty(udiEntity.getSerialNo())) {
|
|
|
|
|
IoCodeTempEntity codeTempEntity1 = codeTempService.selectByCode(code, udiEntity.getBatchNo(), bussinessTypeEntity.getAction());
|
|
|
|
|
if (codeTempEntity1 != null) {
|
|
|
|
|
return ResultVOUtils.error(533, "扫码重复或当前追溯码已存在草稿单据中!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//校验预验收是否已存在
|
|
|
|
|
if (bussinessTypeEntity.getActionType() == ConstantStatus.ACTION_TYPE_PREIN && bussinessTypeEntity.getMainAction().equals(ConstantType.TYPE_PUT)) {
|
|
|
|
@ -908,9 +918,9 @@ public class IoCodeTempController extends BaseController {
|
|
|
|
|
exitLocalEntity.setCount(exitLocalEntity.getMyCount() + 1);
|
|
|
|
|
|
|
|
|
|
if (bussinessTypeEntity.isUse()) {
|
|
|
|
|
exitLocalEntity.setReCount(IntUtil.value(exitLocalEntity.getMyReCount()) * udiCalCountUtil.getUseActCount(udiRelevanceResponses.get(0)));
|
|
|
|
|
exitLocalEntity.setReCount(IntUtil.value(exitLocalEntity.getMyReCount()) + udiCalCountUtil.getUseActCount(udiRelevanceResponses.get(0)));
|
|
|
|
|
} else {
|
|
|
|
|
exitLocalEntity.setReCount(IntUtil.value(exitLocalEntity.getMyReCount()) * udiCalCountUtil.getCirActCount(udiRelevanceResponses.get(0)));
|
|
|
|
|
exitLocalEntity.setReCount(IntUtil.value(exitLocalEntity.getMyReCount()) + udiCalCountUtil.getCirActCount(udiRelevanceResponses.get(0)));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!StringUtils.isBlank(exitLocalEntity.getSerialNo())) {
|
|
|
|
@ -1304,12 +1314,6 @@ public class IoCodeTempController extends BaseController {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//校验码表是否已经存在追溯码 io_code_temp
|
|
|
|
|
IoCodeTempEntity codeTempEntity = codeTempService.selectByCode(code, udiEntity.getBatchNo(), bussinessTypeEntity.getAction());
|
|
|
|
|
if (codeTempEntity != null) {
|
|
|
|
|
return ResultVOUtils.error(533, "扫码重复或当前追溯码已存在草稿单据中!");
|
|
|
|
|
}
|
|
|
|
|
//------工位上货相关-----校验工位存量是否存在----
|
|
|
|
|
if (bussinessTypeEntity.getAction().equals(ConstantType.SPLIT_OUT)) {
|
|
|
|
|
IoSplitFifoCodeEntity fifoCodeEntity = fifoCodeService.findByCode(code, null);
|
|
|
|
@ -1322,6 +1326,12 @@ public class IoCodeTempController extends BaseController {
|
|
|
|
|
return ResultVOUtils.error(533, "当前追溯码已存在拆零库存!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//校验码表是否已经存在追溯码 io_code_temp
|
|
|
|
|
IoCodeTempEntity codeTempEntity = codeTempService.selectByCode(code, udiEntity.getBatchNo(), bussinessTypeEntity.getAction());
|
|
|
|
|
if (codeTempEntity != null) {
|
|
|
|
|
return ResultVOUtils.error(533, "扫码重复或当前追溯码已存在草稿单据中!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else if (bussinessTypeEntity.getAction().equals(ConstantType.SPLIT_RETURN)) {
|
|
|
|
|
IoSplitFifoCodeEntity fifoCodeEntity = fifoCodeService.findByCode(code, null);
|
|
|
|
|
if (fifoCodeEntity == null) {
|
|
|
|
@ -1332,6 +1342,12 @@ public class IoCodeTempController extends BaseController {
|
|
|
|
|
if (splitCodeEntity != null) {//&& StrUtil.isNotEmpty(splitCodeEntity.getSerialNo())
|
|
|
|
|
return ResultVOUtils.error(533, "当前追溯码已经拆零,无法退货!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//校验码表是否已经存在追溯码 io_code_temp
|
|
|
|
|
IoCodeTempEntity codeTempEntity = codeTempService.selectByCode(code, udiEntity.getBatchNo(), bussinessTypeEntity.getAction());
|
|
|
|
|
if (codeTempEntity != null) {
|
|
|
|
|
return ResultVOUtils.error(533, "扫码重复或当前追溯码已存在草稿单据中!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|