feat(module/feed module global/import): 添加饲喂管理/饲喂计划模块

添加饲喂管理/饲喂计划模块
对配方管理的一些已知问题进行修正
使用IDEA自动优化import对整个项目进行了import优化

BREAKING CHANGE: 使用IDEA自动优化import对整个项目进行了import优化
This commit is contained in:
2025-08-17 18:25:43 +08:00
parent aefd954003
commit 73468bf675
81 changed files with 139 additions and 238 deletions

View File

@@ -7,21 +7,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="SgFeedPlan" id="SgFeedPlanResult">
<result property="createDate" column="create_date" />
<result property="formulaId" column="formula_id" />
<result property="batchId" column="batch_id" />
<result property="sheepHouseId" column="sheep_house_id" />
<result property="sheepCount" column="sheep_count" />
<result property="planDailySize" column="plan_daily_size" />
<result property="ratioMorning" column="ratio_morning" />
<result property="ratioNoon" column="ratio_noon" />
<result property="ratioAfternoon" column="ratio_afternoon" />
<result property="planMorningSize" column="plan_morning_size" />
<result property="planMorningTotal" column="plan_morning_total" />
<result property="ratioMorning" column="ratio_morning" />
<result property="actualMorningSize" column="actual_morning_size" />
<result property="planNoonSize" column="plan_noon_size" />
<result property="planNoonTotal" column="plan_noon_total" />
<result property="actualNoonSize" column="actual_noon_size" />
<result property="ratioNoon" column="ratio_noon" />
<result property="planAfternoonSize" column="plan_afternoon_size" />
<result property="planAfternoonTotal" column="plan_afternoon_total" />
<result property="actualAfternoonSize" column="actual_afternoon_size" />
<result property="ratioAfternoon" column="ratio_afternoon" />
<result property="planFeedTotal" column="plan_feed_total" />
<result property="zookeeper" column="zookeeper" />
<result property="planDate" column="plan_date" />
@@ -29,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectSgFeedPlanVo">
select create_date, formula_id, sheep_house_id, sheep_count, plan_daily_size, plan_morning_size, plan_morning_total, ratio_morning, actual_morning_size, plan_noon_size, plan_noon_total, actual_noon_size, ratio_noon, plan_afternoon_size, plan_afternoon_total, actual_afternoon_size, ratio_afternoon, plan_feed_total, zookeeper, plan_date, remark from sg_feed_plan
select create_date, formula_id, batch_id, sheep_house_id, sheep_count, plan_daily_size, ratio_morning, ratio_noon, ratio_afternoon, plan_morning_size, plan_morning_total, actual_morning_size, plan_noon_size, plan_noon_total, actual_noon_size, plan_afternoon_size, plan_afternoon_total, actual_afternoon_size, plan_feed_total, zookeeper, plan_date, remark from sg_feed_plan
</sql>
<select id="selectSgFeedPlanList" parameterType="SgFeedPlan" resultMap="SgFeedPlanResult">
@@ -37,9 +38,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
<if test="formulaId != null and formulaId != ''"> and formula_id = #{formulaId}</if>
<if test="sheepHouseId != null "> and sheep_house_id = #{sheepHouseId}</if>
<if test="zookeeper != null and zookeeper != ''"> and zookeeper = #{zookeeper}</if>
<if test="planDate != null "> and plan_date = #{planDate}</if>
</where>
ORDER BY formula_id ASC, plan_date ASC
</select>
<select id="selectSgFeedPlanByCreateDate" parameterType="Date" resultMap="SgFeedPlanResult">
@@ -52,21 +52,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="createDate != null">create_date,</if>
<if test="formulaId != null and formulaId != ''">formula_id,</if>
<if test="batchId != null and batchId != ''">batch_id,</if>
<if test="sheepHouseId != null">sheep_house_id,</if>
<if test="sheepCount != null">sheep_count,</if>
<if test="planDailySize != null">plan_daily_size,</if>
<if test="ratioMorning != null">ratio_morning,</if>
<if test="ratioNoon != null">ratio_noon,</if>
<if test="ratioAfternoon != null">ratio_afternoon,</if>
<if test="planMorningSize != null">plan_morning_size,</if>
<if test="planMorningTotal != null">plan_morning_total,</if>
<if test="ratioMorning != null">ratio_morning,</if>
<if test="actualMorningSize != null">actual_morning_size,</if>
<if test="planNoonSize != null">plan_noon_size,</if>
<if test="planNoonTotal != null">plan_noon_total,</if>
<if test="actualNoonSize != null">actual_noon_size,</if>
<if test="ratioNoon != null">ratio_noon,</if>
<if test="planAfternoonSize != null">plan_afternoon_size,</if>
<if test="planAfternoonTotal != null">plan_afternoon_total,</if>
<if test="actualAfternoonSize != null">actual_afternoon_size,</if>
<if test="ratioAfternoon != null">ratio_afternoon,</if>
<if test="planFeedTotal != null">plan_feed_total,</if>
<if test="zookeeper != null">zookeeper,</if>
<if test="planDate != null">plan_date,</if>
@@ -75,21 +76,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="createDate != null">#{createDate},</if>
<if test="formulaId != null and formulaId != ''">#{formulaId},</if>
<if test="batchId != null and batchId != ''">#{batchId},</if>
<if test="sheepHouseId != null">#{sheepHouseId},</if>
<if test="sheepCount != null">#{sheepCount},</if>
<if test="planDailySize != null">#{planDailySize},</if>
<if test="ratioMorning != null">#{ratioMorning},</if>
<if test="ratioNoon != null">#{ratioNoon},</if>
<if test="ratioAfternoon != null">#{ratioAfternoon},</if>
<if test="planMorningSize != null">#{planMorningSize},</if>
<if test="planMorningTotal != null">#{planMorningTotal},</if>
<if test="ratioMorning != null">#{ratioMorning},</if>
<if test="actualMorningSize != null">#{actualMorningSize},</if>
<if test="planNoonSize != null">#{planNoonSize},</if>
<if test="planNoonTotal != null">#{planNoonTotal},</if>
<if test="actualNoonSize != null">#{actualNoonSize},</if>
<if test="ratioNoon != null">#{ratioNoon},</if>
<if test="planAfternoonSize != null">#{planAfternoonSize},</if>
<if test="planAfternoonTotal != null">#{planAfternoonTotal},</if>
<if test="actualAfternoonSize != null">#{actualAfternoonSize},</if>
<if test="ratioAfternoon != null">#{ratioAfternoon},</if>
<if test="planFeedTotal != null">#{planFeedTotal},</if>
<if test="zookeeper != null">#{zookeeper},</if>
<if test="planDate != null">#{planDate},</if>
@@ -101,21 +103,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update sg_feed_plan
<trim prefix="SET" suffixOverrides=",">
<if test="formulaId != null and formulaId != ''">formula_id = #{formulaId},</if>
<if test="batchId != null and batchId != ''">batch_id = #{batchId},</if>
<if test="sheepHouseId != null">sheep_house_id = #{sheepHouseId},</if>
<if test="sheepCount != null">sheep_count = #{sheepCount},</if>
<if test="planDailySize != null">plan_daily_size = #{planDailySize},</if>
<if test="ratioMorning != null">ratio_morning = #{ratioMorning},</if>
<if test="ratioNoon != null">ratio_noon = #{ratioNoon},</if>
<if test="ratioAfternoon != null">ratio_afternoon = #{ratioAfternoon},</if>
<if test="planMorningSize != null">plan_morning_size = #{planMorningSize},</if>
<if test="planMorningTotal != null">plan_morning_total = #{planMorningTotal},</if>
<if test="ratioMorning != null">ratio_morning = #{ratioMorning},</if>
<if test="actualMorningSize != null">actual_morning_size = #{actualMorningSize},</if>
<if test="planNoonSize != null">plan_noon_size = #{planNoonSize},</if>
<if test="planNoonTotal != null">plan_noon_total = #{planNoonTotal},</if>
<if test="actualNoonSize != null">actual_noon_size = #{actualNoonSize},</if>
<if test="ratioNoon != null">ratio_noon = #{ratioNoon},</if>
<if test="planAfternoonSize != null">plan_afternoon_size = #{planAfternoonSize},</if>
<if test="planAfternoonTotal != null">plan_afternoon_total = #{planAfternoonTotal},</if>
<if test="actualAfternoonSize != null">actual_afternoon_size = #{actualAfternoonSize},</if>
<if test="ratioAfternoon != null">ratio_afternoon = #{ratioAfternoon},</if>
<if test="planFeedTotal != null">plan_feed_total = #{planFeedTotal},</if>
<if test="zookeeper != null">zookeeper = #{zookeeper},</if>
<if test="planDate != null">plan_date = #{planDate},</if>
@@ -134,4 +137,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{createDate}
</foreach>
</delete>
<select id="selectSheepCountByFoldId" parameterType="Integer">
SELECT COUNT(*)
FROM bas_sheep
WHERE sheepfold_id = #{foldId}
</select>
</mapper>