From f77e9a7cfbe775523551df5faab3c70a5a9c190c Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期一, 03 三月 2025 14:22:35 +0800 Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV --- pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoIr/IrIrrigatePlanMapper.java | 14 ++ pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoIr/IrIrrigateScheduleMapper.java | 8 + pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrIrrigateScheduleMapper.xml | 50 +++++---- pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/dto/IrrigatePlan.java | 16 +- pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/dto/IrrigateSchedule.java | 16 +++ pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrIrrigatePlanMapper.xml | 64 ++++++++---- pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoIr/IrIrrigateSchedule.java | 41 ++++---- pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanCtrl.java | 62 +++++++----- pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanSv.java | 22 ++++ 9 files changed, 188 insertions(+), 105 deletions(-) diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoIr/IrIrrigatePlanMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoIr/IrIrrigatePlanMapper.java index 697f90e..ab4c01e 100644 --- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoIr/IrIrrigatePlanMapper.java +++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoIr/IrIrrigatePlanMapper.java @@ -30,6 +30,20 @@ int updateByPrimaryKey(IrIrrigatePlan record); /** + * 鏍规嵁鎸囧畾鐨勮鍒扞D鑾峰彇鍚姩妯″紡 + * @param planId + * @return + */ + Byte getStartupMode(Long planId); + + /** + * 鏍规嵁鎸囧畾鐨勮鍒扞D鑾峰彇宸插彂甯冪殑鐏屾簤璁″垝鏁伴噺 + * @param planId + * @return + */ + Integer getPublishedCount(Long planId); + + /** * 鍙戝竷鎸囧畾鐨勭亴婧夎鍒� * @param planId * @return diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoIr/IrIrrigateScheduleMapper.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoIr/IrIrrigateScheduleMapper.java index 08cf63d..e92aae7 100644 --- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoIr/IrIrrigateScheduleMapper.java +++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoIr/IrIrrigateScheduleMapper.java @@ -4,15 +4,17 @@ import com.dy.pipIrrGlobal.pojoIr.IrIrrigateSchedule; import com.dy.pipIrrGlobal.voIr.VoIrrigateSchedule; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; import java.util.List; /** * @author ZhuBaoMin - * @date 2025-02-20 15:35 - * @LastEditTime 2025-02-20 15:35 + * @date 2025-02-27 10:02 + * @LastEditTime 2025-02-27 10:02 * @Description */ + @Mapper public interface IrIrrigateScheduleMapper extends BaseMapper<IrIrrigateSchedule> { int deleteByPrimaryKey(Long id); @@ -32,5 +34,5 @@ * @param planId * @return */ - List<VoIrrigateSchedule> getIrrigateSchedules(Long planId); + List<VoIrrigateSchedule> getIrrigateSchedules(@Param("startupMode") Byte startupMode, @Param("planId") Long planId); } \ No newline at end of file diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoIr/IrIrrigateSchedule.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoIr/IrIrrigateSchedule.java index 07ed9a3..65b50d0 100644 --- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoIr/IrIrrigateSchedule.java +++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/pojoIr/IrIrrigateSchedule.java @@ -29,50 +29,49 @@ public static final long serialVersionUID = 202502201601001L; /** - * 涓婚敭 - */ + * 涓婚敭 + */ @JSONField(serializeUsing= ObjectWriterImplToString.class) @TableId(type = IdType.INPUT) private Long id; /** - * 鐏屾簤璁″垝ID - */ + * 鐏屾簤璁″垝ID + */ @NotNull(message = "鐏屾簤璁″垝ID涓嶈兘涓虹┖") private Long planId; /** - * 杞亴缁処D - */ + * 杞亴缁処D + */ + @NotNull(message = "杞亴缁処D涓嶈兘涓虹┖") private Long groupId; /** - * 鐏屾簤鍗曞厓ID - */ - private Long unitId; - - /** - * 鐏屾簤寮�濮嬫椂闂� - */ + * 鐏屾簤寮�濮嬫椂闂� + */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - @NotNull(message = "鐏屾簤寮�濮嬫椂闂翠笉鑳戒负绌�") private Date startTime; /** - * 鐏屾簤缁撴潫鏃堕棿 - */ + * 鐏屾簤缁撴潫鏃堕棿 + */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - @NotNull(message ="鐏屾簤缁撴潫鏃堕棿涓嶈兘涓虹┖") private Date stopTime; /** - * 鍙栨按鍙D鍒楄〃 - */ + * 鐏屾簤鏃堕暱;鍒嗛挓 + */ + private Integer duration; + + /** + * 鍙栨按鍙D鍒楄〃 + */ private String intakeIds; /** - * 褰撳墠鐘舵��;1-姝e父锛�2-鏆傚仠锛�3-缁堟 - */ + * 褰撳墠鐘舵��;1-姝e父锛�2-鏆傚仠锛�3-缁堟 + */ private Byte currentState; } \ No newline at end of file diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrIrrigatePlanMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrIrrigatePlanMapper.xml index bbf7b56..0d4e9ed 100644 --- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrIrrigatePlanMapper.xml +++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrIrrigatePlanMapper.xml @@ -160,6 +160,23 @@ where id = #{id,jdbcType=BIGINT} </update> + <!--鏍规嵁鎸囧畾鐨勮鍒扞D鑾峰彇鍚姩妯″紡--> + <select id="getStartupMode" resultType="java.lang.Byte"> + SELECT + startup_mode AS startupMode + FROM ir_irrigate_plan + WHERE id = #{planId} + </select> + + <!--鏍规嵁鎸囧畾鐨勮鍒扞D鑾峰彇宸插彂甯冪殑鐏屾簤璁″垝鏁伴噺--> + <select id="getPublishedCount" resultType="java.lang.Integer"> + SELECT COUNT(*) + FROM ir_irrigate_plan plan + WHERE plan.id = #{planId} + AND plan.plan_state = 2 + AND plan.deleted = 0 + </select> + <!--鍙戝竷鎸囧畾鐨勭亴婧夎鍒�--> <update id="publishIrrigatePlan"> UPDATE ir_irrigate_plan SET plan_state = 2 WHERE id = #{planId} @@ -198,30 +215,31 @@ <!--鏍规嵁鎸囧畾鐨勬潯浠惰幏鍙栬鍒掑垪琛�--> <select id="getIrrigatePlans" resultType="com.dy.pipIrrGlobal.voIr.VoIrrigatePlan"> SELECT - plan.id AS planId, - pro.project_name AS projectName, - plan.plan_name AS planName, - CASE plan.startup_mode - WHEN 1 THEN '鎵嬪姩鍚姩' - WHEN 2 THEN '鑷姩鍚姩' - END AS startupMode, - plan.plan_start_time AS startTime, - plan.plan_stop_time AS stopTime, - CASE plan.plan_state - WHEN 1 THEN '鑽夌' - WHEN 2 THEN '宸插彂甯�' - END AS planState, + plan.id AS planId, + pro.project_name AS projectName, + plan.plan_name AS planName, + CASE plan.startup_mode + WHEN 1 THEN '鎵嬪姩鍚姩' + WHEN 2 THEN '鑷姩鍚姩' + END AS startupMode, + plan.plan_start_time AS startTime, + plan.plan_stop_time AS stopTime, + plan.duration AS duration, + CASE plan.plan_state + WHEN 1 THEN '鑽夌' + WHEN 2 THEN '宸插彂甯�' + END AS planState, - CASE plan.executing_state - WHEN 1 THEN - '鏈墽琛�' - WHEN 2 THEN - '鎵ц涓�' - WHEN 3 THEN - '宸叉殏鍋�' - WHEN 4 THEN - '宸茬粓姝�' - END AS executingState + CASE plan.executing_state + WHEN 1 THEN + '鏈墽琛�' + WHEN 2 THEN + '鎵ц涓�' + WHEN 3 THEN + '宸叉殏鍋�' + WHEN 4 THEN + '宸茬粓姝�' + END AS executingState FROM ir_irrigate_plan plan INNER JOIN ir_project pro ON pro.id = plan.project_id <where> diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrIrrigateScheduleMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrIrrigateScheduleMapper.xml index 1c90e2a..f57f2f0 100644 --- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrIrrigateScheduleMapper.xml +++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrIrrigateScheduleMapper.xml @@ -7,15 +7,15 @@ <id column="id" jdbcType="BIGINT" property="id" /> <result column="plan_id" jdbcType="BIGINT" property="planId" /> <result column="group_id" jdbcType="BIGINT" property="groupId" /> - <result column="unit_id" jdbcType="BIGINT" property="unitId" /> <result column="start_time" jdbcType="TIMESTAMP" property="startTime" /> <result column="stop_time" jdbcType="TIMESTAMP" property="stopTime" /> - <result column="intake_ids" jdbcType="VARCHAR" property="intakeIds" /> + <result column="duration" jdbcType="INTEGER" property="duration" /> + <result column="intake_ids" jdbcType="LONGVARCHAR" property="intakeIds" /> <result column="current_state" jdbcType="TINYINT" property="currentState" /> </resultMap> <sql id="Base_Column_List"> <!--@mbg.generated--> - id, plan_id, group_id, unit_id, start_time, stop_time, intake_ids, current_state + id, plan_id, group_id, start_time, stop_time, duration, intake_ids, current_state </sql> <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> <!--@mbg.generated--> @@ -32,11 +32,11 @@ <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoIr.IrIrrigateSchedule"> <!--@mbg.generated--> insert into ir_irrigate_schedule (id, plan_id, group_id, - unit_id, start_time, stop_time, + start_time, stop_time, duration, intake_ids, current_state) values (#{id,jdbcType=BIGINT}, #{planId,jdbcType=BIGINT}, #{groupId,jdbcType=BIGINT}, - #{unitId,jdbcType=BIGINT}, #{startTime,jdbcType=TIMESTAMP}, #{stopTime,jdbcType=TIMESTAMP}, - #{intakeIds,jdbcType=VARCHAR}, #{currentState,jdbcType=TINYINT}) + #{startTime,jdbcType=TIMESTAMP}, #{stopTime,jdbcType=TIMESTAMP}, #{duration,jdbcType=INTEGER}, + #{intakeIds,jdbcType=LONGVARCHAR}, #{currentState,jdbcType=TINYINT}) </insert> <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoIr.IrIrrigateSchedule"> <!--@mbg.generated--> @@ -51,14 +51,14 @@ <if test="groupId != null"> group_id, </if> - <if test="unitId != null"> - unit_id, - </if> <if test="startTime != null"> start_time, </if> <if test="stopTime != null"> stop_time, + </if> + <if test="duration != null"> + duration, </if> <if test="intakeIds != null"> intake_ids, @@ -77,17 +77,17 @@ <if test="groupId != null"> #{groupId,jdbcType=BIGINT}, </if> - <if test="unitId != null"> - #{unitId,jdbcType=BIGINT}, - </if> <if test="startTime != null"> #{startTime,jdbcType=TIMESTAMP}, </if> <if test="stopTime != null"> #{stopTime,jdbcType=TIMESTAMP}, </if> + <if test="duration != null"> + #{duration,jdbcType=INTEGER}, + </if> <if test="intakeIds != null"> - #{intakeIds,jdbcType=VARCHAR}, + #{intakeIds,jdbcType=LONGVARCHAR}, </if> <if test="currentState != null"> #{currentState,jdbcType=TINYINT}, @@ -104,17 +104,17 @@ <if test="groupId != null"> group_id = #{groupId,jdbcType=BIGINT}, </if> - <if test="unitId != null"> - unit_id = #{unitId,jdbcType=BIGINT}, - </if> <if test="startTime != null"> start_time = #{startTime,jdbcType=TIMESTAMP}, </if> <if test="stopTime != null"> stop_time = #{stopTime,jdbcType=TIMESTAMP}, </if> + <if test="duration != null"> + duration = #{duration,jdbcType=INTEGER}, + </if> <if test="intakeIds != null"> - intake_ids = #{intakeIds,jdbcType=VARCHAR}, + intake_ids = #{intakeIds,jdbcType=LONGVARCHAR}, </if> <if test="currentState != null"> current_state = #{currentState,jdbcType=TINYINT}, @@ -127,20 +127,26 @@ update ir_irrigate_schedule set plan_id = #{planId,jdbcType=BIGINT}, group_id = #{groupId,jdbcType=BIGINT}, - unit_id = #{unitId,jdbcType=BIGINT}, start_time = #{startTime,jdbcType=TIMESTAMP}, stop_time = #{stopTime,jdbcType=TIMESTAMP}, - intake_ids = #{intakeIds,jdbcType=VARCHAR}, + duration = #{duration,jdbcType=INTEGER}, + intake_ids = #{intakeIds,jdbcType=LONGVARCHAR}, current_state = #{currentState,jdbcType=TINYINT} where id = #{id,jdbcType=BIGINT} </update> - <!--鏍规嵁璁″垝ID鑾峰彇鐏屾簤娆″簭--> + <!--鏍规嵁璁″垝ID鑾峰彇鐏屾簤娆″簭_妯″紡2--> <select id="getIrrigateSchedules" resultType="com.dy.pipIrrGlobal.voIr.VoIrrigateSchedule"> SELECT id AS scheduleId, - start_time AS startTime, - TIMESTAMPDIFF(MINUTE, start_time, stop_time) AS duration, + <if test="startupMode == 1"> + null AS startTime, + duration, + </if> + <if test="startupMode == 2"> + start_time AS startTime, + TIMESTAMPDIFF(MINUTE, start_time, stop_time) AS duration, + </if> intake_ids AS intakeIds FROM ir_irrigate_schedule WHERE plan_id = #{planId} diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanCtrl.java index 1e9be73..e2ef8ec 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanCtrl.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanCtrl.java @@ -62,9 +62,14 @@ IrIrrigatePlan plan = new IrIrrigatePlan(); plan.setProjectId(planAndSchedule.getProjectId()); plan.setPlanName(planAndSchedule.getPlanName()); - plan.setStartupMode(planAndSchedule.getStartupMode()); - plan.setPlanStartTime(planAndSchedule.getPlanStartTime()); - plan.setPlanStopTime(planAndSchedule.getPlanStopTime()); + Byte startupMode = planAndSchedule.getStartupMode(); + plan.setStartupMode(startupMode); + if(startupMode == 1){ + plan.setDuration(planAndSchedule.getDuration()); + }else if(startupMode == 2){ + plan.setPlanStartTime(planAndSchedule.getPlanStartTime()); + plan.setPlanStopTime(planAndSchedule.getPlanStopTime()); + } plan.setPlanState((byte)1); plan.setExecutingState((byte)1); plan.setDeleted(0L); @@ -79,29 +84,26 @@ for(IrrigateSchedule schedule : planAndSchedule.getSchedules()){ IrIrrigateSchedule po = new IrIrrigateSchedule(); po.setPlanId(planId); - - if(planAndSchedule.getIrrigateType() == 1) { - po.setGroupId(schedule.getIrrigateId()); - List<Long> intakesData = irrigatePlanSv.getIntakesByGroupId(schedule.getIrrigateId()); - if(intakesData != null && intakesData.size() > 0){ - String intakeIds = ""; - for(Long intakeId : intakesData){ - intakeIds += intakeId + ","; - } - po.setIntakeIds(intakeIds.substring(0, intakeIds.length() - 1)); - } - }else { - po.setUnitId(schedule.getIrrigateId()); - Long intakeId = irrigatePlanSv.getIntakeIdByUnitId(schedule.getIrrigateId()); - if(intakeId != null){ - po.setIntakeIds(intakeId.toString()); - } + po.setGroupId(schedule.getGroupId()); + if(startupMode == 1){ + po.setDuration(schedule.getDuration()); + }else if(startupMode == 2){ + po.setStartTime(schedule.getStartTime()); + po.setStopTime(schedule.getStopTime()); } - - po.setStartTime(schedule.getStartTime()); - po.setStopTime(schedule.getStopTime()); po.setCurrentState((byte)1); + List<Long> intakesData = irrigatePlanSv.getIntakesByGroupId(schedule.getGroupId()); + if(intakesData != null && intakesData.size() > 0){ + String intakeIds = ""; + for(Long intakeId : intakesData){ + intakeIds += intakeId + ","; + } + po.setIntakeIds(intakeIds.substring(0, intakeIds.length() - 1)); + } Long scheduleId = irrigatePlanSv.addIrrigateSchedule(po); + if(scheduleId == null) { + return BaseResponseUtils.buildErrorMsg("鍒涘缓鐏屾簤璁″垝澶辫触"); + } } } @@ -136,6 +138,10 @@ Long planId = planSimple.getPlanId(); Long operatorId = planSimple.getOperatorId(); + if(irrigatePlanSv.getPublishedCount(planId) > 0){ + return BaseResponseUtils.buildErrorMsg("璇ョ亴婧夎鍒掑凡鍙戝竷"); + } + // 淇敼鐏屾簤璁″垝鐘舵�佷负鍙戝竷鐘舵�� if(irrigatePlanSv.publishIrrigatePlan(planId) == 0){ return BaseResponseUtils.buildErrorMsg("淇敼鐏屾簤璁″垝鐘舵�佸け璐�"); @@ -151,11 +157,17 @@ return BaseResponseUtils.buildErrorMsg("娣诲姞鐏屾簤璁″垝鎿嶄綔璁板綍澶辫触"); } - // 鐢熸垚寮�闃�璁″垝 - List<VoIrrigateSchedule> schedules = irrigatePlanSv.getIrrigateSchedules(planId); + /** + * 鐢熸垚寮�闃�璁″垝 + * 璐ф湡璁″垝鍚姩妯″紡 + */ + // 鑾峰彇鐏屾簤璁″垝鍚姩妯″紡 + Byte startupMode = irrigatePlanSv.getStartupMode(planId); + List<VoIrrigateSchedule> schedules = irrigatePlanSv.getIrrigateSchedules(startupMode, planId); if(schedules == null || schedules.size() == 0) { return BaseResponseUtils.buildErrorMsg("鏃犲彇姘村彛锛岀敓鎴愬紑闃�璁″垝澶辫触"); } + for (VoIrrigateSchedule schedule : schedules) { for(String intakeId : schedule.getIntakeIds().split(",")){ // 娣诲姞鐏屾簤璁″垝寮�鍚褰� diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanSv.java index c75639d..daa4efb 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanSv.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanSv.java @@ -56,6 +56,15 @@ } /** + * 鏍规嵁鎸囧畾鐨勮鍒扞D鑾峰彇鍚姩妯″紡 + * @param planId + * @return + */ + public Byte getStartupMode(Long planId) { + return irrigatePlanMapper.getStartupMode(planId); + } + + /** * 鏍规嵁鎸囧畾鐨勬潯浠惰幏鍙栬鍒掑垪琛� * @param queryVo * @return @@ -72,6 +81,15 @@ rsVo.calculateAndSet(itemTotal, params); rsVo.obj = irrigatePlanMapper.getIrrigatePlans(params); return rsVo; + } + + /** + * 鏍规嵁鎸囧畾鐨勮鍒扞D鑾峰彇宸插彂甯冪殑鐏屾簤璁″垝鏁伴噺 + * @param planId + * @return + */ + public Integer getPublishedCount(Long planId) { + return irrigatePlanMapper.getPublishedCount(planId); } /** @@ -108,8 +126,8 @@ * @param planId * @return */ - public List<VoIrrigateSchedule> getIrrigateSchedules(Long planId) { - return irIrrigateScheduleMapper.getIrrigateSchedules(planId); + public List<VoIrrigateSchedule> getIrrigateSchedules(Byte startupMode, Long planId) { + return irIrrigateScheduleMapper.getIrrigateSchedules(startupMode, planId); } /** diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/dto/IrrigatePlan.java b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/dto/IrrigatePlan.java index e5d5c79..c24d70d 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/dto/IrrigatePlan.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/dto/IrrigatePlan.java @@ -47,10 +47,15 @@ private Date planStopTime; /** - * 鐏屾簤绫诲瀷锛�1-杞亴缁勶紝2-鐏屾簤鍗曞厓 + * 璁″垝鎸佺画鏃堕棿 */ - @NotNull(message = "鐏屾簤绫诲瀷涓嶈兘涓虹┖") - private Byte irrigateType; + private Integer duration; + + /** + * 鎿嶄綔浜篒D + */ + @NotNull(message = "鎿嶄綔浜篒D涓嶈兘涓虹┖") + private Long operatorId; /** * 鐏屾簤娆″簭 @@ -58,9 +63,4 @@ @NotEmpty(message = "宸℃杞ㄨ抗涓嶈兘涓虹┖") private List<IrrigateSchedule> schedules; - /** - * 鎿嶄綔浜篒D - */ - @NotNull(message = "鎿嶄綔浜篒D涓嶈兘涓虹┖") - private Long operatorId; } diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/dto/IrrigateSchedule.java b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/dto/IrrigateSchedule.java index 6611243..775bcaa 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/dto/IrrigateSchedule.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/dto/IrrigateSchedule.java @@ -15,10 +15,24 @@ public class IrrigateSchedule { public static final long serialVersionUID = 202502201519001L; - private Long irrigateId; + /** + * 杞亴缁処D + */ + private Long groupId; + /** + * 璇ヨ疆鐏岀粍寮�濮嬬亴婧夋椂闂� + */ private Date startTime; + /** + * 璇ヨ疆鐏岀粍缁撴潫鐏屾簤鏃堕棿 + */ private Date stopTime; + /** + * 璇ヨ疆鐏岀粍鐏屾簤鏃堕暱 + */ + private Integer duration; + } -- Gitblit v1.8.0