修改OTA问题
This commit is contained in:
@@ -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`);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+1
@@ -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;
|
||||
|
||||
+14
@@ -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;
|
||||
|
||||
|
||||
}
|
||||
|
||||
+11
-3
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
+76
-47
@@ -45,26 +45,48 @@ public class OtaDataUpdate implements Job {
|
||||
|
||||
|
||||
List<OtaManageReceive> 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<OtaManageReceive> omrList = otaManageReceiveService.queryList();
|
||||
|
||||
List<OtaManageReceive> addList = new ArrayList<>();
|
||||
List<String> delList = new ArrayList<>();
|
||||
List<OtaManageReceive> 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<OtaManageReceiveNsdp> 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<OtaManageReceiveNsdp> omrnList = otaManageReceiveNsdpService.queryList();
|
||||
|
||||
List<OtaManageReceiveNsdp> 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<String, Date> releaceDateMap = new HashMap<>();
|
||||
//记录车型列表
|
||||
Map<String ,Set<String>> omrnVehicleMap = new HashMap<>();
|
||||
|
||||
|
||||
Map<String ,String> releaceTypeMap = new HashMap<>();
|
||||
|
||||
Date today = new Date();
|
||||
List<OtaManageReceiveNsdp> 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<String> 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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+4
-4
@@ -68,14 +68,14 @@
|
||||
</select>
|
||||
|
||||
<select id="getOtaCarPage" resultType="com.jero.modules.ota.entity.OtaManageApplyEO">
|
||||
select omr.id as vdr,omr.planned_bp_launch_batch,omr.update_date,
|
||||
select omr.vdr_id,omr.id as vdr,omr.planned_bp_launch_batch,omr.update_date,
|
||||
omr.summary,omr.status,
|
||||
omr.homologation_impact,omr.homologation,
|
||||
omr.impact_cn_homo,omr.impact_eu_homo,
|
||||
omr.master_domain,omr.applied_vehicle_project,omr.vehicle_match,
|
||||
omr.master_domain,omr.applied_vehicle_project,omr.vehicle_match,omr.is_del,
|
||||
oma.id,oma.project_version,oma.attestation_schedule,oma.match_status,oma.remark,oma.vehicle_type
|
||||
from ota_manage_receive omr
|
||||
left join ota_manage_apply oma on oma.vdr = omr.id
|
||||
left join ota_manage_apply oma on oma.vdr_id = omr.vdr_id
|
||||
<where>
|
||||
1=1
|
||||
<if test="otaManageApplyEO.plannedBpLaunchBatch != null and otaManageApplyEO.plannedBpLaunchBatch != ''">
|
||||
@@ -158,7 +158,7 @@
|
||||
LEFT JOIN ota_manage_apply oma ON oma.project_version = plb.id
|
||||
LEFT JOIN project_name_info pni ON pni.id = plb.project_name_id
|
||||
LEFT JOIN project_year_name_info pyni ON pyni.project_name_id = pni.id
|
||||
WHERE oma.vdr = #{vdr}
|
||||
WHERE oma.vdr_id = #{vdr}
|
||||
GROUP BY plb.id
|
||||
</select>
|
||||
|
||||
|
||||
+57
-14
@@ -203,7 +203,6 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
||||
|
||||
public List<OtaManageApplyEO> getNsdpList(OtaManageApplyEO otaManageApplyEO) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Date today = new Date();
|
||||
List<OtaManageApplyEO> resList = new ArrayList<>();
|
||||
List<OtaManageReceiveNsdp> dataList = otaManageReceiveNsdpService.queryList();
|
||||
Map<String, List<OtaManageReceiveNsdp>> dataMap = dataList.stream().collect(Collectors.groupingBy(OtaManageReceiveNsdp::getReleaseName));
|
||||
@@ -228,13 +227,15 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
||||
}
|
||||
//找到最快来临的发布时间
|
||||
try {
|
||||
if(StringUtils.isNotBlank(omrn.getReleaseDate())){
|
||||
Date syncDate = sdf.parse(omrn.getReleaseDate());
|
||||
if (null == releaseDate) {
|
||||
releaseDate = syncDate;
|
||||
} else {
|
||||
if (syncDate.after(today) && syncDate.before(releaseDate)) {
|
||||
if(StringUtils.isNotBlank(omrn.getDateName())&&omrn.getDateName().equals("PLM")){
|
||||
if(StringUtils.isNotBlank(omrn.getReleaseDate())){
|
||||
Date syncDate = sdf.parse(omrn.getReleaseDate());
|
||||
if (null == releaseDate) {
|
||||
releaseDate = syncDate;
|
||||
} else {
|
||||
if (syncDate.before(releaseDate)) {
|
||||
releaseDate = syncDate;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -299,11 +300,13 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
||||
public List<OtaManageApplyEO> getOtaPage(OtaManageApplyEO otaManageApplyEO) {
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
boolean otaManager = isOtaManager();
|
||||
boolean regulationOwner = isRegulationOwner();
|
||||
|
||||
List<OtaManageApplyEO> otaManageApplyEOList = this.getNsdpList(otaManageApplyEO);
|
||||
List<OtaManageApplyEO> dataList = new ArrayList<>();
|
||||
|
||||
//去跟manager和studio权限
|
||||
if (otaManager) {
|
||||
if (otaManager || regulationOwner) {
|
||||
dataList = otaManageApplyEOList;
|
||||
} else {
|
||||
List<OtaManagePermission> managePermissionList = otaManagePermissionService.queryByUserId(currentUser.getId());
|
||||
@@ -333,7 +336,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
||||
}
|
||||
List<OtaManageApplyEO> 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<OtaManageApplyEOMap
|
||||
}
|
||||
if(StringUtils.isEmpty(otaManageApplyEO.getOrderByField())){
|
||||
Collections.sort(otaManageApplyEOList, (e1, e2) -> {
|
||||
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<OtaManageApplyEOMap
|
||||
if(!hasPermission(otaManageApplyEO.getPlannedBpLaunchBatch())){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
boolean isStudio = isStudio();
|
||||
boolean isRegulationOwner = isRegulationOwner();
|
||||
List<OtaManageApplyEO> otaManageApplyEOList = this.getBaseMapper().getOtaCarPage(otaManageApplyEO);
|
||||
List<OtaManageApplyEO> list = new ArrayList<>();
|
||||
Map<String, OtaManageApplyEO> omaMap = new HashMap<>();
|
||||
@@ -807,6 +813,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
||||
}
|
||||
}
|
||||
}
|
||||
List<SysDictItem> regionDictList = sysDictItemServiceImpl.selectItemsByDictCode(DicCodeEnum.CERTIFICATION_PROGRESS.getCode());
|
||||
list = new ArrayList<>(omaMap.values());
|
||||
if (!list.isEmpty()) {
|
||||
List<VersionVO> vprojectVersionList = getProjectVersionList(otaManageApplyEO.getAppliedVehicleProject(), null);
|
||||
@@ -899,6 +906,23 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
||||
manageApplyEO.setMatchStatus(OtaStatusEnum.NA.getKey());
|
||||
manageApplyEO.setDisabled(true);
|
||||
}
|
||||
if(isRegulationOwner && !isStudio){
|
||||
manageApplyEO.setDisabled(true);
|
||||
}
|
||||
if ((StringUtils.isNotBlank(manageApplyEO.getIsDel()) && manageApplyEO.getIsDel().equals("1"))
|
||||
|| (StringUtils.isNotBlank(manageApplyEO.getStatus()) && manageApplyEO.getStatus().equals("Discard"))) {
|
||||
manageApplyEO.setDiscard(true);
|
||||
manageApplyEO.setDisabled(true);
|
||||
}
|
||||
if (StringUtils.isNotBlank(manageApplyEO.getAttestationSchedule())) {
|
||||
List<SysDictItem> 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<OtaManageApplyEOMap
|
||||
}
|
||||
|
||||
//认证进度数据字典 certification_progress
|
||||
List<SysDictItem> regionDictList = sysDictItemServiceImpl.selectItemsByDictCode("certification_progress");
|
||||
List<SysDictItem> regionDictList = sysDictItemServiceImpl.selectItemsByDictCode(DicCodeEnum.CERTIFICATION_PROGRESS.getCode());
|
||||
|
||||
List<DictModel> regionList = sysDictService.queryDictItemsByCode(DicCodeEnum.REGION.getCode());
|
||||
|
||||
@@ -1517,6 +1541,22 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否为法规工程师
|
||||
*/
|
||||
private boolean isRegulationOwner() {
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
List<SysUserRole> userRoleList = this.sysUserRoleMapper.selectList(new QueryWrapper<SysUserRole>().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<SysUserRole> userRoleList = this.sysUserRoleMapper.selectList(new QueryWrapper<SysUserRole>().lambda().eq(SysUserRole::getUserId, currentUser.getId())); // 查询用户所有角色
|
||||
@@ -1579,6 +1619,9 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl<OtaManageApplyEOMap
|
||||
}
|
||||
|
||||
public void temporarySave(List<OtaManageApplyEO> list, boolean isSubmit, String cut) {
|
||||
if (!isOtaManager() || !isStudio()) {
|
||||
return;
|
||||
}
|
||||
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
List<String> idList = list.stream()
|
||||
|
||||
@@ -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 @@
|
||||
<a-select :placeholder="$t('PleaseSelect')"
|
||||
class="box-input"
|
||||
style="width: 90%"
|
||||
:disabled="record.disabled"
|
||||
v-if="!record.disabled"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
allowClear
|
||||
showSearch
|
||||
@@ -271,15 +272,19 @@
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
<span v-if="record.disabled">{{record.projectVersionText}}</span>
|
||||
</template>
|
||||
<!-- 认证进度编辑-->
|
||||
<template slot="attestationSchedule" slot-scope="text, record">
|
||||
|
||||
<j-dict-select-tag class="box-input" v-model="record.attestationSchedule"
|
||||
v-if="!record.disabled"
|
||||
:disabled="record.disabled"
|
||||
:placeholder="$t('PleaseSelect')"
|
||||
:type="'select'"
|
||||
style="width: 90%"
|
||||
:triggerChange="false" :dictCode="'certification_progress'"/>
|
||||
<span v-if="record.disabled">{{record.attestationScheduleText}}</span>
|
||||
</template>
|
||||
</a-table>
|
||||
<div class="page" v-if="dataSource && dataSource.length > 0">
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
</style>
|
||||
<style lang='less'>
|
||||
.popconfirmClassName .ant-popover-message-title {
|
||||
@@ -1603,4 +1616,7 @@ popconfirmmize {
|
||||
position: relative;
|
||||
isolation: isolate;
|
||||
}
|
||||
.clickRowStyl{
|
||||
background-color: #e1e3e7;
|
||||
}
|
||||
</style>
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user