From 802fc74478ae3f2c4e8ab7cd417f97469c84f157 Mon Sep 17 00:00:00 2001 From: zhubaomin <zhubaomin> Date: 星期二, 25 三月 2025 21:31:03 +0800 Subject: [PATCH] 轮灌功能 --- pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateGroup/IrrigateGroupSv.java | 34 +++++++++++++++++++++++++++++++--- 1 files changed, 31 insertions(+), 3 deletions(-) diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateGroup/IrrigateGroupSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateGroup/IrrigateGroupSv.java index 4929306..90cb545 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateGroup/IrrigateGroupSv.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateGroup/IrrigateGroupSv.java @@ -1,8 +1,10 @@ package com.dy.pipIrrIrrigate.irrigateGroup; import com.dy.common.webUtil.QueryResultVo; +import com.dy.pipIrrGlobal.daoIr.IrGroupClientMapper; import com.dy.pipIrrGlobal.daoIr.IrGroupUnitMapper; import com.dy.pipIrrGlobal.daoIr.IrIrrigateGroupMapper; +import com.dy.pipIrrGlobal.pojoIr.IrGroupClient; import com.dy.pipIrrGlobal.pojoIr.IrGroupUnit; import com.dy.pipIrrGlobal.pojoIr.IrIrrigateGroup; import com.dy.pipIrrGlobal.voIr.VoGroup; @@ -25,11 +27,13 @@ @Slf4j @Service public class IrrigateGroupSv { - @Autowired private IrIrrigateGroupMapper irIrrigateGroupMapper; @Autowired private IrGroupUnitMapper irGroupUnitMapper; + + @Autowired + private IrGroupClientMapper irGroupClientMapper; /** * 鍒涘缓杞亴缁� @@ -38,7 +42,7 @@ * @return */ public Integer addIrrigateGroup(IrIrrigateGroup po) { - po.setOperateDt(new Date()); + po.setOperateTime(new Date()); po.setDeleted((byte) 0); int rows = irIrrigateGroupMapper.insertSelective(po); if (rows == 0) { @@ -67,7 +71,7 @@ * @return */ public Integer updateIrrigateGroup(IrIrrigateGroup po){ - po.setOperateDt(new Date()); + po.setOperateTime(new Date()); int rows = irIrrigateGroupMapper.updateByPrimaryKeySelective(po); if (rows == 0){ return 0; @@ -140,4 +144,28 @@ List<Long> groupBindUnits = irGroupUnitMapper.getGroupBindUnits(groupId); return groupBindUnits; } + + /** + * //鏌ユ湭缁戝畾杞亴缁勭殑鐏屾簤鍗曞厓id + * @return + */ + public List<Long> getNotBindUnits() { + List<Long> notBindUnits = irGroupUnitMapper.getNotBindUnits(); + return notBindUnits; + } + + //杞亴缁勫叧鑱斿啘鎴� + public Long addGroupClient(IrGroupClient po) { + irGroupClientMapper.insert(po); + return po.getId(); + } + + /** + * 鍒犻櫎杞亴缁勪笌鍐滄埛绠$悊 + * @param id + * @return + */ + public Integer deleteGroupClient (Long id) { + return irGroupClientMapper.deleteByPrimaryKey(id); + } } -- Gitblit v1.8.0