Commit 7bbfa0f6 authored by yaobaizheng's avatar yaobaizheng

招商引资

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