Sfoglia il codice sorgente

项目信息模糊查询

lamphua 6 mesi fa
parent
commit
9b78a10e12

+ 1
- 1
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcContractController.java Vedi File

@@ -145,7 +145,7 @@ public class CmcContractController extends BaseController
145 145
     @PutMapping
146 146
     public AjaxResult edit(@RequestBody CmcContract cmcContract)
147 147
     {
148
-        if (cmcContract.getManagerComment() != null && cmcContract.getGmComment() == null) {
148
+        if (cmcContract.getManagerComment() != null && cmcContract.getGmComment() == null && getLoginUser().getUserId() != 22) {
149 149
             cmcContract.setManagerUserId(getLoginUser().getUserId());
150 150
         }
151 151
         if (cmcContract.getGmComment() != null && cmcContract.getSignDate() == null && getLoginUser().getUserId() != 22) {

+ 15
- 0
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcProjectController.java Vedi File

@@ -82,6 +82,21 @@ public class CmcProjectController extends BaseController
82 82
         return getDataTable(list);
83 83
     }
84 84
 
85
+    /**
86
+     * 模糊查询cmc项目列表
87
+     */
88
+    @GetMapping("/listFuzzy")
89
+    public TableDataInfo listFuzzy(String queryString)
90
+    {
91
+        startPage();
92
+        List<CmcProject> list = cmcProjectService.selectCmcProjectListFuzzy(queryString);
93
+        for (CmcProject project : list) {
94
+            project.setUndertakingDeptName(deptIdToName(project));
95
+            project.setQualityInspectorName(inspectorIdToName(project));
96
+        }
97
+        return getDataTable(list);
98
+    }
99
+
85 100
     /**
86 101
      * 导出cmc项目列表
87 102
      */

+ 2
- 2
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcSubContractController.java Vedi File

@@ -146,10 +146,10 @@ public class CmcSubContractController extends BaseController
146 146
     @PutMapping
147 147
     public AjaxResult edit(@RequestBody CmcSubContract cmcSubContract)
148 148
     {
149
-        if (cmcSubContract.getManagerComment() != null && cmcSubContract.getGmComment() == null) {
149
+        if (cmcSubContract.getManagerComment() != null && cmcSubContract.getGmComment() == null && getLoginUser().getUserId() != 22) {
150 150
             cmcSubContract.setManagerUserId(getLoginUser().getUserId());
151 151
         }
152
-        if (cmcSubContract.getGmComment() != null && cmcSubContract.getSignDate() == null) {
152
+        if (cmcSubContract.getGmComment() != null && cmcSubContract.getSignDate() == null && getLoginUser().getUserId() != 22) {
153 153
             cmcSubContract.setGmUserId(getLoginUser().getUserId());
154 154
         }
155 155
         return toAjax(cmcSubContractService.updateCmcSubContract(cmcSubContract));

+ 8
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/mapper/CmcProjectMapper.java Vedi File

@@ -35,6 +35,14 @@ public interface CmcProjectMapper
35 35
      */
36 36
     public List<CmcProject> selectCmcProjectList(CmcProject cmcProject);
37 37
 
38
+    /**
39
+     * 模糊查询cmc测绘项目列表
40
+     *
41
+     * @param queryString 查询字符
42
+     * @return cmc项目集合
43
+     */
44
+    public List<CmcProject> selectCmcProjectListFuzzy(String queryString);
45
+
38 46
     /**
39 47
      * 查询cmc勘察项目列表
40 48
      *

+ 8
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/ICmcProjectService.java Vedi File

@@ -36,6 +36,14 @@ public interface ICmcProjectService
36 36
      */
37 37
     public List<CmcProject> selectCmcProjectList(CmcProject cmcProject);
38 38
 
39
+    /**
40
+     * 模糊查询cmc测绘项目列表
41
+     *
42
+     * @param queryString 查询字符
43
+     * @return cmc项目集合
44
+     */
45
+    public List<CmcProject> selectCmcProjectListFuzzy(String queryString);
46
+
39 47
     /**
40 48
      * 查询cmc勘察项目列表
41 49
      *

+ 11
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/service/impl/CmcProjectServiceImpl.java Vedi File

@@ -58,6 +58,17 @@ public class CmcProjectServiceImpl implements ICmcProjectService
58 58
         return cmcProjectMapper.selectCmcProjectList(cmcProject);
59 59
     }
60 60
 
61
+    /**
62
+     * 模糊查询cmc测绘项目列表
63
+     *
64
+     * @param queryString 查询字符
65
+     * @return cmc项目集合
66
+     */
67
+    public List<CmcProject> selectCmcProjectListFuzzy(String queryString)
68
+    {
69
+        return cmcProjectMapper.selectCmcProjectListFuzzy(queryString);
70
+    }
71
+
61 72
     /**
62 73
      * 查询cmc勘察项目列表
63 74
      *

+ 14
- 0
oa-back/ruoyi-system/src/main/resources/mapper/oa/CmcProjectMapper.xml Vedi File

@@ -146,6 +146,20 @@
146 146
         order by p.register_time desc, p.project_number desc
147 147
     </select>
148 148
 
149
+    <select id="selectCmcProjectListFuzzy" parameterType="String" resultMap="CmcProjectResult">
150
+        <include refid="selectCmcProjectVo"/>
151
+        <where>
152
+            (p.project_number REGEXP '^[0-9]+W[0-9]' or p.project_number REGEXP '^[0-9]+C[0-9]') AND NOT (p.project_number REGEXP '[/\\*-]')
153
+            and (case when p.undertaking_dept not like concat('%', '113', '%') then p.undertaking_dept not like concat('%', '113', '%')
154
+            when p.undertaking_dept is null then p.undertaking_dept is null
155
+            when p.undertaking_dept like concat('%', '113', '%') then p.undertaking_dept like concat('%', ',', '%')
156
+            end)
157
+            and concat(p.project_number, p.project_name, pa.party_a_name, p.contact_person, p.telephone) like concat('%', #{param}, '%')
158
+        </where>
159
+        group by p.project_id
160
+        order by p.register_time desc, p.project_number desc
161
+    </select>
162
+
149 163
     <select id="selectCmcInvestProjectList" parameterType="CmcProject" resultMap="CmcProjectResult">
150 164
         <include refid="selectCmcProjectVo"/>
151 165
         <where>

Loading…
Annulla
Salva