单据校验相关修改

master
anthonywj 2 years ago
parent 2ada57f5b5
commit cbd80dc157

@ -521,6 +521,7 @@ public class IoCodeTempController extends BaseController {
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)));

@ -203,11 +203,11 @@ public class IoOrderController extends BaseController {
if (StrUtil.isNotEmpty(errMsg)) {
return ResultVOUtils.error(500, "单据校验提交失败,请检查后重新提交!");
return ResultVOUtils.error(500, errMsg);
}
errMsg = checkInoutService.codeOrderCheck(orderDetailCodeEntities, orderDetailBizEntities);
if (StrUtil.isNotEmpty(errMsg)) {
return ResultVOUtils.error(500, "单据校验提交失败,请检查后重新提交!");
return ResultVOUtils.error(500, errMsg);
}
saveOrderWeb(addOrderRequest);
IoOrderEntity orderEntity = orderService.findByBillNo(addOrderRequest.getBillNo());
@ -476,6 +476,4 @@ public class IoOrderController extends BaseController {
}
}

@ -44,13 +44,13 @@ public class IoOrderDetailBizEntity {
/**
*
*/
@TableField(value = "productDate")
@TableField(value = "productDate", updateStrategy = FieldStrategy.IGNORED)
private String productDate;
/**
*
*/
@TableField(value = "expireDate")
@TableField(value = "expireDate", updateStrategy = FieldStrategy.IGNORED)
private String expireDate;
/**

@ -207,7 +207,7 @@ public class IoCheckInoutService {
return "请先录入业务详情";
}
IoOrderDetailBizEntity bizEntity = orderDetailBizService.findByUnique(codeEntity.getOrderId(), codeEntity.getRelId(), codeEntity.getBatchNo());
IoOrderDetailBizEntity bizEntity = orderDetailBizService.findByUnique(codeEntity.getOrderId(), codeEntity.getRelId(), codeEntity.getBatchNo(), codeEntity.getProduceDate(), codeEntity.getExpireDate());
if (bizEntity == null) {
return "非此单产品!";
}

@ -14,7 +14,7 @@ public interface IoOrderDetailBizService {
List<IoOrderDetailBizEntity> findByOrderId(String orderId);
List<IoOrderDetailBizEntity> findByOrderIdAndNameCode(String orderId,boolean chack);
List<IoOrderDetailBizEntity> findByOrderIdAndNameCode(String orderId, boolean chack);
int insert(IoOrderDetailBizEntity orderDetailBizEntity);
@ -28,11 +28,11 @@ public interface IoOrderDetailBizService {
boolean isExit(Long relId, String bacthNo, Integer ignoreId, String orderId);
IoOrderDetailBizEntity findByUnique(String orderId, Long relId, String bacthNo);
IoOrderDetailBizEntity findByUnique(String orderId, Long relId, String bacthNo, String productDate, String expireDate);
List<IoOrderDetailBizResponse> filterList(FilterOrderDetailBizRequest orderDetailBizRequest);
IoOrderDetailBizEntity selectByBatchNoAndBindRlFk(String batchNo,String bindRlFk);
IoOrderDetailBizEntity selectByBatchNoAndBindRlFk(String batchNo, String bindRlFk);
List<IoOrderDetailBizEntity> checkOrderList(String orderId);

@ -36,14 +36,14 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService {
@Override
public List<IoOrderDetailBizEntity> findByOrderIdAndNameCode(String orderId, boolean chack) {
QueryWrapper<IoOrderDetailBizEntity> ew=new QueryWrapper<>();
if(StrUtil.isNotEmpty(orderId)){
ew.eq("orderIdFk",orderId);
QueryWrapper<IoOrderDetailBizEntity> ew = new QueryWrapper<>();
if (StrUtil.isNotEmpty(orderId)) {
ew.eq("orderIdFk", orderId);
}
// if(chack){
// ew.isNull("nameCode");
// }
List<IoOrderDetailBizEntity> ioOrderDetailBizEntityList=ioOrderDetailBizDao.selectList(ew);
List<IoOrderDetailBizEntity> ioOrderDetailBizEntityList = ioOrderDetailBizDao.selectList(ew);
return ioOrderDetailBizEntityList;
}
@ -82,9 +82,17 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService {
}
@Override
public IoOrderDetailBizEntity findByUnique(String orderId, Long relId, String bacthNo) {
return ioOrderDetailBizDao.selectOne(new QueryWrapper<IoOrderDetailBizEntity>().eq("orderIdFk", orderId).eq("bindRlFk", relId).eq(StrUtil.isNotEmpty(bacthNo), "batchNo", bacthNo)
.isNull(StrUtil.isEmpty(bacthNo), "batchNo"));
public IoOrderDetailBizEntity findByUnique(String orderId, Long relId, String bacthNo, String productDate, String expireDate) {
return ioOrderDetailBizDao.selectOne(new QueryWrapper<IoOrderDetailBizEntity>()
.eq("orderIdFk", orderId).eq("bindRlFk", relId)
.eq(StrUtil.isNotEmpty(bacthNo), "batchNo", bacthNo)
.isNull(StrUtil.isEmpty(bacthNo), "batchNo")
.eq(StrUtil.isNotEmpty(productDate), "productDate", productDate)
.isNull(StrUtil.isEmpty(productDate), "productDate")
.eq(StrUtil.isNotEmpty(expireDate), "expireDate", expireDate)
.isNull(StrUtil.isEmpty(expireDate), "expireDate")
);
}
@Override
@ -100,14 +108,14 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService {
@Override
public IoOrderDetailBizEntity selectByBatchNoAndBindRlFk(String batchNo, String bindRlFk) {
QueryWrapper<IoOrderDetailBizEntity> ew=new QueryWrapper<>();
QueryWrapper<IoOrderDetailBizEntity> ew = new QueryWrapper<>();
if (StrUtil.isNotEmpty(batchNo)) {
ew.eq("batchNo",batchNo);
ew.eq("batchNo", batchNo);
}
if (StrUtil.isNotEmpty(bindRlFk)) {
ew.eq("bindRlFk",bindRlFk);
ew.eq("bindRlFk", bindRlFk);
}
IoOrderDetailBizEntity ioOrderDetailBizEntity=ioOrderDetailBizDao.selectOne(ew);
IoOrderDetailBizEntity ioOrderDetailBizEntity = ioOrderDetailBizDao.selectOne(ew);
return ioOrderDetailBizEntity;
}
@ -133,7 +141,7 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService {
@Override
public Boolean updateOrderDetailBiz(IoOrderDetailBizEntity ioOrderDetailBizEntity) {
return ioOrderDetailBizDao.updateById(ioOrderDetailBizEntity)>0;
return ioOrderDetailBizDao.updateById(ioOrderDetailBizEntity) > 0;
}
}

@ -116,5 +116,6 @@ CALL Pro_Temp_ColumnWork('sup_cert_remind_msg', 'remindCount', 'int', 1);
CALL Pro_Temp_ColumnWork('sync_data_bustypes', 'orderStatus', 'tinyint', 1);
INSERT ignore INTO `sys_scheduled`(`id`, `cronName`, `cron`, `customerId`, `remark`) VALUES (100, 'clean_log_task', '0 0 2 1/1 * ? ', NULL, '删除日志数据');

Loading…
Cancel
Save