This commit is contained in:
qimingjin 2021-07-18 17:43:02 +08:00
parent c90d2d6e6a
commit 601dfc72bc
12 changed files with 81 additions and 18 deletions

View File

@ -252,4 +252,20 @@ public class FlowController extends BaseController {
return AjaxResult.success();
}
/**
* 跳转任务详情界面
* @return 跳转的页面
*/
@GetMapping("/toTaskDetail")
public String toTaskDetail(String taskId,ModelMap mmap)
{
TaskVO task = flowableTaskService.getHisTask(taskId);
//获取业务参数
AppForm appFrom = appFormService.getAppFrom(task.getProcessInstanceId());
mmap.put("appFrom", appFrom);
mmap.put("taskId", taskId);
mmap.put("processInstanceId", task.getProcessInstanceId());
return task.getFormKey();
}
}

View File

@ -55,8 +55,8 @@ public class SysMessageCenterController extends BaseController
//拜访日志tab页数据
if(CollectionUtil.isNotEmpty(sysMessageTransitions)){
List<SysMessageTransition> visitLogsList = sysMessageTransitions.stream().filter(t -> t.getMessageType().equals(MessageEventType.SEND_VISIT_LOG.getCode())).collect(Collectors.toList());
long count = visitLogsList.stream().filter(t -> t.getMessageReadStatus() == 0).count();
mmap.put("visitLogCount",count);
long visitLogCount = visitLogsList.stream().filter(t -> t.getMessageReadStatus() == 0).count();
mmap.put("visitLogCount",visitLogCount);
mmap.put("visitLogs",visitLogsList);
}

View File

@ -236,8 +236,7 @@
<div class="col-xs-8">
<div class="inline-people-select">
<ul class="simple-list">
<li ng-click="confirmGroup(group);" ng-repeat="group in popup.groupResults"
ng-class="{'active': $index == popup.selectedGroupIndex}">
<li ng-click="confirmGroup(group);" ng-repeat="group in popup.groupResults" ng-class="{'active': $index == popup.selectedGroupIndex}">
{{group.name}}
</li>
</ul>

View File

@ -63,7 +63,7 @@
</span>
<i class="glyphicon {{currentAppDefinition.definition.icon}}"></i>
<div class="dropdown btn-group btn-group-sm" activiti-fix-dropdown-bug>
<!-- <div class="dropdown btn-group btn-group-sm" activiti-fix-dropdown-bug>
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
{{account.firstName && account.firstName != 'null' ? account.firstName : ''}} {{account.lastName && account.lastName != 'null' ? account.lastName : ''}}
<span class="glyphicon glyphicon-chevron-down" style="font-size: 10px" aria-hidden="true"></span>
@ -71,7 +71,7 @@
<ul class="dropdown-menu pull-right">
<li><a href="" ng-click="logout()" translate>GENERAL.ACTION.LOGOUT</a></li>
</ul>
</div>
</div>-->
</div>
</div>
</div>

View File

@ -49,7 +49,7 @@
<strong th:text="${#dates.format(visitLog.createTime, 'yyyy-MM-dd HH:mm:ss')}"></strong>
</p>
<label > [[${visitLog.messageContent}]]</label>
<a href="javascript:void(0)" class="btn btn-sm btn-success" th:onclick="messageDetail([[${visitLog.pcUrl}]]);"> 查看详情 </a>
<a href="javascript:void(0)" class="btn btn-sm btn-success" th:onclick="messageDetail([[${visitLog.id}]],[[${visitLog.pcUrl}]]);"> 查看详情 </a>
<p>
<small class="badge badge-warning"> <i class="fa fa-clock-o"></i>[[${visitLog.spendTime}]]</small>
</p>
@ -81,7 +81,7 @@
<a class="text-info" href="#"></i> @[[${email.producerUser.userName}]]</a>
</label>
<label > 发来一条站内邮件,请及时查看。</label>
<a href="javascript:void(0)" class="btn btn-sm btn-success" th:onclick="messageDetail([[${email.redirectUrl}]]);"> 查看详情 </a>
<a href="javascript:void(0)" class="btn btn-sm btn-success" th:onclick="messageDetail([[${email.id}]],${email.redirectUrl}]]);"> 查看详情 </a>
<p>
<small class="badge badge-warning"> <i class="fa fa-clock-o"></i>[[${email.spendTime}]]</small>
</p>
@ -110,7 +110,7 @@
<strong th:text="${#dates.format(todoTask.createTime, 'yyyy-MM-dd HH:mm:ss')}"></strong>
</p>
<p >[[${todoTask.messageContent}]]</p>
<a href="javascript:void(0)" class="btn btn-sm btn-success" th:onclick="messageDetail([[${todoTask.pcUrl}]]);"> 查看详情 </a>
<a href="javascript:void(0)" class="btn btn-sm btn-success" th:onclick="messageDetail([[${todoTask.id}]],[[${todoTask.pcUrl}]]);"> 查看详情 </a>
<p>
<!--<small class="badge badge-warning"> <i class="fa fa-clock-o"></i>[[${todoTask.spendTime}]]</small>-->
</p>

View File

@ -21,6 +21,7 @@ import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.Date;
import java.util.Map;
import java.util.Optional;
@ -72,7 +73,7 @@ public class ProcessEndListener implements FlowableEventListener {
messageEventDTO.setMessageOutsideId(processInstance.getId());
messageEventDTO.setMessageShow(2);
//计算流程用时
String spendTime= DateUtil.formatBetween(processInstance.getStartTime(), processInstance.getEndTime(), BetweenFormater.Level.SECOND);
String spendTime= DateUtil.formatBetween(processInstance.getStartTime(), new Date(), BetweenFormater.Level.SECOND);
Map<String,Object> map= Maps.newHashMap();
map.put("businessKey", processInstance.getBusinessKey());
map.put("startTime", DateUtil.formatDateTime(processInstance.getStartTime()));

View File

@ -93,6 +93,7 @@ public class TaskCreateListener implements FlowableEventListener {
Map<String,Object> map= Maps.newHashMap();
map.put("startUser", startSysUser.getUserName());
map.put("startTime", DateUtil.formatDateTime(processInstance.getStartTime()));
map.put("businessKey",processInstance.getBusinessKey());
map.put("processInstance", processInstance.getProcessDefinitionName());
map.put("taskId", entity.getId());
map.put("taskName", entity.getName());

View File

@ -44,6 +44,13 @@ public interface FlowableTaskService {
* @return
*/
Task getTask(String taskId);
/**
* 根据id查询历史任务
* @param taskId 任务id
* @return
*/
TaskVO getHisTask(String taskId);
/**
* 完成任务
* @param finishTaskDTO

View File

@ -61,4 +61,11 @@ public interface FlowableUserService {
* @return 待处理人员集合
*/
List<SysUser> getCandidateUsers(String assignee,String taskId);
/**
*
* @param filter
* @return
*/
List<RemoteGroup> getLinkFlowUserGroupList(String filter);
}

View File

@ -22,6 +22,7 @@ import org.flowable.identitylink.api.history.HistoricIdentityLink;
import org.flowable.task.api.DelegationState;
import org.flowable.task.api.Task;
import org.flowable.task.api.TaskQuery;
import org.flowable.task.api.history.HistoricTaskInstance;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
@ -201,6 +202,19 @@ public class FlowableTaskServiceImpl implements FlowableTaskService {
return task;
}
@Override
public TaskVO getHisTask(String taskId) {
TaskVO taskVO=new TaskVO();
HistoricTaskInstance historicTaskInstance = historyService.createHistoricTaskInstanceQuery()
.taskId(taskId)
.includeIdentityLinks()
.includeTaskLocalVariables()
.includeProcessVariables()
.singleResult();
BeanUtil.copyProperties(historicTaskInstance,taskVO);
return taskVO;
}
@Override
public void submitTask(FinishTaskDTO finishTaskDTO) {

View File

@ -1,5 +1,6 @@
package com.snow.flowable.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
@ -237,4 +238,20 @@ public class FlowableUserServiceImpl implements FlowableUserService {
}
return new ArrayList<>(result);
}
@Override
public List<RemoteGroup> getLinkFlowUserGroupList(String filter) {
List<RemoteGroup> returnFlowUserGroupList=Lists.newArrayList();
List<RemoteGroup> flowUserGroupList = getFlowUserGroupList(filter);
if(CollectionUtil.isNotEmpty(flowUserGroupList)){
flowUserGroupList.forEach(t->{
FlowGroupDO flowGroupDO1 = flowGroupDOService.selectFlowGroupDOById(Long.parseLong(t.getId()));
FlowGroupDO flowGroupDO=new FlowGroupDO();
flowGroupDO.setParentId(Long.parseLong(t.getId()));
List<FlowGroupDO> flowGroupDOS = flowGroupDOService.selectFlowGroupDOList(flowGroupDO);
if()
});
}
return null;
}
}

View File

@ -1,20 +1,21 @@
#2021-07-08
#系统配置
INSERT INTO `snow-dev`.`sys_config`(`config_name`, `config_key`, `config_value`, `config_type`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( '微信公众号AppSecret', 'wx.gzh.appSecret', '92d005b63242ef3ae1e286f78cd8ef34', 'Y', 'admin', NOW(), '', NULL, '微信公众号AppSecret');
INSERT INTO `snow-dev`.`sys_config`(`config_name`, `config_key`, `config_value`, `config_type`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( '微信公众号AppId', 'wx.gzh.appId', 'wxf847d7ba2539a307', 'Y', 'admin', NOW(), '', NULL, '微信公众号AppId');
INSERT INTO `sys_config`(`config_name`, `config_key`, `config_value`, `config_type`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( '微信公众号AppSecret', 'wx.gzh.appSecret', '92d005b63242ef3ae1e286f78cd8ef34', 'Y', 'admin', NOW(), '', NULL, '微信公众号AppSecret');
INSERT INTO `sys_config`(`config_name`, `config_key`, `config_value`, `config_type`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( '微信公众号AppId', 'wx.gzh.appId', 'wxf847d7ba2539a307', 'Y', 'admin', NOW(), '', NULL, '微信公众号AppId');
#SQL
ALTER TABLE `snow-dev`.`sys_notice`
ALTER TABLE `sys_notice`
CHANGE COLUMN `blackboard_id` `notice_url` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'banner图url' FIRST,
MODIFY COLUMN `notice_type` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '公告类型1公告 2通知 3banner' AFTER `notice_title`;
INSERT INTO `snow`.`sys_dict_type`( `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( '用户类型', 'sys_user_type', '0', 'admin', NOW(), 'ry', NOW(), '用户类型');
INSERT INTO `sys_dict_type`( `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES ( '用户类型', 'sys_user_type', '0', 'admin', NOW(), 'ry', NOW(), '用户类型');
INSERT INTO `snow`.`sys_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1, '系统用户', '00', 'sys_user_type', 'info', '', 'Y', '0', 'admin', NOW(), 'ry', NOW(), '系统用户');
INSERT INTO `snow`.`sys_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2, '官网用户', '01', 'sys_user_type', 'primary', '', 'N', '0', 'admin', NOW(), 'ry', NOW(), '官网用户');
INSERT INTO `sys_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1, '系统用户', '00', 'sys_user_type', 'info', '', 'Y', '0', 'admin', NOW(), 'ry', NOW(), '系统用户');
INSERT INTO `sys_dict_data`( `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2, '官网用户', '01', 'sys_user_type', 'primary', '', 'N', '0', 'admin', NOW(), 'ry', NOW(), '官网用户');
#2021-07-16
INSERT INTO `snow-dev`.`sys_message_template`( `template_code`, `template_name`, `template_body`, `template_desc`, `template_type`, `pc_url`, `app_url`, `icon_class`, `template_status`, `is_delete`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ( '1411568525448978432', '拜访日志', '${userName}于${nowTime}向您推送了一条【${enterprice}】的拜访日志,请您及时前往客户管理查看。', '拜访日志', 4, '/system/customer/messageDetail/${id}', '', 'fa fa-modx', 0, 0, '1', NOW(), '1', NOW());
INSERT INTO `snow`.`sys_message_template`( `template_code`, `template_name`, `template_body`, `template_desc`, `template_type`, `pc_url`, `app_url`, `icon_class`, `template_status`, `is_delete`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ( '1415927384573616128', '任务待办', '${startUser}于${startTime}发起的【${processInstance}】审批流程到达【${taskName}】审批节点,现需要您去协助处理。请点击详情前往处理。', '任务待办', 4, '', '', 'fa fa-bullhorn', 0, 0, '1', NOW(), NULL, NULL);
INSERT INTO `sys_message_template`( `template_code`, `template_name`, `template_body`, `template_desc`, `template_type`, `pc_url`, `app_url`, `icon_class`, `template_status`, `is_delete`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ( '1411568525448978432', '拜访日志', '${userName}于${nowTime}向您推送了一条【${enterprice}】的拜访日志,请您及时前往客户管理查看。', '拜访日志', 4, '/system/customer/messageDetail/${id}', '', 'fa fa-modx', 0, 0, '1', NOW(), '1', NOW());
INSERT INTO `sys_message_template`( `template_code`, `template_name`, `template_body`, `template_desc`, `template_type`, `pc_url`, `app_url`, `icon_class`, `template_status`, `is_delete`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ( '1415927384573616128', '任务待办', '${startUser}于${startTime}发起的【${processInstance}】审批流程到达【${taskName}】审批节点,现需要您去协助处理。请点击详情前往处理。', '任务待办', 4, '/flow/toTaskDetail?taskId=${taskId}', '', 'fa fa-bullhorn', 0, 0, '1', '2021-07-17 10:09:37', '1', '2021-07-17 19:54:55');
INSERT INTO `sys_message_template`( `template_code`, `template_name`, `template_body`, `template_desc`, `template_type`, `pc_url`, `app_url`, `icon_class`, `template_status`, `is_delete`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ( '1416370192572882944', '流程完结', '您于${startTime}发起的业务单号为【${businessKey}】的【${processInstance}】审批流程现已完结,流程总用时:【${spendTime}】。请点击详情前往查看。', '流程完结', 4, '/flow/myStartProcessDetail?processInstanceId=${processInstanceId}', '', 'fa fa-hourglass-start', 0, 0, '1', '2021-07-17 20:18:23', '1', '2021-07-17 23:07:39');