From 57a6fce644ebd8821aac33095784accee9d1ead9 Mon Sep 17 00:00:00 2001 From: bianyadong Date: Thu, 9 May 2024 13:42:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=BF=94=E5=9B=9E=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/EmployeeTrainingMapper.xml | 1 + .../java/com/cool/store/vo/EmployeeTrainingVO.java | 6 ++++++ .../service/impl/EmployeeTrainingServiceImpl.java | 10 ++++++++++ 3 files changed, 17 insertions(+) diff --git a/coolstore-partner-dao/src/main/resources/mapper/EmployeeTrainingMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/EmployeeTrainingMapper.xml index c26a8c43f..46499d631 100644 --- a/coolstore-partner-dao/src/main/resources/mapper/EmployeeTrainingMapper.xml +++ b/coolstore-partner-dao/src/main/resources/mapper/EmployeeTrainingMapper.xml @@ -38,6 +38,7 @@ u.shop_id as shopId, u.register_time as registerTime, s.shop_name as shopName, + u.line_id as lineId, e.id as employeeTrainingId, e.assessment_num as assessmentNum, e.assessment_total_num as assessmentTotalNum, diff --git a/coolstore-partner-model/src/main/java/com/cool/store/vo/EmployeeTrainingVO.java b/coolstore-partner-model/src/main/java/com/cool/store/vo/EmployeeTrainingVO.java index 68e51c23b..839aafdb4 100644 --- a/coolstore-partner-model/src/main/java/com/cool/store/vo/EmployeeTrainingVO.java +++ b/coolstore-partner-model/src/main/java/com/cool/store/vo/EmployeeTrainingVO.java @@ -15,9 +15,15 @@ public class EmployeeTrainingVO { @ApiModelProperty("id") private Long id; + @ApiModelProperty("线索id") + private Long lineId; + @ApiModelProperty("名字") private String username; + @ApiModelProperty("加盟商名字") + private String franchiseeName; + @ApiModelProperty("手机号") private String mobile; diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/EmployeeTrainingServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/EmployeeTrainingServiceImpl.java index ffc6bebb6..bff5a572d 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/EmployeeTrainingServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/EmployeeTrainingServiceImpl.java @@ -7,6 +7,7 @@ import com.cool.store.dao.*; import com.cool.store.dto.SmallVideoDTO; import com.cool.store.dto.SmallVideoInfoDTO; import com.cool.store.dto.StaffExamInfoDTO; +import com.cool.store.dto.openPreparation.PlanLineDTO; import com.cool.store.entity.*; import com.cool.store.enums.AssessmentTemplateType; import com.cool.store.enums.ExamStatusEnum; @@ -79,6 +80,9 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService { @Resource private XfsgEhrService xfsgEhrService; + @Resource + private LineInfoDAO lineInfoDAO; + @Override public PageInfo employeeTrainingList(String userId, EmployeeTrainingRequest request) { List authRegionIdList = new ArrayList<>(); @@ -103,6 +107,8 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService { List regionIds = list.stream().map(EmployeeTrainingVO::getRegionId).distinct().collect(Collectors.toList()); + List lineIdList = list.stream().map(EmployeeTrainingVO::getLineId).distinct().collect(Collectors.toList()); + List storeIdList = list.stream().map(EmployeeTrainingVO::getTrainingStoreId).distinct().collect(Collectors.toList()); List storeDOList = storeDAO.getEffectiveStoreByStoreIds(storeIdList); @@ -117,6 +123,9 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService { userIdList.addAll(practicalUserIdList); } + List lineInfoList = lineInfoDAO.getLines(lineIdList); + Map lineInfoMap = lineInfoList.stream().collect(Collectors.toMap(PlanLineDTO::getLineId, PlanLineDTO::getUsername)); + Map userNameMap = enterpriseUserDAO.getUserNameMap(userIdList); Map regionNameMap = regionService.getBelongWarRegionNameMap(regionIds); @@ -126,6 +135,7 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService { item.setTrainingStoreName(storeNameMap.get(item.getTrainingStoreId())); item.setTrainingTeacherUserName(userNameMap.get(item.getTrainingTeacherUserId())); item.setPracticalAssessmentUserName(userNameMap.get(item.getPracticalAssessmentUserId())); + item.setFranchiseeName(lineInfoMap.get(item.getLineId())); }); return new PageInfo<>(list); }