diff --git a/os-ems/src/main/java/com/os/ems/report/controller/EmsReportPointDnbController.java b/os-ems/src/main/java/com/os/ems/report/controller/EmsReportPointDnbController.java new file mode 100644 index 0000000..3f91605 --- /dev/null +++ b/os-ems/src/main/java/com/os/ems/report/controller/EmsReportPointDnbController.java @@ -0,0 +1,99 @@ +package com.os.ems.report.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.os.common.annotation.Log; +import com.os.common.core.controller.BaseController; +import com.os.common.core.domain.AjaxResult; +import com.os.common.enums.BusinessType; +import com.os.ems.report.domain.EmsReportPointDnb; +import com.os.ems.report.service.IEmsReportPointDnbService; +import com.os.common.utils.poi.ExcelUtil; +import com.os.common.core.page.TableDataInfo; + +/** + * 电整点数据Controller + * + * @author Yinq + * @date 2024-05-22 + */ +@RestController +@RequestMapping("/ems/report/reportPointDnb") +public class EmsReportPointDnbController extends BaseController { + @Autowired + private IEmsReportPointDnbService emsReportPointDnbService; + + /** + * 查询电整点数据列表 + */ + @PreAuthorize("@ss.hasPermi('ems/report:reportPointDnb:list')") + @GetMapping("/list") + public TableDataInfo list(EmsReportPointDnb emsReportPointDnb) { + startPage(); + List list = emsReportPointDnbService.selectEmsReportPointDnbList(emsReportPointDnb); + return getDataTable(list); + } + + /** + * 导出电整点数据列表 + */ + @PreAuthorize("@ss.hasPermi('ems/report:reportPointDnb:export')") + @Log(title = "电整点数据", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, EmsReportPointDnb emsReportPointDnb) { + List list = emsReportPointDnbService.selectEmsReportPointDnbList(emsReportPointDnb); + ExcelUtil util = new ExcelUtil(EmsReportPointDnb.class); + util.exportExcel(response, list, "电整点数据数据"); + } + + /** + * 获取电整点数据详细信息 + */ + @PreAuthorize("@ss.hasPermi('ems/report:reportPointDnb:query')") + @GetMapping(value = "/{objId}") + public AjaxResult getInfo(@PathVariable("objId") Long objId) { + return success(emsReportPointDnbService.selectEmsReportPointDnbByObjId(objId)); + } + + /** + * 新增电整点数据 + */ + @PreAuthorize("@ss.hasPermi('ems/report:reportPointDnb:add')") + @Log(title = "电整点数据", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody EmsReportPointDnb emsReportPointDnb) { + return toAjax(emsReportPointDnbService.insertEmsReportPointDnb(emsReportPointDnb)); + } + + /** + * 修改电整点数据 + */ + @PreAuthorize("@ss.hasPermi('ems/report:reportPointDnb:edit')") + @Log(title = "电整点数据", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody EmsReportPointDnb emsReportPointDnb) { + emsReportPointDnb.setUpdateBy(getUsername()); + return toAjax(emsReportPointDnbService.updateEmsReportPointDnb(emsReportPointDnb)); + } + + /** + * 删除电整点数据 + */ + @PreAuthorize("@ss.hasPermi('ems/report:reportPointDnb:remove')") + @Log(title = "电整点数据", businessType = BusinessType.DELETE) + @DeleteMapping("/{objIds}") + public AjaxResult remove(@PathVariable Long[] objIds) { + return toAjax(emsReportPointDnbService.deleteEmsReportPointDnbByObjIds(objIds)); + } +} diff --git a/os-ems/src/main/java/com/os/ems/report/controller/EmsReportPointWaterController.java b/os-ems/src/main/java/com/os/ems/report/controller/EmsReportPointWaterController.java new file mode 100644 index 0000000..db4984c --- /dev/null +++ b/os-ems/src/main/java/com/os/ems/report/controller/EmsReportPointWaterController.java @@ -0,0 +1,99 @@ +package com.os.ems.report.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.os.common.annotation.Log; +import com.os.common.core.controller.BaseController; +import com.os.common.core.domain.AjaxResult; +import com.os.common.enums.BusinessType; +import com.os.ems.report.domain.EmsReportPointWater; +import com.os.ems.report.service.IEmsReportPointWaterService; +import com.os.common.utils.poi.ExcelUtil; +import com.os.common.core.page.TableDataInfo; + +/** + * 水整点数据Controller + * + * @author Yinq + * @date 2024-05-22 + */ +@RestController +@RequestMapping("/ems/report/reportPointWater") +public class EmsReportPointWaterController extends BaseController { + @Autowired + private IEmsReportPointWaterService emsReportPointWaterService; + + /** + * 查询水整点数据列表 + */ + @PreAuthorize("@ss.hasPermi('ems/report:reportPointWater:list')") + @GetMapping("/list") + public TableDataInfo list(EmsReportPointWater emsReportPointWater) { + startPage(); + List list = emsReportPointWaterService.selectEmsReportPointWaterList(emsReportPointWater); + return getDataTable(list); + } + + /** + * 导出水整点数据列表 + */ + @PreAuthorize("@ss.hasPermi('ems/report:reportPointWater:export')") + @Log(title = "水整点数据", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, EmsReportPointWater emsReportPointWater) { + List list = emsReportPointWaterService.selectEmsReportPointWaterList(emsReportPointWater); + ExcelUtil util = new ExcelUtil(EmsReportPointWater.class); + util.exportExcel(response, list, "水整点数据数据"); + } + + /** + * 获取水整点数据详细信息 + */ + @PreAuthorize("@ss.hasPermi('ems/report:reportPointWater:query')") + @GetMapping(value = "/{objId}") + public AjaxResult getInfo(@PathVariable("objId") Long objId) { + return success(emsReportPointWaterService.selectEmsReportPointWaterByObjId(objId)); + } + + /** + * 新增水整点数据 + */ + @PreAuthorize("@ss.hasPermi('ems/report:reportPointWater:add')") + @Log(title = "水整点数据", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody EmsReportPointWater emsReportPointWater) { + return toAjax(emsReportPointWaterService.insertEmsReportPointWater(emsReportPointWater)); + } + + /** + * 修改水整点数据 + */ + @PreAuthorize("@ss.hasPermi('ems/report:reportPointWater:edit')") + @Log(title = "水整点数据", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody EmsReportPointWater emsReportPointWater) { + emsReportPointWater.setUpdateBy(getUsername()); + return toAjax(emsReportPointWaterService.updateEmsReportPointWater(emsReportPointWater)); + } + + /** + * 删除水整点数据 + */ + @PreAuthorize("@ss.hasPermi('ems/report:reportPointWater:remove')") + @Log(title = "水整点数据", businessType = BusinessType.DELETE) + @DeleteMapping("/{objIds}") + public AjaxResult remove(@PathVariable Long[] objIds) { + return toAjax(emsReportPointWaterService.deleteEmsReportPointWaterByObjIds(objIds)); + } +} diff --git a/os-ems/src/main/java/com/os/ems/report/domain/EmsReportPointDnb.java b/os-ems/src/main/java/com/os/ems/report/domain/EmsReportPointDnb.java new file mode 100644 index 0000000..4a759cc --- /dev/null +++ b/os-ems/src/main/java/com/os/ems/report/domain/EmsReportPointDnb.java @@ -0,0 +1,166 @@ +package com.os.ems.report.domain; + +import java.math.BigDecimal; +import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.os.common.annotation.Excel; +import com.os.common.core.domain.BaseEntity; + +/** + * 电整点数据对象 ems_report_point_dnb + * + * @author Yinq + * @date 2024-05-22 + */ +public class EmsReportPointDnb extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 主键标识 + */ + private Long objId; + + /** + * 计量设备编号 + */ + @Excel(name = "计量设备编号") + private String monitorCode; + + /** + * 计量设备名称 + */ + @Excel(name = "计量设备名称") + private String monitorName; + + /** + * 仪表值 + */ + @Excel(name = "仪表值") + private BigDecimal instrumentValue; + + /** + * 耗量 + */ + @Excel(name = "耗量") + private BigDecimal expend; + + /** + * 记录时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "记录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date recordTime; + + /** + * 开始时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date beginTime; + + /** + * 结束时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date endTime; + + /** + * 修改标识(0是 1否) + */ + @Excel(name = "修改标识", readConverterExp = "0=是,1=否") + private String updateFlag; + + public String getMonitorName() { + return monitorName; + } + + public void setMonitorName(String monitorName) { + this.monitorName = monitorName; + } + + public void setObjId(Long objId) { + this.objId = objId; + } + + public Long getObjId() { + return objId; + } + + public void setMonitorCode(String monitorCode) { + this.monitorCode = monitorCode; + } + + public String getMonitorCode() { + return monitorCode; + } + + public void setInstrumentValue(BigDecimal instrumentValue) { + this.instrumentValue = instrumentValue; + } + + public BigDecimal getInstrumentValue() { + return instrumentValue; + } + + public void setExpend(BigDecimal expend) { + this.expend = expend; + } + + public BigDecimal getExpend() { + return expend; + } + + public void setRecordTime(Date recordTime) { + this.recordTime = recordTime; + } + + public Date getRecordTime() { + return recordTime; + } + + public void setBeginTime(Date beginTime) { + this.beginTime = beginTime; + } + + public Date getBeginTime() { + return beginTime; + } + + public void setEndTime(Date endTime) { + this.endTime = endTime; + } + + public Date getEndTime() { + return endTime; + } + + public void setUpdateFlag(String updateFlag) { + this.updateFlag = updateFlag; + } + + public String getUpdateFlag() { + return updateFlag; + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("objId", getObjId()) + .append("monitorCode", getMonitorCode()) + .append("instrumentValue", getInstrumentValue()) + .append("expend", getExpend()) + .append("recordTime", getRecordTime()) + .append("beginTime", getBeginTime()) + .append("endTime", getEndTime()) + .append("updateFlag", getUpdateFlag()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/os-ems/src/main/java/com/os/ems/report/domain/EmsReportPointWater.java b/os-ems/src/main/java/com/os/ems/report/domain/EmsReportPointWater.java new file mode 100644 index 0000000..a652eab --- /dev/null +++ b/os-ems/src/main/java/com/os/ems/report/domain/EmsReportPointWater.java @@ -0,0 +1,165 @@ +package com.os.ems.report.domain; + +import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.os.common.annotation.Excel; +import com.os.common.core.domain.BaseEntity; + +/** + * 水整点数据对象 ems_report_point_water + * + * @author Yinq + * @date 2024-05-22 + */ +public class EmsReportPointWater extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 主键标识 + */ + private Long objId; + + /** + * 计量设备编号 + */ + @Excel(name = "计量设备编号") + private String monitorCode; + + /** + * 计量设备名称 + */ + @Excel(name = "计量设备名称") + private String monitorName; + + /** + * 仪表值 + */ + @Excel(name = "仪表值") + private Long instrumentValue; + + /** + * 耗量 + */ + @Excel(name = "耗量") + private Long expend; + + /** + * 记录时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "记录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date recordTime; + + /** + * 开始时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date beginTime; + + /** + * 结束时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date endTime; + + /** + * 修改标识(0是 1否) + */ + @Excel(name = "修改标识", readConverterExp = "0=是,1=否") + private String updateFlag; + + public String getMonitorName() { + return monitorName; + } + + public void setMonitorName(String monitorName) { + this.monitorName = monitorName; + } + + public void setObjId(Long objId) { + this.objId = objId; + } + + public Long getObjId() { + return objId; + } + + public void setMonitorCode(String monitorCode) { + this.monitorCode = monitorCode; + } + + public String getMonitorCode() { + return monitorCode; + } + + public void setInstrumentValue(Long instrumentValue) { + this.instrumentValue = instrumentValue; + } + + public Long getInstrumentValue() { + return instrumentValue; + } + + public void setExpend(Long expend) { + this.expend = expend; + } + + public Long getExpend() { + return expend; + } + + public void setRecordTime(Date recordTime) { + this.recordTime = recordTime; + } + + public Date getRecordTime() { + return recordTime; + } + + public void setBeginTime(Date beginTime) { + this.beginTime = beginTime; + } + + public Date getBeginTime() { + return beginTime; + } + + public void setEndTime(Date endTime) { + this.endTime = endTime; + } + + public Date getEndTime() { + return endTime; + } + + public void setUpdateFlag(String updateFlag) { + this.updateFlag = updateFlag; + } + + public String getUpdateFlag() { + return updateFlag; + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("objId", getObjId()) + .append("monitorCode", getMonitorCode()) + .append("instrumentValue", getInstrumentValue()) + .append("expend", getExpend()) + .append("recordTime", getRecordTime()) + .append("beginTime", getBeginTime()) + .append("endTime", getEndTime()) + .append("updateFlag", getUpdateFlag()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/os-ems/src/main/java/com/os/ems/report/mapper/EmsReportPointDnbMapper.java b/os-ems/src/main/java/com/os/ems/report/mapper/EmsReportPointDnbMapper.java new file mode 100644 index 0000000..ab357f1 --- /dev/null +++ b/os-ems/src/main/java/com/os/ems/report/mapper/EmsReportPointDnbMapper.java @@ -0,0 +1,61 @@ +package com.os.ems.report.mapper; + +import java.util.List; +import com.os.ems.report.domain.EmsReportPointDnb; + +/** + * 电整点数据Mapper接口 + * + * @author Yinq + * @date 2024-05-22 + */ +public interface EmsReportPointDnbMapper +{ + /** + * 查询电整点数据 + * + * @param objId 电整点数据主键 + * @return 电整点数据 + */ + public EmsReportPointDnb selectEmsReportPointDnbByObjId(Long objId); + + /** + * 查询电整点数据列表 + * + * @param emsReportPointDnb 电整点数据 + * @return 电整点数据集合 + */ + public List selectEmsReportPointDnbList(EmsReportPointDnb emsReportPointDnb); + + /** + * 新增电整点数据 + * + * @param emsReportPointDnb 电整点数据 + * @return 结果 + */ + public int insertEmsReportPointDnb(EmsReportPointDnb emsReportPointDnb); + + /** + * 修改电整点数据 + * + * @param emsReportPointDnb 电整点数据 + * @return 结果 + */ + public int updateEmsReportPointDnb(EmsReportPointDnb emsReportPointDnb); + + /** + * 删除电整点数据 + * + * @param objId 电整点数据主键 + * @return 结果 + */ + public int deleteEmsReportPointDnbByObjId(Long objId); + + /** + * 批量删除电整点数据 + * + * @param objIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteEmsReportPointDnbByObjIds(Long[] objIds); +} diff --git a/os-ems/src/main/java/com/os/ems/report/mapper/EmsReportPointWaterMapper.java b/os-ems/src/main/java/com/os/ems/report/mapper/EmsReportPointWaterMapper.java new file mode 100644 index 0000000..58ec01b --- /dev/null +++ b/os-ems/src/main/java/com/os/ems/report/mapper/EmsReportPointWaterMapper.java @@ -0,0 +1,61 @@ +package com.os.ems.report.mapper; + +import java.util.List; +import com.os.ems.report.domain.EmsReportPointWater; + +/** + * 水整点数据Mapper接口 + * + * @author Yinq + * @date 2024-05-22 + */ +public interface EmsReportPointWaterMapper +{ + /** + * 查询水整点数据 + * + * @param objId 水整点数据主键 + * @return 水整点数据 + */ + public EmsReportPointWater selectEmsReportPointWaterByObjId(Long objId); + + /** + * 查询水整点数据列表 + * + * @param emsReportPointWater 水整点数据 + * @return 水整点数据集合 + */ + public List selectEmsReportPointWaterList(EmsReportPointWater emsReportPointWater); + + /** + * 新增水整点数据 + * + * @param emsReportPointWater 水整点数据 + * @return 结果 + */ + public int insertEmsReportPointWater(EmsReportPointWater emsReportPointWater); + + /** + * 修改水整点数据 + * + * @param emsReportPointWater 水整点数据 + * @return 结果 + */ + public int updateEmsReportPointWater(EmsReportPointWater emsReportPointWater); + + /** + * 删除水整点数据 + * + * @param objId 水整点数据主键 + * @return 结果 + */ + public int deleteEmsReportPointWaterByObjId(Long objId); + + /** + * 批量删除水整点数据 + * + * @param objIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteEmsReportPointWaterByObjIds(Long[] objIds); +} diff --git a/os-ems/src/main/java/com/os/ems/report/service/IEmsReportPointDnbService.java b/os-ems/src/main/java/com/os/ems/report/service/IEmsReportPointDnbService.java new file mode 100644 index 0000000..4da60e6 --- /dev/null +++ b/os-ems/src/main/java/com/os/ems/report/service/IEmsReportPointDnbService.java @@ -0,0 +1,61 @@ +package com.os.ems.report.service; + +import java.util.List; + +import com.os.ems.report.domain.EmsReportPointDnb; + +/** + * 电整点数据Service接口 + * + * @author Yinq + * @date 2024-05-22 + */ +public interface IEmsReportPointDnbService { + /** + * 查询电整点数据 + * + * @param objId 电整点数据主键 + * @return 电整点数据 + */ + public EmsReportPointDnb selectEmsReportPointDnbByObjId(Long objId); + + /** + * 查询电整点数据列表 + * + * @param emsReportPointDnb 电整点数据 + * @return 电整点数据集合 + */ + public List selectEmsReportPointDnbList(EmsReportPointDnb emsReportPointDnb); + + /** + * 新增电整点数据 + * + * @param emsReportPointDnb 电整点数据 + * @return 结果 + */ + public int insertEmsReportPointDnb(EmsReportPointDnb emsReportPointDnb); + + /** + * 修改电整点数据 + * + * @param emsReportPointDnb 电整点数据 + * @return 结果 + */ + public int updateEmsReportPointDnb(EmsReportPointDnb emsReportPointDnb); + + /** + * 批量删除电整点数据 + * + * @param objIds 需要删除的电整点数据主键集合 + * @return 结果 + */ + public int deleteEmsReportPointDnbByObjIds(Long[] objIds); + + /** + * 删除电整点数据信息 + * + * @param objId 电整点数据主键 + * @return 结果 + */ + public int deleteEmsReportPointDnbByObjId(Long objId); +} diff --git a/os-ems/src/main/java/com/os/ems/report/service/IEmsReportPointWaterService.java b/os-ems/src/main/java/com/os/ems/report/service/IEmsReportPointWaterService.java new file mode 100644 index 0000000..7e414a2 --- /dev/null +++ b/os-ems/src/main/java/com/os/ems/report/service/IEmsReportPointWaterService.java @@ -0,0 +1,61 @@ +package com.os.ems.report.service; + +import java.util.List; + +import com.os.ems.report.domain.EmsReportPointWater; + +/** + * 水整点数据Service接口 + * + * @author Yinq + * @date 2024-05-22 + */ +public interface IEmsReportPointWaterService { + /** + * 查询水整点数据 + * + * @param objId 水整点数据主键 + * @return 水整点数据 + */ + public EmsReportPointWater selectEmsReportPointWaterByObjId(Long objId); + + /** + * 查询水整点数据列表 + * + * @param emsReportPointWater 水整点数据 + * @return 水整点数据集合 + */ + public List selectEmsReportPointWaterList(EmsReportPointWater emsReportPointWater); + + /** + * 新增水整点数据 + * + * @param emsReportPointWater 水整点数据 + * @return 结果 + */ + public int insertEmsReportPointWater(EmsReportPointWater emsReportPointWater); + + /** + * 修改水整点数据 + * + * @param emsReportPointWater 水整点数据 + * @return 结果 + */ + public int updateEmsReportPointWater(EmsReportPointWater emsReportPointWater); + + /** + * 批量删除水整点数据 + * + * @param objIds 需要删除的水整点数据主键集合 + * @return 结果 + */ + public int deleteEmsReportPointWaterByObjIds(Long[] objIds); + + /** + * 删除水整点数据信息 + * + * @param objId 水整点数据主键 + * @return 结果 + */ + public int deleteEmsReportPointWaterByObjId(Long objId); +} diff --git a/os-ems/src/main/java/com/os/ems/report/service/impl/EmsReportPointDnbServiceImpl.java b/os-ems/src/main/java/com/os/ems/report/service/impl/EmsReportPointDnbServiceImpl.java new file mode 100644 index 0000000..6f3aa74 --- /dev/null +++ b/os-ems/src/main/java/com/os/ems/report/service/impl/EmsReportPointDnbServiceImpl.java @@ -0,0 +1,90 @@ +package com.os.ems.report.service.impl; + +import java.util.List; + +import com.os.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.os.ems.report.mapper.EmsReportPointDnbMapper; +import com.os.ems.report.domain.EmsReportPointDnb; +import com.os.ems.report.service.IEmsReportPointDnbService; + +/** + * 电整点数据Service业务层处理 + * + * @author Yinq + * @date 2024-05-22 + */ +@Service +public class EmsReportPointDnbServiceImpl implements IEmsReportPointDnbService { + @Autowired + private EmsReportPointDnbMapper emsReportPointDnbMapper; + + /** + * 查询电整点数据 + * + * @param objId 电整点数据主键 + * @return 电整点数据 + */ + @Override + public EmsReportPointDnb selectEmsReportPointDnbByObjId(Long objId) { + return emsReportPointDnbMapper.selectEmsReportPointDnbByObjId(objId); + } + + /** + * 查询电整点数据列表 + * + * @param emsReportPointDnb 电整点数据 + * @return 电整点数据 + */ + @Override + public List selectEmsReportPointDnbList(EmsReportPointDnb emsReportPointDnb) { + return emsReportPointDnbMapper.selectEmsReportPointDnbList(emsReportPointDnb); + } + + /** + * 新增电整点数据 + * + * @param emsReportPointDnb 电整点数据 + * @return 结果 + */ + @Override + public int insertEmsReportPointDnb(EmsReportPointDnb emsReportPointDnb) { + emsReportPointDnb.setCreateTime(DateUtils.getNowDate()); + return emsReportPointDnbMapper.insertEmsReportPointDnb(emsReportPointDnb); + } + + /** + * 修改电整点数据 + * + * @param emsReportPointDnb 电整点数据 + * @return 结果 + */ + @Override + public int updateEmsReportPointDnb(EmsReportPointDnb emsReportPointDnb) { + emsReportPointDnb.setUpdateTime(DateUtils.getNowDate()); + return emsReportPointDnbMapper.updateEmsReportPointDnb(emsReportPointDnb); + } + + /** + * 批量删除电整点数据 + * + * @param objIds 需要删除的电整点数据主键 + * @return 结果 + */ + @Override + public int deleteEmsReportPointDnbByObjIds(Long[] objIds) { + return emsReportPointDnbMapper.deleteEmsReportPointDnbByObjIds(objIds); + } + + /** + * 删除电整点数据信息 + * + * @param objId 电整点数据主键 + * @return 结果 + */ + @Override + public int deleteEmsReportPointDnbByObjId(Long objId) { + return emsReportPointDnbMapper.deleteEmsReportPointDnbByObjId(objId); + } +} diff --git a/os-ems/src/main/java/com/os/ems/report/service/impl/EmsReportPointWaterServiceImpl.java b/os-ems/src/main/java/com/os/ems/report/service/impl/EmsReportPointWaterServiceImpl.java new file mode 100644 index 0000000..7aff488 --- /dev/null +++ b/os-ems/src/main/java/com/os/ems/report/service/impl/EmsReportPointWaterServiceImpl.java @@ -0,0 +1,90 @@ +package com.os.ems.report.service.impl; + +import java.util.List; + +import com.os.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.os.ems.report.mapper.EmsReportPointWaterMapper; +import com.os.ems.report.domain.EmsReportPointWater; +import com.os.ems.report.service.IEmsReportPointWaterService; + +/** + * 水整点数据Service业务层处理 + * + * @author Yinq + * @date 2024-05-22 + */ +@Service +public class EmsReportPointWaterServiceImpl implements IEmsReportPointWaterService { + @Autowired + private EmsReportPointWaterMapper emsReportPointWaterMapper; + + /** + * 查询水整点数据 + * + * @param objId 水整点数据主键 + * @return 水整点数据 + */ + @Override + public EmsReportPointWater selectEmsReportPointWaterByObjId(Long objId) { + return emsReportPointWaterMapper.selectEmsReportPointWaterByObjId(objId); + } + + /** + * 查询水整点数据列表 + * + * @param emsReportPointWater 水整点数据 + * @return 水整点数据 + */ + @Override + public List selectEmsReportPointWaterList(EmsReportPointWater emsReportPointWater) { + return emsReportPointWaterMapper.selectEmsReportPointWaterList(emsReportPointWater); + } + + /** + * 新增水整点数据 + * + * @param emsReportPointWater 水整点数据 + * @return 结果 + */ + @Override + public int insertEmsReportPointWater(EmsReportPointWater emsReportPointWater) { + emsReportPointWater.setCreateTime(DateUtils.getNowDate()); + return emsReportPointWaterMapper.insertEmsReportPointWater(emsReportPointWater); + } + + /** + * 修改水整点数据 + * + * @param emsReportPointWater 水整点数据 + * @return 结果 + */ + @Override + public int updateEmsReportPointWater(EmsReportPointWater emsReportPointWater) { + emsReportPointWater.setUpdateTime(DateUtils.getNowDate()); + return emsReportPointWaterMapper.updateEmsReportPointWater(emsReportPointWater); + } + + /** + * 批量删除水整点数据 + * + * @param objIds 需要删除的水整点数据主键 + * @return 结果 + */ + @Override + public int deleteEmsReportPointWaterByObjIds(Long[] objIds) { + return emsReportPointWaterMapper.deleteEmsReportPointWaterByObjIds(objIds); + } + + /** + * 删除水整点数据信息 + * + * @param objId 水整点数据主键 + * @return 结果 + */ + @Override + public int deleteEmsReportPointWaterByObjId(Long objId) { + return emsReportPointWaterMapper.deleteEmsReportPointWaterByObjId(objId); + } +} diff --git a/os-ems/src/main/resources/mapper/ems/report/EmsReportPointDnbMapper.xml b/os-ems/src/main/resources/mapper/ems/report/EmsReportPointDnbMapper.xml new file mode 100644 index 0000000..f78f8b5 --- /dev/null +++ b/os-ems/src/main/resources/mapper/ems/report/EmsReportPointDnbMapper.xml @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + select erpd.obj_id, + erpd.monitor_code, + ebmi.monitor_name, + erpd.instrument_value, + erpd.expend, + erpd.record_time, + erpd.begin_time, + erpd.end_time, + erpd.update_flag, + erpd.create_by, + erpd.create_time, + erpd.update_by, + erpd.update_time + from ems_report_point_dnb erpd + left join ems_base_monitor_info ebmi on erpd.monitor_code = ebmi.monitor_code + + + + + + + + insert into ems_report_point_dnb + + monitor_code, + instrument_value, + expend, + record_time, + begin_time, + end_time, + update_flag, + create_by, + create_time, + update_by, + update_time, + + + #{monitorCode}, + #{instrumentValue}, + #{expend}, + #{recordTime}, + #{beginTime}, + #{endTime}, + #{updateFlag}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update ems_report_point_dnb + + monitor_code = #{monitorCode}, + instrument_value = #{instrumentValue}, + expend = #{expend}, + record_time = #{recordTime}, + begin_time = #{beginTime}, + end_time = #{endTime}, + update_flag = #{updateFlag}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where obj_id = #{objId} + + + + delete + from ems_report_point_dnb + where obj_id = #{objId} + + + + delete from ems_report_point_dnb where obj_id in + + #{objId} + + + \ No newline at end of file diff --git a/os-ems/src/main/resources/mapper/ems/report/EmsReportPointWaterMapper.xml b/os-ems/src/main/resources/mapper/ems/report/EmsReportPointWaterMapper.xml new file mode 100644 index 0000000..816ea56 --- /dev/null +++ b/os-ems/src/main/resources/mapper/ems/report/EmsReportPointWaterMapper.xml @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + select erpw.obj_id, + erpw.monitor_code, + ebmi.monitor_name, + erpw.instrument_value, + erpw.expend, + erpw.record_time, + erpw.begin_time, + erpw.end_time, + erpw.update_flag, + erpw.create_by, + erpw.create_time, + erpw.update_by, + erpw.update_time + from ems_report_point_water erpw + left join ems_base_monitor_info ebmi on erpw.monitor_code = ebmi.monitor_code + + + + + + + + insert into ems_report_point_water + + monitor_code, + instrument_value, + expend, + record_time, + begin_time, + end_time, + update_flag, + create_by, + create_time, + update_by, + update_time, + + + #{monitorCode}, + #{instrumentValue}, + #{expend}, + #{recordTime}, + #{beginTime}, + #{endTime}, + #{updateFlag}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update ems_report_point_water + + monitor_code = #{monitorCode}, + instrument_value = #{instrumentValue}, + expend = #{expend}, + record_time = #{recordTime}, + begin_time = #{beginTime}, + end_time = #{endTime}, + update_flag = #{updateFlag}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where obj_id = #{objId} + + + + delete + from ems_report_point_water + where obj_id = #{objId} + + + + delete from ems_report_point_water where obj_id in + + #{objId} + + + \ No newline at end of file