feat(标准解读流程): 导出
This commit is contained in:
+10
@@ -182,6 +182,16 @@ public class StandardInterpretFlowController {
|
||||
return standardInterpretFlowService.importExcelByUnDistribute(request, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 标准解读流程-标准解读流程-导出(标准主解读人不分发)
|
||||
*/
|
||||
@AutoLog(value = "标准解读流程-标准解读流程-导出(标准主解读人不分发)", operateType = CommonConstant.OPERATE_TYPE_6)
|
||||
@ApiOperation(value="标准解读流程-标准解读流程-导出(标准主解读人不分发)", notes="标准解读流程-标准解读流程-导出(标准主解读人不分发)")
|
||||
@GetMapping(value = "/exportExcelByUnDistribute")
|
||||
public ModelAndView exportExcelByUnDistribute(HttpServletRequest request) {
|
||||
return standardInterpretFlowService.exportExcelByUnDistribute(request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 标准解读流程-生成项目id
|
||||
* @return 项目id
|
||||
|
||||
+23
-22
@@ -47,12 +47,28 @@ public class ProcessStandardInterpretClauseSublist extends BaseEntity {
|
||||
private String translation;
|
||||
/**是否与上一版相同(字典:1:是,0:否)*/
|
||||
@ApiModelProperty(value = "是否与上一版相同(字典:1:是,0:否)")
|
||||
@Excel(name = "是否与上一版相同", width = 15)
|
||||
@Excel(name = "是否与上一版相同", width = 15, dicCode = "yn")
|
||||
private String isSameAsPrevVersion;
|
||||
/**变化点说明*/
|
||||
@ApiModelProperty(value = "相对上一版变化点说明")
|
||||
@Excel(name = "相对上一版变化点说明", width = 15)
|
||||
private String changeDescription;
|
||||
/**专业领域*/
|
||||
@ApiModelProperty(value = "专业领域")
|
||||
@Excel(name = "专业领域", width = 15, dicCode = "professional_field")
|
||||
private String domainArea;
|
||||
/**新认证实施日期*/
|
||||
@ApiModelProperty(value = "新认证实施日期")
|
||||
@Excel(name = "新认证实施日期", width = 15)
|
||||
private String newCerImplementDate;
|
||||
/**新生产车实施日期*/
|
||||
@ApiModelProperty(value = "新生产车实施日期")
|
||||
@Excel(name = "新生产车实施日期", width = 15)
|
||||
private String newProductionImplementation;
|
||||
/**注册日期*/
|
||||
@ApiModelProperty(value = "注册日期")
|
||||
@Excel(name = "注册日期", width = 15)
|
||||
private String registrationDate;
|
||||
/**法规注释*/
|
||||
@ApiModelProperty(value = "法规注释")
|
||||
@Excel(name = "法规注释", width = 15)
|
||||
@@ -63,48 +79,33 @@ public class ProcessStandardInterpretClauseSublist extends BaseEntity {
|
||||
private String keywords;
|
||||
/**涉及系统/部件)*/
|
||||
@ApiModelProperty(value = "关键控制器)")
|
||||
@Excel(name = "关键控制器", width = 15)
|
||||
@Excel(name = "关键控制器", width = 15, dicCode = "key_controller")
|
||||
private String keyController;
|
||||
/**责任部门*/
|
||||
@ApiModelProperty(value = "责任部门")
|
||||
@Excel(name = "责任部门", width = 15)
|
||||
@Excel(name = "责任部门", width = 15, dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||
private String responsibleDepartment;
|
||||
/**责任部门专业模块*/
|
||||
@ApiModelProperty(value = "责任部门专业模块")
|
||||
private String responsibleModule;
|
||||
/**关联部门*/
|
||||
@ApiModelProperty(value = "关联部门")
|
||||
@Excel(name = "关联部门", width = 15)
|
||||
@Excel(name = "关联部门", width = 15, dictTable = "sys_depart", dicCode = "id", dicText = "depart_name")
|
||||
private String relatedDepartment;
|
||||
/**关联部门专业模块*/
|
||||
@ApiModelProperty(value = "关联部门专业模块")
|
||||
private String relatedModule;
|
||||
/**适用车型*/
|
||||
@ApiModelProperty(value = "适用车型")
|
||||
@Excel(name = "适用车型", width = 15)
|
||||
@Excel(name = "适用车型", width = 15, dicCode = "applicable_vehicle_type")
|
||||
private String applications;
|
||||
/**动力类型*/
|
||||
@ApiModelProperty(value = "动力类型")
|
||||
@Excel(name = "动力类型", width = 15)
|
||||
@Excel(name = "动力类型", width = 15, dicCode = "dynamic_type")
|
||||
private String powerType;
|
||||
/**专业领域*/
|
||||
@ApiModelProperty(value = "专业领域")
|
||||
@Excel(name = "专业领域", width = 15)
|
||||
private String domainArea;
|
||||
/**配置需求*/
|
||||
@ApiModelProperty(value = "配置需求")
|
||||
private String configurationRequirements;
|
||||
/**新认证实施日期*/
|
||||
@ApiModelProperty(value = "新认证实施日期")
|
||||
@Excel(name = "新认证实施日期", width = 15)
|
||||
private String newCerImplementDate;
|
||||
/**新生产车实施日期*/
|
||||
@ApiModelProperty(value = "新生产车实施日期")
|
||||
private String newProductionImplementation;
|
||||
/**注册日期*/
|
||||
@ApiModelProperty(value = "注册日期")
|
||||
@Excel(name = "注册日期", width = 15)
|
||||
private String registrationDate;
|
||||
/**企业标准*/
|
||||
@ApiModelProperty(value = "企业标准")
|
||||
@Excel(name = "企业标准", width = 15)
|
||||
@@ -143,7 +144,7 @@ public class ProcessStandardInterpretClauseSublist extends BaseEntity {
|
||||
private String otherDocumentsTemplates;
|
||||
/**排查阶段*/
|
||||
@ApiModelProperty(value = "排查阶段")
|
||||
@Excel(name = "排查阶段", width = 15)
|
||||
@Excel(name = "排查阶段", width = 15, dicCode = "investigation_stage")
|
||||
private java.lang.String investigationStage;
|
||||
/**p3*/
|
||||
@ApiModelProperty(value = "p3")
|
||||
|
||||
+7
@@ -113,4 +113,11 @@ public interface StandardInterpretFlowService {
|
||||
* @return
|
||||
*/
|
||||
Result<List<ProcessStandardInterpretClauseSublist>> importExcelByUnDistribute(HttpServletRequest request, HttpServletResponse response) throws Exception;
|
||||
|
||||
/**
|
||||
* 导出(标准主解读人不分发)
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
ModelAndView exportExcelByUnDistribute(HttpServletRequest request);
|
||||
}
|
||||
|
||||
+38
@@ -614,6 +614,44 @@ public class StandardInterpretFlowServiceImpl implements StandardInterpretFlowSe
|
||||
return Result.error("文件导入失败!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAndView exportExcelByUnDistribute(HttpServletRequest request) {
|
||||
// Step.1 组装查询条件
|
||||
ProcessAll processAll = new ProcessAll();
|
||||
processAll.setProjectId(request.getParameter("projectId"));
|
||||
ProcessApprovalRecord processApprovalRecord = new ProcessApprovalRecord();
|
||||
processApprovalRecord.setNodeId(request.getParameter("nodeId"));
|
||||
StandardInterpretDTO standardInterpretDTO = queryBusinessData(processAll, processApprovalRecord);
|
||||
|
||||
// Step.2 获取导出数据
|
||||
List<ProcessStandardInterpretClauseSublist> exportList =
|
||||
standardInterpretDTO.getProcessStandardInterpretClauseSublistList();
|
||||
|
||||
// 过滤选中数据
|
||||
String selections = request.getParameter("selections");
|
||||
if (oConvertUtils.isNotEmpty(selections)) {
|
||||
List<String> selectionList = Arrays.asList(selections.split(","));
|
||||
exportList = exportList.stream()
|
||||
.filter(item -> selectionList.contains(item.getId()))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
// Step.3 AutoPoi 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
try {
|
||||
mv.addObject(JeroController.FILE_NAME, URLEncoder.encode("标准主解读人不分发", "UTF-8"));
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
mv.addObject(JeroController.CLASS, ProcessStandardInterpretClauseSublist.class);
|
||||
//update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置--------------------
|
||||
ExportParams exportParams=new ExportParams(null, "标准主解读人不分发");
|
||||
//update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置----------------------
|
||||
mv.addObject(JeroController.PARAMS,exportParams);
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, exportList);
|
||||
return mv;
|
||||
}
|
||||
|
||||
private List<String> sixthVerify(ProcessStandardInterpretClauseSublist data) {
|
||||
List<String> errorList = new ArrayList<>();
|
||||
String enterpriseStandard = data.getEnterpriseStandard();
|
||||
|
||||
Reference in New Issue
Block a user