|
@ -255,6 +255,16 @@ public class BmsChannelPointController { |
|
|
public R<?> updateById(@RequestBody BmsChannelPointMapInfoBo param){ |
|
|
public R<?> updateById(@RequestBody BmsChannelPointMapInfoBo param){ |
|
|
BmsChannelPoint channelPoint = CopierUtil.copy(param,new BmsChannelPoint()); |
|
|
BmsChannelPoint channelPoint = CopierUtil.copy(param,new BmsChannelPoint()); |
|
|
BmsChannelPoint orgData = bmsChannelPointService.getById(channelPoint.getId()); |
|
|
BmsChannelPoint orgData = bmsChannelPointService.getById(channelPoint.getId()); |
|
|
|
|
|
if(!StringUtils.hasText(orgData.getBizRegionId()) && StringUtils.hasText(param.getAdCode())){ |
|
|
|
|
|
LambdaQueryWrapper<BmsRegion2> region2LambdaQueryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
|
region2LambdaQueryWrapper.eq(BmsRegion2::getCode,param.getAdCode()); |
|
|
|
|
|
BmsRegion2 region2 = bmsRegion2Service.getOne(region2LambdaQueryWrapper); |
|
|
|
|
|
if(region2!=null) { |
|
|
|
|
|
channelPoint.setBizRegionId(region2.getId()); |
|
|
|
|
|
channelPoint.setBizRegionPath(region2.getPathNames()); |
|
|
|
|
|
channelPoint.setBizRegionPathIds(region2.getPathIds()); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
bmsChannelPointService.updateById(channelPoint); |
|
|
bmsChannelPointService.updateById(channelPoint); |
|
|
businessLogService.buildLog4Change(BusinessLogType.Point, |
|
|
businessLogService.buildLog4Change(BusinessLogType.Point, |
|
|
channelPoint.getId()+"",channelPoint.getPointCode(),channelPoint.getPointName(),null,orgData,channelPoint); |
|
|
channelPoint.getId()+"",channelPoint.getPointCode(),channelPoint.getPointName(),null,orgData,channelPoint); |
|
|