From eec3929f11163e9c34b3652de968e0a4489b2be9 Mon Sep 17 00:00:00 2001 From: zhn <947514737@qq.com> Date: Thu, 24 Aug 2023 11:52:28 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=8C=BA=E5=88=86manager=E5=92=8Cstudio?= =?UTF-8?q?=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ota/mapper/xml/OtaManageApplyEOMapper.xml | 2 +- .../impl/OtaManageApplyEOServiceImpl.java | 28 ++++++++++++++++--- 2 files changed, 25 insertions(+), 5 deletions(-) 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 5a03de097..ee351c024 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 @@ -81,7 +81,7 @@ and omr.impact_eu_homo LIKE CONCAT(CONCAT('%',#{otaManageApplyEO.impactHomo}),'%')) - and omr.vehicle_type LIKE CONCAT(CONCAT('%',#{otaManageApplyEO.appliedVehicleProject}),'%') + and omr.applied_vehicle_project LIKE CONCAT(CONCAT('%',#{otaManageApplyEO.appliedVehicleProject}),'%') order by omr.id desc 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 667c49706..ca76791c1 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 @@ -1,5 +1,6 @@ package com.jero.modules.ota.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.jero.common.constant.enums.CutEnum; @@ -189,19 +190,38 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl getOtaPage(OtaManageApplyEO otaManageApplyEO) { + LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + boolean otaManager = isOtaManager(); List otaManageApplyEOList = this.getBaseMapper().getOtaList(otaManageApplyEO); + List dataList = new ArrayList<>(); + + //去跟manager和studio权限 + if(otaManager){ + dataList = otaManageApplyEOList; + }else{ + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(OtaManagePermission::getUserId,currentUser.getId()); + List managePermissionList = otaManagePermissionService.list(wrapper); + if(!managePermissionList.isEmpty()){ + List applyIdList = managePermissionList.stream().map(OtaManagePermission::getApplyId).distinct().collect(Collectors.toList()); + List collect = otaManageApplyEOList.stream().filter(e -> applyIdList.contains(e.getPlannedBpLaunchBatch())).collect(Collectors.toList()); + dataList = collect; + } + } + List result = new ArrayList<>(); - if (!otaManageApplyEOList.isEmpty()) { + if (!dataList.isEmpty()) { List otaNameList = OtaCarEnum.getOtaNameList(); - List plannedBpLaunchBatchList = otaManageApplyEOList.stream() + List plannedBpLaunchBatchList = dataList.stream() .filter(e -> StringUtils.isNotBlank(e.getPlannedBpLaunchBatch())) .map(OtaManageApplyEO::getPlannedBpLaunchBatch).distinct().collect(Collectors.toList()); if (!plannedBpLaunchBatchList.isEmpty()) { for (String plannedBpLaunchBatch : plannedBpLaunchBatchList) { OtaManageApplyEO manageApplyEO = new OtaManageApplyEO(); manageApplyEO.setPlannedBpLaunchBatch(plannedBpLaunchBatch); + manageApplyEO.setId(plannedBpLaunchBatch); - List otaManageApplyEOS = otaManageApplyEOList.stream() + List otaManageApplyEOS = dataList.stream() .filter(e -> plannedBpLaunchBatch.equals(e.getPlannedBpLaunchBatch())).collect(Collectors.toList()); if(!otaManageApplyEOS.isEmpty()){ //发布时间 @@ -614,7 +634,7 @@ public class OtaManageApplyEOServiceImpl extends ServiceImpl otaManageApplyEOList = this.getBaseMapper().getOtaCarPage(otaManageApplyEO); List list = new ArrayList<>(); String carMarket = otaManageApplyEO.getAppliedVehicleProject(); - if (StringUtils.isNotBlank(carMarket) && !"全部".equals(carMarket) && !otaManageApplyEOList.isEmpty()) { + if (StringUtils.isNotBlank(carMarket) && !"全部".equals(carMarket) && !"All".equals(carMarket) && !otaManageApplyEOList.isEmpty()) { String[] conditionSplit = carMarket.split(" "); From 8771a72e87a551113d7c69f109e2f462dd4325f3 Mon Sep 17 00:00:00 2001 From: "zyx.net" Date: Thu, 24 Aug 2023 15:23:29 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=B9=E9=87=8F?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E6=8F=90=E7=A4=BA=E8=AF=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../otaAuthentication/components/batSetting.vue | 5 +++-- .../otamanagement/otaAuthentication/components/detil.vue | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/jero-web/src/views/otamanagement/otaAuthentication/components/batSetting.vue b/jero-web/src/views/otamanagement/otaAuthentication/components/batSetting.vue index 5f4dec75d..53e0042a2 100644 --- a/jero-web/src/views/otamanagement/otaAuthentication/components/batSetting.vue +++ b/jero-web/src/views/otamanagement/otaAuthentication/components/batSetting.vue @@ -164,11 +164,12 @@ export default { this.confirmLoading = true postAction('/ota/otaManageApplyEO/updateVdrBatch', query).then((res) => { if (res.success) { - this.$message.success(this.$t('OperationSuccessful')) + // this.$message.success(this.$t('OperationSuccessful')) this.visible = false this.confirmLoading = false this.ids = [] - this.$emit('getList') + this.$emit('msgForm',res.result.msgList) + // this.$emit('getList') } else { this.$message.warning(this.$t('operationFailed')) this.confirmLoading = false diff --git a/jero-web/src/views/otamanagement/otaAuthentication/components/detil.vue b/jero-web/src/views/otamanagement/otaAuthentication/components/detil.vue index ef3a9313e..fe38f0e54 100644 --- a/jero-web/src/views/otamanagement/otaAuthentication/components/detil.vue +++ b/jero-web/src/views/otamanagement/otaAuthentication/components/detil.vue @@ -247,7 +247,7 @@ @showSizeChange="SizeChange" /> - +