浏览代码

消单申请驳回申请修改

张涛 1年前
父节点
当前提交
844d37c498

+ 4
- 1
src/main/java/com/example/civilizedcity/controller/TaIssueApplyController.java 查看文件

79
      */
79
      */
80
     @ApiOperation("获取申请条数")
80
     @ApiOperation("获取申请条数")
81
     @GetMapping("/taIssueApply/nums")
81
     @GetMapping("/taIssueApply/nums")
82
-    public ResponseBean countApply(@ApiParam("申请状态") @RequestParam(value = "state", defaultValue = "0") Integer state,
82
+    public ResponseBean countApply(
83
+            @ApiParam("申请状态") @RequestParam(value = "state", defaultValue = "0") Integer state,
84
+            @ApiParam("是否删除") @RequestParam(value = "status", defaultValue = "-1") Integer status,
83
                                    @ApiParam("申请类型") @RequestParam(value = "applyType", required = false) String applyType) throws Exception {
85
                                    @ApiParam("申请类型") @RequestParam(value = "applyType", required = false) String applyType) throws Exception {
84
 
86
 
85
         String orgId = getOrgId();
87
         String orgId = getOrgId();
87
         QueryWrapper<TaIssueApply> queryWrapper = new QueryWrapper<>();
89
         QueryWrapper<TaIssueApply> queryWrapper = new QueryWrapper<>();
88
         queryWrapper.eq(StringUtils.isNotEmpty(applyType), "apply_type", applyType);
90
         queryWrapper.eq(StringUtils.isNotEmpty(applyType), "apply_type", applyType);
89
         queryWrapper.eq(StringUtils.isNotEmpty(orgId), "org_id", orgId);
91
         queryWrapper.eq(StringUtils.isNotEmpty(orgId), "org_id", orgId);
92
+        queryWrapper.gt("status",status);
90
 
93
 
91
         if (0 == state) {
94
         if (0 == state) {
92
             queryWrapper.isNull("verify_date");
95
             queryWrapper.isNull("verify_date");

+ 1
- 1
src/main/java/com/example/civilizedcity/controller/TaOrgIssueController.java 查看文件

241
     /**
241
     /**
242
      * 通过主键删除数据
242
      * 通过主键删除数据
243
      *
243
      *
244
-     * @param orgIssueId
244
+     * @param issueId
245
      * @return 是否成功
245
      * @return 是否成功
246
      *
246
      *
247
      */
247
      */

+ 3
- 0
src/main/java/com/example/civilizedcity/mapper/TaIssueApplyMapper.java 查看文件

20
                                    @Param("orgId") String orgId,
20
                                    @Param("orgId") String orgId,
21
                                    @Param("sourceType") String sourceType,
21
                                    @Param("sourceType") String sourceType,
22
                                    @Param("isAll") Boolean isAll);
22
                                    @Param("isAll") Boolean isAll);
23
+
24
+     int removeByIssueId(@Param("issueId") String issueId);
25
+
23
  }
26
  }

+ 3
- 0
src/main/java/com/example/civilizedcity/service/impl/TaOrgIssueServiceImpl.java 查看文件

26
 
26
 
27
     @Autowired
27
     @Autowired
28
     TaIssueMapper taIssueMapper;
28
     TaIssueMapper taIssueMapper;
29
+    @Autowired
30
+    TaIssueApplyMapper taIssueApplyMapper;
29
 
31
 
30
     @Autowired
32
     @Autowired
31
     TaIssueProcessMapper taIssueProcessMapper;
33
     TaIssueProcessMapper taIssueProcessMapper;
146
     public void removeByIssueId(String issueId){
148
     public void removeByIssueId(String issueId){
147
         baseMapper.removeByIssueId(issueId);
149
         baseMapper.removeByIssueId(issueId);
148
         taIssueMapper.removeByIssueId(issueId);
150
         taIssueMapper.removeByIssueId(issueId);
151
+        taIssueApplyMapper.removeByIssueId(issueId);
149
        }
152
        }
150
 
153
 
151
 }
154
 }

+ 16
- 10
src/main/resources/mapper/TaIssueApplyMapper.xml 查看文件

2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
 
3
 
4
 <mapper namespace="com.example.civilizedcity.mapper.TaIssueApplyMapper">
4
 <mapper namespace="com.example.civilizedcity.mapper.TaIssueApplyMapper">
5
+    <update id="removeByIssueId">
6
+        UPDATE ta_issue_apply t
7
+        SET t.status =-1
8
+        WHERE
9
+        t.issue_id = #{issueId};
10
+    </update>
5
 
11
 
6
     <select id="getPageBy" resultType="com.example.civilizedcity.entity.TaIssueApply">
12
     <select id="getPageBy" resultType="com.example.civilizedcity.entity.TaIssueApply">
7
         SELECT
13
         SELECT
8
-            t.*,
9
-            s.content AS issue_content,
10
-            s.addr AS issue_addr
14
+        t.*,
15
+        s.content AS issue_content,
16
+        s.addr AS issue_addr
11
         FROM
17
         FROM
12
-            ta_issue_apply t
13
-                INNER JOIN ta_issue s ON t.issue_id = s.issue_id
18
+        ta_issue_apply t
19
+        INNER JOIN ta_issue s ON t.issue_id = s.issue_id
14
         WHERE
20
         WHERE
15
-            t.`status` &gt; -1
16
-            AND s.`status` &gt; -1
21
+        t.`status` &gt; -1
22
+        <!--            AND s.`status` &gt; -1-->
17
         <if test="issueId != null">
23
         <if test="issueId != null">
18
             AND t.issue_id = #{issueId}
24
             AND t.issue_id = #{issueId}
19
         </if>
25
         </if>
21
             AND t.apply_type = #{applyType}
27
             AND t.apply_type = #{applyType}
22
         </if>
28
         </if>
23
         <if test="orgId != null and orgId != ''">
29
         <if test="orgId != null and orgId != ''">
24
-          AND t.org_id = #{orgId}
30
+            AND t.org_id = #{orgId}
25
         </if>
31
         </if>
26
         <if test="sourceType != null and sourceType == 'feedback'">
32
         <if test="sourceType != null and sourceType == 'feedback'">
27
             AND s.source_type = 'feedback'
33
             AND s.source_type = 'feedback'
33
             AND t.verify_date is null
39
             AND t.verify_date is null
34
         </if>
40
         </if>
35
         ORDER BY
41
         ORDER BY
36
-            IFNULL(t.verify_status, -1) ASC,
37
-            t.create_date DESC
42
+        IFNULL(t.verify_status, -1) ASC,
43
+        t.create_date DESC
38
     </select>
44
     </select>
39
 </mapper>
45
 </mapper>