fix:去除校验
This commit is contained in:
@@ -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("目标库位为空!");
|
||||
|
||||
@@ -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推送需求单失败,需求单已存在");
|
||||
|
||||
Reference in New Issue
Block a user