Bläddra i källkod

单位管理添加字段

tangsong 3 månader sedan
förälder
incheckning
471a0dd747

+ 14 - 0
unis-plugin/unis-plugin-biz/src/main/java/com/unis/basic.info/modular/unitInfo/controller/UnitInfoController.java

@@ -15,6 +15,7 @@ package com.unis.basic.info.modular.unitInfo.controller;
15 15
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
16 16
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
17 17
 import com.github.xiaoymin.knife4j.annotations.ApiSupport;
18
+import com.unis.basic.info.modular.unitInfo.entity.CiytUnitInfo;
18 19
 import com.unis.basic.info.modular.unitInfo.param.*;
19 20
 import com.unis.basic.info.modular.unitInfo.vo.BasicEnumVo;
20 21
 import com.unis.basic.info.modular.unitInfo.vo.UnitInfoV;
@@ -181,4 +182,17 @@ public class UnitInfoController {
181 182
     public CommonResult<List<Map<String, String>>> getAreaByParentId(@PathVariable("parentId") String parentId) {
182 183
         return CommonResult.data(unitInfoService.getAreaByParentId(parentId));
183 184
     }
185
+
186
+    /**
187
+     * 获取企业信息分区统计
188
+     *
189
+     * @author TS
190
+     * @date 2024/07/29 09:58
191
+     */
192
+    @ApiOperationSupport(order = 8)
193
+    @ApiOperation("获取企业信息分区统计")
194
+    @GetMapping("/basic.info/unitInfo/getCityUnitInfo")
195
+    public CommonResult<List<CiytUnitInfo>> getCityUnitInfo() {
196
+        return CommonResult.data(unitInfoService.getCityUnitInfo());
197
+    }
184 198
 }

+ 40 - 0
unis-plugin/unis-plugin-biz/src/main/java/com/unis/basic.info/modular/unitInfo/entity/CiytUnitInfo.java

@@ -0,0 +1,40 @@
1
+/*
2
+ * Copyright [2022] [https://www.xiaonuo.vip]
3
+ *
4
+ * Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
5
+ *
6
+ * 1.请不要删除和修改根目录下的LICENSE文件。
7
+ * 2.请不要删除和修改Snowy源码头部的版权声明。
8
+ * 3.本项目代码可免费商业使用,商业使用请保留源码和相关描述文件的项目出处,作者声明等。
9
+ * 4.分发源码时候,请注明软件出处 https://www.xiaonuo.vip
10
+ * 5.不可二次分发开源参与同类竞品,如有想法可联系团队xiaonuobase@qq.com商议合作。
11
+ * 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
12
+ */
13
+package com.unis.basic.info.modular.unitInfo.entity;
14
+
15
+import io.swagger.annotations.ApiModelProperty;
16
+import lombok.Getter;
17
+import lombok.Setter;
18
+
19
+/**
20
+ * 分地区统计VO
21
+ *
22
+ * @author TS
23
+ * @date  2024/07/29 09:08
24
+ **/
25
+@Getter
26
+@Setter
27
+public class CiytUnitInfo {
28
+
29
+    @ApiModelProperty(value = "市区id", position = 1)
30
+    private String cityId;
31
+
32
+
33
+    @ApiModelProperty(value = "市区名称", position = 2)
34
+    private String cityName;
35
+
36
+    @ApiModelProperty(value = "企业数量", position = 3)
37
+    private Integer unitCount;
38
+
39
+
40
+}

+ 13 - 1
unis-plugin/unis-plugin-biz/src/main/java/com/unis/basic.info/modular/unitInfo/entity/UnitInfo.java

@@ -16,6 +16,8 @@ import com.baomidou.mybatisplus.annotation.*;
16 16
 import io.swagger.annotations.ApiModelProperty;
17 17
 import lombok.Getter;
18 18
 import lombok.Setter;
19
+import org.checkerframework.checker.units.qual.C;
20
+
19 21
 import java.math.BigDecimal;
20 22
 import java.util.Date;
21 23
 
@@ -161,6 +163,7 @@ public class UnitInfo {
161 163
     @ApiModelProperty(value = "纬度,以度数(十进制)表示", position = 31)
162 164
     private BigDecimal wd;
163 165
 
166
+
164 167
     /** 单位状态,1:正常,2:退出储备粮承储 */
165 168
     @ApiModelProperty(value = "单位状态,1:正常,2:退出储备粮承储", position = 32)
166 169
     private Integer dwzt;
@@ -185,4 +188,13 @@ public class UnitInfo {
185 188
     @ApiModelProperty(value = "注册地址-区", position = 37)
186 189
     private String zcdzArea;
187 190
 
188
-}
191
+    /** 电子扫描件*/
192
+    @ApiModelProperty(value = "电子扫描件", position = 38)
193
+    private String electronicScan;
194
+
195
+    /** 总仓容 */
196
+    @ApiModelProperty(value = "总仓容", position = 39)
197
+    private BigDecimal totalWarehouseCapacity;
198
+
199
+
200
+}

+ 3 - 0
unis-plugin/unis-plugin-biz/src/main/java/com/unis/basic.info/modular/unitInfo/mapper/UnitInfoMapper.java

@@ -18,6 +18,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
18 18
 import com.baomidou.mybatisplus.core.toolkit.Constants;
19 19
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
20 20
 import com.unis.basic.info.modular.grainPriceCollectCitySum.entity.GrainPriceCollectCitySum;
21
+import com.unis.basic.info.modular.unitInfo.entity.CiytUnitInfo;
21 22
 import com.unis.basic.info.modular.unitInfo.entity.UnitInfo;
22 23
 import com.unis.basic.info.modular.unitInfo.vo.UnitInfoVO;
23 24
 import org.apache.ibatis.annotations.Mapper;
@@ -43,4 +44,6 @@ public interface UnitInfoMapper extends BaseMapper<UnitInfo> {
43 44
                                   @Param("fddbr") String fddbr);
44 45
 
45 46
     Map<String, Object> getDwGjjDate(String id);
47
+
48
+    List<CiytUnitInfo> getCityUnitInfo();
46 49
 }

+ 16 - 2
unis-plugin/unis-plugin-biz/src/main/java/com/unis/basic.info/modular/unitInfo/mapper/mapping/UnitInfoMapper.xml

@@ -18,7 +18,7 @@
18 18
     </select>
19 19
 
20 20
 
21
-    <select id="selectMyPage" resultType="com.unis.basic.info.modular.unitInfo.vo.UnitInfoVO">
21
+    <!--<select id="selectMyPage" resultType="com.unis.basic.info.modular.unitInfo.vo.UnitInfoVO">
22 22
         select t1.*, t2.DICT_LABEL dictLabel
23 23
         from biz_unit_info t1
24 24
         left join dev_dict t2 on t1.dwlx = t2.id
@@ -34,7 +34,7 @@
34 34
 
35 35
         order by t1.create_time desc
36 36
 
37
-    </select>
37
+    </select>-->
38 38
 
39 39
     <select id="getDwGjjDate" parameterType="java.lang.String" resultType="java.util.Map">
40 40
         SELECT
@@ -81,4 +81,18 @@
81 81
             biz_unit_info
82 82
         where id = #{id}
83 83
     </select>
84
+    <select id="getCityUnitInfo" resultType="com.unis.basic.info.modular.unitInfo.entity.CiytUnitInfo">
85
+      SELECT
86
+        d.ID AS cityId,
87
+        d.DICT_LABEL AS cityName,
88
+        count(c.dwdm) unitCount
89
+    FROM
90
+        province_all.dev_dict d
91
+    LEFT JOIN province_all.biz_unit_info c ON d.ID = c.zcdz_city
92
+    WHERE
93
+        d.PARENT_ID = '1781535965870915586'
94
+    GROUP BY
95
+        d.ID,
96
+        d.DICT_LABEL
97
+    </select>
84 98
 </mapper>

+ 8 - 0
unis-plugin/unis-plugin-biz/src/main/java/com/unis/basic.info/modular/unitInfo/param/UnitInfoAddParam.java

@@ -237,4 +237,12 @@ public class UnitInfoAddParam {
237 237
     /** 注册地址-区  进行三级联查*/
238 238
     @ApiModelProperty(value = "注册地址-区", position = 37)
239 239
     private String zcdzArea;
240
+
241
+    /** 电子扫描件*/
242
+    @ApiModelProperty(value = "电子扫描件", position = 38)
243
+    private String electronicScan;
244
+
245
+    /** 总仓容 */
246
+    @ApiModelProperty(value = "总仓容", position = 39)
247
+    private BigDecimal totalWarehouseCapacity;
240 248
 }

+ 7 - 0
unis-plugin/unis-plugin-biz/src/main/java/com/unis/basic.info/modular/unitInfo/param/UnitInfoEditParam.java

@@ -245,5 +245,12 @@ public class UnitInfoEditParam {
245 245
     @ApiModelProperty(value = "注册地址-区", position = 37)
246 246
     private String zcdzArea;
247 247
 
248
+    /** 电子扫描件*/
249
+    @ApiModelProperty(value = "电子扫描件", position = 38)
250
+    private String electronicScan;
251
+
252
+    /** 总仓容 */
253
+    @ApiModelProperty(value = "总仓容", position = 39)
254
+    private BigDecimal totalWarehouseCapacity;
248 255
 
249 256
 }

+ 7 - 0
unis-plugin/unis-plugin-biz/src/main/java/com/unis/basic.info/modular/unitInfo/service/UnitInfoService.java

@@ -17,6 +17,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
17 17
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
18 18
 import com.baomidou.mybatisplus.extension.service.IService;
19 19
 import com.unis.basic.info.modular.unitInfo.entity.BasicEnum;
20
+import com.unis.basic.info.modular.unitInfo.entity.CiytUnitInfo;
20 21
 import com.unis.basic.info.modular.unitInfo.entity.UnitInfo;
21 22
 import com.unis.basic.info.modular.unitInfo.param.UnitInfoAddParam;
22 23
 import com.unis.basic.info.modular.unitInfo.param.UnitInfoEditParam;
@@ -103,4 +104,10 @@ public interface UnitInfoService extends IService<UnitInfo> {
103 104
     public List<UnitInfoVO> TreeList();
104 105
 
105 106
     List<Map<String, String>> getAreaByParentId(String parentId);
107
+
108
+    /**
109
+     * 获取企业信息分区统计
110
+     * @return
111
+     */
112
+    List<CiytUnitInfo> getCityUnitInfo();
106 113
 }

+ 11 - 0
unis-plugin/unis-plugin-biz/src/main/java/com/unis/basic.info/modular/unitInfo/service/impl/UnitInfoServiceImpl.java

@@ -24,6 +24,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
24 24
 import com.unis.basic.info.modular.mq.dto.jkEnum;
25 25
 import com.unis.basic.info.modular.mq.pub.RecPublishService;
26 26
 import com.unis.basic.info.modular.unitInfo.entity.BasicEnum;
27
+import com.unis.basic.info.modular.unitInfo.entity.CiytUnitInfo;
27 28
 import com.unis.basic.info.modular.unitInfo.mapper.EnumMapper;
28 29
 import com.unis.basic.info.modular.unitInfo.vo.BasicEnumVo;
29 30
 import com.unis.basic.info.modular.unitInfo.vo.UnitInfoV;
@@ -399,6 +400,16 @@ public class UnitInfoServiceImpl extends ServiceImpl<UnitInfoMapper, UnitInfo> i
399 400
         return enumMapper.getAreaByParentId(parentId);
400 401
     }
401 402
 
403
+    /**
404
+     * 获取企业信息分区统计
405
+     *
406
+     * @return
407
+     */
408
+    @Override
409
+    public List<CiytUnitInfo> getCityUnitInfo() {
410
+        return unitInfoMapper.getCityUnitInfo();
411
+    }
412
+
402 413
 
403 414
     /**
404 415
      * 国家局数据