diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/mapper/SysUserMapper.java b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/mapper/SysUserMapper.java index 2bd69698c..c9dcb01e8 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/mapper/SysUserMapper.java +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/mapper/SysUserMapper.java @@ -153,4 +153,6 @@ public interface SysUserMapper extends BaseMapper { List getPPEmployeeList(@Param("thirdType") String thirdType); void updateByIdPP (SysUser sysUser); + + List getListUserName(); } diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/mapper/xml/SysUserMapper.xml b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/mapper/xml/SysUserMapper.xml index 4f19d362b..414f333b2 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/mapper/xml/SysUserMapper.xml +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/mapper/xml/SysUserMapper.xml @@ -222,4 +222,8 @@ id = #{id} + + diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxListController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxListController.java index c1ff0530c..3cf8577c8 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxListController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaCxListController.java @@ -86,6 +86,12 @@ public class OtaBaCxListController extends JeroController pageList = otaBaCxListService.page(page, queryWrapper); return Result.OK(pageList); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjListController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjListController.java index 344eafb8c..a7ebadbc4 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjListController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/controller/OtaBaSjListController.java @@ -1,6 +1,7 @@ package com.jero.modules.ota.controller; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -8,11 +9,13 @@ import com.jero.common.api.vo.Result; import com.jero.common.aspect.annotation.AutoLog; import com.jero.common.system.base.controller.JeroController; import com.jero.common.system.query.QueryGenerator; +import com.jero.modules.ota.entity.OtaBaCxList; import com.jero.modules.ota.entity.OtaBaSjList; import com.jero.modules.ota.service.IOtaBaSjListService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -55,9 +58,37 @@ public class OtaBaSjListController extends JeroController queryWrapper = QueryGenerator.initQueryWrapper(otaBaSjList, req.getParameterMap()); - queryWrapper.orderByDesc("create_time"); Page page = new Page(pageNo, pageSize); + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + String cpdjbh = req.getParameter("cpdjbh"); + if (StringUtils.isNotBlank(cpdjbh)) { + cpdjbh = cpdjbh.replace("%", "\\%"); + queryWrapper.like(OtaBaSjList::getCpdjbh, cpdjbh); + } + String ggpc = req.getParameter("ggpc"); + if (StringUtils.isNotBlank(ggpc)) { + ggpc = ggpc.replace("%", "\\%"); + queryWrapper.like(OtaBaSjList::getGgpc, ggpc); + } + + String cpsb = req.getParameter("cpsb"); + if (StringUtils.isNotBlank(cpsb)) { + cpsb = cpsb.replace("%", "\\%"); + queryWrapper.like(OtaBaSjList::getCpsb, cpsb); + } + + String cpmc = req.getParameter("cpmc"); + if (StringUtils.isNotBlank(cpmc)) { + cpmc = cpmc.replace("%", "\\%"); + queryWrapper.like(OtaBaSjList::getCpmc, cpmc); + } + + String cpxh = req.getParameter("cpmc"); + if (StringUtils.isNotBlank(cpxh)) { + cpxh = cpxh.replace("%", "\\%"); + queryWrapper.like(OtaBaSjList::getCpxh, cpxh); + } + IPage pageList = otaBaSjListService.page(page, queryWrapper); return Result.OK(pageList); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaCxAqcs.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaCxAqcs.java index 7b73501d0..fd3829332 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaCxAqcs.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaCxAqcs.java @@ -3,6 +3,7 @@ package com.jero.modules.ota.entity; import java.io.Serializable; import java.io.UnsupportedEncodingException; import java.math.BigDecimal; +import java.util.ArrayList; import java.util.List; import com.baomidou.mybatisplus.annotation.IdType; @@ -99,6 +100,6 @@ public class OtaBaCxAqcs implements Serializable { private java.lang.String zmcl; @TableField(exist = false) - private List zmclList; + private List zmclList = new ArrayList<>(); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaCxZxsjyq.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaCxZxsjyq.java index 6cc9a8581..24984285d 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaCxZxsjyq.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaBaCxZxsjyq.java @@ -3,6 +3,7 @@ package com.jero.modules.ota.entity; import java.io.Serializable; import java.io.UnsupportedEncodingException; import java.math.BigDecimal; +import java.util.ArrayList; import java.util.List; import com.baomidou.mybatisplus.annotation.IdType; @@ -125,6 +126,6 @@ public class OtaBaCxZxsjyq implements Serializable { private java.lang.String zmcl; @TableField(exist = false) - private List zmclList; + private List zmclList = new ArrayList<>(); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/enums/OtaTitleEnum.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/enums/OtaTitleEnum.java index 8dd21374f..a0dca3213 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/enums/OtaTitleEnum.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/enums/OtaTitleEnum.java @@ -22,45 +22,44 @@ public enum OtaTitleEnum { TXZD("txzd", "通信终端", "communication_terminal"), CDOTASJ("cdotasj", "车端OTA升级管理系统", "0"), - BHSJB("bhsjb", "保护升级包", "2"), - BHCLBB("bhclbb", "保护车辆版本", "2"), - CLGXNL("clgxnl", "车辆更新能力", "2"), - CLSJTJ("clsjtj", "车辆升级条件", "2"), - CLSJDL("clsjdl", "车辆升级所需电量", "2"), - SJBHAQ("sjbhaq", "升级保护车辆安全", "2"), - SJANTJ("sjantj", "升级所满足的安全条件", "2"), - SJSBAQ("sjsbaq", "升级失败安全状态", "2"), - SJGG("sjgg", "升级公告", "2"), - SJZT("sjzt", "升级结果状态", "2"), - ZMCL("zmcl", "证明材料", "0"), + BHSJB("bhsjb", "激光雷达-应保护升级包的真实性和完整性,以合理地防止其受到损害,并合理地防止无效升级\t", "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"), - BHJZ("bhjz", "保护机制", "protection_mechanism"), - FSXJZ("fsxjz", "防失效机制", "fail_safe_mechanism"), - SJSBCS("sjsbcs", "升级失败措施", "upgrade_failure"), + BHJZ("bhjz", "真实性、完整性保护机制", "protection_mechanism"), + FSXJZ("fsxjz", "防失效保护机制", "fail_safe_mechanism"), + SJSBCS("sjsbcs", "升级失败后车辆安全措施", "upgrade_failure"), XXAQJZ("xxaqjz", "信息安全机制", "Information_security_mechanism"), XTLB("xtlb", "系统类别", "0"), SFKSJ("sfksj", "是否可升级", "2"), - SJBGCS("sjbgcs", "升级变更技术参数", "0"), - TPT("tpt", "系统电子控制器架构拓扑图", "0"), + SJBGCS("sjbgcs", "升级可能变更的《公告》技术参数", "0"), + //TPT("tpt", "系统-电子控制器架构拓扑图(附件需含拓扑图介绍)", "0"), KZQMC("kzqmc", "电子控制器名称", "0"), - AQWZXDJ("aqwzxdj", "安全完整性等级", "0"), + AQWZXDJ("aqwzxdj", "电子控制器汽车安全完整性等级(ASIL)", "0"), KZQSCQY("kzqscqy", "电子控制器生产企业", "0"), KZQXH("kzqxh", "电子控制器型号", "0"), YJBBXX("yjbbxx", "硬件版本信息", "0"), CSRJBBH("csrjbbh", "初始软件版本号", "0"), - CSRJBWZSJ("csrjbwzsj", "初始软件包完整数据", "0"), - SJSFYX("sjsfyx", "升级是否影响整车安全、节能、环保、防盗等", "0"), + CSRJBWZSJ("csrjbwzsj", "初始软件包的完整性验证数据", "0"), + SJSFYX("sjsfyx", "升级是否影响整车安全、节能、环保、防盗等性能", "0"), CZXTLX("czxtlx", "操作系统类型", "0"), CZXTSCQY("czxtscqy", "操作系统生产企业", "0"), - CZXTBBH("czxtbbh", "操作系统版本号", "0"), + CZXTBBH("czxtbbh", "软件版本号", "0"), GNMC("gnmc", "功能名称", "0"), PZQK("pzqk", "配置情况", "2"), JSZDHJB("jszdhjb", "驾驶自动化级别", "driving_automation_level"), SJGGCS("sjggcs", "升级可能变更的《公告》技术参数", "0"), GNMS("gnms", "功能描述", "0"), - SYTJ("sytj", "适用条件", "0"), + SYTJ("sytj", "适用条件(边界条件)", "0"), RJKFQY("rjkfqy", "软件开发企业", "0"), CSYZSJ("csyzsj", "初始软件包的完整性验证数据", "0"), FJ("fj", "附件", "0"), @@ -121,19 +120,19 @@ public enum OtaTitleEnum { CZTX_BBH("cztxBbh", "车载通信系统-版本号", "0"), CZTX_KFQY("cztxKfqy", "车载通信系统-软件开发企业", "0"), JSFZCZJ_PZ("jsfzczjPz", "驾驶辅助系统操纵件、指示器及信号装置-驾驶辅助功能操纵件-配置", "2"), - JSFZCZJ_MC("jsfzczjMc", "驾驶辅助系统操纵件、指示器及信号装置-驾驶辅助功能操纵件-名称", "0"), + 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"), + 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_MC("fxptstsMc", "驾驶辅助系统操纵件、指示器及信号装置-方向盘脱手提示器/信号装置-指示器/信号装置名称", "0"), FXPTSTS_YJXH("fxptstsYjxh", "驾驶辅助系统操纵件、指示器及信号装置-方向盘脱手提示器/信号装置-硬件规格型号", "0"), FXPTSTS_SCQY("fxptstsScqy", "驾驶辅助系统操纵件、指示器及信号装置-方向盘脱手提示器/信号装置-生产企业", "0"), JSYZYLTS_PZ("jsyzyltsPz", "驾驶辅助系统操纵件、指示器及信号装置-驾驶员注意力提醒指示器/信号装置-配置", "2"), - JSYZYLTS_MC("jsyzyltsMc", "驾驶辅助系统操纵件、指示器及信号装置-驾驶员注意力提醒指示器/信号装置-名称", "0"), + JSYZYLTS_MC("jsyzyltsMc", "驾驶辅助系统操纵件、指示器及信号装置-驾驶员注意力提醒指示器/信号装置-指示器/信号装置名称", "0"), JSYZYLTS_YJXH("jsyzyltsYjxh", "驾驶辅助系统操纵件、指示器及信号装置-驾驶员注意力提醒指示器/信号装置-硬件规格型号", "0"), JSYZYLTS_SCQY("jsyzyltsScqy", "驾驶辅助系统操纵件、指示器及信号装置-驾驶员注意力提醒指示器/信号装置-生产企业", "0"), DSSAD_PZ("dssadPz", "自动驾驶数据记录系统(DSSAD)-系统配置", "2"), @@ -170,8 +169,8 @@ public enum OtaTitleEnum { YHQR("yhqr", "升级活动是否提供用户确认选项", "0"), SJBCS("sjbcs", "升级包测试", "package_test"), AQKKX("aqkkx", "是杏已验证确认在线升级活动的安全性和可靠性", "0"), - BGFJ("bgfj", "提供变更或扩展后的《公告》批次及证明材料", "0"), - CLFJ("clfj", "提供证明材料", "0"), + // BGFJ("bgfj", "提供变更或扩展后的《公告》批次及证明材料", "0"), +// CLFJ("clfj", "提供证明材料", "0"), XTMC("xtmc", "系统名称", "0"), SJQBGCS("sjqbgcs", "升级前已变更《公告》参数的对应调整", "0"), SJHBGCS("sjhbgcs", "升级后已变更《公告》参数的对应调整", "0"), @@ -198,7 +197,7 @@ public enum OtaTitleEnum { GZBG("gzbg", "告知实施的变更", "0"), GZSCNR("gzscnr", "告知了对用户手册的全部更新内容", "0"), GZYHFS("gzyhfs", "告知用户方式(可多选)", "0"), - XGWJ("xgwj", "用户告知相关文件", "0"), + // XGWJ("xgwj", "用户告知相关文件", "0"), RWMC("rwmc", "任务名称", "0"), SJFBSJ("sjfbsj", "升级发布时间", "0"), SJJZSJ("sjjzsj", "升级计划截止时间", "0"); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxAqcsServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxAqcsServiceImpl.java index 452839e8e..aa786c249 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxAqcsServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxAqcsServiceImpl.java @@ -28,6 +28,8 @@ import java.io.File; import java.io.InputStream; import java.util.List; import java.util.Date; +import java.util.Map; +import java.util.stream.Collectors; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.web.multipart.MultipartFile; @@ -76,6 +78,7 @@ public class OtaBaCxAqcsServiceImpl extends ServiceImpl 0) { JSONArray obj = new JSONArray(); for (AttachmentEO aeo : otaBaCxAqcs.getZmclList()) { @@ -83,12 +86,29 @@ public class OtaBaCxAqcsServiceImpl extends ServiceImpl aeoList = JSONArray.parseArray(otaBaCxAqcsOld.getZmcl(), AttachmentEO.class); + otaBaCxAqcsOld.setZmclList(aeoList); + } saveOrUpdate(otaBaCxAqcs); ComparisonUtil cu = new ComparisonUtil(); if (ObjectUtils.isEmpty(otaBaCxAqcsOld)) { otaBaCxAqcsOld = new OtaBaCxAqcs(); } List reList = cu.comparisonRecord(otaBaCxAqcs.getOtaId(), OtaModuleEnum.CX_AQCS, otaBaCxAqcsOld, otaBaCxAqcs, sysDictService); + + Map newAttMap = otaBaCxAqcs.getZmclList().stream().collect(Collectors.toMap(AttachmentEO::getId, AttachmentEO::getFileName)); + Map oldAttMap = otaBaCxAqcsOld.getZmclList().stream().collect(Collectors.toMap(AttachmentEO::getId, AttachmentEO::getFileName)); + for (String nId : newAttMap.keySet()) { + if (!oldAttMap.containsKey(nId)) { + reList.add(cu.addAttRecord(otaBaCxAqcs.getOtaId(), OtaModuleEnum.CX_AQCS, "证明材料", newAttMap.get(nId))); + } + } + for (String oId : oldAttMap.keySet()) { + if (!newAttMap.containsKey(oId)) { + reList.add(cu.delAttRecord(otaBaCxAqcs.getOtaId(), OtaModuleEnum.CX_AQCS, "证明材料", oldAttMap.get(oId))); + } + } otaBaCxTxjlService.saveBatch(reList); } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjjsmccsServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjjsmccsServiceImpl.java index 6b68cc0d4..a46356589 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjjsmccsServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjjsmccsServiceImpl.java @@ -18,7 +18,7 @@ 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 com.jero.modules.system.util.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.ObjectUtils; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Row; @@ -111,15 +111,13 @@ public class OtaBaCxKsjjsmccsServiceImpl extends ServiceImpl reList = cu.comparisonListRecord(otaId, OtaModuleEnum.CX_KZXSJDJSFZGNMCYCS, OtaTitleEnum.GNMC.getName(), oldList, newList, sysDictService); saveOrUpdateBatch(newList); - otaBaCxTxjlService.saveBatch(reList); String fj = (String) json.get("fj"); - if (StringUtils.isNotEmpty(fj)) { - OtaBaCxList otaBaCxList = otaBaCxListService.queryById(otaId); - if (ObjectUtils.isNotEmpty(otaBaCxList)) { - otaBaCxList.setZxsjjsfj(fj); - otaBaCxListService.editById(otaBaCxList); - } - } + OtaBaCxList otaBaCxList = otaBaCxListService.queryById(otaId); + String oldFjStr = otaBaCxList.getZxsjjsfj(); + otaBaCxList.setZxsjjsfj(fj); + otaBaCxListService.editById(otaBaCxList); + reList.addAll(cu.comparisonRecord(otaId, fj, oldFjStr, OtaModuleEnum.CX_KZXSJDJSFZGNMCYCS, "附件", ossFileService)); + otaBaCxTxjlService.saveBatch(reList); } } @@ -195,7 +193,7 @@ public class OtaBaCxKsjjsmccsServiceImpl extends ServiceImpl getByOtaId(String otaId) { - if(org.apache.commons.lang3.StringUtils.isEmpty(otaId)){ + if (StringUtils.isEmpty(otaId)) { return null; } LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjxtmccsServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjxtmccsServiceImpl.java index a31008aac..0d82b2afd 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjxtmccsServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaCxKsjxtmccsServiceImpl.java @@ -18,7 +18,7 @@ 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 com.jero.modules.system.util.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.ObjectUtils; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Row; @@ -32,6 +32,8 @@ import java.io.File; import java.io.InputStream; import java.lang.reflect.Field; import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.web.multipart.MultipartFile; @@ -107,18 +109,84 @@ public class OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl reList = cu.comparisonListRecord(otaId, OtaModuleEnum.CX_KSJDXTMCYCS, OtaTitleEnum.XTLB.getName(), oldList, newList, sysDictService); saveOrUpdateBatch(newList); - otaBaCxTxjlService.saveBatch(reList); - String fj = (String) json.get("fj"); - if (StringUtils.isNotEmpty(fj)) { - OtaBaCxList otaBaCxList = otaBaCxListService.queryById(otaId); - if (ObjectUtils.isNotEmpty(otaBaCxList)) { - otaBaCxList.setZxsjxtfj(fj); - otaBaCxListService.editById(otaBaCxList); + + Map newMap = newList.stream().collect(Collectors.toMap(OtaBaCxKsjxtmccs::getId, Function.identity())); + Map oldMap = oldList.stream().collect(Collectors.toMap(OtaBaCxKsjxtmccs::getId, Function.identity())); + for (String nId : newMap.keySet()) { + if (oldMap.containsKey(nId)) { + String newTptStr = newMap.get(nId).getTpt(); + if (StringUtils.isNotEmpty(newTptStr)) { + String[] newTpts = newTptStr.split(","); + String oldTptStr = oldMap.get(nId).getTpt(); + for (String nt : newTpts) { + if (StringUtils.isEmpty(oldTptStr) || !oldTptStr.contains(nt)) { + List fileList = ossFileService.getFileInfos(nt); + if (ObjectUtils.isNotEmpty(fileList)) { + for (OSSFile f : fileList) { + reList.add(cu.addAttRecord(otaId, OtaModuleEnum.CX_KSJDXTMCYCS, newMap.get(nId).getXtlb() + "-系统-电子控制器架构拓扑图(附件需含拓扑图介绍)", f.getFileName())); + } + } + } + } + } } } + + for (String oId : oldMap.keySet()) { + if (newMap.containsKey(oId)) { + String oldTptStr = oldMap.get(oId).getTpt(); + if (StringUtils.isNotEmpty(oldTptStr)) { + String[] oldTpts = oldTptStr.split(","); + String newTptStr = newMap.get(oId).getTpt(); + for (String ot : oldTpts) { + if (StringUtils.isEmpty(newTptStr) || !newTptStr.contains(ot)) { + List fileList = ossFileService.getFileInfos(ot); + if (ObjectUtils.isNotEmpty(fileList)) { + for (OSSFile f : fileList) { + reList.add(cu.delAttRecord(otaId, OtaModuleEnum.CX_KSJDXTMCYCS, oldMap.get(oId).getXtlb() + "-系统-电子控制器架构拓扑图(附件需含拓扑图介绍)", f.getFileName())); + } + } + } + } + } + } + } + + String fj = (String) json.get("fj"); + OtaBaCxList otaBaCxList = otaBaCxListService.queryById(otaId); + String oldFjStr = otaBaCxList.getZxsjxtfj(); + otaBaCxList.setZxsjxtfj(fj); + otaBaCxListService.editById(otaBaCxList); + String[] newFjList = {}; + if (StringUtils.isNotEmpty(fj)) { + newFjList = fj.split(","); + } + for (String nf : newFjList) { + if (StringUtils.isEmpty(oldFjStr) || !oldFjStr.contains(nf)) { + List fileList = ossFileService.getFileInfos(nf); + if (ObjectUtils.isNotEmpty(fileList)) { + for (OSSFile f : fileList) { + reList.add(cu.addAttRecord(otaId, OtaModuleEnum.CX_KSJDXTMCYCS, "附件", f.getFileName())); + } + } + } + } + String[] oldFjList = {}; + if (StringUtils.isNotEmpty(oldFjStr)) { + oldFjList = oldFjStr.split(","); + } + for (String of : oldFjList) { + if (StringUtils.isEmpty(fj) || !fj.contains(of)) { + List fileList = ossFileService.getFileInfos(of); + if (ObjectUtils.isNotEmpty(fileList)) { + for (OSSFile f : fileList) { + reList.add(cu.delAttRecord(otaId, OtaModuleEnum.CX_KSJDXTMCYCS, "附件", f.getFileName())); + } + } + } + } + otaBaCxTxjlService.saveBatch(reList); } - - } /** @@ -193,7 +261,7 @@ public class OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl getByOtaId(String otaId) { - if(org.apache.commons.lang3.StringUtils.isEmpty(otaId)){ + if (org.apache.commons.lang3.StringUtils.isEmpty(otaId)) { return null; } LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); @@ -371,7 +439,7 @@ public class OtaBaCxKsjxtmccsServiceImpl extends ServiceImpl 0) { JSONArray obj = new JSONArray(); for (AttachmentEO aeo : otaBaCxZxsjyq.getZmclList()) { @@ -88,12 +89,31 @@ public class OtaBaCxZxsjyqServiceImpl extends ServiceImpl aeoList = JSONArray.parseArray(otaBaCxZxsjyqOld.getZmcl(), AttachmentEO.class); + otaBaCxZxsjyqOld.setZmclList(aeoList); + } saveOrUpdate(otaBaCxZxsjyq); + ComparisonUtil cu = new ComparisonUtil(); if (ObjectUtils.isEmpty(otaBaCxZxsjyqOld)) { otaBaCxZxsjyqOld = new OtaBaCxZxsjyq(); } + List reList = cu.comparisonRecord(otaBaCxZxsjyq.getOtaId(), OtaModuleEnum.CX_ZXSJYQ, otaBaCxZxsjyqOld, otaBaCxZxsjyq, sysDictService); + Map newAttMap = otaBaCxZxsjyq.getZmclList().stream().collect(Collectors.toMap(AttachmentEO::getId, AttachmentEO::getFileName)); + Map oldAttMap = otaBaCxZxsjyqOld.getZmclList().stream().collect(Collectors.toMap(AttachmentEO::getId, AttachmentEO::getFileName)); + + for (String nId : newAttMap.keySet()) { + if (!oldAttMap.containsKey(nId)) { + reList.add(cu.addAttRecord(otaBaCxZxsjyq.getOtaId(), OtaModuleEnum.CX_ZXSJYQ, "证明材料", newAttMap.get(nId))); + } + } + for (String oId : oldAttMap.keySet()) { + if (!newAttMap.containsKey(oId)) { + reList.add(cu.delAttRecord(otaBaCxZxsjyq.getOtaId(), OtaModuleEnum.CX_ZXSJYQ, "证明材料", oldAttMap.get(oId))); + } + } otaBaCxTxjlService.saveBatch(reList); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjGgnrfsServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjGgnrfsServiceImpl.java index a3aeb236c..fd23adce6 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjGgnrfsServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjGgnrfsServiceImpl.java @@ -1,10 +1,9 @@ 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.modules.ota.entity.AttachmentEO; -import com.jero.modules.ota.entity.OtaBaCxAqcs; +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.enums.OtaModuleEnum; @@ -18,16 +17,13 @@ import org.apache.commons.lang3.ObjectUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; - -import java.io.File; -import java.util.List; -import java.util.Date; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import java.io.File; +import java.util.Date; +import java.util.List; /** * @Description: 升级备案-用户告知内容及方式 @@ -50,6 +46,9 @@ public class OtaBaSjGgnrfsServiceImpl extends ServiceImpl 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); } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjfzbhServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjfzbhServiceImpl.java index 5b9ef816e..506a01738 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjfzbhServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjfzbhServiceImpl.java @@ -107,15 +107,14 @@ public class OtaBaSjSjfzbhServiceImpl extends ServiceImpl reList = cu.comparisonListRecord(otaId, OtaModuleEnum.SJ_SJJSMCBH, OtaTitleEnum.GNMC.getName(), oldList, newList, sysDictService); saveOrUpdateBatch(newList); - otaBaCxTxjlService.saveBatch(reList); String fj = (String) json.get("fj"); - if (StringUtils.isNotEmpty(fj)) { - OtaBaSjList otaBaSjList = otaBaSjListService.queryById(otaId); - if (ObjectUtils.isNotEmpty(otaBaSjList)) { - otaBaSjList.setSjjsfj(fj); - otaBaSjListService.editById(otaBaSjList); - } - } + 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); + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjmbclServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjmbclServiceImpl.java index 5d54760a5..266fce976 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjmbclServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjmbclServiceImpl.java @@ -2,6 +2,8 @@ package com.jero.modules.ota.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.jero.common.exception.JeroBootException; +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; import com.jero.modules.ota.mapper.OtaBaSjSjmbclMapper; @@ -54,6 +56,9 @@ public class OtaBaSjSjmbclServiceImpl extends ServiceImpl reList = cu.comparisonRecord(otaBaSjSjmbcl.getOtaId(), OtaModuleEnum.SJ_SJMBCL, otaBaSjSjmbclOld, otaBaSjSjmbcl, sysDictService); + reList.addAll(cu.comparisonRecord(otaBaSjSjmbcl.getOtaId(), newFj, oldFjStr, OtaModuleEnum.SJ_SJMBCL, "附件", ossFileService)); otaBaCxTxjlService.saveBatch(reList); } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjyxpgServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjyxpgServiceImpl.java index 111049ed2..d60a46d82 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjyxpgServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaBaSjSjyxpgServiceImpl.java @@ -3,6 +3,7 @@ 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.modules.oss.service.IOSSFileService; import com.jero.modules.ota.entity.*; import com.jero.modules.ota.enums.OtaModuleEnum; import com.jero.modules.ota.mapper.OtaBaSjSjyxpgMapper; @@ -49,6 +50,9 @@ public class OtaBaSjSjyxpgServiceImpl extends ServiceImpl 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)); otaBaCxTxjlService.saveBatch(reList); } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/utils/ComparisonUtil.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/utils/ComparisonUtil.java index 257d5b1a0..6c42e3acc 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/utils/ComparisonUtil.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/utils/ComparisonUtil.java @@ -1,5 +1,7 @@ package com.jero.modules.ota.utils; +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.enums.OtaModuleEnum; import com.jero.modules.ota.enums.OtaTitleEnum; @@ -22,6 +24,51 @@ public class ComparisonUtil { public ComparisonUtil() { } + + public List comparisonRecord(String otaId, String newFj,String oldFjStr,OtaModuleEnum otaModuleEnum, String title, IOSSFileService ossFileService) { + List reList = new ArrayList<>(); + String[] newFjList = {}; + if (StringUtils.isNotEmpty(newFj)) { + newFjList = newFj.split(","); + } + for (String nf : newFjList) { + if (StringUtils.isEmpty(oldFjStr) || !oldFjStr.contains(nf)) { + List fileList = ossFileService.getFileInfos(nf); + if (ObjectUtils.isNotEmpty(fileList)) { + for (OSSFile f : fileList) { + reList.add(addAttRecord(otaId, otaModuleEnum, title, f.getFileName())); + } + } + } + } + String[] oldFjList = {}; + if (StringUtils.isNotEmpty(oldFjStr)) { + oldFjList = oldFjStr.split(","); + } + for (String of : oldFjList) { + if (StringUtils.isEmpty(newFj) || !newFj.contains(of)) { + List fileList = ossFileService.getFileInfos(of); + if (ObjectUtils.isNotEmpty(fileList)) { + for (OSSFile f : fileList) { + reList.add(delAttRecord(otaId, otaModuleEnum, title, f.getFileName())); + } + } + } + } + return reList; + } + public OtaBaCxTxjl addAttRecord(String otaId, OtaModuleEnum otaModuleEnum, String title, String attName) { + String content = title + "中添加了附件:'" + attName; + OtaBaCxTxjl jl = new OtaBaCxTxjl(otaId, otaModuleEnum.getName(), content); + return jl; + } + + public OtaBaCxTxjl delAttRecord(String otaId, OtaModuleEnum otaModuleEnum, String title, String attName) { + String content = title + "中删除了附件:'" + attName; + OtaBaCxTxjl jl = new OtaBaCxTxjl(otaId, otaModuleEnum.getName(), content); + return jl; + } + /** * 对比字段并添加到记录 */ diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEO.java index 54c3fb880..09da7697e 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEO.java @@ -65,28 +65,28 @@ public class ProjectCertificationInventoryEO implements Serializable { private String sysOrgCode; /**类别*/ - @Excel(name = "类别", width = 15) + @Excel(name = "类别", width = 20) @ApiModelProperty(value = "类别") private String category; /**检验项目*/ - @Excel(name = "检验项目", width = 15) + @Excel(name = "检验项目", width = 20) @ApiModelProperty(value = "检验项目") private String inspectionItem; /**配置项*/ - @Excel(name = "配置项", width = 15) + @Excel(name = "配置项", width = 20) @ApiModelProperty(value = "配置项") @Dict(dicCode = "ren4_zheng4_qing1_dan1_-_pei4_zhi4_xiang4") private String configItem; /**WVTA ID*/ - @Excel(name = "WVTA ID", width = 15) + @Excel(name = "WVTA ID", width = 20) @ApiModelProperty(value = "WVTA ID") private String wvtaId; /**标准编号*/ - @Excel(name = "*标准编号", width = 15) + @Excel(name = "*标准编号", width = 20) @ApiModelProperty(value = "标准编号") private String serialNumber; @@ -94,7 +94,7 @@ public class ProjectCertificationInventoryEO implements Serializable { @ApiModelProperty(value = "责任领域") private String dutyTerritory; /**责任领域名称**/ - @Excel(name = "*责任领域", width = 15) + @Excel(name = "*责任领域", width = 20) @TableField(exist = false) private String dutyTerritoryName; /**责任领域名称-英文**/ @@ -105,7 +105,7 @@ public class ProjectCertificationInventoryEO implements Serializable { @ApiModelProperty(value = "工程接口人") private String sdt; /**工程接口人名称**/ - @Excel(name = "工程接口人", width = 15) + @Excel(name = "工程接口人", width = 20) @TableField(exist = false) private String sdtName; @@ -113,7 +113,7 @@ public class ProjectCertificationInventoryEO implements Serializable { @ApiModelProperty(value = "责任人") private String dutyPerson; /**责任人名称**/ - @Excel(name = "责任人", width = 15) + @Excel(name = "责任人", width = 20) @TableField(exist = false) private String dutyPersonName; @@ -121,7 +121,7 @@ public class ProjectCertificationInventoryEO implements Serializable { @ApiModelProperty(value = "交付物类型") private String deliverableType; // 交付物类型名称 - @Excel(name = "交付物类型", width = 15) + @Excel(name = "交付物类型", width = 20) @TableField(exist = false) private String deliverableTypeName; // 交付物类型名称-英文 @@ -144,16 +144,16 @@ public class ProjectCertificationInventoryEO implements Serializable { private String deliverableTemplate; /**交付物模板名称**/ @TableField(exist = false) - @Excel(name = "交付物模板", width = 15) + @Excel(name = "交付物模板", width = 20) private String deliverableTemplateName; /**交付结果*/ - @Excel(name = "交付结果", width = 15) + @Excel(name = "交付结果", width = 20) @ApiModelProperty(value = "交付结果") private String deliveryResult; /**截止日期*/ - @Excel(name = "截止日期", width = 15, format = "yyyy-MM-dd") + @Excel(name = "截止日期", width = 20, format = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd") @ApiModelProperty(value = "截止日期") @@ -162,31 +162,32 @@ public class ProjectCertificationInventoryEO implements Serializable { @ApiModelProperty(value = "流程状态") private String flowStatus; // 流程状态展示名称 - @Excel(name = "流程状态", width = 15) + @Excel(name = "流程状态", width = 20) @TableField(exist = false) private String flowStatusName; /**报告编号*/ - @Excel(name = "报告编号", width = 15) + @Excel(name = "报告编号", width = 20) @ApiModelProperty(value = "报告编号") private String reportNumber; /**产品型号*/ - @Excel(name = "产品型号", width = 15) + @Excel(name = "产品型号", width = 20) @ApiModelProperty(value = "产品型号") private String productModel; /**生产企业名称*/ - @Excel(name = "生产企业名称", width = 15) + @Excel(name = "生产企业名称", width = 20) @ApiModelProperty(value = "生产企业名称") private String productionEnterpriseName; /**认证进度*/ - @Excel(name = "认证进度", width = 15) + @ApiModelProperty(value = "认证进度") private String certificationProgress; /**认证进度展示名称**/ + @Excel(name = "认证进度", width = 20) @TableField(exist = false) private String certificationProgress_dictText; @@ -214,7 +215,7 @@ public class ProjectCertificationInventoryEO implements Serializable { @TableField(exist = false) private String excelName; -// @Excel(name = "截止日期", width = 15, format = "yyyy-MM-dd") -// @TableField(exist = false) -// private String endTimeStr; +// @Excel(name = "截止日期", width = 20, format = "yyyy-MM-dd") + @TableField(exist = false) + private String endTimeStr; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEOEn.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEOEn.java index 1f31acd54..3b3cdd292 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEOEn.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/entity/ProjectCertificationInventoryEOEn.java @@ -63,28 +63,28 @@ public class ProjectCertificationInventoryEOEn implements Serializable { private java.lang.String sysOrgCode; /**类别*/ - @Excel(name = "Category", width = 15) + @Excel(name = "Category", width = 20) @ApiModelProperty(value = "类别") private java.lang.String category; /**检验项目*/ - @Excel(name = "Inspection Items", width = 15) + @Excel(name = "Inspection Items", width = 20) @ApiModelProperty(value = "检验项目") private java.lang.String inspectionItem; /**配置项*/ - @Excel(name = "Configuration Item", width = 15) + @Excel(name = "Configuration Item", width = 20) @ApiModelProperty(value = "配置项") @Dict(dicCode = "ren4_zheng4_qing1_dan1_-_pei4_zhi4_xiang4") private java.lang.String configItem; /**WVTA ID*/ - @Excel(name = "WVTA ID", width = 15) + @Excel(name = "WVTA ID", width = 20) @ApiModelProperty(value = "WVTA ID") private java.lang.String wvtaId; /**标准编号*/ - @Excel(name = "*Standard No", width = 15) + @Excel(name = "*Standard No", width = 20) @ApiModelProperty(value = "标准编号") private java.lang.String serialNumber; @@ -92,7 +92,7 @@ public class ProjectCertificationInventoryEOEn implements Serializable { @ApiModelProperty(value = "责任领域") private java.lang.String dutyTerritory; /**责任领域名称**/ - @Excel(name = "*Responsible Field", width = 15) + @Excel(name = "*Responsible Field", width = 20) @TableField(exist = false) private String dutyTerritoryName; /**责任领域名称-英文**/ @@ -103,7 +103,7 @@ public class ProjectCertificationInventoryEOEn implements Serializable { @ApiModelProperty(value = "工程接口人") private java.lang.String sdt; /**工程接口人名称**/ - @Excel(name = "Eng. Interface", width = 15) + @Excel(name = "Eng. Interface", width = 20) @TableField(exist = false) private String sdtName; @@ -111,7 +111,7 @@ public class ProjectCertificationInventoryEOEn implements Serializable { @ApiModelProperty(value = "责任人") private java.lang.String dutyPerson; /**责任人名称**/ - @Excel(name = "Assignee", width = 15) + @Excel(name = "Assignee", width = 20) @TableField(exist = false) private String dutyPersonName; @@ -119,7 +119,7 @@ public class ProjectCertificationInventoryEOEn implements Serializable { @ApiModelProperty(value = "交付物类型") private java.lang.String deliverableType; // 交付物类型名称 - @Excel(name = "Deliverable Type", width = 15) + @Excel(name = "Deliverable Type", width = 20) @TableField(exist = false) private String deliverableTypeName; // 交付物类型名称-英文 @@ -142,16 +142,16 @@ public class ProjectCertificationInventoryEOEn implements Serializable { private java.lang.String deliverableTemplate; /**交付物模板名称**/ @TableField(exist = false) - @Excel(name = "交付物模板", width = 15) + @Excel(name = "交付物模板", width = 20) private String deliverableTemplateName; /**交付结果*/ - @Excel(name = "Deliverables Result", width = 15) + @Excel(name = "Deliverables Result", width = 20) @ApiModelProperty(value = "交付结果") private java.lang.String deliveryResult; /**截止日期*/ - @Excel(name = "Due Date", width = 15, format = "yyyy-MM-dd") + @Excel(name = "Due Date", width = 20, format = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd") @ApiModelProperty(value = "截止日期") @@ -161,32 +161,33 @@ public class ProjectCertificationInventoryEOEn implements Serializable { @ApiModelProperty(value = "流程状态") private java.lang.String flowStatus; // 流程状态展示名称 - @Excel(name = "Process Status", width = 15) + @Excel(name = "Process Status", width = 20) @TableField(exist = false) private String flowStatusName; /**报告编号*/ - @Excel(name = "Report No", width = 15) + @Excel(name = "Report No", width = 20) @ApiModelProperty(value = "报告编号") private java.lang.String reportNumber; /**产品型号*/ - @Excel(name = "Product Model", width = 15) + @Excel(name = "Product Model", width = 20) @ApiModelProperty(value = "产品型号") private java.lang.String productModel; /**生产企业名称*/ - @Excel(name = "Name Of Manufacturer", width = 15) + @Excel(name = "Name Of Manufacturer", width = 40) @ApiModelProperty(value = "生产企业名称") private java.lang.String productionEnterpriseName; /**认证进度*/ - @Excel(name = "Homologation Progress", width = 15) + @ApiModelProperty(value = "认证进度") private java.lang.String certificationProgress; /**认证进度展示名称**/ @TableField(exist = false) + @Excel(name = "Homologation Progress", width = 40) private String certificationProgress_dictText; // @Excel(name = "认证进度备注", width = 15) @@ -205,4 +206,15 @@ public class ProjectCertificationInventoryEOEn implements Serializable { @TableField(exist = false) private String roleCode; + + /**值类型,对应SysCategoryValueTypeEnum中value**/ + @TableField(exist = false) + private String valueType; + + @TableField(exist = false) + private String excelName; + + // @Excel(name = "截止日期", width = 20, format = "yyyy-MM-dd") + @TableField(exist = false) + private String endTimeStr; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/enums/ProjectRoleEnum.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/enums/ProjectRoleEnum.java index cbffa1463..24bfda6e3 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/enums/ProjectRoleEnum.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/enums/ProjectRoleEnum.java @@ -21,7 +21,6 @@ public enum ProjectRoleEnum { MANAGER("manage","11",""), ADMIN("系统管理员","12",""), VIEWER("Viewer","13",""), - DUTYPERSON("责任人","14","") ; String name; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java index f003acfa6..78289d860 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/service/impl/ProjectCertificationInventoryEOServiceImpl.java @@ -45,6 +45,7 @@ import com.jero.modules.system.entity.SysUser; import com.jero.modules.system.enums.SysCategoryValueTypeEnum; import com.jero.modules.system.mapper.SysCategoryMapper; import com.jero.modules.system.mapper.SysRoleMapper; +import com.jero.modules.system.mapper.SysUserMapper; import com.jero.modules.system.service.ISysCategoryService; import com.jero.modules.system.service.ISysDictItemService; import com.jero.modules.system.service.ISysUserService; @@ -155,6 +156,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl> mapPersonList = (List>) objectMap.get("engineeringInterfacePersonList"); //所有人 - List> allPersonList = (List>) objectMap.get("allPersonList"); +// List> allPersonList = (List>) objectMap.get("allPersonList"); + + List listUserName = new ArrayList<>(); + listUserName = sysUserMapper.getListUserName(); + listUserName = listUserName.stream().distinct().collect(Collectors.toList()); + String nameCn = ""; String nameEn = ""; @@ -3113,7 +3137,7 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl msgList, String nameCn, String nameEn) { + String errorMsg, String field, List msgList, String nameCn, String nameEn) { //判断格式是否正确 boolean flag = true; if(ObjectUtils.isNotEmpty(field)){ - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); - String format = sdf.format(field); - if (!DateUtils.isValidDate(format)) { +// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); +// String format = sdf.format(field); + if (!DateUtils.isValidDate(field)) { flag = false; if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){ errorMsg += nameCn + "格式不正确, 正确格式如:yyyy/m/d、yyyy-MM-dd、yyyy年MM月dd日"; @@ -3203,6 +3234,24 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpllongdate){ + flag = false; + if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){ + errorMsg += nameCn + "不能导入今天之前的日期"; + }else{ + errorMsg += nameEn + " Cannot import dates before today "; + } + msgList.add(errorMsg); + } + } catch (ParseException e) { + e.printStackTrace(); + } } return flag; } @@ -3315,7 +3364,39 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl msgList, String regulationOwnerId, + List listUserName ,String nameCn, String nameEn){ + //单选 + if(regulationOwnerId.contains(",")){ + if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){ + errorMsg += nameCn + "导入只能填写一个用户名, "; + }else{ + errorMsg += "Only one user name can be entered for"+ nameEn +"import, "; + } + msgList.add(errorMsg); + } + int count =0; + for(SysUser name : listUserName){ + if(StringUtils.isNotEmpty(name.getUsername())){ + if(name.getUsername().equals(regulationOwnerId)){ + count++; + String id = name.getId(); + projectCertificationInventoryEO.setDutyPerson(id); + break; + } + } + } + if(count==0){ + if(CutEnum.CN.getValue().equals(projectCertificationInventoryEO.getCut())){ + errorMsg += nameCn+regulationOwnerId+"与所有人员名单不匹配"; + }else{ + errorMsg += nameEn+regulationOwnerId+"does not match a person with all person list"; + } + msgList.add(errorMsg); + } + } private void personnelVerify(ProjectCertificationInventoryEO projectCertificationInventoryEO, String errorMsg, List msgList, String regulationOwnerId, List> mapList, String nameCn, String nameEn, String fieldNumber) { @@ -3337,8 +3418,6 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl fileInfos = getOssFiles(dataList); //处理文件名称 + String fileName = ""; for (int i = 0; i < dataList.size(); i++) { - if(StringUtils.isNotEmpty(dataList.get(i).getDeliveryResult())){ - String fileName = ossFileService.getFileInfos(dataList.get(i).getDeliveryResult()).stream().map(OSSFile::getFileName).distinct().collect(Collectors.joining(",")); - dataList.get(i).setDeliveryResult(fileName); - - } if(StringUtils.isNotEmpty(dataList.get(i).getDeliverableTemplate())){ String deliverableTemplateName = template(fileInfos, dataList.get(i).getDeliverableTemplate()); dataList.get(i).setDeliverableTemplateName(deliverableTemplateName); @@ -3482,6 +3557,30 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl deliverableTemplateFileList = new ArrayList<>(); + List deliveryResultList = new ArrayList<>(); List oSSFileList = new ArrayList<>(); if(StringUtils.isNotBlank(deliverableTemplate)){ deliverableTemplateFileList = fileInfos.stream().filter(e -> deliverableTemplate.contains(e.getId())).collect(Collectors.toList()); oSSFileList.addAll(deliverableTemplateFileList); } + if(StringUtils.isNotBlank(deliveryResult) && projectCertificationInventoryEO.getValueType().equals(SysCategoryValueTypeEnum.FILE.getValue())){ + deliveryResultList = fileInfos.stream().filter(e -> deliveryResult.contains(e.getId())).collect(Collectors.toList()); + oSSFileList.addAll(deliveryResultList); + + } if(oSSFileList.size() != 0){ String fileNowPath = uploadpath + "/tempZip/" + serialNumber; File file = new File(fileNowPath); @@ -3594,6 +3700,9 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl fileInfos = new ArrayList<>(); @@ -3679,8 +3788,8 @@ public class ProjectCertificationInventoryEOServiceImpl extends ServiceImpl
- + * {{$t('gnxt')}}
@@ -88,12 +88,13 @@
+ * {{$t('dykzq') + (index+1)}}
-
@@ -165,7 +166,7 @@ export default { message: this.$t('gnxt') + this.$t('cannotEmpty'), trigger: 'blur' }, - {max: 50,message: this.$t('relevantSections') + this.$t('cannotExceed') + 50 + this.$t('Characters'),trigger: 'blur' + {max: 50,message: this.$t('gnxt') + this.$t('cannotExceed') + 50 + this.$t('Characters'),trigger: 'blur' } ], // dykzq: [ @@ -247,7 +248,10 @@ export default { this.formInline.dataList.splice(index + 1, 0, {}) this.formInline = { ...this.formInline } }, - deleteClick(index) { + deleteClick(index,value) { + this.$nextTick(() => { + this.$refs.ruleForm.validateField([value]) + }) this.formInline.dataList.splice(index, 1) this.formInline = { ...this.formInline } }, @@ -388,7 +392,7 @@ export default { .header-text { position: relative; top: 11px; - left: -70px; + left: -39px; width: 55px; font-size: 16px; font-weight: 500; diff --git a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/thetargetvehicleofthisupgrade.vue b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/thetargetvehicleofthisupgrade.vue index 67b396f2d..4367f3867 100644 --- a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/thetargetvehicleofthisupgrade.vue +++ b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/thetargetvehicleofthisupgrade.vue @@ -144,6 +144,8 @@ export default { this.formInline.vinList=res.result.vinList this.formInline.csv=res.result.csv this.formInline.dateofproduction=[] + res.result.scrqks=res.result.scrqks == null ? "" : res.result.scrqks + res.result.scrqjs=res.result.scrqjs == null ? "" : res.result.scrqjs this.formInline.dateofproduction.push(res.result.scrqks) this.formInline.dateofproduction.push(res.result.scrqjs) this.formInline.id = res.result.vinList @@ -159,8 +161,13 @@ export default { obj.zsl = this.formInline.zsl obj.csv = this.formInline.csv if(this.formInline.dateofproduction){ - obj.scrqks = this.formInline.dateofproduction[0] - obj.scrqjs = this.formInline.dateofproduction[1] + if(this.formInline.dateofproduction.length>0){ + obj.scrqks = this.formInline.dateofproduction[0] + obj.scrqjs = this.formInline.dateofproduction[1] + }else{ + obj.scrqks='' + obj.scrqjs ='' + } }else{ obj.scrqks='' obj.scrqjs ='' diff --git a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradeimpactassessment copy.vue b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradeimpactassessment copy.vue deleted file mode 100644 index fb6045b3d..000000000 --- a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradeimpactassessment copy.vue +++ /dev/null @@ -1,541 +0,0 @@ - - - - - \ No newline at end of file diff --git a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradeimpactassessment.vue b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradeimpactassessment.vue index e7ec6ed0c..6f7e5f449 100644 --- a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradeimpactassessment.vue +++ b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradeimpactassessment.vue @@ -86,14 +86,14 @@ form.clfj == null) ? $t('uploadattachment') : $t('viewUploadedFiles') }} - {{$t('notetwo')}} + {{$t('notethree')}} {{$t('format')}} {{$t('conditionsareupgradesperformed')}} - - + {{$t('upgradefailureorinterruption')}} - - + {{$t('upgradepackagetest')}} - - + \ No newline at end of file diff --git a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradetargetmodel.vue b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradetargetmodel.vue index 591c724e9..76100613c 100644 --- a/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradetargetmodel.vue +++ b/jero-web/src/views/otamanagement/upgradeactivityrecord/components/upgradetargetmodel.vue @@ -10,7 +10,7 @@ {{$t('templateDownload')}}
- + @@ -20,7 +20,7 @@ {{$t('selectTheVehicleTemplate')}} - + {{ item.cpdjbh }} @@ -59,7 +59,7 @@ - +
@@ -67,7 +67,7 @@ {{$t('Modelandfunctionrecord')}}
- + {{ item.ggpc }} @@ -82,7 +82,7 @@
- +
@@ -93,7 +93,7 @@ - + @@ -104,14 +104,14 @@ - +
- {{$t('Vehicledynamictype')}} + {{$t('Vehicledynamictype')}}