工序步骤
This commit is contained in:
parent
4841a77735
commit
b8b0f0ce94
@ -0,0 +1,104 @@
|
||||
package com.ktg.mes.pro.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.pro.domain.ProProcessContent;
|
||||
import com.ktg.mes.pro.service.IProProcessContentService;
|
||||
import com.ktg.common.utils.poi.ExcelUtil;
|
||||
import com.ktg.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 生产工序内容Controller
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-05-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mes/pro/processcontent")
|
||||
public class ProProcessContentController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IProProcessContentService proProcessContentService;
|
||||
|
||||
/**
|
||||
* 查询生产工序内容列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:pro:processcontent:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ProProcessContent proProcessContent)
|
||||
{
|
||||
startPage();
|
||||
List<ProProcessContent> list = proProcessContentService.selectProProcessContentList(proProcessContent);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出生产工序内容列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:pro:processcontent:export')")
|
||||
@Log(title = "生产工序内容", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ProProcessContent proProcessContent)
|
||||
{
|
||||
List<ProProcessContent> list = proProcessContentService.selectProProcessContentList(proProcessContent);
|
||||
ExcelUtil<ProProcessContent> util = new ExcelUtil<ProProcessContent>(ProProcessContent.class);
|
||||
util.exportExcel(response, list, "生产工序内容数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取生产工序内容详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:pro:processcontent:query')")
|
||||
@GetMapping(value = "/{contentId}")
|
||||
public AjaxResult getInfo(@PathVariable("contentId") Long contentId)
|
||||
{
|
||||
return AjaxResult.success(proProcessContentService.selectProProcessContentByContentId(contentId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增生产工序内容
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:pro:processcontent:add')")
|
||||
@Log(title = "生产工序内容", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ProProcessContent proProcessContent)
|
||||
{
|
||||
return toAjax(proProcessContentService.insertProProcessContent(proProcessContent));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改生产工序内容
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:pro:processcontent:edit')")
|
||||
@Log(title = "生产工序内容", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ProProcessContent proProcessContent)
|
||||
{
|
||||
return toAjax(proProcessContentService.updateProProcessContent(proProcessContent));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除生产工序内容
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:pro:processcontent:remove')")
|
||||
@Log(title = "生产工序内容", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{contentIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] contentIds)
|
||||
{
|
||||
return toAjax(proProcessContentService.deleteProProcessContentByContentIds(contentIds));
|
||||
}
|
||||
}
|
@ -9,7 +9,7 @@ import com.ktg.common.core.domain.BaseEntity;
|
||||
* 生产工序对象 pro_process
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-05-11
|
||||
* @date 2022-05-12
|
||||
*/
|
||||
public class ProProcess extends BaseEntity
|
||||
{
|
||||
@ -26,6 +26,10 @@ public class ProProcess extends BaseEntity
|
||||
@Excel(name = "工序名称")
|
||||
private String processName;
|
||||
|
||||
/** 工艺要求 */
|
||||
@Excel(name = "工艺要求")
|
||||
private String attention;
|
||||
|
||||
/** 是否启用 */
|
||||
@Excel(name = "是否启用")
|
||||
private String enableFlag;
|
||||
@ -69,6 +73,15 @@ public class ProProcess extends BaseEntity
|
||||
{
|
||||
return processName;
|
||||
}
|
||||
public void setAttention(String attention)
|
||||
{
|
||||
this.attention = attention;
|
||||
}
|
||||
|
||||
public String getAttention()
|
||||
{
|
||||
return attention;
|
||||
}
|
||||
public void setEnableFlag(String enableFlag)
|
||||
{
|
||||
this.enableFlag = enableFlag;
|
||||
@ -121,6 +134,7 @@ public class ProProcess extends BaseEntity
|
||||
.append("processId", getProcessId())
|
||||
.append("processCode", getProcessCode())
|
||||
.append("processName", getProcessName())
|
||||
.append("attention", getAttention())
|
||||
.append("enableFlag", getEnableFlag())
|
||||
.append("remark", getRemark())
|
||||
.append("attr1", getAttr1())
|
||||
|
@ -0,0 +1,178 @@
|
||||
package com.ktg.mes.pro.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;
|
||||
|
||||
/**
|
||||
* 生产工序内容对象 pro_process_content
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-05-12
|
||||
*/
|
||||
public class ProProcessContent extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 内容ID */
|
||||
private Long contentId;
|
||||
|
||||
/** 工序ID */
|
||||
@Excel(name = "工序ID")
|
||||
private Long processId;
|
||||
|
||||
/** 顺序编号 */
|
||||
@Excel(name = "顺序编号")
|
||||
private Integer orderNum;
|
||||
|
||||
/** 内容说明 */
|
||||
@Excel(name = "内容说明")
|
||||
private String contentText;
|
||||
|
||||
/** 辅助设备 */
|
||||
@Excel(name = "辅助设备")
|
||||
private String device;
|
||||
|
||||
/** 辅助材料 */
|
||||
@Excel(name = "辅助材料")
|
||||
private String material;
|
||||
|
||||
/** 材料URL */
|
||||
@Excel(name = "材料URL")
|
||||
private String docUrl;
|
||||
|
||||
/** 预留字段1 */
|
||||
private String attr1;
|
||||
|
||||
/** 预留字段2 */
|
||||
private String attr2;
|
||||
|
||||
/** 预留字段3 */
|
||||
private Long attr3;
|
||||
|
||||
/** 预留字段4 */
|
||||
private Long attr4;
|
||||
|
||||
public void setContentId(Long contentId)
|
||||
{
|
||||
this.contentId = contentId;
|
||||
}
|
||||
|
||||
public Long getContentId()
|
||||
{
|
||||
return contentId;
|
||||
}
|
||||
public void setProcessId(Long processId)
|
||||
{
|
||||
this.processId = processId;
|
||||
}
|
||||
|
||||
public Long getProcessId()
|
||||
{
|
||||
return processId;
|
||||
}
|
||||
public void setOrderNum(Integer orderNum)
|
||||
{
|
||||
this.orderNum = orderNum;
|
||||
}
|
||||
|
||||
public Integer getOrderNum()
|
||||
{
|
||||
return orderNum;
|
||||
}
|
||||
public void setContentText(String contentText)
|
||||
{
|
||||
this.contentText = contentText;
|
||||
}
|
||||
|
||||
public String getContentText()
|
||||
{
|
||||
return contentText;
|
||||
}
|
||||
public void setDevice(String device)
|
||||
{
|
||||
this.device = device;
|
||||
}
|
||||
|
||||
public String getDevice()
|
||||
{
|
||||
return device;
|
||||
}
|
||||
public void setMaterial(String material)
|
||||
{
|
||||
this.material = material;
|
||||
}
|
||||
|
||||
public String getMaterial()
|
||||
{
|
||||
return material;
|
||||
}
|
||||
public void setDocUrl(String docUrl)
|
||||
{
|
||||
this.docUrl = docUrl;
|
||||
}
|
||||
|
||||
public String getDocUrl()
|
||||
{
|
||||
return docUrl;
|
||||
}
|
||||
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("contentId", getContentId())
|
||||
.append("processId", getProcessId())
|
||||
.append("orderNum", getOrderNum())
|
||||
.append("contentText", getContentText())
|
||||
.append("device", getDevice())
|
||||
.append("material", getMaterial())
|
||||
.append("docUrl", getDocUrl())
|
||||
.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,61 @@
|
||||
package com.ktg.mes.pro.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ktg.mes.pro.domain.ProProcessContent;
|
||||
|
||||
/**
|
||||
* 生产工序内容Mapper接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-05-12
|
||||
*/
|
||||
public interface ProProcessContentMapper
|
||||
{
|
||||
/**
|
||||
* 查询生产工序内容
|
||||
*
|
||||
* @param contentId 生产工序内容主键
|
||||
* @return 生产工序内容
|
||||
*/
|
||||
public ProProcessContent selectProProcessContentByContentId(Long contentId);
|
||||
|
||||
/**
|
||||
* 查询生产工序内容列表
|
||||
*
|
||||
* @param proProcessContent 生产工序内容
|
||||
* @return 生产工序内容集合
|
||||
*/
|
||||
public List<ProProcessContent> selectProProcessContentList(ProProcessContent proProcessContent);
|
||||
|
||||
/**
|
||||
* 新增生产工序内容
|
||||
*
|
||||
* @param proProcessContent 生产工序内容
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertProProcessContent(ProProcessContent proProcessContent);
|
||||
|
||||
/**
|
||||
* 修改生产工序内容
|
||||
*
|
||||
* @param proProcessContent 生产工序内容
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateProProcessContent(ProProcessContent proProcessContent);
|
||||
|
||||
/**
|
||||
* 删除生产工序内容
|
||||
*
|
||||
* @param contentId 生产工序内容主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProProcessContentByContentId(Long contentId);
|
||||
|
||||
/**
|
||||
* 批量删除生产工序内容
|
||||
*
|
||||
* @param contentIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProProcessContentByContentIds(Long[] contentIds);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ktg.mes.pro.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ktg.mes.pro.domain.ProProcessContent;
|
||||
|
||||
/**
|
||||
* 生产工序内容Service接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-05-12
|
||||
*/
|
||||
public interface IProProcessContentService
|
||||
{
|
||||
/**
|
||||
* 查询生产工序内容
|
||||
*
|
||||
* @param contentId 生产工序内容主键
|
||||
* @return 生产工序内容
|
||||
*/
|
||||
public ProProcessContent selectProProcessContentByContentId(Long contentId);
|
||||
|
||||
/**
|
||||
* 查询生产工序内容列表
|
||||
*
|
||||
* @param proProcessContent 生产工序内容
|
||||
* @return 生产工序内容集合
|
||||
*/
|
||||
public List<ProProcessContent> selectProProcessContentList(ProProcessContent proProcessContent);
|
||||
|
||||
/**
|
||||
* 新增生产工序内容
|
||||
*
|
||||
* @param proProcessContent 生产工序内容
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertProProcessContent(ProProcessContent proProcessContent);
|
||||
|
||||
/**
|
||||
* 修改生产工序内容
|
||||
*
|
||||
* @param proProcessContent 生产工序内容
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateProProcessContent(ProProcessContent proProcessContent);
|
||||
|
||||
/**
|
||||
* 批量删除生产工序内容
|
||||
*
|
||||
* @param contentIds 需要删除的生产工序内容主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProProcessContentByContentIds(Long[] contentIds);
|
||||
|
||||
/**
|
||||
* 删除生产工序内容信息
|
||||
*
|
||||
* @param contentId 生产工序内容主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProProcessContentByContentId(Long contentId);
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.ktg.mes.pro.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.pro.mapper.ProProcessContentMapper;
|
||||
import com.ktg.mes.pro.domain.ProProcessContent;
|
||||
import com.ktg.mes.pro.service.IProProcessContentService;
|
||||
|
||||
/**
|
||||
* 生产工序内容Service业务层处理
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-05-12
|
||||
*/
|
||||
@Service
|
||||
public class ProProcessContentServiceImpl implements IProProcessContentService
|
||||
{
|
||||
@Autowired
|
||||
private ProProcessContentMapper proProcessContentMapper;
|
||||
|
||||
/**
|
||||
* 查询生产工序内容
|
||||
*
|
||||
* @param contentId 生产工序内容主键
|
||||
* @return 生产工序内容
|
||||
*/
|
||||
@Override
|
||||
public ProProcessContent selectProProcessContentByContentId(Long contentId)
|
||||
{
|
||||
return proProcessContentMapper.selectProProcessContentByContentId(contentId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询生产工序内容列表
|
||||
*
|
||||
* @param proProcessContent 生产工序内容
|
||||
* @return 生产工序内容
|
||||
*/
|
||||
@Override
|
||||
public List<ProProcessContent> selectProProcessContentList(ProProcessContent proProcessContent)
|
||||
{
|
||||
return proProcessContentMapper.selectProProcessContentList(proProcessContent);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增生产工序内容
|
||||
*
|
||||
* @param proProcessContent 生产工序内容
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertProProcessContent(ProProcessContent proProcessContent)
|
||||
{
|
||||
proProcessContent.setCreateTime(DateUtils.getNowDate());
|
||||
return proProcessContentMapper.insertProProcessContent(proProcessContent);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改生产工序内容
|
||||
*
|
||||
* @param proProcessContent 生产工序内容
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateProProcessContent(ProProcessContent proProcessContent)
|
||||
{
|
||||
proProcessContent.setUpdateTime(DateUtils.getNowDate());
|
||||
return proProcessContentMapper.updateProProcessContent(proProcessContent);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除生产工序内容
|
||||
*
|
||||
* @param contentIds 需要删除的生产工序内容主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteProProcessContentByContentIds(Long[] contentIds)
|
||||
{
|
||||
return proProcessContentMapper.deleteProProcessContentByContentIds(contentIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除生产工序内容信息
|
||||
*
|
||||
* @param contentId 生产工序内容主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteProProcessContentByContentId(Long contentId)
|
||||
{
|
||||
return proProcessContentMapper.deleteProProcessContentByContentId(contentId);
|
||||
}
|
||||
}
|
@ -0,0 +1,118 @@
|
||||
<?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.pro.mapper.ProProcessContentMapper">
|
||||
|
||||
<resultMap type="ProProcessContent" id="ProProcessContentResult">
|
||||
<result property="contentId" column="content_id" />
|
||||
<result property="processId" column="process_id" />
|
||||
<result property="orderNum" column="order_num" />
|
||||
<result property="contentText" column="content_text" />
|
||||
<result property="device" column="device" />
|
||||
<result property="material" column="material" />
|
||||
<result property="docUrl" column="doc_url" />
|
||||
<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="selectProProcessContentVo">
|
||||
select content_id, process_id, order_num, content_text, device, material, doc_url, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from pro_process_content
|
||||
</sql>
|
||||
|
||||
<select id="selectProProcessContentList" parameterType="ProProcessContent" resultMap="ProProcessContentResult">
|
||||
<include refid="selectProProcessContentVo"/>
|
||||
<where>
|
||||
<if test="processId != null "> and process_id = #{processId}</if>
|
||||
<if test="orderNum != null "> and order_num = #{orderNum}</if>
|
||||
<if test="contentText != null and contentText != ''"> and content_text = #{contentText}</if>
|
||||
<if test="device != null and device != ''"> and device = #{device}</if>
|
||||
<if test="material != null and material != ''"> and material = #{material}</if>
|
||||
<if test="docUrl != null and docUrl != ''"> and doc_url = #{docUrl}</if>
|
||||
</where>
|
||||
order by order_num asc
|
||||
</select>
|
||||
|
||||
<select id="selectProProcessContentByContentId" parameterType="Long" resultMap="ProProcessContentResult">
|
||||
<include refid="selectProProcessContentVo"/>
|
||||
where content_id = #{contentId}
|
||||
</select>
|
||||
|
||||
<insert id="insertProProcessContent" parameterType="ProProcessContent" useGeneratedKeys="true" keyProperty="contentId">
|
||||
insert into pro_process_content
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="processId != null">process_id,</if>
|
||||
<if test="orderNum != null">order_num,</if>
|
||||
<if test="contentText != null">content_text,</if>
|
||||
<if test="device != null">device,</if>
|
||||
<if test="material != null">material,</if>
|
||||
<if test="docUrl != null">doc_url,</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="processId != null">#{processId},</if>
|
||||
<if test="orderNum != null">#{orderNum},</if>
|
||||
<if test="contentText != null">#{contentText},</if>
|
||||
<if test="device != null">#{device},</if>
|
||||
<if test="material != null">#{material},</if>
|
||||
<if test="docUrl != null">#{docUrl},</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="updateProProcessContent" parameterType="ProProcessContent">
|
||||
update pro_process_content
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="processId != null">process_id = #{processId},</if>
|
||||
<if test="orderNum != null">order_num = #{orderNum},</if>
|
||||
<if test="contentText != null">content_text = #{contentText},</if>
|
||||
<if test="device != null">device = #{device},</if>
|
||||
<if test="material != null">material = #{material},</if>
|
||||
<if test="docUrl != null">doc_url = #{docUrl},</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 content_id = #{contentId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteProProcessContentByContentId" parameterType="Long">
|
||||
delete from pro_process_content where content_id = #{contentId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteProProcessContentByContentIds" parameterType="String">
|
||||
delete from pro_process_content where content_id in
|
||||
<foreach item="contentId" collection="array" open="(" separator="," close=")">
|
||||
#{contentId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="processId" column="process_id" />
|
||||
<result property="processCode" column="process_code" />
|
||||
<result property="processName" column="process_name" />
|
||||
<result property="attention" column="attention" />
|
||||
<result property="enableFlag" column="enable_flag" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="attr1" column="attr1" />
|
||||
@ -21,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectProProcessVo">
|
||||
select process_id, process_code, process_name, enable_flag, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from pro_process
|
||||
select process_id, process_code, process_name, attention, enable_flag, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from pro_process
|
||||
</sql>
|
||||
|
||||
<select id="selectProProcessList" parameterType="ProProcess" resultMap="ProProcessResult">
|
||||
@ -29,6 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<where>
|
||||
<if test="processCode != null and processCode != ''"> and process_code = #{processCode}</if>
|
||||
<if test="processName != null and processName != ''"> and process_name like concat('%', #{processName}, '%')</if>
|
||||
<if test="attention != null and attention != ''"> and attention = #{attention}</if>
|
||||
<if test="enableFlag != null and enableFlag != ''"> and enable_flag = #{enableFlag}</if>
|
||||
</where>
|
||||
</select>
|
||||
@ -38,7 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
where process_id = #{processId}
|
||||
</select>
|
||||
|
||||
<select id="checkProcessCodeUnique" parameterType="ProProcess" resultMap="ProProcessResult">
|
||||
<select id="checkProcessCodeUnique" parameterType="ProProcess" resultMap="ProProcessResult">
|
||||
<include refid="selectProProcessVo"/>
|
||||
where process_code = #{processCode} limit 1
|
||||
</select>
|
||||
@ -53,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="processCode != null and processCode != ''">process_code,</if>
|
||||
<if test="processName != null and processName != ''">process_name,</if>
|
||||
<if test="attention != null">attention,</if>
|
||||
<if test="enableFlag != null and enableFlag != ''">enable_flag,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
@ -67,6 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="processCode != null and processCode != ''">#{processCode},</if>
|
||||
<if test="processName != null and processName != ''">#{processName},</if>
|
||||
<if test="attention != null">#{attention},</if>
|
||||
<if test="enableFlag != null and enableFlag != ''">#{enableFlag},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
@ -85,6 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="processCode != null and processCode != ''">process_code = #{processCode},</if>
|
||||
<if test="processName != null and processName != ''">process_name = #{processName},</if>
|
||||
<if test="attention != null">attention = #{attention},</if>
|
||||
<if test="enableFlag != null and enableFlag != ''">enable_flag = #{enableFlag},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
|
Loading…
Reference in New Issue
Block a user