| | |
| | | import java.util.Optional; |
| | | |
| | | import cc.mrbird.febs.common.core.constant.DicCode; |
| | | import cc.mrbird.febs.common.core.entity.system.Dept; |
| | | import cc.mrbird.febs.common.core.entity.system.DicItem; |
| | | import cc.mrbird.febs.common.core.utils.CastUtil; |
| | | import cc.mrbird.febs.common.redis.service.RedisService; |
| | |
| | | import cc.mrbird.febs.server.hr.entity.EmpPhysicalExam; |
| | | import cc.mrbird.febs.server.hr.mapper.EmpPhysicalExamMapper; |
| | | import cc.mrbird.febs.server.hr.service.IEmpPhysicalExamService; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import lombok.RequiredArgsConstructor; |
| | | |
| | | /** |
| | |
| | | List<String> list = new ArrayList<>(Arrays.asList(str)); |
| | | return empPhysicalexamMapper.momentToNormal(list, operatorId) > 0; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void importEmpPhysicalExam(List<List<Object>> listObject) { |
| | | for (List<Object> list : listObject) { |
| | | EmpPhysicalExam physicalExam = new EmpPhysicalExam(); |
| | | physicalExam.setPhysicalExamId(SequenceUtil.generateId(0L, ModuleCode.HR_EMPLOYEE)); |
| | | physicalExam.setEmpNumb(list.get(0).toString()); |
| | | physicalExam.setDeptName(list.get(1).toString()); |
| | | List<Dept> depts = CastUtil.castList(redisService.get("depts"), Dept.class); |
| | | Long deptId = depts.stream().filter(d -> d.getDeptName().equals(list.get(1).toString())).findFirst().get() |
| | | .getDeptId(); |
| | | physicalExam.setDeptId(deptId); |
| | | physicalExam.setJobName(list.get(2).toString()); |
| | | physicalExam.setEmpName(list.get(3).toString()); |
| | | physicalExam.setCertificateNumb(list.get(4).toString()); |
| | | physicalExam.setSex("男".equals(list.get(5).toString()) ? "1" : "2"); |
| | | physicalExam.setHospital(list.get(6).toString()); |
| | | if (StringUtils.isNotBlank(list.get(7).toString())) { |
| | | physicalExam.setPhysicalExamDate(DateUtil.parseDate(list.get(7).toString())); |
| | | } |
| | | physicalExam.setPhysicalExamType(list.get(8).toString()); |
| | | physicalExam.setBloodPressure(list.get(9).toString()); |
| | | physicalExam.setTransaminase(list.get(10).toString()); |
| | | physicalExam.setEcg(list.get(11).toString()); |
| | | physicalExam.setConclusion(list.get(12).toString()); |
| | | physicalExam.setReviewRecord(list.get(13).toString()); |
| | | physicalExam.setRemark(list.get(14).toString()); |
| | | this.save(physicalExam); |
| | | } |
| | | } |
| | | } |