|
@@ -25,34 +25,35 @@
|
|
|
|
|
|
|
|
|
|
<resultMap id="pigBaseVoMap" type="com.huimv.apiservice.entity.vo.PigBaseVo">
|
|
<resultMap id="pigBaseVoMap" type="com.huimv.apiservice.entity.vo.PigBaseVo">
|
|
- <result property="eartag" column="c_eartag" />
|
|
|
|
- <result property="weight" column="weight" />
|
|
|
|
- <result property="dayAge" column="day_age" />
|
|
|
|
- <result property="breed" column="breed" />
|
|
|
|
- <result property="birthday" column="birthday" />
|
|
|
|
- <result property="feeder" column="feeder" />
|
|
|
|
- <result property="pigsty" column="pigsty" />
|
|
|
|
- <result property="periodNumber" column="period_number" />
|
|
|
|
- <result property="inFenceTime" column="in_fence_time" />
|
|
|
|
- <result property="outFenceTime" column="out_fence_time" />
|
|
|
|
|
|
+ <result property="eartag" column="c_eartag"/>
|
|
|
|
+ <result property="weight" column="weight"/>
|
|
|
|
+ <result property="dayAge" column="day_age"/>
|
|
|
|
+ <result property="breed" column="breed"/>
|
|
|
|
+ <result property="birthday" column="birthday"/>
|
|
|
|
+ <result property="feeder" column="feeder"/>
|
|
|
|
+ <result property="pigsty" column="pigsty"/>
|
|
|
|
+ <result property="periodNumber" column="period_number"/>
|
|
|
|
+ <result property="inFenceTime" column="in_fence_time"/>
|
|
|
|
+ <result property="outFenceTime" column="out_fence_time"/>
|
|
|
|
|
|
<association property="mother" javaType="com.huimv.apiservice.entity.vo.PigPedigreeMotherVo">
|
|
<association property="mother" javaType="com.huimv.apiservice.entity.vo.PigPedigreeMotherVo">
|
|
- <result property="eartag" column="m_eartag" />
|
|
|
|
- <result property="breed" column="m_breed" />
|
|
|
|
- <result property="childbirthWeight" column="m_weight" />
|
|
|
|
- <result property="originPlace" column="m_origin_place" />
|
|
|
|
- <result property="pregnancyDate" column="pregnancy_date" />
|
|
|
|
- <result property="childCount" column="child_count" />
|
|
|
|
|
|
+ <result property="eartag" column="m_eartag"/>
|
|
|
|
+ <result property="breed" column="m_breed"/>
|
|
|
|
+ <result property="childbirthWeight" column="m_weight"/>
|
|
|
|
+ <result property="originPlace" column="m_origin_place"/>
|
|
|
|
+ <result property="pregnancyDate" column="pregnancy_date"/>
|
|
|
|
+ <result property="childCount" column="child_count"/>
|
|
</association>
|
|
</association>
|
|
|
|
|
|
<association property="father" javaType="com.huimv.apiservice.entity.vo.PigPedigreeFatherVo">
|
|
<association property="father" javaType="com.huimv.apiservice.entity.vo.PigPedigreeFatherVo">
|
|
- <result property="eartag" column="f_eartag" />
|
|
|
|
- <result property="breed" column="f_breed" />
|
|
|
|
- <result property="originPlace" column="f_origin_place" />
|
|
|
|
|
|
+ <result property="eartag" column="f_eartag"/>
|
|
|
|
+ <result property="breed" column="f_breed"/>
|
|
|
|
+ <result property="originPlace" column="f_origin_place"/>
|
|
</association>
|
|
</association>
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
- <select id="selectFeederInfoByPigEarTagNo" parameterType="string" resultType="com.huimv.apiservice.entity.EmployeeEntity">
|
|
|
|
|
|
+ <select id="selectFeederInfoByPigEarTagNo" parameterType="string"
|
|
|
|
+ resultType="com.huimv.apiservice.entity.EmployeeEntity">
|
|
SELECT me.*
|
|
SELECT me.*
|
|
FROM mgt_employee me
|
|
FROM mgt_employee me
|
|
JOIN mgt_pigsty mp
|
|
JOIN mgt_pigsty mp
|
|
@@ -107,11 +108,16 @@
|
|
<if test="periodId != null">
|
|
<if test="periodId != null">
|
|
AND child.period_id = #{periodId}
|
|
AND child.period_id = #{periodId}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="lastGetDataTime != null and lastGetDataTime != ''">
|
|
|
|
+ AND child.gmt_modified = #{lastGetDataTime}
|
|
|
|
+ </if>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="batchInsertData">
|
|
<insert id="batchInsertData">
|
|
- insert into mgt_year_pig_base(eartag,day_age,unit_id,weight,breed,sex,birthday,origin_place,pigsty_id,period_id,in_fence_time,mother_eartag,father_eartag) values
|
|
|
|
|
|
+ insert into
|
|
|
|
+ mgt_year_pig_base(eartag,day_age,unit_id,weight,breed,sex,birthday,origin_place,pigsty_id,period_id,in_fence_time,mother_eartag,father_eartag)
|
|
|
|
+ values
|
|
<foreach collection="list" item="item" separator=",">
|
|
<foreach collection="list" item="item" separator=",">
|
|
(#{item.eartag},
|
|
(#{item.eartag},
|
|
#{item.dayAge},
|
|
#{item.dayAge},
|