From cccddee36893d5ef15017f36676356fbe85cc3b7 Mon Sep 17 00:00:00 2001 From: A0010407 Date: Fri, 4 Aug 2023 16:26:16 +0800 Subject: [PATCH] =?UTF-8?q?MES=20=E5=A4=87=E6=96=99=E5=8D=95=20=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E5=89=8D=E5=87=86=E5=A4=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mes/controller/MesPrepareController.java | 100 ++++++ .../MesPrepareValidateController.java | 100 ++++++ .../java/com/op/mes/domain/MesPrepare.java | 340 ++++++++++++++++++ .../com/op/mes/domain/MesPrepareValidate.java | 210 +++++++++++ .../com/op/mes/mapper/MesPrepareMapper.java | 61 ++++ .../mes/mapper/MesPrepareValidateMapper.java | 61 ++++ .../op/mes/service/IMesPrepareService.java | 60 ++++ .../service/IMesPrepareValidateService.java | 60 ++++ .../service/impl/MesPrepareServiceImpl.java | 97 +++++ .../impl/MesPrepareValidateServiceImpl.java | 96 +++++ .../resources/mapper/MesPrepareMapper.xml | 217 +++++++++++ .../mapper/MesPrepareValidateMapper.xml | 144 ++++++++ 12 files changed, 1546 insertions(+) create mode 100644 op-modules/op-mes/src/main/java/com/op/mes/controller/MesPrepareController.java create mode 100644 op-modules/op-mes/src/main/java/com/op/mes/controller/MesPrepareValidateController.java create mode 100644 op-modules/op-mes/src/main/java/com/op/mes/domain/MesPrepare.java create mode 100644 op-modules/op-mes/src/main/java/com/op/mes/domain/MesPrepareValidate.java create mode 100644 op-modules/op-mes/src/main/java/com/op/mes/mapper/MesPrepareMapper.java create mode 100644 op-modules/op-mes/src/main/java/com/op/mes/mapper/MesPrepareValidateMapper.java create mode 100644 op-modules/op-mes/src/main/java/com/op/mes/service/IMesPrepareService.java create mode 100644 op-modules/op-mes/src/main/java/com/op/mes/service/IMesPrepareValidateService.java create mode 100644 op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesPrepareServiceImpl.java create mode 100644 op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesPrepareValidateServiceImpl.java create mode 100644 op-modules/op-mes/src/main/resources/mapper/MesPrepareMapper.xml create mode 100644 op-modules/op-mes/src/main/resources/mapper/MesPrepareValidateMapper.xml diff --git a/op-modules/op-mes/src/main/java/com/op/mes/controller/MesPrepareController.java b/op-modules/op-mes/src/main/java/com/op/mes/controller/MesPrepareController.java new file mode 100644 index 000000000..1f93d0918 --- /dev/null +++ b/op-modules/op-mes/src/main/java/com/op/mes/controller/MesPrepareController.java @@ -0,0 +1,100 @@ +package com.op.mes.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import com.op.common.core.utils.uuid.IdUtils; +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.op.common.log.annotation.Log; +import com.op.common.log.enums.BusinessType; +import com.op.common.security.annotation.RequiresPermissions; +import com.op.mes.domain.MesPrepare; +import com.op.mes.service.IMesPrepareService; +import com.op.common.core.web.controller.BaseController; +import com.op.common.core.web.domain.AjaxResult; +import com.op.common.core.utils.poi.ExcelUtil; +import com.op.common.core.web.page.TableDataInfo; + +/** + * 备料单Controller + * + * @author Open Platform + * @date 2023-08-03 + */ +@RestController +@RequestMapping("/prepare") +public class MesPrepareController extends BaseController { + @Autowired + private IMesPrepareService mesPrepareService; + + /** + * 查询备料单列表 + */ + @RequiresPermissions("mes:prepare:list") + @GetMapping("/list") + public TableDataInfo list(MesPrepare mesPrepare) { + startPage(); + List list = mesPrepareService.selectMesPrepareList(mesPrepare); + return getDataTable(list); + } + + /** + * 导出备料单列表 + */ + @RequiresPermissions("mes:prepare:export") + @Log(title = "备料单", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, MesPrepare mesPrepare) { + List list = mesPrepareService.selectMesPrepareList(mesPrepare); + ExcelUtil util = new ExcelUtil(MesPrepare.class); + util.exportExcel(response, list, "备料单数据"); + } + + /** + * 获取备料单详细信息 + */ + @RequiresPermissions("mes:prepare:query") + @GetMapping(value = "/{prepareId}") + public AjaxResult getInfo(@PathVariable("prepareId") String prepareId) { + return success(mesPrepareService.selectMesPrepareByPrepareId(prepareId)); + } + + /** + * 新增备料单 + */ + @RequiresPermissions("mes:prepare:add") + @Log(title = "备料单", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody MesPrepare mesPrepare) { + mesPrepare.setPrepareId(IdUtils.fastSimpleUUID()); + return toAjax(mesPrepareService.insertMesPrepare(mesPrepare)); + } + + /** + * 修改备料单 + */ + @RequiresPermissions("mes:prepare:edit") + @Log(title = "备料单", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody MesPrepare mesPrepare) { + return toAjax(mesPrepareService.updateMesPrepare(mesPrepare)); + } + + /** + * 删除备料单 + */ + @RequiresPermissions("mes:prepare:remove") + @Log(title = "备料单", businessType = BusinessType.DELETE) + @DeleteMapping("/{prepareIds}") + public AjaxResult remove(@PathVariable String[] prepareIds) { + return toAjax(mesPrepareService.deleteMesPrepareByPrepareIds(prepareIds)); + } +} diff --git a/op-modules/op-mes/src/main/java/com/op/mes/controller/MesPrepareValidateController.java b/op-modules/op-mes/src/main/java/com/op/mes/controller/MesPrepareValidateController.java new file mode 100644 index 000000000..de9935d28 --- /dev/null +++ b/op-modules/op-mes/src/main/java/com/op/mes/controller/MesPrepareValidateController.java @@ -0,0 +1,100 @@ +package com.op.mes.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import com.op.common.core.utils.uuid.IdUtils; +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.op.common.log.annotation.Log; +import com.op.common.log.enums.BusinessType; +import com.op.common.security.annotation.RequiresPermissions; +import com.op.mes.domain.MesPrepareValidate; +import com.op.mes.service.IMesPrepareValidateService; +import com.op.common.core.web.controller.BaseController; +import com.op.common.core.web.domain.AjaxResult; +import com.op.common.core.utils.poi.ExcelUtil; +import com.op.common.core.web.page.TableDataInfo; + +/** + * 生产前准备记录报表Controller + * + * @author Open Platform + * @date 2023-08-04 + */ +@RestController +@RequestMapping("/validate") +public class MesPrepareValidateController extends BaseController { + @Autowired + private IMesPrepareValidateService mesPrepareValidateService; + + /** + * 查询生产前准备记录报表列表 + */ + @RequiresPermissions("mes:validate:list") + @GetMapping("/list") + public TableDataInfo list(MesPrepareValidate mesPrepareValidate) { + startPage(); + List list = mesPrepareValidateService.selectMesPrepareValidateList(mesPrepareValidate); + return getDataTable(list); + } + + /** + * 导出生产前准备记录报表列表 + */ + @RequiresPermissions("mes:validate:export") + @Log(title = "生产前准备记录报表", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, MesPrepareValidate mesPrepareValidate) { + List list = mesPrepareValidateService.selectMesPrepareValidateList(mesPrepareValidate); + ExcelUtil util = new ExcelUtil(MesPrepareValidate.class); + util.exportExcel(response, list, "生产前准备记录报表数据"); + } + + /** + * 获取生产前准备记录报表详细信息 + */ + @RequiresPermissions("mes:validate:query") + @GetMapping(value = "/{validateId}") + public AjaxResult getInfo(@PathVariable("validateId") String validateId) { + return success(mesPrepareValidateService.selectMesPrepareValidateByValidateId(validateId)); + } + + /** + * 新增生产前准备记录报表 + */ + @RequiresPermissions("mes:validate:add") + @Log(title = "生产前准备记录报表", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody MesPrepareValidate mesPrepareValidate) { + mesPrepareValidate.setValidateId(IdUtils.fastSimpleUUID()); + return toAjax(mesPrepareValidateService.insertMesPrepareValidate(mesPrepareValidate)); + } + + /** + * 修改生产前准备记录报表 + */ + @RequiresPermissions("mes:validate:edit") + @Log(title = "生产前准备记录报表", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody MesPrepareValidate mesPrepareValidate) { + return toAjax(mesPrepareValidateService.updateMesPrepareValidate(mesPrepareValidate)); + } + + /** + * 删除生产前准备记录报表 + */ + @RequiresPermissions("mes:validate:remove") + @Log(title = "生产前准备记录报表", businessType = BusinessType.DELETE) + @DeleteMapping("/{validateIds}") + public AjaxResult remove(@PathVariable String[] validateIds) { + return toAjax(mesPrepareValidateService.deleteMesPrepareValidateByValidateIds(validateIds)); + } +} diff --git a/op-modules/op-mes/src/main/java/com/op/mes/domain/MesPrepare.java b/op-modules/op-mes/src/main/java/com/op/mes/domain/MesPrepare.java new file mode 100644 index 000000000..742d746b5 --- /dev/null +++ b/op-modules/op-mes/src/main/java/com/op/mes/domain/MesPrepare.java @@ -0,0 +1,340 @@ +package com.op.mes.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.op.common.core.annotation.Excel; +import com.op.common.core.web.domain.BaseEntity; + +/** + * 备料单对象 mes_prepare + * + * @author Open Platform + * @date 2023-08-03 + */ +public class MesPrepare extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** 备料单id */ + private String prepareId; + + /** 工单编码 */ + @Excel(name = "工单编码") + private String workorderCode; + + /** 工单名称 */ + @Excel(name = "工单名称") + private String workorderName; + + /** 父工单 */ + @Excel(name = "父工单") + private String parentOrder; + + /** 订单id */ + @Excel(name = "订单id") + private String orderId; + + /** 订单编码 */ + @Excel(name = "订单编码") + private String orderCode; + + /** 产品id */ + @Excel(name = "产品id") + private String productId; + + /** 产品编号 */ + @Excel(name = "产品编号") + private String productCode; + + /** 产品类型 */ + @Excel(name = "产品类型") + private String prodType; + + /** 产品名称 */ + @Excel(name = "产品名称") + private String productName; + + /** 规格型号 */ + @Excel(name = "规格型号") + private String productSpc; + + /** 配料计划明细id */ + @Excel(name = "配料计划明细id") + private String wetDetailPlanId; + + /** 工单生产日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "工单生产日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date productDate; + + /** 班次 */ + @Excel(name = "班次") + private String shiftId; + + /** 所有父节点id */ + @Excel(name = "所有父节点id") + private String ancestors; + + /** 单据状态 */ + @Excel(name = "单据状态") + private String status; + + /** 物料编码 */ + @Excel(name = "物料编码") + private String materialCode; + + /** 物料名称 */ + @Excel(name = "物料名称") + private String materialName; + + /** 物料规格型号 */ + @Excel(name = "物料规格型号") + private String materialSpc; + + /** 单位 */ + @Excel(name = "单位") + private String unit; + + /** 生产数量 */ + @Excel(name = "生产数量") + private String quantity; + + /** 预留字段1 */ + @Excel(name = "预留字段1") + private String attr1; + + /** 预留字段2 */ + @Excel(name = "预留字段2") + private String attr2; + + /** 预留字段3 */ + @Excel(name = "预留字段3") + private String attr3; + + /** 预留字段4 */ + @Excel(name = "预留字段4") + private String attr4; + + /** 工厂编码 */ + @Excel(name = "工厂编码") + private String factoryCode; + public String getMaterialCode() { + return materialCode; + } + public void setMaterialCode(String materialCode) { + this.materialCode = materialCode; + } + + public void setMaterialName(String materialName) { + this.materialName = materialName; + } + public String getMaterialName() { + return materialName; + } + + public void setMaterialSpc(String materialSpc) { + this.materialSpc = materialSpc; + } + public String getMaterialSpc() { + return materialSpc; + } + + public void setUnit(String unit) { + this.unit = unit; + } + public String getUnit() { + return unit; + } + + public void setQuantity(String quantity) { + this.quantity = quantity; + } + public String getQuantity() { + return quantity; + } + + public void setPrepareId(String prepareId) { + this.prepareId = prepareId; + } + public String getPrepareId() { + return prepareId; + } + public void setWorkorderCode(String workorderCode) { + this.workorderCode = workorderCode; + } + + public String getWorkorderCode() { + return workorderCode; + } + public void setWorkorderName(String workorderName) { + this.workorderName = workorderName; + } + + public String getWorkorderName() { + return workorderName; + } + public void setParentOrder(String parentOrder) { + this.parentOrder = parentOrder; + } + + public String getParentOrder() { + return parentOrder; + } + public void setOrderId(String orderId) { + this.orderId = orderId; + } + + public String getOrderId() { + return orderId; + } + public void setOrderCode(String orderCode) { + this.orderCode = orderCode; + } + + public String getOrderCode() { + return orderCode; + } + public void setProductId(String productId) { + this.productId = productId; + } + + public String getProductId() { + return productId; + } + public void setProductCode(String productCode) { + this.productCode = productCode; + } + + public String getProductCode() { + return productCode; + } + public void setProdType(String prodType) { + this.prodType = prodType; + } + + public String getProdType() { + return prodType; + } + public void setProductName(String productName) { + this.productName = productName; + } + + public String getProductName() { + return productName; + } + public void setProductSpc(String productSpc) { + this.productSpc = productSpc; + } + + public String getProductSpc() { + return productSpc; + } + public void setWetDetailPlanId(String wetDetailPlanId) { + this.wetDetailPlanId = wetDetailPlanId; + } + + public String getWetDetailPlanId() { + return wetDetailPlanId; + } + public void setProductDate(Date productDate) { + this.productDate = productDate; + } + + public Date getProductDate() { + return productDate; + } + public void setShiftId(String shiftId) { + this.shiftId = shiftId; + } + + public String getShiftId() { + return shiftId; + } + public void setAncestors(String ancestors) { + this.ancestors = ancestors; + } + + public String getAncestors() { + return ancestors; + } + public void setStatus(String status) { + this.status = status; + } + + public String getStatus() { + return status; + } + 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(String attr3) { + this.attr3 = attr3; + } + + public String getAttr3() { + return attr3; + } + public void setAttr4(String attr4) { + this.attr4 = attr4; + } + + public String getAttr4() { + return attr4; + } + public void setFactoryCode(String factoryCode) { + this.factoryCode = factoryCode; + } + + public String getFactoryCode() { + return factoryCode; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("prepareId", getPrepareId()) + .append("workorderCode", getWorkorderCode()) + .append("workorderName", getWorkorderName()) + .append("parentOrder", getParentOrder()) + .append("orderId", getOrderId()) + .append("orderCode", getOrderCode()) + .append("productId", getProductId()) + .append("productCode", getProductCode()) + .append("prodType", getProdType()) + .append("productName", getProductName()) + .append("productSpc", getProductSpc()) + .append("wetDetailPlanId", getWetDetailPlanId()) + .append("productDate", getProductDate()) + .append("shiftId", getShiftId()) + .append("ancestors", getAncestors()) + .append("status", getStatus()) + .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()) + .append("factoryCode", getFactoryCode()) + .append("materialCode", getMaterialCode()) + .append("materialName", getMaterialName()) + .append("materialSpc", getMaterialSpc()) + .append("quantity", getQuantity()) + .append("unit", getUnit()) + .toString(); + } +} diff --git a/op-modules/op-mes/src/main/java/com/op/mes/domain/MesPrepareValidate.java b/op-modules/op-mes/src/main/java/com/op/mes/domain/MesPrepareValidate.java new file mode 100644 index 000000000..95e9f4f1f --- /dev/null +++ b/op-modules/op-mes/src/main/java/com/op/mes/domain/MesPrepareValidate.java @@ -0,0 +1,210 @@ +package com.op.mes.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.op.common.core.annotation.Excel; +import com.op.common.core.web.domain.BaseEntity; + +import java.util.Date; + +/** + * 生产前准备记录报表对象 mes_prepare_validate + * + * @author Open Platform + * @date 2023-08-04 + */ +public class MesPrepareValidate extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** 生产前准备id */ + private String validateId; + + /** 工单编码 */ + @Excel(name = "工单编码") + private String workorderCode; + + /** 工单名称 */ + @Excel(name = "工单名称") + private String workorderName; + + /** 产品规格型号 */ + @Excel(name = "产品规格型号") + private String productSpc; + + /** 产品名称 */ + @Excel(name = "产品名称") + private String productName; + + /** 单据状态 */ + @Excel(name = "单据状态") + private String status; + + /** 预留字段1 */ + @Excel(name = "预留字段1") + private String attr1; + + /** 预留字段2 */ + @Excel(name = "预留字段2") + private String attr2; + + /** 预留字段3 */ + @Excel(name = "预留字段3") + private String attr3; + + /** 预留字段4 */ + @Excel(name = "预留字段4") + private String attr4; + + /** 工厂编码 */ + @Excel(name = "工厂编码") + private String factoryCode; + + /** 完成时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date endTime; + + /** 准备类型 */ + @Excel(name = "准备类型") + private String validateType; + + /** 准备内容 */ + @Excel(name = "准备内容") + private String validateName; + + /** 准备状态 */ + @Excel(name = "准备状态") + private String validateStatus; + + public void setEndTime(Date endTime) { + this.endTime = endTime; + } + public Date getEndTime() { + return endTime; + } + + public void setValidateId(String validateId) { + this.validateId = validateId; + } + public String getValidateId() { + return validateId; + } + + public void setValidateType(String validateType) { + this.validateType = validateType; + } + public String getValidateType() { + return validateType; + } + + public void setValidateName(String validateName) { + this.validateName = validateName; + } + public String getValidateName() { + return validateName; + } + + public void setStatus(String status) { + this.status = status; + } + public String getStatus() { + return status; + } + + public void setWorkorderCode(String workorderCode) { + this.workorderCode = workorderCode; + } + public String getWorkorderCode() { + return workorderCode; + } + + public void setWorkorderName(String workorderName) { + this.workorderName = workorderName; + } + public String getWorkorderName() { + return workorderName; + } + + public void setProductSpc(String productSpc) { + this.productSpc = productSpc; + } + public String getProductSpc() { + return productSpc; + } + + public void setProductName(String productName) { + this.productName = productName; + } + public String getProductName() { + return productName; + } + + public void setValidateStatus(String ValidateStatus) { + this.validateStatus = ValidateStatus; + } + public String getValidateStatus() { + return validateStatus; + } + + 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(String attr3) { + this.attr3 = attr3; + } + public String getAttr3() { + return attr3; + } + + public void setAttr4(String attr4) { + this.attr4 = attr4; + } + public String getAttr4() { + return attr4; + } + + public void setFactoryCode(String factoryCode) { + this.factoryCode = factoryCode; + } + public String getFactoryCode() { + return factoryCode; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("validateId", getValidateId()) + .append("workorderCode", getWorkorderCode()) + .append("workorderName", getWorkorderName()) + .append("productSpc", getProductSpc()) + .append("productName", getProductName()) + .append("status", getStatus()) + .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()) + .append("factoryCode", getFactoryCode()) + .append("validateType", getValidateType()) + .append("validateName", getValidateName()) + .append("validatStatus", getStatus()) + .append("endTime", getEndTime()) + .toString(); + } +} diff --git a/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesPrepareMapper.java b/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesPrepareMapper.java new file mode 100644 index 000000000..4e10490bc --- /dev/null +++ b/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesPrepareMapper.java @@ -0,0 +1,61 @@ +package com.op.mes.mapper; + +import java.util.List; + +import com.op.mes.domain.MesPrepare; + +/** + * 备料单Mapper接口 + * + * @author Open Platform + * @date 2023-08-03 + */ +public interface MesPrepareMapper { + /** + * 查询备料单 + * + * @param prepareId 备料单主键 + * @return 备料单 + */ + public MesPrepare selectMesPrepareByPrepareId(String prepareId); + + /** + * 查询备料单列表 + * + * @param mesPrepare 备料单 + * @return 备料单集合 + */ + public List selectMesPrepareList(MesPrepare mesPrepare); + + /** + * 新增备料单 + * + * @param mesPrepare 备料单 + * @return 结果 + */ + public int insertMesPrepare(MesPrepare mesPrepare); + + /** + * 修改备料单 + * + * @param mesPrepare 备料单 + * @return 结果 + */ + public int updateMesPrepare(MesPrepare mesPrepare); + + /** + * 删除备料单 + * + * @param prepareId 备料单主键 + * @return 结果 + */ + public int deleteMesPrepareByPrepareId(String prepareId); + + /** + * 批量删除备料单 + * + * @param prepareIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteMesPrepareByPrepareIds(String[] prepareIds); +} diff --git a/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesPrepareValidateMapper.java b/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesPrepareValidateMapper.java new file mode 100644 index 000000000..357a8b983 --- /dev/null +++ b/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesPrepareValidateMapper.java @@ -0,0 +1,61 @@ +package com.op.mes.mapper; + +import java.util.List; + +import com.op.mes.domain.MesPrepareValidate; + +/** + * 生产前准备记录报表Mapper接口 + * + * @author Open Platform + * @date 2023-08-04 + */ +public interface MesPrepareValidateMapper { + /** + * 查询生产前准备记录报表 + * + * @param validateId 生产前准备记录报表主键 + * @return 生产前准备记录报表 + */ + public MesPrepareValidate selectMesPrepareValidateByValidateId(String validateId); + + /** + * 查询生产前准备记录报表列表 + * + * @param mesPrepareValidate 生产前准备记录报表 + * @return 生产前准备记录报表集合 + */ + public List selectMesPrepareValidateList(MesPrepareValidate mesPrepareValidate); + + /** + * 新增生产前准备记录报表 + * + * @param mesPrepareValidate 生产前准备记录报表 + * @return 结果 + */ + public int insertMesPrepareValidate(MesPrepareValidate mesPrepareValidate); + + /** + * 修改生产前准备记录报表 + * + * @param mesPrepareValidate 生产前准备记录报表 + * @return 结果 + */ + public int updateMesPrepareValidate(MesPrepareValidate mesPrepareValidate); + + /** + * 删除生产前准备记录报表 + * + * @param validateId 生产前准备记录报表主键 + * @return 结果 + */ + public int deleteMesPrepareValidateByValidateId(String validateId); + + /** + * 批量删除生产前准备记录报表 + * + * @param validateIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteMesPrepareValidateByValidateIds(String[] validateIds); +} diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/IMesPrepareService.java b/op-modules/op-mes/src/main/java/com/op/mes/service/IMesPrepareService.java new file mode 100644 index 000000000..5e138fd88 --- /dev/null +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/IMesPrepareService.java @@ -0,0 +1,60 @@ +package com.op.mes.service; + +import java.util.List; +import com.op.mes.domain.MesPrepare; + +/** + * 备料单Service接口 + * + * @author Open Platform + * @date 2023-08-03 + */ +public interface IMesPrepareService { + /** + * 查询备料单 + * + * @param prepareId 备料单主键 + * @return 备料单 + */ + public MesPrepare selectMesPrepareByPrepareId(String prepareId); + + /** + * 查询备料单列表 + * + * @param mesPrepare 备料单 + * @return 备料单集合 + */ + public List selectMesPrepareList(MesPrepare mesPrepare); + + /** + * 新增备料单 + * + * @param mesPrepare 备料单 + * @return 结果 + */ + public int insertMesPrepare(MesPrepare mesPrepare); + + /** + * 修改备料单 + * + * @param mesPrepare 备料单 + * @return 结果 + */ + public int updateMesPrepare(MesPrepare mesPrepare); + + /** + * 批量删除备料单 + * + * @param prepareIds 需要删除的备料单主键集合 + * @return 结果 + */ + public int deleteMesPrepareByPrepareIds(String[] prepareIds); + + /** + * 删除备料单信息 + * + * @param prepareId 备料单主键 + * @return 结果 + */ + public int deleteMesPrepareByPrepareId(String prepareId); +} diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/IMesPrepareValidateService.java b/op-modules/op-mes/src/main/java/com/op/mes/service/IMesPrepareValidateService.java new file mode 100644 index 000000000..56c0fd568 --- /dev/null +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/IMesPrepareValidateService.java @@ -0,0 +1,60 @@ +package com.op.mes.service; + +import java.util.List; +import com.op.mes.domain.MesPrepareValidate; + +/** + * 生产前准备记录报表Service接口 + * + * @author Open Platform + * @date 2023-08-04 + */ +public interface IMesPrepareValidateService { + /** + * 查询生产前准备记录报表 + * + * @param validateId 生产前准备记录报表主键 + * @return 生产前准备记录报表 + */ + public MesPrepareValidate selectMesPrepareValidateByValidateId(String validateId); + + /** + * 查询生产前准备记录报表列表 + * + * @param mesPrepareValidate 生产前准备记录报表 + * @return 生产前准备记录报表集合 + */ + public List selectMesPrepareValidateList(MesPrepareValidate mesPrepareValidate); + + /** + * 新增生产前准备记录报表 + * + * @param mesPrepareValidate 生产前准备记录报表 + * @return 结果 + */ + public int insertMesPrepareValidate(MesPrepareValidate mesPrepareValidate); + + /** + * 修改生产前准备记录报表 + * + * @param mesPrepareValidate 生产前准备记录报表 + * @return 结果 + */ + public int updateMesPrepareValidate(MesPrepareValidate mesPrepareValidate); + + /** + * 批量删除生产前准备记录报表 + * + * @param validateIds 需要删除的生产前准备记录报表主键集合 + * @return 结果 + */ + public int deleteMesPrepareValidateByValidateIds(String[] validateIds); + + /** + * 删除生产前准备记录报表信息 + * + * @param validateId 生产前准备记录报表主键 + * @return 结果 + */ + public int deleteMesPrepareValidateByValidateId(String validateId); +} diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesPrepareServiceImpl.java b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesPrepareServiceImpl.java new file mode 100644 index 000000000..4f448c9f7 --- /dev/null +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesPrepareServiceImpl.java @@ -0,0 +1,97 @@ +package com.op.mes.service.impl; + +import java.util.List; + +import com.baomidou.dynamic.datasource.annotation.DS; +import com.op.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.op.mes.mapper.MesPrepareMapper; +import com.op.mes.domain.MesPrepare; +import com.op.mes.service.IMesPrepareService; + +/** + * 备料单Service业务层处理 + * + * @author Open Platform + * @date 2023-08-03 + */ +@Service +public class MesPrepareServiceImpl implements IMesPrepareService { + @Autowired + private MesPrepareMapper mesPrepareMapper; + + /** + * 查询备料单 + * + * @param prepareId 备料单主键 + * @return 备料单 + */ + @Override + @DS("#header.poolName") + public MesPrepare selectMesPrepareByPrepareId(String prepareId) { + return mesPrepareMapper.selectMesPrepareByPrepareId(prepareId); + } + + /** + * 查询备料单列表 + * + * @param mesPrepare 备料单 + * @return 备料单 + */ + @Override + @DS("#header.poolName") + public List selectMesPrepareList(MesPrepare mesPrepare) { + return mesPrepareMapper.selectMesPrepareList(mesPrepare); + } + + /** + * 新增备料单 + * + * @param mesPrepare 备料单 + * @return 结果 + */ + @Override + @DS("#header.poolName") + public int insertMesPrepare(MesPrepare mesPrepare) { + mesPrepare.setCreateTime(DateUtils.getNowDate()); + return mesPrepareMapper.insertMesPrepare(mesPrepare); + } + + /** + * 修改备料单 + * + * @param mesPrepare 备料单 + * @return 结果 + */ + @Override + @DS("#header.poolName") + public int updateMesPrepare(MesPrepare mesPrepare) { + mesPrepare.setUpdateTime(DateUtils.getNowDate()); + return mesPrepareMapper.updateMesPrepare(mesPrepare); + } + + /** + * 批量删除备料单 + * + * @param prepareIds 需要删除的备料单主键 + * @return 结果 + */ + @Override + @DS("#header.poolName") + public int deleteMesPrepareByPrepareIds(String[] prepareIds) { + return mesPrepareMapper.deleteMesPrepareByPrepareIds(prepareIds); + } + + /** + * 删除备料单信息 + * + * @param prepareId 备料单主键 + * @return 结果 + */ + @Override + @DS("#header.poolName") + public int deleteMesPrepareByPrepareId(String prepareId) { + return mesPrepareMapper.deleteMesPrepareByPrepareId(prepareId); + } +} diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesPrepareValidateServiceImpl.java b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesPrepareValidateServiceImpl.java new file mode 100644 index 000000000..80830a57f --- /dev/null +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesPrepareValidateServiceImpl.java @@ -0,0 +1,96 @@ +package com.op.mes.service.impl; + +import java.util.List; + +import com.baomidou.dynamic.datasource.annotation.DS; +import com.op.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.op.mes.mapper.MesPrepareValidateMapper; +import com.op.mes.domain.MesPrepareValidate; +import com.op.mes.service.IMesPrepareValidateService; + +/** + * 生产前准备记录报表Service业务层处理 + * + * @author Open Platform + * @date 2023-08-04 + */ +@Service +public class MesPrepareValidateServiceImpl implements IMesPrepareValidateService { + @Autowired + private MesPrepareValidateMapper mesPrepareValidateMapper; + + /** + * 查询生产前准备记录报表 + * + * @param validateId 生产前准备记录报表主键 + * @return 生产前准备记录报表 + */ + @Override + @DS("#header.poolName") + public MesPrepareValidate selectMesPrepareValidateByValidateId(String validateId) { + return mesPrepareValidateMapper.selectMesPrepareValidateByValidateId(validateId); + } + + /** + * 查询生产前准备记录报表列表 + * + * @param mesPrepareValidate 生产前准备记录报表 + * @return 生产前准备记录报表 + */ + @Override + @DS("#header.poolName") + public List selectMesPrepareValidateList(MesPrepareValidate mesPrepareValidate) { + return mesPrepareValidateMapper.selectMesPrepareValidateList(mesPrepareValidate); + } + + /** + * 新增生产前准备记录报表 + * + * @param mesPrepareValidate 生产前准备记录报表 + * @return 结果 + */ + @Override + @DS("#header.poolName") + public int insertMesPrepareValidate(MesPrepareValidate mesPrepareValidate) { + mesPrepareValidate.setCreateTime(DateUtils.getNowDate()); + return mesPrepareValidateMapper.insertMesPrepareValidate(mesPrepareValidate); + } + + /** + * 修改生产前准备记录报表 + * + * @param mesPrepareValidate 生产前准备记录报表 + * @return 结果 + */ + @Override + @DS("#header.poolName") + public int updateMesPrepareValidate(MesPrepareValidate mesPrepareValidate) { + mesPrepareValidate.setUpdateTime(DateUtils.getNowDate()); + return mesPrepareValidateMapper.updateMesPrepareValidate(mesPrepareValidate); + } + + /** + * 批量删除生产前准备记录报表 + * + * @param validateIds 需要删除的生产前准备记录报表主键 + * @return 结果 + */ + @Override + @DS("#header.poolName") + public int deleteMesPrepareValidateByValidateIds(String[] validateIds) { + return mesPrepareValidateMapper.deleteMesPrepareValidateByValidateIds(validateIds); + } + + /** + * 删除生产前准备记录报表信息 + * + * @param validateId 生产前准备记录报表主键 + * @return 结果 + */ + @Override + public int deleteMesPrepareValidateByValidateId(String validateId) { + return mesPrepareValidateMapper.deleteMesPrepareValidateByValidateId(validateId); + } +} diff --git a/op-modules/op-mes/src/main/resources/mapper/MesPrepareMapper.xml b/op-modules/op-mes/src/main/resources/mapper/MesPrepareMapper.xml new file mode 100644 index 000000000..1de2a32da --- /dev/null +++ b/op-modules/op-mes/src/main/resources/mapper/MesPrepareMapper.xml @@ -0,0 +1,217 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select prepare_id, workorder_code, workorder_name, parent_order, order_id, order_code, product_id, product_code, prod_type, product_name, product_spc, wet_detail_plan_id, product_date, shift_id, ancestors, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, factory_code, material_code, material_name, material_spc, unit, quantity from mes_prepare + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/op-modules/op-mes/src/main/resources/mapper/MesPrepareValidateMapper.xml b/op-modules/op-mes/src/main/resources/mapper/MesPrepareValidateMapper.xml new file mode 100644 index 000000000..74daefc6d --- /dev/null +++ b/op-modules/op-mes/src/main/resources/mapper/MesPrepareValidateMapper.xml @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select validate_id, workorder_code, workorder_name, product_spc, product_name, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, factory_code from mes_prepare_validate + + + + + + + + insert into mes_prepare_validate + + validate_id, + workorder_code, + workorder_name, + product_spc, + product_name, + status, + remark, + attr1, + attr2, + attr3, + attr4, + create_by, + create_time, + update_by, + update_time, + factory_code, + + + #{validateId}, + #{workorderCode}, + #{workorderName}, + #{productSpc}, + #{productName}, + #{status}, + #{remark}, + #{attr1}, + #{attr2}, + #{attr3}, + #{attr4}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{factoryCode}, + + + + + update mes_prepare_validate + + workorder_code = #{workorderCode}, + workorder_name = #{workorderName}, + product_spc = #{productSpc}, + product_name = #{productName}, + status = #{status}, + remark = #{remark}, + attr1 = #{attr1}, + attr2 = #{attr2}, + attr3 = #{attr3}, + attr4 = #{attr4}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + factory_code = #{factoryCode}, + + where validate_id = #{validateId} + + + + delete from mes_prepare_validate where validate_id = #{validateId} + + + + delete from mes_prepare_validate where validate_id in + + #{validateId} + + + \ No newline at end of file