增加返回字段
This commit is contained in:
@@ -38,6 +38,7 @@
|
|||||||
u.shop_id as shopId,
|
u.shop_id as shopId,
|
||||||
u.register_time as registerTime,
|
u.register_time as registerTime,
|
||||||
s.shop_name as shopName,
|
s.shop_name as shopName,
|
||||||
|
u.line_id as lineId,
|
||||||
e.id as employeeTrainingId,
|
e.id as employeeTrainingId,
|
||||||
e.assessment_num as assessmentNum,
|
e.assessment_num as assessmentNum,
|
||||||
e.assessment_total_num as assessmentTotalNum,
|
e.assessment_total_num as assessmentTotalNum,
|
||||||
|
|||||||
@@ -15,9 +15,15 @@ public class EmployeeTrainingVO {
|
|||||||
@ApiModelProperty("id")
|
@ApiModelProperty("id")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty("线索id")
|
||||||
|
private Long lineId;
|
||||||
|
|
||||||
@ApiModelProperty("名字")
|
@ApiModelProperty("名字")
|
||||||
private String username;
|
private String username;
|
||||||
|
|
||||||
|
@ApiModelProperty("加盟商名字")
|
||||||
|
private String franchiseeName;
|
||||||
|
|
||||||
@ApiModelProperty("手机号")
|
@ApiModelProperty("手机号")
|
||||||
private String mobile;
|
private String mobile;
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import com.cool.store.dao.*;
|
|||||||
import com.cool.store.dto.SmallVideoDTO;
|
import com.cool.store.dto.SmallVideoDTO;
|
||||||
import com.cool.store.dto.SmallVideoInfoDTO;
|
import com.cool.store.dto.SmallVideoInfoDTO;
|
||||||
import com.cool.store.dto.StaffExamInfoDTO;
|
import com.cool.store.dto.StaffExamInfoDTO;
|
||||||
|
import com.cool.store.dto.openPreparation.PlanLineDTO;
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.enums.AssessmentTemplateType;
|
import com.cool.store.enums.AssessmentTemplateType;
|
||||||
import com.cool.store.enums.ExamStatusEnum;
|
import com.cool.store.enums.ExamStatusEnum;
|
||||||
@@ -79,6 +80,9 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService {
|
|||||||
@Resource
|
@Resource
|
||||||
private XfsgEhrService xfsgEhrService;
|
private XfsgEhrService xfsgEhrService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private LineInfoDAO lineInfoDAO;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageInfo<EmployeeTrainingVO> employeeTrainingList(String userId, EmployeeTrainingRequest request) {
|
public PageInfo<EmployeeTrainingVO> employeeTrainingList(String userId, EmployeeTrainingRequest request) {
|
||||||
List<String> authRegionIdList = new ArrayList<>();
|
List<String> authRegionIdList = new ArrayList<>();
|
||||||
@@ -103,6 +107,8 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService {
|
|||||||
|
|
||||||
List<Long> regionIds = list.stream().map(EmployeeTrainingVO::getRegionId).distinct().collect(Collectors.toList());
|
List<Long> regionIds = list.stream().map(EmployeeTrainingVO::getRegionId).distinct().collect(Collectors.toList());
|
||||||
|
|
||||||
|
List<Long> lineIdList = list.stream().map(EmployeeTrainingVO::getLineId).distinct().collect(Collectors.toList());
|
||||||
|
|
||||||
List<String> storeIdList = list.stream().map(EmployeeTrainingVO::getTrainingStoreId).distinct().collect(Collectors.toList());
|
List<String> storeIdList = list.stream().map(EmployeeTrainingVO::getTrainingStoreId).distinct().collect(Collectors.toList());
|
||||||
|
|
||||||
List<StoreDO> storeDOList = storeDAO.getEffectiveStoreByStoreIds(storeIdList);
|
List<StoreDO> storeDOList = storeDAO.getEffectiveStoreByStoreIds(storeIdList);
|
||||||
@@ -117,6 +123,9 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService {
|
|||||||
userIdList.addAll(practicalUserIdList);
|
userIdList.addAll(practicalUserIdList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<PlanLineDTO> lineInfoList = lineInfoDAO.getLines(lineIdList);
|
||||||
|
Map<Long, String> lineInfoMap = lineInfoList.stream().collect(Collectors.toMap(PlanLineDTO::getLineId, PlanLineDTO::getUsername));
|
||||||
|
|
||||||
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(userIdList);
|
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(userIdList);
|
||||||
|
|
||||||
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(regionIds);
|
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(regionIds);
|
||||||
@@ -126,6 +135,7 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService {
|
|||||||
item.setTrainingStoreName(storeNameMap.get(item.getTrainingStoreId()));
|
item.setTrainingStoreName(storeNameMap.get(item.getTrainingStoreId()));
|
||||||
item.setTrainingTeacherUserName(userNameMap.get(item.getTrainingTeacherUserId()));
|
item.setTrainingTeacherUserName(userNameMap.get(item.getTrainingTeacherUserId()));
|
||||||
item.setPracticalAssessmentUserName(userNameMap.get(item.getPracticalAssessmentUserId()));
|
item.setPracticalAssessmentUserName(userNameMap.get(item.getPracticalAssessmentUserId()));
|
||||||
|
item.setFranchiseeName(lineInfoMap.get(item.getLineId()));
|
||||||
});
|
});
|
||||||
return new PageInfo<>(list);
|
return new PageInfo<>(list);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user