瀏覽代碼

项目关联部门功能

zhouyy 3 月之前
父節點
當前提交
c070ef3502

+ 4 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/TimeType.java

@@ -640,6 +640,10 @@ public class TimeType extends Model<TimeType> {
     @TableField("weekly_charge_filter")
     private Integer weeklyChargeFilter;
 
+    /**日报审核发送企微消息功能,0-不开启,1-开启*/
+    @TableField("report_charge_msg")
+    private Integer reportChargeMsg;
+
 
     @TableField(exist = false)
     private List<User> userList;

+ 14 - 11
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -3408,17 +3408,20 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
         //发送驳回通知消息
         User reporter = userMapper.selectById(fillUserId);
         String corpwxUserid = reporter.getCorpwxUserid();
-        //先判断钉钉
-        if (reporter.getDingdingUserid() != null) {
-            projectMapper.selectById(oneReport.getProjectId()).getProjectName();
-            companyDingdingService.sendRejectReportMsg(reporter.getCompanyId(), date, pNames, reason, user.getName(), reporter.getDingdingUserid());
-        }
-        if (corpwxUserid != null) {
-            WxCorpInfo info = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", company.getId()));
-            wxCorpInfoService.sendWXCorpMsg(info, corpwxUserid, str, null, WxCorpInfoServiceImpl.TEXT_CARD_MSG_REPORT_DENY);
-        } else if (reporter.getWxOpenid() != null){
-            //发送个人微信通知
-            pushReject(str, reporter, user.getName(), reason);
+        //这些日报的原审核状态,状态为已通过则需要判断新字段,1则发消息,0则不发消息[日报状态都一致]
+        if(1 == oneReport.getState() && 1 == timeType.getReportChargeMsg()){
+            //先判断钉钉
+            if (reporter.getDingdingUserid() != null) {
+                projectMapper.selectById(oneReport.getProjectId()).getProjectName();
+                companyDingdingService.sendRejectReportMsg(reporter.getCompanyId(), date, pNames, reason, user.getName(), reporter.getDingdingUserid());
+            }
+            if (corpwxUserid != null) {
+                WxCorpInfo info = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", company.getId()));
+                wxCorpInfoService.sendWXCorpMsg(info, corpwxUserid, str, null, WxCorpInfoServiceImpl.TEXT_CARD_MSG_REPORT_DENY);
+            } else if (reporter.getWxOpenid() != null){
+                //发送个人微信通知
+                pushReject(str, reporter, user.getName(), reason);
+            }
         }
 
         if(timeType.getSyncSap()==1){