| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359 |
- <?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.sundot.airport.personnel.mapper.PersonnelNonCadreMonthlyAssessmentMapper">
- <resultMap type="PersonnelNonCadreMonthlyAssessment" id="PersonnelNonCadreMonthlyAssessmentResult">
- <result property="tenantId" column="tenant_id"/>
- <result property="revision" column="revision"/>
- <result property="createBy" column="create_by"/>
- <result property="createTime" column="create_time"/>
- <result property="updateBy" column="update_by"/>
- <result property="updateTime" column="update_time"/>
- <result property="remark" column="remark"/>
- <result property="id" column="id"/>
- <result property="assessmentMonth" column="assessment_month"/>
- <result property="userId" column="user_id"/>
- <result property="userName" column="user_name"/>
- <result property="roleId" column="role_id"/>
- <result property="roleKey" column="role_key"/>
- <result property="roleName" column="role_name"/>
- <result property="employmentType" column="employment_type"/>
- <result property="assessmentTeam" column="assessment_team"/>
- <result property="post" column="post"/>
- <result property="deputyTeamLeaderId" column="deputy_team_leader_id"/>
- <result property="deputyTeamLeaderName" column="deputy_team_leader_name"/>
- <result property="deputySupervisorId" column="deputy_supervisor_id"/>
- <result property="deputySupervisorName" column="deputy_supervisor_name"/>
- <result property="deputyManagerId" column="deputy_manager_id"/>
- <result property="deputyManagerName" column="deputy_manager_name"/>
- <result property="redLineIndexTriggerCount" column="red_line_index_trigger_count"/>
- <result property="coreIndexScore" column="core_index_score"/>
- <result property="otherIndexScore" column="other_index_score"/>
- <result property="otherIndexSafetyScoreWithSocStationQcDeduction"
- column="other_index_safety_score_with_soc_station_qc_deduction"/>
- <result property="otherIndexSafetyScoreWithoutSocStationQcDeduction"
- column="other_index_safety_score_without_soc_station_qc_deduction"/>
- <result property="otherIndexNonSafetyDeduction" column="other_index_non_safety_deduction"/>
- <result property="nonCoreSafetyPlusCoreDeduction" column="non_core_safety_plus_core_deduction"/>
- <result property="socStationQcInvolvedCoreSafetyDeduction"
- column="soc_station_qc_involved_core_safety_deduction"/>
- <result property="inChargeEmployeeCount" column="in_charge_employee_count"/>
- <result property="deductionAverage" column="deduction_average"/>
- <result property="totalScore" column="total_score"/>
- <result property="rewardAmount" column="reward_amount"/>
- <result property="punishmentAmount" column="punishment_amount"/>
- <result property="assessmentResult" column="assessment_result"/>
- <result property="assessmentResultRemark" column="assessment_result_remark"/>
- <result property="applicationMethod" column="application_method"/>
- <result property="applicationMethodRemark" column="application_method_remark"/>
- <result property="exemption" column="exemption"/>
- <result property="exemptionReasonRemark" column="exemption_reason_remark"/>
- </resultMap>
- <sql id="selectPersonnelNonCadreMonthlyAssessmentVo">
- select tenant_id,
- revision,
- create_by,
- create_time,
- update_by,
- update_time,
- remark,
- id,
- assessment_month,
- user_id,
- user_name,
- role_id,
- role_key,
- role_name,
- employment_type,
- assessment_team,
- post,
- deputy_team_leader_id,
- deputy_team_leader_name,
- deputy_supervisor_id,
- deputy_supervisor_name,
- deputy_manager_id,
- deputy_manager_name,
- red_line_index_trigger_count,
- core_index_score,
- other_index_score,
- other_index_safety_score_with_soc_station_qc_deduction,
- other_index_safety_score_without_soc_station_qc_deduction,
- other_index_non_safety_deduction,
- non_core_safety_plus_core_deduction,
- soc_station_qc_involved_core_safety_deduction,
- in_charge_employee_count,
- deduction_average,
- total_score,
- reward_amount,
- punishment_amount,
- assessment_result,
- assessment_result_remark,
- application_method,
- application_method_remark,
- exemption,
- exemption_reason_remark
- from personnel_non_cadre_monthly_assessment
- </sql>
- <select id="selectPersonnelNonCadreMonthlyAssessmentList" parameterType="PersonnelNonCadreMonthlyAssessment"
- resultMap="PersonnelNonCadreMonthlyAssessmentResult">
- <include refid="selectPersonnelNonCadreMonthlyAssessmentVo"/>
- <where>
- <if test="tenantId != null and tenantId != ''">and tenant_id = #{tenantId}</if>
- <if test="revision != null ">and revision = #{revision}</if>
- <if test="assessmentMonth != null and assessmentMonth != ''">and assessment_month = #{assessmentMonth}</if>
- <if test="userId != null ">and user_id = #{userId}</if>
- <if test="userName != null and userName != ''">and user_name like concat('%', #{userName}, '%')</if>
- <if test="roleId != null ">and role_id = #{roleId}</if>
- <if test="roleKey != null and roleKey != ''">and role_key = #{roleKey}</if>
- <if test="roleName != null and roleName != ''">and role_name like concat('%', #{roleName}, '%')</if>
- <if test="employmentType != null and employmentType != ''">and employment_type = #{employmentType}</if>
- <if test="assessmentTeam != null and assessmentTeam != ''">and assessment_team = #{assessmentTeam}</if>
- <if test="post != null and post != ''">and post = #{post}</if>
- <if test="deputyTeamLeaderId != null ">and deputy_team_leader_id = #{deputyTeamLeaderId}</if>
- <if test="deputyTeamLeaderName != null and deputyTeamLeaderName != ''">and deputy_team_leader_name like
- concat('%', #{deputyTeamLeaderName}, '%')
- </if>
- <if test="deputySupervisorId != null ">and deputy_supervisor_id = #{deputySupervisorId}</if>
- <if test="deputySupervisorName != null and deputySupervisorName != ''">and deputy_supervisor_name like
- concat('%', #{deputySupervisorName}, '%')
- </if>
- <if test="deputyManagerId != null ">and deputy_manager_id = #{deputyManagerId}</if>
- <if test="deputyManagerName != null and deputyManagerName != ''">and deputy_manager_name like concat('%',
- #{deputyManagerName}, '%')
- </if>
- <if test="redLineIndexTriggerCount != null ">and red_line_index_trigger_count =
- #{redLineIndexTriggerCount}
- </if>
- <if test="coreIndexScore != null ">and core_index_score = #{coreIndexScore}</if>
- <if test="otherIndexScore != null ">and other_index_score = #{otherIndexScore}</if>
- <if test="otherIndexSafetyScoreWithSocStationQcDeduction != null ">and
- other_index_safety_score_with_soc_station_qc_deduction =
- #{otherIndexSafetyScoreWithSocStationQcDeduction}
- </if>
- <if test="otherIndexSafetyScoreWithoutSocStationQcDeduction != null ">and
- other_index_safety_score_without_soc_station_qc_deduction =
- #{otherIndexSafetyScoreWithoutSocStationQcDeduction}
- </if>
- <if test="otherIndexNonSafetyDeduction != null ">and other_index_non_safety_deduction =
- #{otherIndexNonSafetyDeduction}
- </if>
- <if test="nonCoreSafetyPlusCoreDeduction != null ">and non_core_safety_plus_core_deduction =
- #{nonCoreSafetyPlusCoreDeduction}
- </if>
- <if test="socStationQcInvolvedCoreSafetyDeduction != null ">and
- soc_station_qc_involved_core_safety_deduction = #{socStationQcInvolvedCoreSafetyDeduction}
- </if>
- <if test="inChargeEmployeeCount != null ">and in_charge_employee_count = #{inChargeEmployeeCount}</if>
- <if test="deductionAverage != null ">and deduction_average = #{deductionAverage}</if>
- <if test="totalScore != null ">and total_score = #{totalScore}</if>
- <if test="rewardAmount != null ">and reward_amount = #{rewardAmount}</if>
- <if test="punishmentAmount != null ">and punishment_amount = #{punishmentAmount}</if>
- <if test="assessmentResult != null and assessmentResult != ''">and assessment_result =
- #{assessmentResult}
- </if>
- <if test="assessmentResultRemark != null and assessmentResultRemark != ''">and assessment_result_remark =
- #{assessmentResultRemark}
- </if>
- <if test="applicationMethod != null and applicationMethod != ''">and application_method =
- #{applicationMethod}
- </if>
- <if test="applicationMethodRemark != null and applicationMethodRemark != ''">and application_method_remark
- = #{applicationMethodRemark}
- </if>
- <if test="exemption != null and exemption != ''">and exemption = #{exemption}</if>
- <if test="exemptionReasonRemark != null and exemptionReasonRemark != ''">and exemption_reason_remark =
- #{exemptionReasonRemark}
- </if>
- <if test="assessmentMonthStart != null">
- and assessment_month >= #{assessmentMonthStart}
- </if>
- <if test="assessmentMonthEnd != null">
- and assessment_month <![CDATA[ <= ]]> #{assessmentMonthEnd}
- </if>
- </where>
- order by create_time desc
- </select>
- <select id="selectPersonnelNonCadreMonthlyAssessmentById" parameterType="Long"
- resultMap="PersonnelNonCadreMonthlyAssessmentResult">
- <include refid="selectPersonnelNonCadreMonthlyAssessmentVo"/>
- where id = #{id}
- </select>
- <insert id="insertPersonnelNonCadreMonthlyAssessment" parameterType="PersonnelNonCadreMonthlyAssessment"
- useGeneratedKeys="true" keyProperty="id">
- insert into personnel_non_cadre_monthly_assessment
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="tenantId != null">tenant_id,</if>
- <if test="revision != null">revision,</if>
- <if test="createBy != null">create_by,</if>
- <if test="createTime != null">create_time,</if>
- <if test="updateBy != null">update_by,</if>
- <if test="updateTime != null">update_time,</if>
- <if test="remark != null">remark,</if>
- <if test="assessmentMonth != null and assessmentMonth != ''">assessment_month,</if>
- <if test="userId != null">user_id,</if>
- <if test="userName != null and userName != ''">user_name,</if>
- <if test="roleId != null">role_id,</if>
- <if test="roleKey != null and roleKey != ''">role_key,</if>
- <if test="roleName != null and roleName != ''">role_name,</if>
- <if test="employmentType != null">employment_type,</if>
- <if test="assessmentTeam != null">assessment_team,</if>
- <if test="post != null">post,</if>
- <if test="deputyTeamLeaderId != null">deputy_team_leader_id,</if>
- <if test="deputyTeamLeaderName != null">deputy_team_leader_name,</if>
- <if test="deputySupervisorId != null">deputy_supervisor_id,</if>
- <if test="deputySupervisorName != null">deputy_supervisor_name,</if>
- <if test="deputyManagerId != null">deputy_manager_id,</if>
- <if test="deputyManagerName != null">deputy_manager_name,</if>
- <if test="redLineIndexTriggerCount != null">red_line_index_trigger_count,</if>
- <if test="coreIndexScore != null">core_index_score,</if>
- <if test="otherIndexScore != null">other_index_score,</if>
- <if test="otherIndexSafetyScoreWithSocStationQcDeduction != null">
- other_index_safety_score_with_soc_station_qc_deduction,
- </if>
- <if test="otherIndexSafetyScoreWithoutSocStationQcDeduction != null">
- other_index_safety_score_without_soc_station_qc_deduction,
- </if>
- <if test="otherIndexNonSafetyDeduction != null">other_index_non_safety_deduction,</if>
- <if test="nonCoreSafetyPlusCoreDeduction != null">non_core_safety_plus_core_deduction,</if>
- <if test="socStationQcInvolvedCoreSafetyDeduction != null">soc_station_qc_involved_core_safety_deduction,
- </if>
- <if test="inChargeEmployeeCount != null">in_charge_employee_count,</if>
- <if test="deductionAverage != null">deduction_average,</if>
- <if test="totalScore != null">total_score,</if>
- <if test="rewardAmount != null">reward_amount,</if>
- <if test="punishmentAmount != null">punishment_amount,</if>
- <if test="assessmentResult != null">assessment_result,</if>
- <if test="assessmentResultRemark != null">assessment_result_remark,</if>
- <if test="applicationMethod != null">application_method,</if>
- <if test="applicationMethodRemark != null">application_method_remark,</if>
- <if test="exemption != null">exemption,</if>
- <if test="exemptionReasonRemark != null">exemption_reason_remark,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="tenantId != null">#{tenantId},</if>
- <if test="revision != null">#{revision},</if>
- <if test="createBy != null">#{createBy},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="updateBy != null">#{updateBy},</if>
- <if test="updateTime != null">#{updateTime},</if>
- <if test="remark != null">#{remark},</if>
- <if test="assessmentMonth != null and assessmentMonth != ''">#{assessmentMonth},</if>
- <if test="userId != null">#{userId},</if>
- <if test="userName != null and userName != ''">#{userName},</if>
- <if test="roleId != null">#{roleId},</if>
- <if test="roleKey != null and roleKey != ''">#{roleKey},</if>
- <if test="roleName != null and roleName != ''">#{roleName},</if>
- <if test="employmentType != null">#{employmentType},</if>
- <if test="assessmentTeam != null">#{assessmentTeam},</if>
- <if test="post != null">#{post},</if>
- <if test="deputyTeamLeaderId != null">#{deputyTeamLeaderId},</if>
- <if test="deputyTeamLeaderName != null">#{deputyTeamLeaderName},</if>
- <if test="deputySupervisorId != null">#{deputySupervisorId},</if>
- <if test="deputySupervisorName != null">#{deputySupervisorName},</if>
- <if test="deputyManagerId != null">#{deputyManagerId},</if>
- <if test="deputyManagerName != null">#{deputyManagerName},</if>
- <if test="redLineIndexTriggerCount != null">#{redLineIndexTriggerCount},</if>
- <if test="coreIndexScore != null">#{coreIndexScore},</if>
- <if test="otherIndexScore != null">#{otherIndexScore},</if>
- <if test="otherIndexSafetyScoreWithSocStationQcDeduction != null">
- #{otherIndexSafetyScoreWithSocStationQcDeduction},
- </if>
- <if test="otherIndexSafetyScoreWithoutSocStationQcDeduction != null">
- #{otherIndexSafetyScoreWithoutSocStationQcDeduction},
- </if>
- <if test="otherIndexNonSafetyDeduction != null">#{otherIndexNonSafetyDeduction},</if>
- <if test="nonCoreSafetyPlusCoreDeduction != null">#{nonCoreSafetyPlusCoreDeduction},</if>
- <if test="socStationQcInvolvedCoreSafetyDeduction != null">#{socStationQcInvolvedCoreSafetyDeduction},</if>
- <if test="inChargeEmployeeCount != null">#{inChargeEmployeeCount},</if>
- <if test="deductionAverage != null">#{deductionAverage},</if>
- <if test="totalScore != null">#{totalScore},</if>
- <if test="rewardAmount != null">#{rewardAmount},</if>
- <if test="punishmentAmount != null">#{punishmentAmount},</if>
- <if test="assessmentResult != null">#{assessmentResult},</if>
- <if test="assessmentResultRemark != null">#{assessmentResultRemark},</if>
- <if test="applicationMethod != null">#{applicationMethod},</if>
- <if test="applicationMethodRemark != null">#{applicationMethodRemark},</if>
- <if test="exemption != null">#{exemption},</if>
- <if test="exemptionReasonRemark != null">#{exemptionReasonRemark},</if>
- </trim>
- </insert>
- <update id="updatePersonnelNonCadreMonthlyAssessment" parameterType="PersonnelNonCadreMonthlyAssessment">
- update personnel_non_cadre_monthly_assessment
- <trim prefix="SET" suffixOverrides=",">
- <if test="tenantId != null">tenant_id = #{tenantId},</if>
- <if test="revision != null">revision = #{revision},</if>
- <if test="createBy != null">create_by = #{createBy},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="updateBy != null">update_by = #{updateBy},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- <if test="remark != null">remark = #{remark},</if>
- <if test="assessmentMonth != null and assessmentMonth != ''">assessment_month = #{assessmentMonth},</if>
- <if test="userId != null">user_id = #{userId},</if>
- <if test="userName != null and userName != ''">user_name = #{userName},</if>
- <if test="roleId != null">role_id = #{roleId},</if>
- <if test="roleKey != null and roleKey != ''">role_key = #{roleKey},</if>
- <if test="roleName != null and roleName != ''">role_name = #{roleName},</if>
- <if test="employmentType != null">employment_type = #{employmentType},</if>
- <if test="assessmentTeam != null">assessment_team = #{assessmentTeam},</if>
- <if test="post != null">post = #{post},</if>
- <if test="deputyTeamLeaderId != null">deputy_team_leader_id = #{deputyTeamLeaderId},</if>
- <if test="deputyTeamLeaderName != null">deputy_team_leader_name = #{deputyTeamLeaderName},</if>
- <if test="deputySupervisorId != null">deputy_supervisor_id = #{deputySupervisorId},</if>
- <if test="deputySupervisorName != null">deputy_supervisor_name = #{deputySupervisorName},</if>
- <if test="deputyManagerId != null">deputy_manager_id = #{deputyManagerId},</if>
- <if test="deputyManagerName != null">deputy_manager_name = #{deputyManagerName},</if>
- <if test="redLineIndexTriggerCount != null">red_line_index_trigger_count = #{redLineIndexTriggerCount},</if>
- <if test="coreIndexScore != null">core_index_score = #{coreIndexScore},</if>
- <if test="otherIndexScore != null">other_index_score = #{otherIndexScore},</if>
- <if test="otherIndexSafetyScoreWithSocStationQcDeduction != null">
- other_index_safety_score_with_soc_station_qc_deduction =
- #{otherIndexSafetyScoreWithSocStationQcDeduction},
- </if>
- <if test="otherIndexSafetyScoreWithoutSocStationQcDeduction != null">
- other_index_safety_score_without_soc_station_qc_deduction =
- #{otherIndexSafetyScoreWithoutSocStationQcDeduction},
- </if>
- <if test="otherIndexNonSafetyDeduction != null">other_index_non_safety_deduction =
- #{otherIndexNonSafetyDeduction},
- </if>
- <if test="nonCoreSafetyPlusCoreDeduction != null">non_core_safety_plus_core_deduction =
- #{nonCoreSafetyPlusCoreDeduction},
- </if>
- <if test="socStationQcInvolvedCoreSafetyDeduction != null">soc_station_qc_involved_core_safety_deduction =
- #{socStationQcInvolvedCoreSafetyDeduction},
- </if>
- <if test="inChargeEmployeeCount != null">in_charge_employee_count = #{inChargeEmployeeCount},</if>
- <if test="deductionAverage != null">deduction_average = #{deductionAverage},</if>
- <if test="totalScore != null">total_score = #{totalScore},</if>
- <if test="rewardAmount != null">reward_amount = #{rewardAmount},</if>
- <if test="punishmentAmount != null">punishment_amount = #{punishmentAmount},</if>
- <if test="assessmentResult != null">assessment_result = #{assessmentResult},</if>
- <if test="assessmentResultRemark != null">assessment_result_remark = #{assessmentResultRemark},</if>
- <if test="applicationMethod != null">application_method = #{applicationMethod},</if>
- <if test="applicationMethodRemark != null">application_method_remark = #{applicationMethodRemark},</if>
- <if test="exemption != null">exemption = #{exemption},</if>
- <if test="exemptionReasonRemark != null">exemption_reason_remark = #{exemptionReasonRemark},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deletePersonnelNonCadreMonthlyAssessmentById" parameterType="Long">
- delete
- from personnel_non_cadre_monthly_assessment
- where id = #{id}
- </delete>
- <delete id="deletePersonnelNonCadreMonthlyAssessmentByIds" parameterType="String">
- delete from personnel_non_cadre_monthly_assessment where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|