消息修改
This commit is contained in:
+12
@@ -1,6 +1,8 @@
|
||||
package com.jero.common.mapper;
|
||||
import com.jero.project.entity.PayCommonProject;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ProjectDetailMapper {
|
||||
/**
|
||||
* @Description 查询项目信息
|
||||
@@ -11,4 +13,14 @@ public interface ProjectDetailMapper {
|
||||
* @Exception
|
||||
*/
|
||||
PayCommonProject queryProject(String projectId);
|
||||
|
||||
/**
|
||||
* @Description 查询项目列表信息
|
||||
* @Author lqt
|
||||
* @Date 2021/9/14
|
||||
* @Param list 项目id集合
|
||||
* @Return
|
||||
* @Exception
|
||||
*/
|
||||
List<PayCommonProject> queryProjectList(List<String> list);
|
||||
}
|
||||
|
||||
+65
@@ -52,4 +52,69 @@
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="queryProjectList" resultType="com.jero.project.entity.PayCommonProject">
|
||||
<!-- 普通项目-->
|
||||
select c.id,c.charge_project, c.charge_use, c.principal_id,c.principal_name,c.contacts_temporary_id,c.contacts_temporary_name,c.charge_company_temporary_name,c.receivable_amount,c.paid_amount,c.need_invoice,c.pack,c.in_account,c.make_invoice,c.mail,c.create_time,1 as projectType,'' as phone,'' as email,c.remarks,c.contract_num,c.charge_company_temporary_id,c.charge_way,c.files
|
||||
from pay_common_project c
|
||||
<where>
|
||||
<if test="list != null and list.size() > 0">
|
||||
AND c.id in
|
||||
<foreach collection="list" index="index" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
<!--工作组项目-->
|
||||
UNION ALL
|
||||
select gsub.id,g.working_group_project, gsub.charge_use, g.principal_id_a,g.principal_name_a,gsub.contacts_temporary_id_one,gsub.contacts_temporary_name_one,gsub.charge_company_temporary_name,gsub.receivable_amount,gsub.paid_amount,gsub.need_invoice,gsub.pack,gsub.in_account,gsub.make_invoice,gsub.mail,gsub.create_time,2,'','',gsub.remarks,gsub.contract_num,gsub.charge_company_temporary_id,gsub.charge_way,''
|
||||
from pay_working_group g
|
||||
inner join pay_working_group_subitem gsub on g.id = gsub.working_group_id
|
||||
<where>
|
||||
<if test="list != null and list.size() > 0">
|
||||
AND gsub.id in
|
||||
<foreach collection="list" index="index" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
<!-- 会议项目-->
|
||||
UNION ALL
|
||||
select sit.id,meeting.meeting_name,sit.charge_use, meeting.director_id, meeting.director_name,sit.company_contact_temporary_id,sit.company_contact_name,sit.company_name,sit.amount_receivable,sit.paid_amount,sit.need_invoice,sit.pack,sit.in_account,sit.make_invoice,sit.mail,sit.create_time,3,'','',sit.remark,'',sit.company_temporary_id,sit.pay_mode,''
|
||||
from pay_meeting meeting
|
||||
inner join pay_meeting_situation sit on meeting.id = sit.meeting_id
|
||||
<where>
|
||||
<if test="list != null and list.size() > 0">
|
||||
AND sit.id in
|
||||
<foreach collection="list" index="index" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
<!-- 会员项目-->
|
||||
UNION ALL
|
||||
select msub.id,pmp.project_name,msub.charge_use,pmp.director_id,pmp.director_name,msub.company_contact_temporary_id,msub.company_contact_name,msub.company_name,msub.amount_receivable,msub.paid_amount,msub.need_invoice,msub.pack,msub.in_account,msub.make_invoice,msub.mail,msub.create_time,4,'','',msub.remark,msub.contract_no,msub.company_temporary_id,msub.payment_method,''
|
||||
from pay_member_project pmp
|
||||
inner join pay_member_project_subitem msub on pmp.id = msub.project_id
|
||||
<where>
|
||||
<if test="list != null and list.size() > 0">
|
||||
AND msub.id in
|
||||
<foreach collection="list" index="index" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
<!-- 标协会员项目-->
|
||||
UNION ALL
|
||||
select tmsub.id,tmember.project_name,tmsub.charge_use,'','',tmsub.liaison_man_id,tmsub.liaison_man,tmsub.company_name,tmsub.amount_receivable,tmsub.paid_amount,tmsub.invoice_requirements,tmsub.pack,tmsub.in_account,tmsub.make_invoice,tmsub.mail,tmsub.create_time,5,tmsub.mobile,tmsub.email,'','',tmsub.company_id,tmsub.payment_method,''
|
||||
from tb_member_project tmember
|
||||
inner join tb_member_project_subitem tmsub on tmember.id=tmsub.project_id
|
||||
<where>
|
||||
<if test="list != null and list.size() > 0">
|
||||
AND tmsub.id in
|
||||
<foreach collection="list" index="index" item="item" open="(" close=")" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
+2
-1
@@ -7,8 +7,9 @@ public interface ContractCreateProjectSendMessageService {
|
||||
* @Date 2021/9/24
|
||||
* @Param projectName 项目名称
|
||||
* @Param projectId 项目id
|
||||
* @Param userId 用户id
|
||||
* @Return
|
||||
* @Exception
|
||||
*/
|
||||
void ContractCreateProjectSendMessageService(String projectName,String projectId);
|
||||
void ContractCreateProjectSendMessageService(String projectName,String projectId,String userId);
|
||||
}
|
||||
|
||||
+11
-1
@@ -2,8 +2,10 @@ package com.jero.common.service;
|
||||
|
||||
import com.jero.common.vo.ProjectDetailVO;
|
||||
import com.jero.common.vo.ProjectStatusVO;
|
||||
import com.jero.project.entity.PayCommonProject;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
public interface ProjectDetailService {
|
||||
|
||||
@@ -16,7 +18,15 @@ public interface ProjectDetailService {
|
||||
* @Exception
|
||||
*/
|
||||
ProjectDetailVO getProjectDetail(String projectId);
|
||||
|
||||
/**
|
||||
* @Description 查询项目列表信息
|
||||
* @Author lqt
|
||||
* @Date 2021/9/14
|
||||
* @Param list 项目id集合
|
||||
* @Return
|
||||
* @Exception
|
||||
*/
|
||||
List<PayCommonProject> queryProjectList(List<String> list);
|
||||
/**
|
||||
* @Description 获取变更应收金额之后的状态
|
||||
* @Author lqt
|
||||
|
||||
+26
-23
@@ -20,6 +20,7 @@ import org.springframework.stereotype.Service;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@Service
|
||||
public class ContractCreateProjectSendMessageServiceImpl implements ContractCreateProjectSendMessageService {
|
||||
@@ -30,29 +31,31 @@ public class ContractCreateProjectSendMessageServiceImpl implements ContractCrea
|
||||
private SendMessageService sendMessageService;
|
||||
|
||||
@Override
|
||||
public void ContractCreateProjectSendMessageService(String projectName,String projectId) {
|
||||
// 获取项目负责人,发送消息
|
||||
List<SysUser> list = sysUserService.getRolesUser(Arrays.asList(RoleCommon.XMFZR));
|
||||
if(!CollectionUtils.isEmpty(list)){
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
list.forEach(p->{
|
||||
// 发送消息
|
||||
SendMessageDTO sendMessageDTO = new SendMessageDTO();
|
||||
if(!StringUtils.isBlank(p.getEmail())){
|
||||
sendMessageDTO.setEmail(PasswordUtil.decrypt(p.getEmail()));
|
||||
}
|
||||
HashMap<String,String> map = new HashMap<>();
|
||||
map.put("projectName",projectName);
|
||||
sendMessageDTO.setFromUser(sysUser.getUsername());
|
||||
sendMessageDTO.setToUser(p.getUsername());
|
||||
sendMessageDTO.setTemplateCode(ManagementMessageEnums.MSG1.getCode());
|
||||
sendMessageDTO.setTemplateParam(map);
|
||||
sendMessageDTO.setBusType("M_OPEN_TYPE1");
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("id",projectId);
|
||||
sendMessageDTO.setBusId(json.toJSONString());
|
||||
sendMessageService.SendMessageService(sendMessageDTO);
|
||||
});
|
||||
public void ContractCreateProjectSendMessageService(String projectName,String projectId,String userId) {
|
||||
if(StringUtils.isEmpty(userId)){
|
||||
return;
|
||||
}
|
||||
SysUser sysUserDetail = sysUserService.getById(userId);
|
||||
if(Objects.isNull(sysUserDetail)){
|
||||
return;
|
||||
}
|
||||
// 获取项目负责人,发送消息
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
// 发送消息
|
||||
SendMessageDTO sendMessageDTO = new SendMessageDTO();
|
||||
if(!StringUtils.isBlank(sysUserDetail.getEmail())){
|
||||
sendMessageDTO.setEmail(PasswordUtil.decrypt(sysUserDetail.getEmail()));
|
||||
}
|
||||
HashMap<String,String> map = new HashMap<>();
|
||||
map.put("projectName",projectName);
|
||||
sendMessageDTO.setFromUser(sysUser.getUsername());
|
||||
sendMessageDTO.setToUser(sysUserDetail.getUsername());
|
||||
sendMessageDTO.setTemplateCode(ManagementMessageEnums.MSG1.getCode());
|
||||
sendMessageDTO.setTemplateParam(map);
|
||||
sendMessageDTO.setBusType("M_OPEN_TYPE1");
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("id",projectId);
|
||||
sendMessageDTO.setBusId(json.toJSONString());
|
||||
sendMessageService.SendMessageService(sendMessageDTO);
|
||||
}
|
||||
}
|
||||
|
||||
+5
@@ -195,6 +195,11 @@ public class ProjectDetailServiceImpl implements ProjectDetailService {
|
||||
return projectDetailVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PayCommonProject> queryProjectList(List<String> list) {
|
||||
return projectDetailMapper.queryProjectList(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProjectStatusVO getStatus(String projectId, BigDecimal receivableAmount,Integer needInvoice) {
|
||||
if(StringUtils.isBlank(projectId)){
|
||||
|
||||
-1
@@ -9,7 +9,6 @@ import com.jero.common.enums.MessageUrlEnums;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.service.SendMessageService;
|
||||
import com.jero.common.system.api.ISysBaseAPI;
|
||||
import com.jero.common.util.SysAnnmentTypeEnum;
|
||||
import com.jero.common.util.oConvertUtils;
|
||||
import com.jero.modules.message.entity.SysMessageTemplate;
|
||||
import com.jero.modules.message.handle.impl.EmailSendMsgHandle;
|
||||
|
||||
Reference in New Issue
Block a user