TPreEmpFamilyMapper.xml 6.89 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
<?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.TPreEmpFamilyMapper">

  <resultMap id="tPreEmpFamilyMap" type="com.yifu.cloud.plus.v1.yifu.archives.entity.TPreEmpFamily">
    <id property="id" column="ID"/>
    <result property="preMainId" column="PRE_MAIN_ID"/>
    <result property="empId" column="EMP_ID"/>
    <result property="empCode" column="EMP_CODE"/>
    <result property="empName" column="EMP_NAME"/>
    <result property="empIdcard" column="EMP_IDCARD"/>
    <result property="relationshipSelf" column="RELATIONSHIP_SELF"/>
    <result property="familyName" column="FAMILY_NAME"/>
    <result property="birthday" column="BIRTHDAY"/>
    <result property="workUnit" column="WORK_UNIT"/>
    <result property="contractTel" column="CONTRACT_TEL"/>
    <result property="deleteFlag" column="DELETE_FLAG"/>
    <result property="settleDomain" column="SETTLE_DOMAIN"/>
    <result property="createBy" column="CREATE_BY"/>
    <result property="updateBy" column="UPDATE_BY"/>
    <result property="createName" column="CREATE_NAME"/>
    <result property="createTime" column="CREATE_TIME"/>
    <result property="updateTime" column="UPDATE_TIME"/>
    <result property="remark" column="REMARK"/>
46
	  <result property="oldId" column="OLD_ID"/>
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
  </resultMap>
    <sql id="Base_Column_List">
                a.ID,
                a.PRE_MAIN_ID,
                a.EMP_ID,
                a.EMP_CODE,
                a.EMP_NAME,
                a.EMP_IDCARD,
                a.RELATIONSHIP_SELF,
                a.FAMILY_NAME,
                a.BIRTHDAY,
                a.WORK_UNIT,
                a.CONTRACT_TEL,
                a.DELETE_FLAG,
                a.SETTLE_DOMAIN,
                a.CREATE_BY,
                a.UPDATE_BY,
                a.CREATE_NAME,
                a.CREATE_TIME,
                a.UPDATE_TIME,
67
                a.OLD_ID,
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
                a.REMARK
    </sql>
    <sql id="tPreEmpFamily_where">
        <if test="tPreEmpFamily != null">
                    <if test="tPreEmpFamily.id != null and tPreEmpFamily.id.trim() != ''">
                        AND a.ID = #{tPreEmpFamily.id}
                    </if>
                    <if test="tPreEmpFamily.preMainId != null and tPreEmpFamily.preMainId.trim() != ''">
                        AND a.PRE_MAIN_ID = #{tPreEmpFamily.preMainId}
                    </if>
                    <if test="tPreEmpFamily.empId != null and tPreEmpFamily.empId.trim() != ''">
                        AND a.EMP_ID = #{tPreEmpFamily.empId}
                    </if>
                    <if test="tPreEmpFamily.empCode != null and tPreEmpFamily.empCode.trim() != ''">
                        AND a.EMP_CODE = #{tPreEmpFamily.empCode}
                    </if>
                    <if test="tPreEmpFamily.empName != null and tPreEmpFamily.empName.trim() != ''">
                        AND a.EMP_NAME = #{tPreEmpFamily.empName}
                    </if>
                    <if test="tPreEmpFamily.empIdcard != null and tPreEmpFamily.empIdcard.trim() != ''">
                        AND a.EMP_IDCARD = #{tPreEmpFamily.empIdcard}
                    </if>
                    <if test="tPreEmpFamily.relationshipSelf != null and tPreEmpFamily.relationshipSelf.trim() != ''">
                        AND a.RELATIONSHIP_SELF = #{tPreEmpFamily.relationshipSelf}
                    </if>
                    <if test="tPreEmpFamily.familyName != null and tPreEmpFamily.familyName.trim() != ''">
                        AND a.FAMILY_NAME = #{tPreEmpFamily.familyName}
                    </if>
                    <if test="tPreEmpFamily.birthday != null">
                        AND a.BIRTHDAY = #{tPreEmpFamily.birthday}
                    </if>
                    <if test="tPreEmpFamily.workUnit != null and tPreEmpFamily.workUnit.trim() != ''">
                        AND a.WORK_UNIT = #{tPreEmpFamily.workUnit}
                    </if>
                    <if test="tPreEmpFamily.contractTel != null and tPreEmpFamily.contractTel.trim() != ''">
                        AND a.CONTRACT_TEL = #{tPreEmpFamily.contractTel}
                    </if>
                    <if test="tPreEmpFamily.deleteFlag != null and tPreEmpFamily.deleteFlag.trim() != ''">
                        AND a.DELETE_FLAG = #{tPreEmpFamily.deleteFlag}
                    </if>
                    <if test="tPreEmpFamily.settleDomain != null and tPreEmpFamily.settleDomain.trim() != ''">
                        AND a.SETTLE_DOMAIN = #{tPreEmpFamily.settleDomain}
                    </if>
                    <if test="tPreEmpFamily.createBy != null and tPreEmpFamily.createBy.trim() != ''">
                        AND a.CREATE_BY = #{tPreEmpFamily.createBy}
                    </if>
                    <if test="tPreEmpFamily.updateBy != null and tPreEmpFamily.updateBy.trim() != ''">
                        AND a.UPDATE_BY = #{tPreEmpFamily.updateBy}
                    </if>
                    <if test="tPreEmpFamily.createName != null and tPreEmpFamily.createName.trim() != ''">
                        AND a.CREATE_NAME = #{tPreEmpFamily.createName}
                    </if>
                    <if test="tPreEmpFamily.createTime != null">
                        AND a.CREATE_TIME = #{tPreEmpFamily.createTime}
                    </if>
                    <if test="tPreEmpFamily.updateTime != null">
                        AND a.UPDATE_TIME = #{tPreEmpFamily.updateTime}
                    </if>
                    <if test="tPreEmpFamily.remark != null and tPreEmpFamily.remark.trim() != ''">
                        AND a.REMARK = #{tPreEmpFamily.remark}
                    </if>
        </if>
    </sql>
    <!--tPreEmpFamily简单分页查询-->
    <select id="getTPreEmpFamilyList" resultMap="tPreEmpFamilyMap">
        SELECT
        <include refid="Base_Column_List"/>
        FROM t_pre_emp_family a
136
		where PRE_MAIN_ID = #{preMainId}
137
    </select>
138 139 140 141 142

	<delete id="deleteFamilyByMainId">
		delete from t_pre_emp_family where PRE_MAIN_ID = #{preMainId}
	</delete>

143
</mapper>