| | |
| | | import cn.flightfeather.supervision.domain.ds1.mapper.TreatmentDeviceInfoMapper |
| | | import cn.flightfeather.supervision.domain.ds1.mapper.ProductionDeviceInfoMapper |
| | | import org.springframework.stereotype.Repository |
| | | import java.util.* |
| | | |
| | | /** |
| | | * |
| | | * 场景设备数据库查询 |
| | | * @date 2024/7/24 |
| | | * @author feiyu02 |
| | | */ |
| | |
| | | * 插入设备信息 |
| | | */ |
| | | fun insertDevice(monitorDeviceInfo: MonitorDeviceInfo): Int { |
| | | monitorDeviceInfo.diCreateTime = Date() |
| | | monitorDeviceInfo.diUpdateTime = Date() |
| | | return monitorDeviceInfoMapper.insert(monitorDeviceInfo) |
| | | } |
| | | fun insertDevice(treatmentDeviceInfo: TreatmentDeviceInfo): Int { |
| | | treatmentDeviceInfo.piCreateTime = Date() |
| | | treatmentDeviceInfo.piUpdateTime = Date() |
| | | return treatmentDeviceInfoMapper.insert(treatmentDeviceInfo) |
| | | } |
| | | fun insertDevice(productionDeviceInfo: ProductionDeviceInfo): Int { |
| | | productionDeviceInfo.wiCreateTime = Date() |
| | | productionDeviceInfo.wiUpdateTime = Date() |
| | | return productionDeviceInfoMapper.insert(productionDeviceInfo) |
| | | } |
| | | |
| | |
| | | * 更新设备信息 |
| | | */ |
| | | fun updateDevice(monitorDeviceInfo: MonitorDeviceInfo): Int { |
| | | monitorDeviceInfo.diUpdateTime = Date() |
| | | return monitorDeviceInfoMapper.updateByPrimaryKey(monitorDeviceInfo) |
| | | } |
| | | fun updateDevice(treatmentDeviceInfo: TreatmentDeviceInfo): Int { |
| | | treatmentDeviceInfo.piUpdateTime = Date() |
| | | return treatmentDeviceInfoMapper.updateByPrimaryKey(treatmentDeviceInfo) |
| | | } |
| | | fun updateDevice(productionDeviceInfo: ProductionDeviceInfo): Int { |
| | | productionDeviceInfo.wiUpdateTime = Date() |
| | | return productionDeviceInfoMapper.updateByPrimaryKey(productionDeviceInfo) |
| | | } |
| | | |