|
@@ -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){
|