Merge remote-tracking branch 'origin/dev_2nd_LCYH' into dev_2nd_LCYH
This commit is contained in:
+3
-2
@@ -203,16 +203,17 @@ public class OtaBaCxAqcsController extends JeroController<OtaBaCxAqcs, IOtaBaCxA
|
||||
@RequestParam(value = "cut", required = false) String cut,
|
||||
@RequestParam(value = "otaId", required = false) String otaId) throws Exception {
|
||||
OtaBaCxAqcs res;
|
||||
StringBuilder errMsg = new StringBuilder();
|
||||
try {
|
||||
String[] params = otaId.split("\\?");
|
||||
otaId = params[0].equals("null") ? "" : params[0];
|
||||
cut = params[1].replace("cut=", "");
|
||||
res = this.otaBaCxAqcsService.importData(file, params[0], cut);
|
||||
res = this.otaBaCxAqcsService.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());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+3
-2
@@ -196,16 +196,17 @@ public class OtaBaCxJbxxController extends JeroController<OtaBaCxJbxx, IOtaBaCxJ
|
||||
@RequestParam(value = "cut", required = false) String cut,
|
||||
@RequestParam(value = "otaId", required = false) String otaId) throws Exception {
|
||||
OtaBaCxJbxx res;
|
||||
StringBuilder errMsg = new StringBuilder();
|
||||
try {
|
||||
String[] params = otaId.split("\\?");
|
||||
otaId = params[0].equals("null") ? "" : params[0];
|
||||
cut = params[1].replace("cut=", "");
|
||||
res = this.otaBaCxJbxxService.importData(file, otaId, cut);
|
||||
res = this.otaBaCxJbxxService.importData(file, otaId, cut, errMsg);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return Result.error(e.getMessage());
|
||||
}
|
||||
return Result.OK(res);
|
||||
return Result.error(errMsg.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+3
-2
@@ -199,16 +199,17 @@ public class OtaBaCxJsfzbacsController extends JeroController<OtaBaCxJsfzbacs, I
|
||||
public Result<?> 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());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+3
-2
@@ -200,16 +200,17 @@ public class OtaBaCxKsjjsmccsController extends JeroController<OtaBaCxKsjjsmccs,
|
||||
public Result<?> 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());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+3
-2
@@ -202,16 +202,17 @@ public class OtaBaCxKsjxtmccsController extends JeroController<OtaBaCxKsjxtmccs,
|
||||
public Result<?> 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());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+4
-2
@@ -237,13 +237,15 @@ public class OtaBaCxListController extends JeroController<OtaBaCxList, IOtaBaCxL
|
||||
// @RequiresPermissions("otaBaCx:importData")
|
||||
public Result<?> 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 = "车型及功能备案列表-数据导出")
|
||||
|
||||
+3
-2
@@ -197,17 +197,18 @@ public class OtaBaCxZxsjyqController extends JeroController<OtaBaCxZxsjyq, IOtaB
|
||||
public Result<?> 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());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+3
-2
@@ -202,16 +202,17 @@ public class OtaBaSjGgnrfsController extends JeroController<OtaBaSjGgnrfs, IOtaB
|
||||
public Result<?> 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());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+3
-2
@@ -233,13 +233,14 @@ public class OtaBaSjListController extends JeroController<OtaBaSjList, IOtaBaSjL
|
||||
// @RequiresPermissions("otaBaCx:importData")
|
||||
public Result<?> 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 = "升级备案-数据导出")
|
||||
|
||||
+3
-2
@@ -200,16 +200,17 @@ public class OtaBaSjSjfzbhController extends JeroController<OtaBaSjSjfzbh, IOtaB
|
||||
public Result<?> 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());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+3
-2
@@ -195,16 +195,17 @@ public class OtaBaSjSjmbclController extends JeroController<OtaBaSjSjmbcl, IOtaB
|
||||
public Result<?> 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());
|
||||
}
|
||||
}
|
||||
|
||||
+3
-2
@@ -196,17 +196,18 @@ public class OtaBaSjSjmbcxController extends JeroController<OtaBaSjSjmbcx, IOtaB
|
||||
public Result<?> 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());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+3
-2
@@ -202,16 +202,17 @@ public class OtaBaSjSjxtbhController extends JeroController<OtaBaSjSjxtbh, IOtaB
|
||||
public Result<?> 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());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+3
-2
@@ -201,17 +201,18 @@ public class OtaBaSjSjyxpgController extends JeroController<OtaBaSjSjyxpg, IOtaB
|
||||
public Result<?> 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());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -102,4 +102,8 @@ public class OtaBaCxAqcs implements Serializable {
|
||||
@TableField(exist = false)
|
||||
private List<AttachmentEO> zmclList = new ArrayList<>();
|
||||
|
||||
public void addZmcl(AttachmentEO zmcl) {
|
||||
this.zmclList.add(zmcl);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+76
-37
@@ -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<AttachmentEO> zmclList = new ArrayList<>();
|
||||
|
||||
public void addZmcl(AttachmentEO zmcl) {
|
||||
this.zmclList.add(zmcl);
|
||||
}
|
||||
}
|
||||
|
||||
+88
-31
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+211
-189
@@ -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)) {
|
||||
|
||||
+2
-2
@@ -68,9 +68,9 @@ public interface IOtaBaCxAqcsService extends IService<OtaBaCxAqcs> {
|
||||
|
||||
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<File> upLoadFiles, String otaId, String cut) throws Exception;
|
||||
OtaBaCxAqcs parseFileList(List<File> upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception;
|
||||
|
||||
void exportData(File file, File attFile, String otaId, String cut) throws Exception;
|
||||
}
|
||||
|
||||
+4
-2
@@ -41,6 +41,8 @@ public interface IOtaBaCxJbxxService extends IService<OtaBaCxJbxx> {
|
||||
*/
|
||||
void deleteById(String id);
|
||||
|
||||
void deleteByOtaId(String id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
@@ -68,9 +70,9 @@ public interface IOtaBaCxJbxxService extends IService<OtaBaCxJbxx> {
|
||||
|
||||
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<File> upLoadFiles, String otaId, String cut) throws Exception;
|
||||
OtaBaCxJbxx parseFileList(List<File> upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception;
|
||||
|
||||
void exportData(File file, String otaId, String cut) throws Exception;
|
||||
}
|
||||
|
||||
+2
-2
@@ -68,9 +68,9 @@ public interface IOtaBaCxJsfzbacsService extends IService<OtaBaCxJsfzbacs> {
|
||||
|
||||
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<File> upLoadFiles, String otaId, String cut) throws Exception;
|
||||
void parseFileList(List<File> upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception;
|
||||
|
||||
void exportData(File file, String otaId, String cut) throws Exception;
|
||||
}
|
||||
|
||||
+2
-2
@@ -68,9 +68,9 @@ public interface IOtaBaCxKsjjsmccsService extends IService<OtaBaCxKsjjsmccs> {
|
||||
|
||||
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<File> upLoadFiles, String otaId, String cut) throws Exception;
|
||||
void parseFileList(List<File> upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception;
|
||||
|
||||
void exportData(File file, File attFile, String otaId, String cut) throws Exception;
|
||||
}
|
||||
|
||||
+2
-2
@@ -68,9 +68,9 @@ public interface IOtaBaCxKsjxtmccsService extends IService<OtaBaCxKsjxtmccs> {
|
||||
|
||||
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<File> upLoadFiles, String otaId, String cut) throws Exception;
|
||||
void parseFileList(List<File> upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception;
|
||||
|
||||
void exportData(File file, File attFile, String otaId, String cut) throws Exception;
|
||||
}
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ public interface IOtaBaCxListService extends IService<OtaBaCxList> {
|
||||
|
||||
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;
|
||||
|
||||
|
||||
+3
@@ -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<OtaBaCxQt> {
|
||||
List<OtaBaCxQt> queryList();
|
||||
|
||||
OtaBaCxQt queryByOtaId(String otaId, String otaIdT);
|
||||
|
||||
void exportData(File file, String otaId, String cut) throws Exception;
|
||||
}
|
||||
|
||||
+2
-2
@@ -69,9 +69,9 @@ public interface IOtaBaCxZxsjyqService extends IService<OtaBaCxZxsjyq> {
|
||||
|
||||
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<File> upLoadFiles, String otaId, String cut) throws Exception;
|
||||
OtaBaCxZxsjyq parseFileList(List<File> upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception;
|
||||
|
||||
void exportData(File file, File attFile,String otaId, String cut) throws Exception;
|
||||
}
|
||||
|
||||
+40
-39
@@ -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<OtaBaSjGgnrfs> {
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @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<String> ids);
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
OtaBaSjGgnrfs queryById(String id);
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
* 列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<OtaBaSjGgnrfs> 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<File> upLoadFiles, String otaId, String cut) throws Exception;
|
||||
void parseFileList(List<File> 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;
|
||||
}
|
||||
|
||||
+1
-1
@@ -70,7 +70,7 @@ public interface IOtaBaSjListService extends IService<OtaBaSjList> {
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
+4
@@ -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<OtaBaSjQtsjxx> {
|
||||
List<OtaBaSjQtsjxx> queryList();
|
||||
|
||||
OtaBaSjQtsjxx queryByOtaId(String otaId, String otaIdT);
|
||||
|
||||
void exportData(File file, String otaId, String cut) throws Exception;
|
||||
}
|
||||
|
||||
+2
-2
@@ -69,9 +69,9 @@ public interface IOtaBaSjSjfzbhService extends IService<OtaBaSjSjfzbh> {
|
||||
|
||||
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<File> upLoadFiles, String otaId, String cut) throws Exception;
|
||||
void parseFileList(List<File> upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception;
|
||||
|
||||
void exportData(File file, String otaId, String cut) throws Exception;
|
||||
}
|
||||
|
||||
+3
-3
@@ -69,9 +69,9 @@ public interface IOtaBaSjSjmbclService extends IService<OtaBaSjSjmbcl> {
|
||||
|
||||
void exportTemplate(HttpServletResponse response, HttpServletRequest request) throws Exception;
|
||||
|
||||
OtaBaSjSjmbcl parseFileList(List<File> upLoadFiles, String otaId, String cut) throws Exception;
|
||||
OtaBaSjSjmbcl parseFileList(List<File> 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;
|
||||
}
|
||||
|
||||
+2
-2
@@ -70,9 +70,9 @@ public interface IOtaBaSjSjmbcxService extends IService<OtaBaSjSjmbcx> {
|
||||
|
||||
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<File> upLoadFiles, String otaId, String cut) throws Exception;
|
||||
OtaBaSjSjmbcx parseFileList(List<File> upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception;
|
||||
|
||||
void exportData(File file, String otaId, String cut) throws Exception;
|
||||
}
|
||||
|
||||
+2
-2
@@ -67,9 +67,9 @@ public interface IOtaBaSjSjxtbhService extends IService<OtaBaSjSjxtbh> {
|
||||
|
||||
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<File> upLoadFiles, String otaId, String cut) throws Exception;
|
||||
void parseFileList(List<File> upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception;
|
||||
|
||||
void exportData(File file, String otaId, String cut) throws Exception;
|
||||
}
|
||||
|
||||
+3
-3
@@ -69,9 +69,9 @@ public interface IOtaBaSjSjyxpgService extends IService<OtaBaSjSjyxpg> {
|
||||
|
||||
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<File> upLoadFiles, String otaId, String cut) throws Exception;
|
||||
OtaBaSjSjyxpg parseFileList(List<File> 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;
|
||||
}
|
||||
|
||||
+24
-13
@@ -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<OtaBaCxAqcsMapper, OtaBa
|
||||
otaBaCxAqcs.setCreateTime(now);
|
||||
}
|
||||
otaBaCxAqcs.setUpdateTime(now);
|
||||
otaBaCxAqcs.setZmcl("");
|
||||
if (null != otaBaCxAqcs.getZmclList() && otaBaCxAqcs.getZmclList().size() > 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<AttachmentEO> 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<OtaBaCxAqcsMapper, OtaBa
|
||||
}
|
||||
|
||||
@Override
|
||||
public OtaBaCxAqcs importData(MultipartFile file, String otaId, String cut) throws Exception {
|
||||
public OtaBaCxAqcs importData(MultipartFile file, String otaId, String cut, StringBuilder errMsg) throws Exception {
|
||||
List<File> 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<File> upLoadFiles, String otaId, String cut) throws Exception {
|
||||
public OtaBaCxAqcs parseFileList(List<File> 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<OtaBaCxAqcsMapper, OtaBa
|
||||
if (null == upFile || null == attFile) {
|
||||
throw new JeroBootException("请上传正确的文件");
|
||||
}
|
||||
OtaBaCxAqcs aqcs = parseFile(upFile, attFile, cut);
|
||||
OtaBaCxAqcs aqcs = parseFile(upFile, attFile, cut, errMsg);
|
||||
aqcs.setOtaId(otaId);
|
||||
add(aqcs);
|
||||
return aqcs;
|
||||
}
|
||||
|
||||
private OtaBaCxAqcs parseFile(File upFile, File attFile, String cut) throws Exception {
|
||||
private OtaBaCxAqcs parseFile(File upFile, File attFile, String cut, StringBuilder errMsg) throws Exception {
|
||||
OtaBaCxAqcs aqcs = new OtaBaCxAqcs();
|
||||
Workbook wb = ImportFileUtil.readExcel(upFile);
|
||||
Sheet s = wb.getSheetAt(0);
|
||||
@@ -254,16 +256,22 @@ public class OtaBaCxAqcsServiceImpl extends ServiceImpl<OtaBaCxAqcsMapper, OtaBa
|
||||
cell = row.getCell(2);
|
||||
aqcs.setXxaqjz(ImportFileUtil.getCellValueDict(cell, wb, "Information_security_mechanism", sysDictService, cut));
|
||||
|
||||
ComparisonUtil cu = new ComparisonUtil();
|
||||
cu.checkError(aqcs, errMsg, sysDictService, cut);
|
||||
|
||||
row = s.getRow(2);
|
||||
cell = row.getCell(3);
|
||||
String[] strs = ImportFileUtil.getCellValue(cell, wb).split(",");
|
||||
List<OSSFile> list = ImportFileUtil.uploadFiles1(attFile, strs, ossFileService);
|
||||
String attStr = ImportFileUtil.getCellValue(cell, wb);
|
||||
String[] strs = attStr.split(",");
|
||||
|
||||
List<OSSFile> 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<OtaBaCxAqcsMapper, OtaBa
|
||||
|
||||
Row row = s.getRow(2);
|
||||
Cell cell = row.getCell(2);
|
||||
cell.setCellValue(sysDictService.queryDictItemByValue("protection_mechanism", aqcs.getBhjz(), cut));
|
||||
|
||||
cell.setCellValue(ComparisonUtil.queryDictTextByKey("protection_mechanism", aqcs.getBhjz(), sysDictService));
|
||||
|
||||
row = s.getRow(3);
|
||||
cell = row.getCell(2);
|
||||
cell.setCellValue(sysDictService.queryDictItemByValue("fail_safe_mechanism", aqcs.getFsxjz(), cut));
|
||||
cell.setCellValue(ComparisonUtil.queryDictTextByKey("fail_safe_mechanism", aqcs.getFsxjz(), sysDictService));
|
||||
|
||||
row = s.getRow(4);
|
||||
cell = row.getCell(2);
|
||||
cell.setCellValue(sysDictService.queryDictItemByValue("upgrade_failure", aqcs.getSjsbcs(), cut));
|
||||
cell.setCellValue(ComparisonUtil.queryDictTextByKey("upgrade_failure", aqcs.getSjsbcs(), sysDictService));
|
||||
|
||||
row = s.getRow(5);
|
||||
cell = row.getCell(2);
|
||||
cell.setCellValue(sysDictService.queryDictItemByValue("Information_security_mechanism", aqcs.getXxaqjz(), cut));
|
||||
cell.setCellValue(ComparisonUtil.queryDictTextByKey("Information_security_mechanism", aqcs.getXxaqjz(), sysDictService));
|
||||
|
||||
row = s.getRow(2);
|
||||
cell = row.getCell(3);
|
||||
@@ -313,6 +322,8 @@ public class OtaBaCxAqcsServiceImpl extends ServiceImpl<OtaBaCxAqcsMapper, OtaBa
|
||||
}
|
||||
}
|
||||
cell.setCellValue(sb.toString());
|
||||
wb.write(new FileOutputStream(file));
|
||||
wb.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+37
-20
@@ -117,6 +117,13 @@ public class OtaBaCxJbxxServiceImpl extends ServiceImpl<OtaBaCxJbxxMapper, OtaBa
|
||||
removeById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteByOtaId(String id) {
|
||||
LambdaQueryWrapper<OtaBaCxJbxx> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(OtaBaCxJbxx::getOtaId, id);
|
||||
remove(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
@@ -174,14 +181,14 @@ public class OtaBaCxJbxxServiceImpl extends ServiceImpl<OtaBaCxJbxxMapper, OtaBa
|
||||
}
|
||||
|
||||
@Override
|
||||
public OtaBaCxJbxx importData(MultipartFile file, String otaId, String cut) throws Exception {
|
||||
public OtaBaCxJbxx importData(MultipartFile file, String otaId, String cut, StringBuilder errMsg) throws Exception {
|
||||
List<File> 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<File> upLoadFiles, String otaId, String cut) throws Exception {
|
||||
public OtaBaCxJbxx parseFileList(List<File> 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<OtaBaCxJbxxMapper, OtaBa
|
||||
}
|
||||
}
|
||||
if (null == upFile) {
|
||||
throw new JeroBootException("请上传正确的文件");
|
||||
throw new JeroBootException("找不到文件:车型基本信息.xlsx");
|
||||
}
|
||||
OtaBaCxJbxx jbxx = parseFile(upFile, cut);
|
||||
OtaBaCxJbxx jbxx = parseFile(upFile, cut, errMsg);
|
||||
jbxx.setOtaId(otaId);
|
||||
add(jbxx);
|
||||
return jbxx;
|
||||
}
|
||||
|
||||
private OtaBaCxJbxx parseFile(File file, String cut) throws Exception {
|
||||
private OtaBaCxJbxx parseFile(File file, String cut, StringBuilder errMsg) throws Exception {
|
||||
OtaBaCxJbxx jbxx = new OtaBaCxJbxx();
|
||||
Workbook wb = ImportFileUtil.readExcel(file);
|
||||
Sheet s = wb.getSheetAt(0);
|
||||
|
||||
Row row = s.getRow(1);
|
||||
Row row = s.getRow(2);
|
||||
Cell cell = row.getCell(1);
|
||||
jbxx.setQymc(ImportFileUtil.getCellValue(cell, wb));
|
||||
|
||||
row = s.getRow(2);
|
||||
cell = row.getCell(1);
|
||||
String cpbh = ImportFileUtil.getCellValue(cell, wb);
|
||||
if (StringUtils.isEmpty(cpbh)) {
|
||||
throw new JeroBootException("产品编号不能为空");
|
||||
}
|
||||
if (cpbh.length() > 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<OtaBaCxJbxx> 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<OtaBaCxJbxxMapper, OtaBa
|
||||
row = s.getRow(11);
|
||||
cell = row.getCell(1);
|
||||
jbxx.setCdotasj(ImportFileUtil.getCellValue(cell, wb));
|
||||
|
||||
ComparisonUtil cu = new ComparisonUtil();
|
||||
cu.checkError(jbxx, errMsg, sysDictService, cut);
|
||||
return jbxx;
|
||||
}
|
||||
|
||||
@@ -286,7 +302,8 @@ public class OtaBaCxJbxxServiceImpl extends ServiceImpl<OtaBaCxJbxxMapper, OtaBa
|
||||
cell.setCellValue(jbxx.getDllx2());
|
||||
row = s.getRow(10);
|
||||
cell = row.getCell(1);
|
||||
cell.setCellValue(sysDictService.queryDictTextByKey("communication_terminal", jbxx.getTxzd()));
|
||||
String str = jbxx.getTxzd();
|
||||
cell.setCellValue(ComparisonUtil.queryDictTextByKey("communication_terminal", str, sysDictService));
|
||||
row = s.getRow(11);
|
||||
cell = row.getCell(1);
|
||||
cell.setCellValue(jbxx.getCdotasj());
|
||||
|
||||
+15
-10
@@ -29,6 +29,7 @@ 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.lang.reflect.Field;
|
||||
import java.util.*;
|
||||
|
||||
@@ -72,7 +73,7 @@ public class OtaBaCxJsfzbacsServiceImpl extends ServiceImpl<OtaBaCxJsfzbacsMappe
|
||||
ComparisonUtil cu = new ComparisonUtil();
|
||||
if (ObjectUtils.isEmpty(otaBaCxJsfzbacsOld)) {
|
||||
otaBaCxJsfzbacsOld = new OtaBaCxJsfzbacs();
|
||||
}else{
|
||||
} else {
|
||||
otaBaCxJsfzbacs.setId(otaBaCxJsfzbacsOld.getId());
|
||||
}
|
||||
List<OtaBaCxTxjl> reList = cu.comparisonRecord(otaId, OtaModuleEnum.CX_JSFZXTJCBACS, otaBaCxJsfzbacsOld, otaBaCxJsfzbacs, sysDictService);
|
||||
@@ -238,7 +239,7 @@ public class OtaBaCxJsfzbacsServiceImpl extends ServiceImpl<OtaBaCxJsfzbacsMappe
|
||||
}
|
||||
|
||||
private OtaBaCxJsfzbacs getByOtaId(String otaId) {
|
||||
if(StringUtils.isEmpty(otaId)){
|
||||
if (StringUtils.isEmpty(otaId)) {
|
||||
return null;
|
||||
}
|
||||
LambdaQueryWrapper<OtaBaCxJsfzbacs> queryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -252,14 +253,14 @@ public class OtaBaCxJsfzbacsServiceImpl extends ServiceImpl<OtaBaCxJsfzbacsMappe
|
||||
}
|
||||
|
||||
@Override
|
||||
public void importData(MultipartFile file, String otaId, String cut) throws Exception {
|
||||
public void importData(MultipartFile file, String otaId, String cut, StringBuilder errMsg) throws Exception {
|
||||
List<File> upLoadFiles = ImportFileUtil.importZip(file, cut, uploadPath);
|
||||
parseFileList(upLoadFiles, otaId, cut);
|
||||
parseFileList(upLoadFiles, otaId, cut, errMsg);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void parseFileList(List<File> upLoadFiles, String otaId, String cut) throws Exception {
|
||||
public void parseFileList(List<File> upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception {
|
||||
File upFile = null;
|
||||
for (File f : upLoadFiles) {
|
||||
if (f.getName().equals("驾驶辅助系统基础备案参数.xlsx")) {
|
||||
@@ -269,7 +270,7 @@ public class OtaBaCxJsfzbacsServiceImpl extends ServiceImpl<OtaBaCxJsfzbacsMappe
|
||||
if (null == upFile) {
|
||||
throw new JeroBootException("请上传正确的文件");
|
||||
}
|
||||
OtaBaCxJsfzbacs basc = parseFile(upFile, otaId, cut);
|
||||
OtaBaCxJsfzbacs basc = parseFile(upFile, otaId, cut, errMsg);
|
||||
Date now = new Date();
|
||||
basc.setCreateTime(now);
|
||||
basc.setUpdateTime(now);
|
||||
@@ -283,7 +284,7 @@ public class OtaBaCxJsfzbacsServiceImpl extends ServiceImpl<OtaBaCxJsfzbacsMappe
|
||||
|
||||
List<OtaBaCxSjmk> oldList = OtaBaCxSjmkService.queryByOtaId(otaId);
|
||||
OtaBaCxSjmkService.deleteByOtaId(otaId);
|
||||
List<OtaBaCxSjmk> sjmkList = parseList(upFile, otaId, cut);
|
||||
List<OtaBaCxSjmk> sjmkList = parseList(upFile, otaId, cut, errMsg);
|
||||
if (ObjectUtils.isEmpty(oldList)) {
|
||||
oldList = new ArrayList<>();
|
||||
}
|
||||
@@ -293,7 +294,7 @@ public class OtaBaCxJsfzbacsServiceImpl extends ServiceImpl<OtaBaCxJsfzbacsMappe
|
||||
}
|
||||
|
||||
|
||||
private List<OtaBaCxSjmk> parseList(File upFile, String otaId, String cut) throws Exception {
|
||||
private List<OtaBaCxSjmk> parseList(File upFile, String otaId, String cut, StringBuilder errMsg) throws Exception {
|
||||
Date now = new Date();
|
||||
List<OtaBaCxSjmk> sjmkList = new ArrayList<>();
|
||||
Workbook wb = ImportFileUtil.readExcel(upFile);
|
||||
@@ -325,13 +326,15 @@ public class OtaBaCxJsfzbacsServiceImpl extends ServiceImpl<OtaBaCxJsfzbacsMappe
|
||||
sjmk.setRjkfqy(ImportFileUtil.getCellValue(cell, wb));
|
||||
cell = row.getCell(7);
|
||||
sjmk.setBzwz(ImportFileUtil.getCellValue(cell, wb));
|
||||
ComparisonUtil cu = new ComparisonUtil();
|
||||
cu.checkError(sjmk, errMsg, sysDictService, cut);
|
||||
sjmkList.add(sjmk);
|
||||
}
|
||||
}
|
||||
return sjmkList;
|
||||
}
|
||||
|
||||
private OtaBaCxJsfzbacs parseFile(File upFile, String otaId, String cut) throws Exception {
|
||||
private OtaBaCxJsfzbacs parseFile(File upFile, String otaId, String cut, StringBuilder errMsg) throws Exception {
|
||||
Workbook wb = ImportFileUtil.readExcel(upFile);
|
||||
Sheet s = wb.getSheetAt(0);
|
||||
OtaBaCxJsfzbacs bass = new OtaBaCxJsfzbacs();
|
||||
@@ -339,7 +342,7 @@ public class OtaBaCxJsfzbacsServiceImpl extends ServiceImpl<OtaBaCxJsfzbacsMappe
|
||||
|
||||
Row row = s.getRow(2);
|
||||
Cell cell = row.getCell(2);
|
||||
bass.setJsfzczjPz(ImportFileUtil.getCellValueYesOrNoInt(cell, wb));
|
||||
bass.setJgldPz(ImportFileUtil.getCellValueYesOrNoInt(cell, wb));
|
||||
row = s.getRow(2);
|
||||
cell = row.getCell(4);
|
||||
bass.setJgldSl(ImportFileUtil.getCellValue(cell, wb));
|
||||
@@ -872,6 +875,8 @@ public class OtaBaCxJsfzbacsServiceImpl extends ServiceImpl<OtaBaCxJsfzbacsMappe
|
||||
cell.setCellValue(sjmk.getBzwz());
|
||||
startRow++;
|
||||
}
|
||||
wb.write(new FileOutputStream(file));
|
||||
wb.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+17
-9
@@ -29,6 +29,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.lang.reflect.Field;
|
||||
import java.util.*;
|
||||
@@ -239,13 +240,13 @@ public class OtaBaCxKsjjsmccsServiceImpl extends ServiceImpl<OtaBaCxKsjjsmccsMap
|
||||
}
|
||||
|
||||
@Override
|
||||
public void importData(MultipartFile file, String otaId, String cut) throws Exception {
|
||||
public void importData(MultipartFile file, String otaId, String cut, StringBuilder errMsg) throws Exception {
|
||||
List<File> upLoadFiles = ImportFileUtil.importZip(file, cut, uploadPath);
|
||||
parseFileList(upLoadFiles, otaId, cut);
|
||||
parseFileList(upLoadFiles, otaId, cut, errMsg);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void parseFileList(List<File> upLoadFiles, String otaId, String cut) throws Exception {
|
||||
public void parseFileList(List<File> 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<OtaBaCxKsjjsmccsMap
|
||||
if (ObjectUtils.isEmpty(oldList)) {
|
||||
oldList = new ArrayList<>();
|
||||
}
|
||||
List<OtaBaCxKsjjsmccs> mccsList = parseFile(upFile, attFile, otaId, cut);
|
||||
List<OtaBaCxKsjjsmccs> mccsList = parseFile(upFile, attFile, otaId, cut, errMsg);
|
||||
ComparisonUtil cu = new ComparisonUtil();
|
||||
List<OtaBaCxTxjl> reList = cu.comparisonListRecord(otaId, OtaModuleEnum.CX_KZXSJDJSFZGNMCYCS, OtaTitleEnum.GNMC.getName(), oldList, mccsList, sysDictService);
|
||||
deleteByOtaId(otaId);
|
||||
@@ -272,7 +273,7 @@ public class OtaBaCxKsjjsmccsServiceImpl extends ServiceImpl<OtaBaCxKsjjsmccsMap
|
||||
|
||||
}
|
||||
|
||||
private List<OtaBaCxKsjjsmccs> parseFile(File upFile, File attFile, String otaId, String cut) throws Exception {
|
||||
private List<OtaBaCxKsjjsmccs> parseFile(File upFile, File attFile, String otaId, String cut, StringBuilder errMsg) throws Exception {
|
||||
Date now = new Date();
|
||||
List<OtaBaCxKsjjsmccs> mccsList = new ArrayList<>();
|
||||
Workbook wb = ImportFileUtil.readExcel(upFile);
|
||||
@@ -290,7 +291,7 @@ public class OtaBaCxKsjjsmccsServiceImpl extends ServiceImpl<OtaBaCxKsjjsmccsMap
|
||||
cell = row.getCell(1);
|
||||
str = ImportFileUtil.getCellValue(cell, wb);
|
||||
String[] strs = str.split(",");
|
||||
otaBaCxList.setZxsjjsfj(ImportFileUtil.uploadFiles(attFile, strs, ossFileService));
|
||||
otaBaCxList.setZxsjjsfj(ImportFileUtil.uploadFiles(attFile, strs, ossFileService, errMsg, "证明材料", cut));
|
||||
otaBaCxListService.editById(otaBaCxList);
|
||||
}
|
||||
break;
|
||||
@@ -328,6 +329,9 @@ public class OtaBaCxKsjjsmccsServiceImpl extends ServiceImpl<OtaBaCxKsjjsmccsMap
|
||||
cell = row.getCell(13);
|
||||
mssc.setCsyzsj(ImportFileUtil.getCellValue(cell, wb));
|
||||
mssc.setCreateTime(now);
|
||||
|
||||
ComparisonUtil cu = new ComparisonUtil();
|
||||
cu.checkError(mssc, errMsg, sysDictService, cut);
|
||||
mccsList.add(mssc);
|
||||
}
|
||||
}
|
||||
@@ -340,7 +344,8 @@ public class OtaBaCxKsjjsmccsServiceImpl extends ServiceImpl<OtaBaCxKsjjsmccsMap
|
||||
Workbook wb = ImportFileUtil.readExcel(file);
|
||||
Sheet s = wb.getSheetAt(0);
|
||||
int startRow = 3;
|
||||
for (OtaBaCxKsjjsmccs mccs : mccsList) {
|
||||
for (int i = 0; i < mccsList.size(); i++) {
|
||||
OtaBaCxKsjjsmccs mccs = mccsList.get(i);
|
||||
Row row = s.getRow(startRow);
|
||||
Cell cell = row.createCell(0);
|
||||
cell.setCellValue(mccs.getGnmc());
|
||||
@@ -370,11 +375,12 @@ public class OtaBaCxKsjjsmccsServiceImpl extends ServiceImpl<OtaBaCxKsjjsmccsMap
|
||||
cell.setCellValue(mccs.getCzxtbbh());
|
||||
cell = row.createCell(13);
|
||||
cell.setCellValue(mccs.getCsyzsj());
|
||||
startRow++;
|
||||
}
|
||||
Row row = s.getRow(startRow);
|
||||
Row row = s.createRow(startRow);
|
||||
Cell cell = row.createCell(0);
|
||||
cell.setCellValue("证明材料");
|
||||
cell = row.getCell(1);
|
||||
cell = row.createCell(1);
|
||||
OtaBaCxList otaBaCxList = otaBaCxListService.queryById(otaId);
|
||||
if (ObjectUtils.isNotEmpty(otaBaCxList)) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
@@ -396,5 +402,7 @@ public class OtaBaCxKsjjsmccsServiceImpl extends ServiceImpl<OtaBaCxKsjjsmccsMap
|
||||
cell.setCellValue(sb.toString());
|
||||
}
|
||||
}
|
||||
wb.write(new FileOutputStream(file));
|
||||
wb.close();
|
||||
}
|
||||
}
|
||||
|
||||
+14
-8
@@ -29,6 +29,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.lang.reflect.Field;
|
||||
import java.util.*;
|
||||
@@ -307,13 +308,13 @@ public class OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl<OtaBaCxKsjxtmccsMap
|
||||
}
|
||||
|
||||
@Override
|
||||
public void importData(MultipartFile file, String otaId, String cut) throws Exception {
|
||||
public void importData(MultipartFile file, String otaId, String cut, StringBuilder errMsg) throws Exception {
|
||||
List<File> upLoadFiles = ImportFileUtil.importZip(file, cut, uploadPath);
|
||||
parseFileList(upLoadFiles, otaId, cut);
|
||||
parseFileList(upLoadFiles, otaId, cut, errMsg);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void parseFileList(List<File> upLoadFiles, String otaId, String cut) throws Exception {
|
||||
public void parseFileList(List<File> 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<OtaBaCxKsjxtmccsMap
|
||||
if (ObjectUtils.isEmpty(oldList)) {
|
||||
oldList = new ArrayList<>();
|
||||
}
|
||||
List<OtaBaCxKsjxtmccs> mccsList = parseFile(upFile, attFile, otaId, cut);
|
||||
List<OtaBaCxKsjxtmccs> mccsList = parseFile(upFile, attFile, otaId, cut, errMsg);
|
||||
ComparisonUtil cu = new ComparisonUtil();
|
||||
List<OtaBaCxTxjl> reList = cu.comparisonListRecord(otaId, OtaModuleEnum.CX_KSJDXTMCYCS, OtaTitleEnum.XTLB.getName(), oldList, mccsList, sysDictService);
|
||||
deleteByOtaId(otaId);
|
||||
@@ -338,7 +339,7 @@ public class OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl<OtaBaCxKsjxtmccsMap
|
||||
otaBaCxTxjlService.saveBatch(reList);
|
||||
}
|
||||
|
||||
private List<OtaBaCxKsjxtmccs> parseFile(File upFile, File attFile, String otaId, String cut) throws Exception {
|
||||
private List<OtaBaCxKsjxtmccs> parseFile(File upFile, File attFile, String otaId, String cut, StringBuilder errMsg) throws Exception {
|
||||
Date now = new Date();
|
||||
List<OtaBaCxKsjxtmccs> mccsList = new ArrayList<>();
|
||||
Workbook wb = ImportFileUtil.readExcel(upFile);
|
||||
@@ -356,7 +357,7 @@ public class OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl<OtaBaCxKsjxtmccsMap
|
||||
cell = row.getCell(1);
|
||||
str = ImportFileUtil.getCellValue(cell, wb);
|
||||
String[] strs = str.split(",");
|
||||
otaBaCxList.setZxsjxtfj(ImportFileUtil.uploadFiles(attFile, strs, ossFileService));
|
||||
otaBaCxList.setZxsjxtfj(ImportFileUtil.uploadFiles(attFile, strs, ossFileService, errMsg, "证明材料", cut));
|
||||
otaBaCxListService.editById(otaBaCxList);
|
||||
}
|
||||
break;
|
||||
@@ -373,7 +374,7 @@ public class OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl<OtaBaCxKsjxtmccsMap
|
||||
mssc.setSjbgcs(ImportFileUtil.getCellValue(cell, wb));
|
||||
cell = row.getCell(3);
|
||||
String[] strs = ImportFileUtil.getCellValue(cell, wb).split(",");
|
||||
mssc.setTpt(ImportFileUtil.uploadFiles(attFile, strs, ossFileService));
|
||||
mssc.setTpt(ImportFileUtil.uploadFiles(attFile, strs, ossFileService, errMsg, "系统电子控制器架构拓扑图", cut));
|
||||
cell = row.getCell(4);
|
||||
mssc.setKzqmc(ImportFileUtil.getCellValue(cell, wb));
|
||||
cell = row.getCell(5);
|
||||
@@ -398,6 +399,9 @@ public class OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl<OtaBaCxKsjxtmccsMap
|
||||
mssc.setCzxtbbh(ImportFileUtil.getCellValue(cell, wb));
|
||||
mssc.setCreateTime(now);
|
||||
mssc.setUpdateTime(now);
|
||||
|
||||
ComparisonUtil cu = new ComparisonUtil();
|
||||
cu.checkError(mssc, errMsg, sysDictService, cut);
|
||||
mccsList.add(mssc);
|
||||
}
|
||||
}
|
||||
@@ -471,7 +475,7 @@ public class OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl<OtaBaCxKsjxtmccsMap
|
||||
}
|
||||
Cell cell = row.createCell(0);
|
||||
cell.setCellValue("证明材料");
|
||||
cell = row.getCell(1);
|
||||
cell = row.createCell(1);
|
||||
OtaBaCxList otaBaCxList = otaBaCxListService.queryById(otaId);
|
||||
if (ObjectUtils.isNotEmpty(otaBaCxList)) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
@@ -493,6 +497,8 @@ public class OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl<OtaBaCxKsjxtmccsMap
|
||||
cell.setCellValue(sb.toString());
|
||||
}
|
||||
}
|
||||
wb.write(new FileOutputStream(file));
|
||||
wb.close();
|
||||
}
|
||||
|
||||
}
|
||||
+13
-7
@@ -60,6 +60,9 @@ public class OtaBaCxListServiceImpl extends ServiceImpl<OtaBaCxListMapper, OtaBa
|
||||
@Autowired
|
||||
private IOtaBaCxJsfzbacsService otaBaCxJsfzbacsService;
|
||||
|
||||
@Autowired
|
||||
private IOtaBaCxQtService otaBaCxQtService;
|
||||
|
||||
|
||||
@Value(value = "${ota.templatePath}")
|
||||
private String templatePath;
|
||||
@@ -103,6 +106,7 @@ public class OtaBaCxListServiceImpl extends ServiceImpl<OtaBaCxListMapper, OtaBa
|
||||
@Override
|
||||
public void deleteById(String id) {
|
||||
removeById(id);
|
||||
otaBaCxJbxxService.deleteByOtaId(id);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -170,16 +174,16 @@ public class OtaBaCxListServiceImpl extends ServiceImpl<OtaBaCxListMapper, OtaBa
|
||||
}
|
||||
|
||||
@Override
|
||||
public void importData(MultipartFile file, String cut) throws Exception {
|
||||
public void importData(MultipartFile file, String cut, StringBuilder errMsg) throws Exception {
|
||||
List<File> 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<OtaBaCxListMapper, OtaBa
|
||||
File bacsFile = ImportFileUtil.findFile(exportFile, "驾驶辅助系统基础备案参数.xlsx");
|
||||
otaBaCxJsfzbacsService.exportData(bacsFile, otaId, cut);
|
||||
|
||||
File qtFile = ImportFileUtil.findFile(exportFile, "其他.xlsx");
|
||||
otaBaCxQtService.exportData(qtFile, otaId, cut);
|
||||
|
||||
String outPath = uploadPath + "/车型及功能备案" + System.currentTimeMillis() + ".zip";
|
||||
//FileUtils.forceDelete(template);
|
||||
|
||||
+21
-1
@@ -4,16 +4,24 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.jero.modules.ota.entity.OtaBaCxAqcs;
|
||||
import com.jero.modules.ota.entity.OtaBaCxQt;
|
||||
import com.jero.modules.ota.entity.OtaBaCxTxjl;
|
||||
import com.jero.modules.ota.entity.OtaBaSjQtsjxx;
|
||||
import com.jero.modules.ota.enums.OtaModuleEnum;
|
||||
import com.jero.modules.ota.mapper.OtaBaCxQtMapper;
|
||||
import com.jero.modules.ota.service.IOtaBaCxQtService;
|
||||
import com.jero.modules.ota.service.IOtaBaCxTxjlService;
|
||||
import com.jero.modules.ota.utils.ComparisonUtil;
|
||||
import com.jero.modules.ota.utils.ImportFileUtil;
|
||||
import com.jero.modules.system.service.ISysDictService;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
import org.apache.poi.ss.usermodel.Sheet;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
|
||||
@@ -127,7 +135,7 @@ public class OtaBaCxQtServiceImpl extends ServiceImpl<OtaBaCxQtMapper, OtaBaCxQt
|
||||
}
|
||||
|
||||
public OtaBaCxQt getByOtaId(String otaId) {
|
||||
if(org.apache.commons.lang3.StringUtils.isEmpty(otaId)){
|
||||
if (org.apache.commons.lang3.StringUtils.isEmpty(otaId)) {
|
||||
return null;
|
||||
}
|
||||
LambdaQueryWrapper<OtaBaCxQt> queryWrapper = new LambdaQueryWrapper<>();
|
||||
@@ -135,4 +143,16 @@ public class OtaBaCxQtServiceImpl extends ServiceImpl<OtaBaCxQtMapper, OtaBaCxQt
|
||||
return this.getOne(queryWrapper, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exportData(File file, String otaId, String cut) throws Exception {
|
||||
OtaBaCxQt qt = this.getByOtaId(otaId);
|
||||
if (ObjectUtils.isNotEmpty(qt)) {
|
||||
Workbook wb = ImportFileUtil.readExcel(file);
|
||||
Sheet s = wb.getSheetAt(0);
|
||||
Row row = s.getRow(0);
|
||||
Cell cell = row.getCell(1);
|
||||
cell.setCellValue(qt.getSjbbhcs());
|
||||
wb.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+15
-7
@@ -31,6 +31,7 @@ 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.util.Date;
|
||||
import java.util.List;
|
||||
@@ -81,13 +82,14 @@ public class OtaBaCxZxsjyqServiceImpl extends ServiceImpl<OtaBaCxZxsjyqMapper, O
|
||||
}
|
||||
}
|
||||
otaBaCxZxsjyq.setUpdateTime(now);
|
||||
otaBaCxZxsjyq.setZmcl("");
|
||||
if (null != otaBaCxZxsjyq.getZmclList() && otaBaCxZxsjyq.getZmclList().size() > 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<AttachmentEO> aeoList = JSONArray.parseArray(otaBaCxZxsjyqOld.getZmcl(), AttachmentEO.class);
|
||||
@@ -199,14 +201,14 @@ public class OtaBaCxZxsjyqServiceImpl extends ServiceImpl<OtaBaCxZxsjyqMapper, O
|
||||
}
|
||||
|
||||
@Override
|
||||
public OtaBaCxZxsjyq importData(MultipartFile file, String otaId, String cut) throws Exception {
|
||||
public OtaBaCxZxsjyq importData(MultipartFile file, String otaId, String cut, StringBuilder errMsg) throws Exception {
|
||||
List<File> 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<File> upLoadFiles, String otaId, String cut) throws Exception {
|
||||
public OtaBaCxZxsjyq parseFileList(List<File> 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<OtaBaCxZxsjyqMapper, O
|
||||
if (null == upFile || null == attFile) {
|
||||
throw new JeroBootException("请上传正确的文件");
|
||||
}
|
||||
OtaBaCxZxsjyq otaBaCxZxsjyq = parseFile(upFile, attFile, cut);
|
||||
OtaBaCxZxsjyq otaBaCxZxsjyq = parseFile(upFile, attFile, cut, errMsg);
|
||||
otaBaCxZxsjyq.setOtaId(otaId);
|
||||
add(otaBaCxZxsjyq);
|
||||
return otaBaCxZxsjyq;
|
||||
}
|
||||
|
||||
private OtaBaCxZxsjyq parseFile(File upFile, File attFile, String cut) throws Exception {
|
||||
private OtaBaCxZxsjyq parseFile(File upFile, File attFile, String cut, StringBuilder errMsg) throws Exception {
|
||||
OtaBaCxZxsjyq otaBaCxZxsjyq = new OtaBaCxZxsjyq();
|
||||
Workbook wb = ImportFileUtil.readExcel(upFile);
|
||||
Sheet s = wb.getSheetAt(0);
|
||||
@@ -260,16 +262,20 @@ public class OtaBaCxZxsjyqServiceImpl extends ServiceImpl<OtaBaCxZxsjyqMapper, O
|
||||
cell = row.getCell(2);
|
||||
otaBaCxZxsjyq.setSjzt(ImportFileUtil.getCellValueYesOrNo(cell, wb));
|
||||
|
||||
ComparisonUtil cu = new ComparisonUtil();
|
||||
cu.checkError(otaBaCxZxsjyq, errMsg, sysDictService, cut);
|
||||
|
||||
row = s.getRow(2);
|
||||
cell = row.getCell(3);
|
||||
String[] strs = ImportFileUtil.getCellValue(cell, wb).split(",");
|
||||
List<OSSFile> list = ImportFileUtil.uploadFiles1(attFile, strs, ossFileService);
|
||||
List<OSSFile> 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<OtaBaCxZxsjyqMapper, O
|
||||
}
|
||||
}
|
||||
cell.setCellValue(sb.toString());
|
||||
wb.write(new FileOutputStream(file));
|
||||
wb.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+71
-9
@@ -1,12 +1,13 @@
|
||||
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.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.OtaBaSjGgnrfs;
|
||||
import com.jero.modules.ota.entity.OtaBaSjSjyxpg;
|
||||
import com.jero.modules.ota.entity.*;
|
||||
import com.jero.modules.ota.enums.OtaModuleEnum;
|
||||
import com.jero.modules.ota.mapper.OtaBaSjGgnrfsMapper;
|
||||
import com.jero.modules.ota.service.IOtaBaCxTxjlService;
|
||||
@@ -17,6 +18,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.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -25,6 +30,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.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
@@ -187,13 +194,13 @@ public class OtaBaSjGgnrfsServiceImpl extends ServiceImpl<OtaBaSjGgnrfsMapper, O
|
||||
}
|
||||
|
||||
@Override
|
||||
public void importData(MultipartFile file, String otaId, String cut) throws Exception {
|
||||
public void importData(MultipartFile file, String otaId, String cut, StringBuilder errMsg) throws Exception{
|
||||
List<File> upLoadFiles = ImportFileUtil.importZip(file, cut, uploadPath);
|
||||
parseFileList(upLoadFiles, otaId, cut);
|
||||
parseFileList(upLoadFiles, otaId, cut,errMsg);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void parseFileList(List<File> upLoadFiles, String otaId, String cut) throws Exception {
|
||||
public void parseFileList(List<File> 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<OtaBaSjGgnrfsMapper, O
|
||||
if (null == attFile) {
|
||||
throw new JeroBootException("请上传正确的文件");
|
||||
}
|
||||
OtaBaSjGgnrfs fs = parseFile(attFile, otaId, cut);
|
||||
OtaBaSjGgnrfs fs = parseFile(attFile, otaId, cut,errMsg);
|
||||
add(fs);
|
||||
}
|
||||
|
||||
private OtaBaSjGgnrfs parseFile(File attFile, String otaId, String cut) throws Exception {
|
||||
private OtaBaSjGgnrfs parseFile(File attFile, String otaId, String cut, StringBuilder errMsg) throws Exception{
|
||||
OtaBaSjGgnrfs fs = new OtaBaSjGgnrfs();
|
||||
fs.setOtaId(otaId);
|
||||
OtaBaSjSjyxpg pg = otaBaSjSjyxpgService.queryByOtaId(otaId, "");
|
||||
@@ -230,7 +237,62 @@ public class OtaBaSjGgnrfsServiceImpl extends ServiceImpl<OtaBaSjGgnrfsMapper, O
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exportData(File file, String otaId, String cut) throws Exception {
|
||||
public void exportData(File file, File attFile, String otaId, String cut) throws Exception {
|
||||
OtaBaSjGgnrfs fs = this.getByOtaId(otaId);
|
||||
if (ObjectUtils.isNotEmpty(fs)) {
|
||||
Workbook wb = ImportFileUtil.readExcel(file);
|
||||
Sheet s = wb.getSheetAt(0);
|
||||
Row row = s.getRow(0);
|
||||
Cell cell = row.getCell(1);
|
||||
cell.setCellValue(ComparisonUtil.queryDictTextByKey("uipgrade_purpose", fs.getSjmd(), sysDictService));
|
||||
|
||||
row = s.getRow(1);
|
||||
cell = row.getCell(1);
|
||||
cell.setCellValue(fs.getGxbh());
|
||||
row = s.getRow(2);
|
||||
cell = row.getCell(1);
|
||||
cell.setCellValue(fs.getSjsj());
|
||||
row = s.getRow(3);
|
||||
cell = row.getCell(1);
|
||||
cell.setCellValue(fs.getSjky());
|
||||
row = s.getRow(4);
|
||||
cell = row.getCell(1);
|
||||
cell.setCellValue(fs.getSjbkygn());
|
||||
row = s.getRow(5);
|
||||
cell = row.getCell(1);
|
||||
cell.setCellValue(fs.getZdxx());
|
||||
|
||||
row = s.getRow(6);
|
||||
cell = row.getCell(1);
|
||||
cell.setCellValue(ImportFileUtil.getCellValueYesOrNoInt(fs.getSjsfcg()));
|
||||
row = s.getRow(7);
|
||||
cell = row.getCell(1);
|
||||
cell.setCellValue(ImportFileUtil.getCellValueYesOrNoInt(fs.getGzbg()));
|
||||
;
|
||||
row = s.getRow(8);
|
||||
cell = row.getCell(1);
|
||||
cell.setCellValue(ImportFileUtil.getCellValueYesOrNoInt(fs.getGzscnr()));
|
||||
row = s.getRow(9);
|
||||
cell = row.getCell(1);
|
||||
cell.setCellValue(ComparisonUtil.queryDictTextByKey("user_notification_mode", fs.getGzyhfs(), sysDictService));
|
||||
|
||||
String attStr = fs.getXgwj();
|
||||
if(StringUtils.isNotEmpty(attStr)){
|
||||
String[] strs = attStr.split(",");
|
||||
for (String str : strs) {
|
||||
List<OSSFile> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+29
-15
@@ -61,6 +61,9 @@ public class OtaBaSjListServiceImpl extends ServiceImpl<OtaBaSjListMapper, OtaBa
|
||||
@Autowired
|
||||
private IOtaBaSjSjyxpgService otaBaSjSjyxpgService;
|
||||
|
||||
@Autowired
|
||||
private IOtaBaSjQtsjxxService otaBaSjQtsjxxService;
|
||||
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -165,17 +168,17 @@ public class OtaBaSjListServiceImpl extends ServiceImpl<OtaBaSjListMapper, OtaBa
|
||||
}
|
||||
|
||||
@Override
|
||||
public void importData(MultipartFile file, String cut) throws Exception {
|
||||
public void importData(MultipartFile file, String cut, StringBuilder errMsg) throws Exception {
|
||||
List<File> 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<OtaBaSjListMapper, OtaBa
|
||||
@Override
|
||||
public void exportData(String otaId, HttpServletResponse response, HttpServletRequest request) throws Exception {
|
||||
String cut = "cn";
|
||||
File template = new File(templatePath + "在线升级活动备案.zip");
|
||||
File template = new File(templatePath + "在线升级活动备案导出.zip");
|
||||
File exportFile = ImportFileUtil.copyZip(ImportFileUtil.createMfileByFile(template), cut, uploadPath);
|
||||
|
||||
File sjmbcxFile = ImportFileUtil.findFile(exportFile, "升级目标车型.xlsx");
|
||||
otaBaSjSjmbcxService.exportData(sjmbcxFile, otaId, cut);
|
||||
|
||||
File jbxxFile = ImportFileUtil.findFile(exportFile, "本次升级涉及的目标车辆.xlsx");
|
||||
otaBaSjSjmbclService.exportData(jbxxFile, otaId, cut);
|
||||
File mbclFile = ImportFileUtil.findFile(exportFile, "本次升级涉及的目标车辆.xlsx");
|
||||
File mbclAttFile = ImportFileUtil.findFoder(exportFile, "本次升级涉及的目标车辆");
|
||||
otaBaSjSjmbclService.exportData(mbclFile, mbclAttFile, otaId, cut);
|
||||
|
||||
|
||||
File pgFile = ImportFileUtil.findFile(exportFile, "升级影响评估.docx");
|
||||
otaBaSjSjyxpgService.exportData(pgFile, otaId, cut);
|
||||
File pgFile = ImportFileUtil.findFile(exportFile, "升级影响评估.xlsx");
|
||||
File pgAttFile = ImportFileUtil.findFoder(exportFile, "升级影响评估");
|
||||
File pgAtt1File = ImportFileUtil.findFoder(pgAttFile, "测试报告");
|
||||
File pgAtt2File = ImportFileUtil.findFoder(pgAttFile, "硬件版本号附件");
|
||||
otaBaSjSjyxpgService.exportData(pgFile, pgAtt1File, pgAtt2File, otaId, cut);
|
||||
|
||||
File sjSjxtbhFile = ImportFileUtil.findFile(exportFile, "本次升级的系统名称与变更参数.docx");
|
||||
File sjSjxtbhFile = ImportFileUtil.findFile(exportFile, "本次升级的系统名称与变更参数.xlsx");
|
||||
otaBaSjSjxtbhService.exportData(sjSjxtbhFile, otaId, cut);
|
||||
|
||||
File sjfzbhFile = ImportFileUtil.findFile(exportFile, "本次升级的驾驶辅助功能与参数变化.docx");
|
||||
File sjfzbhFile = ImportFileUtil.findFile(exportFile, "本次升级的驾驶辅助功能与参数变化.xlsx");
|
||||
otaBaSjSjfzbhService.exportData(sjfzbhFile, otaId, cut);
|
||||
|
||||
File fsFile = ImportFileUtil.findFile(exportFile, "用户告知内容及方式.xlsx");
|
||||
File fsAttFile = ImportFileUtil.findFoder(exportFile, "用户告知内容及方式");
|
||||
otaBaSjGgnrfsService.exportData(fsFile, fsAttFile, otaId, cut);
|
||||
|
||||
File qtFile = ImportFileUtil.findFile(exportFile, "其他升级任务信息.xlsx");
|
||||
otaBaSjQtsjxxService.exportData(qtFile, otaId, cut);
|
||||
|
||||
String outPath = uploadPath + "/在线升级活动备案" + System.currentTimeMillis() + ".zip";
|
||||
FileOutputStream fos1 = new FileOutputStream(outPath);
|
||||
ImportFileUtil.toZip(exportFile.getCanonicalPath(), fos1, true);
|
||||
|
||||
+30
@@ -3,17 +3,26 @@ package com.jero.modules.ota.service.impl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.jero.modules.ota.entity.OtaBaCxQt;
|
||||
import com.jero.modules.ota.entity.OtaBaCxTxjl;
|
||||
import com.jero.modules.ota.entity.OtaBaSjGgnrfs;
|
||||
import com.jero.modules.ota.entity.OtaBaSjQtsjxx;
|
||||
import com.jero.modules.ota.enums.OtaModuleEnum;
|
||||
import com.jero.modules.ota.mapper.OtaBaSjQtsjxxMapper;
|
||||
import com.jero.modules.ota.service.IOtaBaCxTxjlService;
|
||||
import com.jero.modules.ota.service.IOtaBaSjQtsjxxService;
|
||||
import com.jero.modules.ota.utils.ComparisonUtil;
|
||||
import com.jero.modules.ota.utils.ImportFileUtil;
|
||||
import com.jero.modules.system.service.ISysDictService;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.poi.ss.usermodel.Cell;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
import org.apache.poi.ss.usermodel.Sheet;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
|
||||
@@ -28,6 +37,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@Service
|
||||
public class OtaBaSjQtsjxxServiceImpl extends ServiceImpl<OtaBaSjQtsjxxMapper, OtaBaSjQtsjxx> 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<OtaBaSjQtsjxxMapper, O
|
||||
queryWrapper.eq(OtaBaSjQtsjxx::getOtaId, otaId);
|
||||
return this.getOne(queryWrapper, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exportData(File file, String otaId, String cut) throws Exception {
|
||||
OtaBaSjQtsjxx qt = this.getByOtaId(otaId);
|
||||
if (ObjectUtils.isNotEmpty(qt)) {
|
||||
Workbook wb = ImportFileUtil.readExcel(file);
|
||||
Sheet s = wb.getSheetAt(0);
|
||||
Row row = s.getRow(0);
|
||||
Cell cell = row.getCell(1);
|
||||
cell.setCellValue(qt.getRwmc());
|
||||
row = s.getRow(1);
|
||||
cell = row.getCell(1);
|
||||
cell.setCellValue(sdf.format(qt.getSjfbsj()));
|
||||
row = s.getRow(2);
|
||||
cell = row.getCell(1);
|
||||
cell.setCellValue(sdf.format(qt.getSjjzsj()));
|
||||
wb.write(new FileOutputStream(file));
|
||||
wb.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+58
-51
@@ -27,6 +27,7 @@ import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.*;
|
||||
|
||||
@@ -107,12 +108,6 @@ public class OtaBaSjSjfzbhServiceImpl extends ServiceImpl<OtaBaSjSjfzbhMapper, O
|
||||
ComparisonUtil cu = new ComparisonUtil();
|
||||
List<OtaBaCxTxjl> 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<OtaBaSjSjfzbhMapper, O
|
||||
}
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("list", res);
|
||||
OtaBaSjList otaBaSjList = otaBaSjListService.queryById(otaId);
|
||||
if (ObjectUtils.isNotEmpty(otaBaSjList) && ObjectUtils.isNotEmpty(otaBaSjList.getSjjsfj())) {
|
||||
json.put("fj", otaBaSjList.getSjjsfj());
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
@@ -213,23 +204,20 @@ public class OtaBaSjSjfzbhServiceImpl extends ServiceImpl<OtaBaSjSjfzbhMapper, O
|
||||
}
|
||||
|
||||
@Override
|
||||
public void importData(MultipartFile file, String otaId, String cut) throws Exception {
|
||||
public void importData(MultipartFile file, String otaId, String cut, StringBuilder errMsg) throws Exception {
|
||||
List<File> upLoadFiles = ImportFileUtil.importZip(file, cut, uploadPath);
|
||||
parseFileList(upLoadFiles, otaId, cut);
|
||||
parseFileList(upLoadFiles, otaId, cut,errMsg);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void parseFileList(List<File> upLoadFiles, String otaId, String cut) throws Exception {
|
||||
File attFile = null;
|
||||
public void parseFileList(List<File> 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<OtaBaSjSjfzbhMapper, O
|
||||
if (ObjectUtils.isEmpty(oldList)) {
|
||||
oldList = new ArrayList<>();
|
||||
}
|
||||
List<OtaBaSjSjfzbh> newList = parseFile(upFile, attFile, otaId, cut);
|
||||
List<OtaBaSjSjfzbh> newList = parseFile(upFile, otaId, cut,errMsg);
|
||||
ComparisonUtil cu = new ComparisonUtil();
|
||||
List<OtaBaCxTxjl> reList = cu.comparisonListRecord(otaId, OtaModuleEnum.SJ_SJJSMCBH, OtaTitleEnum.GNMC.getName(), oldList, newList, sysDictService);
|
||||
deleteByOtaId(otaId);
|
||||
@@ -245,7 +233,7 @@ public class OtaBaSjSjfzbhServiceImpl extends ServiceImpl<OtaBaSjSjfzbhMapper, O
|
||||
otaBaCxTxjlService.saveBatch(reList);
|
||||
}
|
||||
|
||||
private List<OtaBaSjSjfzbh> parseFile(File upFile, File attFile, String otaId, String cut) throws Exception {
|
||||
private List<OtaBaSjSjfzbh> parseFile(File upFile, String otaId, String cut, StringBuilder errMsg) throws Exception {
|
||||
Date now = new Date();
|
||||
List<OtaBaSjSjfzbh> fzbhList = new ArrayList<>();
|
||||
Workbook wb = ImportFileUtil.readExcel(upFile);
|
||||
@@ -256,44 +244,63 @@ public class OtaBaSjSjfzbhServiceImpl extends ServiceImpl<OtaBaSjSjfzbhMapper, O
|
||||
Cell cell = row.getCell(0);
|
||||
String str = ImportFileUtil.getCellValue(cell, wb);
|
||||
OtaBaSjSjfzbh fzbh = new OtaBaSjSjfzbh();
|
||||
if ("证明材料".equals(str)) {
|
||||
//列表数据数量,在证明材料处结束
|
||||
OtaBaSjList otaBaSjList = otaBaSjListService.queryById(otaId);
|
||||
if (ObjectUtils.isNotEmpty(otaBaSjList)) {
|
||||
cell = row.getCell(1);
|
||||
str = ImportFileUtil.getCellValue(cell, wb);
|
||||
String[] strs = str.split(",");
|
||||
otaBaSjList.setSjjsfj(ImportFileUtil.uploadFiles(attFile, strs, ossFileService));
|
||||
otaBaSjListService.editById(otaBaSjList);
|
||||
}
|
||||
cell = row.getCell(0);
|
||||
fzbh.setGnmc(ImportFileUtil.getCellValue(cell, wb));
|
||||
cell = row.getCell(1);
|
||||
fzbh.setSjmdlx(ImportFileUtil.getCellValue(cell, wb));
|
||||
cell = row.getCell(2);
|
||||
fzbh.setSjqbgcs(ImportFileUtil.getCellValue(cell, wb));
|
||||
cell = row.getCell(3);
|
||||
fzbh.setSjhbgcs(ImportFileUtil.getCellValue(cell, wb));
|
||||
cell = row.getCell(4);
|
||||
fzbh.setGnbgms(ImportFileUtil.getCellValue(cell, wb));
|
||||
cell = row.getCell(5);
|
||||
fzbh.setSytjbg(ImportFileUtil.getCellValue(cell, wb));
|
||||
cell = row.getCell(6);
|
||||
fzbh.setSjsjkzq(ImportFileUtil.getCellValue(cell, wb));
|
||||
if (fzbh.isNull()) {
|
||||
break;
|
||||
} else {
|
||||
fzbh.setOtaId(otaId);
|
||||
fzbh.setCreateTime(now);
|
||||
fzbh.setUpdateTime(now);
|
||||
|
||||
cell = row.getCell(0);
|
||||
fzbh.setGnmc(ImportFileUtil.getCellValue(cell, wb));
|
||||
cell = row.getCell(1);
|
||||
fzbh.setSjmdlx(ImportFileUtil.getCellValue(cell, wb));
|
||||
cell = row.getCell(2);
|
||||
fzbh.setSjqbgcs(ImportFileUtil.getCellValue(cell, wb));
|
||||
cell = row.getCell(3);
|
||||
fzbh.setSjhbgcs(ImportFileUtil.getCellValue(cell, wb));
|
||||
cell = row.getCell(4);
|
||||
fzbh.setGnbgms(ImportFileUtil.getCellValue(cell, wb));
|
||||
cell = row.getCell(5);
|
||||
fzbh.setSytjbg(ImportFileUtil.getCellValue(cell, wb));
|
||||
cell = row.getCell(6);
|
||||
fzbh.setSjsjkzq(ImportFileUtil.getCellValue(cell, wb));
|
||||
fzbhList.add(fzbh);
|
||||
}
|
||||
fzbh.setOtaId(otaId);
|
||||
fzbh.setCreateTime(now);
|
||||
fzbh.setUpdateTime(now);
|
||||
ComparisonUtil cu = new ComparisonUtil();
|
||||
cu.checkError(fzbh, errMsg, sysDictService, cut);
|
||||
|
||||
fzbhList.add(fzbh);
|
||||
}
|
||||
return fzbhList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exportData(File file, String otaId, String cut) throws Exception {
|
||||
|
||||
List<OtaBaSjSjfzbh> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+42
-10
@@ -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<OtaBaSjSjmbclMapper, O
|
||||
}
|
||||
|
||||
@Override
|
||||
public OtaBaSjSjmbcl parseFileList(List<File> upLoadFiles, String otaId, String cut) throws Exception {
|
||||
public OtaBaSjSjmbcl parseFileList(List<File> upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception {
|
||||
File upFile = null;
|
||||
for (File f : upLoadFiles) {
|
||||
if (f.getName().equals("本次升级涉及的目标车辆.xlsx")) {
|
||||
@@ -190,13 +191,13 @@ public class OtaBaSjSjmbclServiceImpl extends ServiceImpl<OtaBaSjSjmbclMapper, O
|
||||
if (null == upFile) {
|
||||
throw new JeroBootException("请上传正确的文件");
|
||||
}
|
||||
OtaBaSjSjmbcl mbcl = parseFile(upFile, otaId, cut);
|
||||
OtaBaSjSjmbcl mbcl = parseFile(upFile, otaId, cut, errMsg);
|
||||
mbcl.setOtaId(otaId);
|
||||
add(mbcl);
|
||||
return mbcl;
|
||||
}
|
||||
|
||||
private OtaBaSjSjmbcl parseFile(File upFile, String otaId, String cut) throws Exception {
|
||||
private OtaBaSjSjmbcl parseFile(File upFile, String otaId, String cut, StringBuilder errMsg) throws Exception {
|
||||
OtaBaSjSjmbcl mbcl = new OtaBaSjSjmbcl();
|
||||
OtaBaSjSjmbcx mbcx = otaBaSjSjmbcxService.queryByOtaId(otaId, "");
|
||||
if (ObjectUtils.isNotEmpty(mbcx) && StringUtils.isNotEmpty(mbcx.getCpxh())) {
|
||||
@@ -268,15 +269,46 @@ public class OtaBaSjSjmbclServiceImpl extends ServiceImpl<OtaBaSjSjmbclMapper, O
|
||||
}
|
||||
|
||||
@Override
|
||||
public OtaBaSjSjmbcl importData(MultipartFile file, String otaId, String cut) throws Exception {
|
||||
public OtaBaSjSjmbcl importData(MultipartFile file, String otaId, String cut, StringBuilder errMsg) throws Exception {
|
||||
List<File> 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<OSSFile> 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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+42
-14
@@ -179,14 +179,14 @@ public class OtaBaSjSjmbcxServiceImpl extends ServiceImpl<OtaBaSjSjmbcxMapper, O
|
||||
}
|
||||
|
||||
@Override
|
||||
public OtaBaSjSjmbcx importData(MultipartFile file, String otaId, String cut) throws Exception {
|
||||
public OtaBaSjSjmbcx importData(MultipartFile file, String otaId, String cut, StringBuilder errMsg) throws Exception {
|
||||
List<File> 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<File> upLoadFiles, String otaId, String cut) throws Exception {
|
||||
public OtaBaSjSjmbcx parseFileList(List<File> 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<OtaBaSjSjmbcxMapper, O
|
||||
if (null == upFile) {
|
||||
throw new JeroBootException("请上传正确的文件");
|
||||
}
|
||||
OtaBaSjSjmbcx mbcx = parseFile(upFile, cut);
|
||||
OtaBaSjSjmbcx mbcx = parseFile(upFile, cut, errMsg);
|
||||
mbcx.setOtaId(otaId);
|
||||
add(mbcx);
|
||||
return mbcx;
|
||||
}
|
||||
|
||||
private OtaBaSjSjmbcx parseFile(File upFile, String cut) throws Exception {
|
||||
private OtaBaSjSjmbcx parseFile(File upFile, String cut, StringBuilder errMsg) throws Exception {
|
||||
OtaBaSjSjmbcx mbcx = new OtaBaSjSjmbcx();
|
||||
Workbook wb = ImportFileUtil.readExcel(upFile);
|
||||
Sheet s = wb.getSheetAt(0);
|
||||
|
||||
Row row = s.getRow(1);
|
||||
Cell cell = row.getCell(2);
|
||||
mbcx.setBabh(ImportFileUtil.getCellValue(cell, wb));
|
||||
String cpbh = ImportFileUtil.getCellValue(cell, wb);
|
||||
if (StringUtils.isEmpty(cpbh)) {
|
||||
throw new JeroBootException("升级备案编号不能为空");
|
||||
}
|
||||
if (cpbh.length() > 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<OtaBaSjSjmbcxMapper, O
|
||||
if (StringUtils.isEmpty(pc)) {
|
||||
throw new JeroBootException("车型及功能备案《公告》批次不能为空");
|
||||
}
|
||||
if (pc.length() > 50) {
|
||||
throw new JeroBootException("车型及功能备案《公告》批次字数超过50");
|
||||
}
|
||||
mbcx.setBapc(pc);
|
||||
//查找车型备案的同批次数据
|
||||
LambdaQueryWrapper<OtaBaCxJbxx> 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<OtaBaSjSjmbcxMapper, O
|
||||
Row row = s.getRow(1);
|
||||
Cell cell = row.getCell(2);
|
||||
cell.setCellValue(cx.getBabh());
|
||||
row = s.getRow(2);
|
||||
row = s.getRow(3);
|
||||
cell = row.getCell(2);
|
||||
cell.setCellValue(cx.getBapc());
|
||||
row = s.getRow(4);
|
||||
cell = row.getCell(2);
|
||||
cell.setCellValue(cx.getCpsb());
|
||||
row = s.getRow(5);
|
||||
cell = row.getCell(2);
|
||||
cell.setCellValue(cx.getCpmc());
|
||||
row = s.getRow(6);
|
||||
cell = row.getCell(2);
|
||||
cell.setCellValue(cx.getCpxh());
|
||||
row = s.getRow(7);
|
||||
cell = row.getCell(2);
|
||||
cell.setCellValue(cx.getDllx1());
|
||||
row = s.getRow(8);
|
||||
cell = row.getCell(2);
|
||||
cell.setCellValue(cx.getDllx2());
|
||||
wb.write(new FileOutputStream(file));
|
||||
wb.close();
|
||||
}
|
||||
|
||||
+46
-6
@@ -27,6 +27,7 @@ import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.*;
|
||||
|
||||
@@ -203,13 +204,13 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
|
||||
}
|
||||
|
||||
@Override
|
||||
public void importData(MultipartFile file, String otaId, String cut) throws Exception {
|
||||
public void importData(MultipartFile file, String otaId, String cut, StringBuilder errMsg) throws Exception{
|
||||
List<File> upLoadFiles = ImportFileUtil.importZip(file, cut, uploadPath);
|
||||
parseFileList(upLoadFiles, otaId, cut);
|
||||
parseFileList(upLoadFiles, otaId, cut,errMsg);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void parseFileList(List<File> upLoadFiles, String otaId, String cut) throws Exception {
|
||||
public void parseFileList(List<File> upLoadFiles, String otaId, String cut, StringBuilder errMsg) throws Exception{
|
||||
File upFile = null;
|
||||
for (File f : upLoadFiles) {
|
||||
if (f.getName().equals("本次升级的系统名称与变更参数.xlsx")) {
|
||||
@@ -220,7 +221,7 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
|
||||
throw new JeroBootException("请上传正确的文件");
|
||||
}
|
||||
|
||||
List<OtaBaSjSjxtbh> newList = parseFile(upFile, otaId, cut);
|
||||
List<OtaBaSjSjxtbh> newList = parseFile(upFile, otaId, cut,errMsg);
|
||||
List<OtaBaSjSjxtbh> oldList = getByOtaId(otaId);
|
||||
if (ObjectUtils.isEmpty(oldList)) {
|
||||
oldList = new ArrayList<>();
|
||||
@@ -232,7 +233,7 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
|
||||
otaBaCxTxjlService.saveBatch(reList);
|
||||
}
|
||||
|
||||
private List<OtaBaSjSjxtbh> parseFile(File upFile, String otaId, String cut) throws Exception {
|
||||
private List<OtaBaSjSjxtbh> parseFile(File upFile, String otaId, String cut, StringBuilder errMsg) throws Exception{
|
||||
Date now = new Date();
|
||||
List<OtaBaSjSjxtbh> list = new ArrayList<>();
|
||||
Workbook wb = ImportFileUtil.readExcel(upFile);
|
||||
@@ -270,6 +271,8 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
|
||||
xtbh.setSjbdx(ImportFileUtil.getCellValue(cell, wb));
|
||||
cell = row.getCell(10);
|
||||
xtbh.setSfcfsj(ImportFileUtil.getCellValue(cell, wb));
|
||||
ComparisonUtil cu = new ComparisonUtil();
|
||||
cu.checkError(xtbh, errMsg, sysDictService, cut);
|
||||
if (xtbh.isNull()) {
|
||||
break;
|
||||
}
|
||||
@@ -284,6 +287,43 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
|
||||
|
||||
@Override
|
||||
public void exportData(File file, String otaId, String cut) throws Exception {
|
||||
|
||||
List<OtaBaSjSjxtbh> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+86
-6
@@ -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<OtaBaSjSjyxpgMapper, O
|
||||
}
|
||||
|
||||
@Override
|
||||
public OtaBaSjSjyxpg importData(MultipartFile file, String otaId, String cut) throws Exception {
|
||||
public OtaBaSjSjyxpg importData(MultipartFile file, String otaId, String cut, StringBuilder errMsg) throws Exception {
|
||||
List<File> 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<OtaBaSjSjyxpgMapper, O
|
||||
}
|
||||
|
||||
@Override
|
||||
public OtaBaSjSjyxpg parseFileList(List<File> upLoadFiles, String otaId, String cut) throws Exception {
|
||||
public OtaBaSjSjyxpg parseFileList(List<File> 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<OtaBaSjSjyxpgMapper, O
|
||||
}
|
||||
|
||||
|
||||
OtaBaSjSjyxpg sjyxpg = parseFile(upFile, attFile1, attFile2, cut);
|
||||
OtaBaSjSjyxpg sjyxpg = parseFile(upFile, attFile1, attFile2, cut, errMsg);
|
||||
sjyxpg.setOtaId(otaId);
|
||||
add(sjyxpg);
|
||||
return sjyxpg;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exportData(File file, String otaId, String cut) throws Exception {
|
||||
public void exportData(File file, File attFile1, File attFile2, String otaId, String cut) throws Exception {
|
||||
OtaBaSjSjyxpg pg = this.getByOtaId(otaId);
|
||||
if (ObjectUtils.isNotEmpty(pg)) {
|
||||
Workbook wb = ImportFileUtil.readExcel(file);
|
||||
Sheet s = wb.getSheetAt(0);
|
||||
Row row = s.getRow(0);
|
||||
Cell cell = row.getCell(1);
|
||||
cell.setCellValue(ComparisonUtil.queryDictTextByKey("uipgrade_purpose", pg.getSjmd(), sysDictService));
|
||||
row = s.getRow(1);
|
||||
cell = row.getCell(1);
|
||||
cell.setCellValue(ImportFileUtil.getCellValueYesOrNoInt(pg.getSfbgcs()));
|
||||
row = s.getRow(2);
|
||||
cell = row.getCell(1);
|
||||
cell.setCellValue(ImportFileUtil.getCellValueYesOrNoInt(pg.getSjxnbh()));
|
||||
row = s.getRow(3);
|
||||
cell = row.getCell(1);
|
||||
cell.setCellValue(ImportFileUtil.getCellValueYesOrNoInt(pg.getFhgd()));
|
||||
row = s.getRow(4);
|
||||
cell = row.getCell(1);
|
||||
cell.setCellValue(ImportFileUtil.getCellValueYesOrNoInt(pg.getZdjsxg()));
|
||||
row = s.getRow(5);
|
||||
cell = row.getCell(1);
|
||||
cell.setCellValue(ImportFileUtil.getCellValueYesOrNoInt(pg.getJrxxg()));
|
||||
row = s.getRow(6);
|
||||
cell = row.getCell(1);
|
||||
cell.setCellValue(ComparisonUtil.queryDictTextByKey("conditions_upgrades", pg.getZxsj().toString(), sysDictService));
|
||||
row = s.getRow(7);
|
||||
cell = row.getCell(1);
|
||||
cell.setCellValue(ComparisonUtil.queryDictTextByKey("upgrade_failed", pg.getAqjz(), sysDictService));
|
||||
row = s.getRow(8);
|
||||
cell = row.getCell(1);
|
||||
cell.setCellValue(ImportFileUtil.getCellValueYesOrNoInt(pg.getSfyxaq()));
|
||||
row = s.getRow(9);
|
||||
cell = row.getCell(1);
|
||||
cell.setCellValue(ImportFileUtil.getCellValueYesOrNoInt(pg.getYhqr()));
|
||||
row = s.getRow(10);
|
||||
cell = row.getCell(1);
|
||||
cell.setCellValue(ComparisonUtil.queryDictTextByKey("package_test", pg.getSjbcs(), sysDictService));
|
||||
row = s.getRow(11);
|
||||
cell = row.getCell(1);
|
||||
cell.setCellValue(ImportFileUtil.getCellValueYesOrNoInt(pg.getAqkkx()));
|
||||
|
||||
String attStr1 = pg.getBgfj();
|
||||
if (StringUtils.isNotEmpty(attStr1)) {
|
||||
String[] strs = attStr1.split(",");
|
||||
for (String str : strs) {
|
||||
List<OSSFile> 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<OSSFile> 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+65
@@ -177,6 +177,56 @@ public class ComparisonUtil<T> {
|
||||
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<OtaBaCxTxjl> comparisonCertRecord(String otaId, OtaModuleEnum otaModuleEnum, String tableTitle, T oldClazz, T newClazz, ISysDictService sysDictService) {
|
||||
List<OtaBaCxTxjl> resList = new ArrayList<>();
|
||||
@@ -212,6 +262,21 @@ public class ComparisonUtil<T> {
|
||||
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 {
|
||||
|
||||
+25
-8
@@ -91,10 +91,7 @@ public class ImportFileUtil {
|
||||
List<File> 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<OSSFile> uploadFiles1(File attFile, String[] strs, IOSSFileService ossFileService) throws Exception {
|
||||
public static List<OSSFile> uploadFiles1(File attFile, String[] strs, IOSSFileService ossFileService, StringBuilder errMsg, String title, String cut) throws Exception {
|
||||
List<OSSFile> 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)) {
|
||||
|
||||
@@ -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',
|
||||
}
|
||||
@@ -1844,4 +1844,5 @@ module.exports = {
|
||||
uploadedfilelarger:'文件大于',
|
||||
uploadedfilelarger:'文件大于50M',
|
||||
marketCertificationList:'市场认证清单',
|
||||
marketCertificationListDetails:'市场认证清单详情',
|
||||
}
|
||||
@@ -21,7 +21,7 @@
|
||||
v-model="queryParam.serial_number"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<template v-if="toggleSearchStatus">
|
||||
<!-- <template v-if="toggleSearchStatus">-->
|
||||
<a-col :md="12" :sm="8">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text" :title="$t('title')">
|
||||
@@ -42,13 +42,13 @@
|
||||
<!-- :triggerChange="false" :dictCode="'state'"/>-->
|
||||
<!-- </div>-->
|
||||
<!-- </a-col>-->
|
||||
</template>
|
||||
<!-- </template>-->
|
||||
<span style="float: right;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
<a-col :md="12" :sm="24">
|
||||
<a @click="handleToggleSearch">
|
||||
{{ !toggleSearchStatus ? $t('open') : $t('away') }}
|
||||
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
|
||||
</a>
|
||||
<!-- <a @click="handleToggleSearch">-->
|
||||
<!-- {{ !toggleSearchStatus ? $t('open') : $t('away') }}-->
|
||||
<!-- <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>-->
|
||||
<!-- </a>-->
|
||||
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
|
||||
<a-button class="box-button" style="margin-left: 8px" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
|
||||
<globalAdvancedQuery ref="globalAdvancedQueryRef"
|
||||
|
||||
@@ -385,7 +385,7 @@
|
||||
ellipsis: true,
|
||||
dataIndex: 'fileName',
|
||||
scopedSlots: { customRender: 'fileName' },
|
||||
width: 200
|
||||
width: 400
|
||||
},
|
||||
{
|
||||
title: this.$t('fileDeclaration'),
|
||||
@@ -393,7 +393,7 @@
|
||||
ellipsis: true,
|
||||
dataIndex: 'fileDescription',
|
||||
scopedSlots: { customRender: 'projectName' },
|
||||
width: 300
|
||||
width: 400
|
||||
},
|
||||
{
|
||||
title: this.$t('uploadedBy'),
|
||||
@@ -412,14 +412,14 @@
|
||||
align: 'left',
|
||||
ellipsis: true,
|
||||
dataIndex: 'createTime',
|
||||
width: 250
|
||||
width: 150
|
||||
},
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
align: 'left',
|
||||
fixed: 'right',
|
||||
ellipsis: true,
|
||||
width: 250,
|
||||
width: 150,
|
||||
scopedSlots: { customRender: 'operation' }
|
||||
}
|
||||
],
|
||||
|
||||
+10
-9
@@ -53,15 +53,16 @@
|
||||
</span>
|
||||
</a-table>
|
||||
<div>
|
||||
<a-button type="primary" @click="clickButtonToUpload(fileList)">
|
||||
{{ (fileList === 'null' || fileList === '' ||
|
||||
fileList == null) ? $t('uploadattachment') : $t('viewUploadedFiles')
|
||||
}}
|
||||
</a-button>
|
||||
<div style='margin-top: 20px'>
|
||||
<p>{{$t('note')}}</p>
|
||||
<p> {{$t('format')}}</p>
|
||||
</div>
|
||||
<!-- 上传附件-->
|
||||
<!-- <a-button type="primary" @click="clickButtonToUpload(fileList)">-->
|
||||
<!-- {{ (fileList === 'null' || fileList === '' ||-->
|
||||
<!-- fileList == null) ? $t('uploadattachment') : $t('viewUploadedFiles')-->
|
||||
<!-- }}-->
|
||||
<!-- </a-button>-->
|
||||
<!-- <div style='margin-top: 20px'>-->
|
||||
<!-- <p>{{$t('note')}}</p>-->
|
||||
<!-- <p> {{$t('format')}}</p>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class="bootom-button">
|
||||
<a-button style="margin-right:50px" @click="save">{{$t('preservation')}}</a-button>
|
||||
|
||||
+1
-1
@@ -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'),//导入
|
||||
|
||||
+6
-7
@@ -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(){
|
||||
|
||||
@@ -329,6 +329,13 @@
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
projectVersion:[
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('projectVersion') + this.$t('cannotEmpty'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
digitalPlatform: [
|
||||
{
|
||||
max: 100,
|
||||
|
||||
+16
-1
@@ -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 {
|
||||
|
||||
@@ -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'>
|
||||
<span slot="configDescription" slot-scope="text,record">
|
||||
<a-select class="box-input" v-model="record.configure"
|
||||
|
||||
+3
-3
@@ -354,7 +354,7 @@
|
||||
},
|
||||
created() {
|
||||
if (this.$route.query.title == '市场认证清单详情') {
|
||||
document.title = this.$t('virtualAuthenticationListDetails')
|
||||
document.title = this.$t('marketCertificationListDetails')
|
||||
this.columns.splice(7, 1)
|
||||
} else {
|
||||
document.title = this.$t('certificationListMaintenance')
|
||||
@@ -393,7 +393,7 @@
|
||||
},
|
||||
//模板下载
|
||||
handleModule() {
|
||||
downloadFile(this.url.exportTemplate, this.$t('VirtualAuthenticationList') + this.$t('importTemplate') + '.xls', {})
|
||||
downloadFile(this.url.exportTemplate, this.$t('certificationList') + this.$t('importTemplate') + '.xls', {})
|
||||
},
|
||||
//调取
|
||||
transferClick() {
|
||||
@@ -411,7 +411,7 @@
|
||||
ids: selectedRowKeys.join(','),
|
||||
authDummyInventoryBaseId: this.$route.query.id
|
||||
}
|
||||
downloadFile(this.url.exportData, this.$route.query.name + this.$t('VirtualAuthenticationList') + '.zip', query, this.Deselect)
|
||||
downloadFile(this.url.exportData, this.$route.query.name + this.$t('certificationList') + '.zip', query, this.Deselect)
|
||||
},
|
||||
Deselect() {
|
||||
this.selectedRowKeys = []
|
||||
|
||||
Reference in New Issue
Block a user