Merge remote-tracking branch 'origin/main'
This commit is contained in:
110
zhyc-module/src/main/resources/mapper/biosafety/DewormMapper.xml
Normal file
110
zhyc-module/src/main/resources/mapper/biosafety/DewormMapper.xml
Normal file
@@ -0,0 +1,110 @@
|
||||
<?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.zhyc.module.biosafety.mapper.DewormMapper">
|
||||
|
||||
<resultMap type="Deworm" id="DewormResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="sheepId" column="sheep_id" />
|
||||
<result property="usageId" column="usage_id" />
|
||||
<result property="variety" column="variety" />
|
||||
<result property="sheepType" column="sheep_type" />
|
||||
<result property="gender" column="gender" />
|
||||
<result property="monthAge" column="month_age" />
|
||||
<result property="parity" column="parity" />
|
||||
<result property="datetime" column="datetime" />
|
||||
<result property="technical" column="technical" />
|
||||
<result property="comment" column="comment" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDewormVo">
|
||||
select id, sheep_id, usage_id, variety, sheep_type, gender, month_age, parity, datetime, technical, comment, update_by, update_time, create_by, create_time from sw_deworm
|
||||
</sql>
|
||||
|
||||
<select id="selectDewormList" parameterType="Deworm" resultMap="DewormResult">
|
||||
<include refid="selectDewormVo"/>
|
||||
<where>
|
||||
<if test="sheepId != null "> and sheep_id = #{sheepId}</if>
|
||||
<if test="params.beginDatetime != null and params.beginDatetime != '' and params.endDatetime != null and params.endDatetime != ''"> and datetime between #{params.beginDatetime} and #{params.endDatetime}</if>
|
||||
<if test="technical != null and technical != ''"> and technical = #{technical}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDewormById" parameterType="Long" resultMap="DewormResult">
|
||||
<include refid="selectDewormVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDeworm" parameterType="Deworm" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sw_deworm
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="sheepId != null">sheep_id,</if>
|
||||
<if test="usageId != null">usage_id,</if>
|
||||
<if test="variety != null">variety,</if>
|
||||
<if test="sheepType != null">sheep_type,</if>
|
||||
<if test="gender != null">gender,</if>
|
||||
<if test="monthAge != null">month_age,</if>
|
||||
<if test="parity != null">parity,</if>
|
||||
<if test="datetime != null">datetime,</if>
|
||||
<if test="technical != null">technical,</if>
|
||||
<if test="comment != null">comment,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="sheepId != null">#{sheepId},</if>
|
||||
<if test="usageId != null">#{usageId},</if>
|
||||
<if test="variety != null">#{variety},</if>
|
||||
<if test="sheepType != null">#{sheepType},</if>
|
||||
<if test="gender != null">#{gender},</if>
|
||||
<if test="monthAge != null">#{monthAge},</if>
|
||||
<if test="parity != null">#{parity},</if>
|
||||
<if test="datetime != null">#{datetime},</if>
|
||||
<if test="technical != null">#{technical},</if>
|
||||
<if test="comment != null">#{comment},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDeworm" parameterType="Deworm">
|
||||
update sw_deworm
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="sheepId != null">sheep_id = #{sheepId},</if>
|
||||
<if test="usageId != null">usage_id = #{usageId},</if>
|
||||
<if test="variety != null">variety = #{variety},</if>
|
||||
<if test="sheepType != null">sheep_type = #{sheepType},</if>
|
||||
<if test="gender != null">gender = #{gender},</if>
|
||||
<if test="monthAge != null">month_age = #{monthAge},</if>
|
||||
<if test="parity != null">parity = #{parity},</if>
|
||||
<if test="datetime != null">datetime = #{datetime},</if>
|
||||
<if test="technical != null">technical = #{technical},</if>
|
||||
<if test="comment != null">comment = #{comment},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDewormById" parameterType="Long">
|
||||
delete from sw_deworm where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDewormByIds" parameterType="String">
|
||||
delete from sw_deworm where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,118 @@
|
||||
<?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.zhyc.module.biosafety.mapper.DiagnosisMapper">
|
||||
|
||||
<resultMap type="Diagnosis" id="DiagnosisResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="treatId" column="treat_id" />
|
||||
<result property="sheepId" column="sheep_id" />
|
||||
<result property="datetime" column="datetime" />
|
||||
<result property="sheepType" column="sheep_type" />
|
||||
<result property="gender" column="gender" />
|
||||
<result property="parity" column="parity" />
|
||||
<result property="diseasePid" column="disease_pid" />
|
||||
<result property="diseaseId" column="disease_id" />
|
||||
<result property="result" column="result" />
|
||||
<result property="begindate" column="begindate" />
|
||||
<result property="enddate" column="enddate" />
|
||||
<result property="treatDay" column="treat_day" />
|
||||
<result property="sheepfoldId" column="sheepfold_id" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDiagnosisVo">
|
||||
select id, treat_id, sheep_id, datetime, sheep_type, gender, parity, disease_pid, disease_id, result, begindate, enddate, treat_day, sheepfold_id, create_by, create_time from sw_diagnosis
|
||||
</sql>
|
||||
|
||||
<select id="selectDiagnosisList" parameterType="Diagnosis" resultMap="DiagnosisResult">
|
||||
<include refid="selectDiagnosisVo"/>
|
||||
<where>
|
||||
<if test="sheepId != null "> and sheep_id = #{sheepId}</if>
|
||||
<if test="params.beginDatetime != null and params.beginDatetime != '' and params.endDatetime != null and params.endDatetime != ''"> and datetime between #{params.beginDatetime} and #{params.endDatetime}</if>
|
||||
<if test="diseasePid != null "> and disease_pid = #{diseasePid}</if>
|
||||
<if test="diseaseId != null "> and disease_id = #{diseaseId}</if>
|
||||
<if test="result != null "> and result = #{result}</if>
|
||||
<if test="treatDay != null "> and treat_day = #{treatDay}</if>
|
||||
<if test="sheepfoldId != null "> and sheepfold_id = #{sheepfoldId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDiagnosisById" parameterType="Long" resultMap="DiagnosisResult">
|
||||
<include refid="selectDiagnosisVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDiagnosis" parameterType="Diagnosis" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sw_diagnosis
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="treatId != null">treat_id,</if>
|
||||
<if test="sheepId != null">sheep_id,</if>
|
||||
<if test="datetime != null">datetime,</if>
|
||||
<if test="sheepType != null">sheep_type,</if>
|
||||
<if test="gender != null">gender,</if>
|
||||
<if test="parity != null">parity,</if>
|
||||
<if test="diseasePid != null">disease_pid,</if>
|
||||
<if test="diseaseId != null">disease_id,</if>
|
||||
<if test="result != null">result,</if>
|
||||
<if test="begindate != null">begindate,</if>
|
||||
<if test="enddate != null">enddate,</if>
|
||||
<if test="treatDay != null">treat_day,</if>
|
||||
<if test="sheepfoldId != null">sheepfold_id,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="treatId != null">#{treatId},</if>
|
||||
<if test="sheepId != null">#{sheepId},</if>
|
||||
<if test="datetime != null">#{datetime},</if>
|
||||
<if test="sheepType != null">#{sheepType},</if>
|
||||
<if test="gender != null">#{gender},</if>
|
||||
<if test="parity != null">#{parity},</if>
|
||||
<if test="diseasePid != null">#{diseasePid},</if>
|
||||
<if test="diseaseId != null">#{diseaseId},</if>
|
||||
<if test="result != null">#{result},</if>
|
||||
<if test="begindate != null">#{begindate},</if>
|
||||
<if test="enddate != null">#{enddate},</if>
|
||||
<if test="treatDay != null">#{treatDay},</if>
|
||||
<if test="sheepfoldId != null">#{sheepfoldId},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDiagnosis" parameterType="Diagnosis">
|
||||
update sw_diagnosis
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="treatId != null">treat_id = #{treatId},</if>
|
||||
<if test="sheepId != null">sheep_id = #{sheepId},</if>
|
||||
<if test="datetime != null">datetime = #{datetime},</if>
|
||||
<if test="sheepType != null">sheep_type = #{sheepType},</if>
|
||||
<if test="gender != null">gender = #{gender},</if>
|
||||
<if test="parity != null">parity = #{parity},</if>
|
||||
<if test="diseasePid != null">disease_pid = #{diseasePid},</if>
|
||||
<if test="diseaseId != null">disease_id = #{diseaseId},</if>
|
||||
<if test="result != null">result = #{result},</if>
|
||||
<if test="begindate != null">begindate = #{begindate},</if>
|
||||
<if test="enddate != null">enddate = #{enddate},</if>
|
||||
<if test="treatDay != null">treat_day = #{treatDay},</if>
|
||||
<if test="sheepfoldId != null">sheepfold_id = #{sheepfoldId},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDiagnosisById" parameterType="Long">
|
||||
delete from sw_diagnosis where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDiagnosisByIds" parameterType="String">
|
||||
delete from sw_diagnosis where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,102 @@
|
||||
<?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.zhyc.module.biosafety.mapper.DisinfectMapper">
|
||||
|
||||
<resultMap type="Disinfect" id="DisinfectResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="sheepfoldId" column="sheepfold_id" />
|
||||
<result property="datetime" column="datetime" />
|
||||
<result property="technician" column="technician" />
|
||||
<result property="way" column="way" />
|
||||
<result property="usageId" column="usage_id" />
|
||||
<result property="ratio" column="ratio" />
|
||||
<result property="comment" column="comment" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDisinfectVo">
|
||||
select id, sheepfold_id, datetime, technician, way, usage_id, ratio, comment, update_by, update_time, create_by, create_time from sw_disinfect
|
||||
</sql>
|
||||
|
||||
<select id="selectDisinfectList" parameterType="Disinfect" resultMap="DisinfectResult">
|
||||
<include refid="selectDisinfectVo"/>
|
||||
<where>
|
||||
<if test="sheepfoldId != null "> and sheepfold_id = #{sheepfoldId}</if>
|
||||
<if test="datetime != null "> and datetime = #{datetime}</if>
|
||||
<if test="technician != null and technician != ''"> and technician = #{technician}</if>
|
||||
<if test="way != null and way != ''"> and way = #{way}</if>
|
||||
<if test="usageId != null "> and usage_id = #{usageId}</if>
|
||||
<if test="ratio != null and ratio != ''"> and ratio = #{ratio}</if>
|
||||
<if test="comment != null and comment != ''"> and comment = #{comment}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDisinfectById" parameterType="Long" resultMap="DisinfectResult">
|
||||
<include refid="selectDisinfectVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDisinfect" parameterType="Disinfect" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sw_disinfect
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="sheepfoldId != null">sheepfold_id,</if>
|
||||
<if test="datetime != null">datetime,</if>
|
||||
<if test="technician != null">technician,</if>
|
||||
<if test="way != null">way,</if>
|
||||
<if test="usageId != null">usage_id,</if>
|
||||
<if test="ratio != null">ratio,</if>
|
||||
<if test="comment != null">comment,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="sheepfoldId != null">#{sheepfoldId},</if>
|
||||
<if test="datetime != null">#{datetime},</if>
|
||||
<if test="technician != null">#{technician},</if>
|
||||
<if test="way != null">#{way},</if>
|
||||
<if test="usageId != null">#{usageId},</if>
|
||||
<if test="ratio != null">#{ratio},</if>
|
||||
<if test="comment != null">#{comment},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDisinfect" parameterType="Disinfect">
|
||||
update sw_disinfect
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="sheepfoldId != null">sheepfold_id = #{sheepfoldId},</if>
|
||||
<if test="datetime != null">datetime = #{datetime},</if>
|
||||
<if test="technician != null">technician = #{technician},</if>
|
||||
<if test="way != null">way = #{way},</if>
|
||||
<if test="usageId != null">usage_id = #{usageId},</if>
|
||||
<if test="ratio != null">ratio = #{ratio},</if>
|
||||
<if test="comment != null">comment = #{comment},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDisinfectById" parameterType="Long">
|
||||
delete from sw_disinfect where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDisinfectByIds" parameterType="String">
|
||||
delete from sw_disinfect where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
113
zhyc-module/src/main/resources/mapper/biosafety/HealthMapper.xml
Normal file
113
zhyc-module/src/main/resources/mapper/biosafety/HealthMapper.xml
Normal file
@@ -0,0 +1,113 @@
|
||||
<?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.zhyc.module.biosafety.mapper.HealthMapper">
|
||||
|
||||
<resultMap type="Health" id="HealthResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="datetime" column="datetime" />
|
||||
<result property="sheepId" column="sheep_id" />
|
||||
<result property="usageId" column="usage_id" />
|
||||
<result property="variety" column="variety" />
|
||||
<result property="sheepType" column="sheep_type" />
|
||||
<result property="gender" column="gender" />
|
||||
<result property="monthAge" column="month_age" />
|
||||
<result property="parity" column="parity" />
|
||||
<result property="sheepfoldId" column="sheepfold_id" />
|
||||
<result property="technical" column="technical" />
|
||||
<result property="comment" column="comment" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectHealthVo">
|
||||
select id, datetime, sheep_id, usage_id, variety, sheep_type, gender, month_age, parity, sheepfold_id, technical, comment, update_by, update_time, create_by, create_time from sw_health
|
||||
</sql>
|
||||
|
||||
<select id="selectHealthList" parameterType="Health" resultMap="HealthResult">
|
||||
<include refid="selectHealthVo"/>
|
||||
<where>
|
||||
<if test="datetime != null "> and datetime = #{datetime}</if>
|
||||
<if test="technical != null and technical != ''"> and technical = #{technical}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectHealthById" parameterType="Long" resultMap="HealthResult">
|
||||
<include refid="selectHealthVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertHealth" parameterType="Health" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sw_health
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="datetime != null">datetime,</if>
|
||||
<if test="sheepId != null">sheep_id,</if>
|
||||
<if test="usageId != null">usage_id,</if>
|
||||
<if test="variety != null">variety,</if>
|
||||
<if test="sheepType != null">sheep_type,</if>
|
||||
<if test="gender != null">gender,</if>
|
||||
<if test="monthAge != null">month_age,</if>
|
||||
<if test="parity != null">parity,</if>
|
||||
<if test="sheepfoldId != null">sheepfold_id,</if>
|
||||
<if test="technical != null">technical,</if>
|
||||
<if test="comment != null">comment,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="datetime != null">#{datetime},</if>
|
||||
<if test="sheepId != null">#{sheepId},</if>
|
||||
<if test="usageId != null">#{usageId},</if>
|
||||
<if test="variety != null">#{variety},</if>
|
||||
<if test="sheepType != null">#{sheepType},</if>
|
||||
<if test="gender != null">#{gender},</if>
|
||||
<if test="monthAge != null">#{monthAge},</if>
|
||||
<if test="parity != null">#{parity},</if>
|
||||
<if test="sheepfoldId != null">#{sheepfoldId},</if>
|
||||
<if test="technical != null">#{technical},</if>
|
||||
<if test="comment != null">#{comment},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateHealth" parameterType="Health">
|
||||
update sw_health
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="datetime != null">datetime = #{datetime},</if>
|
||||
<if test="sheepId != null">sheep_id = #{sheepId},</if>
|
||||
<if test="usageId != null">usage_id = #{usageId},</if>
|
||||
<if test="variety != null">variety = #{variety},</if>
|
||||
<if test="sheepType != null">sheep_type = #{sheepType},</if>
|
||||
<if test="gender != null">gender = #{gender},</if>
|
||||
<if test="monthAge != null">month_age = #{monthAge},</if>
|
||||
<if test="parity != null">parity = #{parity},</if>
|
||||
<if test="sheepfoldId != null">sheepfold_id = #{sheepfoldId},</if>
|
||||
<if test="technical != null">technical = #{technical},</if>
|
||||
<if test="comment != null">comment = #{comment},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteHealthById" parameterType="Long">
|
||||
delete from sw_health where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteHealthByIds" parameterType="String">
|
||||
delete from sw_health where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,115 @@
|
||||
<?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.zhyc.module.biosafety.mapper.ImmunityMapper">
|
||||
|
||||
<resultMap type="Immunity" id="ImmunityResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="sheepId" column="sheep_id" />
|
||||
<result property="usageId" column="usage_id" />
|
||||
<result property="variety" column="variety" />
|
||||
<result property="sheepType" column="sheep_type" />
|
||||
<result property="gender" column="gender" />
|
||||
<result property="monthAge" column="month_age" />
|
||||
<result property="parity" column="parity" />
|
||||
<result property="sheepfoldId" column="sheepfold_id" />
|
||||
<result property="datetime" column="datetime" />
|
||||
<result property="technical" column="technical" />
|
||||
<result property="comment" column="comment" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectImmunityVo">
|
||||
select id, sheep_id, usage_id, variety, sheep_type, gender, month_age, parity, sheepfold_id, datetime, technical, comment, update_by, update_time, create_by, create_time from sw_immunity
|
||||
</sql>
|
||||
|
||||
<select id="selectImmunityList" parameterType="Immunity" resultMap="ImmunityResult">
|
||||
<include refid="selectImmunityVo"/>
|
||||
<where>
|
||||
<if test="sheepId != null "> and sheep_id = #{sheepId}</if>
|
||||
<if test="sheepType != null "> and sheep_type = #{sheepType}</if>
|
||||
<if test="params.beginDatetime != null and params.beginDatetime != '' and params.endDatetime != null and params.endDatetime != ''"> and datetime between #{params.beginDatetime} and #{params.endDatetime}</if>
|
||||
<if test="technical != null and technical != ''"> and technical = #{technical}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectImmunityById" parameterType="Long" resultMap="ImmunityResult">
|
||||
<include refid="selectImmunityVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertImmunity" parameterType="Immunity" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sw_immunity
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="sheepId != null">sheep_id,</if>
|
||||
<if test="usageId != null">usage_id,</if>
|
||||
<if test="variety != null">variety,</if>
|
||||
<if test="sheepType != null">sheep_type,</if>
|
||||
<if test="gender != null">gender,</if>
|
||||
<if test="monthAge != null">month_age,</if>
|
||||
<if test="parity != null">parity,</if>
|
||||
<if test="sheepfoldId != null">sheepfold_id,</if>
|
||||
<if test="datetime != null">datetime,</if>
|
||||
<if test="technical != null">technical,</if>
|
||||
<if test="comment != null">comment,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="sheepId != null">#{sheepId},</if>
|
||||
<if test="usageId != null">#{usageId},</if>
|
||||
<if test="variety != null">#{variety},</if>
|
||||
<if test="sheepType != null">#{sheepType},</if>
|
||||
<if test="gender != null">#{gender},</if>
|
||||
<if test="monthAge != null">#{monthAge},</if>
|
||||
<if test="parity != null">#{parity},</if>
|
||||
<if test="sheepfoldId != null">#{sheepfoldId},</if>
|
||||
<if test="datetime != null">#{datetime},</if>
|
||||
<if test="technical != null">#{technical},</if>
|
||||
<if test="comment != null">#{comment},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateImmunity" parameterType="Immunity">
|
||||
update sw_immunity
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="sheepId != null">sheep_id = #{sheepId},</if>
|
||||
<if test="usageId != null">usage_id = #{usageId},</if>
|
||||
<if test="variety != null">variety = #{variety},</if>
|
||||
<if test="sheepType != null">sheep_type = #{sheepType},</if>
|
||||
<if test="gender != null">gender = #{gender},</if>
|
||||
<if test="monthAge != null">month_age = #{monthAge},</if>
|
||||
<if test="parity != null">parity = #{parity},</if>
|
||||
<if test="sheepfoldId != null">sheepfold_id = #{sheepfoldId},</if>
|
||||
<if test="datetime != null">datetime = #{datetime},</if>
|
||||
<if test="technical != null">technical = #{technical},</if>
|
||||
<if test="comment != null">comment = #{comment},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteImmunityById" parameterType="Long">
|
||||
delete from sw_immunity where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteImmunityByIds" parameterType="String">
|
||||
delete from sw_immunity where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,135 @@
|
||||
<?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.zhyc.module.biosafety.mapper.TreatmentMapper">
|
||||
|
||||
<resultMap type="Treatment" id="TreatmentResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="diagId" column="diag_id" />
|
||||
<result property="sheepId" column="sheep_id" />
|
||||
<result property="variety" column="variety" />
|
||||
<result property="sheepType" column="sheep_type" />
|
||||
<result property="monthAge" column="month_age" />
|
||||
<result property="gender" column="gender" />
|
||||
<result property="parity" column="parity" />
|
||||
<result property="breed" column="breed" />
|
||||
<result property="lactDay" column="lact_day" />
|
||||
<result property="gestDay" column="gest_day" />
|
||||
<result property="datetime" column="datetime" />
|
||||
<result property="diseaseId" column="disease_id" />
|
||||
<result property="diseasePid" column="disease_pid" />
|
||||
<result property="veterinary" column="veterinary" />
|
||||
<result property="usageId" column="usage_id" />
|
||||
<result property="comment" column="comment" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectTreatmentVo">
|
||||
select id, diag_id, sheep_id, variety, sheep_type, month_age, gender, parity, breed, lact_day, gest_day, datetime, disease_id, disease_pid, veterinary, usage_id, comment, update_by, update_time, create_by, create_time from sw_treatment
|
||||
</sql>
|
||||
|
||||
<select id="selectTreatmentList" parameterType="Treatment" resultMap="TreatmentResult">
|
||||
<include refid="selectTreatmentVo"/>
|
||||
<where>
|
||||
<if test="sheepId != null "> and sheep_id = #{sheepId}</if>
|
||||
<if test="params.beginDatetime != null and params.beginDatetime != '' and params.endDatetime != null and params.endDatetime != ''"> and datetime between #{params.beginDatetime} and #{params.endDatetime}</if>
|
||||
<if test="diseaseId != null "> and disease_id = #{diseaseId}</if>
|
||||
<if test="veterinary != null and veterinary != ''"> and veterinary = #{veterinary}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectTreatmentById" parameterType="Long" resultMap="TreatmentResult">
|
||||
<include refid="selectTreatmentVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertTreatment" parameterType="Treatment" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sw_treatment
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="diagId != null">diag_id,</if>
|
||||
<if test="sheepId != null">sheep_id,</if>
|
||||
<if test="variety != null">variety,</if>
|
||||
<if test="sheepType != null">sheep_type,</if>
|
||||
<if test="monthAge != null">month_age,</if>
|
||||
<if test="gender != null">gender,</if>
|
||||
<if test="parity != null">parity,</if>
|
||||
<if test="breed != null">breed,</if>
|
||||
<if test="lactDay != null">lact_day,</if>
|
||||
<if test="gestDay != null">gest_day,</if>
|
||||
<if test="datetime != null">datetime,</if>
|
||||
<if test="diseaseId != null">disease_id,</if>
|
||||
<if test="diseasePid != null">disease_pid,</if>
|
||||
<if test="veterinary != null">veterinary,</if>
|
||||
<if test="usageId != null">usage_id,</if>
|
||||
<if test="comment != null">comment,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="diagId != null">#{diagId},</if>
|
||||
<if test="sheepId != null">#{sheepId},</if>
|
||||
<if test="variety != null">#{variety},</if>
|
||||
<if test="sheepType != null">#{sheepType},</if>
|
||||
<if test="monthAge != null">#{monthAge},</if>
|
||||
<if test="gender != null">#{gender},</if>
|
||||
<if test="parity != null">#{parity},</if>
|
||||
<if test="breed != null">#{breed},</if>
|
||||
<if test="lactDay != null">#{lactDay},</if>
|
||||
<if test="gestDay != null">#{gestDay},</if>
|
||||
<if test="datetime != null">#{datetime},</if>
|
||||
<if test="diseaseId != null">#{diseaseId},</if>
|
||||
<if test="diseasePid != null">#{diseasePid},</if>
|
||||
<if test="veterinary != null">#{veterinary},</if>
|
||||
<if test="usageId != null">#{usageId},</if>
|
||||
<if test="comment != null">#{comment},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateTreatment" parameterType="Treatment">
|
||||
update sw_treatment
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="diagId != null">diag_id = #{diagId},</if>
|
||||
<if test="sheepId != null">sheep_id = #{sheepId},</if>
|
||||
<if test="variety != null">variety = #{variety},</if>
|
||||
<if test="sheepType != null">sheep_type = #{sheepType},</if>
|
||||
<if test="monthAge != null">month_age = #{monthAge},</if>
|
||||
<if test="gender != null">gender = #{gender},</if>
|
||||
<if test="parity != null">parity = #{parity},</if>
|
||||
<if test="breed != null">breed = #{breed},</if>
|
||||
<if test="lactDay != null">lact_day = #{lactDay},</if>
|
||||
<if test="gestDay != null">gest_day = #{gestDay},</if>
|
||||
<if test="datetime != null">datetime = #{datetime},</if>
|
||||
<if test="diseaseId != null">disease_id = #{diseaseId},</if>
|
||||
<if test="diseasePid != null">disease_pid = #{diseasePid},</if>
|
||||
<if test="veterinary != null">veterinary = #{veterinary},</if>
|
||||
<if test="usageId != null">usage_id = #{usageId},</if>
|
||||
<if test="comment != null">comment = #{comment},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteTreatmentById" parameterType="Long">
|
||||
delete from sw_treatment where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteTreatmentByIds" parameterType="String">
|
||||
delete from sw_treatment where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,142 @@
|
||||
<?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.zhyc.module.dairyProducts.rawMilkTest.mapper.NpRawMilkInspeMapper">
|
||||
|
||||
<resultMap type="NpRawMilkInspe" id="NpRawMilkInspeResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="datetime" column="datetime" />
|
||||
<result property="source" column="source" />
|
||||
<result property="freeze" column="freeze" />
|
||||
<result property="density" column="density" />
|
||||
<result property="fat" column="fat" />
|
||||
<result property="protein" column="protein" />
|
||||
<result property="nonFat" column="non_fat" />
|
||||
<result property="dryMatter" column="dry_matter" />
|
||||
<result property="impurityDegree" column="impurity" />
|
||||
<result property="lactose" column="lactose" />
|
||||
<result property="ashContent" column="ash_content" />
|
||||
<result property="acidity" column="acidity" />
|
||||
<result property="ph" column="ph" />
|
||||
<result property="bacterialColony" column="bacterial_colony" />
|
||||
<result property="lactoferrin" column="lactoferrin" />
|
||||
<result property="ig" column="ig" />
|
||||
<result property="somaticCell" column="somatic_cell" />
|
||||
<result property="usea" column="usea" />
|
||||
<result property="fatRatio" column="fat_ratio" />
|
||||
<result property="comment" column="comment" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectNpRawMilkInspeVo">
|
||||
select id, datetime, source, freeze, density, fat, protein, non_fat, dry_matter,
|
||||
impurity, lactose, ash_content, acidity, ph, bacterial_colony, lactoferrin,
|
||||
ig, somatic_cell, usea, fat_ratio, comment, create_by, create_time
|
||||
from np_raw_milk_inspe
|
||||
</sql>
|
||||
|
||||
<select id="selectNpRawMilkInspeList" parameterType="NpRawMilkInspe" resultMap="NpRawMilkInspeResult">
|
||||
<include refid="selectNpRawMilkInspeVo"/>
|
||||
<where>
|
||||
<if test="datetime != null "> and datetime = #{datetime}</if>
|
||||
<if test="source != null and source != ''"> and source like concat('%', #{source}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectNpRawMilkInspeById" parameterType="Long" resultMap="NpRawMilkInspeResult">
|
||||
<include refid="selectNpRawMilkInspeVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertNpRawMilkInspe" parameterType="NpRawMilkInspe" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into np_raw_milk_inspe
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="datetime != null">datetime,</if>
|
||||
<if test="source != null">source,</if>
|
||||
<if test="freeze != null">freeze,</if>
|
||||
<if test="density != null">density,</if>
|
||||
<if test="fat != null">fat,</if>
|
||||
<if test="protein != null">protein,</if>
|
||||
<if test="nonFat != null">non_fat,</if>
|
||||
<if test="dryMatter != null">dry_matter,</if>
|
||||
<if test="impurityDegree != null">impurity,</if>
|
||||
<if test="lactose != null">lactose,</if>
|
||||
<if test="ashContent != null">ash_content,</if>
|
||||
<if test="acidity != null">acidity,</if>
|
||||
<if test="ph != null">ph,</if>
|
||||
<if test="bacterialColony != null">bacterial_colony,</if>
|
||||
<if test="lactoferrin != null">lactoferrin,</if>
|
||||
<if test="ig != null">ig,</if>
|
||||
<if test="somaticCell != null">somatic_cell,</if>
|
||||
<if test="usea != null">usea,</if>
|
||||
<if test="fatRatio != null">fat_ratio,</if>
|
||||
<if test="comment != null">comment,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="datetime != null">#{datetime},</if>
|
||||
<if test="source != null">#{source},</if>
|
||||
<if test="freeze != null">#{freeze},</if>
|
||||
<if test="density != null">#{density},</if>
|
||||
<if test="fat != null">#{fat},</if>
|
||||
<if test="protein != null">#{protein},</if>
|
||||
<if test="nonFat != null">#{nonFat},</if>
|
||||
<if test="dryMatter != null">#{dryMatter},</if>
|
||||
<if test="impurityDegree != null">#{impurityDegree},</if>
|
||||
<if test="lactose != null">#{lactose},</if>
|
||||
<if test="ashContent != null">#{ashContent},</if>
|
||||
<if test="acidity != null">#{acidity},</if>
|
||||
<if test="ph != null">#{ph},</if>
|
||||
<if test="bacterialColony != null">#{bacterialColony},</if>
|
||||
<if test="lactoferrin != null">#{lactoferrin},</if>
|
||||
<if test="ig != null">#{ig},</if>
|
||||
<if test="somaticCell != null">#{somaticCell},</if>
|
||||
<if test="usea != null">#{usea},</if>
|
||||
<if test="fatRatio != null">#{fatRatio},</if>
|
||||
<if test="comment != null">#{comment},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateNpRawMilkInspe" parameterType="NpRawMilkInspe">
|
||||
update np_raw_milk_inspe
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="datetime != null">datetime = #{datetime},</if>
|
||||
<if test="source != null">source = #{source},</if>
|
||||
<if test="freeze != null">freeze = #{freeze},</if>
|
||||
<if test="density != null">density = #{density},</if>
|
||||
<if test="fat != null">fat = #{fat},</if>
|
||||
<if test="protein != null">protein = #{protein},</if>
|
||||
<if test="nonFat != null">non_fat = #{nonFat},</if>
|
||||
<if test="dryMatter != null">dry_matter = #{dryMatter},</if>
|
||||
<if test="impurityDegree != null">impurity = #{impurityDegree},</if>
|
||||
<if test="lactose != null">lactose = #{lactose},</if>
|
||||
<if test="ashContent != null">ash_content = #{ashContent},</if>
|
||||
<if test="acidity != null">acidity = #{acidity},</if>
|
||||
<if test="ph != null">ph = #{ph},</if>
|
||||
<if test="bacterialColony != null">bacterial_colony = #{bacterialColony},</if>
|
||||
<if test="lactoferrin != null">lactoferrin = #{lactoferrin},</if>
|
||||
<if test="ig != null">ig = #{ig},</if>
|
||||
<if test="somaticCell != null">somatic_cell = #{somaticCell},</if>
|
||||
<if test="usea != null">usea = #{usea},</if>
|
||||
<if test="fatRatio != null">fat_ratio = #{fatRatio},</if>
|
||||
<if test="comment != null">comment = #{comment},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteNpRawMilkInspeById" parameterType="Long">
|
||||
delete from np_raw_milk_inspe where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteNpRawMilkInspeByIds" parameterType="String">
|
||||
delete from np_raw_milk_inspe where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -311,4 +311,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -5,45 +5,52 @@
|
||||
|
||||
<mapper namespace="com.zhyc.module.produce.manage_sheep.add_sheep.mapper.ScAddSheepMapper">
|
||||
<resultMap type="com.zhyc.module.produce.manage_sheep.add_sheep.domain.ScAddSheep" id="ScAddSheepResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="sheepId" column="sheep_id" />
|
||||
<result property="sheepfold" column="sheepfold" />
|
||||
<result property="father" column="father" />
|
||||
<result property="mother" column="mother" />
|
||||
<result property="bornWeight" column="born_weight" />
|
||||
<result property="birthday" column="birthday" />
|
||||
<result property="gender" column="gender" />
|
||||
<result property="parity" column="parity" />
|
||||
<result property="varietyId" column="variety_id" />
|
||||
<result property="joinDate" column="join_date" />
|
||||
<result property="comment" column="comment" />
|
||||
<result property="technician" column="technician" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="id" column="id"/>
|
||||
<result property="earNumber" column="ear_number"/>
|
||||
<result property="sheepfold" column="sheepfold"/>
|
||||
<result property="sheepfoldName" column="sheepfoldName"/>
|
||||
<result property="sheepfoldNameExcel" column="sheepfoldName"/>
|
||||
<result property="father" column="father"/>
|
||||
<result property="mother" column="mother"/>
|
||||
<result property="bornWeight" column="born_weight"/>
|
||||
<result property="birthday" column="birthday"/>
|
||||
<result property="gender" column="gender"/>
|
||||
<result property="parity" column="parity"/>
|
||||
<result property="varietyId" column="variety_id"/>
|
||||
<result property="joinDate" column="join_date"/>
|
||||
<result property="comment" column="comment"/>
|
||||
<result property="technician" column="technician"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
</resultMap>
|
||||
|
||||
<insert id="insert" parameterType="ScAddSheep" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO sc_add_sheep
|
||||
(sheep_id, sheepfold, father, mother, born_weight, birthday, gender, parity,
|
||||
(ear_number, sheepfold, father, mother, born_weight, birthday, gender, parity,
|
||||
variety_id, join_date, comment, technician, create_by, create_time)
|
||||
VALUES
|
||||
(#{sheepId}, #{sheepfold}, #{father}, #{mother}, #{bornWeight}, #{birthday},
|
||||
#{gender}, #{parity}, #{varietyId}, #{joinDate}, #{comment}, #{technician},
|
||||
#{createBy}, #{createTime})
|
||||
VALUES (#{earNumber}, #{sheepfold}, #{father}, #{mother}, #{bornWeight}, #{birthday},
|
||||
#{gender}, #{parity}, #{varietyId}, #{joinDate}, #{comment}, #{technician},
|
||||
#{createBy}, #{createTime})
|
||||
</insert>
|
||||
|
||||
|
||||
<select id="selectScAddSheepList" parameterType="ScAddSheep" resultMap="ScAddSheepResult">
|
||||
SELECT * FROM sc_add_sheep
|
||||
SELECT
|
||||
sas.*,
|
||||
sf.sheepfold_name AS sheepfoldName
|
||||
FROM sc_add_sheep sas
|
||||
LEFT JOIN da_sheepfold sf ON sas.sheepfold = sf.id
|
||||
<where>
|
||||
<if test="sheepId != null and sheepId != ''">AND sheep_id LIKE CONCAT('%', #{sheepId}, '%')</if>
|
||||
<!-- 其他字段同理,按需扩展 -->
|
||||
<if test="earNumber != null and earNumber != ''">
|
||||
AND sas.ear_number LIKE CONCAT('%', #{earNumber}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<update id="updateScAddSheep" parameterType="ScAddSheep">
|
||||
UPDATE sc_add_sheep
|
||||
<set>
|
||||
sheep_id = #{sheepId},
|
||||
ear_number = #{earNumber},
|
||||
sheepfold = #{sheepfold},
|
||||
father = #{father},
|
||||
mother = #{mother},
|
||||
@@ -68,4 +75,7 @@
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectByEarNumber" parameterType="string" resultMap="ScAddSheepResult">
|
||||
SELECT * FROM sc_add_sheep WHERE ear_number = #{earNumber}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,40 +1,57 @@
|
||||
<?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">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhyc.module.produce.manage_sheep.trans_group.mapper.ScTransGroupMapper">
|
||||
|
||||
|
||||
<resultMap type="ScTransGroup" id="ScTransGroupResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="sheepId" column="sheep_id" />
|
||||
<result property="foldTo" column="fold_to" />
|
||||
<result property="foldFrom" column="fold_from" />
|
||||
<result property="reason" column="reason" />
|
||||
<result property="technician" column="technician" />
|
||||
<result property="status" column="status" />
|
||||
<result property="comment" column="comment" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="id" column="id"/>
|
||||
<result property="sheepId" column="sheep_id"/>
|
||||
<result property="foldTo" column="fold_to"/>
|
||||
<result property="foldFrom" column="fold_from"/>
|
||||
<result property="reason" column="reason"/>
|
||||
<result property="technician" column="technician"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="comment" column="comment"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectScTransGroupVo">
|
||||
select id, sheep_id, fold_to, fold_from, reason, technician, status, comment, create_by, create_time from sc_trans_group
|
||||
SELECT tg.id,
|
||||
tg.sheep_id,
|
||||
tg.fold_to,
|
||||
tg.fold_from,
|
||||
tg.reason,
|
||||
tg.technician,
|
||||
tg.status,
|
||||
tg.comment,
|
||||
tg.create_by,
|
||||
tg.create_time,
|
||||
sf_from.sheepfold_name AS foldFromName,
|
||||
sf_to.sheepfold_name AS foldToName
|
||||
FROM sc_trans_group tg
|
||||
LEFT JOIN da_sheepfold sf_from ON tg.fold_from = sf_from.id
|
||||
LEFT JOIN da_sheepfold sf_to ON tg.fold_to = sf_to.id
|
||||
</sql>
|
||||
|
||||
<select id="selectScTransGroupList" parameterType="ScTransGroup" resultMap="ScTransGroupResult">
|
||||
<include refid="selectScTransGroupVo"/>
|
||||
<where>
|
||||
<if test="sheepId != null "> and sheep_id = #{sheepId}</if>
|
||||
<if test="foldTo != null and foldTo != ''"> and fold_to = #{foldTo}</if>
|
||||
<if test="foldFrom != null and foldFrom != ''"> and fold_from = #{foldFrom}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
|
||||
<where>
|
||||
<if test="sheepId != null ">and sheep_id = #{sheepId}</if>
|
||||
<if test="foldTo != null and foldTo != ''">and fold_to = #{foldTo}</if>
|
||||
<if test="foldFrom != null and foldFrom != ''">and fold_from = #{foldFrom}</if>
|
||||
<if test="status != null ">and status = #{status}</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
|
||||
and create_time between #{params.beginCreateTime} and #{params.endCreateTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="selectScTransGroupById" parameterType="Integer" resultMap="ScTransGroupResult">
|
||||
<include refid="selectScTransGroupVo"/>
|
||||
where id = #{id}
|
||||
where tg.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertScTransGroup" parameterType="ScTransGroup" useGeneratedKeys="true" keyProperty="id">
|
||||
@@ -49,7 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="comment != null">comment,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="sheepId != null">#{sheepId},</if>
|
||||
<if test="foldTo != null and foldTo != ''">#{foldTo},</if>
|
||||
@@ -60,7 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="comment != null">#{comment},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateScTransGroup" parameterType="ScTransGroup">
|
||||
@@ -76,15 +93,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
where sc_trans_group.id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteScTransGroupById" parameterType="Integer">
|
||||
delete from sc_trans_group where id = #{id}
|
||||
delete
|
||||
from sc_trans_group
|
||||
where tg.id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteScTransGroupByIds" parameterType="String">
|
||||
delete from sc_trans_group where id in
|
||||
delete from sc_trans_group where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
||||
@@ -1,47 +1,59 @@
|
||||
<?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">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhyc.module.produce.other.fixHoof.mapper.ScFixHoofMapper">
|
||||
|
||||
|
||||
<resultMap type="ScFixHoof" id="ScFixHoofResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="sheepId" column="sheep_id" />
|
||||
<result property="sheepfold" column="sheepfold" />
|
||||
<result property="comment" column="comment" />
|
||||
<result property="technician" column="technician" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="id" column="id"/>
|
||||
<result property="sheepId" column="sheep_id"/>
|
||||
<result property="sheepfold" column="sheepfold"/>
|
||||
<result property="sheepfoldName" column="sheepfoldName"/>
|
||||
<result property="comment" column="comment"/>
|
||||
<result property="technician" column="technician"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectScFixHoofVo">
|
||||
select id, sheep_id, sheepfold, comment, technician, create_by, create_time from sc_fix_hoof
|
||||
select fh.id,
|
||||
fh.sheep_id,
|
||||
fh.sheepfold,
|
||||
sf.sheepfold_name as sheepfoldName,
|
||||
fh.comment,
|
||||
fh.technician,
|
||||
fh.create_by,
|
||||
fh.create_time
|
||||
from sc_fix_hoof fh
|
||||
left join da_sheepfold sf on fh.sheepfold = sf.id
|
||||
</sql>
|
||||
|
||||
<select id="selectScFixHoofList" parameterType="ScFixHoof" resultMap="ScFixHoofResult">
|
||||
<include refid="selectScFixHoofVo"/>
|
||||
<where>
|
||||
<if test="sheepId != null "> and sheep_id = #{sheepId}</if>
|
||||
<if test="sheepfold != null "> and sheepfold = #{sheepfold}</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
|
||||
<where>
|
||||
<if test="sheepId != null ">and sheep_id = #{sheepId}</if>
|
||||
<if test="sheepfold != null ">and sheepfold = #{sheepfold}</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
|
||||
and create_time between #{params.beginCreateTime} and #{params.endCreateTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectScFixHoofById" parameterType="Long" resultMap="ScFixHoofResult">
|
||||
|
||||
<select id="selectScFixHoofById" parameterType="java.lang.Integer" resultMap="ScFixHoofResult">
|
||||
<include refid="selectScFixHoofVo"/>
|
||||
where id = #{id}
|
||||
where fh.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertScFixHoof" parameterType="ScFixHoof" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sc_fix_hoof
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="sheepId != null">sheep_id,</if>
|
||||
<if test="sheepfold != null">sheepfold,</if>
|
||||
<if test="sheepId != null and sheepId != ''">and fh.sheep_id like concat('%', #{sheepId}, '%')</if>
|
||||
<if test="sheepfold != null">and fh.sheepfold = #{sheepfold}</if>
|
||||
<if test="comment != null">comment,</if>
|
||||
<if test="technician != null and technician != ''">technician,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="sheepId != null">#{sheepId},</if>
|
||||
<if test="sheepfold != null">#{sheepfold},</if>
|
||||
@@ -49,7 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="technician != null and technician != ''">#{technician},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateScFixHoof" parameterType="ScFixHoof">
|
||||
@@ -65,12 +77,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteScFixHoofById" parameterType="Long">
|
||||
delete from sc_fix_hoof where id = #{id}
|
||||
<delete id="deleteScFixHoofById" parameterType="java.lang.Integer">
|
||||
delete
|
||||
from sc_fix_hoof
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteScFixHoofByIds" parameterType="String">
|
||||
delete from sc_fix_hoof where id in
|
||||
<delete id="deleteScFixHoofByIds" parameterType="java.lang.Integer">
|
||||
delete from sc_fix_hoof where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
||||
@@ -0,0 +1,242 @@
|
||||
<?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.zhyc.module.produce.sheep.mapper.BasSheepMapper">
|
||||
|
||||
<resultMap type="BasSheep" id="BasSheepResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="manageTags" column="manage_tags" />
|
||||
<result property="ranchId" column="ranch_id" />
|
||||
<result property="sheepfoldId" column="sheepfold_id" />
|
||||
<result property="electronicTags" column="electronic_tags" />
|
||||
<result property="varietyId" column="variety_id" />
|
||||
<result property="family" column="family" />
|
||||
<result property="typeId" column="type_id" />
|
||||
<result property="gender" column="gender" />
|
||||
<result property="birthday" column="birthday" />
|
||||
<result property="birthWeight" column="birth_weight" />
|
||||
<result property="parity" column="parity" />
|
||||
<result property="statusId" column="status_id" />
|
||||
<result property="weaningDate" column="weaning_date" />
|
||||
<result property="weaningWeight" column="weaning_weight" />
|
||||
<result property="breedStatusId" column="breed_status_id" />
|
||||
<result property="fatherId" column="father_id" />
|
||||
<result property="motherId" column="mother_id" />
|
||||
<result property="receptorId" column="receptor_id" />
|
||||
<result property="matingDate" column="mating_date" />
|
||||
<result property="matingTypeId" column="mating_type_id" />
|
||||
<result property="pregDate" column="preg_date" />
|
||||
<result property="lambingDate" column="lambing_date" />
|
||||
<result property="lambingDay" column="lambing_day" />
|
||||
<result property="expectedDate" column="expected_date" />
|
||||
<result property="controlled" column="controlled" />
|
||||
<result property="matingCounts" column="mating_counts" />
|
||||
<result property="matingTotal" column="mating_total" />
|
||||
<result property="miscarriageCounts" column="miscarriage_counts" />
|
||||
<result property="body" column="body" />
|
||||
<result property="breast" column="breast" />
|
||||
<result property="source" column="source" />
|
||||
<result property="sourceDate" column="source_date" />
|
||||
<result property="sourceRanchId" column="source_ranch_id" />
|
||||
<result property="comment" column="comment" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="isDelete" column="is_delete" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBasSheepVo">
|
||||
select id, manage_tags, ranch_id, sheepfold_id, electronic_tags, variety_id, family, type_id, gender, birthday, birth_weight, parity, status_id, weaning_date, weaning_weight, breed_status_id, father_id, mother_id, receptor_id, mating_date, mating_type_id, preg_date, lambing_date, lambing_day, expected_date, controlled, mating_counts, mating_total, miscarriage_counts, body, breast, source, source_date, source_ranch_id, comment, update_by, update_time, create_by, create_time, is_delete from bas_sheep
|
||||
</sql>
|
||||
|
||||
<select id="selectBasSheepList" parameterType="BasSheep" resultMap="BasSheepResult">
|
||||
<include refid="selectBasSheepVo"/>
|
||||
<where>
|
||||
<if test="manageTags != null and manageTags != ''"> and manage_tags = #{manageTags}</if>
|
||||
<if test="ranchId != null "> and ranch_id = #{ranchId}</if>
|
||||
<if test="sheepfoldId != null "> and sheepfold_id = #{sheepfoldId}</if>
|
||||
<if test="electronicTags != null and electronicTags != ''"> and electronic_tags = #{electronicTags}</if>
|
||||
<if test="varietyId != null "> and variety_id = #{varietyId}</if>
|
||||
<if test="family != null and family != ''"> and family = #{family}</if>
|
||||
<if test="typeId != null "> and type_id = #{typeId}</if>
|
||||
<if test="gender != null "> and gender = #{gender}</if>
|
||||
<if test="birthday != null "> and birthday = #{birthday}</if>
|
||||
<if test="birthWeight != null "> and birth_weight = #{birthWeight}</if>
|
||||
<if test="parity != null "> and parity = #{parity}</if>
|
||||
<if test="statusId != null "> and status_id = #{statusId}</if>
|
||||
<if test="weaningDate != null "> and weaning_date = #{weaningDate}</if>
|
||||
<if test="weaningWeight != null "> and weaning_weight = #{weaningWeight}</if>
|
||||
<if test="breedStatusId != null "> and breed_status_id = #{breedStatusId}</if>
|
||||
<if test="fatherId != null "> and father_id = #{fatherId}</if>
|
||||
<if test="motherId != null "> and mother_id = #{motherId}</if>
|
||||
<if test="receptorId != null "> and receptor_id = #{receptorId}</if>
|
||||
<if test="matingDate != null "> and mating_date = #{matingDate}</if>
|
||||
<if test="matingTypeId != null "> and mating_type_id = #{matingTypeId}</if>
|
||||
<if test="pregDate != null "> and preg_date = #{pregDate}</if>
|
||||
<if test="lambingDate != null "> and lambing_date = #{lambingDate}</if>
|
||||
<if test="lambingDay != null "> and lambing_day = #{lambingDay}</if>
|
||||
<if test="expectedDate != null "> and expected_date = #{expectedDate}</if>
|
||||
<if test="controlled != null "> and controlled = #{controlled}</if>
|
||||
<if test="matingCounts != null "> and mating_counts = #{matingCounts}</if>
|
||||
<if test="matingTotal != null "> and mating_total = #{matingTotal}</if>
|
||||
<if test="miscarriageCounts != null "> and miscarriage_counts = #{miscarriageCounts}</if>
|
||||
<if test="body != null "> and body = #{body}</if>
|
||||
<if test="breast != null "> and breast = #{breast}</if>
|
||||
<if test="source != null and source != ''"> and source = #{source}</if>
|
||||
<if test="sourceDate != null "> and source_date = #{sourceDate}</if>
|
||||
<if test="sourceRanchId != null "> and source_ranch_id = #{sourceRanchId}</if>
|
||||
<if test="comment != null and comment != ''"> and comment = #{comment}</if>
|
||||
<if test="isDelete != null "> and is_delete = #{isDelete}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBasSheepById" parameterType="Long" resultMap="BasSheepResult">
|
||||
<include refid="selectBasSheepVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBasSheep" parameterType="BasSheep" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into bas_sheep
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="manageTags != null">manage_tags,</if>
|
||||
<if test="ranchId != null">ranch_id,</if>
|
||||
<if test="sheepfoldId != null">sheepfold_id,</if>
|
||||
<if test="electronicTags != null">electronic_tags,</if>
|
||||
<if test="varietyId != null">variety_id,</if>
|
||||
<if test="family != null">family,</if>
|
||||
<if test="typeId != null">type_id,</if>
|
||||
<if test="gender != null">gender,</if>
|
||||
<if test="birthday != null">birthday,</if>
|
||||
<if test="birthWeight != null">birth_weight,</if>
|
||||
<if test="parity != null">parity,</if>
|
||||
<if test="statusId != null">status_id,</if>
|
||||
<if test="weaningDate != null">weaning_date,</if>
|
||||
<if test="weaningWeight != null">weaning_weight,</if>
|
||||
<if test="breedStatusId != null">breed_status_id,</if>
|
||||
<if test="fatherId != null">father_id,</if>
|
||||
<if test="motherId != null">mother_id,</if>
|
||||
<if test="receptorId != null">receptor_id,</if>
|
||||
<if test="matingDate != null">mating_date,</if>
|
||||
<if test="matingTypeId != null">mating_type_id,</if>
|
||||
<if test="pregDate != null">preg_date,</if>
|
||||
<if test="lambingDate != null">lambing_date,</if>
|
||||
<if test="lambingDay != null">lambing_day,</if>
|
||||
<if test="expectedDate != null">expected_date,</if>
|
||||
<if test="controlled != null">controlled,</if>
|
||||
<if test="matingCounts != null">mating_counts,</if>
|
||||
<if test="matingTotal != null">mating_total,</if>
|
||||
<if test="miscarriageCounts != null">miscarriage_counts,</if>
|
||||
<if test="body != null">body,</if>
|
||||
<if test="breast != null">breast,</if>
|
||||
<if test="source != null">source,</if>
|
||||
<if test="sourceDate != null">source_date,</if>
|
||||
<if test="sourceRanchId != null">source_ranch_id,</if>
|
||||
<if test="comment != null">comment,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="isDelete != null">is_delete,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="manageTags != null">#{manageTags},</if>
|
||||
<if test="ranchId != null">#{ranchId},</if>
|
||||
<if test="sheepfoldId != null">#{sheepfoldId},</if>
|
||||
<if test="electronicTags != null">#{electronicTags},</if>
|
||||
<if test="varietyId != null">#{varietyId},</if>
|
||||
<if test="family != null">#{family},</if>
|
||||
<if test="typeId != null">#{typeId},</if>
|
||||
<if test="gender != null">#{gender},</if>
|
||||
<if test="birthday != null">#{birthday},</if>
|
||||
<if test="birthWeight != null">#{birthWeight},</if>
|
||||
<if test="parity != null">#{parity},</if>
|
||||
<if test="statusId != null">#{statusId},</if>
|
||||
<if test="weaningDate != null">#{weaningDate},</if>
|
||||
<if test="weaningWeight != null">#{weaningWeight},</if>
|
||||
<if test="breedStatusId != null">#{breedStatusId},</if>
|
||||
<if test="fatherId != null">#{fatherId},</if>
|
||||
<if test="motherId != null">#{motherId},</if>
|
||||
<if test="receptorId != null">#{receptorId},</if>
|
||||
<if test="matingDate != null">#{matingDate},</if>
|
||||
<if test="matingTypeId != null">#{matingTypeId},</if>
|
||||
<if test="pregDate != null">#{pregDate},</if>
|
||||
<if test="lambingDate != null">#{lambingDate},</if>
|
||||
<if test="lambingDay != null">#{lambingDay},</if>
|
||||
<if test="expectedDate != null">#{expectedDate},</if>
|
||||
<if test="controlled != null">#{controlled},</if>
|
||||
<if test="matingCounts != null">#{matingCounts},</if>
|
||||
<if test="matingTotal != null">#{matingTotal},</if>
|
||||
<if test="miscarriageCounts != null">#{miscarriageCounts},</if>
|
||||
<if test="body != null">#{body},</if>
|
||||
<if test="breast != null">#{breast},</if>
|
||||
<if test="source != null">#{source},</if>
|
||||
<if test="sourceDate != null">#{sourceDate},</if>
|
||||
<if test="sourceRanchId != null">#{sourceRanchId},</if>
|
||||
<if test="comment != null">#{comment},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="isDelete != null">#{isDelete},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBasSheep" parameterType="BasSheep">
|
||||
update bas_sheep
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="manageTags != null">manage_tags = #{manageTags},</if>
|
||||
<if test="ranchId != null">ranch_id = #{ranchId},</if>
|
||||
<if test="sheepfoldId != null">sheepfold_id = #{sheepfoldId},</if>
|
||||
<if test="electronicTags != null">electronic_tags = #{electronicTags},</if>
|
||||
<if test="varietyId != null">variety_id = #{varietyId},</if>
|
||||
<if test="family != null">family = #{family},</if>
|
||||
<if test="typeId != null">type_id = #{typeId},</if>
|
||||
<if test="gender != null">gender = #{gender},</if>
|
||||
<if test="birthday != null">birthday = #{birthday},</if>
|
||||
<if test="birthWeight != null">birth_weight = #{birthWeight},</if>
|
||||
<if test="parity != null">parity = #{parity},</if>
|
||||
<if test="statusId != null">status_id = #{statusId},</if>
|
||||
<if test="weaningDate != null">weaning_date = #{weaningDate},</if>
|
||||
<if test="weaningWeight != null">weaning_weight = #{weaningWeight},</if>
|
||||
<if test="breedStatusId != null">breed_status_id = #{breedStatusId},</if>
|
||||
<if test="fatherId != null">father_id = #{fatherId},</if>
|
||||
<if test="motherId != null">mother_id = #{motherId},</if>
|
||||
<if test="receptorId != null">receptor_id = #{receptorId},</if>
|
||||
<if test="matingDate != null">mating_date = #{matingDate},</if>
|
||||
<if test="matingTypeId != null">mating_type_id = #{matingTypeId},</if>
|
||||
<if test="pregDate != null">preg_date = #{pregDate},</if>
|
||||
<if test="lambingDate != null">lambing_date = #{lambingDate},</if>
|
||||
<if test="lambingDay != null">lambing_day = #{lambingDay},</if>
|
||||
<if test="expectedDate != null">expected_date = #{expectedDate},</if>
|
||||
<if test="controlled != null">controlled = #{controlled},</if>
|
||||
<if test="matingCounts != null">mating_counts = #{matingCounts},</if>
|
||||
<if test="matingTotal != null">mating_total = #{matingTotal},</if>
|
||||
<if test="miscarriageCounts != null">miscarriage_counts = #{miscarriageCounts},</if>
|
||||
<if test="body != null">body = #{body},</if>
|
||||
<if test="breast != null">breast = #{breast},</if>
|
||||
<if test="source != null">source = #{source},</if>
|
||||
<if test="sourceDate != null">source_date = #{sourceDate},</if>
|
||||
<if test="sourceRanchId != null">source_ranch_id = #{sourceRanchId},</if>
|
||||
<if test="comment != null">comment = #{comment},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="isDelete != null">is_delete = #{isDelete},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBasSheepById" parameterType="Long">
|
||||
delete from bas_sheep where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBasSheepByIds" parameterType="String">
|
||||
delete from bas_sheep where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user