提交diamond
parent
f8833cd1fd
commit
675007d23b
|
@ -15,7 +15,7 @@ ruoyi:
|
|||
# 验证码类型 math 数字计算 char 字符验证
|
||||
captchaType: math
|
||||
# 服务回调地址
|
||||
projectUrl: http://127.0.0.1:8091/jhapi/
|
||||
projectUrl: https://szgc.jhncidg.com
|
||||
# 开发环境配置
|
||||
server:
|
||||
# 服务器的HTTP端口,默认为8080
|
||||
|
|
|
@ -15,7 +15,7 @@ ruoyi:
|
|||
# 验证码类型 math 数字计算 char 字符验证
|
||||
captchaType: math
|
||||
# 服务回调地址
|
||||
projectUrl: http://127.0.0.1:8091/jhapi/
|
||||
projectUrl: https://szgc.jhncidg.com
|
||||
# 开发环境配置
|
||||
server:
|
||||
# 服务器的HTTP端口,默认为8080
|
||||
|
@ -36,8 +36,8 @@ server:
|
|||
|
||||
#微信公众号配置
|
||||
wechat:
|
||||
mpAppId: wx90a9158b6acc5584
|
||||
mpAppSecret: ec23a5d78f12afa569c64794570d753c
|
||||
mpAppId: wxe6fd9ad863ac09bf
|
||||
mpAppSecret: ed08e7f6f42a40fc9fa0ebbc1bc6a1db
|
||||
wxAppId: wx9997d071b4996f23
|
||||
wxAppSecret: 5bcc9ca17b31133d93a025871fc5021d
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ ruoyi:
|
|||
# 验证码类型 math 数字计算 char 字符验证
|
||||
captchaType: math
|
||||
# 服务回调地址
|
||||
projectUrl: http://127.0.0.1:8091/jhapi/
|
||||
projectUrl: https://szgc.jhncidg.com
|
||||
# 开发环境配置
|
||||
server:
|
||||
# 服务器的HTTP端口,默认为8080
|
||||
|
@ -38,7 +38,8 @@ server:
|
|||
wechat:
|
||||
mpAppId: wxe6fd9ad863ac09bf
|
||||
mpAppSecret: ed08e7f6f42a40fc9fa0ebbc1bc6a1db
|
||||
|
||||
wxAppId: wx9997d071b4996f23
|
||||
wxAppSecret: 5bcc9ca17b31133d93a025871fc5021d
|
||||
# 数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
|
|
|
@ -12,9 +12,11 @@ public enum MessageTypeEnum {
|
|||
CSCLSP("30", "实测实量审批"),
|
||||
JPYSSP("40", "举牌验收审批"),
|
||||
CLFYSP("50", "材料封样审批"),
|
||||
QYFSSP("60", "取样复试审批");
|
||||
//工作流审批由ProcDefKey组成
|
||||
QYFSSP("60", "取样复试审批"),
|
||||
GCSPCSBL("70", "办理工程审批超时提醒"),
|
||||
GCSPCSCS("80", "抄送工程审批超时提醒");
|
||||
|
||||
//工作流审批由ProcDefKey组成
|
||||
private final String code;
|
||||
private final String name;
|
||||
|
||||
|
|
|
@ -7,9 +7,11 @@ package com.ruoyi.common.enums;
|
|||
*/
|
||||
public enum TemplateMessageEnum {
|
||||
|
||||
TROUBLE_SUBMIT("f3saBGJCnUAjXHw1KooxEUuRGv-a_8MG9dXfQvkRTBE", "隐患整改通知"),
|
||||
TROUBLE_SUBMIT("f3saBGJCnUAjXHw1KooxEQOOiKEHlQxLIK-sPDgoL_E", "隐患整改通知"),
|
||||
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 name;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.ruoyi.flowable.listener;
|
||||
|
||||
import com.ruoyi.common.config.WechatAccountConfig;
|
||||
import com.ruoyi.common.constant.CacheConstants;
|
||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
|
@ -125,6 +126,7 @@ public class GlobalEventListener extends AbstractFlowableEngineEventListener {
|
|||
//模板数据
|
||||
WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder()
|
||||
.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();
|
||||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing14", this.getMsgProName(Convert.toLong(processInstance.getBusinessKey()))));
|
||||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing1", processInstance.getProcessDefinitionName()));
|
||||
|
@ -139,6 +141,10 @@ public class GlobalEventListener extends AbstractFlowableEngineEventListener {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务完成时监听器[暂未使用...统一使用任务创建]
|
||||
* @param event
|
||||
*/
|
||||
@Override
|
||||
protected void taskCompleted(FlowableEngineEntityEvent event) {
|
||||
log.info("任务节点审批通过...{}",event.getProcessInstanceId());
|
||||
|
|
|
@ -18,6 +18,26 @@ public interface TaskMapper {
|
|||
*/
|
||||
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 流程归属表单
|
||||
|
|
|
@ -13,10 +13,30 @@ import java.util.Map;
|
|||
public interface ITaskService {
|
||||
|
||||
/**
|
||||
* 查询超时3天未办理的任务
|
||||
* 查询超时3天未办理的流程任务
|
||||
*/
|
||||
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 流程归属表单
|
||||
|
|
|
@ -24,10 +24,43 @@ public class ITaskServiceImpl implements ITaskService {
|
|||
/**
|
||||
* 查询超时3天未办理的任务
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> 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 流程归属表单
|
||||
|
@ -50,6 +83,7 @@ public class ITaskServiceImpl implements ITaskService {
|
|||
* @param userName 用户登录名
|
||||
* @return 用户绑定小程序openId集合
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> findSysUserOpenidsByUser(String userName) {
|
||||
return taskMapper.findSysUserOpenidsByUser(userName);
|
||||
}
|
||||
|
@ -60,6 +94,7 @@ public class ITaskServiceImpl implements ITaskService {
|
|||
* @param proId 项目信息
|
||||
* @return 用户绑定小程序openId集合
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> findMsgProMagUsers(Long proId) {
|
||||
return taskMapper.findMsgProMagUsers(proId);
|
||||
}
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
package com.ruoyi.quartz.task;
|
||||
|
||||
import com.ruoyi.common.config.WechatAccountConfig;
|
||||
import com.ruoyi.common.constant.CacheConstants;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.enums.MessageTypeEnum;
|
||||
import com.ruoyi.common.enums.TemplateMessageEnum;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
|
@ -53,8 +55,9 @@ public class FlowTaskExpiredTask {
|
|||
if (lock) {*/
|
||||
try {
|
||||
log.info("劫持锁...{}...开始执行::工程审批超时提醒定时任务...{}");
|
||||
List<Map<String, Object>> list = taskService.findDaysAwaitFlowTask();
|
||||
for(Map<String, Object> dataMap:list){
|
||||
List<WxMpTemplateMessage> list = new ArrayList<>();
|
||||
List<Map<String, Object>> flowList = taskService.findDaysAwaitFlowTask();
|
||||
for(Map<String, Object> dataMap:flowList){
|
||||
List<String> candidateUsers = new ArrayList<>();
|
||||
List<String> candidateGroups = new ArrayList<>();
|
||||
if(StringUtils.isNotNull(dataMap.get("ASSIGNEE_"))){
|
||||
|
@ -68,21 +71,21 @@ public class FlowTaskExpiredTask {
|
|||
}
|
||||
String businessKey = Convert.toStr(dataMap.get("businessKey"));
|
||||
String businessKeyName = Convert.toStr(dataMap.get("businessKeyName"));
|
||||
String total = Convert.toStr(dataMap.get("total"));
|
||||
List<SysUser> sysUserList = taskService.findFlowTaskUsers(businessKey,candidateUsers,candidateGroups);
|
||||
if(StringUtils.isNotEmpty(sysUserList)){
|
||||
for(SysUser taskUser:sysUserList){
|
||||
//模板数据
|
||||
WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder()
|
||||
.toUser(this.getMsgId(taskUser.getPhonenumber()))
|
||||
.templateId(TemplateMessageEnum.APPLY_DEFAULT.getId()).build();
|
||||
// templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing14", businessKeyName));
|
||||
// templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing1", processInstance.getProcessDefinitionName()));
|
||||
// templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing2", Objects.equals(taskEntity.getName(),"提交申请")?"申请审批驳回":"待"+taskEntity.getName()));
|
||||
// templateMessage.addWxMpTemplateData(new WxMpTemplateData("time4", DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS,processInstance.getStartTime())));
|
||||
// templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing10", sysUser.getNickName()+"["+this.getMsgDepName(sysUser.getDeptId())+"]"));
|
||||
// list.add(templateMessage);
|
||||
.miniProgram(new WxMpTemplateMessage.MiniProgram(WechatAccountConfig.getWxAppId(), "/pages/project_flowable/await/index?category=1&barProId="+businessKey))
|
||||
.templateId(TemplateMessageEnum.APPLY_EXPIRED_MY.getId()).build();
|
||||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing7", businessKeyName));
|
||||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("character_string8", total));
|
||||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("const9", "项目工程审批"));
|
||||
list.add(templateMessage);
|
||||
}
|
||||
//this.send(list,processInstance.getProcessDefinitionKey());
|
||||
this.send(list,"EXPIRED_"+ MessageTypeEnum.GCSPCSBL.getCode());
|
||||
}
|
||||
}
|
||||
} 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
|
||||
|
|
|
@ -4,9 +4,41 @@
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.quartz.mapper.TaskMapper">
|
||||
|
||||
<!--查询超时的代办任务-->
|
||||
<!--查询超时的代办任务流程-->
|
||||
<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 > 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 < 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 < 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 < 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 < 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="findFlowTaskUsers" resultType="com.ruoyi.common.core.domain.entity.SysUser">
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 公众号授权
|
||||
export function authorize() {
|
||||
return request({
|
||||
url: '/wxAuth/authorize',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 公众号绑定
|
||||
export function wxBinding(data) {
|
||||
return request({
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="upload-file" :class="'up-file-cnt-'+fileList.length">
|
||||
<div class="upload-file" :class="'up-file-cnt-' + fileList.length">
|
||||
<el-upload
|
||||
multiple
|
||||
:action="uploadFileUrl"
|
||||
|
@ -19,20 +19,36 @@
|
|||
<!-- 上传提示 -->
|
||||
<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="fileType"> 格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b> </template>
|
||||
<template v-if="fileSize">
|
||||
大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b>
|
||||
</template>
|
||||
<template v-if="fileType">
|
||||
格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b>
|
||||
</template>
|
||||
的文件
|
||||
</div>
|
||||
</el-upload>
|
||||
|
||||
<!-- 文件列表 -->
|
||||
<transition-group 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">
|
||||
<transition-group
|
||||
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">
|
||||
<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>
|
||||
<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>
|
||||
</li>
|
||||
</transition-group>
|
||||
|
@ -45,9 +61,9 @@ import { getToken } from "@/utils/auth";
|
|||
export default {
|
||||
name: "FileUpload",
|
||||
props: {
|
||||
showOriginal:{
|
||||
type:Boolean,
|
||||
default:false
|
||||
showOriginal: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
// 值
|
||||
value: [String, Object, Array],
|
||||
|
@ -64,13 +80,31 @@ export default {
|
|||
// 文件类型, 例如['png', 'jpg', 'jpeg']
|
||||
fileType: {
|
||||
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: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
default: true,
|
||||
},
|
||||
// 文件名是否效验
|
||||
fileNameChk: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -90,9 +124,9 @@ export default {
|
|||
if (val) {
|
||||
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") {
|
||||
item = { name: item, url: item };
|
||||
}
|
||||
|
@ -105,8 +139,8 @@ export default {
|
|||
}
|
||||
},
|
||||
deep: true,
|
||||
immediate: true
|
||||
}
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
// 是否显示提示
|
||||
|
@ -119,11 +153,13 @@ export default {
|
|||
handleBeforeUpload(file) {
|
||||
// 校检文件类型
|
||||
if (this.fileType) {
|
||||
const fileName = file.name.split('.');
|
||||
const fileName = file.name.split(".");
|
||||
const fileExt = fileName[fileName.length - 1].toLocaleLowerCase();
|
||||
const isTypeOk = this.fileType.indexOf(fileExt) >= 0;
|
||||
if (!isTypeOk) {
|
||||
this.$modal.msgError(`文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`);
|
||||
this.$modal.msgError(
|
||||
`文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`
|
||||
);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -135,6 +171,13 @@ export default {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
//文件名称效验
|
||||
// if(this.fileNameChk){
|
||||
// if (file.name.indexOf("[") > -1 || file.name.lastIndexOf("]")) {
|
||||
// this.$modal.msgError(`文件名中不能包含英文[],请修改为中文〔〕或【】!`);
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
this.$modal.loading("正在上传文件,请稍候...");
|
||||
this.number++;
|
||||
return true;
|
||||
|
@ -146,12 +189,18 @@ export default {
|
|||
// 上传失败
|
||||
handleUploadError(err) {
|
||||
this.$modal.msgError("上传文件失败,请重试");
|
||||
this.$modal.closeLoading()
|
||||
this.$modal.closeLoading();
|
||||
},
|
||||
// 上传成功回调
|
||||
handleUploadSuccess(res, file) {
|
||||
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();
|
||||
} else {
|
||||
this.number--;
|
||||
|
@ -191,9 +240,9 @@ export default {
|
|||
for (let i in list) {
|
||||
strs += list[i].url + separator;
|
||||
}
|
||||
return strs != '' ? strs.substr(0, strs.length - 1) : '';
|
||||
}
|
||||
}
|
||||
return strs != "" ? strs.substr(0, strs.length - 1) : "";
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
@ -74,11 +74,6 @@ export default {
|
|||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
// 文件名是否效验
|
||||
fileNameChk: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -160,12 +155,12 @@ export default {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
if(this.fileNameChk){
|
||||
if (file.name.lastIndexOf("[") > -1 || file.name.lastIndexOf("]")) {
|
||||
this.$modal.msgError(`文件名中不能包含英文[],请修改为中文〔〕或【】!`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// if(this.fileNameChk){
|
||||
// if (file.name.lastIndexOf("[") > -1 || file.name.lastIndexOf("]")) {
|
||||
// this.$modal.msgError(`文件名中不能包含英文[],请修改为中文〔〕或【】!`);
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
this.$modal.loading("正在上传图片,请稍候...");
|
||||
this.number++;
|
||||
},
|
||||
|
|
|
@ -24,7 +24,8 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { wxBinding } from "@/api/wxsetting/wxAuth";
|
||||
import Cookies from 'js-cookie'
|
||||
import { authorize, wxBinding } from "@/api/wxsetting/wxAuth";
|
||||
|
||||
export default {
|
||||
name: "build",
|
||||
|
@ -36,10 +37,11 @@ export default {
|
|||
};
|
||||
},
|
||||
created() {
|
||||
this.uId = this.getQueryString("userOpenId") || "";
|
||||
if (this.uId == "") {
|
||||
this.uId = Cookies.get("userOpenId") || this.getQueryString("userOpenId");
|
||||
if (!this.uId) {
|
||||
this.errorVisible = true;
|
||||
} else {
|
||||
Cookies.set("userOpenId",uId);
|
||||
this.wechatLogin();
|
||||
}
|
||||
},
|
||||
|
@ -56,13 +58,7 @@ export default {
|
|||
} else {
|
||||
// 如果绑定了,返回成功
|
||||
console.log("我要去登录了===>");
|
||||
let _baseUrl = "https://szgc.jhncidg.com";
|
||||
window.location =
|
||||
_baseUrl +
|
||||
"/jhapi/wxAuth/authorize?returnUrl=" +
|
||||
_baseUrl +
|
||||
"/#/wxAuth?uid=" +
|
||||
this.uId;
|
||||
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";
|
||||
}
|
||||
},
|
||||
saveBinding(uId, openId) {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.yanzhu.jh.trouble.domain.vo;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.config.RuoYiConfig;
|
||||
import com.yanzhu.jh.trouble.domain.SmzSspProblemmodify;
|
||||
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
||||
import org.apache.poi.ss.usermodel.IndexedColors;
|
||||
|
@ -58,7 +59,7 @@ public class SmzSspProblemmodifyExport {
|
|||
d.copySend=it.getCopySend();
|
||||
d.createBy=it.getCreateBy();
|
||||
d.createTime=it.getCreateTime();
|
||||
d.marksPicture="https://szgc.jhncidg.com"+it.getMarksPicture();
|
||||
d.marksPicture= RuoYiConfig.getProjectUrl()+it.getMarksPicture();
|
||||
return d;
|
||||
}
|
||||
|
||||
|
|
|
@ -44,36 +44,6 @@ public class WxAuthController extends BaseController {
|
|||
@Autowired
|
||||
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
|
||||
* @param: :
|
||||
|
@ -82,19 +52,19 @@ public class WxAuthController extends BaseController {
|
|||
*/
|
||||
@Anonymous
|
||||
@GetMapping("/authorize")
|
||||
public void authorize(@RequestParam(value = "returnUrl", defaultValue = "https://szgc.jhncidg.com/jhapi/") String returnUrl, HttpServletResponse response) throws Exception {
|
||||
log.info("【微信网页授权】进来了,参数={}", returnUrl);
|
||||
public void authorize(HttpServletResponse response) throws Exception {
|
||||
log.info("【微信网页授权】进来了,参数={}");
|
||||
//1. 配置
|
||||
//2. 调用方法
|
||||
String url = RuoYiConfig.getProjectUrl() + "wxAuth/userInfo";
|
||||
String url = RuoYiConfig.getProjectUrl() + "/jhapi/wxAuth/userInfo";
|
||||
/*
|
||||
* 相当于这种形式
|
||||
* 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
|
||||
*/
|
||||
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);
|
||||
response.sendRedirect(redirectUrl);
|
||||
response.sendRedirect(URLEncoder.encode(redirectUrl, "UTF-8"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -105,8 +75,7 @@ public class WxAuthController extends BaseController {
|
|||
*/
|
||||
@Anonymous
|
||||
@GetMapping("/userInfo")
|
||||
public void userInfo(@RequestParam("code") String code,
|
||||
@RequestParam("state") String returnUrl,HttpServletResponse response) throws Exception {
|
||||
public void userInfo(@RequestParam("code") String code,@RequestParam("state") String state,HttpServletResponse response) throws Exception {
|
||||
/*当用户同意授权后,会回调所设置的url并把authorization code传过来,
|
||||
然后用这个code获得access token,其中也包含用户的openid等信息*/
|
||||
WxMpOAuth2AccessToken wxMpOAuth2AccessToken = new WxMpOAuth2AccessToken();
|
||||
|
@ -120,15 +89,16 @@ public class WxAuthController extends BaseController {
|
|||
|
||||
// 拿到openid
|
||||
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("【我是前端要回调的地址:】{}", returnUrl + "&openid=" + openId);
|
||||
log.info("【我是前端要回调的地址:】{}", returnUrl);
|
||||
// 顺便获取一下用户信息
|
||||
WxMpUser wxMpUser = wxMpService.oauth2getUserInfo(wxMpOAuth2AccessToken, "zh_CN");
|
||||
log.info("【用户信息:】{}", wxMpUser.toString());
|
||||
|
||||
//注意拼接参数,第一个参数需要加问号,之后参数使用&拼接的问题
|
||||
//return "redirect:" + returnUrl + "/#/?openid=" + openId;
|
||||
response.sendRedirect(returnUrl + "&rd="+System.currentTimeMillis()+"&openid=" + openId);
|
||||
response.sendRedirect(returnUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -70,47 +70,40 @@ public class WeChatMessageServiceImpl {
|
|||
* 提交隐患通知整改人
|
||||
*/
|
||||
if(state==0){
|
||||
WxMpTemplateMessage mpTemplateMessage;
|
||||
//通知整改人
|
||||
mpTemplateMessage = new WxMpTemplateMessage();
|
||||
mpTemplateMessage.setToUser(this.getMsgId(smzSspProblemmodify.getLordSentUser()));
|
||||
mpTemplateMessage.setTemplateId(TemplateMessageEnum.TROUBLE_SUBMIT.getId());
|
||||
//模板数据
|
||||
List<WxMpTemplateData> datas = new ArrayList<>();
|
||||
WxMpTemplateData data = new WxMpTemplateData();
|
||||
data.setValue(this.getMsgProName(smzSspProblemmodify.getProjectId()));
|
||||
datas.add(data);
|
||||
data.setValue(DateUtils.getTime());
|
||||
datas.add(data);
|
||||
data.setValue(this.getMsgName(smzSspProblemmodify.getCreateUser()));
|
||||
datas.add(data);
|
||||
data.setValue(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,smzSspProblemmodify.getNickedTime()));
|
||||
datas.add(data);
|
||||
/**
|
||||
* 复检人驳回整改
|
||||
* 消息通知整改人
|
||||
*/
|
||||
WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder()
|
||||
.toUser(this.getMsgId(smzSspProblemmodify.getLordSentUser()))
|
||||
.templateId(TemplateMessageEnum.TROUBLE_SUBMIT.getId())
|
||||
.miniProgram(new WxMpTemplateMessage.MiniProgram(WechatAccountConfig.getWxAppId(), "/pageage/project_problemmodify/"+handlePath+"/list/index?barProId="+smzSspProblemmodify.getProjectId()))
|
||||
.build();
|
||||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing7", this.getMsgProName(smzSspProblemmodify.getProjectId())));
|
||||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing5", this.getMsgName(smzSspProblemmodify.getCreateUser())+"〔"+DictUtils.getDictLabel("sys_ssp_yhfl",smzSspProblemmodify.getRoleType()+"")+"〕"));
|
||||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("time6", DateUtils.getTime()));
|
||||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("time9", DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,smzSspProblemmodify.getNickedTime())));
|
||||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("const10", infoTypeName+"/"+ DictUtils.getDictLabel(infoTypeDict,smzSspProblemmodify.getDangerType())));
|
||||
list.add(templateMessage);
|
||||
|
||||
data.setValue(infoTypeName+"-"+ DictUtils.getDictLabel(smzSspProblemmodify.getInfoType()==0?"ssp_aqyhlx":"ssp_zlyhlx",smzSspProblemmodify.getDangerType()));
|
||||
datas.add(data);
|
||||
//TODO:这里缺少小程序跳转连接...
|
||||
mpTemplateMessage.setData(datas);
|
||||
list.add(mpTemplateMessage);
|
||||
|
||||
//通知抄送人
|
||||
mpTemplateMessage = new WxMpTemplateMessage();
|
||||
mpTemplateMessage.setToUser(this.getMsgId(smzSspProblemmodify.getCopySendUser()));
|
||||
mpTemplateMessage.setTemplateId(TemplateMessageEnum.TROUBLE_HANDLE.getId());
|
||||
//模板数据
|
||||
datas = new ArrayList<>();
|
||||
data.setValue(this.getMsgProName(smzSspProblemmodify.getProjectId()));
|
||||
datas.add(data);
|
||||
data.setValue(DateUtils.getTime());
|
||||
datas.add(data);
|
||||
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);
|
||||
/**
|
||||
* 通知抄送人
|
||||
*/
|
||||
if(StringUtils.isNotBlank(smzSspProblemmodify.getCopySendUser())){
|
||||
String[] copySendUsers = smzSspProblemmodify.getCopySendUser().split(",");
|
||||
for(String copySendUser:copySendUsers){
|
||||
WxMpTemplateMessage copyTemplateMessage = WxMpTemplateMessage.builder()
|
||||
.toUser(this.getMsgId(copySendUser))
|
||||
.templateId(TemplateMessageEnum.TROUBLE_SUBMIT.getId())
|
||||
.build();
|
||||
copyTemplateMessage.addWxMpTemplateData(new WxMpTemplateData("thing7", this.getMsgProName(smzSspProblemmodify.getProjectId())));
|
||||
copyTemplateMessage.addWxMpTemplateData(new WxMpTemplateData("thing5", this.getMsgName(smzSspProblemmodify.getCreateUser())+"〔"+DictUtils.getDictLabel("sys_ssp_yhfl",smzSspProblemmodify.getRoleType()+"")+"〕"));
|
||||
copyTemplateMessage.addWxMpTemplateData(new WxMpTemplateData("time6", DateUtils.getTime()));
|
||||
copyTemplateMessage.addWxMpTemplateData(new WxMpTemplateData("time9", DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD,smzSspProblemmodify.getNickedTime())));
|
||||
copyTemplateMessage.addWxMpTemplateData(new WxMpTemplateData("const10", infoTypeName+"/"+ DictUtils.getDictLabel(infoTypeDict,smzSspProblemmodify.getDangerType())));
|
||||
list.add(copyTemplateMessage);
|
||||
}
|
||||
}
|
||||
} 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("thing2", smzSspProblemmodify.getRecheckSend()));
|
||||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("time3", DateUtils.getTime()));
|
||||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("const10", "隐患整改复检驳回,请重新提交整改。"));
|
||||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("const10", "隐患整改复检驳回,请重新提交整改"));
|
||||
list.add(templateMessage);
|
||||
} else if(state==4){
|
||||
/**
|
||||
|
@ -192,7 +185,7 @@ public class WeChatMessageServiceImpl {
|
|||
/**
|
||||
* 抄送项目甲代
|
||||
*/
|
||||
templateMessage = WxMpTemplateMessage.builder()
|
||||
/**templateMessage = WxMpTemplateMessage.builder()
|
||||
.toUser(this.getMsgProMagUsers(surProjectChecking.getProjectId()))
|
||||
.templateId(TemplateMessageEnum.APPLY_DEFAULT.getId()).build();
|
||||
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("time4", DateUtils.getTime()));
|
||||
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)){
|
||||
_supMsgId = "";
|
||||
}
|
||||
|
@ -220,7 +213,7 @@ public class WeChatMessageServiceImpl {
|
|||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("time4", DateUtils.getTime()));
|
||||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing10", this.getMsgName(surProjectChecking.getCreateBy())+"["+this.getMsgDepName(surProjectChecking.getDeptId())+"]"));
|
||||
list.add(templateMessage);
|
||||
}
|
||||
}*/
|
||||
}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()))
|
||||
.templateId(TemplateMessageEnum.APPLY_DEFAULT.getId()).build();
|
||||
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("time4", DateUtils.getTime()));
|
||||
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)){
|
||||
_supMsgId = "";
|
||||
}
|
||||
|
@ -308,7 +301,7 @@ public class WeChatMessageServiceImpl {
|
|||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("time4", DateUtils.getTime()));
|
||||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing10", this.getMsgName(surProjectMeasure.getCreateBy())+"["+this.getMsgDepName(surProjectMeasure.getDeptId())+"]"));
|
||||
list.add(templateMessage);
|
||||
}
|
||||
}*/
|
||||
}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()))
|
||||
.templateId(TemplateMessageEnum.APPLY_DEFAULT.getId()).build();
|
||||
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("time4", DateUtils.getTime()));
|
||||
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)){
|
||||
_supMsgId = "";
|
||||
}
|
||||
|
@ -396,7 +389,7 @@ public class WeChatMessageServiceImpl {
|
|||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("time4", DateUtils.getTime()));
|
||||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing10", this.getMsgName(surProjectMaterialSeal.getCreateBy())+"["+this.getMsgDepName(surProjectMaterialSeal.getDeptId())+"]"));
|
||||
list.add(templateMessage);
|
||||
}
|
||||
}*/
|
||||
}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()))
|
||||
.templateId(TemplateMessageEnum.APPLY_DEFAULT.getId()).build();
|
||||
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("time4", DateUtils.getTime()));
|
||||
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)){
|
||||
_supMsgId = "";
|
||||
}
|
||||
|
@ -484,7 +477,7 @@ public class WeChatMessageServiceImpl {
|
|||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("time4", DateUtils.getTime()));
|
||||
templateMessage.addWxMpTemplateData(new WxMpTemplateData("thing10", this.getMsgName(surProjectCheckDetection.getCreateBy())+"["+this.getMsgDepName(surProjectCheckDetection.getDeptId())+"]"));
|
||||
list.add(templateMessage);
|
||||
}
|
||||
}*/
|
||||
}else if(Objects.equals(PublicStateEnum.AUDITINFO_SHTG.getCode(),stateStr)){
|
||||
/**
|
||||
* 审批通过
|
||||
|
|
|
@ -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
|
||||
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'
|
||||
<if test="cfgid != null "> and cfgid = #{cfgid}</if>
|
||||
<if test="appId != null "> and app_id = #{appId}</if>
|
||||
<if test="vendorsCode != null and vendorsCode != ''"> and vendors_code = #{vendorsCode}</if>
|
||||
<if test="workerId != null "> and workerId = #{workerId}</if>
|
||||
<if test="laborWorkerId != null "> and laborWorkerId = #{laborWorkerId}</if>
|
||||
<if test="workerCategory != null "> and workerCategory = #{workerCategory}</if>
|
||||
<if test="qrCode != null "> and qrCode = #{qrCode}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="ethnic != null and ethnic != ''"> and ethnic = #{ethnic}</if>
|
||||
<if test="nativePlace != null and nativePlace != ''"> and nativePlace = #{nativePlace}</if>
|
||||
<if test="gender != null "> and gender = #{gender}</if>
|
||||
<if test="birthDate != null "> and birthDate = #{birthDate}</if>
|
||||
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
||||
<if test="degreeName != null and degreeName != ''"> and degreeName like concat('%', #{degreeName}, '%')</if>
|
||||
<if test="photo != null and photo != ''"> and photo = #{photo}</if>
|
||||
<if test="recentPhoto != null and recentPhoto != ''"> and recentPhoto = #{recentPhoto}</if>
|
||||
<if test="groupId != null "> and groupId = #{groupId}</if>
|
||||
<if test="groupName != null and groupName != ''"> and groupName like concat('%', #{groupName}, '%')</if>
|
||||
<if test="leader != null "> and leader = #{leader}</if>
|
||||
<if test="workTypeCode != null and workTypeCode != ''"> and workTypeCode = #{workTypeCode}</if>
|
||||
<if test="workTypeName != null and workTypeName != ''"> and workTypeName like concat('%', #{workTypeName}, '%')</if>
|
||||
<if test="specWorkType != null "> and specWorkType = #{specWorkType}</if>
|
||||
<if test="hatCode != null and hatCode != ''"> and hatCode = #{hatCode}</if>
|
||||
<if test="state != null "> and state = #{state}</if>
|
||||
<if test="enterDate != null and enterDate != ''"> and enterDate = #{enterDate}</if>
|
||||
<if test="exitDate != null and exitDate != ''"> and exitDate = #{exitDate}</if>
|
||||
<if test="companyId != null "> and companyId = #{companyId}</if>
|
||||
<if test="companyName != null and companyName != ''"> and companyName like concat('%', #{companyName}, '%')</if>
|
||||
<if test="vendorId != null "> and vendorId = #{vendorId}</if>
|
||||
<if test="teamId != null "> and teamId = #{teamId}</if>
|
||||
<if test="teamName != null and teamName != ''"> and teamName like concat('%', #{teamName}, '%')</if>
|
||||
<if test="enterType != null and enterType != ''"> and enterType = #{enterType}</if>
|
||||
<if test="other != null and other != ''"> and other = #{other}</if>
|
||||
<if test="projectId != null and projectId > 0 "> and project_id = #{projectId}</if>
|
||||
<if test="subDeptId != null and subDeptId >0 "> and sub_dept_id = #{subDeptId}</if>
|
||||
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||
<if test="cfgid != null "> and u.cfgid = #{cfgid}</if>
|
||||
<if test="appId != null "> and u.app_id = #{appId}</if>
|
||||
<if test="vendorsCode != null and vendorsCode != ''"> and u.vendors_code = #{vendorsCode}</if>
|
||||
<if test="workerId != null "> and u.workerId = #{workerId}</if>
|
||||
<if test="laborWorkerId != null "> and u.laborWorkerId = #{laborWorkerId}</if>
|
||||
<if test="workerCategory != null "> and u.workerCategory = #{workerCategory}</if>
|
||||
<if test="qrCode != null "> and u.qrCode = #{qrCode}</if>
|
||||
<if test="name != null and name != ''"> and u.name like concat('%', #{name}, '%')</if>
|
||||
<if test="ethnic != null and ethnic != ''"> and u.ethnic = #{ethnic}</if>
|
||||
<if test="nativePlace != null and nativePlace != ''"> and u.nativePlace = #{nativePlace}</if>
|
||||
<if test="gender != null "> and u.gender = #{gender}</if>
|
||||
<if test="birthDate != null "> and u.birthDate = #{birthDate}</if>
|
||||
<if test="phone != null and phone != ''"> and u.phone = #{phone}</if>
|
||||
<if test="degreeName != null and degreeName != ''"> and u.degreeName like concat('%', #{degreeName}, '%')</if>
|
||||
<if test="photo != null and photo != ''"> and u.photo = #{photo}</if>
|
||||
<if test="recentPhoto != null and recentPhoto != ''"> and u.recentPhoto = #{recentPhoto}</if>
|
||||
<if test="groupId != null "> and u.groupId = #{groupId}</if>
|
||||
<if test="groupName != null and groupName != ''"> and u.groupName like concat('%', #{groupName}, '%')</if>
|
||||
<if test="leader != null "> and u.leader = #{leader}</if>
|
||||
<if test="workTypeCode != null and workTypeCode != ''"> and u.workTypeCode = #{workTypeCode}</if>
|
||||
<if test="workTypeName != null and workTypeName != ''"> and u.workTypeName like concat('%', #{workTypeName}, '%')</if>
|
||||
<if test="specWorkType != null "> and u.specWorkType = #{specWorkType}</if>
|
||||
<if test="hatCode != null and hatCode != ''"> and u.hatCode = #{hatCode}</if>
|
||||
<if test="state != null "> and u.state = #{state}</if>
|
||||
<if test="enterDate != null and enterDate != ''"> and u.enterDate = #{enterDate}</if>
|
||||
<if test="exitDate != null and exitDate != ''"> and u.exitDate = #{exitDate}</if>
|
||||
<if test="companyId != null "> and u.companyId = #{companyId}</if>
|
||||
<if test="companyName != null and companyName != ''"> and u.companyName like concat('%', #{companyName}, '%')</if>
|
||||
<if test="vendorId != null "> and u.vendorId = #{vendorId}</if>
|
||||
<if test="teamId != null "> and u.teamId = #{teamId}</if>
|
||||
<if test="teamName != null and teamName != ''"> and u.teamName like concat('%', #{teamName}, '%')</if>
|
||||
<if test="enterType != null and enterType != ''"> and u.enterType = #{enterType}</if>
|
||||
<if test="other != null and other != ''"> and u.other = #{other}</if>
|
||||
<if test="projectId != null and projectId > 0 "> and c.project_id = #{projectId}</if>
|
||||
<if test="subDeptId != null and subDeptId >0 "> and c.sub_dept_id = #{subDeptId}</if>
|
||||
<if test="isDel != null "> and u.is_del = #{isDel}</if>
|
||||
</select>
|
||||
<select id="selectSurProjectAttendanceUserList" parameterType="SurProjectAttendanceUser" resultMap="SurProjectAttendanceUserResult">
|
||||
<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,
|
||||
u.workTypeName,u.specWorkType,u.groupName,g.companyTypeId,u.workTypeCode
|
||||
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
|
||||
</select>
|
||||
|
||||
|
|
Loading…
Reference in New Issue