From 0d69f824f61bf38419ffac1460ffe54a97e60941 Mon Sep 17 00:00:00 2001 From: Vinjor Date: Wed, 13 Nov 2024 13:53:35 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"=E6=9B=B4=E6=96=B0"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit f627b242a9961154ce0f7a0ce0daab412ffb148e. --- .../controller/AppSwiperController.java | 2 +- .../DlInspectionProjectController.java | 11 ---- .../service/DlInspectionProjectService.java | 6 --- .../impl/AppInspectionPartnerServiceImpl.java | 50 ++++++++----------- .../impl/DlInspectionProjectServiceImpl.java | 11 ---- .../controller/admin/RescueInfoSystem.java | 3 -- .../service/impl/RescueInfoServiceImpl.java | 3 -- .../mapper/rescue/RescueInfoMapper.xml | 12 ++--- .../rescue/RescueRefuelRecordMapper.xml | 5 +- 9 files changed, 26 insertions(+), 77 deletions(-) diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/appBase/controller/AppSwiperController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/appBase/controller/AppSwiperController.java index 61b29578..c4c0152f 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/appBase/controller/AppSwiperController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/appBase/controller/AppSwiperController.java @@ -141,7 +141,7 @@ public class AppSwiperController extends BaseController { LambdaQueryWrapper queryWrapper =new LambdaQueryWrapper<>(); LoginUser user = SecurityFrameworkUtils.getLoginUser(); - queryWrapper.orderByAsc(ShopMallPartners::getPartnerId).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0").last("limit 1"); + queryWrapper.eq(ShopMallPartners::getUserId,user.getId()).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0"); ShopMallPartners partner = partnersService.getOne(queryWrapper); if (ObjectUtil.isEmpty(partner)){ return error("信息有误"); diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/DlInspectionProjectController.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/DlInspectionProjectController.java index bda4a6ac..dc64cb61 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/DlInspectionProjectController.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/controller/DlInspectionProjectController.java @@ -81,16 +81,5 @@ public class DlInspectionProjectController { return success(pageResult); } - /** - * 修改项目排序 - * @param updateReqVO - * @return - */ - @PutMapping("/updateSort") - public CommonResult updateSort(@RequestBody DlInspectionProjectSaveReqVO updateReqVO) { - dlInspectionProjectService.updateSort(updateReqVO); - return success(true); - } - } \ No newline at end of file diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/DlInspectionProjectService.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/DlInspectionProjectService.java index 68f0b792..70a8df08 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/DlInspectionProjectService.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/DlInspectionProjectService.java @@ -31,12 +31,6 @@ public interface DlInspectionProjectService extends IService partnerList(Page page, PartnerListQuery partnerListQuery) { @@ -169,33 +166,28 @@ public class AppInspectionPartnerServiceImpl extends ServiceImpl userRoleIdListByUserId = permissionService.getUserRoleIdListByUserId(user.getId()); -// List roleList = roleService.getRoleList(userRoleIdListByUserId); -// -// List roles = roleList.stream().map(RoleDO::getCode).collect(Collectors.toList()); -// ShopMallPartners partner = new ShopMallPartners(); -// if (roles.contains("jcshop")){ -// LambdaQueryWrapper queryWrapper =new LambdaQueryWrapper<>(); -// queryWrapper.eq(ShopMallPartners::getUserId,user.getId()).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0"); -// partner = this.getOne(queryWrapper); -// if (ObjectUtil.isEmpty(partner)){ -// throw new Exception("信息有误"); -// } -// }else if (roles.contains("jcworker")){ -// LambdaQueryWrapper queryWrapperWork =new LambdaQueryWrapper<>(); -// queryWrapperWork.eq(PartnerWorker::getUserId,user.getId()); -// PartnerWorker worker = partnerWorkerService.getOne(queryWrapperWork); -// if (ObjectUtil.isEmpty(worker)){ -// throw new Exception("信息有误"); -// } -// partner.setPartnerId(worker.getPartnerId()); -// } - - LambdaQueryWrapper queryWrapper =new LambdaQueryWrapper<>(); LoginUser user = SecurityFrameworkUtils.getLoginUser(); - queryWrapper.orderByAsc(ShopMallPartners::getPartnerId).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0").last("limit 1"); - ShopMallPartners partner = partnersService.getOne(queryWrapper); + Set userRoleIdListByUserId = permissionService.getUserRoleIdListByUserId(user.getId()); + List roleList = roleService.getRoleList(userRoleIdListByUserId); + + List roles = roleList.stream().map(RoleDO::getCode).collect(Collectors.toList()); + ShopMallPartners partner = new ShopMallPartners(); + if (roles.contains("jcshop")){ + LambdaQueryWrapper queryWrapper =new LambdaQueryWrapper<>(); + queryWrapper.eq(ShopMallPartners::getUserId,user.getId()).eq(ShopMallPartners::getType,"jc").eq(ShopMallPartners::getIsBanned,"0"); + partner = this.getOne(queryWrapper); + if (ObjectUtil.isEmpty(partner)){ + throw new Exception("信息有误"); + } + }else if (roles.contains("jcworker")){ + LambdaQueryWrapper queryWrapperWork =new LambdaQueryWrapper<>(); + queryWrapperWork.eq(PartnerWorker::getUserId,user.getId()); + PartnerWorker worker = partnerWorkerService.getOne(queryWrapperWork); + if (ObjectUtil.isEmpty(worker)){ + throw new Exception("信息有误"); + } + partner.setPartnerId(worker.getPartnerId()); + } return partner; } diff --git a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/DlInspectionProjectServiceImpl.java b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/DlInspectionProjectServiceImpl.java index fbec9eea..d1d00d39 100644 --- a/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/DlInspectionProjectServiceImpl.java +++ b/dl-module-inspection/src/main/java/cn/iocoder/yudao/module/inspection/service/impl/DlInspectionProjectServiceImpl.java @@ -81,17 +81,6 @@ public class DlInspectionProjectServiceImpl extends ServiceImpl page = new Page<>(pageNo, pageSize); - if ("".equals(rescueInfo.getFeeType())){ - rescueInfo.setFeeType(null); - } IPage rescueInfos = rescueInfoService.getRescueInfoByDriver(rescueInfo, page); List list = rescueInfoService.moneyManagement2(rescueInfos.getRecords(), rescueInfo.getRescueStart()); IPage result = new Page<>(pageNo, pageSize); diff --git a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/service/impl/RescueInfoServiceImpl.java b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/service/impl/RescueInfoServiceImpl.java index 5545e91f..6b258873 100644 --- a/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/service/impl/RescueInfoServiceImpl.java +++ b/dl-module-rescue/src/main/java/cn/iocoder/yudao/module/rescue/service/impl/RescueInfoServiceImpl.java @@ -345,9 +345,6 @@ public class RescueInfoServiceImpl extends ServiceImpl and ri.rescue_type = #{map.rescueType} - + and ri.fee_type = #{map.feeType} @@ -126,14 +126,8 @@ and ri.driver_id is not null - - and ri.fee_type = #{feeType} - - - and rescue_time like concat(#{rescueStartMonth}, '%') - - - and rescue_time between concat(#{rescueStart}, ' 00:00:00') and concat(#{rescueEnd}, ' 23:59:59') + + and rescue_time like concat(#{rescueStart}, '%') diff --git a/dl-module-rescue/src/main/resources/mapper/rescue/RescueRefuelRecordMapper.xml b/dl-module-rescue/src/main/resources/mapper/rescue/RescueRefuelRecordMapper.xml index 56bd2efa..76864cb9 100644 --- a/dl-module-rescue/src/main/resources/mapper/rescue/RescueRefuelRecordMapper.xml +++ b/dl-module-rescue/src/main/resources/mapper/rescue/RescueRefuelRecordMapper.xml @@ -76,10 +76,7 @@ and rci.rescue_car_num like concat('%',#{driverCarNum},'%') - and rrr.record_time like concat(#{rescueStartMonth},'%') - - and rrr.record_time between concat(#{rescueStart}, ' 00:00:00') and concat(#{rescueEnd}, ' 23:59:59') - + and rrr.record_time like concat(#{rescueStart},'%')