liaoyitao преди 4 месеца
родител
ревизия
07488e205f
променени са 23 файла, в които са добавени 700 реда и са изтрити 36 реда
  1. 27 0
      src/main/java/com/lqkj/common/utils/TokenUtils.java
  2. 1 1
      src/main/java/com/lqkj/common/utils/file/MimeTypeUtils.java
  3. 3 3
      src/main/java/com/lqkj/common/utils/http/HttpUtils.java
  4. 112 0
      src/main/java/com/lqkj/info/controller/ModelInfoController.java
  5. 92 0
      src/main/java/com/lqkj/info/entity/ModelInfo.java
  6. 32 20
      src/main/java/com/lqkj/info/entity/OrganizationInfo.java
  7. 63 0
      src/main/java/com/lqkj/info/mapper/ModelInfoMapper.java
  8. 2 0
      src/main/java/com/lqkj/info/service/AreaInfoService.java
  9. 91 0
      src/main/java/com/lqkj/info/service/ModelInfoService.java
  10. 33 0
      src/main/java/com/lqkj/ioc/controller/EconomicDevelopmentController.java
  11. 32 0
      src/main/java/com/lqkj/ioc/controller/SupportResourcesController.java
  12. 3 3
      src/main/java/com/lqkj/view/controller/SynthesisAnalyzeController.java
  13. 13 0
      src/main/java/com/lqkj/ioc/controller/TrafficSystemController.java
  14. 1 1
      src/main/java/com/lqkj/view/entity/SynthesisAnalyze.java
  15. 20 0
      src/main/java/com/lqkj/ioc/mapper/EconomicDevelopmentMapper.java
  16. 25 0
      src/main/java/com/lqkj/ioc/mapper/SupportResourcesMapper.java
  17. 2 2
      src/main/java/com/lqkj/view/mapper/SynthesisAnalyzeMapper.java
  18. 29 0
      src/main/java/com/lqkj/ioc/service/EconomicDevelopmentService.java
  19. 38 0
      src/main/java/com/lqkj/ioc/service/SupportResourcesServer.java
  20. 4 4
      src/main/java/com/lqkj/view/service/SynthesisAnalyzeService.java
  21. 71 0
      src/main/resources/mapper/info/ModelInfoMapper.xml
  22. 5 1
      src/main/resources/mapper/info/OrganizationInfoMapper.xml
  23. 1 1
      src/main/resources/mapper/view/SynthesisAnalyzeMapper.xml

+ 27 - 0
src/main/java/com/lqkj/common/utils/TokenUtils.java

@@ -0,0 +1,27 @@
1
+package com.lqkj.common.utils;
2
+
3
+import com.alibaba.fastjson.JSON;
4
+import com.alibaba.fastjson.JSONObject;
5
+import com.lqkj.common.core.redis.RedisCache;
6
+import com.lqkj.common.utils.http.HttpUtils;
7
+import com.lqkj.common.utils.spring.SpringUtils;
8
+import org.springframework.beans.factory.annotation.Autowired;
9
+
10
+import java.util.Objects;
11
+import java.util.concurrent.TimeUnit;
12
+
13
+public class TokenUtils {
14
+
15
+    private static final String TOKENKEY = "https://wunlzt.cdwh.gov.cn";
16
+
17
+    public static String getToken() {
18
+        if (Objects.isNull(SpringUtils.getBean(RedisCache.class).getCacheObject(TOKENKEY))){
19
+            String response = HttpUtils.sendGet("https://wunlzt.cdwh.gov.cn/apis/daas/token?appID=819ee3726ceff963a5f6877de2d92c00&appSecret=4fd078c9fef8ee0f1311e2d1661619c5", "");
20
+            JSONObject jsonObject = JSON.parseObject(response);
21
+            if (!"200".equals(JSON.parseObject(jsonObject.getString("meta")).getString("status_code"))) return null;
22
+            String token = JSON.parseObject(jsonObject.getString("data")).getString("token");
23
+            SpringUtils.getBean(RedisCache.class).setCacheObject(TOKENKEY, token, 20, TimeUnit.MINUTES);
24
+        }
25
+        return SpringUtils.getBean(RedisCache.class).getCacheObject(TOKENKEY);
26
+    }
27
+}

+ 1 - 1
src/main/java/com/lqkj/common/utils/file/MimeTypeUtils.java

@@ -34,7 +34,7 @@ public class MimeTypeUtils
34 34
             // 压缩文件
35 35
             "rar", "zip", "gz", "bz2",
36 36
             // 视频格式
37
-            "mp4", "avi", "rmvb",
37
+            "mp4", "avi", "rmvb", "fbx",
38 38
             // pdf
39 39
             "pdf" };
40 40
 

+ 3 - 3
src/main/java/com/lqkj/common/utils/http/HttpUtils.java

@@ -64,7 +64,7 @@ public class HttpUtils
64 64
             connection.setRequestProperty("connection", "Keep-Alive");
65 65
             connection.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
66 66
             if (StringUtils.isNotEmpty(token)){
67
-                connection.setRequestProperty("Authorization", token);
67
+                connection.setRequestProperty("token", token);
68 68
             }
69 69
             connection.connect();
70 70
             in = new BufferedReader(new InputStreamReader(connection.getInputStream(), contentType));
@@ -136,7 +136,7 @@ public class HttpUtils
136 136
             conn.setRequestProperty("Accept-Charset", "utf-8");
137 137
             conn.setRequestProperty("contentType", "utf-8");
138 138
             if (StringUtils.isNotEmpty(token)){
139
-                conn.setRequestProperty("Authorization", token);
139
+                conn.setRequestProperty("token", token);
140 140
             }
141 141
             conn.setDoOutput(true);
142 142
             conn.setDoInput(true);
@@ -203,7 +203,7 @@ public class HttpUtils
203 203
             HttpsURLConnection conn = (HttpsURLConnection) console.openConnection();
204 204
             conn.setRequestProperty("accept", "*/*");
205 205
             if (StringUtils.isNotEmpty(token)){
206
-                conn.setRequestProperty("Authorization", token);
206
+                conn.setRequestProperty("token", token);
207 207
             }
208 208
             conn.setRequestProperty("connection", "Keep-Alive");
209 209
             conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");

+ 112 - 0
src/main/java/com/lqkj/info/controller/ModelInfoController.java

@@ -0,0 +1,112 @@
1
+package com.lqkj.info.controller;
2
+
3
+import java.util.List;
4
+import org.springframework.security.access.prepost.PreAuthorize;
5
+import org.springframework.beans.factory.annotation.Autowired;
6
+import org.springframework.web.bind.annotation.GetMapping;
7
+import org.springframework.web.bind.annotation.PostMapping;
8
+import org.springframework.web.bind.annotation.PutMapping;
9
+import org.springframework.web.bind.annotation.DeleteMapping;
10
+import org.springframework.web.bind.annotation.PathVariable;
11
+import org.springframework.web.bind.annotation.RequestBody;
12
+import org.springframework.web.bind.annotation.RequestMapping;
13
+import org.springframework.web.bind.annotation.RestController;
14
+import com.lqkj.common.annotation.Log;
15
+import com.lqkj.common.core.controller.BaseController;
16
+import com.lqkj.common.core.model.ResultUtil;
17
+import com.lqkj.common.enums.BusinessType;
18
+import io.swagger.annotations.Api;
19
+import io.swagger.annotations.ApiOperation;
20
+import com.lqkj.info.entity.ModelInfo;
21
+import com.lqkj.info.service.ModelInfoService;
22
+import com.lqkj.common.utils.poi.ExcelUtil;
23
+import com.github.pagehelper.PageInfo;
24
+
25
+/**
26
+ * 模型信息Controller
27
+ * 
28
+ * @author lqkj
29
+ * @date 2024-11-23
30
+ */
31
+@Api(tags = {"模型信息"})
32
+@RestController
33
+@RequestMapping("/info/modelInfo")
34
+public class ModelInfoController extends BaseController
35
+{
36
+    @Autowired
37
+    private ModelInfoService modelInfoService;
38
+
39
+    /**
40
+     * 查询模型信息列表
41
+     */
42
+    @ApiOperation("查询模型信息列表")
43
+    @PreAuthorize("@ss.hasPermi('info:modelInfo:list')")
44
+    @GetMapping("/list")
45
+    public ResultUtil list(ModelInfo modelInfo)
46
+    {
47
+        startPage( modelInfo);
48
+        PageInfo<ModelInfo> pageInfo = new PageInfo<>(modelInfoService.selectModelInfoList(modelInfo));
49
+        return ResultUtil.success(pageInfo);
50
+    }
51
+
52
+    /**
53
+     * 导出模型信息列表
54
+     */
55
+    @ApiOperation("导出模型信息列表")
56
+    @PreAuthorize("@ss.hasPermi('info:modelInfo:export')")
57
+    @Log(title = "模型信息", businessType = BusinessType.EXPORT)
58
+    @GetMapping("/export")
59
+    public ResultUtil export(ModelInfo modelInfo)
60
+    {
61
+        List<ModelInfo> list = modelInfoService.selectModelInfoList(modelInfo);
62
+        ExcelUtil<ModelInfo> util = new ExcelUtil<ModelInfo>(ModelInfo.class);
63
+        return util.exportExcel(list, "模型信息数据");
64
+    }
65
+
66
+    /**
67
+     * 获取模型信息详细信息
68
+     */
69
+    @ApiOperation("获取模型信息详细信息")
70
+    @PreAuthorize("@ss.hasPermi('info:modelInfo:query')")
71
+    @GetMapping(value = "/{modelId}")
72
+    public ResultUtil getInfo(@PathVariable("modelId") Integer modelId)
73
+    {
74
+        return ResultUtil.success(modelInfoService.selectModelInfoByModelId(modelId));
75
+    }
76
+
77
+    /**
78
+     * 新增模型信息
79
+     */
80
+    @ApiOperation("新增模型信息")
81
+    @PreAuthorize("@ss.hasPermi('info:modelInfo:add')")
82
+    @Log(title = "模型信息", businessType = BusinessType.INSERT)
83
+    @PostMapping
84
+    public ResultUtil add(@RequestBody ModelInfo modelInfo)
85
+    {
86
+        return resultByRows(modelInfoService.insertModelInfo(modelInfo));
87
+    }
88
+
89
+    /**
90
+     * 修改模型信息
91
+     */
92
+    @ApiOperation("修改模型信息")
93
+    @PreAuthorize("@ss.hasPermi('info:modelInfo:edit')")
94
+    @Log(title = "模型信息", businessType = BusinessType.UPDATE)
95
+    @PutMapping
96
+    public ResultUtil edit(@RequestBody ModelInfo modelInfo)
97
+    {
98
+        return resultByRows(modelInfoService.updateModelInfo(modelInfo));
99
+    }
100
+
101
+    /**
102
+     * 删除模型信息
103
+     */
104
+    @ApiOperation("删除模型信息")
105
+    @PreAuthorize("@ss.hasPermi('info:modelInfo:remove')")
106
+    @Log(title = "模型信息", businessType = BusinessType.DELETE)
107
+	@DeleteMapping("/{modelIds}")
108
+    public ResultUtil remove(@PathVariable Integer[] modelIds)
109
+    {
110
+        return resultByRows(modelInfoService.deleteModelInfoByModelIds(modelIds));
111
+    }
112
+}

+ 92 - 0
src/main/java/com/lqkj/info/entity/ModelInfo.java

@@ -0,0 +1,92 @@
1
+package com.lqkj.info.entity;
2
+
3
+import org.apache.commons.lang3.builder.ToStringBuilder;
4
+import org.apache.commons.lang3.builder.ToStringStyle;
5
+import com.lqkj.common.annotation.Excel;
6
+import com.lqkj.common.core.model.BaseEntity;
7
+
8
+/**
9
+ * 模型信息对象 model_info
10
+ * 
11
+ * @author lqkj
12
+ * @date 2024-11-23
13
+ */
14
+public class ModelInfo extends BaseEntity
15
+{
16
+    private static final long serialVersionUID = 1L;
17
+
18
+    /** 模型ID */
19
+    private Integer modelId;
20
+
21
+    /** 模型名称 */
22
+    @Excel(name = "模型名称")
23
+    private String modelName;
24
+
25
+    /** 原始模型文件地址 */
26
+    private String originalPath;
27
+
28
+    /** 模型图标文件地址 */
29
+    @Excel(name = "模型图标文件地址")
30
+    private String modelIcon;
31
+
32
+    /** 方案id */
33
+    @Excel(name = "方案id")
34
+    private Integer planId;
35
+
36
+    public void setModelId(Integer modelId) 
37
+    {
38
+        this.modelId = modelId;
39
+    }
40
+
41
+    public Integer getModelId() 
42
+    {
43
+        return modelId;
44
+    }
45
+    public void setModelName(String modelName) 
46
+    {
47
+        this.modelName = modelName;
48
+    }
49
+
50
+    public String getModelName() 
51
+    {
52
+        return modelName;
53
+    }
54
+    public void setOriginalPath(String originalPath) 
55
+    {
56
+        this.originalPath = originalPath;
57
+    }
58
+
59
+    public String getOriginalPath() 
60
+    {
61
+        return originalPath;
62
+    }
63
+    public void setModelIcon(String modelIcon) 
64
+    {
65
+        this.modelIcon = modelIcon;
66
+    }
67
+
68
+    public String getModelIcon() 
69
+    {
70
+        return modelIcon;
71
+    }
72
+    public void setPlanId(Integer planId) 
73
+    {
74
+        this.planId = planId;
75
+    }
76
+
77
+    public Integer getPlanId() 
78
+    {
79
+        return planId;
80
+    }
81
+
82
+    @Override
83
+    public String toString() {
84
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
85
+            .append("modelId", getModelId())
86
+            .append("modelName", getModelName())
87
+            .append("originalPath", getOriginalPath())
88
+            .append("modelIcon", getModelIcon())
89
+            .append("planId", getPlanId())
90
+            .toString();
91
+    }
92
+}

+ 32 - 20
src/main/java/com/lqkj/info/entity/OrganizationInfo.java

@@ -76,7 +76,18 @@ public class OrganizationInfo extends BaseEntity
76 76
     /** 员工人数 */
77 77
     private Integer employeNum;
78 78
 
79
-    public void setOrganizationId(Integer organizationId) 
79
+    /** 宣传视频 */
80
+    private String audio;
81
+
82
+    public String getAudio() {
83
+        return audio;
84
+    }
85
+
86
+    public void setAudio(String audio) {
87
+        this.audio = audio;
88
+    }
89
+
90
+    public void setOrganizationId(Integer organizationId)
80 91
     {
81 92
         this.organizationId = organizationId;
82 93
     }
@@ -232,24 +243,25 @@ public class OrganizationInfo extends BaseEntity
232 243
 
233 244
     @Override
234 245
     public String toString() {
235
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
236
-            .append("organizationId", getOrganizationId())
237
-            .append("typeId", getTypeId())
238
-            .append("roomId", getRoomId())
239
-            .append("buildingId", getBuildingId())
240
-            .append("areaId", getAreaId())
241
-            .append("organizationName", getOrganizationName())
242
-            .append("intro", getIntro())
243
-            .append("lngLat", getLngLat())
244
-            .append("rasterLngLat", getRasterLngLat())
245
-            .append("important", getImportant())
246
-            .append("typeName", getTypeName())
247
-            .append("address", getAddress())
248
-            .append("logo", getLogo())
249
-            .append("telephone", getTelephone())
250
-            .append("product", getProduct())
251
-            .append("enterTime", getEnterTime())
252
-            .append("employeNum", getEmployeNum())
253
-            .toString();
246
+        return "OrganizationInfo{" +
247
+                "organizationId=" + organizationId +
248
+                ", typeId=" + typeId +
249
+                ", roomId=" + roomId +
250
+                ", buildingId=" + buildingId +
251
+                ", areaId=" + areaId +
252
+                ", organizationName='" + organizationName + '\'' +
253
+                ", intro='" + intro + '\'' +
254
+                ", lngLat='" + lngLat + '\'' +
255
+                ", rasterLngLat='" + rasterLngLat + '\'' +
256
+                ", important=" + important +
257
+                ", typeName='" + typeName + '\'' +
258
+                ", address='" + address + '\'' +
259
+                ", logo='" + logo + '\'' +
260
+                ", telephone='" + telephone + '\'' +
261
+                ", product='" + product + '\'' +
262
+                ", enterTime=" + enterTime +
263
+                ", employeNum=" + employeNum +
264
+                ", audio='" + audio + '\'' +
265
+                '}';
254 266
     }
255 267
 }

+ 63 - 0
src/main/java/com/lqkj/info/mapper/ModelInfoMapper.java

@@ -0,0 +1,63 @@
1
+package com.lqkj.info.mapper;
2
+
3
+import java.util.List;
4
+import org.apache.ibatis.annotations.Mapper;
5
+import com.lqkj.info.entity.ModelInfo;
6
+
7
+/**
8
+ * 模型信息Mapper接口
9
+ * 
10
+ * @author lqkj
11
+ * @date 2024-11-23
12
+ */
13
+@Mapper
14
+public interface ModelInfoMapper 
15
+{
16
+    /**
17
+     * 查询模型信息
18
+     * 
19
+     * @param modelId 模型信息主键
20
+     * @return 模型信息
21
+     */
22
+    public ModelInfo selectModelInfoByModelId(Integer modelId);
23
+
24
+    /**
25
+     * 查询模型信息列表
26
+     * 
27
+     * @param modelInfo 模型信息
28
+     * @return 模型信息集合
29
+     */
30
+    public List<ModelInfo> selectModelInfoList(ModelInfo modelInfo);
31
+
32
+    /**
33
+     * 新增模型信息
34
+     * 
35
+     * @param modelInfo 模型信息
36
+     * @return 结果
37
+     */
38
+    public int insertModelInfo(ModelInfo modelInfo);
39
+
40
+    /**
41
+     * 修改模型信息
42
+     * 
43
+     * @param modelInfo 模型信息
44
+     * @return 结果
45
+     */
46
+    public int updateModelInfo(ModelInfo modelInfo);
47
+
48
+    /**
49
+     * 删除模型信息
50
+     * 
51
+     * @param modelId 模型信息主键
52
+     * @return 结果
53
+     */
54
+    public int deleteModelInfoByModelId(Integer modelId);
55
+
56
+    /**
57
+     * 批量删除模型信息
58
+     * 
59
+     * @param modelIds 需要删除的数据主键集合
60
+     * @return 结果
61
+     */
62
+    public int deleteModelInfoByModelIds(Integer[] modelIds);
63
+}

+ 2 - 0
src/main/java/com/lqkj/info/service/AreaInfoService.java

@@ -61,6 +61,7 @@ public class AreaInfoService
61 61
     public int insertAreaInfo(AreaInfo areaInfo)
62 62
     {
63 63
         areaInfo.setLocation(StringEscapeUtils.unescapeHtml(areaInfo.getLocation().toString()));
64
+        areaInfo.setMemo(StringEscapeUtils.unescapeHtml(areaInfo.getMemo()));
64 65
         return areaInfoMapper.insertAreaInfo(areaInfo);
65 66
     }
66 67
 
@@ -74,6 +75,7 @@ public class AreaInfoService
74 75
     public int updateAreaInfo(AreaInfo areaInfo)
75 76
     {
76 77
         areaInfo.setLocation(StringEscapeUtils.unescapeHtml(areaInfo.getLocation().toString()));
78
+        areaInfo.setMemo(StringEscapeUtils.unescapeHtml(areaInfo.getMemo()));
77 79
         return areaInfoMapper.updateAreaInfo(areaInfo);
78 80
     }
79 81
 

+ 91 - 0
src/main/java/com/lqkj/info/service/ModelInfoService.java

@@ -0,0 +1,91 @@
1
+package com.lqkj.info.service;
2
+
3
+import java.util.List;
4
+import org.springframework.beans.factory.annotation.Autowired;
5
+import org.springframework.stereotype.Service;
6
+import com.lqkj.info.mapper.ModelInfoMapper;
7
+import com.lqkj.info.entity.ModelInfo;
8
+import com.lqkj.common.utils.uuid.IdUtils;
9
+/**
10
+ * 模型信息Service业务层处理
11
+ * 
12
+ * @author lqkj
13
+ * @date 2024-11-23
14
+ */
15
+@Service
16
+public class ModelInfoService
17
+{
18
+    @Autowired
19
+    private ModelInfoMapper modelInfoMapper;
20
+
21
+    /**
22
+     * 查询模型信息
23
+     * 
24
+     * @param modelId 模型信息主键
25
+     * @return 模型信息
26
+     */
27
+    
28
+    public ModelInfo selectModelInfoByModelId(Integer modelId)
29
+    {
30
+        return modelInfoMapper.selectModelInfoByModelId(modelId);
31
+    }
32
+
33
+    /**
34
+     * 查询模型信息列表
35
+     * 
36
+     * @param modelInfo 模型信息
37
+     * @return 模型信息
38
+     */
39
+    public List<ModelInfo> selectModelInfoList(ModelInfo modelInfo)
40
+    {
41
+        return modelInfoMapper.selectModelInfoList(modelInfo);
42
+    }
43
+
44
+    /**
45
+     * 新增模型信息
46
+     * 
47
+     * @param modelInfo 模型信息
48
+     * @return 结果
49
+     */
50
+    
51
+    public int insertModelInfo(ModelInfo modelInfo)
52
+    {
53
+        return modelInfoMapper.insertModelInfo(modelInfo);
54
+    }
55
+
56
+    /**
57
+     * 修改模型信息
58
+     * 
59
+     * @param modelInfo 模型信息
60
+     * @return 结果
61
+     */
62
+    
63
+    public int updateModelInfo(ModelInfo modelInfo)
64
+    {
65
+        return modelInfoMapper.updateModelInfo(modelInfo);
66
+    }
67
+
68
+    /**
69
+     * 批量删除模型信息
70
+     * 
71
+     * @param modelIds 需要删除的模型信息主键
72
+     * @return 结果
73
+     */
74
+    
75
+    public int deleteModelInfoByModelIds(Integer[] modelIds)
76
+    {
77
+        return modelInfoMapper.deleteModelInfoByModelIds(modelIds);
78
+    }
79
+
80
+    /**
81
+     * 删除模型信息信息
82
+     * 
83
+     * @param modelId 模型信息主键
84
+     * @return 结果
85
+     */
86
+    
87
+    public int deleteModelInfoByModelId(Integer modelId)
88
+    {
89
+        return modelInfoMapper.deleteModelInfoByModelId(modelId);
90
+    }
91
+}

+ 33 - 0
src/main/java/com/lqkj/ioc/controller/EconomicDevelopmentController.java

@@ -0,0 +1,33 @@
1
+package com.lqkj.ioc.controller;
2
+
3
+import com.lqkj.common.core.controller.BaseController;
4
+import com.lqkj.common.core.model.ResultUtil;
5
+import com.lqkj.ioc.service.EconomicDevelopmentService;
6
+import io.swagger.annotations.Api;
7
+import io.swagger.annotations.ApiOperation;
8
+import org.springframework.beans.factory.annotation.Autowired;
9
+import org.springframework.web.bind.annotation.GetMapping;
10
+import org.springframework.web.bind.annotation.RequestMapping;
11
+import org.springframework.web.bind.annotation.RestController;
12
+
13
+
14
+@Api(tags = {"城市推荐-经济发展"})
15
+@RestController
16
+@RequestMapping("/ioc/cityRecommendation/economicDevelopment")
17
+public class EconomicDevelopmentController extends BaseController {
18
+
19
+    @Autowired
20
+    private EconomicDevelopmentService economicDevelopmentService;
21
+
22
+    @ApiOperation("城市推荐-经济发展-商业配套")
23
+    @GetMapping("/businessSupport")
24
+    public ResultUtil businessSupport(){
25
+        return ResultUtil.success(economicDevelopmentService.businessSupport());
26
+    }
27
+
28
+    @ApiOperation("城市推荐-经济发展-近年GDP")
29
+    @GetMapping("/gdp")
30
+    public ResultUtil gdp(){
31
+        return ResultUtil.success(economicDevelopmentService.gdp());
32
+    }
33
+}

+ 32 - 0
src/main/java/com/lqkj/ioc/controller/SupportResourcesController.java

@@ -0,0 +1,32 @@
1
+package com.lqkj.ioc.controller;
2
+
3
+
4
+import com.lqkj.common.core.model.ResultUtil;
5
+import com.lqkj.ioc.service.SupportResourcesServer;
6
+import io.swagger.annotations.Api;
7
+import io.swagger.annotations.ApiOperation;
8
+import org.springframework.beans.factory.annotation.Autowired;
9
+import org.springframework.web.bind.annotation.GetMapping;
10
+import org.springframework.web.bind.annotation.RequestMapping;
11
+import org.springframework.web.bind.annotation.RestController;
12
+
13
+@Api(tags = {"配套资源"})
14
+@RestController
15
+@RequestMapping("/ioc/SupportResources")
16
+public class SupportResourcesController {
17
+
18
+    @Autowired
19
+    private SupportResourcesServer supportResourcesServer;
20
+
21
+    @ApiOperation("配套资源-交通服务")
22
+    @GetMapping("/transport")
23
+    public ResultUtil transport(){
24
+        return ResultUtil.success(supportResourcesServer.transport());
25
+    }
26
+
27
+    @ApiOperation("配套资源-便民服务")
28
+    @GetMapping("/convenient")
29
+    public ResultUtil convenient(){
30
+        return ResultUtil.success(supportResourcesServer.convenient());
31
+    }
32
+}

+ 3 - 3
src/main/java/com/lqkj/view/controller/SynthesisAnalyzeController.java

@@ -1,4 +1,4 @@
1
-package com.lqkj.view.controller;
1
+package com.lqkj.ioc.controller;
2 2
 
3 3
 import java.util.List;
4 4
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -17,8 +17,8 @@ import com.lqkj.common.core.model.ResultUtil;
17 17
 import com.lqkj.common.enums.BusinessType;
18 18
 import io.swagger.annotations.Api;
19 19
 import io.swagger.annotations.ApiOperation;
20
-import com.lqkj.view.entity.SynthesisAnalyze;
21
-import com.lqkj.view.service.SynthesisAnalyzeService;
20
+import com.lqkj.ioc.entity.SynthesisAnalyze;
21
+import com.lqkj.ioc.service.SynthesisAnalyzeService;
22 22
 import com.lqkj.common.utils.poi.ExcelUtil;
23 23
 import com.github.pagehelper.PageInfo;
24 24
 

+ 13 - 0
src/main/java/com/lqkj/ioc/controller/TrafficSystemController.java

@@ -0,0 +1,13 @@
1
+package com.lqkj.ioc.controller;
2
+
3
+
4
+import io.swagger.annotations.Api;
5
+import org.springframework.web.bind.annotation.RequestMapping;
6
+import org.springframework.web.bind.annotation.RestController;
7
+
8
+@Api(tags = {"交通系统"})
9
+@RestController
10
+@RequestMapping("/ioc/trafficSystem")
11
+public class TrafficSystemController {
12
+
13
+}

+ 1 - 1
src/main/java/com/lqkj/view/entity/SynthesisAnalyze.java

@@ -1,4 +1,4 @@
1
-package com.lqkj.view.entity;
1
+package com.lqkj.ioc.entity;
2 2
 
3 3
 import org.apache.commons.lang3.builder.ToStringBuilder;
4 4
 import org.apache.commons.lang3.builder.ToStringStyle;

+ 20 - 0
src/main/java/com/lqkj/ioc/mapper/EconomicDevelopmentMapper.java

@@ -0,0 +1,20 @@
1
+package com.lqkj.ioc.mapper;
2
+
3
+
4
+import org.apache.ibatis.annotations.Mapper;
5
+import org.apache.ibatis.annotations.Select;
6
+
7
+import java.util.Map;
8
+
9
+/**
10
+ *
11
+ */
12
+@Mapper
13
+public interface EconomicDevelopmentMapper {
14
+
15
+    @Select("WITH t1 AS ( SELECT SUM( acreage ) AS total_acreage FROM area_info )," +
16
+            "t2 AS ( SELECT SUM( employe_num ) AS total_employees, COUNT( 1 ) AS org_count FROM organization_info ) " +
17
+            "SELECT t1.total_acreage, t2.total_employees, t2.org_count FROM t1, t2;"
18
+    )
19
+    Map<String, Object> businessSupport();
20
+}

+ 25 - 0
src/main/java/com/lqkj/ioc/mapper/SupportResourcesMapper.java

@@ -0,0 +1,25 @@
1
+package com.lqkj.ioc.mapper;
2
+
3
+
4
+import org.apache.ibatis.annotations.Mapper;
5
+import org.apache.ibatis.annotations.Select;
6
+
7
+import java.util.List;
8
+import java.util.Map;
9
+
10
+@Mapper
11
+public interface SupportResourcesMapper {
12
+
13
+    @Select("SELECT count(si.traffic_id), tt.type_name  FROM traffic_type tt " +
14
+            "LEFT JOIN traffic_info ti on tt.type_id  = ti.type_id " +
15
+            "LEFT JOIN station_info si ON ti.traffic_id = si.traffic_id " +
16
+            "GROUP BY tt.type_id "
17
+    )
18
+    List<Map<String, Object>> transport();
19
+
20
+    @Select("SELECT ot.type_name, count(oi.organization_id) FROM organization_type ot " +
21
+            "LEFT JOIN organization_info oi on ot.type_id = oi.type_id " +
22
+            "GROUP BY ot.type_id "
23
+    )
24
+    List<Map<String, Object>> convenient();
25
+}

+ 2 - 2
src/main/java/com/lqkj/view/mapper/SynthesisAnalyzeMapper.java

@@ -1,8 +1,8 @@
1
-package com.lqkj.view.mapper;
1
+package com.lqkj.ioc.mapper;
2 2
 
3 3
 import java.util.List;
4 4
 import org.apache.ibatis.annotations.Mapper;
5
-import com.lqkj.view.entity.SynthesisAnalyze;
5
+import com.lqkj.ioc.entity.SynthesisAnalyze;
6 6
 
7 7
 /**
8 8
  * 综合分析Mapper接口

+ 29 - 0
src/main/java/com/lqkj/ioc/service/EconomicDevelopmentService.java

@@ -0,0 +1,29 @@
1
+package com.lqkj.ioc.service;
2
+
3
+import com.alibaba.fastjson.JSON;
4
+import com.alibaba.fastjson.JSONArray;
5
+import com.lqkj.common.utils.TokenUtils;
6
+import com.lqkj.common.utils.http.HttpUtils;
7
+import com.lqkj.ioc.mapper.EconomicDevelopmentMapper;
8
+import org.springframework.beans.factory.annotation.Autowired;
9
+import org.springframework.stereotype.Service;
10
+
11
+import java.util.Map;
12
+
13
+@Service
14
+public class EconomicDevelopmentService {
15
+
16
+    @Autowired
17
+    private EconomicDevelopmentMapper economicDevelopmentMapper;
18
+    public Map<String, Object> businessSupport(){
19
+        Map<String, Object> stringObjectMap = economicDevelopmentMapper.businessSupport();
20
+        stringObjectMap.put("turnover", 1034);
21
+        return stringObjectMap;
22
+    };
23
+
24
+    public JSONArray gdp() {
25
+        String s = HttpUtils.sendGetByToken("https://wunlzt.cdwh.gov.cn/apis/daas/pro/3/components/y106-01/data", null, TokenUtils.getToken());
26
+        JSONArray data = JSON.parseArray(JSON.parseObject(s).get("data").toString());
27
+        return data;
28
+    }
29
+}

+ 38 - 0
src/main/java/com/lqkj/ioc/service/SupportResourcesServer.java

@@ -0,0 +1,38 @@
1
+package com.lqkj.ioc.service;
2
+
3
+
4
+import com.lqkj.ioc.mapper.SupportResourcesMapper;
5
+import org.springframework.beans.factory.annotation.Autowired;
6
+import org.springframework.stereotype.Service;
7
+
8
+import java.util.HashMap;
9
+import java.util.List;
10
+import java.util.Map;
11
+
12
+@Service
13
+public class SupportResourcesServer {
14
+
15
+    @Autowired
16
+    private SupportResourcesMapper supportResourcesMapper;
17
+
18
+    public List transport() {
19
+        List<Map<String, Object>> transport = supportResourcesMapper.transport();
20
+        HashMap<String, Object> map1 = new HashMap<>();
21
+        map1.put("type_name", "停车场");
22
+        map1.put("count", 152);
23
+        HashMap<String, Object> map2 = new HashMap<>();
24
+        map2.put("type_name", "充电桩");
25
+        map2.put("count", 561);
26
+        HashMap<String, Object> map3 = new HashMap<>();
27
+        map3.put("type_name", "加油站");
28
+        map3.put("count", 323);
29
+        transport.add(map1);
30
+        transport.add(map2);
31
+        transport.add(map3);
32
+        return transport;
33
+    }
34
+
35
+    public List convenient() {
36
+        return supportResourcesMapper.convenient();
37
+    }
38
+}

+ 4 - 4
src/main/java/com/lqkj/view/service/SynthesisAnalyzeService.java

@@ -1,13 +1,13 @@
1
-package com.lqkj.view.service;
1
+package com.lqkj.ioc.service;
2 2
 
3 3
 import java.util.List;
4 4
 
5 5
 import org.apache.commons.lang.StringEscapeUtils;
6 6
 import org.springframework.beans.factory.annotation.Autowired;
7 7
 import org.springframework.stereotype.Service;
8
-import com.lqkj.view.mapper.SynthesisAnalyzeMapper;
9
-import com.lqkj.view.entity.SynthesisAnalyze;
10
-import com.lqkj.common.utils.uuid.IdUtils;
8
+import com.lqkj.ioc.mapper.SynthesisAnalyzeMapper;
9
+import com.lqkj.ioc.entity.SynthesisAnalyze;
10
+
11 11
 /**
12 12
  * 综合分析Service业务层处理
13 13
  *

+ 71 - 0
src/main/resources/mapper/info/ModelInfoMapper.xml

@@ -0,0 +1,71 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper
3
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5
+<mapper namespace="com.lqkj.info.mapper.ModelInfoMapper">
6
+
7
+    <resultMap type="ModelInfo" id="ModelInfoResult">
8
+        <result property="modelId"    column="model_id"    />
9
+        <result property="modelName"    column="model_name"    />
10
+        <result property="originalPath"    column="original_path"    />
11
+        <result property="modelIcon"    column="model_icon"    />
12
+        <result property="planId"    column="plan_id"    />
13
+    </resultMap>
14
+
15
+    <sql id="selectModelInfoVo">
16
+        select model_id, model_name, original_path, model_icon, plan_id from model_info
17
+    </sql>
18
+
19
+    <select id="selectModelInfoList" parameterType="ModelInfo" resultMap="ModelInfoResult">
20
+        <include refid="selectModelInfoVo"/>
21
+        <where>
22
+            <if test="modelName != null  and modelName != ''"> and model_name like concat('%', #{modelName}, '%')</if>
23
+            <if test="planId != null "> and plan_id = #{planId}</if>
24
+        </where>
25
+        order by model_id
26
+
27
+    </select>
28
+
29
+    <select id="selectModelInfoByModelId" parameterType="Integer" resultMap="ModelInfoResult">
30
+        <include refid="selectModelInfoVo"/>
31
+        where model_id = #{modelId}
32
+    </select>
33
+
34
+    <insert id="insertModelInfo" parameterType="ModelInfo" useGeneratedKeys="true" keyProperty="modelId">
35
+        insert into model_info
36
+        <trim prefix="(" suffix=")" suffixOverrides=",">
37
+            <if test="modelName != null and modelName != ''">model_name,</if>
38
+            <if test="originalPath != null and originalPath != ''">original_path,</if>
39
+            <if test="modelIcon != null and modelIcon != ''">model_icon,</if>
40
+            <if test="planId != null">plan_id,</if>
41
+         </trim>
42
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
43
+            <if test="modelName != null and modelName != ''">#{modelName},</if>
44
+            <if test="originalPath != null and originalPath != ''">#{originalPath},</if>
45
+            <if test="modelIcon != null and modelIcon != ''">#{modelIcon},</if>
46
+            <if test="planId != null">#{planId},</if>
47
+         </trim>
48
+    </insert>
49
+
50
+    <update id="updateModelInfo" parameterType="ModelInfo">
51
+        update model_info
52
+        <trim prefix="SET" suffixOverrides=",">
53
+            model_name = #{modelName},
54
+            original_path = #{originalPath},
55
+            model_icon = #{modelIcon},
56
+            plan_id = #{planId},
57
+        </trim>
58
+        where model_id = #{modelId}
59
+    </update>
60
+
61
+    <delete id="deleteModelInfoByModelId" parameterType="Integer">
62
+        delete from model_info where model_id = #{modelId}
63
+    </delete>
64
+
65
+    <delete id="deleteModelInfoByModelIds" parameterType="String">
66
+        delete from model_info where model_id in
67
+        <foreach item="modelId" collection="array" open="(" separator="," close=")">
68
+            #{modelId}
69
+        </foreach>
70
+    </delete>
71
+</mapper>

+ 5 - 1
src/main/resources/mapper/info/OrganizationInfoMapper.xml

@@ -22,10 +22,11 @@
22 22
 		<result property="product"    column="product"    />
23 23
 		<result property="enterTime"    column="enter_time"    />
24 24
 		<result property="employeNum"    column="employe_num"    />
25
+		<result property="audio"    column="audio"    />
25 26
 	</resultMap>
26 27
 
27 28
 	<sql id="selectOrganizationInfoVo">
28
-		select organization_id, type_id, room_id, building_id, area_id, organization_name, intro, lng_lat, raster_lng_lat, important, type_name, address, logo, telephone, product, enter_time, employe_num from organization_info
29
+		select organization_id, type_id, room_id, building_id, area_id, organization_name, intro, lng_lat, raster_lng_lat, important, type_name, address, logo, telephone, product, enter_time, employe_num, audio from organization_info
29 30
 	</sql>
30 31
 
31 32
 	<select id="selectOrganizationInfoList" parameterType="OrganizationInfo" resultMap="OrganizationInfoResult">
@@ -66,6 +67,7 @@
66 67
 			<if test="product != null and product != ''">product,</if>
67 68
 			<if test="enterTime != null">enter_time,</if>
68 69
 			<if test="employeNum != null">employe_num,</if>
70
+		    <if test="audio != null and audio != ''">logo,</if>
69 71
 		</trim>
70 72
 		<trim prefix="values (" suffix=")" suffixOverrides=",">
71 73
 			<if test="typeId != null">#{typeId},</if>
@@ -84,6 +86,7 @@
84 86
 			<if test="product != null and product != ''">#{product},</if>
85 87
 			<if test="enterTime != null">#{enterTime},</if>
86 88
 			<if test="employeNum != null">#{employeNum},</if>
89
+		    <if test="audio != null and audio != ''">#{logo},</if>
87 90
 		</trim>
88 91
 	</insert>
89 92
 
@@ -106,6 +109,7 @@
106 109
 			product = #{product},
107 110
 			enter_time = #{enterTime},
108 111
 			employe_num = #{employeNum},
112
+		    audio = #{audio},
109 113
 		</trim>
110 114
 		where organization_id = #{organizationId}
111 115
 	</update>

+ 1 - 1
src/main/resources/mapper/view/SynthesisAnalyzeMapper.xml

@@ -2,7 +2,7 @@
2 2
 <!DOCTYPE mapper
3 3
 		PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4 4
 		"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5
-<mapper namespace="com.lqkj.view.mapper.SynthesisAnalyzeMapper">
5
+<mapper namespace="com.lqkj.ioc.mapper.SynthesisAnalyzeMapper">
6 6
 
7 7
 	<resultMap type="SynthesisAnalyze" id="SynthesisAnalyzeResult">
8 8
 		<result property="id"    column="id"    />