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

This commit is contained in:
wangzhijiang
2023-03-30 13:54:19 +08:00
11 changed files with 242 additions and 53 deletions
@@ -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,109 +23,188 @@ 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_sjxtbh")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="ota_ba_sj_sjxtbh对象", description="升级备案-本次升级的系统名称与参数变化")
@ApiModel(value = "ota_ba_sj_sjxtbh对象", description = "升级备案-本次升级的系统名称与参数变化")
public class OtaBaSjSjxtbh 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 xtmc;
/**升级前已变更《公告》参数的对应调整*/
@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 sjkzqmc;
/**适配的硬件版本*/
@Excel(name = "适配的硬件版本", width = 15)
/**
* 适配的硬件版本
*/
@Excel(name = "适配的硬件版本", width = 15)
@ApiModelProperty(value = "适配的硬件版本")
private java.lang.String yjbb;
/**软件版本号升级前*/
@Excel(name = "软件版本号升级前", width = 15)
/**
* 软件版本号升级前
*/
@Excel(name = "软件版本号升级前", width = 15)
@ApiModelProperty(value = "软件版本号升级前")
private java.lang.String sjqrjbb;
/**软件版本号升级后*/
@Excel(name = "软件版本号升级后", width = 15)
/**
* 软件版本号升级后
*/
@Excel(name = "软件版本号升级后", width = 15)
@ApiModelProperty(value = "软件版本号升级后")
private java.lang.String sjhrjbb;
/**操作系统版本号升级前*/
@Excel(name = "操作系统版本号升级前", width = 15)
/**
* 操作系统版本号升级前
*/
@Excel(name = "操作系统版本号升级前", width = 15)
@ApiModelProperty(value = "操作系统版本号升级前")
private java.lang.String sjqczxt;
/**操作系统版本号升级后*/
@Excel(name = "操作系统版本号升级后", width = 15)
/**
* 操作系统版本号升级后
*/
@Excel(name = "操作系统版本号升级后", width = 15)
@ApiModelProperty(value = "操作系统版本号升级后")
private java.lang.String sjhczxt;
/**升级包完整性验证数据*/
@Excel(name = "升级包完整性验证数据", width = 15)
/**
* 升级包完整性验证数据
*/
@Excel(name = "升级包完整性验证数据", width = 15)
@ApiModelProperty(value = "升级包完整性验证数据")
private java.lang.String sjbyzsj;
/**升级包大小*/
@Excel(name = "升级包大小", width = 15)
/**
* 升级包大小
*/
@Excel(name = "升级包大小", width = 15)
@ApiModelProperty(value = "升级包大小")
private java.lang.String sjbdx;
/**是否差分升级*/
@Excel(name = "是否差分升级", width = 15)
/**
* 是否差分升级
*/
@Excel(name = "是否差分升级", width = 15)
@ApiModelProperty(value = "是否差分升级")
private java.lang.String sfcfsj;
public boolean isNull() {
if (StringUtils.isNotEmpty(xtmc)) {
return false;
}
if (StringUtils.isNotEmpty(sjqbgcs)) {
return false;
}
if (StringUtils.isNotEmpty(sjhbgcs)) {
return false;
}
if (StringUtils.isNotEmpty(sjkzqmc)) {
return false;
}
if (StringUtils.isNotEmpty(yjbb)) {
return false;
}
if (StringUtils.isNotEmpty(sjqrjbb)) {
return false;
}
if (StringUtils.isNotEmpty(sjhrjbb)) {
return false;
}
if (StringUtils.isNotEmpty(sjqczxt)) {
return false;
}
if (StringUtils.isNotEmpty(sjhczxt)) {
return false;
}
if (StringUtils.isNotEmpty(sjbyzsj)) {
return false;
}
if (StringUtils.isNotEmpty(sjbdx)) {
return false;
}
if (StringUtils.isNotEmpty(sfcfsj)) {
return false;
}
return true;
}
}
@@ -80,6 +80,9 @@ public class OtaBaCxKsjjsmccsServiceImpl extends ServiceImpl<OtaBaCxKsjjsmccsMap
String otaId = (String) json.get("otaId");
if (StringUtils.isNotEmpty(otaId)) {
oldList = getByOtaId(otaId);
if (ObjectUtils.isEmpty(oldList)) {
oldList = setDefault(otaId);
}
deleteByOtaId(otaId);
JSONArray list = json.getJSONArray("list");
for (Object obj : list) {
@@ -177,12 +180,32 @@ public class OtaBaCxKsjjsmccsServiceImpl extends ServiceImpl<OtaBaCxKsjjsmccsMap
return list();
}
public List<OtaBaCxKsjjsmccs> setDefault(String otaId) {
Date now = new Date();
List<OtaBaCxKsjjsmccs> res = new ArrayList<>();
String[] titles = {"前向碰撞预警(FCW)", "车道偏离预警(LDW)", "百区监测(BSD)", "驾驶员疲劳监测(DFM)",
"自动紧急制动(AEB)", "自适应巡航控制(ACC)", "车道保持辅助(LKA)", "智能泊车辅助(IPA)", "交通拥堵辅助(TJA)"};
for (String t : titles) {
OtaBaCxKsjjsmccs cs = new OtaBaCxKsjjsmccs();
cs.setOtaId(otaId);
cs.setGnmc(t);
cs.setCreateTime(now);
cs.setId(UUID.randomUUID().toString().replace("-", ""));
res.add(cs);
}
saveBatch(res);
return res;
}
@Override
public JSONObject queryByOtaId(String otaId, String otaIdT) {
List<OtaBaCxKsjjsmccs> res = this.getByOtaId(otaId);
if (ObjectUtil.isEmpty(res)) {
res = getByOtaId(otaIdT);
}
if (ObjectUtil.isEmpty(res)) {
res = setDefault(otaId);
}
JSONObject json = new JSONObject();
json.put("list", res);
OtaBaCxList otaBaCxList = otaBaCxListService.queryById(otaId);
@@ -81,6 +81,9 @@ public class OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl<OtaBaCxKsjxtmccsMap
String otaId = (String) json.get("otaId");
if (StringUtils.isNotEmpty(otaId)) {
oldList = getByOtaId(otaId);
if (ObjectUtils.isEmpty(oldList)) {
oldList = setDefault(otaId);
}
deleteByOtaId(otaId);
JSONArray list = json.getJSONArray("list");
for (Object obj : list) {
@@ -245,12 +248,32 @@ public class OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl<OtaBaCxKsjxtmccsMap
return list();
}
public List<OtaBaCxKsjxtmccs> setDefault(String otaId) {
Date now = new Date();
List<OtaBaCxKsjxtmccs> res = new ArrayList<>();
String[] titles = {"动力系统", "传动系统", "转向系统", "制动系统", "车身系统", "车载能源系统"};
for (String t : titles) {
OtaBaCxKsjxtmccs cs = new OtaBaCxKsjxtmccs();
cs.setOtaId(otaId);
cs.setXtlb(t);
cs.setCreateTime(now);
cs.setId(UUID.randomUUID().toString().replace("-", ""));
res.add(cs);
}
saveBatch(res);
return res;
}
@Override
public JSONObject queryByOtaId(String otaId, String otaIdT) {
List<OtaBaCxKsjxtmccs> res = getByOtaId(otaId);
if (ObjectUtil.isEmpty(res)) {
res = getByOtaId(otaIdT);
}
if (ObjectUtil.isEmpty(res)) {
res = setDefault(otaId);
}
JSONObject json = new JSONObject();
json.put("list", res);
OtaBaCxList otaBaCxList = otaBaCxListService.queryById(otaId);
@@ -67,7 +67,7 @@ public class OtaBaSjGgnrfsServiceImpl extends ServiceImpl<OtaBaSjGgnrfsMapper, O
public void add(OtaBaSjGgnrfs otaBaSjGgnrfs) {
Date now = new Date();
if (null != otaBaSjGgnrfs) {
OtaBaSjGgnrfs otaBaSjGgnrfsOld = this.getByOtaId(otaBaSjGgnrfs.getOtaId());
OtaBaSjGgnrfs otaBaSjGgnrfsOld = this.queryByOtaId(otaBaSjGgnrfs.getOtaId(), "");
String oldFjStr = "";
if (null != otaBaSjGgnrfsOld) {
otaBaSjGgnrfs.setId(otaBaSjGgnrfsOld.getId());
@@ -76,13 +76,12 @@ public class OtaBaSjGgnrfsServiceImpl extends ServiceImpl<OtaBaSjGgnrfsMapper, O
otaBaSjGgnrfs.setCreateTime(now);
}
otaBaSjGgnrfs.setUpdateTime(now);
saveOrUpdate(otaBaSjGgnrfs);
ComparisonUtil cu = new ComparisonUtil();
if (ObjectUtils.isEmpty(otaBaSjGgnrfsOld)) {
otaBaSjGgnrfsOld = new OtaBaSjGgnrfs();
}
saveOrUpdate(otaBaSjGgnrfs);
List<OtaBaCxTxjl> reList = cu.comparisonRecord(otaBaSjGgnrfs.getOtaId(), OtaModuleEnum.SJ_YHGZNRFS, otaBaSjGgnrfsOld, otaBaSjGgnrfs, sysDictService);
reList.addAll(cu.comparisonRecord(otaBaSjGgnrfs.getOtaId(), otaBaSjGgnrfs.getXgwj(), oldFjStr, OtaModuleEnum.SJ_YHGZNRFS, "附件", ossFileService));
otaBaCxTxjlService.saveBatch(reList);
}
@@ -150,6 +149,28 @@ public class OtaBaSjGgnrfsServiceImpl extends ServiceImpl<OtaBaSjGgnrfsMapper, O
if (ObjectUtils.isEmpty(res)) {
res = getByOtaId(otaIdT);
}
if (ObjectUtils.isEmpty(res)) {
res = new OtaBaSjGgnrfs();
res.setOtaId(otaId);
}
if (StringUtils.isEmpty(res.getSjky())) {
res.setSjky("车辆解闭锁功能可用,但不可驾驶");
}
if (StringUtils.isEmpty(res.getSjbkygn())) {
res.setSjbkygn("除解闭锁均不可用");
}
if (null == res.getSjsfcg()) {
res.setSjsfcg(1);
}
if (null == res.getGzbg()) {
res.setGzbg(1);
}
if (null == res.getGzscnr()) {
res.setGzscnr(1);
}
if (StringUtils.isEmpty(res.getGzyhfs())) {
res.setGzyhfs("1,3");
}
return res;
}
@@ -90,9 +90,12 @@ public class OtaBaSjSjmbcxServiceImpl extends ServiceImpl<OtaBaSjSjmbcxMapper, O
otaBaSjListService.editById(otaBaSjList);
}
otaBaSjSjmbcx.setUpdateTime(now);
saveOrUpdate(otaBaSjSjmbcx);
ComparisonUtil cu = new ComparisonUtil();
List<OtaBaCxTxjl> reList = cu.comparisonRecord(otaBaSjSjmbcx.getOtaId(), OtaModuleEnum.SJ_SJMBCX, otaBaSjSjmbcxOld, otaBaSjSjmbcx, sysDictService);
if (StringUtils.isEmpty(otaBaSjSjmbcx.getQymc())) {
otaBaSjSjmbcx.setQymc("安徽江淮汽车集团股份有限公司");
}
saveOrUpdate(otaBaSjSjmbcx);
otaBaCxTxjlService.saveBatch(reList);
return otaBaSjSjmbcx;
}
@@ -239,7 +239,6 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
int rows = s.getPhysicalNumberOfRows();
for (int i = 4; i < rows; i++) {
OtaBaSjSjxtbh xtbh = new OtaBaSjSjxtbh();
xtbh.setOtaId(otaId);
Row row = s.getRow(i);
Cell cell = row.getCell(2);
String kzq = ImportFileUtil.getCellValue(cell, wb);
@@ -250,7 +249,6 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
xtbh.setXtmc(gnxt);
}
}
cell = row.getCell(0);
xtbh.setSjqbgcs(ImportFileUtil.getCellValue(cell, wb));
cell = row.getCell(1);
@@ -271,6 +269,9 @@ public class OtaBaSjSjxtbhServiceImpl extends ServiceImpl<OtaBaSjSjxtbhMapper, O
xtbh.setSjbdx(ImportFileUtil.getCellValue(cell, wb));
cell = row.getCell(10);
xtbh.setSfcfsj(ImportFileUtil.getCellValue(cell, wb));
if (xtbh.isNull()) {
break;
}
xtbh.setCreateTime(now);
xtbh.setUpdateTime(now);
xtbh.setOtaId(otaId);
@@ -16,8 +16,6 @@ import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.xwpf.usermodel.XWPFDocument;
import org.apache.poi.xwpf.usermodel.XWPFTable;
import org.apache.poi.xwpf.usermodel.XWPFTableCell;
import org.apache.poi.xwpf.usermodel.XWPFTableRow;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@@ -76,7 +74,7 @@ public class OtaBaSjSjyxpgServiceImpl extends ServiceImpl<OtaBaSjSjyxpgMapper, O
String newZmcl = otaBaSjSjyxpg.getClfj();
String oldZmcl = "";
OtaBaSjSjyxpg otaBaSjSjyxpgOld = this.getByOtaId(otaBaSjSjyxpg.getOtaId());
OtaBaSjSjyxpg otaBaSjSjyxpgOld = this.queryByOtaId(otaBaSjSjyxpg.getOtaId(),"");
if (null != otaBaSjSjyxpgOld) {
otaBaSjSjyxpg.setId(otaBaSjSjyxpgOld.getId());
oldYzcl = otaBaSjSjyxpgOld.getBgfj();
@@ -85,7 +83,6 @@ public class OtaBaSjSjyxpgServiceImpl extends ServiceImpl<OtaBaSjSjyxpgMapper, O
otaBaSjSjyxpg.setCreateTime(now);
}
otaBaSjSjyxpg.setUpdateTime(now);
saveOrUpdate(otaBaSjSjyxpg);
ComparisonUtil cu = new ComparisonUtil();
if (ObjectUtils.isEmpty(otaBaSjSjyxpgOld)) {
otaBaSjSjyxpgOld = new OtaBaSjSjyxpg();
@@ -93,6 +90,8 @@ public class OtaBaSjSjyxpgServiceImpl extends ServiceImpl<OtaBaSjSjyxpgMapper, O
List<OtaBaCxTxjl> reList = cu.comparisonRecord(otaBaSjSjyxpg.getOtaId(), OtaModuleEnum.SJ_SJYXPG, otaBaSjSjyxpgOld, otaBaSjSjyxpg, sysDictService);
reList.addAll(cu.comparisonRecord(otaBaSjSjyxpg.getOtaId(), newYzcl, oldYzcl, OtaModuleEnum.SJ_SJMBCL, "验证材料", ossFileService));
reList.addAll(cu.comparisonRecord(otaBaSjSjyxpg.getOtaId(), newZmcl, oldZmcl, OtaModuleEnum.SJ_SJMBCL, "证明材料", ossFileService));
saveOrUpdate(otaBaSjSjyxpg);
otaBaCxTxjlService.saveBatch(reList);
}
}
@@ -159,6 +158,35 @@ public class OtaBaSjSjyxpgServiceImpl extends ServiceImpl<OtaBaSjSjyxpgMapper, O
if (ObjectUtils.isEmpty(res)) {
res = getByOtaId(otaIdT);
}
if (ObjectUtils.isEmpty(res)) {
res = new OtaBaSjSjyxpg();
res.setOtaId(otaId);
}
if (null == res.getFhgd()) {
res.setFhgd(2);
}
if (null == res.getZdjsxg()) {
res.setZdjsxg(1);
}
if (null == res.getZxsj()) {
res.setZxsj(2);
}
if (StringUtils.isEmpty(res.getAqjz())) {
res.setAqjz("2");
}
if (null == res.getSfyxaq()) {
res.setSfyxaq(2);
}
if (null == res.getYhqr()) {
res.setYhqr(1);
}
if (StringUtils.isEmpty(res.getSjbcs())) {
res.setSjbcs("3,4");
}
if (null == res.getAqkkx()) {
res.setAqkkx(1);
}
return res;
}
+1 -1
View File
@@ -1739,5 +1739,5 @@ module.exports = {
verifyConformanceConfirmation:'Verify conformance confirmation',
designConformanceVerification:'Design conformance verification',
nomorethan:'No more than 10',
uploadedfilelarger:'The uploaded file is larger than 50 MB',
uploadedfilelarger:'The uploaded file is larger than',
}
+1 -1
View File
@@ -1841,5 +1841,5 @@ module.exports = {
verifyConformanceConfirmation:'验证符合性确认',
designConformanceVerification:'设计符合性确认',
nomorethan:'不能超过10个',
uploadedfilelarger:'文件大于50M',
uploadedfilelarger:'文件大于',
}
+1 -1
View File
@@ -103,7 +103,7 @@
const isLt2KB = file.size / 1024 /1024 < this.size
let name = file.name
if (!isLt2KB) {
this.$message.error(name + this.$t('uploadedfilelarger'))
this.$message.error(name + this.$t('uploadedfilelarger') + this.size + 'M')
return false
}
}
+10 -1
View File
@@ -34,7 +34,7 @@
export default {
name: 'file',
props: ['disableds', 'disabled','acceptcode', 'thisFileUploadUrl', 'readonly', 'thisFileType', 'isUploadFile', 'isMultiple', 'restrictUploads', 'Uploadable'],
props: ['disableds', 'disabled','acceptcode', 'thisFileUploadUrl','size', 'readonly', 'thisFileType', 'isUploadFile', 'isMultiple', 'restrictUploads', 'Uploadable'],
data() {
return {
visible: false,
@@ -98,6 +98,15 @@
return false
}
}
// 根据大小拦截
if(this.size){
const isLt2KB = file.size / 1024 /1024 < this.size
let name = file.name
if (!isLt2KB) {
this.$message.error(name + this.$t('uploadedfilelarger') + this.size + 'M')
return false
}
}
if (this.isMultiple) {
if ((this.myfileList && this.myfileList.length == 1) || this.myfileList && this.myfileList.length > 1) {
this.$message.warning(this.$t('onlyOnefileUploaded'))