Browse Source

Merge branch 'master' of http://114.55.67.98:8070/Natural_p1/zjugis_OA

qiny 11 months ago
parent
commit
ab00c8d71a

+ 14 - 6
client/src/views/OaSystem/projectCenter/projectDetail/projectDetail.vue

@@ -56,14 +56,22 @@
             添加子项目
           </li>
           <li
-            v-if="projectPermis.projectPermisState.all || projectPermis.projectPermisState.xsLeader"
+            v-if="
+              projectPermis.projectPermisState.all ||
+              projectPermis.projectPermisState.xsLeader ||
+              projectPermis.projectPermisState.xmLeader
+            "
             v-show="projectDetail?.['xmzt'] !== 3"
             @click="handleStartSubcontract"
           >
             分包申请
           </li>
           <li
-            v-if="projectPermis.projectPermisState.all || projectPermis.projectPermisState.xsLeader"
+            v-if="
+              projectPermis.projectPermisState.all ||
+              projectPermis.projectPermisState.xsLeader ||
+              projectPermis.projectPermisState.xmLeader
+            "
             v-show="projectDetail?.['xmzt'] !== 3"
             @click="handleStartOutsourcing"
           >
@@ -128,17 +136,17 @@
         </ul>
         <div class="projectInfo">
           <template v-if="projectDetail?.['isSign'] === 0">
-            <p style="margin-right: 0px">该项目不签合同</p>
+            <p style="margin-right: 0">该项目不签合同</p>
           </template>
           <template v-else-if="!signContract.exist">
-            <p style="margin-right: 0px">该项目待签合同</p>
+            <p style="margin-right: 0">该项目待签合同</p>
           </template>
           <template
             v-else-if="
               signContract.exist && signContract.isvalid == 1 && signContract.flowStatus != 90
             "
           >
-            <p style="margin-right: 0px">合同签订过程中</p>
+            <p style="margin-right: 0">合同签订过程中</p>
           </template>
           <template v-else>
             <p>
@@ -368,5 +376,5 @@ const { mutate: startOutsourcingMutate } = useMutation(startOutsourcingApply, {
 const handleStartOutsourcing = () => startOutsourcingMutate(projectDetail.value.id as ProjectId)
 </script>
 <style lang="scss" scoped>
-@import './projectDetail.scss';
+@import url('./projectDetail.scss');
 </style>

+ 31 - 18
zjugis-business/src/main/java/com/zjugis/business/service/impl/ContractMessageServiceImpl.java

@@ -31,9 +31,8 @@ import org.springframework.stereotype.Service;
 import javax.annotation.Resource;
 import java.math.BigDecimal;
 import java.math.RoundingMode;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
+import java.nio.charset.StandardCharsets;
+import java.util.*;
 
 /**
  * 合同相关消息表(CONTRACT_MESSAGE)表服务实现类
@@ -183,36 +182,46 @@ public class ContractMessageServiceImpl implements ContractMessageService {
     }
 
     private void sendMsg(Contract contract,String content) {
+        Set<String> sendPeople = new HashSet<>();
         if (StringUtils.isNotBlank(contract.getProjectId())) {
             Project project = projectMapper.selectById(contract.getProjectId());
             if (StringUtils.isNotBlank(project.getXmjlId())) {
-                dingApi.sendMessage(new DingMessageDto(project.getXmjlId(), content));
+                sendPeople.add(project.getXmjlId());
+                //dingApi.sendMessage(new DingMessageDto(project.getXmjlId(), content));
             }
             if (StringUtils.isNotBlank(project.getZrbmId())) {
                 CommonResult<DeptRespDTO> result = deptApi.getDept(project.getZrbmId());
                 DeptRespDTO dept = result.getCheckedData();
                 if (dept != null && StringUtils.isNotBlank(dept.getLeaderUserId())) {
-                    dingApi.sendMessage(new DingMessageDto(dept.getLeaderUserId(), content));
+                    //dingApi.sendMessage(new DingMessageDto(dept.getLeaderUserId(), content));
+                    sendPeople.add(dept.getLeaderUserId());
                     CommonResult<AdminUserRespDTO> userRes = adminUserApi.getUserLeader(dept.getLeaderUserId());
                     AdminUserRespDTO userLeader = userRes.getCheckedData();
                     if (userLeader != null) {
-                        dingApi.sendMessage(new DingMessageDto(userLeader.getId(), content));
+                        sendPeople.add(userLeader.getId());
+                        //dingApi.sendMessage(new DingMessageDto(userLeader.getId(), content));
                     }
                 }
                 DeptRespDTO deptRespDTO = deptApi.getSecondDeptByDeptId(project.getZrbmId()).getCheckedData();
                 if (deptRespDTO != null && StringUtils.isNotBlank(deptRespDTO.getLeaderUserId())) {
-                    dingApi.sendMessage(new DingMessageDto(deptRespDTO.getLeaderUserId(), content));
+                    sendPeople.add(deptRespDTO.getLeaderUserId());
+                    //dingApi.sendMessage(new DingMessageDto(deptRespDTO.getLeaderUserId(), content));
                 }
             }
             if (StringUtils.isNotBlank(project.getXsryId())) {
-                dingApi.sendMessage(new DingMessageDto(project.getXsryId(), content));
-                CommonResult<List<DeptRespDTO>> deptsRes = deptApi.getDeptByUserId(project.getXsryId());
-                List<DeptRespDTO> depts = deptsRes.getCheckedData();
-                for (DeptRespDTO dept : depts) {
-                    if(!dept.getLeaderUserId().equals(project.getXsryId())){
-                        dingApi.sendMessage(new DingMessageDto(dept.getLeaderUserId(), content));
-                    }
-                }
+                sendPeople.add(project.getXsryId());
+                //dingApi.sendMessage(new DingMessageDto(project.getXsryId(), content));
+                CommonResult<AdminUserRespDTO> deptsRes1=adminUserApi.getUser(project.getXsryId());
+                //发送给销售经理的部门负责人
+                CommonResult<DeptRespDTO> fzr=deptApi.getDept(deptsRes1.getData().getDeptId());
+                String fzrid=fzr.getCheckedData().getLeaderUserId();
+                sendPeople.add(fzrid);
+            }
+            //发送给总经理室
+            CommonResult<List<AdminUserRespDTO>> zjls=adminUserApi.getDeptChildUserListByDeptId("5871709");
+            for(AdminUserRespDTO adminUserRespDTO:zjls.getCheckedData()){
+                sendPeople.add(adminUserRespDTO.getId());
+                //dingApi.sendMessage(new DingMessageDto(adminUserRespDTO.getId(), content));
             }
         }
         CommonResult<List<AdminUserRespDTO>> userListRes = adminUserApi.getUserListByDeptIds(Collections.singletonList(managerDeptId));
@@ -220,12 +229,16 @@ public class ContractMessageServiceImpl implements ContractMessageService {
         List<AdminUserRespDTO> list = userListRes.getCheckedData();
         List<AdminUserRespDTO> posUserList = postUserListRes.getCheckedData();
         for (AdminUserRespDTO user : list) {
-            dingApi.sendMessage(new DingMessageDto(user.getId(), content));
+            //dingApi.sendMessage(new DingMessageDto(user.getId(), content));
+            sendPeople.add(user.getId());
         }
         for (AdminUserRespDTO user : posUserList) {
-            dingApi.sendMessage(new DingMessageDto(user.getId(), content));
+            //dingApi.sendMessage(new DingMessageDto(user.getId(), content));
+            sendPeople.add(user.getId());
+        }
+        for (String element : sendPeople) {
+            dingApi.sendMessage(new DingMessageDto(element, content));
         }
-
     }
 }
 

+ 1 - 0
zjugis-business/src/main/resources/templates/ContractRenew/js/index.js

@@ -93,6 +93,7 @@
             mealName.xhtdqs = Date.parse(mealName.xhtdqs + "");
             mealName.htqdsj = Date.parse(mealName.htqdsj + "");
             mealName.rgssj=Date.parse(mealName.rgssj + "");
+            mealName.createTime=Date.parse(mealName.createTime + "");
             postData.createReqVO = mealName;
         }
 

+ 2 - 2
zjugis-module-infra/zjugis-module-infra-biz/src/main/resources/application.yaml

@@ -7,8 +7,8 @@ spring:
   servlet:
     # 文件上传相关配置项
     multipart:
-      max-file-size: 16MB # 单个文件大小
-      max-request-size: 32MB # 设置总上传的文件大小
+      max-file-size: 4096MB # 单个文件大小
+      max-request-size: 5120MB # 设置总上传的文件大小
   mvc:
     pathmatch:
       matching-strategy: ANT_PATH_MATCHER # 解决 SpringFox 与 SpringBoot 2.6.x 不兼容的问题,参见 SpringFoxHandlerProviderBeanPostProcessor 类