Merge branch 'master' into docker_package
This commit is contained in:
commit
7396a0a595
|
@ -0,0 +1,3 @@
|
|||
ALTER TABLE `sys_notice`
|
||||
ADD COLUMN `apply_id` varchar(255) NULL COMMENT '通知来源id',
|
||||
ADD COLUMN `apply_state` int NULL COMMENT '通知来源状态';
|
|
@ -1,11 +1,14 @@
|
|||
package io.renren.common.aspect;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.google.common.collect.ImmutableMultimap;
|
||||
import io.renren.common.annotation.ActivitiNoticeOperation;
|
||||
import io.renren.modules.notice.dto.SysNoticeDTO;
|
||||
import io.renren.modules.notice.enums.NoticeStatusEnum;
|
||||
import io.renren.modules.notice.service.SysNoticeService;
|
||||
import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
|
||||
import io.renren.modules.processForm.service.TAbilityApplicationService;
|
||||
import io.renren.modules.processForm.service.impl.TAbilityApplicationServiceImpl;
|
||||
import io.renren.modules.resource.service.ResourceService;
|
||||
import io.renren.modules.sys.dto.SysDeptDTO;
|
||||
import io.renren.modules.sys.dto.SysRoleDTO;
|
||||
|
@ -17,6 +20,7 @@ import org.activiti.engine.delegate.DelegateExecution;
|
|||
import org.activiti.engine.delegate.DelegateTask;
|
||||
import org.activiti.engine.delegate.ExecutionListener;
|
||||
import org.activiti.engine.delegate.TaskListener;
|
||||
import org.apache.commons.collections.MultiMap;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.aspectj.lang.JoinPoint;
|
||||
import org.aspectj.lang.annotation.After;
|
||||
|
@ -57,6 +61,8 @@ public class ActivitiNoticeAspect {
|
|||
private SysDeptService sysDeptService;
|
||||
@Autowired
|
||||
private SysRoleService sysRoleService;
|
||||
@Autowired
|
||||
private TAbilityApplicationService tAbilityApplicationService;
|
||||
|
||||
private Set<String> work = new CopyOnWriteArraySet<>();
|
||||
|
||||
|
@ -136,14 +142,15 @@ public class ActivitiNoticeAspect {
|
|||
} else if (kv.containsKey("_id")) {
|
||||
key = kv.getOrDefault("_id", "").toString();
|
||||
}
|
||||
final List<TAbilityApplicationDTO> tAbilityApplicationDTOList=kv.containsKey("tAbilityApplicationDTOList") ? (List<TAbilityApplicationDTO>) kv.get("tAbilityApplicationDTOList") : null;
|
||||
final StringBuilder resourceName = new StringBuilder();
|
||||
if (kv.containsKey("resourceDTO")) {
|
||||
resourceName.append("'");
|
||||
resourceName.append(((Map) kv.get("resourceDTO")).get("name"));
|
||||
resourceName.append("'");
|
||||
} else if (kv.containsKey("tAbilityApplicationDTOList")) {
|
||||
} else if (tAbilityApplicationDTOList != null) {
|
||||
resourceName.append("'");
|
||||
resourceName.append(((List<TAbilityApplicationDTO>) kv.get("tAbilityApplicationDTOList")).get(0).getTitle());
|
||||
resourceName.append(tAbilityApplicationDTOList.get(0).getTitle());
|
||||
resourceName.append("'");
|
||||
}
|
||||
final String workKey = TaskListener.EVENTNAME_COMPLETE + key;
|
||||
|
@ -186,8 +193,20 @@ public class ActivitiNoticeAspect {
|
|||
CompletableFuture.runAsync(() -> { // 发起人
|
||||
SysUserDTO userDTO = sysUserService.get(Long.valueOf(finalCreator));
|
||||
String content = "【通知】" + userDTO.getRealName() + ",您发起的" + resourceName + activitiNoticeOperation.process() + " " + activitiNoticeOperation.value() + "节点" + finalResult;
|
||||
Integer type=10;
|
||||
if("能力申请流程".equals(activitiNoticeOperation.process())){
|
||||
type=0;
|
||||
}else if("能力资源上架".equals(activitiNoticeOperation.process())){
|
||||
type=2;
|
||||
}else if("能力资源下架".equals(activitiNoticeOperation.process())){
|
||||
type=4;
|
||||
}else if("能力需求申请".equals(activitiNoticeOperation.process())){
|
||||
type=6;
|
||||
}else if("需求评论审核流程".equals(activitiNoticeOperation.process())){
|
||||
type=8;
|
||||
}
|
||||
SysNoticeDTO dto = new SysNoticeDTO();
|
||||
dto.setType(2);
|
||||
dto.setType(type);
|
||||
dto.setTitle("流程节点系统通知");
|
||||
dto.setContent(content); // 通知内容
|
||||
dto.setReceiverType(1);
|
||||
|
@ -198,6 +217,10 @@ public class ActivitiNoticeAspect {
|
|||
dto.setCreator(sysUserService.getByUsername("admin").getId());
|
||||
dto.setCreateDate(new Date());
|
||||
dto.setFrom("通知");
|
||||
if(tAbilityApplicationDTOList != null){
|
||||
dto.setApplyId(tAbilityApplicationDTOList.get(0).getApplyFlag());
|
||||
}
|
||||
dto.setApplyState(0);
|
||||
sysNoticeService.save(dto);
|
||||
}, EXECUTOR);
|
||||
} catch (Exception e) {
|
||||
|
@ -231,14 +254,15 @@ public class ActivitiNoticeAspect {
|
|||
} else if (kv.containsKey("_id")) {
|
||||
key = kv.getOrDefault("_id", "").toString();
|
||||
}
|
||||
final List<TAbilityApplicationDTO> tAbilityApplicationDTOList=kv.containsKey("tAbilityApplicationDTOList") ? (List<TAbilityApplicationDTO>) kv.get("tAbilityApplicationDTOList") : null;
|
||||
final StringBuilder resourceName = new StringBuilder();
|
||||
if (kv.containsKey("resourceDTO")) {
|
||||
resourceName.append("'");
|
||||
resourceName.append(((Map) kv.get("resourceDTO")).get("name"));
|
||||
resourceName.append("'");
|
||||
} else if (kv.containsKey("tAbilityApplicationDTOList")) {
|
||||
} else if (tAbilityApplicationDTOList != null) {
|
||||
resourceName.append("'");
|
||||
resourceName.append(((List<TAbilityApplicationDTO>) kv.get("tAbilityApplicationDTOList")).get(0).getTitle());
|
||||
resourceName.append(tAbilityApplicationDTOList.get(0).getTitle());
|
||||
resourceName.append("'");
|
||||
}
|
||||
final String workKey = ExecutionListener.EVENTNAME_END + key;
|
||||
|
@ -281,8 +305,20 @@ public class ActivitiNoticeAspect {
|
|||
CompletableFuture.runAsync(() -> { // 发起人
|
||||
SysUserDTO userDTO = sysUserService.get(Long.valueOf(finalCreator));
|
||||
String content = "【通知】" + userDTO.getRealName() + ",您发起的" + resourceName + activitiNoticeOperation.process() + "已完成,审核结果为:" + finalResult;
|
||||
Integer type=10;
|
||||
if("能力申请流程".equals(activitiNoticeOperation.process())){
|
||||
type=0;
|
||||
}else if("能力资源上架".equals(activitiNoticeOperation.process())){
|
||||
type=2;
|
||||
}else if("能力资源下架".equals(activitiNoticeOperation.process())){
|
||||
type=4;
|
||||
}else if("能力需求申请".equals(activitiNoticeOperation.process())){
|
||||
type=6;
|
||||
}else if("需求评论审核流程".equals(activitiNoticeOperation.process())){
|
||||
type=8;
|
||||
}
|
||||
SysNoticeDTO dto = new SysNoticeDTO();
|
||||
dto.setType(2);
|
||||
dto.setType(type);
|
||||
dto.setTitle("流程结束系统通知");
|
||||
dto.setContent(content); // 通知内容
|
||||
dto.setReceiverType(1);
|
||||
|
@ -293,6 +329,10 @@ public class ActivitiNoticeAspect {
|
|||
dto.setCreator(sysUserService.getByUsername("admin").getId());
|
||||
dto.setCreateDate(new Date());
|
||||
dto.setFrom("通知");
|
||||
if(tAbilityApplicationDTOList != null){
|
||||
dto.setApplyId(tAbilityApplicationDTOList.get(0).getApplyFlag());
|
||||
}
|
||||
dto.setApplyState(0);
|
||||
sysNoticeService.save(dto);
|
||||
}, EXECUTOR).thenRunAsync(() -> {
|
||||
LOGGER.error("大数据局名称:{}", bigDateDeptName);
|
||||
|
@ -307,6 +347,19 @@ public class ActivitiNoticeAspect {
|
|||
dto.setType(2);
|
||||
dto.setTitle("流程结束系统通知");
|
||||
String content = "【通知】" + user.getRealName() + "," + creatorDTO.getRealName() + "发起的" + activitiNoticeOperation.process() + "已完成,审核结果为:" + finalResult;
|
||||
Integer type=10;
|
||||
if("能力申请流程".equals(activitiNoticeOperation.process())){
|
||||
type=1;
|
||||
}else if("能力资源上架".equals(activitiNoticeOperation.process())){
|
||||
type=3;
|
||||
}else if("能力资源下架".equals(activitiNoticeOperation.process())){
|
||||
type=5;
|
||||
}else if("能力需求申请".equals(activitiNoticeOperation.process())){
|
||||
type=7;
|
||||
}else if("需求评论审核流程".equals(activitiNoticeOperation.process())){
|
||||
type=9;
|
||||
}
|
||||
dto.setType(type);
|
||||
dto.setContent(content); // 通知内容
|
||||
dto.setReceiverType(1);
|
||||
dto.setReceiverTypeIds(userDTO.get().getId().toString());
|
||||
|
@ -316,6 +369,8 @@ public class ActivitiNoticeAspect {
|
|||
dto.setCreator(sysUserService.getByUsername("admin").getId());
|
||||
dto.setCreateDate(new Date());
|
||||
dto.setFrom("通知");
|
||||
dto.setApplyId(execution.getProcessInstanceId());
|
||||
dto.setApplyState(1);
|
||||
sysNoticeService.save(dto);
|
||||
});
|
||||
}, EXECUTOR);
|
||||
|
@ -355,6 +410,7 @@ public class ActivitiNoticeAspect {
|
|||
} else if (kv.containsKey("_id")) {
|
||||
key = kv.getOrDefault("_id", "").toString();
|
||||
}
|
||||
final List<TAbilityApplicationDTO> tAbilityApplicationDTOList=kv.containsKey("tAbilityApplicationDTOList") ? (List<TAbilityApplicationDTO>) kv.get("tAbilityApplicationDTOList") : null;
|
||||
final StringBuilder resourceName = new StringBuilder();
|
||||
if (kv.containsKey("resourceDTO")) {
|
||||
resourceName.append("'");
|
||||
|
@ -390,8 +446,20 @@ public class ActivitiNoticeAspect {
|
|||
LOGGER.error("审核人:{}", assignee.getId());
|
||||
String content = "【通知】您发起的流程 " + resourceName + activitiNoticeOperation.process() + " 当前审核节点为:" + activitiNoticeOperation.value() + ";当前审核部门为:\"" + assignee.getDeptName() + "\";审核负责人\"" + assignee.getRealName() + "\"";
|
||||
LOGGER.info("通知内容:{}", content);
|
||||
Integer type=10;
|
||||
if("能力申请流程".equals(activitiNoticeOperation.process())){
|
||||
type=0;
|
||||
}else if("能力资源上架".equals(activitiNoticeOperation.process())){
|
||||
type=2;
|
||||
}else if("能力资源下架".equals(activitiNoticeOperation.process())){
|
||||
type=4;
|
||||
}else if("能力需求申请".equals(activitiNoticeOperation.process())){
|
||||
type=6;
|
||||
}else if("需求评论审核流程".equals(activitiNoticeOperation.process())){
|
||||
type=8;
|
||||
}
|
||||
SysNoticeDTO dto = new SysNoticeDTO();
|
||||
dto.setType(2);
|
||||
dto.setType(type);
|
||||
dto.setTitle("流程流转系统通知");
|
||||
dto.setContent(content); // 通知内容
|
||||
dto.setReceiverType(1);
|
||||
|
@ -402,6 +470,10 @@ public class ActivitiNoticeAspect {
|
|||
dto.setCreator(sysUserService.getByUsername("admin").getId());
|
||||
dto.setCreateDate(new Date());
|
||||
dto.setFrom("通知");
|
||||
if(tAbilityApplicationDTOList != null){
|
||||
dto.setApplyId(tAbilityApplicationDTOList.get(0).getApplyFlag());
|
||||
}
|
||||
dto.setApplyState(0);
|
||||
sysNoticeService.save(dto);
|
||||
} catch (Exception exception) {
|
||||
LOGGER.error("通知发起人失败", exception);
|
||||
|
@ -410,8 +482,20 @@ public class ActivitiNoticeAspect {
|
|||
try {
|
||||
SysUserDTO owner = sysUserService.get(Long.valueOf(finalCreator));
|
||||
String content = "【通知】" + owner.getRealName() + "发起的流程" + resourceName + activitiNoticeOperation.process() + " 已进入审核节点:" + activitiNoticeOperation.value() + ";当前审核人指派为您";
|
||||
Integer type=10;
|
||||
if("能力申请流程".equals(activitiNoticeOperation.process())){
|
||||
type=1;
|
||||
}else if("能力资源上架".equals(activitiNoticeOperation.process())){
|
||||
type=3;
|
||||
}else if("能力资源下架".equals(activitiNoticeOperation.process())){
|
||||
type=5;
|
||||
}else if("能力需求申请".equals(activitiNoticeOperation.process())){
|
||||
type=7;
|
||||
}else if("需求评论审核流程".equals(activitiNoticeOperation.process())){
|
||||
type=9;
|
||||
}
|
||||
SysNoticeDTO dto = new SysNoticeDTO();
|
||||
dto.setType(2);
|
||||
dto.setType(type);
|
||||
dto.setTitle("流程流转系统通知");
|
||||
dto.setContent(content); // 通知内容
|
||||
dto.setReceiverType(1);
|
||||
|
@ -422,6 +506,8 @@ public class ActivitiNoticeAspect {
|
|||
dto.setCreator(sysUserService.getByUsername("admin").getId());
|
||||
dto.setCreateDate(new Date());
|
||||
dto.setFrom("通知");
|
||||
dto.setApplyId(delegateTask.getProcessInstanceId());
|
||||
dto.setApplyState(0);
|
||||
sysNoticeService.save(dto);
|
||||
} catch (Exception exception) {
|
||||
LOGGER.error("通知审批人失败", exception);
|
||||
|
|
|
@ -15,6 +15,7 @@ import io.renren.modules.demanData.dto.TDemandDataDTO;
|
|||
import io.renren.modules.demanData.service.TDemandDataService;
|
||||
import io.renren.modules.demandComment.dto.TDemandCommentDTO;
|
||||
import io.renren.modules.demandComment.service.TDemandCommentService;
|
||||
import io.renren.modules.notice.service.SysNoticeService;
|
||||
import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
|
||||
import io.renren.modules.processForm.service.TAbilityApplicationService;
|
||||
import io.renren.modules.resource.dao.ResourceDao;
|
||||
|
@ -119,6 +120,8 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
private SysDeptDao sysDeptDao;
|
||||
@Autowired
|
||||
private ResourceDao resourceDao;
|
||||
@Autowired
|
||||
private SysNoticeService sysNoticeService;
|
||||
|
||||
/**
|
||||
* 根据参数获取当前运行的任务信息
|
||||
|
@ -401,6 +404,7 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
taskService.setVariable(taskId, Task_HANDLE_STATE, Task_HANDLE_STATE_AGREE);
|
||||
taskService.setVariable(taskId, "backToFirst", Boolean.FALSE);
|
||||
taskService.complete(taskId);
|
||||
sysNoticeService.updateApplyStateById(task.getProcessInstanceId(), 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -681,7 +685,7 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
pvmTransitionListC.clear();
|
||||
pvmTransitionListC.addAll(oriPvmTransitionList);
|
||||
}
|
||||
|
||||
sysNoticeService.updateApplyStateById(task.getProcessInstanceId(), 1);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
|
@ -739,7 +743,7 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
pvmTransitionListC.clear();
|
||||
pvmTransitionListC.addAll(oriPvmTransitionList);
|
||||
}
|
||||
|
||||
sysNoticeService.updateApplyStateById(instanceId, 1);
|
||||
}
|
||||
|
||||
private ActivityImpl findActivitiImpl(String taskId, String activityId) {
|
||||
|
@ -867,6 +871,8 @@ public class ActTaskService extends BaseServiceImpl {
|
|||
currActivity.getOutgoingTransitions().remove(transitionImpl);
|
||||
|
||||
pvmTransitionList.addAll(originPvmTransitionList);
|
||||
|
||||
sysNoticeService.updateApplyStateById(currTask.getProcessInstanceId(), 1);
|
||||
}
|
||||
|
||||
public void completeTaskByVariables(TaskDTO taskDTO) {
|
||||
|
|
|
@ -99,7 +99,7 @@ public class CommentListener implements TaskListener, ExecutionListener, Activit
|
|||
}
|
||||
|
||||
@Override
|
||||
@ActivitiNoticeOperation(value = "评论审核", process = "评论审核流程")
|
||||
@ActivitiNoticeOperation(value = "评论审核", process = "需求评论审核流程")
|
||||
public void notify(DelegateTask delegateTask) {
|
||||
logger.error("事件类型: {}", delegateTask.getEventName());
|
||||
final String eventName = delegateTask.getEventName();
|
||||
|
|
|
@ -20,7 +20,7 @@ public class SysNoticeDTO implements Serializable {
|
|||
|
||||
@ApiModelProperty(value = "id")
|
||||
private Long id;
|
||||
@ApiModelProperty(value = "通知类型")
|
||||
@ApiModelProperty(value = "通知类型 0:申请前台 1:申请后台 2:上架前台 3:上架后台 4:下架前台 5:下架后台 6:需求前台 7:需求后台 8:评论前台 9:评论后台 10:其他")
|
||||
private Integer type;
|
||||
@ApiModelProperty(value = "标题")
|
||||
private String title;
|
||||
|
@ -50,4 +50,8 @@ public class SysNoticeDTO implements Serializable {
|
|||
private Integer readStatus;
|
||||
@ApiModelProperty(value = "通知来源 (通知、评论、其他)")
|
||||
private String from;
|
||||
@ApiModelProperty(value = "通知来源id ,跳转使用")
|
||||
private String applyId;
|
||||
@ApiModelProperty(value = "通知来源状态 0:待办 1:已办")
|
||||
private Integer applyState;
|
||||
}
|
|
@ -89,4 +89,12 @@ public class SysNoticeEntity {
|
|||
*/
|
||||
@TableField(value = "`from`")
|
||||
private String from;
|
||||
/**
|
||||
* 通知来源id
|
||||
*/
|
||||
private String applyId;
|
||||
/**
|
||||
* 通知来源状态
|
||||
*/
|
||||
private Integer applyState;
|
||||
}
|
|
@ -21,4 +21,6 @@ public interface SysNoticeService extends CrudService<SysNoticeEntity, SysNotice
|
|||
* 获取我的通知列表
|
||||
*/
|
||||
PageData<SysNoticeDTO> getMyNoticePage(Map<String, Object> params);
|
||||
|
||||
void updateApplyStateById(String id, Integer state);
|
||||
}
|
|
@ -73,6 +73,9 @@ public class SysNoticeServiceImpl extends CrudServiceImpl<SysNoticeDao, SysNotic
|
|||
case "from":
|
||||
wrapper.eq(StringUtils.isNotBlank((String) params.get("from")), "`from`", (String) params.get("from"));
|
||||
break;
|
||||
case "applyId":
|
||||
wrapper.eq(StringUtils.isNotBlank((String) params.get("applyId")), "apply_id", (String) params.get("applyId"));
|
||||
break;
|
||||
}
|
||||
});
|
||||
wrapper.orderByDesc(Constant.CREATE_DATE);
|
||||
|
@ -102,6 +105,17 @@ public class SysNoticeServiceImpl extends CrudServiceImpl<SysNoticeDao, SysNotic
|
|||
return getPageData(list, page.getTotal(), SysNoticeDTO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateApplyStateById(String id, Integer state) {
|
||||
Map params=new HashMap();
|
||||
params.put("apply_id",id);
|
||||
List<SysNoticeDTO> list=this.list(params);
|
||||
list.stream().filter(it->it.getReceiverTypeIds().contains(SecurityUser.getUserId().toString())).forEach(it->{
|
||||
it.setApplyState(state);
|
||||
this.update(it);
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void save(SysNoticeDTO dto) {
|
||||
|
|
|
@ -6,6 +6,7 @@ import com.google.gson.GsonBuilder;
|
|||
import com.google.gson.JsonDeserializer;
|
||||
import com.google.gson.JsonElement;
|
||||
import io.renren.common.annotation.ActivitiNoticeOperation;
|
||||
import io.renren.modules.notice.service.SysNoticeService;
|
||||
import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
|
||||
import io.renren.modules.resource.dto.ResourceDTO;
|
||||
import io.renren.modules.resource.service.ResourceService;
|
||||
|
@ -51,6 +52,8 @@ public class ApplyDeptListener implements TaskListener, ExecutionListener, Activ
|
|||
private ResourceService resourceService;
|
||||
@Value("${big_date.assignee_role_name}")
|
||||
private String roleName; // 具备审批的角色名称
|
||||
@Autowired
|
||||
private SysNoticeService sysNoticeService;
|
||||
|
||||
@Value("${big_date.default_assignee_role_id}")
|
||||
private String defaultAssigneeRoleId; // 当未查到审批人时将使用该用户审批
|
||||
|
@ -142,6 +145,7 @@ public class ApplyDeptListener implements TaskListener, ExecutionListener, Activ
|
|||
if (!tAbilityApplicationDTO.isPresent()) { // 全是免批
|
||||
taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "免批资源申请默认通过");
|
||||
taskService.complete(delegateTask.getId(), delegateTask.getVariables());
|
||||
sysNoticeService.updateApplyStateById(delegateTask.getProcessInstanceId(), 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
|
|||
import com.google.common.collect.ImmutableMap;
|
||||
import io.renren.common.annotation.ActivitiNoticeOperation;
|
||||
import io.renren.modules.activiti.service.ActTaskService;
|
||||
import io.renren.modules.notice.service.SysNoticeService;
|
||||
import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
|
||||
import io.renren.modules.resource.dto.ResourceDTO;
|
||||
import io.renren.modules.resource.service.ResourceService;
|
||||
|
@ -62,6 +63,8 @@ public class ApplyDistrictListener implements TaskListener, ExecutionListener, A
|
|||
|
||||
@Value("${big_date.default_assignee_role_id}")
|
||||
private String defaultAssigneeRoleId; // 当未查到审批人时将使用该用户审批
|
||||
@Autowired
|
||||
private SysNoticeService sysNoticeService;
|
||||
|
||||
@Override
|
||||
@ActivitiNoticeOperation(value = "申请发起人区市管理员审批", process = "能力申请流程")
|
||||
|
@ -137,6 +140,7 @@ public class ApplyDistrictListener implements TaskListener, ExecutionListener, A
|
|||
taskService.setVariable(delegateTask.getId(), "backToFirst", Boolean.FALSE);
|
||||
taskService.setVariable(delegateTask.getId(), "autoApply", delegateTask.getId());
|
||||
taskService.complete(delegateTask.getId(), delegateTask.getVariables());
|
||||
sysNoticeService.updateApplyStateById(delegateTask.getProcessInstanceId(), 1);
|
||||
return;
|
||||
}
|
||||
//规则2:同一审批人连续出现时(仅保留第一个)
|
||||
|
@ -148,6 +152,7 @@ public class ApplyDistrictListener implements TaskListener, ExecutionListener, A
|
|||
taskService.setVariable(delegateTask.getId(), "backToFirst", Boolean.FALSE);
|
||||
taskService.setVariable(delegateTask.getId(), "autoApply", delegateTask.getId());
|
||||
taskService.complete(delegateTask.getId(), delegateTask.getVariables());
|
||||
sysNoticeService.updateApplyStateById(delegateTask.getProcessInstanceId(), 1);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -163,6 +168,7 @@ public class ApplyDistrictListener implements TaskListener, ExecutionListener, A
|
|||
if (!tAbilityApplicationDTO.isPresent()) { // 全是免批
|
||||
taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "免批资源申请默认通过");
|
||||
taskService.complete(delegateTask.getId(), delegateTask.getVariables());
|
||||
sysNoticeService.updateApplyStateById(delegateTask.getProcessInstanceId(), 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
|
|||
import com.google.common.collect.ImmutableMap;
|
||||
import io.renren.common.annotation.ActivitiNoticeOperation;
|
||||
import io.renren.modules.activiti.service.ActTaskService;
|
||||
import io.renren.modules.notice.service.SysNoticeService;
|
||||
import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
|
||||
import io.renren.modules.resource.dto.ResourceDTO;
|
||||
import io.renren.modules.resource.service.ResourceService;
|
||||
|
@ -62,6 +63,8 @@ public class CityListener implements TaskListener, ExecutionListener, ActivitiEv
|
|||
|
||||
@Value("${big_date.default_assignee_role_id}")
|
||||
private String defaultAssigneeRoleId; // 当未查到审批人时将使用该用户审批
|
||||
@Autowired
|
||||
private SysNoticeService sysNoticeService;
|
||||
|
||||
@Override
|
||||
@ActivitiNoticeOperation(value = "市级区市管理员审批", process = "能力申请流程")
|
||||
|
@ -138,6 +141,7 @@ public class CityListener implements TaskListener, ExecutionListener, ActivitiEv
|
|||
taskService.setVariable(delegateTask.getId(), "backToFirst", Boolean.FALSE);
|
||||
taskService.setVariable(delegateTask.getId(), "autoApply", delegateTask.getId());
|
||||
taskService.complete(delegateTask.getId(), delegateTask.getVariables());
|
||||
sysNoticeService.updateApplyStateById(delegateTask.getProcessInstanceId(), 1);
|
||||
return;
|
||||
}
|
||||
//规则2:同一审批人连续出现时(仅保留第一个)
|
||||
|
@ -149,6 +153,7 @@ public class CityListener implements TaskListener, ExecutionListener, ActivitiEv
|
|||
taskService.setVariable(delegateTask.getId(), "backToFirst", Boolean.FALSE);
|
||||
taskService.setVariable(delegateTask.getId(), "autoApply", delegateTask.getId());
|
||||
taskService.complete(delegateTask.getId(), delegateTask.getVariables());
|
||||
sysNoticeService.updateApplyStateById(delegateTask.getProcessInstanceId(), 1);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -164,6 +169,7 @@ public class CityListener implements TaskListener, ExecutionListener, ActivitiEv
|
|||
if (!tAbilityApplicationDTO.isPresent()) { // 全是免批
|
||||
taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "免批资源申请默认通过");
|
||||
taskService.complete(delegateTask.getId(), delegateTask.getVariables());
|
||||
sysNoticeService.updateApplyStateById(delegateTask.getProcessInstanceId(), 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ import com.google.gson.JsonElement;
|
|||
import io.renren.common.annotation.ActivitiNoticeOperation;
|
||||
import io.renren.common.dto.AuditingBaseDTO;
|
||||
import io.renren.modules.activiti.service.ActTaskService;
|
||||
import io.renren.modules.notice.service.SysNoticeService;
|
||||
import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
|
||||
import io.renren.modules.processForm.service.ApiGateway;
|
||||
import io.renren.modules.processForm.service.TAbilityApplicationService;
|
||||
|
@ -68,6 +69,8 @@ public class CorrectionListenerV3 implements TaskListener, ExecutionListener, Ac
|
|||
private SysDeptService sysDeptService;
|
||||
@Resource(name = "${hisense.gateway.name}")
|
||||
private ApiGateway apiGateway;
|
||||
@Autowired
|
||||
private SysNoticeService sysNoticeService;
|
||||
|
||||
@Autowired
|
||||
private ResourceService resourceService;
|
||||
|
@ -226,6 +229,7 @@ public class CorrectionListenerV3 implements TaskListener, ExecutionListener, Ac
|
|||
taskService.setVariable(delegateTask.getId(), "backToFirst", Boolean.FALSE);
|
||||
taskService.setVariable(delegateTask.getId(), "autoApply", delegateTask.getId());
|
||||
taskService.complete(delegateTask.getId(), delegateTask.getVariables());
|
||||
sysNoticeService.updateApplyStateById(delegateTask.getProcessInstanceId(), 1);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -237,6 +241,7 @@ public class CorrectionListenerV3 implements TaskListener, ExecutionListener, Ac
|
|||
taskService.setVariable(delegateTask.getId(), "backToFirst", Boolean.FALSE);
|
||||
taskService.setVariable(delegateTask.getId(), "autoApply", delegateTask.getId());
|
||||
taskService.complete(delegateTask.getId(), delegateTask.getVariables());
|
||||
sysNoticeService.updateApplyStateById(delegateTask.getProcessInstanceId(), 1);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -252,6 +257,7 @@ public class CorrectionListenerV3 implements TaskListener, ExecutionListener, Ac
|
|||
if (!tAbilityApplicationDTO.isPresent()) { // 全是免批
|
||||
taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "免批资源申请默认通过");
|
||||
taskService.complete(delegateTask.getId(), delegateTask.getVariables());
|
||||
sysNoticeService.updateApplyStateById(delegateTask.getProcessInstanceId(), 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
|
|||
import com.google.common.collect.ImmutableMap;
|
||||
import io.renren.common.annotation.ActivitiNoticeOperation;
|
||||
import io.renren.modules.activiti.service.ActTaskService;
|
||||
import io.renren.modules.notice.service.SysNoticeService;
|
||||
import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
|
||||
import io.renren.modules.resource.dto.ResourceDTO;
|
||||
import io.renren.modules.resource.service.ResourceService;
|
||||
|
@ -59,6 +60,8 @@ public class OwnerDistrictListener implements TaskListener, ExecutionListener, A
|
|||
|
||||
@Value("${big_date.default_assignee_role_id}")
|
||||
private String defaultAssigneeRoleId; // 当未查到审批人时将使用该用户审批
|
||||
@Autowired
|
||||
private SysNoticeService sysNoticeService;
|
||||
|
||||
@Override
|
||||
@ActivitiNoticeOperation(value = "资源所属区市管理员审批", process = "能力申请流程")
|
||||
|
@ -134,6 +137,7 @@ public class OwnerDistrictListener implements TaskListener, ExecutionListener, A
|
|||
taskService.setVariable(delegateTask.getId(), "backToFirst", Boolean.FALSE);
|
||||
taskService.setVariable(delegateTask.getId(), "autoApply", delegateTask.getId());
|
||||
taskService.complete(delegateTask.getId(), delegateTask.getVariables());
|
||||
sysNoticeService.updateApplyStateById(delegateTask.getProcessInstanceId(), 1);
|
||||
return;
|
||||
}
|
||||
//规则2:同一审批人连续出现时(仅保留第一个)
|
||||
|
@ -145,6 +149,7 @@ public class OwnerDistrictListener implements TaskListener, ExecutionListener, A
|
|||
taskService.setVariable(delegateTask.getId(), "backToFirst", Boolean.FALSE);
|
||||
taskService.setVariable(delegateTask.getId(), "autoApply", delegateTask.getId());
|
||||
taskService.complete(delegateTask.getId(), delegateTask.getVariables());
|
||||
sysNoticeService.updateApplyStateById(delegateTask.getProcessInstanceId(), 1);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -160,6 +165,7 @@ public class OwnerDistrictListener implements TaskListener, ExecutionListener, A
|
|||
if (!tAbilityApplicationDTO.isPresent()) { // 全是免批
|
||||
taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "免批资源申请默认通过");
|
||||
taskService.complete(delegateTask.getId(), delegateTask.getVariables());
|
||||
sysNoticeService.updateApplyStateById(delegateTask.getProcessInstanceId(), 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
<!-- 获取我的通知列表 -->
|
||||
<select id="getMyNoticeList" resultType="io.renren.modules.notice.entity.SysNoticeEntity">
|
||||
select t2.id, t2.title, t2.type, t2.sender_name, t2.sender_date, t1.read_status, t2.content ,t2.`from` from
|
||||
select t2.id, t2.title, t2.type, t2.sender_name, t2.sender_date, t1.read_status, t2.content ,t2.`from`, t2.apply_id, t2.apply_state from
|
||||
sys_notice_user t1, sys_notice t2
|
||||
where t1.notice_id = t2.id and t1.receiver_id = #{receiverId}
|
||||
<if test="readStatus != null">
|
||||
|
|
|
@ -1785,7 +1785,7 @@
|
|||
|
||||
<select id="selectCensusResourceTable" resultType="java.util.Map">
|
||||
SELECT sd.name AS deptName, tdr.name AS resourceName, tdr.type, tdr.create_date AS createDate,
|
||||
if(tdr.del_flag=0, '审核通过', '审核中') AS approveStatus, trma.apply_number AS applyNumber
|
||||
if(tdr.del_flag=0, '审核通过', '审核中') AS approveStatus, trma.instance_id AS applyNumber
|
||||
FROM (SELECT IF(d.type='组件服务', A.attr_value, d.type) AS type, d.id, d.del_flag, d.dept_id, d.create_date,
|
||||
d.name
|
||||
FROM tb_data_resource d LEFT JOIN tb_data_attr a ON d.id=a.data_resource_id AND a.attr_type='组件类型' AND
|
||||
|
@ -1819,7 +1819,7 @@
|
|||
|
||||
<select id="selectCensusApplyTable" resultType="java.util.Map">
|
||||
SELECT sd.name AS deptName, tdr.name AS resourceName, tdr.type, taa.create_date AS createDate,
|
||||
taa.approve_status AS approveStatus, taa.apply_number AS applyNumber
|
||||
taa.approve_status AS approveStatus, taa.apply_flag AS applyNumber
|
||||
FROM (SELECT IF(d.type='组件服务', A.attr_value, d.type) AS type, d.id, d.del_flag, d.dept_id, d.create_date,
|
||||
d.name
|
||||
FROM tb_data_resource d LEFT JOIN tb_data_attr a ON d.id=a.data_resource_id AND a.attr_type='组件类型' AND
|
||||
|
|
Loading…
Reference in New Issue