员工培训
This commit is contained in:
@@ -36,6 +36,7 @@
|
|||||||
u.region_id as regionId,
|
u.region_id as regionId,
|
||||||
u.role_id as roleId,
|
u.role_id as roleId,
|
||||||
u.shop_id as shopId,
|
u.shop_id as shopId,
|
||||||
|
u.register_time as registerTime,
|
||||||
s.shop_name as shopName,
|
s.shop_name as shopName,
|
||||||
e.id as employeeTrainingId,
|
e.id as employeeTrainingId,
|
||||||
e.assessment_num as assessmentNum,
|
e.assessment_num as assessmentNum,
|
||||||
@@ -45,6 +46,7 @@
|
|||||||
e.practical_exam_status as practicalExamStatus,
|
e.practical_exam_status as practicalExamStatus,
|
||||||
e.practical_exam_score as practicalExamScore,
|
e.practical_exam_score as practicalExamScore,
|
||||||
e.assessment_status as assessmentStatus
|
e.assessment_status as assessmentStatus
|
||||||
|
|
||||||
from xfsg_temp_user_detail u
|
from xfsg_temp_user_detail u
|
||||||
left join xfsg_employee_training e on e.xfsg_user_detail_id = u.id
|
left join xfsg_employee_training e on e.xfsg_user_detail_id = u.id
|
||||||
left join xfsg_shop_info s on s.id = u.shop_id
|
left join xfsg_shop_info s on s.id = u.shop_id
|
||||||
@@ -68,10 +70,10 @@
|
|||||||
and e.assign_flag = #{assignFlag}
|
and e.assign_flag = #{assignFlag}
|
||||||
</if>
|
</if>
|
||||||
<if test="beginTime != null and beginTime != ''">
|
<if test="beginTime != null and beginTime != ''">
|
||||||
and e.register_time >= #{beginTime}
|
and u.register_time >= #{beginTime}
|
||||||
</if>
|
</if>
|
||||||
<if test="endTime != null and endTime != ''">
|
<if test="endTime != null and endTime != ''">
|
||||||
and e.register_time <= #{endTime}
|
and u.register_time <= #{endTime}
|
||||||
</if>
|
</if>
|
||||||
<if test="shopIdList != null and shopIdList.size() > 0">
|
<if test="shopIdList != null and shopIdList.size() > 0">
|
||||||
and u.shop_id in
|
and u.shop_id in
|
||||||
|
|||||||
@@ -40,13 +40,6 @@ public class EmployeeTrainingDetailRequest {
|
|||||||
private String trainingTeacherUserId;
|
private String trainingTeacherUserId;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 实操考核人员ID
|
|
||||||
*/
|
|
||||||
@ApiModelProperty("实操考核人员ID")
|
|
||||||
private String practicalAssessmentUserId;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 预计考核时间
|
* 预计考核时间
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -104,6 +104,10 @@ public class AssessmentUserTrainingVO {
|
|||||||
private Integer assessmentStatus;
|
private Integer assessmentStatus;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("所属区域")
|
||||||
|
private String regionNodeName;
|
||||||
|
|
||||||
|
|
||||||
@ApiModelProperty("考核数据")
|
@ApiModelProperty("考核数据")
|
||||||
List<AssessmentTemplateDataVO> templateDataList;
|
List<AssessmentTemplateDataVO> templateDataList;
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public class EmployeeTrainingDetailVO {
|
|||||||
private Long regionId;
|
private Long regionId;
|
||||||
|
|
||||||
@ApiModelProperty("角色id 170000000-店长 180000000-店员")
|
@ApiModelProperty("角色id 170000000-店长 180000000-店员")
|
||||||
private String roleId;
|
private Long roleId;
|
||||||
|
|
||||||
@ApiModelProperty("店铺id")
|
@ApiModelProperty("店铺id")
|
||||||
private Long shopId;
|
private Long shopId;
|
||||||
@@ -42,15 +42,9 @@ public class EmployeeTrainingDetailVO {
|
|||||||
private Long employeeTrainingId;
|
private Long employeeTrainingId;
|
||||||
|
|
||||||
|
|
||||||
@ApiModelProperty("战区名称")
|
|
||||||
private String regionName;
|
|
||||||
|
|
||||||
@ApiModelProperty("大区ID")
|
|
||||||
private Long largeRegionId;
|
|
||||||
|
|
||||||
@ApiModelProperty("大区名称")
|
|
||||||
private String largeRegionName;
|
|
||||||
|
|
||||||
|
@ApiModelProperty("所属区域")
|
||||||
|
private String regionNodeName;
|
||||||
/**
|
/**
|
||||||
* 实训开始时间
|
* 实训开始时间
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class EmployeeTrainingVO {
|
|||||||
private Long shopId;
|
private Long shopId;
|
||||||
|
|
||||||
@ApiModelProperty("店铺名称")
|
@ApiModelProperty("店铺名称")
|
||||||
private Long shopName;
|
private String shopName;
|
||||||
|
|
||||||
@ApiModelProperty("培训id")
|
@ApiModelProperty("培训id")
|
||||||
private Long employeeTrainingId;
|
private Long employeeTrainingId;
|
||||||
@@ -61,14 +61,9 @@ public class EmployeeTrainingVO {
|
|||||||
@ApiModelProperty("考核状态 0-培训中 1-带考核 2-考核通过 3-考核不通过")
|
@ApiModelProperty("考核状态 0-培训中 1-带考核 2-考核通过 3-考核不通过")
|
||||||
private Integer assessmentStatus;
|
private Integer assessmentStatus;
|
||||||
|
|
||||||
@ApiModelProperty("战区名称")
|
|
||||||
private String regionName;
|
|
||||||
|
|
||||||
@ApiModelProperty("大区ID")
|
@ApiModelProperty("所属区域")
|
||||||
private Long largeRegionId;
|
private String regionNodeName;
|
||||||
|
|
||||||
@ApiModelProperty("大区名称")
|
|
||||||
private String largeRegionName;
|
|
||||||
/**
|
/**
|
||||||
* 实训结束时间
|
* 实训结束时间
|
||||||
*/
|
*/
|
||||||
@@ -119,4 +114,7 @@ public class EmployeeTrainingVO {
|
|||||||
*/
|
*/
|
||||||
@ApiModelProperty("实际考核时间")
|
@ApiModelProperty("实际考核时间")
|
||||||
private Date actualAssessmentTime;
|
private Date actualAssessmentTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("登记时间")
|
||||||
|
private Date registerTime;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,6 +78,9 @@ public class EmployeeUserTrainingVO {
|
|||||||
@ApiModelProperty("带教老师名称")
|
@ApiModelProperty("带教老师名称")
|
||||||
private String trainingTeacherUserName;
|
private String trainingTeacherUserName;
|
||||||
|
|
||||||
|
@ApiModelProperty("所属区域")
|
||||||
|
private String regionNodeName;
|
||||||
|
|
||||||
|
|
||||||
@ApiModelProperty("培训数据")
|
@ApiModelProperty("培训数据")
|
||||||
List<AssessmentTemplateDataVO> templateDataList;
|
List<AssessmentTemplateDataVO> templateDataList;
|
||||||
|
|||||||
@@ -36,14 +36,9 @@ public class OpenAcceptanceInfoListVO {
|
|||||||
@ApiModelProperty("战区Id")
|
@ApiModelProperty("战区Id")
|
||||||
private Long regionId;
|
private Long regionId;
|
||||||
|
|
||||||
@ApiModelProperty("战区名称")
|
@ApiModelProperty("所属区域")
|
||||||
private String regionName;
|
private String regionNodeName;
|
||||||
|
|
||||||
@ApiModelProperty("大区ID")
|
|
||||||
private Long largeRegionId;
|
|
||||||
|
|
||||||
@ApiModelProperty("大区名称")
|
|
||||||
private String largeRegionName;
|
|
||||||
@ApiModelProperty("计划开业时间")
|
@ApiModelProperty("计划开业时间")
|
||||||
private Date planOpenTime;
|
private Date planOpenTime;
|
||||||
@ApiModelProperty("新店开业结束时间")
|
@ApiModelProperty("新店开业结束时间")
|
||||||
|
|||||||
@@ -75,14 +75,16 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService {
|
|||||||
DateUtils.parseLongDateToStr(request.getBeginTime()),
|
DateUtils.parseLongDateToStr(request.getBeginTime()),
|
||||||
DateUtils.parseLongDateToStr(request.getEndTime()), null,
|
DateUtils.parseLongDateToStr(request.getEndTime()), null,
|
||||||
request.getTheoreticalExamStatus(), request.getPracticalExamStatus(), request.getAssessmentStatus());
|
request.getTheoreticalExamStatus(), request.getPracticalExamStatus(), request.getAssessmentStatus());
|
||||||
|
if (CollectionUtils.isEmpty(list)) {
|
||||||
|
return new PageInfo<>(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Long> regionIds = list.stream().map(EmployeeTrainingVO::getRegionId).distinct().collect(Collectors.toList());
|
||||||
|
|
||||||
|
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(regionIds);
|
||||||
|
|
||||||
list.forEach(item -> {
|
list.forEach(item -> {
|
||||||
Long regionId = item.getRegionId();
|
item.setRegionNodeName(regionNameMap.get(item.getRegionId()));
|
||||||
Long bigRegionIdByAreaId = regionService.getBigRegionIdByAreaId(item.getRegionId());
|
|
||||||
Map<Long, String> regionNameMap = regionDao.getRegionNameMap(Arrays.asList(bigRegionIdByAreaId, item.getRegionId()));
|
|
||||||
item.setRegionName(regionNameMap.get(item.getRegionId()));
|
|
||||||
item.setLargeRegionId(bigRegionIdByAreaId);
|
|
||||||
item.setLargeRegionName(regionNameMap.get(bigRegionIdByAreaId));
|
|
||||||
});
|
});
|
||||||
return new PageInfo<>(list);
|
return new PageInfo<>(list);
|
||||||
}
|
}
|
||||||
@@ -99,6 +101,8 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService {
|
|||||||
employeeTrainingVO.setTrainingStartTime(employeeTrainingDO.getTrainingStartTime());
|
employeeTrainingVO.setTrainingStartTime(employeeTrainingDO.getTrainingStartTime());
|
||||||
employeeTrainingVO.setTrainingEndTime(employeeTrainingDO.getTrainingEndTime());
|
employeeTrainingVO.setTrainingEndTime(employeeTrainingDO.getTrainingEndTime());
|
||||||
employeeTrainingVO.setTrainingStoreId(employeeTrainingDO.getTrainingStoreId());
|
employeeTrainingVO.setTrainingStoreId(employeeTrainingDO.getTrainingStoreId());
|
||||||
|
employeeTrainingVO.setRoleId(tempUserDetailDO.getRoleId());
|
||||||
|
employeeTrainingVO.setEmployeeTrainingId(employeeTrainingDO.getId());
|
||||||
StoreDO storeDO = storeDAO.getByStoreId(employeeTrainingDO.getTrainingStoreId());
|
StoreDO storeDO = storeDAO.getByStoreId(employeeTrainingDO.getTrainingStoreId());
|
||||||
if (storeDO != null) {
|
if (storeDO != null) {
|
||||||
employeeTrainingVO.setTrainingStoreName(storeDO.getStoreName());
|
employeeTrainingVO.setTrainingStoreName(storeDO.getStoreName());
|
||||||
@@ -120,11 +124,9 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService {
|
|||||||
employeeTrainingVO.setShopId(employeeTrainingDO.getShopId());
|
employeeTrainingVO.setShopId(employeeTrainingDO.getShopId());
|
||||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(employeeTrainingDO.getShopId());
|
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(employeeTrainingDO.getShopId());
|
||||||
employeeTrainingVO.setShopName(shopInfoDO.getShopName());
|
employeeTrainingVO.setShopName(shopInfoDO.getShopName());
|
||||||
Long bigRegionIdByAreaId = regionService.getBigRegionIdByAreaId(employeeTrainingDO.getRegionId());
|
|
||||||
Map<Long, String> regionNameMap = regionDao.getRegionNameMap(Arrays.asList(bigRegionIdByAreaId, employeeTrainingDO.getRegionId()));
|
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(Collections.singletonList(employeeTrainingDO.getRegionId()));
|
||||||
employeeTrainingVO.setRegionName(regionNameMap.get(employeeTrainingDO.getRegionId()));
|
employeeTrainingVO.setRegionNodeName(regionNameMap.get(employeeTrainingDO.getRegionId()));
|
||||||
employeeTrainingVO.setLargeRegionId(bigRegionIdByAreaId);
|
|
||||||
employeeTrainingVO.setLargeRegionName(regionNameMap.get(bigRegionIdByAreaId));
|
|
||||||
employeeTrainingVO.setRegionId(employeeTrainingDO.getRegionId());
|
employeeTrainingVO.setRegionId(employeeTrainingDO.getRegionId());
|
||||||
employeeTrainingVO.setMobile(tempUserDetailDO.getMobile());
|
employeeTrainingVO.setMobile(tempUserDetailDO.getMobile());
|
||||||
employeeTrainingVO.setUsername(tempUserDetailDO.getUsername());
|
employeeTrainingVO.setUsername(tempUserDetailDO.getUsername());
|
||||||
@@ -142,7 +144,7 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService {
|
|||||||
EmployeeTrainingDO employeeTrainingDO = employeeTrainingDAO.selectByUserDetailId(request.getId());
|
EmployeeTrainingDO employeeTrainingDO = employeeTrainingDAO.selectByUserDetailId(request.getId());
|
||||||
|
|
||||||
if (employeeTrainingDO != null && employeeTrainingDO.getAssignFlag()) {
|
if (employeeTrainingDO != null && employeeTrainingDO.getAssignFlag()) {
|
||||||
throw new ServiceException("已经分配");
|
throw new ServiceException("已经分配培训,无法再次分配");
|
||||||
}
|
}
|
||||||
if (employeeTrainingDO == null) {
|
if (employeeTrainingDO == null) {
|
||||||
employeeTrainingDO = new EmployeeTrainingDO();
|
employeeTrainingDO = new EmployeeTrainingDO();
|
||||||
@@ -154,7 +156,6 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService {
|
|||||||
employeeTrainingDO.setTrainingStoreId(request.getTrainingStoreId());
|
employeeTrainingDO.setTrainingStoreId(request.getTrainingStoreId());
|
||||||
employeeTrainingDO.setTrainingStartTime(request.getTrainingStartTime());
|
employeeTrainingDO.setTrainingStartTime(request.getTrainingStartTime());
|
||||||
employeeTrainingDO.setTrainingEndTime(request.getTrainingEndTime());
|
employeeTrainingDO.setTrainingEndTime(request.getTrainingEndTime());
|
||||||
employeeTrainingDO.setPracticalAssessmentUserId(request.getPracticalAssessmentUserId());
|
|
||||||
employeeTrainingDO.setEstimatedAssessmentTime(request.getEstimatedAssessmentTime());
|
employeeTrainingDO.setEstimatedAssessmentTime(request.getEstimatedAssessmentTime());
|
||||||
employeeTrainingDO.setAssessmentNum(0);
|
employeeTrainingDO.setAssessmentNum(0);
|
||||||
employeeTrainingDO.setAssessmentTotalNum(assessmentTemplateDOList.size());
|
employeeTrainingDO.setAssessmentTotalNum(assessmentTemplateDOList.size());
|
||||||
@@ -185,11 +186,20 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService {
|
|||||||
public List<EmployeeTrainingVO> trainingListByShopId(Long shopId) {
|
public List<EmployeeTrainingVO> trainingListByShopId(Long shopId) {
|
||||||
|
|
||||||
List<EmployeeTrainingVO> list = employeeTrainingDAO.trainingListByShopId(shopId, null, null);
|
List<EmployeeTrainingVO> list = employeeTrainingDAO.trainingListByShopId(shopId, null, null);
|
||||||
|
if (CollectionUtils.isEmpty(list)) {
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
List<String> storeIdList = list.stream().map(EmployeeTrainingVO::getTrainingStoreId).collect(Collectors.toList());
|
||||||
|
List<StoreDO> storeDOList = storeDAO.getEffectiveStoreByStoreIds(storeIdList);
|
||||||
|
Map<String, String> storeNameMap = storeDOList.stream().collect(Collectors.toMap(StoreDO::getStoreId, StoreDO::getStoreName));
|
||||||
|
|
||||||
|
List<Long> regionIdList = list.stream().map(EmployeeTrainingVO::getRegionId).collect(Collectors.toList());
|
||||||
|
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(regionIdList);
|
||||||
|
|
||||||
list.forEach(item -> {
|
list.forEach(item -> {
|
||||||
StoreDO storeDO = storeDAO.getByStoreId(item.getTrainingStoreId());
|
item.setTrainingStoreName(storeNameMap.get(item.getTrainingStoreId()));
|
||||||
if (storeDO != null) {
|
item.setRegionNodeName(regionNameMap.get(item.getRegionId()));
|
||||||
item.setTrainingStoreName(storeDO.getStoreName());
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -197,11 +207,16 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService {
|
|||||||
@Override
|
@Override
|
||||||
public List<EmployeeTrainingVO> trainerUserList(String userId, Integer status) {
|
public List<EmployeeTrainingVO> trainerUserList(String userId, Integer status) {
|
||||||
List<EmployeeTrainingVO> list = employeeTrainingDAO.trainingListByShopId(null, userId, status);
|
List<EmployeeTrainingVO> list = employeeTrainingDAO.trainingListByShopId(null, userId, status);
|
||||||
|
List<String> storeIdList = list.stream().map(EmployeeTrainingVO::getTrainingStoreId).collect(Collectors.toList());
|
||||||
|
List<StoreDO> storeDOList = storeDAO.getEffectiveStoreByStoreIds(storeIdList);
|
||||||
|
Map<String, String> storeNameMap = storeDOList.stream().collect(Collectors.toMap(StoreDO::getStoreId, StoreDO::getStoreName));
|
||||||
|
|
||||||
|
List<Long> regionIdList = list.stream().map(EmployeeTrainingVO::getRegionId).collect(Collectors.toList());
|
||||||
|
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(regionIdList);
|
||||||
|
|
||||||
list.forEach(item -> {
|
list.forEach(item -> {
|
||||||
StoreDO storeDO = storeDAO.getByStoreId(item.getTrainingStoreId());
|
item.setTrainingStoreName(storeNameMap.get(item.getTrainingStoreId()));
|
||||||
if (storeDO != null) {
|
item.setRegionNodeName(regionNameMap.get(item.getRegionId()));
|
||||||
item.setTrainingStoreName(storeDO.getStoreName());
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@@ -254,6 +269,8 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService {
|
|||||||
templateDataVOList.add(assessmentTemplateDataVO);
|
templateDataVOList.add(assessmentTemplateDataVO);
|
||||||
});
|
});
|
||||||
employeeUserTrainingVO.setTemplateDataList(templateDataVOList);
|
employeeUserTrainingVO.setTemplateDataList(templateDataVOList);
|
||||||
|
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(Collections.singletonList(employeeTrainingDO.getRegionId()));
|
||||||
|
employeeUserTrainingVO.setRegionNodeName(regionNameMap.get(employeeTrainingDO.getRegionId()));
|
||||||
return employeeUserTrainingVO;
|
return employeeUserTrainingVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -291,7 +308,7 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService {
|
|||||||
});
|
});
|
||||||
Integer num = assessmentDataDAO.selectCount(userId, shopId);
|
Integer num = assessmentDataDAO.selectCount(userId, shopId);
|
||||||
employeeTrainingDO.setAssessmentNum(num);
|
employeeTrainingDO.setAssessmentNum(num);
|
||||||
if(num.equals(employeeTrainingDO.getAssessmentTotalNum())){
|
if (num.equals(employeeTrainingDO.getAssessmentTotalNum())) {
|
||||||
employeeTrainingDO.setAssessmentStatus(1);
|
employeeTrainingDO.setAssessmentStatus(1);
|
||||||
}
|
}
|
||||||
employeeTrainingDAO.updateByPrimaryKeySelective(employeeTrainingDO);
|
employeeTrainingDAO.updateByPrimaryKeySelective(employeeTrainingDO);
|
||||||
@@ -312,8 +329,13 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService {
|
|||||||
List<String> storeIdList = employeeTrainingVOList.stream().map(EmployeeTrainingVO::getTrainingStoreId).collect(Collectors.toList());
|
List<String> storeIdList = employeeTrainingVOList.stream().map(EmployeeTrainingVO::getTrainingStoreId).collect(Collectors.toList());
|
||||||
List<StoreDO> storeDOList = storeDAO.getEffectiveStoreByStoreIds(storeIdList);
|
List<StoreDO> storeDOList = storeDAO.getEffectiveStoreByStoreIds(storeIdList);
|
||||||
Map<String, String> storeNameMap = storeDOList.stream().collect(Collectors.toMap(StoreDO::getStoreId, StoreDO::getStoreName));
|
Map<String, String> storeNameMap = storeDOList.stream().collect(Collectors.toMap(StoreDO::getStoreId, StoreDO::getStoreName));
|
||||||
|
|
||||||
|
List<Long> regionIdList = employeeTrainingVOList.stream().map(EmployeeTrainingVO::getRegionId).collect(Collectors.toList());
|
||||||
|
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(regionIdList);
|
||||||
|
|
||||||
employeeTrainingVOList.forEach(item -> {
|
employeeTrainingVOList.forEach(item -> {
|
||||||
item.setTrainingStoreName(storeNameMap.get(item.getTrainingStoreId()));
|
item.setTrainingStoreName(storeNameMap.get(item.getTrainingStoreId()));
|
||||||
|
item.setRegionNodeName(regionNameMap.get(item.getRegionId()));
|
||||||
});
|
});
|
||||||
return new PageInfo<>(employeeTrainingVOList);
|
return new PageInfo<>(employeeTrainingVOList);
|
||||||
}
|
}
|
||||||
@@ -351,6 +373,9 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService {
|
|||||||
assessmentUserTrainingVO.setShopName(shopInfoDO.getShopName());
|
assessmentUserTrainingVO.setShopName(shopInfoDO.getShopName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(Collections.singletonList(employeeTrainingDO.getRegionId()));
|
||||||
|
assessmentUserTrainingVO.setRegionNodeName(regionNameMap.get(employeeTrainingDO.getRegionId()));
|
||||||
|
|
||||||
List<AssessmentTemplateDO> assessmentTemplateDOList = assessmentTemplateDAO.listByType(AssessmentTemplateType.STORE_MANAGER.getCode());
|
List<AssessmentTemplateDO> assessmentTemplateDOList = assessmentTemplateDAO.listByType(AssessmentTemplateType.STORE_MANAGER.getCode());
|
||||||
|
|
||||||
List<Long> templateIdList = assessmentTemplateDOList.stream().map(AssessmentTemplateDO::getId).collect(Collectors.toList());
|
List<Long> templateIdList = assessmentTemplateDOList.stream().map(AssessmentTemplateDO::getId).collect(Collectors.toList());
|
||||||
@@ -441,10 +466,10 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService {
|
|||||||
}
|
}
|
||||||
employeeTrainingDO.setPracticalExamScore(totalScore.get().intValue());
|
employeeTrainingDO.setPracticalExamScore(totalScore.get().intValue());
|
||||||
employeeTrainingDO.setActualAssessmentTime(new Date());
|
employeeTrainingDO.setActualAssessmentTime(new Date());
|
||||||
if(employeeTrainingDO.getPracticalExamStatus() == 2 || employeeTrainingDO.getTheoreticalExamStatus() == 2){
|
if (employeeTrainingDO.getPracticalExamStatus() == 2 || employeeTrainingDO.getTheoreticalExamStatus() == 2) {
|
||||||
employeeTrainingDO.setAssessmentStatus(3);
|
employeeTrainingDO.setAssessmentStatus(3);
|
||||||
}
|
}
|
||||||
if(employeeTrainingDO.getPracticalExamStatus() == 1 && employeeTrainingDO.getTheoreticalExamStatus() == 1){
|
if (employeeTrainingDO.getPracticalExamStatus() == 1 && employeeTrainingDO.getTheoreticalExamStatus() == 1) {
|
||||||
employeeTrainingDO.setAssessmentStatus(2);
|
employeeTrainingDO.setAssessmentStatus(2);
|
||||||
}
|
}
|
||||||
employeeTrainingDAO.updateByPrimaryKeySelective(employeeTrainingDO);
|
employeeTrainingDAO.updateByPrimaryKeySelective(employeeTrainingDO);
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import com.cool.store.service.OpenAcceptanceInfoService;
|
|||||||
import com.cool.store.service.RegionService;
|
import com.cool.store.service.RegionService;
|
||||||
import com.cool.store.utils.CoolDateUtils;
|
import com.cool.store.utils.CoolDateUtils;
|
||||||
import com.cool.store.utils.poi.DateUtils;
|
import com.cool.store.utils.poi.DateUtils;
|
||||||
|
import com.cool.store.vo.EmployeeTrainingVO;
|
||||||
import com.cool.store.vo.OpenAcceptanceInfoListVO;
|
import com.cool.store.vo.OpenAcceptanceInfoListVO;
|
||||||
import com.cool.store.vo.ShopAcceptanceVO;
|
import com.cool.store.vo.ShopAcceptanceVO;
|
||||||
import com.cool.store.vo.ShopStageAcceptanceVO;
|
import com.cool.store.vo.ShopStageAcceptanceVO;
|
||||||
@@ -28,6 +29,7 @@ import org.springframework.stereotype.Service;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author byd
|
* @author byd
|
||||||
@@ -64,6 +66,10 @@ public class OpenAcceptanceInfoServiceImpl implements OpenAcceptanceInfoService
|
|||||||
userIdList.add(vo.getAcceptanceUserId());
|
userIdList.add(vo.getAcceptanceUserId());
|
||||||
userIdList.add(vo.getInvestmentManager());
|
userIdList.add(vo.getInvestmentManager());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<Long> regionIds = resultList.stream().map(OpenAcceptanceInfoListVO::getRegionId).distinct().collect(Collectors.toList());
|
||||||
|
|
||||||
|
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(regionIds);
|
||||||
if (CollectionUtils.isNotEmpty(userIdList)) {
|
if (CollectionUtils.isNotEmpty(userIdList)) {
|
||||||
Map<String, String> userNameMap = userDAO.getUserNameMap(userIdList);
|
Map<String, String> userNameMap = userDAO.getUserNameMap(userIdList);
|
||||||
for (OpenAcceptanceInfoListVO vo : resultList) {
|
for (OpenAcceptanceInfoListVO vo : resultList) {
|
||||||
@@ -71,16 +77,12 @@ public class OpenAcceptanceInfoServiceImpl implements OpenAcceptanceInfoService
|
|||||||
vo.setShopManagerUserName(userNameMap.get(vo.getShopManagerUserId()));
|
vo.setShopManagerUserName(userNameMap.get(vo.getShopManagerUserId()));
|
||||||
vo.setAcceptanceUserName(userNameMap.get(vo.getAcceptanceUserId()));
|
vo.setAcceptanceUserName(userNameMap.get(vo.getAcceptanceUserId()));
|
||||||
vo.setInvestmentManagerName(userNameMap.get(vo.getInvestmentManager()));
|
vo.setInvestmentManagerName(userNameMap.get(vo.getInvestmentManager()));
|
||||||
if(vo.getPlanOpenTime() != null){
|
if (vo.getPlanOpenTime() != null) {
|
||||||
vo.setPlanOpenEndTime(DateUtils.addDays(vo.getPlanOpenTime(), CommonConstants.THREE));
|
vo.setPlanOpenEndTime(DateUtils.addDays(vo.getPlanOpenTime(), CommonConstants.THREE));
|
||||||
}
|
}
|
||||||
if (vo.getRegionId() != null) {
|
if (vo.getRegionId() != null) {
|
||||||
Long bigRegionIdByAreaId = regionService.getBigRegionIdByAreaId(vo.getRegionId());
|
|
||||||
Map<Long, String> regionNameMap = regionDao.getRegionNameMap(Arrays.asList(bigRegionIdByAreaId, vo.getRegionId()));
|
|
||||||
vo.setRegionId(vo.getRegionId());
|
vo.setRegionId(vo.getRegionId());
|
||||||
vo.setRegionName(regionNameMap.get(vo.getRegionId()));
|
vo.setRegionNodeName(regionNameMap.get(vo.getRegionId()));
|
||||||
vo.setLargeRegionId(bigRegionIdByAreaId);
|
|
||||||
vo.setLargeRegionName(regionNameMap.get(bigRegionIdByAreaId));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import java.util.List;
|
|||||||
* @Version 1.0
|
* @Version 1.0
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/mini//newStoreOpening")
|
@RequestMapping("/mini/newStoreOpening")
|
||||||
@Api(tags = "mini新店开业")
|
@Api(tags = "mini新店开业")
|
||||||
public class MiniNewStoreOpeningController {
|
public class MiniNewStoreOpeningController {
|
||||||
|
|
||||||
|
|||||||
@@ -62,15 +62,4 @@ public class TempUserDetailController {
|
|||||||
public ResponseResult<TempUserDetailInfoVO> getUserInfoByIdUserDetailId(@RequestParam(value = "userDetailId") Long userDetailId) {
|
public ResponseResult<TempUserDetailInfoVO> getUserInfoByIdUserDetailId(@RequestParam(value = "userDetailId") Long userDetailId) {
|
||||||
return ResponseResult.success(tempUserDetailService.getUserInfoByIdUserDetailId((userDetailId)));
|
return ResponseResult.success(tempUserDetailService.getUserInfoByIdUserDetailId((userDetailId)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(path = "/registrationCompleted")
|
|
||||||
@ApiOperation("培训登记-完成")
|
|
||||||
@ApiImplicitParams({
|
|
||||||
@ApiImplicitParam(name = "id", value = "店铺id shopId")
|
|
||||||
})
|
|
||||||
public ResponseResult<Boolean> registrationCompleted(@RequestBody IdRequest idRequest) {
|
|
||||||
tempUserDetailService.registrationCompleted((idRequest.getId()));
|
|
||||||
return ResponseResult.success(Boolean.TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user