|
@@ -238,18 +238,11 @@ public class BerthingServiceImpl implements BerthingService {
|
|
|
if (count > 0){
|
|
|
throw new BaseException("起测水位已存在");
|
|
|
}
|
|
|
- //有无重复策略号
|
|
|
- berthingPointConfig.setPlanid(berthingPointConfigDTO.getPlanid());
|
|
|
- berthingPointConfig.setWlevel(null);
|
|
|
- count = berthingPointConfigMapper.count(berthingPointConfig);
|
|
|
- if (count > 0){
|
|
|
- throw new BaseException("策略编号已存在");
|
|
|
- }
|
|
|
berthingPointConfig.setStopId(0L);
|
|
|
berthingPointConfig.setSiteId(siteInfo.getSiteId());
|
|
|
berthingPointConfig.setBerthingId(berthingPoint.getBerthingId());
|
|
|
berthingPointConfig.setPositions(JSONUtil.toJsonStr(positions));
|
|
|
- berthingPointConfig.setPlanid(berthingPointConfigDTO.getPlanid());
|
|
|
+ berthingPointConfig.setPlanid(0L);
|
|
|
berthingPointConfig.setWlevel(berthingPointConfigDTO.getWlevel());
|
|
|
berthingPointConfig.setFactors(JSONUtil.toJsonStr(berthingPointConfigDTO.getFactors()));
|
|
|
berthingPointConfig.setCreateTime(new Date());
|
|
@@ -263,7 +256,7 @@ public class BerthingServiceImpl implements BerthingService {
|
|
|
berthingPointConfigMapper.update(berthingPointConfig);
|
|
|
berthingPointConfig.setStopId(0L);
|
|
|
berthingPointConfig.setPositions(JSONUtil.toJsonStr(positions));
|
|
|
- berthingPointConfig.setPlanid(berthingPointConfigDTO.getPlanid());
|
|
|
+ berthingPointConfig.setPlanid(0L);
|
|
|
berthingPointConfig.setWlevel(berthingPointConfigDTO.getWlevel());
|
|
|
berthingPointConfig.setFactors(JSONUtil.toJsonStr(berthingPointConfigDTO.getFactors()));
|
|
|
res = berthingPointConfigMapper.insert(berthingPointConfig) > 0;
|