提交代码
parent
895c8df662
commit
65c562bdd8
|
@ -2,6 +2,7 @@ package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.ruoyi.system.domain.SysUserOpenid;
|
import com.ruoyi.system.domain.SysUserOpenid;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户绑定小程序openIdMapper接口
|
* 用户绑定小程序openIdMapper接口
|
||||||
|
@ -55,9 +56,10 @@ public interface SysUserOpenidMapper
|
||||||
* 查询用户绑定小程序openId列表[项目经理]
|
* 查询用户绑定小程序openId列表[项目经理]
|
||||||
*
|
*
|
||||||
* @param proId 项目信息
|
* @param proId 项目信息
|
||||||
|
* @param deptId 总包单位信息
|
||||||
* @return 用户绑定小程序openId集合
|
* @return 用户绑定小程序openId集合
|
||||||
*/
|
*/
|
||||||
public List<SysUserOpenid> findMsgProOrgUsers(Long proId);
|
public List<SysUserOpenid> findMsgProOrgUsers(@Param("proId") Long proId, @Param("deptId") Long deptId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询用户绑定小程序openId列表[项目甲代]
|
* 查询用户绑定小程序openId列表[项目甲代]
|
||||||
|
|
|
@ -50,7 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
from sys_user_openid suo
|
from sys_user_openid suo
|
||||||
left join sys_user su on su.phonenumber = suo.loginName
|
left join sys_user su on su.phonenumber = suo.loginName
|
||||||
left join sur_project_userinfo spu on spu.user_id = su.user_id
|
left join sur_project_userinfo spu on spu.user_id = su.user_id
|
||||||
where spu.project_id = #{proId} and spu.job_type=24 and spu.is_del = 0 and su.del_flag = '0' and suo.isDel=0
|
where spu.project_id = #{proId} and spu.dept_id = #{deptId} and spu.job_type=24 and spu.is_del = 0 and su.del_flag = '0' and suo.isDel=0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="findMsgProMagUsers" parameterType="Long" resultMap="SysUserOpenidResult">
|
<select id="findMsgProMagUsers" parameterType="Long" resultMap="SysUserOpenidResult">
|
||||||
|
|
|
@ -5,6 +5,8 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.ruoyi.common.annotation.Excel;
|
import com.ruoyi.common.annotation.Excel;
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 劳资投诉对象 flow_labour_info
|
* 劳资投诉对象 flow_labour_info
|
||||||
*
|
*
|
||||||
|
@ -60,7 +62,7 @@ public class FlowLabourInfo extends BaseEntity
|
||||||
|
|
||||||
/** 欠薪金额 */
|
/** 欠薪金额 */
|
||||||
@Excel(name = "欠薪金额")
|
@Excel(name = "欠薪金额")
|
||||||
private Long laborAmount;
|
private BigDecimal laborAmount;
|
||||||
|
|
||||||
/** 欠薪原因说明 */
|
/** 欠薪原因说明 */
|
||||||
@Excel(name = "欠薪原因说明")
|
@Excel(name = "欠薪原因说明")
|
||||||
|
@ -177,12 +179,12 @@ public class FlowLabourInfo extends BaseEntity
|
||||||
{
|
{
|
||||||
return laborNumber;
|
return laborNumber;
|
||||||
}
|
}
|
||||||
public void setLaborAmount(Long laborAmount)
|
public void setLaborAmount(BigDecimal laborAmount)
|
||||||
{
|
{
|
||||||
this.laborAmount = laborAmount;
|
this.laborAmount = laborAmount;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getLaborAmount()
|
public BigDecimal getLaborAmount()
|
||||||
{
|
{
|
||||||
return laborAmount;
|
return laborAmount;
|
||||||
}
|
}
|
||||||
|
|
|
@ -588,7 +588,7 @@ public class WeChatMessageServiceImpl {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 取样复试操作时推送信息
|
* 劳资投诉时推送信息
|
||||||
* @param flowLabourInfo
|
* @param flowLabourInfo
|
||||||
*/
|
*/
|
||||||
@Async
|
@Async
|
||||||
|
@ -599,7 +599,7 @@ public class WeChatMessageServiceImpl {
|
||||||
/**
|
/**
|
||||||
* 项目经理审批
|
* 项目经理审批
|
||||||
*/
|
*/
|
||||||
String supMsgId = this.getMsgProOrgUsers(flowLabourInfo.getProjectId());
|
String supMsgId = this.getMsgProOrgUsers(flowLabourInfo.getProjectId(),flowLabourInfo.getDeptId());
|
||||||
//模板数据
|
//模板数据
|
||||||
WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder()
|
WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder()
|
||||||
.toUser(supMsgId)
|
.toUser(supMsgId)
|
||||||
|
@ -670,13 +670,13 @@ public class WeChatMessageServiceImpl {
|
||||||
* @param proId
|
* @param proId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private String getMsgProOrgUsers(Long proId){
|
private String getMsgProOrgUsers(Long proId,Long deptId){
|
||||||
List<SysUserOpenid> list = redisCache.getCacheObject(CacheConstants.WX_MPMESSAGE_P_ORG +proId);
|
List<SysUserOpenid> list = redisCache.getCacheObject(CacheConstants.WX_MPMESSAGE_P_ORG +proId);
|
||||||
if(list!=null){
|
if(list!=null){
|
||||||
List<String> strs = list.stream().map(SysUserOpenid :: getMsgOpenId).collect(Collectors.toList());
|
List<String> strs = list.stream().map(SysUserOpenid :: getMsgOpenId).collect(Collectors.toList());
|
||||||
return String.join(",",strs);
|
return String.join(",",strs);
|
||||||
}else{
|
}else{
|
||||||
list = sysUserOpenidMapper.findMsgProOrgUsers(proId);
|
list = sysUserOpenidMapper.findMsgProOrgUsers(proId,deptId);
|
||||||
if(StringUtils.isNotEmpty(list)){
|
if(StringUtils.isNotEmpty(list)){
|
||||||
//设置30分钟有效期
|
//设置30分钟有效期
|
||||||
redisCache.setCacheObject(CacheConstants.WX_MPMESSAGE_P_ORG +proId,list,30, TimeUnit.MINUTES);
|
redisCache.setCacheObject(CacheConstants.WX_MPMESSAGE_P_ORG +proId,list,30, TimeUnit.MINUTES);
|
||||||
|
|
Loading…
Reference in New Issue