考核培训状态

This commit is contained in:
bianyadong
2024-05-20 11:38:24 +08:00
parent aa93b87b6f
commit 24a0b567fc
2 changed files with 3 additions and 6 deletions

View File

@@ -77,11 +77,8 @@ public class EmployeeTrainingDAO {
} }
public Integer unCompleteNum(Long shopId) { public Integer unCompleteNum(Long shopId) {
List<Integer> statusList = new ArrayList<>();
statusList.add(0);
statusList.add(1);
Example example = new Example(EmployeeTrainingDO.class); Example example = new Example(EmployeeTrainingDO.class);
example.createCriteria().andIn("assessmentStatus", statusList).andEqualTo("shopId", shopId); example.createCriteria().andEqualTo("shopId", shopId).andCondition("theoreticalExamStatus != 1").andCondition("practical_exam_status != 1", 1);
return employeeTrainingMapper.selectCountByExample(example); return employeeTrainingMapper.selectCountByExample(example);
} }
} }

View File

@@ -649,10 +649,10 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService {
} }
if (employeeTrainingDO.getPracticalExamStatus() == CommonConstants.TWO || employeeTrainingDO.getTheoreticalExamStatus() == CommonConstants.TWO) { if (employeeTrainingDO.getPracticalExamStatus() == CommonConstants.TWO) {
employeeTrainingDO.setAssessmentStatus(CommonConstants.THREE); employeeTrainingDO.setAssessmentStatus(CommonConstants.THREE);
} }
if (employeeTrainingDO.getPracticalExamStatus() == 1 && employeeTrainingDO.getTheoreticalExamStatus() == 1) { if (employeeTrainingDO.getPracticalExamStatus() == 1) {
employeeTrainingDO.setAssessmentStatus(CommonConstants.TWO); employeeTrainingDO.setAssessmentStatus(CommonConstants.TWO);
} }
employeeTrainingDAO.updateByPrimaryKeySelective(employeeTrainingDO); employeeTrainingDAO.updateByPrimaryKeySelective(employeeTrainingDO);