diff --git a/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsOdsWhiteEmbryoInController.java b/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsOdsWhiteEmbryoInController.java index 57edc13b..17374006 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsOdsWhiteEmbryoInController.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsOdsWhiteEmbryoInController.java @@ -94,12 +94,5 @@ public class WmsOdsWhiteEmbryoInController extends BaseController { return toAjax(wmsOdsWhiteEmbryoInService.deleteWmsOdsWhiteEmbryoInByIDs(IDs)); } - /** - * 手持白胚入库 - */ - @PostMapping("/Warehousing") - public AjaxResult addWarehousing(@RequestBody List wmsOdsWhiteEmbryoIns) { - return toAjax(wmsOdsWhiteEmbryoInService.insertWmsOdsWhiteEmbryoIn(wmsOdsWhiteEmbryoIns)); - } } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsToWCSmissionController.java b/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsToWCSmissionController.java index ba5988b5..de5cc6f6 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsToWCSmissionController.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/controller/WmsToWCSmissionController.java @@ -9,17 +9,16 @@ import com.op.common.core.web.domain.AjaxResult; import com.op.common.log.annotation.Log; import com.op.common.log.enums.BusinessType; import com.op.wms.domain.*; -import com.op.wms.service.IBaseWarehouseService; -import com.op.wms.service.IOdsProcureOrderService; -import com.op.wms.service.IWmsProductPutService; -import com.op.wms.service.IWmsToWCSmissionService; +import com.op.wms.service.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; import static com.op.common.core.web.domain.AjaxResult.success; - +/* +可以写手持,wms/WmsToWCSmission开放了 + */ @RestController @RequestMapping("/WmsToWCSmission") public class WmsToWCSmissionController { @@ -31,7 +30,8 @@ public class WmsToWCSmissionController { private IOdsProcureOrderService odsProcureOrderService; @Autowired private IBaseWarehouseService baseWarehouseService; - + @Autowired + private IOdsWhiteEmbryoService iOdsWhiteEmbryoService; /** * 包材请求入库--- * @@ -235,4 +235,58 @@ public class WmsToWCSmissionController { public AjaxResult WmsProductPutByWorkOrderConfirm(@RequestBody WmsProductPut wmsProductPut) { return AjaxResult.success(wmsProductPutService.WmsProductPutByWorkOrderConfirm(wmsProductPut)); } + /** + * 手持白胚入库查询 + */ + @PostMapping("/selectWmsOdsWhiteEmbryoInhAnd") + public AjaxResult selectWmsOdsWhiteEmbryoInhAnd(@RequestBody WmsOdsWhiteEmbryoIn wmsOdsWhiteEmbryoIns) { + return success(wmsProductPutService.selectWmsOdsWhiteEmbryoInhAnd(wmsOdsWhiteEmbryoIns)); + } + /** + + * 手持白胚入库确认 + */ + @PostMapping("/addtWmsOdsWhiteEmbryoInhAnd") + public AjaxResult addtWmsOdsWhiteEmbryoInhAnd(@RequestBody WmsOdsWhiteEmbryoIn wmsOdsWhiteEmbryoIn) { + return success(wmsProductPutService.addtWmsOdsWhiteEmbryoInhAnd(wmsOdsWhiteEmbryoIn)); + } + //** + + /** + * 用于白胚出库单--查询 + * + * @param odsProcureOrder + * @return + */ + @PostMapping("/selectWhiteEmbryoDeliveryOrder") + public AjaxResult selectWhiteEmbryoDeliveryOrder(@RequestBody OdsProcureOutOrder odsProcureOrder) { + // OdsProcureOutOrder orderList = odsProcureOrderService.PurchaseOrderOutboundPda(odsProcureOrder); + OdsProcureOutOrder orderList1= iOdsWhiteEmbryoService.selectWhiteEmbryoDeliveryOrder(odsProcureOrder); + return success(orderList1); + } + + /** + * 用于白胚出库--查询托盘信息 + * + * @param wmsOdsEmStorageNewsSn + * @return + */ + @PostMapping("/selectQueryTrayInfor") + public AjaxResult selectQueryTrayInfor(@RequestBody WmsOdsEmStorageNewsSn wmsOdsEmStorageNewsSn) { + // OdsProcureOutOrder orderList = odsProcureOrderService.PurchaseOrderOutboundPda(odsProcureOrder); + WmsOdsEmStorageNewsSn wmsOdsEmStorageNewsSn1= iOdsWhiteEmbryoService.selectQueryTrayInfor(wmsOdsEmStorageNewsSn); + return success(wmsOdsEmStorageNewsSn1); + } + /** + * 用于白胚出库--确认 + * + * @param odsWhiteEmbryo + * @return + */ + @PostMapping("/WhiteEmbryoOutbound") + public AjaxResult WhiteEmbryoOutbound(@RequestBody OdsWhiteEmbryo odsWhiteEmbryo) { + // OdsProcureOutOrder orderList = odsProcureOrderService.PurchaseOrderOutboundPda(odsProcureOrder); + String result= iOdsWhiteEmbryoService.WhiteEmbryoOutbound(odsWhiteEmbryo); + return success(result); + } } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/domain/OdsProcureOutOrder.java b/op-modules/op-wms/src/main/java/com/op/wms/domain/OdsProcureOutOrder.java index 8649e854..95b2a3e3 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/domain/OdsProcureOutOrder.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/domain/OdsProcureOutOrder.java @@ -13,7 +13,7 @@ import com.op.common.core.annotation.Excel; import com.op.common.core.web.domain.BaseEntity; /** - * 包材出库单对象 ods_procure_out_order + * 出库单对象 ods_procure_out_order * * @author Open Platform * @date 2023-07-06 diff --git a/op-modules/op-wms/src/main/java/com/op/wms/domain/OdsWhiteEmbryo.java b/op-modules/op-wms/src/main/java/com/op/wms/domain/OdsWhiteEmbryo.java index e8704b6a..6d51983a 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/domain/OdsWhiteEmbryo.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/domain/OdsWhiteEmbryo.java @@ -2,6 +2,7 @@ package com.op.wms.domain; import java.math.BigDecimal; import java.util.Date; +import java.util.List; import com.fasterxml.jackson.annotation.JsonFormat; import org.apache.commons.lang3.builder.ToStringBuilder; @@ -64,7 +65,7 @@ public class OdsWhiteEmbryo extends BaseEntity { * 单位 */ @Excel(name = "单位") - private String Unit; + private String unit; /** * 已出库数量 @@ -200,6 +201,8 @@ public class OdsWhiteEmbryo extends BaseEntity { @Excel(name = "可用标识") private String Active; + + /** * 企业主键 */ @@ -211,6 +214,16 @@ public class OdsWhiteEmbryo extends BaseEntity { */ @Excel(name = "企业编码") private String enterpriseCode; + //出库的托盘信息 + private List wmsOdsEmStorageNewsSns; + + public List getWmsOdsEmStorageNewsSns() { + return wmsOdsEmStorageNewsSns; + } + + public void setWmsOdsEmStorageNewsSns(List wmsOdsEmStorageNewsSns) { + this.wmsOdsEmStorageNewsSns = wmsOdsEmStorageNewsSns; + } public void setSiteCode(String siteCode) { this.siteCode = siteCode; @@ -269,11 +282,11 @@ public class OdsWhiteEmbryo extends BaseEntity { } public void setUnit(String Unit) { - this.Unit = Unit; + this.unit = Unit; } public String getUnit() { - return Unit; + return unit; } public void setRealityNumber(BigDecimal realityNumber) { diff --git a/op-modules/op-wms/src/main/java/com/op/wms/domain/ProOrderWorkorder.java b/op-modules/op-wms/src/main/java/com/op/wms/domain/ProOrderWorkorder.java new file mode 100644 index 00000000..66f67724 --- /dev/null +++ b/op-modules/op-wms/src/main/java/com/op/wms/domain/ProOrderWorkorder.java @@ -0,0 +1,594 @@ +package com.op.wms.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.op.common.core.annotation.Excel; +import com.op.common.core.web.domain.TreeEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import java.util.Date; +import java.util.List; + +/** + * 生产工单对象 pro_order_workorder + *s + * @author Open Platform + * @date 2023-07-18 + */ +public class ProOrderWorkorder extends TreeEntity { + private static final long serialVersionUID = 1L; + + /** + * 工单ID + */ + private String workorderId; + + /** + * 工单编码 + */ + @Excel(name = "工单编码") + private String workorderCode; + /** + * 工单编码 + */ + @Excel(name = "sap工单编码") + private String workorderCodeSap; + + public String getWorkorderCodeSap() { + return workorderCodeSap; + } + + public void setWorkorderCodeSap(String workorderCodeSap) { + this.workorderCodeSap = workorderCodeSap; + } + + /** + * 工单名称 + */ + @Excel(name = "工单名称") + private String workorderName; + + /** + * 订单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 productName; + + /** + * 规格型号 + */ + @Excel(name = "规格型号") + private String productSpc; + + /** + * 单位 + */ + @Excel(name = "单位") + private String unit; + + /** + * 已生产数量 + */ + @Excel(name = "已生产数量") + private Long quantityProduced; + + /** + * 已拆分数量 + */ + @Excel(name = "已拆分数量") + private Long quantitySplit; + + /** + * 工艺编码 + */ + @Excel(name = "工艺编码") + private String routeCode; + + /** + * 产线编码 + */ + @Excel(name = "产线编码") + private String prodLineCode; + + /** + * 工单生产日期 + */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "工单生产日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date productDate; + + // 工单生产日期开始 + private String productDateStart; + + // 工单生产日期结束 + private String productDateEnd; + /** + * 班次 + */ + @Excel(name = "班次") + private String shiftId; + + /** + * 父工单 + */ + @Excel(name = "父工单") + private String parentOrder; + + /** + * 所有父节点ID + */ + @Excel(name = "所有父节点ID") + private String ancestors; + + /** + * 单据状态 + */ + @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 prodType; + + /** + * 是否为底层节点 1是 0不是 + */ + @Excel(name = "是否为底层节点") + private Integer endFlag; + + public Integer getEndFlag() { + return endFlag; + } + + public void setEndFlag(Integer endFlag) { + this.endFlag = endFlag; + } + private List proOrderWorkorderBatchList; + + public List getProOrderWorkorderBatchList() { + return proOrderWorkorderBatchList; + } + + public void setProOrderWorkorderBatchList(List proOrderWorkorderBatchList) { + this.proOrderWorkorderBatchList = proOrderWorkorderBatchList; + } + + /** + * 班次名称(数据库无该字段,需自行查询) + */ + private String shiftDesc; + + // 料罐id(湿料计划模块使用) + private Integer bucketId; + + // 料罐编码(湿料计划模块使用) + private String bucketCode; + + // 物料id(湿料计划模块使用) + private Integer materialId; + + // 物料编码(湿料计划模块使用) + private String materialCode; + + // 物料名称(湿料计划模块使用) + private String materialName; + + // 计划日期(湿料计划模块使用) + private Date planTime; + + // 料罐名称(湿料计划模块使用) + private String bucketName; + private String batchCode; + private String batchId; + + public String getBatchCode() { + return batchCode; + } + + public void setBatchCode(String batchCode) { + this.batchCode = batchCode; + } + + public String getBatchId() { + return batchId; + } + + public void setBatchId(String batchId) { + this.batchId = batchId; + } + + public String getBucketName() { + return bucketName; + } + + public void setBucketName(String bucketName) { + this.bucketName = bucketName; + } + + public Integer getBucketId() { + return bucketId; + } + + public void setBucketId(Integer bucketId) { + this.bucketId = bucketId; + } + + public String getBucketCode() { + return bucketCode; + } + + public void setBucketCode(String bucketCode) { + this.bucketCode = bucketCode; + } + + public Integer getMaterialId() { + return materialId; + } + + public void setMaterialId(Integer materialId) { + this.materialId = materialId; + } + + public String getMaterialCode() { + return materialCode; + } + + public void setMaterialCode(String materialCode) { + this.materialCode = materialCode; + } + + public String getMaterialName() { + return materialName; + } + + public void setMaterialName(String materialName) { + this.materialName = materialName; + } + + public Date getPlanTime() { + return planTime; + } + + public void setPlanTime(Date planTime) { + this.planTime = planTime; + } + + public String getShiftDesc() { + return shiftDesc; + } + + public void setShiftDesc(String shiftDesc) { + this.shiftDesc = shiftDesc; + } + + /** + * 批次号 + */ + private List batchCodeList; + + public List getBatchCodeList() { + return batchCodeList; + } + + public void setBatchCodeList(List batchCodeList) { + this.batchCodeList = batchCodeList; + } + + /** + * $column.columnComment + */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String factoryCode; + + public void setWorkorderId(String workorderId) { + this.workorderId = workorderId; + } + + public String getWorkorderId() { + return workorderId; + } + + 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 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 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 setUnit(String unit) { + this.unit = unit; + } + + public String getUnit() { + return unit; + } + + public void setQuantityProduced(Long quantityProduced) { + this.quantityProduced = quantityProduced; + } + + public Long getQuantityProduced() { + return quantityProduced; + } + + public void setQuantitySplit(Long quantitySplit) { + this.quantitySplit = quantitySplit; + } + + public Long getQuantitySplit() { + return quantitySplit; + } + + public void setRouteCode(String routeCode) { + this.routeCode = routeCode; + } + + public String getRouteCode() { + return routeCode; + } + + public void setProdLineCode(String prodLineCode) { + this.prodLineCode = prodLineCode; + } + + public String getProdLineCode() { + return prodLineCode; + } + + 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 setParentOrder(String parentOrder) { + this.parentOrder = parentOrder; + } + + public String getParentOrder() { + return parentOrder; + } + + 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 setProdType(String prodType) { + this.prodType = prodType; + } + + public String getProdType() { + return prodType; + } + + public void setFactoryCode(String factoryCode) { + this.factoryCode = factoryCode; + } + + public String getFactoryCode() { + return factoryCode; + } + + public String getProductDateStart() { + return productDateStart; + } + + public void setProductDateStart(String productDateStart) { + this.productDateStart = productDateStart; + } + + public String getProductDateEnd() { + return productDateEnd; + } + + public void setProductDateEnd(String productDateEnd) { + this.productDateEnd = productDateEnd; + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("workorderId", getWorkorderId()) + .append("workorderCode", getWorkorderCode()) + .append("workorderName", getWorkorderName()) + .append("orderId", getOrderId()) + .append("orderCode", getOrderCode()) + .append("productId", getProductId()) + .append("productCode", getProductCode()) + .append("productName", getProductName()) + .append("productSpc", getProductSpc()) + .append("unit", getUnit()) + .append("quantityProduced", getQuantityProduced()) + .append("quantitySplit", getQuantitySplit()) + .append("routeCode", getRouteCode()) + .append("prodLineCode", getProdLineCode()) + .append("productDate", getProductDate()) + .append("shiftId", getShiftId()) + .append("parentOrder", getParentOrder()) + .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("prodType", getProdType()) + .append("factoryCode", getFactoryCode()) + .append("batchCodeList", getBatchCodeList()) + .append("endFlag", getEndFlag()) + .append("shiftDesc", getShiftDesc()) + .append("bucketId", getBucketId()) + .append("bucketCode", getBucketCode()) + .append("materialId", getMaterialId()) + .append("materialCode", getMaterialCode()) + .append("materialName", getMaterialName()) + .append("planTime", getPlanTime()) + .append("bucketName", getBucketName()) + .toString(); + } +} diff --git a/op-modules/op-wms/src/main/java/com/op/wms/domain/ProOrderWorkorderBatch.java b/op-modules/op-wms/src/main/java/com/op/wms/domain/ProOrderWorkorderBatch.java new file mode 100644 index 00000000..03746a5c --- /dev/null +++ b/op-modules/op-wms/src/main/java/com/op/wms/domain/ProOrderWorkorderBatch.java @@ -0,0 +1,201 @@ +package com.op.wms.domain; + +import com.op.common.core.annotation.Excel; +import com.op.common.core.web.domain.BaseEntity; +import org.apache.commons.lang.builder.ToStringBuilder; +import org.apache.commons.lang.builder.ToStringStyle; + +/** + * 生产工单批次对象 pro_order_workorder_batch + *s + * @author Open Platform + * @date 2023-07-18 + */ +public class ProOrderWorkorderBatch extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * 批次ID + */ + @Excel(name = "批次ID") + private String batchId; + + /** + * 工单ID + */ + private String workorderId; + + /** + * 批次号 + */ + @Excel(name = "批次号") + private String batchCode; + + /** + * 批次数量 + */ + @Excel(name = "批次数量") + private Long batchQuantity; + @Excel(name = "已入数量") + private Long includedQuantity; + + public Long getIncludedQuantity() { + return includedQuantity; + } + + public void setIncludedQuantity(Long includedQuantity) { + this.includedQuantity = includedQuantity; + } + + /** + * 单据状态 + */ + @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 prodType; + + /** + * $column.columnComment + */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String factoryCode; + + public void setBatchId(String batchId) { + this.batchId = batchId; + } + + public String getBatchId() { + return batchId; + } + + public void setWorkorderId(String workorderId) { + this.workorderId = workorderId; + } + + public String getWorkorderId() { + return workorderId; + } + + public void setBatchCode(String batchCode) { + this.batchCode = batchCode; + } + + public String getBatchCode() { + return batchCode; + } + + public void setBatchQuantity(Long batchQuantity) { + this.batchQuantity = batchQuantity; + } + + public Long getBatchQuantity() { + return batchQuantity; + } + + 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 setProdType(String prodType) { + this.prodType = prodType; + } + + public String getProdType() { + return prodType; + } + + 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("batchId", getBatchId()) + .append("workorderId", getWorkorderId()) + .append("batchCode", getBatchCode()) + .append("batchQuantity", getBatchQuantity()) + .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("prodType", getProdType()) + .append("factoryCode", getFactoryCode()) + .toString(); + } +} diff --git a/op-modules/op-wms/src/main/java/com/op/wms/domain/WmsOdsEmStorageNewsSn.java b/op-modules/op-wms/src/main/java/com/op/wms/domain/WmsOdsEmStorageNewsSn.java index 674c4828..a1846e52 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/domain/WmsOdsEmStorageNewsSn.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/domain/WmsOdsEmStorageNewsSn.java @@ -80,7 +80,7 @@ public class WmsOdsEmStorageNewsSn extends BaseEntity { /** * 条码 */ - @Excel(name = "条码") + @Excel(name = "批次") private String barCode; /** diff --git a/op-modules/op-wms/src/main/java/com/op/wms/domain/WmsOdsWhiteEmbryoIn.java b/op-modules/op-wms/src/main/java/com/op/wms/domain/WmsOdsWhiteEmbryoIn.java index 5c339a77..99ca0ea2 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/domain/WmsOdsWhiteEmbryoIn.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/domain/WmsOdsWhiteEmbryoIn.java @@ -2,6 +2,7 @@ package com.op.wms.domain; import java.math.BigDecimal; import java.util.Date; +import java.util.List; import com.fasterxml.jackson.annotation.JsonFormat; import org.apache.commons.lang3.builder.ToStringBuilder; @@ -64,7 +65,7 @@ public class WmsOdsWhiteEmbryoIn extends BaseEntity { * 单位 */ @Excel(name = "单位") - private String Unit; + private String unit; /** * 已出库数量 @@ -208,6 +209,17 @@ public class WmsOdsWhiteEmbryoIn extends BaseEntity { private String Remark; + + private List wmsWhiteBilletInforList; + + public List getWmsWhiteBilletInforList() { + return wmsWhiteBilletInforList; + } + + public void setWmsWhiteBilletInforList(List wmsWhiteBilletInforList) { + this.wmsWhiteBilletInforList = wmsWhiteBilletInforList; + } + public String getRemark() { return Remark; } @@ -279,11 +291,11 @@ public class WmsOdsWhiteEmbryoIn extends BaseEntity { } public void setUnit(String Unit) { - this.Unit = Unit; + this.unit = Unit; } public String getUnit() { - return Unit; + return unit; } public void setRealityNumber(BigDecimal realityNumber) { @@ -488,7 +500,7 @@ public class WmsOdsWhiteEmbryoIn extends BaseEntity { .append("materialDesc", getMaterialDesc()) .append("planDate", getPlanDate()) .append("planNumber", getPlanNumber()) - .append("Unit", getUnit()) + .append("unit", getUnit()) .append("realityNumber", getRealityNumber()) .append("orderStatus", getOrderStatus()) .append("userDefined1", getUserDefined1()) diff --git a/op-modules/op-wms/src/main/java/com/op/wms/domain/WmsWhiteBilletInfor.java b/op-modules/op-wms/src/main/java/com/op/wms/domain/WmsWhiteBilletInfor.java new file mode 100644 index 00000000..864faba6 --- /dev/null +++ b/op-modules/op-wms/src/main/java/com/op/wms/domain/WmsWhiteBilletInfor.java @@ -0,0 +1,60 @@ +package com.op.wms.domain; + +import com.op.common.core.annotation.Excel; + +/** + * 白坯入库的托盘信息 + */ +public class WmsWhiteBilletInfor { + /** + * 批次号 + */ + @Excel(name = "批次号") + private String batchCode; + + /** + * 批次数量 + */ + @Excel(name = "托盘数量") + private String batchQuantity; + /** + * 托盘号--托盘号 + */ + @Excel(name = "托盘号") + private String sn; + @Excel(name = "库位") + private String wlCode; + + public String getBatchCode() { + return batchCode; + } + + public void setBatchCode(String batchCode) { + this.batchCode = batchCode; + } + + + public String getBatchQuantity() { + return batchQuantity; + } + + public void setBatchQuantity(String batchQuantity) { + this.batchQuantity = batchQuantity; + } + + public String getSn() { + return sn; + } + + public void setSn(String sn) { + this.sn = sn; + } + + public String getWlCode() { + return wlCode; + } + + public void setWlCode(String wlCode) { + this.wlCode = wlCode; + } +} diff --git a/op-modules/op-wms/src/main/java/com/op/wms/mapper/OdsProcureOutOrderMapper.java b/op-modules/op-wms/src/main/java/com/op/wms/mapper/OdsProcureOutOrderMapper.java index 435e794c..df620749 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/mapper/OdsProcureOutOrderMapper.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/mapper/OdsProcureOutOrderMapper.java @@ -84,4 +84,6 @@ public interface OdsProcureOutOrderMapper { List selectOdsProcureOutOrderListZUKENX(OdsProcureOutOrder order); String selectMachineCode(@Param("order")OdsProcureOutOrder odsProcureOutOrder); + + List selectmesPrepareDetailWhite(OdsProcureOutOrder odsProcureOutOrder); } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/mapper/OdsWhiteEmbryoMapper.java b/op-modules/op-wms/src/main/java/com/op/wms/mapper/OdsWhiteEmbryoMapper.java index 49fd325f..b006c25e 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/mapper/OdsWhiteEmbryoMapper.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/mapper/OdsWhiteEmbryoMapper.java @@ -58,4 +58,6 @@ public interface OdsWhiteEmbryoMapper { * @return 结果 */ public int deleteOdsWhiteEmbryoByIDs(String[] IDs); + + OdsWhiteEmbryo selectOdsWhiteEmbryoByOrderCode(OdsWhiteEmbryo odsWhiteEmbryo); } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsOdsEmStorageNewsMapper.java b/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsOdsEmStorageNewsMapper.java index da05711d..ca5e7e87 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsOdsEmStorageNewsMapper.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsOdsEmStorageNewsMapper.java @@ -3,6 +3,7 @@ package com.op.wms.mapper; import java.util.List; import com.op.wms.domain.WmsOdsEmStorageNews; +import com.op.wms.domain.WmsOdsEmStorageNewsSn; /** * 白胚库存主表Mapper接口 @@ -60,4 +61,6 @@ public interface WmsOdsEmStorageNewsMapper { public int deleteWmsOdsEmStorageNewsByStorageIds(String[] storageIds); void updateAdd(WmsOdsEmStorageNews wmsOdsEmStorageNews); + + WmsOdsEmStorageNews selectWmsOdsEmStorageNewsByWlCode(WmsOdsEmStorageNewsSn wmsOdsEmStorageNewsSn); } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsOdsEmStorageNewsSnMapper.java b/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsOdsEmStorageNewsSnMapper.java index 33b9ad6a..93618af7 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsOdsEmStorageNewsSnMapper.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsOdsEmStorageNewsSnMapper.java @@ -58,4 +58,6 @@ public interface WmsOdsEmStorageNewsSnMapper { * @return 结果 */ public int deleteWmsOdsEmStorageNewsSnByEmOrderInSnIds(Long[] emOrderInSnIds); + + WmsOdsEmStorageNewsSn selectWmsOdsEmStorageNewsSnBysn(WmsOdsEmStorageNewsSn wmsOdsEmStorageNewsSn); } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsOdsWhiteEmbryoInMapper.java b/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsOdsWhiteEmbryoInMapper.java index 3fccbe71..63ce40cc 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsOdsWhiteEmbryoInMapper.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/mapper/WmsOdsWhiteEmbryoInMapper.java @@ -2,6 +2,8 @@ package com.op.wms.mapper; import java.util.List; +import com.op.wms.domain.ProOrderWorkorder; +import com.op.wms.domain.ProOrderWorkorderBatch; import com.op.wms.domain.WmsOdsWhiteEmbryoIn; /** @@ -62,4 +64,10 @@ public interface WmsOdsWhiteEmbryoInMapper { WmsOdsWhiteEmbryoIn selectWmsOdsWhiteEmbryoInByWorkorderCode(String workorderCode); void updateWmsOdsWhiteEmbryoInByOrderCode(WmsOdsWhiteEmbryoIn wmsOdsWhiteEmbryoIn); + + ProOrderWorkorder selectProOrderWorkorder(WmsOdsWhiteEmbryoIn wmsOdsWhiteEmbryoIns); + + List selectProOrderWorkorderBatch(ProOrderWorkorder proOrderWorkorder); + + WmsOdsWhiteEmbryoIn selectWmsOdsWhiteEmbryoInByOrderCodeAndUserDefined1(WmsOdsWhiteEmbryoIn wmsOdsWhiteEmbryoIn); } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/IOdsWhiteEmbryoService.java b/op-modules/op-wms/src/main/java/com/op/wms/service/IOdsWhiteEmbryoService.java index 8489ca9f..9d0f12d4 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/service/IOdsWhiteEmbryoService.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/IOdsWhiteEmbryoService.java @@ -2,7 +2,9 @@ package com.op.wms.service; import java.util.List; +import com.op.wms.domain.OdsProcureOutOrder; import com.op.wms.domain.OdsWhiteEmbryo; +import com.op.wms.domain.WmsOdsEmStorageNewsSn; /** * 白胚出库单Service接口 @@ -58,4 +60,10 @@ public interface IOdsWhiteEmbryoService { * @return 结果 */ public int deleteOdsWhiteEmbryoByID(String ID); + + OdsProcureOutOrder selectWhiteEmbryoDeliveryOrder(OdsProcureOutOrder odsProcureOrder); + + WmsOdsEmStorageNewsSn selectQueryTrayInfor(WmsOdsEmStorageNewsSn wmsOdsEmStorageNewsSn); + + String WhiteEmbryoOutbound(OdsWhiteEmbryo odsWhiteEmbryo); } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/IWmsOdsWhiteEmbryoInService.java b/op-modules/op-wms/src/main/java/com/op/wms/service/IWmsOdsWhiteEmbryoInService.java index 495b3743..04706921 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/service/IWmsOdsWhiteEmbryoInService.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/IWmsOdsWhiteEmbryoInService.java @@ -58,4 +58,5 @@ public interface IWmsOdsWhiteEmbryoInService { * @return 结果 */ public int deleteWmsOdsWhiteEmbryoInByID(String ID); + } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/IWmsProductPutService.java b/op-modules/op-wms/src/main/java/com/op/wms/service/IWmsProductPutService.java index a1f8905e..9b775cb1 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/service/IWmsProductPutService.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/IWmsProductPutService.java @@ -4,6 +4,8 @@ import java.text.ParseException; import java.util.List; import com.op.system.api.domain.wms.wmsReportWork; +import com.op.wms.domain.ProOrderWorkorder; +import com.op.wms.domain.WmsOdsWhiteEmbryoIn; import com.op.wms.domain.WmsProductPut; /** @@ -77,4 +79,7 @@ public interface IWmsProductPutService { List getReportList(wmsReportWork mesReportWork); String addReportListSap(List mesReportWork) throws ParseException; + ProOrderWorkorder selectWmsOdsWhiteEmbryoInhAnd(WmsOdsWhiteEmbryoIn wmsOdsWhiteEmbryoIns); + + String addtWmsOdsWhiteEmbryoInhAnd(WmsOdsWhiteEmbryoIn wmsOdsWhiteEmbryoIn); } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsWhiteEmbryoServiceImpl.java b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsWhiteEmbryoServiceImpl.java index 0bde6103..b1c71c85 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsWhiteEmbryoServiceImpl.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsWhiteEmbryoServiceImpl.java @@ -1,19 +1,18 @@ package com.op.wms.service.impl; +import java.math.BigDecimal; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; import com.baomidou.dynamic.datasource.annotation.DS; +import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder; import com.op.common.core.context.SecurityContextHolder; import com.op.common.core.utils.uuid.IdUtils; -import com.op.wms.domain.Purcode; -import com.op.wms.domain.WmsOdsWhiteEmbryoIn; -import com.op.wms.mapper.PurcodeMapper; +import com.op.wms.domain.*; +import com.op.wms.mapper.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import com.op.wms.mapper.OdsWhiteEmbryoMapper; -import com.op.wms.domain.OdsWhiteEmbryo; import com.op.wms.service.IOdsWhiteEmbryoService; /** @@ -28,7 +27,12 @@ public class OdsWhiteEmbryoServiceImpl implements IOdsWhiteEmbryoService { private OdsWhiteEmbryoMapper odsWhiteEmbryoMapper; @Autowired private PurcodeMapper purcodeMapper; - + @Autowired + private OdsProcureOutOrderMapper odsProcureOutOrderMapper; + @Autowired + private WmsOdsEmStorageNewsSnMapper wmsOdsEmStorageNewsSnMapper; + @Autowired + private WmsOdsEmStorageNewsMapper wmsOdsEmStorageNewsMapper; /** * 查询白胚出库单 * @@ -151,4 +155,65 @@ public class OdsWhiteEmbryoServiceImpl implements IOdsWhiteEmbryoService { public int deleteOdsWhiteEmbryoByID(String ID) { return odsWhiteEmbryoMapper.deleteOdsWhiteEmbryoByID(ID); } + + @Override + public OdsProcureOutOrder selectWhiteEmbryoDeliveryOrder(OdsProcureOutOrder odsProcureOrder) { + //母单,其中list里面是对应的子单 + DynamicDataSourceContextHolder.push("ds_" + odsProcureOrder.getSiteCode()); + OdsProcureOutOrder odsProcureOutOrder = odsProcureOutOrderMapper.selectmesPrepare(odsProcureOrder); + String machine= odsProcureOutOrderMapper.selectMachineCode(odsProcureOutOrder); + if (odsProcureOutOrder != null) { + List orderList = odsProcureOutOrderMapper.selectmesPrepareDetailWhite(odsProcureOutOrder); + for (OdsProcureOutOrder order:orderList){ + order.setProductionLineCode(machine); + } + odsProcureOutOrder.setList(orderList); + } + return odsProcureOutOrder; + } + + @Override + public WmsOdsEmStorageNewsSn selectQueryTrayInfor(WmsOdsEmStorageNewsSn wmsOdsEmStorageNewsSn) { + DynamicDataSourceContextHolder.push("ds_" + wmsOdsEmStorageNewsSn.getFactoryCode()); + WmsOdsEmStorageNewsSn wmsOdsEmStorageNewsSn1= wmsOdsEmStorageNewsSnMapper.selectWmsOdsEmStorageNewsSnBysn(wmsOdsEmStorageNewsSn); + return wmsOdsEmStorageNewsSn1; + } + + @Override + public String WhiteEmbryoOutbound(OdsWhiteEmbryo odsWhiteEmbryo) { + DynamicDataSourceContextHolder.push("ds_" + odsWhiteEmbryo.getSiteCode()); + String result="出库成功"; + //先查询这个订单有没有插入,/如果没有就插入,如果有就修改 + OdsWhiteEmbryo odsWhiteEmbryo1= odsWhiteEmbryoMapper.selectOdsWhiteEmbryoByOrderCode(odsWhiteEmbryo); + if (odsWhiteEmbryo1==null){ + odsWhiteEmbryo.setID(IdUtils.fastSimpleUUID()); + odsWhiteEmbryo.setRealityNumber(new BigDecimal("0")); + odsWhiteEmbryo.setOrderStatus("1"); + odsWhiteEmbryo.setCreateDate(new Date()); + odsWhiteEmbryoMapper.insertOdsWhiteEmbryo(odsWhiteEmbryo); + odsWhiteEmbryo1=odsWhiteEmbryo; + } + List wmsOdsEmStorageNewsSnList= odsWhiteEmbryo.getWmsOdsEmStorageNewsSns(); + + //然后调整库存//-先调整明细明细就修改标记为0,/库存减掉 + for (WmsOdsEmStorageNewsSn wmsOdsEmStorageNewsSn: wmsOdsEmStorageNewsSnList){ + OdsWhiteEmbryo odsWhiteEmbryo2= odsWhiteEmbryoMapper.selectOdsWhiteEmbryoByID(odsWhiteEmbryo1.getID()); + BigDecimal runumber= odsWhiteEmbryo2.getRealityNumber().add(wmsOdsEmStorageNewsSn.getAmount()); + BigDecimal planNumber= odsWhiteEmbryo1.getPlanNumber(); + if (runumber.equals(planNumber)){//相等,为true,否则为false + odsWhiteEmbryo1.setOrderStatus("2"); + } + odsWhiteEmbryo1.setRealityNumber(runumber); + odsWhiteEmbryo1.setLastUpdateBy(odsWhiteEmbryo.getCreateBy()); + odsWhiteEmbryo1.setLastUpdateDate(new Date()); + odsWhiteEmbryoMapper.updateOdsWhiteEmbryo(odsWhiteEmbryo1); + //修改订单入库数量和状态 + wmsOdsEmStorageNewsSn.setActiveFlag("0"); + wmsOdsEmStorageNewsSnMapper.updateWmsOdsEmStorageNewsSn(wmsOdsEmStorageNewsSn);//明细出库 + WmsOdsEmStorageNews wmsOdsEmStorageNews= wmsOdsEmStorageNewsMapper.selectWmsOdsEmStorageNewsByWlCode(wmsOdsEmStorageNewsSn); + wmsOdsEmStorageNews.setAmount(new BigDecimal("0"));//一个库位一个托盘 + wmsOdsEmStorageNewsMapper.updateWmsOdsEmStorageNews(wmsOdsEmStorageNews); + } + return result; + } } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/WmsProductPutServiceImpl.java b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/WmsProductPutServiceImpl.java index 2cbcf03f..bc1fa458 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/WmsProductPutServiceImpl.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/WmsProductPutServiceImpl.java @@ -49,7 +49,13 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService { private RemoteSapService remoteSapService; @Autowired private RemoteQualityService remoteQualityService; + @Autowired + private WmsOdsWhiteEmbryoInMapper wmsOdsWhiteEmbryoInMapper; + @Autowired + private WmsOdsEmStorageNewsSnMapper wmsOdsEmStorageNewsSnMapper; + @Autowired + private WmsOdsEmStorageNewsMapper wmsOdsEmStorageNewsMapper; /** * 查询成品生产入库 * @@ -534,4 +540,94 @@ public class WmsProductPutServiceImpl implements IWmsProductPutService { return SUCCESS; } + + + @Override + public ProOrderWorkorder selectWmsOdsWhiteEmbryoInhAnd(WmsOdsWhiteEmbryoIn wmsOdsWhiteEmbryoIns) { + //pro order workorder + //ipro order workorder batch + + DynamicDataSourceContextHolder.push("ds_" + wmsOdsWhiteEmbryoIns.getSiteCode()); + ProOrderWorkorder proOrderWorkorder= wmsOdsWhiteEmbryoInMapper.selectProOrderWorkorder(wmsOdsWhiteEmbryoIns); + if (proOrderWorkorder!=null){ + List proOrderWorkorderBatchList= wmsOdsWhiteEmbryoInMapper.selectProOrderWorkorderBatch(proOrderWorkorder); + proOrderWorkorder.setProOrderWorkorderBatchList(proOrderWorkorderBatchList); + } + return proOrderWorkorder; + } + + @Override + public String addtWmsOdsWhiteEmbryoInhAnd(WmsOdsWhiteEmbryoIn wmsOdsWhiteEmbryoIn) { + String result="入库成功"; + //先判断这个订单是否存在//如果存在--就修改订单。-如果不存在就添加上, + DynamicDataSourceContextHolder.push("ds_" + wmsOdsWhiteEmbryoIn.getSiteCode()); + WmsOdsWhiteEmbryoIn wmsOdsWhiteEmbryoIn1= wmsOdsWhiteEmbryoInMapper.selectWmsOdsWhiteEmbryoInByOrderCodeAndUserDefined1(wmsOdsWhiteEmbryoIn); + if (wmsOdsWhiteEmbryoIn1==null){ + //原来不存在 + wmsOdsWhiteEmbryoIn.setID(IdUtils.fastSimpleUUID()); + wmsOdsWhiteEmbryoIn.setActive("1"); + wmsOdsWhiteEmbryoIn.setRealityNumber(new BigDecimal("0")); + wmsOdsWhiteEmbryoIn.setOrderStatus("1"); + wmsOdsWhiteEmbryoIn.setCreateDate(new Date()); + wmsOdsWhiteEmbryoInMapper.insertWmsOdsWhiteEmbryoIn(wmsOdsWhiteEmbryoIn); + wmsOdsWhiteEmbryoIn1=wmsOdsWhiteEmbryoIn; + } +// else {//原来就存在 +// wmsOdsWhiteEmbryoIn1.setOrderStatus("1"); +// wmsOdsWhiteEmbryoInMapper.updateWmsOdsWhiteEmbryoIn(wmsOdsWhiteEmbryoIn1); +// } + List wmsWhiteBilletInforList= wmsOdsWhiteEmbryoIn.getWmsWhiteBilletInforList(); + for (WmsWhiteBilletInfor wmsWhiteBilletInfor: + wmsWhiteBilletInforList) { + //判断是否入完 + //wms_ods_em_storage_news_sn 明细 + WmsOdsWhiteEmbryoIn wmsOdsWhiteEmbryoIn2= wmsOdsWhiteEmbryoInMapper.selectWmsOdsWhiteEmbryoInByID(wmsOdsWhiteEmbryoIn1.getID()); + BigDecimal runumber= wmsOdsWhiteEmbryoIn2.getRealityNumber().add(new BigDecimal(wmsWhiteBilletInfor.getBatchQuantity())); + BigDecimal planNumber= wmsOdsWhiteEmbryoIn2.getPlanNumber(); + if (runumber.equals(planNumber)){//相等,为true,否则为false + wmsOdsWhiteEmbryoIn2.setOrderStatus("2"); + } + wmsOdsWhiteEmbryoIn2.setLastUpdateBy(wmsOdsWhiteEmbryoIn.getCreateBy()); + wmsOdsWhiteEmbryoIn2.setLastUpdateDate(new Date()); + wmsOdsWhiteEmbryoIn2.setRealityNumber(runumber); + wmsOdsWhiteEmbryoInMapper.updateWmsOdsWhiteEmbryoIn(wmsOdsWhiteEmbryoIn2); + //修改订单入库数量和状态 + WmsOdsEmStorageNewsSn wmsOdsEmStorageNewsSn =new WmsOdsEmStorageNewsSn(); + wmsOdsEmStorageNewsSn.setWlCode(wmsWhiteBilletInfor.getWlCode());//库位 + wmsOdsEmStorageNewsSn.setMaterialCode(wmsOdsWhiteEmbryoIn.getMaterialCode()); + wmsOdsEmStorageNewsSn.setMaterialDesc(wmsOdsWhiteEmbryoIn.getMaterialDesc()); + wmsOdsEmStorageNewsSn.setSn(wmsWhiteBilletInfor.getSn()); + wmsOdsEmStorageNewsSn.setBarCode(wmsWhiteBilletInfor.getBatchCode()); + wmsOdsEmStorageNewsSn.setAmount(new BigDecimal(wmsWhiteBilletInfor.getBatchQuantity())); + wmsOdsEmStorageNewsSn.setCreateBy(wmsOdsWhiteEmbryoIn.getCreateBy()); + wmsOdsEmStorageNewsSn.setGmtCreate(new Date()); + wmsOdsEmStorageNewsSn.setActiveFlag("1"); + wmsOdsEmStorageNewsSn.setFactoryCode(wmsOdsWhiteEmbryoIn.getSiteCode()); + wmsOdsEmStorageNewsSnMapper.insertWmsOdsEmStorageNewsSn(wmsOdsEmStorageNewsSn); + WmsOdsEmStorageNews wmsOdsEmStorageNews=new WmsOdsEmStorageNews(); + wmsOdsEmStorageNews.setWlCode(wmsWhiteBilletInfor.getWlCode()); + wmsOdsEmStorageNews.setMaterialCode(wmsOdsWhiteEmbryoIn.getMaterialCode()); + wmsOdsEmStorageNews.setMaterialDesc(wmsOdsWhiteEmbryoIn.getMaterialDesc()); + wmsOdsEmStorageNews.setActiveFlag("1"); + List wmsOdsEmStorageNewsList= wmsOdsEmStorageNewsMapper.selectWmsOdsEmStorageNewsList(wmsOdsEmStorageNews); + if (wmsOdsEmStorageNewsList.size()>0){ + WmsOdsEmStorageNews wmsOdsEmStorageNews1 = wmsOdsEmStorageNewsList.get(0); + BigDecimal Amount=wmsOdsEmStorageNews1.getAmount().add(new BigDecimal(wmsWhiteBilletInfor.getBatchQuantity())); + wmsOdsEmStorageNews1.setAmount(Amount); + wmsOdsEmStorageNewsMapper.updateWmsOdsEmStorageNews(wmsOdsEmStorageNews1); + }else { + wmsOdsEmStorageNews.setAmount(new BigDecimal(wmsWhiteBilletInfor.getBatchQuantity())); + wmsOdsEmStorageNews.setUserDefined1(wmsOdsWhiteEmbryoIn.getUnit()); + wmsOdsEmStorageNews.setCreateBy(wmsOdsWhiteEmbryoIn.getCreateBy()); + wmsOdsEmStorageNews.setGmtCreate(new Date()); + wmsOdsEmStorageNews.setFactoryCode(wmsOdsWhiteEmbryoIn.getSiteCode()); + wmsOdsEmStorageNews.setSapFactoryCode(wmsOdsWhiteEmbryoIn.getSiteCode()); + wmsOdsEmStorageNews.setStorageId(IdUtils.fastSimpleUUID()); + wmsOdsEmStorageNewsMapper.insertWmsOdsEmStorageNews(wmsOdsEmStorageNews); + } + // wms_ods_em_storage_news 主库 + } + return result; + } + } diff --git a/op-modules/op-wms/src/main/resources/mapper/wms/OdsProcureOutOrderMapper.xml b/op-modules/op-wms/src/main/resources/mapper/wms/OdsProcureOutOrderMapper.xml index a3c495cb..9fc4f7bd 100644 --- a/op-modules/op-wms/src/main/resources/mapper/wms/OdsProcureOutOrderMapper.xml +++ b/op-modules/op-wms/src/main/resources/mapper/wms/OdsProcureOutOrderMapper.xml @@ -407,4 +407,25 @@ FROM mes_report_work WHERE workorder_code=#{order.workorderCode} AND end_report='1' + diff --git a/op-modules/op-wms/src/main/resources/mapper/wms/OdsWhiteEmbryoMapper.xml b/op-modules/op-wms/src/main/resources/mapper/wms/OdsWhiteEmbryoMapper.xml index f1e3623b..587658c9 100644 --- a/op-modules/op-wms/src/main/resources/mapper/wms/OdsWhiteEmbryoMapper.xml +++ b/op-modules/op-wms/src/main/resources/mapper/wms/OdsWhiteEmbryoMapper.xml @@ -12,7 +12,7 @@ - + @@ -54,7 +54,7 @@ and Material_Desc = #{materialDesc} and Plan_Date = #{planDate} and Plan_Number = #{planNumber} - and Unit = #{Unit} + and Unit = #{unit} and Reality_Number = #{realityNumber} and Order_Status = #{orderStatus} and User_Defined1 = #{userDefined1} @@ -105,7 +105,7 @@ Material_Desc, Plan_Date, Plan_Number, - Unit, + Unit, Reality_Number, Order_Status, User_Defined1, @@ -141,7 +141,7 @@ #{materialDesc}, #{planDate}, #{planNumber}, - #{Unit}, + #{unit}, #{realityNumber}, #{orderStatus}, #{userDefined1}, @@ -180,7 +180,7 @@ Material_Desc = #{materialDesc}, Plan_Date = #{planDate}, Plan_Number = #{planNumber}, - Unit = #{Unit}, + Unit = #{unit}, Reality_Number = #{realityNumber}, Order_Status = #{orderStatus}, User_Defined1 = #{userDefined1}, @@ -221,4 +221,9 @@ #{ID} + diff --git a/op-modules/op-wms/src/main/resources/mapper/wms/WmsOdsEmStorageNewsMapper.xml b/op-modules/op-wms/src/main/resources/mapper/wms/WmsOdsEmStorageNewsMapper.xml index 6101dab9..c369e8b5 100644 --- a/op-modules/op-wms/src/main/resources/mapper/wms/WmsOdsEmStorageNewsMapper.xml +++ b/op-modules/op-wms/src/main/resources/mapper/wms/WmsOdsEmStorageNewsMapper.xml @@ -218,4 +218,8 @@ gmt_modified=now() where wh_code=#{whCode} and wl_code=#{wlCode} and material_code=#{materialCode} + diff --git a/op-modules/op-wms/src/main/resources/mapper/wms/WmsOdsEmStorageNewsSnMapper.xml b/op-modules/op-wms/src/main/resources/mapper/wms/WmsOdsEmStorageNewsSnMapper.xml index daa01c71..ce6445ea 100644 --- a/op-modules/op-wms/src/main/resources/mapper/wms/WmsOdsEmStorageNewsSnMapper.xml +++ b/op-modules/op-wms/src/main/resources/mapper/wms/WmsOdsEmStorageNewsSnMapper.xml @@ -190,4 +190,8 @@ #{emOrderInSnId} + diff --git a/op-modules/op-wms/src/main/resources/mapper/wms/WmsOdsWhiteEmbryoInMapper.xml b/op-modules/op-wms/src/main/resources/mapper/wms/WmsOdsWhiteEmbryoInMapper.xml index 37ab85f9..a7b6f5b3 100644 --- a/op-modules/op-wms/src/main/resources/mapper/wms/WmsOdsWhiteEmbryoInMapper.xml +++ b/op-modules/op-wms/src/main/resources/mapper/wms/WmsOdsWhiteEmbryoInMapper.xml @@ -12,7 +12,7 @@ - + @@ -55,7 +55,7 @@ and Material_Desc = #{materialDesc} and Plan_Date = #{planDate} and Plan_Number = #{planNumber} - and Unit = #{Unit} + and Unit = #{unit} and Reality_Number = #{realityNumber} and Order_Status = #{orderStatus} and User_Defined1 = #{userDefined1} @@ -113,7 +113,7 @@ Material_Desc, Plan_Date, Plan_Number, - Unit, + Unit, Reality_Number, Order_Status, User_Defined1, @@ -149,7 +149,7 @@ #{materialDesc}, #{planDate}, #{planNumber}, - #{Unit}, + #{unit}, #{realityNumber}, #{orderStatus}, #{userDefined1}, @@ -188,7 +188,7 @@ Material_Desc = #{materialDesc}, Plan_Date = #{planDate}, Plan_Number = #{planNumber}, - Unit = #{Unit}, + Unit = #{unit}, Reality_Number = #{realityNumber}, Order_Status = #{orderStatus}, User_Defined1 = #{userDefined1}, @@ -238,4 +238,43 @@ Last_Update_Date = now() where Order_Code=#{orderCode} + + + + +