add 企标计划变更流程 基础代码
This commit is contained in:
@@ -17,8 +17,9 @@ public enum ProcessTypeEnum {
|
||||
MARKET_STANDARD_PUBLISH("市场清单发布流程", 4, "com.jero.modules.activiti.process.ms.service.impl.ProcessMarketStandardReleaseServiceImpl", "/workCenter/MarketListReleaseProcess", "/workCenter/MarketListReleaseProcess"),
|
||||
ENTERPRISE_STANDARD_ABOLISH_PUBLISH("企标废止发布流程", 5, "com.jero.modules.activiti.process.abolish.service.impl.ProcessAbolishReleaseServiceImpl", "/workCenter/AbolishReleaseProcess", "/workCenter/AbolishReleaseProcess"),
|
||||
ES_REVISION_ADVICE("企业标准制修订及征求意见流程", 6, "com.jero.modules.activiti.process.esRevisionAdvice.service.impl.EsRevisionServiceImpl","/workCenter/enterpriseStandardRevision/enterpriseStandardRevisionFlow","/workCenter/enterpriseStandardRevision"),
|
||||
ANNUAL_INIT("年度制修订计划流程", 7, "com.jero.modules.activiti.process.annualinit.service.ProcessAnnualInitService","/workCenter/enterpriseStandardRevision/enterpriseStandardRevisionFlow","/workCenter/enterpriseStandardRevision"),
|
||||
DOMESTIC_VEHICLE_CONTROL_PUBLISH("国内整车型号和VIN前八位管控流程", 8, "com.jero.modules.activiti.process.vehicledomestic.service.impl.ProcessVehicleDomesticReleaseServiceImpl","/workCenter/VehicleDomesticReleaseProcess","/workCenter/VehicleDomesticReleaseProcess")
|
||||
ANNUAL_INIT("企业标准年度制修订计划流程", 7, "com.jero.modules.activiti.process.annualinit.service.ProcessAnnualInitService","/workCenter/ESAnnualRevisionPlanProcess","/workCenter/ESAnnualRevisionPlanProcess"),
|
||||
DOMESTIC_VEHICLE_CONTROL_PUBLISH("国内整车型号和VIN前八位管控流程", 8, "com.jero.modules.activiti.process.vehicledomestic.service.impl.ProcessVehicleDomesticReleaseServiceImpl","/workCenter/VehicleDomesticReleaseProcess","/workCenter/VehicleDomesticReleaseProcess"),
|
||||
PLAN_CHANGE("企业标准计划变更流程", 9, "com.jero.modules.activiti.process.planchange.service.ProcessPlanChangeService","/workCenter/enterpriseStandardRevision/enterpriseStandardRevisionFlow","/workCenter/enterpriseStandardRevision"),
|
||||
;
|
||||
|
||||
private final String name;
|
||||
|
||||
+3
-2
@@ -17,8 +17,9 @@ public enum ProcessType {
|
||||
MARKET_STANDARD_PUBLISH("市场清单发布流程", "4", "market_standard_publish", "ProcessNewStandardImportServiceImpl"),
|
||||
ENTERPRISE_STANDARD_ABOLISH_PUBLISH("企标废止发布流程", "5", "enterprise_standard_abolish_publish", "ProcessAbolishReleaseServiceImpl"),
|
||||
ES_REVISION_ADVICE("企标制修订及征求意见流程", "6", "es_revision_advice", "ProcessEsRevisionServiceImpl"),
|
||||
ANNUAL_INIT("年度制修订计划流程", "7", "process-annual-init", "ProcessAnnualInitService"),
|
||||
DOMESTIC_VEHICLE_CONTROL_PUBLISH("国内整车型号和VIN前八位管控流程", "8", "domestic_vehicle_control_publish", "ProcessVehicleDomesticReleaseServiceImpl")
|
||||
ANNUAL_INIT("企业标准年度制修订计划流程", "7", "process-annual-init", "ProcessAnnualInitService"),
|
||||
DOMESTIC_VEHICLE_CONTROL_PUBLISH("国内整车型号和VIN前八位管控流程", "8", "domestic_vehicle_control_publish", "ProcessVehicleDomesticReleaseServiceImpl"),
|
||||
PLAN_CHANGE("企业标准计划变更流程", "9", "process-plan-change", "ProcessPlanChangeService"),
|
||||
;
|
||||
|
||||
private final String name;
|
||||
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
package com.jero.modules.activiti.process.planchange.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.aspect.annotation.DictPoint;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.activiti.enums.ProcessTypeEnum;
|
||||
import com.jero.modules.activiti.process.common.entity.ProcessDraft;
|
||||
import com.jero.modules.activiti.process.common.service.ActFlowCommonService;
|
||||
import com.jero.modules.activiti.process.planchange.entity.ProcessPlanChange;
|
||||
import com.jero.modules.activiti.process.planchange.service.ProcessPlanChangeService;
|
||||
import com.jero.modules.activiti.process.fb.vo.ProcessInfoVO;
|
||||
import com.jero.modules.activiti.process.planchange.vo.ProcessPlanChangeVO;
|
||||
import com.jero.modules.system.vo.IdMapBody;
|
||||
import com.jero.modules.system.vo.IdsMapBody;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.api.vo.ResultCommon;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 企标计划变更流程表(ProcessPlanChange)表控制层
|
||||
*
|
||||
* @author lijiarao
|
||||
* @since 2024-09-29 15:14:54
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "企标计划变更流程表")
|
||||
@RestController
|
||||
@RequestMapping("/process/processPlanChange")
|
||||
public class ProcessPlanChangeController extends JeroController<ProcessPlanChange, ProcessPlanChangeService> {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private ProcessPlanChangeService processPlanChangeService;
|
||||
@Resource
|
||||
private ActFlowCommonService actFlowCommonService;
|
||||
|
||||
@DictPoint
|
||||
@GetMapping("/queryProcessInfoVO")
|
||||
@AutoLog(value = "企标计划变更流程表-查询流程信息")
|
||||
@ApiImplicitParam(name = "taskId", value = "任务id")
|
||||
@ApiOperation("企标计划变更流程表-查询流程信息")
|
||||
public Result<?> queryProcessInfoVO(String taskId) {
|
||||
ProcessDraft draft = actFlowCommonService.getExistDraftByTaskId(taskId, ProcessTypeEnum.ANNUAL_INIT);
|
||||
if (draft != null) {
|
||||
return Result.OK(draft);
|
||||
}
|
||||
return Result.OK(processPlanChangeService.getHandleData(taskId));
|
||||
}
|
||||
|
||||
@AutoLog(value = "企标计划变更流程表-发起流程")
|
||||
@ApiOperation(value = "企标计划变更流程表-发起流程")
|
||||
@PostMapping(value = "/startProcess")
|
||||
public Result<T> startProcess(@Validated @RequestBody ProcessInfoVO<ProcessPlanChangeVO> processInfoVO) {
|
||||
processPlanChangeService.startProcess(processInfoVO);
|
||||
return Result.OK();
|
||||
}
|
||||
|
||||
@AutoLog(value = "企标计划变更流程表-同意")
|
||||
@ApiOperation(value = "企标计划变更流程表-同意")
|
||||
@PostMapping("/agree")
|
||||
public Result<T> agree(@Validated @RequestBody ProcessInfoVO<ProcessPlanChangeVO> processInfoVO) {
|
||||
processPlanChangeService.approveTask(processInfoVO, true);
|
||||
return Result.OK();
|
||||
}
|
||||
|
||||
@AutoLog(value = "企标计划变更流程表-驳回")
|
||||
@ApiOperation(value = "企标计划变更流程表-驳回")
|
||||
@PostMapping("/reject")
|
||||
public Result<T> reject(@Validated @RequestBody ProcessInfoVO<ProcessPlanChangeVO> processInfoVO) {
|
||||
processPlanChangeService.approveTask(processInfoVO, false);
|
||||
return Result.OK();
|
||||
}
|
||||
|
||||
@AutoLog(value = "企标计划变更流程表-提交")
|
||||
@ApiOperation(value = "企标计划变更流程表-提交")
|
||||
@PostMapping("/submit")
|
||||
public Result<T> submit(@Validated @RequestBody ProcessInfoVO<ProcessPlanChangeVO> processInfoVO) {
|
||||
processPlanChangeService.submit(processInfoVO);
|
||||
return Result.OK();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
package com.jero.modules.activiti.process.planchange.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.activiti.process.planchange.entity.ProcessPlanChangeLink;
|
||||
import com.jero.modules.activiti.process.planchange.service.ProcessPlanChangeLinkService;
|
||||
import com.jero.modules.system.vo.IdMapBody;
|
||||
import com.jero.modules.system.vo.IdsMapBody;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.api.vo.ResultCommon;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 企标计划变更流程关联标准(ProcessPlanChangeLink)表控制层
|
||||
*
|
||||
* @author lijiarao
|
||||
* @since 2024-09-29 15:15:10
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "企标计划变更流程关联标准")
|
||||
@RestController
|
||||
@RequestMapping("processPlanChangeLink")
|
||||
public class ProcessPlanChangeLinkController extends JeroController<ProcessPlanChangeLink, ProcessPlanChangeLinkService> {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private ProcessPlanChangeLinkService processPlanChangeLinkService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*/
|
||||
@ApiOperation(value = "企标计划变更流程关联标准-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<IPage<ProcessPlanChangeLink>> queryPageList(ProcessPlanChangeLink processPlanChangeLink,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
Page<ProcessPlanChangeLink> page = new Page<>(pageNo, pageSize);
|
||||
IPage<ProcessPlanChangeLink> pageList = processPlanChangeLinkService.pageList(page, processPlanChangeLink, req);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*/
|
||||
@ApiOperation(value = "企标计划变更流程关联标准-列表查询", notes = "企标计划变更流程关联标准-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProcessPlanChangeLink>> queryList(ProcessPlanChangeLink processPlanChangeLink,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProcessPlanChangeLink> queryWrapper = QueryGenerator.initQueryWrapper(processPlanChangeLink, req.getParameterMap());
|
||||
List<ProcessPlanChangeLink> list = processPlanChangeLinkService.list(queryWrapper);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
@AutoLog(value = "企标计划变更流程关联标准-添加")
|
||||
@ApiOperation(value = "企标计划变更流程关联标准-添加", notes = "企标计划变更流程关联标准-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@Validated @RequestBody ProcessPlanChangeLink processPlanChangeLink) {
|
||||
processPlanChangeLinkService.add(processPlanChangeLink);
|
||||
return Result.OK(ResultCommon.OK);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@AutoLog(value = "企标计划变更流程关联标准-编辑")
|
||||
@ApiOperation(value = "企标计划变更流程关联标准-编辑", notes = "企标计划变更流程关联标准-编辑")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<String> edit(@Validated @RequestBody ProcessPlanChangeLink processPlanChangeLink) {
|
||||
processPlanChangeLinkService.editById(processPlanChangeLink);
|
||||
return Result.OK(ResultCommon.EDIT_OK);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*/
|
||||
@AutoLog(value = "企标计划变更流程关联标准-通过id删除")
|
||||
@ApiOperation(value = "企标计划变更流程关联标准-通过id删除", notes = "企标计划变更流程关联标准-通过id删除")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestBody IdMapBody map) {
|
||||
String id = map.getId();
|
||||
if (StringUtils.isBlank(id)) {
|
||||
return Result.error("请选择数据");
|
||||
}
|
||||
processPlanChangeLinkService.deleteById(id);
|
||||
return Result.OK(ResultCommon.SUCCESSFULLY_DELETED);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
@AutoLog(value = "企标计划变更流程关联标准-批量删除")
|
||||
@ApiOperation(value = "企标计划变更流程关联标准-批量删除", notes = "企标计划变更流程关联标准-批量删除")
|
||||
@PostMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestBody IdsMapBody map) {
|
||||
String ids = map.getIds();
|
||||
if (StringUtils.isBlank(ids)) {
|
||||
return Result.error(ResultCommon.PLEASE_SELECT_DATA);
|
||||
}
|
||||
List<String> idList = Arrays.asList(map.getIds().split(","));
|
||||
this.processPlanChangeLinkService.deleteByIds(idList);
|
||||
return Result.OK(ResultCommon.SUCCESSFULLY_DELETED_IN_BULK);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*/
|
||||
@AutoLog(value = "企标计划变更流程关联标准-通过id查询")
|
||||
@ApiOperation(value = "企标计划变更流程关联标准-通过id查询", notes = "企标计划变更流程关联标准-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<ProcessPlanChangeLink> queryById(@RequestParam(name = "id") String id) {
|
||||
ProcessPlanChangeLink processPlanChangeLink = processPlanChangeLinkService.queryById(id);
|
||||
if (processPlanChangeLink == null) {
|
||||
return Result.error(ResultCommon.NO_CORRESPONDING_DATA_FOUND);
|
||||
}
|
||||
return Result.OK(processPlanChangeLink);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*/
|
||||
@ApiOperation(value = "企标计划变更流程关联标准-导出excel")
|
||||
@GetMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest req, ProcessPlanChangeLink processPlanChangeLink) {
|
||||
Page<ProcessPlanChangeLink> page = new Page<>(-1, -1);
|
||||
IPage<ProcessPlanChangeLink> pageList = processPlanChangeLinkService.pageList(page, processPlanChangeLink, req);
|
||||
// 获取数据
|
||||
List<ProcessPlanChangeLink> records = pageList.getRecords();
|
||||
return super.exportListXls(records, ProcessPlanChangeLink.class, "企标计划变更流程关联标准");
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载导入模板
|
||||
*/
|
||||
@ApiOperation(value = "企标计划变更流程关联标准-下载导入模板")
|
||||
@GetMapping(value = "/exportTemplate")
|
||||
public ModelAndView exportTemplate(HttpServletRequest req, ProcessPlanChangeLink processPlanChangeLink) {
|
||||
List<ProcessPlanChangeLink> records = new ArrayList<>();
|
||||
return super.exportListXls(records, ProcessPlanChangeLink.class, "企标计划变更流程关联标准");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*/
|
||||
@ApiOperation(value = "企标计划变更流程关联标准-通过excel导入数据")
|
||||
@PostMapping(value = "/importExcel")
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ProcessPlanChangeLink.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+122
@@ -0,0 +1,122 @@
|
||||
package com.jero.modules.activiti.process.planchange.entity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
|
||||
/**
|
||||
* 企标计划变更流程表(ProcessPlanChange)实体类
|
||||
*
|
||||
* @author lijiarao
|
||||
* @since 2024-09-29 15:14:54
|
||||
*/
|
||||
@Data
|
||||
@TableName("process_plan_change")
|
||||
@ApiModel(value = "ProcessPlanChange", description = "企标计划变更流程表")
|
||||
public class ProcessPlanChange implements Serializable {
|
||||
private static final long serialVersionUID = -96899431864255187L;
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键id")
|
||||
private String id;
|
||||
/**
|
||||
* 变更类型
|
||||
*/
|
||||
@ApiModelProperty(value = "变更类型")
|
||||
@Excel(name = "变更类型", width = 15)
|
||||
private String changeType;
|
||||
/**
|
||||
* 部门经理
|
||||
*/
|
||||
@ApiModelProperty(value = "部门经理")
|
||||
@Excel(name = "部门经理", width = 15)
|
||||
private String departManager;
|
||||
/**
|
||||
* 法规部门处理人id
|
||||
*/
|
||||
@ApiModelProperty(value = "法规部门处理人id")
|
||||
@Excel(name = "法规部门处理人id", width = 15)
|
||||
private String standardDepartHandler;
|
||||
/**
|
||||
* 法规部门经理id
|
||||
*/
|
||||
@ApiModelProperty(value = "法规部门经理id")
|
||||
@Excel(name = "法规部门经理id", width = 15)
|
||||
private String standardDepartManager;
|
||||
/**
|
||||
* 高级经理
|
||||
*/
|
||||
@ApiModelProperty(value = "高级经理")
|
||||
@Excel(name = "高级经理", width = 15)
|
||||
private String seniorManager;
|
||||
/**
|
||||
* 总监
|
||||
*/
|
||||
@ApiModelProperty(value = "总监")
|
||||
@Excel(name = "总监", width = 15)
|
||||
private String chiefInspector;
|
||||
/**
|
||||
* 授权人
|
||||
*/
|
||||
@ApiModelProperty(value = "授权人")
|
||||
@Excel(name = "授权人", width = 15)
|
||||
private String authorizedPerson;
|
||||
/**
|
||||
* 附件
|
||||
*/
|
||||
@ApiModelProperty(value = "附件")
|
||||
@Excel(name = "附件", width = 15)
|
||||
private String file;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String orgCode;
|
||||
/**
|
||||
* 删除状态(0-正常,1-删除)
|
||||
*/
|
||||
@ApiModelProperty(value = "删除状态(0-正常,1-删除)")
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+126
@@ -0,0 +1,126 @@
|
||||
package com.jero.modules.activiti.process.planchange.entity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
|
||||
/**
|
||||
* 企标计划变更流程关联标准(ProcessPlanChangeLink)实体类
|
||||
*
|
||||
* @author lijiarao
|
||||
* @since 2024-09-29 15:15:11
|
||||
*/
|
||||
@Data
|
||||
@TableName("process_plan_change_link")
|
||||
@ApiModel(value = "ProcessPlanChangeLink", description = "企标计划变更流程关联标准")
|
||||
public class ProcessPlanChangeLink implements Serializable {
|
||||
private static final long serialVersionUID = -68223646123689976L;
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键id")
|
||||
private String id;
|
||||
/**
|
||||
* 流程主表id
|
||||
*/
|
||||
@ApiModelProperty(value = "流程主表id")
|
||||
@Excel(name = "流程主表id", width = 15)
|
||||
private String processId;
|
||||
/**
|
||||
* 制修订类别
|
||||
*/
|
||||
@ApiModelProperty(value = "制修订类别")
|
||||
@Excel(name = "制修订类别", width = 15)
|
||||
private String revisionType;
|
||||
/**
|
||||
* 企标计划
|
||||
*/
|
||||
@ApiModelProperty(value = "企标计划")
|
||||
@Excel(name = "企标计划", width = 15)
|
||||
private String planId;
|
||||
/**
|
||||
* 起草人
|
||||
*/
|
||||
@ApiModelProperty(value = "起草人")
|
||||
@Excel(name = "起草人", width = 15)
|
||||
private String draftingUser;
|
||||
/**
|
||||
* 所在部门id
|
||||
*/
|
||||
@ApiModelProperty(value = "所在部门id")
|
||||
@Excel(name = "所在部门id", width = 15)
|
||||
private String departId;
|
||||
/**
|
||||
* 初稿完成日期变更后
|
||||
*/
|
||||
@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 draftCompleteDate;
|
||||
/**
|
||||
* 计划归档日期变更后
|
||||
*/
|
||||
@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 planArchivingDate;
|
||||
/**
|
||||
* 变更原因
|
||||
*/
|
||||
@ApiModelProperty(value = "变更原因")
|
||||
@Excel(name = "变更原因", width = 15)
|
||||
private String changeReason;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String orgCode;
|
||||
/**
|
||||
* 删除状态(0-正常,1-删除)
|
||||
*/
|
||||
@ApiModelProperty(value = "删除状态(0-正常,1-删除)")
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package com.jero.modules.activiti.process.planchange.mapper;
|
||||
|
||||
import com.jero.modules.activiti.process.planchange.entity.ProcessPlanChangeLink;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* 企标计划变更流程关联标准(ProcessPlanChangeLink)表数据库访问层
|
||||
*
|
||||
* @author lijiarao
|
||||
* @since 2024-09-29 15:15:11
|
||||
*/
|
||||
public interface ProcessPlanChangeLinkMapper extends BaseMapper<ProcessPlanChangeLink> {
|
||||
|
||||
}
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package com.jero.modules.activiti.process.planchange.mapper;
|
||||
|
||||
import com.jero.modules.activiti.process.planchange.entity.ProcessPlanChange;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* 企标计划变更流程表(ProcessPlanChange)表数据库访问层
|
||||
*
|
||||
* @author lijiarao
|
||||
* @since 2024-09-29 15:14:54
|
||||
*/
|
||||
public interface ProcessPlanChangeMapper extends BaseMapper<ProcessPlanChange> {
|
||||
|
||||
}
|
||||
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jero.modules.activiti.process.planchange.mapper.ProcessPlanChangeLinkMapper">
|
||||
<resultMap id="BaseResultMap" type="com.jero.modules.activiti.process.planchange.entity.ProcessPlanChangeLink">
|
||||
<!--@Table process_plan_change_link-->
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="processId" column="process_id" jdbcType="VARCHAR"/>
|
||||
<result property="revisionType" column="revision_type" jdbcType="VARCHAR"/>
|
||||
<result property="planId" column="plan_id" jdbcType="VARCHAR"/>
|
||||
<result property="draftingUser" column="drafting_user" jdbcType="VARCHAR"/>
|
||||
<result property="departId" column="depart_id" jdbcType="VARCHAR"/>
|
||||
<result property="draftCompleteDate" column="draft_complete_date" jdbcType="TIMESTAMP"/>
|
||||
<result property="planArchivingDate" column="plan_archiving_date" jdbcType="TIMESTAMP"/>
|
||||
<result property="changeReason" column="change_reason" jdbcType="VARCHAR"/>
|
||||
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="orgCode" column="org_code" jdbcType="VARCHAR"/>
|
||||
<result property="delFlag" column="del_flag" jdbcType="INTEGER"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,
|
||||
process_id,
|
||||
revision_type,
|
||||
plan_id,
|
||||
drafting_user,
|
||||
depart_id,
|
||||
draft_complete_date,
|
||||
plan_archiving_date,
|
||||
change_reason,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time,
|
||||
org_code,
|
||||
del_flag
|
||||
</sql>
|
||||
</mapper>
|
||||
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jero.modules.activiti.process.planchange.mapper.ProcessPlanChangeMapper">
|
||||
<resultMap id="BaseResultMap" type="com.jero.modules.activiti.process.planchange.entity.ProcessPlanChange">
|
||||
<!--@Table process_plan_change-->
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="changeType" column="change_type" jdbcType="VARCHAR"/>
|
||||
<result property="departManager" column="depart_manager" jdbcType="VARCHAR"/>
|
||||
<result property="standardDepartHandler" column="standard_depart_handler" jdbcType="VARCHAR"/>
|
||||
<result property="standardDepartManager" column="standard_depart_manager" jdbcType="VARCHAR"/>
|
||||
<result property="seniorManager" column="senior_manager" jdbcType="VARCHAR"/>
|
||||
<result property="chiefInspector" column="chief_inspector" jdbcType="VARCHAR"/>
|
||||
<result property="authorizedPerson" column="authorized_person" jdbcType="VARCHAR"/>
|
||||
<result property="file" column="file" jdbcType="VARCHAR"/>
|
||||
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="orgCode" column="org_code" jdbcType="VARCHAR"/>
|
||||
<result property="delFlag" column="del_flag" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,
|
||||
change_type,
|
||||
depart_manager,
|
||||
standard_depart_handler,
|
||||
standard_depart_manager,
|
||||
senior_manager,
|
||||
chief_inspector,
|
||||
authorized_person,
|
||||
file,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time,
|
||||
org_code,
|
||||
del_flag
|
||||
</sql>
|
||||
</mapper>
|
||||
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
package com.jero.modules.activiti.process.planchange.service;
|
||||
|
||||
import com.jero.modules.activiti.process.planchange.entity.ProcessPlanChangeLink;
|
||||
import com.jero.modules.activiti.process.planchange.mapper.ProcessPlanChangeLinkMapper;
|
||||
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 javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 企标计划变更流程关联标准(ProcessPlanChangeLink)表服务实现类
|
||||
*
|
||||
* @author lijiarao
|
||||
* @since 2024-09-29 15:15:11
|
||||
*/
|
||||
@Slf4j
|
||||
@Service()
|
||||
public class ProcessPlanChangeLinkService extends ServiceImpl<ProcessPlanChangeLinkMapper, ProcessPlanChangeLink> {
|
||||
@Resource
|
||||
private ProcessPlanChangeLinkMapper processPlanChangeLinkMapper;
|
||||
|
||||
public IPage<ProcessPlanChangeLink> pageList(Page<ProcessPlanChangeLink> page, ProcessPlanChangeLink processPlanChangeLink, HttpServletRequest req) {
|
||||
QueryWrapper<ProcessPlanChangeLink> queryWrapper = QueryGenerator.initQueryWrapper(processPlanChangeLink, req.getParameterMap());
|
||||
return this.page(page, queryWrapper);
|
||||
}
|
||||
|
||||
public void add(ProcessPlanChangeLink processPlanChangeLink) {
|
||||
this.save(processPlanChangeLink);
|
||||
}
|
||||
|
||||
public void editById(ProcessPlanChangeLink processPlanChangeLink) {
|
||||
this.updateById(processPlanChangeLink);
|
||||
}
|
||||
|
||||
public void deleteById(String id) {
|
||||
this.removeById(id);
|
||||
}
|
||||
|
||||
public void deleteByIds(List<String> idList) {
|
||||
for (String id : idList) {
|
||||
deleteById(id);
|
||||
}
|
||||
}
|
||||
|
||||
public ProcessPlanChangeLink queryById(String id) {
|
||||
ProcessPlanChangeLink processPlanChangeLink = this.getById(id);
|
||||
return processPlanChangeLink;
|
||||
}
|
||||
}
|
||||
|
||||
+407
@@ -0,0 +1,407 @@
|
||||
package com.jero.modules.activiti.process.planchange.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.jero.common.system.api.ISysBaseAPI;
|
||||
import com.jero.modules.activiti.common.ActivitiCommon;
|
||||
import com.jero.modules.activiti.entity.ProcessAll;
|
||||
import com.jero.modules.activiti.entity.ProcessApprovalRecord;
|
||||
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.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.BasicTaskInfoDTO;
|
||||
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.vo.ProcessInfoVO;
|
||||
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.mapper.ProcessPlanChangeMapper;
|
||||
import com.jero.modules.activiti.process.planchange.vo.ProcessPlanChangeVO;
|
||||
import com.jero.modules.activiti.service.ProcessAllService;
|
||||
import com.jero.modules.laws.common.util.CurrentUserUtil;
|
||||
import com.jero.modules.laws.enterprise.entity.ESPProjectStatus;
|
||||
import com.jero.modules.laws.enterprise.entity.EnterpriseStandardPlan;
|
||||
import com.jero.modules.laws.enterprise.enums.ESPlanStatusEnum;
|
||||
import com.jero.modules.laws.enterprise.service.EnterpriseStandardPlanService;
|
||||
import org.activiti.engine.TaskService;
|
||||
import org.activiti.engine.task.Task;
|
||||
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 javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 企标计划变更流程表(ProcessPlanChange)表服务实现类
|
||||
*
|
||||
* @author lijiarao
|
||||
* @since 2024-09-29 15:14:55
|
||||
*/
|
||||
@Slf4j
|
||||
@Service()
|
||||
public class ProcessPlanChangeService extends ServiceImpl<ProcessPlanChangeMapper, ProcessPlanChange> {
|
||||
@Resource
|
||||
private ProcessPlanChangeMapper processPlanChangeMapper;
|
||||
@Resource
|
||||
private ISysBaseAPI sysBaseAPI;
|
||||
@Resource
|
||||
private IProcessHandleService processHandleService;
|
||||
@Resource
|
||||
private ProcessAllService processAllService;
|
||||
@Resource
|
||||
private TaskService taskService;
|
||||
@Resource
|
||||
private ProcessPlanChangeLinkService planChangeLinkService;
|
||||
@Resource
|
||||
private EnterpriseStandardPlanService esPlanService;
|
||||
|
||||
public void startProcess(ProcessInfoVO<ProcessPlanChangeVO> processInfoVO) {
|
||||
Map<String, Object> userInfoMap = processInfoVO.getUserInfoMap();
|
||||
ProcessPlanChangeVO businessInfoDTO = processInfoVO.getBusinessInfoDTO();
|
||||
ProcessPlanChange planChange = businessInfoDTO.getPlanChange();
|
||||
//补充流程主表信息
|
||||
String departManagerList = (String) userInfoMap.get("departManagerList");
|
||||
String standardDepartHandler = (String) userInfoMap.get("standardDepartHandler");
|
||||
String standardDepartManager = (String) userInfoMap.get("standardDepartManager");
|
||||
String seniorManagerList = (String) userInfoMap.get("seniorManagerList");
|
||||
String chiefInspectorList = (String) userInfoMap.get("chiefInspectorList");
|
||||
String authorizedPersonList = (String) userInfoMap.get("authorizedPersonList");
|
||||
|
||||
planChange.setDepartManager(departManagerList);
|
||||
planChange.setStandardDepartHandler(standardDepartHandler);
|
||||
planChange.setStandardDepartManager(standardDepartManager);
|
||||
planChange.setSeniorManager(seniorManagerList);
|
||||
planChange.setChiefInspector(chiefInspectorList);
|
||||
planChange.setAuthorizedPerson(authorizedPersonList);
|
||||
|
||||
this.saveOrUpdate(planChange);
|
||||
String annualInitId = planChange.getId();
|
||||
List<ProcessPlanChangeLink> planChangeLinkList = businessInfoDTO.getPlanChangeLinkList();
|
||||
for (ProcessPlanChangeLink link : planChangeLinkList) {
|
||||
link.setProcessId(annualInitId);
|
||||
}
|
||||
planChangeLinkService.saveOrUpdateBatch(planChangeLinkList);
|
||||
processInfoVO.setBusinessId(annualInitId);
|
||||
|
||||
//启动流程
|
||||
BasicProcessInfoDTO basicProcessInfoDTO = processInfoVO.getBasicProcessInfoDTO();
|
||||
basicProcessInfoDTO.setProcessDefinitionId(processHandleService.getDefinitionIdByKey(ProcessType.ANNUAL_INIT.getProcessKey())); // 流程定义id
|
||||
basicProcessInfoDTO.setProcessType(ProcessTypeEnum.ANNUAL_INIT.getValue()); // 流程类型
|
||||
userInfoMap.put(ProcessAnnualInitCommon.MAIN_DRAFTING_USER, CurrentUserUtil.getId());
|
||||
processInfoVO.setUserInfoMap(userInfoMap);
|
||||
String processInstanceId = processHandleService.startProcess(processInfoVO);
|
||||
|
||||
//start 先保存一份初始草稿
|
||||
processInfoVO.setSaveSource(DraftCommon.INITIAL_SOURCE);
|
||||
processHandleService.saveToDraft(processInfoVO, CurrentUserUtil.getId());
|
||||
//end 保存初始草稿结束
|
||||
//保存快照 start
|
||||
saveToSnapshot(processInfoVO, processInstanceId);
|
||||
//保存快照 end
|
||||
}
|
||||
|
||||
|
||||
public void submit(ProcessInfoVO<ProcessPlanChangeVO> processInfoVO) {
|
||||
BasicTaskInfoDTO basicTaskInfoDTO = processInfoVO.getBasicTaskInfoDTO();
|
||||
String taskId = basicTaskInfoDTO.getTaskId();
|
||||
ProcessDTO processDTO = processHandleService.getProcessDTO(taskId);
|
||||
String processInstanceId = processDTO.getProcessInstanceId();
|
||||
ProcessAll processAll = processAllService.getByProcessInstanceId(processInstanceId);
|
||||
processInfoVO.setBusinessId(processAll.getProjectId());
|
||||
Task task = processDTO.getTask();
|
||||
String taskDefinitionKey = task.getTaskDefinitionKey();
|
||||
processHandleService.updateApprovalRecord(processInfoVO);
|
||||
|
||||
Map<String, Object> userInfoMap = processInfoVO.getUserInfoMap();
|
||||
ProcessPlanChangeVO businessInfoDTO = processInfoVO.getBusinessInfoDTO();
|
||||
ProcessPlanChange planChange = businessInfoDTO.getPlanChange();
|
||||
//补充流程主表信息
|
||||
String departManagerList = (String) userInfoMap.get("departManagerList");
|
||||
String standardDepartHandler = (String) userInfoMap.get("standardDepartHandler");
|
||||
String standardDepartManager = (String) userInfoMap.get("standardDepartManager");
|
||||
String seniorManagerList = (String) userInfoMap.get("seniorManagerList");
|
||||
String chiefInspectorList = (String) userInfoMap.get("chiefInspectorList");
|
||||
String authorizedPersonList = (String) userInfoMap.get("authorizedPersonList");
|
||||
|
||||
planChange.setDepartManager(departManagerList);
|
||||
planChange.setStandardDepartHandler(standardDepartHandler);
|
||||
planChange.setStandardDepartManager(standardDepartManager);
|
||||
planChange.setSeniorManager(seniorManagerList);
|
||||
planChange.setChiefInspector(chiefInspectorList);
|
||||
planChange.setAuthorizedPerson(authorizedPersonList);
|
||||
|
||||
this.saveOrUpdate(planChange);
|
||||
String annualInitId = planChange.getId();
|
||||
//先删除,在新增
|
||||
LambdaQueryWrapper<ProcessPlanChangeLink> myQuery = Wrappers.lambdaQuery(ProcessPlanChangeLink.class);
|
||||
myQuery.eq(ProcessPlanChangeLink::getProcessId, planChange);
|
||||
planChangeLinkService.remove(myQuery);
|
||||
|
||||
List<ProcessPlanChangeLink> planChangeLinkList = businessInfoDTO.getPlanChangeLinkList();
|
||||
for (ProcessPlanChangeLink link : planChangeLinkList) {
|
||||
link.setProcessId(annualInitId);
|
||||
}
|
||||
planChangeLinkService.saveOrUpdateBatch(planChangeLinkList);
|
||||
|
||||
// 完成任务
|
||||
Map<String, Object> variables = new HashMap<>();
|
||||
taskService.complete(processDTO.getTaskId(), variables);
|
||||
|
||||
//保存快照 start
|
||||
saveToSnapshot(processInfoVO, processInstanceId);
|
||||
//保存快照 end
|
||||
}
|
||||
|
||||
private void saveToSnapshot(ProcessInfoVO<ProcessPlanChangeVO> processInfoVO, String processInstanceId) {
|
||||
// 获取流程通用数据
|
||||
ProcessAll process = processAllService.getByProcessInstanceId(processInstanceId);
|
||||
if(!Objects.isNull(process)){
|
||||
BasicProcessInfoDTO processInfoDTO = new BasicProcessInfoDTO();
|
||||
processInfoDTO.setProcessName(process.getPrcName());
|
||||
processInfoDTO.setProcessType(process.getPrcType());
|
||||
processInfoDTO.setProcessDefinitionId(process.getProcessDefinitionId());
|
||||
processInfoDTO.setProcessInstanceId(process.getProcessInstanceId());
|
||||
processInfoDTO.setProcessDescription(process.getPrcMes());
|
||||
processInfoDTO.setProcessDueDate(process.getDueTime());
|
||||
processInfoVO.setBasicProcessInfoDTO(processInfoDTO);
|
||||
// 保存快照
|
||||
processHandleService.saveToSnapshot(processInfoVO, CurrentUserUtil.getId());
|
||||
}
|
||||
}
|
||||
|
||||
public void approveTask(ProcessInfoVO<ProcessPlanChangeVO> processInfoVO, boolean pass) {
|
||||
BasicTaskInfoDTO basicTaskInfoDTO = processInfoVO.getBasicTaskInfoDTO();
|
||||
String taskId = basicTaskInfoDTO.getTaskId();
|
||||
ProcessDTO processDTO = processHandleService.getProcessDTO(taskId);
|
||||
String processInstanceId = processDTO.getProcessInstanceId();
|
||||
ProcessAll processAll = processAllService.getByProcessInstanceId(processInstanceId);
|
||||
processInfoVO.setBusinessId(processAll.getProjectId());
|
||||
Task task = processDTO.getTask();
|
||||
String taskDefinitionKey = task.getTaskDefinitionKey();
|
||||
processHandleService.updateApprovalRecord(processInfoVO);
|
||||
|
||||
switch (taskDefinitionKey) {
|
||||
//部门经理审批
|
||||
case ProcessAnnualInitCommon.BMJLSP:
|
||||
bmjlspApprove(processInfoVO, processDTO, pass);
|
||||
break;
|
||||
//法规部门处理人审批
|
||||
case ProcessAnnualInitCommon.FGBMCLRSP:
|
||||
fgbmclrspApprove(processInfoVO, processDTO, pass);
|
||||
break;
|
||||
//法规部门经理审批
|
||||
case ProcessAnnualInitCommon.FGBMJLSP:
|
||||
fgbmjlspApprove(processInfoVO, processDTO, pass);
|
||||
break;
|
||||
//高级经理审批
|
||||
case ProcessAnnualInitCommon.GJJLSP:
|
||||
gjjlspApprove(processInfoVO, processDTO, pass);
|
||||
break;
|
||||
//总监审批
|
||||
case ProcessAnnualInitCommon.ZJSP:
|
||||
zjspApprove(processInfoVO, processDTO, pass);
|
||||
break;
|
||||
//授权人审批
|
||||
case ProcessAnnualInitCommon.SQRSP:
|
||||
sqrspApprove(processInfoVO, processDTO, pass);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
//保存快照 start
|
||||
saveToSnapshot(processInfoVO, processInstanceId);
|
||||
//保存快照 end
|
||||
}
|
||||
|
||||
private void bmjlspApprove(ProcessInfoVO<ProcessPlanChangeVO> processInfoVO, ProcessDTO processDTO, boolean pass) {
|
||||
ProcessApprovalRecord processApprovalRecord = processDTO.getProcessApprovalRecord();
|
||||
String originUserId = processApprovalRecord.getOriginUserId();
|
||||
String userId = CurrentUserUtil.getId();
|
||||
String businessId = processInfoVO.getBusinessId();
|
||||
ProcessPlanChange planChange = this.getById(businessId);
|
||||
|
||||
// 完成任务
|
||||
Map<String, Object> variables = new HashMap<>();
|
||||
variables.put(ActivitiCommon.PASS, pass);
|
||||
variables.put(ProcessAnnualInitCommon.STANDARD_DEPART_HANDLER, planChange.getStandardDepartHandler());
|
||||
taskService.complete(processDTO.getTaskId(), variables);
|
||||
if (!Objects.equals(userId, originUserId)) {
|
||||
String departManager = planChange.getDepartManager();
|
||||
String userIdList = departManager.replaceAll(originUserId, userId);
|
||||
LambdaUpdateWrapper<ProcessPlanChange> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.eq(ProcessPlanChange::getId, businessId);
|
||||
updateWrapper.set(ProcessPlanChange::getDepartManager, userIdList);
|
||||
update(updateWrapper);
|
||||
}
|
||||
}
|
||||
|
||||
private void fgbmclrspApprove(ProcessInfoVO<ProcessPlanChangeVO> processInfoVO, ProcessDTO processDTO, boolean pass) {
|
||||
ProcessApprovalRecord processApprovalRecord = processDTO.getProcessApprovalRecord();
|
||||
String originUserId = processApprovalRecord.getOriginUserId();
|
||||
String userId = CurrentUserUtil.getId();
|
||||
String businessId = processInfoVO.getBusinessId();
|
||||
ProcessPlanChange planChange = this.getById(businessId);
|
||||
// 完成任务
|
||||
Map<String, Object> variables = new HashMap<>();
|
||||
variables.put(ActivitiCommon.PASS, pass);
|
||||
variables.put(ProcessAnnualInitCommon.STANDARD_DEPART_MANAGER, planChange.getStandardDepartManager());
|
||||
|
||||
taskService.complete(processDTO.getTaskId(), variables);
|
||||
if (!Objects.equals(userId, originUserId)) {
|
||||
LambdaUpdateWrapper<ProcessPlanChange> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.eq(ProcessPlanChange::getId, businessId);
|
||||
updateWrapper.set(ProcessPlanChange::getStandardDepartHandler, userId);
|
||||
update(updateWrapper);
|
||||
}
|
||||
}
|
||||
|
||||
private void fgbmjlspApprove(ProcessInfoVO<ProcessPlanChangeVO> processInfoVO, ProcessDTO processDTO, boolean pass) {
|
||||
ProcessApprovalRecord processApprovalRecord = processDTO.getProcessApprovalRecord();
|
||||
String originUserId = processApprovalRecord.getOriginUserId();
|
||||
String userId = CurrentUserUtil.getId();
|
||||
String businessId = processInfoVO.getBusinessId();
|
||||
ProcessPlanChange planChange = this.getById(businessId);
|
||||
|
||||
// 完成任务
|
||||
Map<String, Object> variables = new HashMap<>();
|
||||
variables.put(ActivitiCommon.PASS, pass);
|
||||
variables.put(ProcessAnnualInitCommon.SENIOR_MANAGER_LIST, Arrays.asList(planChange.getSeniorManager().split(",")));
|
||||
|
||||
taskService.complete(processDTO.getTaskId(), variables);
|
||||
if (!Objects.equals(userId, originUserId)) {
|
||||
LambdaUpdateWrapper<ProcessPlanChange> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.eq(ProcessPlanChange::getId, businessId);
|
||||
updateWrapper.set(ProcessPlanChange::getStandardDepartManager, userId);
|
||||
update(updateWrapper);
|
||||
}
|
||||
}
|
||||
|
||||
private void gjjlspApprove(ProcessInfoVO<ProcessPlanChangeVO> processInfoVO, ProcessDTO processDTO, boolean pass) {
|
||||
ProcessApprovalRecord processApprovalRecord = processDTO.getProcessApprovalRecord();
|
||||
String originUserId = processApprovalRecord.getOriginUserId();
|
||||
String userId = CurrentUserUtil.getId();
|
||||
String businessId = processInfoVO.getBusinessId();
|
||||
ProcessPlanChange planChange = this.getById(businessId);
|
||||
|
||||
// 完成任务
|
||||
Map<String, Object> variables = new HashMap<>();
|
||||
variables.put(ActivitiCommon.PASS, pass);
|
||||
variables.put(ProcessAnnualInitCommon.CHIEF_INSPECTOR_LIST, Arrays.asList(planChange.getChiefInspector().split(",")));
|
||||
taskService.complete(processDTO.getTaskId(), variables);
|
||||
if (!Objects.equals(userId, originUserId)) {
|
||||
String departManager = planChange.getSeniorManager();
|
||||
String userIdList = departManager.replaceAll(originUserId, userId);
|
||||
LambdaUpdateWrapper<ProcessPlanChange> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.eq(ProcessPlanChange::getId, businessId);
|
||||
updateWrapper.set(ProcessPlanChange::getSeniorManager, userIdList);
|
||||
update(updateWrapper);
|
||||
}
|
||||
}
|
||||
|
||||
private void zjspApprove(ProcessInfoVO<ProcessPlanChangeVO> processInfoVO, ProcessDTO processDTO, boolean pass) {
|
||||
ProcessApprovalRecord processApprovalRecord = processDTO.getProcessApprovalRecord();
|
||||
String originUserId = processApprovalRecord.getOriginUserId();
|
||||
String userId = CurrentUserUtil.getId();
|
||||
String businessId = processInfoVO.getBusinessId();
|
||||
ProcessPlanChange planChange = this.getById(businessId);
|
||||
|
||||
// 完成任务
|
||||
Map<String, Object> variables = new HashMap<>();
|
||||
variables.put(ActivitiCommon.PASS, pass);
|
||||
variables.put(ProcessAnnualInitCommon.AUTHORIZED_PERSON_LIST, Arrays.asList(planChange.getAuthorizedPerson().split(",")));
|
||||
taskService.complete(processDTO.getTaskId(), variables);
|
||||
if (!Objects.equals(userId, originUserId)) {
|
||||
String departManager = planChange.getChiefInspector();
|
||||
String userIdList = departManager.replaceAll(originUserId, userId);
|
||||
LambdaUpdateWrapper<ProcessPlanChange> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.eq(ProcessPlanChange::getId, businessId);
|
||||
updateWrapper.set(ProcessPlanChange::getChiefInspector, userIdList);
|
||||
update(updateWrapper);
|
||||
}
|
||||
}
|
||||
|
||||
private void sqrspApprove(ProcessInfoVO<ProcessPlanChangeVO> processInfoVO, ProcessDTO processDTO, boolean pass) {
|
||||
ProcessApprovalRecord processApprovalRecord = processDTO.getProcessApprovalRecord();
|
||||
String originUserId = processApprovalRecord.getOriginUserId();
|
||||
String userId = CurrentUserUtil.getId();
|
||||
String businessId = processInfoVO.getBusinessId();
|
||||
ProcessPlanChange planChange = this.getById(businessId);
|
||||
|
||||
// 完成任务
|
||||
Map<String, Object> variables = new HashMap<>();
|
||||
variables.put(ActivitiCommon.PASS, pass);
|
||||
taskService.complete(processDTO.getTaskId(), variables);
|
||||
if (!Objects.equals(userId, originUserId)) {
|
||||
String departManager = planChange.getAuthorizedPerson();
|
||||
String userIdList = departManager.replaceAll(originUserId, userId);
|
||||
LambdaUpdateWrapper<ProcessPlanChange> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.eq(ProcessPlanChange::getId, businessId);
|
||||
updateWrapper.set(ProcessPlanChange::getAuthorizedPerson, userIdList);
|
||||
update(updateWrapper);
|
||||
}
|
||||
//推送到企标计划
|
||||
if (pass){
|
||||
LambdaQueryWrapper<ProcessPlanChangeLink> myQuery = Wrappers.lambdaQuery(ProcessPlanChangeLink.class);
|
||||
myQuery.eq(ProcessPlanChangeLink::getProcessId, businessId);
|
||||
List<ProcessPlanChangeLink> list = planChangeLinkService.list(myQuery);
|
||||
List<EnterpriseStandardPlan> enterpriseStandardPlanList = convertToEnterpriseStandardPlanList(list);
|
||||
esPlanService.saveBatch(enterpriseStandardPlanList);
|
||||
}
|
||||
}
|
||||
|
||||
private List<EnterpriseStandardPlan> convertToEnterpriseStandardPlanList(List<ProcessPlanChangeLink> list) {
|
||||
List<EnterpriseStandardPlan> enterpriseStandardPlanlist= Lists.newArrayList();
|
||||
for (ProcessPlanChangeLink ProcessPlanChangeLink :list) {
|
||||
enterpriseStandardPlanlist.add(convertFromProcessAnnualInitLink(ProcessPlanChangeLink));
|
||||
}
|
||||
return enterpriseStandardPlanlist;
|
||||
}
|
||||
|
||||
private EnterpriseStandardPlan convertFromProcessAnnualInitLink(ProcessPlanChangeLink ProcessPlanChangeLink) {
|
||||
EnterpriseStandardPlan enterpriseStandardPlan = new EnterpriseStandardPlan();
|
||||
enterpriseStandardPlan.setRevisionType(ProcessPlanChangeLink.getRevisionType());
|
||||
//enterpriseStandardPlan.setProjectType();
|
||||
//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.setPlanStatus(ESPlanStatusEnum.ADD.getValue());
|
||||
return enterpriseStandardPlan;
|
||||
}
|
||||
|
||||
|
||||
public ProcessInfoVO<ProcessPlanChangeVO> getHandleData(String taskId) {
|
||||
ProcessInfoVO processInfoVO = processHandleService.queryProcessInfoVO(taskId);
|
||||
String businessId = processInfoVO.getBusinessId();
|
||||
ProcessPlanChange planChange = this.getById(businessId);
|
||||
|
||||
ProcessPlanChangeVO planChangeVO = new ProcessPlanChangeVO();
|
||||
planChangeVO.setPlanChange(planChange);
|
||||
|
||||
LambdaQueryWrapper<ProcessPlanChangeLink> myQuery = Wrappers.lambdaQuery(ProcessPlanChangeLink.class);
|
||||
myQuery.eq(ProcessPlanChangeLink::getProcessId, planChange);
|
||||
List<ProcessPlanChangeLink> list = planChangeLinkService.list(myQuery);
|
||||
|
||||
planChangeVO.setPlanChangeLinkList(list);
|
||||
processInfoVO.setBusinessInfoDTO(planChangeVO);
|
||||
return processInfoVO;
|
||||
}
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.jero.modules.activiti.process.planchange.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.jero.modules.activiti.process.planchange.entity.ProcessPlanChange;
|
||||
import com.jero.modules.activiti.process.planchange.entity.ProcessPlanChangeLink;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 企标计划变更流程表(ProcessPlanChange)实体类
|
||||
*
|
||||
* @author lijiarao
|
||||
* @since 2024-09-29 15:14:54
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "ProcessPlanChangeVO", description = "企标计划变更流程VO")
|
||||
public class ProcessPlanChangeVO implements Serializable {
|
||||
@ApiModelProperty(value = "流程主表信息")
|
||||
private ProcessPlanChange planChange;
|
||||
@ApiModelProperty(value = "关联标准信息")
|
||||
private List<ProcessPlanChangeLink> planChangeLinkList;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
|
||||
<bpmn:process id="process-annual-init" name="企业标准年度制修订计划流程" isExecutable="true">
|
||||
<bpmn:process id="process-plan-change" name="企业标准年度制修订计划流程" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_0hrnklg</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
@@ -129,7 +129,7 @@
|
||||
</bpmn:sequenceFlow>
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="process-annual-init">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="process-plan-change">
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="152" y="172" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
|
||||
@@ -0,0 +1,315 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
|
||||
<bpmn:process id="process-plan-change" name="企业标准年度制修订计划流程" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_0hrnklg</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:userTask id="qcrfq" name="起草人发起" activiti:assignee="${mainDraftingUser}">
|
||||
<bpmn:incoming>Flow_0hrnklg</bpmn:incoming>
|
||||
<bpmn:incoming>Flow_1jzk2qn</bpmn:incoming>
|
||||
<bpmn:incoming>Flow_1e2ecjo</bpmn:incoming>
|
||||
<bpmn:incoming>Flow_1torqxs</bpmn:incoming>
|
||||
<bpmn:incoming>Flow_04fjdt8</bpmn:incoming>
|
||||
<bpmn:incoming>Flow_0u3ivmh</bpmn:incoming>
|
||||
<bpmn:incoming>Flow_11hc0o0</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0ndqyc9</bpmn:outgoing>
|
||||
</bpmn:userTask>
|
||||
<bpmn:userTask id="fgbmjlsp" name="法规部门经理审批" activiti:assignee="${standardDepartManager}">
|
||||
<bpmn:incoming>Flow_0eu6g3b</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1uaygks</bpmn:outgoing>
|
||||
</bpmn:userTask>
|
||||
<bpmn:endEvent id="Event_0nxyypv">
|
||||
<bpmn:incoming>Flow_0r76okg</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:userTask id="bmjlsp" name="部门经理审批" activiti:assignee="${departManager}">
|
||||
<bpmn:incoming>Flow_0ndqyc9</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1q5o6tr</bpmn:outgoing>
|
||||
<bpmn:multiInstanceLoopCharacteristics activiti:collection="departManagerList" activiti:elementVariable="departManager">
|
||||
<bpmn:completionCondition xsi:type="bpmn:tFormalExpression">${nrOfInstances == nrOfCompletedInstances || !pass}</bpmn:completionCondition>
|
||||
</bpmn:multiInstanceLoopCharacteristics>
|
||||
</bpmn:userTask>
|
||||
<bpmn:userTask id="fgbmclrsp" name="法规部门处理人审批" activiti:assignee="${standardDepartHandler}">
|
||||
<bpmn:incoming>Flow_1ko64jc</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0rn2xkx</bpmn:outgoing>
|
||||
</bpmn:userTask>
|
||||
<bpmn:exclusiveGateway id="Gateway_02v5162">
|
||||
<bpmn:incoming>Flow_0rn2xkx</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0eu6g3b</bpmn:outgoing>
|
||||
<bpmn:outgoing>Flow_1torqxs</bpmn:outgoing>
|
||||
</bpmn:exclusiveGateway>
|
||||
<bpmn:exclusiveGateway id="Gateway_1mqjvoq">
|
||||
<bpmn:incoming>Flow_1uaygks</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0ame206</bpmn:outgoing>
|
||||
<bpmn:outgoing>Flow_1e2ecjo</bpmn:outgoing>
|
||||
</bpmn:exclusiveGateway>
|
||||
<bpmn:sequenceFlow id="Flow_0ndqyc9" sourceRef="qcrfq" targetRef="bmjlsp" />
|
||||
<bpmn:sequenceFlow id="Flow_0eu6g3b" name="通过" sourceRef="Gateway_02v5162" targetRef="fgbmjlsp">
|
||||
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${pass}</bpmn:conditionExpression>
|
||||
</bpmn:sequenceFlow>
|
||||
<bpmn:sequenceFlow id="Flow_1uaygks" sourceRef="fgbmjlsp" targetRef="Gateway_1mqjvoq" />
|
||||
<bpmn:sequenceFlow id="Flow_0ame206" name="通过" sourceRef="Gateway_1mqjvoq" targetRef="gjjlsp">
|
||||
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${pass}</bpmn:conditionExpression>
|
||||
</bpmn:sequenceFlow>
|
||||
<bpmn:sequenceFlow id="Flow_1torqxs" name="驳回" sourceRef="Gateway_02v5162" targetRef="qcrfq">
|
||||
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${!pass}</bpmn:conditionExpression>
|
||||
</bpmn:sequenceFlow>
|
||||
<bpmn:sequenceFlow id="Flow_1e2ecjo" name="驳回" sourceRef="Gateway_1mqjvoq" targetRef="qcrfq">
|
||||
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${!pass}</bpmn:conditionExpression>
|
||||
</bpmn:sequenceFlow>
|
||||
<bpmn:sequenceFlow id="Flow_1ko64jc" name="通过" sourceRef="Gateway_1hod8pk" targetRef="fgbmclrsp">
|
||||
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${pass}</bpmn:conditionExpression>
|
||||
</bpmn:sequenceFlow>
|
||||
<bpmn:sequenceFlow id="Flow_0rn2xkx" sourceRef="fgbmclrsp" targetRef="Gateway_02v5162" />
|
||||
<bpmn:sequenceFlow id="Flow_0hrnklg" sourceRef="StartEvent_1" targetRef="qcrfq" />
|
||||
<bpmn:exclusiveGateway id="Gateway_1hod8pk">
|
||||
<bpmn:incoming>Flow_1q5o6tr</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1ko64jc</bpmn:outgoing>
|
||||
<bpmn:outgoing>Flow_1jzk2qn</bpmn:outgoing>
|
||||
</bpmn:exclusiveGateway>
|
||||
<bpmn:sequenceFlow id="Flow_1q5o6tr" sourceRef="bmjlsp" targetRef="Gateway_1hod8pk" />
|
||||
<bpmn:sequenceFlow id="Flow_1jzk2qn" name="驳回" sourceRef="Gateway_1hod8pk" targetRef="qcrfq">
|
||||
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${!pass}</bpmn:conditionExpression>
|
||||
</bpmn:sequenceFlow>
|
||||
<bpmn:userTask id="sqrsp" name="授权人审批" activiti:assignee="${authorizedPerson}">
|
||||
<bpmn:incoming>Flow_0xhpgf5</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0j4zrgs</bpmn:outgoing>
|
||||
<bpmn:multiInstanceLoopCharacteristics activiti:collection="authorizedPersonList" activiti:elementVariable="authorizedPerson">
|
||||
<bpmn:completionCondition xsi:type="bpmn:tFormalExpression">${nrOfInstances == nrOfCompletedInstances || !pass}</bpmn:completionCondition>
|
||||
</bpmn:multiInstanceLoopCharacteristics>
|
||||
</bpmn:userTask>
|
||||
<bpmn:userTask id="gjjlsp" name="高级经理审批" activiti:assignee="${seniorManager}">
|
||||
<bpmn:incoming>Flow_0ame206</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0y6f9vg</bpmn:outgoing>
|
||||
<bpmn:multiInstanceLoopCharacteristics activiti:collection="seniorManagerList" activiti:elementVariable="seniorManager">
|
||||
<bpmn:completionCondition xsi:type="bpmn:tFormalExpression">${nrOfInstances == nrOfCompletedInstances || !pass}</bpmn:completionCondition>
|
||||
</bpmn:multiInstanceLoopCharacteristics>
|
||||
</bpmn:userTask>
|
||||
<bpmn:userTask id="zjsp" name="总监审批" activiti:assignee="${chiefInspector}">
|
||||
<bpmn:incoming>Flow_1uuss1x</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0my3hgz</bpmn:outgoing>
|
||||
<bpmn:multiInstanceLoopCharacteristics activiti:collection="chiefInspectorList" activiti:elementVariable="chiefInspector">
|
||||
<bpmn:completionCondition xsi:type="bpmn:tFormalExpression">${nrOfInstances == nrOfCompletedInstances || !pass}</bpmn:completionCondition>
|
||||
</bpmn:multiInstanceLoopCharacteristics>
|
||||
</bpmn:userTask>
|
||||
<bpmn:exclusiveGateway id="Gateway_12wcfht">
|
||||
<bpmn:incoming>Flow_0my3hgz</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0xhpgf5</bpmn:outgoing>
|
||||
<bpmn:outgoing>Flow_0u3ivmh</bpmn:outgoing>
|
||||
</bpmn:exclusiveGateway>
|
||||
<bpmn:exclusiveGateway id="Gateway_0ivnwnx">
|
||||
<bpmn:incoming>Flow_0j4zrgs</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0r76okg</bpmn:outgoing>
|
||||
<bpmn:outgoing>Flow_11hc0o0</bpmn:outgoing>
|
||||
</bpmn:exclusiveGateway>
|
||||
<bpmn:exclusiveGateway id="Gateway_037rogw">
|
||||
<bpmn:incoming>Flow_0y6f9vg</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1uuss1x</bpmn:outgoing>
|
||||
<bpmn:outgoing>Flow_04fjdt8</bpmn:outgoing>
|
||||
</bpmn:exclusiveGateway>
|
||||
<bpmn:sequenceFlow id="Flow_0xhpgf5" name="通过" sourceRef="Gateway_12wcfht" targetRef="sqrsp">
|
||||
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${pass}</bpmn:conditionExpression>
|
||||
</bpmn:sequenceFlow>
|
||||
<bpmn:sequenceFlow id="Flow_0j4zrgs" sourceRef="sqrsp" targetRef="Gateway_0ivnwnx" />
|
||||
<bpmn:sequenceFlow id="Flow_0y6f9vg" sourceRef="gjjlsp" targetRef="Gateway_037rogw" />
|
||||
<bpmn:sequenceFlow id="Flow_1uuss1x" name="通过" sourceRef="Gateway_037rogw" targetRef="zjsp">
|
||||
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${pass}</bpmn:conditionExpression>
|
||||
</bpmn:sequenceFlow>
|
||||
<bpmn:sequenceFlow id="Flow_0my3hgz" sourceRef="zjsp" targetRef="Gateway_12wcfht" />
|
||||
<bpmn:sequenceFlow id="Flow_0r76okg" name="通过" sourceRef="Gateway_0ivnwnx" targetRef="Event_0nxyypv">
|
||||
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${pass}</bpmn:conditionExpression>
|
||||
</bpmn:sequenceFlow>
|
||||
<bpmn:sequenceFlow id="Flow_04fjdt8" name="驳回" sourceRef="Gateway_037rogw" targetRef="qcrfq">
|
||||
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${!pass}</bpmn:conditionExpression>
|
||||
</bpmn:sequenceFlow>
|
||||
<bpmn:sequenceFlow id="Flow_0u3ivmh" name="驳回" sourceRef="Gateway_12wcfht" targetRef="qcrfq">
|
||||
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${!pass}</bpmn:conditionExpression>
|
||||
</bpmn:sequenceFlow>
|
||||
<bpmn:sequenceFlow id="Flow_11hc0o0" name="驳回" sourceRef="Gateway_0ivnwnx" targetRef="qcrfq">
|
||||
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${!pass}</bpmn:conditionExpression>
|
||||
</bpmn:sequenceFlow>
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="process-plan-change">
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="152" y="172" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_03wwtxl_di" bpmnElement="qcrfq">
|
||||
<dc:Bounds x="230" y="150" width="100" height="80" />
|
||||
<bpmndi:BPMNLabel />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="BPMNShape_1uw77uz" bpmnElement="fgbmjlsp">
|
||||
<dc:Bounds x="760" y="150" width="100" height="80" />
|
||||
<bpmndi:BPMNLabel />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_0nxyypv_di" bpmnElement="Event_0nxyypv">
|
||||
<dc:Bounds x="1612" y="172" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="BPMNShape_0hjb91v" bpmnElement="bmjlsp">
|
||||
<dc:Bounds x="360" y="150" width="100" height="80" />
|
||||
<bpmndi:BPMNLabel />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="BPMNShape_03jj2f8" bpmnElement="fgbmclrsp">
|
||||
<dc:Bounds x="560" y="150" width="100" height="80" />
|
||||
<bpmndi:BPMNLabel />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Gateway_02v5162_di" bpmnElement="Gateway_02v5162" isMarkerVisible="true">
|
||||
<dc:Bounds x="685" y="165" width="50" height="50" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Gateway_1mqjvoq_di" bpmnElement="Gateway_1mqjvoq" isMarkerVisible="true">
|
||||
<dc:Bounds x="885" y="165" width="50" height="50" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Gateway_1hod8pk_di" bpmnElement="Gateway_1hod8pk" isMarkerVisible="true">
|
||||
<dc:Bounds x="485" y="165" width="50" height="50" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="BPMNShape_071wvmh" bpmnElement="sqrsp">
|
||||
<dc:Bounds x="1400" y="150" width="100" height="80" />
|
||||
<bpmndi:BPMNLabel />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="BPMNShape_0raodac" bpmnElement="gjjlsp">
|
||||
<dc:Bounds x="970" y="150" width="100" height="80" />
|
||||
<bpmndi:BPMNLabel />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="BPMNShape_0brgwzg" bpmnElement="zjsp">
|
||||
<dc:Bounds x="1180" y="150" width="100" height="80" />
|
||||
<bpmndi:BPMNLabel />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="BPMNShape_1qs4m2m" bpmnElement="Gateway_12wcfht" isMarkerVisible="true">
|
||||
<dc:Bounds x="1315" y="165" width="50" height="50" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="BPMNShape_1q88hv7" bpmnElement="Gateway_0ivnwnx" isMarkerVisible="true">
|
||||
<dc:Bounds x="1525" y="165" width="50" height="50" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="BPMNShape_00s6tq2" bpmnElement="Gateway_037rogw" isMarkerVisible="true">
|
||||
<dc:Bounds x="1095" y="165" width="50" height="50" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_0ndqyc9_di" bpmnElement="Flow_0ndqyc9">
|
||||
<di:waypoint x="330" y="190" />
|
||||
<di:waypoint x="360" y="190" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0eu6g3b_di" bpmnElement="Flow_0eu6g3b">
|
||||
<di:waypoint x="735" y="190" />
|
||||
<di:waypoint x="760" y="190" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="737" y="172" width="22" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_1uaygks_di" bpmnElement="Flow_1uaygks">
|
||||
<di:waypoint x="860" y="190" />
|
||||
<di:waypoint x="885" y="190" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0ame206_di" bpmnElement="Flow_0ame206">
|
||||
<di:waypoint x="935" y="190" />
|
||||
<di:waypoint x="970" y="190" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="937" y="172" width="22" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_1torqxs_di" bpmnElement="Flow_1torqxs">
|
||||
<di:waypoint x="710" y="165" />
|
||||
<di:waypoint x="710" y="100" />
|
||||
<di:waypoint x="280" y="100" />
|
||||
<di:waypoint x="280" y="150" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="599" y="82" width="21" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_1e2ecjo_di" bpmnElement="Flow_1e2ecjo">
|
||||
<di:waypoint x="910" y="165" />
|
||||
<di:waypoint x="910" y="100" />
|
||||
<di:waypoint x="280" y="100" />
|
||||
<di:waypoint x="280" y="150" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="799" y="82" width="21" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_1ko64jc_di" bpmnElement="Flow_1ko64jc">
|
||||
<di:waypoint x="535" y="190" />
|
||||
<di:waypoint x="560" y="190" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="530" y="172" width="22" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0rn2xkx_di" bpmnElement="Flow_0rn2xkx">
|
||||
<di:waypoint x="660" y="190" />
|
||||
<di:waypoint x="685" y="190" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0hrnklg_di" bpmnElement="Flow_0hrnklg">
|
||||
<di:waypoint x="188" y="190" />
|
||||
<di:waypoint x="230" y="190" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_1q5o6tr_di" bpmnElement="Flow_1q5o6tr">
|
||||
<di:waypoint x="460" y="190" />
|
||||
<di:waypoint x="485" y="190" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_1jzk2qn_di" bpmnElement="Flow_1jzk2qn">
|
||||
<di:waypoint x="510" y="165" />
|
||||
<di:waypoint x="510" y="100" />
|
||||
<di:waypoint x="280" y="100" />
|
||||
<di:waypoint x="280" y="150" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="385" y="82" width="21" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="BPMNEdge_04yw72g" bpmnElement="Flow_0xhpgf5">
|
||||
<di:waypoint x="1365" y="190" />
|
||||
<di:waypoint x="1400" y="190" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="1372" y="172" width="22" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="BPMNEdge_02efbs1" bpmnElement="Flow_0j4zrgs">
|
||||
<di:waypoint x="1500" y="190" />
|
||||
<di:waypoint x="1525" y="190" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="BPMNEdge_0n23wiu" bpmnElement="Flow_0y6f9vg">
|
||||
<di:waypoint x="1070" y="190" />
|
||||
<di:waypoint x="1095" y="190" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="BPMNEdge_1eb3e2m" bpmnElement="Flow_1uuss1x">
|
||||
<di:waypoint x="1145" y="190" />
|
||||
<di:waypoint x="1180" y="190" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="1152" y="172" width="22" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="BPMNEdge_1hdwu40" bpmnElement="Flow_0my3hgz">
|
||||
<di:waypoint x="1280" y="190" />
|
||||
<di:waypoint x="1315" y="190" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0r76okg_di" bpmnElement="Flow_0r76okg">
|
||||
<di:waypoint x="1575" y="190" />
|
||||
<di:waypoint x="1612" y="190" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="1583" y="172" width="22" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_04fjdt8_di" bpmnElement="Flow_04fjdt8">
|
||||
<di:waypoint x="1120" y="165" />
|
||||
<di:waypoint x="1120" y="100" />
|
||||
<di:waypoint x="280" y="100" />
|
||||
<di:waypoint x="280" y="150" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="1009" y="82" width="21" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0u3ivmh_di" bpmnElement="Flow_0u3ivmh">
|
||||
<di:waypoint x="1340" y="165" />
|
||||
<di:waypoint x="1340" y="100" />
|
||||
<di:waypoint x="280" y="100" />
|
||||
<di:waypoint x="280" y="150" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="1219" y="82" width="21" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_11hc0o0_di" bpmnElement="Flow_11hc0o0">
|
||||
<di:waypoint x="1550" y="165" />
|
||||
<di:waypoint x="1550" y="100" />
|
||||
<di:waypoint x="280" y="100" />
|
||||
<di:waypoint x="280" y="150" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="1439" y="82" width="21" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNEdge>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
||||
+102
@@ -0,0 +1,102 @@
|
||||
package com.jero.modules.activiti.process.planchange.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.activiti.process.planchange.entity.ProcessPlanChange;
|
||||
import com.jero.modules.activiti.process.planchange.service.ProcessPlanChangeService;
|
||||
import com.jero.modules.activiti.process.fb.vo.ProcessInfoVO;
|
||||
import com.jero.modules.system.vo.IdMapBody;
|
||||
import com.jero.modules.system.vo.IdsMapBody;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.api.vo.ResultCommon;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 企标计划变更流程表(ProcessPlanChange)表控制层
|
||||
*
|
||||
* @author lijiarao
|
||||
* @since 2024-09-29 15:14:54
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "企标计划变更流程表")
|
||||
@RestController
|
||||
@RequestMapping("/process/processPlanChange")
|
||||
public class ProcessPlanChangeController extends JeroController<ProcessPlanChange, ProcessPlanChangeService> {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private ProcessPlanChangeService processPlanChangeService;
|
||||
|
||||
@DictPoint
|
||||
@GetMapping("/queryProcessInfoVO")
|
||||
@AutoLog(value = "企标计划变更流程表-查询流程信息")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "draftId", value = "草稿id"),
|
||||
@ApiImplicitParam(name = "taskId", value = "任务id"),
|
||||
@ApiImplicitParam(name = "processInstanceId", value = "流程实例id")
|
||||
})
|
||||
@ApiOperation("企标计划变更流程表-查询流程信息")
|
||||
public Result<ProcessInfoVO<ProcessPlanChange>> queryProcessInfoVO(String draftId, String processInstanceId, String taskId) {
|
||||
ProcessInfoVO<ProcessPlanChange> processInfoVO = processPlanChangeService.queryProcessInfoVO(draftId, processInstanceId, taskId);
|
||||
return Result.OK(processInfoVO);
|
||||
}
|
||||
|
||||
@AutoLog(value = "企标计划变更流程表-发起流程")
|
||||
@ApiOperation(value = "企标计划变更流程表-发起流程")
|
||||
@PostMapping(value = "/startProcess")
|
||||
public Result<T> startProcess(@Validated @RequestBody ProcessInfoVO<ProcessPlanChange> processInfoVO) {
|
||||
processPlanChangeService.startProcess(processInfoVO);
|
||||
return Result.OK();
|
||||
}
|
||||
|
||||
@AutoLog(value = "企标计划变更流程表-同意")
|
||||
@ApiOperation(value = "企标计划变更流程表-同意")
|
||||
@PostMapping("/agree")
|
||||
public Result<T> agree(@Validated @RequestBody ProcessInfoVO<ProcessPlanChange> processInfoVO) {
|
||||
processPlanChangeService.approveTask(processInfoVO, true);
|
||||
return Result.OK();
|
||||
}
|
||||
|
||||
@AutoLog(value = "企标计划变更流程表-驳回")
|
||||
@ApiOperation(value = "企标计划变更流程表-驳回")
|
||||
@PostMapping("/reject")
|
||||
public Result<T> reject(@Validated @RequestBody ProcessInfoVO<ProcessPlanChange> processInfoVO) {
|
||||
processPlanChangeService.approveTask(processInfoVO, false);
|
||||
return Result.OK();
|
||||
}
|
||||
|
||||
@AutoLog(value = "企标计划变更流程表-提交")
|
||||
@ApiOperation(value = "企标计划变更流程表-提交")
|
||||
@PostMapping("/submit")
|
||||
public Result<T> submit(@Validated @RequestBody ProcessInfoVO<ProcessPlanChange> processInfoVO) {
|
||||
processPlanChangeService.submit(processInfoVO);
|
||||
return Result.OK();
|
||||
}
|
||||
|
||||
@AutoLog(value = "企标计划变更流程表-保存为草稿")
|
||||
@ApiOperation(value = "企标计划变更流程表-保存为草稿")
|
||||
@PostMapping(value = "/saveToDraft")
|
||||
public Result<T> saveToDraft(@Validated @RequestBody ProcessInfoVO<ProcessPlanChange> processInfoVO) {
|
||||
processPlanChangeService.saveToDraft(processInfoVO);
|
||||
return Result.OK();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+172
@@ -0,0 +1,172 @@
|
||||
package com.jero.modules.activiti.process.planchange.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.system.base.controller.JeroController;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.modules.activiti.process.planchange.entity.ProcessPlanChangeLink;
|
||||
import com.jero.modules.activiti.process.planchange.service.ProcessPlanChangeLinkService;
|
||||
import com.jero.modules.system.vo.IdMapBody;
|
||||
import com.jero.modules.system.vo.IdsMapBody;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.api.vo.ResultCommon;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 企标计划变更流程关联标准(ProcessPlanChangeLink)表控制层
|
||||
*
|
||||
* @author lijiarao
|
||||
* @since 2024-09-29 15:15:10
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "企标计划变更流程关联标准")
|
||||
@RestController
|
||||
@RequestMapping("processPlanChangeLink")
|
||||
public class ProcessPlanChangeLinkController extends JeroController<ProcessPlanChangeLink, ProcessPlanChangeLinkService> {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private ProcessPlanChangeLinkService processPlanChangeLinkService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*/
|
||||
@ApiOperation(value = "企标计划变更流程关联标准-分页列表查询")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<IPage<ProcessPlanChangeLink>> queryPageList(ProcessPlanChangeLink processPlanChangeLink,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
Page<ProcessPlanChangeLink> page = new Page<>(pageNo, pageSize);
|
||||
IPage<ProcessPlanChangeLink> pageList = processPlanChangeLinkService.pageList(page, processPlanChangeLink, req);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*/
|
||||
@ApiOperation(value = "企标计划变更流程关联标准-列表查询", notes = "企标计划变更流程关联标准-列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<ProcessPlanChangeLink>> queryList(ProcessPlanChangeLink processPlanChangeLink,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<ProcessPlanChangeLink> queryWrapper = QueryGenerator.initQueryWrapper(processPlanChangeLink, req.getParameterMap());
|
||||
List<ProcessPlanChangeLink> list = processPlanChangeLinkService.list(queryWrapper);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
@AutoLog(value = "企标计划变更流程关联标准-添加")
|
||||
@ApiOperation(value = "企标计划变更流程关联标准-添加", notes = "企标计划变更流程关联标准-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@Validated @RequestBody ProcessPlanChangeLink processPlanChangeLink) {
|
||||
processPlanChangeLinkService.add(processPlanChangeLink);
|
||||
return Result.OK(ResultCommon.OK);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
@AutoLog(value = "企标计划变更流程关联标准-编辑")
|
||||
@ApiOperation(value = "企标计划变更流程关联标准-编辑", notes = "企标计划变更流程关联标准-编辑")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<String> edit(@Validated @RequestBody ProcessPlanChangeLink processPlanChangeLink) {
|
||||
processPlanChangeLinkService.editById(processPlanChangeLink);
|
||||
return Result.OK(ResultCommon.EDIT_OK);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*/
|
||||
@AutoLog(value = "企标计划变更流程关联标准-通过id删除")
|
||||
@ApiOperation(value = "企标计划变更流程关联标准-通过id删除", notes = "企标计划变更流程关联标准-通过id删除")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestBody IdMapBody map) {
|
||||
String id = map.getId();
|
||||
if (StringUtils.isBlank(id)) {
|
||||
return Result.error("请选择数据");
|
||||
}
|
||||
processPlanChangeLinkService.deleteById(id);
|
||||
return Result.OK(ResultCommon.SUCCESSFULLY_DELETED);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*/
|
||||
@AutoLog(value = "企标计划变更流程关联标准-批量删除")
|
||||
@ApiOperation(value = "企标计划变更流程关联标准-批量删除", notes = "企标计划变更流程关联标准-批量删除")
|
||||
@PostMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestBody IdsMapBody map) {
|
||||
String ids = map.getIds();
|
||||
if (StringUtils.isBlank(ids)) {
|
||||
return Result.error(ResultCommon.PLEASE_SELECT_DATA);
|
||||
}
|
||||
List<String> idList = Arrays.asList(map.getIds().split(","));
|
||||
this.processPlanChangeLinkService.deleteByIds(idList);
|
||||
return Result.OK(ResultCommon.SUCCESSFULLY_DELETED_IN_BULK);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*/
|
||||
@AutoLog(value = "企标计划变更流程关联标准-通过id查询")
|
||||
@ApiOperation(value = "企标计划变更流程关联标准-通过id查询", notes = "企标计划变更流程关联标准-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<ProcessPlanChangeLink> queryById(@RequestParam(name = "id") String id) {
|
||||
ProcessPlanChangeLink processPlanChangeLink = processPlanChangeLinkService.queryById(id);
|
||||
if (processPlanChangeLink == null) {
|
||||
return Result.error(ResultCommon.NO_CORRESPONDING_DATA_FOUND);
|
||||
}
|
||||
return Result.OK(processPlanChangeLink);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*/
|
||||
@ApiOperation(value = "企标计划变更流程关联标准-导出excel")
|
||||
@GetMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest req, ProcessPlanChangeLink processPlanChangeLink) {
|
||||
Page<ProcessPlanChangeLink> page = new Page<>(-1, -1);
|
||||
IPage<ProcessPlanChangeLink> pageList = processPlanChangeLinkService.pageList(page, processPlanChangeLink, req);
|
||||
// 获取数据
|
||||
List<ProcessPlanChangeLink> records = pageList.getRecords();
|
||||
return super.exportListXls(records, ProcessPlanChangeLink.class, "企标计划变更流程关联标准");
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载导入模板
|
||||
*/
|
||||
@ApiOperation(value = "企标计划变更流程关联标准-下载导入模板")
|
||||
@GetMapping(value = "/exportTemplate")
|
||||
public ModelAndView exportTemplate(HttpServletRequest req, ProcessPlanChangeLink processPlanChangeLink) {
|
||||
List<ProcessPlanChangeLink> records = new ArrayList<>();
|
||||
return super.exportListXls(records, ProcessPlanChangeLink.class, "企标计划变更流程关联标准");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*/
|
||||
@ApiOperation(value = "企标计划变更流程关联标准-通过excel导入数据")
|
||||
@PostMapping(value = "/importExcel")
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ProcessPlanChangeLink.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+121
@@ -0,0 +1,121 @@
|
||||
package com.jero.modules.activiti.process.planchange.entity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
|
||||
/**
|
||||
* 企标计划变更流程表(ProcessPlanChange)实体类
|
||||
*
|
||||
* @author lijiarao
|
||||
* @since 2024-09-29 15:14:54
|
||||
*/
|
||||
@Data
|
||||
@TableName("process_plan_change")
|
||||
@ApiModel(value = "ProcessPlanChange", description = "企标计划变更流程表")
|
||||
public class ProcessPlanChange implements Serializable {
|
||||
private static final long serialVersionUID = -96899431864255187L;
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键id")
|
||||
private String id;
|
||||
/**
|
||||
* 变更类型
|
||||
*/
|
||||
@ApiModelProperty(value = "变更类型")
|
||||
@Excel(name = "变更类型", width = 15)
|
||||
private String changeType;
|
||||
/**
|
||||
* 部门经理
|
||||
*/
|
||||
@ApiModelProperty(value = "部门经理")
|
||||
@Excel(name = "部门经理", width = 15)
|
||||
private String departManager;
|
||||
/**
|
||||
* 法规部门处理人id
|
||||
*/
|
||||
@ApiModelProperty(value = "法规部门处理人id")
|
||||
@Excel(name = "法规部门处理人id", width = 15)
|
||||
private String standardDepartHandler;
|
||||
/**
|
||||
* 法规部门经理id
|
||||
*/
|
||||
@ApiModelProperty(value = "法规部门经理id")
|
||||
@Excel(name = "法规部门经理id", width = 15)
|
||||
private String standardDepartManager;
|
||||
/**
|
||||
* 高级经理
|
||||
*/
|
||||
@ApiModelProperty(value = "高级经理")
|
||||
@Excel(name = "高级经理", width = 15)
|
||||
private String seniorManager;
|
||||
/**
|
||||
* 总监
|
||||
*/
|
||||
@ApiModelProperty(value = "总监")
|
||||
@Excel(name = "总监", width = 15)
|
||||
private String chiefInspector;
|
||||
/**
|
||||
* 授权人
|
||||
*/
|
||||
@ApiModelProperty(value = "授权人")
|
||||
@Excel(name = "授权人", width = 15)
|
||||
private String authorizedPerson;
|
||||
/**
|
||||
* 附件
|
||||
*/
|
||||
@ApiModelProperty(value = "附件")
|
||||
@Excel(name = "附件", width = 15)
|
||||
private String file;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String orgCode;
|
||||
/**
|
||||
* 删除状态(0-正常,1-删除)
|
||||
*/
|
||||
@ApiModelProperty(value = "删除状态(0-正常,1-删除)")
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+125
@@ -0,0 +1,125 @@
|
||||
package com.jero.modules.activiti.process.planchange.entity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
|
||||
/**
|
||||
* 企标计划变更流程关联标准(ProcessPlanChangeLink)实体类
|
||||
*
|
||||
* @author lijiarao
|
||||
* @since 2024-09-29 15:15:11
|
||||
*/
|
||||
@Data
|
||||
@TableName("process_plan_change_link")
|
||||
@ApiModel(value = "ProcessPlanChangeLink", description = "企标计划变更流程关联标准")
|
||||
public class ProcessPlanChangeLink implements Serializable {
|
||||
private static final long serialVersionUID = -68223646123689976L;
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键id")
|
||||
private String id;
|
||||
/**
|
||||
* 流程主表id
|
||||
*/
|
||||
@ApiModelProperty(value = "流程主表id")
|
||||
@Excel(name = "流程主表id", width = 15)
|
||||
private String processId;
|
||||
/**
|
||||
* 制修订类别
|
||||
*/
|
||||
@ApiModelProperty(value = "制修订类别")
|
||||
@Excel(name = "制修订类别", width = 15)
|
||||
private String revisionType;
|
||||
/**
|
||||
* 企标计划
|
||||
*/
|
||||
@ApiModelProperty(value = "企标计划")
|
||||
@Excel(name = "企标计划", width = 15)
|
||||
private String planId;
|
||||
/**
|
||||
* 起草人
|
||||
*/
|
||||
@ApiModelProperty(value = "起草人")
|
||||
@Excel(name = "起草人", width = 15)
|
||||
private String draftingUser;
|
||||
/**
|
||||
* 所在部门id
|
||||
*/
|
||||
@ApiModelProperty(value = "所在部门id")
|
||||
@Excel(name = "所在部门id", width = 15)
|
||||
private String departId;
|
||||
/**
|
||||
* 初稿完成日期变更后
|
||||
*/
|
||||
@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 draftCompleteDate;
|
||||
/**
|
||||
* 计划归档日期变更后
|
||||
*/
|
||||
@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 planArchivingDate;
|
||||
/**
|
||||
* 变更原因
|
||||
*/
|
||||
@ApiModelProperty(value = "变更原因")
|
||||
@Excel(name = "变更原因", width = 15)
|
||||
private String changeReason;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String orgCode;
|
||||
/**
|
||||
* 删除状态(0-正常,1-删除)
|
||||
*/
|
||||
@ApiModelProperty(value = "删除状态(0-正常,1-删除)")
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package com.jero.modules.activiti.process.planchange.mapper;
|
||||
|
||||
import com.jero.modules.activiti.process.planchange.entity.ProcessPlanChangeLink;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* 企标计划变更流程关联标准(ProcessPlanChangeLink)表数据库访问层
|
||||
*
|
||||
* @author lijiarao
|
||||
* @since 2024-09-29 15:15:11
|
||||
*/
|
||||
public interface ProcessPlanChangeLinkMapper extends BaseMapper<ProcessPlanChangeLink> {
|
||||
|
||||
}
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package com.jero.modules.activiti.process.planchange.mapper;
|
||||
|
||||
import com.jero.modules.activiti.process.planchange.entity.ProcessPlanChange;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* 企标计划变更流程表(ProcessPlanChange)表数据库访问层
|
||||
*
|
||||
* @author lijiarao
|
||||
* @since 2024-09-29 15:14:54
|
||||
*/
|
||||
public interface ProcessPlanChangeMapper extends BaseMapper<ProcessPlanChange> {
|
||||
|
||||
}
|
||||
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jero.modules.activiti.process.planchange.mapper.ProcessPlanChangeLinkMapper">
|
||||
<resultMap id="BaseResultMap" type="com.jero.modules.activiti.process.planchange.entity.ProcessPlanChangeLink">
|
||||
<!--@Table process_plan_change_link-->
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="processId" column="process_id" jdbcType="VARCHAR"/>
|
||||
<result property="revisionType" column="revision_type" jdbcType="VARCHAR"/>
|
||||
<result property="planId" column="plan_id" jdbcType="VARCHAR"/>
|
||||
<result property="draftingUser" column="drafting_user" jdbcType="VARCHAR"/>
|
||||
<result property="departId" column="depart_id" jdbcType="VARCHAR"/>
|
||||
<result property="draftCompleteDate" column="draft_complete_date" jdbcType="TIMESTAMP"/>
|
||||
<result property="planArchivingDate" column="plan_archiving_date" jdbcType="TIMESTAMP"/>
|
||||
<result property="changeReason" column="change_reason" jdbcType="VARCHAR"/>
|
||||
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="orgCode" column="org_code" jdbcType="VARCHAR"/>
|
||||
<result property="delFlag" column="del_flag" jdbcType="INTEGER"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,
|
||||
process_id,
|
||||
revision_type,
|
||||
plan_id,
|
||||
drafting_user,
|
||||
depart_id,
|
||||
draft_complete_date,
|
||||
plan_archiving_date,
|
||||
change_reason,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time,
|
||||
org_code,
|
||||
del_flag
|
||||
</sql>
|
||||
</mapper>
|
||||
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.jero.modules.activiti.process.planchange.mapper.ProcessPlanChangeMapper">
|
||||
<resultMap id="BaseResultMap" type="com.jero.modules.activiti.process.planchange.entity.ProcessPlanChange">
|
||||
<!--@Table process_plan_change-->
|
||||
<result property="id" column="id" jdbcType="VARCHAR"/>
|
||||
<result property="changeType" column="change_type" jdbcType="VARCHAR"/>
|
||||
<result property="departManager" column="depart_manager" jdbcType="VARCHAR"/>
|
||||
<result property="standardDepartHandler" column="standard_depart_handler" jdbcType="VARCHAR"/>
|
||||
<result property="standardDepartManager" column="standard_depart_manager" jdbcType="VARCHAR"/>
|
||||
<result property="seniorManager" column="senior_manager" jdbcType="VARCHAR"/>
|
||||
<result property="chiefInspector" column="chief_inspector" jdbcType="VARCHAR"/>
|
||||
<result property="authorizedPerson" column="authorized_person" jdbcType="VARCHAR"/>
|
||||
<result property="file" column="file" jdbcType="VARCHAR"/>
|
||||
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="orgCode" column="org_code" jdbcType="VARCHAR"/>
|
||||
<result property="delFlag" column="del_flag" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,
|
||||
change_type,
|
||||
depart_manager,
|
||||
standard_depart_handler,
|
||||
standard_depart_manager,
|
||||
senior_manager,
|
||||
chief_inspector,
|
||||
authorized_person,
|
||||
file,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time,
|
||||
org_code,
|
||||
del_flag
|
||||
</sql>
|
||||
</mapper>
|
||||
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
package com.jero.modules.activiti.process.planchange.service;
|
||||
|
||||
import com.jero.modules.activiti.process.planchange.entity.ProcessPlanChangeLink;
|
||||
import com.jero.modules.activiti.process.planchange.mapper.ProcessPlanChangeLinkMapper;
|
||||
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 javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 企标计划变更流程关联标准(ProcessPlanChangeLink)表服务实现类
|
||||
*
|
||||
* @author lijiarao
|
||||
* @since 2024-09-29 15:15:11
|
||||
*/
|
||||
@Slf4j
|
||||
@Service()
|
||||
public class ProcessPlanChangeLinkService extends ServiceImpl<ProcessPlanChangeLinkMapper, ProcessPlanChangeLink> {
|
||||
@Resource
|
||||
private ProcessPlanChangeLinkMapper processPlanChangeLinkMapper;
|
||||
|
||||
public IPage<ProcessPlanChangeLink> pageList(Page<ProcessPlanChangeLink> page, ProcessPlanChangeLink processPlanChangeLink, HttpServletRequest req) {
|
||||
QueryWrapper<ProcessPlanChangeLink> queryWrapper = QueryGenerator.initQueryWrapper(processPlanChangeLink, req.getParameterMap());
|
||||
return this.page(page, queryWrapper);
|
||||
}
|
||||
|
||||
public void add(ProcessPlanChangeLink processPlanChangeLink) {
|
||||
this.save(processPlanChangeLink);
|
||||
}
|
||||
|
||||
public void editById(ProcessPlanChangeLink processPlanChangeLink) {
|
||||
this.updateById(processPlanChangeLink);
|
||||
}
|
||||
|
||||
public void deleteById(String id) {
|
||||
this.removeById(id);
|
||||
}
|
||||
|
||||
public void deleteByIds(List<String> idList) {
|
||||
for (String id : idList) {
|
||||
deleteById(id);
|
||||
}
|
||||
}
|
||||
|
||||
public ProcessPlanChangeLink queryById(String id) {
|
||||
ProcessPlanChangeLink processPlanChangeLink = this.getById(id);
|
||||
return processPlanChangeLink;
|
||||
}
|
||||
}
|
||||
|
||||
+184
@@ -0,0 +1,184 @@
|
||||
package com.jero.modules.activiti.process.planchange.service;
|
||||
|
||||
import com.jero.modules.activiti.process.planchange.entity.ProcessPlanChange;
|
||||
import com.jero.modules.activiti.process.planchange.mapper.ProcessPlanChangeMapper;
|
||||
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 javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 企标计划变更流程表(ProcessPlanChange)表服务实现类
|
||||
*
|
||||
* @author lijiarao
|
||||
* @since 2024-09-29 15:14:55
|
||||
*/
|
||||
@Slf4j
|
||||
@Service()
|
||||
public class ProcessPlanChangeService extends ServiceImpl<ProcessPlanChangeMapper, ProcessPlanChange> {
|
||||
@Resource
|
||||
private ProcessPlanChangeMapper processPlanChangeMapper;
|
||||
@Resource
|
||||
private ISysBaseAPI sysBaseAPI;
|
||||
@Resource
|
||||
private IProcessHandleService processHandleService;
|
||||
@Resource
|
||||
private ProcessAllService processAllService;
|
||||
@Resource
|
||||
private TaskService taskService;
|
||||
|
||||
public ProcessInfoVO<ProcessPlanChange> queryProcessInfoVO(String draftId, String processInstanceId, String taskId) {
|
||||
if (StringUtils.isNotBlank(draftId) && StringUtils.isBlank(taskId)) {
|
||||
ProcessInfoVO draft = processHandleService.getDraftByDraftId(draftId);
|
||||
return draft;
|
||||
}
|
||||
ProcessInfoVO draft = processHandleService.getDraftByTaskId(taskId);
|
||||
if (draft != null) {
|
||||
return draft;
|
||||
}
|
||||
ProcessInfoVO processInfoVO = processHandleService.queryProcessInfoVO(draftId, processInstanceId, taskId);
|
||||
String businessId = processInfoVO.getBusinessId();
|
||||
ProcessDTO processDTO = processHandleService.getProcessDTO(taskId);
|
||||
ProcessApprovalRecord processApprovalRecord = processDTO.getProcessApprovalRecord();
|
||||
String originUserId = processApprovalRecord.getOriginUserId();
|
||||
Task task = processDTO.getTask();
|
||||
|
||||
String taskDefinitionKey = task.getTaskDefinitionKey();
|
||||
|
||||
ProcessPlanChange processPlanChangeVO = new ProcessPlanChange();
|
||||
|
||||
processInfoVO.setBusinessInfoDTO(processPlanChangeVO);
|
||||
return processInfoVO;
|
||||
}
|
||||
|
||||
public void startProcess(ProcessInfoVO<ProcessPlanChange> processInfoVO) {
|
||||
Map<String, Object> userInfoMap = processInfoVO.getUserInfoMap();
|
||||
ProcessPlanChange businessInfoDTO = processInfoVO.getBusinessInfoDTO();
|
||||
ProcessProjectNotMet processPlanChange = businessInfoDTO.getProcessProjectNotMet();
|
||||
if (processPlanChange == null) {
|
||||
processPlanChange = new ProcessProjectNotMet();
|
||||
}
|
||||
this.save(processPlanChange);
|
||||
String processPlanChangeId = processPlanChange.getId();
|
||||
processInfoVO.setBusinessId(processPlanChangeId);
|
||||
|
||||
|
||||
//启动流程
|
||||
BasicProcessInfoDTO basicProcessInfoDTO = processInfoVO.getBasicProcessInfoDTO();
|
||||
//改为手动流程名称
|
||||
//basicProcessInfoDTO.setProcessName(standardNumber+"-"+standardName+"未符合项跟踪");
|
||||
basicProcessInfoDTO.setProcessDefinitionId(processHandleService.getDefinitionIdByKey(ProcessDefinitionKey.)); // 流程定义id
|
||||
basicProcessInfoDTO.setProcessType(ProcessTypeEnum..getValue()); // 流程类型
|
||||
userInfoMap.put(ProcessProjectNotMetCommon.STANDARDS_ENGINEER, CurrentUserUtil.getId());
|
||||
//processInfoVO.setUserInfoMap(userInfoMap);
|
||||
processHandleService.startProcess(processInfoVO);
|
||||
//保存快照 start
|
||||
processHandleService.saveToSnapshot(processInfoVO, CurrentUserUtil.getId());
|
||||
//保存快照 end
|
||||
//start 先保存一份初始草稿
|
||||
processInfoVO.setSaveSource(DraftCommon.INITIAL_SOURCE);
|
||||
processInfoVO.setBasicTaskInfoDTO(processInfoVO.getBasicTaskInfoDTO().setTaskId(null));
|
||||
saveToDraft(processInfoVO);
|
||||
//end 保存初始草稿结束
|
||||
}
|
||||
|
||||
public void approveTask(ProcessInfoVO<ProcessPlanChange> processInfoVO, boolean pass) {
|
||||
BasicTaskInfoDTO basicTaskInfoDTO = processInfoVO.getBasicTaskInfoDTO();
|
||||
String taskId = basicTaskInfoDTO.getTaskId();
|
||||
ProcessDTO processDTO = processHandleService.getProcessDTO(taskId);
|
||||
String processInstanceId = processDTO.getProcessInstanceId();
|
||||
ProcessAll processAll = processAllService.getByProcessInstanceId(processInstanceId);
|
||||
processInfoVO.setBusinessId(processAll.getProjectId());
|
||||
Task task = processDTO.getTask();
|
||||
String taskDefinitionKey = task.getTaskDefinitionKey();
|
||||
processHandleService.updateApprovalRecord(processInfoVO);
|
||||
switch (taskDefinitionKey) {
|
||||
//主管级领导审批
|
||||
case ProcessProjectNotMetCommon.ZGJLDSP:
|
||||
zgjldspApprove(processInfoVO, processDTO, pass);
|
||||
break;
|
||||
//法规工程师审批
|
||||
case ProcessProjectNotMetCommon.FGGCSSP:
|
||||
fggcsspApprove(processInfoVO, processDTO, pass, processAll);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void zgjldspApprove(ProcessInfoVO<ProcessPlanChange> processInfoVO, ProcessDTO processDTO, boolean pass) {
|
||||
ProcessApprovalRecord processApprovalRecord = processDTO.getProcessApprovalRecord();
|
||||
String originUserId = processApprovalRecord.getOriginUserId();
|
||||
String userId = CurrentUserUtil.getId();
|
||||
String businessId = processInfoVO.getBusinessId();
|
||||
// 完成任务
|
||||
Map<String, Object> variables = new HashMap<>();
|
||||
variables.put(ProcessProjectNotMetCommon.PASS, pass);
|
||||
//variables.put(ProcessProjectNotMetCommon.MANAGER_LEADER, userId);
|
||||
taskService.complete(processDTO.getTaskId(), variables);
|
||||
if (!Objects.equals(userId, originUserId)) {
|
||||
LambdaUpdateWrapper<ProcessProjectNotMet> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.eq(ProcessProjectNotMet::getId, businessId);
|
||||
updateWrapper.set(ProcessProjectNotMet::getManagerLeaderId, userId);
|
||||
update(updateWrapper);
|
||||
}
|
||||
}
|
||||
|
||||
public void submit(ProcessInfoVO<ProcessPlanChange> processInfoVO) {
|
||||
BasicTaskInfoDTO basicTaskInfoDTO = processInfoVO.getBasicTaskInfoDTO();
|
||||
String taskId = basicTaskInfoDTO.getTaskId();
|
||||
ProcessDTO processDTO = processHandleService.getProcessDTO(taskId);
|
||||
String processInstanceId = processDTO.getProcessInstanceId();
|
||||
ProcessAll processAll = processAllService.getByProcessInstanceId(processInstanceId);
|
||||
String projectId = processAll.getProjectId();
|
||||
processInfoVO.setBusinessId(projectId);
|
||||
Task task = processDTO.getTask();
|
||||
processHandleService.updateApprovalRecord(processInfoVO);
|
||||
|
||||
ProcessApprovalRecord processApprovalRecord = processDTO.getProcessApprovalRecord();
|
||||
String originUserId = processApprovalRecord.getOriginUserId();
|
||||
String userId = CurrentUserUtil.getId();
|
||||
//业务处理
|
||||
ProcessPlanChange businessInfoDTO = processInfoVO.getBusinessInfoDTO();
|
||||
|
||||
taskService.complete(taskId);
|
||||
|
||||
}
|
||||
|
||||
public void saveToDraft(ProcessInfoVO<ProcessPlanChange> processInfoVO) {
|
||||
ProcessPlanChange businessInfoDTO = processInfoVO.getBusinessInfoDTO();
|
||||
if (businessInfoDTO != null) {
|
||||
ProcessProjectNotMet processPlanChange = businessInfoDTO.getProcessProjectNotMet();
|
||||
if (processPlanChange != null) {
|
||||
processInfoVO.setBusinessId(processPlanChange.getId());
|
||||
}
|
||||
}
|
||||
|
||||
// 流程信息
|
||||
BasicProcessInfoDTO basicProcessInfoDTO = processInfoVO.getBasicProcessInfoDTO();
|
||||
if (basicProcessInfoDTO == null) {
|
||||
basicProcessInfoDTO = new BasicProcessInfoDTO();
|
||||
}
|
||||
basicProcessInfoDTO.setProcessType(ProcessTypeEnum..getValue()); // 流程类型
|
||||
processInfoVO.setBasicProcessInfoDTO(basicProcessInfoDTO);
|
||||
//保存businessId
|
||||
String processInstanceId = basicProcessInfoDTO.getProcessInstanceId();
|
||||
if (StringUtils.isNotBlank(processInstanceId)) {
|
||||
ProcessAll processAll = processAllService.getByProcessInstanceId(processInstanceId);
|
||||
String projectId = processAll.getProjectId();
|
||||
processInfoVO.setBusinessId(projectId);
|
||||
}
|
||||
|
||||
processHandleService.saveToDraft(processInfoVO);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user