ZeroLiYi 1 gadu atpakaļ
vecāks
revīzija
a5e5dba033

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

@@ -13,6 +13,7 @@
13 13
 package com.chinaitop.depot.sqr.controller;
14 14
 
15 15
 
16
+import com.chinaitop.depot.sqr.model.BizSqrEnterprise;
16 17
 import com.chinaitop.depot.sqr.model.BizSqrEnterpriseApply;
17 18
 import com.chinaitop.depot.sqr.service.BizSqrEnterpriseService;
18 19
 import com.github.pagehelper.PageHelper;
@@ -23,6 +24,7 @@ import io.swagger.annotations.ApiImplicitParams;
23 24
 import io.swagger.annotations.ApiOperation;
24 25
 import org.springframework.validation.annotation.Validated;
25 26
 import org.springframework.web.bind.annotation.GetMapping;
27
+import org.springframework.web.bind.annotation.RequestMapping;
26 28
 import org.springframework.web.bind.annotation.RestController;
27 29
 
28 30
 
@@ -35,6 +37,8 @@ import java.util.List;
35 37
  * @author ZeroLiYi
36 38
  * @date  2024/04/28 09:56
37 39
  */
40
+
41
+@RequestMapping(value="/sqrEnter")
38 42
 @Api(tags = "粮食储备-承储资格企业控制器")
39 43
 @RestController
40 44
 @Validated
@@ -50,24 +54,20 @@ public class BizSqrEnterpriseController {
50 54
      * @author ZeroLiYi
51 55
      * @date  2024/04/28 10:01
52 56
      */
53
-//    @ApiOperation("承储资格申请分页")
54
-//    @GetMapping("/page")
55
-//    @ApiImplicitParams({
56
-//            @ApiImplicitParam(name = "pageNum", value = "页码", paramType = "query"),
57
-//            @ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "query"),
58
-//            @ApiImplicitParam(name = "dwdm", value = "单位代码", paramType = "query"),
59
-//            @ApiImplicitParam(name = "applyType", value = "申请类型", paramType = "query")
60
-//
61
-//    })
62
-//    public PageInfo<BizSqrEnterpriseApply> page(Integer pageNum, Integer pageSize, String dwdm, Integer applyType) {
63
-//
64
-//        if (pageNum!=null && pageSize!=null) {
65
-//            PageHelper.startPage(pageNum, pageSize);
66
-//        }
67
-//        List<BizSqrEnterpriseApply> list = bizGrQeApplyService.findByPage(dwdm,applyType);
68
-//        PageInfo<BizSqrEnterpriseApply> pageInfo = new PageInfo<BizSqrEnterpriseApply>(list);
69
-//        return pageInfo;
70
-//    }
57
+    @ApiOperation("下拉获取粮承储资格企业")
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
+    public List<BizSqrEnterprise> TreeList() {
67
+
68
+        List<BizSqrEnterprise> list = bizSqrEnterpriseService.TreeList();
69
+        return list;
70
+    }
71 71
 
72 72
 
73 73
 

+ 2 - 2
src/main/java/com/chinaitop/depot/sqr/mapper/BizSqrEnterpriseApplyMapper.xml

@@ -11,7 +11,7 @@
11 11
     <result column="apply_type" property="applyType" jdbcType="INTEGER" />
12 12
     <result column="apply_status" property="applyStatus" jdbcType="INTEGER" />
13 13
     <result column="attachment" property="attachment" jdbcType="VARCHAR" />
14
-    <result column="unit_info_id" property="unitInfoId" jdbcType="VARCHAR" />
14
+    <result column="unitInfoId" property="unitInfoId" jdbcType="VARCHAR" />
15 15
 
16 16
     <result column="storage_expire_time" property="storageExpireTime" jdbcType="TIMESTAMP" />
17 17
     <result column="reissue_time" property="reissueTime" jdbcType="TIMESTAMP" />
@@ -109,7 +109,7 @@
109 109
         SELECT
110 110
             A.dwmc,A.id unitInfoId, A.dwdm,A.fddbr,A.dwlx,A.zcdz,A.cfs,A.ygs,A.DICT_LABEL,bgqa.apply_status,bgqa.apply_type,
111 111
                bse.certified_storekeeper_count ,bse.certified_inspector_count ,bse.warehouse_facility_situation ,
112
-               bse.full_time_staff_count ,bse.storage_expire_time ,bse.attachment attachment
112
+               bse.full_time_staff_count ,bse.storage_expire_time ,bse.attachment attachment,bgqa.sqr_enterprise_id
113 113
         FROM
114 114
             province_all.biz_sqr_enterprise_apply bgqa
115 115
             left join province_all.biz_sqr_enterprise  bse on bgqa.sqr_enterprise_id =bse.id

+ 4 - 0
src/main/java/com/chinaitop/depot/sqr/mapper/BizSqrEnterpriseMapper.java

@@ -15,6 +15,8 @@ package com.chinaitop.depot.sqr.mapper;
15 15
 
16 16
 import com.chinaitop.depot.sqr.model.BizSqrEnterprise;
17 17
 
18
+import java.util.List;
19
+
18 20
 /**
19 21
  * 粮食储备-承储资格企业Mapper接口
20 22
  *
@@ -32,4 +34,6 @@ public interface BizSqrEnterpriseMapper {
32 34
     int insert(BizSqrEnterprise bizSqrEnterprise);
33 35
 
34 36
     int delete(String id);
37
+
38
+    List<BizSqrEnterprise> TreeList();
35 39
 }

+ 16 - 0
src/main/java/com/chinaitop/depot/sqr/mapper/BizSqrEnterpriseMapper.xml

@@ -30,4 +30,20 @@
30 30
         DELETE FROM province_all.biz_sqr_enterprise WHERE id = #{id,jdbcType=VARCHAR}
31 31
     </delete>
32 32
 
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>
44
+
45
+    </select>
46
+
47
+
48
+
33 49
 </mapper>

+ 2 - 0
src/main/java/com/chinaitop/depot/sqr/service/BizSqrEnterpriseService.java

@@ -36,5 +36,7 @@ public interface BizSqrEnterpriseService {
36 36
 
37 37
     int delete(String id);
38 38
 
39
+    List<BizSqrEnterprise> TreeList();
40
+
39 41
 
40 42
 }

+ 6 - 0
src/main/java/com/chinaitop/depot/sqr/service/impl/BizSqrEnterpriseServiceImpl.java

@@ -21,6 +21,7 @@ import org.springframework.stereotype.Service;
21 21
 import org.springframework.transaction.annotation.Transactional;
22 22
 
23 23
 import javax.annotation.Resource;
24
+import java.util.List;
24 25
 
25 26
 
26 27
 /**
@@ -48,6 +49,11 @@ public class BizSqrEnterpriseServiceImpl implements BizSqrEnterpriseService {
48 49
         return  bizSqrEnterpriseMapper.delete(id);
49 50
     }
50 51
 
52
+    @Override
53
+    public List<BizSqrEnterprise> TreeList() {
54
+
55
+        return bizSqrEnterpriseMapper.TreeList();
56
+    }
51 57
 
52 58
 
53 59
 }