feat: 企标立项变更字段翻译修正
This commit is contained in:
+31
-6
@@ -1,21 +1,27 @@
|
||||
package com.jero.modules.activiti.process.esAnnualInit.controller;
|
||||
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.AutoLog;
|
||||
import com.jero.common.constant.enums.YesOrNoEnum;
|
||||
import com.jero.modules.activiti.process.esAnnualInit.entity.ProcessEsAnnualInit;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import com.jero.modules.activiti.process.esAnnualInit.service.ProcessEsAnnualInitService;
|
||||
import io.swagger.annotations.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.enmus.ExcelType;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
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.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.jero.common.system.base.controller.JeroController.*;
|
||||
|
||||
@@ -29,6 +35,9 @@ import static com.jero.common.system.base.controller.JeroController.*;
|
||||
@RequestMapping("/process/es/annualInit")
|
||||
public class ESAnnualInitController {
|
||||
|
||||
@Resource
|
||||
private ProcessEsAnnualInitService annualInitService;
|
||||
|
||||
/**
|
||||
* 导入模板下载
|
||||
*/
|
||||
@@ -50,6 +59,22 @@ public class ESAnnualInitController {
|
||||
return mv;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/importExcel")
|
||||
@ApiOperation(value = "企标年度制修订标准化发起流程-导入", notes = "企标年度制修订标准化发起流程-导入")
|
||||
@AutoLog(value = "企标年度制修订标准化发起流程-导入")
|
||||
public Result<?> importExcel(@ApiParam(value = "要上传的文件", required = true) @RequestParam("file") MultipartFile file) {
|
||||
Map<String, Object> resultMap = annualInitService.importData(file);
|
||||
Object flag = resultMap.get("flag");
|
||||
if (flag == YesOrNoEnum.YES.getValue()) {
|
||||
return Result.OK(resultMap.get("dataList"));
|
||||
} else {
|
||||
return Result.error("导入失败", resultMap.get("msgList"));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+97
-61
@@ -8,7 +8,7 @@ import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@@ -33,86 +33,103 @@ public class ProcessEsInitChange implements Serializable {
|
||||
private String id;
|
||||
|
||||
/** 企标计划ID */
|
||||
@ApiModelProperty(value = "企标计划ID")
|
||||
private String espId;
|
||||
|
||||
/**
|
||||
* 标准计划Id1(合并流程字段)
|
||||
*/
|
||||
@ApiModelProperty(value = "标准计划Id1(合并流程字段)")
|
||||
private String standardIdOne;
|
||||
|
||||
/**
|
||||
* 标准编号1(合并流程字段)
|
||||
*/
|
||||
@ApiModelProperty(value = "标准编号1(合并流程字段)")
|
||||
private String standardNoOne;
|
||||
|
||||
/**
|
||||
* 标准名称1(合并流程字段)
|
||||
*/
|
||||
@ApiModelProperty(value = "标准名称1(合并流程字段)")
|
||||
private String standardNameOne;
|
||||
|
||||
/**
|
||||
* 制修订类型1(合并流程字段)
|
||||
*/
|
||||
@ApiModelProperty(value = "制修订类型1(合并流程字段)")
|
||||
private String projectTypeOne;
|
||||
|
||||
/**
|
||||
* 标准计划Id2(合并流程字段)
|
||||
*/
|
||||
@ApiModelProperty(value = "标准计划Id2(合并流程字段)")
|
||||
private String standardIdTwo;
|
||||
|
||||
/**
|
||||
* 标准编号2(合并流程字段)
|
||||
*/
|
||||
@ApiModelProperty(value = "标准编号2(合并流程字段)")
|
||||
private String standardNoTwo;
|
||||
|
||||
/**
|
||||
* 标准名称2(合并流程字段)
|
||||
*/
|
||||
@ApiModelProperty(value = "标准名称2(合并流程字段)")
|
||||
private String standardNameTwo;
|
||||
|
||||
/**
|
||||
* 制修订类型2(合并流程字段)
|
||||
*/
|
||||
@ApiModelProperty(value = "制修订类型2(合并流程字段)")
|
||||
private String projectTypeTwo;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String orgCode;
|
||||
|
||||
/**
|
||||
* 0表示未删除,1表示删除
|
||||
*/
|
||||
@ApiModelProperty(value = "0表示未删除,1表示删除")
|
||||
private Integer delFlag;
|
||||
|
||||
/**
|
||||
* 流程名称
|
||||
*/
|
||||
@ApiModelProperty(value = "流程名称")
|
||||
private String processName;
|
||||
|
||||
/**
|
||||
* 流程实例Id
|
||||
*/
|
||||
@ApiModelProperty(value = "流程实例Id")
|
||||
private String processInstanceId;
|
||||
|
||||
/**
|
||||
@@ -120,81 +137,97 @@ public class ProcessEsInitChange implements Serializable {
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "截止日期")
|
||||
private Date deadlineDate;
|
||||
|
||||
/**
|
||||
* 流程说明
|
||||
*/
|
||||
@ApiModelProperty(value = "流程说明")
|
||||
private String processDescription;
|
||||
|
||||
/**
|
||||
* 申请类别
|
||||
*/
|
||||
@ApiModelProperty(value = "申请类别")
|
||||
private String applicationCategory;
|
||||
|
||||
/**
|
||||
* 项目类型
|
||||
*/
|
||||
@ApiModelProperty(value = "项目类型")
|
||||
private String projectType;
|
||||
|
||||
/**
|
||||
* 原企标编号
|
||||
*/
|
||||
@ApiModelProperty(value = "原企标编号")
|
||||
private String originEnStandardNo;
|
||||
|
||||
/**
|
||||
* 新企标编号
|
||||
*/
|
||||
@ApiModelProperty(value = "新企标编号")
|
||||
private String newEnStandardNo;
|
||||
|
||||
/**
|
||||
* 原企标名称
|
||||
*/
|
||||
@ApiModelProperty(value = "原企标名称")
|
||||
private String originEnStandardName;
|
||||
|
||||
/**
|
||||
* 新企标名称
|
||||
*/
|
||||
@ApiModelProperty(value = "新企标名称")
|
||||
private String newEnStandardName;
|
||||
|
||||
/**
|
||||
* 企标英文名称
|
||||
*/
|
||||
@ApiModelProperty(value = "企标英文名称")
|
||||
private String enStandardEnglishName;
|
||||
|
||||
/**
|
||||
* 企标体系
|
||||
*/
|
||||
@ApiModelProperty(value = "企标体系")
|
||||
private String enStandardSystem;
|
||||
|
||||
/**
|
||||
* 企业标准代号
|
||||
*/
|
||||
@ApiModelProperty(value = "企业标准代号")
|
||||
private String enStandardCode;
|
||||
|
||||
/**
|
||||
* 企业名称代号
|
||||
*/
|
||||
@ApiModelProperty(value = "企业名称代号")
|
||||
private String enNameCode;
|
||||
|
||||
/**
|
||||
* 标准类别代号
|
||||
*/
|
||||
@ApiModelProperty(value = "标准类别代号")
|
||||
private String standardCategoryCode;
|
||||
|
||||
/**
|
||||
* 年代号
|
||||
*/
|
||||
@ApiModelProperty(value = "年代号")
|
||||
private String decadeCode;
|
||||
|
||||
/**
|
||||
* 标准类型
|
||||
*/
|
||||
@ApiModelProperty(value = "标准类型")
|
||||
private String standardType;
|
||||
|
||||
/**
|
||||
* 企标等级分类
|
||||
*/
|
||||
@ApiModelProperty(value = "企标等级分类")
|
||||
private String enStandardClassification;
|
||||
|
||||
/**
|
||||
@@ -202,6 +235,7 @@ public class ProcessEsInitChange implements Serializable {
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "原草稿计划完成日期")
|
||||
private Date originDraftPlannedCompleteDate;
|
||||
|
||||
/**
|
||||
@@ -209,6 +243,7 @@ public class ProcessEsInitChange implements Serializable {
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "原征求意见稿计划完成日期")
|
||||
private Date originSolicitationDraftPlanCompleteDate;
|
||||
|
||||
/**
|
||||
@@ -216,14 +251,15 @@ public class ProcessEsInitChange implements Serializable {
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "原计划报批日期")
|
||||
private Date originPlanApprovalDate;
|
||||
|
||||
|
||||
/**
|
||||
* 草稿计划完成日期
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "草稿计划完成日期")
|
||||
private Date draftPlannedCompleteDate;
|
||||
|
||||
/**
|
||||
@@ -231,6 +267,7 @@ public class ProcessEsInitChange implements Serializable {
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "征求意见稿计划完成日期")
|
||||
private Date solicitationDraftPlanCompleteDate;
|
||||
|
||||
/**
|
||||
@@ -238,81 +275,56 @@ public class ProcessEsInitChange implements Serializable {
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "计划报批日期")
|
||||
private Date planApprovalDate;
|
||||
|
||||
/**
|
||||
* 项目状态
|
||||
*/
|
||||
@ApiModelProperty(value = "项目状态")
|
||||
private String projectStatus;
|
||||
|
||||
/**
|
||||
* 编制说明
|
||||
*/
|
||||
@ApiModelProperty(value = "编制说明")
|
||||
private String compilationDescription;
|
||||
|
||||
/**
|
||||
* 零部件名称
|
||||
*/
|
||||
@ApiModelProperty(value = "零部件名称")
|
||||
private String componentName;
|
||||
|
||||
/**
|
||||
* 主起草人
|
||||
*/
|
||||
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||
@ApiModelProperty(value = "主起草人")
|
||||
private String mainDraftingUser;
|
||||
|
||||
/**
|
||||
* 主起草人
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@JsonProperty("mainDraftingUser_dictText")
|
||||
private String mainDraftingUserDictText;
|
||||
|
||||
/**
|
||||
* 主起草单位
|
||||
*/
|
||||
@Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||
@ApiModelProperty(value = "主起草单位")
|
||||
private String mainDraftingUnit;
|
||||
|
||||
/**
|
||||
* 主起草单位
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@JsonProperty("mainDraftingUnit_dictText")
|
||||
private String mainDraftingUnitDictText;
|
||||
|
||||
/**
|
||||
* 主起草单位责任人
|
||||
*/
|
||||
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||
@ApiModelProperty(value = "主起草单位责任人")
|
||||
private String mainDraftingUnitResponsiblePerson;
|
||||
|
||||
/**
|
||||
* 主起草单位责任人
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@JsonProperty("mainDraftingUnitResponsiblePerson_dictText")
|
||||
private String mainDraftingUnitResponsiblePersonDictText;
|
||||
|
||||
/**
|
||||
* 新主起草单位负责人
|
||||
*/
|
||||
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||
@ApiModelProperty(value = "新主起草单位负责人")
|
||||
private String newMainDraftingUnitResponsiblePerson;
|
||||
|
||||
/**
|
||||
* 标准推进人
|
||||
*/
|
||||
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||
@ApiModelProperty(value = "标准推进人")
|
||||
private String standardPromoter;
|
||||
|
||||
/**
|
||||
* 标准推进人
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@JsonProperty("standardPromoter_dictText")
|
||||
private String standardPromoterDictText;
|
||||
|
||||
/**
|
||||
* 草稿完成日期
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "草稿完成日期")
|
||||
private Date draftCompletionDate;
|
||||
|
||||
/**
|
||||
@@ -320,11 +332,13 @@ public class ProcessEsInitChange implements Serializable {
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "提交草稿日期")
|
||||
private Date draftSubmissionDate;
|
||||
|
||||
/**
|
||||
* 是否征求意见
|
||||
*/
|
||||
@ApiModelProperty(value = "是否征求意见")
|
||||
private String solicitationOpinionEnabled;
|
||||
|
||||
/**
|
||||
@@ -332,6 +346,7 @@ public class ProcessEsInitChange implements Serializable {
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "征求意见稿完成日期")
|
||||
private Date solicitationDraftCompletionDate;
|
||||
|
||||
/**
|
||||
@@ -339,6 +354,7 @@ public class ProcessEsInitChange implements Serializable {
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "评审日期")
|
||||
private Date reviewDate;
|
||||
|
||||
/**
|
||||
@@ -346,6 +362,7 @@ public class ProcessEsInitChange implements Serializable {
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "报批日期")
|
||||
private Date approvalDate;
|
||||
|
||||
/**
|
||||
@@ -353,140 +370,159 @@ public class ProcessEsInitChange implements Serializable {
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "发布日期")
|
||||
private Date releaseDate;
|
||||
|
||||
/**
|
||||
* 变更状态
|
||||
*/
|
||||
@ApiModelProperty(value = "变更状态")
|
||||
private String changeStatus;
|
||||
|
||||
/**
|
||||
* 立项背景、立项依据
|
||||
*/
|
||||
@ApiModelProperty(value = "立项背景、立项依据")
|
||||
private String projectBackground;
|
||||
|
||||
/**
|
||||
* 国际、国家及行业同类标准分析
|
||||
*/
|
||||
@ApiModelProperty(value = "国家及行业同类标准分析")
|
||||
private String similarNaStandardsAnalysis;
|
||||
|
||||
/**
|
||||
* 企业同类标准对比分析
|
||||
*/
|
||||
@ApiModelProperty(value = "企业同类标准对比分析")
|
||||
private String similarEnStandardsAnalysis;
|
||||
|
||||
/**
|
||||
* 立项标准的领先性与必要性
|
||||
*/
|
||||
@ApiModelProperty(value = "立项标准的领先性与必要性")
|
||||
private String standardLeadingNecessity;
|
||||
|
||||
/**
|
||||
* 立项目的及预期效果等
|
||||
*/
|
||||
@ApiModelProperty(value = "立项目的及预期效果等")
|
||||
private String projectExpectedEffects;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 上传附件
|
||||
*/
|
||||
@Dict(dictTable = "oss_file", dicCode = "id", dicText = "file_name")
|
||||
@ApiModelProperty(value = "上传附件")
|
||||
private String uploadAttachment;
|
||||
|
||||
/**
|
||||
* 附件
|
||||
*/
|
||||
@Dict(dictTable = "oss_file", dicCode = "id", dicText = "file_name")
|
||||
@ApiModelProperty(value = "附件")
|
||||
private String attachment;
|
||||
|
||||
/**
|
||||
* 是否为优质标准
|
||||
*/
|
||||
private String qualityFlag;
|
||||
|
||||
/**
|
||||
* 变更原因
|
||||
*/
|
||||
@ApiModelProperty(value = "变更原因")
|
||||
private String changeReason;
|
||||
|
||||
/**
|
||||
* 新主起草人
|
||||
*/
|
||||
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||
@ApiModelProperty(value = "新主起草人")
|
||||
private String newMainDraftingUser;
|
||||
|
||||
/**
|
||||
* 新主起草单位
|
||||
*/
|
||||
@Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||
@ApiModelProperty(value = "新主起草单位")
|
||||
private String newMainDraftingUnit;
|
||||
|
||||
/**
|
||||
* 部所联络人
|
||||
*/
|
||||
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||
@ApiModelProperty(value = "部所联络人")
|
||||
private String contactUser;
|
||||
|
||||
/**
|
||||
* 标准专家
|
||||
*/
|
||||
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||
@ApiModelProperty(value = "标准专家")
|
||||
private String standardExpert;
|
||||
|
||||
/**
|
||||
* 主起草人主管级领导
|
||||
*/
|
||||
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||
@ApiModelProperty(value = "主起草人主管级领导")
|
||||
private String mainDraftUserLeader;
|
||||
|
||||
/**
|
||||
* 主起草人主管级领导
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@JsonProperty("mainDraftingUserLeader_dictText")
|
||||
private String mainDraftUserLeaderDictText;
|
||||
|
||||
/**
|
||||
* 主起草人主管级领导上级领导
|
||||
*/
|
||||
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||
@ApiModelProperty(value = "主起草人主管级领导上级领导")
|
||||
private String mainDraftUserLeaderLeader;
|
||||
|
||||
/**
|
||||
* 主起草人主管级领导上级领导
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
@JsonProperty("mainDraftingUserLeaderLeader_dictText")
|
||||
private String mainDraftUserLeaderLeaderDictText;
|
||||
|
||||
/**
|
||||
* 标准化审批人
|
||||
*/
|
||||
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||
@ApiModelProperty(value = "标准化审批人")
|
||||
private String standardizationApprovalUser;
|
||||
|
||||
/**
|
||||
* 新主起草部门领导的领导
|
||||
*/
|
||||
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||
@ApiModelProperty(value = "新主起草部门领导的领导")
|
||||
private String newMainDraftUserLeaderLeader;
|
||||
|
||||
/**
|
||||
* 新主起草部门领导
|
||||
*/
|
||||
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||
@ApiModelProperty(value = "新主起草部门领导")
|
||||
private String newMainDraftUserLeader;
|
||||
|
||||
/**
|
||||
* 相关人员
|
||||
*/
|
||||
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||
@ApiModelProperty(value = "相关人员")
|
||||
private String relatedUser;
|
||||
|
||||
/**
|
||||
* 抄送人
|
||||
*/
|
||||
@Dict(dictTable = "sys_user", dicCode = "id", dicText = "username")
|
||||
@ApiModelProperty(value = "抄送人")
|
||||
private String copyUser;
|
||||
|
||||
/**
|
||||
* 授权部门
|
||||
*/
|
||||
@Dict(dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||
@ApiModelProperty(value = "授权部门")
|
||||
private String authDept;
|
||||
|
||||
/**
|
||||
* 配合单位
|
||||
*/
|
||||
@ApiModelProperty(value = "配合单位")
|
||||
private String cooperationUnit;
|
||||
|
||||
@TableField(exist = false)
|
||||
|
||||
+1
-61
@@ -97,67 +97,7 @@ public class ProcessEsInitChangeServiceImpl extends ServiceImpl<ProcessEsInitCha
|
||||
LambdaQueryWrapper<ProcessEsInitChange> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(ProcessEsInitChange::getProcessInstanceId, processInstanceId);
|
||||
lambdaQueryWrapper.eq(ProcessEsInitChange::getDelFlag, YesOrNoEnum.NO.getValue());
|
||||
return translateData(list(lambdaQueryWrapper));
|
||||
}
|
||||
|
||||
/**
|
||||
* 手动翻译数据
|
||||
* @return
|
||||
*/
|
||||
private List<ProcessEsInitChange> translateData(List<ProcessEsInitChange> initChangeList) {
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
List<String> departIdList = new ArrayList<>();
|
||||
|
||||
// 制作需要的Id集合
|
||||
for (ProcessEsInitChange initChange : initChangeList) {
|
||||
userIdList.add(initChange.getMainDraftingUser());
|
||||
userIdList.add(initChange.getMainDraftingUnitResponsiblePerson());
|
||||
userIdList.add(initChange.getStandardPromoter());
|
||||
userIdList.add(initChange.getMainDraftUserLeader());
|
||||
userIdList.add(initChange.getMainDraftUserLeaderLeader());
|
||||
departIdList.add(initChange.getMainDraftingUnit());
|
||||
}
|
||||
// 根据Id集合获取所需数据
|
||||
LambdaQueryWrapper<SysUser> userLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
userLambdaQueryWrapper.in(SysUser::getId, userIdList);
|
||||
List<SysUser> userList = sysUserService.list(userLambdaQueryWrapper);
|
||||
// 转成Map
|
||||
Map<String, SysUser> userMap = userList.stream().collect(Collectors.toMap(SysUser::getId, sysUser -> sysUser));
|
||||
|
||||
LambdaQueryWrapper<SysDepart> deptLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
deptLambdaQueryWrapper.in(SysDepart::getId, departIdList);
|
||||
List<SysDepart> departList = sysDepartService.list(deptLambdaQueryWrapper);
|
||||
// 转成Map
|
||||
Map<String, SysDepart> departMap = departList.stream().collect(Collectors.toMap(SysDepart::getId, sysDepart -> sysDepart));
|
||||
|
||||
// 翻译数据
|
||||
for (ProcessEsInitChange initChange : initChangeList) {
|
||||
// 主起草人
|
||||
if (userMap.get(initChange.getMainDraftingUser()) != null) {
|
||||
initChange.setMainDraftingUserDictText(userMap.get(initChange.getMainDraftingUser()).getUsername());
|
||||
}
|
||||
// 起草单位负责人
|
||||
if (userMap.get(initChange.getMainDraftingUnitResponsiblePerson()) != null) {
|
||||
initChange.setMainDraftingUnitResponsiblePersonDictText(userMap.get(initChange.getMainDraftingUnitResponsiblePerson()).getUsername());
|
||||
}
|
||||
// 标准推进人
|
||||
if (userMap.get(initChange.getStandardPromoter()) != null) {
|
||||
initChange.setStandardPromoterDictText(userMap.get(initChange.getStandardPromoter()).getUsername());
|
||||
}
|
||||
// 主起草人上级领导
|
||||
if (userMap.get(initChange.getMainDraftUserLeader()) != null) {
|
||||
initChange.setMainDraftUserLeaderDictText(userMap.get(initChange.getMainDraftUserLeader()).getUsername());
|
||||
}
|
||||
// 主起草用户领导的领导
|
||||
if (userMap.get(initChange.getMainDraftUserLeaderLeader()) != null) {
|
||||
initChange.setMainDraftUserLeaderLeaderDictText(userMap.get(initChange.getMainDraftUserLeaderLeader()).getUsername());
|
||||
}
|
||||
// 主起草单位
|
||||
if (departMap.get(initChange.getMainDraftingUnit()) != null) {
|
||||
initChange.setMainDraftingUnitDictText(departMap.get(initChange.getMainDraftingUnit()).getDepartName());
|
||||
}
|
||||
}
|
||||
return initChangeList;
|
||||
return list(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user