Merge remote-tracking branch 'origin/dev_2nd_LCYH' into dev_2nd_LCYH
This commit is contained in:
+5
-1
@@ -214,7 +214,11 @@ public class OtaBaCxAqcsController extends JeroController<OtaBaCxAqcs, IOtaBaCxA
|
||||
e.printStackTrace();
|
||||
return Result.error(e.getMessage());
|
||||
}
|
||||
return Result.OK().success(errMsg.toString());
|
||||
String errMsgStr = errMsg.toString();
|
||||
if (errMsgStr.endsWith(", ")) {
|
||||
errMsgStr = errMsgStr.substring(0, errMsgStr.lastIndexOf(","));
|
||||
}
|
||||
return Result.OK().success(errMsgStr);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+5
-1
@@ -213,7 +213,11 @@ public class OtaBaCxJbxxController extends JeroController<OtaBaCxJbxx, IOtaBaCxJ
|
||||
e.printStackTrace();
|
||||
return Result.error(e.getMessage());
|
||||
}
|
||||
return Result.OK(res).success(errMsg.toString());
|
||||
String errMsgStr = errMsg.toString();
|
||||
if (errMsgStr.endsWith(", ")) {
|
||||
errMsgStr = errMsgStr.substring(0, errMsgStr.lastIndexOf(","));
|
||||
}
|
||||
return Result.OK().success(errMsgStr);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+5
-1
@@ -210,7 +210,11 @@ public class OtaBaCxJsfzbacsController extends JeroController<OtaBaCxJsfzbacs, I
|
||||
e.printStackTrace();
|
||||
return Result.error(e.getMessage());
|
||||
}
|
||||
return Result.OK().success(errMsg.toString());
|
||||
String errMsgStr = errMsg.toString();
|
||||
if (errMsgStr.endsWith(", ")) {
|
||||
errMsgStr = errMsgStr.substring(0, errMsgStr.lastIndexOf(","));
|
||||
}
|
||||
return Result.OK().success(errMsgStr);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+5
-1
@@ -211,7 +211,11 @@ public class OtaBaCxKsjjsmccsController extends JeroController<OtaBaCxKsjjsmccs,
|
||||
e.printStackTrace();
|
||||
return Result.error(e.getMessage());
|
||||
}
|
||||
return Result.OK().success(errMsg.toString());
|
||||
String errMsgStr = errMsg.toString();
|
||||
if (errMsgStr.endsWith(", ")) {
|
||||
errMsgStr = errMsgStr.substring(0, errMsgStr.lastIndexOf(","));
|
||||
}
|
||||
return Result.OK().success(errMsgStr);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+5
-1
@@ -213,7 +213,11 @@ public class OtaBaCxKsjxtmccsController extends JeroController<OtaBaCxKsjxtmccs,
|
||||
e.printStackTrace();
|
||||
return Result.error(e.getMessage());
|
||||
}
|
||||
return Result.OK().success(errMsg.toString());
|
||||
String errMsgStr = errMsg.toString();
|
||||
if (errMsgStr.endsWith(", ")) {
|
||||
errMsgStr = errMsgStr.substring(0, errMsgStr.lastIndexOf(","));
|
||||
}
|
||||
return Result.OK().success(errMsgStr);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+5
-1
@@ -245,7 +245,11 @@ public class OtaBaCxListController extends JeroController<OtaBaCxList, IOtaBaCxL
|
||||
e.printStackTrace();
|
||||
return Result.error(e.getMessage());
|
||||
}
|
||||
return Result.OK().success(errMsg.toString());
|
||||
String errMsgStr = errMsg.toString();
|
||||
if (errMsgStr.endsWith(", ")) {
|
||||
errMsgStr = errMsgStr.substring(0, errMsgStr.lastIndexOf(","));
|
||||
}
|
||||
return Result.OK().success(errMsgStr);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "车型及功能备案列表-数据导出")
|
||||
|
||||
+5
-2
@@ -209,7 +209,10 @@ public class OtaBaCxZxsjyqController extends JeroController<OtaBaCxZxsjyq, IOtaB
|
||||
e.printStackTrace();
|
||||
return Result.error(e.getMessage());
|
||||
}
|
||||
return Result.OK().success(errMsg.toString());
|
||||
String errMsgStr = errMsg.toString();
|
||||
if (errMsgStr.endsWith(", ")) {
|
||||
errMsgStr = errMsgStr.substring(0, errMsgStr.lastIndexOf(","));
|
||||
}
|
||||
return Result.OK().success(errMsgStr);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+5
-1
@@ -213,7 +213,11 @@ public class OtaBaSjGgnrfsController extends JeroController<OtaBaSjGgnrfs, IOtaB
|
||||
e.printStackTrace();
|
||||
return Result.error(e.getMessage());
|
||||
}
|
||||
return Result.OK().success(errMsg.toString());
|
||||
String errMsgStr = errMsg.toString();
|
||||
if (errMsgStr.endsWith(", ")) {
|
||||
errMsgStr = errMsgStr.substring(0, errMsgStr.lastIndexOf(","));
|
||||
}
|
||||
return Result.OK().success(errMsgStr);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+5
-1
@@ -241,7 +241,11 @@ public class OtaBaSjListController extends JeroController<OtaBaSjList, IOtaBaSjL
|
||||
e.printStackTrace();
|
||||
return Result.error(e.getMessage());
|
||||
}
|
||||
return Result.OK().success(errMsg.toString());
|
||||
String errMsgStr = errMsg.toString();
|
||||
if (errMsgStr.endsWith(", ")) {
|
||||
errMsgStr = errMsgStr.substring(0, errMsgStr.lastIndexOf(","));
|
||||
}
|
||||
return Result.OK().success(errMsgStr);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "升级备案-数据导出")
|
||||
|
||||
+5
-1
@@ -211,7 +211,11 @@ public class OtaBaSjSjfzbhController extends JeroController<OtaBaSjSjfzbh, IOtaB
|
||||
e.printStackTrace();
|
||||
return Result.error(e.getMessage());
|
||||
}
|
||||
return Result.OK().success(errMsg.toString());
|
||||
String errMsgStr = errMsg.toString();
|
||||
if (errMsgStr.endsWith(", ")) {
|
||||
errMsgStr = errMsgStr.substring(0, errMsgStr.lastIndexOf(","));
|
||||
}
|
||||
return Result.OK().success(errMsgStr);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+5
-1
@@ -207,6 +207,10 @@ public class OtaBaSjSjmbclController extends JeroController<OtaBaSjSjmbcl, IOtaB
|
||||
e.printStackTrace();
|
||||
return Result.error(e.getMessage());
|
||||
}
|
||||
return Result.OK().success(errMsg.toString());
|
||||
String errMsgStr = errMsg.toString();
|
||||
if (errMsgStr.endsWith(", ")) {
|
||||
errMsgStr = errMsgStr.substring(0, errMsgStr.lastIndexOf(","));
|
||||
}
|
||||
return Result.OK().success(errMsgStr);
|
||||
}
|
||||
}
|
||||
|
||||
+5
-1
@@ -208,7 +208,11 @@ public class OtaBaSjSjmbcxController extends JeroController<OtaBaSjSjmbcx, IOtaB
|
||||
e.printStackTrace();
|
||||
return Result.error(e.getMessage());
|
||||
}
|
||||
return Result.OK().success(errMsg.toString());
|
||||
String errMsgStr = errMsg.toString();
|
||||
if (errMsgStr.endsWith(", ")) {
|
||||
errMsgStr = errMsgStr.substring(0, errMsgStr.lastIndexOf(","));
|
||||
}
|
||||
return Result.OK().success(errMsgStr);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+5
-1
@@ -213,7 +213,11 @@ public class OtaBaSjSjxtbhController extends JeroController<OtaBaSjSjxtbh, IOtaB
|
||||
e.printStackTrace();
|
||||
return Result.error(e.getMessage());
|
||||
}
|
||||
return Result.OK().success(errMsg.toString());
|
||||
String errMsgStr = errMsg.toString();
|
||||
if (errMsgStr.endsWith(", ")) {
|
||||
errMsgStr = errMsgStr.substring(0, errMsgStr.lastIndexOf(","));
|
||||
}
|
||||
return Result.OK().success(errMsgStr);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+7
-3
@@ -188,14 +188,14 @@ public class OtaBaSjSjyxpgController extends JeroController<OtaBaSjSjyxpg, IOtaB
|
||||
return super.importExcel(request, response, OtaBaSjSjyxpg.class);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "车型备案-安全措施-模板下载")
|
||||
@ApiOperation(value = "升级备案-升级影响评估-模板下载")
|
||||
@GetMapping(value = "/exportTemplate")
|
||||
// @RequiresPermissions("otaBaCx:exportTemplate")
|
||||
public void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
this.otaBaSjSjyxpgService.exportTemplate(response, request);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "车型备案-安全措施-数据导入")
|
||||
@ApiOperation(value = "升级备案-升级影响评估-数据导入")
|
||||
@PostMapping(value = "/importData")
|
||||
// @RequiresPermissions("otaBaCx:importData")
|
||||
public Result<?> importData(@RequestParam(value = "file", required = false) MultipartFile file,
|
||||
@@ -213,7 +213,11 @@ public class OtaBaSjSjyxpgController extends JeroController<OtaBaSjSjyxpg, IOtaB
|
||||
e.printStackTrace();
|
||||
return Result.error(e.getMessage());
|
||||
}
|
||||
return Result.OK().success(errMsg.toString());
|
||||
String errMsgStr = errMsg.toString();
|
||||
if (errMsgStr.endsWith(", ")) {
|
||||
errMsgStr = errMsgStr.substring(0, errMsgStr.lastIndexOf(","));
|
||||
}
|
||||
return Result.OK().success(errMsgStr);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -110,11 +110,13 @@ public class OtaBaCxJbxx implements Serializable {
|
||||
/**车辆动力类型1*/
|
||||
@Excel(name = "车辆动力类型1", width = 15)
|
||||
@ApiModelProperty(value = "车辆动力类型1")
|
||||
@Dict(dicCode = "vehicle_dynamic_type")
|
||||
private java.lang.String dllx1;
|
||||
|
||||
/**车辆动力类型2*/
|
||||
@Excel(name = "车辆动力类型2", width = 15)
|
||||
@ApiModelProperty(value = "车辆动力类型2")
|
||||
@Dict(dicCode = "vehicle_dynamic_type1")
|
||||
private java.lang.String dllx2;
|
||||
|
||||
/**通信终端*/
|
||||
|
||||
+2
@@ -104,11 +104,13 @@ public class OtaBaSjSjmbcx implements Serializable {
|
||||
/**车辆动力类型1*/
|
||||
@Excel(name = "车辆动力类型1", width = 15)
|
||||
@ApiModelProperty(value = "车辆动力类型1")
|
||||
@Dict(dicCode = "vehicle_dynamic_type")
|
||||
private java.lang.String dllx1;
|
||||
|
||||
/**车辆动力类型2*/
|
||||
@Excel(name = "车辆动力类型2", width = 15)
|
||||
@ApiModelProperty(value = "车辆动力类型2")
|
||||
@Dict(dicCode = "vehicle_dynamic_type1")
|
||||
private java.lang.String dllx2;
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -17,8 +17,8 @@ public enum OtaTitleEnum {
|
||||
// QYMC("qymc", "企业名称", "0","enterprise name ",0),
|
||||
DJBH("djbh", "产品登记编号", "0", "Product Registration Number ", 500),
|
||||
CPLB("cplb", "产品类别", "product_category", "Product category", 0),
|
||||
DLLX1("dllx1", "车辆动力类型", "0", "Vehicle Power Type", 50),
|
||||
DLLX2("dllx2", "车辆动力类型", "0", "Vehicle Power Type", 50),
|
||||
DLLX1("dllx1", "车辆动力类型", "vehicle_dynamic_type", "Vehicle Power Type", 50),
|
||||
DLLX2("dllx2", "车辆动力类型", "vehicle_dynamic_type1", "Vehicle Power Type", 50),
|
||||
TXZD("txzd", "通信终端", "communication_terminal", "communication terminal", 0),
|
||||
CDOTASJ("cdotasj", "车端OTA升级管理系统", "0", "OTA Upgrade Management System", 500),
|
||||
|
||||
|
||||
+1
-1
@@ -257,7 +257,7 @@ public class OtaBaCxAqcsServiceImpl extends ServiceImpl<OtaBaCxAqcsMapper, OtaBa
|
||||
aqcs.setXxaqjz(ImportFileUtil.getCellValueDict(cell, wb, "Information_security_mechanism", sysDictService, cut));
|
||||
|
||||
ComparisonUtil cu = new ComparisonUtil();
|
||||
cu.checkError(aqcs, errMsg, sysDictService, cut);
|
||||
cu.checkError(aqcs, errMsg, sysDictService, cut, 0);
|
||||
|
||||
row = s.getRow(2);
|
||||
cell = row.getCell(3);
|
||||
|
||||
+6
-6
@@ -268,10 +268,10 @@ public class OtaBaCxJbxxServiceImpl extends ServiceImpl<OtaBaCxJbxxMapper, OtaBa
|
||||
jbxx.setCpxh(ImportFileUtil.getCellValue(cell, wb));
|
||||
row = s.getRow(8);
|
||||
cell = row.getCell(1);
|
||||
jbxx.setDllx1(ImportFileUtil.getCellValue(cell, wb));
|
||||
jbxx.setDllx1(ImportFileUtil.getCellValueDict(cell, wb, "vehicle_dynamic_type", sysDictService, cut));
|
||||
row = s.getRow(9);
|
||||
cell = row.getCell(1);
|
||||
jbxx.setDllx2(ImportFileUtil.getCellValue(cell, wb));
|
||||
jbxx.setDllx2(ImportFileUtil.getCellValueDict(cell, wb, "vehicle_dynamic_type1", sysDictService, cut));
|
||||
row = s.getRow(10);
|
||||
cell = row.getCell(1);
|
||||
jbxx.setTxzd(ImportFileUtil.getCellValueDict(cell, wb, "communication_terminal", sysDictService, cut));
|
||||
@@ -280,7 +280,7 @@ public class OtaBaCxJbxxServiceImpl extends ServiceImpl<OtaBaCxJbxxMapper, OtaBa
|
||||
jbxx.setCdotasj(ImportFileUtil.getCellValue(cell, wb));
|
||||
|
||||
ComparisonUtil cu = new ComparisonUtil();
|
||||
cu.checkError(jbxx, errMsg, sysDictService, cut);
|
||||
cu.checkError(jbxx, errMsg, sysDictService, cut, 0);
|
||||
return jbxx;
|
||||
}
|
||||
|
||||
@@ -301,7 +301,7 @@ public class OtaBaCxJbxxServiceImpl extends ServiceImpl<OtaBaCxJbxxMapper, OtaBa
|
||||
|
||||
row = s.getRow(3);
|
||||
cell = row.getCell(1);
|
||||
cell.setCellValue(jbxx.getCplb());
|
||||
cell.setCellValue(ComparisonUtil.queryDictTextByKey("product_category", jbxx.getCplb(), sysDictService));
|
||||
row = s.getRow(4);
|
||||
cell = row.getCell(1);
|
||||
cell.setCellValue(jbxx.getGgpc());
|
||||
@@ -316,10 +316,10 @@ public class OtaBaCxJbxxServiceImpl extends ServiceImpl<OtaBaCxJbxxMapper, OtaBa
|
||||
cell.setCellValue(jbxx.getCpxh());
|
||||
row = s.getRow(8);
|
||||
cell = row.getCell(1);
|
||||
cell.setCellValue(jbxx.getDllx1());
|
||||
cell.setCellValue(ComparisonUtil.queryDictTextByKey("vehicle_dynamic_type", jbxx.getDllx1(), sysDictService));
|
||||
row = s.getRow(9);
|
||||
cell = row.getCell(1);
|
||||
cell.setCellValue(jbxx.getDllx2());
|
||||
cell.setCellValue(ComparisonUtil.queryDictTextByKey("vehicle_dynamic_type1", jbxx.getDllx2(), sysDictService));
|
||||
row = s.getRow(10);
|
||||
cell = row.getCell(1);
|
||||
String str = jbxx.getTxzd();
|
||||
|
||||
+2
-2
@@ -343,7 +343,7 @@ public class OtaBaCxJsfzbacsServiceImpl extends ServiceImpl<OtaBaCxJsfzbacsMappe
|
||||
cell = row.getCell(7);
|
||||
sjmk.setBzwz(ImportFileUtil.getCellValue(cell, wb));
|
||||
ComparisonUtil cu = new ComparisonUtil();
|
||||
cu.checkError(sjmk, errMsg, sysDictService, cut);
|
||||
cu.checkError(sjmk, errMsg, sysDictService, cut, i + 1);
|
||||
sjmkList.add(sjmk);
|
||||
}
|
||||
}
|
||||
@@ -608,7 +608,7 @@ public class OtaBaCxJsfzbacsServiceImpl extends ServiceImpl<OtaBaCxJsfzbacsMappe
|
||||
cell = row.getCell(4);
|
||||
bass.setEdrScqy(ImportFileUtil.getCellValue(cell, wb));
|
||||
ComparisonUtil cu = new ComparisonUtil();
|
||||
cu.checkError(bass, errMsg, sysDictService, cut);
|
||||
cu.checkError(bass, errMsg, sysDictService, cut, 0);
|
||||
return bass;
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -288,7 +288,7 @@ public class OtaBaCxKsjjsmccsServiceImpl extends ServiceImpl<OtaBaCxKsjjsmccsMap
|
||||
cell = row.getCell(1);
|
||||
str = ImportFileUtil.getCellValue(cell, wb);
|
||||
String[] strs = str.split(",");
|
||||
otaBaCxList.setZxsjjsfj(ImportFileUtil.uploadFiles(attFile, strs, ossFileService, errMsg, "证明材料", cut));
|
||||
otaBaCxList.setZxsjjsfj(ImportFileUtil.uploadFiles(attFile, strs, ossFileService, errMsg, "证明材料", cut, i + 1));
|
||||
otaBaCxListService.editById(otaBaCxList);
|
||||
}
|
||||
break;
|
||||
@@ -328,7 +328,7 @@ public class OtaBaCxKsjjsmccsServiceImpl extends ServiceImpl<OtaBaCxKsjjsmccsMap
|
||||
mssc.setCreateTime(now);
|
||||
|
||||
ComparisonUtil cu = new ComparisonUtil();
|
||||
cu.checkError(mssc, errMsg, sysDictService, cut);
|
||||
cu.checkError(mssc, errMsg, sysDictService, cut, i + 1);
|
||||
mccsList.add(mssc);
|
||||
}
|
||||
}
|
||||
@@ -351,7 +351,7 @@ public class OtaBaCxKsjjsmccsServiceImpl extends ServiceImpl<OtaBaCxKsjjsmccsMap
|
||||
cell = row.createCell(2);
|
||||
cell.setCellValue(ImportFileUtil.getCellValueYesOrNo(mccs.getSfksj()));
|
||||
cell = row.createCell(3);
|
||||
cell.setCellValue(mccs.getJszdhjb());
|
||||
cell.setCellValue(ComparisonUtil.queryDictTextByKey("driving_automation_level", mccs.getJszdhjb(), sysDictService));
|
||||
cell = row.createCell(4);
|
||||
cell.setCellValue(mccs.getSjggcs());
|
||||
cell = row.createCell(5);
|
||||
|
||||
+3
-3
@@ -357,7 +357,7 @@ public class OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl<OtaBaCxKsjxtmccsMap
|
||||
cell = row.getCell(1);
|
||||
str = ImportFileUtil.getCellValue(cell, wb);
|
||||
String[] strs = str.split(",");
|
||||
otaBaCxList.setZxsjxtfj(ImportFileUtil.uploadFiles(attFile, strs, ossFileService, errMsg, "证明材料", cut));
|
||||
otaBaCxList.setZxsjxtfj(ImportFileUtil.uploadFiles(attFile, strs, ossFileService, errMsg, "证明材料", cut, i + 1));
|
||||
otaBaCxListService.editById(otaBaCxList);
|
||||
}
|
||||
break;
|
||||
@@ -374,7 +374,7 @@ public class OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl<OtaBaCxKsjxtmccsMap
|
||||
mssc.setSjbgcs(ImportFileUtil.getCellValue(cell, wb));
|
||||
cell = row.getCell(3);
|
||||
String[] strs = ImportFileUtil.getCellValue(cell, wb).split(",");
|
||||
mssc.setTpt(ImportFileUtil.uploadFiles(attFile, strs, ossFileService, errMsg, "系统电子控制器架构拓扑图", cut));
|
||||
mssc.setTpt(ImportFileUtil.uploadFiles(attFile, strs, ossFileService, errMsg, "系统电子控制器架构拓扑图", cut, i + 1));
|
||||
cell = row.getCell(4);
|
||||
mssc.setKzqmc(ImportFileUtil.getCellValue(cell, wb));
|
||||
cell = row.getCell(5);
|
||||
@@ -401,7 +401,7 @@ public class OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl<OtaBaCxKsjxtmccsMap
|
||||
mssc.setUpdateTime(now);
|
||||
|
||||
ComparisonUtil cu = new ComparisonUtil();
|
||||
cu.checkError(mssc, errMsg, sysDictService, cut);
|
||||
cu.checkError(mssc, errMsg, sysDictService, cut, i + 1);
|
||||
mccsList.add(mssc);
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -152,6 +152,7 @@ public class OtaBaCxQtServiceImpl extends ServiceImpl<OtaBaCxQtMapper, OtaBaCxQt
|
||||
Row row = s.getRow(0);
|
||||
Cell cell = row.getCell(1);
|
||||
cell.setCellValue(qt.getSjbbhcs());
|
||||
wb.write(new FileOutputStream(file));
|
||||
wb.close();
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -273,7 +273,7 @@ public class OtaBaCxZxsjyqServiceImpl extends ServiceImpl<OtaBaCxZxsjyqMapper, O
|
||||
otaBaCxZxsjyq.setSjzt(ImportFileUtil.getCellValueYesOrNo(cell, wb));
|
||||
|
||||
ComparisonUtil cu = new ComparisonUtil();
|
||||
cu.checkError(otaBaCxZxsjyq, errMsg, sysDictService, cut);
|
||||
cu.checkError(otaBaCxZxsjyq, errMsg, sysDictService, cut, 0);
|
||||
|
||||
row = s.getRow(2);
|
||||
cell = row.getCell(3);
|
||||
|
||||
-1
@@ -168,7 +168,6 @@ public class OtaBaSjQtsjxxServiceImpl extends ServiceImpl<OtaBaSjQtsjxxMapper, O
|
||||
js = sdf.format(qt.getSjjzsj());
|
||||
}
|
||||
cell.setCellValue(js);
|
||||
cell.setCellValue(ks);
|
||||
wb.write(new FileOutputStream(file));
|
||||
wb.close();
|
||||
}
|
||||
|
||||
+4
-3
@@ -115,6 +115,7 @@ public class OtaBaSjSjfzbhServiceImpl extends ServiceImpl<OtaBaSjSjfzbhMapper, O
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public List<OtaBaSjSjfzbh> setDefault(String otaId) {
|
||||
List<OtaBaSjSjfzbh> list = this.getByOtaId(otaId);
|
||||
Date now = new Date();
|
||||
@@ -224,7 +225,7 @@ public class OtaBaSjSjfzbhServiceImpl extends ServiceImpl<OtaBaSjSjfzbhMapper, O
|
||||
@Override
|
||||
public void importData(MultipartFile file, String otaId, String cut, StringBuilder errMsg) throws Exception {
|
||||
List<File> upLoadFiles = ImportFileUtil.importZip(file, cut, uploadPath);
|
||||
parseFileList(upLoadFiles, otaId, cut,errMsg);
|
||||
parseFileList(upLoadFiles, otaId, cut, errMsg);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -243,7 +244,7 @@ public class OtaBaSjSjfzbhServiceImpl extends ServiceImpl<OtaBaSjSjfzbhMapper, O
|
||||
if (ObjectUtils.isEmpty(oldList)) {
|
||||
oldList = new ArrayList<>();
|
||||
}
|
||||
List<OtaBaSjSjfzbh> newList = parseFile(upFile, otaId, cut,errMsg);
|
||||
List<OtaBaSjSjfzbh> newList = parseFile(upFile, otaId, cut, errMsg);
|
||||
ComparisonUtil cu = new ComparisonUtil();
|
||||
List<OtaBaCxTxjl> reList = cu.comparisonListRecord(otaId, OtaModuleEnum.SJ_SJJSMCBH, OtaTitleEnum.GNMC.getName(), oldList, newList, sysDictService);
|
||||
deleteByOtaId(otaId);
|
||||
@@ -283,7 +284,7 @@ public class OtaBaSjSjfzbhServiceImpl extends ServiceImpl<OtaBaSjSjfzbhMapper, O
|
||||
fzbh.setCreateTime(now);
|
||||
fzbh.setUpdateTime(now);
|
||||
ComparisonUtil cu = new ComparisonUtil();
|
||||
cu.checkError(fzbh, errMsg, sysDictService, cut);
|
||||
cu.checkError(fzbh, errMsg, sysDictService, cut, i + 1);
|
||||
|
||||
fzbhList.add(fzbh);
|
||||
}
|
||||
|
||||
+1
-1
@@ -246,7 +246,7 @@ public class OtaBaSjSjmbcxServiceImpl extends ServiceImpl<OtaBaSjSjmbcxMapper, O
|
||||
mbcx.setDllx2(jbxx.getDllx2());
|
||||
}
|
||||
ComparisonUtil cu = new ComparisonUtil();
|
||||
cu.checkError(mbcx, errMsg, sysDictService, cut);
|
||||
cu.checkError(mbcx, errMsg, sysDictService, cut, 0);
|
||||
return mbcx;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -271,7 +271,7 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
|
||||
cell = row.getCell(10);
|
||||
xtbh.setSfcfsj(ImportFileUtil.getCellValueYesOrNo(cell, wb));
|
||||
ComparisonUtil cu = new ComparisonUtil();
|
||||
cu.checkError(xtbh, errMsg, sysDictService, cut);
|
||||
cu.checkError(xtbh, errMsg, sysDictService, cut, i + 1);
|
||||
if (xtbh.isNull()) {
|
||||
break;
|
||||
}
|
||||
|
||||
+21
-5
@@ -185,7 +185,7 @@ public class ComparisonUtil<T> {
|
||||
}
|
||||
}
|
||||
|
||||
public void checkError(T clazz, StringBuilder errMsg, ISysDictService sysDictService, String cut) {
|
||||
public void checkError(T clazz, StringBuilder errMsg, ISysDictService sysDictService, String cut,int row) {
|
||||
Field[] fields = clazz.getClass().getDeclaredFields();
|
||||
for (Field field : fields) {
|
||||
OtaTitleEnum ote = OtaTitleEnum.getOtaTitleEnum(field.getName());
|
||||
@@ -200,17 +200,29 @@ public class ComparisonUtil<T> {
|
||||
String str = val.toString();
|
||||
if ("0".equals(ote.getType())) {
|
||||
if (str.length() > ote.getLen()) {
|
||||
errMsg.append(title + " 的长度超过了 " + ote.getLen() + ", ");
|
||||
if (row > 0) {
|
||||
errMsg.append("第" + row + "行 " + title + " 的长度超过了 " + ote.getLen() + ", ");
|
||||
} else {
|
||||
errMsg.append(title + " 的长度超过了 " + ote.getLen() + ", ");
|
||||
}
|
||||
field.set(clazz, null);
|
||||
}
|
||||
} else if ("1".equals(ote.getType())) {
|
||||
if (!"1".equals(str) && !"2".equals(str)) {
|
||||
errMsg.append(title + " 必须填写有或无, ");
|
||||
if (row > 0) {
|
||||
errMsg.append("第" + row + "行 " + title + " 必须填写有或无, ");
|
||||
}else{
|
||||
errMsg.append(title + " 必须填写有或无, ");
|
||||
}
|
||||
field.set(clazz, null);
|
||||
}
|
||||
} else if ("2".equals(ote.getType())) {
|
||||
if (!"1".equals(str) && !"2".equals(str)) {
|
||||
errMsg.append(title + " 必须填写是或否, ");
|
||||
if (row > 0) {
|
||||
errMsg.append("第" + row + "行 " + title + " 必须填写是或否, ");
|
||||
}else{
|
||||
errMsg.append(title + " 必须填写是或否, ");
|
||||
}
|
||||
field.set(clazz, null);
|
||||
}
|
||||
} else if ("3".equals(ote.getType())) {
|
||||
@@ -220,7 +232,11 @@ public class ComparisonUtil<T> {
|
||||
for (String s : strs) {
|
||||
String res = sysDictService.queryDictTextByKeyEn(ote.getType(), s, cut);
|
||||
if (StringUtils.isEmpty(res)) {
|
||||
errMsg.append(title + " 填写了无法识别的选项, ");
|
||||
if (row > 0) {
|
||||
errMsg.append("第" + row + "行 " + title + " 填写了无法识别的选项, ");
|
||||
}else{
|
||||
errMsg.append(title + " 填写了无法识别的选项, ");
|
||||
}
|
||||
field.set(clazz, null);
|
||||
}
|
||||
}
|
||||
|
||||
+23
-11
@@ -71,7 +71,7 @@ public class ImportFileUtil {
|
||||
throw new JeroBootException("Please upload a zip file or rar file");
|
||||
}
|
||||
}
|
||||
String path = uploadPath + File.separator + "modal" + File.separator + System.currentTimeMillis()+ File.separator + filenameorg;
|
||||
String path = uploadPath + File.separator + "modal" + File.separator + System.currentTimeMillis() + File.separator + filenameorg;
|
||||
File saveDirectory = new File(path);
|
||||
if (!saveDirectory.isDirectory()) {
|
||||
saveDirectory.mkdir();
|
||||
@@ -166,7 +166,7 @@ public class ImportFileUtil {
|
||||
|
||||
|
||||
public static String getCellValueHaveOrNot(Cell cell, Workbook workbook) throws Exception {
|
||||
String res = "3";
|
||||
String res = "";
|
||||
String str = getCellValue(cell, workbook);
|
||||
if (StringUtils.isNotEmpty(str)) {
|
||||
if (str.equals("有")) {
|
||||
@@ -179,7 +179,7 @@ public class ImportFileUtil {
|
||||
}
|
||||
|
||||
public static String getCellValueHaveOrNotInt(Integer val) throws Exception {
|
||||
String res = "3";
|
||||
String res = "";
|
||||
if (ObjectUtils.isNotEmpty(val)) {
|
||||
if (val.equals(1)) {
|
||||
res = "有";
|
||||
@@ -191,7 +191,7 @@ public class ImportFileUtil {
|
||||
}
|
||||
|
||||
public static String getCellValueYesOrNo(Cell cell, Workbook workbook) throws Exception {
|
||||
String res = "3";
|
||||
String res = "";
|
||||
String str = getCellValue(cell, workbook);
|
||||
if (StringUtils.isNotEmpty(str)) {
|
||||
if (str.equals("是")) {
|
||||
@@ -204,7 +204,7 @@ public class ImportFileUtil {
|
||||
}
|
||||
|
||||
public static String getCellValueYesOrNoInt(Integer val) throws Exception {
|
||||
String res = "3";
|
||||
String res = "";
|
||||
if (ObjectUtils.isNotEmpty(val)) {
|
||||
if (val.equals(1)) {
|
||||
res = "是";
|
||||
@@ -216,7 +216,7 @@ public class ImportFileUtil {
|
||||
}
|
||||
|
||||
public static String getCellValueHaveOrNot(String str) throws Exception {
|
||||
String res = "3";
|
||||
String res = "";
|
||||
if (StringUtils.isNotEmpty(str)) {
|
||||
if (str.equals("1")) {
|
||||
res = "有";
|
||||
@@ -228,7 +228,7 @@ public class ImportFileUtil {
|
||||
}
|
||||
|
||||
public static String getCellValueYesOrNo(String str) throws Exception {
|
||||
String res = "3";
|
||||
String res = "";
|
||||
if (StringUtils.isNotEmpty(str)) {
|
||||
if (str.equals("1")) {
|
||||
res = "是";
|
||||
@@ -356,7 +356,7 @@ public class ImportFileUtil {
|
||||
return res;
|
||||
}
|
||||
|
||||
public static String uploadFiles(File attFile, String[] strs, IOSSFileService ossFileService, StringBuilder errMsg, String title, String cut) throws Exception {
|
||||
public static String uploadFiles(File attFile, String[] strs, IOSSFileService ossFileService, StringBuilder errMsg, String title, String cut, int row) throws Exception {
|
||||
String res = "";
|
||||
//已导入文件数,用于判断超过20
|
||||
int inFile = 0;
|
||||
@@ -368,16 +368,28 @@ public class ImportFileUtil {
|
||||
if (StringUtils.isNotEmpty(strs[i])) {
|
||||
File file = ImportFileUtil.findFile(attFile, strs[i]);
|
||||
if (null == file) {
|
||||
errMsg.append(title + " 找不到文件:" + strs[i] + ", ");
|
||||
if (row > 0) {
|
||||
errMsg.append("第" + row + "行 " + title + " 找不到文件:" + strs[i] + ", ");
|
||||
} else {
|
||||
errMsg.append(title + " 找不到文件:" + strs[i] + ", ");
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (!file.getName().endsWith(".doc") && !file.getName().endsWith(".docx") && !file.getName().endsWith(".pdf")
|
||||
&& !file.getName().endsWith(".DOC") && !file.getName().endsWith(".DOCX") && !file.getName().endsWith(".PDF")) {
|
||||
errMsg.append(title + " 只支持doc/docx/pdf格式, ");
|
||||
if (row > 0) {
|
||||
errMsg.append("第" + row + "行 " + title + " 只支持doc/docx/pdf格式, ");
|
||||
} else {
|
||||
errMsg.append(title + " 只支持doc/docx/pdf格式, ");
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (file.length() > 50 * 1024 * 1024) {
|
||||
errMsg.append(title + " 上传文件不可以超过50MB, ");
|
||||
if (row > 0) {
|
||||
errMsg.append("第" + row + "行 " + title + " 上传文件不可以超过50MB, ");
|
||||
} else {
|
||||
errMsg.append(title + " 上传文件不可以超过50MB, ");
|
||||
}
|
||||
continue;
|
||||
}
|
||||
OSSFile ossFile = ossFileService.uploadLocalOfCos(ImportFileUtil.createMfileByFile(file), "", null, null);
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 68px;background: #fff">
|
||||
<div style="margin-top: 68px;background: #fff" class="detail-box">
|
||||
<div class="detail-content">
|
||||
<div v-for="(item,index) in detailList" class="content-box">
|
||||
<div v-for="val in Object.keys(item)" class="content">
|
||||
@@ -168,14 +168,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-content-right">
|
||||
<div class="detail-content-right-text"
|
||||
:class="{'detail-content-right-text-one':item.pname ? true : false}"
|
||||
v-for="(item,index) in rightTitleList"
|
||||
@click="detailTextClick(index,item.name)">
|
||||
{{item.name}}
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="detail-content-right">-->
|
||||
<!-- <div class="detail-content-right-text"-->
|
||||
<!-- :class="{'detail-content-right-text-one':item.pname ? true : false}"-->
|
||||
<!-- v-for="(item,index) in rightTitleList"-->
|
||||
<!-- @click="detailTextClick(index,item.name)">-->
|
||||
<!-- {{item.name}}-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
<a-modal
|
||||
@@ -362,21 +362,20 @@
|
||||
dataIndex: 'implementationTypeText',
|
||||
align: 'left',
|
||||
ellipsis: true,
|
||||
width: '25%'
|
||||
width: '15%'
|
||||
},
|
||||
{
|
||||
title: this.$t('implementationDateTwo'),
|
||||
dataIndex: 'implementationDate',
|
||||
align: 'left',
|
||||
ellipsis: true,
|
||||
width: '25%'
|
||||
width: '15%'
|
||||
},
|
||||
{
|
||||
title: this.$t('remarks'),
|
||||
dataIndex: 'remarks',
|
||||
align: 'left',
|
||||
ellipsis: true,
|
||||
width: '25%'
|
||||
width: '45%'
|
||||
}
|
||||
],
|
||||
columns: [
|
||||
@@ -714,7 +713,8 @@
|
||||
height: 100%;
|
||||
|
||||
.detail-content {
|
||||
width: calc(100% - 212px);
|
||||
/*width: calc(100% - 212px);*/
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.doc-detail-wrap {
|
||||
@@ -753,8 +753,8 @@
|
||||
}
|
||||
|
||||
.content-box {
|
||||
padding: 0 40px 0 32px;
|
||||
box-sizing: border-box;
|
||||
/*padding: 0 40px 0 32px;*/
|
||||
/*box-sizing: border-box;*/
|
||||
}
|
||||
|
||||
.header-text {
|
||||
@@ -795,7 +795,7 @@
|
||||
overflow: hidden;
|
||||
word-break: break-word;
|
||||
color: #040B29;
|
||||
font-weight: bold;
|
||||
/*font-weight: bold;*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -816,7 +816,7 @@
|
||||
}
|
||||
|
||||
.text-field-right {
|
||||
width: calc(100% - 130px);
|
||||
width: calc(66.6% - 130px);
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
text-overflow: ellipsis;
|
||||
@@ -825,7 +825,7 @@
|
||||
overflow: visible;
|
||||
float: left;
|
||||
color: #040B29;
|
||||
font-weight: bold;
|
||||
/*font-weight: bold;*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -846,7 +846,7 @@
|
||||
}
|
||||
|
||||
.text-field-right {
|
||||
width: calc(100% - 130px);
|
||||
width: calc(66.6% - 130px);
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
text-overflow: ellipsis;
|
||||
@@ -855,7 +855,7 @@
|
||||
overflow: hidden;
|
||||
float: left;
|
||||
color: #040B29;
|
||||
font-weight: bold;
|
||||
/*font-weight: bold;*/
|
||||
}
|
||||
|
||||
.text-field-right-text {
|
||||
@@ -866,6 +866,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
/*.detail-box {*/
|
||||
/* padding: 0 0 0 170px;*/
|
||||
/* box-sizing: border-box;*/
|
||||
/*}*/
|
||||
|
||||
.detail-box {
|
||||
padding: 0 110px 0 110px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.page {
|
||||
text-align: right;
|
||||
margin-top: 20px;
|
||||
@@ -1007,28 +1017,28 @@
|
||||
}
|
||||
|
||||
.TextInformation-box {
|
||||
width: calc(50% - 10px);
|
||||
width: calc(33.3% - 10px);
|
||||
height: auto;
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
margin-right: 20px;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.TextInformation-box:nth-child(even) {
|
||||
.TextInformation-box:nth-child(3n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.TextInformation-box-title {
|
||||
background: #F5F6F7;
|
||||
background: #f3f6f6;
|
||||
border-radius: 4px;
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
height: 56px;
|
||||
height: 44px;
|
||||
padding: 0 16px;
|
||||
line-height: 56px;
|
||||
line-height: 44px;
|
||||
color: #040B29;
|
||||
font-weight: 400;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.TextInformation-box-box {
|
||||
@@ -1039,7 +1049,7 @@
|
||||
}
|
||||
|
||||
.TextInformation-box-box-text {
|
||||
width: calc(50% - 20px);
|
||||
width: 100%;
|
||||
margin-right: 20px;
|
||||
height: 36px;
|
||||
float: left;
|
||||
@@ -1058,7 +1068,7 @@
|
||||
.detail-content-right-text {
|
||||
color: #040B29;
|
||||
font-size: 14px;
|
||||
font-weight: bolder;
|
||||
/*font-weight: bolder;*/
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
border-left: 2px #CED0D8 solid;
|
||||
@@ -1109,7 +1119,16 @@
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
font-weight: bold;
|
||||
/*font-weight: bold;*/
|
||||
color: #01A0AC;
|
||||
}
|
||||
::v-deep .ant-table-column-title{
|
||||
font-weight: 400!important;
|
||||
color: #040B29!important;
|
||||
}
|
||||
|
||||
::v-deep .ant-table-column-title {
|
||||
font-weight: 400 !important;
|
||||
color: #040B29 !important;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user