| | |
| | | package com.ruoyi.personnel.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.deepoove.poi.data.PictureRenderData; |
| | | import com.ruoyi.personnel.pojo.PersonTrainingDetailed; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @ApiModelProperty("培训讲师名称") |
| | | private String trainingLecturerName; |
| | | |
| | | @ApiModelProperty("培训老师地址") |
| | | private String trainingLecturerSignatureUrl; |
| | | |
| | | @ApiModelProperty("培训老师地址流") |
| | | private PictureRenderData trainingLecturerRender; |
| | | |
| | | @ApiModelProperty("当前登录人是否认领") |
| | | private Boolean whetherClaim; |
| | | |
| | |
| | | package com.ruoyi.personnel.dto; |
| | | |
| | | import com.deepoove.poi.data.PictureRenderData; |
| | | import com.ruoyi.personnel.pojo.PersonTrainingRecord; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | |
| | | @ApiModelProperty(value = "部门") |
| | | private String department; |
| | | |
| | | @ApiModelProperty("培训人员图片") |
| | | private String signatureUrl; |
| | | } |
| | |
| | | package com.ruoyi.personnel.dto; |
| | | |
| | | import com.deepoove.poi.data.PictureRenderData; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | |
| | | public class TrainingRecordExportDto { |
| | | |
| | | @ApiModelProperty("用户名称1") |
| | | private String userName1; |
| | | private PictureRenderData userNameRender1; |
| | | |
| | | @ApiModelProperty("部门1") |
| | | private String department1; |
| | |
| | | private String examinationResults1; |
| | | |
| | | @ApiModelProperty("用户名称2") |
| | | private String userName2; |
| | | private PictureRenderData userNameRender2; |
| | | |
| | | @ApiModelProperty("部门1") |
| | | private String department2; |
| | |
| | | private String examinationResults2; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | // 查询人员培训明细 |
| | | PersonTrainingDetailedDto detailedDto = personTrainingDetailedMapper.selectTrainingDetail(id); |
| | | |
| | | // 生成培训老师签名 |
| | | detailedDto.setTrainingLecturerRender(StringUtils.isNotBlank(detailedDto.getTrainingLecturerSignatureUrl()) |
| | | ? Pictures.ofLocal(imgUrl + "/" + detailedDto.getTrainingLecturerSignatureUrl()).create() : null); |
| | | |
| | | // 查询培训的人员 |
| | | List<PersonTrainingRecordDto> recordDtos = personTrainingRecordMapper.selectListByTrainingDetailedId(id); |
| | | |
| | |
| | | for (PersonTrainingRecordDto recordDto : recordDtos) { |
| | | switch (count) { |
| | | case 0: |
| | | exportDto.setUserName1(recordDto.getUserName()); |
| | | exportDto.setUserNameRender1(StringUtils.isNotBlank(recordDto.getSignatureUrl()) |
| | | ? Pictures.ofLocal(imgUrl + "/" + recordDto.getSignatureUrl()).create() : null); |
| | | exportDto.setDepartment1(recordDto.getDepartment()); |
| | | exportDto.setExaminationResults1(recordDto.getExaminationResults()); |
| | | count ++; |
| | | break; |
| | | case 1: |
| | | exportDto.setUserName2(recordDto.getUserName()); |
| | | exportDto.setUserNameRender2(StringUtils.isNotBlank(recordDto.getSignatureUrl()) |
| | | ? Pictures.ofLocal(imgUrl + "/" + recordDto.getSignatureUrl()).create() : null); |
| | | exportDto.setDepartment2(recordDto.getDepartment()); |
| | | exportDto.setExaminationResults2(recordDto.getExaminationResults()); |
| | | exportDtoList.add(exportDto); |
| | |
| | | <!-- 查询详细 --> |
| | | <select id="selectTrainingDetail" resultType="com.ruoyi.personnel.dto.PersonTrainingDetailedDto"> |
| | | SELECT cptd.*, |
| | | u1.name training_lecturer_name |
| | | u1.name training_lecturer_name, |
| | | u1.signature_url training_lecturer_signature_url |
| | | FROM cnas_person_training_detailed cptd |
| | | left join user u1 on cptd.training_lecturer_id = u1.id |
| | | where cptd.id = #{id} |
| | |
| | | <select id="selectListByTrainingDetailedId" resultType="com.ruoyi.personnel.dto.PersonTrainingRecordDto"> |
| | | select cptr.*, |
| | | u.name userName, |
| | | dl.name department |
| | | dl.name department, |
| | | u.signature_url |
| | | from cnas_person_training_record cptr |
| | | left join user u on u.id = cptr.user_id |
| | | left join department_lims dl on find_in_set(dl.id, u.depart_lims_id) and dl.id != 1 |
| | |
| | | |
| | | // 添加工时 |
| | | // 判断是否只是参与计算值, 参与计算值实际没有填写 |
| | | InsProduct finalInsProduct = insProductMapper.selectById(product.getId()); |
| | | InsOrder insOrder = insOrderMapper.selectById(insSample.getInsOrderId()); |
| | | if (StringUtils.isNotBlank(newResult.getInsValue()) && !newResult.getInsValue().equals("[]")) { |
| | | threadPoolTaskExecutor.execute(() -> { |
| | | InsProduct finalInsProduct = insProductMapper.selectById(product.getId()); |
| | | InsOrder insOrder = insOrderMapper.selectById(insSample.getInsOrderId()); |
| | | this.addAuxiliary(userId, finalInsProduct, insOrder); |
| | | }); |
| | | } else { |
| | | // 判断是否是没有检验值的内容 |
| | | if (saveInsContextDto.getIsNoTestValue() != null && saveInsContextDto.getIsNoTestValue() == 1) { |
| | | threadPoolTaskExecutor.execute(() -> { |
| | | InsProduct finalInsProduct = insProductMapper.selectById(product.getId()); |
| | | InsOrder insOrder = insOrderMapper.selectById(insSample.getInsOrderId()); |
| | | this.addAuxiliary(userId, finalInsProduct, insOrder); |
| | | }); |
| | | } |