From 301b797a85aa612d42ccacf65364f6f1a9f66e53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com> Date: Wed, 30 Oct 2024 14:04:49 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=B0=E5=A2=9Eadmin=E7=9A=84=E6=A0=B9?= =?UTF-8?q?=E6=8D=AE=E9=A9=BE=E9=A9=B6=E8=AF=81=E5=9B=BE=E7=89=87=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/admin/CarMainController.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CarMainController.java b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CarMainController.java index dc39d7ee..4026042e 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CarMainController.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/module/custom/controller/admin/CarMainController.java @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.custom.controller.admin; import cn.iocoder.yudao.module.custom.entity.CarMain; import cn.iocoder.yudao.module.custom.service.CarMainService; +import cn.iocoder.yudao.module.custom.service.UserCarService; import cn.iocoder.yudao.module.custom.vo.CarMainReqVO; import cn.iocoder.yudao.module.custom.vo.CarMainRespVO; import cn.iocoder.yudao.module.custom.vo.CustomerMainSaveReqVO; @@ -51,6 +52,9 @@ public class CarMainController { @Autowired private BusiLabelService busiLabelService; + @Resource + private UserCarService userCarService; + /** * 创建车辆信息 * @@ -214,4 +218,16 @@ public class CarMainController { CarMain one = carMainService.getOne(new LambdaQueryWrapper().eq(CarMain::getLicenseNumber, carMain.getLicenseNumber())); return success(one); } + + /** + * OCR识别 + * @author vinjor-M + * @date 16:58 2024/10/11 + * @param imagePath 公网图片地址 + * @return cn.iocoder.yudao.framework.common.pojo.CommonResult + **/ + @PostMapping("/vehicleLicenseOCR") + public CommonResult vehicleLicenseOCR(@RequestBody String imagePath) throws Exception { + return CommonResult.success(userCarService.vehicleLicenseOCR(imagePath)); + } } \ No newline at end of file From c891ef584c5879c2804b01d7e93eff7dce5ae7c6 Mon Sep 17 00:00:00 2001 From: Vinjor Date: Wed, 30 Oct 2024 15:37:40 +0800 Subject: [PATCH 2/2] 1 --- .../mapper/custom/CustomerMainMapper.xml | 8 +-- .../impl/DlRepairTicketsServiceImpl.java | 13 ++++- .../tickets/vo/DlRepairTicketsReqVO.java | 6 +++ .../tickets/vo/DlRepairTicketsRespVO.java | 2 + .../mapper/tickets/DlRepairTicketsMapper.xml | 50 +++++++++++++------ 5 files changed, 60 insertions(+), 19 deletions(-) diff --git a/dl-module-base/src/main/resources/mapper/custom/CustomerMainMapper.xml b/dl-module-base/src/main/resources/mapper/custom/CustomerMainMapper.xml index 91712365..94bd20ed 100644 --- a/dl-module-base/src/main/resources/mapper/custom/CustomerMainMapper.xml +++ b/dl-module-base/src/main/resources/mapper/custom/CustomerMainMapper.xml @@ -59,9 +59,11 @@ AND main.phone_number LIKE concat('%',#{entity.phoneNumber},'%') - AND main.phone_number = #{entity.phoneOrCar} - OR car.license_number = #{entity.phoneOrCar} - OR car.vin = #{entity.phoneOrCar} + AND ( + main.phone_number LIKE CONCAT('%',#{entity.phoneOrCar},'%') + OR car.license_number LIKE CONCAT('%',#{entity.phoneOrCar},'%') + OR car.vin LIKE CONCAT('%',#{entity.phoneOrCar},'%') + ) GROUP BY main.id diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java index 1f789bf0..d16cbefd 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java @@ -742,14 +742,25 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl().eq(RepairWorker::getUserId, SecurityFrameworkUtils.getLoginUserId())); // 查自己班组的员工信息 List list = repairWorkerService.list(new LambdaQueryWrapper().eq(RepairWorker::getWorkType, one.getWorkType())); // 所有的员工信息 - List userIds = list.stream().map(RepairWorker::getUserId).collect(Collectors.toList()); + String userIdsStr = ""; + List userIds = new ArrayList<>(); + for (RepairWorker worker:list){ + userIds.add(worker.getUserId()); + if("".equals(userIdsStr)){ + userIdsStr = String.valueOf(worker.getUserId()); + }else{ + userIdsStr = ","+worker.getUserId(); + } + } repairTicketsReqVO.setUserIds(userIds); + repairTicketsReqVO.setUserIdsStr(userIdsStr); } else { //普通维修工 repairTicketsReqVO.setUserIds(Collections.singletonList(SecurityFrameworkUtils.getLoginUserId())); diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/vo/DlRepairTicketsReqVO.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/vo/DlRepairTicketsReqVO.java index c1e3b341..225a51c8 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/vo/DlRepairTicketsReqVO.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/vo/DlRepairTicketsReqVO.java @@ -25,6 +25,12 @@ public class DlRepairTicketsReqVO extends DlRepairTickets { /** 工单中项目指定的施工人员的ids */ private List userIds; + /** 工单中项目指定的施工人员的ids字符串拼接 */ + private String userIdsStr; + /** 查询类型(waiting 待处理的 | all 所有数据) */ private String selectType; + + /** 人员角色code */ + private String roleCode; } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/vo/DlRepairTicketsRespVO.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/vo/DlRepairTicketsRespVO.java index b4057bf7..7c82fee1 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/vo/DlRepairTicketsRespVO.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/vo/DlRepairTicketsRespVO.java @@ -58,5 +58,7 @@ public class DlRepairTicketsRespVO extends DlRepairTickets { /** 如果是完成并移交下一班组,就有移交给了那一个班组 */ private String nextName; + /** 维修班组长是否可以重新派工--当前施工人是自己或者本班组内的人员 */ + private Boolean canOperate; } diff --git a/dl-module-repair/src/main/resources/mapper/tickets/DlRepairTicketsMapper.xml b/dl-module-repair/src/main/resources/mapper/tickets/DlRepairTicketsMapper.xml index 70a97621..349d4b4c 100644 --- a/dl-module-repair/src/main/resources/mapper/tickets/DlRepairTicketsMapper.xml +++ b/dl-module-repair/src/main/resources/mapper/tickets/DlRepairTicketsMapper.xml @@ -106,6 +106,7 @@ + @@ -208,7 +209,13 @@ @@ -311,7 +331,7 @@ -- 维修工或维修厂长查所有的就是维修人是自己的或者是自己班组内的 -- and ( - find_in_set(#{item}, drt.now_repair_id) > 0 + find_in_set(#{item}, drti.repair_ids) > 0 )