作者 quchang

条件设置接口模块开发完毕

正在显示 26 个修改的文件 包含 923 行增加11 行删除
  1 +package com.synthesize_energy.item.dto;
  2 +
  3 +import lombok.Data;
  4 +
  5 +import java.util.List;
  6 +
  7 +/**
  8 + * @author kgy
  9 + * @version 1.0
  10 + * @date 2020/5/23 14:28
  11 + */
  12 +@Data
  13 +public class ComputeArg2Dto {
  14 + private String name;
  15 + List<ComputeArgDto> list;
  16 +}
  1 +package com.synthesize_energy.item.dto;
  2 +
  3 +import io.swagger.annotations.ApiModelProperty;
  4 +import lombok.Data;
  5 +
  6 +import java.util.List;
  7 +
  8 +/**
  9 + * @author kgy
  10 + * @version 1.0
  11 + * @date 2020/5/23 11:26
  12 + */
  13 +@Data
  14 +public class ComputeArgDto {
  15 +
  16 + @ApiModelProperty("id")
  17 + private Integer id;
  18 + @ApiModelProperty("参数")
  19 + private String namType;
  20 + @ApiModelProperty("典型值")
  21 + private Double modelType;
  22 + @ApiModelProperty("备注")
  23 + private String name;
  24 +}
  1 +package com.synthesize_energy.item.entity;
  2 +
  3 +import com.baomidou.mybatisplus.annotation.IdType;
  4 +import com.baomidou.mybatisplus.annotation.TableField;
  5 +import com.baomidou.mybatisplus.annotation.TableId;
  6 +import com.baomidou.mybatisplus.annotation.TableName;
  7 +import com.synthesize_energy.item.dto.ComputeArg2Dto;
  8 +import com.synthesize_energy.item.dto.ComputeArgDto;
  9 +import lombok.Data;
  10 +
  11 +import java.io.Serializable;
  12 +import java.util.List;
  13 +import java.util.Map;
  14 +
  15 +/**
  16 + * @author kgy
  17 + * @version 1.0
  18 + * @date 2020/5/23 11:06
  19 + * @param 参数修正表名字
  20 + */
  21 +@Data
  22 +@TableName("tb_compute_arg")
  23 +public class ComputeArg implements Serializable {
  24 +
  25 + private static final long serialVersionUID = -2969482775763717316L;
  26 +
  27 + @TableId(type = IdType.AUTO)
  28 + private Integer id;
  29 + private String name;
  30 + private Integer pid;
  31 + @TableField(exist = false)
  32 + private List<ComputeArg2Dto> map;
  33 +
  34 +}
@@ -25,9 +25,9 @@ public class Synthesize_no_2_1 implements Serializable { @@ -25,9 +25,9 @@ public class Synthesize_no_2_1 implements Serializable {
25 @ApiModelProperty("建筑类型ID") 25 @ApiModelProperty("建筑类型ID")
26 private String buildingTypeId; 26 private String buildingTypeId;
27 @ApiModelProperty("供热面积") 27 @ApiModelProperty("供热面积")
28 - private String heatArea; 28 + private Double heatArea;
29 @ApiModelProperty("供冷面积") 29 @ApiModelProperty("供冷面积")
30 - private String coldArea; 30 + private Double coldArea;
31 @ApiModelProperty("用水人数") 31 @ApiModelProperty("用水人数")
32 - private String waterPersonNum; 32 + private Integer waterPersonNum;
33 } 33 }
  1 +package com.synthesize_energy.item.entity;
  2 +
  3 +import com.baomidou.mybatisplus.annotation.IdType;
  4 +import com.baomidou.mybatisplus.annotation.TableId;
  5 +import com.baomidou.mybatisplus.annotation.TableName;
  6 +import io.swagger.annotations.ApiModelProperty;
  7 +import lombok.Data;
  8 +
  9 +import java.io.Serializable;
  10 +
  11 +/**
  12 + * @author kgy
  13 + * @version 1.0
  14 + * @date 2020/5/23 8:40
  15 + */
  16 +@Data
  17 +@TableName("synthesize_no_2_2")
  18 +public class Synthesize_no_2_2 implements Serializable {
  19 + private static final long serialVersionUID = 5669919005625275543L;
  20 +
  21 + @TableId(type = IdType.ID_WORKER_STR)
  22 + @ApiModelProperty("no_1项目信息保存返回的ID")
  23 + private String id;
  24 + @ApiModelProperty("年用电总量:")
  25 + private Double electricityAll;
  26 + @ApiModelProperty("年用电金额:")
  27 + private Double electricityPrice;
  28 + @ApiModelProperty("年用电总热量:")
  29 + private Double electricityAllHot;
  30 + @ApiModelProperty("年用热金额:")
  31 + private Double hotAllPrice;
  32 + @ApiModelProperty("年用冷金额:")
  33 + private Double coleAllPrice;
  34 + @ApiModelProperty("年热水费用:")
  35 + private Double hotWaterPrice;
  36 +}
  1 +package com.synthesize_energy.item.entity;
  2 +
  3 +import com.baomidou.mybatisplus.annotation.IdType;
  4 +import com.baomidou.mybatisplus.annotation.TableId;
  5 +import com.baomidou.mybatisplus.annotation.TableName;
  6 +import io.swagger.annotations.ApiModelProperty;
  7 +import lombok.Data;
  8 +
  9 +import java.io.Serializable;
  10 +
  11 +/**
  12 + * @author kgy
  13 + * @version 1.0
  14 + * @date 2020/5/23 9:14
  15 + */
  16 +@Data
  17 +@TableName("synthesize_no_2_3")
  18 +public class Synthesize_no_2_3 implements Serializable {
  19 + private static final long serialVersionUID = -6953785770060288649L;
  20 +
  21 + @TableId(type = IdType.ID_WORKER_STR)
  22 + @ApiModelProperty("no_1项目信息保存返回的ID")
  23 + private String id;
  24 + @ApiModelProperty("1光伏 2风电 3持续供电 4一充一放 5两充两放")
  25 + private String powerSupply;
  26 + @ApiModelProperty("选了储能才会有")
  27 + private Double powerSupplyEnergy;
  28 + @ApiModelProperty("1空气源热泵(制热型)2空气源热泵(双工况)3电锅炉 4燃气锅炉")
  29 + private String powerHot;
  30 + @ApiModelProperty("1空气源热泵(制热型)2空气源热泵(双工况)3电锅炉 4燃气锅炉")
  31 + private String powerCold;
  32 + @ApiModelProperty("1太阳能集热器 2空气源热泵(热水型)")
  33 + private String hotWater;
  34 +}
  1 +package com.synthesize_energy.item.entity;
  2 +
  3 +import com.baomidou.mybatisplus.annotation.IdType;
  4 +import com.baomidou.mybatisplus.annotation.TableId;
  5 +import com.baomidou.mybatisplus.annotation.TableName;
  6 +import io.swagger.annotations.ApiModelProperty;
  7 +import lombok.Data;
  8 +
  9 +import java.io.Serializable;
  10 +
  11 +/**
  12 + * @author kgy
  13 + * @version 1.0
  14 + * @date 2020/5/23 9:23
  15 + */
  16 +@Data
  17 +@TableName("synthesize_no_2_4")
  18 +public class Synthesize_no_2_4 implements Serializable {
  19 + private static final long serialVersionUID = 6682046829964676590L;
  20 + @TableId(type = IdType.ID_WORKER_STR)
  21 + @ApiModelProperty("no_1项目信息保存返回的ID")
  22 + private String id;
  23 + @ApiModelProperty("配电容量:")
  24 + private Double electricityAh;
  25 + @ApiModelProperty("光伏可利用面积:")
  26 + private Double photovoltaicArea;
  27 + @ApiModelProperty("风电装机容量:")
  28 + private Double windAh;
  29 +}
  1 +package com.synthesize_energy.item.entity;
  2 +
  3 +import com.baomidou.mybatisplus.annotation.IdType;
  4 +import com.baomidou.mybatisplus.annotation.TableId;
  5 +import com.baomidou.mybatisplus.annotation.TableName;
  6 +import io.swagger.annotations.ApiModelProperty;
  7 +import lombok.Data;
  8 +
  9 +import java.io.Serializable;
  10 +
  11 +/**
  12 + * @author kgy
  13 + * @version 1.0
  14 + * @date 2020/5/23 9:34
  15 + */
  16 +@Data
  17 +@TableName("synthesize_no_2_5")
  18 +public class Synthesize_no_2_5 implements Serializable {
  19 +
  20 + private static final long serialVersionUID = -7185874337127204745L;
  21 + @TableId(type = IdType.ID_WORKER_STR)
  22 + @ApiModelProperty("no_1项目信息保存返回的ID")
  23 + private String id;
  24 + @ApiModelProperty("售电价格:")
  25 + private Double electricitySellingPrice;
  26 + @ApiModelProperty("售热价格:")
  27 + private Double hotSellingPrice;
  28 + @ApiModelProperty("售冷价格:")
  29 + private Double coldSellingPrice;
  30 + @ApiModelProperty("售热水价格:")
  31 + private Double hotWaterSellingPrice;
  32 + @ApiModelProperty("1三免三减半 2高新技术企业")
  33 + private String sale;
  34 +}
  1 +package com.synthesize_energy.item.entity;
  2 +
  3 +import com.baomidou.mybatisplus.annotation.IdType;
  4 +import com.baomidou.mybatisplus.annotation.TableField;
  5 +import com.baomidou.mybatisplus.annotation.TableId;
  6 +import com.baomidou.mybatisplus.annotation.TableName;
  7 +import io.swagger.annotations.ApiModelProperty;
  8 +import lombok.Data;
  9 +
  10 +import java.io.Serializable;
  11 +
  12 +/**
  13 + * @author kgy
  14 + * @version 1.0
  15 + * @date 2020/5/23 11:50
  16 + */
  17 +@Data
  18 +@TableName("synthesize_no_2_6")
  19 +public class Synthesize_no_2_6 implements Serializable {
  20 + private static final long serialVersionUID = -6194039941236804966L;
  21 +
  22 + @TableId(type = IdType.ID_WORKER_STR)
  23 + @ApiModelProperty("no_1项目信息保存返回的ID")
  24 + private String id;
  25 + @TableField("no_16")
  26 + private Double no16;
  27 + @TableField("no_17")
  28 + private Double no17;
  29 + @TableField("no_18")
  30 + private Double no18;
  31 + @TableField("no_19")
  32 + private Double no19;
  33 + @TableField("no_20")
  34 + private Double no20;
  35 + @TableField("no_21")
  36 + private Double no21;
  37 + @TableField("no_22")
  38 + private Double no22;
  39 + @TableField("no_23")
  40 + private Double no23;
  41 + @TableField("no_24")
  42 + private Double no24;
  43 + @TableField("no_25")
  44 + private Double no25;
  45 + @TableField("no_26")
  46 + private Double no26;
  47 + @TableField("no_27")
  48 + private Double no27;
  49 + @TableField("no_28")
  50 + private Double no28;
  51 + @TableField("no_29")
  52 + private Double no29;
  53 + @TableField("no_30")
  54 + private Double no30;
  55 + @TableField("no_31")
  56 + private Double no31;
  57 + @TableField("no_32")
  58 + private Double no32;
  59 + @TableField("no_33")
  60 + private Double no33;
  61 + @TableField("no_34")
  62 + private Double no34;
  63 + @TableField("no_35")
  64 + private Double no35;
  65 + @TableField("no_36")
  66 + private Double no36;
  67 + @TableField("no_37")
  68 + private Double no37;
  69 + @TableField("no_38")
  70 + private Double no38;
  71 + @TableField("no_39")
  72 + private Double no39;
  73 + @TableField("no_40")
  74 + private Double no40;
  75 + @TableField("no_41")
  76 + private Double no41;
  77 + @TableField("no_42")
  78 + private Double no42;
  79 + @TableField("no_43")
  80 + private Double no43;
  81 + @TableField("no_44")
  82 + private Double no44;
  83 + @TableField("no_45")
  84 + private Double no45;
  85 + @TableField("no_46")
  86 + private Double no46;
  87 + @TableField("no_47")
  88 + private Double no47;
  89 + @TableField("no_48")
  90 + private Double no48;
  91 + @TableField("no_49")
  92 + private Double no49;
  93 + @TableField("no_50")
  94 + private Double no50;
  95 + @TableField("no_51")
  96 + private Double no51;
  97 + @TableField("no_52")
  98 + private Double no52;
  99 + @TableField("no_53")
  100 + private Double no53;
  101 + @TableField("no_54")
  102 + private Double no54;
  103 + @TableField("no_55")
  104 + private Double no55;
  105 + @TableField("no_56")
  106 + private Double no56;
  107 + @TableField("no_57")
  108 + private Double no57;
  109 + @TableField("no_58")
  110 + private Double no58;
  111 + @TableField("no_59")
  112 + private Double no59;
  113 + @TableField("no_60")
  114 + private Double no60;
  115 +}
  1 +package com.synthesize_energy.item.mapper;
  2 +
  3 +import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  4 +import com.synthesize_energy.item.entity.ComputeArg;
  5 +
  6 +/**
  7 + * @author kgy
  8 + * @version 1.0
  9 + * @date 2020/5/23 11:09
  10 + */
  11 +public interface ComputeArgMapper extends BaseMapper<ComputeArg> {
  12 +}
  1 +package com.synthesize_energy.item.mapper;
  2 +
  3 +import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  4 +import com.synthesize_energy.item.entity.Synthesize_no_2_2;
  5 +
  6 +/**
  7 + * @author kgy
  8 + * @version 1.0
  9 + * @date 2020/5/23 8:44
  10 + */
  11 +public interface Synthesize_no_2_2Mapper extends BaseMapper<Synthesize_no_2_2> {
  12 +}
  1 +package com.synthesize_energy.item.mapper;
  2 +
  3 +import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  4 +import com.synthesize_energy.item.entity.Synthesize_no_2_3;
  5 +
  6 +/**
  7 + * @author kgy
  8 + * @version 1.0
  9 + * @date 2020/5/23 9:17
  10 + */
  11 +public interface Synthesize_no_2_3Mapper extends BaseMapper<Synthesize_no_2_3> {
  12 +}
  1 +package com.synthesize_energy.item.mapper;
  2 +
  3 +import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  4 +import com.synthesize_energy.item.entity.Synthesize_no_2_4;
  5 +
  6 +/**
  7 + * @author kgy
  8 + * @version 1.0
  9 + * @date 2020/5/23 9:25
  10 + */
  11 +public interface Synthesize_no_2_4Mapper extends BaseMapper<Synthesize_no_2_4> {
  12 +}
  1 +package com.synthesize_energy.item.mapper;
  2 +
  3 +import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  4 +import com.synthesize_energy.item.entity.Synthesize_no_2_5;
  5 +
  6 +/**
  7 + * @author kgy
  8 + * @version 1.0
  9 + * @date 2020/5/23 9:38
  10 + */
  11 +public interface Synthesize_no_2_5Mapper extends BaseMapper<Synthesize_no_2_5> {
  12 +}
  1 +package com.synthesize_energy.item.mapper;
  2 +
  3 +import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  4 +import com.synthesize_energy.item.entity.Synthesize_no_2_6;
  5 +
  6 +/**
  7 + * @author kgy
  8 + * @version 1.0
  9 + * @date 2020/5/23 11:54
  10 + */
  11 +public interface Synthesize_no_2_6Mapper extends BaseMapper<Synthesize_no_2_6> {
  12 +
  13 +}
@@ -2,23 +2,24 @@ package com.synthesize_energy.item.web.controller; @@ -2,23 +2,24 @@ package com.synthesize_energy.item.web.controller;
2 2
3 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 3 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4 import com.synthesize_energy.common.domain.RestResponse; 4 import com.synthesize_energy.common.domain.RestResponse;
  5 +import com.synthesize_energy.item.dto.ComputeArg2Dto;
  6 +import com.synthesize_energy.item.dto.ComputeArgDto;
5 import com.synthesize_energy.item.entity.*; 7 import com.synthesize_energy.item.entity.*;
  8 +import com.synthesize_energy.item.mapper.ComputeArgMapper;
6 import com.synthesize_energy.item.mapper.SortMapper; 9 import com.synthesize_energy.item.mapper.SortMapper;
7 import com.synthesize_energy.item.mapper.Synthesize_no_1ImgMapper; 10 import com.synthesize_energy.item.mapper.Synthesize_no_1ImgMapper;
8 import com.synthesize_energy.item.utils.JwtUtil; 11 import com.synthesize_energy.item.utils.JwtUtil;
9 -import com.synthesize_energy.item.web.service.No_1Service;  
10 -import com.synthesize_energy.item.web.service.Synthesize_no_1ClientNameService;  
11 -import com.synthesize_energy.item.web.service.Synthesize_no_2_1Service; 12 +import com.synthesize_energy.item.web.service.*;
12 import io.swagger.annotations.Api; 13 import io.swagger.annotations.Api;
  14 +import io.swagger.annotations.ApiImplicitParam;
  15 +import io.swagger.annotations.ApiImplicitParams;
13 import io.swagger.annotations.ApiOperation; 16 import io.swagger.annotations.ApiOperation;
14 import org.apache.commons.lang3.StringUtils; 17 import org.apache.commons.lang3.StringUtils;
15 import org.springframework.beans.factory.annotation.Autowired; 18 import org.springframework.beans.factory.annotation.Autowired;
16 import org.springframework.web.bind.annotation.*; 19 import org.springframework.web.bind.annotation.*;
17 20
18 import javax.servlet.http.HttpServletRequest; 21 import javax.servlet.http.HttpServletRequest;
19 -import java.util.ArrayList;  
20 -import java.util.Date;  
21 -import java.util.List; 22 +import java.util.*;
22 23
23 /** 24 /**
24 * @author kgy 25 * @author kgy
@@ -42,6 +43,18 @@ public class ProjectController { @@ -42,6 +43,18 @@ public class ProjectController {
42 private Synthesize_no_2_1Service synthesize_no_2_1Service; 43 private Synthesize_no_2_1Service synthesize_no_2_1Service;
43 @Autowired 44 @Autowired
44 private SortMapper sortMapper; 45 private SortMapper sortMapper;
  46 + @Autowired
  47 + private ComputeArgMapper computeArgMapper;
  48 + @Autowired
  49 + private Synthesize_no_2_2Service synthesize_no_2_2Service;
  50 + @Autowired
  51 + private Synthesize_no_2_3Service synthesize_no_2_3Service;
  52 + @Autowired
  53 + private Synthesize_no_2_4Service synthesize_no_2_4Service;
  54 + @Autowired
  55 + private Synthesize_no_2_5Service synthesize_no_2_5Service;
  56 + @Autowired
  57 + private Synthesize_no_2_6Service synthesize_no_2_6Service;
45 58
46 @PostMapping("no_1") 59 @PostMapping("no_1")
47 @ApiOperation(value = "no_1项目信息", notes = "no_1项目信息") 60 @ApiOperation(value = "no_1项目信息", notes = "no_1项目信息")
@@ -78,10 +91,16 @@ public class ProjectController { @@ -78,10 +91,16 @@ public class ProjectController {
78 return RestResponse.success(synthesize_no_1ImgMapper.insert(synthesize_no_1Img)); 91 return RestResponse.success(synthesize_no_1ImgMapper.insert(synthesize_no_1Img));
79 } 92 }
80 93
  94 + /**
  95 + * TODO
  96 + *
  97 + * @param synthesize_no_2_1
  98 + * @return
  99 + */
81 @PostMapping("no_2_1") 100 @PostMapping("no_2_1")
82 - @ApiOperation(value = "no_2_1建筑信息新增", notes = "no_2_1建筑信息新增") 101 + @ApiOperation(value = "no_2_1建筑信息新增", notes = "no_2_1建筑信息新增", response = Synthesize_no_2_1.class)
83 public RestResponse<Boolean> no2_1Save(Synthesize_no_2_1 synthesize_no_2_1) { 102 public RestResponse<Boolean> no2_1Save(Synthesize_no_2_1 synthesize_no_2_1) {
84 - return RestResponse.success(synthesize_no_2_1Service.save(synthesize_no_2_1)); 103 + return RestResponse.success(synthesize_no_2_1Service.saveOrUpdate(synthesize_no_2_1));
85 } 104 }
86 105
87 @GetMapping("no_2_1/type") 106 @GetMapping("no_2_1/type")
@@ -99,4 +118,67 @@ public class ProjectController { @@ -99,4 +118,67 @@ public class ProjectController {
99 return RestResponse.success(sorts); 118 return RestResponse.success(sorts);
100 } 119 }
101 120
  121 + @PostMapping("no_2_2")
  122 + @ApiOperation(value = "no_2_2历史用能新增", notes = "no_2_2历史用能新增", response = Synthesize_no_2_2.class)
  123 + public RestResponse<Boolean> no2_2Save(Synthesize_no_2_2 synthesize_no_2_2) {
  124 + return RestResponse.success(synthesize_no_2_2Service.saveOrUpdate(synthesize_no_2_2));
  125 + }
  126 +
  127 + @PostMapping("no_2_3")
  128 + @ApiOperation(value = "no_2_3能源设备新增", notes = "no_2_3能源设备新增", response = Synthesize_no_2_3.class)
  129 + public RestResponse<Boolean> no2_3Save(Synthesize_no_2_3 synthesize_no_2_3) {
  130 + return RestResponse.success(synthesize_no_2_3Service.saveOrUpdate(synthesize_no_2_3));
  131 + }
  132 +
  133 + @PostMapping("no_2_4")
  134 + @ApiOperation(value = "no_2_4建设条件新增", notes = "no_2_4建设条件新增", response = Synthesize_no_2_4.class)
  135 + public RestResponse<Boolean> no2_4Save(Synthesize_no_2_4 synthesize_no_2_4) {
  136 + return RestResponse.success(synthesize_no_2_4Service.saveOrUpdate(synthesize_no_2_4));
  137 + }
  138 +
  139 + @PostMapping("no_2_5")
  140 + @ApiOperation(value = "no_2_5经济参数新增", notes = "no_2_5经济参数新增", response = Synthesize_no_2_5.class)
  141 + public RestResponse<Boolean> no2_5Save(Synthesize_no_2_5 synthesize_no_2_5) {
  142 + /**
  143 + * 在新增之前需要复制一张参数修正表
  144 + */
  145 + Synthesize_no_2_6 synthesize_no_2_6 = synthesize_no_2_6Service.getById(synthesize_no_2_5.getId());
  146 + if (org.springframework.util.StringUtils.isEmpty(synthesize_no_2_6)){
  147 + /**
  148 + * 复制一份
  149 + */
  150 + Synthesize_no_2_6 byId = synthesize_no_2_6Service.getById("1");
  151 + byId.setId(synthesize_no_2_5.getId());
  152 + synthesize_no_2_6Service.save(byId);
  153 + }
  154 + return RestResponse.success(synthesize_no_2_5Service.saveOrUpdate(synthesize_no_2_5));
  155 + }
  156 +
  157 + @GetMapping("no_2_6/{id}")
  158 + @ApiOperation(value = "no_2_6参数修正查询", notes = "no_2_1参数修正查询")
  159 + @ApiImplicitParams({
  160 + @ApiImplicitParam(name = "id", required = true, value = "no_1项目信息保存返回的ID", dataType = "String"),
  161 + })
  162 + public RestResponse<List<ComputeArg>> no2_6getType(@PathVariable("id") String id) {
  163 + return RestResponse.success(synthesize_no_2_6Service.no2_6getType(id));
  164 + }
  165 +
  166 + @PostMapping("no_2_6")
  167 + @ApiOperation(value = "no_2_6参数修正修改", notes = "no_2_1参数修正修改 传ID ")
  168 + public RestResponse<Boolean> no2_6SetType(Synthesize_no_2_6 synthesize_no_2_6) {
  169 + return RestResponse.success(synthesize_no_2_6Service.updateById(synthesize_no_2_6));
  170 + }
  171 +
  172 + @GetMapping("no_2_6/reset/{id}")
  173 + @ApiOperation(value = "no_2_6参数修正 重置", notes = "no_2_1参数修正 重置")
  174 + @ApiImplicitParams({
  175 + @ApiImplicitParam(name = "id", required = true, value = "no_1项目信息保存返回的ID", dataType = "String"),
  176 + })
  177 + public RestResponse<Boolean> no2_6ResetType(@PathVariable("id") String id) {
  178 + Synthesize_no_2_6 byId = synthesize_no_2_6Service.getById("1");
  179 + byId.setId(id);
  180 + return RestResponse.success(synthesize_no_2_6Service.updateById(byId));
  181 + }
  182 +
  183 +
102 } 184 }
  1 +package com.synthesize_energy.item.web.service;
  2 +
  3 +import com.baomidou.mybatisplus.extension.service.IService;
  4 +import com.synthesize_energy.item.entity.Synthesize_no_2_2;
  5 +
  6 +/**
  7 + * @author kgy
  8 + * @version 1.0
  9 + * @date 2020/5/23 8:45
  10 + */
  11 +public interface Synthesize_no_2_2Service extends IService<Synthesize_no_2_2> {
  12 +}
  1 +package com.synthesize_energy.item.web.service;
  2 +
  3 +import com.baomidou.mybatisplus.extension.service.IService;
  4 +import com.synthesize_energy.item.entity.Synthesize_no_2_3;
  5 +
  6 +/**
  7 + * @author kgy
  8 + * @version 1.0
  9 + * @date 2020/5/23 9:18
  10 + */
  11 +public interface Synthesize_no_2_3Service extends IService<Synthesize_no_2_3> {
  12 +}
  1 +package com.synthesize_energy.item.web.service;
  2 +
  3 +import com.baomidou.mybatisplus.extension.service.IService;
  4 +import com.synthesize_energy.item.entity.Synthesize_no_2_4;
  5 +
  6 +/**
  7 + * @author kgy
  8 + * @version 1.0
  9 + * @date 2020/5/23 9:27
  10 + */
  11 +public interface Synthesize_no_2_4Service extends IService<Synthesize_no_2_4> {
  12 +}
  1 +package com.synthesize_energy.item.web.service;
  2 +
  3 +import com.baomidou.mybatisplus.extension.service.IService;
  4 +import com.synthesize_energy.item.entity.Synthesize_no_2_5;
  5 +
  6 +/**
  7 + * @author kgy
  8 + * @version 1.0
  9 + * @date 2020/5/23 9:39
  10 + */
  11 +public interface Synthesize_no_2_5Service extends IService<Synthesize_no_2_5> {
  12 +}
  1 +package com.synthesize_energy.item.web.service;
  2 +
  3 +import com.baomidou.mybatisplus.extension.service.IService;
  4 +import com.synthesize_energy.item.entity.ComputeArg;
  5 +import com.synthesize_energy.item.entity.Synthesize_no_2_6;
  6 +
  7 +import java.util.List;
  8 +
  9 +/**
  10 + * @author kgy
  11 + * @version 1.0
  12 + * @date 2020/5/23 11:55
  13 + */
  14 +public interface Synthesize_no_2_6Service extends IService<Synthesize_no_2_6> {
  15 + List<ComputeArg> no2_6getType(String id);
  16 +}
  1 +package com.synthesize_energy.item.web.service.impl;
  2 +
  3 +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  4 +import com.synthesize_energy.item.entity.Synthesize_no_2_2;
  5 +import com.synthesize_energy.item.mapper.Synthesize_no_2_2Mapper;
  6 +import com.synthesize_energy.item.web.service.Synthesize_no_2_2Service;
  7 +import org.springframework.stereotype.Service;
  8 +import org.springframework.transaction.annotation.Transactional;
  9 +
  10 +/**
  11 + * @author kgy
  12 + * @version 1.0
  13 + * @date 2020/5/23 8:45
  14 + */
  15 +@Service
  16 +@Transactional
  17 +public class Synthesize_no_2_2ServiceImpl extends ServiceImpl<Synthesize_no_2_2Mapper, Synthesize_no_2_2> implements Synthesize_no_2_2Service {
  18 +}
  1 +package com.synthesize_energy.item.web.service.impl;
  2 +
  3 +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  4 +import com.synthesize_energy.item.entity.Synthesize_no_2_3;
  5 +import com.synthesize_energy.item.mapper.Synthesize_no_2_3Mapper;
  6 +import com.synthesize_energy.item.web.service.Synthesize_no_2_3Service;
  7 +import org.springframework.stereotype.Service;
  8 +import org.springframework.transaction.annotation.Transactional;
  9 +
  10 +/**
  11 + * @author kgy
  12 + * @version 1.0
  13 + * @date 2020/5/23 9:18
  14 + */
  15 +@Service
  16 +@Transactional
  17 +public class Synthesize_no_2_3ServiceImpl extends ServiceImpl<Synthesize_no_2_3Mapper, Synthesize_no_2_3> implements Synthesize_no_2_3Service {
  18 +}
  1 +package com.synthesize_energy.item.web.service.impl;
  2 +
  3 +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  4 +import com.synthesize_energy.item.entity.Synthesize_no_2_4;
  5 +import com.synthesize_energy.item.mapper.Synthesize_no_2_4Mapper;
  6 +import com.synthesize_energy.item.web.service.Synthesize_no_2_4Service;
  7 +import org.springframework.stereotype.Service;
  8 +import org.springframework.transaction.annotation.Transactional;
  9 +
  10 +/**
  11 + * @author kgy
  12 + * @version 1.0
  13 + * @date 2020/5/23 9:27
  14 + */
  15 +@Service
  16 +@Transactional
  17 +public class Synthesize_no_2_4ServiceImpl extends ServiceImpl<Synthesize_no_2_4Mapper, Synthesize_no_2_4> implements Synthesize_no_2_4Service {
  18 +}
  1 +package com.synthesize_energy.item.web.service.impl;
  2 +
  3 +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  4 +import com.synthesize_energy.item.entity.Synthesize_no_2_5;
  5 +import com.synthesize_energy.item.mapper.Synthesize_no_2_5Mapper;
  6 +import com.synthesize_energy.item.web.service.Synthesize_no_2_5Service;
  7 +import org.springframework.stereotype.Service;
  8 +import org.springframework.transaction.annotation.Transactional;
  9 +
  10 +/**
  11 + * @author kgy
  12 + * @version 1.0
  13 + * @date 2020/5/23 9:39
  14 + */
  15 +@Service
  16 +@Transactional
  17 +public class Synthesize_no_2_5ServiceImpl extends ServiceImpl<Synthesize_no_2_5Mapper, Synthesize_no_2_5> implements Synthesize_no_2_5Service {
  18 +}
  1 +package com.synthesize_energy.item.web.service.impl;
  2 +
  3 +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
  4 +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  5 +import com.synthesize_energy.item.dto.ComputeArg2Dto;
  6 +import com.synthesize_energy.item.dto.ComputeArgDto;
  7 +import com.synthesize_energy.item.entity.ComputeArg;
  8 +import com.synthesize_energy.item.entity.Synthesize_no_2_6;
  9 +import com.synthesize_energy.item.mapper.ComputeArgMapper;
  10 +import com.synthesize_energy.item.mapper.Synthesize_no_2_6Mapper;
  11 +import com.synthesize_energy.item.web.service.Synthesize_no_2_6Service;
  12 +import org.springframework.beans.factory.annotation.Autowired;
  13 +import org.springframework.stereotype.Service;
  14 +import org.springframework.transaction.annotation.Transactional;
  15 +
  16 +import java.util.ArrayList;
  17 +import java.util.List;
  18 +import java.util.Map;
  19 +
  20 +/**
  21 + * @author kgy
  22 + * @version 1.0
  23 + * @date 2020/5/23 11:56
  24 + */
  25 +@Transactional
  26 +@Service
  27 +public class Synthesize_no_2_6ServiceImpl extends ServiceImpl<Synthesize_no_2_6Mapper, Synthesize_no_2_6> implements Synthesize_no_2_6Service {
  28 +
  29 + @Autowired
  30 + private ComputeArgMapper computeArgMapper;
  31 + @Autowired
  32 + private Synthesize_no_2_6Service synthesize_no_2_6Service;
  33 + @Override
  34 + public List<ComputeArg> no2_6getType(String id) {
  35 + QueryWrapper<ComputeArg> objectQueryWrapper = new QueryWrapper<>();
  36 + objectQueryWrapper.lambda().eq(ComputeArg::getPid, 0);
  37 + List<ComputeArg> computeArgs = computeArgMapper.selectList(objectQueryWrapper);
  38 + Synthesize_no_2_6 synthesize_no_2_6 = synthesize_no_2_6Service.getById(id);
  39 + Map<String, ComputeArg2Dto> map = null;
  40 + ComputeArg2Dto computeArg2Dto = null;
  41 + List<ComputeArg2Dto> computeArg2DtoList = null;
  42 + for (ComputeArg computeArg : computeArgs) {
  43 + QueryWrapper<ComputeArg> queryWrapper = new QueryWrapper<>();
  44 + queryWrapper.lambda().eq(ComputeArg::getPid, computeArg.getId());
  45 + List<ComputeArg> computeArgs1 = computeArgMapper.selectList(queryWrapper);
  46 + computeArg2DtoList = new ArrayList<>();
  47 + for (ComputeArg arg : computeArgs1) {
  48 + List<ComputeArgDto> computeArgDtos = new ArrayList<>();
  49 +
  50 + QueryWrapper<ComputeArg> queryWrapper1 = new QueryWrapper<>();
  51 + queryWrapper1.lambda().eq(ComputeArg::getPid, arg.getId());
  52 + List<ComputeArg> computeArgs2 = computeArgMapper.selectList(queryWrapper1);
  53 +
  54 + for (ComputeArg computeArg1 : computeArgs2) {
  55 +
  56 + ComputeArgDto computeArgDto = new ComputeArgDto();
  57 + computeArgDto.setNamType(computeArg1.getName());
  58 + switch (computeArg1.getId()) {
  59 + case 16:
  60 + computeArgDto.setId(computeArg1.getId());
  61 + computeArgDto.setModelType(synthesize_no_2_6.getNo16());
  62 + computeArgDto.setName("W/m2");
  63 + break;
  64 + case 17:
  65 + computeArgDto.setId(computeArg1.getId());
  66 + computeArgDto.setModelType(synthesize_no_2_6.getNo17());
  67 + computeArgDto.setName("元/W");
  68 + break;
  69 + case 18:
  70 + computeArgDto.setId(computeArg1.getId());
  71 + computeArgDto.setModelType(synthesize_no_2_6.getNo18());
  72 + computeArgDto.setName("元/W");
  73 + break;
  74 + case 19:
  75 + computeArgDto.setId(computeArg1.getId());
  76 + computeArgDto.setModelType(synthesize_no_2_6.getNo19());
  77 + computeArgDto.setName("元/Wh");
  78 + break;
  79 + case 20:
  80 + computeArgDto.setId(computeArg1.getId());
  81 + computeArgDto.setModelType(synthesize_no_2_6.getNo20());
  82 + computeArgDto.setName("元/Wh");
  83 + break;
  84 + case 21:
  85 + computeArgDto.setId(computeArg1.getId());
  86 + computeArgDto.setModelType(synthesize_no_2_6.getNo21());
  87 + computeArgDto.setName("元/W");
  88 + break;
  89 + case 22:
  90 + computeArgDto.setId(computeArg1.getId());
  91 + computeArgDto.setModelType(synthesize_no_2_6.getNo22());
  92 + computeArgDto.setName("元/W");
  93 + break;
  94 + case 23:
  95 + computeArgDto.setId(computeArg1.getId());
  96 + computeArgDto.setModelType(synthesize_no_2_6.getNo23());
  97 + computeArgDto.setName("");
  98 + break;
  99 + case 24:
  100 + computeArgDto.setId(computeArg1.getId());
  101 + computeArgDto.setModelType(synthesize_no_2_6.getNo24());
  102 + computeArgDto.setName("元/kW");
  103 + break;
  104 + case 25:
  105 + computeArgDto.setId(computeArg1.getId());
  106 + computeArgDto.setModelType(synthesize_no_2_6.getNo25());
  107 + computeArgDto.setName("元/kW");
  108 + break;
  109 + case 26:
  110 + computeArgDto.setId(computeArg1.getId());
  111 + computeArgDto.setModelType(synthesize_no_2_6.getNo26());
  112 + computeArgDto.setName("");
  113 + break;
  114 + case 27:
  115 + computeArgDto.setId(computeArg1.getId());
  116 + computeArgDto.setModelType(synthesize_no_2_6.getNo27());
  117 + computeArgDto.setName("元/kW");
  118 + break;
  119 + case 28:
  120 + computeArgDto.setId(computeArg1.getId());
  121 + computeArgDto.setModelType(synthesize_no_2_6.getNo28());
  122 + computeArgDto.setName("元/kW");
  123 + break;
  124 + case 29:
  125 + computeArgDto.setId(computeArg1.getId());
  126 + computeArgDto.setModelType(synthesize_no_2_6.getNo29());
  127 + computeArgDto.setName("");
  128 + break;
  129 + case 30:
  130 + computeArgDto.setId(computeArg1.getId());
  131 + computeArgDto.setModelType(synthesize_no_2_6.getNo30());
  132 + computeArgDto.setName("");
  133 + break;
  134 + case 31:
  135 + computeArgDto.setId(computeArg1.getId());
  136 + computeArgDto.setModelType(synthesize_no_2_6.getNo31());
  137 + computeArgDto.setName("");
  138 + break;
  139 + case 32:
  140 + computeArgDto.setId(computeArg1.getId());
  141 + computeArgDto.setModelType(synthesize_no_2_6.getNo32());
  142 + computeArgDto.setName("元/kW");
  143 + break;
  144 + case 33:
  145 + computeArgDto.setId(computeArg1.getId());
  146 + computeArgDto.setModelType(synthesize_no_2_6.getNo33());
  147 + computeArgDto.setName("元/kW");
  148 + break;
  149 + case 34:
  150 + computeArgDto.setId(computeArg1.getId());
  151 + computeArgDto.setModelType(synthesize_no_2_6.getNo34());
  152 + computeArgDto.setName("");
  153 + break;
  154 + case 35:
  155 + computeArgDto.setId(computeArg1.getId());
  156 + computeArgDto.setModelType(synthesize_no_2_6.getNo35());
  157 + computeArgDto.setName("");
  158 + break;
  159 + case 36:
  160 + computeArgDto.setId(computeArg1.getId());
  161 + computeArgDto.setModelType(synthesize_no_2_6.getNo36());
  162 + computeArgDto.setName("元/kW");
  163 + break;
  164 + case 37:
  165 + computeArgDto.setId(computeArg1.getId());
  166 + computeArgDto.setModelType(synthesize_no_2_6.getNo37());
  167 + computeArgDto.setName("元/kW");
  168 + break;
  169 + case 38:
  170 + computeArgDto.setId(computeArg1.getId());
  171 + computeArgDto.setModelType(synthesize_no_2_6.getNo38());
  172 + computeArgDto.setName("");
  173 + break;
  174 + case 39:
  175 + computeArgDto.setId(computeArg1.getId());
  176 + computeArgDto.setModelType(synthesize_no_2_6.getNo39());
  177 + computeArgDto.setName("元/kW");
  178 + break;
  179 + case 40:
  180 + computeArgDto.setId(computeArg1.getId());
  181 + computeArgDto.setModelType(synthesize_no_2_6.getNo40());
  182 + computeArgDto.setName("元/kW");
  183 + break;
  184 + case 41:
  185 + computeArgDto.setId(computeArg1.getId());
  186 + computeArgDto.setModelType(synthesize_no_2_6.getNo41());
  187 + computeArgDto.setName("");
  188 + break;
  189 + case 42:
  190 + computeArgDto.setId(computeArg1.getId());
  191 + computeArgDto.setModelType(synthesize_no_2_6.getNo42());
  192 + computeArgDto.setName("");
  193 + break;
  194 + case 43:
  195 + computeArgDto.setId(computeArg1.getId());
  196 + computeArgDto.setModelType(synthesize_no_2_6.getNo43());
  197 + computeArgDto.setName("元/kW");
  198 + break;
  199 + case 44:
  200 + computeArgDto.setId(computeArg1.getId());
  201 + computeArgDto.setModelType(synthesize_no_2_6.getNo44());
  202 + computeArgDto.setName("元/kW");
  203 + break;
  204 + case 45:
  205 + computeArgDto.setId(computeArg1.getId());
  206 + computeArgDto.setModelType(synthesize_no_2_6.getNo45());
  207 + computeArgDto.setName("");
  208 + break;
  209 + case 46:
  210 + computeArgDto.setId(computeArg1.getId());
  211 + computeArgDto.setModelType(synthesize_no_2_6.getNo46());
  212 + computeArgDto.setName("");
  213 + break;
  214 + case 47:
  215 + computeArgDto.setId(computeArg1.getId());
  216 + computeArgDto.setModelType(synthesize_no_2_6.getNo47());
  217 + computeArgDto.setName("℃");
  218 + break;
  219 + case 48:
  220 + computeArgDto.setId(computeArg1.getId());
  221 + computeArgDto.setModelType(synthesize_no_2_6.getNo48());
  222 + computeArgDto.setName("");
  223 + break;
  224 + case 49:
  225 + computeArgDto.setId(computeArg1.getId());
  226 + computeArgDto.setModelType(synthesize_no_2_6.getNo49());
  227 + computeArgDto.setName("");
  228 + break;
  229 + case 50:
  230 + computeArgDto.setId(computeArg1.getId());
  231 + computeArgDto.setModelType(synthesize_no_2_6.getNo50());
  232 + computeArgDto.setName("");
  233 + break;
  234 + case 51:
  235 + computeArgDto.setId(computeArg1.getId());
  236 + computeArgDto.setModelType(synthesize_no_2_6.getNo51());
  237 + computeArgDto.setName("");
  238 + break;
  239 + case 52:
  240 + computeArgDto.setId(computeArg1.getId());
  241 + computeArgDto.setModelType(synthesize_no_2_6.getNo52());
  242 + computeArgDto.setName("h");
  243 + break;
  244 + case 53:
  245 + computeArgDto.setId(computeArg1.getId());
  246 + computeArgDto.setModelType(synthesize_no_2_6.getNo53());
  247 + computeArgDto.setName("元/吨");
  248 + break;
  249 + case 54:
  250 + computeArgDto.setId(computeArg1.getId());
  251 + computeArgDto.setModelType(synthesize_no_2_6.getNo54());
  252 + computeArgDto.setName("元/吨");
  253 + break;
  254 + case 55:
  255 + computeArgDto.setId(computeArg1.getId());
  256 + computeArgDto.setModelType(synthesize_no_2_6.getNo55());
  257 + computeArgDto.setName("元/kW");
  258 + break;
  259 + case 56:
  260 + computeArgDto.setId(computeArg1.getId());
  261 + computeArgDto.setModelType(synthesize_no_2_6.getNo56());
  262 + computeArgDto.setName("元/kW");
  263 + break;
  264 + case 57:
  265 + computeArgDto.setId(computeArg1.getId());
  266 + computeArgDto.setModelType(synthesize_no_2_6.getNo57());
  267 + computeArgDto.setName("元/kW");
  268 + break;
  269 + case 58:
  270 + computeArgDto.setId(computeArg1.getId());
  271 + computeArgDto.setModelType(synthesize_no_2_6.getNo58());
  272 + computeArgDto.setName("元/kW");
  273 + break;
  274 + case 59:
  275 + computeArgDto.setId(computeArg1.getId());
  276 + computeArgDto.setModelType(synthesize_no_2_6.getNo59());
  277 + computeArgDto.setName("元/kW");
  278 + break;
  279 + case 60:
  280 + computeArgDto.setId(computeArg1.getId());
  281 + computeArgDto.setModelType(synthesize_no_2_6.getNo60());
  282 + computeArgDto.setName("元/kW");
  283 + break;
  284 + default:
  285 + break;
  286 + }
  287 + computeArgDtos.add(computeArgDto);
  288 + }
  289 + computeArg2Dto = new ComputeArg2Dto();
  290 + computeArg2Dto.setName(arg.getName());
  291 + computeArg2Dto.setList(computeArgDtos);
  292 +
  293 + computeArg2DtoList.add(computeArg2Dto);
  294 + }
  295 + computeArg.setMap(computeArg2DtoList);
  296 + }
  297 + return computeArgs;
  298 + }
  299 +}