Merge #27 into master from cc_20260116_fix
feat:实训数据去除 * cc_20260116_fix: (3 commits squashed) - feat:培训去掉身份证校验 - fix:带出新管家信息 - feat:实训数据去除 Signed-off-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com> Merged-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com> CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/27
This commit is contained in:
@@ -72,6 +72,7 @@
|
||||
and join_mode = #{joinMode}
|
||||
</if>
|
||||
</where>
|
||||
limit 1
|
||||
</select>
|
||||
<select id="queryBigRegion" resultType="com.cool.store.dto.region.BigRegionDTO">
|
||||
select *
|
||||
|
||||
@@ -56,163 +56,163 @@ public class XfsgTrainingPersonSyncListener implements MessageListener {
|
||||
|
||||
@Override
|
||||
public Action consume(Message message, ConsumeContext context) {
|
||||
String text = new String(message.getBody());
|
||||
if(StringUtils.isBlank(text)){
|
||||
log.info("消息体为空,tag:{},messageId:{}",message.getTag(),message.getMsgID());
|
||||
return Action.CommitMessage;
|
||||
}
|
||||
String lockKey = "XfsgTrainingPersonSyncListener:" + message.getMsgID();
|
||||
boolean lock = redisUtilPool.setNxExpire(lockKey, message.getMsgID(), CommonConstants.NORMAL_LOCK_TIMES);
|
||||
if(lock){
|
||||
try {
|
||||
// switch (RocketMqTagEnum.getByTag(message.getTag())){
|
||||
// case SYNC_TRAINING_PERSON:
|
||||
// syncXfsgTrainingPerson(text);
|
||||
// break;
|
||||
// case SYNC_TRAINING_SHOP_PERSON:
|
||||
// syncXfsgTrainingShopPerson(text);
|
||||
// break;
|
||||
// }
|
||||
}catch (Exception e){
|
||||
log.error("XfsgTrainingPersonSyncListener consume error",e);
|
||||
return Action.ReconsumeLater;
|
||||
}finally {
|
||||
redisUtilPool.delKey(lockKey);
|
||||
}
|
||||
log.info("消费成功,tag:{},messageId:{},reqBody={}",message.getTag(),message.getMsgID(),text);
|
||||
return Action.CommitMessage;
|
||||
}
|
||||
// String text = new String(message.getBody());
|
||||
// if(StringUtils.isBlank(text)){
|
||||
// log.info("消息体为空,tag:{},messageId:{}",message.getTag(),message.getMsgID());
|
||||
// return Action.CommitMessage;
|
||||
// }
|
||||
// String lockKey = "XfsgTrainingPersonSyncListener:" + message.getMsgID();
|
||||
// boolean lock = redisUtilPool.setNxExpire(lockKey, message.getMsgID(), CommonConstants.NORMAL_LOCK_TIMES);
|
||||
// if(lock){
|
||||
// try {
|
||||
//// switch (RocketMqTagEnum.getByTag(message.getTag())){
|
||||
//// case SYNC_TRAINING_PERSON:
|
||||
//// syncXfsgTrainingPerson(text);
|
||||
//// break;
|
||||
//// case SYNC_TRAINING_SHOP_PERSON:
|
||||
//// syncXfsgTrainingShopPerson(text);
|
||||
//// break;
|
||||
//// }
|
||||
// }catch (Exception e){
|
||||
// log.error("XfsgTrainingPersonSyncListener consume error",e);
|
||||
// return Action.ReconsumeLater;
|
||||
// }finally {
|
||||
// redisUtilPool.delKey(lockKey);
|
||||
// }
|
||||
// log.info("消费成功,tag:{},messageId:{},reqBody={}",message.getTag(),message.getMsgID(),text);
|
||||
// return Action.CommitMessage;
|
||||
// }
|
||||
return Action.ReconsumeLater;
|
||||
}
|
||||
|
||||
public void syncXfsgTrainingPerson(String text) {
|
||||
log.info("syncXfsgTrainingPerson, reqBody={}", text);
|
||||
SyncXfsgTrainingPersonInfoDTO request = JSONObject.parseObject(text, SyncXfsgTrainingPersonInfoDTO.class);
|
||||
if(StringUtils.isAnyBlank(request.getStoreNum(), request.getJobnumber(), request.getIdCard())){
|
||||
log.info("syncXfsgTrainingPerson参数缺失={}", text);
|
||||
return;
|
||||
}
|
||||
// 系统建店完成一定有门店编码???
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.selectByStoreNum(request.getStoreNum());
|
||||
if(shopInfoDO == null){
|
||||
log.info("门店编码对应的店铺信息不存在storeNum:{}", request.getStoreNum());
|
||||
return;
|
||||
}
|
||||
TempUserDetailDO checkTempUserDetailDO = tempUserDetailDAO.selectByIdCard(request.getIdCard());
|
||||
// 系统已建店,并且身份证号信息不存在
|
||||
if(checkTempUserDetailDO == null){
|
||||
StaffBaseInfoDTO staffBaseInfoDTO = xfsgEhrService.getUserInfoByCode(request.getJobnumber());
|
||||
log.info("培训人员主数据信息:staffBaseInfoDTO:{}", JSONObject.toJSONString(staffBaseInfoDTO));
|
||||
if(staffBaseInfoDTO != null){
|
||||
// TempUserDetailDO tempUserDetailDO = fillTempUserDetailDO(shopInfoDO, staffBaseInfoDTO);
|
||||
// tempUserDetailDAO.insertSelective(tempUserDetailDO);
|
||||
}
|
||||
}else if(checkTempUserDetailDO != null &&
|
||||
(checkTempUserDetailDO.getShopId() == 0L || checkTempUserDetailDO.getShopId() != shopInfoDO.getId())){
|
||||
// 已录入,但是没有店铺id
|
||||
checkTempUserDetailDO.setLineId(shopInfoDO.getLineId());
|
||||
checkTempUserDetailDO.setShopId(shopInfoDO.getId());
|
||||
checkTempUserDetailDO.setRegionId(shopInfoDO.getRegionId());
|
||||
tempUserDetailDAO.updateByPrimaryKeySelective(checkTempUserDetailDO);
|
||||
}else {
|
||||
log.info("培训人员身份证信息已存在idCard:{}", checkTempUserDetailDO.getIdCard());
|
||||
return;
|
||||
}
|
||||
// log.info("syncXfsgTrainingPerson, reqBody={}", text);
|
||||
// SyncXfsgTrainingPersonInfoDTO request = JSONObject.parseObject(text, SyncXfsgTrainingPersonInfoDTO.class);
|
||||
// if(StringUtils.isAnyBlank(request.getStoreNum(), request.getJobnumber(), request.getIdCard())){
|
||||
// log.info("syncXfsgTrainingPerson参数缺失={}", text);
|
||||
// return;
|
||||
// }
|
||||
// // 系统建店完成一定有门店编码???
|
||||
// ShopInfoDO shopInfoDO = shopInfoDAO.selectByStoreNum(request.getStoreNum());
|
||||
// if(shopInfoDO == null){
|
||||
// log.info("门店编码对应的店铺信息不存在storeNum:{}", request.getStoreNum());
|
||||
// return;
|
||||
// }
|
||||
// TempUserDetailDO checkTempUserDetailDO = tempUserDetailDAO.selectByIdCard(request.getIdCard());
|
||||
// // 系统已建店,并且身份证号信息不存在
|
||||
// if(checkTempUserDetailDO == null){
|
||||
// StaffBaseInfoDTO staffBaseInfoDTO = xfsgEhrService.getUserInfoByCode(request.getJobnumber());
|
||||
// log.info("培训人员主数据信息:staffBaseInfoDTO:{}", JSONObject.toJSONString(staffBaseInfoDTO));
|
||||
// if(staffBaseInfoDTO != null){
|
||||
//// TempUserDetailDO tempUserDetailDO = fillTempUserDetailDO(shopInfoDO, staffBaseInfoDTO);
|
||||
//// tempUserDetailDAO.insertSelective(tempUserDetailDO);
|
||||
// }
|
||||
// }else if(checkTempUserDetailDO != null &&
|
||||
// (checkTempUserDetailDO.getShopId() == 0L || checkTempUserDetailDO.getShopId() != shopInfoDO.getId())){
|
||||
// // 已录入,但是没有店铺id
|
||||
// checkTempUserDetailDO.setLineId(shopInfoDO.getLineId());
|
||||
// checkTempUserDetailDO.setShopId(shopInfoDO.getId());
|
||||
// checkTempUserDetailDO.setRegionId(shopInfoDO.getRegionId());
|
||||
// tempUserDetailDAO.updateByPrimaryKeySelective(checkTempUserDetailDO);
|
||||
// }else {
|
||||
// log.info("培训人员身份证信息已存在idCard:{}", checkTempUserDetailDO.getIdCard());
|
||||
// return;
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
private TempUserDetailDO fillTempUserDetailDO(ShopInfoDO shopInfoDO, StaffBaseInfoDTO staffBaseInfoDTO) {
|
||||
TempUserDetailDO tempUserDetailDO = new TempUserDetailDO();
|
||||
tempUserDetailDO.setLineId(shopInfoDO.getLineId());
|
||||
tempUserDetailDO.setShopId(shopInfoDO.getId());
|
||||
tempUserDetailDO.setRegionId(shopInfoDO.getRegionId());
|
||||
tempUserDetailDO.setMobile(staffBaseInfoDTO.getPhone());
|
||||
tempUserDetailDO.setUsername(staffBaseInfoDTO.getName());
|
||||
tempUserDetailDO.setSex(staffBaseInfoDTO.getSex());
|
||||
if(StringUtils.isNotBlank(staffBaseInfoDTO.getAge())){
|
||||
tempUserDetailDO.setAge(Integer.valueOf(staffBaseInfoDTO.getAge()));
|
||||
}
|
||||
tempUserDetailDO.setIdCard(staffBaseInfoDTO.getIdCard());
|
||||
tempUserDetailDO.setStatus(1);
|
||||
// tempUserDetailDO.setEducational(fillEducational(staffBaseInfoDTO.getHighestDegree()));
|
||||
tempUserDetailDO.setRoleId(fillRoleId(staffBaseInfoDTO.getJobName()));
|
||||
tempUserDetailDO.setIdCardNegativeUrl(staffBaseInfoDTO.getEmblemPhoto());
|
||||
tempUserDetailDO.setIdCardPositiveUrl(staffBaseInfoDTO.getIdNumPhoto());
|
||||
tempUserDetailDO.setHealthCertificateUrl(staffBaseInfoDTO.getHealthCertificate());
|
||||
tempUserDetailDO.setRegisterTime(new Date());
|
||||
if(StringUtils.isNotBlank(staffBaseInfoDTO.getEntryDate())){
|
||||
tempUserDetailDO.setRegisterTime(DateUtils.parseDate(staffBaseInfoDTO.getEntryDate()));
|
||||
}
|
||||
tempUserDetailDO.setSubmitTime(new Date());
|
||||
tempUserDetailDO.setSource("sync");
|
||||
return tempUserDetailDO;
|
||||
}
|
||||
|
||||
public void syncXfsgTrainingShopPerson(String text) {
|
||||
log.info("syncXfsgTrainingShopPerson, reqBody={}", text);
|
||||
ShopInfoDO shopInfoDO = JSONObject.parseObject(text, ShopInfoDO.class);
|
||||
if(StringUtils.isAnyBlank(shopInfoDO.getStoreNum())){
|
||||
log.info("syncXfsgTrainingShopPerson={}", text);
|
||||
return;
|
||||
}
|
||||
|
||||
StoreDO storeDO = storeDao.getByStoreNum(shopInfoDO.getStoreNum());
|
||||
|
||||
if(storeDO == null){
|
||||
log.info("syncXfsgTrainingShopPerson门店不存在={}", text);
|
||||
return;
|
||||
}
|
||||
|
||||
RegionDO regionDO = regionDao.getRegionByStoreId(storeDO.getStoreId());
|
||||
|
||||
if(regionDO == null){
|
||||
log.info("syncXfsgTrainingShopPerson区域不存在={}", text);
|
||||
return;
|
||||
}
|
||||
|
||||
List<EnterpriseUserDO> enterpriseUserDOList = enterpriseUserDAO.getUserListByRegionId(regionDO.getId());
|
||||
|
||||
enterpriseUserDOList.forEach(enterpriseUserDO -> {
|
||||
// 拉取培训人员
|
||||
SyncXfsgTrainingPersonInfoDTO syncXfsgTrainingPersonInfoDTO = SyncXfsgTrainingPersonInfoDTO.builder()
|
||||
.jobnumber(enterpriseUserDO.getJobnumber())
|
||||
.idCard(enterpriseUserDO.getThirdOaUniqueFlag())
|
||||
.storeNum(storeDO.getStoreNum())
|
||||
.build();
|
||||
this.syncXfsgTrainingPerson(JSONObject.toJSONString(syncXfsgTrainingPersonInfoDTO));
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// 学历 0-小学 1-初中 2-高中 3-中专 4-大专 5-本科 6-硕士 7-硕士以上
|
||||
private Integer fillEducational(String highestDegree) {
|
||||
if("小学".equals(highestDegree)){
|
||||
return 0;
|
||||
}else if("初中".equals(highestDegree)){
|
||||
return 1;
|
||||
}else if("高中".equals(highestDegree)){
|
||||
return 2;
|
||||
}else if("中专".equals(highestDegree)){
|
||||
return 3;
|
||||
}else if("大专".equals(highestDegree)){
|
||||
return 4;
|
||||
}else if("本科".equals(highestDegree)){
|
||||
return 5;
|
||||
}else if("硕士".equals(highestDegree)){
|
||||
return 6;
|
||||
}else if("硕士以上".equals(highestDegree)){
|
||||
return 7;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private Long fillRoleId(String jobName) {
|
||||
if(UserRoleEnum.XFSG_CLERK.getDesc().equals(jobName)){
|
||||
return UserRoleEnum.XFSG_CLERK.getCode();
|
||||
}else if(UserRoleEnum.XFSG_SHOPOWNER.getDesc().equals(jobName)){
|
||||
return UserRoleEnum.XFSG_SHOPOWNER.getCode();
|
||||
}
|
||||
return UserRoleEnum.XFSG_CLERK.getCode();
|
||||
}
|
||||
// private TempUserDetailDO fillTempUserDetailDO(ShopInfoDO shopInfoDO, StaffBaseInfoDTO staffBaseInfoDTO) {
|
||||
// TempUserDetailDO tempUserDetailDO = new TempUserDetailDO();
|
||||
// tempUserDetailDO.setLineId(shopInfoDO.getLineId());
|
||||
// tempUserDetailDO.setShopId(shopInfoDO.getId());
|
||||
// tempUserDetailDO.setRegionId(shopInfoDO.getRegionId());
|
||||
// tempUserDetailDO.setMobile(staffBaseInfoDTO.getPhone());
|
||||
// tempUserDetailDO.setUsername(staffBaseInfoDTO.getName());
|
||||
// tempUserDetailDO.setSex(staffBaseInfoDTO.getSex());
|
||||
// if(StringUtils.isNotBlank(staffBaseInfoDTO.getAge())){
|
||||
// tempUserDetailDO.setAge(Integer.valueOf(staffBaseInfoDTO.getAge()));
|
||||
// }
|
||||
// tempUserDetailDO.setIdCard(staffBaseInfoDTO.getIdCard());
|
||||
// tempUserDetailDO.setStatus(1);
|
||||
//// tempUserDetailDO.setEducational(fillEducational(staffBaseInfoDTO.getHighestDegree()));
|
||||
// tempUserDetailDO.setRoleId(fillRoleId(staffBaseInfoDTO.getJobName()));
|
||||
// tempUserDetailDO.setIdCardNegativeUrl(staffBaseInfoDTO.getEmblemPhoto());
|
||||
// tempUserDetailDO.setIdCardPositiveUrl(staffBaseInfoDTO.getIdNumPhoto());
|
||||
// tempUserDetailDO.setHealthCertificateUrl(staffBaseInfoDTO.getHealthCertificate());
|
||||
// tempUserDetailDO.setRegisterTime(new Date());
|
||||
// if(StringUtils.isNotBlank(staffBaseInfoDTO.getEntryDate())){
|
||||
// tempUserDetailDO.setRegisterTime(DateUtils.parseDate(staffBaseInfoDTO.getEntryDate()));
|
||||
// }
|
||||
// tempUserDetailDO.setSubmitTime(new Date());
|
||||
// tempUserDetailDO.setSource("sync");
|
||||
// return tempUserDetailDO;
|
||||
// }
|
||||
//
|
||||
// public void syncXfsgTrainingShopPerson(String text) {
|
||||
// log.info("syncXfsgTrainingShopPerson, reqBody={}", text);
|
||||
// ShopInfoDO shopInfoDO = JSONObject.parseObject(text, ShopInfoDO.class);
|
||||
// if(StringUtils.isAnyBlank(shopInfoDO.getStoreNum())){
|
||||
// log.info("syncXfsgTrainingShopPerson={}", text);
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// StoreDO storeDO = storeDao.getByStoreNum(shopInfoDO.getStoreNum());
|
||||
//
|
||||
// if(storeDO == null){
|
||||
// log.info("syncXfsgTrainingShopPerson门店不存在={}", text);
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// RegionDO regionDO = regionDao.getRegionByStoreId(storeDO.getStoreId());
|
||||
//
|
||||
// if(regionDO == null){
|
||||
// log.info("syncXfsgTrainingShopPerson区域不存在={}", text);
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// List<EnterpriseUserDO> enterpriseUserDOList = enterpriseUserDAO.getUserListByRegionId(regionDO.getId());
|
||||
//
|
||||
// enterpriseUserDOList.forEach(enterpriseUserDO -> {
|
||||
// // 拉取培训人员
|
||||
// SyncXfsgTrainingPersonInfoDTO syncXfsgTrainingPersonInfoDTO = SyncXfsgTrainingPersonInfoDTO.builder()
|
||||
// .jobnumber(enterpriseUserDO.getJobnumber())
|
||||
// .idCard(enterpriseUserDO.getThirdOaUniqueFlag())
|
||||
// .storeNum(storeDO.getStoreNum())
|
||||
// .build();
|
||||
// this.syncXfsgTrainingPerson(JSONObject.toJSONString(syncXfsgTrainingPersonInfoDTO));
|
||||
// });
|
||||
//
|
||||
// }
|
||||
//
|
||||
// // 学历 0-小学 1-初中 2-高中 3-中专 4-大专 5-本科 6-硕士 7-硕士以上
|
||||
// private Integer fillEducational(String highestDegree) {
|
||||
// if("小学".equals(highestDegree)){
|
||||
// return 0;
|
||||
// }else if("初中".equals(highestDegree)){
|
||||
// return 1;
|
||||
// }else if("高中".equals(highestDegree)){
|
||||
// return 2;
|
||||
// }else if("中专".equals(highestDegree)){
|
||||
// return 3;
|
||||
// }else if("大专".equals(highestDegree)){
|
||||
// return 4;
|
||||
// }else if("本科".equals(highestDegree)){
|
||||
// return 5;
|
||||
// }else if("硕士".equals(highestDegree)){
|
||||
// return 6;
|
||||
// }else if("硕士以上".equals(highestDegree)){
|
||||
// return 7;
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// private Long fillRoleId(String jobName) {
|
||||
// if(UserRoleEnum.XFSG_CLERK.getDesc().equals(jobName)){
|
||||
// return UserRoleEnum.XFSG_CLERK.getCode();
|
||||
// }else if(UserRoleEnum.XFSG_SHOPOWNER.getDesc().equals(jobName)){
|
||||
// return UserRoleEnum.XFSG_SHOPOWNER.getCode();
|
||||
// }
|
||||
// return UserRoleEnum.XFSG_CLERK.getCode();
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@@ -16,25 +16,25 @@ import java.util.List;
|
||||
*/
|
||||
public interface EmployeeTrainingService {
|
||||
|
||||
PageInfo<EmployeeTrainingVO> employeeTrainingList(String userId, EmployeeTrainingRequest request);
|
||||
|
||||
EmployeeTrainingDetailVO employeeTrainingDetail(Long id);
|
||||
|
||||
void distribution(EmployeeTrainingDetailRequest request);
|
||||
|
||||
List<EmployeeTrainingVO> trainingListByShopId(Long shopId);
|
||||
|
||||
PageInfo<EmployeeTrainingVO> trainerUserList(String userId, Integer status, Integer pageNum, Integer pageSize);
|
||||
|
||||
EmployeeUserTrainingVO trainerUserDetail(Long id);
|
||||
|
||||
void trainerUserCommit(EmployeeTrainingCommitListRequest request);
|
||||
|
||||
PageInfo<EmployeeTrainingVO> assessmentUserList(String userId, EmployeeAssessmentRequest request);
|
||||
|
||||
AssessmentUserTrainingVO assessmentUserDetail(Long id);
|
||||
|
||||
void turn(Long id, String userId, String turnUserId);
|
||||
|
||||
void assessmentUserCommit(EmployeeAssessmentCommitListRequest request, LoginUserInfo userId);
|
||||
// PageInfo<EmployeeTrainingVO> employeeTrainingList(String userId, EmployeeTrainingRequest request);
|
||||
//
|
||||
// EmployeeTrainingDetailVO employeeTrainingDetail(Long id);
|
||||
//
|
||||
// void distribution(EmployeeTrainingDetailRequest request);
|
||||
//
|
||||
// List<EmployeeTrainingVO> trainingListByShopId(Long shopId);
|
||||
//
|
||||
// PageInfo<EmployeeTrainingVO> trainerUserList(String userId, Integer status, Integer pageNum, Integer pageSize);
|
||||
//
|
||||
// EmployeeUserTrainingVO trainerUserDetail(Long id);
|
||||
//
|
||||
// void trainerUserCommit(EmployeeTrainingCommitListRequest request);
|
||||
//
|
||||
// PageInfo<EmployeeTrainingVO> assessmentUserList(String userId, EmployeeAssessmentRequest request);
|
||||
//
|
||||
// AssessmentUserTrainingVO assessmentUserDetail(Long id);
|
||||
//
|
||||
// void turn(Long id, String userId, String turnUserId);
|
||||
//
|
||||
// void assessmentUserCommit(EmployeeAssessmentCommitListRequest request, LoginUserInfo userId);
|
||||
}
|
||||
|
||||
@@ -237,8 +237,8 @@ public class BuildInformationServiceImpl implements BuildInformationService {
|
||||
}
|
||||
//根据映射关系默认带出新管家组织
|
||||
if (StringUtils.isBlank(response.getXgjRegionName())) {
|
||||
Integer joinMode = shopInfo.getJoinMode() == 3 ? CommonConstants.ONE : CommonConstants.ZERO;
|
||||
BigRegionDO bigRegionDO = bigRegionDAO.queryOrgInfoByBigRegionAndJoinMode(shopInfo.getRegionId(), joinMode);
|
||||
//2026之后 新管家组织不会根据加盟模式 只有一套
|
||||
BigRegionDO bigRegionDO = bigRegionDAO.queryOrgInfoByBigRegionAndJoinMode(shopInfo.getRegionId(), 0);
|
||||
if (Objects.nonNull(bigRegionDO)) {
|
||||
response.setXgjRegionId(bigRegionDO.getOrgId());
|
||||
response.setXgjRegionName(bigRegionDO.getOrgName());
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -97,15 +97,11 @@ public class TempUserDetailServiceImpl implements TempUserDetailService {
|
||||
|
||||
@Override
|
||||
public void addTempUserDetail(TempUserDetailRequest tempUserDetailRequest) {
|
||||
TempUserDetailDO tempUserDetailDO = tempUserDetailDAO.selectByIdCard(tempUserDetailRequest.getIdCard());
|
||||
if(tempUserDetailDO != null){
|
||||
throw new ServiceException("该员工已登记");
|
||||
}
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(tempUserDetailRequest.getShopId());
|
||||
if(shopInfoDO == null){
|
||||
throw new ServiceException("该店铺不存在");
|
||||
}
|
||||
tempUserDetailDO = new TempUserDetailDO();
|
||||
TempUserDetailDO tempUserDetailDO = new TempUserDetailDO();
|
||||
tempUserDetailDO.setLineId(shopInfoDO.getLineId());
|
||||
tempUserDetailDO.setShopId(tempUserDetailRequest.getShopId());
|
||||
tempUserDetailDO.setRegionId(shopInfoDO.getRegionId());
|
||||
@@ -126,26 +122,6 @@ public class TempUserDetailServiceImpl implements TempUserDetailService {
|
||||
tempUserDetailDO.setSubmitTime(new Date());
|
||||
tempUserDetailDO.setSource("create");
|
||||
tempUserDetailDAO.insertSelective(tempUserDetailDO);
|
||||
|
||||
//登记人员,培训状态由未开始到培训中
|
||||
// ShopStageInfoDO shopStageInfoDO = shopStageInfoDAO.getShopSubStageInfo(tempUserDetailDO.getShopId(), ShopSubStageEnum.SHOP_STAGE_6);
|
||||
// if(shopStageInfoDO != null && shopStageInfoDO.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00.getShopSubStageStatus())){
|
||||
// shopStageInfoDAO.updateShopStageInfo(tempUserDetailDO.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_60);
|
||||
// }
|
||||
|
||||
// List<String> userIdList = enterpriseUserRoleDao.getUserIdsByRoleIdList(Collections.singletonList(UserRoleEnum.TRAINER.getCode()));
|
||||
// RegionDO regionDO = regionDao.getRegionById(shopInfoDO.getRegionId());
|
||||
// //
|
||||
// if (regionDO != null && regionDO.getParentId() != null){
|
||||
// userIdList = enterpriseUserDAO.getUserIdListByRegionId(Long.valueOf(regionDO.getParentId()), userIdList);
|
||||
//
|
||||
// Map<String, String> messageMap = new HashMap<>();
|
||||
// messageMap.put("userName", tempUserDetailRequest.getName());
|
||||
// messageMap.put("mobile", tempUserDetailRequest.getPhone());
|
||||
// messageMap.put("registerTime", DateUtils.dateTime(tempUserDetailRequest.getRegisterTime()));
|
||||
// messageMap.put("userDetailId", tempUserDetailDO.getId().toString());
|
||||
// commonService.sendMessage(userIdList, MessageEnum.MESSAGE_21, messageMap);
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -28,113 +28,113 @@ import java.util.List;
|
||||
@RequestMapping("pc/employeeTraining")
|
||||
public class EmployeeTrainingController {
|
||||
|
||||
@Resource
|
||||
private EmployeeTrainingService employeeTrainingService;
|
||||
|
||||
|
||||
@ApiOperation("培训员工列表")
|
||||
@GetMapping("/trainingListByShopId")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "shopId", value = "店铺id", required = true)
|
||||
})
|
||||
public ResponseResult<List<EmployeeTrainingVO>> trainingListByShopId(@RequestParam("shopId") Long shopId) {
|
||||
return ResponseResult.success(employeeTrainingService.trainingListByShopId(shopId));
|
||||
}
|
||||
|
||||
@ApiOperation("待训员工列表")
|
||||
@PostMapping("/employeeTrainingList")
|
||||
public ResponseResult<PageInfo<EmployeeTrainingVO>> employeeTrainingList(@RequestBody EmployeeTrainingRequest employeeTrainingRequest) {
|
||||
return ResponseResult.success(employeeTrainingService.employeeTrainingList(CurrentUserHolder.getUserId(), employeeTrainingRequest));
|
||||
}
|
||||
|
||||
@ApiOperation("员工培训详情")
|
||||
@GetMapping("/employeeTrainingDetail")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "id", value = "id", required = true)
|
||||
})
|
||||
public ResponseResult<EmployeeTrainingDetailVO> employeeTrainingDetail(@RequestParam("id") Long id) {
|
||||
return ResponseResult.success(employeeTrainingService.employeeTrainingDetail(id));
|
||||
}
|
||||
|
||||
@ApiOperation("员工培训--分配")
|
||||
@PostMapping("/distribution")
|
||||
public ResponseResult<Boolean> distribution(@RequestBody EmployeeTrainingDetailRequest request) {
|
||||
employeeTrainingService.distribution(request);
|
||||
return ResponseResult.success(Boolean.TRUE);
|
||||
}
|
||||
|
||||
@ApiOperation("培训进度-列表")
|
||||
@PostMapping("/trainingScheduleList")
|
||||
public ResponseResult<PageInfo<EmployeeTrainingVO>> trainingScheduleList(@RequestBody EmployeeTrainingRequest employeeTrainingRequest) {
|
||||
employeeTrainingRequest.setAssignFlag(Boolean.TRUE);
|
||||
return ResponseResult.success(employeeTrainingService.employeeTrainingList(CurrentUserHolder.getUserId(), employeeTrainingRequest));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("培训-教练员-员工列表")
|
||||
@GetMapping("/trainerUserList")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "status", value = "带训状态 0-未完成 1-已完成"),
|
||||
@ApiImplicitParam(name = "pageNum", value = "分页页数"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "分页大小"),
|
||||
})
|
||||
public ResponseResult<PageInfo<EmployeeTrainingVO>> trainerUserList(@RequestParam(value = "status", required = false) Integer status,
|
||||
@RequestParam(value = "pageNum" ,defaultValue = "1")Integer pageNum,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10")Integer pageSize) {
|
||||
return ResponseResult.success(employeeTrainingService.trainerUserList(CurrentUserHolder.getUserId(), status, pageNum, pageSize));
|
||||
}
|
||||
|
||||
@ApiOperation("培训-教练员-员工带训详情")
|
||||
@RequestMapping("/trainerUserDetail")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "id", value = "用户id", required = true)
|
||||
})
|
||||
public ResponseResult<EmployeeUserTrainingVO> trainerUserDetail(Long id) {
|
||||
return ResponseResult.success(employeeTrainingService.trainerUserDetail(id));
|
||||
}
|
||||
|
||||
@ApiOperation("培训-教练员-提交培训")
|
||||
@PostMapping("/trainerUserCommit")
|
||||
public ResponseResult<Boolean> trainerUserCommit(@RequestBody EmployeeTrainingCommitListRequest request) {
|
||||
employeeTrainingService.trainerUserCommit(request);
|
||||
return ResponseResult.success(Boolean.TRUE);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("培训-战区经理-考核员工列表")
|
||||
@PostMapping("/assessmentUserList")
|
||||
public ResponseResult<PageInfo<EmployeeTrainingVO>> assessmentUserList(@RequestBody EmployeeAssessmentRequest request) {
|
||||
return ResponseResult.success(employeeTrainingService.assessmentUserList(CurrentUserHolder.getUserId(), request));
|
||||
}
|
||||
|
||||
@ApiOperation("培训-督导-考核员工列表")
|
||||
@PostMapping("/supervisorUserList")
|
||||
public ResponseResult<PageInfo<EmployeeTrainingVO>> supervisorUserList(@RequestBody EmployeeAssessmentRequest request) {
|
||||
return ResponseResult.success(employeeTrainingService.assessmentUserList(CurrentUserHolder.getUserId(), request));
|
||||
}
|
||||
|
||||
@ApiOperation("培训-战区经理-员工考核详情")
|
||||
@RequestMapping("/assessmentUserDetail")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "id", value = "员工id", required = true)
|
||||
})
|
||||
public ResponseResult<AssessmentUserTrainingVO> assessmentUserDetail(Long id) {
|
||||
return ResponseResult.success(employeeTrainingService.assessmentUserDetail(id));
|
||||
}
|
||||
|
||||
@ApiOperation("培训-实训考核-转交")
|
||||
@PostMapping("/turn")
|
||||
public ResponseResult<Boolean> turn(@RequestBody EmployeeAssessmentTurnRequest request) {
|
||||
employeeTrainingService.turn(request.getId(), CurrentUserHolder.getUserId(), request.getTurnUserId());
|
||||
return ResponseResult.success(Boolean.TRUE);
|
||||
}
|
||||
|
||||
@ApiOperation("培训-实训考核-提交考核结果")
|
||||
@PostMapping("/assessmentUserCommit")
|
||||
public ResponseResult<Boolean> assessmentUserCommit(@RequestBody EmployeeAssessmentCommitListRequest request) {
|
||||
employeeTrainingService.assessmentUserCommit(request, CurrentUserHolder.getUser());
|
||||
return ResponseResult.success(Boolean.TRUE);
|
||||
}
|
||||
// @Resource
|
||||
// private EmployeeTrainingService employeeTrainingService;
|
||||
//
|
||||
//
|
||||
// @ApiOperation("培训员工列表")
|
||||
// @GetMapping("/trainingListByShopId")
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "shopId", value = "店铺id", required = true)
|
||||
// })
|
||||
// public ResponseResult<List<EmployeeTrainingVO>> trainingListByShopId(@RequestParam("shopId") Long shopId) {
|
||||
// return ResponseResult.success(employeeTrainingService.trainingListByShopId(shopId));
|
||||
// }
|
||||
//
|
||||
// @ApiOperation("待训员工列表")
|
||||
// @PostMapping("/employeeTrainingList")
|
||||
// public ResponseResult<PageInfo<EmployeeTrainingVO>> employeeTrainingList(@RequestBody EmployeeTrainingRequest employeeTrainingRequest) {
|
||||
// return ResponseResult.success(employeeTrainingService.employeeTrainingList(CurrentUserHolder.getUserId(), employeeTrainingRequest));
|
||||
// }
|
||||
//
|
||||
// @ApiOperation("员工培训详情")
|
||||
// @GetMapping("/employeeTrainingDetail")
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "id", value = "id", required = true)
|
||||
// })
|
||||
// public ResponseResult<EmployeeTrainingDetailVO> employeeTrainingDetail(@RequestParam("id") Long id) {
|
||||
// return ResponseResult.success(employeeTrainingService.employeeTrainingDetail(id));
|
||||
// }
|
||||
//
|
||||
// @ApiOperation("员工培训--分配")
|
||||
// @PostMapping("/distribution")
|
||||
// public ResponseResult<Boolean> distribution(@RequestBody EmployeeTrainingDetailRequest request) {
|
||||
// employeeTrainingService.distribution(request);
|
||||
// return ResponseResult.success(Boolean.TRUE);
|
||||
// }
|
||||
//
|
||||
// @ApiOperation("培训进度-列表")
|
||||
// @PostMapping("/trainingScheduleList")
|
||||
// public ResponseResult<PageInfo<EmployeeTrainingVO>> trainingScheduleList(@RequestBody EmployeeTrainingRequest employeeTrainingRequest) {
|
||||
// employeeTrainingRequest.setAssignFlag(Boolean.TRUE);
|
||||
// return ResponseResult.success(employeeTrainingService.employeeTrainingList(CurrentUserHolder.getUserId(), employeeTrainingRequest));
|
||||
// }
|
||||
//
|
||||
//
|
||||
// @ApiOperation("培训-教练员-员工列表")
|
||||
// @GetMapping("/trainerUserList")
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "status", value = "带训状态 0-未完成 1-已完成"),
|
||||
// @ApiImplicitParam(name = "pageNum", value = "分页页数"),
|
||||
// @ApiImplicitParam(name = "pageSize", value = "分页大小"),
|
||||
// })
|
||||
// public ResponseResult<PageInfo<EmployeeTrainingVO>> trainerUserList(@RequestParam(value = "status", required = false) Integer status,
|
||||
// @RequestParam(value = "pageNum" ,defaultValue = "1")Integer pageNum,
|
||||
// @RequestParam(value = "pageSize",defaultValue = "10")Integer pageSize) {
|
||||
// return ResponseResult.success(employeeTrainingService.trainerUserList(CurrentUserHolder.getUserId(), status, pageNum, pageSize));
|
||||
// }
|
||||
//
|
||||
// @ApiOperation("培训-教练员-员工带训详情")
|
||||
// @RequestMapping("/trainerUserDetail")
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "id", value = "用户id", required = true)
|
||||
// })
|
||||
// public ResponseResult<EmployeeUserTrainingVO> trainerUserDetail(Long id) {
|
||||
// return ResponseResult.success(employeeTrainingService.trainerUserDetail(id));
|
||||
// }
|
||||
//
|
||||
// @ApiOperation("培训-教练员-提交培训")
|
||||
// @PostMapping("/trainerUserCommit")
|
||||
// public ResponseResult<Boolean> trainerUserCommit(@RequestBody EmployeeTrainingCommitListRequest request) {
|
||||
// employeeTrainingService.trainerUserCommit(request);
|
||||
// return ResponseResult.success(Boolean.TRUE);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// @ApiOperation("培训-战区经理-考核员工列表")
|
||||
// @PostMapping("/assessmentUserList")
|
||||
// public ResponseResult<PageInfo<EmployeeTrainingVO>> assessmentUserList(@RequestBody EmployeeAssessmentRequest request) {
|
||||
// return ResponseResult.success(employeeTrainingService.assessmentUserList(CurrentUserHolder.getUserId(), request));
|
||||
// }
|
||||
//
|
||||
// @ApiOperation("培训-督导-考核员工列表")
|
||||
// @PostMapping("/supervisorUserList")
|
||||
// public ResponseResult<PageInfo<EmployeeTrainingVO>> supervisorUserList(@RequestBody EmployeeAssessmentRequest request) {
|
||||
// return ResponseResult.success(employeeTrainingService.assessmentUserList(CurrentUserHolder.getUserId(), request));
|
||||
// }
|
||||
//
|
||||
// @ApiOperation("培训-战区经理-员工考核详情")
|
||||
// @RequestMapping("/assessmentUserDetail")
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "id", value = "员工id", required = true)
|
||||
// })
|
||||
// public ResponseResult<AssessmentUserTrainingVO> assessmentUserDetail(Long id) {
|
||||
// return ResponseResult.success(employeeTrainingService.assessmentUserDetail(id));
|
||||
// }
|
||||
//
|
||||
// @ApiOperation("培训-实训考核-转交")
|
||||
// @PostMapping("/turn")
|
||||
// public ResponseResult<Boolean> turn(@RequestBody EmployeeAssessmentTurnRequest request) {
|
||||
// employeeTrainingService.turn(request.getId(), CurrentUserHolder.getUserId(), request.getTurnUserId());
|
||||
// return ResponseResult.success(Boolean.TRUE);
|
||||
// }
|
||||
//
|
||||
// @ApiOperation("培训-实训考核-提交考核结果")
|
||||
// @PostMapping("/assessmentUserCommit")
|
||||
// public ResponseResult<Boolean> assessmentUserCommit(@RequestBody EmployeeAssessmentCommitListRequest request) {
|
||||
// employeeTrainingService.assessmentUserCommit(request, CurrentUserHolder.getUser());
|
||||
// return ResponseResult.success(Boolean.TRUE);
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -27,13 +27,13 @@ public class MiniEmployeeTrainingController {
|
||||
@Resource
|
||||
private EmployeeTrainingService employeeTrainingService;
|
||||
|
||||
@ApiOperation("培训员工列表")
|
||||
/*@ApiOperation("培训员工列表")
|
||||
@GetMapping("/trainingListByShopId")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "shopId", value = "店铺id", required = true)
|
||||
})
|
||||
public ResponseResult<List<EmployeeTrainingVO>> trainingListByShopId(@RequestParam("shopId") Long shopId) {
|
||||
return ResponseResult.success(employeeTrainingService.trainingListByShopId(shopId));
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user