tjf vor 7 Monaten
Ursprung
Commit
0a62258ab1

+ 22 - 14
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/projectV2/ZsyzLdpsServiceImpl.java

@@ -1,8 +1,5 @@
 package com.ruoyi.framework.web.service.projectV2;
 
-import java.util.ArrayList;
-import java.util.List;
-
 import com.ruoyi.common.core.domain.entity.SysRole;
 import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.utils.DateUtils;
@@ -10,20 +7,21 @@ import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.framework.manager.AsyncManager;
 import com.ruoyi.framework.manager.factory.AsyncFactory;
-import com.ruoyi.system.domain.fgw.FgwLdps;
-import com.ruoyi.system.domain.fgw.FgwXmsb;
-import com.ruoyi.system.domain.projectV2.ZsyzDbd;
+import com.ruoyi.system.domain.projectV2.ZsyzLdps;
 import com.ruoyi.system.domain.projectV2.ZsyzSbbzb;
 import com.ruoyi.system.domain.projectV2.common.SendSmsConfig;
 import com.ruoyi.system.mapper.SysUserMapper;
+import com.ruoyi.system.mapper.projectV2.ZsyzLdpsMapper;
 import com.ruoyi.system.mapper.projectV2.ZsyzSbbzbMapper;
+import com.ruoyi.system.service.projectV2.IZsyzLdpsService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import com.ruoyi.system.mapper.projectV2.ZsyzLdpsMapper;
-import com.ruoyi.system.domain.projectV2.ZsyzLdps;
-import com.ruoyi.system.service.projectV2.IZsyzLdpsService;
 
-import static com.ruoyi.common.constant.CommonConstants.*;
+import java.util.ArrayList;
+import java.util.List;
+
+import static com.ruoyi.common.constant.CommonConstants.LEADER;
+import static com.ruoyi.common.constant.CommonConstants.ONE;
 
 /**
  * 招商引资_领导批示Service业务层处理
@@ -94,7 +92,7 @@ public class ZsyzLdpsServiceImpl implements IZsyzLdpsService
         zsyzLdps.setPsnrId(user.getUserId());
         zsyzLdps.setXgsj(DateUtils.getNowDate());
         zsyzLdps.setCjsj(DateUtils.getNowDate());
-        if(!"1".equals(zsyzLdps.getType())){
+        if(!ONE.equals(zsyzLdps.getType())){
             //修改主表中的领导批示内容
             ZsyzSbbzb zsyzSbbzb = new ZsyzSbbzb();
             zsyzSbbzb.setId(zsyzLdps.getXmId());
@@ -112,9 +110,19 @@ public class ZsyzLdpsServiceImpl implements IZsyzLdpsService
                 sysUsers.addAll(sysUserList);
             }
             //查询申请人部门所有人都发
-            List<SysUser> sysUserSqr = sysUserMapper.selectUserByDeptId(zsyzSbbzbs.getDeptId());
-            sysUsers.addAll(sysUserSqr);
-            if(sysUsers!=null && sysUsers.size()>0){
+            Long deptId = zsyzSbbzbs.getDeptId();
+            if (100 != deptId){
+                List<SysUser> sysUserSqr = sysUserMapper.selectUserByDeptId(deptId);
+                sysUsers.addAll(sysUserSqr);
+                //给招商中心所有人发
+                List<SysUser> sysUserSqrZ = sysUserMapper.selectUserByDeptId(100L);
+                sysUsers.addAll(sysUserSqrZ);
+            }else {
+                //给招商中心所有人发
+                List<SysUser> sysUserSqr = sysUserMapper.selectUserByDeptId(deptId);
+                sysUsers.addAll(sysUserSqr);
+            }
+            if(sysUsers.size()>0){
                 for (SysUser sysUser : sysUsers) {
                     if (StringUtils.isNotEmpty(sysUser.getPhonenumber())) {
                         SendSmsConfig sendSmsConfig = new SendSmsConfig();

+ 4 - 4
ruoyi-system/src/main/resources/mapper/system/projectV2/ZsyzSbbzbMapper.xml

@@ -1199,7 +1199,7 @@
         <if test="progress != null  and progress != ''">and find_in_set(s.progress , #{progress})</if>
         <if test="xmStatus != null  and xmStatus != ''">and s.xm_status = #{xmStatus}</if>
         <if test="cjdId != null ">and cjd_id = #{cjdId}</if>
-        <!--下面所有时间判断勿动-->
+        /*下面所有时间判断勿动*/
         <if test="params.beginTime != null and params.beginTime != '' and progress == null"><!-- 开始时间检索 -->
             AND(
             ( date_format(s.tbrq,'%Y%m%d') &gt;= date_format(#{params.beginTime},'%Y%m%d')
@@ -1255,7 +1255,7 @@
         <if test="params.endTime != null and params.endTime != '' and progress != null and progress == '2'.toString()"><!-- 结束时间检索 -->
             AND date_format(s.tbrq,'%Y%m%d') &lt;= date_format(#{params.endTime},'%Y%m%d')
         </if>
-        <!--时间判断结束-->
+        /*时间判断结束*/
         order by s.update_time desc)
         UNION
         (
@@ -1414,7 +1414,7 @@
         <if test="progress != null  and progress != ''">and find_in_set(s.progress , #{progress})</if>
         <if test="xmStatus != null  and xmStatus != ''">and s.xm_status = #{xmStatus}</if>
         <if test="cjdId != null ">and cjd_id = #{cjdId}</if>
-        <!--下面所有时间判断勿动-->
+        /*下面所有时间判断勿动*/
         <if test="params.beginTime != null and params.beginTime != '' and progress == null"><!-- 开始时间检索 -->
             AND(
             ( date_format(s.tbrq,'%Y%m%d') &gt;= date_format(#{params.beginTime},'%Y%m%d')
@@ -1470,7 +1470,7 @@
         <if test="params.endTime != null and params.endTime != '' and progress != null and progress == '2'.toString()"><!-- 结束时间检索 -->
             AND date_format(s.tbrq,'%Y%m%d') &lt;= date_format(#{params.endTime},'%Y%m%d')
         </if>
-        <!--时间判断结束-->
+        /*时间判断结束*/
         order by s.update_time desc)