Переглянути джерело

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

lamphua 9 місяці тому
джерело
коміт
86e0a3b259

+ 1
- 1
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/file/FilesProjectController.java Переглянути файл

194
      * 根据项目编号查询项目信息
194
      * 根据项目编号查询项目信息
195
      */
195
      */
196
     @GetMapping("/query/{projectNumbers}")
196
     @GetMapping("/query/{projectNumbers}")
197
-    public AjaxResult getInfoByProjectNumber(@PathVariable String[] projectNumbers){
197
+    public AjaxResult getInfoByProjectNumber(@PathVariable String[] projectNumbers) {
198
         return AjaxResult.success(cmcProjectService.selectCmcProjectByProjectNumbers(projectNumbers));
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
     public AjaxResult add(@RequestBody CmcProject cmcProject) throws IOException {
127
     public AjaxResult add(@RequestBody CmcProject cmcProject) throws IOException {
128
         cmcProject.setRegisterTime(new Date());
128
         cmcProject.setRegisterTime(new Date());
129
         cmcProject.setIsFinished("0");
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
         return toAjax(cmcProjectService.insertCmcProject(cmcProject));
130
         return toAjax(cmcProjectService.insertCmcProject(cmcProject));
158
     }
131
     }
159
 
132
 
167
         return toAjax(cmcProjectService.updateCmcProject(cmcProject));
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
      * 删除cmc项目
179
      * 删除cmc项目
172
      */
180
      */

+ 10
- 1
oa-ui/src/api/oa/project/project.js Переглянути файл

2
  * @Author: wrh
2
  * @Author: wrh
3
  * @Date: 2024-01-30 16:37:46
3
  * @Date: 2024-01-30 16:37:46
4
  * @LastEditors: wrh
4
  * @LastEditors: wrh
5
- * @LastEditTime: 2024-07-30 17:32:58
5
+ * @LastEditTime: 2024-09-06 09:45:24
6
  */
6
  */
7
 import request from '@/utils/request'
7
 import request from '@/utils/request'
8
 
8
 
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
 // 删除cmc项目
62
 // 删除cmc项目
54
 export function delProject(projectId) {
63
 export function delProject(projectId) {
55
   return request({
64
   return request({

+ 20
- 5
oa-ui/src/views/file/index.vue Переглянути файл

2
  * @Author: ysh
2
  * @Author: ysh
3
  * @Date: 2024-06-21 18:51:49
3
  * @Date: 2024-06-21 18:51:49
4
  * @LastEditors: wrh
4
  * @LastEditors: wrh
5
- * @LastEditTime: 2024-09-05 10:46:23
5
+ * @LastEditTime: 2024-09-05 16:58:22
6
 -->
6
 -->
7
 <template>
7
 <template>
8
   <div class="warpper-container">
8
   <div class="warpper-container">
198
         </div>
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
           <div class="achi-content">
202
           <div class="achi-content">
203
             <div class="achi-header">
203
             <div class="achi-header">
204
               成果目录
204
               成果目录
503
           getInfoByProjectNumbers(newArray).then(res => {
503
           getInfoByProjectNumbers(newArray).then(res => {
504
             if (res.data) {
504
             if (res.data) {
505
               that.projectList = res.data;
505
               that.projectList = res.data;
506
+              that.total = res.data.length;
506
               if (that.isOpenPro == true) {
507
               if (that.isOpenPro == true) {
507
                 that.isOpenPro = false;
508
                 that.isOpenPro = false;
508
               }
509
               }
509
             } else {
510
             } else {
510
               that.projectList = that.allproTableData;
511
               that.projectList = that.allproTableData;
512
+              that.total = that.allproTableData.length;
511
             }
513
             }
512
           })
514
           })
513
         }
515
         }
559
       this.dialogTableVisible = true;
561
       this.dialogTableVisible = true;
560
       let projectId = this.clickFeature.projectId;
562
       let projectId = this.clickFeature.projectId;
561
       this.dialogTitle = this.clickFeature.projectNumber;
563
       this.dialogTitle = this.clickFeature.projectNumber;
562
-      listAchievement({ projectId }).then(res => {
564
+      listAchievement({ projectId: projectId, pageSize: 50, pageNum: 1 }).then(res => {
563
         if (res.total == 0) {
565
         if (res.total == 0) {
564
           this.$message.error('暂无成果,请添加');
566
           this.$message.error('暂无成果,请添加');
565
           this.achiDialogData = [];
567
           this.achiDialogData = [];
782
     },
784
     },
783
     handleCurrentChange(val) {
785
     handleCurrentChange(val) {
784
       this.queryParams.pageNum = val
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
     clusterStyle(feature, resolution) {
803
     clusterStyle(feature, resolution) {
965
     lookThisAchi(row) {
980
     lookThisAchi(row) {
966
       let projectId = row.projectId;
981
       let projectId = row.projectId;
967
       this.dialogTitle = row.projectNumber;
982
       this.dialogTitle = row.projectNumber;
968
-      listAchievement({ projectId }).then(res => {
983
+      listAchievement({ projectId: projectId, pageSize: 50, pageNum: 1 }).then(res => {
969
         if (res.total == 0) {
984
         if (res.total == 0) {
970
           this.$message.error('暂无成果,请添加');
985
           this.$message.error('暂无成果,请添加');
971
           this.achiDialogData = [];
986
           this.achiDialogData = [];

Завантаження…
Відмінити
Зберегти