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 )