修改bug

This commit is contained in:
bianyadong
2024-05-17 14:22:29 +08:00
parent 025d79056e
commit dc2a5c71ff
3 changed files with 8 additions and 9 deletions

View File

@@ -1,11 +1,9 @@
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.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.entity.Example; import tk.mybatis.mapper.entity.Example;
@@ -74,17 +72,17 @@ public class EmployeeTrainingDAO {
statusList.add(2); statusList.add(2);
statusList.add(3); statusList.add(3);
Example example = new Example(EmployeeTrainingDO.class); Example example = new Example(EmployeeTrainingDO.class);
example.createCriteria().andCondition("assessment_num = assessment_total_num").andEqualTo("theoretical_exam_status", 0) example.createCriteria().andCondition("assessment_num = assessment_total_num").andEqualTo("theoreticalExamStatus", 0)
.andIn("assessmentStatus", statusList); .andIn("assessmentStatus", statusList);
return employeeTrainingMapper.selectByExample(example); return employeeTrainingMapper.selectByExample(example);
} }
public Integer unCompleteNum() { public Integer unCompleteNum(Long shopId) {
List<Integer> statusList = new ArrayList<>(); List<Integer> statusList = new ArrayList<>();
statusList.add(0); statusList.add(0);
statusList.add(1); statusList.add(1);
Example example = new Example(EmployeeTrainingDO.class); Example example = new Example(EmployeeTrainingDO.class);
example.createCriteria().andIn("assessmentStatus", statusList); example.createCriteria().andIn("assessmentStatus", statusList).andEqualTo("shopId", shopId);
return employeeTrainingMapper.selectCountByExample(example); return employeeTrainingMapper.selectCountByExample(example);
} }
} }

View File

@@ -128,11 +128,12 @@
e.practical_assessment_user_id as practicalAssessmentUserId, e.practical_assessment_user_id as practicalAssessmentUserId,
e.assessment_num as assessmentNum, e.assessment_num as assessmentNum,
e.assessment_total_num as assessmentTotalNum, e.assessment_total_num as assessmentTotalNum,
e.theoretical_exam_status as theoreticalExamStatus, ifnull(e.theoretical_exam_status, 0) as theoreticalExamStatus,
e.theoretical_exam_score as theoreticalExamScore, e.theoretical_exam_score as theoreticalExamScore,
e.practical_exam_status as practicalExamStatus, ifnull(e.practical_exam_status,0 ) as practicalExamStatus,
e.practical_exam_score as practicalExamScore, e.practical_exam_score as practicalExamScore,
e.assessment_status as assessmentStatus ifnull(e.assessment_status,0) as assessmentStatus,
ifnull(e.assign_flag,0) as assignFlag
from xfsg_temp_user_detail u from xfsg_temp_user_detail u
left join xfsg_employee_training e on e.xfsg_user_detail_id = u.id left join xfsg_employee_training e on e.xfsg_user_detail_id = u.id
left join xfsg_shop_info s on s.id = u.shop_id left join xfsg_shop_info s on s.id = u.shop_id

View File

@@ -637,7 +637,7 @@ public class EmployeeTrainingServiceImpl implements EmployeeTrainingService {
employeeTrainingDAO.updateByPrimaryKeySelective(employeeTrainingDO); employeeTrainingDAO.updateByPrimaryKeySelective(employeeTrainingDO);
//查询员工是否全部培训完成 //查询员工是否全部培训完成
Integer unCompleteNum = employeeTrainingDAO.unCompleteNum(); Integer unCompleteNum = employeeTrainingDAO.unCompleteNum(tempUserDetailDO.getShopId());
if (unCompleteNum != null && unCompleteNum == 0) { if (unCompleteNum != null && unCompleteNum == 0) {
// 培训全部结束 // 培训全部结束