|
@@ -21,6 +21,7 @@ import com.energy.manage.service.domain.dto.anemometertower.AnemometerTowerDto;
|
|
|
import com.energy.manage.service.domain.dto.anemometertower.AnemometerTowerRelationDto;
|
|
|
import com.energy.manage.service.domain.dto.company.WindCompanyDto;
|
|
|
import com.energy.manage.service.domain.dto.windfield.*;
|
|
|
+import com.energy.manage.service.domain.dto.windrelation.WindRelationDelDto;
|
|
|
import com.energy.manage.service.domain.dto.windrelation.WindRelationDto;
|
|
|
import com.energy.manage.service.domain.vo.anemometertower.AnemometerTowerByFieldVo;
|
|
|
import com.energy.manage.service.domain.vo.excel.WindFieldExceVo;
|
|
@@ -82,6 +83,11 @@ public class WindFieldServiceImpl extends BaseServiceImpl<WindFieldPO> implement
|
|
|
private WindFieldResourceService windFieldResourceService;
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private WindRelationService windRelationService;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public boolean createWindField(WindFieldDto windFieldDto) {
|
|
@@ -265,7 +271,14 @@ public class WindFieldServiceImpl extends BaseServiceImpl<WindFieldPO> implement
|
|
|
Example queryExample = new Example(WindFieldPO.class);
|
|
|
Example.Criteria criteria = queryExample.createCriteria();
|
|
|
criteria.andEqualTo("fieldCode", fieldCode);
|
|
|
- return windFieldMapper.updateByExampleSelective(windFieldPO, queryExample) > 0;
|
|
|
+
|
|
|
+ if(windFieldMapper.updateByExampleSelective(windFieldPO, queryExample) <=0){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ WindRelationDelDto windRelationDelDto = new WindRelationDelDto();
|
|
|
+ windRelationDelDto.setCodeNumber(fieldCode);
|
|
|
+ windRelationDelDto.setType(TypeRelationEnum.WIND_FIELD_NUMBER.getCode());
|
|
|
+ return windRelationService.delWindRelation(windRelationDelDto);
|
|
|
}
|
|
|
|
|
|
@Override
|