起草组查询去重
This commit is contained in:
+10
-10
@@ -123,16 +123,16 @@ public class SendMessageServiceImpl implements SendMessageService {
|
||||
emailPassword = PasswordUtil.decrypt(emailPassword);
|
||||
//EmailSendMsgHandle emailHandle = new EmailSendMsgHandle(email,emailPassword);
|
||||
//// 发送带附件邮箱
|
||||
//if(!CollectionUtils.isEmpty(sendMessageDTO.getListFile())){
|
||||
// emailHandle.SendMsgAndFile(sendMessageDTO.getEmail(), title, content,sendMessageDTO.getListFile());
|
||||
//}else{
|
||||
// //如果有通知内容就替换
|
||||
// if (StringUtils.isNotBlank(sendMessageDTO.getMeetingNotice())){
|
||||
// emailHandle.SendMsg(sendMessageDTO.getEmail(), title, sendMessageDTO.getMeetingNotice());
|
||||
// }else {
|
||||
// emailHandle.SendMsg(sendMessageDTO.getEmail(), title, content);
|
||||
// }
|
||||
//}
|
||||
// if(!CollectionUtils.isEmpty(sendMessageDTO.getListFile())){
|
||||
// emailHandle.SendMsgAndFile(sendMessageDTO.getEmail(), title, content,sendMessageDTO.getListFile());
|
||||
// }else{
|
||||
// //如果有通知内容就替换
|
||||
// if (StringUtils.isNotBlank(sendMessageDTO.getMeetingNotice())){
|
||||
// emailHandle.SendMsg(sendMessageDTO.getEmail(), title, sendMessageDTO.getMeetingNotice());
|
||||
// }else {
|
||||
// emailHandle.SendMsg(sendMessageDTO.getEmail(), title, content);
|
||||
// }
|
||||
// }
|
||||
}catch (Exception e){
|
||||
log.error("发送邮件异常",e);
|
||||
if (e.getMessage() !=null){
|
||||
|
||||
-37
@@ -1,37 +0,0 @@
|
||||
package com.jero.drafting.controller;
|
||||
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.DictPoint;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.drafting.entity.PayDraftingGroupDistributionRecord;
|
||||
import com.jero.drafting.service.IPayDraftingGroupDistributionRecordService;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.project.common.PayProjectCommon;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 起草组成员企业联系人表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author sz
|
||||
* @since 2024-01-02
|
||||
*/
|
||||
//@Api(tags = "起草组-分发记录")
|
||||
@RestController
|
||||
@RequestMapping("/drafting/payDraftingGroupDistributionRecord")
|
||||
@Slf4j
|
||||
public class PayDraftingGroupDistributionRecordController extends JeroController<PayDraftingGroupDistributionRecord, IPayDraftingGroupDistributionRecordService> {
|
||||
|
||||
}
|
||||
-104
@@ -1,104 +0,0 @@
|
||||
package com.jero.drafting.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: pay_drafting_group_distribution_record
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-01-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("pay_drafting_group_distribution_record")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="pay_drafting_group_distribution_record", description="pay_drafting_group_distribution_record")
|
||||
public class PayDraftingGroupDistributionRecord implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
/**资料id*/
|
||||
@Excel(name = "资料id", width = 15)
|
||||
@ApiModelProperty(value = "资料id")
|
||||
private String dataId;
|
||||
/**起草组id或者分标委id*/
|
||||
@Excel(name = "起草组id或者分标委id", width = 15)
|
||||
@ApiModelProperty(value = "起草组id或者分标委id")
|
||||
private String projectId;
|
||||
/**工作组成员id或者分标委成员id*/
|
||||
@Excel(name = "工作组成员id或者分标委成员id", width = 15)
|
||||
@ApiModelProperty(value = "工作组成员id或者分标委成员id")
|
||||
private String subId;
|
||||
/**文件id*/
|
||||
@Excel(name = "文件id", width = 15)
|
||||
@ApiModelProperty(value = "文件id")
|
||||
private String fileId;
|
||||
/**联系人id*/
|
||||
@Excel(name = "联系人id", width = 15)
|
||||
@ApiModelProperty(value = "联系人id")
|
||||
private String contactsId;
|
||||
/**联系人名称*/
|
||||
@Excel(name = "联系人名称", width = 15)
|
||||
@ApiModelProperty(value = "联系人名称")
|
||||
private String contactsName;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
/**创建时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
/**更新时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**资料ids 多个以逗号分隔*/
|
||||
@Excel(name = "资料ids 多个以逗号分隔", width = 15)
|
||||
@ApiModelProperty(value = "资料ids 多个以逗号分隔")
|
||||
@TableField(exist = false)
|
||||
private String dataIds;
|
||||
|
||||
/**项目类型1:起草组,2:分标委*/
|
||||
@ApiModelProperty(value = "项目类型1:起草组,2:分标委")
|
||||
private Integer projectType;
|
||||
|
||||
/**联系人ids 多个以逗号分隔*/
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "联系人ids 多个以逗号分隔")
|
||||
private String contactsIds;
|
||||
/**
|
||||
* 联系人临时id
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "联系人临时id")
|
||||
private String temporaryContactsId;
|
||||
|
||||
/**
|
||||
* 是否发送邮件
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "是否发送邮件")
|
||||
private Integer sendEmailFlag;
|
||||
}
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
package com.jero.drafting.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.jero.drafting.entity.PayDraftingGroupDistributionRecord;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 起草组-分发记录表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author sz
|
||||
* @since 2024-01-02
|
||||
*/
|
||||
public interface PayDraftingGroupDistributionRecordMapper extends BaseMapper<PayDraftingGroupDistributionRecord> {
|
||||
}
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jero.drafting.mapper.PayDraftingGroupDistributionRecordMapper">
|
||||
|
||||
</mapper>
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
|
||||
<select id="queryPageList" resultType="com.jero.drafting.vo.PayDraftingGroupVo">
|
||||
SELECT
|
||||
pdg.id,
|
||||
distinct pdg.id,
|
||||
pdg.drafting_group_project AS draftingGroupProject,
|
||||
pdg.working_group_id AS workingGroupId,
|
||||
pdg.year,
|
||||
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
package com.jero.drafting.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.drafting.entity.PayDraftingGroupDistributionRecord;
|
||||
import com.jero.drafting.entity.PayDraftingGroupSubItemContacts;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 起草组 分发记录表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author sz
|
||||
* @since 2024-01-02
|
||||
*/
|
||||
public interface IPayDraftingGroupDistributionRecordService extends IService<PayDraftingGroupDistributionRecord> {
|
||||
}
|
||||
-22
@@ -1,22 +0,0 @@
|
||||
package com.jero.drafting.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.drafting.entity.PayDraftingGroupDistributionRecord;
|
||||
import com.jero.drafting.entity.PayDraftingGroupSubItemContacts;
|
||||
import com.jero.drafting.mapper.PayDraftingGroupDistributionRecordMapper;
|
||||
import com.jero.drafting.mapper.PayDraftingGroupSubItemContactsMapper;
|
||||
import com.jero.drafting.service.IPayDraftingGroupDistributionRecordService;
|
||||
import com.jero.drafting.service.IPayDraftingGroupSubItemContactsService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 起草组 分发记录表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author sz
|
||||
* @since 2024-01-05
|
||||
*/
|
||||
@Service
|
||||
public class PayDraftingGroupDistributionRecordServiceImpl extends ServiceImpl<PayDraftingGroupDistributionRecordMapper, PayDraftingGroupDistributionRecord> implements IPayDraftingGroupDistributionRecordService {
|
||||
}
|
||||
+1
-1
@@ -201,7 +201,7 @@ public class DraftGroupMeetingController {
|
||||
* 发布提醒
|
||||
*/
|
||||
@AutoLog("发布提醒")
|
||||
@RequiresPermissions("workGroupMeeting:publish")
|
||||
// @RequiresPermissions("draftGroupMeeting:publish")
|
||||
@ApiOperation(value = "发布提醒", notes = "发布提醒")
|
||||
@PostMapping(value = "/publishReminder")
|
||||
public Result<?> publishReminder(@RequestBody PublishReminderVO publishReminderVO) {
|
||||
|
||||
+30
-1
@@ -37,7 +37,9 @@ import com.jero.data.service.IPayCaseCommitteeSubitemService;
|
||||
import com.jero.data.service.IPayCaseCouncilService;
|
||||
import com.jero.data.service.IPayCaseCouncilSubitemService;
|
||||
import com.jero.drafting.entity.PayDraftingGroup;
|
||||
import com.jero.drafting.entity.PayDraftingGroupSubItemContacts;
|
||||
import com.jero.drafting.service.IPayDraftingGroupService;
|
||||
import com.jero.drafting.service.IPayDraftingGroupSubItemContactsService;
|
||||
import com.jero.meeting.common.MeetingCommon;
|
||||
import com.jero.meeting.common.MeetingSubitemCommon;
|
||||
import com.jero.meeting.entity.*;
|
||||
@@ -138,6 +140,8 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
private PayMeetingRemindMailRecordService meetingRemindMailRecordService;
|
||||
@Resource
|
||||
private IPayDraftingGroupService payDraftingGroupService;
|
||||
@Resource
|
||||
private IPayDraftingGroupSubItemContactsService draftingGroupSubItemContactsService;
|
||||
|
||||
/**
|
||||
* 新增会议
|
||||
@@ -683,6 +687,7 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
LambdaQueryWrapper<PayContactsManagement> wrapper = new LambdaQueryWrapper<>();
|
||||
List<String> contactsIdList = new ArrayList<>();
|
||||
String workingGroupId = null;
|
||||
String draftingGroupId = null;
|
||||
//工作组项目直接是人
|
||||
if (Objects.equals(projectType, 1)) {
|
||||
//把单位会员中所有的联系人取出
|
||||
@@ -727,7 +732,24 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
.setContactId(contactsId)
|
||||
);
|
||||
}
|
||||
}else {
|
||||
} else if (Objects.equals(projectType, 4)) {
|
||||
//把单位会员中所有的联系人取出
|
||||
draftingGroupId = publishReminderVO.getDraftingGroupId();
|
||||
LambdaQueryWrapper<PayDraftingGroupSubItemContacts> wrapper1 = new LambdaQueryWrapper<>();
|
||||
wrapper1.eq(PayDraftingGroupSubItemContacts::getDraftingGroupId, draftingGroupId);
|
||||
wrapper1.in(PayDraftingGroupSubItemContacts::getContactsId,subitemIds);
|
||||
List<PayDraftingGroupSubItemContacts> groupSubItemContactsList = draftingGroupSubItemContactsService.list(wrapper1);
|
||||
for (PayDraftingGroupSubItemContacts payDraftingGroupSubItemContacts : groupSubItemContactsList) {
|
||||
String groupSubItemId = payDraftingGroupSubItemContacts.getDraftingGroupSubId();
|
||||
String contactsId = payDraftingGroupSubItemContacts.getContactsId();
|
||||
contactsIdList.add(contactsId);
|
||||
meetingRemindRecordList.add(
|
||||
new PayMeetingRemindRecord()
|
||||
.setSubitemId(groupSubItemId)
|
||||
.setContactId(contactsId)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
throw new JeroBootException("项目类型不正确");
|
||||
}
|
||||
wrapper.in(PayContactsManagement::getId, contactsIdList);
|
||||
@@ -751,6 +773,13 @@ public class PayMeetingServiceImpl extends ServiceImpl<PayMeetingMapper, PayMeet
|
||||
LoginUser userById = sysBaseAPI.getUserById(principalIdA);
|
||||
fromUser = userById.getUsername();
|
||||
}
|
||||
//起草组项目用工作组负责人A发邮件
|
||||
if (Objects.nonNull(draftingGroupId)) {
|
||||
PayDraftingGroup draftingGroup = payDraftingGroupService.getById(draftingGroupId);
|
||||
String principalIdA = draftingGroup.getPrincipalIdA();
|
||||
LoginUser userById = sysBaseAPI.getUserById(principalIdA);
|
||||
fromUser = userById.getUsername();
|
||||
}
|
||||
//发送消息
|
||||
int success = list.size();
|
||||
int failed = 0;
|
||||
|
||||
@@ -23,6 +23,7 @@ public class PublishReminderVO {
|
||||
private Integer projectType;
|
||||
@ApiModelProperty(value = "是否发送邮件")
|
||||
private Integer sendEmailFlag;
|
||||
|
||||
@ApiModelProperty(value = "起草组id")
|
||||
private java.lang.String draftingGroupId;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user