From 7064a199579d58d3902714089cf6033faa3daa92 Mon Sep 17 00:00:00 2001 From: yinq <1345442242@qq.com> Date: Tue, 14 Nov 2023 15:06:28 +0800 Subject: [PATCH] =?UTF-8?q?add=20-=20=E5=B7=A5=E5=BA=8F=E7=BB=B4=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BaseProcessStationController.java | 103 ++++++ .../aucma/base/domain/BaseProcessStation.java | 250 +++++++++++++++ .../aucma/base/domain/BaseProductLine.java | 4 +- .../domain/BaseQualityInspectionItem.java | 301 +++++++++--------- .../base/mapper/BaseProcessStationMapper.java | 61 ++++ .../service/IBaseProcessStationService.java | 61 ++++ .../impl/BaseProcessStationServiceImpl.java | 93 ++++++ .../mapper/base/BaseProcessStationMapper.xml | 156 +++++++++ .../base/BaseQualityInspectionItemMapper.xml | 12 +- .../production/domain/ProductPlanInfo.java | 12 +- 10 files changed, 893 insertions(+), 160 deletions(-) create mode 100644 aucma-base/src/main/java/com/aucma/base/controller/BaseProcessStationController.java create mode 100644 aucma-base/src/main/java/com/aucma/base/domain/BaseProcessStation.java create mode 100644 aucma-base/src/main/java/com/aucma/base/mapper/BaseProcessStationMapper.java create mode 100644 aucma-base/src/main/java/com/aucma/base/service/IBaseProcessStationService.java create mode 100644 aucma-base/src/main/java/com/aucma/base/service/impl/BaseProcessStationServiceImpl.java create mode 100644 aucma-base/src/main/resources/mapper/base/BaseProcessStationMapper.xml diff --git a/aucma-base/src/main/java/com/aucma/base/controller/BaseProcessStationController.java b/aucma-base/src/main/java/com/aucma/base/controller/BaseProcessStationController.java new file mode 100644 index 0000000..5abf612 --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/controller/BaseProcessStationController.java @@ -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 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 list = baseProcessStationService.selectBaseProcessStationList(baseProcessStation); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/aucma-base/src/main/java/com/aucma/base/domain/BaseProcessStation.java b/aucma-base/src/main/java/com/aucma/base/domain/BaseProcessStation.java new file mode 100644 index 0000000..0affd2b --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/domain/BaseProcessStation.java @@ -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(); + } +} diff --git a/aucma-base/src/main/java/com/aucma/base/domain/BaseProductLine.java b/aucma-base/src/main/java/com/aucma/base/domain/BaseProductLine.java index 2b3d249..e5f0dc0 100644 --- a/aucma-base/src/main/java/com/aucma/base/domain/BaseProductLine.java +++ b/aucma-base/src/main/java/com/aucma/base/domain/BaseProductLine.java @@ -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; /** diff --git a/aucma-base/src/main/java/com/aucma/base/domain/BaseQualityInspectionItem.java b/aucma-base/src/main/java/com/aucma/base/domain/BaseQualityInspectionItem.java index db41cde..5df4917 100644 --- a/aucma-base/src/main/java/com/aucma/base/domain/BaseQualityInspectionItem.java +++ b/aucma-base/src/main/java/com/aucma/base/domain/BaseQualityInspectionItem.java @@ -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 + + '}'; + } +} diff --git a/aucma-base/src/main/java/com/aucma/base/mapper/BaseProcessStationMapper.java b/aucma-base/src/main/java/com/aucma/base/mapper/BaseProcessStationMapper.java new file mode 100644 index 0000000..558e1f9 --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/mapper/BaseProcessStationMapper.java @@ -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 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); +} diff --git a/aucma-base/src/main/java/com/aucma/base/service/IBaseProcessStationService.java b/aucma-base/src/main/java/com/aucma/base/service/IBaseProcessStationService.java new file mode 100644 index 0000000..343cc9b --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/service/IBaseProcessStationService.java @@ -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 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); +} diff --git a/aucma-base/src/main/java/com/aucma/base/service/impl/BaseProcessStationServiceImpl.java b/aucma-base/src/main/java/com/aucma/base/service/impl/BaseProcessStationServiceImpl.java new file mode 100644 index 0000000..b92ed96 --- /dev/null +++ b/aucma-base/src/main/java/com/aucma/base/service/impl/BaseProcessStationServiceImpl.java @@ -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 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); + } +} diff --git a/aucma-base/src/main/resources/mapper/base/BaseProcessStationMapper.xml b/aucma-base/src/main/resources/mapper/base/BaseProcessStationMapper.xml new file mode 100644 index 0000000..148a83e --- /dev/null +++ b/aucma-base/src/main/resources/mapper/base/BaseProcessStationMapper.xml @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + + SELECT seq_base_process_station.NEXTVAL as objId FROM DUAL + + insert into base_process_station + + obj_id, + process_code, + process_name, + process_type, + product_line_code, + production_time, + capacity_day, + capacity_month, + is_flag, + created_by, + created_time, + updated_by, + updated_time, + parent_id, + + + #{objId}, + #{processCode}, + #{processName}, + #{processType}, + #{productLineCode}, + #{productionTime}, + #{capacityDay}, + #{capacityMonth}, + #{isFlag}, + #{createdBy}, + #{createdTime}, + #{updatedBy}, + #{updatedTime}, + #{parentId}, + + + + + update base_process_station + + process_code = #{processCode}, + process_name = #{processName}, + process_type = #{processType}, + product_line_code = #{productLineCode}, + production_time = #{productionTime}, + capacity_day = #{capacityDay}, + capacity_month = #{capacityMonth}, + is_flag = #{isFlag}, + created_by = #{createdBy}, + created_time = #{createdTime}, + updated_by = #{updatedBy}, + updated_time = #{updatedTime}, + parent_id = #{parentId}, + + where obj_id = #{objId} + + + + delete + from base_process_station + where obj_id = #{objId} + + + + delete from base_process_station where obj_id in + + #{objId} + + + \ No newline at end of file diff --git a/aucma-base/src/main/resources/mapper/base/BaseQualityInspectionItemMapper.xml b/aucma-base/src/main/resources/mapper/base/BaseQualityInspectionItemMapper.xml index f01bb0e..3168fc3 100644 --- a/aucma-base/src/main/resources/mapper/base/BaseQualityInspectionItemMapper.xml +++ b/aucma-base/src/main/resources/mapper/base/BaseQualityInspectionItemMapper.xml @@ -11,7 +11,7 @@ - + @@ -27,7 +27,7 @@ parent_id, material_categories, material_subclass, - plant_code, + station_code, remark, is_flag, created_by, @@ -54,7 +54,7 @@ and material_subclass = #{materialSubclass} - and plant_code = #{plantCode} + and station_code = #{stationCode} and is_flag = #{isFlag} and created_by = #{createdBy} and created_time = #{createdTime} @@ -87,7 +87,7 @@ parent_id, material_categories, material_subclass, - plant_code, + station_code, remark, is_flag, created_by, @@ -102,7 +102,7 @@ #{parentId}, #{materialCategories}, #{materialSubclass}, - #{plantCode}, + #{stationCode}, #{remark}, #{isFlag}, #{createdBy}, @@ -120,7 +120,7 @@ parent_id = #{parentId}, material_categories = #{materialCategories}, material_subclass = #{materialSubclass}, - plant_code = #{plantCode}, + station_code = #{stationCode}, remark = #{remark}, is_flag = #{isFlag}, created_by = #{createdBy}, diff --git a/aucma-production/src/main/java/com/aucma/production/domain/ProductPlanInfo.java b/aucma-production/src/main/java/com/aucma/production/domain/ProductPlanInfo.java index 2444a5a..11ba0aa 100644 --- a/aucma-production/src/main/java/com/aucma/production/domain/ProductPlanInfo.java +++ b/aucma-production/src/main/java/com/aucma/production/domain/ProductPlanInfo.java @@ -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; /**