add 企标计划变更流程
This commit is contained in:
+48
-16
@@ -155,22 +155,32 @@ alter table process_plan_change
|
|||||||
|
|
||||||
create table process_plan_change_link
|
create table process_plan_change_link
|
||||||
(
|
(
|
||||||
id varchar(36) not null comment '主键id',
|
id varchar(36) not null comment '主键id'
|
||||||
process_id varchar(36) comment '流程主表id',
|
primary key,
|
||||||
revision_type varchar(50) comment '制修订类别',
|
process_id varchar(36) null comment '流程主表id',
|
||||||
plan_id varchar(36) comment '企标计划',
|
revision_type varchar(50) null comment '制修订类别',
|
||||||
drafting_user varchar(50) comment '起草人',
|
plan_id varchar(36) null comment '企标计划id',
|
||||||
depart_id varchar(50) comment '所在部门id',
|
standard_id varchar(50) null comment '标准id',
|
||||||
draft_complete_date datetime comment '初稿完成日期变更后',
|
standard_number varchar(200) null comment '标准编号',
|
||||||
plan_archiving_date datetime comment '计划归档日期变更后',
|
standard_name varchar(200) null comment '标准名称',
|
||||||
change_reason varchar(500) comment '变更原因',
|
main_drafting_user varchar(50) null comment '起草人',
|
||||||
create_by varchar(36) comment '创建人',
|
main_drafting_user_new varchar(50) null comment '新起草人',
|
||||||
create_time datetime comment '创建时间',
|
depart_id varchar(50) null comment '所在部门id',
|
||||||
update_by varchar(36) comment '更新人',
|
depart_id_new varchar(50) null comment '新所在部门id',
|
||||||
update_time datetime comment '更新时间',
|
professional_module varchar(30) null comment '专业模块',
|
||||||
org_code varchar(64) comment '所属部门',
|
draft_complete_date datetime null comment '初稿完成日期',
|
||||||
del_flag tinyint comment '删除状态(0-正常,1-删除)',
|
plan_archiving_date datetime null comment '计划归档日期',
|
||||||
primary key (id)
|
draft_complete_date_change datetime null comment '初稿完成日期变更后',
|
||||||
|
plan_archiving_date_change datetime null comment '计划归档日期变更后',
|
||||||
|
have_english_version varchar(50) null comment '是否有英文版',
|
||||||
|
committee varchar(500) null comment '所属技术委员会',
|
||||||
|
change_reason varchar(500) null comment '变更原因',
|
||||||
|
create_by varchar(36) null comment '创建人',
|
||||||
|
create_time datetime null comment '创建时间',
|
||||||
|
update_by varchar(36) null comment '更新人',
|
||||||
|
update_time datetime null comment '更新时间',
|
||||||
|
org_code varchar(64) null comment '所属部门',
|
||||||
|
del_flag tinyint null comment '删除状态(0-正常,1-删除)'
|
||||||
);
|
);
|
||||||
|
|
||||||
alter table process_plan_change_link
|
alter table process_plan_change_link
|
||||||
@@ -258,3 +268,25 @@ VALUES ('1836301659982864385', '1836301517254893569', '取消', '3', '', 3, 1, '
|
|||||||
|
|
||||||
-- 企标状态增加 征求意见 --
|
-- 企标状态增加 征求意见 --
|
||||||
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `parent_id`, `item_text`, `en_name`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `stat_node`, `en_base`) VALUES ('1696811980113661954', '1696811542077329409', NULL, '征求意见', 'Seek For Opinions', '2', '征求意见', 2, 1, 'admin', '2023-08-30 17:07:56', NULL, NULL, 1, 1, NULL, '0', NULL, NULL);
|
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `parent_id`, `item_text`, `en_name`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `is_tag_dict`, `is_read_only`, `attribute_type`, `del_flag`, `stat_node`, `en_base`) VALUES ('1696811980113661954', '1696811542077329409', NULL, '征求意见', 'Seek For Opinions', '2', '征求意见', 2, 1, 'admin', '2023-08-30 17:07:56', NULL, NULL, 1, 1, NULL, '0', NULL, NULL);
|
||||||
|
|
||||||
|
-- 企标计划变更-变更类型
|
||||||
|
INSERT INTO sys_dict (id, dict_name, dict_code, description, del_flag, create_by, create_time, is_tag_dict,
|
||||||
|
is_read_only)
|
||||||
|
VALUES ('1843464136587796482', '企标计划变更-变更类型', 'espc_change_type', '新增,取消,延期,人员变更', 0, 'cheryrsm', '2024-10-08 09:31:14',
|
||||||
|
0, 0);
|
||||||
|
INSERT INTO sys_dict_item (id, dict_id, item_text, en_name, item_value, description, sort_order, `status`, create_by,
|
||||||
|
create_time, is_tag_dict, is_read_only, del_flag)
|
||||||
|
VALUES ('1843464372399955969', '1843464136587796482', '新增', 'add', '1', '', 1, 1, 'cheryrsm', '2024-10-08 09:32:10', 0,
|
||||||
|
0, 0);
|
||||||
|
INSERT INTO sys_dict_item (id, dict_id, item_text, en_name, item_value, description, sort_order, `status`, create_by,
|
||||||
|
create_time, is_tag_dict, is_read_only, del_flag)
|
||||||
|
VALUES ('1843464482533990401', '1843464136587796482', '取消', 'cancel', '2', '', 2, 1, 'cheryrsm', '2024-10-08 09:32:37',
|
||||||
|
0, 0, 0);
|
||||||
|
INSERT INTO sys_dict_item (id, dict_id, item_text, en_name, item_value, description, sort_order, `status`, create_by,
|
||||||
|
create_time, is_tag_dict, is_read_only, del_flag)
|
||||||
|
VALUES ('1843464553690357761', '1843464136587796482', '延期', 'delay', '3', '', 3, 1, 'cheryrsm', '2024-10-08 09:32:54',
|
||||||
|
0, 0, 0);
|
||||||
|
INSERT INTO sys_dict_item (id, dict_id, item_text, en_name, item_value, description, sort_order, `status`, create_by,
|
||||||
|
create_time, is_tag_dict, is_read_only, del_flag)
|
||||||
|
VALUES ('1843464714877460481', '1843464136587796482', '人员变更', 'Person change', '4', '', 4, 1, 'cheryrsm',
|
||||||
|
'2024-10-08 09:33:32', 0, 0, 0);
|
||||||
+2
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
|||||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.jero.common.aspect.annotation.Dict;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
@@ -38,6 +39,7 @@ public class ProcessPlanChange implements Serializable {
|
|||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "变更类型")
|
@ApiModelProperty(value = "变更类型")
|
||||||
@Excel(name = "变更类型", width = 15)
|
@Excel(name = "变更类型", width = 15)
|
||||||
|
@Dict(dicCode = "espc_change_type")
|
||||||
private String changeType;
|
private String changeType;
|
||||||
/**
|
/**
|
||||||
* 部门经理
|
* 部门经理
|
||||||
|
|||||||
+88
-14
@@ -2,10 +2,8 @@ package com.jero.modules.activiti.process.planchange.entity;
|
|||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
import com.jero.common.aspect.annotation.Dict;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
@@ -51,39 +49,115 @@ public class ProcessPlanChangeLink implements Serializable {
|
|||||||
@ApiModelProperty(value = "企标计划")
|
@ApiModelProperty(value = "企标计划")
|
||||||
@Excel(name = "企标计划", width = 15)
|
@Excel(name = "企标计划", width = 15)
|
||||||
private String planId;
|
private String planId;
|
||||||
|
/**
|
||||||
|
* 标准id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "标准id")
|
||||||
|
private String standardId;
|
||||||
|
/**
|
||||||
|
* 标准编号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "标准编号")
|
||||||
|
@Excel(name = "标准编号", width = 15)
|
||||||
|
private String standardNumber;
|
||||||
|
/**
|
||||||
|
* 标准名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "标准名称")
|
||||||
|
@Excel(name = "标准名称", width = 15)
|
||||||
|
private String standardName;
|
||||||
/**
|
/**
|
||||||
* 起草人
|
* 起草人
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "起草人")
|
@ApiModelProperty(value = "起草人")
|
||||||
@Excel(name = "起草人", width = 15)
|
@Excel(name = "起草人", width = 15, dictTable = "sys_user", dicText = "CONCAT(realname, '(', username, ')')", dicCode = "id")
|
||||||
private String draftingUser;
|
@Dict(dictTable = "sys_user", dicText = "CONCAT(realname, '(', username, ')')", dicCode = "id")
|
||||||
|
private String mainDraftingUser;
|
||||||
|
/**
|
||||||
|
* 新起草人
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "新起草人")
|
||||||
|
@Dict(dictTable = "sys_user", dicText = "CONCAT(realname, '(', username, ')')", dicCode = "id")
|
||||||
|
private String draftingUserNew;
|
||||||
|
/**
|
||||||
|
* 邮箱
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
@ApiModelProperty(value = "邮箱")
|
||||||
|
private String email;
|
||||||
|
/**
|
||||||
|
* 新邮箱
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
@ApiModelProperty(value = "新邮箱")
|
||||||
|
private String emailNew;
|
||||||
/**
|
/**
|
||||||
* 所在部门id
|
* 所在部门id
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "所在部门id")
|
@ApiModelProperty(value = "所在部门id")
|
||||||
@Excel(name = "所在部门id", width = 15)
|
@Excel(name = "所在部门", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
|
||||||
|
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
|
||||||
private String departId;
|
private String departId;
|
||||||
/**
|
/**
|
||||||
* 初稿完成日期变更后
|
* 新所在部门id
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "初稿完成日期变更后")
|
@ApiModelProperty(value = "新所在部门id")
|
||||||
@Excel(name = "初稿完成日期变更后", width = 15, format = "yyyy-MM-dd")
|
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
|
||||||
|
private String departIdNew;
|
||||||
|
/**
|
||||||
|
* 专业模块
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "专业模块")
|
||||||
|
@Excel(name = "专业模块", width = 15, dicCode = "professional_module")
|
||||||
|
@Dict(dicCode = "professional_module")
|
||||||
|
private String professionalModule;
|
||||||
|
/**
|
||||||
|
* 初稿完成日期
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "初稿完成日期")
|
||||||
|
@Excel(name = "初稿完成日期", width = 15, format = "yyyy-MM-dd")
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
private Date draftCompleteDate;
|
private Date draftCompleteDate;
|
||||||
/**
|
/**
|
||||||
* 计划归档日期变更后
|
* 初稿完成日期变更后
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "计划归档日期变更后")
|
@ApiModelProperty(value = "初稿完成日期变更后")
|
||||||
@Excel(name = "计划归档日期变更后", width = 15, format = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date draftCompleteDateChange;
|
||||||
|
/**
|
||||||
|
* 计划归档日期
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "计划归档日期")
|
||||||
|
@Excel(name = "计划归档日期", width = 15, format = "yyyy-MM-dd")
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
private Date planArchivingDate;
|
private Date planArchivingDate;
|
||||||
|
/**
|
||||||
|
* 计划归档日期变更后
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "计划归档日期变更后")
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private Date planArchivingDateChange;
|
||||||
|
/**
|
||||||
|
* 是否有英文版
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "是否有英文版")
|
||||||
|
@Excel(name = "是否有英文版", width = 15, dicCode = "yn")
|
||||||
|
@Dict(dicCode = "yn")
|
||||||
|
private String haveEnglishVersion;
|
||||||
|
/**
|
||||||
|
* 所属技术委员会
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "所属技术委员会")
|
||||||
|
@Excel(name = "所属技术委员会", width = 15)
|
||||||
|
private String committee;
|
||||||
/**
|
/**
|
||||||
* 变更原因
|
* 变更原因
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "变更原因")
|
@ApiModelProperty(value = "变更原因")
|
||||||
@Excel(name = "变更原因", width = 15)
|
|
||||||
private String changeReason;
|
private String changeReason;
|
||||||
/**
|
/**
|
||||||
* 创建人
|
* 创建人
|
||||||
|
|||||||
+20
-1
@@ -1,7 +1,11 @@
|
|||||||
package com.jero.modules.activiti.process.planchange.service;
|
package com.jero.modules.activiti.process.planchange.service;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollStreamUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.jero.common.system.api.ISysBaseAPI;
|
||||||
import com.jero.common.system.query.QueryGenerator;
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
|
import com.jero.common.system.vo.DictModel;
|
||||||
|
import com.jero.common.util.PasswordUtil;
|
||||||
import com.jero.modules.activiti.process.planchange.entity.ProcessPlanChangeLink;
|
import com.jero.modules.activiti.process.planchange.entity.ProcessPlanChangeLink;
|
||||||
import com.jero.modules.activiti.process.planchange.mapper.ProcessPlanChangeLinkMapper;
|
import com.jero.modules.activiti.process.planchange.mapper.ProcessPlanChangeLinkMapper;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -15,6 +19,8 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 企标计划变更流程关联标准(ProcessPlanChangeLink)表服务实现类
|
* 企标计划变更流程关联标准(ProcessPlanChangeLink)表服务实现类
|
||||||
@@ -27,10 +33,23 @@ import java.util.List;
|
|||||||
public class ProcessPlanChangeLinkService extends ServiceImpl<ProcessPlanChangeLinkMapper, ProcessPlanChangeLink> {
|
public class ProcessPlanChangeLinkService extends ServiceImpl<ProcessPlanChangeLinkMapper, ProcessPlanChangeLink> {
|
||||||
@Resource
|
@Resource
|
||||||
private ProcessPlanChangeLinkMapper processPlanChangeLinkMapper;
|
private ProcessPlanChangeLinkMapper processPlanChangeLinkMapper;
|
||||||
|
@Resource
|
||||||
|
private ISysBaseAPI sysBaseAPI;
|
||||||
|
|
||||||
public IPage<ProcessPlanChangeLink> pageList(Page<ProcessPlanChangeLink> page, ProcessPlanChangeLink processPlanChangeLink, HttpServletRequest req) {
|
public IPage<ProcessPlanChangeLink> pageList(Page<ProcessPlanChangeLink> page, ProcessPlanChangeLink processPlanChangeLink, HttpServletRequest req) {
|
||||||
QueryWrapper<ProcessPlanChangeLink> queryWrapper = QueryGenerator.initQueryWrapper(processPlanChangeLink, req.getParameterMap());
|
QueryWrapper<ProcessPlanChangeLink> queryWrapper = QueryGenerator.initQueryWrapper(processPlanChangeLink, req.getParameterMap());
|
||||||
return this.page(page, queryWrapper);
|
Page<ProcessPlanChangeLink> pageList = this.page(page, queryWrapper);
|
||||||
|
List<ProcessPlanChangeLink> records = pageList.getRecords();
|
||||||
|
String userIds = records.stream().map(ProcessPlanChangeLink::getMainDraftingUser).collect(Collectors.joining(","));
|
||||||
|
List<DictModel> dictModels = sysBaseAPI.translateDictFromTableByKeys("sys_user", "email", "id", userIds);
|
||||||
|
Map<String, String> userMap = CollStreamUtil.toMap(dictModels, DictModel::getValue, DictModel::getText);
|
||||||
|
for (ProcessPlanChangeLink record : records) {
|
||||||
|
String mainDraftingUser = record.getMainDraftingUser();
|
||||||
|
String email = userMap.get(mainDraftingUser);
|
||||||
|
record.setEmail(PasswordUtil.decrypt(email));
|
||||||
|
}
|
||||||
|
|
||||||
|
return pageList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void add(ProcessPlanChangeLink processPlanChangeLink) {
|
public void add(ProcessPlanChangeLink processPlanChangeLink) {
|
||||||
|
|||||||
+102
-37
@@ -9,15 +9,14 @@ import com.jero.modules.activiti.common.ActivitiCommon;
|
|||||||
import com.jero.modules.activiti.entity.ProcessAll;
|
import com.jero.modules.activiti.entity.ProcessAll;
|
||||||
import com.jero.modules.activiti.entity.ProcessApprovalRecord;
|
import com.jero.modules.activiti.entity.ProcessApprovalRecord;
|
||||||
import com.jero.modules.activiti.enums.ProcessTypeEnum;
|
import com.jero.modules.activiti.enums.ProcessTypeEnum;
|
||||||
import com.jero.modules.activiti.process.annualinit.common.ProcessAnnualInitCommon;
|
|
||||||
import com.jero.modules.activiti.process.common.common.DraftCommon;
|
import com.jero.modules.activiti.process.common.common.DraftCommon;
|
||||||
import com.jero.modules.activiti.process.common.enums.ProcessType;
|
import com.jero.modules.activiti.process.common.enums.ProcessType;
|
||||||
import com.jero.modules.activiti.process.fb.common.ProcessDefinitionKey;
|
|
||||||
import com.jero.modules.activiti.process.fb.dto.BasicProcessInfoDTO;
|
import com.jero.modules.activiti.process.fb.dto.BasicProcessInfoDTO;
|
||||||
import com.jero.modules.activiti.process.fb.dto.BasicTaskInfoDTO;
|
import com.jero.modules.activiti.process.fb.dto.BasicTaskInfoDTO;
|
||||||
import com.jero.modules.activiti.process.fb.dto.ProcessDTO;
|
import com.jero.modules.activiti.process.fb.dto.ProcessDTO;
|
||||||
import com.jero.modules.activiti.process.fb.service.IProcessHandleService;
|
import com.jero.modules.activiti.process.fb.service.IProcessHandleService;
|
||||||
import com.jero.modules.activiti.process.fb.vo.ProcessInfoVO;
|
import com.jero.modules.activiti.process.fb.vo.ProcessInfoVO;
|
||||||
|
import com.jero.modules.activiti.process.planchange.common.PlanChangeCommon;
|
||||||
import com.jero.modules.activiti.process.planchange.entity.ProcessPlanChange;
|
import com.jero.modules.activiti.process.planchange.entity.ProcessPlanChange;
|
||||||
import com.jero.modules.activiti.process.planchange.entity.ProcessPlanChangeLink;
|
import com.jero.modules.activiti.process.planchange.entity.ProcessPlanChangeLink;
|
||||||
import com.jero.modules.activiti.process.planchange.mapper.ProcessPlanChangeMapper;
|
import com.jero.modules.activiti.process.planchange.mapper.ProcessPlanChangeMapper;
|
||||||
@@ -31,14 +30,10 @@ import com.jero.modules.laws.enterprise.service.EnterpriseStandardPlanService;
|
|||||||
import org.activiti.engine.TaskService;
|
import org.activiti.engine.TaskService;
|
||||||
import org.activiti.engine.task.Task;
|
import org.activiti.engine.task.Task;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@@ -99,7 +94,7 @@ public class ProcessPlanChangeService extends ServiceImpl<ProcessPlanChangeMappe
|
|||||||
BasicProcessInfoDTO basicProcessInfoDTO = processInfoVO.getBasicProcessInfoDTO();
|
BasicProcessInfoDTO basicProcessInfoDTO = processInfoVO.getBasicProcessInfoDTO();
|
||||||
basicProcessInfoDTO.setProcessDefinitionId(processHandleService.getDefinitionIdByKey(ProcessType.ANNUAL_INIT.getProcessKey())); // 流程定义id
|
basicProcessInfoDTO.setProcessDefinitionId(processHandleService.getDefinitionIdByKey(ProcessType.ANNUAL_INIT.getProcessKey())); // 流程定义id
|
||||||
basicProcessInfoDTO.setProcessType(ProcessTypeEnum.ANNUAL_INIT.getValue()); // 流程类型
|
basicProcessInfoDTO.setProcessType(ProcessTypeEnum.ANNUAL_INIT.getValue()); // 流程类型
|
||||||
userInfoMap.put(ProcessAnnualInitCommon.MAIN_DRAFTING_USER, CurrentUserUtil.getId());
|
userInfoMap.put(PlanChangeCommon.MAIN_DRAFTING_USER, CurrentUserUtil.getId());
|
||||||
processInfoVO.setUserInfoMap(userInfoMap);
|
processInfoVO.setUserInfoMap(userInfoMap);
|
||||||
String processInstanceId = processHandleService.startProcess(processInfoVO);
|
String processInstanceId = processHandleService.startProcess(processInfoVO);
|
||||||
|
|
||||||
@@ -194,27 +189,27 @@ public class ProcessPlanChangeService extends ServiceImpl<ProcessPlanChangeMappe
|
|||||||
|
|
||||||
switch (taskDefinitionKey) {
|
switch (taskDefinitionKey) {
|
||||||
//部门经理审批
|
//部门经理审批
|
||||||
case ProcessAnnualInitCommon.BMJLSP:
|
case PlanChangeCommon.BMJLSP:
|
||||||
bmjlspApprove(processInfoVO, processDTO, pass);
|
bmjlspApprove(processInfoVO, processDTO, pass);
|
||||||
break;
|
break;
|
||||||
//法规部门处理人审批
|
//法规部门处理人审批
|
||||||
case ProcessAnnualInitCommon.FGBMCLRSP:
|
case PlanChangeCommon.FGBMCLRSP:
|
||||||
fgbmclrspApprove(processInfoVO, processDTO, pass);
|
fgbmclrspApprove(processInfoVO, processDTO, pass);
|
||||||
break;
|
break;
|
||||||
//法规部门经理审批
|
//法规部门经理审批
|
||||||
case ProcessAnnualInitCommon.FGBMJLSP:
|
case PlanChangeCommon.FGBMJLSP:
|
||||||
fgbmjlspApprove(processInfoVO, processDTO, pass);
|
fgbmjlspApprove(processInfoVO, processDTO, pass);
|
||||||
break;
|
break;
|
||||||
//高级经理审批
|
//高级经理审批
|
||||||
case ProcessAnnualInitCommon.GJJLSP:
|
case PlanChangeCommon.GJJLSP:
|
||||||
gjjlspApprove(processInfoVO, processDTO, pass);
|
gjjlspApprove(processInfoVO, processDTO, pass);
|
||||||
break;
|
break;
|
||||||
//总监审批
|
//总监审批
|
||||||
case ProcessAnnualInitCommon.ZJSP:
|
case PlanChangeCommon.ZJSP:
|
||||||
zjspApprove(processInfoVO, processDTO, pass);
|
zjspApprove(processInfoVO, processDTO, pass);
|
||||||
break;
|
break;
|
||||||
//授权人审批
|
//授权人审批
|
||||||
case ProcessAnnualInitCommon.SQRSP:
|
case PlanChangeCommon.SQRSP:
|
||||||
sqrspApprove(processInfoVO, processDTO, pass);
|
sqrspApprove(processInfoVO, processDTO, pass);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -234,7 +229,7 @@ public class ProcessPlanChangeService extends ServiceImpl<ProcessPlanChangeMappe
|
|||||||
// 完成任务
|
// 完成任务
|
||||||
Map<String, Object> variables = new HashMap<>();
|
Map<String, Object> variables = new HashMap<>();
|
||||||
variables.put(ActivitiCommon.PASS, pass);
|
variables.put(ActivitiCommon.PASS, pass);
|
||||||
variables.put(ProcessAnnualInitCommon.STANDARD_DEPART_HANDLER, planChange.getStandardDepartHandler());
|
variables.put(PlanChangeCommon.STANDARD_DEPART_HANDLER, planChange.getStandardDepartHandler());
|
||||||
taskService.complete(processDTO.getTaskId(), variables);
|
taskService.complete(processDTO.getTaskId(), variables);
|
||||||
if (!Objects.equals(userId, originUserId)) {
|
if (!Objects.equals(userId, originUserId)) {
|
||||||
String departManager = planChange.getDepartManager();
|
String departManager = planChange.getDepartManager();
|
||||||
@@ -255,7 +250,7 @@ public class ProcessPlanChangeService extends ServiceImpl<ProcessPlanChangeMappe
|
|||||||
// 完成任务
|
// 完成任务
|
||||||
Map<String, Object> variables = new HashMap<>();
|
Map<String, Object> variables = new HashMap<>();
|
||||||
variables.put(ActivitiCommon.PASS, pass);
|
variables.put(ActivitiCommon.PASS, pass);
|
||||||
variables.put(ProcessAnnualInitCommon.STANDARD_DEPART_MANAGER, planChange.getStandardDepartManager());
|
variables.put(PlanChangeCommon.STANDARD_DEPART_MANAGER, planChange.getStandardDepartManager());
|
||||||
|
|
||||||
taskService.complete(processDTO.getTaskId(), variables);
|
taskService.complete(processDTO.getTaskId(), variables);
|
||||||
if (!Objects.equals(userId, originUserId)) {
|
if (!Objects.equals(userId, originUserId)) {
|
||||||
@@ -276,7 +271,7 @@ public class ProcessPlanChangeService extends ServiceImpl<ProcessPlanChangeMappe
|
|||||||
// 完成任务
|
// 完成任务
|
||||||
Map<String, Object> variables = new HashMap<>();
|
Map<String, Object> variables = new HashMap<>();
|
||||||
variables.put(ActivitiCommon.PASS, pass);
|
variables.put(ActivitiCommon.PASS, pass);
|
||||||
variables.put(ProcessAnnualInitCommon.SENIOR_MANAGER_LIST, Arrays.asList(planChange.getSeniorManager().split(",")));
|
variables.put(PlanChangeCommon.SENIOR_MANAGER_LIST, Arrays.asList(planChange.getSeniorManager().split(",")));
|
||||||
|
|
||||||
taskService.complete(processDTO.getTaskId(), variables);
|
taskService.complete(processDTO.getTaskId(), variables);
|
||||||
if (!Objects.equals(userId, originUserId)) {
|
if (!Objects.equals(userId, originUserId)) {
|
||||||
@@ -297,7 +292,7 @@ public class ProcessPlanChangeService extends ServiceImpl<ProcessPlanChangeMappe
|
|||||||
// 完成任务
|
// 完成任务
|
||||||
Map<String, Object> variables = new HashMap<>();
|
Map<String, Object> variables = new HashMap<>();
|
||||||
variables.put(ActivitiCommon.PASS, pass);
|
variables.put(ActivitiCommon.PASS, pass);
|
||||||
variables.put(ProcessAnnualInitCommon.CHIEF_INSPECTOR_LIST, Arrays.asList(planChange.getChiefInspector().split(",")));
|
variables.put(PlanChangeCommon.CHIEF_INSPECTOR_LIST, Arrays.asList(planChange.getChiefInspector().split(",")));
|
||||||
taskService.complete(processDTO.getTaskId(), variables);
|
taskService.complete(processDTO.getTaskId(), variables);
|
||||||
if (!Objects.equals(userId, originUserId)) {
|
if (!Objects.equals(userId, originUserId)) {
|
||||||
String departManager = planChange.getSeniorManager();
|
String departManager = planChange.getSeniorManager();
|
||||||
@@ -319,7 +314,7 @@ public class ProcessPlanChangeService extends ServiceImpl<ProcessPlanChangeMappe
|
|||||||
// 完成任务
|
// 完成任务
|
||||||
Map<String, Object> variables = new HashMap<>();
|
Map<String, Object> variables = new HashMap<>();
|
||||||
variables.put(ActivitiCommon.PASS, pass);
|
variables.put(ActivitiCommon.PASS, pass);
|
||||||
variables.put(ProcessAnnualInitCommon.AUTHORIZED_PERSON_LIST, Arrays.asList(planChange.getAuthorizedPerson().split(",")));
|
variables.put(PlanChangeCommon.AUTHORIZED_PERSON_LIST, Arrays.asList(planChange.getAuthorizedPerson().split(",")));
|
||||||
taskService.complete(processDTO.getTaskId(), variables);
|
taskService.complete(processDTO.getTaskId(), variables);
|
||||||
if (!Objects.equals(userId, originUserId)) {
|
if (!Objects.equals(userId, originUserId)) {
|
||||||
String departManager = planChange.getChiefInspector();
|
String departManager = planChange.getChiefInspector();
|
||||||
@@ -355,33 +350,103 @@ public class ProcessPlanChangeService extends ServiceImpl<ProcessPlanChangeMappe
|
|||||||
LambdaQueryWrapper<ProcessPlanChangeLink> myQuery = Wrappers.lambdaQuery(ProcessPlanChangeLink.class);
|
LambdaQueryWrapper<ProcessPlanChangeLink> myQuery = Wrappers.lambdaQuery(ProcessPlanChangeLink.class);
|
||||||
myQuery.eq(ProcessPlanChangeLink::getProcessId, businessId);
|
myQuery.eq(ProcessPlanChangeLink::getProcessId, businessId);
|
||||||
List<ProcessPlanChangeLink> list = planChangeLinkService.list(myQuery);
|
List<ProcessPlanChangeLink> list = planChangeLinkService.list(myQuery);
|
||||||
List<EnterpriseStandardPlan> enterpriseStandardPlanList = convertToEnterpriseStandardPlanList(list);
|
String changeType = planChange.getChangeType();
|
||||||
esPlanService.saveBatch(enterpriseStandardPlanList);
|
switch (changeType){
|
||||||
|
case PlanChangeCommon.ADD:
|
||||||
|
List<EnterpriseStandardPlan> addList = convertToAddList(list);
|
||||||
|
esPlanService.saveBatch(addList);
|
||||||
|
break;
|
||||||
|
case PlanChangeCommon.CANCEL:
|
||||||
|
List<EnterpriseStandardPlan> cancelList = convertToCancelList(list);
|
||||||
|
esPlanService.updateBatchById(cancelList);
|
||||||
|
break;
|
||||||
|
case PlanChangeCommon.DELAY:
|
||||||
|
List<EnterpriseStandardPlan> delayList = convertToDelayList(list);
|
||||||
|
esPlanService.updateBatchById(delayList);
|
||||||
|
break;
|
||||||
|
case PlanChangeCommon.PERSON_CHANGE:
|
||||||
|
List<EnterpriseStandardPlan> personChangeList = convertToPersonChangeList(list);
|
||||||
|
esPlanService.updateBatchById(personChangeList);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<EnterpriseStandardPlan> convertToEnterpriseStandardPlanList(List<ProcessPlanChangeLink> list) {
|
private List<EnterpriseStandardPlan> convertToPersonChangeList(List<ProcessPlanChangeLink> list) {
|
||||||
List<EnterpriseStandardPlan> enterpriseStandardPlanlist= Lists.newArrayList();
|
List<EnterpriseStandardPlan> enterpriseStandardPlanlist=Lists.newArrayList();
|
||||||
for (ProcessPlanChangeLink ProcessPlanChangeLink :list) {
|
for (ProcessPlanChangeLink processPlanChangeLink :list) {
|
||||||
enterpriseStandardPlanlist.add(convertFromProcessAnnualInitLink(ProcessPlanChangeLink));
|
enterpriseStandardPlanlist.add(convertFromPersonChange(processPlanChangeLink));
|
||||||
|
}
|
||||||
|
return enterpriseStandardPlanlist;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private EnterpriseStandardPlan convertFromPersonChange(ProcessPlanChangeLink processPlanChangeLink) {
|
||||||
|
EnterpriseStandardPlan enterpriseStandardPlan = new EnterpriseStandardPlan();
|
||||||
|
enterpriseStandardPlan.setId(processPlanChangeLink.getPlanId());
|
||||||
|
enterpriseStandardPlan.setMainDraftingUser(processPlanChangeLink.getMainDraftingUser());
|
||||||
|
|
||||||
|
return enterpriseStandardPlan;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<EnterpriseStandardPlan> convertToDelayList(List<ProcessPlanChangeLink> list) {
|
||||||
|
List<EnterpriseStandardPlan> enterpriseStandardPlanlist=Lists.newArrayList();
|
||||||
|
for (ProcessPlanChangeLink processPlanChangeLink :list) {
|
||||||
|
enterpriseStandardPlanlist.add(convertFromDelay(processPlanChangeLink));
|
||||||
}
|
}
|
||||||
return enterpriseStandardPlanlist;
|
return enterpriseStandardPlanlist;
|
||||||
}
|
}
|
||||||
|
|
||||||
private EnterpriseStandardPlan convertFromProcessAnnualInitLink(ProcessPlanChangeLink ProcessPlanChangeLink) {
|
private EnterpriseStandardPlan convertFromDelay(ProcessPlanChangeLink processPlanChangeLink) {
|
||||||
EnterpriseStandardPlan enterpriseStandardPlan = new EnterpriseStandardPlan();
|
EnterpriseStandardPlan enterpriseStandardPlan = new EnterpriseStandardPlan();
|
||||||
enterpriseStandardPlan.setRevisionType(ProcessPlanChangeLink.getRevisionType());
|
enterpriseStandardPlan.setId(processPlanChangeLink.getPlanId());
|
||||||
//enterpriseStandardPlan.setProjectType();
|
enterpriseStandardPlan.setDraftCompleteDate(processPlanChangeLink.getDraftCompleteDate());
|
||||||
//enterpriseStandardPlan.setStandardId(ProcessPlanChangeLink.getStandardId());
|
enterpriseStandardPlan.setPlanArchivingDate(processPlanChangeLink.getPlanArchivingDate());
|
||||||
//enterpriseStandardPlan.setStandardNumber(ProcessPlanChangeLink.getStandardNumber());
|
enterpriseStandardPlan.setPlanStatus(ESPlanStatusEnum.DELAY.getValue());
|
||||||
//enterpriseStandardPlan.setStandardName(ProcessPlanChangeLink.getStandardName());
|
|
||||||
//enterpriseStandardPlan.setMainDraftingUser(ProcessPlanChangeLink.getMainDraftingUser());
|
return enterpriseStandardPlan;
|
||||||
enterpriseStandardPlan.setDepartId(ProcessPlanChangeLink.getDepartId());
|
}
|
||||||
//enterpriseStandardPlan.setProfessionalModule(ProcessPlanChangeLink.getProfessionalModule());
|
|
||||||
enterpriseStandardPlan.setDraftCompleteDate(ProcessPlanChangeLink.getDraftCompleteDate());
|
private List<EnterpriseStandardPlan> convertToCancelList(List<ProcessPlanChangeLink> list) {
|
||||||
enterpriseStandardPlan.setPlanArchivingDate(ProcessPlanChangeLink.getPlanArchivingDate());
|
List<EnterpriseStandardPlan> enterpriseStandardPlanlist=Lists.newArrayList();
|
||||||
//enterpriseStandardPlan.setHaveEnglishVersion(ProcessPlanChangeLink.getHaveEnglishVersion());
|
for (ProcessPlanChangeLink processPlanChangeLink :list) {
|
||||||
//enterpriseStandardPlan.setCommittee(ProcessPlanChangeLink.getCommittee());
|
enterpriseStandardPlanlist.add(convertFromCancel(processPlanChangeLink));
|
||||||
|
}
|
||||||
|
return enterpriseStandardPlanlist;
|
||||||
|
}
|
||||||
|
|
||||||
|
private EnterpriseStandardPlan convertFromCancel(ProcessPlanChangeLink processPlanChangeLink) {
|
||||||
|
EnterpriseStandardPlan enterpriseStandardPlan = new EnterpriseStandardPlan();
|
||||||
|
enterpriseStandardPlan.setId(processPlanChangeLink.getPlanId());
|
||||||
|
enterpriseStandardPlan.setPlanStatus(ESPlanStatusEnum.CANCEL.getValue());
|
||||||
|
|
||||||
|
return enterpriseStandardPlan;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<EnterpriseStandardPlan> convertToAddList(List<ProcessPlanChangeLink> list) {
|
||||||
|
List<EnterpriseStandardPlan> enterpriseStandardPlanlist= Lists.newArrayList();
|
||||||
|
for (ProcessPlanChangeLink ProcessPlanChangeLink :list) {
|
||||||
|
enterpriseStandardPlanlist.add(convertFromAdd(ProcessPlanChangeLink));
|
||||||
|
}
|
||||||
|
return enterpriseStandardPlanlist;
|
||||||
|
}
|
||||||
|
|
||||||
|
private EnterpriseStandardPlan convertFromAdd(ProcessPlanChangeLink processPlanChangeLink) {
|
||||||
|
EnterpriseStandardPlan enterpriseStandardPlan = new EnterpriseStandardPlan();
|
||||||
|
enterpriseStandardPlan.setRevisionType(processPlanChangeLink.getRevisionType());
|
||||||
|
enterpriseStandardPlan.setStandardId(processPlanChangeLink.getStandardId());
|
||||||
|
enterpriseStandardPlan.setStandardNumber(processPlanChangeLink.getStandardNumber());
|
||||||
|
enterpriseStandardPlan.setStandardName(processPlanChangeLink.getStandardName());
|
||||||
|
enterpriseStandardPlan.setMainDraftingUser(processPlanChangeLink.getMainDraftingUser());
|
||||||
|
enterpriseStandardPlan.setDepartId(processPlanChangeLink.getDepartId());
|
||||||
|
enterpriseStandardPlan.setProfessionalModule(processPlanChangeLink.getProfessionalModule());
|
||||||
|
enterpriseStandardPlan.setDraftCompleteDate(processPlanChangeLink.getDraftCompleteDate());
|
||||||
|
enterpriseStandardPlan.setPlanArchivingDate(processPlanChangeLink.getPlanArchivingDate());
|
||||||
|
enterpriseStandardPlan.setHaveEnglishVersion(processPlanChangeLink.getHaveEnglishVersion());
|
||||||
|
enterpriseStandardPlan.setCommittee(processPlanChangeLink.getCommittee());
|
||||||
enterpriseStandardPlan.setProjectStatus(ESPProjectStatus.NOT_STARTED.getValue());
|
enterpriseStandardPlan.setProjectStatus(ESPProjectStatus.NOT_STARTED.getValue());
|
||||||
enterpriseStandardPlan.setPlanStatus(ESPlanStatusEnum.ADD.getValue());
|
enterpriseStandardPlan.setPlanStatus(ESPlanStatusEnum.ADD.getValue());
|
||||||
return enterpriseStandardPlan;
|
return enterpriseStandardPlan;
|
||||||
|
|||||||
Reference in New Issue
Block a user