|
|
|
@ -70,7 +70,7 @@ public class IoAddInoutService {
|
|
|
|
|
//新增扫码单据处理
|
|
|
|
|
public void dealProcess(IoOrderEntity orderEntity) {
|
|
|
|
|
|
|
|
|
|
orderEntity.setRemark("正在处理!");
|
|
|
|
|
orderEntity.setErrMsg("正在处理!");
|
|
|
|
|
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_PROCESSING);
|
|
|
|
|
orderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_POST);
|
|
|
|
|
orderEntity.setUpdateTime(new Date());
|
|
|
|
@ -79,7 +79,7 @@ public class IoAddInoutService {
|
|
|
|
|
List<IoOrderEntity> orderEntities = orderService.isExitRepeat(orderEntity.getCorpOrderId(), orderEntity.getBillNo());
|
|
|
|
|
|
|
|
|
|
if (CollUtil.isNotEmpty(orderEntities)) {
|
|
|
|
|
orderEntity.setRemark("单据重复上传");
|
|
|
|
|
orderEntity.setErrMsg("单据重复上传");
|
|
|
|
|
orderEntity.setStatus(ConstantStatus.ORDER_STATS_ERROR);
|
|
|
|
|
orderEntity.setUpdateTime(new Date());
|
|
|
|
|
orderService.update(orderEntity);
|
|
|
|
@ -88,14 +88,14 @@ public class IoAddInoutService {
|
|
|
|
|
|
|
|
|
|
BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(orderEntity.getAction());
|
|
|
|
|
if (bussinessTypeEntity == null) {
|
|
|
|
|
orderEntity.setRemark("单据类型不存在");
|
|
|
|
|
orderEntity.setErrMsg("单据类型不存在");
|
|
|
|
|
orderEntity.setStatus(ConstantStatus.ORDER_STATS_ERROR);
|
|
|
|
|
orderEntity.setUpdateTime(new Date());
|
|
|
|
|
orderService.update(orderEntity);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (StrUtil.isEmpty(orderEntity.getFromCorp()) && StrUtil.isEmpty(orderEntity.getFromInvCode())) {
|
|
|
|
|
orderEntity.setRemark("未选择往来单位");
|
|
|
|
|
orderEntity.setErrMsg("未选择往来单位");
|
|
|
|
|
orderEntity.setStatus(ConstantStatus.ORDER_STATS_ERROR);
|
|
|
|
|
orderEntity.setUpdateTime(new Date());
|
|
|
|
|
orderService.update(orderEntity);
|
|
|
|
@ -121,7 +121,7 @@ public class IoAddInoutService {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (StrUtil.isEmpty(orderEntity.getInvCode())) {
|
|
|
|
|
orderEntity.setRemark("未选择当前仓库信息");
|
|
|
|
|
orderEntity.setErrMsg("未选择当前仓库信息");
|
|
|
|
|
orderEntity.setStatus(ConstantStatus.ORDER_STATS_ERROR);
|
|
|
|
|
orderEntity.setUpdateTime(new Date());
|
|
|
|
|
orderService.update(orderEntity);
|
|
|
|
@ -147,7 +147,7 @@ public class IoAddInoutService {
|
|
|
|
|
//三期校验
|
|
|
|
|
String checkOriginMsg = checkOriginCode(warehouseEntity);
|
|
|
|
|
if (StrUtil.isNotEmpty(checkOriginMsg)) {
|
|
|
|
|
orderEntity.setRemark("checkOriginMsg");
|
|
|
|
|
orderEntity.setErrMsg("checkOriginMsg");
|
|
|
|
|
orderEntity.setStatus(ConstantStatus.ORDER_STATS_ERROR);
|
|
|
|
|
orderEntity.setUpdateTime(new Date());
|
|
|
|
|
orderService.update(orderEntity);
|
|
|
|
@ -159,7 +159,7 @@ public class IoAddInoutService {
|
|
|
|
|
if ((warehouseEntity.getRelId() == null)) {
|
|
|
|
|
orderEntity.setStatus(ConstantStatus.ORDER_STATS_ERROR);
|
|
|
|
|
orderEntity.setUpdateTime(new Date());
|
|
|
|
|
orderEntity.setRemark("udi码:" + warehouseEntity.getCode() + "上传时对照数据丢失,请选择对!");
|
|
|
|
|
orderEntity.setErrMsg("udi码:" + warehouseEntity.getCode() + "上传时对照数据丢失,请选择对!");
|
|
|
|
|
orderService.update(orderEntity);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -168,7 +168,7 @@ public class IoAddInoutService {
|
|
|
|
|
if (StrUtil.isEmpty(warehouseEntity.getSupId())) {
|
|
|
|
|
orderEntity.setStatus(ConstantStatus.ORDER_STATS_ERROR);
|
|
|
|
|
orderEntity.setUpdateTime(new Date());
|
|
|
|
|
orderEntity.setRemark("udi码:" + warehouseEntity.getCode() + "未指定供应商!");
|
|
|
|
|
orderEntity.setErrMsg("udi码:" + warehouseEntity.getCode() + "未指定供应商!");
|
|
|
|
|
orderService.update(orderEntity);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -179,7 +179,7 @@ public class IoAddInoutService {
|
|
|
|
|
if (udiRlSupEntity == null) {
|
|
|
|
|
orderEntity.setStatus(ConstantStatus.ORDER_STATS_ERROR);
|
|
|
|
|
orderEntity.setUpdateTime(new Date());
|
|
|
|
|
orderEntity.setRemark("udi码:" + warehouseEntity.getCode() + "当前供应商不存在此配送产品");
|
|
|
|
|
orderEntity.setErrMsg("udi码:" + warehouseEntity.getCode() + "当前供应商不存在此配送产品");
|
|
|
|
|
orderService.update(orderEntity);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -190,14 +190,14 @@ public class IoAddInoutService {
|
|
|
|
|
if (udiRelevanceResponse == null) {
|
|
|
|
|
orderEntity.setStatus(ConstantStatus.ORDER_STATS_ERROR);
|
|
|
|
|
orderEntity.setUpdateTime(new Date());
|
|
|
|
|
orderEntity.setRemark("udi码:" + warehouseEntity.getCode() + "该产品信息未维护");
|
|
|
|
|
orderEntity.setErrMsg("udi码:" + warehouseEntity.getCode() + "该产品信息未维护");
|
|
|
|
|
orderService.update(orderEntity);
|
|
|
|
|
return;
|
|
|
|
|
} else if (!udiRelevanceResponse.getUseDy() && udiRelevanceResponse.getDiType() == ConstantStatus.DITYPE_SYDY) {
|
|
|
|
|
|
|
|
|
|
orderEntity.setStatus(ConstantStatus.ORDER_STATS_ERROR);
|
|
|
|
|
orderEntity.setUpdateTime(new Date());
|
|
|
|
|
orderEntity.setRemark("udi码:" + warehouseEntity.getCode() + "该产品不允许以使用单元入库");
|
|
|
|
|
orderEntity.setErrMsg("udi码:" + warehouseEntity.getCode() + "该产品不允许以使用单元入库");
|
|
|
|
|
orderService.update(orderEntity);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -213,12 +213,12 @@ public class IoAddInoutService {
|
|
|
|
|
}
|
|
|
|
|
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_CHECK);
|
|
|
|
|
orderEntity.setUpdateTime(new Date());
|
|
|
|
|
orderEntity.setRemark("");
|
|
|
|
|
orderEntity.setErrMsg("");
|
|
|
|
|
orderService.update(orderEntity);
|
|
|
|
|
} else {
|
|
|
|
|
orderEntity.setStatus(ConstantStatus.ORDER_STATS_ERROR);
|
|
|
|
|
orderEntity.setUpdateTime(new Date());
|
|
|
|
|
orderEntity.setRemark("未添加UDI码");
|
|
|
|
|
orderEntity.setErrMsg("未添加UDI码");
|
|
|
|
|
orderService.update(orderEntity);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -227,7 +227,7 @@ public class IoAddInoutService {
|
|
|
|
|
|
|
|
|
|
//新增业务单据处理
|
|
|
|
|
public void dealBusProcess(IoOrderEntity orderEntity) {
|
|
|
|
|
orderEntity.setRemark("正在处理!");
|
|
|
|
|
orderEntity.setErrMsg("正在处理!");
|
|
|
|
|
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_PROCESSING);
|
|
|
|
|
orderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_POST);
|
|
|
|
|
orderEntity.setUpdateTime(new Date());
|
|
|
|
@ -236,7 +236,7 @@ public class IoAddInoutService {
|
|
|
|
|
|
|
|
|
|
List<IoOrderEntity> orderEntities = orderService.isExitRepeat(orderEntity.getCorpOrderId(), orderEntity.getBillNo());
|
|
|
|
|
if (CollUtil.isNotEmpty(orderEntities)) {
|
|
|
|
|
orderEntity.setRemark("单据重复上传");
|
|
|
|
|
orderEntity.setErrMsg("单据重复上传");
|
|
|
|
|
orderEntity.setStatus(ConstantStatus.ORDER_STATS_ERROR);
|
|
|
|
|
orderEntity.setUpdateTime(new Date());
|
|
|
|
|
orderService.update(orderEntity);
|
|
|
|
@ -245,7 +245,7 @@ public class IoAddInoutService {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (StrUtil.isEmpty(orderEntity.getFromCorp()) && StrUtil.isEmpty(orderEntity.getFromInvCode())) {
|
|
|
|
|
orderEntity.setRemark("未选择往来单位");
|
|
|
|
|
orderEntity.setErrMsg("未选择往来单位");
|
|
|
|
|
orderEntity.setStatus(ConstantStatus.ORDER_STATS_ERROR);
|
|
|
|
|
orderEntity.setUpdateTime(new Date());
|
|
|
|
|
orderService.update(orderEntity);
|
|
|
|
@ -253,7 +253,7 @@ public class IoAddInoutService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (StrUtil.isEmpty(orderEntity.getInvCode())) {
|
|
|
|
|
orderEntity.setRemark("未选择当前仓库信息");
|
|
|
|
|
orderEntity.setErrMsg("未选择当前仓库信息");
|
|
|
|
|
orderEntity.setStatus(ConstantStatus.ORDER_STATS_ERROR);
|
|
|
|
|
orderEntity.setUpdateTime(new Date());
|
|
|
|
|
orderService.update(orderEntity);
|
|
|
|
@ -276,7 +276,7 @@ public class IoAddInoutService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (StrUtil.isNotEmpty(errMsg)) {
|
|
|
|
|
orderEntity.setRemark(errMsg);
|
|
|
|
|
orderEntity.setErrMsg(errMsg);
|
|
|
|
|
orderEntity.setStatus(ConstantStatus.ORDER_STATS_ERROR);
|
|
|
|
|
orderEntity.setUpdateTime(new Date());
|
|
|
|
|
orderService.update(orderEntity);
|
|
|
|
|