add - 工序维护

master
yinq 2 years ago
parent acb0d08999
commit 7064a19957

@ -0,0 +1,103 @@
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.BaseProcessStation;
import com.aucma.base.service.IBaseProcessStationService;
import com.aucma.common.utils.poi.ExcelUtil;
import com.aucma.common.core.page.TableDataInfo;
/**
* /Controller
*
* @author Yinq
* @date 2023-11-14
*/
@RestController
@RequestMapping("/base/processStation" )
public class BaseProcessStationController extends BaseController {
@Autowired
private IBaseProcessStationService baseProcessStationService;
/**
* /
*/
@PreAuthorize("@ss.hasPermi('base:processStation:list')" )
@GetMapping("/list" )
public TableDataInfo list(BaseProcessStation baseProcessStation) {
startPage();
List<BaseProcessStation> list = baseProcessStationService.selectBaseProcessStationList(baseProcessStation);
return getDataTable(list);
}
/**
* /
*/
@PreAuthorize("@ss.hasPermi('base:processStation:export')" )
@Log(title = "生产工序/工位信息" , businessType = BusinessType.EXPORT)
@PostMapping("/export" )
public void export(HttpServletResponse response, BaseProcessStation baseProcessStation) {
List<BaseProcessStation> list = baseProcessStationService.selectBaseProcessStationList(baseProcessStation);
ExcelUtil<BaseProcessStation> util = new ExcelUtil<BaseProcessStation>(BaseProcessStation. class);
util.exportExcel(response, list, "生产工序/工位信息数据" );
}
/**
* /
*/
@PreAuthorize("@ss.hasPermi('base:processStation:query')" )
@GetMapping(value = "/{objId}" )
public AjaxResult getInfo(@PathVariable("objId" ) Long objId) {
return success(baseProcessStationService.selectBaseProcessStationByObjId(objId));
}
/**
* /
*/
@PreAuthorize("@ss.hasPermi('base:processStation:add')" )
@Log(title = "生产工序/工位信息" , businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody BaseProcessStation baseProcessStation) {
baseProcessStation.setCreatedBy(getUsername());
baseProcessStation.setCreatedTime(DateUtils.getNowDate());
return toAjax(baseProcessStationService.insertBaseProcessStation(baseProcessStation));
}
/**
* /
*/
@PreAuthorize("@ss.hasPermi('base:processStation:edit')" )
@Log(title = "生产工序/工位信息" , businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody BaseProcessStation baseProcessStation) {
baseProcessStation.setUpdatedBy(getUsername());
baseProcessStation.setUpdatedTime(DateUtils.getNowDate());
return toAjax(baseProcessStationService.updateBaseProcessStation(baseProcessStation));
}
/**
* /
*/
@PreAuthorize("@ss.hasPermi('base:processStation:remove')" )
@Log(title = "生产工序/工位信息" , businessType = BusinessType.DELETE)
@DeleteMapping("/{objIds}" )
public AjaxResult remove(@PathVariable Long[] objIds) {
return toAjax(baseProcessStationService.deleteBaseProcessStationByObjIds(objIds));
}
}

@ -0,0 +1,250 @@
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_process_station
*
* @author Yinq
* @date 2023-11-14
*/
public class BaseProcessStation extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
*
*/
private Long objId;
/**
* /
*/
@Excel(name = "工序/工位编号")
private String processCode;
/**
* /
*/
@Excel(name = "工序/工位名称")
private String processName;
/**
* 1-2-
*/
@Excel(name = "类别", readConverterExp = "1=-工序2-工位")
private Long processType;
/**
* 线
*/
@Excel(name = "所属产线")
private String productLineCode;
/**
*
*/
@Excel(name = "单位生产时间")
private Long productionTime;
/**
*
*/
@Excel(name = "日产能")
private Long capacityDay;
/**
*
*/
@Excel(name = "月产能")
private Long capacityMonth;
/**
*
*/
@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;
/**
*
*/
@Excel(name = "工位编号")
private String parentId;
/**
*
*/
@Excel(name = "工位名称")
private String stationName;
public String getStationName() {
return stationName;
}
public void setStationName(String stationName) {
this.stationName = stationName;
}
public void setObjId(Long objId) {
this.objId = objId;
}
public Long getObjId() {
return objId;
}
public void setProcessCode(String processCode) {
this.processCode = processCode;
}
public String getProcessCode() {
return processCode;
}
public void setProcessName(String processName) {
this.processName = processName;
}
public String getProcessName() {
return processName;
}
public void setProcessType(Long processType) {
this.processType = processType;
}
public Long getProcessType() {
return processType;
}
public void setProductLineCode(String productLineCode) {
this.productLineCode = productLineCode;
}
public String getProductLineCode() {
return productLineCode;
}
public void setProductionTime(Long productionTime) {
this.productionTime = productionTime;
}
public Long getProductionTime() {
return productionTime;
}
public void setCapacityDay(Long capacityDay) {
this.capacityDay = capacityDay;
}
public Long getCapacityDay() {
return capacityDay;
}
public void setCapacityMonth(Long capacityMonth) {
this.capacityMonth = capacityMonth;
}
public Long getCapacityMonth() {
return capacityMonth;
}
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;
}
public void setParentId(String parentId) {
this.parentId = parentId;
}
public String getParentId() {
return parentId;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("objId", getObjId())
.append("processCode", getProcessCode())
.append("processName", getProcessName())
.append("processType", getProcessType())
.append("productLineCode", getProductLineCode())
.append("productionTime", getProductionTime())
.append("capacityDay", getCapacityDay())
.append("capacityMonth", getCapacityMonth())
.append("isFlag", getIsFlag())
.append("createdBy", getCreatedBy())
.append("createdTime", getCreatedTime())
.append("updatedBy", getUpdatedBy())
.append("updatedTime", getUpdatedTime())
.append("parentId", getParentId())
.toString();
}
}

@ -37,13 +37,13 @@ public class BaseProductLine extends BaseEntity {
/**
* 线
*/
@Excel(name = "产线产线/工位名称")
@Excel(name = "产线/工位名称")
private String productLineName;
/**
* 线1-线2-
*/
@Excel(name = "类别", readConverterExp = "1=-产线2-工位")
@Excel(name = "类别", readConverterExp = "1=产线2=工位")
private Long productLineType;
/**

@ -1,9 +1,8 @@
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;
@ -13,184 +12,194 @@ import com.aucma.common.core.domain.BaseEntity;
* @author Yinq
* @date 2023-10-16
*/
public class BaseQualityInspectionItem extends BaseEntity
{
private static final long serialVersionUID=1L;
public class BaseQualityInspectionItem extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 主键标识 */
/**
*
*/
private Long objId;
/** 质检项/质量缺陷编号 */
@Excel(name = "质检项/质量缺陷编号")
/**
* /
*/
@Excel(name = "质检项/质量缺陷编号")
private String qualityDefectCode;
/** 质检项/质量缺陷描述 */
@Excel(name = "质检项/质量缺陷描述")
/**
* /
*/
@Excel(name = "质检项/质量缺陷描述")
private String qualityDefectName;
/** 父级编号 */
@Excel(name = "父级编号")
/**
*
*/
@Excel(name = "父级编号")
private String parentId;
/** 物料大类 */
@Excel(name = "物料大类")
/**
*
*/
@Excel(name = "物料大类")
private String materialCategories;
/** 物料小类 */
@Excel(name = "物料小类")
/**
*
*/
@Excel(name = "物料小类")
private String materialSubclass;
/** 工厂编号 */
@Excel(name = "工厂编号")
private String plantCode;
/**
*
*/
@Excel(name = "工位编号")
private String stationCode;
/** 启用标识 */
@Excel(name = "启用标识")
/**
*
*/
@Excel(name = "启用标识")
private Long isFlag;
/** 创建人 */
@Excel(name = "创建人")
/**
*
*/
@Excel(name = "创建人")
private String createdBy;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
/**
*
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date createdTime;
/** 更新人 */
@Excel(name = "更新人")
/**
*
*/
@Excel(name = "更新人")
private String updatedBy;
/** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
/**
*
*/
@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 void setObjId(Long objId) {
this.objId = objId;
}
public Long getObjId()
{
return objId;
}
public void setQualityDefectCode(String qualityDefectCode)
{
this.qualityDefectCode = qualityDefectCode;
}
public Long getObjId() {
return objId;
}
public String getQualityDefectCode()
{
return qualityDefectCode;
}
public void setQualityDefectName(String qualityDefectName)
{
this.qualityDefectName = qualityDefectName;
}
public void setQualityDefectCode(String qualityDefectCode) {
this.qualityDefectCode = qualityDefectCode;
}
public String getQualityDefectName()
{
return qualityDefectName;
}
public void setParentId(String parentId)
{
this.parentId = parentId;
}
public String getQualityDefectCode() {
return qualityDefectCode;
}
public String getParentId()
{
return parentId;
}
public void setMaterialCategories(String materialCategories)
{
this.materialCategories = materialCategories;
}
public void setQualityDefectName(String qualityDefectName) {
this.qualityDefectName = qualityDefectName;
}
public String getMaterialCategories()
{
return materialCategories;
}
public void setMaterialSubclass(String materialSubclass)
{
this.materialSubclass = materialSubclass;
}
public String getQualityDefectName() {
return qualityDefectName;
}
public String getMaterialSubclass()
{
return materialSubclass;
}
public void setPlantCode(String plantCode)
{
this.plantCode = plantCode;
}
public void setParentId(String parentId) {
this.parentId = parentId;
}
public String getPlantCode()
{
return plantCode;
}
public void setIsFlag(Long isFlag)
{
this.isFlag = isFlag;
}
public String getParentId() {
return parentId;
}
public Long getIsFlag()
{
return isFlag;
}
public void setCreatedBy(String createdBy)
{
this.createdBy = createdBy;
}
public void setMaterialCategories(String materialCategories) {
this.materialCategories = materialCategories;
}
public String getCreatedBy()
{
return createdBy;
}
public void setCreatedTime(Date createdTime)
{
this.createdTime = createdTime;
}
public String getMaterialCategories() {
return materialCategories;
}
public Date getCreatedTime()
{
return createdTime;
}
public void setUpdatedBy(String updatedBy)
{
this.updatedBy = updatedBy;
}
public void setMaterialSubclass(String materialSubclass) {
this.materialSubclass = materialSubclass;
}
public String getUpdatedBy()
{
return updatedBy;
}
public void setUpdatedTime(Date updatedTime)
{
this.updatedTime = updatedTime;
}
public String getMaterialSubclass() {
return materialSubclass;
}
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();
}
}
public String getStationCode() {
return stationCode;
}
public void setStationCode(String stationCode) {
this.stationCode = stationCode;
}
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 "BaseQualityInspectionItem{" +
"objId=" + objId +
", qualityDefectCode='" + qualityDefectCode + '\'' +
", qualityDefectName='" + qualityDefectName + '\'' +
", parentId='" + parentId + '\'' +
", materialCategories='" + materialCategories + '\'' +
", materialSubclass='" + materialSubclass + '\'' +
", stationCode='" + stationCode + '\'' +
", isFlag=" + isFlag +
", createdBy='" + createdBy + '\'' +
", createdTime=" + createdTime +
", updatedBy='" + updatedBy + '\'' +
", updatedTime=" + updatedTime +
'}';
}
}

@ -0,0 +1,61 @@
package com.aucma.base.mapper;
import java.util.List;
import com.aucma.base.domain.BaseProcessStation;
/**
* /Mapper
*
* @author Yinq
* @date 2023-11-14
*/
public interface BaseProcessStationMapper {
/**
* /
*
* @param objId /
* @return /
*/
public BaseProcessStation selectBaseProcessStationByObjId(Long objId);
/**
* /
*
* @param baseProcessStation /
* @return /
*/
public List<BaseProcessStation> selectBaseProcessStationList(BaseProcessStation baseProcessStation);
/**
* /
*
* @param baseProcessStation /
* @return
*/
public int insertBaseProcessStation(BaseProcessStation baseProcessStation);
/**
* /
*
* @param baseProcessStation /
* @return
*/
public int updateBaseProcessStation(BaseProcessStation baseProcessStation);
/**
* /
*
* @param objId /
* @return
*/
public int deleteBaseProcessStationByObjId(Long objId);
/**
* /
*
* @param objIds
* @return
*/
public int deleteBaseProcessStationByObjIds(Long[] objIds);
}

@ -0,0 +1,61 @@
package com.aucma.base.service;
import java.util.List;
import com.aucma.base.domain.BaseProcessStation;
/**
* /Service
*
* @author Yinq
* @date 2023-11-14
*/
public interface IBaseProcessStationService
{
/**
* /
*
* @param objId /
* @return /
*/
public BaseProcessStation selectBaseProcessStationByObjId(Long objId);
/**
* /
*
* @param baseProcessStation /
* @return /
*/
public List<BaseProcessStation> selectBaseProcessStationList(BaseProcessStation baseProcessStation);
/**
* /
*
* @param baseProcessStation /
* @return
*/
public int insertBaseProcessStation(BaseProcessStation baseProcessStation);
/**
* /
*
* @param baseProcessStation /
* @return
*/
public int updateBaseProcessStation(BaseProcessStation baseProcessStation);
/**
* /
*
* @param objIds /
* @return
*/
public int deleteBaseProcessStationByObjIds(Long[] objIds);
/**
* /
*
* @param objId /
* @return
*/
public int deleteBaseProcessStationByObjId(Long objId);
}

@ -0,0 +1,93 @@
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.BaseProcessStationMapper;
import com.aucma.base.domain.BaseProcessStation;
import com.aucma.base.service.IBaseProcessStationService;
/**
* /Service
*
* @author Yinq
* @date 2023-11-14
*/
@Service
public class BaseProcessStationServiceImpl implements IBaseProcessStationService
{
@Autowired
private BaseProcessStationMapper baseProcessStationMapper;
/**
* /
*
* @param objId /
* @return /
*/
@Override
public BaseProcessStation selectBaseProcessStationByObjId(Long objId)
{
return baseProcessStationMapper.selectBaseProcessStationByObjId(objId);
}
/**
* /
*
* @param baseProcessStation /
* @return /
*/
@Override
public List<BaseProcessStation> selectBaseProcessStationList(BaseProcessStation baseProcessStation)
{
return baseProcessStationMapper.selectBaseProcessStationList(baseProcessStation);
}
/**
* /
*
* @param baseProcessStation /
* @return
*/
@Override
public int insertBaseProcessStation(BaseProcessStation baseProcessStation)
{
return baseProcessStationMapper.insertBaseProcessStation(baseProcessStation);
}
/**
* /
*
* @param baseProcessStation /
* @return
*/
@Override
public int updateBaseProcessStation(BaseProcessStation baseProcessStation)
{
return baseProcessStationMapper.updateBaseProcessStation(baseProcessStation);
}
/**
* /
*
* @param objIds /
* @return
*/
@Override
public int deleteBaseProcessStationByObjIds(Long[] objIds)
{
return baseProcessStationMapper.deleteBaseProcessStationByObjIds(objIds);
}
/**
* /
*
* @param objId /
* @return
*/
@Override
public int deleteBaseProcessStationByObjId(Long objId)
{
return baseProcessStationMapper.deleteBaseProcessStationByObjId(objId);
}
}

@ -0,0 +1,156 @@
<?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.BaseProcessStationMapper">
<resultMap type="BaseProcessStation" id="BaseProcessStationResult">
<result property="objId" column="obj_id"/>
<result property="processCode" column="process_code"/>
<result property="processName" column="process_name"/>
<result property="processType" column="process_type"/>
<result property="productLineCode" column="product_line_code"/>
<result property="productionTime" column="production_time"/>
<result property="capacityDay" column="capacity_day"/>
<result property="capacityMonth" column="capacity_month"/>
<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"/>
<result property="parentId" column="parent_id"/>
<result property="stationName" column="stationName"/>
</resultMap>
<sql id="selectBaseProcessStationVo">
select bps.obj_id,
bps.process_code,
bps.process_name,
bps.process_type,
bps.product_line_code,
bps.production_time,
bps.capacity_day,
bps.capacity_month,
bps.is_flag,
bps.created_by,
bps.created_time,
bps.updated_by,
bps.updated_time,
bps.parent_id,
st.station_name stationName
from base_process_station bps
LEFT JOIN (
SELECT ST.PROCESS_CODE,
LISTAGG(ST.STATION_CODE, ',') WITHIN GROUP (ORDER BY ST.PROCESS_CODE) AS station_code,
LISTAGG(PL.PRODUCT_LINE_NAME, ',') WITHIN GROUP (ORDER BY ST.PROCESS_CODE) AS station_name
FROM (SELECT PROCESS_CODE,
TRIM(REGEXP_SUBSTR(PARENT_ID, '[^,]+', 1, LEVEL)) AS station_code
FROM BASE_PROCESS_STATION
CONNECT BY PRIOR PROCESS_CODE = PROCESS_CODE
AND PRIOR DBMS_RANDOM.VALUE IS NOT NULL
AND LENGTH(REGEXP_REPLACE(PARENT_ID, '[^,]+')) + 1 >= LEVEL
ORDER BY PROCESS_CODE, LEVEL) ST
LEFT JOIN BASE_PRODUCTLINE PL ON pl.PRODUCT_LINE_CODE = st.station_code
GROUP BY ST.PROCESS_CODE
) st ON st.PROCESS_CODE = bps.PROCESS_CODE
</sql>
<select id="selectBaseProcessStationList" parameterType="BaseProcessStation" resultMap="BaseProcessStationResult">
<include refid="selectBaseProcessStationVo"/>
<where>
<if test="processCode != null and processCode != ''">and bps.process_code = #{processCode}</if>
<if test="processName != null and processName != ''">and bps.process_name like concat(concat('%',
#{processName}), '%')
</if>
<if test="processType != null ">and bps.process_type = #{processType}</if>
<if test="productLineCode != null and productLineCode != ''">and bps.product_line_code = #{productLineCode}
</if>
<if test="productionTime != null ">and bps.production_time = #{productionTime}</if>
<if test="capacityDay != null ">and capacity_day = #{capacityDay}</if>
<if test="capacityMonth != null ">and capacity_month = #{capacityMonth}</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>
<if test="parentId != null and parentId != ''">and bps.parent_id = #{parentId}</if>
</where>
</select>
<select id="selectBaseProcessStationByObjId" parameterType="Long" resultMap="BaseProcessStationResult">
<include refid="selectBaseProcessStationVo"/>
where bps.obj_id = #{objId}
</select>
<insert id="insertBaseProcessStation" parameterType="BaseProcessStation">
<selectKey keyProperty="objId" resultType="long" order="BEFORE">
SELECT seq_base_process_station.NEXTVAL as objId FROM DUAL
</selectKey>
insert into base_process_station
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="objId != null">obj_id,</if>
<if test="processCode != null">process_code,</if>
<if test="processName != null">process_name,</if>
<if test="processType != null">process_type,</if>
<if test="productLineCode != null">product_line_code,</if>
<if test="productionTime != null">production_time,</if>
<if test="capacityDay != null">capacity_day,</if>
<if test="capacityMonth != null">capacity_month,</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>
<if test="parentId != null">parent_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="objId != null">#{objId},</if>
<if test="processCode != null">#{processCode},</if>
<if test="processName != null">#{processName},</if>
<if test="processType != null">#{processType},</if>
<if test="productLineCode != null">#{productLineCode},</if>
<if test="productionTime != null">#{productionTime},</if>
<if test="capacityDay != null">#{capacityDay},</if>
<if test="capacityMonth != null">#{capacityMonth},</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>
<if test="parentId != null">#{parentId},</if>
</trim>
</insert>
<update id="updateBaseProcessStation" parameterType="BaseProcessStation">
update base_process_station
<trim prefix="SET" suffixOverrides=",">
<if test="processCode != null">process_code = #{processCode},</if>
<if test="processName != null">process_name = #{processName},</if>
<if test="processType != null">process_type = #{processType},</if>
<if test="productLineCode != null">product_line_code = #{productLineCode},</if>
<if test="productionTime != null">production_time = #{productionTime},</if>
<if test="capacityDay != null">capacity_day = #{capacityDay},</if>
<if test="capacityMonth != null">capacity_month = #{capacityMonth},</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>
<if test="parentId != null">parent_id = #{parentId},</if>
</trim>
where obj_id = #{objId}
</update>
<delete id="deleteBaseProcessStationByObjId" parameterType="Long">
delete
from base_process_station
where obj_id = #{objId}
</delete>
<delete id="deleteBaseProcessStationByObjIds" parameterType="String">
delete from base_process_station where obj_id in
<foreach item="objId" collection="array" open="(" separator="," close=")">
#{objId}
</foreach>
</delete>
</mapper>

@ -11,7 +11,7 @@
<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="stationCode" column="station_code"/>
<result property="remark" column="remark"/>
<result property="isFlag" column="is_flag"/>
<result property="createdBy" column="created_by"/>
@ -27,7 +27,7 @@
parent_id,
material_categories,
material_subclass,
plant_code,
station_code,
remark,
is_flag,
created_by,
@ -54,7 +54,7 @@
<if test="materialSubclass != null and materialSubclass != ''">and material_subclass =
#{materialSubclass}
</if>
<if test="plantCode != null and plantCode != ''">and plant_code = #{plantCode}</if>
<if test="stationCode != null and stationCode != ''">and station_code = #{stationCode}</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>
@ -87,7 +87,7 @@
<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="stationCode != null">station_code,</if>
<if test="remark != null">remark,</if>
<if test="isFlag != null">is_flag,</if>
<if test="createdBy != null">created_by,</if>
@ -102,7 +102,7 @@
<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="stationCode != null">#{stationCode},</if>
<if test="remark != null">#{remark},</if>
<if test="isFlag != null">#{isFlag},</if>
<if test="createdBy != null">#{createdBy},</if>
@ -120,7 +120,7 @@
<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="stationCode != null">station_code = #{stationCode},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="isFlag != null">is_flag = #{isFlag},</if>
<if test="createdBy != null">created_by = #{createdBy},</if>

@ -22,16 +22,16 @@ public class ProductPlanInfo extends BaseEntity {
*/
private Long objId;
/**
*
*/
@Excel(name = "计划编号")
private String planCode;
/**
*
*/
@Excel(name = "工单编号")
private String planCode;
/**
* SAP
*/
@Excel(name = "SAP计划编号")
private String orderCode;
/**

Loading…
Cancel
Save