diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java index a3ca90532c..59518d956f 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java @@ -12,7 +12,6 @@ import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO; import com.epmet.evaluationindex.screen.dto.form.TreeByTypeFormDTO; import com.epmet.evaluationindex.screen.dto.result.CompartmentResultDTO; import com.epmet.evaluationindex.screen.dto.result.TreeResultDTO; -import com.epmet.feign.EpmetCommonServiceOpenFeignClient; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -30,8 +29,6 @@ public class AgencyController { @Autowired private AgencyService agencyService; - @Autowired - private EpmetCommonServiceOpenFeignClient commonServiceOpenFeignClient; /** * @param * @Description 1、组织机构树 只返回 is_display = '1'的 @@ -95,6 +92,6 @@ public class AgencyController { @PostMapping("addstreetcomm") public Result addStreetCommAreaCode(@RequestBody AddAreaCodeDictFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO); - return commonServiceOpenFeignClient.addStreetCommAreaCode(formDTO); + return new Result().ok(agencyService.addStreetCommAreaCode(formDTO)); } } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java index 144e12fe1a..27f43f1a83 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java @@ -1,6 +1,8 @@ package com.epmet.datareport.service.evaluationindex.screen; +import com.epmet.dto.form.AddAreaCodeDictFormDTO; import com.epmet.dto.form.AreaCodeDictFormDTO; +import com.epmet.dto.result.AddAreaCodeDictResultDTO; import com.epmet.dto.result.AreaCodeDictResultDTO; import com.epmet.evaluationindex.screen.dto.form.CompartmentByBizTypeFormDTO; import com.epmet.evaluationindex.screen.dto.form.CompartmentFormDTO; @@ -47,4 +49,5 @@ public interface AgencyService { */ List areaCodeDictTree(AreaCodeDictFormDTO formDTO); + AddAreaCodeDictResultDTO addStreetCommAreaCode(AddAreaCodeDictFormDTO formDTO); } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java index 5c720eee42..b62ba1be13 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java @@ -8,7 +8,9 @@ import com.epmet.constant.DataSourceConstant; import com.epmet.datareport.dao.evaluationindex.screen.ScreenCustomerAgencyDao; import com.epmet.datareport.dao.evaluationindex.screen.ScreenCustomerGridDao; import com.epmet.datareport.service.evaluationindex.screen.AgencyService; +import com.epmet.dto.form.AddAreaCodeDictFormDTO; import com.epmet.dto.form.AreaCodeDictFormDTO; +import com.epmet.dto.result.AddAreaCodeDictResultDTO; import com.epmet.dto.result.AreaCodeDictResultDTO; import com.epmet.evaluationindex.screen.constant.ScreenConstant; import com.epmet.evaluationindex.screen.dto.form.CompartmentByBizTypeFormDTO; @@ -248,4 +250,13 @@ public class AgencyServiceImpl implements AgencyService { } return new ArrayList<>(); } + + @Override + public AddAreaCodeDictResultDTO addStreetCommAreaCode(AddAreaCodeDictFormDTO formDTO) { + Result res=commonServiceOpenFeignClient.addStreetCommAreaCode(formDTO); + if(res.success()&&null!=res.getData()){ + return new AddAreaCodeDictResultDTO(res.getData().getCode()); + } + throw new RenException(res.getMsg()+res.getInternalMsg()); + } } diff --git a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/AreaCodeChildDTO.java b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/AreaCodeChildDTO.java index d3da19fa21..31f68bc86f 100644 --- a/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/AreaCodeChildDTO.java +++ b/epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/AreaCodeChildDTO.java @@ -17,9 +17,10 @@ package com.epmet.dto; +import lombok.Data; + import java.io.Serializable; import java.util.Date; -import lombok.Data; /** @@ -36,7 +37,7 @@ public class AreaCodeChildDTO implements Serializable { /** * 主键 */ - private Integer id; + private String id; /** * 省份code