|
|
@ -111,10 +111,16 @@ public class CommodityServiceImpl implements CommodityService { |
|
|
|
map.put("zxbm",codeEntity.getZxbm()); |
|
|
|
map.put("zxbm",codeEntity.getZxbm()); |
|
|
|
map.put("entId",codeEntity.getEntId()); |
|
|
|
map.put("entId",codeEntity.getEntId()); |
|
|
|
List<CommodityCodeEntity> commodityCodeEntities = commodityMapper.queryProductList(map, null); |
|
|
|
List<CommodityCodeEntity> commodityCodeEntities = commodityMapper.queryProductList(map, null); |
|
|
|
if(StringUtils.isBlank(id) && ObjectUtil.isNotEmpty(commodityCodeEntities)){ |
|
|
|
long count = 0; |
|
|
|
return R.error().put(OrderManagementConstant.DATA, "新增物料信息已存在,请检查"); |
|
|
|
if(commodityCodeEntities != null && commodityCodeEntities.size() > 0){ |
|
|
|
|
|
|
|
count = commodityCodeEntities.stream().filter(t -> id.equals(t.getId())).count(); |
|
|
|
|
|
|
|
//CommodityCodeEntity commodityCodeEntity = commodityMapper.queryCommodityById(id, "", shList);
|
|
|
|
|
|
|
|
if(count == 0){ |
|
|
|
|
|
|
|
return R.error().put(OrderManagementConstant.DATA, "新增物料信息已存在,请检查"); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(id) && ObjectUtil.isNotEmpty(commodityCodeEntities)) { |
|
|
|
|
|
|
|
|
|
|
|
if (count > 0 && ObjectUtil.isNotEmpty(commodityCodeEntities)) { |
|
|
|
log.debug("修改操作 id = {}", id); |
|
|
|
log.debug("修改操作 id = {}", id); |
|
|
|
if (StringUtils.isNotEmpty(codeEntity.getSpbm())) { |
|
|
|
if (StringUtils.isNotEmpty(codeEntity.getSpbm())) { |
|
|
|
//已匹配
|
|
|
|
//已匹配
|
|
|
|