质检项信息维护
parent
00c7d304ea
commit
aba7eecea3
@ -0,0 +1,110 @@
|
||||
package com.aucma.base.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.aucma.common.utils.DateUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.aucma.common.annotation.Log;
|
||||
import com.aucma.common.core.controller.BaseController;
|
||||
import com.aucma.common.core.domain.AjaxResult;
|
||||
import com.aucma.common.enums.BusinessType;
|
||||
import com.aucma.base.domain.BaseQualityInspectionItem;
|
||||
import com.aucma.base.service.IBaseQualityInspectionItemService;
|
||||
import com.aucma.common.utils.poi.ExcelUtil;
|
||||
import com.aucma.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 质检项信息维护Controller
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2023-10-16
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/base/qualityInspectionItem" )
|
||||
public class BaseQualityInspectionItemController extends BaseController {
|
||||
@Autowired
|
||||
private IBaseQualityInspectionItemService baseQualityInspectionItemService;
|
||||
|
||||
/**
|
||||
* 查询质检项信息维护列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:qualityInspectionItem:list')" )
|
||||
@GetMapping("/list" )
|
||||
public TableDataInfo list(BaseQualityInspectionItem baseQualityInspectionItem) {
|
||||
startPage();
|
||||
List<BaseQualityInspectionItem> list = baseQualityInspectionItemService.selectBaseQualityInspectionItemList(baseQualityInspectionItem);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出质检项信息维护列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:qualityInspectionItem:export')" )
|
||||
@Log(title = "质检项信息维护" , businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export" )
|
||||
public void export(HttpServletResponse response, BaseQualityInspectionItem baseQualityInspectionItem) {
|
||||
List<BaseQualityInspectionItem> list = baseQualityInspectionItemService.selectBaseQualityInspectionItemList(baseQualityInspectionItem);
|
||||
ExcelUtil<BaseQualityInspectionItem> util = new ExcelUtil<BaseQualityInspectionItem>(BaseQualityInspectionItem. class);
|
||||
util.exportExcel(response, list, "质检项信息维护数据" );
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取质检项信息维护详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:qualityInspectionItem:query')" )
|
||||
@GetMapping(value = "/{objId}" )
|
||||
public AjaxResult getInfo(@PathVariable("objId" ) Long objId) {
|
||||
return success(baseQualityInspectionItemService.selectBaseQualityInspectionItemByObjId(objId));
|
||||
}
|
||||
/**
|
||||
* 查询所有父级以及名称
|
||||
* */
|
||||
@GetMapping("/getParent")
|
||||
public AjaxResult getParent(){
|
||||
return success(baseQualityInspectionItemService.selectBaseQualityInspectionItemParent());
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增质检项信息维护
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:qualityInspectionItem:add')" )
|
||||
@Log(title = "质检项信息维护" , businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BaseQualityInspectionItem baseQualityInspectionItem) {
|
||||
baseQualityInspectionItem.setCreatedBy(getUsername());
|
||||
baseQualityInspectionItem.setCreatedTime(DateUtils.getNowDate());
|
||||
return toAjax(baseQualityInspectionItemService.insertBaseQualityInspectionItem(baseQualityInspectionItem));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改质检项信息维护
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:qualityInspectionItem:edit')" )
|
||||
@Log(title = "质检项信息维护" , businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BaseQualityInspectionItem baseQualityInspectionItem) {
|
||||
baseQualityInspectionItem.setUpdatedBy(getUsername());
|
||||
baseQualityInspectionItem.setUpdatedTime(DateUtils.getNowDate());
|
||||
return toAjax(baseQualityInspectionItemService.updateBaseQualityInspectionItem(baseQualityInspectionItem));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除质检项信息维护
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:qualityInspectionItem:remove')" )
|
||||
@Log(title = "质检项信息维护" , businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{objIds}" )
|
||||
public AjaxResult remove(@PathVariable Long[] objIds) {
|
||||
return toAjax(baseQualityInspectionItemService.deleteBaseQualityInspectionItemByObjIds(objIds));
|
||||
}
|
||||
}
|
@ -0,0 +1,196 @@
|
||||
package com.aucma.base.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.aucma.common.annotation.Excel;
|
||||
import com.aucma.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 质检项信息维护对象 base_quality_inspection_item
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2023-10-16
|
||||
*/
|
||||
public class BaseQualityInspectionItem extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/** 主键标识 */
|
||||
private Long objId;
|
||||
|
||||
/** 质检项/质量缺陷编号 */
|
||||
@Excel(name = "质检项/质量缺陷编号")
|
||||
private String qualityDefectCode;
|
||||
|
||||
/** 质检项/质量缺陷描述 */
|
||||
@Excel(name = "质检项/质量缺陷描述")
|
||||
private String qualityDefectName;
|
||||
|
||||
/** 父级编号 */
|
||||
@Excel(name = "父级编号")
|
||||
private String parentId;
|
||||
|
||||
/** 物料大类 */
|
||||
@Excel(name = "物料大类")
|
||||
private String materialCategories;
|
||||
|
||||
/** 物料小类 */
|
||||
@Excel(name = "物料小类")
|
||||
private String materialSubclass;
|
||||
|
||||
/** 工厂编号 */
|
||||
@Excel(name = "工厂编号")
|
||||
private String plantCode;
|
||||
|
||||
/** 启用标识 */
|
||||
@Excel(name = "启用标识")
|
||||
private Long isFlag;
|
||||
|
||||
/** 创建人 */
|
||||
@Excel(name = "创建人")
|
||||
private String createdBy;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createdTime;
|
||||
|
||||
/** 更新人 */
|
||||
@Excel(name = "更新人")
|
||||
private String updatedBy;
|
||||
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updatedTime;
|
||||
|
||||
public void setObjId(Long objId)
|
||||
{
|
||||
this.objId = objId;
|
||||
}
|
||||
|
||||
public Long getObjId()
|
||||
{
|
||||
return objId;
|
||||
}
|
||||
public void setQualityDefectCode(String qualityDefectCode)
|
||||
{
|
||||
this.qualityDefectCode = qualityDefectCode;
|
||||
}
|
||||
|
||||
public String getQualityDefectCode()
|
||||
{
|
||||
return qualityDefectCode;
|
||||
}
|
||||
public void setQualityDefectName(String qualityDefectName)
|
||||
{
|
||||
this.qualityDefectName = qualityDefectName;
|
||||
}
|
||||
|
||||
public String getQualityDefectName()
|
||||
{
|
||||
return qualityDefectName;
|
||||
}
|
||||
public void setParentId(String parentId)
|
||||
{
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public String getParentId()
|
||||
{
|
||||
return parentId;
|
||||
}
|
||||
public void setMaterialCategories(String materialCategories)
|
||||
{
|
||||
this.materialCategories = materialCategories;
|
||||
}
|
||||
|
||||
public String getMaterialCategories()
|
||||
{
|
||||
return materialCategories;
|
||||
}
|
||||
public void setMaterialSubclass(String materialSubclass)
|
||||
{
|
||||
this.materialSubclass = materialSubclass;
|
||||
}
|
||||
|
||||
public String getMaterialSubclass()
|
||||
{
|
||||
return materialSubclass;
|
||||
}
|
||||
public void setPlantCode(String plantCode)
|
||||
{
|
||||
this.plantCode = plantCode;
|
||||
}
|
||||
|
||||
public String getPlantCode()
|
||||
{
|
||||
return plantCode;
|
||||
}
|
||||
public void setIsFlag(Long isFlag)
|
||||
{
|
||||
this.isFlag = isFlag;
|
||||
}
|
||||
|
||||
public Long getIsFlag()
|
||||
{
|
||||
return isFlag;
|
||||
}
|
||||
public void setCreatedBy(String createdBy)
|
||||
{
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
|
||||
public String getCreatedBy()
|
||||
{
|
||||
return createdBy;
|
||||
}
|
||||
public void setCreatedTime(Date createdTime)
|
||||
{
|
||||
this.createdTime = createdTime;
|
||||
}
|
||||
|
||||
public Date getCreatedTime()
|
||||
{
|
||||
return createdTime;
|
||||
}
|
||||
public void setUpdatedBy(String updatedBy)
|
||||
{
|
||||
this.updatedBy = updatedBy;
|
||||
}
|
||||
|
||||
public String getUpdatedBy()
|
||||
{
|
||||
return updatedBy;
|
||||
}
|
||||
public void setUpdatedTime(Date updatedTime)
|
||||
{
|
||||
this.updatedTime = updatedTime;
|
||||
}
|
||||
|
||||
public Date getUpdatedTime()
|
||||
{
|
||||
return updatedTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(){
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("objId",getObjId())
|
||||
.append("qualityDefectCode",getQualityDefectCode())
|
||||
.append("qualityDefectName",getQualityDefectName())
|
||||
.append("parentId",getParentId())
|
||||
.append("materialCategories",getMaterialCategories())
|
||||
.append("materialSubclass",getMaterialSubclass())
|
||||
.append("plantCode",getPlantCode())
|
||||
.append("remark",getRemark())
|
||||
.append("isFlag",getIsFlag())
|
||||
.append("createdBy",getCreatedBy())
|
||||
.append("createdTime",getCreatedTime())
|
||||
.append("updatedBy",getUpdatedBy())
|
||||
.append("updatedTime",getUpdatedTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.aucma.base.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.aucma.base.domain.BaseQualityInspectionItem;
|
||||
|
||||
/**
|
||||
* 质检项信息维护Mapper接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2023-10-16
|
||||
*/
|
||||
public interface BaseQualityInspectionItemMapper
|
||||
{
|
||||
/**
|
||||
* 查询质检项信息维护
|
||||
*
|
||||
* @param objId 质检项信息维护主键
|
||||
* @return 质检项信息维护
|
||||
*/
|
||||
public BaseQualityInspectionItem selectBaseQualityInspectionItemByObjId(Long objId);
|
||||
|
||||
/**
|
||||
* 查询质检项信息维护列表
|
||||
*
|
||||
* @param baseQualityInspectionItem 质检项信息维护
|
||||
* @return 质检项信息维护集合
|
||||
*/
|
||||
public List<BaseQualityInspectionItem> selectBaseQualityInspectionItemList(BaseQualityInspectionItem baseQualityInspectionItem);
|
||||
|
||||
List<BaseQualityInspectionItem> selectBaseQualityInspectionItemParent();
|
||||
/**
|
||||
* 新增质检项信息维护
|
||||
*
|
||||
* @param baseQualityInspectionItem 质检项信息维护
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseQualityInspectionItem(BaseQualityInspectionItem baseQualityInspectionItem);
|
||||
|
||||
/**
|
||||
* 修改质检项信息维护
|
||||
*
|
||||
* @param baseQualityInspectionItem 质检项信息维护
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseQualityInspectionItem(BaseQualityInspectionItem baseQualityInspectionItem);
|
||||
|
||||
/**
|
||||
* 删除质检项信息维护
|
||||
*
|
||||
* @param objId 质检项信息维护主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseQualityInspectionItemByObjId(Long objId);
|
||||
|
||||
/**
|
||||
* 批量删除质检项信息维护
|
||||
*
|
||||
* @param objIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseQualityInspectionItemByObjIds(Long[] objIds);
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.aucma.base.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.aucma.base.domain.BaseQualityInspectionItem;
|
||||
|
||||
/**
|
||||
* 质检项信息维护Service接口
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2023-10-16
|
||||
*/
|
||||
public interface IBaseQualityInspectionItemService
|
||||
{
|
||||
/**
|
||||
* 查询质检项信息维护
|
||||
*
|
||||
* @param objId 质检项信息维护主键
|
||||
* @return 质检项信息维护
|
||||
*/
|
||||
public BaseQualityInspectionItem selectBaseQualityInspectionItemByObjId(Long objId);
|
||||
|
||||
List<BaseQualityInspectionItem> selectBaseQualityInspectionItemParent();
|
||||
/**
|
||||
* 查询质检项信息维护列表
|
||||
*
|
||||
* @param baseQualityInspectionItem 质检项信息维护
|
||||
* @return 质检项信息维护集合
|
||||
*/
|
||||
public List<BaseQualityInspectionItem> selectBaseQualityInspectionItemList(BaseQualityInspectionItem baseQualityInspectionItem);
|
||||
|
||||
/**
|
||||
* 新增质检项信息维护
|
||||
*
|
||||
* @param baseQualityInspectionItem 质检项信息维护
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseQualityInspectionItem(BaseQualityInspectionItem baseQualityInspectionItem);
|
||||
|
||||
/**
|
||||
* 修改质检项信息维护
|
||||
*
|
||||
* @param baseQualityInspectionItem 质检项信息维护
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseQualityInspectionItem(BaseQualityInspectionItem baseQualityInspectionItem);
|
||||
|
||||
/**
|
||||
* 批量删除质检项信息维护
|
||||
*
|
||||
* @param objIds 需要删除的质检项信息维护主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseQualityInspectionItemByObjIds(Long[] objIds);
|
||||
|
||||
/**
|
||||
* 删除质检项信息维护信息
|
||||
*
|
||||
* @param objId 质检项信息维护主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseQualityInspectionItemByObjId(Long objId);
|
||||
}
|
@ -0,0 +1,98 @@
|
||||
package com.aucma.base.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.aucma.base.mapper.BaseQualityInspectionItemMapper;
|
||||
import com.aucma.base.domain.BaseQualityInspectionItem;
|
||||
import com.aucma.base.service.IBaseQualityInspectionItemService;
|
||||
|
||||
/**
|
||||
* 质检项信息维护Service业务层处理
|
||||
*
|
||||
* @author Yinq
|
||||
* @date 2023-10-16
|
||||
*/
|
||||
@Service
|
||||
public class BaseQualityInspectionItemServiceImpl implements IBaseQualityInspectionItemService
|
||||
{
|
||||
@Autowired
|
||||
private BaseQualityInspectionItemMapper baseQualityInspectionItemMapper;
|
||||
|
||||
/**
|
||||
* 查询质检项信息维护
|
||||
*
|
||||
* @param objId 质检项信息维护主键
|
||||
* @return 质检项信息维护
|
||||
*/
|
||||
@Override
|
||||
public BaseQualityInspectionItem selectBaseQualityInspectionItemByObjId(Long objId)
|
||||
{
|
||||
return baseQualityInspectionItemMapper.selectBaseQualityInspectionItemByObjId(objId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BaseQualityInspectionItem> selectBaseQualityInspectionItemParent() {
|
||||
return baseQualityInspectionItemMapper.selectBaseQualityInspectionItemParent();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询质检项信息维护列表
|
||||
*
|
||||
* @param baseQualityInspectionItem 质检项信息维护
|
||||
* @return 质检项信息维护
|
||||
*/
|
||||
@Override
|
||||
public List<BaseQualityInspectionItem> selectBaseQualityInspectionItemList(BaseQualityInspectionItem baseQualityInspectionItem)
|
||||
{
|
||||
return baseQualityInspectionItemMapper.selectBaseQualityInspectionItemList(baseQualityInspectionItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增质检项信息维护
|
||||
*
|
||||
* @param baseQualityInspectionItem 质检项信息维护
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBaseQualityInspectionItem(BaseQualityInspectionItem baseQualityInspectionItem)
|
||||
{
|
||||
return baseQualityInspectionItemMapper.insertBaseQualityInspectionItem(baseQualityInspectionItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改质检项信息维护
|
||||
*
|
||||
* @param baseQualityInspectionItem 质检项信息维护
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBaseQualityInspectionItem(BaseQualityInspectionItem baseQualityInspectionItem)
|
||||
{
|
||||
return baseQualityInspectionItemMapper.updateBaseQualityInspectionItem(baseQualityInspectionItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除质检项信息维护
|
||||
*
|
||||
* @param objIds 需要删除的质检项信息维护主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseQualityInspectionItemByObjIds(Long[] objIds)
|
||||
{
|
||||
return baseQualityInspectionItemMapper.deleteBaseQualityInspectionItemByObjIds(objIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除质检项信息维护信息
|
||||
*
|
||||
* @param objId 质检项信息维护主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseQualityInspectionItemByObjId(Long objId)
|
||||
{
|
||||
return baseQualityInspectionItemMapper.deleteBaseQualityInspectionItemByObjId(objId);
|
||||
}
|
||||
}
|
@ -0,0 +1,119 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.aucma.base.mapper.BaseQualityInspectionItemMapper">
|
||||
|
||||
<resultMap type="BaseQualityInspectionItem" id="BaseQualityInspectionItemResult">
|
||||
<result property="objId" column="obj_id" />
|
||||
<result property="qualityDefectCode" column="quality_defect_code" />
|
||||
<result property="qualityDefectName" column="quality_defect_name" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="materialCategories" column="material_categories" />
|
||||
<result property="materialSubclass" column="material_subclass" />
|
||||
<result property="plantCode" column="plant_code" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="isFlag" column="is_flag" />
|
||||
<result property="createdBy" column="created_by" />
|
||||
<result property="createdTime" column="created_time" />
|
||||
<result property="updatedBy" column="updated_by" />
|
||||
<result property="updatedTime" column="updated_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBaseQualityInspectionItemVo">
|
||||
select obj_id, quality_defect_code, quality_defect_name, parent_id, material_categories, material_subclass, plant_code, remark, is_flag, created_by, created_time, updated_by, updated_time from base_quality_inspection_item
|
||||
</sql>
|
||||
|
||||
<select id="selectBaseQualityInspectionItemList" parameterType="BaseQualityInspectionItem" resultMap="BaseQualityInspectionItemResult">
|
||||
<include refid="selectBaseQualityInspectionItemVo"/>
|
||||
<where>
|
||||
<if test="qualityDefectCode != null and qualityDefectCode != ''"> and quality_defect_code = #{qualityDefectCode}</if>
|
||||
<if test="qualityDefectName != null and qualityDefectName != ''"> and quality_defect_name like concat(concat('%', #{qualityDefectName}), '%')</if>
|
||||
<if test="parentId != null and parentId != ''"> and parent_id = #{parentId}</if>
|
||||
<if test="materialCategories != null and materialCategories != ''"> and material_categories = #{materialCategories}</if>
|
||||
<if test="materialSubclass != null and materialSubclass != ''"> and material_subclass = #{materialSubclass}</if>
|
||||
<if test="plantCode != null and plantCode != ''"> and plant_code = #{plantCode}</if>
|
||||
<if test="isFlag != null "> and is_flag = #{isFlag}</if>
|
||||
<if test="createdBy != null and createdBy != ''"> and created_by = #{createdBy}</if>
|
||||
<if test="createdTime != null "> and created_time = #{createdTime}</if>
|
||||
<if test="updatedBy != null and updatedBy != ''"> and updated_by = #{updatedBy}</if>
|
||||
<if test="updatedTime != null "> and updated_time = #{updatedTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBaseQualityInspectionItemByObjId" parameterType="Long" resultMap="BaseQualityInspectionItemResult">
|
||||
<include refid="selectBaseQualityInspectionItemVo"/>
|
||||
where obj_id = #{objId}
|
||||
</select>
|
||||
<select id="selectBaseQualityInspectionItemParent" resultMap="BaseQualityInspectionItemResult">
|
||||
<include refid="selectBaseQualityInspectionItemVo"/>
|
||||
where PARENT_ID = 0
|
||||
</select>
|
||||
|
||||
<insert id="insertBaseQualityInspectionItem" parameterType="BaseQualityInspectionItem">
|
||||
<selectKey keyProperty="objId" resultType="long" order="BEFORE">
|
||||
SELECT seq_base_quality_inspection.NEXTVAL as objId FROM DUAL
|
||||
</selectKey>
|
||||
insert into base_quality_inspection_item
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="objId != null">obj_id,</if>
|
||||
<if test="qualityDefectCode != null">quality_defect_code,</if>
|
||||
<if test="qualityDefectName != null">quality_defect_name,</if>
|
||||
<if test="parentId != null">parent_id,</if>
|
||||
<if test="materialCategories != null">material_categories,</if>
|
||||
<if test="materialSubclass != null">material_subclass,</if>
|
||||
<if test="plantCode != null">plant_code,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="isFlag != null">is_flag,</if>
|
||||
<if test="createdBy != null">created_by,</if>
|
||||
<if test="createdTime != null">created_time,</if>
|
||||
<if test="updatedBy != null">updated_by,</if>
|
||||
<if test="updatedTime != null">updated_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="objId != null">#{objId},</if>
|
||||
<if test="qualityDefectCode != null">#{qualityDefectCode},</if>
|
||||
<if test="qualityDefectName != null">#{qualityDefectName},</if>
|
||||
<if test="parentId != null">#{parentId},</if>
|
||||
<if test="materialCategories != null">#{materialCategories},</if>
|
||||
<if test="materialSubclass != null">#{materialSubclass},</if>
|
||||
<if test="plantCode != null">#{plantCode},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="isFlag != null">#{isFlag},</if>
|
||||
<if test="createdBy != null">#{createdBy},</if>
|
||||
<if test="createdTime != null">#{createdTime},</if>
|
||||
<if test="updatedBy != null">#{updatedBy},</if>
|
||||
<if test="updatedTime != null">#{updatedTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBaseQualityInspectionItem" parameterType="BaseQualityInspectionItem">
|
||||
update base_quality_inspection_item
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="qualityDefectCode != null">quality_defect_code = #{qualityDefectCode},</if>
|
||||
<if test="qualityDefectName != null">quality_defect_name = #{qualityDefectName},</if>
|
||||
<if test="parentId != null">parent_id = #{parentId},</if>
|
||||
<if test="materialCategories != null">material_categories = #{materialCategories},</if>
|
||||
<if test="materialSubclass != null">material_subclass = #{materialSubclass},</if>
|
||||
<if test="plantCode != null">plant_code = #{plantCode},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="isFlag != null">is_flag = #{isFlag},</if>
|
||||
<if test="createdBy != null">created_by = #{createdBy},</if>
|
||||
<if test="createdTime != null">created_time = #{createdTime},</if>
|
||||
<if test="updatedBy != null">updated_by = #{updatedBy},</if>
|
||||
<if test="updatedTime != null">updated_time = #{updatedTime},</if>
|
||||
</trim>
|
||||
where obj_id = #{objId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBaseQualityInspectionItemByObjId" parameterType="Long">
|
||||
delete from base_quality_inspection_item where obj_id = #{objId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBaseQualityInspectionItemByObjIds" parameterType="String">
|
||||
delete from base_quality_inspection_item where obj_id in
|
||||
<foreach item="objId" collection="array" open="(" separator="," close=")">
|
||||
#{objId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in New Issue