From 0c5cbb19d5fdc9a4a756c1a9b022ff81cab630f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E5=B5=A9?= Date: Sun, 22 Oct 2023 14:46:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9OTA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-boot/db/蔚来标准sql/dev_third_record.sql | 39 ++++-- .../modules/system/enums/DicCodeEnum.java | 1 + .../modules/ota/entity/OtaManageApplyEO.java | 14 ++ .../modules/ota/entity/OtaManageReceive.java | 14 +- .../jero/modules/ota/job/OtaDataUpdate.java | 123 +++++++++++------- .../ota/mapper/xml/OtaManageApplyEOMapper.xml | 8 +- .../impl/OtaManageApplyEOServiceImpl.java | 71 ++++++++-- .../otaAuthentication/components/detil.vue | 34 +++-- .../components/vdrDetial.vue | 2 +- 9 files changed, 215 insertions(+), 91 deletions(-) diff --git a/jero-boot/db/蔚来标准sql/dev_third_record.sql b/jero-boot/db/蔚来标准sql/dev_third_record.sql index 04eae0511..c713155e9 100644 --- a/jero-boot/db/蔚来标准sql/dev_third_record.sql +++ b/jero-boot/db/蔚来标准sql/dev_third_record.sql @@ -1205,16 +1205,16 @@ MODIFY COLUMN `work_progress_cn` text CHARACTER SET utf8mb4 COLLATE utf8mb4_gene MODIFY COLUMN `work_progress_en` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT 'NIO工作进展英文' AFTER `work_progress_cn`; ---参数收集清单 添加英文 +--参数收集清单 添加英文 已同步生产环境 UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Control Component' WHERE `id` = '84fec4a260dc646dc570cbf7cb581dab'; UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Component Value' WHERE `id` = '5d468613746f413a53fa0b485089839b'; UPDATE `laws_weilai`.`onl_cgform_field` SET `db_field_en_name` = 'Validate Component' WHERE `id` = '608274a6a6dfed0e183093d9ea357436'; ---平台件项目库数据标识 +--平台件项目库数据标识 已同步生产环境 ALTER TABLE `laws_weilai`.`project_library_base` ADD COLUMN `platform` varchar(255) NULL COMMENT '平台件项目库数据(platform=YES)' AFTER `brand`; ---平台件合规认证计划 +--平台件合规认证计划 已同步生产环境 CREATE TABLE `laws_weilai`.`platform_task_planning` ( `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', @@ -1229,7 +1229,7 @@ CREATE TABLE `laws_weilai`.`platform_task_planning` ( ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; ---车型项目库法规清单关联平台件表2023-09-19 +--车型项目库法规清单关联平台件表2023-09-19 已同步生产环境 CREATE TABLE `laws_inventory_platform` ( `id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `create_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', @@ -1242,14 +1242,14 @@ CREATE TABLE `laws_inventory_platform` ( PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; ---车修改字段长度2023-09-28 +--车修改字段长度2023-09-28 已同步生产环境 ALTER TABLE `project_certification_directory` MODIFY COLUMN `directory_name` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '目录名称' AFTER `project_library_id`, MODIFY COLUMN `lot` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '批次' AFTER `directory_name`, MODIFY COLUMN `detection_report_location` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '检测报告位置' AFTER `experiment_file`, MODIFY COLUMN `explain_info` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '说明' AFTER `detection_report_location`; ---添加平台件项目库字段2023-10-09 +--添加平台件项目库字段2023-10-09 已同步生产环境 ALTER TABLE `project_library_base` ADD COLUMN `power` varchar(255) NULL COMMENT '功率' AFTER `platform`, ADD COLUMN `producer` varchar(255) NULL COMMENT '生产商' AFTER `power`, @@ -1280,11 +1280,11 @@ ADD COLUMN `cooling_method` varchar(255) NULL COMMENT '冷却方式' AFTER `modu ADD COLUMN `filing_completion_time` datetime(0) NULL COMMENT '备案完成时间' AFTER `cooling_method`, ADD COLUMN `remark` varchar(1000) NULL COMMENT '备注' AFTER `filing_completion_time`; ---平台件合规认证计划添加标识字段2023-10-09 +--平台件合规认证计划添加标识字段2023-10-09 已同步生产环境 ALTER TABLE `platform_task_planning` ADD COLUMN `flag` varchar(255) NULL COMMENT '位置标识(用来区分上下两部分数据,up->上,down->下)' AFTER `project_id` ---平台件合规认证计划初始化数据 2023-10-10 +--平台件合规认证计划初始化数据 2023-10-10 已同步生产环境 INSERT INTO `platform_task_planning`(`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `node_name`, `node_time`, `project_id`, `flag`) VALUES ('08ecf06f4f947836d0e95285fd8afb96', NULL, NULL, NULL, NULL, NULL, 'KO', NULL, NULL, 'up'); INSERT INTO `platform_task_planning`(`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `node_name`, `node_time`, `project_id`, `flag`) VALUES ('09e577fa7afa3a8cb26b9c8f29eaf8d9', NULL, NULL, NULL, NULL, NULL, 'RF', NULL, NULL, 'up'); INSERT INTO `platform_task_planning`(`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `node_name`, `node_time`, `project_id`, `flag`) VALUES ('17323a3d13e747e493c41e2e09bedc92', NULL, NULL, NULL, NULL, NULL, 'ADF', NULL, NULL, 'up'); @@ -1301,7 +1301,7 @@ INSERT INTO `platform_task_planning`(`id`, `create_by`, `create_time`, `update_b INSERT INTO `platform_task_planning`(`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `node_name`, `node_time`, `project_id`, `flag`) VALUES ('e76e63a251aa6d64cac96125315805e1', NULL, NULL, NULL, NULL, NULL, 'CAMDS提交(CDF前)', NULL, NULL, 'down'); INSERT INTO `platform_task_planning`(`id`, `create_by`, `create_time`, `update_by`, `update_time`, `sys_org_code`, `node_name`, `node_time`, `project_id`, `flag`) VALUES ('ee85c1b1964586e512ef0b2b401b16b5', NULL, NULL, NULL, NULL, NULL, '验证检查(ESO)', NULL, NULL, 'down'); ---平台件合规认证计划初始化数据->合规管理阀点相关字段初始化值修改 2023-10-18 +--平台件合规认证计划初始化数据->合规管理阀点相关字段初始化值修改 2023-10-18 已同步生产环境 UPDATE `platform_task_planning` SET `create_by` = NULL, `create_time` = NULL, `update_by` = NULL, `update_time` = NULL, `sys_org_code` = NULL, `node_name` = '法规清单', `node_time` = NULL, `project_id` = NULL, `flag` = 'down' WHERE `id` = '85fa6eb0b58d93d4cc76b8fb1d5248ca'; UPDATE `platform_task_planning` SET `create_by` = NULL, `create_time` = NULL, `update_by` = NULL, `update_time` = NULL, `sys_org_code` = NULL, `node_name` = '责任确认', `node_time` = NULL, `project_id` = NULL, `flag` = 'down' WHERE `id` = '97aaf07d156b6a4278e0ac3627566c8b'; UPDATE `platform_task_planning` SET `create_by` = NULL, `create_time` = NULL, `update_by` = NULL, `update_time` = NULL, `sys_org_code` = NULL, `node_name` = '设计核查', `node_time` = NULL, `project_id` = NULL, `flag` = 'down' WHERE `id` = 'a533416284ab81c7f6ee95b5e9e06d38'; @@ -1310,21 +1310,34 @@ UPDATE `platform_task_planning` SET `create_by` = NULL, `create_time` = NULL, `u UPDATE `platform_task_planning` SET `create_by` = NULL, `create_time` = NULL, `update_by` = NULL, `update_time` = NULL, `sys_org_code` = NULL, `node_name` = 'CAMDS提交', `node_time` = NULL, `project_id` = NULL, `flag` = 'down' WHERE `id` = 'e76e63a251aa6d64cac96125315805e1'; UPDATE `platform_task_planning` SET `create_by` = NULL, `create_time` = NULL, `update_by` = NULL, `update_time` = NULL, `sys_org_code` = NULL, `node_name` = '验证检查', `node_time` = NULL, `project_id` = NULL, `flag` = 'down' WHERE `id` = 'ee85c1b1964586e512ef0b2b401b16b5'; ---项目库添加平台件类型字段 2023-10-18 +--项目库添加平台件类型字段 2023-10-18 已同步生产环境 ALTER TABLE `project_library_base` ADD COLUMN `platform_type` varchar(255) NULL COMMENT '平台件类型' AFTER `remark`; ---ota_manage_receive_nsdp添加数量字段 2023-10-18 +--ota_manage_receive_nsdp添加数量字段 2023-10-18 已同步生产环境 ALTER TABLE `ota_manage_receive_nsdp` ADD COLUMN `extension_item_count` int(10) NULL COMMENT '扩展任务数量' AFTER `created_at`; --- 法规月报填写添加保存状态字段 2023-10-20 +-- 法规月报填写添加保存状态字段 2023-10-20 已同步生产环境 ALTER TABLE `laws_monthly_report_write` ADD COLUMN `save_state` varchar(10) NULL COMMENT '保存状态(0->暂存,1->提交)' AFTER `technology_territory_en`; --- 问题管理添加问题优先级字段 2023-10-20 +-- 问题管理添加问题优先级字段 2023-10-20 已同步生产环境 ALTER TABLE `problem_management` ADD COLUMN `problem_priority` varchar(10) NULL COMMENT '问题优先级' AFTER `approval_evidence_link`; +-- OTA添加主键 2023-10-20 已同步生产环境 +ALTER TABLE `ota_manage_apply` + ADD COLUMN `vdr_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'vdr_id' AFTER `remark`; +ALTER TABLE `ota_manage_receive` + + ADD COLUMN `vdr_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键id' FIRST , +ADD COLUMN `is_del` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '是否被删除(0:否;1:是)' AFTER `release_date`, +DROP PRIMARY KEY, +ADD PRIMARY KEY (`vdr_id`); + + + + diff --git a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/enums/DicCodeEnum.java b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/enums/DicCodeEnum.java index 313ad591e..6f878d1aa 100644 --- a/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/enums/DicCodeEnum.java +++ b/jero-boot/jero-boot-module-system/src/main/java/com/jero/modules/system/enums/DicCodeEnum.java @@ -7,6 +7,7 @@ public enum DicCodeEnum { REGION("适用地区","1493782108399820801","region"), DUTY_TERRITORY("责任领域","1513417672023441409","duty_territory"), PROBLEM_TYPE("问题类型","1697066042058821634","wen4_ti2_lei4_xing2"), + CERTIFICATION_PROGRESS("认证清单-认证进度","1524311122804346881","certification_progress"), ; String name; diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaManageApplyEO.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaManageApplyEO.java index 62931d8f9..dcf17716b 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaManageApplyEO.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaManageApplyEO.java @@ -62,6 +62,9 @@ public class OtaManageApplyEO implements Serializable { @ApiModelProperty(value = "所属部门") private java.lang.String sysOrgCode; + @ApiModelProperty(value = "VDR_ID") + private java.lang.String vdrId; + @ApiModelProperty(value = "VDR") private java.lang.String vdr; @@ -199,6 +202,10 @@ public class OtaManageApplyEO implements Serializable { @TableField(exist = false) private boolean disabled; + @ApiModelProperty(value = "是否丢弃置灰") + @TableField(exist = false) + private boolean discard; + @TableField(exist = false) @ApiModelProperty(value = "表头排序字段") private java.lang.String orderByField; @@ -233,5 +240,12 @@ public class OtaManageApplyEO implements Serializable { @ApiModelProperty(value = "扩展任务数量") private Integer extensionItemCount; + @TableField(exist = false) + @ApiModelProperty(value = "是否被删除(0:否;1:是)") + private String isDel; + + @TableField(exist = false) + private String attestationScheduleText; + } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaManageReceive.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaManageReceive.java index 8b8651b67..5e61ca280 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaManageReceive.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/entity/OtaManageReceive.java @@ -32,9 +32,14 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize; public class OtaManageReceive implements Serializable { private static final long serialVersionUID = 1L; - /**主键*/ - @TableId(type = IdType.ASSIGN_ID) + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) @ApiModelProperty(value = "主键") + private String vdrId; + + /**VDR*/ + @ApiModelProperty(value = "VDR") private String id; /**创建人*/ @@ -126,6 +131,9 @@ public class OtaManageReceive implements Serializable { @ApiModelProperty(value = "发布类型") private String releaseType; - + /**是否被删除(0:否;1:是)*/ + @Excel(name = "是否被删除(0:否;1:是)", width = 15) + @ApiModelProperty(value = "是否被删除(0:否;1:是)") + private String isDel; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/job/OtaDataUpdate.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/job/OtaDataUpdate.java index d3e0e304b..72f8bbe37 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/job/OtaDataUpdate.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/job/OtaDataUpdate.java @@ -45,26 +45,48 @@ public class OtaDataUpdate implements Job { List omrSyncList = otaManageReceiveService.getReceiveSync(); + + for (OtaManageReceive omrSync : omrSyncList) { + String plannedBpLaunchBatch = omrSync.getPlannedBpLaunchBatch(); + if (StringUtils.isNotEmpty(plannedBpLaunchBatch)) { + Matcher matcher = pattern.matcher(plannedBpLaunchBatch); + if (matcher.find()) { + omrSync.setPlannedBpLaunchBatch(matcher.group()); + } + } + } List omrList = otaManageReceiveService.queryList(); List addList = new ArrayList<>(); - List delList = new ArrayList<>(); List updateList = new ArrayList<>(); for (OtaManageReceive omr : omrList) { - boolean delFlag = true; for (OtaManageReceive omrSync : omrSyncList) { + if(StringUtils.isBlank(omrSync.getPlannedBpLaunchBatch())){ + continue; + } if (omr.getId().equals(omrSync.getId())) { - delFlag = false; - if (!compareReceive(omr, omrSync)) { + if (1 == compareReceive(omr, omrSync)) { updateList.add(omrSync); + } else if (2 == compareReceive(omr, omrSync)) { + boolean have = false; + for (OtaManageReceive omr1 : omrList) { + if(omrSync.getPlannedBpLaunchBatch().equals(omr1.getPlannedBpLaunchBatch())){ + have = true; + break; + } + } + if(!have){ + //逻辑删除 但保留在原软件版本列表中 + omr.setIsDel("1"); + updateList.add(omr); + //同步数据中新增 + omrSync.setVdrId(UUID.randomUUID().toString().replace("-","")); + addList.add(omrSync); + } } } } - if (delFlag) { - //同步数据中被删除 - delList.add(omr.getId()); - } } for (OtaManageReceive omrSync : omrSyncList) { @@ -76,27 +98,28 @@ public class OtaDataUpdate implements Job { } if (addFlag) { //同步数据中新增 - String plannedBpLaunchBatch = omrSync.getPlannedBpLaunchBatch(); - if (StringUtils.isNotEmpty(plannedBpLaunchBatch)) { - Matcher matcher = pattern.matcher(plannedBpLaunchBatch); - if (matcher.find()) { - omrSync.setPlannedBpLaunchBatch(matcher.group()); - } - } + omrSync.setVdrId(UUID.randomUUID().toString().replace("-","")); addList.add(omrSync); } } if (CollectionUtils.isNotEmpty(addList)) { otaManageReceiveService.saveBatch(addList); } - if (CollectionUtils.isNotEmpty(addList)) { - otaManageReceiveService.deleteByIds(delList); - } if (CollectionUtils.isNotEmpty(updateList)) { otaManageReceiveService.updateBatchById(updateList); } List omrnSyncList = otaManageReceiveNsdpService.getOtaManageReceiveNsdpSync(); + + for (OtaManageReceiveNsdp omrnSync : omrnSyncList) { + String plannedBpLaunchBatch = omrnSync.getReleaseName(); + if (StringUtils.isNotEmpty(plannedBpLaunchBatch)) { + Matcher matcher = pattern.matcher(plannedBpLaunchBatch); + if (matcher.find()) { + omrnSync.setReleaseName(matcher.group()); + } + } + } List omrnList = otaManageReceiveNsdpService.queryList(); List addNsdpList = new ArrayList<>(); @@ -128,13 +151,7 @@ public class OtaDataUpdate implements Job { } if (addFlag) { //同步数据中新增 - String releaseName = omrnSync.getReleaseName(); - if (StringUtils.isNotEmpty(releaseName)) { - Matcher matcher = pattern.matcher(releaseName); - if (matcher.find()) { - omrnSync.setReleaseName(matcher.group()); - } - } + addNsdpList.add(omrnSync); } @@ -154,26 +171,24 @@ public class OtaDataUpdate implements Job { Map releaceDateMap = new HashMap<>(); //记录车型列表 Map> omrnVehicleMap = new HashMap<>(); - - Map releaceTypeMap = new HashMap<>(); - - Date today = new Date(); List omrnLastList = otaManageReceiveNsdpService.queryList(); for (OtaManageReceiveNsdp omrn : omrnLastList) { //找到最快来临的发布时间 Date releaceDate = releaceDateMap.get(omrn.getReleaseName()); - try { - Date syncDate = sdf.parse(omrn.getReleaseDate()); - if (null == releaceDate) { - releaceDateMap.put(omrn.getReleaseName(), syncDate); - } else { - if (syncDate.after(today) && syncDate.before(releaceDate)) { + if (StringUtils.isNotBlank(omrn.getDateName()) && omrn.getDateName().equals("PLM")) { + try { + Date syncDate = sdf.parse(omrn.getReleaseDate()); + if (null == releaceDate) { releaceDateMap.put(omrn.getReleaseName(), syncDate); + } else { + if (syncDate.before(releaceDate)) { + releaceDateMap.put(omrn.getReleaseName(), syncDate); + } } + } catch (ParseException e) { + e.printStackTrace(); } - } catch (ParseException e) { - e.printStackTrace(); } //处理车型字符串 Set vehicleSet = omrnVehicleMap.get(omrn.getReleaseName()); @@ -288,35 +303,49 @@ public class OtaDataUpdate implements Job { if (!StringUtils.equals(omrn.getVehicle(), omrnSync.getVehicle())) { return false; } + if (!StringUtils.equals(omrn.getReleaseName(), omrnSync.getReleaseName())) { + return false; + } return true; } - private boolean compareReceive(OtaManageReceive omr, OtaManageReceive omrSync) { + /** + * 对比VDR数据 + * 返回状态 + * 0:无变化 + * 1:有变化 + * 2:改变版本号 + */ + private int compareReceive(OtaManageReceive omr, OtaManageReceive omrSync) { + int res = 0; if (!StringUtils.equals(omr.getSummary(), omrSync.getSummary())) { - return false; + res = 1; } if (!StringUtils.equals(omr.getStatus(), omrSync.getStatus())) { - return false; + res = 1; } if (!StringUtils.equals(omr.getHomologationImpact(), omrSync.getHomologationImpact())) { - return false; + res = 1; } if (!StringUtils.equals(omr.getHomologation(), omrSync.getHomologation())) { - return false; + res = 1; } if (!StringUtils.equals(omr.getImpactCnHomo(), omrSync.getImpactCnHomo())) { - return false; + res = 1; } if (!StringUtils.equals(omr.getImpactEuHomo(), omrSync.getImpactEuHomo())) { - return false; + res = 1; } if (!StringUtils.equals(omr.getMasterDomain(), omrSync.getMasterDomain())) { - return false; + res = 1; } if (!StringUtils.equals(omr.getAppliedVehicleProject(), omrSync.getAppliedVehicleProject())) { - return false; + res = 1; } - return true; + if (!StringUtils.equals(omr.getPlannedBpLaunchBatch(), omrSync.getPlannedBpLaunchBatch())) { + res = 2; + } + return res; } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/mapper/xml/OtaManageApplyEOMapper.xml b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/mapper/xml/OtaManageApplyEOMapper.xml index 7c83b88f7..c5647afc1 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/mapper/xml/OtaManageApplyEOMapper.xml +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/mapper/xml/OtaManageApplyEOMapper.xml @@ -68,14 +68,14 @@ diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaManageApplyEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaManageApplyEOServiceImpl.java index 378f1c07b..afe6e58ec 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaManageApplyEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/ota/service/impl/OtaManageApplyEOServiceImpl.java @@ -203,7 +203,6 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl getNsdpList(OtaManageApplyEO otaManageApplyEO) { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); - Date today = new Date(); List resList = new ArrayList<>(); List dataList = otaManageReceiveNsdpService.queryList(); Map> dataMap = dataList.stream().collect(Collectors.groupingBy(OtaManageReceiveNsdp::getReleaseName)); @@ -228,13 +227,15 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl getOtaPage(OtaManageApplyEO otaManageApplyEO) { LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); boolean otaManager = isOtaManager(); + boolean regulationOwner = isRegulationOwner(); + List otaManageApplyEOList = this.getNsdpList(otaManageApplyEO); List dataList = new ArrayList<>(); //去跟manager和studio权限 - if (otaManager) { + if (otaManager || regulationOwner) { dataList = otaManageApplyEOList; } else { List managePermissionList = otaManagePermissionService.queryByUserId(currentUser.getId()); @@ -333,7 +336,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl otaManageApplyEOList = this.getBaseMapper().getOtaList(otaManageApplyEO); //studio数据权限 - if (isOtaManager()) { + if (isOtaManager() || isRegulationOwner()) { otaManageApplyEOList = this.getBaseMapper().getOtaList(otaManageApplyEO); } else { otaManageApplyEOList = getStudioData(otaManageApplyEO, otaManageApplyEOList); @@ -724,15 +727,15 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl { - Date e1CreatedAt = ObjectUtils.isNotEmpty(e1.getCreatedAt()) ? e1.getCreatedAt() : new Date(0); - Date e2CreatedAt = ObjectUtils.isNotEmpty(e2.getCreatedAt()) ? e2.getCreatedAt() : new Date(0); - return e2CreatedAt.compareTo(e1CreatedAt); + String e1ReleaseName = StringUtils.isNotBlank(e1.getReleaseDate()) ? e1.getReleaseDate() : ""; + String e2ReleaseName = StringUtils.isNotBlank(e2.getReleaseDate()) ? e2.getReleaseDate() : ""; + return comparator.compare(e2ReleaseName, e1ReleaseName); }); } } private boolean hasPermission(String plannedBpLaunchBatch){ - if(isOtaManager()){ + if(isOtaManager()||isRegulationOwner()){ return true; } LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); @@ -757,6 +760,9 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl(); } + + boolean isStudio = isStudio(); + boolean isRegulationOwner = isRegulationOwner(); List otaManageApplyEOList = this.getBaseMapper().getOtaCarPage(otaManageApplyEO); List list = new ArrayList<>(); Map omaMap = new HashMap<>(); @@ -807,6 +813,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl regionDictList = sysDictItemServiceImpl.selectItemsByDictCode(DicCodeEnum.CERTIFICATION_PROGRESS.getCode()); list = new ArrayList<>(omaMap.values()); if (!list.isEmpty()) { List vprojectVersionList = getProjectVersionList(otaManageApplyEO.getAppliedVehicleProject(), null); @@ -899,6 +906,23 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl collect = regionDictList.stream() + .filter(e -> e.getItemValue().equals(manageApplyEO.getAttestationSchedule())).collect(Collectors.toList()); + if (CutEnum.CN.getValue().equals(cut)) { + manageApplyEO.setAttestationScheduleText(collect.get(0).getItemText()); + } else { + manageApplyEO.setAttestationScheduleText(collect.get(0).getEnName()); + } + } if (StringUtils.isBlank(manageApplyEO.getMatchStatus())) { manageApplyEO.setMatchStatus(OtaStatusEnum.TO_BE_MATCHED.getKey()); if (CutEnum.CN.getValue().equals(cut)) { @@ -1273,7 +1297,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl regionDictList = sysDictItemServiceImpl.selectItemsByDictCode("certification_progress"); + List regionDictList = sysDictItemServiceImpl.selectItemsByDictCode(DicCodeEnum.CERTIFICATION_PROGRESS.getCode()); List regionList = sysDictService.queryDictItemsByCode(DicCodeEnum.REGION.getCode()); @@ -1517,6 +1541,22 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl userRoleList = this.sysUserRoleMapper.selectList(new QueryWrapper().lambda().eq(SysUserRole::getUserId, currentUser.getId())); // 查询用户所有角色 + if (CollectionUtils.isNotEmpty(userRoleList)) { + for (SysUserRole role : userRoleList) { + if (role.getRoleId().equals(RoleEnum.REGULATION_OWNER.getId())) { + return true; + } + } + } + return false; + } + private boolean isStudio() { LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); List userRoleList = this.sysUserRoleMapper.selectList(new QueryWrapper().lambda().eq(SysUserRole::getUserId, currentUser.getId())); // 查询用户所有角色 @@ -1579,6 +1619,9 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl list, boolean isSubmit, String cut) { + if (!isOtaManager() || !isStudio()) { + return; + } LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); if (CollectionUtils.isNotEmpty(list)) { List idList = list.stream() diff --git a/jero-web/src/views/otamanagement/otaAuthentication/components/detil.vue b/jero-web/src/views/otamanagement/otaAuthentication/components/detil.vue index feb8311ff..f32bb1ff4 100644 --- a/jero-web/src/views/otamanagement/otaAuthentication/components/detil.vue +++ b/jero-web/src/views/otamanagement/otaAuthentication/components/detil.vue @@ -231,6 +231,7 @@ :scroll="{ x: '100%', y: 'calc(100vh - 140px)' }" rowKey="id" @change="tableOnChange" + :rowClassName="setRowClassName" :data-source="dataSource" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :columns="columnsAll"> @@ -255,7 +256,7 @@ + {{record.projectVersionText}}
@@ -965,6 +970,13 @@ export default { }, methods: { ...mapGetters(['userInfo']), + setRowClassName(record, index) { + if (record.discard){ + return 'clickRowStyl' + }else{ + return '' + } + }, getSelectData(){ getAction('/ota/otaManageApplyEO/getPullDownList', {}).then((res) => { if (res.success) { @@ -1500,10 +1512,10 @@ export default { flex-direction: column; align-items: flex-start; } -/deep/ .ant-table-row:first-child { - background: #fff !important; - opacity: 0.9; -} +///deep/ .ant-table-row:first-child { +// background: #fff !important; +// opacity: 0.9; +//} .customize-text-title { margin-left: 0; font-size: 14px; @@ -1511,10 +1523,10 @@ export default { color: #040B29; margin-bottom: 22px; } -/deep/ .ant-table-row:first-child { - background: #fff !important; - opacity: 2.9; -} +///deep/ .ant-table-row:first-child { +// background: #fff !important; +// opacity: 2.9; +//} /deep/ .ant-table-body { background: transparent !important; @@ -1551,6 +1563,7 @@ popconfirmmize { /deep/ .ant-select-dropdown { z-index: 100; } + \ No newline at end of file diff --git a/jero-web/src/views/otamanagement/otaAuthentication/components/vdrDetial.vue b/jero-web/src/views/otamanagement/otaAuthentication/components/vdrDetial.vue index 96445b1a0..e4b7770be 100644 --- a/jero-web/src/views/otamanagement/otaAuthentication/components/vdrDetial.vue +++ b/jero-web/src/views/otamanagement/otaAuthentication/components/vdrDetial.vue @@ -170,7 +170,7 @@ addModel(record, val) { this.form = record this.car = val - getAction('/ota/otaManageApplyEO/getVersionInfo', { vdr: this.form.vdr, car: this.car }).then((res) => { + getAction('/ota/otaManageApplyEO/getVersionInfo', { vdr: this.form.vdrId, car: this.car }).then((res) => { if (res.success) { this.vdrList = res.result } else {