Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -90,6 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="statusId != null "> and status_id = #{statusId}</if>
|
||||
<if test="breed != null and breed != ''"> and breed = #{breed}</if>
|
||||
</where>
|
||||
ORDER BY id ASC <!-- 修改为升序 -->
|
||||
</select>
|
||||
|
||||
<select id="selectSheepFileById" parameterType="Long" resultMap="SheepFileResult">
|
||||
@@ -260,7 +261,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY id DESC
|
||||
ORDER BY id ASC
|
||||
</select>
|
||||
|
||||
<!-- <!– 查询所有公羊(gender=2) –>-->
|
||||
|
||||
@@ -36,6 +36,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<where>
|
||||
<if test="sheepId != null">and sheep_id = #{sheepId}</if>
|
||||
<if test="sheepNo != null and sheepNo != ''">and bs.manage_tags like concat('%',#{sheepNo},'%')</if>
|
||||
<if test="sheepNos != null and sheepNos.length > 0">
|
||||
AND (
|
||||
<foreach collection="sheepNos" item="item" separator=" OR " open="" close="">
|
||||
bs.manage_tags LIKE CONCAT('%', #{item}, '%')
|
||||
</foreach>
|
||||
)
|
||||
</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>
|
||||
|
||||
@@ -45,6 +45,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<where>
|
||||
<if test="sheepId != null "> and sd.sheep_id = #{sheepId}</if>
|
||||
<if test="sheepNo != null"> and sf.bs_manage_tags like concat('%', #{sheepNo}, '%')</if>
|
||||
<if test="sheepNos != null and sheepNos.length > 0">
|
||||
AND (
|
||||
<foreach collection="sheepNos" item="item" separator=" OR " open="" close="">
|
||||
bs.manage_tags LIKE CONCAT('%', #{item}, '%')
|
||||
</foreach>
|
||||
)
|
||||
</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>
|
||||
|
||||
@@ -43,6 +43,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<where>
|
||||
<if test="datetime != null "> and datetime = #{datetime}</if>
|
||||
<if test="sheepNo != null and sheepNo != ''">and bs.manage_tags like concat('%',#{sheepNo},'%')</if>
|
||||
<if test="sheepNos != null and sheepNos.length > 0">
|
||||
AND (
|
||||
<foreach collection="sheepNos" item="item" separator=" OR " open="" close="">
|
||||
bs.manage_tags LIKE CONCAT('%', #{item}, '%')
|
||||
</foreach>
|
||||
)
|
||||
</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>
|
||||
|
||||
@@ -41,6 +41,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="sheepId != null "> and sheep_id = #{sheepId}</if>
|
||||
<if test="sheepType != null "> and sheep_type = #{sheepType}</if>
|
||||
<if test="sheepNo != null and sheepNo != ''">and bs.manage_tags like concat('%',#{sheepNo},'%')</if>
|
||||
<if test="sheepNos != null and sheepNos.length > 0">
|
||||
AND (
|
||||
<foreach collection="sheepNos" item="item" separator=" OR " open="" close="">
|
||||
bs.manage_tags LIKE CONCAT('%', #{item}, '%')
|
||||
</foreach>
|
||||
)
|
||||
</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>
|
||||
|
||||
@@ -45,7 +45,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<include refid="selectQuarantineReportVo"/>
|
||||
<where>
|
||||
<if test="sheepId != null "> and sheep_id = #{sheepId}</if>
|
||||
<if test="sheepNo != null and sheepNo != ''">and bs.manage_tags like concat('%',#{sheepNo},'%')</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="sheepNos != null and sheepNos.length > 0">
|
||||
AND (
|
||||
<foreach collection="sheepNos" item="item" separator=" OR " open="" close="">
|
||||
bs.manage_tags LIKE CONCAT('%', #{item}, '%')
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="quarItem != null "> and quar_item = #{quarItem}</if>
|
||||
<if test="sampleType != null "> and sample_type = #{sampleType}</if>
|
||||
<if test="sampler != null and sampler != ''"> and sampler like concat('%',#{sampler},'%') </if>
|
||||
|
||||
@@ -55,6 +55,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<where>
|
||||
<if test="sheepId != null "> and sheep_id = #{sheepId}</if>
|
||||
<if test="sheepNo != null and sheepNo != ''">and bs.manage_tags like concat('%',#{sheepNo},'%')</if>
|
||||
<if test="sheepNos != null and sheepNos.length > 0">
|
||||
AND (
|
||||
<foreach collection="sheepNos" item="item" separator=" OR " open="" close="">
|
||||
bs.manage_tags LIKE CONCAT('%', #{item}, '%')
|
||||
</foreach>
|
||||
)
|
||||
</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="status != null and status !=''"> and status = #{status}</if>
|
||||
|
||||
@@ -11,7 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="postCode" column="post_code" />
|
||||
</resultMap>
|
||||
|
||||
<select id="getUserPostListByCode" resultMap="UserResult">
|
||||
<select id="getUserListByCode" resultMap="UserResult">
|
||||
SELECT u.user_id, nick_name , post_name , post_code
|
||||
FROM sys_role r
|
||||
JOIN sys_user_role ur ON r.role_id = ur.role_id
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
<select id="selectSgFeedListList" parameterType="SgFeedList" resultMap="SgFeedListResult">
|
||||
<include refid="selectSgFeedListVo"/>
|
||||
<where>
|
||||
<if test="formulaId != null and formulaId != ''"> and formula_id = #{formulaId}</if>
|
||||
<if test="formulaBatchId != null and formulaBatchId != ''"> and formula_batch_id = #{formulaBatchId}</if>
|
||||
<if test="zookeeper != null and zookeeper != ''"> and zookeeper = #{zookeeper}</if>
|
||||
<if test="formulaId != null and formulaId != ''"> and formula_id LIKE CONCAT('%',#{formulaId},'%')</if>
|
||||
<if test="formulaBatchId != null and formulaBatchId != ''"> and formula_batch_id LIKE CONCAT('%',#{formulaBatchId},'%')</if>
|
||||
<if test="zookeeper != null and zookeeper != ''"> and zookeeper LIKE CONCAT('%',#{zookeeper},'%')</if>
|
||||
<if test="deployDate != null "> and deploy_date = #{deployDate}</if>
|
||||
</where>
|
||||
ORDER BY deploy_date ASC, formula_id ASC, formula_batch_id ASC
|
||||
|
||||
@@ -36,9 +36,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="selectSgFeedPlanList" parameterType="SgFeedPlan" resultMap="SgFeedPlanResult">
|
||||
<include refid="selectSgFeedPlanVo"/>
|
||||
<where>
|
||||
<if test="formulaId != null and formulaId != ''"> and formula_id = #{formulaId}</if>
|
||||
<if test="batchId != null and batchId != ''"> and batch_id = #{batchId}</if>
|
||||
<if test="sheepHouseId != null "> and sheep_house_id = #{sheepHouseId}</if>
|
||||
<if test="formulaId != null and formulaId != ''"> and formula_id LIKE CONCAT('%',#{formulaId},'%')</if>
|
||||
<if test="batchId != null and batchId != ''"> and batch_id LIKE CONCAT('%',#{batchId},'%')</if>
|
||||
<if test="sheepHouseId != null "> and sheep_house_id LIKE CONCAT('%',#{sheepHouseId},'%')</if>
|
||||
<if test="planDate != null "> and plan_date = #{planDate}</if>
|
||||
</where>
|
||||
ORDER BY plan_date ASC, formula_id ASC , batch_id ASC
|
||||
|
||||
@@ -31,8 +31,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="selectSgFeedStatisticList" parameterType="SgFeedStatistic" resultMap="SgFeedStatisticResult">
|
||||
<include refid="selectSgFeedStatisticVo"/>
|
||||
<where>
|
||||
<if test="formulaId != null and formulaId != ''"> and formula_id = #{formulaId}</if>
|
||||
<if test="formulaBatchId != null and formulaBatchId != ''"> and formula_batch_id = #{formulaBatchId}</if>
|
||||
<if test="formulaId != null and formulaId != ''"> and formula_id LIKE CONCAT('%',#{formulaId},'%')</if>
|
||||
<if test="formulaBatchId != null and formulaBatchId != ''"> and formula_batch_id = LIKE CONCAT('%',#{formulaBatchId},'%')</if>
|
||||
<if test="silageLossRate != null and silageLossRate != ''"> and silage_loss_rate = #{silageLossRate}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@@ -22,9 +22,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="selectSgFormulaListList" parameterType="SgFormulaList" resultMap="SgFormulaListResult">
|
||||
<include refid="selectSgFormulaListVo"/>
|
||||
<where>
|
||||
<if test="materialId != null and materialId != ''">material_id = #{materialId}</if>
|
||||
<if test="formulaId != null and formulaId != ''">and formula_id = #{formulaId}</if>
|
||||
<if test="batchId != null and batchId != ''"> and batch_id = #{batchId}</if>
|
||||
<if test="materialId != null and materialId != ''">material_id LIKE CONCAT('%',#{materialId},'%')</if>
|
||||
<if test="formulaId != null and formulaId != ''">and formula_id LIKE CONCAT('%',#{formulaId},'%')</if>
|
||||
<if test="batchId != null and batchId != ''"> and batch_id LIKE CONCAT('%',#{batchId},'%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
@@ -21,9 +21,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="selectSgFormulaManagementList" parameterType="SgFormulaManagement" resultMap="SgFormulaManagementResult">
|
||||
<include refid="selectSgFormulaManagementVo"/>
|
||||
<where>
|
||||
<if test="formulaId != null and formulaId != ''"> and formula_id = #{formulaId}</if>
|
||||
<if test="feedStage != null and feedStage != ''"> and feed_stage = #{feedStage}</if>
|
||||
<if test="batchId != null and batchId != ''"> and batch_id = #{batchId}</if>
|
||||
<if test="formulaId != null and formulaId != ''"> and formula_id LIKE CONCAT('%',#{formulaId},'%')</if>
|
||||
<if test="feedStage != null and feedStage != ''"> and feed_stage LIKE CONCAT('%',#{feedStage},'%')</if>
|
||||
<if test="batchId != null and batchId != ''"> and batch_id LIKE CONCAT('%',#{batchId},'%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?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.feed.mapper.SgMaterialMapper">
|
||||
|
||||
|
||||
<resultMap type="SgMaterial" id="SgMaterialResult">
|
||||
<result property="materialId" column="material_id" />
|
||||
<result property="materialName" column="material_name" />
|
||||
@@ -16,13 +16,13 @@
|
||||
|
||||
<select id="selectSgMaterialList" parameterType="SgMaterial" resultMap="SgMaterialResult">
|
||||
<include refid="selectSgMaterialVo"/>
|
||||
<where>
|
||||
<if test="materialId != null and materialId != ''"> and material_id = #{materialId}</if>
|
||||
<where>
|
||||
<if test="materialId != null and materialId != ''"> and material_id LIKE CONCAT('%',#{materialId},'%')</if>
|
||||
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
|
||||
<if test="isGranular != null "> and is_granular = #{isGranular}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectSgMaterialByMaterialId" parameterType="String" resultMap="SgMaterialResult">
|
||||
<include refid="selectSgMaterialVo"/>
|
||||
where material_id = #{materialId}
|
||||
@@ -31,15 +31,15 @@
|
||||
<insert id="insertSgMaterial" parameterType="SgMaterial">
|
||||
insert into sg_material
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="materialId != null">material_id,</if>
|
||||
<if test="materialId != null and materialId != ''">material_id,</if>
|
||||
<if test="materialName != null and materialName != ''">material_name,</if>
|
||||
<if test="isGranular != null">is_granular,</if>
|
||||
</trim>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="materialId != null">#{materialId},</if>
|
||||
<if test="materialId != null and materialId != ''">#{materialId},</if>
|
||||
<if test="materialName != null and materialName != ''">#{materialName},</if>
|
||||
<if test="isGranular != null">#{isGranular},</if>
|
||||
</trim>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSgMaterial" parameterType="SgMaterial">
|
||||
@@ -56,7 +56,7 @@
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSgMaterialByMaterialIds" parameterType="String">
|
||||
delete from sg_material where material_id in
|
||||
delete from sg_material where material_id in
|
||||
<foreach item="materialId" collection="array" open="(" separator="," close=")">
|
||||
#{materialId}
|
||||
</foreach>
|
||||
|
||||
@@ -170,8 +170,6 @@
|
||||
grade_b gradeB,
|
||||
grade_c gradeC,
|
||||
grade_d gradeD,
|
||||
cell_2_4 cell24,
|
||||
cell_8 cell8,
|
||||
donor_male_no ramId
|
||||
FROM sc_embryo_flush
|
||||
WHERE donor_female_no = #{eweNo}
|
||||
|
||||
@@ -85,24 +85,26 @@
|
||||
LEFT JOIN bas_sheep_variety bsv ON bs.variety_id = bsv.id
|
||||
</sql>
|
||||
|
||||
<select id="selectScBodyMeasureList" parameterType="ScBodyMeasure" resultMap="ScBodyMeasureResult">
|
||||
<select id="selectScBodyMeasureList" resultMap="ScBodyMeasureResult">
|
||||
<include refid="selectScBodyMeasureVo"/>
|
||||
<where>
|
||||
<if test="sheepId != null ">and sm.sheep_id = #{sheepId}</if>
|
||||
<if test="params.beginMeasureDate != null and params.endMeasureDate != null">
|
||||
and sm.measure_date between #{params.beginMeasureDate} and #{params.endMeasureDate}
|
||||
<if test="manageTagsList != null and manageTagsList.size() > 0">
|
||||
<foreach collection="manageTagsList" item="tag" separator="or" open="and (" close=")">
|
||||
bs.manage_tags like concat('%', #{tag}, '%')
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="manageTags != null and manageTags != ''">
|
||||
and bs.manage_tags like concat('%', #{manageTags}, '%')
|
||||
<if test="sc.sheepId != null">and sm.sheep_id = #{sc.sheepId}</if>
|
||||
<if test="sc.sheepfoldId != null">and bs.sheepfold_id = #{sc.sheepfoldId}</if>
|
||||
<if test="sc.varietyId != null">and bsv.id = #{sc.varietyId}</if>
|
||||
<if test="sc.sheepTypeId != null">and bs.type_id = #{sc.sheepTypeId}</if>
|
||||
<if test="sc.params != null and sc.params.beginMeasureDate != null and sc.params.beginMeasureDate != '' and sc.params.endMeasureDate != null and sc.params.endMeasureDate != ''">
|
||||
and sm.measure_date between #{sc.params.beginMeasureDate} and #{sc.params.endMeasureDate}
|
||||
</if>
|
||||
<if test="sheepfoldId != null">AND bs.sheepfold_id = #{sheepfoldId}</if>
|
||||
<if test="varietyId != null">AND bsv.id = #{varietyId}</if>
|
||||
<if test="sheepTypeId != null">and bs.type_id = #{sheepTypeId}</if>
|
||||
<if test="params.beginCreateTime != null and params.endCreateTime != null">
|
||||
and sm.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
|
||||
<if test="sc.params != null and sc.params.beginCreateTime != null and sc.params.beginCreateTime != '' and sc.params.endCreateTime != null and sc.params.endCreateTime != ''">
|
||||
and sm.create_time between #{sc.params.beginCreateTime} and #{sc.params.endCreateTime}
|
||||
</if>
|
||||
</where>
|
||||
<if test="true">ORDER BY sm.create_time DESC</if>
|
||||
ORDER BY sm.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectScBodyMeasureById" parameterType="Long" resultMap="ScBodyMeasureResult">
|
||||
@@ -188,4 +190,12 @@
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<select id="searchEarNumbers" resultType="java.lang.String">
|
||||
SELECT DISTINCT bs.manage_tags
|
||||
FROM bas_sheep bs
|
||||
WHERE bs.manage_tags LIKE CONCAT('%', #{query}, '%')
|
||||
AND bs.is_delete = 0
|
||||
ORDER BY bs.manage_tags
|
||||
LIMIT 50
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -41,24 +41,26 @@
|
||||
left join bas_sheep_variety bsv on bs.variety_id = bsv.id
|
||||
</sql>
|
||||
|
||||
<select id="selectScBodyScoreList" parameterType="ScBodyScore" resultMap="ScBodyScoreResult">
|
||||
<select id="selectScBodyScoreList" resultMap="ScBodyScoreResult">
|
||||
<include refid="selectScBodyScoreVo"/>
|
||||
<where>
|
||||
<if test="sheepId != null and sheepId != ''">and sbs.sheep_id = #{sheepId}</if>
|
||||
<if test="varietyId != null">and bsv.id = #{varietyId}</if>
|
||||
<if test="sheepfold != null">and bs.sheepfold_id = #{sheepfold}</if>
|
||||
<if test="params.beginDatetime != null and params.beginDatetime != '' and params.endDatetime != null and params.endDatetime != ''">
|
||||
and sbs.datetime between #{params.beginDatetime} and #{params.endDatetime}
|
||||
<if test="manageTagsList != null and manageTagsList.size() > 0">
|
||||
<foreach collection="manageTagsList" item="tag" separator="or" open="and (" close=")">
|
||||
bs.manage_tags like concat('%', #{tag}, '%')
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="score != null ">and score = #{score}</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
|
||||
and sbs.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
|
||||
<if test="sc.sheepId != null and sc.sheepId != ''">and sbs.sheep_id = #{sc.sheepId}</if>
|
||||
<if test="sc.varietyId != null">and bsv.id = #{sc.varietyId}</if>
|
||||
<if test="sc.sheepfold != null">and bs.sheepfold_id = #{sc.sheepfold}</if>
|
||||
<if test="sc.score != null ">and sbs.score = #{sc.score}</if>
|
||||
<if test="sc.params != null and sc.params.beginDatetime != null and sc.params.beginDatetime != '' and sc.params.endDatetime != null and sc.params.endDatetime != ''">
|
||||
and sbs.datetime between #{sc.params.beginDatetime} and #{sc.params.endDatetime}
|
||||
</if>
|
||||
<if test="manageTags != null and manageTags != ''">
|
||||
and bs.manage_tags like concat('%', #{manageTags}, '%')
|
||||
<if test="sc.params != null and sc.params.beginCreateTime != null and sc.params.beginCreateTime != '' and sc.params.endCreateTime != null and sc.params.endCreateTime != ''">
|
||||
and sbs.create_time between #{sc.params.beginCreateTime} and #{sc.params.endCreateTime}
|
||||
</if>
|
||||
</where>
|
||||
<if test="true">ORDER BY sbs.create_time DESC</if>
|
||||
ORDER BY sbs.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectScBodyScoreById" parameterType="Long" resultMap="ScBodyScoreResult">
|
||||
@@ -117,4 +119,13 @@
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="searchEarNumbers" resultType="java.lang.String">
|
||||
SELECT DISTINCT bs.manage_tags
|
||||
FROM bas_sheep bs
|
||||
WHERE bs.manage_tags LIKE CONCAT('%', #{query}, '%')
|
||||
AND bs.is_delete = 0
|
||||
ORDER BY bs.manage_tags
|
||||
LIMIT 50
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -41,22 +41,24 @@
|
||||
left join da_sheepfold sf on bs.sheepfold_id = sf.id
|
||||
</sql>
|
||||
|
||||
<select id="selectScBreastRatingList" parameterType="ScBreastRating" resultMap="ScBreastRatingResult">
|
||||
<select id="selectScBreastRatingList" resultMap="ScBreastRatingResult">
|
||||
<include refid="selectScBreastRatingVo"/>
|
||||
<where>
|
||||
<if test="manageTags != null and manageTags != ''">
|
||||
and bs.manage_tags like concat('%', #{manageTags}, '%')
|
||||
<if test="manageTagsList != null and manageTagsList.size() > 0">
|
||||
<foreach collection="manageTagsList" item="tag" separator="or" open="and (" close=")">
|
||||
bs.manage_tags like concat('%', #{tag}, '%')
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="varietyId != null">and bsv.id = #{varietyId}</if>
|
||||
<if test="sheepfoldId != null">and sf.id = #{sheepfoldId}</if>
|
||||
<if test="params.beginEventDate != null and params.endEventDate != null">
|
||||
and sbr.event_date between #{params.beginEventDate} and #{params.endEventDate}
|
||||
<if test="sc.varietyId != null">and bsv.id = #{sc.varietyId}</if>
|
||||
<if test="sc.sheepfoldId != null">and sf.id = #{sc.sheepfoldId}</if>
|
||||
<if test="sc.params != null and sc.params.beginEventDate != null and sc.params.endEventDate != null">
|
||||
and sbr.event_date between #{sc.params.beginEventDate} and #{sc.params.endEventDate}
|
||||
</if>
|
||||
<if test="params.beginCreateTime != null and params.endCreateTime != null">
|
||||
and sbr.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
|
||||
<if test="sc.params != null and sc.params.beginCreateTime != null and sc.params.endCreateTime != null">
|
||||
and sbr.create_time between #{sc.params.beginCreateTime} and #{sc.params.endCreateTime}
|
||||
</if>
|
||||
</where>
|
||||
<if test="true">ORDER BY sbr.create_time DESC</if>
|
||||
ORDER BY sbr.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectScBreastRatingById" parameterType="Long" resultMap="ScBreastRatingResult">
|
||||
@@ -127,4 +129,12 @@
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<select id="searchEarNumbers" resultType="java.lang.String">
|
||||
SELECT DISTINCT bs.manage_tags
|
||||
FROM bas_sheep bs
|
||||
WHERE bs.manage_tags LIKE CONCAT('%', #{query}, '%')
|
||||
AND bs.is_delete = 0
|
||||
ORDER BY bs.manage_tags
|
||||
LIMIT 50
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -35,26 +35,30 @@
|
||||
left join da_sheepfold sf on bs.sheepfold_id = sf.id
|
||||
</sql>
|
||||
|
||||
<select id="selectScChangeCommentList" parameterType="ScChangeComment" resultMap="ScChangeCommentResult">
|
||||
<select id="selectScChangeCommentList" resultMap="ScChangeCommentResult">
|
||||
<include refid="selectScChangeCommentVo"/>
|
||||
<where>
|
||||
<if test="manageTags != null and manageTags != ''">
|
||||
and bs.manage_tags like concat('%', #{manageTags}, '%')
|
||||
<if test="manageTagsList != null and manageTagsList.size() > 0">
|
||||
<foreach collection="manageTagsList" item="tag" separator="or" open="and (" close=")">
|
||||
bs.manage_tags like concat('%', #{tag}, '%')
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="sheepfoldId != null">and bs.sheepfold_id = #{sheepfoldId}</if>
|
||||
<if test="newComment != null and newComment != ''">
|
||||
and scc.new_comment like concat('%', #{newComment}, '%')
|
||||
<if test="sc.sheepfoldId != null">
|
||||
and bs.sheepfold_id = #{sc.sheepfoldId}
|
||||
</if>
|
||||
<if test="oldComment != null and oldComment != ''">
|
||||
and scc.old_comment like concat('%', #{oldComment}, '%')
|
||||
<if test="sc.newComment != null and sc.newComment != ''">
|
||||
and scc.new_comment like concat('%', #{sc.newComment}, '%')
|
||||
</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != ''
|
||||
and params.endCreateTime != null and params.endCreateTime != ''">
|
||||
and scc.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
|
||||
<if test="sc.oldComment != null and sc.oldComment != ''">
|
||||
and scc.old_comment like concat('%', #{sc.oldComment}, '%')
|
||||
</if>
|
||||
<if test="params.beginEventDate != null and params.beginEventDate != ''
|
||||
and params.endEventDate != null and params.endEventDate != ''">
|
||||
and scc.event_date between #{params.beginEventDate} and #{params.endEventDate}
|
||||
<if test="sc.params != null and sc.params.beginCreateTime != null and sc.params.beginCreateTime != ''
|
||||
and sc.params.endCreateTime != null and sc.params.endCreateTime != ''">
|
||||
and scc.create_time between #{sc.params.beginCreateTime} and #{sc.params.endCreateTime}
|
||||
</if>
|
||||
<if test="sc.params != null and sc.params.beginEventDate != null and sc.params.beginEventDate != ''
|
||||
and sc.params.endEventDate != null and sc.params.endEventDate != ''">
|
||||
and scc.event_date between #{sc.params.beginEventDate} and #{sc.params.endEventDate}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY scc.create_time DESC
|
||||
@@ -111,4 +115,13 @@
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="searchEarNumbers" resultType="java.lang.String">
|
||||
SELECT DISTINCT bs.manage_tags
|
||||
FROM bas_sheep bs
|
||||
WHERE bs.manage_tags LIKE CONCAT('%', #{query}, '%')
|
||||
AND bs.is_delete = 0
|
||||
ORDER BY bs.manage_tags
|
||||
LIMIT 50
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -43,34 +43,27 @@
|
||||
LEFT JOIN da_sheepfold sf ON bs.sheepfold_id = sf.id
|
||||
</sql>
|
||||
|
||||
<select id="selectScChangeEarList" parameterType="ScChangeEar" resultMap="ScChangeEarResult">
|
||||
<select id="selectScChangeEarList" resultMap="ScChangeEarResult">
|
||||
<include refid="selectScChangeEarVo"/>
|
||||
<where>
|
||||
<if test="sheepId != null">and sce.sheep_id = #{sheepId}</if>
|
||||
<if test="manageTags != null and manageTags != ''">
|
||||
and (
|
||||
bs.manage_tags LIKE CONCAT('%', #{manageTags}, '%')
|
||||
OR
|
||||
bs.electronic_tags LIKE CONCAT('%', #{manageTags}, '%')
|
||||
)
|
||||
<if test="sc.sheepId != null">and sce.sheep_id = #{sc.sheepId}</if>
|
||||
<if test="manageTagsList != null and manageTagsList.size() > 0">
|
||||
<foreach collection="manageTagsList" item="tag" separator="or" open="and (" close=")">
|
||||
(bs.manage_tags like concat('%', #{tag}, '%')
|
||||
or bs.electronic_tags like concat('%', #{tag}, '%'))
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="sheepfoldId != null">and bs.sheepfold_id = #{sheepfoldId}</if>
|
||||
<if test="sheepfoldName != null and sheepfoldName != ''">
|
||||
and sf.sheepfold_name LIKE CONCAT('%', #{sheepfoldName}, '%')
|
||||
<if test="sc.sheepfoldId != null">and bs.sheepfold_id = #{sc.sheepfoldId}</if>
|
||||
<if test="sc.earType != null">and sce.ear_type = #{sc.earType}</if>
|
||||
<if test="sc.newTag != null and sc.newTag != ''">and sce.newTag like concat('%', #{sc.newTag}, '%')</if>
|
||||
<if test="sc.oldTag != null and sc.oldTag != ''">and sce.oldTag like concat('%', #{sc.oldTag}, '%')</if>
|
||||
<if test="sc.params != null and sc.params.beginCreateTime != null and sc.params.beginCreateTime != ''
|
||||
and sc.params.endCreateTime != null and sc.params.endCreateTime != ''">
|
||||
and sce.create_time between #{sc.params.beginCreateTime} and #{sc.params.endCreateTime}
|
||||
</if>
|
||||
<if test="earType != null ">and sce.ear_type = #{earType}</if>
|
||||
<if test="newTag != null and newTag != ''">
|
||||
and sce.newTag LIKE CONCAT('%', #{newTag}, '%')
|
||||
</if>
|
||||
<if test="oldTag != null and oldTag != ''">
|
||||
and sce.oldTag LIKE CONCAT('%', #{oldTag}, '%')
|
||||
</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
|
||||
and sce.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
|
||||
</if>
|
||||
<if test="params.beginEventDate != null and params.beginEventDate != ''
|
||||
and params.endEventDate != null and params.endEventDate != ''">
|
||||
and sce.event_date between #{params.beginEventDate} and #{params.endEventDate}
|
||||
<if test="sc.params != null and sc.params.beginEventDate != null and sc.params.beginEventDate != ''
|
||||
and sc.params.endEventDate != null and sc.params.endEventDate != ''">
|
||||
and sce.event_date between #{sc.params.beginEventDate} and #{sc.params.endEventDate}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY sce.create_time DESC
|
||||
@@ -133,4 +126,13 @@
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="searchEarNumbers" resultType="java.lang.String">
|
||||
SELECT DISTINCT bs.manage_tags
|
||||
FROM bas_sheep bs
|
||||
WHERE bs.manage_tags LIKE CONCAT('%', #{query}, '%')
|
||||
AND bs.is_delete = 0
|
||||
ORDER BY bs.manage_tags
|
||||
LIMIT 50
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -37,27 +37,23 @@
|
||||
left join da_sheepfold sf on bs.sheepfold_id = sf.id
|
||||
</sql>
|
||||
|
||||
<select id="selectScChangeVarietyList" parameterType="ScChangeVariety" resultMap="ScChangeVarietyResult">
|
||||
<select id="selectScChangeVarietyList" resultMap="ScChangeVarietyResult">
|
||||
<include refid="selectScChangeVarietyVo"/>
|
||||
<where>
|
||||
<if test="sheepId != null">and scv.sheep_id = #{sheepId}</if>
|
||||
<if test="manageTags != null and manageTags != ''">
|
||||
and bs.manage_tags like concat('%', #{manageTags}, '%')
|
||||
<if test="manageTagsList != null and manageTagsList.size() > 0">
|
||||
<foreach collection="manageTagsList" item="tag" separator="or" open="and (" close=")">
|
||||
bs.manage_tags like concat('%', #{tag}, '%')
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="sheepfoldId != null">and bs.sheepfold_id = #{sheepfoldId}</if>
|
||||
<if test="varietyOld != null and varietyOld != ''">
|
||||
and scv.variety_old like concat('%', #{varietyOld}, '%')
|
||||
<if test="sc.sheepId != null">and scv.sheep_id = #{sc.sheepId}</if>
|
||||
<if test="sc.sheepfoldId != null">and bs.sheepfold_id = #{sc.sheepfoldId}</if>
|
||||
<if test="sc.varietyOld != null and sc.varietyOld != ''">and scv.variety_old like concat('%', #{sc.varietyOld}, '%')</if>
|
||||
<if test="sc.varietyNew != null and sc.varietyNew != ''">and scv.variety_new like concat('%', #{sc.varietyNew}, '%')</if>
|
||||
<if test="sc.params != null and sc.params.beginCreateTime != null and sc.params.beginCreateTime != '' and sc.params.endCreateTime != null and sc.params.endCreateTime != ''">
|
||||
and scv.create_time between #{sc.params.beginCreateTime} and #{sc.params.endCreateTime}
|
||||
</if>
|
||||
<if test="varietyNew != null and varietyNew != ''">
|
||||
and scv.variety_new like concat('%', #{varietyNew}, '%')
|
||||
</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != ''
|
||||
and params.endCreateTime != null and params.endCreateTime != ''">
|
||||
and scv.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
|
||||
</if>
|
||||
<if test="params.beginEventDate != null and params.beginEventDate != ''
|
||||
and params.endEventDate != null and params.endEventDate != ''">
|
||||
and scv.event_date between #{params.beginEventDate} and #{params.endEventDate}
|
||||
<if test="sc.params != null and sc.params.beginEventDate != null and sc.params.beginEventDate != '' and sc.params.endEventDate != null and sc.params.endEventDate != ''">
|
||||
and scv.event_date between #{sc.params.beginEventDate} and #{sc.params.endEventDate}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY scv.create_time DESC
|
||||
@@ -117,4 +113,13 @@
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="searchEarNumbers" resultType="java.lang.String">
|
||||
SELECT DISTINCT bs.manage_tags
|
||||
FROM bas_sheep bs
|
||||
WHERE bs.manage_tags LIKE CONCAT('%', #{query}, '%')
|
||||
AND bs.is_delete = 0
|
||||
ORDER BY bs.manage_tags
|
||||
LIMIT 50
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -51,25 +51,23 @@
|
||||
LEFT JOIN bas_sheep_variety bv ON tg.variety_id = bv.id
|
||||
</sql>
|
||||
|
||||
<select id="selectScTransGroupList" parameterType="ScTransGroup" resultMap="ScTransGroupResult">
|
||||
<select id="selectScTransGroupList" resultMap="ScTransGroupResult">
|
||||
<include refid="selectScTransGroupVo"/>
|
||||
<where>
|
||||
<if test="sheepId != null">and sheep_id = #{sheepId}</if>
|
||||
<if test="manageTags != null and manageTags != ''">
|
||||
and s.manage_tags like concat('%', #{manageTags}, '%')
|
||||
<if test="manageTagsList != null and manageTagsList.size() > 0">
|
||||
<foreach collection="manageTagsList" item="tag" separator="or" open="and (" close=")">
|
||||
s.manage_tags like concat('%', #{tag}, '%')
|
||||
</foreach>
|
||||
</if>
|
||||
<!-- <if test="eventType != null">and tg.event_type = #{eventType}</if>-->
|
||||
<if test="params.beginTransDate != null and params.beginTransDate != '' and params.endTransDate != null and params.endTransDate != ''">
|
||||
and tg.trans_date between #{params.beginTransDate} and #{params.endTransDate}
|
||||
<if test="sc.sheepId != null">and tg.sheep_id = #{sc.sheepId}</if>
|
||||
<if test="sc.foldTo != null and sc.foldTo != ''">and tg.fold_to = #{sc.foldTo}</if>
|
||||
<if test="sc.foldFrom != null and sc.foldFrom != ''">and tg.fold_from = #{sc.foldFrom}</if>
|
||||
<if test="sc.status != null">and tg.status = #{sc.status}</if>
|
||||
<if test="sc.varietyId != null">and tg.variety_id = #{sc.varietyId}</if>
|
||||
<if test="sc.sheepTypeId != null">and st.id = #{sc.sheepTypeId}</if>
|
||||
<if test="sc.params != null and sc.params.beginTransDate != null and sc.params.beginTransDate != '' and sc.params.endTransDate != null and sc.params.endTransDate != ''">
|
||||
and tg.trans_date between #{sc.params.beginTransDate} and #{sc.params.endTransDate}
|
||||
</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="varietyId != null">and tg.variety_id = #{varietyId}</if>
|
||||
<if test="sheepTypeId != null">and st.id = #{sheepTypeId}</if>
|
||||
<!-- <if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">-->
|
||||
<!-- and tg.create_time between #{params.beginCreateTime} and #{params.endCreateTime}-->
|
||||
<!-- </if>-->
|
||||
</where>
|
||||
ORDER BY tg.create_time DESC
|
||||
</select>
|
||||
@@ -144,4 +142,13 @@
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="searchEarNumbers" resultType="java.lang.String">
|
||||
SELECT DISTINCT s.manage_tags
|
||||
FROM bas_sheep s
|
||||
WHERE s.manage_tags LIKE CONCAT('%', #{query}, '%')
|
||||
AND s.is_delete = 0
|
||||
ORDER BY s.manage_tags
|
||||
LIMIT 50
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -44,28 +44,23 @@
|
||||
LEFT JOIN bas_sheep_variety bv ON bs.variety_id = bv.id
|
||||
</sql>
|
||||
|
||||
<select id="selectScTransitionInfoList" parameterType="ScTransitionInfo" resultMap="ScTransitionInfoResult">
|
||||
<select id="selectScTransitionInfoList" resultMap="ScTransitionInfoResult">
|
||||
<include refid="selectScTransitionInfoVo"/>
|
||||
<where>
|
||||
<if test="sheepId != null ">and sheep_id = #{sheepId}</if>
|
||||
<if test="manageTags != null and manageTags != ''">
|
||||
and bs.manage_tags LIKE CONCAT('%', #{manageTags}, '%')
|
||||
<if test="manageTagsList != null and manageTagsList.size() > 0">
|
||||
<foreach collection="manageTagsList" item="tag" separator="or" open="and (" close=")">
|
||||
bs.manage_tags like concat('%', #{tag}, '%')
|
||||
</foreach>
|
||||
</if>
|
||||
<!-- <if test="eventType != null and eventType != ''">-->
|
||||
<!-- and t.event_type = #{eventType}-->
|
||||
<!-- </if>-->
|
||||
<if test="transType != null">and t.trans_type = #{transType}</if>
|
||||
<if test="params.beginTransitionDate != null and params.beginTransitionDate != ''
|
||||
and params.endTransitionDate != null and params.endTransitionDate != ''">
|
||||
and t.transition_date between #{params.beginTransitionDate} and #{params.endTransitionDate}
|
||||
<if test="sc.sheepId != null">and t.sheep_id = #{sc.sheepId}</if>
|
||||
<if test="sc.transType != null">and t.trans_type = #{sc.transType}</if>
|
||||
<if test="sc.varietyId != null">and bs.variety_id = #{sc.varietyId}</if>
|
||||
<if test="sc.transTo != null and sc.transTo != ''">and t.trans_to = #{sc.transTo}</if>
|
||||
<if test="sc.transFrom != null and sc.transFrom != ''">and t.trans_from = #{sc.transFrom}</if>
|
||||
<if test="sc.status != null">and t.status = #{sc.status}</if>
|
||||
<if test="sc.params != null and sc.params.beginTransitionDate != null and sc.params.beginTransitionDate != '' and sc.params.endTransitionDate != null and sc.params.endTransitionDate != ''">
|
||||
and t.transition_date between #{sc.params.beginTransitionDate} and #{sc.params.endTransitionDate}
|
||||
</if>
|
||||
<if test="varietyId != null">and bs.variety_id = #{varietyId}</if>
|
||||
<if test="transTo != null and transTo != ''">and trans_to = #{transTo}</if>
|
||||
<if test="transFrom != null and transFrom != ''">and trans_from = #{transFrom}</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 t.create_time between #{params.beginCreateTime} and #{params.endCreateTime}-->
|
||||
<!-- </if>-->
|
||||
</where>
|
||||
ORDER BY t.create_time DESC
|
||||
</select>
|
||||
@@ -154,4 +149,13 @@
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="searchEarNumbers" resultType="java.lang.String">
|
||||
SELECT DISTINCT bs.manage_tags
|
||||
FROM bas_sheep bs
|
||||
WHERE bs.manage_tags LIKE CONCAT('%', #{query}, '%')
|
||||
AND bs.is_delete = 0
|
||||
ORDER BY bs.manage_tags
|
||||
LIMIT 50
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -40,21 +40,22 @@
|
||||
left join bas_sheep_variety bv on bs.variety_id = bv.id
|
||||
</sql>
|
||||
|
||||
<select id="selectScCastrateList" parameterType="ScCastrate" resultMap="ScCastrateResult">
|
||||
<select id="selectScCastrateList" resultMap="ScCastrateResult">
|
||||
<include refid="selectScCastrateVo"/>
|
||||
<where>
|
||||
<if test="manageTags != null and manageTags != ''">
|
||||
and bs.manage_tags like concat('%', #{manageTags}, '%')
|
||||
<if test="manageTagsList != null and manageTagsList.size() > 0">
|
||||
<foreach collection="manageTagsList" item="tag" separator="or" open="and (" close=")">
|
||||
bs.manage_tags like concat('%', #{tag}, '%')
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="sheepfold != null ">and bs.sheepfold_id = #{sheepfold}</if>
|
||||
<if test="varietyId != null">and bs.variety_id = #{varietyId}</if>
|
||||
<if test="technician != null and technician != ''">and sc.technician like concat('%', #{technician}, '%')
|
||||
<if test="sc.sheepfold != null">and bs.sheepfold_id = #{sc.sheepfold}</if>
|
||||
<if test="sc.varietyId != null">and bs.variety_id = #{sc.varietyId}</if>
|
||||
<if test="sc.technician != null and sc.technician != ''">and sc.technician like concat('%', #{sc.technician}, '%')</if>
|
||||
<if test="sc.params != null and sc.params.beginCreateTime != null and sc.params.beginCreateTime != '' and sc.params.endCreateTime != null and sc.params.endCreateTime != ''">
|
||||
and sc.create_time between #{sc.params.beginCreateTime} and #{sc.params.endCreateTime}
|
||||
</if>
|
||||
<if test="params.beginCreateTime != null and params.endCreateTime != null">
|
||||
and sc.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
|
||||
</if>
|
||||
<if test="params.beginEventDate != null and params.endEventDate != null">
|
||||
and sc.event_date between #{params.beginEventDate} and #{params.endEventDate}
|
||||
<if test="sc.params != null and sc.params.beginEventDate != null and sc.params.beginEventDate != '' and sc.params.endEventDate != null and sc.params.endEventDate != ''">
|
||||
and sc.event_date between #{sc.params.beginEventDate} and #{sc.params.endEventDate}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY sc.create_time DESC
|
||||
@@ -115,4 +116,13 @@
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="searchEarNumbers" resultType="java.lang.String">
|
||||
SELECT DISTINCT bs.manage_tags
|
||||
FROM bas_sheep bs
|
||||
WHERE bs.manage_tags LIKE CONCAT('%', #{query}, '%')
|
||||
AND bs.is_delete = 0
|
||||
ORDER BY bs.manage_tags
|
||||
LIMIT 50
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -37,21 +37,22 @@
|
||||
left join bas_sheep_variety bv on bs.variety_id = bv.id
|
||||
</sql>
|
||||
|
||||
<select id="selectScFixHoofList" parameterType="ScFixHoof" resultMap="ScFixHoofResult">
|
||||
<select id="selectScFixHoofList" resultMap="ScFixHoofResult">
|
||||
<include refid="selectScFixHoofVo"/>
|
||||
<where>
|
||||
<if test="sheepId != null ">and sheep_id = #{sheepId}</if>
|
||||
<if test="sheepfold != null ">and bs.sheepfold_id = #{sheepfold}</if>
|
||||
<if test="varietyId != null">and bs.variety_id = #{varietyId}</if>
|
||||
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
|
||||
and fh.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
|
||||
<if test="manageTagsList != null and manageTagsList.size() > 0">
|
||||
<foreach collection="manageTagsList" item="tag" separator="or" open="and (" close=")">
|
||||
bs.manage_tags like concat('%', #{tag}, '%')
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="manageTags != null and manageTags != ''">
|
||||
and bs.manage_tags like concat('%', #{manageTags}, '%')
|
||||
<if test="sc.sheepfold != null">and bs.sheepfold_id = #{sc.sheepfold}</if>
|
||||
<if test="sc.varietyId != null">and bs.variety_id = #{sc.varietyId}</if>
|
||||
<if test="sc.technician != null and sc.technician != ''">and fh.technician like concat('%', #{sc.technician}, '%')</if>
|
||||
<if test="sc.params != null and sc.params.beginCreateTime != null and sc.params.beginCreateTime != '' and sc.params.endCreateTime != null and sc.params.endCreateTime != ''">
|
||||
and fh.create_time between #{sc.params.beginCreateTime} and #{sc.params.endCreateTime}
|
||||
</if>
|
||||
<if test="params.beginEventDate != null and params.beginEventDate != ''
|
||||
and params.endEventDate != null and params.endEventDate != ''">
|
||||
and fh.event_date between #{params.beginEventDate} and #{params.endEventDate}
|
||||
<if test="sc.params != null and sc.params.beginEventDate != null and sc.params.beginEventDate != '' and sc.params.endEventDate != null and sc.params.endEventDate != ''">
|
||||
and fh.event_date between #{sc.params.beginEventDate} and #{sc.params.endEventDate}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY fh.create_time DESC
|
||||
@@ -111,5 +112,12 @@
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
<select id="searchEarNumbers" resultType="java.lang.String">
|
||||
SELECT DISTINCT bs.manage_tags
|
||||
FROM bas_sheep bs
|
||||
WHERE bs.manage_tags LIKE CONCAT('%', #{query}, '%')
|
||||
AND bs.is_delete = 0
|
||||
ORDER BY bs.manage_tags
|
||||
LIMIT 50
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -45,21 +45,51 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<where>
|
||||
<if test="orderNo != null and orderNo != ''"> and order_no like concat('%', #{orderNo}, '%')</if>
|
||||
<if test="planId != null "> and plan_id = #{planId}</if>
|
||||
<if test="bizType != null "> and biz_type = #{bizType}</if>
|
||||
<!-- 业务类型批量查询 -->
|
||||
<if test="bizTypeArray != null and bizTypeArray.length > 0">
|
||||
and biz_type in
|
||||
<foreach collection="bizTypeArray" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<!-- 单个业务类型查询(保留原有逻辑) -->
|
||||
<if test="bizType != null and bizTypeArray == null">
|
||||
and biz_type = #{bizType}
|
||||
</if>
|
||||
<if test="title != null and title != ''"> and title like concat('%', #{title},'%')</if>
|
||||
<if test="content != null and content != ''"> and content = #{content}</if>
|
||||
<if test="department != null and department != ''"> and department = #{department}</if>
|
||||
<if test="executor != null and executor != ''"> and executor like concat('%',#{executor},'%') </if>
|
||||
<if test="beginPlanDate != null and endPlanDate != null ">
|
||||
and execute_date between #{beginPlanDate} and #{endPlanDate}
|
||||
</if>
|
||||
and execute_date between #{beginPlanDate} and #{endPlanDate}
|
||||
</if>
|
||||
<if test="executeTime != null and executeTime != ''"> and execute_time = #{executeTime}</if>
|
||||
<if test="sheepScope != null and sheepScope != ''"> and sheep_scope = #{sheepScope}</if>
|
||||
<if test="location != null and location != ''"> and location = #{location}</if>
|
||||
<if test="materialList != null and materialList != ''"> and material_list = #{materialList}</if>
|
||||
<if test="toolList != null and toolList != ''"> and tool_list = #{toolList}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="priority != null "> and priority = #{priority}</if>
|
||||
<!-- 状态批量查询 -->
|
||||
<if test="statusArray != null and statusArray.length > 0">
|
||||
and status in
|
||||
<foreach collection="statusArray" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<!-- 单个状态查询(保留原有逻辑) -->
|
||||
<if test="status != null and statusArray == null">
|
||||
and status = #{status}
|
||||
</if>
|
||||
<!-- 优先级批量查询 -->
|
||||
<if test="priorityArray != null and priorityArray.length > 0">
|
||||
and priority in
|
||||
<foreach collection="priorityArray" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<!-- 单个优先级查询(保留原有逻辑) -->
|
||||
<if test="priority != null and priorityArray == null">
|
||||
and priority = #{priority}
|
||||
</if>
|
||||
<if test="issuer != null "> and issuer like concat('%',#{issuer},'%') </if>
|
||||
<if test="issueTime != null "> and issue_time = #{issueTime}</if>
|
||||
<if test="receiverId != null "> and receiver_id = #{receiverId}</if>
|
||||
@@ -67,12 +97,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="beginFinishDate != null and endFinishDate != null ">
|
||||
and finish_time between #{beginFinishDate} and #{endFinishDate}
|
||||
</if>
|
||||
|
||||
<if test="result != null and result != ''"> and result = #{result}</if>
|
||||
</where>
|
||||
order by execute_date desc
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="selectWorkOrderById" parameterType="Long" resultMap="WorkOrderResult">
|
||||
<include refid="selectWorkOrderVo"/>
|
||||
|
||||
Reference in New Issue
Block a user