培训返回值
This commit is contained in:
@@ -1,13 +1,16 @@
|
|||||||
package com.cool.store.dao;
|
package com.cool.store.dao;
|
||||||
|
|
||||||
|
import com.cool.store.entity.AssessmentDataDO;
|
||||||
import com.cool.store.entity.EmployeeTrainingDO;
|
import com.cool.store.entity.EmployeeTrainingDO;
|
||||||
import com.cool.store.mapper.EmployeeTrainingMapper;
|
import com.cool.store.mapper.EmployeeTrainingMapper;
|
||||||
import com.cool.store.vo.EmployeeTrainingVO;
|
import com.cool.store.vo.EmployeeTrainingVO;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
import tk.mybatis.mapper.entity.Example;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -64,4 +67,14 @@ public class EmployeeTrainingDAO {
|
|||||||
return employeeTrainingMapper.assessmentUserList(name, practicalAssessmentUserId, assessmentStatus, estimatedAssessmentBeginTime,
|
return employeeTrainingMapper.assessmentUserList(name, practicalAssessmentUserId, assessmentStatus, estimatedAssessmentBeginTime,
|
||||||
estimatedAssessmentEndTime, actualAssessmentBeginTime, actualAssessmentEndTime);
|
estimatedAssessmentEndTime, actualAssessmentBeginTime, actualAssessmentEndTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<EmployeeTrainingDO> theoreticalList() {
|
||||||
|
List<Integer> statusList = new ArrayList<>();
|
||||||
|
statusList.add(2);
|
||||||
|
statusList.add(3);
|
||||||
|
Example example = new Example(EmployeeTrainingDO.class);
|
||||||
|
example.createCriteria().andCondition("assessment_num = assessment_total_num").andEqualTo("theoretical_exam_status", 0)
|
||||||
|
.andIn("assessment_status", statusList);
|
||||||
|
return employeeTrainingMapper.selectByExample(example);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,6 +115,7 @@
|
|||||||
u.shop_id as shopId,
|
u.shop_id as shopId,
|
||||||
s.shop_name as shopName,
|
s.shop_name as shopName,
|
||||||
u.id_card as idCard,
|
u.id_card as idCard,
|
||||||
|
u.register_time as registerTime,
|
||||||
e.id as employeeTrainingId,
|
e.id as employeeTrainingId,
|
||||||
e.training_store_id as trainingStoreId,
|
e.training_store_id as trainingStoreId,
|
||||||
e.training_teacher_user_id as trainingTeacherUserId,
|
e.training_teacher_user_id as trainingTeacherUserId,
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ public class EmployeeTrainingVO {
|
|||||||
@ApiModelProperty("实操考试分值")
|
@ApiModelProperty("实操考试分值")
|
||||||
private Integer practicalExamScore;
|
private Integer practicalExamScore;
|
||||||
|
|
||||||
@ApiModelProperty("考核状态 0-培训中 1-带考核 2-考核通过 3-考核不通过")
|
@ApiModelProperty("考核状态 -1 未开始 0-培训中 1-带考核 2-考核通过 3-考核不通过")
|
||||||
private Integer assessmentStatus;
|
private Integer assessmentStatus;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -265,7 +265,10 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService {
|
|||||||
list.forEach(item -> {
|
list.forEach(item -> {
|
||||||
item.setTrainingStoreName(storeNameMap.get(item.getTrainingStoreId()));
|
item.setTrainingStoreName(storeNameMap.get(item.getTrainingStoreId()));
|
||||||
item.setRegionNodeName(regionNameMap.get(item.getRegionId()));
|
item.setRegionNodeName(regionNameMap.get(item.getRegionId()));
|
||||||
|
if(item.getAssessmentStatus() == null){
|
||||||
|
//培训未开始
|
||||||
|
item.setAssessmentStatus(-1);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ public class TempUserDetailServiceImpl implements TempUserDetailService {
|
|||||||
tempUserDetailDO.setIdCardNegativeUrl(tempUserDetailRequest.getEmblemPhoto());
|
tempUserDetailDO.setIdCardNegativeUrl(tempUserDetailRequest.getEmblemPhoto());
|
||||||
tempUserDetailDO.setIdCardPositiveUrl(tempUserDetailRequest.getIdNumPhoto());
|
tempUserDetailDO.setIdCardPositiveUrl(tempUserDetailRequest.getIdNumPhoto());
|
||||||
tempUserDetailDO.setHealthCertificateUrl(tempUserDetailRequest.getHealthCertificate());
|
tempUserDetailDO.setHealthCertificateUrl(tempUserDetailRequest.getHealthCertificate());
|
||||||
tempUserDetailDO.setRegisterTime(new Date());
|
tempUserDetailDO.setRegisterTime(tempUserDetailRequest.getRegisterTime());
|
||||||
tempUserDetailDO.setSubmitTime(new Date());
|
tempUserDetailDO.setSubmitTime(new Date());
|
||||||
tempUserDetailDO.setSource("create");
|
tempUserDetailDO.setSource("create");
|
||||||
tempUserDetailDAO.insertSelective(tempUserDetailDO);
|
tempUserDetailDAO.insertSelective(tempUserDetailDO);
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ public class VodServiceImpl implements VodService {
|
|||||||
smallVideoDTO.setVideoUrlBefore(smallVideoDTO.getVideoUrlBefore().replace("http://", "https://"));
|
smallVideoDTO.setVideoUrlBefore(smallVideoDTO.getVideoUrlBefore().replace("http://", "https://"));
|
||||||
}
|
}
|
||||||
SmallVideoParam smallVideoParam = JSONObject.parseObject(notCompleteCache, SmallVideoParam.class);
|
SmallVideoParam smallVideoParam = JSONObject.parseObject(notCompleteCache, SmallVideoParam.class);
|
||||||
if (UploadTypeEnum.TB_DATA_STA_TABLE_COLUMN.getValue().equals(smallVideoParam.getUploadType())) {
|
if (UploadTypeEnum.ASSESSMENT_DATA_CONTENT.getValue().equals(smallVideoParam.getUploadType())) {
|
||||||
//检查项提交
|
//检查项提交
|
||||||
dealVideo(smallVideoDTO, smallVideoParam);
|
dealVideo(smallVideoDTO, smallVideoParam);
|
||||||
//保存完删除缓存
|
//保存完删除缓存
|
||||||
|
|||||||
@@ -4,13 +4,11 @@ import cn.hutool.core.date.DateUtil;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.cool.store.constants.CommonConstants;
|
import com.cool.store.constants.CommonConstants;
|
||||||
import com.cool.store.dao.*;
|
import com.cool.store.dao.*;
|
||||||
|
import com.cool.store.dto.StaffExamInfoDTO;
|
||||||
import com.cool.store.dto.decoration.ConstructionScheduleDTO;
|
import com.cool.store.dto.decoration.ConstructionScheduleDTO;
|
||||||
import com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO;
|
import com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO;
|
||||||
import com.cool.store.dto.xfsgFirstOderDTO;
|
import com.cool.store.dto.xfsgFirstOderDTO;
|
||||||
import com.cool.store.entity.AcceptanceInfoDO;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.entity.LeaseBaseInfoDO;
|
|
||||||
import com.cool.store.entity.LineInterviewDO;
|
|
||||||
import com.cool.store.entity.ShopStageInfoDO;
|
|
||||||
import com.cool.store.enums.*;
|
import com.cool.store.enums.*;
|
||||||
import com.cool.store.enums.point.ShopSubStageEnum;
|
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||||
@@ -23,6 +21,7 @@ import com.cool.store.response.xfsgFirstOderListResponse;
|
|||||||
import com.cool.store.service.CoolStoreStartFlowService;
|
import com.cool.store.service.CoolStoreStartFlowService;
|
||||||
import com.cool.store.service.DecorationService;
|
import com.cool.store.service.DecorationService;
|
||||||
import com.cool.store.service.PreparationService;
|
import com.cool.store.service.PreparationService;
|
||||||
|
import com.cool.store.service.XfsgEhrService;
|
||||||
import com.cool.store.service.impl.CommonService;
|
import com.cool.store.service.impl.CommonService;
|
||||||
import com.cool.store.utils.poi.DateUtils;
|
import com.cool.store.utils.poi.DateUtils;
|
||||||
import com.cool.store.utils.poi.StringUtils;
|
import com.cool.store.utils.poi.StringUtils;
|
||||||
@@ -76,6 +75,14 @@ public class XxlJobHandler {
|
|||||||
private DecorationService decorationService;
|
private DecorationService decorationService;
|
||||||
@Resource
|
@Resource
|
||||||
private CommonService commonService;
|
private CommonService commonService;
|
||||||
|
@Resource
|
||||||
|
private EmployeeTrainingDAO employeeTrainingDAO;
|
||||||
|
@Resource
|
||||||
|
private XfsgEhrService xfsgEhrService;
|
||||||
|
@Resource
|
||||||
|
private TempUserDetailDAO tempUserDetailDAO;
|
||||||
|
@Resource
|
||||||
|
private EnterpriseUserDAO enterpriseUserDAO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 每天都将待体验门店信息变更到体验中
|
* 每天都将待体验门店信息变更到体验中
|
||||||
@@ -266,4 +273,30 @@ public class XxlJobHandler {
|
|||||||
XxlJobHelper.handleSuccess();
|
XxlJobHelper.handleSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@XxlJob("theoreticalExam")
|
||||||
|
public void theoreticalExam() {
|
||||||
|
log.info("------理论考试更新------");
|
||||||
|
List<EmployeeTrainingDO> theoreticalList = employeeTrainingDAO.theoreticalList();
|
||||||
|
if (CollectionUtils.isEmpty(theoreticalList)) {
|
||||||
|
log.info("------今日没有待更新数据------");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for (EmployeeTrainingDO employeeTrainingDO : theoreticalList) {
|
||||||
|
TempUserDetailDO tempUserDetailDO = tempUserDetailDAO.selectById(employeeTrainingDO.getXfsgUserDetailId());
|
||||||
|
|
||||||
|
EnterpriseUserDO enterpriseUserDO = enterpriseUserDAO.getUserInfoByThirdOaUniqueFlag(tempUserDetailDO.getIdCard());
|
||||||
|
//查询理论分支并更新
|
||||||
|
StaffExamInfoDTO staffExamInfoDTO = xfsgEhrService.getUserExamInfo(enterpriseUserDO.getJobnumber());
|
||||||
|
if (staffExamInfoDTO != null && StringUtils.isNotBlank(staffExamInfoDTO.getExamResult())
|
||||||
|
&& StringUtils.isNotBlank(staffExamInfoDTO.getExamScore())) {
|
||||||
|
|
||||||
|
employeeTrainingDO.setTheoreticalExamScore(StringUtils.isNotBlank(staffExamInfoDTO.getExamScore()) ? Integer.valueOf(staffExamInfoDTO.getExamScore()) : null);
|
||||||
|
employeeTrainingDO.setTheoreticalExamStatus(ExamStatusEnum.matchCodeByDesc(staffExamInfoDTO.getExamResult()));
|
||||||
|
employeeTrainingDAO.updateByPrimaryKeySelective(employeeTrainingDO);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
XxlJobHelper.handleSuccess();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user