소스 검색

登记项目发送企业微信消息

lamphua 9 달 전
부모
커밋
86e0a3b259

+ 1
- 1
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/file/FilesProjectController.java 파일 보기

@@ -194,7 +194,7 @@ public class FilesProjectController extends BaseController {
194 194
      * 根据项目编号查询项目信息
195 195
      */
196 196
     @GetMapping("/query/{projectNumbers}")
197
-    public AjaxResult getInfoByProjectNumber(@PathVariable String[] projectNumbers){
197
+    public AjaxResult getInfoByProjectNumber(@PathVariable String[] projectNumbers) {
198 198
         return AjaxResult.success(cmcProjectService.selectCmcProjectByProjectNumbers(projectNumbers));
199 199
     }
200 200
 }

+ 35
- 27
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcProjectController.java 파일 보기

@@ -127,33 +127,6 @@ public class CmcProjectController extends BaseController
127 127
     public AjaxResult add(@RequestBody CmcProject cmcProject) throws IOException {
128 128
         cmcProject.setRegisterTime(new Date());
129 129
         cmcProject.setIsFinished("0");
130
-//        if (cmcProjectService.insertCmcProject(cmcProject) > 0) {
131
-//            String message = "经营发展部已发起项目登记:  \n>" +
132
-//                    "登记人: <font color='info'>" + userService.selectUserById(cmcProject.getProjectRegistrant()).getNickName() + "</font>  \n>" +
133
-//                    "项目编号:" + cmcProject.getProjectNumber() + "  \n>" +
134
-//                    "项目名称:" + cmcProject.getProjectName() + "  \n>" +
135
-//                    "  \n>" +
136
-//                    "项目类型:<font color='comment'>" + cmcProject.getProjectType() + "</font>  \n>" +
137
-//                    "项目来源:" + (cmcProject.getProjectSource().equals("0") ? "院内" : "院外") +"  \n>" +
138
-//                    "甲方单位:" + cmcPartyAService.selectCmcPartyAByPartyAId(cmcProject.getPartyAId()).getPartyAName() + "  \n>" +
139
-//                    "  \n>" +
140
-//                    "承担部门:<font color='warning'>" + deptIdToName(cmcProject) + "</font>  \n>" +
141
-//                    "请您确认承担部门,及时跟进项目流转  \n>" +
142
-//                    "  \n>";
143
-//            if (cmcProject.getUndertakingDept() != null) {
144
-//                String deptString = cmcProject.getUndertakingDept() + ",105";
145
-//                List<String> managerList = new ArrayList<>();
146
-//                String[] deptId = deptString.split(",");
147
-//                for (String dept : deptId) {
148
-//                        List<SysUser> manageList = getManageId(dept, "");
149
-//                        for (SysUser manager : manageList) {
150
-//                            managerList.add(manager.getPinyin());
151
-//
152
-//                    }
153
-//                }
154
-//                MessageController.sendAppMessage(message, StringUtils.join(managerList, "|"));
155
-//            }
156
-//        }
157 130
         return toAjax(cmcProjectService.insertCmcProject(cmcProject));
158 131
     }
159 132
 
@@ -167,6 +140,41 @@ public class CmcProjectController extends BaseController
167 140
         return toAjax(cmcProjectService.updateCmcProject(cmcProject));
168 141
     }
169 142
 
143
+    /**
144
+     * 登记项目发送企业微信消息
145
+     */
146
+    @PostMapping("/sendMessage")
147
+    public AjaxResult sendMessage(@RequestBody CmcProject cmcProject) throws IOException {
148
+            String message = "经营发展部已发起项目登记:  \n>" +
149
+                    "登记人: <font color='info'>" + userService.selectUserById(cmcProject.getProjectRegistrant()).getNickName() + "</font>  \n>" +
150
+                    "项目编号:" + cmcProject.getProjectNumber() + "  \n>" +
151
+                    "项目名称:" + cmcProject.getProjectName() + "  \n>" +
152
+                    "  \n>" +
153
+                    "项目类型:<font color='comment'>" + cmcProject.getProjectType() + "</font>  \n>" +
154
+                    "项目来源:" + (cmcProject.getProjectSource().equals("0") ? "院内" : "院外") +"  \n>" +
155
+                    "甲方单位:" + cmcPartyAService.selectCmcPartyAByPartyAId(cmcProject.getPartyAId()).getPartyAName() + "  \n>" +
156
+                    "  \n>" +
157
+                    "承担部门:<font color='warning'>" + deptIdToName(cmcProject) + "</font>  \n>" +
158
+                    "请您确认承担部门,及时跟进项目流转  \n>" +
159
+                    "  \n>";
160
+            if (cmcProject.getUndertakingDept() != null) {
161
+                String deptString = cmcProject.getUndertakingDept() + ",105";
162
+                List<String> managerList = new ArrayList<>();
163
+                managerList.add("WangRongHua");
164
+                managerList.add("YuSiHan");
165
+//                String[] deptId = deptString.split(",");
166
+//                for (String dept : deptId) {
167
+//                        List<SysUser> manageList = getManageId(dept, "");
168
+//                        for (SysUser manager : manageList) {
169
+//                            managerList.add(manager.getPinyin());
170
+//
171
+//                    }
172
+//                }
173
+                MessageController.sendAppMessage(message, StringUtils.join(managerList, "|"));
174
+        }
175
+        return success("");
176
+    }
177
+
170 178
     /**
171 179
      * 删除cmc项目
172 180
      */

+ 10
- 1
oa-ui/src/api/oa/project/project.js 파일 보기

@@ -2,7 +2,7 @@
2 2
  * @Author: wrh
3 3
  * @Date: 2024-01-30 16:37:46
4 4
  * @LastEditors: wrh
5
- * @LastEditTime: 2024-07-30 17:32:58
5
+ * @LastEditTime: 2024-09-06 09:45:24
6 6
  */
7 7
 import request from '@/utils/request'
8 8
 
@@ -50,6 +50,15 @@ export function updateProject(data) {
50 50
   })
51 51
 }
52 52
 
53
+// 登记项目发送企业微信消息
54
+export function sendMessage(data) {
55
+  return request({
56
+    url: '/oa/project/sendMessage',
57
+    method: 'post',
58
+    data: data
59
+  })
60
+}
61
+
53 62
 // 删除cmc项目
54 63
 export function delProject(projectId) {
55 64
   return request({

+ 20
- 5
oa-ui/src/views/file/index.vue 파일 보기

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-06-21 18:51:49
4 4
  * @LastEditors: wrh
5
- * @LastEditTime: 2024-09-05 10:46:23
5
+ * @LastEditTime: 2024-09-05 16:58:22
6 6
 -->
7 7
 <template>
8 8
   <div class="warpper-container">
@@ -198,7 +198,7 @@
198 198
         </div>
199 199
 
200 200
         <!-- 成果目录 -->
201
-        <div class="achi-list dialog_wrap" v-if="dialogTableVisible">
201
+        <div class="achi-list dialog_wrap" v-if="dialogTableVisible" @mousedown.stop="move">
202 202
           <div class="achi-content">
203 203
             <div class="achi-header">
204 204
               成果目录
@@ -503,11 +503,13 @@ export default {
503 503
           getInfoByProjectNumbers(newArray).then(res => {
504 504
             if (res.data) {
505 505
               that.projectList = res.data;
506
+              that.total = res.data.length;
506 507
               if (that.isOpenPro == true) {
507 508
                 that.isOpenPro = false;
508 509
               }
509 510
             } else {
510 511
               that.projectList = that.allproTableData;
512
+              that.total = that.allproTableData.length;
511 513
             }
512 514
           })
513 515
         }
@@ -559,7 +561,7 @@ export default {
559 561
       this.dialogTableVisible = true;
560 562
       let projectId = this.clickFeature.projectId;
561 563
       this.dialogTitle = this.clickFeature.projectNumber;
562
-      listAchievement({ projectId }).then(res => {
564
+      listAchievement({ projectId: projectId, pageSize: 50, pageNum: 1 }).then(res => {
563 565
         if (res.total == 0) {
564 566
           this.$message.error('暂无成果,请添加');
565 567
           this.achiDialogData = [];
@@ -782,7 +784,20 @@ export default {
782 784
     },
783 785
     handleCurrentChange(val) {
784 786
       this.queryParams.pageNum = val
785
-      this.getProjectList(this.queryParams)
787
+      if (this.seletctedCluters != []) {
788
+        let newArray = [...new Set(this.seletctedCluters)];
789
+        getInfoByProjectNumbers(newArray).then(res => {
790
+          if (res.data) {
791
+            this.projectList = res.data;
792
+            this.total = res.data.length;
793
+          } else {
794
+            that.projectList = that.allproTableData;
795
+            that.total = that.allproTableData.length;
796
+          }
797
+        })
798
+      }
799
+      else
800
+        this.getProjectList(this.queryParams)
786 801
     },
787 802
     /* 得到项目的点位绘制到地图上 */
788 803
     clusterStyle(feature, resolution) {
@@ -965,7 +980,7 @@ export default {
965 980
     lookThisAchi(row) {
966 981
       let projectId = row.projectId;
967 982
       this.dialogTitle = row.projectNumber;
968
-      listAchievement({ projectId }).then(res => {
983
+      listAchievement({ projectId: projectId, pageSize: 50, pageNum: 1 }).then(res => {
969 984
         if (res.total == 0) {
970 985
           this.$message.error('暂无成果,请添加');
971 986
           this.achiDialogData = [];

Loading…
취소
저장