ZeroLiYi 1 anno fa
parent
commit
780bb0fb9d

+ 0 - 8
src/main/java/com/chinaitop/depot/sqr/controller/BizSqrEnterpriseController.java

@@ -56,15 +56,7 @@ public class BizSqrEnterpriseController {
56 56
      */
57 57
     @ApiOperation("下拉获取粮承储资格企业")
58 58
     @GetMapping("/TreeList")
59
-    @ApiImplicitParams({
60
-            @ApiImplicitParam(name = "pageNum", value = "页码", paramType = "query"),
61
-            @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "query"),
62
-            @ApiImplicitParam(name = "dwdm", value = "单位代码", paramType = "query"),
63
-            @ApiImplicitParam(name = "applyType", value = "申请类型", paramType = "query")
64
-
65
-    })
66 59
     public List<BizSqrEnterprise> TreeList() {
67
-
68 60
         List<BizSqrEnterprise> list = bizSqrEnterpriseService.TreeList();
69 61
         return list;
70 62
     }

+ 62 - 11
src/main/java/com/chinaitop/depot/sqr/mapper/BizSqrEnterpriseMapper.xml

@@ -1,6 +1,39 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 3
 <mapper namespace="com.chinaitop.depot.sqr.mapper.BizSqrEnterpriseMapper">
4
+    <resultMap id="BaseResultMap" type="com.chinaitop.depot.sqr.model.vo.BizSqrEnterpriseVO" >
5
+        <id column="id" property="id" jdbcType="VARCHAR" />
6
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
7
+        <result column="create_user" property="createUser" jdbcType="VARCHAR" />
8
+        <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
9
+        <result column="update_user" property="updateUser" jdbcType="VARCHAR" />
10
+
11
+        <result column="attachment" property="attachment" jdbcType="VARCHAR" />
12
+        <result column="unitInfoId" property="unitInfoId" jdbcType="VARCHAR" />
13
+
14
+        <result column="storage_expire_time" property="storageExpireTime" jdbcType="TIMESTAMP" />
15
+        <result column="full_time_staff_count" property="fullTimeStaffCount" jdbcType="INTEGER" />
16
+        <result column="certified_storekeeper_count" property="certifiedStorekeeperCount" jdbcType="INTEGER" />
17
+        <result column="certified_inspector_count" property="certifiedInspectorCount" jdbcType="INTEGER" />
18
+        <result column="warehouse_facility_situation" property="warehouseFacilitySituation" jdbcType="VARCHAR" />
19
+
20
+        <result column="status" property="status" jdbcType="INTEGER" />
21
+
22
+        <result column="dwmc" property="dwmc" jdbcType="VARCHAR" />
23
+        <result column="dwdm" property="dwdm" jdbcType="VARCHAR" />
24
+        <result column="fddbr" property="fddbr" jdbcType="VARCHAR" />
25
+        <result column="dwlx" property="dwlx" jdbcType="VARCHAR" />
26
+        <result column="zcdz" property="zcdz" jdbcType="VARCHAR" />
27
+        <result column="cfs" property="cfs" jdbcType="VARCHAR" />
28
+        <result column="ygs" property="ygs" jdbcType="INTEGER" />
29
+        <result column="DICT_LABEL" property="dictLabel" jdbcType="VARCHAR" />
30
+    </resultMap>
31
+
32
+
33
+
34
+
35
+
36
+
4 37
 
5 38
     <insert id="insert" keyProperty="id" useGeneratedKeys="true"  parameterType="com.chinaitop.depot.sqr.model.BizSqrEnterprise">
6 39
         insert into province_all.biz_sqr_enterprise(id,unit_info_id,full_time_staff_count,
@@ -30,17 +63,35 @@
30 63
         DELETE FROM province_all.biz_sqr_enterprise WHERE id = #{id,jdbcType=VARCHAR}
31 64
     </delete>
32 65
 
33
-    <select id="TreeList"  >
34
-        SELECT
35
-        bgqa.id,bui.id unitInfoId, bui.dwmc,bui.dwdm,bui.fddbr,bui.dwlx,bgqa.apply_status,bgqa.apply_type,bgq.audit_status
36
-        FROM
37
-        province_all.biz_sqr_enterprise_apply bgqa
38
-        LEFT JOIN province_all.biz_unit_info bui ON bgqa.unit_info_id = bui.id
39
-        LEFT JOIN province_all.biz_audit_request bgq ON bgqa.id = bgq.request_id
40
-        where bgqa.apply_type=#{applyType,jdbcType=INTEGER}
41
-        <if test="dwmc != null and dwmc != ''">
42
-            and bui.dwmc LIKE concat('%', #{dwmc}, '%')
43
-        </if>
66
+    <select id="TreeList"  resultMap="BaseResultMap">
67
+        SELECT A.dwmc,
68
+               A.id  unitInfoId,
69
+               A.dwdm,
70
+               A.fddbr,
71
+               A.dwlx,
72
+               A.zcdz,
73
+               A.cfs,
74
+               A.ygs,
75
+               A.DICT_LABEL,
76
+               bse.certified_storekeeper_count,
77
+               bse.certified_inspector_count,
78
+               bse.warehouse_facility_situation,
79
+               bse.full_time_staff_count,
80
+               bse.storage_expire_time,
81
+               bse.attachment attachment
82
+        FROM province_all.biz_sqr_enterprise bse
83
+                 LEFT JOIN (select bui.id,
84
+                             bui.dwmc,
85
+                             bui.dwdm,
86
+                             bui.fddbr,
87
+                             bui.dwlx,
88
+                             bui.zcdz,
89
+                             bui.cfs,
90
+                             bui.ygs,
91
+                             dict.DICT_LABEL
92
+                      from province_all.biz_unit_info bui
93
+                               left join province_all.dev_dict dict on bui.dwlx = dict.id
94
+        ) A ON bse.unit_info_id = A.id
44 95
 
45 96
     </select>
46 97
 

+ 121 - 0
src/main/java/com/chinaitop/depot/sqr/model/vo/BizSqrEnterpriseVO.java

@@ -0,0 +1,121 @@
1
+package com.chinaitop.depot.sqr.model.vo;
2
+
3
+import com.chinaitop.depot.sqr.model.BizSqrEnterprise;
4
+import com.chinaitop.depot.sqr.model.BizSqrEnterpriseApply;
5
+import io.swagger.annotations.ApiModelProperty;
6
+
7
+public class BizSqrEnterpriseVO extends BizSqrEnterprise {
8
+
9
+    private String dwmc;
10
+    private String dwdm;
11
+    private String fddbr;
12
+    private String dwlx;
13
+
14
+    private String zcdz;
15
+    public Integer cfs;
16
+    public Integer ygs;
17
+
18
+    private String dictLabel;
19
+
20
+
21
+    /** 仓房设施设备情况 */
22
+    @ApiModelProperty(value = "仓房设施设备情况", position = 11)
23
+    private String warehouseFacilitySituation;
24
+
25
+    /** 附件 */
26
+    @ApiModelProperty(value = "附件", position = 12)
27
+    private String attachment;
28
+
29
+    /** 状态 0:保存状态;1:申请中;2:有效;3:过期; */
30
+    @ApiModelProperty(value = "状态 0:保存状态;1:申请中;2:有效;3:过期;", position = 13)
31
+    private Integer status;
32
+
33
+    public String getDwmc() {
34
+        return dwmc;
35
+    }
36
+
37
+    public void setDwmc(String dwmc) {
38
+        this.dwmc = dwmc;
39
+    }
40
+
41
+    public String getDwdm() {
42
+        return dwdm;
43
+    }
44
+
45
+    public void setDwdm(String dwdm) {
46
+        this.dwdm = dwdm;
47
+    }
48
+
49
+    public String getFddbr() {
50
+        return fddbr;
51
+    }
52
+
53
+    public void setFddbr(String fddbr) {
54
+        this.fddbr = fddbr;
55
+    }
56
+
57
+    public String getDwlx() {
58
+        return dwlx;
59
+    }
60
+
61
+    public void setDwlx(String dwlx) {
62
+        this.dwlx = dwlx;
63
+    }
64
+
65
+    public String getWarehouseFacilitySituation() {
66
+        return warehouseFacilitySituation;
67
+    }
68
+
69
+    public void setWarehouseFacilitySituation(String warehouseFacilitySituation) {
70
+        this.warehouseFacilitySituation = warehouseFacilitySituation;
71
+    }
72
+
73
+    public String getAttachment() {
74
+        return attachment;
75
+    }
76
+
77
+    public void setAttachment(String attachment) {
78
+        this.attachment = attachment;
79
+    }
80
+
81
+    public Integer getStatus() {
82
+        return status;
83
+    }
84
+
85
+    public void setStatus(Integer status) {
86
+        this.status = status;
87
+    }
88
+
89
+    public String getZcdz() {
90
+        return zcdz;
91
+    }
92
+
93
+    public String getDictLabel() {
94
+        return dictLabel;
95
+    }
96
+
97
+    public void setDictLabel(String dictLabel) {
98
+        this.dictLabel = dictLabel;
99
+    }
100
+
101
+    public void setZcdz(String zcdz) {
102
+        this.zcdz = zcdz;
103
+    }
104
+
105
+    public Integer getCfs() {
106
+        return cfs;
107
+    }
108
+
109
+    public void setCfs(Integer cfs) {
110
+        this.cfs = cfs;
111
+    }
112
+
113
+    public Integer getYgs() {
114
+        return ygs;
115
+    }
116
+
117
+    public void setYgs(Integer ygs) {
118
+        this.ygs = ygs;
119
+    }
120
+
121
+}