维修单行
This commit is contained in:
parent
cdb4c20241
commit
93a832e0ef
Binary file not shown.
@ -0,0 +1,104 @@
|
||||
package com.ktg.mes.dv.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.ktg.common.annotation.Log;
|
||||
import com.ktg.common.core.controller.BaseController;
|
||||
import com.ktg.common.core.domain.AjaxResult;
|
||||
import com.ktg.common.enums.BusinessType;
|
||||
import com.ktg.mes.dv.domain.DvRepairLine;
|
||||
import com.ktg.mes.dv.service.IDvRepairLineService;
|
||||
import com.ktg.common.utils.poi.ExcelUtil;
|
||||
import com.ktg.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 设备维修单行Controller
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-08-08
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mes/dv/repairline")
|
||||
public class DvRepairLineController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDvRepairLineService dvRepairLineService;
|
||||
|
||||
/**
|
||||
* 查询设备维修单行列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:dv:repairline:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DvRepairLine dvRepairLine)
|
||||
{
|
||||
startPage();
|
||||
List<DvRepairLine> list = dvRepairLineService.selectDvRepairLineList(dvRepairLine);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备维修单行列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:dv:repairline:export')")
|
||||
@Log(title = "设备维修单行", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, DvRepairLine dvRepairLine)
|
||||
{
|
||||
List<DvRepairLine> list = dvRepairLineService.selectDvRepairLineList(dvRepairLine);
|
||||
ExcelUtil<DvRepairLine> util = new ExcelUtil<DvRepairLine>(DvRepairLine.class);
|
||||
util.exportExcel(response, list, "设备维修单行数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备维修单行详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:dv:repairline:query')")
|
||||
@GetMapping(value = "/{lineId}")
|
||||
public AjaxResult getInfo(@PathVariable("lineId") Long lineId)
|
||||
{
|
||||
return AjaxResult.success(dvRepairLineService.selectDvRepairLineByLineId(lineId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备维修单行
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:dv:repairline:add')")
|
||||
@Log(title = "设备维修单行", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody DvRepairLine dvRepairLine)
|
||||
{
|
||||
return toAjax(dvRepairLineService.insertDvRepairLine(dvRepairLine));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备维修单行
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:dv:repairline:edit')")
|
||||
@Log(title = "设备维修单行", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody DvRepairLine dvRepairLine)
|
||||
{
|
||||
return toAjax(dvRepairLineService.updateDvRepairLine(dvRepairLine));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备维修单行
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:dv:repairline:remove')")
|
||||
@Log(title = "设备维修单行", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{lineIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] lineIds)
|
||||
{
|
||||
return toAjax(dvRepairLineService.deleteDvRepairLineByLineIds(lineIds));
|
||||
}
|
||||
}
|
234
ktg-mes/src/main/java/com/ktg/mes/dv/domain/DvRepairLine.java
Normal file
234
ktg-mes/src/main/java/com/ktg/mes/dv/domain/DvRepairLine.java
Normal file
@ -0,0 +1,234 @@
|
||||
package com.ktg.mes.dv.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ktg.common.annotation.Excel;
|
||||
import com.ktg.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 设备维修单行对象 dv_repair_line
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-08-08
|
||||
*/
|
||||
public class DvRepairLine extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 行ID */
|
||||
private Long lineId;
|
||||
|
||||
/** 维修单ID */
|
||||
@Excel(name = "维修单ID")
|
||||
private Long repairId;
|
||||
|
||||
/** 项目ID */
|
||||
@Excel(name = "项目ID")
|
||||
private Long subjectId;
|
||||
|
||||
/** 项目编码 */
|
||||
@Excel(name = "项目编码")
|
||||
private String subjectCode;
|
||||
|
||||
/** 项目名称 */
|
||||
@Excel(name = "项目名称")
|
||||
private String subjectName;
|
||||
|
||||
/** 项目类型 */
|
||||
@Excel(name = "项目类型")
|
||||
private String subjectType;
|
||||
|
||||
/** 项目内容 */
|
||||
@Excel(name = "项目内容")
|
||||
private String subjectContent;
|
||||
|
||||
/** 标准 */
|
||||
@Excel(name = "标准")
|
||||
private String subjectStandard;
|
||||
|
||||
/** 故障描述 */
|
||||
@Excel(name = "故障描述")
|
||||
private String malfunction;
|
||||
|
||||
/** 故障描述资源 */
|
||||
@Excel(name = "故障描述资源")
|
||||
private String malfunctionUrl;
|
||||
|
||||
/** 维修情况 */
|
||||
@Excel(name = "维修情况")
|
||||
private String repairDes;
|
||||
|
||||
/** 预留字段1 */
|
||||
private String attr1;
|
||||
|
||||
/** 预留字段2 */
|
||||
private String attr2;
|
||||
|
||||
/** 预留字段3 */
|
||||
private Long attr3;
|
||||
|
||||
/** 预留字段4 */
|
||||
private Long attr4;
|
||||
|
||||
public void setLineId(Long lineId)
|
||||
{
|
||||
this.lineId = lineId;
|
||||
}
|
||||
|
||||
public Long getLineId()
|
||||
{
|
||||
return lineId;
|
||||
}
|
||||
public void setRepairId(Long repairId)
|
||||
{
|
||||
this.repairId = repairId;
|
||||
}
|
||||
|
||||
public Long getRepairId()
|
||||
{
|
||||
return repairId;
|
||||
}
|
||||
public void setSubjectId(Long subjectId)
|
||||
{
|
||||
this.subjectId = subjectId;
|
||||
}
|
||||
|
||||
public Long getSubjectId()
|
||||
{
|
||||
return subjectId;
|
||||
}
|
||||
public void setSubjectCode(String subjectCode)
|
||||
{
|
||||
this.subjectCode = subjectCode;
|
||||
}
|
||||
|
||||
public String getSubjectCode()
|
||||
{
|
||||
return subjectCode;
|
||||
}
|
||||
public void setSubjectName(String subjectName)
|
||||
{
|
||||
this.subjectName = subjectName;
|
||||
}
|
||||
|
||||
public String getSubjectName()
|
||||
{
|
||||
return subjectName;
|
||||
}
|
||||
public void setSubjectType(String subjectType)
|
||||
{
|
||||
this.subjectType = subjectType;
|
||||
}
|
||||
|
||||
public String getSubjectType()
|
||||
{
|
||||
return subjectType;
|
||||
}
|
||||
public void setSubjectContent(String subjectContent)
|
||||
{
|
||||
this.subjectContent = subjectContent;
|
||||
}
|
||||
|
||||
public String getSubjectContent()
|
||||
{
|
||||
return subjectContent;
|
||||
}
|
||||
public void setSubjectStandard(String subjectStandard)
|
||||
{
|
||||
this.subjectStandard = subjectStandard;
|
||||
}
|
||||
|
||||
public String getSubjectStandard()
|
||||
{
|
||||
return subjectStandard;
|
||||
}
|
||||
public void setMalfunction(String malfunction)
|
||||
{
|
||||
this.malfunction = malfunction;
|
||||
}
|
||||
|
||||
public String getMalfunction()
|
||||
{
|
||||
return malfunction;
|
||||
}
|
||||
public void setMalfunctionUrl(String malfunctionUrl)
|
||||
{
|
||||
this.malfunctionUrl = malfunctionUrl;
|
||||
}
|
||||
|
||||
public String getMalfunctionUrl()
|
||||
{
|
||||
return malfunctionUrl;
|
||||
}
|
||||
public void setRepairDes(String repairDes)
|
||||
{
|
||||
this.repairDes = repairDes;
|
||||
}
|
||||
|
||||
public String getRepairDes()
|
||||
{
|
||||
return repairDes;
|
||||
}
|
||||
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(Long attr3)
|
||||
{
|
||||
this.attr3 = attr3;
|
||||
}
|
||||
|
||||
public Long getAttr3()
|
||||
{
|
||||
return attr3;
|
||||
}
|
||||
public void setAttr4(Long attr4)
|
||||
{
|
||||
this.attr4 = attr4;
|
||||
}
|
||||
|
||||
public Long getAttr4()
|
||||
{
|
||||
return attr4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("lineId", getLineId())
|
||||
.append("repairId", getRepairId())
|
||||
.append("subjectId", getSubjectId())
|
||||
.append("subjectCode", getSubjectCode())
|
||||
.append("subjectName", getSubjectName())
|
||||
.append("subjectType", getSubjectType())
|
||||
.append("subjectContent", getSubjectContent())
|
||||
.append("subjectStandard", getSubjectStandard())
|
||||
.append("malfunction", getMalfunction())
|
||||
.append("malfunctionUrl", getMalfunctionUrl())
|
||||
.append("repairDes", getRepairDes())
|
||||
.append("remark", getRemark())
|
||||
.append("attr1", getAttr1())
|
||||
.append("attr2", getAttr2())
|
||||
.append("attr3", getAttr3())
|
||||
.append("attr4", getAttr4())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.ktg.mes.dv.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ktg.mes.dv.domain.DvRepairLine;
|
||||
|
||||
/**
|
||||
* 设备维修单行Mapper接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-08-08
|
||||
*/
|
||||
public interface DvRepairLineMapper
|
||||
{
|
||||
/**
|
||||
* 查询设备维修单行
|
||||
*
|
||||
* @param lineId 设备维修单行主键
|
||||
* @return 设备维修单行
|
||||
*/
|
||||
public DvRepairLine selectDvRepairLineByLineId(Long lineId);
|
||||
|
||||
/**
|
||||
* 查询设备维修单行列表
|
||||
*
|
||||
* @param dvRepairLine 设备维修单行
|
||||
* @return 设备维修单行集合
|
||||
*/
|
||||
public List<DvRepairLine> selectDvRepairLineList(DvRepairLine dvRepairLine);
|
||||
|
||||
/**
|
||||
* 新增设备维修单行
|
||||
*
|
||||
* @param dvRepairLine 设备维修单行
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDvRepairLine(DvRepairLine dvRepairLine);
|
||||
|
||||
/**
|
||||
* 修改设备维修单行
|
||||
*
|
||||
* @param dvRepairLine 设备维修单行
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDvRepairLine(DvRepairLine dvRepairLine);
|
||||
|
||||
/**
|
||||
* 删除设备维修单行
|
||||
*
|
||||
* @param lineId 设备维修单行主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvRepairLineByLineId(Long lineId);
|
||||
|
||||
/**
|
||||
* 批量删除设备维修单行
|
||||
*
|
||||
* @param lineIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvRepairLineByLineIds(Long[] lineIds);
|
||||
|
||||
public int deleteByRepairId(Long repairId);
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
package com.ktg.mes.dv.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ktg.mes.dv.domain.DvRepairLine;
|
||||
|
||||
/**
|
||||
* 设备维修单行Service接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-08-08
|
||||
*/
|
||||
public interface IDvRepairLineService
|
||||
{
|
||||
/**
|
||||
* 查询设备维修单行
|
||||
*
|
||||
* @param lineId 设备维修单行主键
|
||||
* @return 设备维修单行
|
||||
*/
|
||||
public DvRepairLine selectDvRepairLineByLineId(Long lineId);
|
||||
|
||||
/**
|
||||
* 查询设备维修单行列表
|
||||
*
|
||||
* @param dvRepairLine 设备维修单行
|
||||
* @return 设备维修单行集合
|
||||
*/
|
||||
public List<DvRepairLine> selectDvRepairLineList(DvRepairLine dvRepairLine);
|
||||
|
||||
/**
|
||||
* 新增设备维修单行
|
||||
*
|
||||
* @param dvRepairLine 设备维修单行
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDvRepairLine(DvRepairLine dvRepairLine);
|
||||
|
||||
/**
|
||||
* 修改设备维修单行
|
||||
*
|
||||
* @param dvRepairLine 设备维修单行
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDvRepairLine(DvRepairLine dvRepairLine);
|
||||
|
||||
/**
|
||||
* 批量删除设备维修单行
|
||||
*
|
||||
* @param lineIds 需要删除的设备维修单行主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvRepairLineByLineIds(Long[] lineIds);
|
||||
|
||||
/**
|
||||
* 删除设备维修单行信息
|
||||
*
|
||||
* @param lineId 设备维修单行主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvRepairLineByLineId(Long lineId);
|
||||
|
||||
/**
|
||||
* 根据维修单头删除所有行信息
|
||||
* @param repairId
|
||||
* @return
|
||||
*/
|
||||
public int deleteByRepairId(Long repairId);
|
||||
}
|
@ -0,0 +1,101 @@
|
||||
package com.ktg.mes.dv.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ktg.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ktg.mes.dv.mapper.DvRepairLineMapper;
|
||||
import com.ktg.mes.dv.domain.DvRepairLine;
|
||||
import com.ktg.mes.dv.service.IDvRepairLineService;
|
||||
|
||||
/**
|
||||
* 设备维修单行Service业务层处理
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-08-08
|
||||
*/
|
||||
@Service
|
||||
public class DvRepairLineServiceImpl implements IDvRepairLineService
|
||||
{
|
||||
@Autowired
|
||||
private DvRepairLineMapper dvRepairLineMapper;
|
||||
|
||||
/**
|
||||
* 查询设备维修单行
|
||||
*
|
||||
* @param lineId 设备维修单行主键
|
||||
* @return 设备维修单行
|
||||
*/
|
||||
@Override
|
||||
public DvRepairLine selectDvRepairLineByLineId(Long lineId)
|
||||
{
|
||||
return dvRepairLineMapper.selectDvRepairLineByLineId(lineId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备维修单行列表
|
||||
*
|
||||
* @param dvRepairLine 设备维修单行
|
||||
* @return 设备维修单行
|
||||
*/
|
||||
@Override
|
||||
public List<DvRepairLine> selectDvRepairLineList(DvRepairLine dvRepairLine)
|
||||
{
|
||||
return dvRepairLineMapper.selectDvRepairLineList(dvRepairLine);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备维修单行
|
||||
*
|
||||
* @param dvRepairLine 设备维修单行
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDvRepairLine(DvRepairLine dvRepairLine)
|
||||
{
|
||||
dvRepairLine.setCreateTime(DateUtils.getNowDate());
|
||||
return dvRepairLineMapper.insertDvRepairLine(dvRepairLine);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备维修单行
|
||||
*
|
||||
* @param dvRepairLine 设备维修单行
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDvRepairLine(DvRepairLine dvRepairLine)
|
||||
{
|
||||
dvRepairLine.setUpdateTime(DateUtils.getNowDate());
|
||||
return dvRepairLineMapper.updateDvRepairLine(dvRepairLine);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设备维修单行
|
||||
*
|
||||
* @param lineIds 需要删除的设备维修单行主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDvRepairLineByLineIds(Long[] lineIds)
|
||||
{
|
||||
return dvRepairLineMapper.deleteDvRepairLineByLineIds(lineIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备维修单行信息
|
||||
*
|
||||
* @param lineId 设备维修单行主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDvRepairLineByLineId(Long lineId)
|
||||
{
|
||||
return dvRepairLineMapper.deleteDvRepairLineByLineId(lineId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteByRepairId(Long repairId) {
|
||||
return dvRepairLineMapper.deleteByRepairId(repairId);
|
||||
}
|
||||
}
|
141
ktg-mes/src/main/resources/mapper/dv/DvRepairLineMapper.xml
Normal file
141
ktg-mes/src/main/resources/mapper/dv/DvRepairLineMapper.xml
Normal file
@ -0,0 +1,141 @@
|
||||
<?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.ktg.mes.dv.mapper.DvRepairLineMapper">
|
||||
|
||||
<resultMap type="DvRepairLine" id="DvRepairLineResult">
|
||||
<result property="lineId" column="line_id" />
|
||||
<result property="repairId" column="repair_id" />
|
||||
<result property="subjectId" column="subject_id" />
|
||||
<result property="subjectCode" column="subject_code" />
|
||||
<result property="subjectName" column="subject_name" />
|
||||
<result property="subjectType" column="subject_type" />
|
||||
<result property="subjectContent" column="subject_content" />
|
||||
<result property="subjectStandard" column="subject_standard" />
|
||||
<result property="malfunction" column="malfunction" />
|
||||
<result property="malfunctionUrl" column="malfunction_url" />
|
||||
<result property="repairDes" column="repair_des" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="attr4" column="attr4" />
|
||||
<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="selectDvRepairLineVo">
|
||||
select line_id, repair_id, subject_id, subject_code, subject_name, subject_type, subject_content, subject_standard, malfunction, malfunction_url, repair_des, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from dv_repair_line
|
||||
</sql>
|
||||
|
||||
<select id="selectDvRepairLineList" parameterType="DvRepairLine" resultMap="DvRepairLineResult">
|
||||
<include refid="selectDvRepairLineVo"/>
|
||||
<where>
|
||||
<if test="repairId != null "> and repair_id = #{repairId}</if>
|
||||
<if test="subjectId != null "> and subject_id = #{subjectId}</if>
|
||||
<if test="subjectCode != null and subjectCode != ''"> and subject_code = #{subjectCode}</if>
|
||||
<if test="subjectName != null and subjectName != ''"> and subject_name like concat('%', #{subjectName}, '%')</if>
|
||||
<if test="subjectType != null and subjectType != ''"> and subject_type = #{subjectType}</if>
|
||||
<if test="subjectContent != null and subjectContent != ''"> and subject_content = #{subjectContent}</if>
|
||||
<if test="subjectStandard != null and subjectStandard != ''"> and subject_standard = #{subjectStandard}</if>
|
||||
<if test="malfunction != null and malfunction != ''"> and malfunction = #{malfunction}</if>
|
||||
<if test="malfunctionUrl != null and malfunctionUrl != ''"> and malfunction_url = #{malfunctionUrl}</if>
|
||||
<if test="repairDes != null and repairDes != ''"> and repair_des = #{repairDes}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDvRepairLineByLineId" parameterType="Long" resultMap="DvRepairLineResult">
|
||||
<include refid="selectDvRepairLineVo"/>
|
||||
where line_id = #{lineId}
|
||||
</select>
|
||||
|
||||
<insert id="insertDvRepairLine" parameterType="DvRepairLine" useGeneratedKeys="true" keyProperty="lineId">
|
||||
insert into dv_repair_line
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="repairId != null">repair_id,</if>
|
||||
<if test="subjectId != null">subject_id,</if>
|
||||
<if test="subjectCode != null and subjectCode != ''">subject_code,</if>
|
||||
<if test="subjectName != null">subject_name,</if>
|
||||
<if test="subjectType != null">subject_type,</if>
|
||||
<if test="subjectContent != null and subjectContent != ''">subject_content,</if>
|
||||
<if test="subjectStandard != null">subject_standard,</if>
|
||||
<if test="malfunction != null">malfunction,</if>
|
||||
<if test="malfunctionUrl != null">malfunction_url,</if>
|
||||
<if test="repairDes != null">repair_des,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="attr4 != null">attr4,</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="repairId != null">#{repairId},</if>
|
||||
<if test="subjectId != null">#{subjectId},</if>
|
||||
<if test="subjectCode != null and subjectCode != ''">#{subjectCode},</if>
|
||||
<if test="subjectName != null">#{subjectName},</if>
|
||||
<if test="subjectType != null">#{subjectType},</if>
|
||||
<if test="subjectContent != null and subjectContent != ''">#{subjectContent},</if>
|
||||
<if test="subjectStandard != null">#{subjectStandard},</if>
|
||||
<if test="malfunction != null">#{malfunction},</if>
|
||||
<if test="malfunctionUrl != null">#{malfunctionUrl},</if>
|
||||
<if test="repairDes != null">#{repairDes},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="attr4 != null">#{attr4},</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="updateDvRepairLine" parameterType="DvRepairLine">
|
||||
update dv_repair_line
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="repairId != null">repair_id = #{repairId},</if>
|
||||
<if test="subjectId != null">subject_id = #{subjectId},</if>
|
||||
<if test="subjectCode != null and subjectCode != ''">subject_code = #{subjectCode},</if>
|
||||
<if test="subjectName != null">subject_name = #{subjectName},</if>
|
||||
<if test="subjectType != null">subject_type = #{subjectType},</if>
|
||||
<if test="subjectContent != null and subjectContent != ''">subject_content = #{subjectContent},</if>
|
||||
<if test="subjectStandard != null">subject_standard = #{subjectStandard},</if>
|
||||
<if test="malfunction != null">malfunction = #{malfunction},</if>
|
||||
<if test="malfunctionUrl != null">malfunction_url = #{malfunctionUrl},</if>
|
||||
<if test="repairDes != null">repair_des = #{repairDes},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="attr4 != null">attr4 = #{attr4},</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 line_id = #{lineId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDvRepairLineByLineId" parameterType="Long">
|
||||
delete from dv_repair_line where line_id = #{lineId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDvRepairLineByLineIds" parameterType="String">
|
||||
delete from dv_repair_line where line_id in
|
||||
<foreach item="lineId" collection="array" open="(" separator="," close=")">
|
||||
#{lineId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByRepairId" parameterType="Long">
|
||||
delete from dv_repair_line where repair_id = #{repairId}
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user