培训完成短信
This commit is contained in:
@@ -30,6 +30,7 @@ public enum SMSMsgEnum {
|
|||||||
DECORATION_MODEL_PAY("装修款待缴费", "","SMS_465961253"),
|
DECORATION_MODEL_PAY("装修款待缴费", "","SMS_465961253"),
|
||||||
THREE_ACCEPTANCE_WAIT("三方验收待验收","","SMS_465961257"),
|
THREE_ACCEPTANCE_WAIT("三方验收待验收","","SMS_465961257"),
|
||||||
TRAINING_REGISTER_SUCCESS("培训登记中", "", "SMS_466035101"),
|
TRAINING_REGISTER_SUCCESS("培训登记中", "", "SMS_466035101"),
|
||||||
|
TRAINING_ASSESSMENT_SUCCESS("员工培训已完成", "", "SMS_465901266"),
|
||||||
;
|
;
|
||||||
|
|
||||||
private String title;
|
private String title;
|
||||||
|
|||||||
@@ -77,4 +77,13 @@ public class EmployeeTrainingDAO {
|
|||||||
.andIn("assessment_status", statusList);
|
.andIn("assessment_status", statusList);
|
||||||
return employeeTrainingMapper.selectByExample(example);
|
return employeeTrainingMapper.selectByExample(example);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer unCompleteNum() {
|
||||||
|
List<Integer> statusList = new ArrayList<>();
|
||||||
|
statusList.add(0);
|
||||||
|
statusList.add(1);
|
||||||
|
Example example = new Example(EmployeeTrainingDO.class);
|
||||||
|
example.createCriteria().andIn("assessment_status", statusList);
|
||||||
|
return employeeTrainingMapper.selectCountByExample(example);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,10 +9,7 @@ import com.cool.store.dto.SmallVideoInfoDTO;
|
|||||||
import com.cool.store.dto.StaffExamInfoDTO;
|
import com.cool.store.dto.StaffExamInfoDTO;
|
||||||
import com.cool.store.dto.openPreparation.PlanLineDTO;
|
import com.cool.store.dto.openPreparation.PlanLineDTO;
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.enums.AssessmentTemplateType;
|
import com.cool.store.enums.*;
|
||||||
import com.cool.store.enums.ExamStatusEnum;
|
|
||||||
import com.cool.store.enums.MessageEnum;
|
|
||||||
import com.cool.store.enums.UserRoleEnum;
|
|
||||||
import com.cool.store.enums.video.ResourceStatusEnum;
|
import com.cool.store.enums.video.ResourceStatusEnum;
|
||||||
import com.cool.store.enums.video.UploadTypeEnum;
|
import com.cool.store.enums.video.UploadTypeEnum;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
@@ -554,7 +551,7 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService {
|
|||||||
}
|
}
|
||||||
EmployeeTrainingDO employeeTrainingDO = employeeTrainingDAO.selectById(request.getEmployeeTrainingId());
|
EmployeeTrainingDO employeeTrainingDO = employeeTrainingDAO.selectById(request.getEmployeeTrainingId());
|
||||||
TempUserDetailDO tempUserDetailDO = tempUserDetailDAO.selectById(employeeTrainingDO.getXfsgUserDetailId());
|
TempUserDetailDO tempUserDetailDO = tempUserDetailDAO.selectById(employeeTrainingDO.getXfsgUserDetailId());
|
||||||
|
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(tempUserDetailDO.getShopId());
|
||||||
Boolean pass = true;
|
Boolean pass = true;
|
||||||
EnterpriseUserDO enterpriseUserDO = enterpriseUserDAO.getUserInfoByThirdOaUniqueFlag(tempUserDetailDO.getIdCard());
|
EnterpriseUserDO enterpriseUserDO = enterpriseUserDAO.getUserInfoByThirdOaUniqueFlag(tempUserDetailDO.getIdCard());
|
||||||
String userId = enterpriseUserDO.getUserId();
|
String userId = enterpriseUserDO.getUserId();
|
||||||
@@ -613,6 +610,16 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService {
|
|||||||
employeeTrainingDO.setAssessmentStatus(CommonConstants.TWO);
|
employeeTrainingDO.setAssessmentStatus(CommonConstants.TWO);
|
||||||
}
|
}
|
||||||
employeeTrainingDAO.updateByPrimaryKeySelective(employeeTrainingDO);
|
employeeTrainingDAO.updateByPrimaryKeySelective(employeeTrainingDO);
|
||||||
|
|
||||||
|
//查询员工是否全部培训完成
|
||||||
|
Integer unCompleteNum =employeeTrainingDAO.unCompleteNum();
|
||||||
|
if(unCompleteNum != null && unCompleteNum == 0){
|
||||||
|
// 培训全部结束
|
||||||
|
Map<String, String> messageMap = new HashMap<>();
|
||||||
|
messageMap.put("storeName", shopInfoDO.getShopName());
|
||||||
|
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(tempUserDetailDO.getLineId());
|
||||||
|
commonService.sendSms(lineInfoDO.getMobile(), SMSMsgEnum.TRAINING_ASSESSMENT_SUCCESS, messageMap);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkVideoHandel(List<AssessmentDataDO> assessmentDataDOList) {
|
private void checkVideoHandel(List<AssessmentDataDO> assessmentDataDOList) {
|
||||||
|
|||||||
Reference in New Issue
Block a user