设备管理-检查项维护初始化
parent
4a0b3dc0b2
commit
6e57dfe409
@ -0,0 +1,97 @@
|
||||
package com.op.device.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
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.op.common.log.annotation.Log;
|
||||
import com.op.common.log.enums.BusinessType;
|
||||
import com.op.common.security.annotation.RequiresPermissions;
|
||||
import com.op.device.domain.EquCheckItem;
|
||||
import com.op.device.service.IEquCheckItemService;
|
||||
import com.op.common.core.web.controller.BaseController;
|
||||
import com.op.common.core.web.domain.AjaxResult;
|
||||
import com.op.common.core.utils.poi.ExcelUtil;
|
||||
import com.op.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 检查项维护Controller
|
||||
*
|
||||
* @author wws
|
||||
* @date 2023-10-09
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/item")
|
||||
public class EquCheckItemController extends BaseController {
|
||||
@Autowired
|
||||
private IEquCheckItemService equCheckItemService;
|
||||
|
||||
/**
|
||||
* 查询检查项维护列表
|
||||
*/
|
||||
@RequiresPermissions("device:item:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(EquCheckItem equCheckItem) {
|
||||
startPage();
|
||||
List<EquCheckItem> list = equCheckItemService.selectEquCheckItemList(equCheckItem);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出检查项维护列表
|
||||
*/
|
||||
@RequiresPermissions("device:item:export")
|
||||
@Log(title = "检查项维护", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, EquCheckItem equCheckItem) {
|
||||
List<EquCheckItem> list = equCheckItemService.selectEquCheckItemList(equCheckItem);
|
||||
ExcelUtil<EquCheckItem> util = new ExcelUtil<EquCheckItem>(EquCheckItem.class);
|
||||
util.exportExcel(response, list, "检查项维护数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取检查项维护详细信息
|
||||
*/
|
||||
@RequiresPermissions("device:item:query")
|
||||
@GetMapping(value = "/{itemId}")
|
||||
public AjaxResult getInfo(@PathVariable("itemId") String itemId) {
|
||||
return success(equCheckItemService.selectEquCheckItemByItemId(itemId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增检查项维护
|
||||
*/
|
||||
@RequiresPermissions("device:item:add")
|
||||
@Log(title = "检查项维护", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody EquCheckItem equCheckItem) {
|
||||
return toAjax(equCheckItemService.insertEquCheckItem(equCheckItem));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改检查项维护
|
||||
*/
|
||||
@RequiresPermissions("device:item:edit")
|
||||
@Log(title = "检查项维护", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody EquCheckItem equCheckItem) {
|
||||
return toAjax(equCheckItemService.updateEquCheckItem(equCheckItem));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除检查项维护
|
||||
*/
|
||||
@RequiresPermissions("device:item:remove")
|
||||
@Log(title = "检查项维护", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{itemIds}")
|
||||
public AjaxResult remove(@PathVariable String[] itemIds) {
|
||||
return toAjax(equCheckItemService.deleteEquCheckItemByItemIds(itemIds));
|
||||
}
|
||||
}
|
@ -0,0 +1,218 @@
|
||||
package com.op.device.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.op.common.core.annotation.Excel;
|
||||
import com.op.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 检查项维护对象 equ_check_item
|
||||
*
|
||||
* @author wws
|
||||
* @date 2023-10-09
|
||||
*/
|
||||
public class EquCheckItem extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private String itemId;
|
||||
|
||||
/** 检查项编码 */
|
||||
@Excel(name = "检查项编码")
|
||||
private String itemCode;
|
||||
|
||||
/** 检查项名称 */
|
||||
@Excel(name = "检查项名称")
|
||||
private String itemName;
|
||||
|
||||
/** 检查项方法/工具 */
|
||||
@Excel(name = "检查项方法/工具")
|
||||
private String itemMethod;
|
||||
|
||||
/** 维护类型编码 */
|
||||
@Excel(name = "维护类型编码")
|
||||
private String itemType;
|
||||
|
||||
/** 维护类型名称 */
|
||||
@Excel(name = "维护类型名称")
|
||||
private String itemTypeName;
|
||||
|
||||
/** 检查项备注 */
|
||||
@Excel(name = "检查项备注")
|
||||
private String itemRemark;
|
||||
|
||||
/** 工厂 */
|
||||
@Excel(name = "工厂")
|
||||
private String factory;
|
||||
|
||||
/** 备用字段1 */
|
||||
@Excel(name = "备用字段1")
|
||||
private String attr1;
|
||||
|
||||
/** 备用字段2 */
|
||||
@Excel(name = "备用字段2")
|
||||
private String attr2;
|
||||
|
||||
/** 备用字段3 */
|
||||
@Excel(name = "备用字段3")
|
||||
private String attr3;
|
||||
|
||||
/** 删除标识 */
|
||||
@Excel(name = "删除标识")
|
||||
private String delFlag;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdTime;
|
||||
|
||||
/** 创建人 */
|
||||
@Excel(name = "创建人")
|
||||
private String createdBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedTime;
|
||||
|
||||
/** 更新人 */
|
||||
@Excel(name = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
public void setItemId(String itemId) {
|
||||
this.itemId = itemId;
|
||||
}
|
||||
|
||||
public String getItemId() {
|
||||
return itemId;
|
||||
}
|
||||
public void setItemCode(String itemCode) {
|
||||
this.itemCode = itemCode;
|
||||
}
|
||||
|
||||
public String getItemCode() {
|
||||
return itemCode;
|
||||
}
|
||||
public void setItemName(String itemName) {
|
||||
this.itemName = itemName;
|
||||
}
|
||||
|
||||
public String getItemName() {
|
||||
return itemName;
|
||||
}
|
||||
public void setItemMethod(String itemMethod) {
|
||||
this.itemMethod = itemMethod;
|
||||
}
|
||||
|
||||
public String getItemMethod() {
|
||||
return itemMethod;
|
||||
}
|
||||
public void setItemType(String itemType) {
|
||||
this.itemType = itemType;
|
||||
}
|
||||
|
||||
public String getItemType() {
|
||||
return itemType;
|
||||
}
|
||||
public void setItemTypeName(String itemTypeName) {
|
||||
this.itemTypeName = itemTypeName;
|
||||
}
|
||||
|
||||
public String getItemTypeName() {
|
||||
return itemTypeName;
|
||||
}
|
||||
public void setItemRemark(String itemRemark) {
|
||||
this.itemRemark = itemRemark;
|
||||
}
|
||||
|
||||
public String getItemRemark() {
|
||||
return itemRemark;
|
||||
}
|
||||
public void setFactory(String factory) {
|
||||
this.factory = factory;
|
||||
}
|
||||
|
||||
public String getFactory() {
|
||||
return factory;
|
||||
}
|
||||
public void setAttr1(String attr1) {
|
||||
this.attr1 = attr1;
|
||||
}
|
||||
|
||||
public String getAttr1() {
|
||||
return attr1;
|
||||
}
|
||||
public void setAttr2(String attr2) {
|
||||
this.attr2 = attr2;
|
||||
}
|
||||
|
||||
public String getAttr2() {
|
||||
return attr2;
|
||||
}
|
||||
public void setAttr3(String attr3) {
|
||||
this.attr3 = attr3;
|
||||
}
|
||||
|
||||
public String getAttr3() {
|
||||
return attr3;
|
||||
}
|
||||
public void setDelFlag(String delFlag) {
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag() {
|
||||
return delFlag;
|
||||
}
|
||||
public void setCreatedTime(Date createdTime) {
|
||||
this.createdTime = createdTime;
|
||||
}
|
||||
|
||||
public Date getCreatedTime() {
|
||||
return createdTime;
|
||||
}
|
||||
public void setCreatedBy(String createdBy) {
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
|
||||
public String getCreatedBy() {
|
||||
return createdBy;
|
||||
}
|
||||
public void setUpdatedTime(Date updatedTime) {
|
||||
this.updatedTime = updatedTime;
|
||||
}
|
||||
|
||||
public Date getUpdatedTime() {
|
||||
return updatedTime;
|
||||
}
|
||||
public void setUpdatedBy(String updatedBy) {
|
||||
this.updatedBy = updatedBy;
|
||||
}
|
||||
|
||||
public String getUpdatedBy() {
|
||||
return updatedBy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("itemId", getItemId())
|
||||
.append("itemCode", getItemCode())
|
||||
.append("itemName", getItemName())
|
||||
.append("itemMethod", getItemMethod())
|
||||
.append("itemType", getItemType())
|
||||
.append("itemTypeName", getItemTypeName())
|
||||
.append("itemRemark", getItemRemark())
|
||||
.append("factory", getFactory())
|
||||
.append("attr1", getAttr1())
|
||||
.append("attr2", getAttr2())
|
||||
.append("attr3", getAttr3())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createdTime", getCreatedTime())
|
||||
.append("createdBy", getCreatedBy())
|
||||
.append("updatedTime", getUpdatedTime())
|
||||
.append("updatedBy", getUpdatedBy())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.op.device.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.op.device.domain.EquCheckItem;
|
||||
|
||||
/**
|
||||
* 检查项维护Mapper接口
|
||||
*
|
||||
* @author wws
|
||||
* @date 2023-10-09
|
||||
*/
|
||||
public interface EquCheckItemMapper {
|
||||
/**
|
||||
* 查询检查项维护
|
||||
*
|
||||
* @param itemId 检查项维护主键
|
||||
* @return 检查项维护
|
||||
*/
|
||||
public EquCheckItem selectEquCheckItemByItemId(String itemId);
|
||||
|
||||
/**
|
||||
* 查询检查项维护列表
|
||||
*
|
||||
* @param equCheckItem 检查项维护
|
||||
* @return 检查项维护集合
|
||||
*/
|
||||
public List<EquCheckItem> selectEquCheckItemList(EquCheckItem equCheckItem);
|
||||
|
||||
/**
|
||||
* 新增检查项维护
|
||||
*
|
||||
* @param equCheckItem 检查项维护
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEquCheckItem(EquCheckItem equCheckItem);
|
||||
|
||||
/**
|
||||
* 修改检查项维护
|
||||
*
|
||||
* @param equCheckItem 检查项维护
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEquCheckItem(EquCheckItem equCheckItem);
|
||||
|
||||
/**
|
||||
* 删除检查项维护
|
||||
*
|
||||
* @param itemId 检查项维护主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquCheckItemByItemId(String itemId);
|
||||
|
||||
/**
|
||||
* 批量删除检查项维护
|
||||
*
|
||||
* @param itemIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquCheckItemByItemIds(String[] itemIds);
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package com.op.device.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.op.device.domain.EquCheckItem;
|
||||
|
||||
/**
|
||||
* 检查项维护Service接口
|
||||
*
|
||||
* @author wws
|
||||
* @date 2023-10-09
|
||||
*/
|
||||
public interface IEquCheckItemService {
|
||||
/**
|
||||
* 查询检查项维护
|
||||
*
|
||||
* @param itemId 检查项维护主键
|
||||
* @return 检查项维护
|
||||
*/
|
||||
public EquCheckItem selectEquCheckItemByItemId(String itemId);
|
||||
|
||||
/**
|
||||
* 查询检查项维护列表
|
||||
*
|
||||
* @param equCheckItem 检查项维护
|
||||
* @return 检查项维护集合
|
||||
*/
|
||||
public List<EquCheckItem> selectEquCheckItemList(EquCheckItem equCheckItem);
|
||||
|
||||
/**
|
||||
* 新增检查项维护
|
||||
*
|
||||
* @param equCheckItem 检查项维护
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertEquCheckItem(EquCheckItem equCheckItem);
|
||||
|
||||
/**
|
||||
* 修改检查项维护
|
||||
*
|
||||
* @param equCheckItem 检查项维护
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateEquCheckItem(EquCheckItem equCheckItem);
|
||||
|
||||
/**
|
||||
* 批量删除检查项维护
|
||||
*
|
||||
* @param itemIds 需要删除的检查项维护主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquCheckItemByItemIds(String[] itemIds);
|
||||
|
||||
/**
|
||||
* 删除检查项维护信息
|
||||
*
|
||||
* @param itemId 检查项维护主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEquCheckItemByItemId(String itemId);
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
package com.op.device.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.op.device.mapper.EquCheckItemMapper;
|
||||
import com.op.device.domain.EquCheckItem;
|
||||
import com.op.device.service.IEquCheckItemService;
|
||||
|
||||
/**
|
||||
* 检查项维护Service业务层处理
|
||||
*
|
||||
* @author wws
|
||||
* @date 2023-10-09
|
||||
*/
|
||||
@Service
|
||||
public class EquCheckItemServiceImpl implements IEquCheckItemService {
|
||||
@Autowired
|
||||
private EquCheckItemMapper equCheckItemMapper;
|
||||
|
||||
/**
|
||||
* 查询检查项维护
|
||||
*
|
||||
* @param itemId 检查项维护主键
|
||||
* @return 检查项维护
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public EquCheckItem selectEquCheckItemByItemId(String itemId) {
|
||||
return equCheckItemMapper.selectEquCheckItemByItemId(itemId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询检查项维护列表
|
||||
*
|
||||
* @param equCheckItem 检查项维护
|
||||
* @return 检查项维护
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public List<EquCheckItem> selectEquCheckItemList(EquCheckItem equCheckItem) {
|
||||
return equCheckItemMapper.selectEquCheckItemList(equCheckItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增检查项维护
|
||||
*
|
||||
* @param equCheckItem 检查项维护
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int insertEquCheckItem(EquCheckItem equCheckItem) {
|
||||
return equCheckItemMapper.insertEquCheckItem(equCheckItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改检查项维护
|
||||
*
|
||||
* @param equCheckItem 检查项维护
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int updateEquCheckItem(EquCheckItem equCheckItem) {
|
||||
return equCheckItemMapper.updateEquCheckItem(equCheckItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除检查项维护
|
||||
*
|
||||
* @param itemIds 需要删除的检查项维护主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteEquCheckItemByItemIds(String[] itemIds) {
|
||||
return equCheckItemMapper.deleteEquCheckItemByItemIds(itemIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除检查项维护信息
|
||||
*
|
||||
* @param itemId 检查项维护主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteEquCheckItemByItemId(String itemId) {
|
||||
return equCheckItemMapper.deleteEquCheckItemByItemId(itemId);
|
||||
}
|
||||
}
|
@ -0,0 +1,128 @@
|
||||
<?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.op.device.mapper.EquCheckItemMapper">
|
||||
|
||||
<resultMap type="EquCheckItem" id="EquCheckItemResult">
|
||||
<result property="itemId" column="item_id" />
|
||||
<result property="itemCode" column="item_code" />
|
||||
<result property="itemName" column="item_name" />
|
||||
<result property="itemMethod" column="item_method" />
|
||||
<result property="itemType" column="item_type" />
|
||||
<result property="itemTypeName" column="item_type_name" />
|
||||
<result property="itemRemark" column="item_remark" />
|
||||
<result property="factory" column="factory" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createdTime" column="created_time" />
|
||||
<result property="createdBy" column="created_by" />
|
||||
<result property="updatedTime" column="updated_time" />
|
||||
<result property="updatedBy" column="updated_by" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEquCheckItemVo">
|
||||
select item_id, item_code, item_name, item_method, item_type, item_type_name, item_remark, factory, attr1, attr2, attr3, del_flag, created_time, created_by, updated_time, updated_by from equ_check_item
|
||||
</sql>
|
||||
|
||||
<select id="selectEquCheckItemList" parameterType="EquCheckItem" resultMap="EquCheckItemResult">
|
||||
<include refid="selectEquCheckItemVo"/>
|
||||
<where>
|
||||
<if test="itemCode != null and itemCode != ''"> and item_code = #{itemCode}</if>
|
||||
<if test="itemName != null and itemName != ''"> and item_name like concat('%', #{itemName}, '%')</if>
|
||||
<if test="itemMethod != null and itemMethod != ''"> and item_method = #{itemMethod}</if>
|
||||
<if test="itemType != null and itemType != ''"> and item_type = #{itemType}</if>
|
||||
<if test="itemTypeName != null and itemTypeName != ''"> and item_type_name like concat('%', #{itemTypeName}, '%')</if>
|
||||
<if test="itemRemark != null and itemRemark != ''"> and item_remark = #{itemRemark}</if>
|
||||
<if test="factory != null and factory != ''"> and factory = #{factory}</if>
|
||||
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
|
||||
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
|
||||
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
|
||||
<if test="delFlag != null and delFlag != ''"> and del_flag = #{delFlag}</if>
|
||||
<if test="createdTime != null "> and created_time = #{createdTime}</if>
|
||||
<if test="createdBy != null and createdBy != ''"> and created_by = #{createdBy}</if>
|
||||
<if test="updatedTime != null "> and updated_time = #{updatedTime}</if>
|
||||
<if test="updatedBy != null and updatedBy != ''"> and updated_by = #{updatedBy}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectEquCheckItemByItemId" parameterType="String" resultMap="EquCheckItemResult">
|
||||
<include refid="selectEquCheckItemVo"/>
|
||||
where item_id = #{itemId}
|
||||
</select>
|
||||
|
||||
<insert id="insertEquCheckItem" parameterType="EquCheckItem">
|
||||
insert into equ_check_item
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="itemId != null">item_id,</if>
|
||||
<if test="itemCode != null and itemCode != ''">item_code,</if>
|
||||
<if test="itemName != null and itemName != ''">item_name,</if>
|
||||
<if test="itemMethod != null and itemMethod != ''">item_method,</if>
|
||||
<if test="itemType != null and itemType != ''">item_type,</if>
|
||||
<if test="itemTypeName != null and itemTypeName != ''">item_type_name,</if>
|
||||
<if test="itemRemark != null and itemRemark != ''">item_remark,</if>
|
||||
<if test="factory != null">factory,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
||||
<if test="createdTime != null">created_time,</if>
|
||||
<if test="createdBy != null and createdBy != ''">created_by,</if>
|
||||
<if test="updatedTime != null">updated_time,</if>
|
||||
<if test="updatedBy != null and updatedBy != ''">updated_by,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="itemId != null">#{itemId},</if>
|
||||
<if test="itemCode != null and itemCode != ''">#{itemCode},</if>
|
||||
<if test="itemName != null and itemName != ''">#{itemName},</if>
|
||||
<if test="itemMethod != null and itemMethod != ''">#{itemMethod},</if>
|
||||
<if test="itemType != null and itemType != ''">#{itemType},</if>
|
||||
<if test="itemTypeName != null and itemTypeName != ''">#{itemTypeName},</if>
|
||||
<if test="itemRemark != null and itemRemark != ''">#{itemRemark},</if>
|
||||
<if test="factory != null">#{factory},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
||||
<if test="createdTime != null">#{createdTime},</if>
|
||||
<if test="createdBy != null and createdBy != ''">#{createdBy},</if>
|
||||
<if test="updatedTime != null">#{updatedTime},</if>
|
||||
<if test="updatedBy != null and updatedBy != ''">#{updatedBy},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateEquCheckItem" parameterType="EquCheckItem">
|
||||
update equ_check_item
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="itemCode != null and itemCode != ''">item_code = #{itemCode},</if>
|
||||
<if test="itemName != null and itemName != ''">item_name = #{itemName},</if>
|
||||
<if test="itemMethod != null and itemMethod != ''">item_method = #{itemMethod},</if>
|
||||
<if test="itemType != null and itemType != ''">item_type = #{itemType},</if>
|
||||
<if test="itemTypeName != null and itemTypeName != ''">item_type_name = #{itemTypeName},</if>
|
||||
<if test="itemRemark != null and itemRemark != ''">item_remark = #{itemRemark},</if>
|
||||
<if test="factory != null">factory = #{factory},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
||||
<if test="createdTime != null">created_time = #{createdTime},</if>
|
||||
<if test="createdBy != null and createdBy != ''">created_by = #{createdBy},</if>
|
||||
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
|
||||
<if test="updatedBy != null and updatedBy != ''">updated_by = #{updatedBy},</if>
|
||||
</trim>
|
||||
where item_id = #{itemId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteEquCheckItemByItemId" parameterType="String">
|
||||
delete from equ_check_item where item_id = #{itemId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEquCheckItemByItemIds" parameterType="String">
|
||||
delete from equ_check_item where item_id in
|
||||
<foreach item="itemId" collection="array" open="(" separator="," close=")">
|
||||
#{itemId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in New Issue