工位管理-参数设置动态展示
parent
f8d79370f9
commit
1f7ed1b0b3
@ -0,0 +1,153 @@
|
||||
package com.ruoyi.web.controller.nanjing;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.nanjing.domain.TSyStationparameternotes;
|
||||
import com.ruoyi.nanjing.service.ITSyStationparameternotesService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* 工位参数定义Controller
|
||||
*
|
||||
* @author limy
|
||||
* @date 2021-01-27
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/nanjing/StationParameterNotes")
|
||||
public class TSyStationparameternotesController extends BaseController
|
||||
{
|
||||
private String prefix = "nanjing/StationParameterNotes";
|
||||
|
||||
@Autowired
|
||||
private ITSyStationparameternotesService tSyStationparameternotesService;
|
||||
|
||||
@RequiresPermissions("nanjing:StationParameterNotes:view")
|
||||
@GetMapping()
|
||||
public String StationParameterNotes()
|
||||
{
|
||||
return prefix + "/StationParameterNotes";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询工位参数定义列表
|
||||
*/
|
||||
@RequiresPermissions("nanjing:StationParameterNotes:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(TSyStationparameternotes tSyStationparameternotes)
|
||||
{
|
||||
startPage();
|
||||
List<TSyStationparameternotes> list = tSyStationparameternotesService.selectTSyStationparameternotesList(tSyStationparameternotes);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出工位参数定义列表
|
||||
*/
|
||||
@RequiresPermissions("nanjing:StationParameterNotes:export")
|
||||
@Log(title = "工位参数定义", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(TSyStationparameternotes tSyStationparameternotes)
|
||||
{
|
||||
List<TSyStationparameternotes> list = tSyStationparameternotesService.selectTSyStationparameternotesList(tSyStationparameternotes);
|
||||
ExcelUtil<TSyStationparameternotes> util = new ExcelUtil<TSyStationparameternotes>(TSyStationparameternotes.class);
|
||||
return util.exportExcel(list, "StationParameterNotes");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增工位参数定义
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存工位参数定义
|
||||
*/
|
||||
@RequiresPermissions("nanjing:StationParameterNotes:add")
|
||||
@Log(title = "工位参数定义", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(TSyStationparameternotes tSyStationparameternotes)
|
||||
{
|
||||
return toAjax(tSyStationparameternotesService.insertTSyStationparameternotes(tSyStationparameternotes));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改工位参数定义
|
||||
*/
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||
{
|
||||
TSyStationparameternotes tSyStationparameternotes = tSyStationparameternotesService.selectTSyStationparameternotesById(id);
|
||||
mmap.put("tSyStationparameternotes", tSyStationparameternotes);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存工位参数定义
|
||||
*/
|
||||
@RequiresPermissions("nanjing:StationParameterNotes:edit")
|
||||
@Log(title = "工位参数定义", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(TSyStationparameternotes tSyStationparameternotes)
|
||||
{
|
||||
return toAjax(tSyStationparameternotesService.updateTSyStationparameternotes(tSyStationparameternotes));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除工位参数定义
|
||||
*/
|
||||
@RequiresPermissions("nanjing:StationParameterNotes:remove")
|
||||
@Log(title = "工位参数定义", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(tSyStationparameternotesService.deleteTSyStationparameternotesByIds(ids));
|
||||
}
|
||||
|
||||
@RequiresPermissions("nanjing:SubStation:param")
|
||||
@PostMapping("/getParamData")
|
||||
@ResponseBody
|
||||
public AjaxResult getParamData(HttpServletRequest request){
|
||||
String paraMean="";
|
||||
String stationID = request.getParameter("stationID");
|
||||
String para = request.getParameter("para");
|
||||
List<TSyStationparameternotes> tSyStationparameternotes = tSyStationparameternotesService.selectByStationID(stationID);
|
||||
for (TSyStationparameternotes sp:tSyStationparameternotes)
|
||||
{
|
||||
if(sp.getParaColumn().equals(para)){
|
||||
paraMean = sp.getParaMeaning();
|
||||
break;
|
||||
}
|
||||
else {
|
||||
paraMean="";
|
||||
}
|
||||
}
|
||||
// TSyStationparameternotes tSyStationparameternotes = tSyStationparameternotesService.getParaVal(stationID,para);
|
||||
// if(tSyStationparameternotes.getParaMeaning().equals("")||tSyStationparameternotes.getParaMeaning()==null){
|
||||
// return AjaxResult.error(" ");
|
||||
// }
|
||||
return AjaxResult.success(paraMean);
|
||||
}
|
||||
}
|
@ -0,0 +1,163 @@
|
||||
package com.ruoyi.nanjing.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 工位参数定义对象 T_SY_StationParameterNotes
|
||||
*
|
||||
* @author limy
|
||||
* @date 2021-01-27
|
||||
*/
|
||||
public class TSyStationparameternotes extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 表名 */
|
||||
@Excel(name = "表名")
|
||||
private String tabelName;
|
||||
|
||||
/** 参数名 */
|
||||
@Excel(name = "参数名")
|
||||
private String paraColumn;
|
||||
|
||||
/** 参数值 */
|
||||
@Excel(name = "参数值")
|
||||
private String paraMeaning;
|
||||
|
||||
/** 工位ID */
|
||||
@Excel(name = "工位ID")
|
||||
private String stationID;
|
||||
|
||||
/** 工位码 */
|
||||
@Excel(name = "工位码")
|
||||
private String stationCode;
|
||||
|
||||
/** 父工位ID */
|
||||
@Excel(name = "父工位ID")
|
||||
private String parentStationID;
|
||||
|
||||
/** 父工位码 */
|
||||
@Excel(name = "父工位码")
|
||||
private String parentStationCode;
|
||||
|
||||
/** 父工位名 */
|
||||
@Excel(name = "父工位名")
|
||||
private String parentStationName;
|
||||
|
||||
/** 是否显示 */
|
||||
@Excel(name = "是否显示")
|
||||
private String usedFlag;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setTabelName(String tabelName)
|
||||
{
|
||||
this.tabelName = tabelName;
|
||||
}
|
||||
|
||||
public String getTabelName()
|
||||
{
|
||||
return tabelName;
|
||||
}
|
||||
public void setParaColumn(String paraColumn)
|
||||
{
|
||||
this.paraColumn = paraColumn;
|
||||
}
|
||||
|
||||
public String getParaColumn()
|
||||
{
|
||||
return paraColumn;
|
||||
}
|
||||
public void setParaMeaning(String paraMeaning)
|
||||
{
|
||||
this.paraMeaning = paraMeaning;
|
||||
}
|
||||
|
||||
public String getParaMeaning()
|
||||
{
|
||||
return paraMeaning;
|
||||
}
|
||||
public void setStationID(String stationID)
|
||||
{
|
||||
this.stationID = stationID;
|
||||
}
|
||||
|
||||
public String getStationID()
|
||||
{
|
||||
return stationID;
|
||||
}
|
||||
public void setStationCode(String stationCode)
|
||||
{
|
||||
this.stationCode = stationCode;
|
||||
}
|
||||
|
||||
public String getStationCode()
|
||||
{
|
||||
return stationCode;
|
||||
}
|
||||
public void setParentStationID(String parentStationID)
|
||||
{
|
||||
this.parentStationID = parentStationID;
|
||||
}
|
||||
|
||||
public String getParentStationID()
|
||||
{
|
||||
return parentStationID;
|
||||
}
|
||||
public void setParentStationCode(String parentStationCode)
|
||||
{
|
||||
this.parentStationCode = parentStationCode;
|
||||
}
|
||||
|
||||
public String getParentStationCode()
|
||||
{
|
||||
return parentStationCode;
|
||||
}
|
||||
public void setParentStationName(String parentStationName)
|
||||
{
|
||||
this.parentStationName = parentStationName;
|
||||
}
|
||||
|
||||
public String getParentStationName()
|
||||
{
|
||||
return parentStationName;
|
||||
}
|
||||
public void setUsedFlag(String usedFlag)
|
||||
{
|
||||
this.usedFlag = usedFlag;
|
||||
}
|
||||
|
||||
public String getUsedFlag()
|
||||
{
|
||||
return usedFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("tabelName", getTabelName())
|
||||
.append("paraColumn", getParaColumn())
|
||||
.append("paraMeaning", getParaMeaning())
|
||||
.append("stationID", getStationID())
|
||||
.append("stationCode", getStationCode())
|
||||
.append("parentStationID", getParentStationID())
|
||||
.append("parentStationCode", getParentStationCode())
|
||||
.append("parentStationName", getParentStationName())
|
||||
.append("usedFlag", getUsedFlag())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package com.ruoyi.nanjing.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.nanjing.domain.TSyStationparameternotes;
|
||||
|
||||
/**
|
||||
* 工位参数定义Mapper接口
|
||||
*
|
||||
* @author limy
|
||||
* @date 2021-01-27
|
||||
*/
|
||||
public interface TSyStationparameternotesMapper
|
||||
{
|
||||
/**
|
||||
* 查询工位参数定义
|
||||
*
|
||||
* @param id 工位参数定义ID
|
||||
* @return 工位参数定义
|
||||
*/
|
||||
public TSyStationparameternotes selectTSyStationparameternotesById(Long id);
|
||||
|
||||
/**
|
||||
* 查询工位参数定义列表
|
||||
*
|
||||
* @param tSyStationparameternotes 工位参数定义
|
||||
* @return 工位参数定义集合
|
||||
*/
|
||||
public List<TSyStationparameternotes> selectTSyStationparameternotesList(TSyStationparameternotes tSyStationparameternotes);
|
||||
|
||||
/**
|
||||
* 新增工位参数定义
|
||||
*
|
||||
* @param tSyStationparameternotes 工位参数定义
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTSyStationparameternotes(TSyStationparameternotes tSyStationparameternotes);
|
||||
|
||||
/**
|
||||
* 修改工位参数定义
|
||||
*
|
||||
* @param tSyStationparameternotes 工位参数定义
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTSyStationparameternotes(TSyStationparameternotes tSyStationparameternotes);
|
||||
|
||||
/**
|
||||
* 删除工位参数定义
|
||||
*
|
||||
* @param id 工位参数定义ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTSyStationparameternotesById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除工位参数定义
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTSyStationparameternotesByIds(String[] ids);
|
||||
|
||||
TSyStationparameternotes getParaVal(String stationID, String para);
|
||||
|
||||
List<TSyStationparameternotes> selectByStationID(String stationID);
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package com.ruoyi.nanjing.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.nanjing.domain.TSyStationparameternotes;
|
||||
|
||||
/**
|
||||
* 工位参数定义Service接口
|
||||
*
|
||||
* @author limy
|
||||
* @date 2021-01-27
|
||||
*/
|
||||
public interface ITSyStationparameternotesService
|
||||
{
|
||||
/**
|
||||
* 查询工位参数定义
|
||||
*
|
||||
* @param id 工位参数定义ID
|
||||
* @return 工位参数定义
|
||||
*/
|
||||
public TSyStationparameternotes selectTSyStationparameternotesById(Long id);
|
||||
|
||||
/**
|
||||
* 查询工位参数定义列表
|
||||
*
|
||||
* @param tSyStationparameternotes 工位参数定义
|
||||
* @return 工位参数定义集合
|
||||
*/
|
||||
public List<TSyStationparameternotes> selectTSyStationparameternotesList(TSyStationparameternotes tSyStationparameternotes);
|
||||
|
||||
/**
|
||||
* 新增工位参数定义
|
||||
*
|
||||
* @param tSyStationparameternotes 工位参数定义
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTSyStationparameternotes(TSyStationparameternotes tSyStationparameternotes);
|
||||
|
||||
/**
|
||||
* 修改工位参数定义
|
||||
*
|
||||
* @param tSyStationparameternotes 工位参数定义
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTSyStationparameternotes(TSyStationparameternotes tSyStationparameternotes);
|
||||
|
||||
/**
|
||||
* 批量删除工位参数定义
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTSyStationparameternotesByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除工位参数定义信息
|
||||
*
|
||||
* @param id 工位参数定义ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTSyStationparameternotesById(Long id);
|
||||
|
||||
TSyStationparameternotes getParaVal(String stationID, String para);
|
||||
|
||||
List<TSyStationparameternotes> selectByStationID(String stationID);
|
||||
}
|
@ -0,0 +1,104 @@
|
||||
package com.ruoyi.nanjing.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.nanjing.mapper.TSyStationparameternotesMapper;
|
||||
import com.ruoyi.nanjing.domain.TSyStationparameternotes;
|
||||
import com.ruoyi.nanjing.service.ITSyStationparameternotesService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 工位参数定义Service业务层处理
|
||||
*
|
||||
* @author limy
|
||||
* @date 2021-01-27
|
||||
*/
|
||||
@Service
|
||||
public class TSyStationparameternotesServiceImpl implements ITSyStationparameternotesService
|
||||
{
|
||||
@Autowired
|
||||
private TSyStationparameternotesMapper tSyStationparameternotesMapper;
|
||||
|
||||
/**
|
||||
* 查询工位参数定义
|
||||
*
|
||||
* @param id 工位参数定义ID
|
||||
* @return 工位参数定义
|
||||
*/
|
||||
@Override
|
||||
public TSyStationparameternotes selectTSyStationparameternotesById(Long id)
|
||||
{
|
||||
return tSyStationparameternotesMapper.selectTSyStationparameternotesById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询工位参数定义列表
|
||||
*
|
||||
* @param tSyStationparameternotes 工位参数定义
|
||||
* @return 工位参数定义
|
||||
*/
|
||||
@Override
|
||||
public List<TSyStationparameternotes> selectTSyStationparameternotesList(TSyStationparameternotes tSyStationparameternotes)
|
||||
{
|
||||
return tSyStationparameternotesMapper.selectTSyStationparameternotesList(tSyStationparameternotes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增工位参数定义
|
||||
*
|
||||
* @param tSyStationparameternotes 工位参数定义
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertTSyStationparameternotes(TSyStationparameternotes tSyStationparameternotes)
|
||||
{
|
||||
return tSyStationparameternotesMapper.insertTSyStationparameternotes(tSyStationparameternotes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改工位参数定义
|
||||
*
|
||||
* @param tSyStationparameternotes 工位参数定义
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateTSyStationparameternotes(TSyStationparameternotes tSyStationparameternotes)
|
||||
{
|
||||
return tSyStationparameternotesMapper.updateTSyStationparameternotes(tSyStationparameternotes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除工位参数定义对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTSyStationparameternotesByIds(String ids)
|
||||
{
|
||||
return tSyStationparameternotesMapper.deleteTSyStationparameternotesByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除工位参数定义信息
|
||||
*
|
||||
* @param id 工位参数定义ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTSyStationparameternotesById(Long id)
|
||||
{
|
||||
return tSyStationparameternotesMapper.deleteTSyStationparameternotesById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TSyStationparameternotes getParaVal(String stationID, String para) {
|
||||
return tSyStationparameternotesMapper.getParaVal(stationID,para);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TSyStationparameternotes> selectByStationID(String stationID) {
|
||||
return tSyStationparameternotesMapper.selectByStationID(stationID);
|
||||
}
|
||||
}
|
@ -0,0 +1,108 @@
|
||||
<?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.ruoyi.nanjing.mapper.TSyStationparameternotesMapper">
|
||||
|
||||
<resultMap type="TSyStationparameternotes" id="TSyStationparameternotesResult">
|
||||
<result property="id" column="ID" />
|
||||
<result property="tabelName" column="TabelName" />
|
||||
<result property="paraColumn" column="ParaColumn" />
|
||||
<result property="paraMeaning" column="ParaMeaning" />
|
||||
<result property="stationID" column="StationID" />
|
||||
<result property="stationCode" column="StationCode" />
|
||||
<result property="parentStationID" column="ParentStationID" />
|
||||
<result property="parentStationCode" column="ParentStationCode" />
|
||||
<result property="parentStationName" column="ParentStationName" />
|
||||
<result property="usedFlag" column="UsedFlag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectTSyStationparameternotesVo">
|
||||
select ID, TabelName, ParaColumn, ParaMeaning, StationID, StationCode, ParentStationID, ParentStationCode, ParentStationName, UsedFlag from T_SY_StationParameterNotes
|
||||
</sql>
|
||||
|
||||
<select id="selectTSyStationparameternotesList" parameterType="TSyStationparameternotes" resultMap="TSyStationparameternotesResult">
|
||||
<include refid="selectTSyStationparameternotesVo"/>
|
||||
<where>
|
||||
<if test="tabelName != null and tabelName != ''"> and TabelName like ('%' + #{tabelName} + '%')</if>
|
||||
<if test="paraColumn != null and paraColumn != ''"> and ParaColumn = #{paraColumn}</if>
|
||||
<if test="paraMeaning != null "> and ParaMeaning = #{paraMeaning}</if>
|
||||
<if test="stationID != null and stationID != ''"> and StationID = #{stationID}</if>
|
||||
<if test="stationCode != null "> and StationCode = #{stationCode}</if>
|
||||
<if test="parentStationID != null and parentStationID != ''"> and ParentStationID = #{parentStationID}</if>
|
||||
<if test="parentStationCode != null "> and ParentStationCode = #{parentStationCode}</if>
|
||||
<if test="parentStationName != null "> and ParentStationName like ('%' + #{parentStationName} + '%')</if>
|
||||
<if test="usedFlag != null and usedFlag != ''"> and UsedFlag = #{usedFlag}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectTSyStationparameternotesById" parameterType="Long" resultMap="TSyStationparameternotesResult">
|
||||
<include refid="selectTSyStationparameternotesVo"/>
|
||||
where ID = #{id}
|
||||
</select>
|
||||
<select id="getParaVal" resultMap="TSyStationparameternotesResult">
|
||||
select ID, TabelName, ParaColumn, ParaMeaning, StationID, StationCode, ParentStationID, ParentStationCode, ParentStationName, UsedFlag from T_SY_StationParameterNotes
|
||||
where StationID = #{param1} and ParaColumn = #{param2}
|
||||
</select>
|
||||
|
||||
<select id="selectByStationID" parameterType="String" resultMap="TSyStationparameternotesResult">
|
||||
select ID, TabelName, ParaColumn, ParaMeaning, StationID, StationCode, ParentStationID, ParentStationCode, ParentStationName, UsedFlag from T_SY_StationParameterNotes
|
||||
where StationID = #{stationID}
|
||||
</select>
|
||||
|
||||
<insert id="insertTSyStationparameternotes" parameterType="TSyStationparameternotes">
|
||||
insert into T_SY_StationParameterNotes
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">ID,</if>
|
||||
<if test="tabelName != null">TabelName,</if>
|
||||
<if test="paraColumn != null">ParaColumn,</if>
|
||||
<if test="paraMeaning != null">ParaMeaning,</if>
|
||||
<if test="stationID != null">StationID,</if>
|
||||
<if test="stationCode != null">StationCode,</if>
|
||||
<if test="parentStationID != null">ParentStationID,</if>
|
||||
<if test="parentStationCode != null">ParentStationCode,</if>
|
||||
<if test="parentStationName != null">ParentStationName,</if>
|
||||
<if test="usedFlag != null">UsedFlag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="tabelName != null">#{tabelName},</if>
|
||||
<if test="paraColumn != null">#{paraColumn},</if>
|
||||
<if test="paraMeaning != null">#{paraMeaning},</if>
|
||||
<if test="stationID != null">#{stationID},</if>
|
||||
<if test="stationCode != null">#{stationCode},</if>
|
||||
<if test="parentStationID != null">#{parentStationID},</if>
|
||||
<if test="parentStationCode != null">#{parentStationCode},</if>
|
||||
<if test="parentStationName != null">#{parentStationName},</if>
|
||||
<if test="usedFlag != null">#{usedFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateTSyStationparameternotes" parameterType="TSyStationparameternotes">
|
||||
update T_SY_StationParameterNotes
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="tabelName != null">TabelName = #{tabelName},</if>
|
||||
<if test="paraColumn != null">ParaColumn = #{paraColumn},</if>
|
||||
<if test="paraMeaning != null">ParaMeaning = #{paraMeaning},</if>
|
||||
<if test="stationID != null">StationID = #{stationID},</if>
|
||||
<if test="stationCode != null">StationCode = #{stationCode},</if>
|
||||
<if test="parentStationID != null">ParentStationID = #{parentStationID},</if>
|
||||
<if test="parentStationCode != null">ParentStationCode = #{parentStationCode},</if>
|
||||
<if test="parentStationName != null">ParentStationName = #{parentStationName},</if>
|
||||
<if test="usedFlag != null">UsedFlag = #{usedFlag},</if>
|
||||
</trim>
|
||||
where ID = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteTSyStationparameternotesById" parameterType="Long">
|
||||
delete from T_SY_StationParameterNotes where ID = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteTSyStationparameternotesByIds" parameterType="String">
|
||||
delete from T_SY_StationParameterNotes where ID in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue