add - 电实时数据
parent
3becad2a3f
commit
cdf764338a
@ -0,0 +1,103 @@
|
|||||||
|
package com.aucma.base.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.aucma.common.utils.DateUtils;
|
||||||
|
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.aucma.common.annotation.Log;
|
||||||
|
import com.aucma.common.core.controller.BaseController;
|
||||||
|
import com.aucma.common.core.domain.AjaxResult;
|
||||||
|
import com.aucma.common.enums.BusinessType;
|
||||||
|
import com.aucma.base.domain.RecordDnbInstant;
|
||||||
|
import com.aucma.base.service.IRecordDnbInstantService;
|
||||||
|
import com.aucma.common.utils.poi.ExcelUtil;
|
||||||
|
import com.aucma.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电实时数据Controller
|
||||||
|
*
|
||||||
|
* @author Yinq
|
||||||
|
* @date 2023-09-26
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/base/dnbInstant")
|
||||||
|
public class RecordDnbInstantController extends BaseController {
|
||||||
|
@Autowired
|
||||||
|
private IRecordDnbInstantService recordDnbInstantService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询电实时数据列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:dnbInstant:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(RecordDnbInstant recordDnbInstant) {
|
||||||
|
startPage();
|
||||||
|
List<RecordDnbInstant> list = recordDnbInstantService.selectRecordDnbInstantList(recordDnbInstant);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出电实时数据列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:dnbInstant:export')")
|
||||||
|
@Log(title = "电实时数据", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, RecordDnbInstant recordDnbInstant) {
|
||||||
|
List<RecordDnbInstant> list = recordDnbInstantService.selectRecordDnbInstantList(recordDnbInstant);
|
||||||
|
ExcelUtil<RecordDnbInstant> util = new ExcelUtil<RecordDnbInstant>(RecordDnbInstant.class);
|
||||||
|
util.exportExcel(response, list, "电实时数据数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取电实时数据详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:dnbInstant:query')")
|
||||||
|
@GetMapping(value = "/{objId}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("objId") Long objId) {
|
||||||
|
return success(recordDnbInstantService.selectRecordDnbInstantByObjId(objId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增电实时数据
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:dnbInstant:add')")
|
||||||
|
@Log(title = "电实时数据", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody RecordDnbInstant recordDnbInstant) {
|
||||||
|
recordDnbInstant.setCreatedBy(getUsername());
|
||||||
|
recordDnbInstant.setCreatedTime(DateUtils.getNowDate());
|
||||||
|
return toAjax(recordDnbInstantService.insertRecordDnbInstant(recordDnbInstant));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改电实时数据
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:dnbInstant:edit')")
|
||||||
|
@Log(title = "电实时数据", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody RecordDnbInstant recordDnbInstant) {
|
||||||
|
recordDnbInstant.setUpdatedBy(getUsername());
|
||||||
|
recordDnbInstant.setUpdatedTime(DateUtils.getNowDate());
|
||||||
|
return toAjax(recordDnbInstantService.updateRecordDnbInstant(recordDnbInstant));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除电实时数据
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('base:dnbInstant:remove')")
|
||||||
|
@Log(title = "电实时数据", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{objIds}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] objIds) {
|
||||||
|
return toAjax(recordDnbInstantService.deleteRecordDnbInstantByObjIds(objIds));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.aucma.base.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.aucma.base.domain.RecordDnbInstant;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电实时数据Mapper接口
|
||||||
|
*
|
||||||
|
* @author Yinq
|
||||||
|
* @date 2023-09-26
|
||||||
|
*/
|
||||||
|
public interface RecordDnbInstantMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询电实时数据
|
||||||
|
*
|
||||||
|
* @param objId 电实时数据主键
|
||||||
|
* @return 电实时数据
|
||||||
|
*/
|
||||||
|
public RecordDnbInstant selectRecordDnbInstantByObjId(Long objId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询电实时数据列表
|
||||||
|
*
|
||||||
|
* @param recordDnbInstant 电实时数据
|
||||||
|
* @return 电实时数据集合
|
||||||
|
*/
|
||||||
|
public List<RecordDnbInstant> selectRecordDnbInstantList(RecordDnbInstant recordDnbInstant);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增电实时数据
|
||||||
|
*
|
||||||
|
* @param recordDnbInstant 电实时数据
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertRecordDnbInstant(RecordDnbInstant recordDnbInstant);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改电实时数据
|
||||||
|
*
|
||||||
|
* @param recordDnbInstant 电实时数据
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateRecordDnbInstant(RecordDnbInstant recordDnbInstant);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除电实时数据
|
||||||
|
*
|
||||||
|
* @param objId 电实时数据主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteRecordDnbInstantByObjId(Long objId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除电实时数据
|
||||||
|
*
|
||||||
|
* @param objIds 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteRecordDnbInstantByObjIds(Long[] objIds);
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.aucma.base.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.aucma.base.domain.RecordDnbInstant;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电实时数据Service接口
|
||||||
|
*
|
||||||
|
* @author Yinq
|
||||||
|
* @date 2023-09-26
|
||||||
|
*/
|
||||||
|
public interface IRecordDnbInstantService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询电实时数据
|
||||||
|
*
|
||||||
|
* @param objId 电实时数据主键
|
||||||
|
* @return 电实时数据
|
||||||
|
*/
|
||||||
|
public RecordDnbInstant selectRecordDnbInstantByObjId(Long objId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询电实时数据列表
|
||||||
|
*
|
||||||
|
* @param recordDnbInstant 电实时数据
|
||||||
|
* @return 电实时数据集合
|
||||||
|
*/
|
||||||
|
public List<RecordDnbInstant> selectRecordDnbInstantList(RecordDnbInstant recordDnbInstant);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增电实时数据
|
||||||
|
*
|
||||||
|
* @param recordDnbInstant 电实时数据
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertRecordDnbInstant(RecordDnbInstant recordDnbInstant);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改电实时数据
|
||||||
|
*
|
||||||
|
* @param recordDnbInstant 电实时数据
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateRecordDnbInstant(RecordDnbInstant recordDnbInstant);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除电实时数据
|
||||||
|
*
|
||||||
|
* @param objIds 需要删除的电实时数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteRecordDnbInstantByObjIds(Long[] objIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除电实时数据信息
|
||||||
|
*
|
||||||
|
* @param objId 电实时数据主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteRecordDnbInstantByObjId(Long objId);
|
||||||
|
}
|
@ -0,0 +1,93 @@
|
|||||||
|
package com.aucma.base.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.aucma.base.mapper.RecordDnbInstantMapper;
|
||||||
|
import com.aucma.base.domain.RecordDnbInstant;
|
||||||
|
import com.aucma.base.service.IRecordDnbInstantService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电实时数据Service业务层处理
|
||||||
|
*
|
||||||
|
* @author Yinq
|
||||||
|
* @date 2023-09-26
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class RecordDnbInstantServiceImpl implements IRecordDnbInstantService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private RecordDnbInstantMapper recordDnbInstantMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询电实时数据
|
||||||
|
*
|
||||||
|
* @param objId 电实时数据主键
|
||||||
|
* @return 电实时数据
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RecordDnbInstant selectRecordDnbInstantByObjId(Long objId)
|
||||||
|
{
|
||||||
|
return recordDnbInstantMapper.selectRecordDnbInstantByObjId(objId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询电实时数据列表
|
||||||
|
*
|
||||||
|
* @param recordDnbInstant 电实时数据
|
||||||
|
* @return 电实时数据
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<RecordDnbInstant> selectRecordDnbInstantList(RecordDnbInstant recordDnbInstant)
|
||||||
|
{
|
||||||
|
return recordDnbInstantMapper.selectRecordDnbInstantList(recordDnbInstant);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增电实时数据
|
||||||
|
*
|
||||||
|
* @param recordDnbInstant 电实时数据
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertRecordDnbInstant(RecordDnbInstant recordDnbInstant)
|
||||||
|
{
|
||||||
|
return recordDnbInstantMapper.insertRecordDnbInstant(recordDnbInstant);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改电实时数据
|
||||||
|
*
|
||||||
|
* @param recordDnbInstant 电实时数据
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateRecordDnbInstant(RecordDnbInstant recordDnbInstant)
|
||||||
|
{
|
||||||
|
return recordDnbInstantMapper.updateRecordDnbInstant(recordDnbInstant);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除电实时数据
|
||||||
|
*
|
||||||
|
* @param objIds 需要删除的电实时数据主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteRecordDnbInstantByObjIds(Long[] objIds)
|
||||||
|
{
|
||||||
|
return recordDnbInstantMapper.deleteRecordDnbInstantByObjIds(objIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除电实时数据信息
|
||||||
|
*
|
||||||
|
* @param objId 电实时数据主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteRecordDnbInstantByObjId(Long objId)
|
||||||
|
{
|
||||||
|
return recordDnbInstantMapper.deleteRecordDnbInstantByObjId(objId);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,181 @@
|
|||||||
|
<?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.aucma.base.mapper.RecordDnbInstantMapper">
|
||||||
|
|
||||||
|
<resultMap type="RecordDnbInstant" id="RecordDnbInstantResult">
|
||||||
|
<result property="objId" column="obj_id" />
|
||||||
|
<result property="monitorId" column="monitor_id" />
|
||||||
|
<result property="monitorName" column="monitorName" />
|
||||||
|
<result property="collectTime" column="collect_time" />
|
||||||
|
<result property="va" column="va" />
|
||||||
|
<result property="vb" column="vb" />
|
||||||
|
<result property="vc" column="vc" />
|
||||||
|
<result property="ia" column="ia" />
|
||||||
|
<result property="ib" column="ib" />
|
||||||
|
<result property="ic" column="ic" />
|
||||||
|
<result property="recordTime" column="record_time" />
|
||||||
|
<result property="glys" column="glys" />
|
||||||
|
<result property="zxyg" column="zxyg" />
|
||||||
|
<result property="activePower" column="active_power" />
|
||||||
|
<result property="reactivePower" column="reactive_power" />
|
||||||
|
<result property="collectType" column="collect_type" />
|
||||||
|
<result property="isFlag" column="is_flag" />
|
||||||
|
<result property="createdBy" column="created_by" />
|
||||||
|
<result property="createdTime" column="created_time" />
|
||||||
|
<result property="updatedBy" column="updated_by" />
|
||||||
|
<result property="updatedTime" column="updated_time" />
|
||||||
|
<result property="factoryCode" column="factory_code" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectRecordDnbInstantVo">
|
||||||
|
select rdi.obj_id,
|
||||||
|
rdi.monitor_id,
|
||||||
|
mr.MONITOR_NAME monitorName,
|
||||||
|
rdi.collect_time,
|
||||||
|
rdi.va,
|
||||||
|
rdi.vb,
|
||||||
|
rdi.vc,
|
||||||
|
rdi.ia,
|
||||||
|
rdi.ib,
|
||||||
|
rdi.ic,
|
||||||
|
rdi.record_time,
|
||||||
|
rdi.glys,
|
||||||
|
rdi.zxyg,
|
||||||
|
rdi.active_power,
|
||||||
|
rdi.reactive_power,
|
||||||
|
rdi.collect_type,
|
||||||
|
rdi.is_flag,
|
||||||
|
rdi.created_by,
|
||||||
|
rdi.created_time,
|
||||||
|
rdi.updated_by,
|
||||||
|
rdi.updated_time,
|
||||||
|
rdi.factory_code
|
||||||
|
from record_dnb_instant rdi
|
||||||
|
left join BASE_MONITORINFO mr on mr.MONITOR_CODE = rdi.monitor_id
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectRecordDnbInstantList" parameterType="RecordDnbInstant" resultMap="RecordDnbInstantResult">
|
||||||
|
<include refid="selectRecordDnbInstantVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="monitorId != null and monitorId != ''"> and rdi.monitor_id = #{monitorId}</if>
|
||||||
|
<if test="params.beginCollectTime != null and params.beginCollectTime != '' and params.endCollectTime != null and params.endCollectTime != ''">
|
||||||
|
and rdi.collect_time between to_date(#{params.beginCollectTime}, 'yyyy-mm-dd hh24:mi:ss') and to_date(#{params.endCollectTime}, 'yyyy-mm-dd hh24:mi:ss')</if>
|
||||||
|
<if test="va != null "> and rdi.va = #{va}</if>
|
||||||
|
<if test="vb != null "> and rdi.vb = #{vb}</if>
|
||||||
|
<if test="vc != null "> and rdi.vc = #{vc}</if>
|
||||||
|
<if test="ia != null "> and rdi.ia = #{ia}</if>
|
||||||
|
<if test="ib != null "> and rdi.ib = #{ib}</if>
|
||||||
|
<if test="ic != null "> and rdi.ic = #{ic}</if>
|
||||||
|
<if test="recordTime != null "> and rdi.record_time = #{recordTime}</if>
|
||||||
|
<if test="glys != null "> and rdi.glys = #{glys}</if>
|
||||||
|
<if test="zxyg != null "> and rdi.zxyg = #{zxyg}</if>
|
||||||
|
<if test="activePower != null "> and rdi.active_power = #{activePower}</if>
|
||||||
|
<if test="reactivePower != null "> and rdi.reactive_power = #{reactivePower}</if>
|
||||||
|
<if test="collectType != null "> and rdi.collect_type = #{collectType}</if>
|
||||||
|
<if test="isFlag != null "> and rdi.is_flag = #{isFlag}</if>
|
||||||
|
<if test="createdBy != null and createdBy != ''"> and rdi.created_by = #{createdBy}</if>
|
||||||
|
<if test="createdTime != null "> and rdi.created_time = #{createdTime}</if>
|
||||||
|
<if test="updatedBy != null and updatedBy != ''"> and rdi.updated_by = #{updatedBy}</if>
|
||||||
|
<if test="updatedTime != null "> and rdi.updated_time = #{updatedTime}</if>
|
||||||
|
<if test="factoryCode != null and factoryCode != ''"> and rdi.factory_code = #{factoryCode}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectRecordDnbInstantByObjId" parameterType="Long" resultMap="RecordDnbInstantResult">
|
||||||
|
<include refid="selectRecordDnbInstantVo"/>
|
||||||
|
where rdi.obj_id = #{objId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertRecordDnbInstant" parameterType="RecordDnbInstant">
|
||||||
|
<selectKey keyProperty="objId" resultType="long" order="BEFORE">
|
||||||
|
SELECT seq_record_dnb_instant.NEXTVAL as objId FROM DUAL
|
||||||
|
</selectKey>
|
||||||
|
insert into record_dnb_instant
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="objId != null">obj_id,</if>
|
||||||
|
<if test="monitorId != null">monitor_id,</if>
|
||||||
|
<if test="collectTime != null">collect_time,</if>
|
||||||
|
<if test="va != null">va,</if>
|
||||||
|
<if test="vb != null">vb,</if>
|
||||||
|
<if test="vc != null">vc,</if>
|
||||||
|
<if test="ia != null">ia,</if>
|
||||||
|
<if test="ib != null">ib,</if>
|
||||||
|
<if test="ic != null">ic,</if>
|
||||||
|
<if test="recordTime != null">record_time,</if>
|
||||||
|
<if test="glys != null">glys,</if>
|
||||||
|
<if test="zxyg != null">zxyg,</if>
|
||||||
|
<if test="activePower != null">active_power,</if>
|
||||||
|
<if test="reactivePower != null">reactive_power,</if>
|
||||||
|
<if test="collectType != null">collect_type,</if>
|
||||||
|
<if test="isFlag != null">is_flag,</if>
|
||||||
|
<if test="createdBy != null">created_by,</if>
|
||||||
|
<if test="createdTime != null">created_time,</if>
|
||||||
|
<if test="updatedBy != null">updated_by,</if>
|
||||||
|
<if test="updatedTime != null">updated_time,</if>
|
||||||
|
<if test="factoryCode != null">factory_code,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="objId != null">#{objId},</if>
|
||||||
|
<if test="monitorId != null">#{monitorId},</if>
|
||||||
|
<if test="collectTime != null">#{collectTime},</if>
|
||||||
|
<if test="va != null">#{va},</if>
|
||||||
|
<if test="vb != null">#{vb},</if>
|
||||||
|
<if test="vc != null">#{vc},</if>
|
||||||
|
<if test="ia != null">#{ia},</if>
|
||||||
|
<if test="ib != null">#{ib},</if>
|
||||||
|
<if test="ic != null">#{ic},</if>
|
||||||
|
<if test="recordTime != null">#{recordTime},</if>
|
||||||
|
<if test="glys != null">#{glys},</if>
|
||||||
|
<if test="zxyg != null">#{zxyg},</if>
|
||||||
|
<if test="activePower != null">#{activePower},</if>
|
||||||
|
<if test="reactivePower != null">#{reactivePower},</if>
|
||||||
|
<if test="collectType != null">#{collectType},</if>
|
||||||
|
<if test="isFlag != null">#{isFlag},</if>
|
||||||
|
<if test="createdBy != null">#{createdBy},</if>
|
||||||
|
<if test="createdTime != null">#{createdTime},</if>
|
||||||
|
<if test="updatedBy != null">#{updatedBy},</if>
|
||||||
|
<if test="updatedTime != null">#{updatedTime},</if>
|
||||||
|
<if test="factoryCode != null">#{factoryCode},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateRecordDnbInstant" parameterType="RecordDnbInstant">
|
||||||
|
update record_dnb_instant
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="monitorId != null">monitor_id = #{monitorId},</if>
|
||||||
|
<if test="collectTime != null">collect_time = #{collectTime},</if>
|
||||||
|
<if test="va != null">va = #{va},</if>
|
||||||
|
<if test="vb != null">vb = #{vb},</if>
|
||||||
|
<if test="vc != null">vc = #{vc},</if>
|
||||||
|
<if test="ia != null">ia = #{ia},</if>
|
||||||
|
<if test="ib != null">ib = #{ib},</if>
|
||||||
|
<if test="ic != null">ic = #{ic},</if>
|
||||||
|
<if test="recordTime != null">record_time = #{recordTime},</if>
|
||||||
|
<if test="glys != null">glys = #{glys},</if>
|
||||||
|
<if test="zxyg != null">zxyg = #{zxyg},</if>
|
||||||
|
<if test="activePower != null">active_power = #{activePower},</if>
|
||||||
|
<if test="reactivePower != null">reactive_power = #{reactivePower},</if>
|
||||||
|
<if test="collectType != null">collect_type = #{collectType},</if>
|
||||||
|
<if test="isFlag != null">is_flag = #{isFlag},</if>
|
||||||
|
<if test="createdBy != null">created_by = #{createdBy},</if>
|
||||||
|
<if test="createdTime != null">created_time = #{createdTime},</if>
|
||||||
|
<if test="updatedBy != null">updated_by = #{updatedBy},</if>
|
||||||
|
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
|
||||||
|
<if test="factoryCode != null">factory_code = #{factoryCode},</if>
|
||||||
|
</trim>
|
||||||
|
where obj_id = #{objId}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteRecordDnbInstantByObjId" parameterType="Long">
|
||||||
|
delete from record_dnb_instant where obj_id = #{objId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteRecordDnbInstantByObjIds" parameterType="String">
|
||||||
|
delete from record_dnb_instant where obj_id in
|
||||||
|
<foreach item="objId" collection="array" open="(" separator="," close=")">
|
||||||
|
#{objId}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue