update 企业标准年度制修订计划导入导出 改用模板
This commit is contained in:
+17
-1
@@ -289,4 +289,20 @@ VALUES ('1843464553690357761', '1843464136587796482', '延期', 'delay', '3', ''
|
|||||||
INSERT INTO sys_dict_item (id, dict_id, item_text, en_name, item_value, description, sort_order, `status`, create_by,
|
INSERT INTO sys_dict_item (id, dict_id, item_text, en_name, item_value, description, sort_order, `status`, create_by,
|
||||||
create_time, is_tag_dict, is_read_only, del_flag)
|
create_time, is_tag_dict, is_read_only, del_flag)
|
||||||
VALUES ('1843464714877460481', '1843464136587796482', '人员变更', 'Person change', '4', '', 4, 1, 'cheryrsm',
|
VALUES ('1843464714877460481', '1843464136587796482', '人员变更', 'Person change', '4', '', 4, 1, 'cheryrsm',
|
||||||
'2024-10-08 09:33:32', 0, 0, 0);
|
'2024-10-08 09:33:32', 0, 0, 0);
|
||||||
|
-- 部署模板后 需要更新顺序
|
||||||
|
update process_model_node set sort = 1 where process_key = 'process-plan-change' and xml_node_id = 'qcrfq';
|
||||||
|
update process_model_node set sort = 2 where process_key = 'process-plan-change' and xml_node_id = 'bmjlsp';
|
||||||
|
update process_model_node set sort = 3 where process_key = 'process-plan-change' and xml_node_id = 'fgbmclrsp';
|
||||||
|
update process_model_node set sort = 4 where process_key = 'process-plan-change' and xml_node_id = 'fgbmjlsp';
|
||||||
|
update process_model_node set sort = 5 where process_key = 'process-plan-change' and xml_node_id = 'gjjlsp';
|
||||||
|
update process_model_node set sort = 6 where process_key = 'process-plan-change' and xml_node_id = 'zjsp';
|
||||||
|
update process_model_node set sort = 7 where process_key = 'process-plan-change' and xml_node_id = 'sqrsp';
|
||||||
|
|
||||||
|
update process_model_node set sort = 1 where process_key = 'process-annual-init' and xml_node_id = 'qcrfq';
|
||||||
|
update process_model_node set sort = 2 where process_key = 'process-annual-init' and xml_node_id = 'bmjlsp';
|
||||||
|
update process_model_node set sort = 3 where process_key = 'process-annual-init' and xml_node_id = 'fgbmclrsp';
|
||||||
|
update process_model_node set sort = 4 where process_key = 'process-annual-init' and xml_node_id = 'fgbmjlsp';
|
||||||
|
update process_model_node set sort = 5 where process_key = 'process-annual-init' and xml_node_id = 'gjjlsp';
|
||||||
|
update process_model_node set sort = 6 where process_key = 'process-annual-init' and xml_node_id = 'zjsp';
|
||||||
|
update process_model_node set sort = 7 where process_key = 'process-annual-init' and xml_node_id = 'sqrsp';
|
||||||
+31
-12
@@ -3,10 +3,15 @@ package com.jero.modules.activiti.process.annualinit.controller;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.jero.common.aspect.annotation.AutoLog;
|
import com.jero.common.aspect.annotation.AutoLog;
|
||||||
import com.jero.common.aspect.annotation.DictPoint;
|
import com.jero.common.aspect.annotation.DictPoint;
|
||||||
|
import com.jero.common.exception.JeroBootException;
|
||||||
import com.jero.common.system.base.controller.JeroController;
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
import com.jero.common.system.query.QueryGenerator;
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
|
import com.jero.common.util.FileUtils;
|
||||||
|
import com.jero.common.util.ZipUtil;
|
||||||
import com.jero.modules.activiti.process.annualinit.entity.ProcessAnnualInitLink;
|
import com.jero.modules.activiti.process.annualinit.entity.ProcessAnnualInitLink;
|
||||||
import com.jero.modules.activiti.process.annualinit.service.ProcessAnnualInitLinkService;
|
import com.jero.modules.activiti.process.annualinit.service.ProcessAnnualInitLinkService;
|
||||||
|
import com.jero.modules.activiti.process.annualinit.vo.ProcessAnnualInitLinkExcelVO;
|
||||||
|
import com.jero.modules.laws.club.vo.excel.LawsClubJoinTeamExcel;
|
||||||
import com.jero.modules.laws.standard.entity.LawsEnterpriseStandard;
|
import com.jero.modules.laws.standard.entity.LawsEnterpriseStandard;
|
||||||
import com.jero.modules.laws.standard.service.ILawsEnterpriseStandardService;
|
import com.jero.modules.laws.standard.service.ILawsEnterpriseStandardService;
|
||||||
import com.jero.modules.system.vo.IdMapBody;
|
import com.jero.modules.system.vo.IdMapBody;
|
||||||
@@ -14,6 +19,9 @@ import com.jero.modules.system.vo.IdsMapBody;
|
|||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||||
|
import org.springframework.core.io.ClassPathResource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
@@ -26,6 +34,8 @@ import org.springframework.web.servlet.ModelAndView;
|
|||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.*;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -46,8 +56,6 @@ public class ProcessAnnualInitLinkController extends JeroController<ProcessAnnua
|
|||||||
*/
|
*/
|
||||||
@Resource
|
@Resource
|
||||||
private ProcessAnnualInitLinkService processAnnualInitLinkService;
|
private ProcessAnnualInitLinkService processAnnualInitLinkService;
|
||||||
@Resource
|
|
||||||
private ILawsEnterpriseStandardService enterpriseStandardService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
@@ -160,9 +168,24 @@ public class ProcessAnnualInitLinkController extends JeroController<ProcessAnnua
|
|||||||
*/
|
*/
|
||||||
@ApiOperation(value = "年度制修订计划流程关联标准-下载导入模板")
|
@ApiOperation(value = "年度制修订计划流程关联标准-下载导入模板")
|
||||||
@GetMapping(value = "/exportTemplate")
|
@GetMapping(value = "/exportTemplate")
|
||||||
public ModelAndView exportTemplate(HttpServletRequest req, ProcessAnnualInitLink processAnnualInitLink) {
|
public void exportTemplate(HttpServletResponse response) {
|
||||||
List<ProcessAnnualInitLink> records = new ArrayList<>();
|
ClassPathResource resource = new ClassPathResource("excelTemplate/企业标准年度制修订计划导入.xls");
|
||||||
return super.exportListXls(records, ProcessAnnualInitLink.class, "年度制修订计划流程关联标准");
|
// 设置HTTP响应头,包括文件大小和内容类型
|
||||||
|
response.setContentType("application/force-download");// 设置强制下载不打开
|
||||||
|
response.addHeader("Content-Disposition", "attachment;fileName=" + new String("企业标准年度制修订计划导入.xls".getBytes(StandardCharsets.UTF_8), StandardCharsets.ISO_8859_1));
|
||||||
|
try (InputStream inputStream = resource.getInputStream();
|
||||||
|
OutputStream outputStream = response.getOutputStream()
|
||||||
|
) {
|
||||||
|
byte[] buf = new byte[1024];
|
||||||
|
int len;
|
||||||
|
while ((len = inputStream.read(buf)) > 0) {
|
||||||
|
outputStream.write(buf, 0, len);
|
||||||
|
}
|
||||||
|
response.flushBuffer();
|
||||||
|
} catch (Exception e) {
|
||||||
|
response.setStatus(404);
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -171,13 +194,9 @@ public class ProcessAnnualInitLinkController extends JeroController<ProcessAnnua
|
|||||||
@DictPoint
|
@DictPoint
|
||||||
@ApiOperation(value = "年度制修订计划流程关联标准-通过excel导入数据")
|
@ApiOperation(value = "年度制修订计划流程关联标准-通过excel导入数据")
|
||||||
@PostMapping(value = "/importExcel")
|
@PostMapping(value = "/importExcel")
|
||||||
public Result<List<ProcessAnnualInitLink>> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
public Result<List<ProcessAnnualInitLinkExcelVO>> importExcel(HttpServletRequest request) {
|
||||||
List<ProcessAnnualInitLink> excelData = super.getExcelData(request, ProcessAnnualInitLink.class);
|
|
||||||
for (ProcessAnnualInitLink excelDatum : excelData) {
|
List<ProcessAnnualInitLinkExcelVO> excelData = processAnnualInitLinkService.importExcel(request);
|
||||||
String standardNumber = excelDatum.getStandardNumber();
|
|
||||||
LawsEnterpriseStandard lawsEnterpriseStandard = enterpriseStandardService.queryByStandardNumber(standardNumber);
|
|
||||||
excelDatum.setStandardId(lawsEnterpriseStandard.getId());
|
|
||||||
}
|
|
||||||
return Result.OK(excelData);
|
return Result.OK(excelData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+8
-8
@@ -40,7 +40,7 @@ public class ProcessAnnualInitLink implements Serializable {
|
|||||||
* 制修订类别
|
* 制修订类别
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "制修订类别")
|
@ApiModelProperty(value = "制修订类别")
|
||||||
@Excel(name = "制修订类别", width = 15, dicCode = "esp_revision_type")
|
@Excel(name = "*制修订类型", width = 15, dicCode = "esp_revision_type")
|
||||||
@Dict(dicCode = "esp_revision_type")
|
@Dict(dicCode = "esp_revision_type")
|
||||||
private String revisionType;
|
private String revisionType;
|
||||||
/**
|
/**
|
||||||
@@ -52,19 +52,19 @@ public class ProcessAnnualInitLink implements Serializable {
|
|||||||
* 标准编号
|
* 标准编号
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "标准编号")
|
@ApiModelProperty(value = "标准编号")
|
||||||
@Excel(name = "标准编号", width = 15)
|
@Excel(name = "*企标编号", width = 15)
|
||||||
private String standardNumber;
|
private String standardNumber;
|
||||||
/**
|
/**
|
||||||
* 标准名称
|
* 标准名称
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "标准名称")
|
@ApiModelProperty(value = "标准名称")
|
||||||
@Excel(name = "标准名称", width = 15)
|
@Excel(name = "*企标名称", width = 15)
|
||||||
private String standardName;
|
private String standardName;
|
||||||
/**
|
/**
|
||||||
* 起草人
|
* 起草人
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "起草人")
|
@ApiModelProperty(value = "起草人")
|
||||||
@Excel(name = "起草人", width = 15, dictTable = "sys_user", dicText = "CONCAT(realname, '(', username, ')')", dicCode = "id")
|
@Excel(name = "*起草人", width = 15, dictTable = "sys_user", dicText = "CONCAT(realname, '(', username, ')')", dicCode = "id")
|
||||||
@Dict(dictTable = "sys_user", dicText = "CONCAT(realname, '(', username, ')')", dicCode = "id")
|
@Dict(dictTable = "sys_user", dicText = "CONCAT(realname, '(', username, ')')", dicCode = "id")
|
||||||
private String mainDraftingUser;
|
private String mainDraftingUser;
|
||||||
/**
|
/**
|
||||||
@@ -77,21 +77,21 @@ public class ProcessAnnualInitLink implements Serializable {
|
|||||||
* 所在部门id
|
* 所在部门id
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "所在部门id")
|
@ApiModelProperty(value = "所在部门id")
|
||||||
@Excel(name = "所在部门", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
|
@Excel(name = "*所在部门", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
|
||||||
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
|
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
|
||||||
private String departId;
|
private String departId;
|
||||||
/**
|
/**
|
||||||
* 专业模块
|
* 专业模块
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "专业模块")
|
@ApiModelProperty(value = "专业模块")
|
||||||
@Excel(name = "专业模块", width = 15, dicCode = "professional_module")
|
@Excel(name = "*专业模块", width = 15, dicCode = "professional_module")
|
||||||
@Dict(dicCode = "professional_module")
|
@Dict(dicCode = "professional_module")
|
||||||
private String professionalModule;
|
private String professionalModule;
|
||||||
/**
|
/**
|
||||||
* 初稿完成日期
|
* 初稿完成日期
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "初稿完成日期")
|
@ApiModelProperty(value = "初稿完成日期")
|
||||||
@Excel(name = "初稿完成日期", width = 15, format = "yyyy-MM-dd")
|
@Excel(name = "*初稿完成日期", width = 15, format = "yyyy-MM-dd")
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
private Date draftCompleteDate;
|
private Date draftCompleteDate;
|
||||||
@@ -99,7 +99,7 @@ public class ProcessAnnualInitLink implements Serializable {
|
|||||||
* 计划归档日期
|
* 计划归档日期
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "计划归档日期")
|
@ApiModelProperty(value = "计划归档日期")
|
||||||
@Excel(name = "计划归档日期", width = 15, format = "yyyy-MM-dd")
|
@Excel(name = "*计划归档日期", width = 15, format = "yyyy-MM-dd")
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
private Date planArchivingDate;
|
private Date planArchivingDate;
|
||||||
|
|||||||
+181
@@ -2,12 +2,21 @@ package com.jero.modules.activiti.process.annualinit.service;
|
|||||||
|
|
||||||
import cn.hutool.core.collection.CollStreamUtil;
|
import cn.hutool.core.collection.CollStreamUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.jero.common.api.vo.Result;
|
||||||
|
import com.jero.common.exception.JeroBootException;
|
||||||
import com.jero.common.system.api.ISysBaseAPI;
|
import com.jero.common.system.api.ISysBaseAPI;
|
||||||
import com.jero.common.system.query.QueryGenerator;
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
import com.jero.common.system.vo.DictModel;
|
import com.jero.common.system.vo.DictModel;
|
||||||
import com.jero.common.util.PasswordUtil;
|
import com.jero.common.util.PasswordUtil;
|
||||||
import com.jero.modules.activiti.process.annualinit.entity.ProcessAnnualInitLink;
|
import com.jero.modules.activiti.process.annualinit.entity.ProcessAnnualInitLink;
|
||||||
import com.jero.modules.activiti.process.annualinit.mapper.ProcessAnnualInitLinkMapper;
|
import com.jero.modules.activiti.process.annualinit.mapper.ProcessAnnualInitLinkMapper;
|
||||||
|
import com.jero.modules.activiti.process.annualinit.vo.ProcessAnnualInitLinkExcelVO;
|
||||||
|
import com.jero.modules.laws.standard.entity.LawsEnterpriseStandard;
|
||||||
|
import com.jero.modules.laws.standard.service.ILawsEnterpriseStandardService;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.jeecgframework.poi.excel.ExcelImportCheckUtil;
|
||||||
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@@ -17,9 +26,15 @@ import javax.annotation.Resource;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.time.LocalDate;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -35,6 +50,8 @@ public class ProcessAnnualInitLinkService extends ServiceImpl<ProcessAnnualInitL
|
|||||||
private ProcessAnnualInitLinkMapper processAnnualInitLinkMapper;
|
private ProcessAnnualInitLinkMapper processAnnualInitLinkMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private ISysBaseAPI sysBaseAPI;
|
private ISysBaseAPI sysBaseAPI;
|
||||||
|
@Resource
|
||||||
|
private ILawsEnterpriseStandardService enterpriseStandardService;
|
||||||
|
|
||||||
public IPage<ProcessAnnualInitLink> pageList(Page<ProcessAnnualInitLink> page, ProcessAnnualInitLink processAnnualInitLink, HttpServletRequest req) {
|
public IPage<ProcessAnnualInitLink> pageList(Page<ProcessAnnualInitLink> page, ProcessAnnualInitLink processAnnualInitLink, HttpServletRequest req) {
|
||||||
QueryWrapper<ProcessAnnualInitLink> queryWrapper = QueryGenerator.initQueryWrapper(processAnnualInitLink, req.getParameterMap());
|
QueryWrapper<ProcessAnnualInitLink> queryWrapper = QueryGenerator.initQueryWrapper(processAnnualInitLink, req.getParameterMap());
|
||||||
@@ -74,5 +91,169 @@ public class ProcessAnnualInitLinkService extends ServiceImpl<ProcessAnnualInitL
|
|||||||
ProcessAnnualInitLink processAnnualInitLink = this.getById(id);
|
ProcessAnnualInitLink processAnnualInitLink = this.getById(id);
|
||||||
return processAnnualInitLink;
|
return processAnnualInitLink;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<ProcessAnnualInitLinkExcelVO> importExcel(HttpServletRequest request) {
|
||||||
|
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
||||||
|
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
|
||||||
|
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
|
||||||
|
// 获取上传文件对象
|
||||||
|
MultipartFile file = entity.getValue();
|
||||||
|
//校验文件名
|
||||||
|
String originalFilename = file.getOriginalFilename();
|
||||||
|
if (originalFilename != null) {
|
||||||
|
String substring = originalFilename.substring(originalFilename.lastIndexOf("."));
|
||||||
|
if (!".xlsx".equals(substring)&&!".xls".equals(substring)) {
|
||||||
|
throw new JeroBootException("文件类型错误:" + "请上传.xlsx或.xls文件!");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
throw new JeroBootException("文件错误:" + "文件名丢失,请上传正确的文件!");
|
||||||
|
}
|
||||||
|
ImportParams params = new ImportParams();
|
||||||
|
params.setSheetNum(1);
|
||||||
|
params.setHeadRows(1);
|
||||||
|
try {
|
||||||
|
//导入Excel格式校验,看匹配的字段文本概率
|
||||||
|
Boolean t = ExcelImportCheckUtil.check(file.getInputStream(), ProcessAnnualInitLinkExcelVO.class, params);
|
||||||
|
if (t == null) {
|
||||||
|
throw new JeroBootException("导入数据为空!");
|
||||||
|
}
|
||||||
|
if(!t){
|
||||||
|
throw new JeroBootException("文件格式有误,请下载模板后上传 !");
|
||||||
|
}
|
||||||
|
List<ProcessAnnualInitLinkExcelVO> excelList = ExcelImportUtil.importExcel(file.getInputStream(), ProcessAnnualInitLinkExcelVO.class, params);
|
||||||
|
excelList = excelList.stream().skip(2).filter(item -> !Objects.isNull(item)).collect(Collectors.toList());
|
||||||
|
if (CollectionUtils.isEmpty(excelList)) {
|
||||||
|
throw new JeroBootException("没有数据可导入");
|
||||||
|
}
|
||||||
|
StringBuilder msg = validateExcelData(excelList); // 校验数据
|
||||||
|
if (StringUtils.isNotEmpty(msg.toString())) {
|
||||||
|
throw new JeroBootException(msg.toString());
|
||||||
|
}
|
||||||
|
for (ProcessAnnualInitLinkExcelVO excelDatum : excelList) {
|
||||||
|
String standardNumber = excelDatum.getStandardNumber();
|
||||||
|
LawsEnterpriseStandard lawsEnterpriseStandard = enterpriseStandardService.queryByStandardNumber(standardNumber);
|
||||||
|
excelDatum.setStandardId(lawsEnterpriseStandard.getId());
|
||||||
|
}
|
||||||
|
return excelList;
|
||||||
|
} catch (Exception e) {
|
||||||
|
if(Objects.isNull(e.getMessage())){
|
||||||
|
throw new JeroBootException("文件导入失败:请填写内容标题!");
|
||||||
|
}
|
||||||
|
log.error("文件导入失败:",e);
|
||||||
|
throw new JeroBootException("文件导入失败:" + e.getMessage());
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
file.getInputStream().close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private StringBuilder validateExcelData(List<ProcessAnnualInitLinkExcelVO> excelList) {
|
||||||
|
StringBuilder msg = new StringBuilder();
|
||||||
|
//日期格式
|
||||||
|
String users = excelList.stream().map(ProcessAnnualInitLinkExcelVO::getMainDraftingUser).collect(Collectors.joining(","));
|
||||||
|
List<DictModel> dictModels = sysBaseAPI.translateDictFromTableByKeys("sys_user", "id", "CONCAT(realname, '(', username, ')')", users);
|
||||||
|
Map<String, String> userMap = CollStreamUtil.toMap(dictModels, DictModel::getValue, DictModel::getText);
|
||||||
|
List<DictModel> dictModels0 = sysBaseAPI.translateDictFromTableByKeys("sys_user", "email", "CONCAT(realname, '(', username, ')')", users);
|
||||||
|
Map<String, String> emailMap = CollStreamUtil.toMap(dictModels0, DictModel::getValue, DictModel::getText);
|
||||||
|
List<DictModel> dictModels1 = sysBaseAPI.getDictItems("esp_revision_type");
|
||||||
|
Map<String, String> espRevisionTypeMap = CollStreamUtil.toMap(dictModels1, DictModel::getText, DictModel::getValue);
|
||||||
|
|
||||||
|
String departs = excelList.stream().map(ProcessAnnualInitLinkExcelVO::getDepartId).collect(Collectors.joining(","));
|
||||||
|
List<DictModel> dictModels2 = sysBaseAPI.translateDictFromTableByKeys("sys_depart", "id", "depart_name", departs);
|
||||||
|
Map<String, String> departMap = CollStreamUtil.toMap(dictModels2, DictModel::getValue, DictModel::getText);
|
||||||
|
|
||||||
|
List<DictModel> dictModels3 = sysBaseAPI.getDictItems("professional_module");
|
||||||
|
Map<String, String> professionalModuleMap = CollStreamUtil.toMap(dictModels3, DictModel::getText, DictModel::getValue);
|
||||||
|
|
||||||
|
List<DictModel> dictModels4 = sysBaseAPI.getDictItems("yn");
|
||||||
|
Map<String, String> ynMap = CollStreamUtil.toMap(dictModels4, DictModel::getText, DictModel::getValue);
|
||||||
|
|
||||||
|
for (int i = 0; i < excelList.size(); i++) {
|
||||||
|
StringBuilder msgSub = new StringBuilder();
|
||||||
|
ProcessAnnualInitLinkExcelVO excelVO = excelList.get(i);
|
||||||
|
String revisionType = excelVO.getRevisionType();
|
||||||
|
if (StringUtils.isBlank(revisionType)){
|
||||||
|
msgSub.append("第" + (i + 4) + "行" + "制修订类型不能为空;");
|
||||||
|
}else if (!espRevisionTypeMap.containsKey(revisionType)){
|
||||||
|
msgSub.append("第" + (i + 4) + "行" + "制修订类型不存在;");
|
||||||
|
}else {
|
||||||
|
excelVO.setRevisionType(espRevisionTypeMap.get(revisionType));
|
||||||
|
}
|
||||||
|
String standardNumber = excelVO.getStandardNumber();
|
||||||
|
LawsEnterpriseStandard lawsEnterpriseStandard = enterpriseStandardService.queryByStandardNumber(standardNumber);
|
||||||
|
if (lawsEnterpriseStandard != null){
|
||||||
|
excelVO.setStandardId(lawsEnterpriseStandard.getId());
|
||||||
|
}
|
||||||
|
String standardName = excelVO.getStandardName();
|
||||||
|
|
||||||
|
String mainDraftingUser = excelVO.getMainDraftingUser();
|
||||||
|
if (StringUtils.isBlank(mainDraftingUser)){
|
||||||
|
msgSub.append("第" + (i + 4) + "行" + "起草人不能为空;");
|
||||||
|
}else if (!userMap.containsKey(mainDraftingUser)){
|
||||||
|
msgSub.append("第" + (i + 4) + "行" + "起草人不存在;");
|
||||||
|
}else {
|
||||||
|
excelVO.setMainDraftingUser(userMap.get(mainDraftingUser));
|
||||||
|
excelVO.setEmail(PasswordUtil.decrypt(emailMap.get(mainDraftingUser)));
|
||||||
|
}
|
||||||
|
String departId = excelVO.getDepartId();
|
||||||
|
if (StringUtils.isBlank(departId)){
|
||||||
|
msgSub.append("第" + (i + 4) + "行" + "所在部门不能为空;");
|
||||||
|
}else if (!departMap.containsKey(departId)){
|
||||||
|
msgSub.append("第" + (i + 4) + "行" + "所在部门不存在;");
|
||||||
|
}else {
|
||||||
|
excelVO.setDepartId(departMap.get(departId));
|
||||||
|
}
|
||||||
|
|
||||||
|
String professionalModule = excelVO.getProfessionalModule();
|
||||||
|
if (StringUtils.isBlank(professionalModule)){
|
||||||
|
msgSub.append("第" + (i + 4) + "行" + "专业模块不能为空;");
|
||||||
|
}else if (!professionalModuleMap.containsKey(professionalModule)){
|
||||||
|
msgSub.append("第" + (i + 4) + "行" + "专业模块不存在;");
|
||||||
|
}else {
|
||||||
|
excelVO.setProfessionalModule(professionalModuleMap.get(professionalModule));
|
||||||
|
}
|
||||||
|
String draftCompleteDate = excelVO.getDraftCompleteDate();
|
||||||
|
if (StringUtils.isBlank(draftCompleteDate)){
|
||||||
|
msgSub.append("第" + (i + 4) + "行" + "初稿完成日期不能为空;");
|
||||||
|
}else {
|
||||||
|
try {
|
||||||
|
LocalDate.parse(draftCompleteDate);
|
||||||
|
} catch (Exception e) {
|
||||||
|
msgSub.append("第" + (i + 4) + "行" + "初稿完成日期格式不正确,应为yyyy-MM-dd;");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String planArchivingDate = excelVO.getPlanArchivingDate();
|
||||||
|
if (StringUtils.isBlank(planArchivingDate)){
|
||||||
|
msgSub.append("第" + (i + 4) + "行" + "计划归档日期不能为空;");
|
||||||
|
}else {
|
||||||
|
try {
|
||||||
|
LocalDate.parse(planArchivingDate);
|
||||||
|
} catch (Exception e) {
|
||||||
|
msgSub.append("第" + (i + 4) + "行" + "计划归档日期格式不正确,应为yyyy-MM-dd;");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String haveEnglishVersion = excelVO.getHaveEnglishVersion();
|
||||||
|
if (StringUtils.isNotBlank(haveEnglishVersion)){
|
||||||
|
if (ynMap.containsKey(haveEnglishVersion)){
|
||||||
|
excelVO.setHaveEnglishVersion(ynMap.get(haveEnglishVersion));
|
||||||
|
}else {
|
||||||
|
msgSub.append("第" + (i + 4) + "行" + "是否有英文版不存在;");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String committee = excelVO.getCommittee();
|
||||||
|
if (StringUtils.isNotBlank(committee)&&committee.length()>500){
|
||||||
|
msgSub.append("第" + (i + 4) + "行" + "所属技术委员会最大为500字符;");
|
||||||
|
}
|
||||||
|
if (msgSub.length() > 0) {
|
||||||
|
msg.append(msgSub).append("</br>");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+108
@@ -0,0 +1,108 @@
|
|||||||
|
package com.jero.modules.activiti.process.annualinit.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.jero.common.aspect.annotation.Dict;
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 年度制修订计划流程关联标准 Excel导入VO
|
||||||
|
*
|
||||||
|
* @author lijiarao
|
||||||
|
* @since 2024-09-24 14:30:21
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "ProcessAnnualInitLinkExcelVO", description = "年度制修订计划流程关联标准 Excel导入VO")
|
||||||
|
public class ProcessAnnualInitLinkExcelVO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 647513571439825961L;
|
||||||
|
/**
|
||||||
|
* 制修订类别
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "制修订类别")
|
||||||
|
@Excel(name = "*制修订类型", width = 15)
|
||||||
|
@Dict(dicCode = "esp_revision_type")
|
||||||
|
private String revisionType;
|
||||||
|
/**
|
||||||
|
* 标准id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "标准id")
|
||||||
|
private String standardId;
|
||||||
|
/**
|
||||||
|
* 标准编号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "标准编号")
|
||||||
|
@Excel(name = "*企标编号", width = 15)
|
||||||
|
private String standardNumber;
|
||||||
|
/**
|
||||||
|
* 标准名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "标准名称")
|
||||||
|
@Excel(name = "*企标名称", width = 15)
|
||||||
|
private String standardName;
|
||||||
|
/**
|
||||||
|
* 起草人
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "起草人")
|
||||||
|
@Excel(name = "*起草人", width = 15)
|
||||||
|
@Dict(dictTable = "sys_user", dicText = "CONCAT(realname, '(', username, ')')", dicCode = "id")
|
||||||
|
private String mainDraftingUser;
|
||||||
|
/**
|
||||||
|
* 邮箱
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
@ApiModelProperty(value = "邮箱")
|
||||||
|
private String email;
|
||||||
|
/**
|
||||||
|
* 所在部门id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "所在部门id")
|
||||||
|
@Excel(name = "*所在部门")
|
||||||
|
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
|
||||||
|
private String departId;
|
||||||
|
/**
|
||||||
|
* 专业模块
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "专业模块")
|
||||||
|
@Excel(name = "*专业模块", width = 15)
|
||||||
|
@Dict(dicCode = "professional_module")
|
||||||
|
private String professionalModule;
|
||||||
|
/**
|
||||||
|
* 初稿完成日期
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "初稿完成日期")
|
||||||
|
@Excel(name = "*初稿完成日期", width = 15)
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private String draftCompleteDate;
|
||||||
|
/**
|
||||||
|
* 计划归档日期
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "计划归档日期")
|
||||||
|
@Excel(name = "*计划归档日期", width = 15)
|
||||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
|
private String planArchivingDate;
|
||||||
|
/**
|
||||||
|
* 是否有英文版
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "是否有英文版")
|
||||||
|
@Excel(name = "是否有英文版", width = 15)
|
||||||
|
@Dict(dicCode = "yn")
|
||||||
|
private String haveEnglishVersion;
|
||||||
|
/**
|
||||||
|
* 所属技术委员会
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "所属技术委员会")
|
||||||
|
@Excel(name = "所属技术委员会", width = 15)
|
||||||
|
private String committee;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
Binary file not shown.
Binary file not shown.
-102
@@ -1,102 +0,0 @@
|
|||||||
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
@@ -1,172 +0,0 @@
|
|||||||
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
@@ -1,121 +0,0 @@
|
|||||||
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
@@ -1,125 +0,0 @@
|
|||||||
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
@@ -1,15 +0,0 @@
|
|||||||
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
@@ -1,15 +0,0 @@
|
|||||||
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
@@ -1,41 +0,0 @@
|
|||||||
<?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
@@ -1,41 +0,0 @@
|
|||||||
<?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
@@ -1,57 +0,0 @@
|
|||||||
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
@@ -1,184 +0,0 @@
|
|||||||
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