change - add水、电整点数据

main
yinq 6 months ago
parent fdbac98d84
commit 6f25e0086f

@ -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<EmsReportPointDnb> 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<EmsReportPointDnb> list = emsReportPointDnbService.selectEmsReportPointDnbList(emsReportPointDnb);
ExcelUtil<EmsReportPointDnb> util = new ExcelUtil<EmsReportPointDnb>(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));
}
}

@ -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<EmsReportPointWater> 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<EmsReportPointWater> list = emsReportPointWaterService.selectEmsReportPointWaterList(emsReportPointWater);
ExcelUtil<EmsReportPointWater> util = new ExcelUtil<EmsReportPointWater>(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));
}
}

@ -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();
}
}

@ -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();
}
}

@ -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<EmsReportPointDnb> 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);
}

@ -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<EmsReportPointWater> 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);
}

@ -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<EmsReportPointDnb> 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);
}

@ -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<EmsReportPointWater> 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);
}

@ -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<EmsReportPointDnb> 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);
}
}

@ -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<EmsReportPointWater> 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);
}
}

@ -0,0 +1,121 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.os.ems.report.mapper.EmsReportPointDnbMapper">
<resultMap type="EmsReportPointDnb" id="EmsReportPointDnbResult">
<result property="objId" column="obj_id"/>
<result property="monitorCode" column="monitor_code"/>
<result property="monitorName" column="monitor_name"/>
<result property="instrumentValue" column="instrument_value"/>
<result property="expend" column="expend"/>
<result property="recordTime" column="record_time"/>
<result property="beginTime" column="begin_time"/>
<result property="endTime" column="end_time"/>
<result property="updateFlag" column="update_flag"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
</resultMap>
<sql id="selectEmsReportPointDnbVo">
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
</sql>
<select id="selectEmsReportPointDnbList" parameterType="EmsReportPointDnb" resultMap="EmsReportPointDnbResult">
<include refid="selectEmsReportPointDnbVo"/>
<where>
<if test="monitorCode != null and monitorCode != ''">and erpd.monitor_code = #{monitorCode}</if>
<if test="instrumentValue != null ">and erpd.instrument_value = #{instrumentValue}</if>
<if test="expend != null ">and erpd.expend = #{expend}</if>
<if test="recordTime != null ">and erpd.record_time = #{recordTime}</if>
<if test="params.beginBeginTime != null and params.beginBeginTime != '' and params.endBeginTime != null and params.endBeginTime != ''">
and erpd.begin_time between #{params.beginBeginTime} and #{params.endBeginTime}
</if>
<if test="endTime != null ">and erpd.end_time = #{endTime}</if>
<if test="updateFlag != null and updateFlag != ''">and erpd.update_flag = #{updateFlag}</if>
</where>
</select>
<select id="selectEmsReportPointDnbByObjId" parameterType="Long" resultMap="EmsReportPointDnbResult">
<include refid="selectEmsReportPointDnbVo"/>
where erpd.obj_id = #{objId}
</select>
<insert id="insertEmsReportPointDnb" parameterType="EmsReportPointDnb" useGeneratedKeys="true" keyProperty="objId">
insert into ems_report_point_dnb
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="monitorCode != null">monitor_code,</if>
<if test="instrumentValue != null">instrument_value,</if>
<if test="expend != null">expend,</if>
<if test="recordTime != null">record_time,</if>
<if test="beginTime != null">begin_time,</if>
<if test="endTime != null">end_time,</if>
<if test="updateFlag != null">update_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="monitorCode != null">#{monitorCode},</if>
<if test="instrumentValue != null">#{instrumentValue},</if>
<if test="expend != null">#{expend},</if>
<if test="recordTime != null">#{recordTime},</if>
<if test="beginTime != null">#{beginTime},</if>
<if test="endTime != null">#{endTime},</if>
<if test="updateFlag != null">#{updateFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateEmsReportPointDnb" parameterType="EmsReportPointDnb">
update ems_report_point_dnb
<trim prefix="SET" suffixOverrides=",">
<if test="monitorCode != null">monitor_code = #{monitorCode},</if>
<if test="instrumentValue != null">instrument_value = #{instrumentValue},</if>
<if test="expend != null">expend = #{expend},</if>
<if test="recordTime != null">record_time = #{recordTime},</if>
<if test="beginTime != null">begin_time = #{beginTime},</if>
<if test="endTime != null">end_time = #{endTime},</if>
<if test="updateFlag != null">update_flag = #{updateFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where obj_id = #{objId}
</update>
<delete id="deleteEmsReportPointDnbByObjId" parameterType="Long">
delete
from ems_report_point_dnb
where obj_id = #{objId}
</delete>
<delete id="deleteEmsReportPointDnbByObjIds" parameterType="String">
delete from ems_report_point_dnb where obj_id in
<foreach item="objId" collection="array" open="(" separator="," close=")">
#{objId}
</foreach>
</delete>
</mapper>

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.os.ems.report.mapper.EmsReportPointWaterMapper">
<resultMap type="EmsReportPointWater" id="EmsReportPointWaterResult">
<result property="objId" column="obj_id"/>
<result property="monitorCode" column="monitor_code"/>
<result property="monitorName" column="monitor_name"/>
<result property="instrumentValue" column="instrument_value"/>
<result property="expend" column="expend"/>
<result property="recordTime" column="record_time"/>
<result property="beginTime" column="begin_time"/>
<result property="endTime" column="end_time"/>
<result property="updateFlag" column="update_flag"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
</resultMap>
<sql id="selectEmsReportPointWaterVo">
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
</sql>
<select id="selectEmsReportPointWaterList" parameterType="EmsReportPointWater"
resultMap="EmsReportPointWaterResult">
<include refid="selectEmsReportPointWaterVo"/>
<where>
<if test="monitorCode != null and monitorCode != ''">and erpw.monitor_code = #{monitorCode}</if>
<if test="instrumentValue != null ">and erpw.instrument_value = #{instrumentValue}</if>
<if test="expend != null ">and erpw.expend = #{expend}</if>
<if test="recordTime != null ">and erpw.record_time = #{recordTime}</if>
<if test="params.beginBeginTime != null and params.beginBeginTime != '' and params.endBeginTime != null and params.endBeginTime != ''">
and erpw.begin_time between #{params.beginBeginTime} and #{params.endBeginTime}
</if>
<if test="endTime != null ">and erpw.end_time = #{endTime}</if>
<if test="updateFlag != null and updateFlag != ''">and erpw.update_flag = #{updateFlag}</if>
</where>
</select>
<select id="selectEmsReportPointWaterByObjId" parameterType="Long" resultMap="EmsReportPointWaterResult">
<include refid="selectEmsReportPointWaterVo"/>
where erpw.obj_id = #{objId}
</select>
<insert id="insertEmsReportPointWater" parameterType="EmsReportPointWater" useGeneratedKeys="true"
keyProperty="objId">
insert into ems_report_point_water
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="monitorCode != null">monitor_code,</if>
<if test="instrumentValue != null">instrument_value,</if>
<if test="expend != null">expend,</if>
<if test="recordTime != null">record_time,</if>
<if test="beginTime != null">begin_time,</if>
<if test="endTime != null">end_time,</if>
<if test="updateFlag != null">update_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="monitorCode != null">#{monitorCode},</if>
<if test="instrumentValue != null">#{instrumentValue},</if>
<if test="expend != null">#{expend},</if>
<if test="recordTime != null">#{recordTime},</if>
<if test="beginTime != null">#{beginTime},</if>
<if test="endTime != null">#{endTime},</if>
<if test="updateFlag != null">#{updateFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateEmsReportPointWater" parameterType="EmsReportPointWater">
update ems_report_point_water
<trim prefix="SET" suffixOverrides=",">
<if test="monitorCode != null">monitor_code = #{monitorCode},</if>
<if test="instrumentValue != null">instrument_value = #{instrumentValue},</if>
<if test="expend != null">expend = #{expend},</if>
<if test="recordTime != null">record_time = #{recordTime},</if>
<if test="beginTime != null">begin_time = #{beginTime},</if>
<if test="endTime != null">end_time = #{endTime},</if>
<if test="updateFlag != null">update_flag = #{updateFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where obj_id = #{objId}
</update>
<delete id="deleteEmsReportPointWaterByObjId" parameterType="Long">
delete
from ems_report_point_water
where obj_id = #{objId}
</delete>
<delete id="deleteEmsReportPointWaterByObjIds" parameterType="String">
delete from ems_report_point_water where obj_id in
<foreach item="objId" collection="array" open="(" separator="," close=")">
#{objId}
</foreach>
</delete>
</mapper>
Loading…
Cancel
Save