提交diamond

dev_xds
姜玉琦 2024-04-09 21:46:07 +08:00
parent f8833cd1fd
commit 675007d23b
19 changed files with 512 additions and 203 deletions

View File

@ -15,7 +15,7 @@ ruoyi:
# 验证码类型 math 数字计算 char 字符验证 # 验证码类型 math 数字计算 char 字符验证
captchaType: math captchaType: math
# 服务回调地址 # 服务回调地址
projectUrl: http://127.0.0.1:8091/jhapi/ projectUrl: https://szgc.jhncidg.com
# 开发环境配置 # 开发环境配置
server: server:
# 服务器的HTTP端口默认为8080 # 服务器的HTTP端口默认为8080

View File

@ -15,7 +15,7 @@ ruoyi:
# 验证码类型 math 数字计算 char 字符验证 # 验证码类型 math 数字计算 char 字符验证
captchaType: math captchaType: math
# 服务回调地址 # 服务回调地址
projectUrl: http://127.0.0.1:8091/jhapi/ projectUrl: https://szgc.jhncidg.com
# 开发环境配置 # 开发环境配置
server: server:
# 服务器的HTTP端口默认为8080 # 服务器的HTTP端口默认为8080
@ -36,8 +36,8 @@ server:
#微信公众号配置 #微信公众号配置
wechat: wechat:
mpAppId: wx90a9158b6acc5584 mpAppId: wxe6fd9ad863ac09bf
mpAppSecret: ec23a5d78f12afa569c64794570d753c mpAppSecret: ed08e7f6f42a40fc9fa0ebbc1bc6a1db
wxAppId: wx9997d071b4996f23 wxAppId: wx9997d071b4996f23
wxAppSecret: 5bcc9ca17b31133d93a025871fc5021d wxAppSecret: 5bcc9ca17b31133d93a025871fc5021d

View File

@ -15,7 +15,7 @@ ruoyi:
# 验证码类型 math 数字计算 char 字符验证 # 验证码类型 math 数字计算 char 字符验证
captchaType: math captchaType: math
# 服务回调地址 # 服务回调地址
projectUrl: http://127.0.0.1:8091/jhapi/ projectUrl: https://szgc.jhncidg.com
# 开发环境配置 # 开发环境配置
server: server:
# 服务器的HTTP端口默认为8080 # 服务器的HTTP端口默认为8080
@ -38,7 +38,8 @@ server:
wechat: wechat:
mpAppId: wxe6fd9ad863ac09bf mpAppId: wxe6fd9ad863ac09bf
mpAppSecret: ed08e7f6f42a40fc9fa0ebbc1bc6a1db mpAppSecret: ed08e7f6f42a40fc9fa0ebbc1bc6a1db
wxAppId: wx9997d071b4996f23
wxAppSecret: 5bcc9ca17b31133d93a025871fc5021d
# 数据源配置 # 数据源配置
spring: spring:
datasource: datasource:

View File

@ -12,9 +12,11 @@ public enum MessageTypeEnum {
CSCLSP("30", "实测实量审批"), CSCLSP("30", "实测实量审批"),
JPYSSP("40", "举牌验收审批"), JPYSSP("40", "举牌验收审批"),
CLFYSP("50", "材料封样审批"), CLFYSP("50", "材料封样审批"),
QYFSSP("60", "取样复试审批"); QYFSSP("60", "取样复试审批"),
//工作流审批由ProcDefKey组成 GCSPCSBL("70", "办理工程审批超时提醒"),
GCSPCSCS("80", "抄送工程审批超时提醒");
//工作流审批由ProcDefKey组成
private final String code; private final String code;
private final String name; private final String name;

View File

@ -7,9 +7,11 @@ package com.ruoyi.common.enums;
*/ */
public enum TemplateMessageEnum { public enum TemplateMessageEnum {
TROUBLE_SUBMIT("f3saBGJCnUAjXHw1KooxEUuRGv-a_8MG9dXfQvkRTBE", "隐患整改通知"), TROUBLE_SUBMIT("f3saBGJCnUAjXHw1KooxEQOOiKEHlQxLIK-sPDgoL_E", "隐患整改通知"),
TROUBLE_HANDLE("6mGOWPXS3l5a5fzXd9GIV9_IkEfZmeJ_6G2P_SQkWnU", "隐患处理完成通知"), TROUBLE_HANDLE("6mGOWPXS3l5a5fzXd9GIV9_IkEfZmeJ_6G2P_SQkWnU", "隐患处理完成通知"),
APPLY_DEFAULT("KY7oAHgqFxUSaE3ByxFJfv_0U3LnSWfgUCwV-CZyEdo", "系统流程审批提醒"); APPLY_DEFAULT("KY7oAHgqFxUSaE3ByxFJfv_0U3LnSWfgUCwV-CZyEdo", "系统流程审批提醒"),
APPLY_EXPIRED_MY("MUAXGjyaNE-maYn6XSNycRfZfPtdVTxubqlT8lHcYqw", "办理流程审批超时提醒"),
APPLY_EXPIRED_COPY("MUAXGjyaNE-maYn6XSNyceRFN9h8nfIjKvyZTOLnKDE", "抄送流程审批超时提醒");
private final String id; private final String id;
private final String name; private final String name;

View File

@ -1,5 +1,6 @@
package com.ruoyi.flowable.listener; package com.ruoyi.flowable.listener;
import com.ruoyi.common.config.WechatAccountConfig;
import com.ruoyi.common.constant.CacheConstants; import com.ruoyi.common.constant.CacheConstants;
import com.ruoyi.common.core.domain.entity.SysDept; import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.entity.SysUser;
@ -125,6 +126,7 @@ public class GlobalEventListener extends AbstractFlowableEngineEventListener {
//模板数据 //模板数据
WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder() WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder()
.toUser(this.getMsgId(taskUser.getPhonenumber())) .toUser(this.getMsgId(taskUser.getPhonenumber()))
.miniProgram(new WxMpTemplateMessage.MiniProgram(WechatAccountConfig.getWxAppId(), "/pages/project_flowable/await/index?category="+taskEntity.getCategory()+"&barProId="+processInstance.getBusinessKey()))
.templateId(TemplateMessageEnum.APPLY_DEFAULT.getId()).build(); .templateId(TemplateMessageEnum.APPLY_DEFAULT.getId()).build();
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing14", this.getMsgProName(Convert.toLong(processInstance.getBusinessKey())))); templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing14", this.getMsgProName(Convert.toLong(processInstance.getBusinessKey()))));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing1", processInstance.getProcessDefinitionName())); templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing1", processInstance.getProcessDefinitionName()));
@ -139,6 +141,10 @@ public class GlobalEventListener extends AbstractFlowableEngineEventListener {
} }
} }
/**
* [使...使]
* @param event
*/
@Override @Override
protected void taskCompleted(FlowableEngineEntityEvent event) { protected void taskCompleted(FlowableEngineEntityEvent event) {
log.info("任务节点审批通过...{}",event.getProcessInstanceId()); log.info("任务节点审批通过...{}",event.getProcessInstanceId());

View File

@ -18,6 +18,26 @@ public interface TaskMapper {
*/ */
public List<Map<String, Object>> findDaysAwaitFlowTask(); public List<Map<String, Object>> findDaysAwaitFlowTask();
/**
* 3
*/
public List<Map<String, Object>> findDaysAwaitJpysList();
/**
* 3
*/
public List<Map<String, Object>> findDaysAwaitScslList();
/**
* 3
*/
public List<Map<String, Object>> findDaysAwaitQyfsList();
/**
* 3
*/
public List<Map<String, Object>> findDaysAwaitClfyList();
/** /**
* *
* @param businessKey * @param businessKey

View File

@ -13,10 +13,30 @@ import java.util.Map;
public interface ITaskService { public interface ITaskService {
/** /**
* 3 * 3
*/ */
public List<Map<String, Object>> findDaysAwaitFlowTask(); public List<Map<String, Object>> findDaysAwaitFlowTask();
/**
* 3
*/
public List<Map<String, Object>> findDaysAwaitJpysList();
/**
* 3
*/
public List<Map<String, Object>> findDaysAwaitScslList();
/**
* 3
*/
public List<Map<String, Object>> findDaysAwaitQyfsList();
/**
* 3
*/
public List<Map<String, Object>> findDaysAwaitClfyList();
/** /**
* *
* @param businessKey * @param businessKey

View File

@ -24,10 +24,43 @@ public class ITaskServiceImpl implements ITaskService {
/** /**
* 3 * 3
*/ */
@Override
public List<Map<String, Object>> findDaysAwaitFlowTask(){ public List<Map<String, Object>> findDaysAwaitFlowTask(){
return taskMapper.findDaysAwaitFlowTask(); return taskMapper.findDaysAwaitFlowTask();
} }
/**
* 3
*/
@Override
public List<Map<String, Object>> findDaysAwaitJpysList() {
return taskMapper.findDaysAwaitJpysList();
}
/**
* 3
*/
@Override
public List<Map<String, Object>> findDaysAwaitScslList(){
return taskMapper.findDaysAwaitScslList();
}
/**
* 3
*/
@Override
public List<Map<String, Object>> findDaysAwaitQyfsList(){
return taskMapper.findDaysAwaitQyfsList();
}
/**
* 3
*/
@Override
public List<Map<String, Object>> findDaysAwaitClfyList(){
return taskMapper.findDaysAwaitClfyList();
}
/** /**
* *
* @param businessKey * @param businessKey
@ -50,6 +83,7 @@ public class ITaskServiceImpl implements ITaskService {
* @param userName * @param userName
* @return openId * @return openId
*/ */
@Override
public List<Map<String, Object>> findSysUserOpenidsByUser(String userName) { public List<Map<String, Object>> findSysUserOpenidsByUser(String userName) {
return taskMapper.findSysUserOpenidsByUser(userName); return taskMapper.findSysUserOpenidsByUser(userName);
} }
@ -60,6 +94,7 @@ public class ITaskServiceImpl implements ITaskService {
* @param proId * @param proId
* @return openId * @return openId
*/ */
@Override
public List<Map<String, Object>> findMsgProMagUsers(Long proId) { public List<Map<String, Object>> findMsgProMagUsers(Long proId) {
return taskMapper.findMsgProMagUsers(proId); return taskMapper.findMsgProMagUsers(proId);
} }

View File

@ -1,9 +1,11 @@
package com.ruoyi.quartz.task; package com.ruoyi.quartz.task;
import com.ruoyi.common.config.WechatAccountConfig;
import com.ruoyi.common.constant.CacheConstants; import com.ruoyi.common.constant.CacheConstants;
import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.core.text.Convert; import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.enums.MessageTypeEnum;
import com.ruoyi.common.enums.TemplateMessageEnum; import com.ruoyi.common.enums.TemplateMessageEnum;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
@ -53,8 +55,9 @@ public class FlowTaskExpiredTask {
if (lock) {*/ if (lock) {*/
try { try {
log.info("劫持锁...{}...开始执行::工程审批超时提醒定时任务...{}"); log.info("劫持锁...{}...开始执行::工程审批超时提醒定时任务...{}");
List<Map<String, Object>> list = taskService.findDaysAwaitFlowTask(); List<WxMpTemplateMessage> list = new ArrayList<>();
for(Map<String, Object> dataMap:list){ List<Map<String, Object>> flowList = taskService.findDaysAwaitFlowTask();
for(Map<String, Object> dataMap:flowList){
List<String> candidateUsers = new ArrayList<>(); List<String> candidateUsers = new ArrayList<>();
List<String> candidateGroups = new ArrayList<>(); List<String> candidateGroups = new ArrayList<>();
if(StringUtils.isNotNull(dataMap.get("ASSIGNEE_"))){ if(StringUtils.isNotNull(dataMap.get("ASSIGNEE_"))){
@ -68,21 +71,21 @@ public class FlowTaskExpiredTask {
} }
String businessKey = Convert.toStr(dataMap.get("businessKey")); String businessKey = Convert.toStr(dataMap.get("businessKey"));
String businessKeyName = Convert.toStr(dataMap.get("businessKeyName")); String businessKeyName = Convert.toStr(dataMap.get("businessKeyName"));
String total = Convert.toStr(dataMap.get("total"));
List<SysUser> sysUserList = taskService.findFlowTaskUsers(businessKey,candidateUsers,candidateGroups); List<SysUser> sysUserList = taskService.findFlowTaskUsers(businessKey,candidateUsers,candidateGroups);
if(StringUtils.isNotEmpty(sysUserList)){ if(StringUtils.isNotEmpty(sysUserList)){
for(SysUser taskUser:sysUserList){ for(SysUser taskUser:sysUserList){
//模板数据 //模板数据
WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder() WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder()
.toUser(this.getMsgId(taskUser.getPhonenumber())) .toUser(this.getMsgId(taskUser.getPhonenumber()))
.templateId(TemplateMessageEnum.APPLY_DEFAULT.getId()).build(); .miniProgram(new WxMpTemplateMessage.MiniProgram(WechatAccountConfig.getWxAppId(), "/pages/project_flowable/await/index?category=1&barProId="+businessKey))
// templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing14", businessKeyName)); .templateId(TemplateMessageEnum.APPLY_EXPIRED_MY.getId()).build();
// templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing1", processInstance.getProcessDefinitionName())); templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing7", businessKeyName));
// templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing2", Objects.equals(taskEntity.getName(),"提交申请")?"申请审批驳回":"待"+taskEntity.getName())); templateMessage.addWxMpTemplateData(new WxMpTemplateData("character_string8", total));
// templateMessage.addWxMpTemplateData(new WxMpTemplateData("time4", DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS,processInstance.getStartTime()))); templateMessage.addWxMpTemplateData(new WxMpTemplateData("const9", "项目工程审批"));
// templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing10", sysUser.getNickName()+"["+this.getMsgDepName(sysUser.getDeptId())+"]")); list.add(templateMessage);
// list.add(templateMessage);
} }
//this.send(list,processInstance.getProcessDefinitionKey()); this.send(list,"EXPIRED_"+ MessageTypeEnum.GCSPCSBL.getCode());
} }
} }
} catch (Exception e) { } catch (Exception e) {
@ -98,6 +101,182 @@ public class FlowTaskExpiredTask {
}*/ }*/
} }
/**
* Flowable
* ::quartz.task.flowTaskExpiredTask.notifyExpiredData
* JiangYuQi
* @param
* @return
*/
public void notifyJpysExpiredData() {
/**String key = "quartz.task.flowTaskExpiredTask.notifyExpiredData";
boolean lock = redisLock.tryLock(key, Constants.REDIS_LOCK, TimeUnit.SECONDS);
if (lock) {*/
try {
log.info("劫持锁...{}...开始执行::工程审批超时提醒定时任务...{}");
List<WxMpTemplateMessage> list = new ArrayList<>();
List<Map<String, Object>> flowList = taskService.findDaysAwaitJpysList();
for(Map<String, Object> dataMap:flowList){
String projectId = Convert.toStr(dataMap.get("projectId"));
String projectName = Convert.toStr(dataMap.get("projectName"));
String superviseUser = Convert.toStr(dataMap.get("superviseUser"));
String total = Convert.toStr(dataMap.get("total"));
//模板数据
WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder()
.toUser(this.getMsgId(superviseUser))
.miniProgram(new WxMpTemplateMessage.MiniProgram(WechatAccountConfig.getWxAppId(), "/pageage/project_checking/list/index?barProId="+projectId))
.templateId(TemplateMessageEnum.APPLY_EXPIRED_MY.getId()).build();
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing7", projectName));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("character_string8", total));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("const9", "举牌验收审批"));
list.add(templateMessage);
}
this.send(list,"EXPIRED_"+ MessageTypeEnum.JPYSSP.getCode());
} catch (Exception e) {
log.info("任务执行异常...{}...::::结束执行...{}", e.getMessage());
throw e;
}
/**finally {
log.info("释放锁...{}", key);
redisLock.unlock(key);
}
}else{
log.info("尝试劫持锁失败...{}", key);
}*/
}
/**
* Flowable
* ::quartz.task.flowTaskExpiredTask.notifyExpiredData
* JiangYuQi
* @param
* @return
*/
public void notifyScslExpiredData() {
/**String key = "quartz.task.flowTaskExpiredTask.notifyExpiredData";
boolean lock = redisLock.tryLock(key, Constants.REDIS_LOCK, TimeUnit.SECONDS);
if (lock) {*/
try {
log.info("劫持锁...{}...开始执行::工程审批超时提醒定时任务...{}");
List<WxMpTemplateMessage> list = new ArrayList<>();
List<Map<String, Object>> flowList = taskService.findDaysAwaitScslList();
for(Map<String, Object> dataMap:flowList){
String projectId = Convert.toStr(dataMap.get("projectId"));
String projectName = Convert.toStr(dataMap.get("projectName"));
String superviseUser = Convert.toStr(dataMap.get("superviseUser"));
String total = Convert.toStr(dataMap.get("total"));
//模板数据
WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder()
.toUser(this.getMsgId(superviseUser))
.miniProgram(new WxMpTemplateMessage.MiniProgram(WechatAccountConfig.getWxAppId(), "/pageage/project_checking/list/index?barProId="+projectId))
.templateId(TemplateMessageEnum.APPLY_EXPIRED_MY.getId()).build();
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing7", projectName));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("character_string8", total));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("const9", "实测实量审批"));
list.add(templateMessage);
}
this.send(list,"EXPIRED_"+ MessageTypeEnum.CSCLSP.getCode());
} catch (Exception e) {
log.info("任务执行异常...{}...::::结束执行...{}", e.getMessage());
throw e;
}
/**finally {
log.info("释放锁...{}", key);
redisLock.unlock(key);
}
}else{
log.info("尝试劫持锁失败...{}", key);
}*/
}
/**
* Flowable
* ::quartz.task.flowTaskExpiredTask.notifyExpiredData
* JiangYuQi
* @param
* @return
*/
public void notifyQyfsExpiredData() {
/**String key = "quartz.task.flowTaskExpiredTask.notifyExpiredData";
boolean lock = redisLock.tryLock(key, Constants.REDIS_LOCK, TimeUnit.SECONDS);
if (lock) {*/
try {
log.info("劫持锁...{}...开始执行::工程审批超时提醒定时任务...{}");
List<WxMpTemplateMessage> list = new ArrayList<>();
List<Map<String, Object>> flowList = taskService.findDaysAwaitQyfsList();
for(Map<String, Object> dataMap:flowList){
String projectId = Convert.toStr(dataMap.get("projectId"));
String projectName = Convert.toStr(dataMap.get("projectName"));
String witnessUser = Convert.toStr(dataMap.get("witnessUser"));
String total = Convert.toStr(dataMap.get("total"));
//模板数据
WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder()
.toUser(this.getMsgId(witnessUser))
.miniProgram(new WxMpTemplateMessage.MiniProgram(WechatAccountConfig.getWxAppId(), "/pageage/project_checking/list/index?barProId="+projectId))
.templateId(TemplateMessageEnum.APPLY_EXPIRED_MY.getId()).build();
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing7", projectName));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("character_string8", total));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("const9", "材料取样复试审批"));
list.add(templateMessage);
}
this.send(list,"EXPIRED_"+ MessageTypeEnum.QYFSSP.getCode());
} catch (Exception e) {
log.info("任务执行异常...{}...::::结束执行...{}", e.getMessage());
throw e;
}
/**finally {
log.info("释放锁...{}", key);
redisLock.unlock(key);
}
}else{
log.info("尝试劫持锁失败...{}", key);
}*/
}
/**
* Flowable
* ::quartz.task.flowTaskExpiredTask.notifyExpiredData
* JiangYuQi
* @param
* @return
*/
public void notifyClfyExpiredData() {
/**String key = "quartz.task.flowTaskExpiredTask.notifyExpiredData";
boolean lock = redisLock.tryLock(key, Constants.REDIS_LOCK, TimeUnit.SECONDS);
if (lock) {*/
try {
log.info("劫持锁...{}...开始执行::工程审批超时提醒定时任务...{}");
List<WxMpTemplateMessage> list = new ArrayList<>();
List<Map<String, Object>> flowList = taskService.findDaysAwaitClfyList();
for(Map<String, Object> dataMap:flowList){
String projectId = Convert.toStr(dataMap.get("projectId"));
String projectName = Convert.toStr(dataMap.get("projectName"));
String witnessUser = Convert.toStr(dataMap.get("witnessUser"));
String total = Convert.toStr(dataMap.get("total"));
//模板数据
WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder()
.toUser(this.getMsgId(witnessUser))
.miniProgram(new WxMpTemplateMessage.MiniProgram(WechatAccountConfig.getWxAppId(), "/pageage/project_checking/list/index?barProId="+projectId))
.templateId(TemplateMessageEnum.APPLY_EXPIRED_MY.getId()).build();
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing7", projectName));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("character_string8", total));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("const9", "材料封样审批"));
list.add(templateMessage);
}
this.send(list,"EXPIRED_"+ MessageTypeEnum.CLFYSP.getCode());
} catch (Exception e) {
log.info("任务执行异常...{}...::::结束执行...{}", e.getMessage());
throw e;
}
/**finally {
log.info("释放锁...{}", key);
redisLock.unlock(key);
}
}else{
log.info("尝试劫持锁失败...{}", key);
}*/
}
/** /**
* *
* @param userName * @param userName

View File

@ -4,9 +4,41 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.quartz.mapper.TaskMapper"> <mapper namespace="com.ruoyi.quartz.mapper.TaskMapper">
<!--查询超时的代办任务--> <!--查询超时的代办任务流程-->
<select id="findDaysAwaitFlowTask" resultType="Map"> <select id="findDaysAwaitFlowTask" resultType="Map">
select fa.businessKey,fa.businessKeyName,fa.ASSIGNEE_,fa.USER_ID_,fa.GROUP_ID_,count(1) as total from vw_flow_await fa where fa.taskName !='提交申请' and fa.duration > 4320 GROUP BY fa.businessKey,fa.businessKeyName,fa.ASSIGNEE_,fa.USER_ID_,fa.GROUP_ID_ select fa.businessKey,fa.businessKeyName,fa.ASSIGNEE_,fa.USER_ID_,fa.GROUP_ID_,count(1) as total from vw_flow_await fa where fa.taskName !='提交申请' and fa.duration &gt; 4320 GROUP BY fa.businessKey,fa.businessKeyName,fa.ASSIGNEE_,fa.USER_ID_,fa.GROUP_ID_
</select>
<!--查询超时的代办举牌验收-->
<select id="findDaysAwaitJpysList" resultType="Map">
select spc.project_id as projectId,sp.projectName,spc.supervise_user as superviseUser,spc.supervise_user_name as superviseUserName, count(1) as total from sur_project_checking spc
left JOIN sur_project sp on sp.id = spc.project_id
where spc.approve_status=1 and spc.is_del=0 and spc.create_time &lt; DATE_SUB(NOW(),INTERVAL 3 DAY) GROUP BY spc.project_id,sp.projectName,spc.supervise_user,spc.supervise_user_name
ORDER BY spc.project_id
</select>
<!--查询超时的代办实测实量-->
<select id="findDaysAwaitScslList" resultType="Map">
select spc.project_id as projectId,sp.projectName,spc.supervise_user as superviseUser,spc.supervise_user_name as superviseUserName, count(1) as total from sur_project_measure spc
left JOIN sur_project sp on sp.id = spc.project_id
where spc.approve_status=1 and spc.is_del=0 and spc.create_time &lt; DATE_SUB(NOW(),INTERVAL 3 DAY) GROUP BY spc.project_id,sp.projectName,spc.supervise_user,spc.supervise_user_name
ORDER BY spc.project_id
</select>
<!--查询超时的代办取样复试-->
<select id="findDaysAwaitQyfsList" resultType="Map">
select spc.project_id as projectId,sp.projectName,spc.witness_user as witnessUser,spc.witness_user_name as witnessUserName, count(1) as total from sur_project_check_detection spc
left JOIN sur_project sp on sp.id = spc.project_id
where spc.approve_status=1 and spc.is_del=0 and spc.create_time &lt; DATE_SUB(NOW(),INTERVAL 3 DAY) GROUP BY spc.project_id,sp.projectName,spc.witness_user,spc.witness_user_name
ORDER BY spc.project_id
</select>
<!--查询超时的代办材料封样-->
<select id="findDaysAwaitClfyList" resultType="Map">
select spc.project_id as projectId,sp.projectName,spc.witness_user as witnessUser,spc.witness_user_name as witnessUserName, count(1) as total from sur_project_material_seal spc
left JOIN sur_project sp on sp.id = spc.project_id
where spc.approve_status=1 and spc.is_del=0 and spc.create_time &lt; DATE_SUB(NOW(),INTERVAL 3 DAY) GROUP BY spc.project_id,sp.projectName,spc.witness_user,spc.witness_user_name
ORDER BY spc.project_id
</select> </select>
<select id="findFlowTaskUsers" resultType="com.ruoyi.common.core.domain.entity.SysUser"> <select id="findFlowTaskUsers" resultType="com.ruoyi.common.core.domain.entity.SysUser">

View File

@ -1,5 +1,13 @@
import request from '@/utils/request' import request from '@/utils/request'
// 公众号授权
export function authorize() {
return request({
url: '/wxAuth/authorize',
method: 'get'
})
}
// 公众号绑定 // 公众号绑定
export function wxBinding(data) { export function wxBinding(data) {
return request({ return request({

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="upload-file" :class="'up-file-cnt-'+fileList.length"> <div class="upload-file" :class="'up-file-cnt-' + fileList.length">
<el-upload <el-upload
multiple multiple
:action="uploadFileUrl" :action="uploadFileUrl"
@ -19,20 +19,36 @@
<!-- 上传提示 --> <!-- 上传提示 -->
<div class="el-upload__tip" slot="tip" v-if="showTip"> <div class="el-upload__tip" slot="tip" v-if="showTip">
请上传 请上传
<template v-if="fileSize"> <b style="color: #f56c6c">{{ fileSize }}MB</b> </template> <template v-if="fileSize">
<template v-if="fileType"> <b style="color: #f56c6c">{{ fileType.join("/") }}</b> </template> 大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b>
</template>
<template v-if="fileType">
格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b>
</template>
的文件 的文件
</div> </div>
</el-upload> </el-upload>
<!-- 文件列表 --> <!-- 文件列表 -->
<transition-group class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul"> <transition-group
<li :key="file.url" class="el-upload-list__item ele-upload-list__item-content" v-for="(file, index) in fileList"> class="upload-file-list el-upload-list el-upload-list--text"
name="el-fade-in-linear"
tag="ul"
>
<li
:key="file.url"
class="el-upload-list__item ele-upload-list__item-content"
v-for="(file, index) in fileList"
>
<el-link :href="`${baseUrl}${file.url}`" :underline="false" target="_blank"> <el-link :href="`${baseUrl}${file.url}`" :underline="false" target="_blank">
<span class="el-icon-document"> {{showOriginal? file.original : getFileName(file.name) }} </span> <span class="el-icon-document">
{{ showOriginal ? file.original : getFileName(file.name) }}
</span>
</el-link> </el-link>
<div class="ele-upload-list__item-content-action"> <div class="ele-upload-list__item-content-action">
<el-link :underline="false" @click="handleDelete(index)" type="danger">删除</el-link> <el-link :underline="false" @click="handleDelete(index)" type="danger"
>删除</el-link
>
</div> </div>
</li> </li>
</transition-group> </transition-group>
@ -45,9 +61,9 @@ import { getToken } from "@/utils/auth";
export default { export default {
name: "FileUpload", name: "FileUpload",
props: { props: {
showOriginal:{ showOriginal: {
type:Boolean, type: Boolean,
default:false default: false,
}, },
// //
value: [String, Object, Array], value: [String, Object, Array],
@ -64,13 +80,31 @@ export default {
// , ['png', 'jpg', 'jpeg'] // , ['png', 'jpg', 'jpeg']
fileType: { fileType: {
type: Array, type: Array,
default: () => ["doc", "docx", "xls", "xlsx", "ppt", "pptx", "txt", "pdf", "png", "jpg", "jpeg", "mp4"], default: () => [
"doc",
"docx",
"xls",
"xlsx",
"ppt",
"pptx",
"txt",
"pdf",
"png",
"jpg",
"jpeg",
"mp4",
],
}, },
// //
isShowTip: { isShowTip: {
type: Boolean, type: Boolean,
default: true default: true,
} },
//
fileNameChk: {
type: Boolean,
default: true,
},
}, },
data() { data() {
return { return {
@ -90,9 +124,9 @@ export default {
if (val) { if (val) {
let temp = 1; let temp = 1;
// //
const list = Array.isArray(val) ? val : this.value.split(','); const list = Array.isArray(val) ? val : this.value.split(",");
// //
this.fileList = list.map(item => { this.fileList = list.map((item) => {
if (typeof item === "string") { if (typeof item === "string") {
item = { name: item, url: item }; item = { name: item, url: item };
} }
@ -105,8 +139,8 @@ export default {
} }
}, },
deep: true, deep: true,
immediate: true immediate: true,
} },
}, },
computed: { computed: {
// //
@ -119,11 +153,13 @@ export default {
handleBeforeUpload(file) { handleBeforeUpload(file) {
// //
if (this.fileType) { if (this.fileType) {
const fileName = file.name.split('.'); const fileName = file.name.split(".");
const fileExt = fileName[fileName.length - 1].toLocaleLowerCase(); const fileExt = fileName[fileName.length - 1].toLocaleLowerCase();
const isTypeOk = this.fileType.indexOf(fileExt) >= 0; const isTypeOk = this.fileType.indexOf(fileExt) >= 0;
if (!isTypeOk) { if (!isTypeOk) {
this.$modal.msgError(`文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`); this.$modal.msgError(
`文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`
);
return false; return false;
} }
} }
@ -135,6 +171,13 @@ export default {
return false; return false;
} }
} }
//
// if(this.fileNameChk){
// if (file.name.indexOf("[") > -1 || file.name.lastIndexOf("]")) {
// this.$modal.msgError(`[],!`);
// return false;
// }
// }
this.$modal.loading("正在上传文件,请稍候..."); this.$modal.loading("正在上传文件,请稍候...");
this.number++; this.number++;
return true; return true;
@ -146,12 +189,18 @@ export default {
// //
handleUploadError(err) { handleUploadError(err) {
this.$modal.msgError("上传文件失败,请重试"); this.$modal.msgError("上传文件失败,请重试");
this.$modal.closeLoading() this.$modal.closeLoading();
}, },
// //
handleUploadSuccess(res, file) { handleUploadSuccess(res, file) {
if (res.code === 200) { if (res.code === 200) {
this.uploadList.push({ name: res.fileName, url: res.fileName, original:file.name, size:file.size,fileInfo:res.file }); this.uploadList.push({
name: res.fileName,
url: res.fileName,
original: file.name,
size: file.size,
fileInfo: res.file,
});
this.uploadedSuccessfully(); this.uploadedSuccessfully();
} else { } else {
this.number--; this.number--;
@ -191,9 +240,9 @@ export default {
for (let i in list) { for (let i in list) {
strs += list[i].url + separator; strs += list[i].url + separator;
} }
return strs != '' ? strs.substr(0, strs.length - 1) : ''; return strs != "" ? strs.substr(0, strs.length - 1) : "";
} },
} },
}; };
</script> </script>

View File

@ -74,11 +74,6 @@ export default {
type: Boolean, type: Boolean,
default: true, default: true,
}, },
//
fileNameChk: {
type: Boolean,
default: true,
},
}, },
data() { data() {
return { return {
@ -160,12 +155,12 @@ export default {
return false; return false;
} }
} }
if(this.fileNameChk){ // if(this.fileNameChk){
if (file.name.lastIndexOf("[") > -1 || file.name.lastIndexOf("]")) { // if (file.name.lastIndexOf("[") > -1 || file.name.lastIndexOf("]")) {
this.$modal.msgError(`文件名中不能包含英文[],请修改为中文〔〕或【】!`); // this.$modal.msgError(`[],!`);
return false; // return false;
} // }
} // }
this.$modal.loading("正在上传图片,请稍候..."); this.$modal.loading("正在上传图片,请稍候...");
this.number++; this.number++;
}, },

View File

@ -24,7 +24,8 @@
</template> </template>
<script> <script>
import { wxBinding } from "@/api/wxsetting/wxAuth"; import Cookies from 'js-cookie'
import { authorize, wxBinding } from "@/api/wxsetting/wxAuth";
export default { export default {
name: "build", name: "build",
@ -36,10 +37,11 @@ export default {
}; };
}, },
created() { created() {
this.uId = this.getQueryString("userOpenId") || ""; this.uId = Cookies.get("userOpenId") || this.getQueryString("userOpenId");
if (this.uId == "") { if (!this.uId) {
this.errorVisible = true; this.errorVisible = true;
} else { } else {
Cookies.set("userOpenId",uId);
this.wechatLogin(); this.wechatLogin();
} }
}, },
@ -56,13 +58,7 @@ export default {
} else { } else {
// //
console.log("我要去登录了===>"); console.log("我要去登录了===>");
let _baseUrl = "https://szgc.jhncidg.com"; window.location.href = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxe6fd9ad863ac09bf&redirect_uri=https://szgc.jhncidg.com/jhapi/wxAuth/userInfo&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect";
window.location =
_baseUrl +
"/jhapi/wxAuth/authorize?returnUrl=" +
_baseUrl +
"/#/wxAuth?uid=" +
this.uId;
} }
}, },
saveBinding(uId, openId) { saveBinding(uId, openId) {

View File

@ -1,6 +1,7 @@
package com.yanzhu.jh.trouble.domain.vo; package com.yanzhu.jh.trouble.domain.vo;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.config.RuoYiConfig;
import com.yanzhu.jh.trouble.domain.SmzSspProblemmodify; import com.yanzhu.jh.trouble.domain.SmzSspProblemmodify;
import org.apache.poi.ss.usermodel.HorizontalAlignment; import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.IndexedColors; import org.apache.poi.ss.usermodel.IndexedColors;
@ -58,7 +59,7 @@ public class SmzSspProblemmodifyExport {
d.copySend=it.getCopySend(); d.copySend=it.getCopySend();
d.createBy=it.getCreateBy(); d.createBy=it.getCreateBy();
d.createTime=it.getCreateTime(); d.createTime=it.getCreateTime();
d.marksPicture="https://szgc.jhncidg.com"+it.getMarksPicture(); d.marksPicture= RuoYiConfig.getProjectUrl()+it.getMarksPicture();
return d; return d;
} }

View File

@ -44,36 +44,6 @@ public class WxAuthController extends BaseController {
@Autowired @Autowired
private ISysUserOpenidService sysUserOpenidService; private ISysUserOpenidService sysUserOpenidService;
@Anonymous
@GetMapping("/auth")
@ResponseBody
public String auth(@RequestParam(value = "echostr", defaultValue = "没有获取到") String echostr) {
return echostr;
}
@Anonymous
@ResponseBody
@GetMapping("/getWxAccessToken")
public AjaxResult getWxAccessToken(){
try {
return success(wxMpService.getAccessToken());
}catch (Exception e){
return error(e.getMessage());
}
}
@Anonymous
@ResponseBody
@GetMapping("/deleteTestCache")
public AjaxResult deleteTestCache(){
redisCache.deleteObject(CacheConstants.WX_MPMESSAGE_UNAME+"*");
redisCache.deleteObject(CacheConstants.WX_MPMESSAGE_PNAME+"*");
redisCache.deleteObject(CacheConstants.WX_MPMESSAGE_DNAME+"*");
redisCache.deleteObject(CacheConstants.WX_MPMESSAGE_P_SUP+"*");
redisCache.deleteObject(CacheConstants.WX_MPMESSAGE_P_MAG+"*");
return success();
}
/** /**
* @author tao * @author tao
* @param: * @param:
@ -82,19 +52,19 @@ public class WxAuthController extends BaseController {
*/ */
@Anonymous @Anonymous
@GetMapping("/authorize") @GetMapping("/authorize")
public void authorize(@RequestParam(value = "returnUrl", defaultValue = "https://szgc.jhncidg.com/jhapi/") String returnUrl, HttpServletResponse response) throws Exception { public void authorize(HttpServletResponse response) throws Exception {
log.info("【微信网页授权】进来了,参数={}", returnUrl); log.info("【微信网页授权】进来了,参数={}");
//1. 配置 //1. 配置
//2. 调用方法 //2. 调用方法
String url = RuoYiConfig.getProjectUrl() + "wxAuth/userInfo"; String url = RuoYiConfig.getProjectUrl() + "/jhapi/wxAuth/userInfo";
/* /*
* *
* URLEncoder.decode(returnUrl,"UTF-8" * URLEncoder.decode(returnUrl,"UTF-8"
* https://open.weixin.qq.com/connect/oauth2/authorize?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope=SCOPE&state=STATE#wechat_redirect * https://open.weixin.qq.com/connect/oauth2/authorize?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope=SCOPE&state=STATE#wechat_redirect
*/ */
String redirectUrl = wxMpService.oauth2buildAuthorizationUrl(url, WxConsts.OAUTH2_SCOPE_USER_INFO, URLEncoder.encode(returnUrl, "utf-8")); String redirectUrl = wxMpService.oauth2buildAuthorizationUrl(url, WxConsts.OAUTH2_SCOPE_USER_INFO, "/");
log.info("【微信网页授权】获取code,result={}", redirectUrl); log.info("【微信网页授权】获取code,result={}", redirectUrl);
response.sendRedirect(redirectUrl); response.sendRedirect(URLEncoder.encode(redirectUrl, "UTF-8"));
} }
/** /**
@ -105,8 +75,7 @@ public class WxAuthController extends BaseController {
*/ */
@Anonymous @Anonymous
@GetMapping("/userInfo") @GetMapping("/userInfo")
public void userInfo(@RequestParam("code") String code, public void userInfo(@RequestParam("code") String code,@RequestParam("state") String state,HttpServletResponse response) throws Exception {
@RequestParam("state") String returnUrl,HttpServletResponse response) throws Exception {
/*urlauthorization code /*urlauthorization code
codeaccess tokenopenid*/ codeaccess tokenopenid*/
WxMpOAuth2AccessToken wxMpOAuth2AccessToken = new WxMpOAuth2AccessToken(); WxMpOAuth2AccessToken wxMpOAuth2AccessToken = new WxMpOAuth2AccessToken();
@ -120,15 +89,16 @@ public class WxAuthController extends BaseController {
// 拿到openid // 拿到openid
String openId = wxMpOAuth2AccessToken.getOpenId(); String openId = wxMpOAuth2AccessToken.getOpenId();
String returnUrl = RuoYiConfig.getProjectUrl() + "/#/wxAuth?rd="+System.currentTimeMillis()+"&openid=" + openId;
returnUrl = URLEncoder.encode(returnUrl, "UTF-8");
log.info("【openid】{}", openId); log.info("【openid】{}", openId);
log.info("【我是前端要回调的地址:】{}", returnUrl + "&openid=" + openId); log.info("【我是前端要回调的地址:】{}", returnUrl);
// 顺便获取一下用户信息 // 顺便获取一下用户信息
WxMpUser wxMpUser = wxMpService.oauth2getUserInfo(wxMpOAuth2AccessToken, "zh_CN"); WxMpUser wxMpUser = wxMpService.oauth2getUserInfo(wxMpOAuth2AccessToken, "zh_CN");
log.info("【用户信息:】{}", wxMpUser.toString()); log.info("【用户信息:】{}", wxMpUser.toString());
//注意拼接参数,第一个参数需要加问号,之后参数使用&拼接的问题 //注意拼接参数,第一个参数需要加问号,之后参数使用&拼接的问题
//return "redirect:" + returnUrl + "/#/?openid=" + openId; //return "redirect:" + returnUrl + "/#/?openid=" + openId;
response.sendRedirect(returnUrl + "&rd="+System.currentTimeMillis()+"&openid=" + openId); response.sendRedirect(returnUrl);
} }
/** /**

View File

@ -70,47 +70,40 @@ public class WeChatMessageServiceImpl {
* *
*/ */
if(state==0){ if(state==0){
WxMpTemplateMessage mpTemplateMessage; /**
//通知整改人 *
mpTemplateMessage = new WxMpTemplateMessage(); *
mpTemplateMessage.setToUser(this.getMsgId(smzSspProblemmodify.getLordSentUser())); */
mpTemplateMessage.setTemplateId(TemplateMessageEnum.TROUBLE_SUBMIT.getId()); WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder()
//模板数据 .toUser(this.getMsgId(smzSspProblemmodify.getLordSentUser()))
List<WxMpTemplateData> datas = new ArrayList<>(); .templateId(TemplateMessageEnum.TROUBLE_SUBMIT.getId())
WxMpTemplateData data = new WxMpTemplateData(); .miniProgram(new WxMpTemplateMessage.MiniProgram(WechatAccountConfig.getWxAppId(), "/pageage/project_problemmodify/"+handlePath+"/list/index?barProId="+smzSspProblemmodify.getProjectId()))
data.setValue(this.getMsgProName(smzSspProblemmodify.getProjectId())); .build();
datas.add(data); templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing7", this.getMsgProName(smzSspProblemmodify.getProjectId())));
data.setValue(DateUtils.getTime()); templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing5", this.getMsgName(smzSspProblemmodify.getCreateUser())+""+DictUtils.getDictLabel("sys_ssp_yhfl",smzSspProblemmodify.getRoleType()+"")+""));
datas.add(data); templateMessage.addWxMpTemplateData(new WxMpTemplateData("time6", DateUtils.getTime()));
data.setValue(this.getMsgName(smzSspProblemmodify.getCreateUser())); templateMessage.addWxMpTemplateData(new WxMpTemplateData("time9", DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,smzSspProblemmodify.getNickedTime())));
datas.add(data); templateMessage.addWxMpTemplateData(new WxMpTemplateData("const10", infoTypeName+"/"+ DictUtils.getDictLabel(infoTypeDict,smzSspProblemmodify.getDangerType())));
data.setValue(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,smzSspProblemmodify.getNickedTime())); list.add(templateMessage);
datas.add(data);
data.setValue(infoTypeName+"-"+ DictUtils.getDictLabel(smzSspProblemmodify.getInfoType()==0?"ssp_aqyhlx":"ssp_zlyhlx",smzSspProblemmodify.getDangerType())); /**
datas.add(data); *
//TODO:这里缺少小程序跳转连接... */
mpTemplateMessage.setData(datas); if(StringUtils.isNotBlank(smzSspProblemmodify.getCopySendUser())){
list.add(mpTemplateMessage); String[] copySendUsers = smzSspProblemmodify.getCopySendUser().split(",");
for(String copySendUser:copySendUsers){
//通知抄送人 WxMpTemplateMessage copyTemplateMessage = WxMpTemplateMessage.builder()
mpTemplateMessage = new WxMpTemplateMessage(); .toUser(this.getMsgId(copySendUser))
mpTemplateMessage.setToUser(this.getMsgId(smzSspProblemmodify.getCopySendUser())); .templateId(TemplateMessageEnum.TROUBLE_SUBMIT.getId())
mpTemplateMessage.setTemplateId(TemplateMessageEnum.TROUBLE_HANDLE.getId()); .build();
//模板数据 copyTemplateMessage.addWxMpTemplateData(new WxMpTemplateData("thing7", this.getMsgProName(smzSspProblemmodify.getProjectId())));
datas = new ArrayList<>(); copyTemplateMessage.addWxMpTemplateData(new WxMpTemplateData("thing5", this.getMsgName(smzSspProblemmodify.getCreateUser())+""+DictUtils.getDictLabel("sys_ssp_yhfl",smzSspProblemmodify.getRoleType()+"")+""));
data.setValue(this.getMsgProName(smzSspProblemmodify.getProjectId())); copyTemplateMessage.addWxMpTemplateData(new WxMpTemplateData("time6", DateUtils.getTime()));
datas.add(data); copyTemplateMessage.addWxMpTemplateData(new WxMpTemplateData("time9", DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,smzSspProblemmodify.getNickedTime())));
data.setValue(DateUtils.getTime()); copyTemplateMessage.addWxMpTemplateData(new WxMpTemplateData("const10", infoTypeName+"/"+ DictUtils.getDictLabel(infoTypeDict,smzSspProblemmodify.getDangerType())));
datas.add(data); list.add(copyTemplateMessage);
data.setValue(this.getMsgName(smzSspProblemmodify.getCreateUser())); }
datas.add(data); }
data.setValue(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,smzSspProblemmodify.getNickedTime()));
datas.add(data);
data.setValue(infoTypeName+"-"+ DictUtils.getDictLabel(smzSspProblemmodify.getInfoType()==0?"ssp_aqyhlx":"ssp_zlyhlx",smzSspProblemmodify.getDangerType()));
datas.add(data);
mpTemplateMessage.setData(datas);
list.add(mpTemplateMessage);
} else if(state==1){ } else if(state==1){
/** /**
* *
@ -142,7 +135,7 @@ public class WeChatMessageServiceImpl {
templateMessage.addWxMpTemplateData(new WxMpTemplateData("const16", infoTypeName+"/"+ DictUtils.getDictLabel(infoTypeDict,smzSspProblemmodify.getDangerType()))); templateMessage.addWxMpTemplateData(new WxMpTemplateData("const16", infoTypeName+"/"+ DictUtils.getDictLabel(infoTypeDict,smzSspProblemmodify.getDangerType())));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing2", smzSspProblemmodify.getRecheckSend())); templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing2", smzSspProblemmodify.getRecheckSend()));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("time3", DateUtils.getTime())); templateMessage.addWxMpTemplateData(new WxMpTemplateData("time3", DateUtils.getTime()));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("const10", "隐患整改复检驳回,请重新提交整改")); templateMessage.addWxMpTemplateData(new WxMpTemplateData("const10", "隐患整改复检驳回,请重新提交整改"));
list.add(templateMessage); list.add(templateMessage);
} else if(state==4){ } else if(state==4){
/** /**
@ -192,7 +185,7 @@ public class WeChatMessageServiceImpl {
/** /**
* *
*/ */
templateMessage = WxMpTemplateMessage.builder() /**templateMessage = WxMpTemplateMessage.builder()
.toUser(this.getMsgProMagUsers(surProjectChecking.getProjectId())) .toUser(this.getMsgProMagUsers(surProjectChecking.getProjectId()))
.templateId(TemplateMessageEnum.APPLY_DEFAULT.getId()).build(); .templateId(TemplateMessageEnum.APPLY_DEFAULT.getId()).build();
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing14", this.getMsgProName(surProjectChecking.getProjectId()))); templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing14", this.getMsgProName(surProjectChecking.getProjectId())));
@ -200,13 +193,13 @@ public class WeChatMessageServiceImpl {
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing2", "待"+surProjectChecking.getSuperviseUserName()+"审批")); templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing2", "待"+surProjectChecking.getSuperviseUserName()+"审批"));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("time4", DateUtils.getTime())); templateMessage.addWxMpTemplateData(new WxMpTemplateData("time4", DateUtils.getTime()));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing10", this.getMsgName(surProjectChecking.getCreateBy())+"["+this.getMsgDepName(surProjectChecking.getDeptId())+"]")); templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing10", this.getMsgName(surProjectChecking.getCreateBy())+"["+this.getMsgDepName(surProjectChecking.getDeptId())+"]"));
list.add(templateMessage); list.add(templateMessage);*/
/** /**
* *
* *
*/ */
String _supMsgId = this.getMsgProSupUsers(surProjectChecking.getProjectId()); /**String _supMsgId = this.getMsgProSupUsers(surProjectChecking.getProjectId());
if(StringUtils.isEmpty(_supMsgId)){ if(StringUtils.isEmpty(_supMsgId)){
_supMsgId = ""; _supMsgId = "";
} }
@ -220,7 +213,7 @@ public class WeChatMessageServiceImpl {
templateMessage.addWxMpTemplateData(new WxMpTemplateData("time4", DateUtils.getTime())); templateMessage.addWxMpTemplateData(new WxMpTemplateData("time4", DateUtils.getTime()));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing10", this.getMsgName(surProjectChecking.getCreateBy())+"["+this.getMsgDepName(surProjectChecking.getDeptId())+"]")); templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing10", this.getMsgName(surProjectChecking.getCreateBy())+"["+this.getMsgDepName(surProjectChecking.getDeptId())+"]"));
list.add(templateMessage); list.add(templateMessage);
} }*/
}else if(Objects.equals(PublicStateEnum.AUDITINFO_SHTG.getCode(),stateStr)){ }else if(Objects.equals(PublicStateEnum.AUDITINFO_SHTG.getCode(),stateStr)){
/** /**
* *
@ -280,7 +273,7 @@ public class WeChatMessageServiceImpl {
/** /**
* *
*/ */
templateMessage = WxMpTemplateMessage.builder() /**templateMessage = WxMpTemplateMessage.builder()
.toUser(this.getMsgProMagUsers(surProjectMeasure.getProjectId())) .toUser(this.getMsgProMagUsers(surProjectMeasure.getProjectId()))
.templateId(TemplateMessageEnum.APPLY_DEFAULT.getId()).build(); .templateId(TemplateMessageEnum.APPLY_DEFAULT.getId()).build();
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing14", this.getMsgProName(surProjectMeasure.getProjectId()))); templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing14", this.getMsgProName(surProjectMeasure.getProjectId())));
@ -288,13 +281,13 @@ public class WeChatMessageServiceImpl {
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing2", "待"+surProjectMeasure.getSuperviseUserName()+"审批")); templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing2", "待"+surProjectMeasure.getSuperviseUserName()+"审批"));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("time4", DateUtils.getTime())); templateMessage.addWxMpTemplateData(new WxMpTemplateData("time4", DateUtils.getTime()));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing10", this.getMsgName(surProjectMeasure.getCreateBy())+"["+this.getMsgDepName(surProjectMeasure.getDeptId())+"]")); templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing10", this.getMsgName(surProjectMeasure.getCreateBy())+"["+this.getMsgDepName(surProjectMeasure.getDeptId())+"]"));
list.add(templateMessage); list.add(templateMessage);*/
/** /**
* *
* *
*/ */
String _supMsgId = this.getMsgProSupUsers(surProjectMeasure.getProjectId()); /**String _supMsgId = this.getMsgProSupUsers(surProjectMeasure.getProjectId());
if(StringUtils.isEmpty(_supMsgId)){ if(StringUtils.isEmpty(_supMsgId)){
_supMsgId = ""; _supMsgId = "";
} }
@ -308,7 +301,7 @@ public class WeChatMessageServiceImpl {
templateMessage.addWxMpTemplateData(new WxMpTemplateData("time4", DateUtils.getTime())); templateMessage.addWxMpTemplateData(new WxMpTemplateData("time4", DateUtils.getTime()));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing10", this.getMsgName(surProjectMeasure.getCreateBy())+"["+this.getMsgDepName(surProjectMeasure.getDeptId())+"]")); templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing10", this.getMsgName(surProjectMeasure.getCreateBy())+"["+this.getMsgDepName(surProjectMeasure.getDeptId())+"]"));
list.add(templateMessage); list.add(templateMessage);
} }*/
}else if(Objects.equals(PublicStateEnum.AUDITINFO_SHTG.getCode(),stateStr)){ }else if(Objects.equals(PublicStateEnum.AUDITINFO_SHTG.getCode(),stateStr)){
/** /**
* *
@ -368,7 +361,7 @@ public class WeChatMessageServiceImpl {
/** /**
* *
*/ */
templateMessage = WxMpTemplateMessage.builder() /**templateMessage = WxMpTemplateMessage.builder()
.toUser(this.getMsgProMagUsers(surProjectMaterialSeal.getProjectId())) .toUser(this.getMsgProMagUsers(surProjectMaterialSeal.getProjectId()))
.templateId(TemplateMessageEnum.APPLY_DEFAULT.getId()).build(); .templateId(TemplateMessageEnum.APPLY_DEFAULT.getId()).build();
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing14", this.getMsgProName(surProjectMaterialSeal.getProjectId()))); templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing14", this.getMsgProName(surProjectMaterialSeal.getProjectId())));
@ -376,13 +369,13 @@ public class WeChatMessageServiceImpl {
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing2", surProjectMaterialSeal.getWitnessUserName()+"审批")); templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing2", surProjectMaterialSeal.getWitnessUserName()+"审批"));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("time4", DateUtils.getTime())); templateMessage.addWxMpTemplateData(new WxMpTemplateData("time4", DateUtils.getTime()));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing10", this.getMsgName(surProjectMaterialSeal.getCreateBy())+"["+this.getMsgDepName(surProjectMaterialSeal.getDeptId())+"]")); templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing10", this.getMsgName(surProjectMaterialSeal.getCreateBy())+"["+this.getMsgDepName(surProjectMaterialSeal.getDeptId())+"]"));
list.add(templateMessage); list.add(templateMessage);*/
/** /**
* *
* *
*/ */
String _supMsgId = this.getMsgProSupUsers(surProjectMaterialSeal.getProjectId()); /**String _supMsgId = this.getMsgProSupUsers(surProjectMaterialSeal.getProjectId());
if(StringUtils.isEmpty(_supMsgId)){ if(StringUtils.isEmpty(_supMsgId)){
_supMsgId = ""; _supMsgId = "";
} }
@ -396,7 +389,7 @@ public class WeChatMessageServiceImpl {
templateMessage.addWxMpTemplateData(new WxMpTemplateData("time4", DateUtils.getTime())); templateMessage.addWxMpTemplateData(new WxMpTemplateData("time4", DateUtils.getTime()));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing10", this.getMsgName(surProjectMaterialSeal.getCreateBy())+"["+this.getMsgDepName(surProjectMaterialSeal.getDeptId())+"]")); templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing10", this.getMsgName(surProjectMaterialSeal.getCreateBy())+"["+this.getMsgDepName(surProjectMaterialSeal.getDeptId())+"]"));
list.add(templateMessage); list.add(templateMessage);
} }*/
}else if(Objects.equals(PublicStateEnum.AUDITINFO_SHTG.getCode(),stateStr)){ }else if(Objects.equals(PublicStateEnum.AUDITINFO_SHTG.getCode(),stateStr)){
/** /**
* *
@ -456,7 +449,7 @@ public class WeChatMessageServiceImpl {
/** /**
* *
*/ */
templateMessage = WxMpTemplateMessage.builder() /**templateMessage = WxMpTemplateMessage.builder()
.toUser(this.getMsgProMagUsers(surProjectCheckDetection.getProjectId())) .toUser(this.getMsgProMagUsers(surProjectCheckDetection.getProjectId()))
.templateId(TemplateMessageEnum.APPLY_DEFAULT.getId()).build(); .templateId(TemplateMessageEnum.APPLY_DEFAULT.getId()).build();
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing14", this.getMsgProName(surProjectCheckDetection.getProjectId()))); templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing14", this.getMsgProName(surProjectCheckDetection.getProjectId())));
@ -464,13 +457,13 @@ public class WeChatMessageServiceImpl {
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing2", surProjectCheckDetection.getWitnessUserName()+"审批")); templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing2", surProjectCheckDetection.getWitnessUserName()+"审批"));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("time4", DateUtils.getTime())); templateMessage.addWxMpTemplateData(new WxMpTemplateData("time4", DateUtils.getTime()));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing10", this.getMsgName(surProjectCheckDetection.getCreateBy())+"["+this.getMsgDepName(surProjectCheckDetection.getDeptId())+"]")); templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing10", this.getMsgName(surProjectCheckDetection.getCreateBy())+"["+this.getMsgDepName(surProjectCheckDetection.getDeptId())+"]"));
list.add(templateMessage); list.add(templateMessage);*/
/** /**
* *
* *
*/ */
String _supMsgId = this.getMsgProSupUsers(surProjectCheckDetection.getProjectId()); /**String _supMsgId = this.getMsgProSupUsers(surProjectCheckDetection.getProjectId());
if(StringUtils.isEmpty(_supMsgId)){ if(StringUtils.isEmpty(_supMsgId)){
_supMsgId = ""; _supMsgId = "";
} }
@ -484,7 +477,7 @@ public class WeChatMessageServiceImpl {
templateMessage.addWxMpTemplateData(new WxMpTemplateData("time4", DateUtils.getTime())); templateMessage.addWxMpTemplateData(new WxMpTemplateData("time4", DateUtils.getTime()));
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing10", this.getMsgName(surProjectCheckDetection.getCreateBy())+"["+this.getMsgDepName(surProjectCheckDetection.getDeptId())+"]")); templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing10", this.getMsgName(surProjectCheckDetection.getCreateBy())+"["+this.getMsgDepName(surProjectCheckDetection.getDeptId())+"]"));
list.add(templateMessage); list.add(templateMessage);
} }*/
}else if(Objects.equals(PublicStateEnum.AUDITINFO_SHTG.getCode(),stateStr)){ }else if(Objects.equals(PublicStateEnum.AUDITINFO_SHTG.getCode(),stateStr)){
/** /**
* *

View File

@ -66,42 +66,42 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
c.project_id,c.sub_dept_id,u.companyName,u.workTypeName,g.teamname groupName,g.companyName remark c.project_id,c.sub_dept_id,u.companyName,u.workTypeName,g.teamname groupName,g.companyName remark
FROM sur_project_attendance_user u,sur_project_attendance_cfg c,sur_project_attendance_group g FROM sur_project_attendance_user u,sur_project_attendance_cfg c,sur_project_attendance_group g
WHERE u.cfgid=c.id AND g.companyid=u.companyid AND u.vendors_code='jgw' WHERE u.cfgid=c.id AND g.companyid=u.companyid AND u.vendors_code='jgw'
<if test="cfgid != null "> and cfgid = #{cfgid}</if> <if test="cfgid != null "> and u.cfgid = #{cfgid}</if>
<if test="appId != null "> and app_id = #{appId}</if> <if test="appId != null "> and u.app_id = #{appId}</if>
<if test="vendorsCode != null and vendorsCode != ''"> and vendors_code = #{vendorsCode}</if> <if test="vendorsCode != null and vendorsCode != ''"> and u.vendors_code = #{vendorsCode}</if>
<if test="workerId != null "> and workerId = #{workerId}</if> <if test="workerId != null "> and u.workerId = #{workerId}</if>
<if test="laborWorkerId != null "> and laborWorkerId = #{laborWorkerId}</if> <if test="laborWorkerId != null "> and u.laborWorkerId = #{laborWorkerId}</if>
<if test="workerCategory != null "> and workerCategory = #{workerCategory}</if> <if test="workerCategory != null "> and u.workerCategory = #{workerCategory}</if>
<if test="qrCode != null "> and qrCode = #{qrCode}</if> <if test="qrCode != null "> and u.qrCode = #{qrCode}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> <if test="name != null and name != ''"> and u.name like concat('%', #{name}, '%')</if>
<if test="ethnic != null and ethnic != ''"> and ethnic = #{ethnic}</if> <if test="ethnic != null and ethnic != ''"> and u.ethnic = #{ethnic}</if>
<if test="nativePlace != null and nativePlace != ''"> and nativePlace = #{nativePlace}</if> <if test="nativePlace != null and nativePlace != ''"> and u.nativePlace = #{nativePlace}</if>
<if test="gender != null "> and gender = #{gender}</if> <if test="gender != null "> and u.gender = #{gender}</if>
<if test="birthDate != null "> and birthDate = #{birthDate}</if> <if test="birthDate != null "> and u.birthDate = #{birthDate}</if>
<if test="phone != null and phone != ''"> and phone = #{phone}</if> <if test="phone != null and phone != ''"> and u.phone = #{phone}</if>
<if test="degreeName != null and degreeName != ''"> and degreeName like concat('%', #{degreeName}, '%')</if> <if test="degreeName != null and degreeName != ''"> and u.degreeName like concat('%', #{degreeName}, '%')</if>
<if test="photo != null and photo != ''"> and photo = #{photo}</if> <if test="photo != null and photo != ''"> and u.photo = #{photo}</if>
<if test="recentPhoto != null and recentPhoto != ''"> and recentPhoto = #{recentPhoto}</if> <if test="recentPhoto != null and recentPhoto != ''"> and u.recentPhoto = #{recentPhoto}</if>
<if test="groupId != null "> and groupId = #{groupId}</if> <if test="groupId != null "> and u.groupId = #{groupId}</if>
<if test="groupName != null and groupName != ''"> and groupName like concat('%', #{groupName}, '%')</if> <if test="groupName != null and groupName != ''"> and u.groupName like concat('%', #{groupName}, '%')</if>
<if test="leader != null "> and leader = #{leader}</if> <if test="leader != null "> and u.leader = #{leader}</if>
<if test="workTypeCode != null and workTypeCode != ''"> and workTypeCode = #{workTypeCode}</if> <if test="workTypeCode != null and workTypeCode != ''"> and u.workTypeCode = #{workTypeCode}</if>
<if test="workTypeName != null and workTypeName != ''"> and workTypeName like concat('%', #{workTypeName}, '%')</if> <if test="workTypeName != null and workTypeName != ''"> and u.workTypeName like concat('%', #{workTypeName}, '%')</if>
<if test="specWorkType != null "> and specWorkType = #{specWorkType}</if> <if test="specWorkType != null "> and u.specWorkType = #{specWorkType}</if>
<if test="hatCode != null and hatCode != ''"> and hatCode = #{hatCode}</if> <if test="hatCode != null and hatCode != ''"> and u.hatCode = #{hatCode}</if>
<if test="state != null "> and state = #{state}</if> <if test="state != null "> and u.state = #{state}</if>
<if test="enterDate != null and enterDate != ''"> and enterDate = #{enterDate}</if> <if test="enterDate != null and enterDate != ''"> and u.enterDate = #{enterDate}</if>
<if test="exitDate != null and exitDate != ''"> and exitDate = #{exitDate}</if> <if test="exitDate != null and exitDate != ''"> and u.exitDate = #{exitDate}</if>
<if test="companyId != null "> and companyId = #{companyId}</if> <if test="companyId != null "> and u.companyId = #{companyId}</if>
<if test="companyName != null and companyName != ''"> and companyName like concat('%', #{companyName}, '%')</if> <if test="companyName != null and companyName != ''"> and u.companyName like concat('%', #{companyName}, '%')</if>
<if test="vendorId != null "> and vendorId = #{vendorId}</if> <if test="vendorId != null "> and u.vendorId = #{vendorId}</if>
<if test="teamId != null "> and teamId = #{teamId}</if> <if test="teamId != null "> and u.teamId = #{teamId}</if>
<if test="teamName != null and teamName != ''"> and teamName like concat('%', #{teamName}, '%')</if> <if test="teamName != null and teamName != ''"> and u.teamName like concat('%', #{teamName}, '%')</if>
<if test="enterType != null and enterType != ''"> and enterType = #{enterType}</if> <if test="enterType != null and enterType != ''"> and u.enterType = #{enterType}</if>
<if test="other != null and other != ''"> and other = #{other}</if> <if test="other != null and other != ''"> and u.other = #{other}</if>
<if test="projectId != null and projectId > 0 "> and project_id = #{projectId}</if> <if test="projectId != null and projectId > 0 "> and c.project_id = #{projectId}</if>
<if test="subDeptId != null and subDeptId >0 "> and sub_dept_id = #{subDeptId}</if> <if test="subDeptId != null and subDeptId >0 "> and c.sub_dept_id = #{subDeptId}</if>
<if test="isDel != null "> and is_del = #{isDel}</if> <if test="isDel != null "> and u.is_del = #{isDel}</if>
</select> </select>
<select id="selectSurProjectAttendanceUserList" parameterType="SurProjectAttendanceUser" resultMap="SurProjectAttendanceUserResult"> <select id="selectSurProjectAttendanceUserList" parameterType="SurProjectAttendanceUser" resultMap="SurProjectAttendanceUserResult">
<include refid="selectSurProjectAttendanceUserVo"/> <include refid="selectSurProjectAttendanceUserVo"/>
@ -162,7 +162,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select u.companyId,u.companyName,u.`name`,u.recentPhoto,u.gender,u.birthDate,u.ethnic,u.nativePlace,u.phone, select u.companyId,u.companyName,u.`name`,u.recentPhoto,u.gender,u.birthDate,u.ethnic,u.nativePlace,u.phone,
u.workTypeName,u.specWorkType,u.groupName,g.companyTypeId,u.workTypeCode u.workTypeName,u.specWorkType,u.groupName,g.companyTypeId,u.workTypeCode
from sur_project_attendance_user u from sur_project_attendance_user u
left join sur_project_attendance_group g on u.groupId = g.serverid and g.cfgid = u.cfgid left join sur_project_attendance_group g on (u.groupId = g.serverid or u.companyId = g.companyId) and g.cfgid = u.cfgid
where u.cfgid=#{cfgid} and u.workerId=#{workerId} ORDER BY u.id desc LIMIT 1 where u.cfgid=#{cfgid} and u.workerId=#{workerId} ORDER BY u.id desc LIMIT 1
</select> </select>