From c26a9d5eda9cb575df18fbf9a5a5c94869e99f88 Mon Sep 17 00:00:00 2001 From: zhubaomin <zhubaomin> Date: 星期三, 03 九月 2025 10:24:19 +0800 Subject: [PATCH] 获取轮灌组时取消项目ID --- pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/irrigatePlan/IrrigatePlanSv.java | 44 -------------------------------------------- 1 files changed, 0 insertions(+), 44 deletions(-) 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 86c013c..614ff75 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 @@ -79,24 +79,12 @@ @Value("${wechat.irr.plan.planTerminateLimitMinutes:5}") private Integer planTerminateLimitMinutes; // 璁″垝缁堟鍚庨檺鍒跺彂甯冩柊璁″垝鐨勬椂闂撮棿闅�(鍒嗛挓) - /** - * 娣诲姞鐏屾簤璁″垝 - * - * @param po - * @return - */ @Transactional(rollbackFor = Exception.class) public Long addIrrigatePlan(IrIrrigatePlan po) { irrigatePlanMapper.insert(po); return po.getId(); } - /** - * 鍒犻櫎鐏屾簤璁″垝 - * - * @param planSimple - * @return - */ @Transactional(rollbackFor = Exception.class) public Map deletePlan(PlanSimple planSimple) { Long planId = planSimple.getPlanId(); @@ -142,12 +130,6 @@ } } - /** - * 鍙戝竷鐏屾簤璁″垝 - * - * @param planSimple - * @return - */ public Map publishPlan(PlanSimple planSimple) { Long planId = planSimple.getPlanId(); Long operatorId = planSimple.getOperatorId(); @@ -184,10 +166,6 @@ } } - /** - * 鑾峰彇鐏屾簤璁″垝淇℃伅 - * 鏇存柊鐏屾簤璁″垝璧锋鏃堕棿鍙婅鍒掔姸鎬� - */ VoPlanSimple plan = irrigatePlanMapper.getPlanSimple(planId); if (plan == null) { Map map = new HashMap<>(); @@ -217,39 +195,32 @@ } planStartTime = Date.from(startTime.atZone(ZoneId.systemDefault()).toInstant()); - // 鏇存柊姣忎釜鐏屾簤娆″簭鐨勫紑濮嬫椂闂村苟璁$畻鏈�鍚庝竴缁勫叧闃�鏃堕棿 List<VoIrrigateSchedule> schedules = getSchedulesByPlanId(planId); Date scheduleStartTime = null; LocalDateTime lastScheduleEndTime = null; Integer sort = 0; - // 绗竴娆¢亶鍘嗭細鏇存柊姣忎釜鐏屾簤娆″簭鐨勫紑濮嬫椂闂� for (VoIrrigateSchedule schedule : schedules) { if (scheduleStartTime == null) { scheduleStartTime = planStartTime; } this.updateScheduleStartTime(schedule.getScheduleId(), scheduleStartTime); - // 璁$畻褰撳墠娆″簭鐨勭粨鏉熸椂闂� LocalDateTime currentScheduleStartTime = scheduleStartTime.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime(); LocalDateTime currentScheduleEndTime = currentScheduleStartTime.plusMinutes(schedule.getDuration()); - // 鏇存柊鏈�鍚庝竴缁勭殑缁撴潫鏃堕棿 lastScheduleEndTime = currentScheduleEndTime; - // 璁$畻涓嬩竴缁勭殑寮�濮嬫椂闂� LocalDateTime LocalscheduleStartTime = scheduleStartTime.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime(); LocalscheduleStartTime = LocalscheduleStartTime.plusMinutes(schedule.getDuration()); LocalscheduleStartTime = LocalscheduleStartTime.minusMinutes(preOpeningTime); scheduleStartTime = Date.from(LocalscheduleStartTime.atZone(ZoneId.systemDefault()).toInstant()); - // 纭繚涓嬩竴缁勭殑寮�濮嬫椂闂翠笉鏃╀簬璁″垝寮�濮嬫椂闂� if (scheduleStartTime.before(planStartTime)) { scheduleStartTime = planStartTime; } } - // 鏍规嵁鏈�鍚庝竴缁勫叧闃�鏃堕棿璁剧疆璁″垝缁撴潫鏃堕棿 if (lastScheduleEndTime != null) { planStopTime = Date.from(lastScheduleEndTime.atZone(ZoneId.systemDefault()).toInstant()); } else { @@ -258,7 +229,6 @@ planStopTime = Date.from(stopTime.atZone(ZoneId.systemDefault()).toInstant()); } - // 鏍规嵁璁″垝ID鏇存柊璁″垝淇℃伅锛堣捣姝㈡椂闂淬�佽鍒掔姸鎬侊級 if (this.updatePlanTimes(planStartTime, planStopTime, planId) == 0) { Map map = new HashMap<>(); map.put("success", false); @@ -267,7 +237,6 @@ return map; } - // 娣诲姞鐏屾簤璁″垝鎿嶄綔璁板綍 IrPlanOperate planOperate = new IrPlanOperate(); planOperate.setPlanId(planId); planOperate.setOperator(operatorId); @@ -541,12 +510,6 @@ return irIrrigateUnitMapper.getIntakeIdByUnitId(unitId); } - /** - * 鏍规嵁璁″垝ID鑾峰彇璁″垝鍙戝竷缁撴灉 - * - * @param planId - * @return - */ public VoPlanDetails getPublishResults(Long planId) { VoPlanDetails planDetails = irrigatePlanMapper.getPlanDetails(planId); if (planDetails == null) { @@ -571,15 +534,8 @@ planDetails.setGroups(groupResults); return planDetails; - } - /** - * 鏍规嵁璁″垝ID鑾峰彇璁″垝缁堟鎿嶄綔缁撴灉 - * - * @param planId - * @return - */ public VoPlanDetails getTerminateResults(Long planId) { // 鑾峰彇璁″垝缁堟鏃堕棿 Date terminateTime = Optional.ofNullable(irPlanOperateMapper.getTerminateTime(planId)).orElse(null); -- Gitblit v1.8.0