Merge remote-tracking branch 'origin/fix_20230609'
# Conflicts: # jero-boot/db/蔚来标准sql/dev_2nd_period.sql # jero-web/src/views/parameter/managementdetails/index.vue
This commit is contained in:
@@ -659,4 +659,6 @@ CREATE TABLE `recent_browse` (
|
||||
`browse_type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '浏览类型',
|
||||
`browse_data_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '浏览数据id',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '最近浏览' ROW_FORMAT = Dynamic;
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '最近浏览' ROW_FORMAT = Dynamic;
|
||||
-- 菜单增加 上报库详情-一般导出权限 2023-06-16 未同步生产环境
|
||||
INSERT INTO `sys_permission` (`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `menu_en`) VALUES ('1669532516277075970', '1552487412749369345', '一般导出', NULL, NULL, NULL, NULL, 2, 'report:detail:export:general', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'admin', '2023-06-16 10:29:05', NULL, NULL, 0, 0, '1', 0, 'General export');
|
||||
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
package com.jero.common.util;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 实体工具类
|
||||
*/
|
||||
public class BeanUtils {
|
||||
/**
|
||||
* 实体对象转Map
|
||||
* @param entity
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public static <T> Map<String, Object> entityToMap(T entity) {
|
||||
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
|
||||
List<Field> fieldList = new ArrayList<>();
|
||||
|
||||
Class<?> clazz = entity.getClass();
|
||||
Field[] fields = clazz.getDeclaredFields();
|
||||
fieldList.addAll(Arrays.asList(fields));
|
||||
|
||||
Field[] superFields = clazz.getSuperclass().getDeclaredFields();
|
||||
fieldList.addAll(Arrays.asList(superFields));
|
||||
|
||||
for (Field field : fieldList) {
|
||||
|
||||
field.setAccessible(true);
|
||||
|
||||
try {
|
||||
|
||||
map.put(field.getName(), field.get(entity));
|
||||
|
||||
} catch (IllegalAccessException e) {
|
||||
|
||||
e.printStackTrace();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return map;
|
||||
|
||||
}
|
||||
}
|
||||
+56
-4
@@ -4486,6 +4486,52 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
List<String> paramsConfigIdList = paramsConfigEOList.stream().map(ParamsConfigEO::getId).collect(Collectors.toList());
|
||||
List<ParamsConfigDataEO> paramsConfigDataEOList = paramsConfigDataEOService.queryListByConfigIdList(paramsConfigIdList); // 查询所有配置数据
|
||||
|
||||
List<Map<String,Object>> exportDataList = new ArrayList<>();
|
||||
// 配置列多行数据处理
|
||||
for (Map<String, Object> data : dataList) {
|
||||
String id = (String) data.get("id");
|
||||
|
||||
Map<String, List<ParamsConfigDataEO>> paramsConfigDataMap = paramsConfigDataEOList.stream().filter(configDataEO -> {
|
||||
boolean flag = false;
|
||||
if (StringUtils.equals(configDataEO.getParamsCollectManifestId(), id)) {
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.groupingBy(configDataEO -> configDataEO.getParamsConfigId()));
|
||||
|
||||
List<Map<String, Object>> paramsConfigDataCountList = new ArrayList<>();
|
||||
|
||||
for (Map.Entry<String, List<ParamsConfigDataEO>> map : paramsConfigDataMap.entrySet()) {
|
||||
Map<String, Object> paramsConfigDataCountMap = new HashMap<>();
|
||||
paramsConfigDataCountMap.put("key", map.getKey());
|
||||
paramsConfigDataCountMap.put("paramsConfigDataCount", map.getValue().size());
|
||||
paramsConfigDataCountMap.put("value", map.getValue());
|
||||
paramsConfigDataCountList.add(paramsConfigDataCountMap);
|
||||
}
|
||||
|
||||
// 排序 配置数据总数倒序排序
|
||||
Collections.sort(paramsConfigDataCountList, new Comparator<Map<String, Object>>() {
|
||||
@Override
|
||||
public int compare(Map<String, Object> o1, Map<String, Object> o2) {
|
||||
return o2.get("paramsConfigDataCount").toString().compareTo(o1.get("paramsConfigDataCount").toString());
|
||||
}
|
||||
});
|
||||
|
||||
// 获取出最多行的配置列。
|
||||
if (!paramsConfigDataCountList.isEmpty()) {
|
||||
Map<String, Object> paramsConfigDataMaxCountMap = paramsConfigDataCountList.get(0);
|
||||
String key = (String) paramsConfigDataMaxCountMap.get("key");
|
||||
List<ParamsConfigDataEO> paramsConfigDataEOs = paramsConfigDataMap.get(key);
|
||||
for (ParamsConfigDataEO paramsConfigDataEO : paramsConfigDataEOs) {
|
||||
Map<String, Object> dataTemp = new HashMap<>();
|
||||
data.entrySet().forEach(o -> dataTemp.put(o.getKey(), o.getValue()));
|
||||
exportDataList.add(dataTemp);
|
||||
}
|
||||
} else {
|
||||
exportDataList.add(data);
|
||||
}
|
||||
}
|
||||
|
||||
List<String> nioNumberList = dataList.stream().map(m -> (String) m.get("nio_number")).collect(Collectors.toList());
|
||||
List<CertCategoryParamsInfoPublishEO> certCategoryParamsInfoPublishEOList = certCategoryParamsInfoPublishEOService.queryListByVersionAndNio(paramsTemplateId, paramsTemplatePublishVersion, nioNumberList); //查询所有认证类别参数项
|
||||
|
||||
@@ -4501,7 +4547,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
Map<String, String> stateMap = CollectManifestStateEnum.toMap(cut);
|
||||
|
||||
// 插入配置列和认证类别列数据
|
||||
for (Map<String, Object> record1 : dataList) {
|
||||
for (Map<String, Object> record1 : exportDataList) {
|
||||
|
||||
String paramsCollectManifestId = (String) record1.get("id");
|
||||
String nioNumber = (String) record1.get("nio_number");
|
||||
@@ -4571,7 +4617,13 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
paramsConfigEOList.forEach(paramsConfigEO -> { // 参数配置
|
||||
|
||||
String paramsConfigId = paramsConfigEO.getId();
|
||||
List<ParamsConfigDataEO> paramsConfigDataEOS = paramsConfigDataEOList.stream().filter(e -> paramsConfigId.equals(e.getParamsConfigId()) && paramsCollectManifestId.equals(e.getParamsCollectManifestId())).collect(Collectors.toList()); // 参数配置数据
|
||||
List<ParamsConfigDataEO> paramsConfigDataEOS = paramsConfigDataEOList.stream().filter(e -> {
|
||||
boolean flag = false;
|
||||
if(StringUtils.equals(paramsConfigId,e.getParamsConfigId()) && StringUtils.equals(paramsCollectManifestId,e.getParamsCollectManifestId())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList()); // 参数配置数据
|
||||
StringBuilder configDataBuilder = new StringBuilder(); // 重新组合配置数据
|
||||
if (CollectionUtil.isNotEmpty(paramsConfigDataEOS)) {
|
||||
ParamsConfigDataEO paramsConfigDataEO = paramsConfigDataEOS.get(0);
|
||||
@@ -4589,7 +4641,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
fileList.addAll(ossFileList);
|
||||
}
|
||||
}
|
||||
|
||||
paramsConfigDataEOList.remove(paramsConfigDataEO);
|
||||
}
|
||||
|
||||
String configData = configDataBuilder.toString();
|
||||
@@ -4603,7 +4655,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
record1.put("fileList", fileList);
|
||||
}
|
||||
}
|
||||
return dataList;
|
||||
return exportDataList;
|
||||
}
|
||||
|
||||
// 导出待填写数据,可以勾选导出
|
||||
|
||||
+9
@@ -213,4 +213,13 @@ public class ParamsReportDetailEOController extends JeroController<ParamsReportD
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "上报库参数项-一般导出")
|
||||
@GetMapping(value = "/exportGeneral")
|
||||
@RequiresPermissions("report:detail:export:general")
|
||||
public void exportGeneral(ParamsReportDetailVO paramsReportDetailVO,
|
||||
HttpServletResponse response,
|
||||
HttpServletRequest request) {
|
||||
this.paramsReportDetailEOService.exportGeneral(paramsReportDetailVO, response, request);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-1
@@ -7,7 +7,8 @@ import java.util.Map;
|
||||
|
||||
public enum ExportTypeEnum {
|
||||
NORMAL("常规导出","1","Normal export"),
|
||||
CUSTOM("自定义导出","2","Custom export");
|
||||
CUSTOM("自定义导出","2","Custom export"),
|
||||
GENERAL("一般导出","3","General export");
|
||||
|
||||
String name;
|
||||
String value;
|
||||
|
||||
+6
@@ -73,4 +73,10 @@ public interface IParamsReportDetailEOService extends IService<ParamsReportDetai
|
||||
|
||||
// 导出参数项历史Log信息
|
||||
void exportParamsReportDetailLog(String cut, XSSFWorkbook workbook, String sheetHistoryName, List<Map<String, Object>> allParamsInfoList, XSSFCellStyle headerCellStyle,XSSFCellStyle bodyCellStyle);
|
||||
|
||||
// 一般导出
|
||||
void exportGeneral(ParamsReportDetailVO paramsReportDetailVO, HttpServletResponse response, HttpServletRequest request);
|
||||
|
||||
// 处理数据
|
||||
void disposeData(List<ParamsReportDetailEO> prdEoList, String cut);
|
||||
}
|
||||
|
||||
+549
-1
@@ -12,6 +12,7 @@ import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.constant.enums.ModuleEnum;
|
||||
import com.jero.common.constant.enums.YesOrNoEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.oss.CosBootUtil;
|
||||
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
||||
@@ -32,7 +33,6 @@ import com.jero.modules.cert.template.enums.ParamsIsMustEnum;
|
||||
import com.jero.modules.ocr.util.LineHumpUtil;
|
||||
import com.jero.modules.oss.entity.OSSFile;
|
||||
import com.jero.modules.oss.service.IOSSFileService;
|
||||
import com.jero.modules.project.entity.ProjectTaskInventoryEO;
|
||||
import com.jero.modules.project.util.Docx4jUtils;
|
||||
import com.jero.modules.project.util.ExcelUtil;
|
||||
import com.jero.modules.project.util.WordUtil;
|
||||
@@ -55,6 +55,7 @@ import org.docx4j.openpackaging.exceptions.Docx4JException;
|
||||
import org.docx4j.openpackaging.packages.SpreadsheetMLPackage;
|
||||
import org.docx4j.openpackaging.packages.WordprocessingMLPackage;
|
||||
import org.docx4j.openpackaging.parts.WordprocessingML.MainDocumentPart;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.mock.web.MockMultipartFile;
|
||||
@@ -112,6 +113,8 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
@Autowired
|
||||
private IParamsReportDetailLogEOService paramsReportDetailLogEOService;
|
||||
|
||||
@Autowired
|
||||
private IReportCertCategoryParamsInfoEOService reportCertCategoryParamsInfoEOService;
|
||||
|
||||
@Value(value = "${jero.path.upload}")
|
||||
private String uploadpath;
|
||||
@@ -2356,4 +2359,549 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
// }
|
||||
// return map;
|
||||
// }
|
||||
|
||||
|
||||
@Override
|
||||
public void exportGeneral(ParamsReportDetailVO paramsReportDetailVO, HttpServletResponse response, HttpServletRequest request) {
|
||||
OutputStream os = null;
|
||||
OutputStream excelOS = null;
|
||||
XSSFWorkbook workbook = new XSSFWorkbook();
|
||||
String fileOriName = "一般导出";
|
||||
if (CutEnum.EN.getValue().equals(paramsReportDetailVO.getCut())) {
|
||||
fileOriName = "general";
|
||||
}
|
||||
if (StringUtils.isNotEmpty(paramsReportDetailVO.getExportName())) {
|
||||
fileOriName = paramsReportDetailVO.getExportName();
|
||||
}
|
||||
//创建临时文件夹
|
||||
String fileNowPath = uploadpath + "/tempZip/" + UUID.randomUUID().toString().replace("-", "") + File.separator + fileOriName;
|
||||
File nowFile = new File(fileNowPath);
|
||||
if (nowFile.exists()) {
|
||||
nowFile.delete();
|
||||
}
|
||||
nowFile.mkdirs();
|
||||
try {
|
||||
String fileName = fileOriName + ".xlsx";
|
||||
// 设置表格相关属性
|
||||
String sheetName = "参数项信息";
|
||||
if (CutEnum.EN.getValue().equals(paramsReportDetailVO.getCut())) {
|
||||
sheetName = "Params data";
|
||||
}
|
||||
XSSFSheet sheetItems = workbook.createSheet(sheetName);
|
||||
String[] titles = this.getWorkbookTitleForExportGeneral(paramsReportDetailVO); // 获取表头
|
||||
|
||||
String[] headers = titles[1].split(",");
|
||||
XSSFCellStyle cellStyle = workbook.createCellStyle();
|
||||
cellStyle.setWrapText(true);
|
||||
cellStyle.setVerticalAlignment(XSSFCellStyle.VERTICAL_CENTER);
|
||||
XSSFCellStyle cellStyle1 = workbook.createCellStyle();
|
||||
cellStyle1.setAlignment(XSSFCellStyle.ALIGN_CENTER);
|
||||
XSSFCellStyle cellStyleLink = workbook.createCellStyle();
|
||||
XSSFFont font = workbook.createFont();
|
||||
font.setColor(HSSFColor.LIGHT_BLUE.index);
|
||||
cellStyleLink.setFont(font);
|
||||
cellStyleLink.setWrapText(true);
|
||||
|
||||
// 查询需要导出的字段
|
||||
String field = titles[0]; // 字符串形式
|
||||
List<String> fieldList = Arrays.asList(field.split(",")); // list形式
|
||||
|
||||
// 查询导出数据
|
||||
List<Map<String, Object>> allParamsInfoList = this.queryForExportGeneral(paramsReportDetailVO, request);
|
||||
|
||||
// 开始处理工作表
|
||||
List<OSSFile> allRelevFileList = new ArrayList<>();
|
||||
|
||||
// 在excel表中添加表头
|
||||
XSSFRow row = sheetItems.createRow(0);
|
||||
for (int i = 0; i < headers.length; i++) {
|
||||
XSSFCell cell = row.createCell(i);
|
||||
XSSFRichTextString text = new XSSFRichTextString(headers[i]);
|
||||
cell.setCellValue(text);
|
||||
cell.setCellStyle(cellStyle1);
|
||||
// 设置单元格宽度
|
||||
String ParamsValues = "参数值";
|
||||
if (CutEnum.EN.getValue().equals(paramsReportDetailVO.getCut())) {
|
||||
ParamsValues = "Params Values";
|
||||
}
|
||||
if (ParamsValues.equals(headers[i])) {
|
||||
sheetItems.setColumnWidth(i, 80 * 256);
|
||||
} else {
|
||||
sheetItems.setColumnWidth(i, 20 * 256);
|
||||
}
|
||||
}
|
||||
//放文字内容
|
||||
int allRow = 0;
|
||||
for (int rowNum = 0; rowNum < allParamsInfoList.size(); rowNum++) {
|
||||
Map<String, Object> exportDto = allParamsInfoList.get(rowNum);
|
||||
|
||||
// 处理文件
|
||||
List<OSSFile> fileList = (List<OSSFile>) exportDto.get("fileList");
|
||||
if (CollectionUtil.isNotEmpty(fileList)) {
|
||||
allRelevFileList.addAll(fileList);
|
||||
}
|
||||
|
||||
allRow++;
|
||||
XSSFRow row1 = sheetItems.createRow(allRow);
|
||||
for (int cellNum = 0; cellNum < fieldList.size(); cellNum++) {
|
||||
if (ObjectUtils.isNotEmpty(exportDto.get(fieldList.get(cellNum)))) {
|
||||
row1.createCell(cellNum).setCellValue(exportDto.get(fieldList.get(cellNum)).toString());
|
||||
row1.getCell(cellNum).setCellStyle(cellStyle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//下载关联文件内容
|
||||
if (allRelevFileList != null && !allRelevFileList.isEmpty()) {
|
||||
allRelevFileList = allRelevFileList.stream().distinct().collect(Collectors.toList());
|
||||
String exportFile = "导出文件";
|
||||
if (CutEnum.EN.getValue().equals(paramsReportDetailVO.getCut())) {
|
||||
exportFile = "Export file";
|
||||
}
|
||||
this.downLoadFileList(allRelevFileList, fileNowPath + File.separator + exportFile);
|
||||
}
|
||||
|
||||
String repFileName = fileName.replaceAll("/", "_");
|
||||
excelOS = new FileOutputStream(fileNowPath + File.separator + repFileName);
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment; filename=\"" + ReadExcel.encodeFileName(fileOriName + ".zip", request) + "\"");
|
||||
response.setContentType("application/force-download");
|
||||
response.flushBuffer();
|
||||
os = response.getOutputStream();
|
||||
workbook.write(excelOS);
|
||||
excelOS.flush();
|
||||
excelOS.close();
|
||||
ZipUtil.zip(fileNowPath, fileNowPath + ".zip");
|
||||
FileInputStream fis = new FileInputStream(fileNowPath + ".zip");
|
||||
int len = 0;
|
||||
while ((len = fis.read()) != -1) {
|
||||
os.write(len);
|
||||
}
|
||||
|
||||
// 添加导出历史
|
||||
String uploadFileName = fileOriName + ".zip";
|
||||
InputStream uploadFileio = new FileInputStream(new File(fileNowPath + ".zip"));
|
||||
MultipartFile mFile = new MockMultipartFile(uploadFileName, uploadFileName, "text/plain", uploadFileio); // 用于上传
|
||||
OSSFile ossFile = ossFileService.uploadLocalOfCos(mFile, "/report", "", CutEnum.CN.getValue()); // 上传导出的压缩包
|
||||
ParamsReportExportHistoryEO paramsReportExportHistoryEO = new ParamsReportExportHistoryEO();
|
||||
paramsReportExportHistoryEO.setExportType(ExportTypeEnum.GENERAL.getValue());
|
||||
paramsReportExportHistoryEO.setExportFileId(ossFile.getId());
|
||||
paramsReportExportHistoryEO.setParamsManifestId(paramsReportDetailVO.getParamsManifestId());
|
||||
paramsReportExportHistoryEO.setExportTime(new Date());
|
||||
paramsReportExportHistoryEOService.add(paramsReportExportHistoryEO);
|
||||
|
||||
uploadFileio.close();
|
||||
os.flush();
|
||||
os.close(); // 后开先关
|
||||
fis.close(); // 先开后关
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error(e.getMessage(), e);
|
||||
if (CutEnum.EN.getValue().equals(paramsReportDetailVO.getCut())) {
|
||||
throw new JeroBootException("Failed to download file, please try again");
|
||||
} else {
|
||||
throw new JeroBootException("下载文件失败,请重试");
|
||||
}
|
||||
} finally {
|
||||
IOUtils.closeQuietly(os);
|
||||
IOUtils.closeQuietly(excelOS);
|
||||
File tempZipFile = new File(uploadpath + "/tempZip");
|
||||
FileUtil.deleteContents(tempZipFile);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disposeData(List<ParamsReportDetailEO> datas, String cut) {
|
||||
if (CollectionUtils.isNotEmpty(datas)) {
|
||||
// 普通数据字典
|
||||
List<SysDictItem> dictItemList = new ArrayList<>();
|
||||
List<String> dictCodeList = new ArrayList<>();
|
||||
dictCodeList.add("duty_territory");
|
||||
dictCodeList.add("cert_category");
|
||||
for (String dictCode : dictCodeList) {
|
||||
List<SysDictItem> dictItems = sysDictItemService.selectItemsByDictCode(dictCode);
|
||||
dictItemList.addAll(dictItems);
|
||||
}
|
||||
|
||||
for (ParamsReportDetailEO data : datas) {
|
||||
// 处理数据字典字段 中英文切换 认证类型,责任领域
|
||||
List<String> certCategory = Arrays.asList(data.getCertCategory().split(","));
|
||||
List<String> dutyTerritory = Arrays.asList(data.getDutyTerritory().split(","));
|
||||
String certCategoryName = "";
|
||||
String dutyTerritoryName = "";
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
certCategoryName = dictItemList.stream()
|
||||
.filter(e -> certCategory.contains(e.getItemValue()))
|
||||
.map(SysDictItem::getItemText)
|
||||
.collect(Collectors.joining(","));
|
||||
|
||||
dutyTerritoryName = dictItemList.stream()
|
||||
.filter(e -> dutyTerritory.contains(e.getItemValue()))
|
||||
.map(SysDictItem::getItemText)
|
||||
.collect(Collectors.joining(","));
|
||||
|
||||
} else if (CutEnum.EN.getValue().equals(cut)) {
|
||||
certCategoryName = dictItemList.stream()
|
||||
.filter(e -> certCategory.contains(e.getItemValue()))
|
||||
.map(SysDictItem::getEnName)
|
||||
.collect(Collectors.joining(","));
|
||||
|
||||
dutyTerritoryName = dictItemList.stream()
|
||||
.filter(e -> dutyTerritory.contains(e.getItemValue()))
|
||||
.map(SysDictItem::getEnName)
|
||||
.collect(Collectors.joining(","));
|
||||
|
||||
}
|
||||
data.setCertCategory(certCategoryName);
|
||||
data.setDutyTerritory(dutyTerritoryName);
|
||||
|
||||
data.setIsMust(ParamsIsMustEnum.getTextByValue(data.getIsMust(),cut));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private List<Map<String, Object>> queryForExportGeneral(ParamsReportDetailVO paramsReportDetailVO,HttpServletRequest req) throws IOException {
|
||||
List<Map<String, Object>> result = new ArrayList<>();
|
||||
|
||||
ParamsReportDetailEO paramsReportDetailEO = new ParamsReportDetailEO();
|
||||
BeanUtils.copyProperties(paramsReportDetailVO, paramsReportDetailEO);
|
||||
String certCategorys = paramsReportDetailEO.getCertCategory();
|
||||
if (StringUtils.isNotEmpty(paramsReportDetailEO.getCertCategory())) {
|
||||
paramsReportDetailEO.setCertCategory(null);
|
||||
}
|
||||
|
||||
QueryWrapper<ParamsReportDetailEO> queryWrapper = QueryGenerator.initQueryWrapper(paramsReportDetailEO, req.getParameterMap());
|
||||
|
||||
if (StringUtils.isNotEmpty(certCategorys)) {
|
||||
queryWrapper.and(query -> {
|
||||
query.lambda().like(ParamsReportDetailEO::getCertCategory, certCategorys);
|
||||
if (StringUtils.contains(certCategorys, ",")) {
|
||||
String[] certCategoryArr = certCategorys.split(",");
|
||||
for (String certCategory : certCategoryArr) {
|
||||
query.or().lambda().like(ParamsReportDetailEO::getCertCategory, certCategory);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
if (StringUtils.isNotEmpty(paramsReportDetailVO.getAllNumber())) {
|
||||
QueryWrapper<ReportCertCategoryParamsInfoEO> rccpiQueryWrap = new QueryWrapper<>();
|
||||
rccpiQueryWrap.lambda().eq(ReportCertCategoryParamsInfoEO::getParamsNumber, paramsReportDetailVO.getAllNumber());
|
||||
List<ReportCertCategoryParamsInfoEO> rccpiEoList = this.reportCertCategoryParamsInfoEOService.list(rccpiQueryWrap);
|
||||
queryWrapper.and(query -> {
|
||||
query.lambda().eq(ParamsReportDetailEO::getNioNumber, paramsReportDetailVO.getAllNumber());
|
||||
if (CollectionUtils.isNotEmpty(rccpiEoList)) {
|
||||
List<String> nioNumbers = rccpiEoList.stream().map(ReportCertCategoryParamsInfoEO::getNioNumber).distinct().collect(Collectors.toList());
|
||||
query.or().lambda().in(ParamsReportDetailEO::getNioNumber, nioNumbers);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (StringUtils.isNotEmpty(paramsReportDetailVO.getIds())) {
|
||||
queryWrapper.lambda().in(ParamsReportDetailEO::getId, Arrays.asList(paramsReportDetailVO.getIds().split(",")));
|
||||
}
|
||||
queryWrapper.orderByDesc("sync_time").orderByAsc("nio_number");
|
||||
|
||||
List<ParamsReportDetailEO> prdEoList = this.list(queryWrapper);
|
||||
this.disposeData(prdEoList, paramsReportDetailVO.getCut());
|
||||
|
||||
List<ParamsReportDetailEO> exportDataList = new ArrayList<>();
|
||||
if (CollectionUtils.isNotEmpty(prdEoList)) {
|
||||
QueryWrapper<ParamsReportConfigEO> prcQueryWrap = new QueryWrapper<>();
|
||||
prcQueryWrap.lambda().eq(ParamsReportConfigEO::getParamsManifestId, paramsReportDetailVO.getParamsManifestId());
|
||||
List<ParamsReportConfigEO> prcEoList = this.paramsReportConfigEOService.list(prcQueryWrap);
|
||||
|
||||
List<String> prcIdList = prcEoList.stream().map(ParamsReportConfigEO::getId).distinct().collect(Collectors.toList());
|
||||
List<ParamsReportConfigDataEO> prcdEoList = this.paramsReportConfigDataEOService.queryListByConfigIdList(prcIdList);
|
||||
|
||||
for (ParamsReportDetailEO prdEo : prdEoList) {
|
||||
// 配置列多行数据处理
|
||||
String id = prdEo.getId();
|
||||
|
||||
if (CollectionUtils.isNotEmpty(prcdEoList)) {
|
||||
Map<String, List<ParamsReportConfigDataEO>> paramsConfigDataMap = prcdEoList.stream().filter(configDataEO -> {
|
||||
boolean flag = false;
|
||||
if (StringUtils.equals(configDataEO.getParamsCollectManifestId(), id)) {
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.groupingBy(configDataEO -> configDataEO.getParamsConfigId()));
|
||||
|
||||
List<Map<String, Object>> paramsConfigDataCountList = new ArrayList<>();
|
||||
|
||||
for (Map.Entry<String, List<ParamsReportConfigDataEO>> map : paramsConfigDataMap.entrySet()) {
|
||||
Map<String, Object> paramsConfigDataCountMap = new HashMap<>();
|
||||
paramsConfigDataCountMap.put("key", map.getKey());
|
||||
paramsConfigDataCountMap.put("paramsConfigDataCount", map.getValue().size());
|
||||
paramsConfigDataCountMap.put("value", map.getValue());
|
||||
paramsConfigDataCountList.add(paramsConfigDataCountMap);
|
||||
}
|
||||
|
||||
// 排序 配置数据总数倒序排序
|
||||
Collections.sort(paramsConfigDataCountList, new Comparator<Map<String, Object>>() {
|
||||
@Override
|
||||
public int compare(Map<String, Object> o1, Map<String, Object> o2) {
|
||||
return o2.get("paramsConfigDataCount").toString().compareTo(o1.get("paramsConfigDataCount").toString());
|
||||
}
|
||||
});
|
||||
|
||||
// 获取出最多行的配置列。
|
||||
if (!paramsConfigDataCountList.isEmpty()) {
|
||||
Map<String, Object> paramsConfigDataMaxCountMap = paramsConfigDataCountList.get(0);
|
||||
String key = (String) paramsConfigDataMaxCountMap.get("key");
|
||||
List<ParamsReportConfigDataEO> paramsConfigDataEOs = paramsConfigDataMap.get(key);
|
||||
for (ParamsReportConfigDataEO paramsConfigDataEO : paramsConfigDataEOs) {
|
||||
ParamsReportDetailEO ParamsReportDetailEO = new ParamsReportDetailEO();
|
||||
BeanUtils.copyProperties(prdEo, ParamsReportDetailEO);
|
||||
exportDataList.add(ParamsReportDetailEO);
|
||||
}
|
||||
} else {
|
||||
exportDataList.add(prdEo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (CollectionUtils.isNotEmpty(exportDataList)) {
|
||||
// 排除的数据数组 等于将数组中的数据逻辑删除。
|
||||
List<String> excludePrcdIdList = new ArrayList<>();
|
||||
|
||||
for (ParamsReportDetailEO prdEo : exportDataList) {
|
||||
Map<String, Object> prdEoMap = com.jero.common.util.BeanUtils.entityToMap(prdEo);
|
||||
String paramsCollectManifestId = prdEo.getId();
|
||||
String controlType = prdEo.getControlType();
|
||||
String nioNumber = prdEo.getNioNumber();
|
||||
|
||||
// 配置列
|
||||
if (CollectionUtil.isNotEmpty(prcEoList)) {
|
||||
List<OSSFile> fileList = new ArrayList<>();
|
||||
|
||||
prcEoList.forEach(prcEo -> { // 参数配置
|
||||
|
||||
String prcEoId = prcEo.getId();
|
||||
// 参数配置数据
|
||||
List<ParamsReportConfigDataEO> prcdEos = prcdEoList.stream().filter(e -> {
|
||||
boolean flag = false;
|
||||
if (StringUtils.equals(prcEoId, e.getParamsConfigId()) && paramsCollectManifestId.equals(e.getParamsCollectManifestId())) {
|
||||
if (!excludePrcdIdList.contains(e.getId())) {
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
StringBuilder configDataBuilder = new StringBuilder(); // 重新组合配置数据
|
||||
if (CollectionUtil.isNotEmpty(prcdEos)) {
|
||||
ParamsReportConfigDataEO prcdEo = prcdEos.get(0);
|
||||
|
||||
if (ControlTypeEnum.TEXT.getValue().equals(controlType)) {
|
||||
if (StringUtils.isNotEmpty(prcdEo.getTextData())) {
|
||||
configDataBuilder.append(prcdEo.getTextData());
|
||||
}
|
||||
|
||||
} else if (ControlTypeEnum.PULL_SINGLE.getValue().equals(controlType)
|
||||
|| ControlTypeEnum.PULL_MORE.getValue().equals(controlType)) {
|
||||
if (StringUtils.isNotEmpty(prcdEo.getPullData())) {
|
||||
configDataBuilder.append(prcdEo.getPullData().replaceAll(",", "!"));
|
||||
}
|
||||
|
||||
} else if (ControlTypeEnum.FILE.getValue().equals(controlType)) {
|
||||
if (StringUtils.isNotEmpty(prcdEo.getFileConnectId())) {
|
||||
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(prcdEo.getFileConnectId());
|
||||
if (CollectionUtil.isNotEmpty(ossFileList)) {
|
||||
configDataBuilder.append(nioNumber).append("/").append(ossFileList.get(0).getFileName());
|
||||
|
||||
fileList.addAll(ossFileList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else if (ControlTypeEnum.TEXT_PULL_SINGLE.getValue().equals(controlType)
|
||||
|| ControlTypeEnum.TEXT_PULL_MORE.getValue().equals(controlType)) {
|
||||
|
||||
if (StringUtils.isNotEmpty(prcdEo.getTextData())) {
|
||||
configDataBuilder.append(prcdEo.getTextData());
|
||||
}
|
||||
|
||||
configDataBuilder.append("#");
|
||||
|
||||
if (StringUtils.isNotEmpty(prcdEo.getPullData())) {
|
||||
configDataBuilder.append(prcdEo.getPullData().replaceAll(",", "!"));
|
||||
}
|
||||
|
||||
} else if (ControlTypeEnum.TEXT_FILE.getValue().equals(controlType)) {
|
||||
if (StringUtils.isNotEmpty(prcdEo.getTextData())) {
|
||||
configDataBuilder.append(prcdEo.getTextData());
|
||||
}
|
||||
|
||||
configDataBuilder.append("#");
|
||||
if (StringUtils.isNotEmpty(prcdEo.getFileConnectId())) {
|
||||
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(prcdEo.getFileConnectId());
|
||||
if (CollectionUtil.isNotEmpty(ossFileList)) {
|
||||
configDataBuilder.append(nioNumber).append("/").append(ossFileList.get(0).getFileName());
|
||||
|
||||
fileList.addAll(ossFileList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else if (ControlTypeEnum.PULL_SINGLE_FILE.getValue().equals(controlType)
|
||||
|| ControlTypeEnum.PULL_MORE_FILE.getValue().equals(controlType)) {
|
||||
if (StringUtils.isNotEmpty(prcdEo.getPullData())) {
|
||||
configDataBuilder.append(prcdEo.getPullData().replaceAll(",", "!"));
|
||||
}
|
||||
|
||||
configDataBuilder.append("#");
|
||||
if (StringUtils.isNotEmpty(prcdEo.getFileConnectId())) {
|
||||
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(prcdEo.getFileConnectId());
|
||||
if (CollectionUtil.isNotEmpty(ossFileList)) {
|
||||
configDataBuilder.append(nioNumber).append("/").append(ossFileList.get(0).getFileName());
|
||||
|
||||
fileList.addAll(ossFileList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else if (ControlTypeEnum.TEXT_PULL_SINGLE_FILE.getValue().equals(controlType)) {
|
||||
if (StringUtils.isNotEmpty(prcdEo.getTextData())) {
|
||||
configDataBuilder.append(prcdEo.getTextData());
|
||||
}
|
||||
configDataBuilder.append("#");
|
||||
if (StringUtils.isNotEmpty(prcdEo.getPullData())) {
|
||||
configDataBuilder.append(prcdEo.getPullData().replaceAll(",", "!"));
|
||||
}
|
||||
configDataBuilder.append("#");
|
||||
if (StringUtils.isNotEmpty(prcdEo.getFileConnectId())) {
|
||||
List<OSSFile> ossFileList = ossFileService.getFileInfosByConnectId(prcdEo.getFileConnectId());
|
||||
if (CollectionUtil.isNotEmpty(ossFileList)) {
|
||||
configDataBuilder.append(nioNumber).append("/").append(ossFileList.get(0).getFileName());
|
||||
|
||||
fileList.addAll(ossFileList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
// prcdEoList.remove(prcdEo);
|
||||
excludePrcdIdList.add(prcdEo.getId());
|
||||
}
|
||||
|
||||
String configData = configDataBuilder.toString();
|
||||
if (StringUtils.isNotEmpty(configData) && "".equals(configData.replace("#", ""))) {
|
||||
configData = configData.replace("#", "");
|
||||
}
|
||||
|
||||
prdEoMap.put(prcEo.getId(), configData);
|
||||
});
|
||||
|
||||
prdEoMap.put("fileList", fileList);
|
||||
}
|
||||
result.add(prdEoMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
private String[] getWorkbookTitleForExportGeneral(ParamsReportDetailVO paramsReportDetailVO) {
|
||||
String cut = paramsReportDetailVO.getCut();
|
||||
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(ModuleEnum.PARAMS_REPORT_DETAIL.getValue());
|
||||
|
||||
List<String> dbFieldNameList = new ArrayList<>();
|
||||
List<String> dbFieldList = new ArrayList<>();
|
||||
|
||||
if (fieldList.size() != 0) {
|
||||
//过滤列表字段(is_show_list-->列表是否显示0否 1是)
|
||||
fieldList = fieldList.stream().filter(e -> YesOrNoEnum.YES.getValue().equals(String.valueOf(e.getIsShowList()))).collect(Collectors.toList());
|
||||
|
||||
// 设置排序字段,将字段重新排序
|
||||
for (OnlCgformField onlCgformField : fieldList) {
|
||||
String dbFieldName = this.fieldConvert(onlCgformField.getDbFieldName());
|
||||
if (StringUtils.isNotEmpty(dbFieldName)) {
|
||||
Integer fieldIndex = this.getFieldIndex(dbFieldName);
|
||||
|
||||
onlCgformField.setOrderNum(fieldIndex);
|
||||
}
|
||||
}
|
||||
|
||||
// 重新排序
|
||||
fieldList = fieldList.stream().sorted(Comparator.comparingInt(o -> o.getOrderNum())).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
// 固定列
|
||||
for (int i = 0; i < fieldList.size(); i++) {
|
||||
OnlCgformField onlCgformField = fieldList.get(i);
|
||||
String dbFieldName = this.fieldConvert(onlCgformField.getDbFieldName());
|
||||
if (StringUtils.isNotEmpty(dbFieldName)) {
|
||||
dbFieldList.add(dbFieldName);
|
||||
if (CutEnum.CN.getValue().equals(cut)) {
|
||||
dbFieldNameList.add(onlCgformField.getDbFieldTxt()); // 字段中文名
|
||||
} else {
|
||||
dbFieldNameList.add(onlCgformField.getDbFieldEnName()); // 字段英文名
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 配置列
|
||||
QueryWrapper<ParamsReportConfigEO> queryWrap = new QueryWrapper<>();
|
||||
queryWrap.lambda().in(ParamsReportConfigEO::getParamsManifestId, paramsReportDetailVO.getParamsManifestId());
|
||||
queryWrap.lambda().orderByAsc(ParamsReportConfigEO::getDisplaySeq);
|
||||
List<ParamsReportConfigEO> paramsReportConfigEOList = this.paramsReportConfigEOService.list(queryWrap);
|
||||
if (CollectionUtil.isNotEmpty(paramsReportConfigEOList)) {
|
||||
for (ParamsReportConfigEO paramsReportConfigEO : paramsReportConfigEOList) {
|
||||
dbFieldList.add(paramsReportConfigEO.getId());
|
||||
dbFieldNameList.add(paramsReportConfigEO.getConfigName());
|
||||
}
|
||||
}
|
||||
|
||||
String[] title = new String[2];
|
||||
String dbFieldStr = StringUtils.join(dbFieldList, ",");
|
||||
String dbFieldNameStr = StringUtils.join(dbFieldNameList, ",");
|
||||
|
||||
title[0] = dbFieldStr;
|
||||
title[1] = dbFieldNameStr;
|
||||
return title;
|
||||
}
|
||||
|
||||
private String fieldConvert(String field) {
|
||||
if (field == null) {
|
||||
return null;
|
||||
}
|
||||
switch (field) {
|
||||
case "nio_number":
|
||||
return "nioNumber";
|
||||
case "params_name":
|
||||
return "paramsName";
|
||||
case "cert_category":
|
||||
return "certCategory";
|
||||
case "is_must":
|
||||
return "isMust";
|
||||
case "description":
|
||||
return "description";
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字段的下标,字段在excel表格中占据第几列
|
||||
* @param field
|
||||
* @return
|
||||
*/
|
||||
private Integer getFieldIndex(String field) {
|
||||
if (field == null) {
|
||||
return null;
|
||||
}
|
||||
switch (field) {
|
||||
case "nioNumber":
|
||||
return 1;
|
||||
case "paramsName":
|
||||
return 2;
|
||||
case "certCategory":
|
||||
return 3;
|
||||
case "isMust":
|
||||
return 4;
|
||||
case "description":
|
||||
return 5;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+16
@@ -1,6 +1,7 @@
|
||||
package com.jero.modules.cert.template.enums;
|
||||
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@@ -76,4 +77,19 @@ public enum ParamsIsMustEnum {
|
||||
return map;
|
||||
}
|
||||
|
||||
public static String getTextByValue(String value,String cut){
|
||||
String result = "";
|
||||
ParamsIsMustEnum[] paramsIsMustEnums = ParamsIsMustEnum.values();
|
||||
for (ParamsIsMustEnum paramsIsMustEnum : paramsIsMustEnums) {
|
||||
if(StringUtils.equals(value,paramsIsMustEnum.value)){
|
||||
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
result = paramsIsMustEnum.name;
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
result = paramsIsMustEnum.enName;
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
@@ -148,6 +148,7 @@
|
||||
left join cert_category_params_info ccpi on (pi.nio_number = ccpi.nio_number and pi.params_template_id = ccpi.params_template_id)
|
||||
) tmp_tb
|
||||
<include refid="BaseQuerySql"/>
|
||||
order by tmp_tb.nio_number asc
|
||||
</select>
|
||||
|
||||
<select id="selectListWithCertForEnExport" resultMap="ParamsInfoEOResultMapWithCertForEnExport" parameterType="com.jero.modules.cert.template.vo.ParamsInfoVO">
|
||||
@@ -158,6 +159,7 @@
|
||||
left join cert_category_params_info ccpi on (pi.nio_number = ccpi.nio_number and pi.params_template_id = ccpi.params_template_id)
|
||||
) tmp_tb
|
||||
<include refid="BaseQuerySql"/>
|
||||
order by tmp_tb.nio_number asc
|
||||
</select>
|
||||
|
||||
<select id="selectListByParamsTemplateIds" resultMap="ParamsInfoEOResultMap" parameterType="java.lang.String">
|
||||
|
||||
+27
-11
@@ -926,7 +926,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
}
|
||||
|
||||
String regulationOwnerId = projectLawsInventoryOld.getRegulationOwnerId();
|
||||
// 给法规工程师发消息
|
||||
// 给设计符合性-责任人发消息
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("contentCn", "您好,您以下任务已被发起人撤回。");
|
||||
params.put("contentEn", "Hello! Your task has been withdrawn by the initiator.");
|
||||
@@ -934,6 +934,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
params.put("endTime", endTime);
|
||||
params.put("userIdList", Arrays.asList(projectLawsInventoryOld.getDesignDutyId().split(",")));
|
||||
params.put("serialNumbers", projectLawsInventoryOld.getSerialNumber());
|
||||
params.put("flowTypeCn","设计符合性流程");
|
||||
params.put("flowTypeEn","Design Compliance Process");
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLawsInventoryEO.getProjectLibraryId());
|
||||
if (ObjectUtils.isNotEmpty(projectLibraryBase)) {
|
||||
@@ -950,7 +952,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
String regulationOwnerUserName = this.sysUserService.getUsernameByUserId(regulationOwnerUserList, regulationOwnerId);
|
||||
params.put("Initiator", regulationOwnerUserName);
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION1.getValue(), params);
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION4.getValue(), params);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -968,7 +970,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
}
|
||||
|
||||
String regulationOwnerId = projectLawsInventoryOld.getRegulationOwnerId();
|
||||
// 给法规工程师发消息
|
||||
// 给设计符合性-责任人发消息
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("contentCn", "您好,您以下任务已被发起人撤回。");
|
||||
params.put("contentEn", "Hello! Your task has been withdrawn by the initiator.");
|
||||
@@ -976,6 +978,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
params.put("endTime", endTime);
|
||||
params.put("userIdList", Arrays.asList(projectLawsInventoryOld.getDesignDutyId().split(",")));
|
||||
params.put("serialNumbers", projectLawsInventoryOld.getSerialNumber());
|
||||
params.put("flowTypeCn","设计符合性流程");
|
||||
params.put("flowTypeEn","Design Compliance Process");
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLawsInventoryEO.getProjectLibraryId());
|
||||
if (ObjectUtils.isNotEmpty(projectLibraryBase)) {
|
||||
@@ -992,7 +996,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
String regulationOwnerUserName = this.sysUserService.getUsernameByUserId(regulationOwnerUserList, regulationOwnerId);
|
||||
params.put("Initiator", regulationOwnerUserName);
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION1.getValue(), params);
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION4.getValue(), params);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10680,7 +10684,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
String serialNumbers = lawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getSerialNumber).distinct().collect(Collectors.joining(","));
|
||||
|
||||
List<String> userIdList = Arrays.asList(verifyDutyId.split(","));
|
||||
// 给设计符合性流程责任人发消息
|
||||
// 给验证符合性流程责任人发消息
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("contentCn", "您好,请及时查看确认以下任务要求,谢谢!");
|
||||
params.put("contentEn", "Hello! Please check and confirm the following task requirement in a timely manner. Thank you!");
|
||||
@@ -10688,6 +10692,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
params.put("endTime", endTime);
|
||||
params.put("userIdList", userIdList);
|
||||
params.put("serialNumbers", serialNumbers);
|
||||
params.put("flowTypeCn","验证符合性流程");
|
||||
params.put("flowTypeEn","Validation Compliance Process");
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
if (ObjectUtils.isNotEmpty(projectLibraryBase)) {
|
||||
@@ -10706,7 +10712,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
String regulationOwnerUserName = this.sysUserService.getUsernameByUserId(regulationOwnerUserList, regulationOwnerId);
|
||||
params.put("Initiator", regulationOwnerUserName);
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION1.getValue(), params);
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION4.getValue(), params);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10942,6 +10948,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
params.put("endTime", endTime);
|
||||
params.put("userIdList", userIdList);
|
||||
params.put("serialNumbers", serialNumbers);
|
||||
params.put("flowTypeCn","设计符合性流程");
|
||||
params.put("flowTypeEn","Design Compliance Process");
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = this.projectLibraryBaseService.selectById(projectLibraryId);
|
||||
if (ObjectUtils.isNotEmpty(projectLibraryBase)) {
|
||||
@@ -10960,7 +10968,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
String regulationOwnerUserName = this.sysUserService.getUsernameByUserId(regulationOwnerUserList, regulationOwnerId);
|
||||
params.put("Initiator", regulationOwnerUserName);
|
||||
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION1.getValue(), params);
|
||||
this.sendMessageByTemplateId(TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION4.getValue(), params);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12909,6 +12917,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
if (CollectionUtils.isNotEmpty(pliEoListTemp)) {
|
||||
ProjectLawsInventoryEO pliEoTemp = pliEoListTemp.get(0);
|
||||
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
|
||||
String endTime = "";
|
||||
String contentCn = "";
|
||||
String contentEn = "";
|
||||
@@ -12916,9 +12926,12 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
String taskDefinitionKey = pidEo.getTaskDefinitionKey();
|
||||
if (StringUtils.equals(taskDefinitionKey, DesignComplianceFlowNodeKeyEnum.ZRRQR.getValue())
|
||||
|| StringUtils.equals(taskDefinitionKey, DesignComplianceFlowNodeKeyEnum.DEZRRQR.getValue())) {
|
||||
|
||||
params.put("flowTypeCn","设计符合性流程");
|
||||
params.put("flowTypeEn","Design Compliance Process");
|
||||
contentCn = "您好,请及时查看确认以下任务要求,谢谢!";
|
||||
contentEn = "Hello! Please check and confirm the following task requirement in a timely manner. Thank you!";
|
||||
templateId = TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION1.getValue();
|
||||
templateId = TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION4.getValue();
|
||||
endTime = DateUtils.formatDate(pliEoTemp.getDesignDutyDueDate());
|
||||
} else if (StringUtils.equals(taskDefinitionKey, DesignComplianceFlowNodeKeyEnum.ZRRTJJFW.getValue())
|
||||
|| StringUtils.equals(taskDefinitionKey, DesignComplianceFlowNodeKeyEnum.DEZRRTJJFW.getValue())) {
|
||||
@@ -12928,7 +12941,6 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
endTime = DateUtils.formatDate(pliEoTemp.getDesignDueDate());
|
||||
}
|
||||
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("userIdList", Arrays.asList(designTransferUserId.split(",")));
|
||||
params.put("projectLibraryId", projectLibraryId);
|
||||
params.put("endTime", endTime);
|
||||
@@ -13015,6 +13027,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
if (CollectionUtils.isNotEmpty(pliEoListTemp)) {
|
||||
ProjectLawsInventoryEO pliEoTemp = pliEoListTemp.get(0);
|
||||
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
|
||||
String endTime = "";
|
||||
String contentCn = "";
|
||||
String contentEn = "";
|
||||
@@ -13022,9 +13036,12 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
String taskDefinitionKey = pidEo.getTaskDefinitionKey();
|
||||
if (StringUtils.equals(taskDefinitionKey, VerifyComplianceFlowNodeKeyEnum.ZRRQR.getValue())
|
||||
|| StringUtils.equals(taskDefinitionKey, VerifyComplianceFlowNodeKeyEnum.DEZRRQR.getValue())) {
|
||||
params.put("flowTypeCn","验证符合性流程");
|
||||
params.put("flowTypeEn","Validation Compliance Process");
|
||||
|
||||
contentCn = "您好,请及时查看确认以下任务要求,谢谢!";
|
||||
contentEn = "Hello! Please check and confirm the following task requirement in a timely manner. Thank you!";
|
||||
templateId = TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION1.getValue();
|
||||
templateId = TemplateInfoEnum2.REGULATION_TASK_CONFIRMATION4.getValue();
|
||||
endTime = DateUtils.formatDate(pliEoTemp.getVerifyDutyDueDate());
|
||||
} else if (StringUtils.equals(taskDefinitionKey, VerifyComplianceFlowNodeKeyEnum.ZRRTJJFW.getValue())
|
||||
|| StringUtils.equals(taskDefinitionKey, VerifyComplianceFlowNodeKeyEnum.DEZRRTJJFW.getValue())) {
|
||||
@@ -13034,7 +13051,6 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
endTime = DateUtils.formatDate(pliEoTemp.getVerifyDueDate());
|
||||
}
|
||||
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("userIdList", Arrays.asList(verifyTransferUserId.split(",")));
|
||||
params.put("projectLibraryId", projectLibraryId);
|
||||
params.put("endTime", endTime);
|
||||
|
||||
@@ -125,10 +125,10 @@
|
||||
{{$t('preservation')}}
|
||||
</div>
|
||||
<!-- 导出-->
|
||||
<!-- <div @click="handleExport" class="operator-text" v-has="'report:detail:export:normal'">-->
|
||||
<!-- <a-icon type="export"/>-->
|
||||
<!-- {{$t('dataExport')}}-->
|
||||
<!-- </div>-->
|
||||
<div @click="handleExport" class="operator-text" v-has="'report:detail:export:general'">
|
||||
<a-icon type="export"/>
|
||||
{{$t('dataExport')}}
|
||||
</div>
|
||||
<div @click="ConventionalExport" class="operator-text" v-has="'report:detail:export:normal'">
|
||||
<a-icon type="export" :rotate="-90"/>
|
||||
{{$t('ConventionalExport')}}
|
||||
@@ -715,16 +715,17 @@ import { downloadFile, getAction, postAction } from '../../../api/manage'
|
||||
} else if (long && long === 'en-us') {
|
||||
this.cut = 'en'
|
||||
}
|
||||
console.log(this.selectedRowKeys)
|
||||
let query = {
|
||||
paramsManifestId: this.paramsManifest.id,
|
||||
paramsTemplateId: this.$route.query.paramsTemplateId,
|
||||
paramsTemplatePublishVersion: 1,
|
||||
paramsManifestId: this.$route.query.id,
|
||||
cut: this.cut,
|
||||
userTypes: this.currentPersonRole,
|
||||
// userTypes: this.currentPersonRole,
|
||||
ids:this.selectedRowKeys.join(','),
|
||||
...this.formInline,
|
||||
exportName: this.$route.query.projectName + '(' + this.$route.query.title + ')'
|
||||
}
|
||||
let name = this.$route.query.projectName + '(' + this.$route.query.title + ')' + '.zip'
|
||||
downloadFile('/params/collectManifest/exportAll', name, query, this.selectClear)
|
||||
downloadFile('/report/detail/exportGeneral', name, query, this.selectClear)
|
||||
},
|
||||
ConventionalExport() {
|
||||
this.$refs.conventionalModel.addModel()
|
||||
|
||||
Reference in New Issue
Block a user