瀏覽代碼

Merge remote-tracking branch 'origin/master'

shiqian 4 年之前
父節點
當前提交
e39f3807c9

+ 31 - 0
boman-web-core/src/main/java/com/boman/web/core/controller/BomanMessageReceiveController.java

@@ -0,0 +1,31 @@
+package com.boman.web.core.controller;
+
+import com.alibaba.fastjson.JSONObject;
+import com.boman.domain.dto.AjaxResult;
+import com.boman.web.core.service.bomanMessageReceive.IBomanMessageReceiveService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author tjf
+ * @Date: 2021/07/06/15:16
+ */
+@RestController
+@RequestMapping("/messageReceive")
+public class BomanMessageReceiveController {
+
+    @Autowired
+    private IBomanMessageReceiveService bomanMessageReceiveService;
+    /**
+     * 根据发文id查询出该发文所选人员名称和部门
+     * @param messageId
+     * @return
+     */
+    @GetMapping("/{messageId}")
+    public AjaxResult getUserNameAndDeptName(@PathVariable("messageId") String messageId) {
+        return bomanMessageReceiveService.getUserNameAndDeptName(messageId);
+    }
+}

+ 48 - 0
boman-web-core/src/main/java/com/boman/web/core/service/bomanMessageReceive/BomanMessageReceiveServiceImpl.java

@@ -0,0 +1,48 @@
+package com.boman.web.core.service.bomanMessageReceive;
+
+import com.alibaba.fastjson.JSONObject;
+import com.boman.common.core.utils.StringUtils;
+import com.boman.domain.dto.AjaxResult;
+import com.boman.web.core.service.select.IBaseSelectService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * @author tjf
+ * @Date: 2021/07/06/15:29
+ */
+@Service
+public class BomanMessageReceiveServiceImpl implements IBomanMessageReceiveService{
+
+    @Autowired
+    private IBaseSelectService selectService;
+
+    /**
+     * 根据发文id查询出该发文所选人员名称和部门
+     * @param messageId
+     * @return
+     */
+    @Override
+    public AjaxResult getUserNameAndDeptName(String messageId) {
+        JSONObject jsonObject = new JSONObject();
+        jsonObject.put("message_id",messageId);
+        List<JSONObject> bomanMessageReceiveList = selectService.getByMap("boman_message_receive", jsonObject);
+        List<String> receiveUserNameList = new ArrayList<>();
+        List<String> receiveDeptNameList = new ArrayList<>();
+        for (JSONObject object : bomanMessageReceiveList) {
+            String receiveUserName = String.valueOf(object.get("receive_user_name"));
+            String receiveDeptName = String.valueOf(object.get("receive_dept_name"));
+            if (StringUtils.isNotBlank(receiveUserName)){
+                receiveUserNameList.add(receiveUserName);
+            }
+            if (StringUtils.isNotBlank(receiveDeptName)){
+                receiveDeptNameList.add(receiveDeptName);
+            }
+        }
+        return Objects.requireNonNull(AjaxResult.success().put("receiveUserNameList", receiveUserNameList)).put("receiveDeptNameList",receiveDeptNameList);
+    }
+}

+ 17 - 0
boman-web-core/src/main/java/com/boman/web/core/service/bomanMessageReceive/IBomanMessageReceiveService.java

@@ -0,0 +1,17 @@
+package com.boman.web.core.service.bomanMessageReceive;
+
+import com.boman.domain.dto.AjaxResult;
+
+/**
+ * @author tjf
+ * @Date: 2021/07/06/15:29
+ */
+public interface IBomanMessageReceiveService {
+
+    /**
+     * 根据发文id查询出该发文所选人员名称和部门
+     * @param messageId
+     * @return
+     */
+    AjaxResult getUserNameAndDeptName(String messageId);
+}

+ 2 - 2
ruoyi-ui/src/settings.js

@@ -1,8 +1,8 @@
 module.exports = {
   title: 'OA管理系统',
   // urls: `http://118.178.139.79:7090`,
-  // urls: `http://192.168.101.11:8090`,
-   urls: `http://192.168.101.49:8090`,
+  urls: `http://192.168.101.11:8090`,
+  //  urls: `http://192.168.101.110:8090`,
 
   /**
    * 侧边栏主题 深色主题theme-dark,浅色主题theme-light