Commit 7bbfa0f6 authored by yaobaizheng's avatar yaobaizheng

招商引资

parent 14e5c6ed
...@@ -31,8 +31,8 @@ public class DevelopmentInfoController { ...@@ -31,8 +31,8 @@ public class DevelopmentInfoController {
@GetMapping("/detail/{id}") @GetMapping("/detail/{id}")
@ApiOperation(value = "开发区-招商引资") @ApiOperation(value = "开发区-招商引资")
@ApiImplicitParam(name = "id", value = "开发区详情id", type = "Integer") @ApiImplicitParam(name = "id", value = "开发区详情id", type = "Integer")
public DevelopmentDetailVo detail(@PathVariable Integer id){ public DevelopmentDetailVo detail(){
return developmentInfoSerivce.detail(id); return developmentInfoSerivce.detail();
} }
} }
...@@ -4,10 +4,14 @@ import com.postcard.service.enums.PersonStatusEnum; ...@@ -4,10 +4,14 @@ import com.postcard.service.enums.PersonStatusEnum;
public enum FactorCostEnum { public enum FactorCostEnum {
ELECTRICITY("electricity","一般工业用电"), ELECTRICITY("electricitys","一般工业用电"),
BIGELECTRICITY("bigElectricity","大工业用电"), BIGELECTRICITY("bigElectricitys","大工业用电"),
WORKER("worker","用工"), WORKER("workers","用工"),
NATURALGAS("naturalGas","工业商用天然气"); NATURALGAS("naturalGass","工业商用天然气"),
LIGHT("investmentLights","区域亮点"),
INDUSRTY("primaryIndustrys","产业情况");
private String code; private String code;
private String name; private String name;
...@@ -21,7 +25,11 @@ public enum FactorCostEnum { ...@@ -21,7 +25,11 @@ public enum FactorCostEnum {
return code; return code;
} }
public static String getName(String code){ public String getName() {
return name;
}
public static String getNameByCode(String code){
for (FactorCostEnum bt: values()){ for (FactorCostEnum bt: values()){
if (bt.code.equals(code)){ if (bt.code.equals(code)){
return bt.name; return bt.name;
...@@ -30,7 +38,7 @@ public enum FactorCostEnum { ...@@ -30,7 +38,7 @@ public enum FactorCostEnum {
return null; return null;
} }
public static String getCode(String name){ public static String getCodeByName(String name){
for (FactorCostEnum bt: values()){ for (FactorCostEnum bt: values()){
if (bt.name.equals(name)){ if (bt.name.equals(name)){
return bt.code; return bt.code;
......
...@@ -40,8 +40,7 @@ public interface DevelopmentInfoService extends IService<DevelopmentInfo> { ...@@ -40,8 +40,7 @@ public interface DevelopmentInfoService extends IService<DevelopmentInfo> {
/** /**
* @description: 开发区详情 * @description: 开发区详情
* @date: 2023/11/21 17:40 * @date: 2023/11/21 17:40
* @param: [id]
* @return: com.lyy.admin.moudle.park.vo.ParkInfoAllVO * @return: com.lyy.admin.moudle.park.vo.ParkInfoAllVO
**/ **/
DevelopmentDetailVo detail(Integer id); DevelopmentDetailVo detail();
} }
...@@ -135,24 +135,19 @@ public class DevelopmentInfoServiceImpl extends ServiceImpl<DevelopmentInfoMappe ...@@ -135,24 +135,19 @@ public class DevelopmentInfoServiceImpl extends ServiceImpl<DevelopmentInfoMappe
} }
@Override @Override
public DevelopmentDetailVo detail(Integer id) { public DevelopmentDetailVo detail() {
// 园区基本信息 // 园区基本信息
DevelopmentInfo developmentInfo = this.getById(id); DevelopmentInfo developmentInfo = this.getById(developMentId);
DevelopmentDetailVo developmentDetailVo = DevelopmentDetailVo developmentDetailVo = BeanUtil.copyProperties(developmentInfo, DevelopmentDetailVo.class);
BeanUtil.copyProperties(developmentInfo, DevelopmentDetailVo.class); // developmentDetailVo.setSewageWaterPrice(developmentInfo.getSewageWaterPrice());
// 产业政策 // 产业政策
LambdaQueryWrapper<DevelopmentIndustryPolicyInfo> DIPIQueryWrqpper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<DevelopmentIndustryPolicyInfo> DIPIQueryWrqpper = new LambdaQueryWrapper<>();
DIPIQueryWrqpper.eq(DevelopmentIndustryPolicyInfo::getDevelopmentId, id); DIPIQueryWrqpper.eq(DevelopmentIndustryPolicyInfo::getDevelopmentId, developMentId);
List<DevelopmentIndustryPolicyInfo> list1 = List<DevelopmentIndustryPolicyInfo> list1 = developmentIndustryPolicyInfoService.list(DIPIQueryWrqpper);
developmentIndustryPolicyInfoService.list(DIPIQueryWrqpper); List<DevelopmentPolicyVo> developmentPolicyVos = Convert.toList(DevelopmentPolicyVo.class, list1);
List<DevelopmentPolicyVo> developmentPolicyVos = LinkedHashMap<String, List<DevelopmentPolicyVo>> collect3 = developmentPolicyVos.stream()
Convert.toList(DevelopmentPolicyVo.class, list1); .collect( Collectors.groupingBy(DevelopmentPolicyVo::getType, LinkedHashMap::new, Collectors.toList()));
LinkedHashMap<String, List<DevelopmentPolicyVo>> collect3 =
developmentPolicyVos.stream()
.collect(
Collectors.groupingBy(
DevelopmentPolicyVo::getType, LinkedHashMap::new, Collectors.toList()));
JSONArray policyJsonArray = new JSONArray(); JSONArray policyJsonArray = new JSONArray();
for (Map.Entry<String, List<DevelopmentPolicyVo>> entry : collect3.entrySet()) { for (Map.Entry<String, List<DevelopmentPolicyVo>> entry : collect3.entrySet()) {
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
...@@ -160,20 +155,23 @@ public class DevelopmentInfoServiceImpl extends ServiceImpl<DevelopmentInfoMappe ...@@ -160,20 +155,23 @@ public class DevelopmentInfoServiceImpl extends ServiceImpl<DevelopmentInfoMappe
jsonObject.putOpt("info", entry.getValue()); jsonObject.putOpt("info", entry.getValue());
policyJsonArray.add(jsonObject); policyJsonArray.add(jsonObject);
} }
developmentDetailVo.setPolicyList(policyJsonArray); developmentDetailVo.setPolicys(policyJsonArray);
// //产业情况 区域亮点
developmentDetailVo.setStarObjectExtensionInfoMap(starObjectExtensionInfoService.detail(id)); Map<String, List<StarObjectExtensionInfoVO>> detail = starObjectExtensionInfoService.detail(developMentId);
// developmentDetailVo.setInvestmentLights(detail.get(FactorCostEnum.LIGHT.getName()));
ScSourceInfoEntity scSourceInfoEntity = scSourceInfoService.getById(id); developmentDetailVo.setPrimaryIndustrys(detail.get(FactorCostEnum.INDUSRTY.getName()));
//要素成本
LambdaQueryWrapper<ScSourceInfoEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(ScSourceInfoEntity::getDevelopmentId,developMentId);
ScSourceInfoEntity scSourceInfoEntity = scSourceInfoService.getOne(lambdaQueryWrapper);
String investment = scSourceInfoEntity.getR1(); String investment = scSourceInfoEntity.getR1();
JSONArray array = JSONUtil.parseArray(investment); JSONArray array = JSONUtil.parseArray(investment);
for (int i = 0; i < array.size(); i++) { for (int i = 0; i < array.size(); i++) {
JSONObject obj = array.getJSONObject(i); JSONObject obj = array.getJSONObject(i);
String key = obj.getStr("key"); String key = obj.getStr("key");
JSONArray value = obj.getJSONArray("value"); JSONArray value = obj.getJSONArray("value");
MethodUtils.setValue(developmentDetailVo, FactorCostEnum.getCode(key), value); MethodUtils.setValue(developmentDetailVo, FactorCostEnum.getCodeByName(key), value);
} }
return developmentDetailVo; return developmentDetailVo;
} }
......
...@@ -35,39 +35,38 @@ public class DevelopmentDetailVo implements Serializable { ...@@ -35,39 +35,38 @@ public class DevelopmentDetailVo implements Serializable {
@ApiModelProperty(value = "开发区名称") @ApiModelProperty(value = "开发区名称")
private String name; private String name;
// //------------------招商亮点--------------------------------------------- //------------------招商亮点---------------------------------------------
// @ApiModelProperty(value = "招商亮点") @ApiModelProperty(value = "招商亮点")
// private JSONArray investmentLight; private List<StarObjectExtensionInfoVO> investmentLights;
// //------------------重点产业---------------------------------------------
// //------------------重点产业--------------------------------------------- @ApiModelProperty(value = "重点产业")
// @ApiModelProperty(value = "重点产业") private List<StarObjectExtensionInfoVO> primaryIndustrys;
// private JSONArray primaryIndustry;
@ApiModelProperty(value = "招商亮点 重点产业") // @ApiModelProperty(value = "招商亮点 重点产业")
private Map<String, List<StarObjectExtensionInfoVO>> starObjectExtensionInfoMap; // private Map<String, List<StarObjectExtensionInfoVO>> starObjectExtensionInfoMap;
//------------------招商政策--------------------------------------------- //------------------招商政策---------------------------------------------
@ApiModelProperty(value = "招商政策") @ApiModelProperty(value = "招商政策")
private JSONArray policyList = new JSONArray(); private JSONArray policys = new JSONArray();
//------------要素成本------------------------------------------------ //------------要素成本------------------------------------------------
@ApiModelProperty(value = "一般公共用电") @ApiModelProperty(value = "一般公共用电")
private JSONArray electricity = new JSONArray(); private JSONArray electricitys = new JSONArray();
@ApiModelProperty(value = "大工业用电") @ApiModelProperty(value = "大工业用电")
private JSONArray bigElectricity = new JSONArray(); private JSONArray bigElectricitys = new JSONArray();
@ApiModelProperty(value = "用工") @ApiModelProperty(value = "用工")
private JSONArray worker = new JSONArray(); private JSONArray workers = new JSONArray();
@ApiModelProperty(value = "工业商用天然气") @ApiModelProperty(value = "工业商用天然气")
private JSONArray naturalGas = new JSONArray(); private JSONArray naturalGass = new JSONArray();
@ApiModelProperty(value = "工业用水单价(元/吨)") @ApiModelProperty(value = "工业用水单价(元/吨)")
private String industrialWaterPrice; private String industrialWaterPrice;
@ApiModelProperty(value = "污水处理价格(元/吨)") @ApiModelProperty(value = "污水处理价格(元/吨)")
private String sewageWaterPrice; private BigDecimal sewageWaterPrice;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment