食谱计划优化
This commit is contained in:
parent
77148e9067
commit
a20ef83dc4
@ -116,6 +116,10 @@ public class SysRecipesPlan {
|
|||||||
*/
|
*/
|
||||||
private Integer reviewStatus;
|
private Integer reviewStatus;
|
||||||
|
|
||||||
|
/** 该食谱计划中暂停日期,使用 | 隔开 */
|
||||||
|
//@Excel(name = "该食谱计划中暂停日期,使用 | 隔开")
|
||||||
|
private String pauseDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建者
|
* 创建者
|
||||||
*/
|
*/
|
||||||
|
@ -185,6 +185,7 @@ public class SysRecipesPlanServiceImpl implements ISysRecipesPlanService {
|
|||||||
|| plan.getEndDate().compareTo(newRecipesPlanList.get(index).getEndDate()) != 0){
|
|| plan.getEndDate().compareTo(newRecipesPlanList.get(index).getEndDate()) != 0){
|
||||||
plan.setStartDate(newRecipesPlanList.get(index).getStartDate());
|
plan.setStartDate(newRecipesPlanList.get(index).getStartDate());
|
||||||
plan.setEndDate(newRecipesPlanList.get(index).getEndDate());
|
plan.setEndDate(newRecipesPlanList.get(index).getEndDate());
|
||||||
|
plan.setPauseDate(newRecipesPlanList.get(index).getPauseDate());
|
||||||
updateList.add(plan);
|
updateList.add(plan);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
@ -260,6 +261,8 @@ public class SysRecipesPlanServiceImpl implements ISysRecipesPlanService {
|
|||||||
sysRecipesPlan.setStartNumDay(oldStartNumDay);
|
sysRecipesPlan.setStartNumDay(oldStartNumDay);
|
||||||
oldStartNumDay += 6;
|
oldStartNumDay += 6;
|
||||||
sysRecipesPlan.setEndNumDay(oldStartNumDay);
|
sysRecipesPlan.setEndNumDay(oldStartNumDay);
|
||||||
|
//暂停日期
|
||||||
|
sysRecipesPlan.setPauseDate(pauseResult[3]);
|
||||||
//添加暂停范围内的日期
|
//添加暂停范围内的日期
|
||||||
planList.add(sysRecipesPlan);
|
planList.add(sysRecipesPlan);
|
||||||
}while (breakFlag);
|
}while (breakFlag);
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
<result property="recipesId" column="recipes_id"/>
|
<result property="recipesId" column="recipes_id"/>
|
||||||
<result property="sendFlag" column="send_flag"/>
|
<result property="sendFlag" column="send_flag"/>
|
||||||
<result property="sendTime" column="send_time"/>
|
<result property="sendTime" column="send_time"/>
|
||||||
|
<result property="pauseDate" column="pause_date"/>
|
||||||
<result property="createTime" column="create_time"/>
|
<result property="createTime" column="create_time"/>
|
||||||
<result property="createBy" column="create_by"/>
|
<result property="createBy" column="create_by"/>
|
||||||
<result property="updateTime" column="update_time"/>
|
<result property="updateTime" column="update_time"/>
|
||||||
@ -36,7 +37,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<sql id="selectSysRecipesPlanVo">
|
<sql id="selectSysRecipesPlanVo">
|
||||||
select id, order_id, cus_id, start_date, end_date, start_num_day, end_num_day, recipes_id, send_flag, send_time, create_time, create_by, update_time, update_by, del_flag, review_status from sys_recipes_plan
|
select id, order_id, cus_id, start_date, end_date, start_num_day, end_num_day, recipes_id, send_flag, send_time, pause_date, create_time, create_by, update_time, update_by, del_flag, review_status from sys_recipes_plan
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectSysRecipesPlanList" parameterType="SysRecipesPlan" resultMap="SysRecipesPlanResult">
|
<select id="selectSysRecipesPlanList" parameterType="SysRecipesPlan" resultMap="SysRecipesPlanResult">
|
||||||
@ -80,6 +81,7 @@
|
|||||||
<if test="recipesId != null">recipes_id,</if>
|
<if test="recipesId != null">recipes_id,</if>
|
||||||
<if test="sendFlag != null">send_flag,</if>
|
<if test="sendFlag != null">send_flag,</if>
|
||||||
<if test="sendTime != null">send_time,</if>
|
<if test="sendTime != null">send_time,</if>
|
||||||
|
<if test="pauseDate != null">pause_date,</if>
|
||||||
<if test="createTime != null">create_time,</if>
|
<if test="createTime != null">create_time,</if>
|
||||||
<if test="createBy != null">create_by,</if>
|
<if test="createBy != null">create_by,</if>
|
||||||
<if test="updateTime != null">update_time,</if>
|
<if test="updateTime != null">update_time,</if>
|
||||||
@ -99,6 +101,7 @@
|
|||||||
<if test="recipesId != null">#{recipesId},</if>
|
<if test="recipesId != null">#{recipesId},</if>
|
||||||
<if test="sendFlag != null">#{sendFlag},</if>
|
<if test="sendFlag != null">#{sendFlag},</if>
|
||||||
<if test="sendTime != null">#{sendTime},</if>
|
<if test="sendTime != null">#{sendTime},</if>
|
||||||
|
<if test="pauseDate != null">#{pauseDate},</if>
|
||||||
<if test="createTime != null">#{createTime},</if>
|
<if test="createTime != null">#{createTime},</if>
|
||||||
<if test="createBy != null">#{createBy},</if>
|
<if test="createBy != null">#{createBy},</if>
|
||||||
<if test="updateTime != null">#{updateTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
@ -122,6 +125,7 @@
|
|||||||
<if test="recipesId != null">recipes_id = #{recipesId},</if>
|
<if test="recipesId != null">recipes_id = #{recipesId},</if>
|
||||||
<if test="sendFlag != null">send_flag = #{sendFlag},</if>
|
<if test="sendFlag != null">send_flag = #{sendFlag},</if>
|
||||||
<if test="sendTime != null">send_time = #{sendTime},</if>
|
<if test="sendTime != null">send_time = #{sendTime},</if>
|
||||||
|
<if test="pauseDate != null">pause_date = #{pauseDate},</if>
|
||||||
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
<if test="createBy != null">create_by = #{createBy},</if>
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
@ -146,11 +150,11 @@
|
|||||||
<!-- 批量插入食谱计划 -->
|
<!-- 批量插入食谱计划 -->
|
||||||
<insert id="insertBatch">
|
<insert id="insertBatch">
|
||||||
INSERT INTO sys_recipes_plan
|
INSERT INTO sys_recipes_plan
|
||||||
(order_id, cus_id, out_id, start_date, end_date, start_num_day, end_num_day, send_flag, send_time, recipes_id)
|
(order_id, cus_id, out_id, start_date, end_date, start_num_day, end_num_day, send_flag, send_time, pause_date, recipes_id)
|
||||||
VALUES
|
VALUES
|
||||||
<foreach collection="list" item="plan" separator=",">
|
<foreach collection="list" item="plan" separator=",">
|
||||||
(#{plan.orderId}, #{plan.cusId}, #{plan.outId}, #{plan.startDate}, #{plan.endDate}, #{plan.startNumDay}, #{plan.endNumDay},
|
(#{plan.orderId}, #{plan.cusId}, #{plan.outId}, #{plan.startDate}, #{plan.endDate}, #{plan.startNumDay}, #{plan.endNumDay},
|
||||||
#{plan.sendFlag}, #{plan.sendTime}, #{plan.recipesId})
|
#{plan.sendFlag}, #{plan.sendTime}, #{plan.pauseDate}, #{plan.recipesId})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
@ -252,6 +256,6 @@
|
|||||||
<!--<foreach collection="list" item="item" separator=";" open="" close="">
|
<!--<foreach collection="list" item="item" separator=";" open="" close="">
|
||||||
|
|
||||||
</foreach>-->
|
</foreach>-->
|
||||||
update sys_recipes_plan set start_date = #{startDate},end_date = #{endDate} where id = #{id}
|
update sys_recipes_plan set start_date = #{startDate},end_date = #{endDate},pause_date=#{pauseDate} where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
</mapper>
|
</mapper>
|
Loading…
x
Reference in New Issue
Block a user