移除判断,交给前端处理
This commit is contained in:
parent
2c2c4c2cf9
commit
c12050dfeb
|
|
@ -10,7 +10,6 @@ import cn.hutool.core.util.IdUtil;
|
||||||
import cn.hutool.core.util.NumberUtil;
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.extra.spring.SpringUtil;
|
import cn.hutool.extra.spring.SpringUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||||
|
|
@ -24,7 +23,10 @@ import com.nflg.product.base.core.exception.NflgBusinessException;
|
||||||
import com.nflg.product.bomnew.constant.*;
|
import com.nflg.product.bomnew.constant.*;
|
||||||
import com.nflg.product.bomnew.mapper.master.BomNewEbomParentMapper;
|
import com.nflg.product.bomnew.mapper.master.BomNewEbomParentMapper;
|
||||||
import com.nflg.product.bomnew.pojo.dto.*;
|
import com.nflg.product.bomnew.pojo.dto.*;
|
||||||
import com.nflg.product.bomnew.pojo.entity.*;
|
import com.nflg.product.bomnew.pojo.entity.BomNewEbomChildEntity;
|
||||||
|
import com.nflg.product.bomnew.pojo.entity.BomNewEbomMaterialUseEntity;
|
||||||
|
import com.nflg.product.bomnew.pojo.entity.BomNewEbomParentEntity;
|
||||||
|
import com.nflg.product.bomnew.pojo.entity.MaterialMainEntity;
|
||||||
import com.nflg.product.bomnew.pojo.query.BomNewEbomMaterialQuery;
|
import com.nflg.product.bomnew.pojo.query.BomNewEbomMaterialQuery;
|
||||||
import com.nflg.product.bomnew.pojo.query.BomNewEbomParentQuery;
|
import com.nflg.product.bomnew.pojo.query.BomNewEbomParentQuery;
|
||||||
import com.nflg.product.bomnew.pojo.vo.*;
|
import com.nflg.product.bomnew.pojo.vo.*;
|
||||||
|
|
@ -240,8 +242,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
}
|
}
|
||||||
|
|
||||||
private Set<String> getSelfMaterialNo(Set<String> relSkuNo) {
|
private Set<String> getSelfMaterialNo(Set<String> relSkuNo) {
|
||||||
Set<String> selfParentMaterialNo = this.getBaseMapper().getSelfParentMaterialNo(SessionUtil.getUserCode(), relSkuNo);
|
return this.getBaseMapper().getSelfParentMaterialNo(SessionUtil.getUserCode(), relSkuNo);
|
||||||
return selfParentMaterialNo;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -256,17 +257,6 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
|
|
||||||
if (CollUtil.isNotEmpty(result.getRecords())) {
|
if (CollUtil.isNotEmpty(result.getRecords())) {
|
||||||
materialMainService.intiMaterialInfo(result.getRecords());
|
materialMainService.intiMaterialInfo(result.getRecords());
|
||||||
} else {
|
|
||||||
//查bom是否存在
|
|
||||||
LambdaQueryWrapper<BomNewEbomChildEntity> wrapper = new LambdaQueryWrapper<>();
|
|
||||||
if (StrUtil.isNotBlank(query.getDrawingNo())) {
|
|
||||||
wrapper.eq(BomNewEbomChildEntity::getDrawingNo, query.getDrawingNo());
|
|
||||||
} else if (StrUtil.isNotBlank(query.getMaterialNo())) {
|
|
||||||
wrapper.eq(BomNewEbomChildEntity::getMaterialNo, query.getMaterialNo());
|
|
||||||
}
|
|
||||||
if (wrapper.nonEmptyOfWhere() && ebomChildService.getBaseMapper().selectCount(wrapper) > 0) {
|
|
||||||
VUtils.isTure(true).throwMessage("不存在此BOM物料");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
@ -280,9 +270,7 @@ public class BomNewEbomParentService extends ServiceImpl<BomNewEbomParentMapper,
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Page<BomNewEbomUpgradeChangeVO> getUpgradeChangeList(BomNewEbomParentQuery query) {
|
public Page<BomNewEbomUpgradeChangeVO> getUpgradeChangeList(BomNewEbomParentQuery query) {
|
||||||
Page<BomNewEbomUpgradeChangeVO> result = this.getBaseMapper().getUpgradeChangeList(new Page<>(query.getPage(), query.getPageSize()), query);
|
return this.getBaseMapper().getUpgradeChangeList(new Page<>(query.getPage(), query.getPageSize()), query);
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue