You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
weaver-hrm-organization/src/com/engine/organization/mapper/version/CompanyVersionMapper.xml

79 lines
5.4 KiB
XML

<?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.engine.organization.mapper.version.CompanyVersionMapper">
<resultMap id="BaseResultMap" type="com.engine.organization.entity.version.HrmSubCompanyVersion">
<result column="id" property="id"/>
<result column="subcomid" property="subComId"/>
<result column="subcompanydesc" property="subCompanyDesc"/>
<result column="subcompanycode" property="subCompanyCode"/>
<result column="subcompanyname" property="subCompanyName"/>
<result column="supssubcomid" property="supsSubComId"/>
<result column="showorder" property="showOrder"/>
<result column="canceled" property="canceled"/>
<result column="description" property="description"/>
<result column="operator" property="operator"/>
<result column="version" property="version"/>
<result column="operate_time" property="operateTime"/>
</resultMap>
<!-- 表字段 -->
<sql id="baseColumns">
t.id ,t.subcomid ,t.subcompanydesc ,t.subcompanycode ,t.subcompanyname ,t.supsubcomid ,
t.showorder ,t.canceled ,t.description ,t.operator ,t.version ,t.operate_time
</sql>
<select id="getMaxVersion" resultMap="BaseResultMap" parameterType="java.lang.String">
select
<include refid="baseColumns"/>
from hrmsubcompany_version t where t.subcomid=#{subComId} order by t.version desc limit 1
</select>
<insert id="insertHrmSubComVersion">
insert into hrmsubcompany_version
(subcomid ,subcompanydesc ,subcompanycode ,subcompanyname ,supsubcomid ,
showorder ,canceled ,description ,operator ,version ,operate_time)
values (#{subComId}, #{subCompanyDesc}, #{subCompanyCode}, #{subCompanyName}, #{supsSubComId},
#{showOrder}, #{canceled}, #{description}, #{operator}, #{version}, #{operateTime})
</insert>
<select id="getMaxDeptVersion" resultType="com.engine.organization.entity.version.HrmDepartmentVersion">
select * from hrmdepartment_version where departmentid=#{departmentid} order by version desc limit 1
</select>
<insert id="insertHrmDeptVersion">
insert into hrmdepartment_version
(departmentid, departmentmark, departmentcode, departmentname, subcompanyid1, supdepid,
bmfzr, showorder, canceled, description, operator, version, operate_time)
VALUES (#{departmentId}, #{departmentMark}, #{departmentCode}, #{departmentName}, #{subCompanyId1}, #{supDepId},
#{bmfzr}, #{showOrder}, #{canceled}, #{description}, #{operator}, #{version}, #{operateTime})
</insert>
<select id="getMaxHrmVersion" resultType="com.engine.organization.entity.version.HrmResourceVersion">
select * from hrmresource_version where resourceid=#{resourceid} order by versiiom desc limit 1
</select>
<insert id="insertHrmResourceVersion">
insert into hrmresource_version
(resourceid, companystartdate, companyworkyear, workstartdate, workyear, usekind, jobcall,
accumfundaccount, birthplace, folk, residentphone, residentpostcode, extphone, managerstr,
status, fax, islabouunion, weight, tempresidentnumber, probationenddate, countryid, passwdchgdate,
lloginid, dsporder, passwordstate, accounttype, belongto, messagerurl, accountname,
loginid, password, lastname, sex, birthday, nationality, maritalstatus, telephone, mobile,
mobilecall, email, locationid, workroom, homeaddress, resourcetype, startdate, enddate, jobtitle,
jobactivitydesc, joblevel, seclevel, departmentid, subcompanyid1, costcenterid, managerid, assistantid,
bankid1, accountid1, resourceimageid, certificatenum, nativeplace, educationlevel, bememberdate,
bepartydate, workcode, regresidentplace, healthinfo, residentplace, policy, degree, height,
classification, description, operator, version, operate_time)
values (#{resourceid}, #{companystartdate}, #{companyworkyear}, #{workstartdate}, #{workyear}, #{usekind}, #{jobcall},
#{accumfundaccount}, #{birthplace}, #{folk}, #{residentphone}, #{residentpostcode}, #{extphone}, #{managerstr},
#{status}, #{fax}, #{islabouunion}, #{weight}, #{tempresidentnumber}, #{probationenddate}, #{countryid}, #{passwdchgdate},
#{lloginid}, #{dsporder}, #{passwordstate}, #{accounttype}, #{belongto}, #{messagerurl}, #{accountname},
#{loginid}, #{password}, #{lastname}, #{sex}, #{birthday}, #{nationality}, #{maritalstatus}, #{telephone}, #{mobile},
#{mobilecall}, #{email}, #{locationid}, #{workroom}, #{homeaddress}, #{resourcetype}, #{startdate}, #{enddate}, #{jobtitle},
#{jobactivitydesc}, #{joblevel}, #{seclevel}, #{departmentid}, #{subcompanyid1}, #{costcenterid}, #{managerid}, #{assistantid},
#{bankid1}, #{accountid1}, #{resourceimageid}, #{certificatenum}, #{nativeplace}, #{educationlevel}, #{bememberdate},
#{bepartydate}, #{workcode}, #{regresidentplace}, #{healthinfo}, #{residentplace}, #{policy}, #{degree}, #{height},
#{classification}, #{description}, #{operator}, #{version}, #{operateTime})
</insert>
</mapper>