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