diff --git a/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesWorkOrderEntity.java b/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesWorkOrderEntity.java index a76731372..4338b5b90 100644 --- a/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesWorkOrderEntity.java +++ b/blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesWorkOrderEntity.java @@ -287,6 +287,10 @@ public class AftersalesWorkOrderEntity extends TenantEntity { * 品牌名称 */ private String brandName; + /** + * 离职状态 + */ + private boolean departStatus; diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml index c795850a7..7c5911f4d 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml @@ -54,7 +54,7 @@ select DISTINCT lawo.id,lawo.work_order_type,lawo.discovery_node,lawo.work_order_number,lawo.waybill_number,lawo.order_code,lawo.train_number,lawo.first, lawo.secondary,lawo.vehicle_route,lawo.deliver_goods_time,lawo.discovery_time,lawo.warehousing_time,lawo.waybill_mall,lawo.remarks,lawo.delivery_time, lawo.delivery_driver,lawo.work_order_status,lawo.problem_description,lawo.responsible_person,lawo.processed_by,lawo.create_time, - lawo.customer_service_name customerServiceName,lawo.warehouse_id warehouseId,lawo.brand_name brandName + lawo.customer_service_name customerServiceName,lawo.warehouse_id warehouseId,lawo.brand_name brandName,lawo.customer_service_id customerServiceId from logpm_aftersales_work_order lawo LEFT JOIN logpm_aftersales_processor lap on lawo.id = lap.work_order_id and lap.types_of = '2' and lap.conditions in (1,2) LEFT JOIN logpm_aftersales_completion_record lacr on lacr.work_order_id = lawo.id and lacr.is_deleted = '0' diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java index 4b50cd041..2df282bed 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java @@ -665,7 +665,28 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl iPage = baseMapper.pageListOwn(page, workOrderEntity); + iPage.getRecords().forEach( i ->{ + if(ObjectUtils.isNotNull(i.getCustomerServiceId())){ + R> listR = userSearchClient.listByUser(String.valueOf(i.getCustomerServiceId())); + if(ObjectUtils.isNotNull( listR.getData())){ + listR.getData().forEach( a ->{ + long time = new Date().getTime() / 1000; + if(ObjectUtils.isNotNull( a.getDownTime() )){ + long l = a.getDownTime().getTime() / 1000; + if(l<= time){ + i.setDepartStatus(true); + } + }else{ + i.setDepartStatus(false); + } + + }); + + } + } + }); + return iPage; } /** @@ -1140,9 +1161,22 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl> listR = userSearchClient.listByRole(roleIds); //查询角色下的所有人员数据 + List userList = new ArrayList<>(); + if(!listR.getData().isEmpty()){ + listR.getData().forEach( i ->{ + long time = new Date().getTime() / 1000; + if(ObjectUtils.isNotNull( i.getDownTime() )){ + long l = i.getDownTime().getTime() / 1000; + if(l> time){ + userList.add(i); + } + }else{ + userList.add(i); + } - - return listR.getData(); + }); + } + return userList; } }