fix:去除校验

This commit is contained in:
2026-09-23 20:59:46 +08:00
parent 01802382d1
commit 18ca6e2e68
6 changed files with 67 additions and 28 deletions

View File

@@ -129,14 +129,14 @@ public class PmDemandPlatingServiceImpl extends ServiceImpl<PmDemandPlatingMappe
final List<String> orders = param.stream()
.filter(item-> !Objects.equals(item.getStatus(), "1"))
.map(PmDemandParam::getWorkOrder).collect(Collectors.toList());
if (!orders.isEmpty()){
final int count = this.count(new LambdaQueryWrapper<PmDemandPlating>()
.in(PmDemandPlating::getWork_order, orders)
.eq(PmDemandPlating::getIs_deleted,0));
if (count>0){
throw new BadRequestException("MES推送需求单失败,需求单已存在");
}
}
// if (!orders.isEmpty()){
// final int count = this.count(new LambdaQueryWrapper<PmDemandPlating>()
// .in(PmDemandPlating::getWork_order, orders)
// .eq(PmDemandPlating::getIs_deleted,0));
// if (count>0){
// throw new BadRequestException("MES推送需求单失败,需求单已存在");
// }
// }
for (PmDemandParam pmDemandParam : param) {
if (StringUtils.isEmpty(pmDemandParam.getTargetHouseCode())){
throw new BadRequestException("目标库位为空!");

View File

@@ -131,10 +131,10 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
public void batchCreate(List<PmDemandParam> param) {
final List<String> orders = param.stream()
.filter(item-> !Objects.equals(item.getStatus(), "1"))
.map(PmDemandParam::getWorkOrder).collect(Collectors.toList());
.map(PmDemandParam::getOrderCode).collect(Collectors.toList());
if (!orders.isEmpty()){
final int count = this.count(new LambdaQueryWrapper<PmDemand>()
.in(PmDemand::getWork_order, orders)
.in(PmDemand::getOrder_code, orders)
.eq(PmDemand::getIs_deleted,0));
if (count>0){
throw new BadRequestException("MES推送需求单失败,需求单已存在");