ganzi-api/inventory-dao/src/main/resources/mapper/check/BookentcheckCompanyMapper.xml

570 lines
22 KiB
XML
Raw Normal View History

2022-09-16 15:07:17 +08:00
<?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.rzyc.mapper.check.BookentcheckCompanyMapper">
<resultMap id="BaseResultMap" type="com.rzyc.model.check.BookentcheckCompany">
<id column="BookEntCheckId" jdbcType="VARCHAR" property="bookentcheckid" />
<result column="BaseEntId" jdbcType="VARCHAR" property="baseentid" />
<result column="ChkBillId" jdbcType="VARCHAR" property="chkbillid" />
<result column="ChkBillName" jdbcType="VARCHAR" property="chkbillname" />
<result column="CheckSite" jdbcType="VARCHAR" property="checksite" />
<result column="BegCheckDate" jdbcType="TIMESTAMP" property="begcheckdate" />
<result column="EndCheckDate" jdbcType="TIMESTAMP" property="endcheckdate" />
<result column="CheckUniy" jdbcType="VARCHAR" property="checkuniy" />
<result column="ZhiFaRen" jdbcType="VARCHAR" property="zhifaren" />
<result column="IDNumber" jdbcType="VARCHAR" property="idnumber" />
<result column="CheckType" jdbcType="VARCHAR" property="checktype" />
<result column="CheckContent" jdbcType="VARCHAR" property="checkcontent" />
<result column="CheckProblem" jdbcType="VARCHAR" property="checkproblem" />
<result column="IsToTrouble" jdbcType="VARCHAR" property="istotrouble" />
<result column="ProcessingOpinion" jdbcType="VARCHAR" property="processingopinion" />
<result column="CheckMethod" jdbcType="VARCHAR" property="checkmethod" />
<result column="CheckBasis" jdbcType="VARCHAR" property="checkbasis" />
<result column="CheckObject" jdbcType="VARCHAR" property="checkobject" />
<result column="CheckState" jdbcType="VARCHAR" property="checkstate" />
<result column="ConfimDate" jdbcType="TIMESTAMP" property="confimdate" />
<result column="Remark" jdbcType="VARCHAR" property="remark" />
<result column="BookCheckScores" jdbcType="INTEGER" property="bookcheckscores" />
<result column="CreatedOn" jdbcType="TIMESTAMP" property="createdon" />
<result column="CreatedBy" jdbcType="VARCHAR" property="createdby" />
<result column="ModifiedOn" jdbcType="TIMESTAMP" property="modifiedon" />
<result column="ModifiedBy" jdbcType="VARCHAR" property="modifiedby" />
<result column="min_unit_check" jdbcType="INTEGER" property="minUnitCheck" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
BookEntCheckId, BaseEntId, ChkBillId, ChkBillName, CheckSite, BegCheckDate, EndCheckDate,
CheckUniy, ZhiFaRen, IDNumber, CheckType, CheckContent, CheckProblem, IsToTrouble,
ProcessingOpinion, CheckMethod, CheckBasis, CheckObject, CheckState, ConfimDate,
Remark, BookCheckScores, CreatedOn, CreatedBy, ModifiedOn, ModifiedBy, min_unit_check
</sql>
<select id="selectByExample" parameterType="com.rzyc.model.check.BookentcheckCompanyExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from bookentcheck_company
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
<if test="limit != null">
<if test="offset != null">
limit ${offset}, ${limit}
</if>
<if test="offset == null">
limit ${limit}
</if>
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from bookentcheck_company
where BookEntCheckId = #{bookentcheckid,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from bookentcheck_company
where BookEntCheckId = #{bookentcheckid,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.rzyc.model.check.BookentcheckCompanyExample">
delete from bookentcheck_company
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.rzyc.model.check.BookentcheckCompany">
insert into bookentcheck_company (BookEntCheckId, BaseEntId, ChkBillId,
ChkBillName, CheckSite, BegCheckDate,
EndCheckDate, CheckUniy, ZhiFaRen,
IDNumber, CheckType, CheckContent,
CheckProblem, IsToTrouble, ProcessingOpinion,
CheckMethod, CheckBasis, CheckObject,
CheckState, ConfimDate, Remark,
BookCheckScores, CreatedOn, CreatedBy,
ModifiedOn, ModifiedBy, min_unit_check
)
values (#{bookentcheckid,jdbcType=VARCHAR}, #{baseentid,jdbcType=VARCHAR}, #{chkbillid,jdbcType=VARCHAR},
#{chkbillname,jdbcType=VARCHAR}, #{checksite,jdbcType=VARCHAR}, #{begcheckdate,jdbcType=TIMESTAMP},
#{endcheckdate,jdbcType=TIMESTAMP}, #{checkuniy,jdbcType=VARCHAR}, #{zhifaren,jdbcType=VARCHAR},
#{idnumber,jdbcType=VARCHAR}, #{checktype,jdbcType=VARCHAR}, #{checkcontent,jdbcType=VARCHAR},
#{checkproblem,jdbcType=VARCHAR}, #{istotrouble,jdbcType=VARCHAR}, #{processingopinion,jdbcType=VARCHAR},
#{checkmethod,jdbcType=VARCHAR}, #{checkbasis,jdbcType=VARCHAR}, #{checkobject,jdbcType=VARCHAR},
#{checkstate,jdbcType=VARCHAR}, #{confimdate,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR},
#{bookcheckscores,jdbcType=INTEGER}, #{createdon,jdbcType=TIMESTAMP}, #{createdby,jdbcType=VARCHAR},
#{modifiedon,jdbcType=TIMESTAMP}, #{modifiedby,jdbcType=VARCHAR}, #{minUnitCheck,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.rzyc.model.check.BookentcheckCompany">
insert into bookentcheck_company
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="bookentcheckid != null">
BookEntCheckId,
</if>
<if test="baseentid != null">
BaseEntId,
</if>
<if test="chkbillid != null">
ChkBillId,
</if>
<if test="chkbillname != null">
ChkBillName,
</if>
<if test="checksite != null">
CheckSite,
</if>
<if test="begcheckdate != null">
BegCheckDate,
</if>
<if test="endcheckdate != null">
EndCheckDate,
</if>
<if test="checkuniy != null">
CheckUniy,
</if>
<if test="zhifaren != null">
ZhiFaRen,
</if>
<if test="idnumber != null">
IDNumber,
</if>
<if test="checktype != null">
CheckType,
</if>
<if test="checkcontent != null">
CheckContent,
</if>
<if test="checkproblem != null">
CheckProblem,
</if>
<if test="istotrouble != null">
IsToTrouble,
</if>
<if test="processingopinion != null">
ProcessingOpinion,
</if>
<if test="checkmethod != null">
CheckMethod,
</if>
<if test="checkbasis != null">
CheckBasis,
</if>
<if test="checkobject != null">
CheckObject,
</if>
<if test="checkstate != null">
CheckState,
</if>
<if test="confimdate != null">
ConfimDate,
</if>
<if test="remark != null">
Remark,
</if>
<if test="bookcheckscores != null">
BookCheckScores,
</if>
<if test="createdon != null">
CreatedOn,
</if>
<if test="createdby != null">
CreatedBy,
</if>
<if test="modifiedon != null">
ModifiedOn,
</if>
<if test="modifiedby != null">
ModifiedBy,
</if>
<if test="minUnitCheck != null">
min_unit_check,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="bookentcheckid != null">
#{bookentcheckid,jdbcType=VARCHAR},
</if>
<if test="baseentid != null">
#{baseentid,jdbcType=VARCHAR},
</if>
<if test="chkbillid != null">
#{chkbillid,jdbcType=VARCHAR},
</if>
<if test="chkbillname != null">
#{chkbillname,jdbcType=VARCHAR},
</if>
<if test="checksite != null">
#{checksite,jdbcType=VARCHAR},
</if>
<if test="begcheckdate != null">
#{begcheckdate,jdbcType=TIMESTAMP},
</if>
<if test="endcheckdate != null">
#{endcheckdate,jdbcType=TIMESTAMP},
</if>
<if test="checkuniy != null">
#{checkuniy,jdbcType=VARCHAR},
</if>
<if test="zhifaren != null">
#{zhifaren,jdbcType=VARCHAR},
</if>
<if test="idnumber != null">
#{idnumber,jdbcType=VARCHAR},
</if>
<if test="checktype != null">
#{checktype,jdbcType=VARCHAR},
</if>
<if test="checkcontent != null">
#{checkcontent,jdbcType=VARCHAR},
</if>
<if test="checkproblem != null">
#{checkproblem,jdbcType=VARCHAR},
</if>
<if test="istotrouble != null">
#{istotrouble,jdbcType=VARCHAR},
</if>
<if test="processingopinion != null">
#{processingopinion,jdbcType=VARCHAR},
</if>
<if test="checkmethod != null">
#{checkmethod,jdbcType=VARCHAR},
</if>
<if test="checkbasis != null">
#{checkbasis,jdbcType=VARCHAR},
</if>
<if test="checkobject != null">
#{checkobject,jdbcType=VARCHAR},
</if>
<if test="checkstate != null">
#{checkstate,jdbcType=VARCHAR},
</if>
<if test="confimdate != null">
#{confimdate,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="bookcheckscores != null">
#{bookcheckscores,jdbcType=INTEGER},
</if>
<if test="createdon != null">
#{createdon,jdbcType=TIMESTAMP},
</if>
<if test="createdby != null">
#{createdby,jdbcType=VARCHAR},
</if>
<if test="modifiedon != null">
#{modifiedon,jdbcType=TIMESTAMP},
</if>
<if test="modifiedby != null">
#{modifiedby,jdbcType=VARCHAR},
</if>
<if test="minUnitCheck != null">
#{minUnitCheck,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.rzyc.model.check.BookentcheckCompanyExample" resultType="java.lang.Long">
select count(*) from bookentcheck_company
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update bookentcheck_company
<set>
<if test="record.bookentcheckid != null">
BookEntCheckId = #{record.bookentcheckid,jdbcType=VARCHAR},
</if>
<if test="record.baseentid != null">
BaseEntId = #{record.baseentid,jdbcType=VARCHAR},
</if>
<if test="record.chkbillid != null">
ChkBillId = #{record.chkbillid,jdbcType=VARCHAR},
</if>
<if test="record.chkbillname != null">
ChkBillName = #{record.chkbillname,jdbcType=VARCHAR},
</if>
<if test="record.checksite != null">
CheckSite = #{record.checksite,jdbcType=VARCHAR},
</if>
<if test="record.begcheckdate != null">
BegCheckDate = #{record.begcheckdate,jdbcType=TIMESTAMP},
</if>
<if test="record.endcheckdate != null">
EndCheckDate = #{record.endcheckdate,jdbcType=TIMESTAMP},
</if>
<if test="record.checkuniy != null">
CheckUniy = #{record.checkuniy,jdbcType=VARCHAR},
</if>
<if test="record.zhifaren != null">
ZhiFaRen = #{record.zhifaren,jdbcType=VARCHAR},
</if>
<if test="record.idnumber != null">
IDNumber = #{record.idnumber,jdbcType=VARCHAR},
</if>
<if test="record.checktype != null">
CheckType = #{record.checktype,jdbcType=VARCHAR},
</if>
<if test="record.checkcontent != null">
CheckContent = #{record.checkcontent,jdbcType=VARCHAR},
</if>
<if test="record.checkproblem != null">
CheckProblem = #{record.checkproblem,jdbcType=VARCHAR},
</if>
<if test="record.istotrouble != null">
IsToTrouble = #{record.istotrouble,jdbcType=VARCHAR},
</if>
<if test="record.processingopinion != null">
ProcessingOpinion = #{record.processingopinion,jdbcType=VARCHAR},
</if>
<if test="record.checkmethod != null">
CheckMethod = #{record.checkmethod,jdbcType=VARCHAR},
</if>
<if test="record.checkbasis != null">
CheckBasis = #{record.checkbasis,jdbcType=VARCHAR},
</if>
<if test="record.checkobject != null">
CheckObject = #{record.checkobject,jdbcType=VARCHAR},
</if>
<if test="record.checkstate != null">
CheckState = #{record.checkstate,jdbcType=VARCHAR},
</if>
<if test="record.confimdate != null">
ConfimDate = #{record.confimdate,jdbcType=TIMESTAMP},
</if>
<if test="record.remark != null">
Remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.bookcheckscores != null">
BookCheckScores = #{record.bookcheckscores,jdbcType=INTEGER},
</if>
<if test="record.createdon != null">
CreatedOn = #{record.createdon,jdbcType=TIMESTAMP},
</if>
<if test="record.createdby != null">
CreatedBy = #{record.createdby,jdbcType=VARCHAR},
</if>
<if test="record.modifiedon != null">
ModifiedOn = #{record.modifiedon,jdbcType=TIMESTAMP},
</if>
<if test="record.modifiedby != null">
ModifiedBy = #{record.modifiedby,jdbcType=VARCHAR},
</if>
<if test="record.minUnitCheck != null">
min_unit_check = #{record.minUnitCheck,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update bookentcheck_company
set BookEntCheckId = #{record.bookentcheckid,jdbcType=VARCHAR},
BaseEntId = #{record.baseentid,jdbcType=VARCHAR},
ChkBillId = #{record.chkbillid,jdbcType=VARCHAR},
ChkBillName = #{record.chkbillname,jdbcType=VARCHAR},
CheckSite = #{record.checksite,jdbcType=VARCHAR},
BegCheckDate = #{record.begcheckdate,jdbcType=TIMESTAMP},
EndCheckDate = #{record.endcheckdate,jdbcType=TIMESTAMP},
CheckUniy = #{record.checkuniy,jdbcType=VARCHAR},
ZhiFaRen = #{record.zhifaren,jdbcType=VARCHAR},
IDNumber = #{record.idnumber,jdbcType=VARCHAR},
CheckType = #{record.checktype,jdbcType=VARCHAR},
CheckContent = #{record.checkcontent,jdbcType=VARCHAR},
CheckProblem = #{record.checkproblem,jdbcType=VARCHAR},
IsToTrouble = #{record.istotrouble,jdbcType=VARCHAR},
ProcessingOpinion = #{record.processingopinion,jdbcType=VARCHAR},
CheckMethod = #{record.checkmethod,jdbcType=VARCHAR},
CheckBasis = #{record.checkbasis,jdbcType=VARCHAR},
CheckObject = #{record.checkobject,jdbcType=VARCHAR},
CheckState = #{record.checkstate,jdbcType=VARCHAR},
ConfimDate = #{record.confimdate,jdbcType=TIMESTAMP},
Remark = #{record.remark,jdbcType=VARCHAR},
BookCheckScores = #{record.bookcheckscores,jdbcType=INTEGER},
CreatedOn = #{record.createdon,jdbcType=TIMESTAMP},
CreatedBy = #{record.createdby,jdbcType=VARCHAR},
ModifiedOn = #{record.modifiedon,jdbcType=TIMESTAMP},
ModifiedBy = #{record.modifiedby,jdbcType=VARCHAR},
min_unit_check = #{record.minUnitCheck,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.rzyc.model.check.BookentcheckCompany">
update bookentcheck_company
<set>
<if test="baseentid != null">
BaseEntId = #{baseentid,jdbcType=VARCHAR},
</if>
<if test="chkbillid != null">
ChkBillId = #{chkbillid,jdbcType=VARCHAR},
</if>
<if test="chkbillname != null">
ChkBillName = #{chkbillname,jdbcType=VARCHAR},
</if>
<if test="checksite != null">
CheckSite = #{checksite,jdbcType=VARCHAR},
</if>
<if test="begcheckdate != null">
BegCheckDate = #{begcheckdate,jdbcType=TIMESTAMP},
</if>
<if test="endcheckdate != null">
EndCheckDate = #{endcheckdate,jdbcType=TIMESTAMP},
</if>
<if test="checkuniy != null">
CheckUniy = #{checkuniy,jdbcType=VARCHAR},
</if>
<if test="zhifaren != null">
ZhiFaRen = #{zhifaren,jdbcType=VARCHAR},
</if>
<if test="idnumber != null">
IDNumber = #{idnumber,jdbcType=VARCHAR},
</if>
<if test="checktype != null">
CheckType = #{checktype,jdbcType=VARCHAR},
</if>
<if test="checkcontent != null">
CheckContent = #{checkcontent,jdbcType=VARCHAR},
</if>
<if test="checkproblem != null">
CheckProblem = #{checkproblem,jdbcType=VARCHAR},
</if>
<if test="istotrouble != null">
IsToTrouble = #{istotrouble,jdbcType=VARCHAR},
</if>
<if test="processingopinion != null">
ProcessingOpinion = #{processingopinion,jdbcType=VARCHAR},
</if>
<if test="checkmethod != null">
CheckMethod = #{checkmethod,jdbcType=VARCHAR},
</if>
<if test="checkbasis != null">
CheckBasis = #{checkbasis,jdbcType=VARCHAR},
</if>
<if test="checkobject != null">
CheckObject = #{checkobject,jdbcType=VARCHAR},
</if>
<if test="checkstate != null">
CheckState = #{checkstate,jdbcType=VARCHAR},
</if>
<if test="confimdate != null">
ConfimDate = #{confimdate,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
Remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="bookcheckscores != null">
BookCheckScores = #{bookcheckscores,jdbcType=INTEGER},
</if>
<if test="createdon != null">
CreatedOn = #{createdon,jdbcType=TIMESTAMP},
</if>
<if test="createdby != null">
CreatedBy = #{createdby,jdbcType=VARCHAR},
</if>
<if test="modifiedon != null">
ModifiedOn = #{modifiedon,jdbcType=TIMESTAMP},
</if>
<if test="modifiedby != null">
ModifiedBy = #{modifiedby,jdbcType=VARCHAR},
</if>
<if test="minUnitCheck != null">
min_unit_check = #{minUnitCheck,jdbcType=INTEGER},
</if>
</set>
where BookEntCheckId = #{bookentcheckid,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.rzyc.model.check.BookentcheckCompany">
update bookentcheck_company
set BaseEntId = #{baseentid,jdbcType=VARCHAR},
ChkBillId = #{chkbillid,jdbcType=VARCHAR},
ChkBillName = #{chkbillname,jdbcType=VARCHAR},
CheckSite = #{checksite,jdbcType=VARCHAR},
BegCheckDate = #{begcheckdate,jdbcType=TIMESTAMP},
EndCheckDate = #{endcheckdate,jdbcType=TIMESTAMP},
CheckUniy = #{checkuniy,jdbcType=VARCHAR},
ZhiFaRen = #{zhifaren,jdbcType=VARCHAR},
IDNumber = #{idnumber,jdbcType=VARCHAR},
CheckType = #{checktype,jdbcType=VARCHAR},
CheckContent = #{checkcontent,jdbcType=VARCHAR},
CheckProblem = #{checkproblem,jdbcType=VARCHAR},
IsToTrouble = #{istotrouble,jdbcType=VARCHAR},
ProcessingOpinion = #{processingopinion,jdbcType=VARCHAR},
CheckMethod = #{checkmethod,jdbcType=VARCHAR},
CheckBasis = #{checkbasis,jdbcType=VARCHAR},
CheckObject = #{checkobject,jdbcType=VARCHAR},
CheckState = #{checkstate,jdbcType=VARCHAR},
ConfimDate = #{confimdate,jdbcType=TIMESTAMP},
Remark = #{remark,jdbcType=VARCHAR},
BookCheckScores = #{bookcheckscores,jdbcType=INTEGER},
CreatedOn = #{createdon,jdbcType=TIMESTAMP},
CreatedBy = #{createdby,jdbcType=VARCHAR},
ModifiedOn = #{modifiedon,jdbcType=TIMESTAMP},
ModifiedBy = #{modifiedby,jdbcType=VARCHAR},
min_unit_check = #{minUnitCheck,jdbcType=INTEGER}
where BookEntCheckId = #{bookentcheckid,jdbcType=VARCHAR}
</update>
</mapper>