diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxAqcsController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxAqcsController.java index f61314193..6fc60dfed 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxAqcsController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxAqcsController.java @@ -203,16 +203,17 @@ public class OtaBaCxAqcsController extends JeroController importData(@RequestParam(value = "file", required = false) MultipartFile file, @RequestParam(value = "cut", required = false) String cut, @RequestParam(value = "otaId", required = false) String otaId) throws Exception { + StringBuilder errMsg = new StringBuilder(); try { String[] params = otaId.split("\\?"); otaId = params[0].equals("null") ? "" : params[0]; cut = params[1].replace("cut=", ""); - this.otaBaCxJsfzbacsService.importData(file, otaId, cut); + this.otaBaCxJsfzbacsService.importData(file, otaId, cut, errMsg); } catch (Exception e) { e.printStackTrace(); return Result.error(e.getMessage()); } - return Result.OK(); + return Result.error(errMsg.toString()); } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxKsjjsmccsController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxKsjjsmccsController.java index b307e438d..8e5842398 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxKsjjsmccsController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxKsjjsmccsController.java @@ -200,16 +200,17 @@ public class OtaBaCxKsjjsmccsController extends JeroController importData(@RequestParam(value = "file", required = false) MultipartFile file, @RequestParam(value = "cut", required = false) String cut, @RequestParam(value = "otaId", required = false) String otaId) throws Exception { + StringBuilder errMsg = new StringBuilder(); try { String[] params = otaId.split("\\?"); otaId = params[0].equals("null") ? "" : params[0]; cut = params[1].replace("cut=", ""); - this.otaBaCxKsjjsmccsService.importData(file, otaId, cut); + this.otaBaCxKsjjsmccsService.importData(file, otaId, cut, errMsg); } catch (Exception e) { e.printStackTrace(); return Result.error(e.getMessage()); } - return Result.OK(); + return Result.error(errMsg.toString()); } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxKsjxtmccsController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxKsjxtmccsController.java index 027109d46..1f711357d 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxKsjxtmccsController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxKsjxtmccsController.java @@ -202,16 +202,17 @@ public class OtaBaCxKsjxtmccsController extends JeroController importData(@RequestParam(value = "file", required = false) MultipartFile file, @RequestParam(value = "cut", required = false) String cut, @RequestParam(value = "otaId", required = false) String otaId) throws Exception { + StringBuilder errMsg = new StringBuilder(); try { String[] params = otaId.split("\\?"); otaId = params[0].equals("null") ? "" : params[0]; cut = params[1].replace("cut=", ""); - this.otaBaCxKsjxtmccsService.importData(file, otaId, cut); + this.otaBaCxKsjxtmccsService.importData(file, otaId, cut, errMsg); } catch (Exception e) { e.printStackTrace(); return Result.error(e.getMessage()); } - return Result.OK(); + return Result.error(errMsg.toString()); } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxListController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxListController.java index b7a9c3405..7c5fe7bef 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxListController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxListController.java @@ -237,13 +237,15 @@ public class OtaBaCxListController extends JeroController importData(@RequestParam(value = "file", required = false) MultipartFile file, @RequestParam(value = "cut", required = false) String cut) throws Exception { + StringBuilder errMsg = new StringBuilder(); + errMsg.append("导入成功! 提示信息:"); try { - this.otaBaCxListService.importData(file, cut); + this.otaBaCxListService.importData(file, cut, errMsg); } catch (Exception e) { e.printStackTrace(); return Result.error(e.getMessage()); } - return Result.OK("导入成功"); + return Result.error(errMsg.toString()); } @ApiOperation(value = "车型及功能备案列表-数据导出") diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxZxsjyqController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxZxsjyqController.java index 2c4d488ec..d43f3164e 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxZxsjyqController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxZxsjyqController.java @@ -197,17 +197,18 @@ public class OtaBaCxZxsjyqController extends JeroController importData(@RequestParam(value = "file", required = false) MultipartFile file, @RequestParam(value = "cut", required = false) String cut, @RequestParam(value = "otaId", required = false) String otaId) throws Exception { + StringBuilder errMsg = new StringBuilder(); OtaBaCxZxsjyq res; try { String[] params = otaId.split("\\?"); otaId = params[0].equals("null") ? "" : params[0]; cut = params[1].replace("cut=", ""); - res = this.otaBaCxZxsjyqService.importData(file, otaId, cut); + res = this.otaBaCxZxsjyqService.importData(file, otaId, cut, errMsg); } catch (Exception e) { e.printStackTrace(); return Result.error(e.getMessage()); } - return Result.OK(res); + return Result.error(errMsg.toString()); } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjGgnrfsController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjGgnrfsController.java index bd9c51908..028a45963 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjGgnrfsController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjGgnrfsController.java @@ -202,16 +202,17 @@ public class OtaBaSjGgnrfsController extends JeroController importData(@RequestParam(value = "file", required = false) MultipartFile file, @RequestParam(value = "cut", required = false) String cut, @RequestParam(value = "otaId", required = false) String otaId) throws Exception { + StringBuilder errMsg = new StringBuilder(); try { String[] params = otaId.split("\\?"); otaId = params[0].equals("null") ? "" : params[0]; cut = params[1].replace("cut=", ""); - this.otaBaSjGgnrfsService.importData(file, otaId, cut); + this.otaBaSjGgnrfsService.importData(file, otaId, cut, errMsg); } catch (Exception e) { e.printStackTrace(); return Result.error(e.getMessage()); } - return Result.OK(); + return Result.error(errMsg.toString()); } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjListController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjListController.java index 51bd9d829..4bcd03f36 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjListController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjListController.java @@ -233,13 +233,14 @@ public class OtaBaSjListController extends JeroController importData(@RequestParam(value = "file", required = false) MultipartFile file, @RequestParam(value = "cut", required = false) String cut) throws Exception { + StringBuilder errMsg = new StringBuilder(); try { - this.otaBaSjListService.importData(file, cut); + this.otaBaSjListService.importData(file, cut, errMsg); } catch (Exception e) { e.printStackTrace(); return Result.error(e.getMessage()); } - return Result.OK("导入成功"); + return Result.error(errMsg.toString()); } @ApiOperation(value = "升级备案-数据导出") diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjfzbhController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjfzbhController.java index 092843d4f..53b0b05ee 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjfzbhController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjfzbhController.java @@ -200,16 +200,17 @@ public class OtaBaSjSjfzbhController extends JeroController importData(@RequestParam(value = "file", required = false) MultipartFile file, @RequestParam(value = "cut", required = false) String cut, @RequestParam(value = "otaId", required = false) String otaId) throws Exception { + StringBuilder errMsg = new StringBuilder(); try { String[] params = otaId.split("\\?"); otaId = params[0].equals("null") ? "" : params[0]; cut = params[1].replace("cut=", ""); - this.otaBaSjSjfzbhService.importData(file, otaId, cut); + this.otaBaSjSjfzbhService.importData(file, otaId, cut, errMsg); } catch (Exception e) { e.printStackTrace(); return Result.error(e.getMessage()); } - return Result.OK(); + return Result.error(errMsg.toString()); } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjmbclController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjmbclController.java index a0282f7b1..f72893bd1 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjmbclController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjmbclController.java @@ -195,16 +195,17 @@ public class OtaBaSjSjmbclController extends JeroController importData(@RequestParam(value = "file", required = false) MultipartFile file, @RequestParam(value = "cut", required = false) String cut, @RequestParam(value = "otaId", required = false) String otaId) throws Exception { + StringBuilder errMsg = new StringBuilder(); OtaBaSjSjmbcl res; try { String[] params = otaId.split("\\?"); otaId = params[0].equals("null") ? "" : params[0]; cut = params[1].replace("cut=", ""); - res = this.otaBaSjSjmbclService.importData(file, otaId, cut); + res = this.otaBaSjSjmbclService.importData(file, otaId, cut, errMsg); } catch (Exception e) { e.printStackTrace(); return Result.error(e.getMessage()); } - return Result.OK(res); + return Result.error(errMsg.toString()); } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjmbcxController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjmbcxController.java index da1396afe..aad8350d5 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjmbcxController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjmbcxController.java @@ -196,17 +196,18 @@ public class OtaBaSjSjmbcxController extends JeroController importData(@RequestParam(value = "file", required = false) MultipartFile file, @RequestParam(value = "cut", required = false) String cut, @RequestParam(value = "otaId", required = false) String otaId) throws Exception { + StringBuilder errMsg = new StringBuilder(); OtaBaSjSjmbcx res; try { String[] params = otaId.split("\\?"); otaId = params[0].equals("null") ? "" : params[0]; cut = params[1].replace("cut=", ""); - res = this.otaBaSjSjmbcxService.importData(file, otaId, cut); + res = this.otaBaSjSjmbcxService.importData(file, otaId, cut, errMsg); } catch (Exception e) { e.printStackTrace(); return Result.error(e.getMessage()); } - return Result.OK(res); + return Result.error(errMsg.toString()); } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjxtbhController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjxtbhController.java index 8aaf94b89..93a1d106a 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjxtbhController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjxtbhController.java @@ -202,16 +202,17 @@ public class OtaBaSjSjxtbhController extends JeroController importData(@RequestParam(value = "file", required = false) MultipartFile file, @RequestParam(value = "cut", required = false) String cut, @RequestParam(value = "otaId", required = false) String otaId) throws Exception { + StringBuilder errMsg = new StringBuilder(); try { String[] params = otaId.split("\\?"); otaId = params[0].equals("null") ? "" : params[0]; cut = params[1].replace("cut=", ""); - this.otaBaSjSjxtbhService.importData(file, otaId, cut); + this.otaBaSjSjxtbhService.importData(file, otaId, cut, errMsg); } catch (Exception e) { e.printStackTrace(); return Result.error(e.getMessage()); } - return Result.OK(); + return Result.error(errMsg.toString()); } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjyxpgController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjyxpgController.java index 903148732..f869ab979 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjyxpgController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjSjyxpgController.java @@ -201,17 +201,18 @@ public class OtaBaSjSjyxpgController extends JeroController importData(@RequestParam(value = "file", required = false) MultipartFile file, @RequestParam(value = "cut", required = false) String cut, @RequestParam(value = "otaId", required = false) String otaId) throws Exception { + StringBuilder errMsg = new StringBuilder(); OtaBaSjSjyxpg res; try { String[] params = otaId.split("\\?"); otaId = params[0].equals("null") ? "" : params[0]; cut = params[1].replace("cut=", ""); - res = this.otaBaSjSjyxpgService.importData(file, params[0], cut); + res = this.otaBaSjSjyxpgService.importData(file, params[0], cut, errMsg); } catch (Exception e) { e.printStackTrace(); return Result.error(e.getMessage()); } - return Result.OK(res); + return Result.error(errMsg.toString()); } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaCxAqcs.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaCxAqcs.java index fd3829332..4c0969128 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaCxAqcs.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaCxAqcs.java @@ -102,4 +102,8 @@ public class OtaBaCxAqcs implements Serializable { @TableField(exist = false) private List zmclList = new ArrayList<>(); + public void addZmcl(AttachmentEO zmcl) { + this.zmclList.add(zmcl); + } + } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaCxZxsjyq.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaCxZxsjyq.java index 24984285d..a0f85f1d0 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaCxZxsjyq.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaCxZxsjyq.java @@ -25,107 +25,146 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize; /** * @Description: 车型备案-在线升级要求 * @Author: jero-boot - * @Date: 2023-03-17 + * @Date: 2023-03-17 * @Version: V1.0 */ @Data @TableName("ota_ba_cx_zxsjyq") @Accessors(chain = true) @EqualsAndHashCode(callSuper = false) -@ApiModel(value="ota_ba_cx_zxsjyq对象", description="车型备案-在线升级要求") +@ApiModel(value = "ota_ba_cx_zxsjyq对象", description = "车型备案-在线升级要求") public class OtaBaCxZxsjyq implements Serializable { private static final long serialVersionUID = 1L; - /**主键*/ - @TableId(type = IdType.ASSIGN_ID) + /** + * 主键 + */ + @TableId(type = IdType.ASSIGN_ID) @ApiModelProperty(value = "主键") private java.lang.String id; - /**创建人*/ + /** + * 创建人 + */ @ApiModelProperty(value = "创建人") private java.lang.String createBy; - /**创建日期*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + /** + * 创建日期 + */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @ApiModelProperty(value = "创建日期") private java.util.Date createTime; - /**更新人*/ + /** + * 更新人 + */ @ApiModelProperty(value = "更新人") private java.lang.String updateBy; - /**更新日期*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + /** + * 更新日期 + */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @ApiModelProperty(value = "更新日期") private java.util.Date updateTime; - /**所属部门*/ + /** + * 所属部门 + */ @ApiModelProperty(value = "所属部门") private java.lang.String sysOrgCode; - /**otaId*/ - @Excel(name = "otaId", width = 15) + /** + * otaId + */ + @Excel(name = "otaId", width = 15) @ApiModelProperty(value = "otaId") private java.lang.String otaId; - /**保护升级包*/ - @Excel(name = "保护升级包", width = 15) + /** + * 保护升级包 + */ + @Excel(name = "保护升级包", width = 15) @ApiModelProperty(value = "保护升级包") private java.lang.String bhsjb; - /**保护车辆版本*/ - @Excel(name = "保护车辆版本", width = 15) + /** + * 保护车辆版本 + */ + @Excel(name = "保护车辆版本", width = 15) @ApiModelProperty(value = "保护车辆版本") private java.lang.String bhclbb; - /**车辆更新能力*/ - @Excel(name = "车辆更新能力", width = 15) + /** + * 车辆更新能力 + */ + @Excel(name = "车辆更新能力", width = 15) @ApiModelProperty(value = "车辆更新能力") private java.lang.String clgxnl; - /**车辆升级条件*/ - @Excel(name = "车辆升级条件", width = 15) + /** + * 车辆升级条件 + */ + @Excel(name = "车辆升级条件", width = 15) @ApiModelProperty(value = "车辆升级条件") private java.lang.String clsjtj; - /**车辆升级所需电量*/ - @Excel(name = "车辆升级所需电量", width = 15) + /** + * 车辆升级所需电量 + */ + @Excel(name = "车辆升级所需电量", width = 15) @ApiModelProperty(value = "车辆升级所需电量") private java.lang.String clsjdl; - /**升级保护车辆安全*/ - @Excel(name = "升级保护车辆安全", width = 15) + /** + * 升级保护车辆安全 + */ + @Excel(name = "升级保护车辆安全", width = 15) @ApiModelProperty(value = "升级保护车辆安全") private java.lang.String sjbhaq; - /**升级所满足的安全条件*/ - @Excel(name = "升级所满足的安全条件", width = 15) + /** + * 升级所满足的安全条件 + */ + @Excel(name = "升级所满足的安全条件", width = 15) @ApiModelProperty(value = "升级所满足的安全条件") private java.lang.String sjantj; - /**升级失败安全状态*/ - @Excel(name = "升级失败安全状态", width = 15) + /** + * 升级失败安全状态 + */ + @Excel(name = "升级失败安全状态", width = 15) @ApiModelProperty(value = "升级失败安全状态") private java.lang.String sjsbaq; - /**升级公告*/ - @Excel(name = "升级公告", width = 15) + /** + * 升级公告 + */ + @Excel(name = "升级公告", width = 15) @ApiModelProperty(value = "升级公告") private java.lang.String sjgg; - /**升级结果状态*/ - @Excel(name = "升级结果状态", width = 15) + /** + * 升级结果状态 + */ + @Excel(name = "升级结果状态", width = 15) @ApiModelProperty(value = "升级结果状态") private java.lang.String sjzt; - /**证明材料*/ - @Excel(name = "证明材料", width = 15) + /** + * 证明材料 + */ + @Excel(name = "证明材料", width = 15) @ApiModelProperty(value = "证明材料") private java.lang.String zmcl; @TableField(exist = false) private List zmclList = new ArrayList<>(); + public void addZmcl(AttachmentEO zmcl) { + this.zmclList.add(zmcl); + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaSjSjfzbh.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaSjSjfzbh.java index 6fab9f1b6..db1ef0c21 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaSjSjfzbh.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaSjSjfzbh.java @@ -3,11 +3,13 @@ package com.jero.modules.ota.entity; import java.io.Serializable; import java.io.UnsupportedEncodingException; import java.math.BigDecimal; + import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.StringUtils; import org.springframework.format.annotation.DateTimeFormat; import org.jeecgframework.poi.excel.annotation.Excel; import com.jero.common.aspect.annotation.Dict; @@ -21,89 +23,144 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize; /** * @Description: 升级备案-本次升级的驾驶辅助功能与参数变化 * @Author: jero-boot - * @Date: 2023-03-17 + * @Date: 2023-03-17 * @Version: V1.0 */ @Data @TableName("ota_ba_sj_sjfzbh") @Accessors(chain = true) @EqualsAndHashCode(callSuper = false) -@ApiModel(value="ota_ba_sj_sjfzbh对象", description="升级备案-本次升级的驾驶辅助功能与参数变化") +@ApiModel(value = "ota_ba_sj_sjfzbh对象", description = "升级备案-本次升级的驾驶辅助功能与参数变化") public class OtaBaSjSjfzbh implements Serializable { private static final long serialVersionUID = 1L; - /**主键*/ - @TableId(type = IdType.ASSIGN_ID) + /** + * 主键 + */ + @TableId(type = IdType.ASSIGN_ID) @ApiModelProperty(value = "主键") private java.lang.String id; - /**创建人*/ + /** + * 创建人 + */ @ApiModelProperty(value = "创建人") private java.lang.String createBy; - /**创建日期*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + /** + * 创建日期 + */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @ApiModelProperty(value = "创建日期") private java.util.Date createTime; - /**更新人*/ + /** + * 更新人 + */ @ApiModelProperty(value = "更新人") private java.lang.String updateBy; - /**更新日期*/ - @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + /** + * 更新日期 + */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @ApiModelProperty(value = "更新日期") private java.util.Date updateTime; - /**所属部门*/ + /** + * 所属部门 + */ @ApiModelProperty(value = "所属部门") private java.lang.String sysOrgCode; - /**otaId*/ - @Excel(name = "otaId", width = 15) + /** + * otaId + */ + @Excel(name = "otaId", width = 15) @ApiModelProperty(value = "otaId") private java.lang.String otaId; - /**功能名称*/ - @Excel(name = "功能名称", width = 15) + /** + * 功能名称 + */ + @Excel(name = "功能名称", width = 15) @ApiModelProperty(value = "功能名称") private java.lang.String gnmc; - /**升级目的类型*/ - @Excel(name = "升级目的类型", width = 15) + /** + * 升级目的类型 + */ + @Excel(name = "升级目的类型", width = 15) @ApiModelProperty(value = "升级目的类型") private java.lang.String sjmdlx; - /**升级前已变更《公告》参数的对应调整*/ - @Excel(name = "升级前已变更《公告》参数的对应调整", width = 15) + /** + * 升级前已变更《公告》参数的对应调整 + */ + @Excel(name = "升级前已变更《公告》参数的对应调整", width = 15) @ApiModelProperty(value = "升级前已变更《公告》参数的对应调整") private java.lang.String sjqbgcs; - /**升级后已变更《公告》参数的对应调整*/ - @Excel(name = "升级后已变更《公告》参数的对应调整", width = 15) + /** + * 升级后已变更《公告》参数的对应调整 + */ + @Excel(name = "升级后已变更《公告》参数的对应调整", width = 15) @ApiModelProperty(value = "升级后已变更《公告》参数的对应调整") private java.lang.String sjhbgcs; - /**功能变更描述*/ - @Excel(name = "功能变更描述", width = 15) + /** + * 功能变更描述 + */ + @Excel(name = "功能变更描述", width = 15) @ApiModelProperty(value = "功能变更描述") private java.lang.String gnbgms; - /**适用条件变更*/ - @Excel(name = "适用条件变更", width = 15) + /** + * 适用条件变更 + */ + @Excel(name = "适用条件变更", width = 15) @ApiModelProperty(value = "适用条件变更") private java.lang.String sytjbg; - /**升级涉及的电子控制器*/ - @Excel(name = "升级涉及的电子控制器", width = 15) + /** + * 升级涉及的电子控制器 + */ + @Excel(name = "升级涉及的电子控制器", width = 15) @ApiModelProperty(value = "升级涉及的电子控制器") private java.lang.String sjsjkzq; - /**附件*/ - @Excel(name = "附件", width = 15) + /** + * 附件 + */ + @Excel(name = "附件", width = 15) @ApiModelProperty(value = "附件") private java.lang.String fj; + public boolean isNull() { + if (StringUtils.isNotEmpty(gnmc)) { + return false; + } + if (StringUtils.isNotEmpty(sjmdlx)) { + return false; + } + if (StringUtils.isNotEmpty(sjqbgcs)) { + return false; + } + if (StringUtils.isNotEmpty(sjhbgcs)) { + return false; + } + if (StringUtils.isNotEmpty(gnbgms)) { + return false; + } + if (StringUtils.isNotEmpty(sytjbg)) { + return false; + } + if (StringUtils.isNotEmpty(sjsjkzq)) { + return false; + } + return true; + } + } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/enums/OtaTitleEnum.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/enums/OtaTitleEnum.java index 7145c18d1..ef7da7c50 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/enums/OtaTitleEnum.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/enums/OtaTitleEnum.java @@ -3,215 +3,221 @@ package com.jero.modules.ota.enums; public enum OtaTitleEnum { - CPDJBH("cpdjbh", "产品登记编号", "0"), - GGPC("ggpc", "公告批次", "0"), - CPSB("cpsb", "产品商标", "0"), - CPMC("cpmc", "产品名称", "0"), - CPXH("cpxh", "产品型号", "0"), - BAZT("bazt", "备案状态", "recordstatus"), - BATJSJ("batjsj", "备案提交时间", "0"), - CJSJ("cjsj", "创建时间", "0"), - BZ("bz", "备注", "0"), + CPDJBH("cpdjbh", "产品登记编号", "0", "Product registration number", 50), + GGPC("ggpc", "公告批次", "0", "Notice batch", 500), + CPSB("cpsb", "产品商标", "0", "Product Trademark", 50), + CPMC("cpmc", "产品名称", "0", "Product Name", 50), + CPXH("cpxh", "产品型号", "0", "Product Model", 50), + BAZT("bazt", "备案状态", "recordstatus", "Record status", 0), + BATJSJ("batjsj", "备案提交时间", "0", "Filing time", 50), + CJSJ("cjsj", "创建时间", "0", "Create Time", 50), + BZ("bz", "备注", "0", "remarks", 500), - CXMB("cxmb", "车型模板", "0"), -// QYMC("qymc", "企业名称", "0"), - DJBH("djbh", "产品登记编号", "0"), - CPLB("cplb", "产品类别", "product_category"), - DLLX1("dllx1", "车辆动力类型", "0"), - DLLX2("dllx2", "车辆动力类型", "0"), - TXZD("txzd", "通信终端", "communication_terminal"), - CDOTASJ("cdotasj", "车端OTA升级管理系统", "0"), + CXMB("cxmb", "车型模板", "0", "Model template", 500), + // QYMC("qymc", "企业名称", "0","enterprise name ",0), + DJBH("djbh", "产品登记编号", "0", "Product Registration Number ", 50), + CPLB("cplb", "产品类别", "product_category", "Product category", 0), + DLLX1("dllx1", "车辆动力类型", "0", "Vehicle Power Type", 50), + DLLX2("dllx2", "车辆动力类型", "0", "Vehicle Power Type", 50), + TXZD("txzd", "通信终端", "communication_terminal", "communication terminal", 0), + CDOTASJ("cdotasj", "车端OTA升级管理系统", "0", "OTA Upgrade Management System", 500), - BHSJB("bhsjb", "激光雷达-应保护升级包的真实性和完整性,以合理地防止其受到损害,并合理地防止无效升级", "2"), - BHCLBB("bhclbb", "激光雷达-应保护车辆上的软件版本(集),防止未经授权的修改", "2"), - CLGXNL("clgxnl", "升级功能要求-车辆应具备更新软件版本(集)的能力,应通过使用电子通信接口,至少用过标准接口(如OBD端口),以标准化的方式易于读取", "2"), - CLSJTJ("clsjtj", "升级功能要求-应确保车辆在执行软件升级之前满足先决条件", "2"), - CLSJDL("clsjdl", "升级功能要求-应确保只有当车辆有充足电量完成升级过程时,才能执行软件升级(包括可能恢复到以前版本或使车辆进入安全状态所需的电量)", "2"), - SJBHAQ("sjbhaq", "升级功能要求-当执行升级可能影响车辆安全时,应在升级执行过程中通过技术手段确保车辆安全", "2"), - SJANTJ("sjantj", "升级功能要求-若升级的执行影响驾驶安全,至少应满足: (a)确保升级执行期间无法驾驶车辆; (b)确保驾驶员不能使用任何可能影响车辆安全或成功执行升级的车辆功能", "2"), - SJSBAQ("sjsbaq", "升级功能要求-车辆能够恢复到以前的可用版本,或确保车辆处于安全状态。", "2"), - SJGG("sjgg", "用户告知要求-在升级执行前,应告知车辆用户升级信息,告知的信息应包括: (a)升级目的; (b)车辆功能升级所实施的任何变更; (c)完成升级执行的预计时间; (d)升级执行期间可能不可用的任何车辆功能; (e)可能帮助车辆用户安全执行升级的任何指导信息。", "2"), - SJZT("sjzt", "用户告知要求-在执行升级后,车辆应: (a)告知车辆用户车辆升级的结果(成功或失败); (b)若升级成功,告知车辆用户已实施的变更,用户手册(如果适用)的任何相关更新。", "2"), + BHSJB("bhsjb", "激光雷达-应保护升级包的真实性和完整性,以合理地防止其受到损害,并合理地防止无效升级", "2", "LiDAR - Shall protect the authenticity and integrity of the upgrade package to reasonably prevent damage to it and reasonably prevent ineffective upgrades", 0), + BHCLBB("bhclbb", "激光雷达-应保护车辆上的软件版本(集),防止未经授权的修改", "2", "Lidar - Software Versions on Vehicles should be protected (set) against unauthorized modifications", 0), + CLGXNL("clgxnl", "升级功能要求-车辆应具备更新软件版本(集)的能力,应通过使用电子通信接口,至少用过标准接口(如OBD端口),以标准化的方式易于读取", "2", "Upgrade function Requirements - The vehicle shall have the ability to update the software version (set) and shall be easily read in a standardized manner by using an electronic communication interface that has at least used a standard interface (such as an OBD port)", 0), + CLSJTJ("clsjtj", "升级功能要求-应确保车辆在执行软件升级之前满足先决条件", "2", "Upgrade function Requirements - should ensure that vehicle meets prerequisites before performing software upgrade", 0), + CLSJDL("clsjdl", "升级功能要求-应确保只有当车辆有充足电量完成升级过程时,才能执行软件升级(包括可能恢复到以前版本或使车辆进入安全状态所需的电量)", "2", "Upgrade Function Requirements - It shall be ensured that software upgrades (including the amount of power that may be required to restore to a previous version or bring the vehicle into a safe condition) are performed only when the vehicle has sufficient power to complete the upgrade process", 0), + SJBHAQ("sjbhaq", "升级功能要求-当执行升级可能影响车辆安全时,应在升级执行过程中通过技术手段确保车辆安全", "2", "Upgrade function Requirements - When performing an upgrade may affect the safety of the vehicle, the safety of the vehicle shall be ensured by technical means during the execution of the upgrade", 0), + SJANTJ("sjantj", "升级功能要求-若升级的执行影响驾驶安全,至少应满足: (a)确保升级执行期间无法驾驶车辆; (b)确保驾驶员不能使用任何可能影响车辆安全或成功执行升级的车辆功能", "2", "", 0), + SJSBAQ("sjsbaq", "升级功能要求-车辆能够恢复到以前的可用版本,或确保车辆处于安全状态。", "2", "Upgrade Function Requirements - If the execution of the upgrade affects driving safety, it shall at least: (a) ensure that the vehicle cannot be driven during the execution of the upgrade; (b) Ensure that the driver cannot use any vehicle feature that may affect the safety of the vehicle or the successful execution of the upgrade", 0), + SJGG("sjgg", "用户告知要求-在升级执行前,应告知车辆用户升级信息,告知的信息应包括: (a)升级目的; (b)车辆功能升级所实施的任何变更; (c)完成升级执行的预计时间; (d)升级执行期间可能不可用的任何车辆功能; (e)可能帮助车辆用户安全执行升级的任何指导信息。", "2", "", 0), + SJZT("sjzt", "用户告知要求-在执行升级后,车辆应: (a)告知车辆用户车辆升级的结果(成功或失败); (b)若升级成功,告知车辆用户已实施的变更,用户手册(如果适用)的任何相关更新。", "2", "Upgrade feature requirements - The ability to restore the vehicle to a previously available version, or to ensure that the vehicle is in a safe condition.", 0), - BHJZ("bhjz", "真实性、完整性保护机制", "protection_mechanism"), - FSXJZ("fsxjz", "防失效保护机制", "fail_safe_mechanism"), - SJSBCS("sjsbcs", "升级失败后车辆安全措施", "upgrade_failure"), - XXAQJZ("xxaqjz", "信息安全机制", "Information_security_mechanism"), + BHJZ("bhjz", "真实性、完整性保护机制", "protection_mechanism", "", 0), + FSXJZ("fsxjz", "防失效保护机制", "fail_safe_mechanism", "", 0), + SJSBCS("sjsbcs", "升级失败后车辆安全措施", "upgrade_failure", "", 0), + XXAQJZ("xxaqjz", "信息安全机制", "Information_security_mechanism", "", 0), - XTLB("xtlb", "系统类别", "0"), - SFKSJ("sfksj", "是否可升级", "2"), - SJBGCS("sjbgcs", "升级可能变更的《公告》技术参数", "0"), - //TPT("tpt", "系统-电子控制器架构拓扑图(附件需含拓扑图介绍)", "0"), - KZQMC("kzqmc", "电子控制器名称", "0"), - AQWZXDJ("aqwzxdj", "电子控制器汽车安全完整性等级(ASIL)", "0"), - KZQSCQY("kzqscqy", "电子控制器生产企业", "0"), - KZQXH("kzqxh", "电子控制器型号", "0"), - YJBBXX("yjbbxx", "硬件版本信息", "0"), - CSRJBBH("csrjbbh", "初始软件版本号", "0"), - CSRJBWZSJ("csrjbwzsj", "初始软件包的完整性验证数据", "0"), - SJSFYX("sjsfyx", "升级是否影响整车安全、节能、环保、防盗等性能", "0"), - CZXTLX("czxtlx", "操作系统类型", "0"), - CZXTSCQY("czxtscqy", "操作系统生产企业", "0"), - CZXTBBH("czxtbbh", "软件版本号", "0"), + XTLB("xtlb", "系统类别", "0", "System class", 50), + SFKSJ("sfksj", "是否可升级", "2", "Whether it can be upgraded", 0), + SJBGCS("sjbgcs", "升级可能变更的《公告》技术参数", "0", "Upgrade Bulletin technical parameters that may change", 500), + //TPT("tpt", "系统-电子控制器架构拓扑图(附件需含拓扑图介绍)", "0","",0), + KZQMC("kzqmc", "电子控制器名称", "0", "Electronic controller name", 50), + AQWZXDJ("aqwzxdj", "电子控制器汽车安全完整性等级(ASIL)", "0", "", 50), + KZQSCQY("kzqscqy", "电子控制器生产企业", "0", "", 50), + KZQXH("kzqxh", "电子控制器型号", "0", "", 50), + YJBBXX("yjbbxx", "硬件版本信息", "0", "", 50), + CSRJBBH("csrjbbh", "初始软件版本号", "0", "", 50), + CSRJBWZSJ("csrjbwzsj", "初始软件包的完整性验证数据", "0", "", 50), + SJSFYX("sjsfyx", "升级是否影响整车安全、节能、环保、防盗等性能", "0", "", 50), + CZXTLX("czxtlx", "操作系统类型", "0", "", 50), + CZXTSCQY("czxtscqy", "操作系统生产企业", "0", "", 50), + CZXTBBH("czxtbbh", "软件版本号", "0", "", 50), - GNMC("gnmc", "功能名称", "0"), - PZQK("pzqk", "配置情况", "2"), - JSZDHJB("jszdhjb", "驾驶自动化级别", "driving_automation_level"), - SJGGCS("sjggcs", "升级可能变更的《公告》技术参数", "0"), - GNMS("gnms", "功能描述", "0"), - SYTJ("sytj", "适用条件(边界条件)", "0"), - RJKFQY("rjkfqy", "软件开发企业", "0"), - CSYZSJ("csyzsj", "初始软件包的完整性验证数据", "0"), - FJ("fj", "附件", "0"), + GNMC("gnmc", "功能名称", "0", "", 50), + PZQK("pzqk", "配置情况", "2", "", 0), + JSZDHJB("jszdhjb", "驾驶自动化级别", "driving_automation_level", "", 0), + SJGGCS("sjggcs", "升级可能变更的《公告》技术参数", "0", "", 500), + GNMS("gnms", "功能描述", "0", "", 500), + SYTJ("sytj", "适用条件(边界条件)", "0", "", 500), + RJKFQY("rjkfqy", "软件开发企业", "0", "", 50), + CSYZSJ("csyzsj", "初始软件包的完整性验证数据", "0", "", 500), + FJ("fj", "附件", "0", "", 0), - WLAQYQ_PZ("jgldPz", "激光雷达-配置", "2"), - WLAQYQ_SL("jgldSl", "激光雷达-数量", "0"), - WLAQYQ_BZWZ("jgldBzwz", "激光雷达-布置位置", "0"), - WLAQYQ_GGXH("jgldGgxh", "激光雷达-规格型号", "0"), - WLAQYQ_SCQY("jgldScqy", "激光雷达-生产企业", "0"), - HMBLD_PZ("hmbldPz", "毫米波雷达-配置", "2"), - HMBLD_SL("hmbldSl", "毫米波雷达-数量", "0"), - HMBLD_BZWZ("hmbldBzwz", "毫米波雷达-布置位置", "0"), - HMBLD_GGXH("hmbldGgxh", "毫米波雷达-规格型号", "0"), - HMBLD_SCQY("hmbldScqy", "毫米波雷达-生产企业", "0"), - CSBLD_PZ("csbldPz", "超声波雷达-配置", "2"), - CSBLD_SL("csbldSl", "超声波雷达-数量", "0"), - CSBLD_BZWZ("csbldBzwz", "超声波雷达-布置位置", "0"), - CSBLD_GGXH("csbldGgxh", "超声波雷达-规格型号", "0"), - CSBLD_SCQY("csbldScqy", "超声波雷达-生产企业", "0"), - SXTHS_PZ("sxthsPz", "摄像头-倒车影像/360(环视)-配置", "2"), - SXTHS_SL("sxthsSl", "摄像头-倒车影像/360(环视)-数量", "0"), - SXTHS_BZWZ("sxthsBzwz", "摄像头-倒车影像/360(环视)-布置位置", "0"), - SXTHS_GGXH("sxthsGgxh", "摄像头-倒车影像/360(环视)-规格型号", "0"), - SXTHS_SCQY("sxthsScqy", "摄像头-倒车影像/360(环视)-生产企业", "0"), - SXTDSD_PZ("sxtdsdPz", "摄像头-单目/双目/多目-配置", "2"), - SXTDSD_SL("sxtdsdSl", "摄像头-单目双目多目-数量", "0"), - SXTDSD_BZWZ("sxtdsdBzwz", "摄像头-单目双多目-布置位置", "0"), - SXTDSD_GGXH("sxtdsdGgxh", "摄像头-单目/双目/多目-规格型号", "0"), - SXTDSD_SCQY("sxtdsdScqy", "摄像头-单目/双目/多目-生产企业", "0"), - JSYJK_PZ("jsyjkPz", "驾驶员注意力监测系统DMS-驾驶员监控摄像头-配置", "2"), - JSYJK_SL("jsyjkSl", "驾驶员注意力监测系统DMS-驾驶员监控摄像头-数量", "0"), - JSYJK_BZWZ("jsyjkBzwz", "驾驶员注意力监测系统DMS-驾驶员监控摄像头-布置位置", "0"), - JSYJK_GGXH("jsyjkGgxh", "驾驶员注意力监测系统DMS-驾驶员监控摄像头-规格型号", "0"), - JSYJK_SCQY("jsyjkScqy", "驾驶员注意力监测系统DMS-驾驶员监控摄像头-生产企业", "0"), - JSYHW_PZ("jsyhwPz", "驾驶员注意力监测系统DMS-驾驶员监控红外传感器-配置", "2"), - JSYHW_SL("jsyhwSl", "驾驶员注意力监测系统DMS-驾驶员监控红外传感器-数量", "0"), - JSYHW_BZWZ("jsyhwBzwz", "驾驶员注意力监测系统DMS-驾驶员监控红外传感器-布置位置", "0"), - JSYHW_GGXH("jsyhwGgxh", "驾驶员注意力监测系统DMS-驾驶员监控红外传感器-规格型号", "0"), - JSYHW_SCQY("jsyhwScqy", "驾驶员注意力监测系统DMS-驾驶员监控红外传感器-生产企业", "0"), - CZWXDW_PZ("czwxdwPz", "定位及导航系统-车载卫星定位设备(接收卫星信号及辅助定位信号的装置,PPP/GNSS/RTK)-配置", "2"), - CZWXDW_GGXH("czwxdwGgxh", "定位及导航系统-车载卫星定位设备(接收卫星信号及辅助定位信号的装置,PPP/GNSS/RTK)-规格型号", "0"), - CZWXDW_SCQY("czwxdwScqy", "定位及导航系统-车载卫星定位设备(接收卫星信号及辅助定位信号的装置,PPP/GNSS/RTK)-生产企业", "0"), - GXDH_PZ("gxdhPz", "定位及导航系统-惯性导航系统-配置", "2"), - GXDH_GGXH("gxdhGgxh", "定位及导航系统-惯性导航系统-规格型号", "0"), - GXDH_SCQY("gxdhScqy", "定位及导航系统-惯性导航系统-生产企业", "0"), - LSJ_PZ("lsjPz", "定位及导航系统-轮速计-配置", "2"), - LSJ_GGXH("lsjGgxh", "定位及导航系统-轮速计-规格型号", "0"), - LSJ_SCQY("lsjScqy", "定位及导航系统-轮速计-生产企业", "0"), - GJDDT_PZ("gjddtPz", "定位及导航系统-高精度地图-配置", "2"), - GJDDT_GGXH("gjddtGgxh", "定位及导航系统-高精度地图-规格型号", "0"), - GJDDT_SCQY("gjddtScqy", "定位及导航系统-高精度地图-生产企业", "0"), - DZWL_PZ("dzwlPz", "定位及导航系统-电子围栏-配置", "2"), - DZWL_DXXGCS("dzwlDxxgcs", "定位及导航系统-电子围栏-定性描述相关场所", "0"), - CZTX_PZ("cztxPz", "车载通信系统-配置", "2"), - CZTX_XTMC("cztxXtmc", "车载通信系统-系统名称", "0"), - CZTX_GGXH("cztxGgxh", "车载通信系统-规格型号", "0"), - CZTX_SCQY("cztxScqy", "车载通信系统-生产企业", "0"), - CZTX_BBH("cztxBbh", "车载通信系统-版本号", "0"), - CZTX_KFQY("cztxKfqy", "车载通信系统-软件开发企业", "0"), - JSFZCZJ_PZ("jsfzczjPz", "驾驶辅助系统操纵件、指示器及信号装置-驾驶辅助功能操纵件-配置", "2"), - JSFZCZJ_MC("jsfzczjMc", "驾驶辅助系统操纵件、指示器及信号装置-驾驶辅助功能操纵件-操纵件名称", "0"), - JSFZCZJ_YJXH("jsfzczjYjxh", "驾驶辅助系统操纵件、指示器及信号装置-驾驶辅助功能操纵件-硬件规格型号", "0"), - JSFZCZJ_SCQY("jsfzczjScqy", "驾驶辅助系统操纵件、指示器及信号装置-驾驶辅助功能操纵件-生产企业", "0"), - JSFZZSQ_PZ("jsfzzsqPz", "驾驶辅助系统操纵件、指示器及信号装置-驾驶辅助功能指示器/信号装置-配置", "2"), - JSFZZSQ_MC("jsfzzsqMc", "驾驶辅助系统操纵件、指示器及信号装置-驾驶辅助功能指示器/信号装置-指示器/信号装置名称", "0"), - JSFZZSQ_YJXH("jsfzzsqYjxh", "驾驶辅助系统操纵件、指示器及信号装置-驾驶辅助功能指示器/信号装置-硬件规格型号", "0"), - JSFZZSQ_SCQY("jsfzzsqScqy", "驾驶辅助系统操纵件、指示器及信号装置-驾驶辅助功能指示器/信号装置-生产企业", "0"), - FXPTSTS_PZ("fxptstsPz", "驾驶辅助系统操纵件、指示器及信号装置-方向盘脱手提示器/信号装置-配置", "2"), - FXPTSTS_MC("fxptstsMc", "驾驶辅助系统操纵件、指示器及信号装置-方向盘脱手提示器/信号装置-指示器/信号装置名称", "0"), - FXPTSTS_YJXH("fxptstsYjxh", "驾驶辅助系统操纵件、指示器及信号装置-方向盘脱手提示器/信号装置-硬件规格型号", "0"), - FXPTSTS_SCQY("fxptstsScqy", "驾驶辅助系统操纵件、指示器及信号装置-方向盘脱手提示器/信号装置-生产企业", "0"), - JSYZYLTS_PZ("jsyzyltsPz", "驾驶辅助系统操纵件、指示器及信号装置-驾驶员注意力提醒指示器/信号装置-配置", "2"), - JSYZYLTS_MC("jsyzyltsMc", "驾驶辅助系统操纵件、指示器及信号装置-驾驶员注意力提醒指示器/信号装置-指示器/信号装置名称", "0"), - JSYZYLTS_YJXH("jsyzyltsYjxh", "驾驶辅助系统操纵件、指示器及信号装置-驾驶员注意力提醒指示器/信号装置-硬件规格型号", "0"), - JSYZYLTS_SCQY("jsyzyltsScqy", "驾驶辅助系统操纵件、指示器及信号装置-驾驶员注意力提醒指示器/信号装置-生产企业", "0"), - DSSAD_PZ("dssadPz", "自动驾驶数据记录系统(DSSAD)-系统配置", "2"), - DSSAD_GGXH("dssadGgxh", "自动驾驶数据记录系统(DSSAD)-规格型号", "0"), - DSSAD_SCQY("dssadScqy", "自动驾驶数据记录系统(DSSAD)-生产企业", "0"), - EDR_PZ("edrPz", "事件数据记录系统(EDR)-配置", "2"), - EDR_GGXH("edrGgxh", "事件数据记录系统(EDR)-规格型号", "0"), - EDR_SCQY("edrScqy", "事件数据记录系统(EDR)-生产企业", "0"), + WLAQYQ_PZ("jgldPz", "激光雷达-配置", "2", "", 0), + WLAQYQ_SL("jgldSl", "激光雷达-数量", "0", "", 50), + WLAQYQ_BZWZ("jgldBzwz", "激光雷达-布置位置", "0", "", 50), + WLAQYQ_GGXH("jgldGgxh", "激光雷达-规格型号", "0", "", 0), + WLAQYQ_SCQY("jgldScqy", "激光雷达-生产企业", "0", "", 50), + HMBLD_PZ("hmbldPz", "毫米波雷达-配置", "2", "", 0), + HMBLD_SL("hmbldSl", "毫米波雷达-数量", "0", "", 50), + HMBLD_BZWZ("hmbldBzwz", "毫米波雷达-布置位置", "0", "", 50), + HMBLD_GGXH("hmbldGgxh", "毫米波雷达-规格型号", "0", "", 50), + HMBLD_SCQY("hmbldScqy", "毫米波雷达-生产企业", "0", "", 50), + CSBLD_PZ("csbldPz", "超声波雷达-配置", "2", "", 0), + CSBLD_SL("csbldSl", "超声波雷达-数量", "0", "", 50), + CSBLD_BZWZ("csbldBzwz", "超声波雷达-布置位置", "0", "", 50), + CSBLD_GGXH("csbldGgxh", "超声波雷达-规格型号", "0", "", 50), + CSBLD_SCQY("csbldScqy", "超声波雷达-生产企业", "0", "", 50), + SXTHS_PZ("sxthsPz", "摄像头-倒车影像/360(环视)-配置", "2", "", 0), + SXTHS_SL("sxthsSl", "摄像头-倒车影像/360(环视)-数量", "0", "", 50), + SXTHS_BZWZ("sxthsBzwz", "摄像头-倒车影像/360(环视)-布置位置", "0", "", 50), + SXTHS_GGXH("sxthsGgxh", "摄像头-倒车影像/360(环视)-规格型号", "0", "", 50), + SXTHS_SCQY("sxthsScqy", "摄像头-倒车影像/360(环视)-生产企业", "0", "", 50), + SXTDSD_PZ("sxtdsdPz", "摄像头-单目/双目/多目-配置", "2", "", 50), + SXTDSD_SL("sxtdsdSl", "摄像头-单目双目多目-数量", "0", "", 50), + SXTDSD_BZWZ("sxtdsdBzwz", "摄像头-单目双多目-布置位置", "0", "", 50), + SXTDSD_GGXH("sxtdsdGgxh", "摄像头-单目/双目/多目-规格型号", "0", "", 50), + SXTDSD_SCQY("sxtdsdScqy", "摄像头-单目/双目/多目-生产企业", "0", "", 50), + JSYJK_PZ("jsyjkPz", "驾驶员注意力监测系统DMS-驾驶员监控摄像头-配置", "2", "", 0), + JSYJK_SL("jsyjkSl", "驾驶员注意力监测系统DMS-驾驶员监控摄像头-数量", "0", "", 50), + JSYJK_BZWZ("jsyjkBzwz", "驾驶员注意力监测系统DMS-驾驶员监控摄像头-布置位置", "0", "", 50), + JSYJK_GGXH("jsyjkGgxh", "驾驶员注意力监测系统DMS-驾驶员监控摄像头-规格型号", "0", "", 50), + JSYJK_SCQY("jsyjkScqy", "驾驶员注意力监测系统DMS-驾驶员监控摄像头-生产企业", "0", "", 50), + JSYHW_PZ("jsyhwPz", "驾驶员注意力监测系统DMS-驾驶员监控红外传感器-配置", "2", "", 0), + JSYHW_SL("jsyhwSl", "驾驶员注意力监测系统DMS-驾驶员监控红外传感器-数量", "0", "", 50), + JSYHW_BZWZ("jsyhwBzwz", "驾驶员注意力监测系统DMS-驾驶员监控红外传感器-布置位置", "0", "", 50), + JSYHW_GGXH("jsyhwGgxh", "驾驶员注意力监测系统DMS-驾驶员监控红外传感器-规格型号", "0", "", 50), + JSYHW_SCQY("jsyhwScqy", "驾驶员注意力监测系统DMS-驾驶员监控红外传感器-生产企业", "0", "", 50), + CZWXDW_PZ("czwxdwPz", "定位及导航系统-车载卫星定位设备(接收卫星信号及辅助定位信号的装置,PPP/GNSS/RTK)-配置", "2", "", 0), + CZWXDW_GGXH("czwxdwGgxh", "定位及导航系统-车载卫星定位设备(接收卫星信号及辅助定位信号的装置,PPP/GNSS/RTK)-规格型号", "0", "", 50), + CZWXDW_SCQY("czwxdwScqy", "定位及导航系统-车载卫星定位设备(接收卫星信号及辅助定位信号的装置,PPP/GNSS/RTK)-生产企业", "0", "", 50), + GXDH_PZ("gxdhPz", "定位及导航系统-惯性导航系统-配置", "2", "", 0), + GXDH_GGXH("gxdhGgxh", "定位及导航系统-惯性导航系统-规格型号", "0", "", 50), + GXDH_SCQY("gxdhScqy", "定位及导航系统-惯性导航系统-生产企业", "0", "", 50), + LSJ_PZ("lsjPz", "定位及导航系统-轮速计-配置", "2", "", 0), + LSJ_GGXH("lsjGgxh", "定位及导航系统-轮速计-规格型号", "0", "", 50), + LSJ_SCQY("lsjScqy", "定位及导航系统-轮速计-生产企业", "0", "", 50), + GJDDT_PZ("gjddtPz", "定位及导航系统-高精度地图-配置", "2", "", 0), + GJDDT_GGXH("gjddtGgxh", "定位及导航系统-高精度地图-规格型号", "0", "", 50), + GJDDT_SCQY("gjddtScqy", "定位及导航系统-高精度地图-生产企业", "0", "", 50), + DZWL_PZ("dzwlPz", "定位及导航系统-电子围栏-配置", "2", "", 0), + DZWL_DXXGCS("dzwlDxxgcs", "定位及导航系统-电子围栏-定性描述相关场所", "0", "", 50), + CZTX_PZ("cztxPz", "车载通信系统-配置", "2", "", 0), + CZTX_XTMC("cztxXtmc", "车载通信系统-系统名称", "0", "", 50), + CZTX_GGXH("cztxGgxh", "车载通信系统-规格型号", "0", "", 50), + CZTX_SCQY("cztxScqy", "车载通信系统-生产企业", "0", "", 50), + CZTX_BBH("cztxBbh", "车载通信系统-版本号", "0", "", 50), + CZTX_KFQY("cztxKfqy", "车载通信系统-软件开发企业", "0", "", 50), + JSFZCZJ_PZ("jsfzczjPz", "驾驶辅助系统操纵件、指示器及信号装置-驾驶辅助功能操纵件-配置", "2", "", 0), + JSFZCZJ_MC("jsfzczjMc", "驾驶辅助系统操纵件、指示器及信号装置-驾驶辅助功能操纵件-操纵件名称", "0", "", 50), + JSFZCZJ_YJXH("jsfzczjYjxh", "驾驶辅助系统操纵件、指示器及信号装置-驾驶辅助功能操纵件-硬件规格型号", "0", "", 50), + JSFZCZJ_SCQY("jsfzczjScqy", "驾驶辅助系统操纵件、指示器及信号装置-驾驶辅助功能操纵件-生产企业", "0", "", 50), + JSFZZSQ_PZ("jsfzzsqPz", "驾驶辅助系统操纵件、指示器及信号装置-驾驶辅助功能指示器/信号装置-配置", "2", "", 0), + JSFZZSQ_MC("jsfzzsqMc", "驾驶辅助系统操纵件、指示器及信号装置-驾驶辅助功能指示器/信号装置-指示器/信号装置名称", "0", "", 50), + JSFZZSQ_YJXH("jsfzzsqYjxh", "驾驶辅助系统操纵件、指示器及信号装置-驾驶辅助功能指示器/信号装置-硬件规格型号", "0", "", 50), + JSFZZSQ_SCQY("jsfzzsqScqy", "驾驶辅助系统操纵件、指示器及信号装置-驾驶辅助功能指示器/信号装置-生产企业", "0", "", 50), + FXPTSTS_PZ("fxptstsPz", "驾驶辅助系统操纵件、指示器及信号装置-方向盘脱手提示器/信号装置-配置", "2", "", 0), + FXPTSTS_MC("fxptstsMc", "驾驶辅助系统操纵件、指示器及信号装置-方向盘脱手提示器/信号装置-指示器/信号装置名称", "0", "", 50), + FXPTSTS_YJXH("fxptstsYjxh", "驾驶辅助系统操纵件、指示器及信号装置-方向盘脱手提示器/信号装置-硬件规格型号", "0", "", 50), + FXPTSTS_SCQY("fxptstsScqy", "驾驶辅助系统操纵件、指示器及信号装置-方向盘脱手提示器/信号装置-生产企业", "0", "", 50), + JSYZYLTS_PZ("jsyzyltsPz", "驾驶辅助系统操纵件、指示器及信号装置-驾驶员注意力提醒指示器/信号装置-配置", "2", "", 0), + JSYZYLTS_MC("jsyzyltsMc", "驾驶辅助系统操纵件、指示器及信号装置-驾驶员注意力提醒指示器/信号装置-指示器/信号装置名称", "0", "", 50), + JSYZYLTS_YJXH("jsyzyltsYjxh", "驾驶辅助系统操纵件、指示器及信号装置-驾驶员注意力提醒指示器/信号装置-硬件规格型号", "0", "", 50), + JSYZYLTS_SCQY("jsyzyltsScqy", "驾驶辅助系统操纵件、指示器及信号装置-驾驶员注意力提醒指示器/信号装置-生产企业", "0", "", 50), + DSSAD_PZ("dssadPz", "自动驾驶数据记录系统(DSSAD)-系统配置", "2", "", 0), + DSSAD_GGXH("dssadGgxh", "自动驾驶数据记录系统(DSSAD)-规格型号", "0", "", 50), + DSSAD_SCQY("dssadScqy", "自动驾驶数据记录系统(DSSAD)-生产企业", "0", "", 50), + EDR_PZ("edrPz", "事件数据记录系统(EDR)-配置", "2", "", 0), + EDR_GGXH("edrGgxh", "事件数据记录系统(EDR)-规格型号", "0", "", 50), + EDR_SCQY("edrScqy", "事件数据记录系统(EDR)-生产企业", "0", "", 50), - BJMC("bjmc", "部件名称", "0"), - YJGGXH("yjggxh", "硬件规格型号", "0"), - YJSCQY("yjscqy", "硬件生产企业", "0"), - RJBB("rjbb", "软件版本", "0"), - BZWZ("bzwz", "布置位置", "0"), + BJMC("bjmc", "部件名称", "0", "", 50), + YJGGXH("yjggxh", "硬件规格型号", "0", "", 50), + YJSCQY("yjscqy", "硬件生产企业", "0", "", 50), + RJBB("rjbb", "软件版本", "0", "", 50), + BZWZ("bzwz", "布置位置", "0", "", 50), - SJBBHCS("sjbbhcs", "软件版本(集)识别与存储", "0"), + SJBBHCS("sjbbhcs", "软件版本(集)识别与存储", "0", "", 500), - BABH("babh", "备案编号", "0"), - BAPC("bapc", "备案批次", "0"), - ZSL("zsl", "总数量", "0"), - SCRQKS("scrqks", "生产日期开始", "3"), - SCRQJS("scrqjs", "生产日期结束", "3"), - VIN_LIST("vinList", "VIN码清单", "0"), - SJMD("sjmd", "升级目的", "uipgrade_purpose"), - SFBGCS("sfbgcs", "是否变更对应车型的《公告》技术参数", "2"), - JSXNBH("jsxnbh", "是否涉及性能变化", "2"), - FHGD("fhgd", "是否符合国家法律、行政法规、规章规定,以及道路机动车辆公告管理相关国家技术标准及安全技术条件等", "2"), - ZDJSXG("zdjsxg", "是否涉及汽车自动驾驶功能相关升级", "2"), - JRXXG("jrxxg", "兼容性评估相关", "2"), - ZXSJ("zxsj", "如何执行升级", "conditions_upgrades"), - AQJZ("aqjz", "升级失败或中断后,车辆采取的安全机制", "upgrade_failed"), - SFYXAQ("sfyxaq", "升级活动是否影响车辆安全", "2"), - YHQR("yhqr", "升级活动是否提供用户确认选项", "2"), - SJBCS("sjbcs", "升级包测试", "package_test"), - AQKKX("aqkkx", "是否已验证确认在线升级活动的安全性和可靠性", "2"), - // BGFJ("bgfj", "提供变更或扩展后的《公告》批次及证明材料", "0"), -// CLFJ("clfj", "提供证明材料", "0"), - XTMC("xtmc", "系统名称", "0"), - SJQBGCS("sjqbgcs", "升级前已变更《公告》参数的对应调整", "0"), - SJHBGCS("sjhbgcs", "升级后已变更《公告》参数的对应调整", "0"), - SJKZQMC("sjkzqmc", "升级的电子控制器名称", "0"), - YJBB("yjbb", "适配的硬件版本", "0"), - SJQRJBB("sjqrjbb", "软件版本号升级前", "0"), - SJHRJBB("sjhrjbb", "软件版本号升级后", "0"), - SJQCZXT("sjqczxt", "操作系统版本号升级前", "0"), - SJHCZXT("sjhczxt", "操作系统版本号升级后", "0"), - CSRJSJ("csrjsj", "初始软件包的完整性数据", "0"), - SJBYZSJ("sjbyzsj", "升级包完整性验证数据", "0"), - SJBDX("sjbdx", "升级包大小", "0"), - SFCFSJ("sfcfsj", "是否差分升级", "0"), - SJMDLX("sjmdlx", "升级目的类型", "0"), - GNBGMS("gnbgms", "功能变更描述", "0"), - SYTJBG("sytjbg", "适用条件变更", "0"), - SJSJKZQ("sjsjkzq", "升级涉及的电子控制器", "0"), - GXBH("gxbh", "由于软件升级活动而导致的车辆功能的任何变化", "0"), - SJSJ("sjsj", "升级执行预计时间(分钟)", "0"), - SJKY("sjky", "升级执行期问,车辆是否可用", "0"), - SJBKYGN("sjbkygn", "升级执行期间不可用的车辆功能", "0"), - ZDXX("zdxx", "帮助车辆用户安全执行升级的任何指导信息", "0"), - SJSFCG("sjsfcg", "告知用户升级成功或失败", "2"), - GZBG("gzbg", "告知实施的变更", "2"), - GZSCNR("gzscnr", "告知了对用户手册的全部更新内容", "2"), - GZYHFS("gzyhfs", "告知用户方式(可多选)", "user_notification_mode"), - // XGWJ("xgwj", "用户告知相关文件", "0"), - RWMC("rwmc", "任务名称", "0"), - SJFBSJ("sjfbsj", "升级发布时间", "3"), - SJJZSJ("sjjzsj", "升级计划截止时间", "3"); + BABH("babh", "备案编号", "0", "", 50), + BAPC("bapc", "备案批次", "0", "", 50), + ZSL("zsl", "总数量", "0", "", 50), + SCRQKS("scrqks", "生产日期开始", "3", "", 0), + SCRQJS("scrqjs", "生产日期结束", "3", "", 0), + VIN_LIST("vinList", "VIN码清单", "0", "", 500), + SJMD("sjmd", "升级目的", "uipgrade_purpose", "", 0), + SFBGCS("sfbgcs", "是否变更对应车型的《公告》技术参数", "2", "", 0), + JSXNBH("jsxnbh", "是否涉及性能变化", "2", "", 0), + FHGD("fhgd", "是否符合国家法律、行政法规、规章规定,以及道路机动车辆公告管理相关国家技术标准及安全技术条件等", "2", "", 0), + ZDJSXG("zdjsxg", "是否涉及汽车自动驾驶功能相关升级", "2", "", 0), + JRXXG("jrxxg", "兼容性评估相关", "2", "", 0), + ZXSJ("zxsj", "如何执行升级", "conditions_upgrades", "", 0), + AQJZ("aqjz", "升级失败或中断后,车辆采取的安全机制", "upgrade_failed", "", 0), + SFYXAQ("sfyxaq", "升级活动是否影响车辆安全", "2", "", 0), + YHQR("yhqr", "升级活动是否提供用户确认选项", "2", "", 0), + SJBCS("sjbcs", "升级包测试", "package_test", "", 0), + AQKKX("aqkkx", "是否已验证确认在线升级活动的安全性和可靠性", "2", "", 0), + // BGFJ("bgfj", "提供变更或扩展后的《公告》批次及证明材料", "0","",0), +// CLFJ("clfj", "提供证明材料", "0","",0), + XTMC("xtmc", "系统名称", "0", "", 50), + SJQBGCS("sjqbgcs", "升级前已变更《公告》参数的对应调整", "0", "", 500), + SJHBGCS("sjhbgcs", "升级后已变更《公告》参数的对应调整", "0", "", 500), + SJKZQMC("sjkzqmc", "升级的电子控制器名称", "0", "", 50), + YJBB("yjbb", "适配的硬件版本", "0", "", 50), + SJQRJBB("sjqrjbb", "软件版本号升级前", "0", "", 50), + SJHRJBB("sjhrjbb", "软件版本号升级后", "0", "", 50), + SJQCZXT("sjqczxt", "操作系统版本号升级前", "0", "", 50), + SJHCZXT("sjhczxt", "操作系统版本号升级后", "0", "", 50), + CSRJSJ("csrjsj", "初始软件包的完整性数据", "0", "", 500), + SJBYZSJ("sjbyzsj", "升级包完整性验证数据", "0", "", 500), + SJBDX("sjbdx", "升级包大小", "0", "", 50), + SFCFSJ("sfcfsj", "是否差分升级", "0", "", 50), + SJMDLX("sjmdlx", "升级目的类型", "0", "", 0), + GNBGMS("gnbgms", "功能变更描述", "0", "", 500), + SYTJBG("sytjbg", "适用条件变更", "0", "", 500), + SJSJKZQ("sjsjkzq", "升级涉及的电子控制器", "0", "", 500), + GXBH("gxbh", "由于软件升级活动而导致的车辆功能的任何变化", "0", "", 500), + SJSJ("sjsj", "升级执行预计时间(分钟)", "0", "", 50), + SJKY("sjky", "升级执行期问,车辆是否可用", "0", "", 50), + SJBKYGN("sjbkygn", "升级执行期间不可用的车辆功能", "0", "", 50), + ZDXX("zdxx", "帮助车辆用户安全执行升级的任何指导信息", "0", "", 500), + SJSFCG("sjsfcg", "告知用户升级成功或失败", "2", "", 0), + GZBG("gzbg", "告知实施的变更", "2", "", 0), + GZSCNR("gzscnr", "告知了对用户手册的全部更新内容", "2", "", 0), + GZYHFS("gzyhfs", "告知用户方式(可多选)", "user_notification_mode", "", 0), + // XGWJ("xgwj", "用户告知相关文件", "0","",0), + RWMC("rwmc", "任务名称", "0", "", 500), + SJFBSJ("sjfbsj", "升级发布时间", "3", "", 0), + SJJZSJ("sjjzsj", "升级计划截止时间", "3", "", 0); String name; String value; //0为不处理。1为数据字典2为处理是否 是1 否2 String type; + String valueEn; - OtaTitleEnum(String name, String value, String type) { + //字段限制长度 + int len; + + OtaTitleEnum(String name, String value, String type, String valueEn, int len) { this.name = name; this.value = value; this.type = type; + this.valueEn = valueEn; + this.len = len; } public String getName() { @@ -239,6 +245,22 @@ public enum OtaTitleEnum { this.type = type; } + public String getValueEn() { + return valueEn; + } + + public void setValueEn(String valueEn) { + this.valueEn = valueEn; + } + + public int getLen() { + return len; + } + + public void setLen(int len) { + this.len = len; + } + public static OtaTitleEnum getOtaTitleEnum(String name) { for (OtaTitleEnum e : values()) { if (e.getName().equals(name)) { diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxAqcsService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxAqcsService.java index 30fbd0593..58359daad 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxAqcsService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxAqcsService.java @@ -68,9 +68,9 @@ public interface IOtaBaCxAqcsService extends IService { void exportTemplate(HttpServletResponse response, HttpServletRequest request); - OtaBaCxAqcs importData(MultipartFile file, String otaId, String cut) throws Exception; + OtaBaCxAqcs importData(MultipartFile file, String otaId, String cut, StringBuilder errMsg) throws Exception; - OtaBaCxAqcs parseFileList(List upLoadFiles, String otaId, String cut) throws Exception; + OtaBaCxAqcs parseFileList(List upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception; void exportData(File file, File attFile, String otaId, String cut) throws Exception; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxJbxxService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxJbxxService.java index edaeaa803..360d3f1c0 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxJbxxService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxJbxxService.java @@ -41,6 +41,8 @@ public interface IOtaBaCxJbxxService extends IService { */ void deleteById(String id); + void deleteByOtaId(String id); + /** * 批量删除 * @@ -68,9 +70,9 @@ public interface IOtaBaCxJbxxService extends IService { void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception; - OtaBaCxJbxx importData(MultipartFile file, String otaId, String cut) throws Exception; + OtaBaCxJbxx importData(MultipartFile file, String otaId, String cut, StringBuilder errMsg) throws Exception; - OtaBaCxJbxx parseFileList(List upLoadFiles, String otaId, String cut) throws Exception; + OtaBaCxJbxx parseFileList(List upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception; void exportData(File file, String otaId, String cut) throws Exception; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxJsfzbacsService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxJsfzbacsService.java index 96b487e1f..b08b0ea21 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxJsfzbacsService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxJsfzbacsService.java @@ -68,9 +68,9 @@ public interface IOtaBaCxJsfzbacsService extends IService { void exportTemplate(HttpServletResponse response, HttpServletRequest request); - void importData(MultipartFile file, String otaId, String cut) throws Exception; + void importData(MultipartFile file, String otaId, String cut, StringBuilder errMsg) throws Exception; - void parseFileList(List upLoadFiles, String otaId, String cut) throws Exception; + void parseFileList(List upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception; void exportData(File file, String otaId, String cut) throws Exception; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxKsjjsmccsService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxKsjjsmccsService.java index b38a10abb..5b423a3f9 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxKsjjsmccsService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxKsjjsmccsService.java @@ -68,9 +68,9 @@ public interface IOtaBaCxKsjjsmccsService extends IService { void exportTemplate(HttpServletResponse response, HttpServletRequest request); - void importData(MultipartFile file, String otaId, String cut) throws Exception; + void importData(MultipartFile file, String otaId, String cut, StringBuilder errMsg) throws Exception; - void parseFileList(List upLoadFiles, String otaId, String cut) throws Exception; + void parseFileList(List upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception; void exportData(File file, File attFile, String otaId, String cut) throws Exception; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxKsjxtmccsService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxKsjxtmccsService.java index 3a5133cd0..97cf02357 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxKsjxtmccsService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxKsjxtmccsService.java @@ -68,9 +68,9 @@ public interface IOtaBaCxKsjxtmccsService extends IService { void exportTemplate(HttpServletResponse response, HttpServletRequest request); - void importData(MultipartFile file, String otaId, String cut) throws Exception; + void importData(MultipartFile file, String otaId, String cut, StringBuilder errMsg) throws Exception; - void parseFileList(List upLoadFiles, String otaId, String cut) throws Exception; + void parseFileList(List upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception; void exportData(File file, File attFile, String otaId, String cut) throws Exception; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxListService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxListService.java index 2d6663673..b55d818df 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxListService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxListService.java @@ -68,7 +68,7 @@ public interface IOtaBaCxListService extends IService { void exportTemplate(HttpServletResponse response, HttpServletRequest request); - void importData(MultipartFile file, String cut) throws Exception; + void importData(MultipartFile file, String cut, StringBuilder errMsg) throws Exception; void exportData(String otaId, HttpServletResponse response, HttpServletRequest request) throws Exception; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxQtService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxQtService.java index 87c533712..b6ae4e6a2 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxQtService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxQtService.java @@ -3,6 +3,7 @@ package com.jero.modules.ota.service; import com.jero.modules.ota.entity.OtaBaCxQt; import com.baomidou.mybatisplus.extension.service.IService; +import java.io.File; import java.util.List; /** @@ -61,4 +62,6 @@ public interface IOtaBaCxQtService extends IService { List queryList(); OtaBaCxQt queryByOtaId(String otaId, String otaIdT); + + void exportData(File file, String otaId, String cut) throws Exception; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxZxsjyqService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxZxsjyqService.java index f8e6cb910..7b79dc017 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxZxsjyqService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaCxZxsjyqService.java @@ -69,9 +69,9 @@ public interface IOtaBaCxZxsjyqService extends IService { void exportTemplate(HttpServletResponse response, HttpServletRequest request); - OtaBaCxZxsjyq importData(MultipartFile file, String otaId, String cut) throws Exception; + OtaBaCxZxsjyq importData(MultipartFile file, String otaId, String cut, StringBuilder errMsg) throws Exception; - OtaBaCxZxsjyq parseFileList(List upLoadFiles, String otaId, String cut) throws Exception; + OtaBaCxZxsjyq parseFileList(List upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception; void exportData(File file, File attFile,String otaId, String cut) throws Exception; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjGgnrfsService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjGgnrfsService.java index 8f0b59aea..0f41d278d 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjGgnrfsService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjGgnrfsService.java @@ -12,64 +12,65 @@ import java.util.List; /** * @Description: 升级备案-用户告知内容及方式 * @Author: jero-boot - * @Date: 2023-03-17 + * @Date: 2023-03-17 * @Version: V1.0 */ public interface IOtaBaSjGgnrfsService extends IService { - /** - * 保存 - * - * @param otaBaSjGgnrfs - * @return - */ + /** + * 保存 + * + * @param otaBaSjGgnrfs + * @return + */ void add(OtaBaSjGgnrfs otaBaSjGgnrfs); - /** - * 更新 - * - * @param otaBaSjGgnrfs - * @return - */ + /** + * 更新 + * + * @param otaBaSjGgnrfs + * @return + */ void editById(OtaBaSjGgnrfs otaBaSjGgnrfs); - /** - * 通过id删除 - * - * @param id - * @return - */ + /** + * 通过id删除 + * + * @param id + * @return + */ void deleteById(String id); - /** - * 批量删除 - * - * @param ids - * @return - */ + /** + * 批量删除 + * + * @param ids + * @return + */ void deleteByIds(List ids); - /** - * 通过id查询 - * - * @param id - * @return - */ + /** + * 通过id查询 + * + * @param id + * @return + */ OtaBaSjGgnrfs queryById(String id); /** - * 列表查询 - * - * @return - */ + * 列表查询 + * + * @return + */ List queryList(); OtaBaSjGgnrfs queryByOtaId(String otaId, String otaIdT); - void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception; + void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception; - void importData(MultipartFile file, String otaId, String cut) throws Exception; + void importData(MultipartFile file, String otaId, String cut, StringBuilder errMsg) throws Exception; - void parseFileList(List upLoadFiles, String otaId, String cut) throws Exception; + void parseFileList(List upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception; - void exportData(File file, String otaId, String cut) throws Exception;} + void exportData(File file, File fsAttFile, String otaId, String cut) throws Exception; +} diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjListService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjListService.java index d7b14bae9..8546e69e4 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjListService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjListService.java @@ -70,7 +70,7 @@ public interface IOtaBaSjListService extends IService { void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception; - void importData(MultipartFile file, String cut) throws Exception; + void importData(MultipartFile file, String cut, StringBuilder errMsg) throws Exception; void exportData(String otaId, HttpServletResponse response, HttpServletRequest request) throws Exception; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjQtsjxxService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjQtsjxxService.java index b446c94f9..6b36226f4 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjQtsjxxService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjQtsjxxService.java @@ -3,6 +3,8 @@ package com.jero.modules.ota.service; import com.jero.modules.ota.entity.OtaBaCxQt; import com.jero.modules.ota.entity.OtaBaSjQtsjxx; import com.baomidou.mybatisplus.extension.service.IService; + +import java.io.File; import java.util.List; /** @@ -61,4 +63,6 @@ public interface IOtaBaSjQtsjxxService extends IService { List queryList(); OtaBaSjQtsjxx queryByOtaId(String otaId, String otaIdT); + + void exportData(File file, String otaId, String cut) throws Exception; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjfzbhService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjfzbhService.java index ff3bfa535..a660411a0 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjfzbhService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjfzbhService.java @@ -69,9 +69,9 @@ public interface IOtaBaSjSjfzbhService extends IService { void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception; - void importData(MultipartFile file, String otaId, String cut) throws Exception; + void importData(MultipartFile file, String otaId, String cut, StringBuilder errMsg) throws Exception; - void parseFileList(List upLoadFiles, String otaId, String cut) throws Exception; + void parseFileList(List upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception; void exportData(File file, String otaId, String cut) throws Exception; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjmbclService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjmbclService.java index 2b63a87ef..31d68ecb2 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjmbclService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjmbclService.java @@ -69,9 +69,9 @@ public interface IOtaBaSjSjmbclService extends IService { void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception; - OtaBaSjSjmbcl parseFileList(List upLoadFiles, String otaId, String cut) throws Exception; + OtaBaSjSjmbcl parseFileList(List upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception; - OtaBaSjSjmbcl importData(MultipartFile file, String otaId, String cut) throws Exception; + OtaBaSjSjmbcl importData(MultipartFile file, String otaId, String cut, StringBuilder errMsg) throws Exception; - void exportData(File file, String otaId, String cut) throws Exception; + void exportData(File file, File mbclAttFile, String otaId, String cut) throws Exception; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjmbcxService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjmbcxService.java index 32be72b65..4695ad5bc 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjmbcxService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjmbcxService.java @@ -70,9 +70,9 @@ public interface IOtaBaSjSjmbcxService extends IService { void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception; - OtaBaSjSjmbcx importData(MultipartFile file, String otaId, String cut) throws Exception; + OtaBaSjSjmbcx importData(MultipartFile file, String otaId, String cut, StringBuilder errMsg) throws Exception; - OtaBaSjSjmbcx parseFileList(List upLoadFiles, String otaId, String cut) throws Exception; + OtaBaSjSjmbcx parseFileList(List upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception; void exportData(File file, String otaId, String cut) throws Exception; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjxtbhService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjxtbhService.java index 17b9bb40e..02b5f148d 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjxtbhService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjxtbhService.java @@ -67,9 +67,9 @@ public interface IOtaBaSjSjxtbhService extends IService { void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception; - void importData(MultipartFile file, String otaId, String cut) throws Exception; + void importData(MultipartFile file, String otaId, String cut, StringBuilder errMsg) throws Exception; - void parseFileList(List upLoadFiles, String otaId, String cut) throws Exception; + void parseFileList(List upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception; void exportData(File file, String otaId, String cut) throws Exception; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjyxpgService.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjyxpgService.java index fa3a37a04..cd020b1ce 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjyxpgService.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/IOtaBaSjSjyxpgService.java @@ -69,9 +69,9 @@ public interface IOtaBaSjSjyxpgService extends IService { void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception; - OtaBaSjSjyxpg importData(MultipartFile file, String otaId, String cut) throws Exception; + OtaBaSjSjyxpg importData(MultipartFile file, String otaId, String cut, StringBuilder errMsg) throws Exception; - OtaBaSjSjyxpg parseFileList(List upLoadFiles, String otaId, String cut) throws Exception; + OtaBaSjSjyxpg parseFileList(List upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception; - void exportData(File file, String otaId, String cut) throws Exception; + void exportData(File file, File attFile, File attFile2, String otaId, String cut) throws Exception; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxAqcsServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxAqcsServiceImpl.java index 849cc8289..bdeb49541 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxAqcsServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxAqcsServiceImpl.java @@ -25,6 +25,7 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import java.io.File; +import java.io.FileOutputStream; import java.io.InputStream; import java.util.List; import java.util.Date; @@ -78,20 +79,21 @@ public class OtaBaCxAqcsServiceImpl extends ServiceImpl 0) { JSONArray obj = new JSONArray(); for (AttachmentEO aeo : otaBaCxAqcs.getZmclList()) { obj.add(aeo); } otaBaCxAqcs.setZmcl(obj.toString()); + }else{ + otaBaCxAqcs.setZmcl(""); } if (ObjectUtils.isNotEmpty(otaBaCxAqcsOld) && StringUtils.isNotEmpty(otaBaCxAqcsOld.getZmcl())) { List aeoList = JSONArray.parseArray(otaBaCxAqcsOld.getZmcl(), AttachmentEO.class); otaBaCxAqcsOld.setZmclList(aeoList); + deleteById(otaBaCxAqcsOld.getId()); } deleteById(otaBaCxAqcs.getId()); - deleteById(otaBaCxAqcsOld.getId()); saveOrUpdate(otaBaCxAqcs); ComparisonUtil cu = new ComparisonUtil(); if (ObjectUtils.isEmpty(otaBaCxAqcsOld)) { @@ -207,14 +209,14 @@ public class OtaBaCxAqcsServiceImpl extends ServiceImpl upLoadFiles = ImportFileUtil.importZip(file, cut, uploadPath); - OtaBaCxAqcs aqcs = parseFileList(upLoadFiles, otaId, cut); + OtaBaCxAqcs aqcs = parseFileList(upLoadFiles, otaId, cut, errMsg); return aqcs; } @Override - public OtaBaCxAqcs parseFileList(List upLoadFiles, String otaId, String cut) throws Exception { + public OtaBaCxAqcs parseFileList(List upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception { File attFile = null; File upFile = null; for (File f : upLoadFiles) { @@ -227,13 +229,13 @@ public class OtaBaCxAqcsServiceImpl extends ServiceImpl list = ImportFileUtil.uploadFiles1(attFile, strs, ossFileService); + String attStr = ImportFileUtil.getCellValue(cell, wb); + String[] strs = attStr.split(","); + + List list = ImportFileUtil.uploadFiles1(attFile, strs, ossFileService,errMsg, "证明材料", cut); JSONArray obj = new JSONArray(); for (OSSFile f : list) { AttachmentEO aeo = new AttachmentEO(); aeo.setId(f.getId()); aeo.setFileName(f.getFileName()); obj.add(aeo); + aqcs.addZmcl(aeo); } aqcs.setZmcl(obj.toString()); return aqcs; @@ -278,19 +286,20 @@ public class OtaBaCxAqcsServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(OtaBaCxJbxx::getOtaId, id); + remove(queryWrapper); + } + /** * 批量删除 * @@ -174,14 +181,14 @@ public class OtaBaCxJbxxServiceImpl extends ServiceImpl upLoadFiles = ImportFileUtil.importZip(file, cut, uploadPath); - OtaBaCxJbxx jbxx = parseFileList(upLoadFiles, otaId, cut); + OtaBaCxJbxx jbxx = parseFileList(upLoadFiles, otaId, cut, errMsg); return jbxx; } @Override - public OtaBaCxJbxx parseFileList(List upLoadFiles, String otaId, String cut) throws Exception { + public OtaBaCxJbxx parseFileList(List upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception { File upFile = null; for (File f : upLoadFiles) { if (f.getName().equals("车型基本信息.xlsx")) { @@ -189,41 +196,47 @@ public class OtaBaCxJbxxServiceImpl extends ServiceImpl 50) { + throw new JeroBootException("产品编号字数超过50"); + } jbxx.setDjbh(cpbh); - row = s.getRow(3); - cell = row.getCell(1); - jbxx.setCplb(ImportFileUtil.getCellValue(cell, wb)); + row = s.getRow(4); cell = row.getCell(1); String ggpc = ImportFileUtil.getCellValue(cell, wb); - if (StringUtils.isEmpty(cpbh)) { - throw new JeroBootException("公告批次不能为空"); + if (StringUtils.isNotEmpty(ggpc)) { + List xxList = this.list(); + for (OtaBaCxJbxx xx : xxList) { + if (ggpc.equals(xx.getGgpc())) { + throw new JeroBootException("公告批次重复"); + } + } } - jbxx.setGgpc(ImportFileUtil.getCellValue(cell, wb)); - + jbxx.setGgpc(ggpc); + row = s.getRow(1); + cell = row.getCell(1); + jbxx.setQymc(ImportFileUtil.getCellValue(cell, wb)); + row = s.getRow(3); + cell = row.getCell(1); + jbxx.setCplb(ImportFileUtil.getCellValue(cell, wb)); row = s.getRow(5); cell = row.getCell(1); jbxx.setCpsb(ImportFileUtil.getCellValue(cell, wb)); @@ -245,6 +258,9 @@ public class OtaBaCxJbxxServiceImpl extends ServiceImpl reList = cu.comparisonRecord(otaId, OtaModuleEnum.CX_JSFZXTJCBACS, otaBaCxJsfzbacsOld, otaBaCxJsfzbacs, sysDictService); @@ -238,7 +239,7 @@ public class OtaBaCxJsfzbacsServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); @@ -252,14 +253,14 @@ public class OtaBaCxJsfzbacsServiceImpl extends ServiceImpl upLoadFiles = ImportFileUtil.importZip(file, cut, uploadPath); - parseFileList(upLoadFiles, otaId, cut); + parseFileList(upLoadFiles, otaId, cut, errMsg); } @Override - public void parseFileList(List upLoadFiles, String otaId, String cut) throws Exception { + public void parseFileList(List upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception { File upFile = null; for (File f : upLoadFiles) { if (f.getName().equals("驾驶辅助系统基础备案参数.xlsx")) { @@ -269,7 +270,7 @@ public class OtaBaCxJsfzbacsServiceImpl extends ServiceImpl oldList = OtaBaCxSjmkService.queryByOtaId(otaId); OtaBaCxSjmkService.deleteByOtaId(otaId); - List sjmkList = parseList(upFile, otaId, cut); + List sjmkList = parseList(upFile, otaId, cut, errMsg); if (ObjectUtils.isEmpty(oldList)) { oldList = new ArrayList<>(); } @@ -293,7 +294,7 @@ public class OtaBaCxJsfzbacsServiceImpl extends ServiceImpl parseList(File upFile, String otaId, String cut) throws Exception { + private List parseList(File upFile, String otaId, String cut, StringBuilder errMsg) throws Exception { Date now = new Date(); List sjmkList = new ArrayList<>(); Workbook wb = ImportFileUtil.readExcel(upFile); @@ -325,13 +326,15 @@ public class OtaBaCxJsfzbacsServiceImpl extends ServiceImpl upLoadFiles = ImportFileUtil.importZip(file, cut, uploadPath); - parseFileList(upLoadFiles, otaId, cut); + parseFileList(upLoadFiles, otaId, cut, errMsg); } @Override - public void parseFileList(List upLoadFiles, String otaId, String cut) throws Exception { + public void parseFileList(List upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception { File attFile = null; File upFile = null; for (File f : upLoadFiles) { @@ -263,7 +264,7 @@ public class OtaBaCxKsjjsmccsServiceImpl extends ServiceImpl(); } - List mccsList = parseFile(upFile, attFile, otaId, cut); + List mccsList = parseFile(upFile, attFile, otaId, cut, errMsg); ComparisonUtil cu = new ComparisonUtil(); List reList = cu.comparisonListRecord(otaId, OtaModuleEnum.CX_KZXSJDJSFZGNMCYCS, OtaTitleEnum.GNMC.getName(), oldList, mccsList, sysDictService); deleteByOtaId(otaId); @@ -272,7 +273,7 @@ public class OtaBaCxKsjjsmccsServiceImpl extends ServiceImpl parseFile(File upFile, File attFile, String otaId, String cut) throws Exception { + private List parseFile(File upFile, File attFile, String otaId, String cut, StringBuilder errMsg) throws Exception { Date now = new Date(); List mccsList = new ArrayList<>(); Workbook wb = ImportFileUtil.readExcel(upFile); @@ -290,7 +291,7 @@ public class OtaBaCxKsjjsmccsServiceImpl extends ServiceImpl upLoadFiles = ImportFileUtil.importZip(file, cut, uploadPath); - parseFileList(upLoadFiles, otaId, cut); + parseFileList(upLoadFiles, otaId, cut, errMsg); } @Override - public void parseFileList(List upLoadFiles, String otaId, String cut) throws Exception { + public void parseFileList(List upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception { File attFile = null; File upFile = null; for (File f : upLoadFiles) { @@ -330,7 +331,7 @@ public class OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl(); } - List mccsList = parseFile(upFile, attFile, otaId, cut); + List mccsList = parseFile(upFile, attFile, otaId, cut, errMsg); ComparisonUtil cu = new ComparisonUtil(); List reList = cu.comparisonListRecord(otaId, OtaModuleEnum.CX_KSJDXTMCYCS, OtaTitleEnum.XTLB.getName(), oldList, mccsList, sysDictService); deleteByOtaId(otaId); @@ -338,7 +339,7 @@ public class OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl parseFile(File upFile, File attFile, String otaId, String cut) throws Exception { + private List parseFile(File upFile, File attFile, String otaId, String cut, StringBuilder errMsg) throws Exception { Date now = new Date(); List mccsList = new ArrayList<>(); Workbook wb = ImportFileUtil.readExcel(upFile); @@ -356,7 +357,7 @@ public class OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl fileList = ImportFileUtil.importZip(file, cut, uploadPath); - OtaBaCxJbxx jbxx = otaBaCxJbxxService.parseFileList(fileList, "", cut); + OtaBaCxJbxx jbxx = otaBaCxJbxxService.parseFileList(fileList, "", cut, errMsg); String otaId = jbxx.getOtaId(); if (StringUtils.isNotEmpty(otaId)) { - otaBaCxZxsjyqService.parseFileList(fileList, otaId, cut); - otaBaCxAqcsService.parseFileList(fileList, otaId, cut); - otaBaCxKsjxtmccsService.parseFileList(fileList, otaId, cut); - otaBaCxKsjjsmccsService.parseFileList(fileList, otaId, cut); - otaBaCxJsfzbacsService.parseFileList(fileList, otaId, cut); + otaBaCxZxsjyqService.parseFileList(fileList, otaId, cut, errMsg); + otaBaCxAqcsService.parseFileList(fileList, otaId, cut, errMsg); + otaBaCxKsjxtmccsService.parseFileList(fileList, otaId, cut, errMsg); + otaBaCxKsjjsmccsService.parseFileList(fileList, otaId, cut, errMsg); + otaBaCxJsfzbacsService.parseFileList(fileList, otaId, cut, errMsg); } else { throw new JeroBootException("导入失败"); } @@ -213,6 +217,8 @@ public class OtaBaCxListServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); @@ -135,4 +143,16 @@ public class OtaBaCxQtServiceImpl extends ServiceImpl 0) { JSONArray obj = new JSONArray(); for (AttachmentEO aeo : otaBaCxZxsjyq.getZmclList()) { obj.add(aeo); } otaBaCxZxsjyq.setZmcl(obj.toString()); + } else { + otaBaCxZxsjyq.setZmcl(""); } if (ObjectUtils.isNotEmpty(otaBaCxZxsjyqOld) && StringUtils.isNotEmpty(otaBaCxZxsjyqOld.getZmcl())) { List aeoList = JSONArray.parseArray(otaBaCxZxsjyqOld.getZmcl(), AttachmentEO.class); @@ -199,14 +201,14 @@ public class OtaBaCxZxsjyqServiceImpl extends ServiceImpl upLoadFiles = ImportFileUtil.importZip(file, cut, uploadPath); - OtaBaCxZxsjyq otaBaCxZxsjyq = parseFileList(upLoadFiles, otaId, cut); + OtaBaCxZxsjyq otaBaCxZxsjyq = parseFileList(upLoadFiles, otaId, cut, errMsg); return otaBaCxZxsjyq; } @Override - public OtaBaCxZxsjyq parseFileList(List upLoadFiles, String otaId, String cut) throws Exception { + public OtaBaCxZxsjyq parseFileList(List upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception { File attFile = null; File upFile = null; for (File f : upLoadFiles) { @@ -219,13 +221,13 @@ public class OtaBaCxZxsjyqServiceImpl extends ServiceImpl list = ImportFileUtil.uploadFiles1(attFile, strs, ossFileService); + List list = ImportFileUtil.uploadFiles1(attFile, strs, ossFileService, errMsg, "证明材料", cut); JSONArray obj = new JSONArray(); for (OSSFile f : list) { AttachmentEO aeo = new AttachmentEO(); aeo.setId(f.getId()); aeo.setFileName(f.getFileName()); obj.add(aeo); + otaBaCxZxsjyq.addZmcl(aeo); } otaBaCxZxsjyq.setZmcl(obj.toString()); return otaBaCxZxsjyq; @@ -332,6 +338,8 @@ public class OtaBaCxZxsjyqServiceImpl extends ServiceImpl upLoadFiles = ImportFileUtil.importZip(file, cut, uploadPath); - parseFileList(upLoadFiles, otaId, cut); + parseFileList(upLoadFiles, otaId, cut,errMsg); } @Override - public void parseFileList(List upLoadFiles, String otaId, String cut) throws Exception { + public void parseFileList(List upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception{ File attFile = null; for (File f : upLoadFiles) { if (f.isDirectory() && f.getName().equals("用户告知内容及方式")) { @@ -203,11 +210,11 @@ public class OtaBaSjGgnrfsServiceImpl extends ServiceImpl ossFileList = ossFileService.getFileInfos(str); + for (OSSFile ossFile : ossFileList) { + String filePath = ossFile.getUrl(); + boolean b = CosBootUtil.doesObjectExist(filePath); + if (b) { + InputStream download = CosBootUtil.download(filePath); + ImportFileUtil.writeToLocal(attFile.getCanonicalPath() + "/" + ossFile.getFileName(), download); + } + } + } + } + wb.write(new FileOutputStream(file)); + wb.close(); + } } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjListServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjListServiceImpl.java index f28c2da4c..117e19ec7 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjListServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjListServiceImpl.java @@ -61,6 +61,9 @@ public class OtaBaSjListServiceImpl extends ServiceImpl fileList = ImportFileUtil.importZip(file, cut, uploadPath); - OtaBaSjSjmbcx mbcx = otaBaSjSjmbcxService.parseFileList(fileList, "", cut); + OtaBaSjSjmbcx mbcx = otaBaSjSjmbcxService.parseFileList(fileList, "", cut, errMsg); String otaId = mbcx.getOtaId(); if (StringUtils.isNotEmpty(otaId)) { - otaBaSjSjmbclService.parseFileList(fileList, otaId, cut); - otaBaSjSjmbcxService.parseFileList(fileList, otaId, cut); - otaBaSjSjyxpgService.parseFileList(fileList, otaId, cut); - otaBaSjSjxtbhService.parseFileList(fileList, otaId, cut); - otaBaSjSjfzbhService.parseFileList(fileList, otaId, cut); - otaBaSjGgnrfsService.parseFileList(fileList, otaId, cut); + otaBaSjSjmbclService.parseFileList(fileList, otaId, cut, errMsg); + otaBaSjSjmbcxService.parseFileList(fileList, otaId, cut, errMsg); + otaBaSjSjyxpgService.parseFileList(fileList, otaId, cut, errMsg); + otaBaSjSjxtbhService.parseFileList(fileList, otaId, cut, errMsg); + otaBaSjSjfzbhService.parseFileList(fileList, otaId, cut, errMsg); + otaBaSjGgnrfsService.parseFileList(fileList, otaId, cut, errMsg); } else { throw new JeroBootException("导入失败"); } @@ -184,25 +187,36 @@ public class OtaBaSjListServiceImpl extends ServiceImpl implements IOtaBaSjQtsjxxService { + private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd"); @Autowired private IOtaBaCxTxjlService otaBaCxTxjlService; @@ -134,4 +144,24 @@ public class OtaBaSjQtsjxxServiceImpl extends ServiceImpl reList = cu.comparisonListRecord(otaId, OtaModuleEnum.SJ_SJJSMCBH, OtaTitleEnum.GNMC.getName(), oldList, newList, sysDictService); saveOrUpdateBatch(newList); - String fj = (String) json.get("fj"); - OtaBaSjList otaBaSjList = otaBaSjListService.queryById(otaId); - String oldFjStr = otaBaSjList.getSjjsfj(); - otaBaSjList.setSjjsfj(fj); - otaBaSjListService.editById(otaBaSjList); - reList.addAll(cu.comparisonRecord(otaId, fj, oldFjStr, OtaModuleEnum.SJ_SJJSMCBH, "附件", ossFileService)); otaBaCxTxjlService.saveBatch(reList); } @@ -191,10 +186,6 @@ public class OtaBaSjSjfzbhServiceImpl extends ServiceImpl upLoadFiles = ImportFileUtil.importZip(file, cut, uploadPath); - parseFileList(upLoadFiles, otaId, cut); + parseFileList(upLoadFiles, otaId, cut,errMsg); } @Override - public void parseFileList(List upLoadFiles, String otaId, String cut) throws Exception { - File attFile = null; + public void parseFileList(List upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception { File upFile = null; for (File f : upLoadFiles) { - if (f.isDirectory() && f.getName().equals("本次升级的驾驶辅助功能与参数变化")) { - attFile = f; - } else if (f.getName().equals("本次升级的驾驶辅助功能与参数变化.xlsx")) { + if (f.getName().equals("本次升级的驾驶辅助功能与参数变化.xlsx")) { upFile = f; } } - if (null == upFile || null == attFile) { + if (null == upFile) { throw new JeroBootException("请上传正确的文件"); } @@ -237,7 +225,7 @@ public class OtaBaSjSjfzbhServiceImpl extends ServiceImpl(); } - List newList = parseFile(upFile, attFile, otaId, cut); + List newList = parseFile(upFile, otaId, cut,errMsg); ComparisonUtil cu = new ComparisonUtil(); List reList = cu.comparisonListRecord(otaId, OtaModuleEnum.SJ_SJJSMCBH, OtaTitleEnum.GNMC.getName(), oldList, newList, sysDictService); deleteByOtaId(otaId); @@ -245,7 +233,7 @@ public class OtaBaSjSjfzbhServiceImpl extends ServiceImpl parseFile(File upFile, File attFile, String otaId, String cut) throws Exception { + private List parseFile(File upFile, String otaId, String cut, StringBuilder errMsg) throws Exception { Date now = new Date(); List fzbhList = new ArrayList<>(); Workbook wb = ImportFileUtil.readExcel(upFile); @@ -256,44 +244,63 @@ public class OtaBaSjSjfzbhServiceImpl extends ServiceImpl fzbhList = this.getByOtaId(otaId); + if (ObjectUtils.isNotEmpty(fzbhList)) { + Workbook wb = ImportFileUtil.readExcel(file); + Sheet s = wb.getSheetAt(0); + Row row; + Cell cell; + int start = 4; + for (OtaBaSjSjfzbh bh : fzbhList) { + row = s.createRow(start); + cell = row.createCell(0); + cell.setCellValue(bh.getGnmc()); + cell = row.createCell(1); + cell.setCellValue(bh.getSjmdlx()); + cell = row.createCell(2); + cell.setCellValue(bh.getSjqbgcs()); + cell = row.createCell(3); + cell.setCellValue(bh.getSjhbgcs()); + cell = row.createCell(4); + cell.setCellValue(bh.getGnbgms()); + cell = row.createCell(5); + cell.setCellValue(bh.getSytjbg()); + cell = row.createCell(6); + cell.setCellValue(bh.getSjsjkzq()); + start++; + } + wb.write(new FileOutputStream(file)); + wb.close(); + } } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjmbclServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjmbclServiceImpl.java index 52a54ee7c..8c474fadd 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjmbclServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjmbclServiceImpl.java @@ -1,15 +1,14 @@ package com.jero.modules.ota.service.impl; +import com.alibaba.fastjson.JSONArray; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.jero.common.constant.enums.CutEnum; import com.jero.common.exception.JeroBootException; +import com.jero.common.util.oss.CosBootUtil; import com.jero.modules.oss.entity.OSSFile; import com.jero.modules.oss.service.IOSSFileService; -import com.jero.modules.ota.entity.OtaBaCxTxjl; -import com.jero.modules.ota.entity.OtaBaSjSjmbcl; -import com.jero.modules.ota.entity.OtaBaSjSjmbcx; -import com.jero.modules.ota.entity.VinObj; +import com.jero.modules.ota.entity.*; import com.jero.modules.ota.enums.OtaModuleEnum; import com.jero.modules.ota.mapper.OtaBaSjSjmbclMapper; import com.jero.modules.ota.service.IOtaBaCxTxjlService; @@ -33,6 +32,8 @@ import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.File; +import java.io.FileOutputStream; +import java.io.InputStream; import java.text.SimpleDateFormat; import java.util.*; @@ -180,7 +181,7 @@ public class OtaBaSjSjmbclServiceImpl extends ServiceImpl upLoadFiles, String otaId, String cut) throws Exception { + public OtaBaSjSjmbcl parseFileList(List upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception { File upFile = null; for (File f : upLoadFiles) { if (f.getName().equals("本次升级涉及的目标车辆.xlsx")) { @@ -190,13 +191,13 @@ public class OtaBaSjSjmbclServiceImpl extends ServiceImpl upLoadFiles = ImportFileUtil.importZip(file, cut, uploadPath); - OtaBaSjSjmbcl mbcl = parseFileList(upLoadFiles, otaId, cut); + OtaBaSjSjmbcl mbcl = parseFileList(upLoadFiles, otaId, cut, errMsg); return mbcl; } @Override - public void exportData(File file, String otaId, String cut) throws Exception { + public void exportData(File file, File mbclAttFile, String otaId, String cut) throws Exception { + OtaBaSjSjmbcl cl = this.getByOtaId(otaId); + if (ObjectUtils.isNotEmpty(cl)) { + Workbook wb = ImportFileUtil.readExcel(file); + Sheet s = wb.getSheetAt(0); + Row row = s.getRow(0); + Cell cell = row.getCell(1); + cell.setCellValue(cl.getZsl()); + row = s.getRow(1); + cell = row.getCell(1); + cell.setCellValue(sdf.format(cl.getScrqks()) + " - " + sdf.format(cl.getScrqjs())); + row = s.getRow(2); + cell = row.getCell(1); + cell.setCellValue(cl.getVinList()); + String attStr = cl.getCsv(); + if (StringUtils.isNotEmpty(attStr)) { + String[] strs = attStr.split(","); + for (String str : strs) { + List ossFileList = ossFileService.getFileInfos(str); + for (OSSFile ossFile : ossFileList) { + String filePath = ossFile.getUrl(); + boolean b = CosBootUtil.doesObjectExist(filePath); + if (b) { + InputStream download = CosBootUtil.download(filePath); + ImportFileUtil.writeToLocal(mbclAttFile.getCanonicalPath() + "/" + ossFile.getFileName(), download); + } + } + } + } + wb.write(new FileOutputStream(file)); + wb.close(); + } } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjmbcxServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjmbcxServiceImpl.java index dc098de37..e8082eb79 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjmbcxServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjmbcxServiceImpl.java @@ -179,14 +179,14 @@ public class OtaBaSjSjmbcxServiceImpl extends ServiceImpl upLoadFiles = ImportFileUtil.importZip(file, cut, uploadPath); - OtaBaSjSjmbcx mbcx = parseFileList(upLoadFiles, otaId, cut); + OtaBaSjSjmbcx mbcx = parseFileList(upLoadFiles, otaId, cut, errMsg); return mbcx; } @Override - public OtaBaSjSjmbcx parseFileList(List upLoadFiles, String otaId, String cut) throws Exception { + public OtaBaSjSjmbcx parseFileList(List upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception { File upFile = null; for (File f : upLoadFiles) { if (f.getName().equals("升级目标车型.xlsx")) { @@ -196,20 +196,27 @@ public class OtaBaSjSjmbcxServiceImpl extends ServiceImpl 50) { + throw new JeroBootException("升级备案编号字数超过50"); + } + mbcx.setBabh(cpbh); row = s.getRow(2); cell = row.getCell(2); mbcx.setQymc(ImportFileUtil.getCellValue(cell, wb)); @@ -220,19 +227,25 @@ public class OtaBaSjSjmbcxServiceImpl extends ServiceImpl 50) { + throw new JeroBootException("车型及功能备案《公告》批次字数超过50"); + } + mbcx.setBapc(pc); //查找车型备案的同批次数据 LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(OtaBaCxJbxx::getGgpc, pc); OtaBaCxJbxx jbxx = otaBaCxJbxxService.getOne(queryWrapper, false); if (ObjectUtils.isEmpty(jbxx)) { - throw new JeroBootException("车型及功能备案《公告》批次:" + jbxx + " 无法找到车型备案数据"); + errMsg.append("车型及功能备案《公告》批次:" + pc + " 无法找到车型备案数据"); + } else { + mbcx.setCpsb(jbxx.getCpsb()); + mbcx.setCpmc(jbxx.getCpmc()); + mbcx.setCpxh(jbxx.getCpxh()); + mbcx.setDllx1(jbxx.getDllx1()); + mbcx.setDllx2(jbxx.getDllx2()); } - mbcx.setBapc(pc); - mbcx.setCpsb(jbxx.getCpsb()); - mbcx.setCpmc(jbxx.getCpmc()); - mbcx.setCpxh(jbxx.getCpxh()); - mbcx.setDllx1(jbxx.getDllx1()); - mbcx.setDllx2(jbxx.getDllx2()); + ComparisonUtil cu = new ComparisonUtil(); + cu.checkError(mbcx, errMsg, sysDictService, cut); return mbcx; } @@ -245,9 +258,24 @@ public class OtaBaSjSjmbcxServiceImpl extends ServiceImpl upLoadFiles = ImportFileUtil.importZip(file, cut, uploadPath); - parseFileList(upLoadFiles, otaId, cut); + parseFileList(upLoadFiles, otaId, cut,errMsg); } @Override - public void parseFileList(List upLoadFiles, String otaId, String cut) throws Exception { + public void parseFileList(List upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception{ File upFile = null; for (File f : upLoadFiles) { if (f.getName().equals("本次升级的系统名称与变更参数.xlsx")) { @@ -220,7 +221,7 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl newList = parseFile(upFile, otaId, cut); + List newList = parseFile(upFile, otaId, cut,errMsg); List oldList = getByOtaId(otaId); if (ObjectUtils.isEmpty(oldList)) { oldList = new ArrayList<>(); @@ -232,7 +233,7 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl parseFile(File upFile, String otaId, String cut) throws Exception { + private List parseFile(File upFile, String otaId, String cut, StringBuilder errMsg) throws Exception{ Date now = new Date(); List list = new ArrayList<>(); Workbook wb = ImportFileUtil.readExcel(upFile); @@ -270,6 +271,8 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl bhList = this.getByOtaId(otaId); + if (ObjectUtils.isNotEmpty(bhList)) { + Workbook wb = ImportFileUtil.readExcel(file); + Sheet s = wb.getSheetAt(0); + Row row; + Cell cell; + int start = 4; + for (OtaBaSjSjxtbh bh : bhList) { + row = s.createRow(start); + cell = row.createCell(0); + cell.setCellValue(bh.getXtmc()); + cell = row.createCell(1); + cell.setCellValue(bh.getSjqbgcs()); + cell = row.createCell(2); + cell.setCellValue(bh.getSjhbgcs()); + cell = row.createCell(3); + cell.setCellValue(bh.getSjkzqmc()); + cell = row.createCell(4); + cell.setCellValue(bh.getYjbb()); + cell = row.createCell(5); + cell.setCellValue(bh.getSjqrjbb()); + cell = row.createCell(6); + cell.setCellValue(bh.getSjhrjbb()); + cell = row.createCell(7); + cell.setCellValue(bh.getSjqczxt()); + cell = row.createCell(8); + cell.setCellValue(bh.getSjhczxt()); + cell = row.createCell(9); + cell.setCellValue(bh.getSjbyzsj()); + cell = row.createCell(10); + cell.setCellValue(bh.getSjbdx()); + cell = row.createCell(11); + cell.setCellValue(bh.getSfcfsj()); + start++; + } + wb.write(new FileOutputStream(file)); + wb.close(); + } } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjyxpgServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjyxpgServiceImpl.java index 660d637f9..531c7a46f 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjyxpgServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjyxpgServiceImpl.java @@ -3,6 +3,8 @@ package com.jero.modules.ota.service.impl; import com.alibaba.fastjson.JSONArray; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.jero.common.exception.JeroBootException; +import com.jero.common.util.oss.CosBootUtil; +import com.jero.modules.oss.entity.OSSFile; import com.jero.modules.oss.service.IOSSFileService; import com.jero.modules.ota.entity.*; import com.jero.modules.ota.enums.OtaModuleEnum; @@ -14,6 +16,10 @@ 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.xwpf.usermodel.XWPFDocument; import org.apache.poi.xwpf.usermodel.XWPFTable; import org.springframework.beans.factory.annotation.Autowired; @@ -22,6 +28,7 @@ import org.springframework.stereotype.Service; import java.io.File; import java.io.FileInputStream; +import java.io.FileOutputStream; import java.io.InputStream; import java.util.List; import java.util.Date; @@ -194,13 +201,13 @@ public class OtaBaSjSjyxpgServiceImpl extends ServiceImpl upLoadFiles = ImportFileUtil.importZip(file, cut, uploadPath); - OtaBaSjSjyxpg sjyxpg = parseFileList(upLoadFiles, otaId, cut); + OtaBaSjSjyxpg sjyxpg = parseFileList(upLoadFiles, otaId, cut, errMsg); return sjyxpg; } - private OtaBaSjSjyxpg parseFile(File upFile, File attFile1, File attFile2, String cut) throws Exception { + private OtaBaSjSjyxpg parseFile(File upFile, File attFile1, File attFile2, String cut, StringBuilder errMsg) throws Exception { OtaBaSjSjyxpg sjyxpg = new OtaBaSjSjyxpg(); InputStream is = new FileInputStream(upFile); XWPFDocument doc = new XWPFDocument(is); @@ -246,7 +253,7 @@ public class OtaBaSjSjyxpgServiceImpl extends ServiceImpl upLoadFiles, String otaId, String cut) throws Exception { + public OtaBaSjSjyxpg parseFileList(List upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception { File upFile = null; File attFile = null; File attFile1 = null; @@ -277,14 +284,87 @@ public class OtaBaSjSjyxpgServiceImpl extends ServiceImpl ossFileList = ossFileService.getFileInfos(str); + for (OSSFile ossFile : ossFileList) { + String filePath = ossFile.getUrl(); + boolean b = CosBootUtil.doesObjectExist(filePath); + if (b) { + InputStream download = CosBootUtil.download(filePath); + ImportFileUtil.writeToLocal(attFile1.getCanonicalPath() + "/" + ossFile.getFileName(), download); + } + } + } + } + String attStr2 = pg.getBgfj(); + if (StringUtils.isNotEmpty(attStr2)) { + String[] strs = attStr2.split(","); + for (String str : strs) { + List ossFileList = ossFileService.getFileInfos(str); + for (OSSFile ossFile : ossFileList) { + String filePath = ossFile.getUrl(); + boolean b = CosBootUtil.doesObjectExist(filePath); + if (b) { + InputStream download = CosBootUtil.download(filePath); + ImportFileUtil.writeToLocal(attFile2.getCanonicalPath() + "/" + ossFile.getFileName(), download); + } + } + } + } + wb.write(new FileOutputStream(file)); + wb.close(); + } } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/utils/ComparisonUtil.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/utils/ComparisonUtil.java index bd956e9a8..737870be8 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/utils/ComparisonUtil.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/utils/ComparisonUtil.java @@ -177,6 +177,56 @@ public class ComparisonUtil { return resList; } + public void checkAttError(String[] strs, StringBuilder errMsg, String title, String cut) { + for (String str:strs) { + if(!str.endsWith(".doc")&&!str.endsWith(".docx")&&!str.endsWith(".pdf")&&!str.endsWith(".DOC")&&!str.endsWith(".DOCX")&&!str.endsWith(".PDF")){ + errMsg.append(title + " 支持doc/docx/pdf格式 , "); + } + } + } + + public void checkError(T clazz, StringBuilder errMsg, ISysDictService sysDictService, String cut) { + Field[] fields = clazz.getClass().getDeclaredFields(); + for (Field field : fields) { + OtaTitleEnum ote = OtaTitleEnum.getOtaTitleEnum(field.getName()); + if (null == ote) { + continue; + } + String title = ote.getValue(); + field.setAccessible(true); + try { + Object val = field.get(clazz); + if (ObjectUtils.isNotEmpty(val)) { + String str = val.toString(); + if ("0".equals(ote.getType())) { + if (str.length() > ote.getLen()) { + errMsg.append(title + " 的长度超过了 " + ote.getLen() + ", "); + field.set(clazz, ""); + } + } else if ("2".equals(ote.getType())) { + if (!"是".equals(str) && !"否".equals(str)) { + errMsg.append(title + " 必须填写是或否 , "); + field.set(clazz, ""); + } + } else if ("3".equals(ote.getType())) { + //不处理 + } else { + String[] strs = str.split(","); + for (String s : strs) { + String res = sysDictService.queryDictItemByValue(ote.getType(), s, cut); + if (StringUtils.isEmpty(res)) { + errMsg.append(title + " 填写了无法识别的选项 , "); + field.set(clazz, ""); + } + } + } + } + } catch (IllegalAccessException e) { + e.printStackTrace(); + } + } + } + public List comparisonCertRecord(String otaId, OtaModuleEnum otaModuleEnum, String tableTitle, T oldClazz, T newClazz, ISysDictService sysDictService) { List resList = new ArrayList<>(); @@ -212,6 +262,21 @@ public class ComparisonUtil { return resList; } + public static String queryDictTextByKey(String dictKey, String str, ISysDictService sysDictService) { + StringBuilder sb = new StringBuilder(); + if (StringUtils.isNotEmpty(str)) { + String[] strs = str.split(","); + for (int i = 0; i < strs.length; i++) { + if (i >= strs.length - 1) { + sb.append(sysDictService.queryDictTextByKey(dictKey, strs[i])); + } else { + sb.append(sysDictService.queryDictTextByKey(dictKey, strs[i])).append(","); + } + } + } + return sb.toString(); + } + private String parseDictText(OtaTitleEnum ote, Field field, T clazz, ISysDictService sysDictService) { String res = "空"; try { diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/utils/ImportFileUtil.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/utils/ImportFileUtil.java index 34aef3db0..9d05199bb 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/utils/ImportFileUtil.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/utils/ImportFileUtil.java @@ -91,10 +91,7 @@ public class ImportFileUtil { List fileList = new ArrayList<>(); File fileNew = ImportFileUtil.copyZip(file, cut, uploadPath); for (File file1 : fileNew.listFiles()) { - if (file1.getName().contains(".xls") || file1.getName().contains(".xlsx") || file1.isDirectory() - || file1.getName().contains(".docx") || file1.getName().contains(".doc")) { - fileList.add(file1); - } + fileList.add(file1); } return fileList; } @@ -278,13 +275,23 @@ public class ImportFileUtil { return mFile; } - public static List uploadFiles1(File attFile, String[] strs, IOSSFileService ossFileService) throws Exception { + public static List uploadFiles1(File attFile, String[] strs, IOSSFileService ossFileService, StringBuilder errMsg, String title, String cut) throws Exception { List res = new ArrayList<>(); for (int i = 0; i < strs.length; i++) { if (StringUtils.isNotEmpty(strs[i])) { File file = ImportFileUtil.findFile(attFile, strs[i]); if (null == file) { - throw new JeroBootException("找不到文件:" + strs[i]); + errMsg.append(title + " 找不到文件 , "); + 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格式 , "); + continue; + } + if (file.length() > 50 * 1024 * 1024) { + errMsg.append(title + " 上传文件不可以超过50MB , "); + continue; } OSSFile ossFile = ossFileService.uploadLocalOfCos(ImportFileUtil.createMfileByFile(file), "", null, null); if (ObjectUtils.isNotEmpty(ossFile)) { @@ -304,13 +311,23 @@ public class ImportFileUtil { return res; } - public static String uploadFiles(File attFile, String[] strs, IOSSFileService ossFileService) throws Exception { + public static String uploadFiles(File attFile, String[] strs, IOSSFileService ossFileService, StringBuilder errMsg, String title, String cut) throws Exception { String res = ""; for (int i = 0; i < strs.length; i++) { if (StringUtils.isNotEmpty(strs[i])) { File file = ImportFileUtil.findFile(attFile, strs[i]); if (null == file) { - throw new JeroBootException("找不到文件:" + strs[i]); + errMsg.append(title + " 找不到文件 , "); + 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格式 , "); + continue; + } + if (file.length() > 50 * 1024 * 1024) { + errMsg.append(title + " 上传文件不可以超过50MB , "); + continue; } OSSFile ossFile = ossFileService.uploadLocalOfCos(ImportFileUtil.createMfileByFile(file), "", null, null); if (ObjectUtils.isNotEmpty(ossFile)) { diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 48b56f2dd..b5d1ddb5f 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1742,4 +1742,5 @@ module.exports = { uploadedfilelarger:'The uploaded file is larger than 50 MB', marketCertificationList:'Market Certification List', uploadedfilelarger:'The uploaded file is larger than', + marketCertificationListDetails:'Market Certification List Details', } \ No newline at end of file diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index fd19f1afe..90e3f0ee0 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1844,4 +1844,5 @@ module.exports = { uploadedfilelarger:'文件大于', uploadedfilelarger:'文件大于50M', marketCertificationList:'市场认证清单', + marketCertificationListDetails:'市场认证清单详情', } \ No newline at end of file diff --git a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/listAddModel.vue b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/listAddModel.vue index 844c05870..686a16c12 100644 --- a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/listAddModel.vue +++ b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/listAddModel.vue @@ -21,7 +21,7 @@ v-model="queryParam.serial_number"> - + - - {{ !toggleSearchStatus ? $t('open') : $t('away') }} - - + + + + {{$t('reset')}} {{$t('query')}}
- - {{ (fileList === 'null' || fileList === '' || - fileList == null) ? $t('uploadattachment') : $t('viewUploadedFiles') - }} - -
-

{{$t('note')}}

-

    {{$t('format')}}

-
+ + + + + + + + + +
{{$t('preservation')}} diff --git a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/thetargetvehicleofthisupgrade.vue b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/thetargetvehicleofthisupgrade.vue index b08e2102d..e153908bb 100644 --- a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/thetargetvehicleofthisupgrade.vue +++ b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/thetargetvehicleofthisupgrade.vue @@ -114,7 +114,7 @@ export default { return { confirmLoading: false, disabled: false, - formInline:{}, + formInline:{zsl:""}, url: { exportData: '/ota/otaBaSjSjmbcl/exportData', importZipUrl: '/ota/otaBaSjSjmbcl/importData?otaId=' + localStorage.getItem('otaId'),//导入 diff --git a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradetargetmodel.vue b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradetargetmodel.vue index e778df4c5..b152c546f 100644 --- a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradetargetmodel.vue +++ b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradetargetmodel.vue @@ -234,17 +234,17 @@ import ImportFile from '@/components/ImportFileData/index' } } - if(res.result.dllx1==null){ + if(res.result.dllx1==null ||res.result.dllx1==""){ this.form.dllx1=undefined } - if(res.result.dllx2==null){ + if(res.result.dllx2==null ||res.result.dllx2==""){ this.form.dllx2=undefined } - if(res.result.cxmb==null){ + if(res.result.cxmb==null||res.result.cxmb==""){ this.form.cxmb=undefined } - if(res.result.bapc==null){ + if(res.result.bapc==null||res.result.bapc==""){ this.form.bapc=undefined } this.$forceUpdate() @@ -348,8 +348,8 @@ import ImportFile from '@/components/ImportFileData/index' this.form.cpmc = item.cpmc this.form.cpxh = item.cpxh getAction('/ota/otaBaCxJbxx/queryByOtaId',{otaIdT:'',otaId:item.id}).then(res=>{ - this.form.dllx1=res.result.dllx1 == null?undefined:res.result.dllx1 - this.form.dllx2=res.result.dllx2== null?undefined:res.result.dllx2 + this.form.dllx1=res.result.dllx1 == null|| res.result.dllx1=="" ?undefined:res.result.dllx1 + this.form.dllx2=res.result.dllx2== null|| res.result.dllx2==""?undefined:res.result.dllx2 }) } }) @@ -360,7 +360,6 @@ import ImportFile from '@/components/ImportFileData/index' localStorage.removeItem('otaId') localStorage.removeItem('otaIdT') localStorage.setItem('otaIdT',val) - this.getData() }, update2(){ diff --git a/jero-web/src/views/projectManagement/components/addModel.vue b/jero-web/src/views/projectManagement/components/addModel.vue index 0cd3de35b..d7735e43c 100644 --- a/jero-web/src/views/projectManagement/components/addModel.vue +++ b/jero-web/src/views/projectManagement/components/addModel.vue @@ -329,6 +329,13 @@ trigger: 'blur' } ], + projectVersion:[ + { + required: true, + message: this.$t('projectVersion') + this.$t('cannotEmpty'), + trigger: 'blur' + } + ], digitalPlatform: [ { max: 100, diff --git a/jero-web/src/views/projectManagement/components/certificationList/components/addModel.vue b/jero-web/src/views/projectManagement/components/certificationList/components/addModel.vue index a3013d2a5..9c55878d8 100644 --- a/jero-web/src/views/projectManagement/components/certificationList/components/addModel.vue +++ b/jero-web/src/views/projectManagement/components/certificationList/components/addModel.vue @@ -685,7 +685,22 @@ Action(url, query).then((res) => { if (res.success) { this.confirmLoading = false - this.$message.success(this.$t('OperationSuccessful')) + if (res.result && res.result.length > 0) { + let detailedWarningList = [] + res.result.forEach(val => { + detailedWarningList.push( + < div > { val } < /div>) + }) + this.$warning({ + content: ( + < div > + { detailedWarningList } + < /div> + ) + }) + } else { + this.$message.success(this.$t('OperationSuccessful')) + } this.visible = false this.$emit('addModelForm') } else { diff --git a/jero-web/src/views/projectManagement/dialog/parametercolumn.vue b/jero-web/src/views/projectManagement/dialog/parametercolumn.vue index 43395bb1d..c61e3fe7e 100644 --- a/jero-web/src/views/projectManagement/dialog/parametercolumn.vue +++ b/jero-web/src/views/projectManagement/dialog/parametercolumn.vue @@ -61,7 +61,7 @@ :pagination='false' :loading='loading' :scroll='{x: 600,y:400}' - :rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}' + :rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,columnTitle:" "}' @change='handleTableChange'>