<?xml version="1.0" encoding="UTF-8"?>

<!--
  ~
  ~      Copyright (c) 2018-2025, lengleng All rights reserved.
  ~
  ~  Redistribution and use in source and binary forms, with or without
  ~  modification, are permitted provided that the following conditions are met:
  ~
  ~ Redistributions of source code must retain the above copyright notice,
  ~  this list of conditions and the following disclaimer.
  ~  Redistributions in binary form must reproduce the above copyright
  ~  notice, this list of conditions and the following disclaimer in the
  ~  documentation and/or other materials provided with the distribution.
  ~  Neither the name of the yifu4cloud.com developer nor the names of its
  ~  contributors may be used to endorse or promote products derived from
  ~  this software without specific prior written permission.
  ~  Author: lengleng (wangiegie@gmail.com)
  ~
  -->

<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="com.yifu.cloud.plus.v1.yifu.archives.mapper.TAutoContractSchemeMapper">

  <resultMap id="tAutoContractSchemeMap" type="com.yifu.cloud.plus.v1.yifu.archives.entity.TAutoContractScheme">
    <id property="id" column="ID"/>
    <result property="configName" column="CONFIG_NAME"/>
    <result property="updateFlag" column="UPDATE_FLAG"/>
    <result property="contractType" column="CONTRACT_TYPE"/>
    <result property="signatory" column="SIGNATORY"/>
    <result property="fadadaTemplate" column="FADADA_TEMPLATE"/>
    <result property="contractTerm" column="CONTRACT_TERM"/>
    <result property="contractDurationYear" column="CONTRACT_DURATION_YEAR"/>
    <result property="contractDurationMonth" column="CONTRACT_DURATION_MONTH"/>
    <result property="contractStart" column="CONTRACT_START"/>
    <result property="contractEnd" column="CONTRACT_END"/>
    <result property="tryPeriodType" column="TRY_PERIOD_TYPE"/>
    <result property="tryPeriod" column="TRY_PERIOD"/>
    <result property="tryPeriodStart" column="TRY_PERIOD_START"/>
    <result property="tryPeriodEnd" column="TRY_PERIOD_END"/>
    <result property="task" column="TASK"/>
    <result property="taskType" column="TASK_TYPE"/>
    <result property="taskEndStandard" column="TASK_END_STANDARD"/>
    <result property="mainId" column="MAIN_ID"/>
    <result property="createBy" column="CREATE_BY"/>
    <result property="createName" column="CREATE_NAME"/>
    <result property="createTime" column="CREATE_TIME"/>
    <result property="updateBy" column="UPDATE_BY"/>
    <result property="updateTime" column="UPDATE_TIME"/>
    <result property="deptNo" column="DEPT_NO"/>
    <result property="deptId" column="DEPT_ID"/>
    <result property="postType" column="POST_TYPE"/>
    <result property="post" column="POST"/>
    <result property="workAddress" column="WORK_ADDRESS"/>
    <result property="workingHours" column="WORKING_HOURS"/>
    <result property="workingReward" column="WORKING_REWARD"/>
    <result property="workingDept" column="WORKING_DEPT"/>
    <result property="workingCompany" column="WORKING_COMPANY"/>
    <result property="salaryType" column="SALARY_TYPE"/>
    <result property="riskBuyDesc" column="RISK_BUY_DESC"/>
    <result property="hourlyWage" column="HOURLY_WAGE"/>
    <result property="pieceworkWage" column="PIECEWORK_WAGE"/>
    <result property="otherWage" column="OTHER_WAGE"/>
    <result property="laborCost" column="LABOR_COST"/>
    <result property="defaultAmount" column="DEFAULT_AMOUNT"/>
    <result property="settlementCycle" column="SETTLEMENT_CYCLE"/>
    <result property="paymentTime" column="PAYMENT_TIME"/>
    <result property="paymentType" column="PAYMENT_TYPE"/>
    <result property="internshipPeriod" column="INTERNSHIP_PERIOD"/>
    <result property="internshipPeriodStart" column="INTERNSHIP_PERIOD_START"/>
    <result property="internshipPeriodEnd" column="INTERNSHIP_PERIOD_END"/>
    <result property="dispatchPeriodYear" column="DISPATCH_PERIOD_YEAR"/>
	  <result property="dispatchPeriodMonth" column="DISPATCH_PERIOD_MONTH"/>
    <result property="dispatchPeriodStart" column="DISPATCH_PERIOD_START"/>
    <result property="dispatchPeriodEnd" column="DISPATCH_PERIOD_END"/>
    <result property="workType" column="WORK_TYPE"/>
    <result property="workDayCount" column="WORK_DAY_COUNT"/>
    <result property="workDay" column="WORK_DAY"/>
    <result property="workHours" column="WORK_HOURS"/>
    <result property="otherWorkDay" column="OTHER_WORK_DAY"/>
  </resultMap>
    <sql id="Base_Column_List">
                a.ID,
                a.CONFIG_NAME,
                a.UPDATE_FLAG,
                a.CONTRACT_TYPE,
                a.SIGNATORY,
                a.FADADA_TEMPLATE,
                a.CONTRACT_TERM,
                a.CONTRACT_DURATION_YEAR,
                a.CONTRACT_DURATION_MONTH,
                a.CONTRACT_START,
                a.CONTRACT_END,
                a.TRY_PERIOD_TYPE,
                a.TRY_PERIOD,
                a.TRY_PERIOD_START,
                a.TRY_PERIOD_END,
                a.TASK,
                a.TASK_TYPE,
                a.TASK_END_STANDARD,
                a.MAIN_ID,
                a.CREATE_BY,
                a.CREATE_NAME,
                a.CREATE_TIME,
                a.UPDATE_BY,
                a.UPDATE_TIME,
                a.DEPT_NO,
                a.DEPT_ID,
                a.POST_TYPE,
                a.POST,
                a.WORK_ADDRESS,
                a.WORKING_HOURS,
                a.WORKING_REWARD,
                a.WORKING_DEPT,
                a.WORKING_COMPANY,
                a.SALARY_TYPE,
                a.RISK_BUY_DESC,
                a.HOURLY_WAGE,
                a.PIECEWORK_WAGE,
                a.OTHER_WAGE,
                a.LABOR_COST,
                a.DEFAULT_AMOUNT,
                a.SETTLEMENT_CYCLE,
                a.PAYMENT_TIME,
                a.PAYMENT_TYPE,
                a.INTERNSHIP_PERIOD,
                a.INTERNSHIP_PERIOD_START,
                a.INTERNSHIP_PERIOD_END,
                a.DISPATCH_PERIOD_YEAR,
			  	a.DISPATCH_PERIOD_MONTH,
                a.DISPATCH_PERIOD_START,
                a.DISPATCH_PERIOD_END,
                a.WORK_TYPE,
                a.WORK_DAY_COUNT,
                a.WORK_DAY,
                a.WORK_HOURS,
                a.OTHER_WORK_DAY
    </sql>
    <sql id="tAutoContractScheme_where">
        <if test="tAutoContractScheme != null">
                    <if test="tAutoContractScheme.id != null and tAutoContractScheme.id.trim() != ''">
                        AND a.ID = #{tAutoContractScheme.id}
                    </if>
                    <if test="tAutoContractScheme.configName != null and tAutoContractScheme.configName.trim() != ''">
                        AND a.CONFIG_NAME = #{tAutoContractScheme.configName}
                    </if>
                    <if test="tAutoContractScheme.updateFlag != null and tAutoContractScheme.updateFlag.trim() != ''">
                        AND a.UPDATE_FLAG = #{tAutoContractScheme.updateFlag}
                    </if>
                    <if test="tAutoContractScheme.contractType != null and tAutoContractScheme.contractType.trim() != ''">
                        AND a.CONTRACT_TYPE = #{tAutoContractScheme.contractType}
                    </if>
                    <if test="tAutoContractScheme.signatory != null and tAutoContractScheme.signatory.trim() != ''">
                        AND a.SIGNATORY = #{tAutoContractScheme.signatory}
                    </if>
                    <if test="tAutoContractScheme.fadadaTemplate != null and tAutoContractScheme.fadadaTemplate.trim() != ''">
                        AND a.FADADA_TEMPLATE = #{tAutoContractScheme.fadadaTemplate}
                    </if>
                    <if test="tAutoContractScheme.contractTerm != null and tAutoContractScheme.contractTerm.trim() != ''">
                        AND a.CONTRACT_TERM = #{tAutoContractScheme.contractTerm}
                    </if>
                    <if test="tAutoContractScheme.contractDurationYear != null and tAutoContractScheme.contractDurationYear.trim() != ''">
                        AND a.CONTRACT_DURATION_YEAR = #{tAutoContractScheme.contractDurationYear}
                    </if>
                    <if test="tAutoContractScheme.contractDurationMonth != null and tAutoContractScheme.contractDurationMonth.trim() != ''">
                        AND a.CONTRACT_DURATION_MONTH = #{tAutoContractScheme.contractDurationMonth}
                    </if>
                    <if test="tAutoContractScheme.contractStart != null">
                        AND a.CONTRACT_START = #{tAutoContractScheme.contractStart}
                    </if>
                    <if test="tAutoContractScheme.contractEnd != null">
                        AND a.CONTRACT_END = #{tAutoContractScheme.contractEnd}
                    </if>
                    <if test="tAutoContractScheme.tryPeriodType != null and tAutoContractScheme.tryPeriodType.trim() != ''">
                        AND a.TRY_PERIOD_TYPE = #{tAutoContractScheme.tryPeriodType}
                    </if>
                    <if test="tAutoContractScheme.tryPeriod != null and tAutoContractScheme.tryPeriod.trim() != ''">
                        AND a.TRY_PERIOD = #{tAutoContractScheme.tryPeriod}
                    </if>
                    <if test="tAutoContractScheme.tryPeriodStart != null">
                        AND a.TRY_PERIOD_START = #{tAutoContractScheme.tryPeriodStart}
                    </if>
                    <if test="tAutoContractScheme.tryPeriodEnd != null">
                        AND a.TRY_PERIOD_END = #{tAutoContractScheme.tryPeriodEnd}
                    </if>
                    <if test="tAutoContractScheme.task != null and tAutoContractScheme.task.trim() != ''">
                        AND a.TASK = #{tAutoContractScheme.task}
                    </if>
                    <if test="tAutoContractScheme.taskType != null and tAutoContractScheme.taskType.trim() != ''">
                        AND a.TASK_TYPE = #{tAutoContractScheme.taskType}
                    </if>
                    <if test="tAutoContractScheme.taskEndStandard != null and tAutoContractScheme.taskEndStandard.trim() != ''">
                        AND a.TASK_END_STANDARD = #{tAutoContractScheme.taskEndStandard}
                    </if>
                    <if test="tAutoContractScheme.mainId != null and tAutoContractScheme.mainId.trim() != ''">
                        AND a.MAIN_ID = #{tAutoContractScheme.mainId}
                    </if>
                    <if test="tAutoContractScheme.createBy != null and tAutoContractScheme.createBy.trim() != ''">
                        AND a.CREATE_BY = #{tAutoContractScheme.createBy}
                    </if>
                    <if test="tAutoContractScheme.createName != null and tAutoContractScheme.createName.trim() != ''">
                        AND a.CREATE_NAME = #{tAutoContractScheme.createName}
                    </if>
                    <if test="tAutoContractScheme.createTime != null">
                        AND a.CREATE_TIME = #{tAutoContractScheme.createTime}
                    </if>
                    <if test="tAutoContractScheme.updateBy != null and tAutoContractScheme.updateBy.trim() != ''">
                        AND a.UPDATE_BY = #{tAutoContractScheme.updateBy}
                    </if>
                    <if test="tAutoContractScheme.updateTime != null">
                        AND a.UPDATE_TIME = #{tAutoContractScheme.updateTime}
                    </if>
                    <if test="tAutoContractScheme.deptNo != null and tAutoContractScheme.deptNo.trim() != ''">
                        AND a.DEPT_NO = #{tAutoContractScheme.deptNo}
                    </if>
                    <if test="tAutoContractScheme.deptId != null and tAutoContractScheme.deptId.trim() != ''">
                        AND a.DEPT_ID = #{tAutoContractScheme.deptId}
                    </if>
                    <if test="tAutoContractScheme.postType != null and tAutoContractScheme.postType.trim() != ''">
                        AND a.POST_TYPE = #{tAutoContractScheme.postType}
                    </if>
                    <if test="tAutoContractScheme.post != null and tAutoContractScheme.post.trim() != ''">
                        AND a.POST = #{tAutoContractScheme.post}
                    </if>
                    <if test="tAutoContractScheme.workAddress != null and tAutoContractScheme.workAddress.trim() != ''">
                        AND a.WORK_ADDRESS = #{tAutoContractScheme.workAddress}
                    </if>
                    <if test="tAutoContractScheme.workingHours != null and tAutoContractScheme.workingHours.trim() != ''">
                        AND a.WORKING_HOURS = #{tAutoContractScheme.workingHours}
                    </if>
                    <if test="tAutoContractScheme.workingReward != null and tAutoContractScheme.workingReward.trim() != ''">
                        AND a.WORKING_REWARD = #{tAutoContractScheme.workingReward}
                    </if>
                    <if test="tAutoContractScheme.workingDept != null and tAutoContractScheme.workingDept.trim() != ''">
                        AND a.WORKING_DEPT = #{tAutoContractScheme.workingDept}
                    </if>
                    <if test="tAutoContractScheme.workingCompany != null and tAutoContractScheme.workingCompany.trim() != ''">
                        AND a.WORKING_COMPANY = #{tAutoContractScheme.workingCompany}
                    </if>
                    <if test="tAutoContractScheme.salaryType != null and tAutoContractScheme.salaryType.trim() != ''">
                        AND a.SALARY_TYPE = #{tAutoContractScheme.salaryType}
                    </if>
                    <if test="tAutoContractScheme.riskBuyDesc != null and tAutoContractScheme.riskBuyDesc.trim() != ''">
                        AND a.RISK_BUY_DESC = #{tAutoContractScheme.riskBuyDesc}
                    </if>
                    <if test="tAutoContractScheme.hourlyWage != null and tAutoContractScheme.hourlyWage.trim() != ''">
                        AND a.HOURLY_WAGE = #{tAutoContractScheme.hourlyWage}
                    </if>
                    <if test="tAutoContractScheme.pieceworkWage != null and tAutoContractScheme.pieceworkWage.trim() != ''">
                        AND a.PIECEWORK_WAGE = #{tAutoContractScheme.pieceworkWage}
                    </if>
                    <if test="tAutoContractScheme.otherWage != null and tAutoContractScheme.otherWage.trim() != ''">
                        AND a.OTHER_WAGE = #{tAutoContractScheme.otherWage}
                    </if>
                    <if test="tAutoContractScheme.laborCost != null and tAutoContractScheme.laborCost.trim() != ''">
                        AND a.LABOR_COST = #{tAutoContractScheme.laborCost}
                    </if>
                    <if test="tAutoContractScheme.defaultAmount != null and tAutoContractScheme.defaultAmount.trim() != ''">
                        AND a.DEFAULT_AMOUNT = #{tAutoContractScheme.defaultAmount}
                    </if>
                    <if test="tAutoContractScheme.settlementCycle != null and tAutoContractScheme.settlementCycle.trim() != ''">
                        AND a.SETTLEMENT_CYCLE = #{tAutoContractScheme.settlementCycle}
                    </if>
                    <if test="tAutoContractScheme.paymentTime != null and tAutoContractScheme.paymentTime.trim() != ''">
                        AND a.PAYMENT_TIME = #{tAutoContractScheme.paymentTime}
                    </if>
                    <if test="tAutoContractScheme.paymentType != null and tAutoContractScheme.paymentType.trim() != ''">
                        AND a.PAYMENT_TYPE = #{tAutoContractScheme.paymentType}
                    </if>
                    <if test="tAutoContractScheme.internshipPeriod != null and tAutoContractScheme.internshipPeriod.trim() != ''">
                        AND a.INTERNSHIP_PERIOD = #{tAutoContractScheme.internshipPeriod}
                    </if>
                    <if test="tAutoContractScheme.internshipPeriodStart != null">
                        AND a.INTERNSHIP_PERIOD_START = #{tAutoContractScheme.internshipPeriodStart}
                    </if>
                    <if test="tAutoContractScheme.internshipPeriodEnd != null">
                        AND a.INTERNSHIP_PERIOD_END = #{tAutoContractScheme.internshipPeriodEnd}
                    </if>
                    <if test="tAutoContractScheme.dispatchPeriodStart != null">
                        AND a.DISPATCH_PERIOD_START = #{tAutoContractScheme.dispatchPeriodStart}
                    </if>
                    <if test="tAutoContractScheme.dispatchPeriodEnd != null">
                        AND a.DISPATCH_PERIOD_END = #{tAutoContractScheme.dispatchPeriodEnd}
                    </if>
                    <if test="tAutoContractScheme.workType != null and tAutoContractScheme.workType.trim() != ''">
                        AND a.WORK_TYPE = #{tAutoContractScheme.workType}
                    </if>
                    <if test="tAutoContractScheme.workDayCount != null and tAutoContractScheme.workDayCount.trim() != ''">
                        AND a.WORK_DAY_COUNT = #{tAutoContractScheme.workDayCount}
                    </if>
                    <if test="tAutoContractScheme.workDay != null and tAutoContractScheme.workDay.trim() != ''">
                        AND a.WORK_DAY = #{tAutoContractScheme.workDay}
                    </if>
                    <if test="tAutoContractScheme.workHours != null and tAutoContractScheme.workHours.trim() != ''">
                        AND a.WORK_HOURS = #{tAutoContractScheme.workHours}
                    </if>
        </if>
    </sql>
    <!--tAutoContractScheme简单分页查询-->
    <select id="getTAutoContractSchemePage" resultMap="tAutoContractSchemeMap">
        SELECT
        <include refid="Base_Column_List"/>
        FROM t_auto_contract_scheme a
        <where>
            1=1
            <include refid="tAutoContractScheme_where"/>
        </where>
    </select>
</mapper>
