|
@@ -43,6 +43,10 @@ public class WindEngineGroupController extends BaseServiceController {
|
|
|
if (!windEngineGroupCreateDto.getFieldCode().contains(IdPrefixEnum.WIND_FIELD_NUMBER.getCode())) {
|
|
|
return ResultResp.FAIL("未绑定风场信息!");
|
|
|
}
|
|
|
+ int count = windEngineGroupService.getCountWindEngineGroupByCode(windEngineGroupCreateDto.getEngineName());
|
|
|
+ if (count > 0) {
|
|
|
+ return ResultResp.FAIL("风机名称已存在!");
|
|
|
+ }
|
|
|
windEngineGroupCreateDto.setCreateBy(getUserId());
|
|
|
boolean flg = windEngineGroupService.createWindEngineGroup(windEngineGroupCreateDto);
|
|
|
return flg ? ResultResp.SUCCESS() : ResultResp.FAIL();
|