bug修改,新增单据验收补单校验

dev
anthonywj 2 years ago
parent d69f9449e7
commit c5f47f8139

@ -422,7 +422,11 @@ public class IoCodeTempController extends BaseController {
udiEntity.setBatchNo(codeLostEntity.getBatchNo());
udiEntity.setExpireDate(codeLostEntity.getExpireDate());
udiEntity.setProduceDate(codeLostEntity.getProduceDate());
}
checkOriginCodeRes = checkOriginCode(udiEntity);
if (checkOriginCodeRes != null)
return checkOriginCodeRes;
} else
return checkOriginCodeRes;
}
}
@ -1072,6 +1076,7 @@ public class IoCodeTempController extends BaseController {
return ResultVOUtils.error(500, "当前库存不足");
}
}
}
}
return null;
@ -1223,7 +1228,7 @@ public class IoCodeTempController extends BaseController {
}
if (StrUtil.isBlank(codeTempEntity.getSerialNo()) && StrUtil.isBlank(codeTempEntity.getBatchNo())) {
return ResultVOUtils.error(500, "批次号不能为空!");
return ResultVOUtils.error(500, "批次号与序列号不能为空!");
}
if (StrUtil.isNotEmpty(codeTempEntity.getSerialNo())) {
@ -1277,13 +1282,457 @@ public class IoCodeTempController extends BaseController {
@PostMapping("warehouse/inout/checkTempCode")
public BaseResponse checkTempCode(@RequestBody IoCodeTempEntity codeTempEntity) {
Boolean falg=codeTempService.checkTempCode(codeTempEntity);
if(!falg){
return ResultVOUtils.error(999,"该产品已存在,请勿重复录入");
Boolean falg = codeTempService.checkTempCode(codeTempEntity);
if (!falg) {
return ResultVOUtils.error(999, "该产品已存在,请勿重复录入");
}
return ResultVOUtils.success();
}
//pda扫码校验
//前端扫码提交
@RepeatSubmit()
@AuthRuleAnnotation("")
@PostMapping("warehouse/inout/pdaAddCode")
@Log(title = "单据管理", businessType = BusinessType.INSERT)
public BaseResponse pdaAddCode(@RequestBody AddOrderRequest addOrderRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
AddCodeResult addCodeResult = new AddCodeResult();
BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(addOrderRequest.getAction());
InvWarehouseEntity invWarehouseEntity = invWarehouseService.findByInvSubByCode(addOrderRequest.getInvCode());
String code = addOrderRequest.getCode();
if (StringUtils.isBlank(code)) return ResultVOUtils.error(ResultEnum.DATA_ERROR);
if (code.endsWith("\u001D")) {
code = code.replace("\u001D", "");
}
UdiEntity udiEntity = FilterUdiUtils.getUdi(code);
if (udiEntity == null)
return ResultVOUtils.error(500, "无效条码!");
if (StrUtil.isNotEmpty(addOrderRequest.getBatchNo())) {
udiEntity.setBatchNo(addOrderRequest.getBatchNo());
}
if (StrUtil.isNotEmpty(addOrderRequest.getProduceDate())) {
udiEntity.setProduceDate(addOrderRequest.getProduceDate());
}
if (StrUtil.isNotEmpty(addOrderRequest.getExpireDate())) {
udiEntity.setExpireDate(addOrderRequest.getExpireDate());
}
if (StrUtil.isNotEmpty(addOrderRequest.getSerialNo())) {
udiEntity.setSerialNo(addOrderRequest.getSerialNo());
}
if (StrUtil.isNotEmpty(udiEntity.getSerialNo()) && udiEntity.getSerialNo().length() > 20) {
return ResultVOUtils.error(500, "无效条码!序列号超出最大范围");
}
if (StrUtil.isNotEmpty(udiEntity.getBatchNo()) && udiEntity.getBatchNo().length() > 20) {
return ResultVOUtils.error(500, "无效条码!批次号超出最大范围");
}
//批次号校验
//判断此产品是否开启允许无批次号
UdiProductEntity udiInfoEntity = udiProductService.findByNameCode(udiEntity.getUdi());
if (udiInfoEntity == null) {
return ResultVOUtils.error(500, "耗材字典不存在此产品!");
}
if (!IntUtil.value(udiInfoEntity.getAllowNoBatch())) {
if (StrUtil.isEmpty(udiEntity.getSerialNo()) && StrUtil.isEmpty(udiEntity.getBatchNo())) {
return ResultVOUtils.error(500, "序列号与批次号不能同时为空!");
}
}
String orderId = addOrderRequest.getBillNo();
//三期校验
if (bussinessTypeEntity.isCodeFillCheck()) {
BaseResponse checkOriginCodeRes = checkOriginCode(udiEntity);
if (checkOriginCodeRes != null) {
IoCodeLostEntity codeLostEntity = codeLostService.findByCode(code);
if (codeLostEntity == null) {
if (StrUtil.isNotEmpty(orderId)) {
List<IoCodeTempEntity> ioCodeEnttities = codeTempService.findByOrderId(orderId);
IoCodeTempEntity ioCodeEnttity = isExitLocal(code, ioCodeEnttities);
if (ioCodeEnttity == null) {
return checkOriginCodeRes;
}
} else
return checkOriginCodeRes;
} else {
udiEntity.setBatchNo(codeLostEntity.getBatchNo());
udiEntity.setExpireDate(codeLostEntity.getExpireDate());
udiEntity.setProduceDate(codeLostEntity.getProduceDate());
}
if (StrUtil.isNotEmpty(orderId)) {
List<IoCodeTempEntity> ioCodeEnttities = codeTempService.findByOrderId(orderId);
IoCodeTempEntity ioCodeEnttity = isExitLocal(code, ioCodeEnttities);
if (ioCodeEnttity == null) {
return checkOriginCodeRes;
}
} else
return checkOriginCodeRes;
}
} else {
BaseResponse checkOriginCodeRes = checkOriginCode(udiEntity);
if (checkOriginCodeRes != null) {
IoCodeLostEntity codeLostEntity = codeLostService.findByCode(code);
if (codeLostEntity != null) {
udiEntity.setBatchNo(codeLostEntity.getBatchNo());
udiEntity.setExpireDate(codeLostEntity.getExpireDate());
udiEntity.setProduceDate(codeLostEntity.getProduceDate());
}
}
}
//过期提醒:
if (bussinessTypeEntity.getCheckExpire() == 1 && !addOrderRequest.isIgnoreExpire()) {
if (StrUtil.isNotEmpty(udiEntity.getExpireDate())) {
String expireDate = "20" + udiEntity.getExpireDate();
long expireTime = MsDateUtil.parseDateExpire(expireDate);
if (expireTime - System.currentTimeMillis() < 0) {
return ResultVOUtils.error(504, "当前产品已过期,是否确定继续添加?");
}
}
}
if (bussinessTypeEntity.getCheckExpire() == 2) {
if (StrUtil.isNotEmpty(udiEntity.getExpireDate())) {
String expireDate = "20" + udiEntity.getExpireDate();
long expireTime = MsDateUtil.parseDateExpire(expireDate);
if (expireTime - System.currentTimeMillis() < 0) {
return ResultVOUtils.error(604, "当前产品已过期,无法添加!");
}
}
}
UdiRelevanceResponse udiRelevanceResponse = udiRelevanceService.selectByNameCode(udiEntity.getUdi());
long recent = 0;
if (udiRelevanceResponse.getRecentDateTime() != null)
recent = udiRelevanceResponse.getRecentDateTime().longValue();
if (bussinessTypeEntity.getCheckVailDate() == 1 && recent > 0 && !addOrderRequest.isIgnoreRecentExpire() && udiRelevanceResponse.getIsDateBy() == 2) {
if (StrUtil.isNotEmpty(udiEntity.getExpireDate())) {
String expireDate = "20" + udiEntity.getExpireDate();
long expireTime = MsDateUtil.parseDateExpire(expireDate);
long recentTieme = Math.abs(recent * 24 * 60 * 60 * 1000);
long resultTime = expireTime - System.currentTimeMillis();
if (resultTime > 0) {
long time = resultTime / (60 * 60 * 1000);
// long time = resultTime / (24 * 60 * 60 * 1000);
if (resultTime < recentTieme) {
return ResultVOUtils.error(505, "当前产品临近过期,距过期还剩" + time + "时,是否确定继续添加?");
}
}
}
}
if (bussinessTypeEntity.getCheckVailDate() == 1 && recent > 0 && !addOrderRequest.isIgnoreRecentExpire() && udiRelevanceResponse.getIsDateBy() == 1) {
if (StrUtil.isNotEmpty(udiEntity.getExpireDate())) {
String expireDate = "20" + udiEntity.getExpireDate();
long expireTime = MsDateUtil.parseDateExpire(expireDate);
long recentTieme = Math.abs(recent * 24 * 60 * 60 * 1000);
long resultTime = expireTime - System.currentTimeMillis();
if (resultTime > 0) {
long time = resultTime / (24 * 60 * 60 * 1000);
if (resultTime < recentTieme) {
// return ResultVOUtils.error(605, "当前产品临近过期,距过期还剩" + time + "天,无法添加!");
return ResultVOUtils.error(505, "当前产品临近过期,距过期还剩" + time + "天,是否确定继续添加?");
}
}
}
}
//校验预验收是否已存在
if (bussinessTypeEntity.getActionType() == ConstantStatus.ACTION_TYPE_PREIN) {
if (StrUtil.isNotEmpty(udiEntity.getSerialNo())) {
int count = invPreinProductDetailService.findCountByCode(code);
if (count > 0) {
return ResultVOUtils.error(500, "预验收库存已存在此UDI码,请检查后重试!");
}
}
}
//校验预验收库存是否已存在
if (bussinessTypeEntity.isScanPreIn()) {
if (bussinessTypeEntity.getBackPreinType() == 1 && bussinessTypeEntity.isPreInBack()) {//按单出库&& bussinessTypeEntity.isPreInBack()
String orderIds = addOrderRequest.getCheckPreInOrders();
if (StrUtil.isNotEmpty(orderIds)) {
String[] orderIdArray = orderIds.split(",");
List<String> orderList = CollUtil.toList(orderIdArray);
int count = codeService.findByOrderIdsCount(orderList, code);
if (count <= 0) {
return ResultVOUtils.error(500, "非预验收单产品或预验收库存数量不足!");
}
if (StrUtil.isNotEmpty(orderId)) {//非首次添加
if (StrUtil.isEmpty(udiEntity.getSerialNo())) {//该单据已有该产品
//无序列号,则可能存在多个预验收入库单
IoCodeTempEntity codeTempEntity = codeTempService.findByUnique(orderId, code);
if (codeTempEntity != null) {
if (count < (codeTempEntity.getMyCount() + 1)) {
return ResultVOUtils.error(500, "超出预验收库存数量");
}
}
} else {
if (count < 1) {
return ResultVOUtils.error(500, "预验收库存数量不足");
}
}
}
} else {
return ResultVOUtils.error(500, "未选择预验收入库单,请先选择预验收入库单!");
}
}
}
if (addOrderRequest.getFromCorp() == null) {
BasicCorpEntity basicCorpEntity = basicUnitMaintainService.selectByName(addOrderRequest.getFromCorp());
if (basicCorpEntity == null && bussinessTypeEntity.getCorpType() == ConstantStatus.CORP_TYPE_INPUT && bussinessTypeEntity.isGenUnit()) {
basicCorpEntity = new BasicCorpEntity();
basicCorpEntity.setErpId(CustomUtil.getUnitId());
addOrderRequest.setFromCorp((basicCorpEntity.getErpId()));
basicCorpEntity.setCorpType(ConstantStatus.CORP_SICK);
basicCorpEntity.setOutType(ConstantStatus.CORP_SICK_SICK);
basicCorpEntity.setName(addOrderRequest.getFromCorp());
addOrderRequest.setFromCorp(basicCorpEntity.getName());
basicCorpEntity.setId(IdUtil.getSnowflakeNextId());
basicUnitMaintainService.insert(basicCorpEntity);
}
}
//先生成扫码单据
IoOrderEntity orderEntity = orderService.findByBillNo(orderId);
if (StringUtils.isBlank(orderId) || orderEntity == null) {
String orderNo = gennerOrderUtils.createScOrderNo(new OrderNoTypeBean(Constant.SCAN_ORDER + StrUtil.trimToEmpty(bussinessTypeEntity.getPrefix()), "yyyyMMdd"));
orderId = orderNo;
}
List<IoCodeTempEntity> codeEnttitys = codeTempService.findByOrderId(orderId);
IoCodeTempEntity exitLocalEntity = null;
IoCodeTempEntity genDetaiEntity = new IoCodeTempEntity();
List<UdiRelevanceResponse> udiRelevanceResponses = null;
if (codeEnttitys.size() > 0) {
exitLocalEntity = isExitLocal(code, codeEnttitys);
if (exitLocalEntity != null) {
if (StrUtil.isEmpty(exitLocalEntity.getSupId()) || exitLocalEntity.getRelId() == null) {
return ResultVOUtils.error(500, "当前UDI码已存在且存在异常未处理");
}
udiRelevanceResponses = udiRelevanceService.selectGroupByNameCode(exitLocalEntity.getNameCode(), null);
BeanUtils.copyProperties(exitLocalEntity, genDetaiEntity);
genDetaiEntity.setCount(1);
genDetaiEntity.setReCount(udiCalCountUtil.getActCount(udiRelevanceResponses.get(0)));
exitLocalEntity.setCount(exitLocalEntity.getMyCount() + 1);
exitLocalEntity.setReCount(exitLocalEntity.getMyCount() * udiCalCountUtil.getActCount(udiRelevanceResponses.get(0)));
if (!StringUtils.isBlank(exitLocalEntity.getSerialNo())) {
return ResultVOUtils.error(500, "重复扫码!");
}
BaseResponse invRes = null;
if (bussinessTypeEntity.isScanPreIn()) { //校验预验收库存
invRes = checkPreInInv(bussinessTypeEntity, genDetaiEntity);
} else if (bussinessTypeEntity.isAdvancePreIn()) { //校验寄售库存
invRes = checkPreInv(bussinessTypeEntity, genDetaiEntity);
} else {
invRes = checkInv(bussinessTypeEntity, genDetaiEntity);
}
if (invRes != null) {
return invRes;
}
if (bussinessTypeEntity.getCheckWebNew() == 1 && bussinessTypeEntity.isCheckEnable()) {
String errMsg = ioCheckInoutService.checkCode(genDetaiEntity);
if (errMsg != null) {
return ResultVOUtils.error(500, errMsg);
} else
codeTempService.updateById(exitLocalEntity);
} else if (bussinessTypeEntity.getCheckWebNew() == 2 && bussinessTypeEntity.isCheckEnable()) {
String errMsg = ioCheckInoutService.checkNoPiCode(genDetaiEntity);
if (errMsg != null) {
return ResultVOUtils.error(500, errMsg);
} else
codeTempService.updateById(exitLocalEntity);
} else {
codeTempService.updateById(exitLocalEntity);
}
}
}
if (exitLocalEntity == null) {
IoCodeTempEntity codeEnttity = new IoCodeTempEntity();
codeEnttity.setCode(code);
codeEnttity.setOrderId(orderId);
codeEnttity.setCorpOrderId(addOrderRequest.getCorpOrderId());
codeEnttity.setCreateTime(new Date());
codeEnttity.setUpdateTime(new Date());
codeEnttity.setMainAction(bussinessTypeEntity.getMainAction());
codeEnttity.setAction(bussinessTypeEntity.getAction());
codeEnttity.setNameCode(udiEntity.getUdi());
codeEnttity.setBatchNo(udiEntity.getBatchNo());
codeEnttity.setProduceDate(udiEntity.getProduceDate());
codeEnttity.setExpireDate(udiEntity.getExpireDate());
codeEnttity.setSerialNo(udiEntity.getSerialNo());
codeEnttity.setDeptCode(invWarehouseEntity.getParentId());
codeEnttity.setInvCode(addOrderRequest.getInvCode());
codeEnttity.setWarehouseCode(addOrderRequest.getCurSpaceCode());
codeEnttity.setPreSpaceCode(addOrderRequest.getPreCurSpaceCode());
codeEnttity.setPreInSpaceCode(addOrderRequest.getCheckPreInSpaceCode());
codeEnttity.setRelId(addOrderRequest.getRelId());
codeEnttity.setCount(1);
String unitFk = null;
if (bussinessTypeEntity.getCorpType() == ConstantStatus.CORP_TYPE_OUT) {
unitFk = addOrderRequest.getFromCorp();
} else if (StrUtil.isNotEmpty(addOrderRequest.getSelectSupId())) {
unitFk = addOrderRequest.getSelectSupId();
}
//产品是否禁用
udiRelevanceResponses = udiRelevanceService.selectGroupByNameCode(codeEnttity.getNameCode(), false);
if (udiRelevanceResponses.size() >= 1) {
if (udiRelevanceResponse == null) {
return ResultVOUtils.error(500, "该产品信息未维护!");
} else if (!udiRelevanceResponse.getUseDy() && udiRelevanceResponse.getDiType() == ConstantStatus.DITYPE_SYDY) {
return ResultVOUtils.error(500, "该产品不允许以使用单元入库!");
}
if (bussinessTypeEntity.isVailDispatch() && !udiRelevanceResponse.isDispatch()) {
return ResultVOUtils.error(500, "该产品不可配送,请联系院方!");
}
if (bussinessTypeEntity.getVailGroupBuy() == 1 && !udiRelevanceResponse.isGroupBuy()) { //只采集集采产品
return ResultVOUtils.error(500, bussinessTypeEntity.getName() + "单只允许录入集采产品!");
}
if (bussinessTypeEntity.getVailGroupBuy() == 2 && udiRelevanceResponse.isGroupBuy()) { //只采集非集采产品
return ResultVOUtils.error(500, bussinessTypeEntity.getName() + "单只允许录入非集采产品!");
}
//计算实际数量
codeEnttity.setReCount(codeEnttity.getMyCount() * udiCalCountUtil.getActCount(udiRelevanceResponse));
} else if (udiRelevanceResponses.size() == 0) {
if (unitFk == null)
return ResultVOUtils.error(500, "耗材字典不存在此产品!");
else
return ResultVOUtils.error(500, "当前供应商不存在此配送产品!");
}
//校验供应商是否配送此产品
BaseResponse corpResponse = checkCorp(codeEnttity, bussinessTypeEntity, unitFk);
if (corpResponse != null) {
return corpResponse;
}
IoOrderEntity isExit = orderService.findByBillNo(orderId);
if (isExit == null) {
orderEntity = new IoOrderEntity();
orderEntity.setBillNo(orderId);
orderEntity.setCorpOrderId(addOrderRequest.getCorpOrderId());
orderEntity.setMainAction(bussinessTypeEntity.getMainAction());
orderEntity.setAction(bussinessTypeEntity.getAction());
orderEntity.setFromCorp(addOrderRequest.getFromCorp());
if (StrUtil.isNotEmpty(addOrderRequest.getFromInvCode())) {
InvWarehouseEntity invWarehouseEntity1 = invWarehouseService.findByInvSubByCode(addOrderRequest.getFromInvCode());
orderEntity.setFromDeptCode(invWarehouseEntity1.getParentId());
}
orderEntity.setFromInvCode(addOrderRequest.getFromInvCode());
orderEntity.setFromType(ConstantStatus.FROM_WEBNEW);
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_TEMP_SAVE);
orderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_DRAFT);
AuthAdmin authAdmin = getUser();
orderEntity.setCreateUser(authAdmin.getId() + "");
orderEntity.setCreateTime(new Date());
orderEntity.setUpdateUser(authAdmin.getId() + "");
orderEntity.setUpdateTime(new Date());
orderEntity.setCustomerId(authAdmin.getCustomerId() + "");
orderEntity.setDeptCode(invWarehouseEntity.getParentId());
orderEntity.setCheckPreInOrders(addOrderRequest.getCheckPreInOrders());
orderEntity.setInvCode(addOrderRequest.getInvCode());
orderEntity.setOrderType(addOrderRequest.getOrderType());
orderEntity.setBusType(bussinessTypeEntity.getBusType());
orderService.insertOrder(orderEntity);
}
if (IntUtil.value(addOrderRequest.getOrderType()) == ConstantStatus.ORDER_TYPE_NORMAL && bussinessTypeEntity.isCheckEnable() && bussinessTypeEntity.getCheckWebNew() != 0) {
boolean isBillExit = orderDetailBizService.isExit(orderEntity.getBillNo());
if (!isBillExit) {
orderService.deleteByBillNo(orderEntity.getBillNo());
return ResultVOUtils.error(500, "请先录入业务详情");
}
}
BaseResponse baseResponse = checkRelId(codeEnttity, unitFk);
if (baseResponse != null) {
deleteEmptyBillNo(orderEntity);
}
genDetaiEntity = codeEnttity;
if (baseResponse == null) {
baseResponse = checkSupId(bussinessTypeEntity, codeEnttity, unitFk);
if (baseResponse != null)
return baseResponse;
} else {
if (baseResponse.getCode() == 501) {
return baseResponse;
} else if (baseResponse.getCode() == 502) {
return baseResponse;
}
checkSupId(bussinessTypeEntity, codeEnttity, unitFk);
return baseResponse;
}
if (bussinessTypeEntity.isScanPreIn()) { //校验预验收库存
BaseResponse invRes = checkPreInInv(bussinessTypeEntity, codeEnttity);
if (invRes != null) {
deleteEmptyBillNo(orderEntity);
return invRes;
}
} else if (bussinessTypeEntity.isAdvancePreIn()) { //校验寄售库存
BaseResponse invRes = checkPreInv(bussinessTypeEntity, codeEnttity);
if (invRes != null) {
deleteEmptyBillNo(orderEntity);
return invRes;
}
} else {
BaseResponse invRes = checkInv(bussinessTypeEntity, codeEnttity);
if (invRes != null) {
deleteEmptyBillNo(orderEntity);
return invRes;
}
}
//是否边扫边校验
if (bussinessTypeEntity.getCheckWebNew() == 1 && bussinessTypeEntity.isCheckEnable()) {
String errMsg = ioCheckInoutService.checkCode(codeEnttity);
if (errMsg != null) {
return ResultVOUtils.error(500, errMsg);
} else
codeTempService.insert(codeEnttity);
} else if (bussinessTypeEntity.getCheckWebNew() == 2 && bussinessTypeEntity.isCheckEnable()) {
String errMsg = ioCheckInoutService.checkNoPiCode(codeEnttity);
if (errMsg != null) {
return ResultVOUtils.error(500, errMsg);
} else
codeTempService.insert(codeEnttity);
} else {
codeTempService.insert(codeEnttity);
}
}
addCodeResult.setOrderId(orderId);
transInoutService.genOrderDetailCode(orderEntity, genDetaiEntity);
return ResultVOUtils.success(addCodeResult);
}

@ -471,8 +471,8 @@ public class IoOrderReviewController extends BaseController {
String billNo = reviewSpmsRequest.getBillNo();
if (StrUtil.isEmpty(reviewSpmsRequest.getBillNo())) {
// return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
return ResultVOUtils.error(999,"请输入单据号!");
// return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL);
return ResultVOUtils.error(999, "请输入单据号!");
}
AcceptOrderResponse acceptOrderEntity = new AcceptOrderResponse();
Long userId = getUserId();
@ -480,7 +480,7 @@ public class IoOrderReviewController extends BaseController {
EntrustReceEntity entrustReceEntity;
if (StrUtil.isNotEmpty(errMsg)) {
if (errMsg.equals("委托验收")) {
acceptOrderEntity.setEntrust(true);
acceptOrderEntity.setEntrust(true);
// else return ResultVOUtils.error(500, "无权限验收!");
} else
return ResultVOUtils.error(500, errMsg);

@ -0,0 +1,4 @@
package com.glxp.api.controller.inout;
public class IoPdaCodeController {
}

@ -291,6 +291,23 @@ public class BasicBussinessTypeEntity {
@TableField(value = "secCheckCopy")
private boolean secCheckCopy;
/**
*
*/
@TableField(value = "checkReview")
private int checkReview;
/**
*
*/
@TableField(value = "secCheckReview")
private boolean seccheckReview;
/**
*
*/
@TableField(value = "thrCheckReview")
private boolean thrCheckReview;
/**
*
*/

@ -1,5 +1,6 @@
package com.glxp.api.res.basic;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
/**
@ -140,7 +141,6 @@ public class BasicBussinessTypeResponse {
private boolean thrCheckChange;
private boolean thrCheckBalance;
private boolean thrCheckCopy;
private boolean fillCodeRel;
private Integer checkVailDate;
@ -152,4 +152,17 @@ public class BasicBussinessTypeResponse {
private Integer sortNum;
private int spaceOut;
/**
*
*/
private int checkReview;
/**
*
*/
private boolean seccheckReview;
/**
*
*/
private boolean thrCheckReview;
}

@ -109,6 +109,10 @@ public class IoCheckInoutService {
if (bussinessTypeEntity.getCheckCopy() == 0) {
return false;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_REVIEW) {
if (bussinessTypeEntity.getCheckReview() == 0) {
return false;
}
}
return true;
}
@ -174,6 +178,11 @@ public class IoCheckInoutService {
unCheckFirstFinish(orderEntity);
return;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_REVIEW) {
if (bussinessTypeEntity.getCheckReview() == 0) {
unCheckFirstFinish(orderEntity);
return;
}
}
checkFirstFinish(orderEntity);
}
@ -193,7 +202,7 @@ public class IoCheckInoutService {
orderDetailCodeEntities.forEach(orderDetailCodeEntity ->
{
//删除之前的单据结果
if(null != orderDetailCodeEntity.getOrderIdFk() && !"".equals(orderDetailCodeEntity.getOrderIdFk())){
if (null != orderDetailCodeEntity.getOrderIdFk() && !"".equals(orderDetailCodeEntity.getOrderIdFk())) {
orderDetailResultService.deleteByOrderId(orderDetailCodeEntity.getOrderIdFk());
}
//生成单据结果
@ -259,6 +268,10 @@ public class IoCheckInoutService {
codeLostEntity.setId(IdUtil.getSnowflakeNextId());
codeLostEntity.setNameCode(udiEntity.getUdi());
codeLostEntity.setCode(codeEntity.getCode());
codeLostEntity.setBatchNo(codeEntity.getBatchNo());
codeLostEntity.setProduceDate(codeEntity.getProduceDate());
codeLostEntity.setExpireDate(codeEntity.getExpireDate());
codeLostEntity.setSerialNo(codeEntity.getSerialNo());
}
//校验是否写入缺失表
boolean isTrue = false;
@ -803,6 +816,10 @@ public class IoCheckInoutService {
if (!bussinessTypeEntity.isThrCheckSp()) {
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_CHECK_REW);
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_REVIEW) {
if (!bussinessTypeEntity.isThrCheckReview()) {
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_CHECK_REW);
}
}
} else {
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_CHECK_REW);
@ -863,7 +880,12 @@ public class IoCheckInoutService {
if (!bussinessTypeEntity.isSecCheckSp()) {
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_AUDITED);
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_REVIEW) {
if (!bussinessTypeEntity.isSeccheckReview()) {
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_AUDITED);
}
}
} else {
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_AUDITED);
}

@ -604,3 +604,8 @@ CALL Pro_Temp_ColumnWork('inv_inner_order_detail', 'nameCode',
CALL Pro_Temp_ColumnWork('io_order', 'fromSpmsOrders', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'checkReview', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'secCheckReview', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'thrCheckReview', 'tinyint', 1);

Loading…
Cancel
Save