| | |
| | | } |
| | | |
| | | @PostMapping("outOfFocusPreservation") |
| | | @ValueAuth |
| | | public Result<?> outOfFocusPreservation(@RequestBody PersonTrainingRecord personTrainingRecord) { |
| | | personTrainingRecordService.updateById(personTrainingRecord); |
| | | return Result.success(); |
| | |
| | | private String proposingDepartmentDateString; |
| | | |
| | | @ApiModelProperty("2 原因分析 部门") |
| | | private String causeAnalysis; |
| | | private String causeAnalysisDepartment; |
| | | |
| | | @ApiModelProperty("2 原因分析 日期") |
| | | private String causeAnalysisDateString; |
| | |
| | | cpbi.highest_degree highestDegree, |
| | | cpbi.professional_title professionalTitle, |
| | | cpbi.emergency_contact emergencyContact, |
| | | cpbi.emergency_contact_phone emergencyContactPhone, |
| | | group_concat( DISTINCT technical_post SEPARATOR ',') technicalPost |
| | | cpbi.emergency_contact_phone emergencyContactPhone |
| | | from user u |
| | | left join cnas_person_basic_info cpbi on cpbi.user_id = u.id |
| | | left join cnas_person_personnel_capacity cppc on u.id = cppc.user_id |
| | | left join user u1 on u1.id = u.create_user |
| | | <where> |
| | | FIND_IN_SET(#{departmentId},u.depart_lims_id) |
| | |
| | | <select id="selectExportPersonnelCapacity" |
| | | resultType="com.yuanchu.mom.dto.PersonPersonnelCapacityExportDto"> |
| | | select cppc.*, |
| | | cpbi.post postName, |
| | | cpbi.post_name postName, |
| | | u1.name userName, |
| | | cpbi.official_academic_redentials, |
| | | cpbi.major1, |
| | |
| | | else '□' end whetherResumeWorkNo |
| | | from cnas_person_supervision_control_sheet scs |
| | | left join user u1 on u1.id = scs.department_head_id -- 部门负责人 |
| | | left join department_lims dl1 on find_in_set(dl1.id, u1.depart_lims_id) and dl1.id != 1 |
| | | left join department_lims dl1 on dl1.id = SUBSTRING_INDEX(SUBSTRING_INDEX(u1.depart_lims_id, ',', -2), ',', 1) and dl1.id != 1 |
| | | left join user u2 on u2.id = scs.discoverer_id -- 发现部门 |
| | | left join department_lims dl2 on find_in_set(dl2.id, u2.depart_lims_id) and dl2.id != 1 |
| | | left join department_lims dl2 on dl2.id = SUBSTRING_INDEX(SUBSTRING_INDEX(u2.depart_lims_id, ',', -2), ',', 1) and dl2.id != 1 |
| | | left join user u3 on u3.id = scs.supervised_person_id -- 被监督人 |
| | | left join user u4 on u4.id = scs.responsible_department_person_id -- 责任部门 |
| | | left join department_lims dl4 on find_in_set(dl4.id, u4.depart_lims_id) and dl4.id != 1 |
| | | left join department_lims dl4 on dl4.id = SUBSTRING_INDEX(SUBSTRING_INDEX(u4.depart_lims_id, ',', -2), ',', 1) and dl4.id != 1 |
| | | where scs.supervision_record_id = #{supervisionRecordId} |
| | | </select> |
| | | </mapper> |
| | |
| | | <select id="selectProcessingSheet" resultType="com.yuanchu.mom.dto.PersonSupervisionProcessingSheetDto"> |
| | | select sps.*, |
| | | dl1.name proposing_department, |
| | | dl2.name cause_analysis, |
| | | dl2.name causeAnalysisDepartment, |
| | | dl3.name corrective_action, |
| | | dl4.name verification_department, |
| | | DATE_FORMAT(sps.proposing_department_date, '%Y-%m-%d') AS proposing_department_date_string, |
| | |
| | | left join user u2 on u2.id = sps.cause_analysis_person_id |
| | | left join user u3 on u3.id = sps.corrective_action_id |
| | | left join user u4 on u4.id = sps.verification_department_person_id |
| | | left join department_lims dl1 on find_in_set(dl1.id, u1.depart_lims_id) and dl1.id != 1 |
| | | left join department_lims dl2 on find_in_set(dl2.id, u2.depart_lims_id) and dl2.id != 1 |
| | | left join department_lims dl3 on find_in_set(dl3.id, u3.depart_lims_id) and dl3.id != 1 |
| | | left join department_lims dl4 on find_in_set(dl4.id, u4.depart_lims_id) and dl4.id != 1 |
| | | left join department_lims dl1 on dl1.id = SUBSTRING_INDEX(SUBSTRING_INDEX(u1.depart_lims_id, ',', -2), ',', 1) and dl1.id != 1 |
| | | left join department_lims dl2 on dl2.id = SUBSTRING_INDEX(SUBSTRING_INDEX(u2.depart_lims_id, ',', -2), ',', 1) and dl2.id != 1 |
| | | left join department_lims dl3 on dl3.id = SUBSTRING_INDEX(SUBSTRING_INDEX(u3.depart_lims_id, ',', -2), ',', 1) and dl3.id != 1 |
| | | left join department_lims dl4 on dl4.id = SUBSTRING_INDEX(SUBSTRING_INDEX(u4.depart_lims_id, ',', -2), ',', 1) and dl4.id != 1 |
| | | where sps.supervision_record_id = #{supervisionRecordId} |
| | | </select> |
| | | |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.yuanchu.mom.mapper.PersonSupervisionRecordMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.PersonSupervisionRecord"> |
| | | <id column="id" property="id" /> |
| | | <result column="tester_id" property="testerId" /> |
| | | <result column="supervisor_id" property="supervisorId" /> |
| | | <result column="test_item" property="testItem" /> |
| | | <result column="sample_number" property="sampleNumber" /> |
| | | <result column="detection_date" property="detectionDate" /> |
| | | <result column="personnel" property="personnel" /> |
| | | <result column="instrument_equipment" property="instrumentEquipment" /> |
| | | <result column="working_environment" property="workingEnvironment" /> |
| | | <result column="sample_collection" property="sampleCollection" /> |
| | | <result column="sample_preparation" property="samplePreparation" /> |
| | | <result column="test_method" property="testMethod" /> |
| | | <result column="test_report" property="testReport" /> |
| | | <result column="evaluation_supervision_situation" property="evaluationSupervisionSituation" /> |
| | | <result column="do_not_meet_the_handling_opinions" property="doNotMeetTheHandlingOpinions" /> |
| | | <result column="technical_director" property="technicalDirector" /> |
| | | <result column="technical_director_date" property="technicalDirectorDate" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | <id column="id" property="id"/> |
| | | <result column="tester_id" property="testerId"/> |
| | | <result column="supervisor_id" property="supervisorId"/> |
| | | <result column="test_item" property="testItem"/> |
| | | <result column="sample_number" property="sampleNumber"/> |
| | | <result column="detection_date" property="detectionDate"/> |
| | | <result column="personnel" property="personnel"/> |
| | | <result column="instrument_equipment" property="instrumentEquipment"/> |
| | | <result column="working_environment" property="workingEnvironment"/> |
| | | <result column="sample_collection" property="sampleCollection"/> |
| | | <result column="sample_preparation" property="samplePreparation"/> |
| | | <result column="test_method" property="testMethod"/> |
| | | <result column="test_report" property="testReport"/> |
| | | <result column="evaluation_supervision_situation" property="evaluationSupervisionSituation"/> |
| | | <result column="do_not_meet_the_handling_opinions" property="doNotMeetTheHandlingOpinions"/> |
| | | <result column="technical_director" property="technicalDirector"/> |
| | | <result column="technical_director_date" property="technicalDirectorDate"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | <result column="create_user" property="createUser"/> |
| | | <result column="update_user" property="updateUser"/> |
| | | </resultMap> |
| | | |
| | | <select id="personSupervisionRecordPage" resultType="com.yuanchu.mom.dto.PersonSupervisionRecordDto"> |
| | |
| | | |
| | | <!-- 查询监督记录详情 --> |
| | | <select id="selectPersonSupervisionRecord" resultType="com.yuanchu.mom.dto.PersonSupervisionRecordDto"> |
| | | select cpsr.*, u1.name tester_name, u2.name supervisor_name, u3.name technical_director_name, |
| | | cp.personnel_name, cpscs.current_state current_state_control, cpsps.current_state current_state_processing |
| | | select cpsr.*, |
| | | date_format(detection_date, '%Y年%m月%d日') detectionDateString, |
| | | u1.name tester_name, |
| | | u2.name supervisor_name, |
| | | u3.name technical_director_name, |
| | | cp.personnel_name, |
| | | cpscs.current_state current_state_control, |
| | | cpsps.current_state current_state_processing |
| | | from cnas_person_supervision_record cpsr |
| | | left join user u1 on cpsr.tester_id = u1.id |
| | | left join user u2 on cpsr.supervisor_id = u2.id |
| | |
| | | </resultMap> |
| | | |
| | | <select id="personTrackRecordSelect" resultType="com.yuanchu.mom.pojo.PersonTrackRecord"> |
| | | select cpt.* |
| | | select cpt.*,name |
| | | from cnas_person_track_record cpt |
| | | left join user u on cpt.user_id = u.id |
| | | <where> |