|
|
@ -108,8 +108,10 @@ public class CommodityServiceImpl implements CommodityService { |
|
|
|
//判断保存或者修改操作
|
|
|
|
//判断保存或者修改操作
|
|
|
|
String id = codeEntity.getId(); |
|
|
|
String id = codeEntity.getId(); |
|
|
|
Map<String,String> map = new HashMap<>(); |
|
|
|
Map<String,String> map = new HashMap<>(); |
|
|
|
CommodityCodeEntity commodityCodeEntity = commodityMapper.queryCommodityById(id, "", shList); |
|
|
|
map.put("zxbm",codeEntity.getZxbm()); |
|
|
|
if (ObjectUtil.isNotEmpty(commodityCodeEntity)) { |
|
|
|
map.put("entId",codeEntity.getEntId()); |
|
|
|
|
|
|
|
List<CommodityCodeEntity> commodityCodeEntities = commodityMapper.queryProductList(map, null); |
|
|
|
|
|
|
|
if (ObjectUtil.isNotEmpty(commodityCodeEntities)) { |
|
|
|
log.debug("修改操作 id = {}", id); |
|
|
|
log.debug("修改操作 id = {}", id); |
|
|
|
if (StringUtils.isNotEmpty(codeEntity.getSpbm())) { |
|
|
|
if (StringUtils.isNotEmpty(codeEntity.getSpbm())) { |
|
|
|
//已匹配
|
|
|
|
//已匹配
|
|
|
@ -120,7 +122,7 @@ public class CommodityServiceImpl implements CommodityService { |
|
|
|
// 记录修改记录
|
|
|
|
// 记录修改记录
|
|
|
|
Long userId = userInfoService.getUser().getUserId(); |
|
|
|
Long userId = userInfoService.getUser().getUserId(); |
|
|
|
|
|
|
|
|
|
|
|
if(commodityCodeModifyLogService.saveCommodityCodeDifferenceBetween2(commodityCodeEntity, codeEntity, userId) == -1){ |
|
|
|
if(commodityCodeModifyLogService.saveCommodityCodeDifferenceBetween2(commodityCodeEntities.get(0), codeEntity, userId) == -1){ |
|
|
|
R.error().put(OrderManagementConstant.DATA, "数据未进行修改,无需保存"); |
|
|
|
R.error().put(OrderManagementConstant.DATA, "数据未进行修改,无需保存"); |
|
|
|
} |
|
|
|
} |
|
|
|
if(commodityMapper.updateCommodity(codeEntity, shList) <= 0){ |
|
|
|
if(commodityMapper.updateCommodity(codeEntity, shList) <= 0){ |
|
|
|