Merge remote-tracking branch 'origin/dev_2nd_LCYH' into dev_2nd_LCYH

This commit is contained in:
wangzhijiang
2023-04-16 22:21:44 +08:00
31 changed files with 436 additions and 310 deletions
@@ -17,10 +17,7 @@ import com.jero.modules.ota.utils.ImportFileUtil;
import com.jero.modules.system.service.ISysDictService;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@@ -871,25 +868,38 @@ public class OtaBaCxJsfzbacsServiceImpl extends ServiceImpl<OtaBaCxJsfzbacsMappe
cell.setCellValue(bass.getEdrScqy());
CellStyle style = wb.createCellStyle();
style.setBorderTop(BorderStyle.THIN);
style.setBorderBottom(BorderStyle.THIN);
style.setBorderLeft(BorderStyle.THIN);
style.setBorderRight(BorderStyle.THIN);
List<OtaBaCxSjmk> sjmkList = OtaBaCxSjmkService.queryByOtaId(otaId);
int startRow = 63;
for (OtaBaCxSjmk sjmk : sjmkList) {
row = s.createRow(startRow);
cell = row.createCell(0);
cell.setCellStyle(style);
cell.setCellValue(sjmk.getBjmc());
cell = row.createCell(1);
cell.setCellStyle(style);
cell.setCellValue(ImportFileUtil.getCellValueHaveOrNot(sjmk.getPzqk()));
cell = row.createCell(2);
cell.setCellStyle(style);
cell.setCellValue(sjmk.getKzqmc());
cell = row.createCell(3);
cell.setCellStyle(style);
cell.setCellValue(sjmk.getYjggxh());
cell = row.createCell(4);
cell.setCellStyle(style);
cell.setCellValue(sjmk.getYjscqy());
cell = row.createCell(5);
cell.setCellStyle(style);
cell.setCellValue(sjmk.getRjbb());
cell = row.createCell(6);
cell.setCellStyle(style);
cell.setCellValue(sjmk.getRjkfqy());
cell = row.createCell(7);
cell.setCellStyle(style);
cell.setCellValue(sjmk.getBzwz());
startRow++;
}
@@ -20,10 +20,7 @@ import com.jero.modules.ota.utils.ImportFileUtil;
import com.jero.modules.system.service.ISysDictService;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@@ -340,44 +337,65 @@ public class OtaBaCxKsjjsmccsServiceImpl extends ServiceImpl<OtaBaCxKsjjsmccsMap
List<OtaBaCxKsjjsmccs> mccsList = this.getByOtaId(otaId);
Workbook wb = ImportFileUtil.readExcel(file);
Sheet s = wb.getSheetAt(0);
CellStyle style = wb.createCellStyle();
style.setBorderTop(BorderStyle.THIN);
style.setBorderBottom(BorderStyle.THIN);
style.setBorderLeft(BorderStyle.THIN);
style.setBorderRight(BorderStyle.THIN);
int startRow = 3;
for (int i = 0; i < mccsList.size(); i++) {
OtaBaCxKsjjsmccs mccs = mccsList.get(i);
Row row = s.getRow(startRow);
Cell cell = row.createCell(0);
cell.setCellStyle(style);
cell.setCellValue(mccs.getGnmc());
cell = row.createCell(1);
cell.setCellStyle(style);
cell.setCellValue(ImportFileUtil.getCellValueHaveOrNot(mccs.getPzqk()));
cell = row.createCell(2);
cell.setCellStyle(style);
cell.setCellValue(ImportFileUtil.getCellValueYesOrNo(mccs.getSfksj()));
cell = row.createCell(3);
cell.setCellStyle(style);
cell.setCellValue(ComparisonUtil.queryDictTextByKey("driving_automation_level", mccs.getJszdhjb(), sysDictService));
cell = row.createCell(4);
cell.setCellStyle(style);
cell.setCellValue(mccs.getSjggcs());
cell = row.createCell(5);
cell.setCellStyle(style);
cell.setCellValue(mccs.getGnms());
cell = row.createCell(6);
cell.setCellStyle(style);
cell.setCellValue(mccs.getSytj());
cell = row.createCell(7);
cell.setCellStyle(style);
cell.setCellValue(mccs.getKzqmc());
cell = row.createCell(8);
cell.setCellStyle(style);
cell.setCellValue(mccs.getKzqscqy());
cell = row.createCell(9);
cell.setCellStyle(style);
cell.setCellValue(mccs.getKzqxh());
cell = row.createCell(10);
cell.setCellStyle(style);
cell.setCellValue(mccs.getYjbbxx());
cell = row.createCell(11);
cell.setCellStyle(style);
cell.setCellValue(mccs.getRjkfqy());
cell = row.createCell(12);
cell.setCellStyle(style);
cell.setCellValue(mccs.getCzxtbbh());
cell = row.createCell(13);
cell.setCellStyle(style);
cell.setCellValue(mccs.getCsyzsj());
startRow++;
}
Row row = s.createRow(startRow);
Cell cell = row.createCell(0);
cell.setCellStyle(style);
cell.setCellValue("证明材料");
cell = row.createCell(1);
cell.setCellStyle(style);
OtaBaCxList otaBaCxList = otaBaCxListService.queryById(otaId);
if (ObjectUtils.isNotEmpty(otaBaCxList)) {
StringBuilder sb = new StringBuilder();
@@ -20,10 +20,7 @@ import com.jero.modules.ota.utils.ImportFileUtil;
import com.jero.modules.system.service.ISysDictService;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@@ -414,19 +411,28 @@ public class OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl<OtaBaCxKsjxtmccsMap
List<OtaBaCxKsjxtmccs> mccsList = this.getByOtaId(otaId);
Workbook wb = ImportFileUtil.readExcel(file);
Sheet s = wb.getSheetAt(0);
CellStyle style = wb.createCellStyle();
style.setBorderTop(BorderStyle.THIN);
style.setBorderBottom(BorderStyle.THIN);
style.setBorderLeft(BorderStyle.THIN);
style.setBorderRight(BorderStyle.THIN);
int startRow = 3;
for (OtaBaCxKsjxtmccs mccs : mccsList) {
Row row = s.getRow(startRow);
Cell cell = row.createCell(0);
cell.setCellStyle(style);
cell.setCellValue(mccs.getXtlb());
cell = row.createCell(1);
cell.setCellStyle(style);
cell.setCellValue(ImportFileUtil.getCellValueYesOrNo(mccs.getSfksj()));
cell = row.createCell(2);
cell.setCellStyle(style);
cell.setCellValue(mccs.getSjbgcs());
cell = row.createCell(3);
cell.setCellStyle(style);
StringBuilder sb = new StringBuilder();
String tptStr = mccs.getTpt();
if (StringUtils.isNotEmpty(tptStr)) {
@@ -446,26 +452,37 @@ public class OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl<OtaBaCxKsjxtmccsMap
cell.setCellValue(sb.toString());
}
cell = row.createCell(4);
cell.setCellStyle(style);
cell.setCellValue(mccs.getKzqmc());
cell = row.createCell(5);
cell.setCellStyle(style);
cell.setCellValue(mccs.getAqwzxdj());
cell = row.createCell(6);
cell.setCellStyle(style);
cell.setCellValue(mccs.getKzqscqy());
cell = row.createCell(7);
cell.setCellStyle(style);
cell.setCellValue(mccs.getKzqxh());
cell = row.createCell(8);
cell.setCellStyle(style);
cell.setCellValue(mccs.getYjbbxx());
cell = row.createCell(9);
cell.setCellStyle(style);
cell.setCellValue(mccs.getCsrjbbh());
cell = row.createCell(10);
cell.setCellStyle(style);
cell.setCellValue(mccs.getCsrjbwzsj());
cell = row.createCell(11);
cell.setCellStyle(style);
cell.setCellValue(mccs.getSjsfyx());
cell = row.createCell(12);
cell.setCellStyle(style);
cell.setCellValue(mccs.getCzxtlx());
cell = row.createCell(13);
cell.setCellStyle(style);
cell.setCellValue(mccs.getCzxtscqy());
cell = row.createCell(14);
cell.setCellStyle(style);
cell.setCellValue(mccs.getCzxtbbh());
startRow++;
}
@@ -474,8 +491,10 @@ public class OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl<OtaBaCxKsjxtmccsMap
row = s.createRow(startRow);
}
Cell cell = row.createCell(0);
cell.setCellStyle(style);
cell.setCellValue("证明材料");
cell = row.createCell(1);
cell.setCellStyle(style);
OtaBaCxList otaBaCxList = otaBaCxListService.queryById(otaId);
if (ObjectUtils.isNotEmpty(otaBaCxList)) {
StringBuilder sb = new StringBuilder();
@@ -200,8 +200,8 @@ public class OtaBaSjListServiceImpl extends ServiceImpl<OtaBaSjListMapper, OtaBa
File sjmbcxFile = ImportFileUtil.findFile(exportFile, "升级目标车型.xlsx");
otaBaSjSjmbcxService.exportData(sjmbcxFile, otaId, cut);
File mbclFile = ImportFileUtil.findFile(exportFile, "本次升级涉及的目标车辆.xlsx");
File mbclAttFile = ImportFileUtil.findFoder(exportFile, "本次升级涉及的目标车辆");
File mbclFile = ImportFileUtil.findFile(exportFile, "本次升级的目标车辆.xlsx");
File mbclAttFile = ImportFileUtil.findFoder(exportFile, "本次升级的目标车辆");
otaBaSjSjmbclService.exportData(mbclFile, mbclAttFile, otaId, cut);
@@ -211,10 +211,10 @@ public class OtaBaSjListServiceImpl extends ServiceImpl<OtaBaSjListMapper, OtaBa
File pgAtt2File = ImportFileUtil.findFoder(pgAttFile, "硬件版本号附件");
otaBaSjSjyxpgService.exportData(pgFile, pgAtt1File, pgAtt2File, otaId, cut);
File sjSjxtbhFile = ImportFileUtil.findFile(exportFile, "本次升级的系统名称与变更参数.xlsx");
File sjSjxtbhFile = ImportFileUtil.findFile(exportFile, "本次升级的系统名称与参数变化.xlsx");
otaBaSjSjxtbhService.exportData(sjSjxtbhFile, otaId, cut);
File sjfzbhFile = ImportFileUtil.findFile(exportFile, "本次升级的驾驶辅助功能与参数变化.xlsx");
File sjfzbhFile = ImportFileUtil.findFile(exportFile, "本次升级的驾驶辅助功能名称与参数变化.xlsx");
otaBaSjSjfzbhService.exportData(sjfzbhFile, otaId, cut);
File fsFile = ImportFileUtil.findFile(exportFile, "用户告知内容及方式.xlsx");
@@ -18,10 +18,7 @@ import com.jero.modules.ota.utils.ImportFileUtil;
import com.jero.modules.system.service.ISysDictService;
import com.jero.modules.system.util.StringUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@@ -219,7 +216,7 @@ public class OtaBaSjSjfzbhServiceImpl extends ServiceImpl<OtaBaSjSjfzbhMapper, O
@Override
public void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception {
ImportFileUtil.exportTemplate(response, templatePath + "本次升级的驾驶辅助功能与参数变化.zip");
ImportFileUtil.exportTemplate(response, templatePath + "本次升级的驾驶辅助功能名称与参数变化.zip");
}
@Override
@@ -232,7 +229,7 @@ public class OtaBaSjSjfzbhServiceImpl extends ServiceImpl<OtaBaSjSjfzbhMapper, O
public void parseFileList(List<File> upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception {
File upFile = null;
for (File f : upLoadFiles) {
if (f.getName().equals("本次升级的驾驶辅助功能与参数变化.xlsx")) {
if (f.getName().equals("本次升级的驾驶辅助功能名称与参数变化.xlsx")) {
upFile = f;
}
}
@@ -297,24 +294,36 @@ public class OtaBaSjSjfzbhServiceImpl extends ServiceImpl<OtaBaSjSjfzbhMapper, O
if (ObjectUtils.isNotEmpty(fzbhList)) {
Workbook wb = ImportFileUtil.readExcel(file);
Sheet s = wb.getSheetAt(0);
CellStyle style = wb.createCellStyle();
style.setBorderTop(BorderStyle.THIN);
style.setBorderBottom(BorderStyle.THIN);
style.setBorderLeft(BorderStyle.THIN);
style.setBorderRight(BorderStyle.THIN);
Row row;
Cell cell;
int start = 4;
for (OtaBaSjSjfzbh bh : fzbhList) {
row = s.createRow(start);
cell = row.createCell(0);
cell.setCellStyle(style);
cell.setCellValue(bh.getGnmc());
cell = row.createCell(1);
cell.setCellStyle(style);
cell.setCellValue(bh.getSjmdlx());
cell = row.createCell(2);
cell.setCellStyle(style);
cell.setCellValue(bh.getSjqbgcs());
cell = row.createCell(3);
cell.setCellStyle(style);
cell.setCellValue(bh.getSjhbgcs());
cell = row.createCell(4);
cell.setCellStyle(style);
cell.setCellValue(bh.getGnbgms());
cell = row.createCell(5);
cell.setCellStyle(style);
cell.setCellValue(bh.getSytjbg());
cell = row.createCell(6);
cell.setCellStyle(style);
cell.setCellValue(bh.getSjsjkzq());
start++;
}
@@ -177,14 +177,14 @@ public class OtaBaSjSjmbclServiceImpl extends ServiceImpl<OtaBaSjSjmbclMapper, O
@Override
public void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception {
ImportFileUtil.exportTemplate(response, templatePath + "本次升级涉及的目标车辆.zip");
ImportFileUtil.exportTemplate(response, templatePath + "本次升级的目标车辆.zip");
}
@Override
public OtaBaSjSjmbcl parseFileList(List<File> upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception {
File upFile = null;
for (File f : upLoadFiles) {
if (f.getName().equals("本次升级涉及的目标车辆.xlsx")) {
if (f.getName().equals("本次升级的目标车辆.xlsx")) {
upFile = f;
}
}
@@ -18,10 +18,8 @@ import com.jero.modules.ota.utils.ImportFileUtil;
import com.jero.modules.system.service.ISysDictService;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
import org.apache.poi.ss.usermodel.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@@ -199,7 +197,7 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
@Override
public void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception {
ImportFileUtil.exportTemplate(response, templatePath + "本次升级的系统名称与变更参数.zip");
ImportFileUtil.exportTemplate(response, templatePath + "本次升级的系统名称与参数变化.zip");
}
@Override
@@ -212,7 +210,7 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
public void parseFileList(List<File> upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception {
File upFile = null;
for (File f : upLoadFiles) {
if (f.getName().equals("本次升级的系统名称与变更参数.xlsx")) {
if (f.getName().equals("本次升级的系统名称与参数变化.xlsx")) {
upFile = f;
}
}
@@ -290,34 +288,51 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
if (ObjectUtils.isNotEmpty(bhList)) {
Workbook wb = ImportFileUtil.readExcel(file);
Sheet s = wb.getSheetAt(0);
CellStyle style = wb.createCellStyle();
style.setBorderTop(BorderStyle.THIN);
style.setBorderBottom(BorderStyle.THIN);
style.setBorderLeft(BorderStyle.THIN);
style.setBorderRight(BorderStyle.THIN);
Row row;
Cell cell;
int start = 4;
for (OtaBaSjSjxtbh bh : bhList) {
row = s.createRow(start);
cell = row.createCell(0);
cell.setCellStyle(style);
cell.setCellValue(bh.getXtmc());
cell = row.createCell(1);
cell.setCellStyle(style);
cell.setCellValue(bh.getSjqbgcs());
cell = row.createCell(2);
cell.setCellStyle(style);
cell.setCellValue(bh.getSjhbgcs());
cell = row.createCell(3);
cell.setCellStyle(style);
cell.setCellValue(bh.getSjkzqmc());
cell = row.createCell(4);
cell.setCellStyle(style);
cell.setCellValue(bh.getYjbb());
cell = row.createCell(5);
cell.setCellStyle(style);
cell.setCellValue(bh.getSjqrjbb());
cell = row.createCell(6);
cell.setCellStyle(style);
cell.setCellValue(bh.getSjhrjbb());
cell = row.createCell(7);
cell.setCellStyle(style);
cell.setCellValue(bh.getSjqczxt());
cell = row.createCell(8);
cell.setCellStyle(style);
cell.setCellValue(bh.getSjhczxt());
cell = row.createCell(9);
cell.setCellStyle(style);
cell.setCellValue(bh.getSjbyzsj());
cell = row.createCell(10);
cell.setCellStyle(style);
cell.setCellValue(bh.getSjbdx());
cell = row.createCell(11);
cell.setCellStyle(style);
cell.setCellValue(ImportFileUtil.getCellValueYesOrNo(bh.getSfcfsj()));
start++;
}
@@ -515,7 +515,11 @@ public class ImportFileUtil {
// 需要保留原来的文件结构时,需要对空文件夹进行处理
if (KeepDirStructure) {
// 空文件夹的处理
zos.putNextEntry(new ZipEntry(name + "/"));
ZipEntry folderEntry = new ZipEntry(name + "/");
folderEntry.setMethod(ZipEntry.STORED);
folderEntry.setSize(0);
folderEntry.setCrc(0);
zos.putNextEntry(folderEntry);
// 没有文件,不需要文件的copy
zos.closeEntry();
}
@@ -11343,14 +11343,19 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
for (ProjectLawsInventoryEO projectLawsInventoryEO : projectLawsInventoryEOS) {
//未发起或拒绝 可以发起清单确认
boolean checkStatus = (StringUtils.equals(projectLawsInventoryEO.getDesignFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue())
||StringUtils.equals(projectLawsInventoryEO.getVerifyFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue()));
||StringUtils.equals(projectLawsInventoryEO.getVerifyFlowStatus(),ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue())
||StringUtils.equals(projectLawsInventoryEO.getDesignFlowStatus(),ComplianceFlowStatusEnum.REGULATORY_ENGINEER_RETURNS.getValue())
||StringUtils.equals(projectLawsInventoryEO.getVerifyFlowStatus(),ComplianceFlowStatusEnum.REGULATORY_ENGINEER_RETURNS.getValue())
);
//如果该数据的法规工程师不为空
boolean checkUser = (StringUtils.isNotEmpty(projectLawsInventoryEO.getRegulationOwnerId()));
if(checkStatus && checkUser){
if(StringUtils.equals(projectLawsInventoryEO.getDesignFlowStatus(), ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue())){
if(StringUtils.equals(projectLawsInventoryEO.getDesignFlowStatus(), ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue())
||StringUtils.equals(projectLawsInventoryEO.getDesignFlowStatus(),ComplianceFlowStatusEnum.REGULATORY_ENGINEER_RETURNS.getValue())){
projectLawsInventoryEO.setDesignFlowStatus(ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue());
}
if(StringUtils.equals(projectLawsInventoryEO.getVerifyFlowStatus(), ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue())){
if(StringUtils.equals(projectLawsInventoryEO.getVerifyFlowStatus(), ComplianceFlowStatusEnum.LIST_TO_BE_RELEASED.getValue())
||StringUtils.equals(projectLawsInventoryEO.getVerifyFlowStatus(),ComplianceFlowStatusEnum.REGULATORY_ENGINEER_RETURNS.getValue())){
projectLawsInventoryEO.setVerifyFlowStatus(ComplianceFlowStatusEnum.LIST_TO_BE_CHECKED.getValue());
}