Browse Source

add /data/report/screen/agency/addstreetcomm api v2

dev_shibei_match
yinzuomei 5 years ago
parent
commit
1f8905fd24
  1. 5
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/AgencyController.java
  2. 3
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/AgencyService.java
  3. 11
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java
  4. 5
      epmet-module/epmet-common-service/common-service-client/src/main/java/com/epmet/dto/AreaCodeChildDTO.java

5
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<AddAreaCodeDictResultDTO> addStreetCommAreaCode(@RequestBody AddAreaCodeDictFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO);
return commonServiceOpenFeignClient.addStreetCommAreaCode(formDTO);
return new Result<AddAreaCodeDictResultDTO>().ok(agencyService.addStreetCommAreaCode(formDTO));
}
}

3
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<AreaCodeDictResultDTO> areaCodeDictTree(AreaCodeDictFormDTO formDTO);
AddAreaCodeDictResultDTO addStreetCommAreaCode(AddAreaCodeDictFormDTO formDTO);
}

11
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<AddAreaCodeDictResultDTO> res=commonServiceOpenFeignClient.addStreetCommAreaCode(formDTO);
if(res.success()&&null!=res.getData()){
return new AddAreaCodeDictResultDTO(res.getData().getCode());
}
throw new RenException(res.getMsg()+res.getInternalMsg());
}
}

5
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

Loading…
Cancel
Save