highway
mengjiao 12 months ago
parent e0a5330e98
commit aec89ada0c

@ -2,6 +2,7 @@ package com.op.wms.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.op.wms.domain.WmsRawOrderInSn;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@ -23,7 +24,7 @@ import com.op.common.core.web.page.TableDataInfo;
/**
* Controller
*
*
* @author Open Platform
* @date 2023-07-06
*/
@ -94,4 +95,50 @@ public class OdsProcureOrderController extends BaseController {
public AjaxResult remove(@PathVariable String[] IDs) {
return toAjax(odsProcureOrderService.deleteOdsProcureOrderByIDs(IDs));
}
/**
*
*/
@PostMapping("/PurchaseOrderPda")
public AjaxResult PurchaseOrderPda(@RequestBody OdsProcureOrder odsProcureOrder) {
List<OdsProcureOrder> orderList =odsProcureOrderService.PurchaseOrderPda(odsProcureOrder);
return success(orderList);
}
//**
/**
*
* @param odsProcureOrder
* @return
*/
@PostMapping("/PurchaseOrderOutboundTask")
public AjaxResult PurchaseOrderOutboundTask(@RequestBody OdsProcureOrder odsProcureOrder) {
List<OdsProcureOrder> orderList =odsProcureOrderService.PurchaseOrderPda(odsProcureOrder);
return success(orderList);
}
/**
*
*/
@PostMapping("/PurchaseOrderdeliPda")
public AjaxResult PurchaseOrderdeliPda(@RequestBody OdsProcureOrder odsProcureOrder) {
int tem =odsProcureOrderService.PurchaseOrderdeliPda(odsProcureOrder);
return success(tem);
}
/**
*
*/
@PostMapping("/PurchaseOrderdetailPda")
public AjaxResult PurchaseOrderdetailPda(@RequestBody WmsRawOrderInSn wmsRawOrderInSn) {
List<WmsRawOrderInSn> wmsRawOrderInSns =odsProcureOrderService.PurchaseOrderdetailPda(wmsRawOrderInSn);
return success(wmsRawOrderInSns);
}
}

@ -36,7 +36,7 @@ public class WmsOdsWhiteEmbryoInController extends BaseController {
/**
*
*/
@RequiresPermissions("wms:wmsEmbryoin:list")
// @RequiresPermissions("wms:wmsEmbryoin:list")
@GetMapping("/list")
public TableDataInfo list(WmsOdsWhiteEmbryoIn wmsOdsWhiteEmbryoIn) {
startPage();
@ -47,7 +47,7 @@ public class WmsOdsWhiteEmbryoInController extends BaseController {
/**
*
*/
@RequiresPermissions("wms:wmsEmbryoin:export")
//@RequiresPermissions("wms:wmsEmbryoin:export")
@Log(title = "白胚入库单", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, WmsOdsWhiteEmbryoIn wmsOdsWhiteEmbryoIn) {
@ -59,7 +59,7 @@ public class WmsOdsWhiteEmbryoInController extends BaseController {
/**
*
*/
@RequiresPermissions("wms:wmsEmbryoin:query")
//@RequiresPermissions("wms:wmsEmbryoin:query")
@GetMapping(value = "/{ID}")
public AjaxResult getInfo(@PathVariable("ID") String ID) {
return success(wmsOdsWhiteEmbryoInService.selectWmsOdsWhiteEmbryoInByID(ID));
@ -76,7 +76,7 @@ public class WmsOdsWhiteEmbryoInController extends BaseController {
/**
*
*/
@RequiresPermissions("wms:wmsEmbryoin:edit")
//@RequiresPermissions("wms:wmsEmbryoin:edit")
@Log(title = "白胚入库单", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody WmsOdsWhiteEmbryoIn wmsOdsWhiteEmbryoIn) {
@ -86,7 +86,7 @@ public class WmsOdsWhiteEmbryoInController extends BaseController {
/**
*
*/
@RequiresPermissions("wms:wmsEmbryoin:remove")
//@RequiresPermissions("wms:wmsEmbryoin:remove")
@Log(title = "白胚入库单", businessType = BusinessType.DELETE)
@DeleteMapping("/{IDs}")
public AjaxResult remove(@PathVariable String[] IDs) {

@ -0,0 +1,107 @@
package com.op.wms.controller;
import com.op.common.core.utils.StringUtils;
import com.op.wms.domain.WmsToWCSDTO;
import com.op.wms.service.IWmsToWCSInterfaceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/WmsToWCSInterface")
public class WmsToWCSInterfaceContorller {
@Autowired
private IWmsToWCSInterfaceService wmsToWCSInterfaceService;
/**
*
* @param wcsdto
* @return
*/
@PostMapping("/blankRequestForStorage")
public WmsToWCSDTO blankRequestForStorage(@RequestBody WmsToWCSDTO wcsdto) {
if(StringUtils.isBlank(wcsdto.getFactory())){
wcsdto.setCode("1");
wcsdto.setMessage("factory is not null");
return wcsdto;
}
return wmsToWCSInterfaceService.requestMaterialLoadNo(wcsdto);
}
/**
*
* @param wcsdto
* @return
*/
@PostMapping("/blankStorageOrTransferCompleted")
public WmsToWCSDTO blankStorageOrTransferCompleted(@RequestBody WmsToWCSDTO wcsdto) {
if(StringUtils.isBlank(wcsdto.getFactory())){
wcsdto.setCode("1");
wcsdto.setMessage("factory is not null");
return wcsdto;
}
return wmsToWCSInterfaceService.blankStorageOrTransferCompleted(wcsdto);
}
/**
*
* @param wcsdto
* @return
*/
@PostMapping("/blankInventoryStatusUpdate")
public WmsToWCSDTO blankInventoryStatusUpdate(@RequestBody WmsToWCSDTO wcsdto) {
if(StringUtils.isBlank(wcsdto.getFactory())){
wcsdto.setCode("1");
wcsdto.setMessage("factory is not null");
return wcsdto;
}
return wmsToWCSInterfaceService.blankInventoryStatusUpdate(wcsdto);
}
/**
*
* @param wcsdto
* @return
*/
@PostMapping("/issuanceOfBlankOutboundDemand")
public WmsToWCSDTO issuanceOfBlankOutboundDemand(@RequestBody WmsToWCSDTO wcsdto) {
if(StringUtils.isBlank(wcsdto.getFactory())){
wcsdto.setCode("1");
wcsdto.setMessage("factory is not null");
return wcsdto;
}
return wmsToWCSInterfaceService.issuanceOfBlankOutboundDemand(wcsdto);
}
// /**
// * 白坯指定托盘出库----WMS 指定托盘号出库,
// * @param wcsdto
// * @return
// */
// @PostMapping("/blankDesignatedPalletOutbound")
// public WmsToWCSDTO blankDesignatedPalletOutbound(@RequestBody WmsToWCSDTO wcsdto) {
// if(StringUtils.isBlank(wcsdto.getFactory())){
// wcsdto.setCode("1");
// wcsdto.setMessage("factory is not null");
// return wcsdto;
// }
// return wmsToWCSInterfaceService.blankDesignatedPalletOutbound(wcsdto);
// }
/**
*
* @param wcsdto
* @return
*/
@PostMapping("/blankOutboundCompleted")
public WmsToWCSDTO blankOutboundCompleted(@RequestBody WmsToWCSDTO wcsdto) {
if(StringUtils.isBlank(wcsdto.getFactory())){
wcsdto.setCode("1");
wcsdto.setMessage("factory is not null");
return wcsdto;
}
return wmsToWCSInterfaceService.blankDesignatedPalletOutbound(wcsdto);
}
}

@ -0,0 +1,133 @@
package com.op.wms.controller;
import com.op.common.core.utils.StringUtils;
import com.op.common.core.web.domain.AjaxResult;
import com.op.wms.domain.OdsProcureOrder;
import com.op.wms.domain.WmsRawOrderInSn;
import com.op.wms.domain.WmsToWCSDTO;
import com.op.wms.service.IOdsProcureOrderService;
import com.op.wms.service.IWmsToWCSmissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import static com.op.common.core.web.domain.AjaxResult.success;
@RestController
@RequestMapping("/WmsToWCSmission")
public class WmsToWCSmissionController {
@Autowired
private IWmsToWCSmissionService iWmsToWCSmissionService;
@Autowired
private IOdsProcureOrderService odsProcureOrderService;
/**
* ---
* @param wcsdto
* @return
*/
@PostMapping("/packingMaterialsRequestInbound")
public WmsToWCSDTO PackagingStorage(@RequestBody WmsToWCSDTO wcsdto) {
if(StringUtils.isBlank(wcsdto.getFactory())){
wcsdto.setCode("1");
wcsdto.setMessage("factory is not null");
return wcsdto;
}
return iWmsToWCSmissionService.packagingStorage(wcsdto);
}
//
//packingMaterialsInboundCompleted
/**
*
* @param wcsdto
* @return
*/
@PostMapping("/packingMaterialsInboundCompleted")
public WmsToWCSDTO blankStorageOrTransferCompleted(@RequestBody WmsToWCSDTO wcsdto) {
if(StringUtils.isBlank(wcsdto.getFactory())){
wcsdto.setCode("1");
wcsdto.setMessage("factory is not null");
return wcsdto;
}
return iWmsToWCSmissionService.packingMaterialsInboundCompleted(wcsdto);
}
//packingMaterialsOutBoundCompleted
/**
*
* @param wcsdto
* @return
*/
@PostMapping("/packingMaterialsOutBoundCompleted")
public WmsToWCSDTO packingMaterialsOutBoundCompleted(@RequestBody WmsToWCSDTO wcsdto) {
if(StringUtils.isBlank(wcsdto.getFactory())){
wcsdto.setCode("1");
wcsdto.setMessage("factory is not null");
return wcsdto;
}
return iWmsToWCSmissionService.packingMaterialsOutBoundCompleted(wcsdto);
}
/**
*
*/
@PostMapping("/PurchaseOrderPda")
public AjaxResult PurchaseOrderPda(@RequestBody OdsProcureOrder odsProcureOrder) {
List<OdsProcureOrder> orderList =odsProcureOrderService.PurchaseOrderPda(odsProcureOrder);
return success(orderList);
}
/**
*
*/
@PostMapping("/PurchaseOrderdeliPda")
public AjaxResult PurchaseOrderdeliPda(@RequestBody OdsProcureOrder odsProcureOrder) {
int tem =odsProcureOrderService.PurchaseOrderdeliPda(odsProcureOrder);
return success(tem);
}
/**
*
*/
@PostMapping("/PurchaseOrderdetailPda")
public AjaxResult PurchaseOrderdetailPda(@RequestBody WmsRawOrderInSn wmsRawOrderInSn) {
List<WmsRawOrderInSn> wmsRawOrderInSns =odsProcureOrderService.PurchaseOrderdetailPda(wmsRawOrderInSn);
return success(wmsRawOrderInSns);
}
/**
*
* userDefined1;//备用1收货入库
*/
@PostMapping("/PurchaseOrderWarehousingPda")
public AjaxResult PurchaseOrderWarehousingPda(@RequestBody WmsRawOrderInSn wmsRawOrderInSn) {
List<WmsRawOrderInSn> wmsRawOrderInSns =odsProcureOrderService.PurchaseOrderWarehousingPda(wmsRawOrderInSn);
//采购入库(PO)
return success(wmsRawOrderInSns);
}
/**
*
* @param wmsRawOrderInSn
* @return
*/
@PostMapping("/PurchaseOrderRKPda")
public AjaxResult PurchaseOrderRKPda(@RequestBody WmsRawOrderInSn wmsRawOrderInSn) {
odsProcureOrderService.PurchaseOrderRKPda(wmsRawOrderInSn);
//采购入库(PO)
return success();
}
}

@ -3,6 +3,7 @@ package com.op.wms.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.op.common.core.annotation.Excel;
@ -14,15 +15,61 @@ import com.op.common.core.web.domain.BaseEntity;
* @author Open Platform
* @date 2023-07-06
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
public class OdsProcureOrder extends BaseEntity {
private static final long serialVersionUID = 1L;
/** ID */
private String ID;
@Excel(name = "工厂编码")
private String factoryCode;
public String getFactoryCode() {
return factoryCode;
}
public void setFactoryCode(String factoryCode) {
this.factoryCode = factoryCode;
}
/** 工厂编码 */
@Excel(name = "工厂编码")
private String siteCode;
/** 仓库编码--收货仓库 */
@Excel(name = "仓库编码")
private String whCode;
/** ID */
private String ID;
public String getWhCode() {
return whCode;
}
/** 托盘号--托盘号 */
@Excel(name = "托盘号")
private String sn;
public String getSn() {
return sn;
}
public void setSn(String sn) {
this.sn = sn;
}
public void setWhCode(String whCode) {
this.whCode = whCode;
}
/** 采购订单行项目 */
@Excel(name = "采购订单行项目")
private String poLine;
public String getPoLine() {
return poLine;
}
public void setPoLine(String poLine) {
this.poLine = poLine;
}
/** 采购单号 */
@Excel(name = "采购单号")
@ -31,6 +78,17 @@ public class OdsProcureOrder extends BaseEntity {
/** 物料编码 */
@Excel(name = "物料编码")
private String materialCode;
/** 批次号 */
@Excel(name = "批次号")
private String incomeBatchNo;
public String getIncomeBatchNo() {
return incomeBatchNo;
}
public void setIncomeBatchNo(String incomeBatchNo) {
this.incomeBatchNo = incomeBatchNo;
}
/** 物料描述 */
@Excel(name = "物料描述")

@ -0,0 +1,80 @@
package com.op.wms.domain;
import com.op.common.core.web.domain.BaseEntity;
import java.math.BigDecimal;
public class OrderLine extends BaseEntity {
private String orderNo;//订单号
private String warehouseNo; //仓库编号
private String orderLineNo;//订单行号
private String sku;//物料编码
private String batchNo; //批次号
private BigDecimal qty;//数量
private String qualityStatus;//质检状态1合格2不合格
private String stationNo;//包装线
public String getOrderNo() {
return orderNo;
}
public void setOrderNo(String orderNo) {
this.orderNo = orderNo;
}
public String getWarehouseNo() {
return warehouseNo;
}
public void setWarehouseNo(String warehouseNo) {
this.warehouseNo = warehouseNo;
}
public String getOrderLineNo() {
return orderLineNo;
}
public void setOrderLineNo(String orderLineNo) {
this.orderLineNo = orderLineNo;
}
public String getSku() {
return sku;
}
public void setSku(String sku) {
this.sku = sku;
}
public String getBatchNo() {
return batchNo;
}
public void setBatchNo(String batchNo) {
this.batchNo = batchNo;
}
public BigDecimal getQty() {
return qty;
}
public void setQty(BigDecimal qty) {
this.qty = qty;
}
public String getQualityStatus() {
return qualityStatus;
}
public void setQualityStatus(String qualityStatus) {
this.qualityStatus = qualityStatus;
}
public String getStationNo() {
return stationNo;
}
public void setStationNo(String stationNo) {
this.stationNo = stationNo;
}
}

@ -3,6 +3,7 @@ package com.op.wms.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.op.common.core.annotation.Excel;
@ -10,20 +11,33 @@ import com.op.common.core.web.domain.BaseEntity;
/**
* wms_raw_order_in_sn
*
*
* @author Open Platform
* @date 2023-08-30
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
public class WmsRawOrderInSn extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 唯一序列号 */
private Long rawOrderInSnId;
private String rawOrderInSnId;
/** 仓库编码 */
/** 仓库编码--收货仓库 */
@Excel(name = "仓库编码")
private String whCode;
/** 批次号 */
@Excel(name = "批次号")
private String incomeBatchNo;
public String getIncomeBatchNo() {
return incomeBatchNo;
}
public void setIncomeBatchNo(String incomeBatchNo) {
this.incomeBatchNo = incomeBatchNo;
}
/** 库区编码 */
@Excel(name = "库区编码")
private String waCode;
@ -52,7 +66,7 @@ public class WmsRawOrderInSn extends BaseEntity {
@Excel(name = "物料描述")
private String materialDesc;
/** 托盘号 */
/** 托盘号--托盘号 */
@Excel(name = "托盘号")
private String sn;
@ -62,7 +76,7 @@ public class WmsRawOrderInSn extends BaseEntity {
/** 备用1 */
@Excel(name = "备用1")
private String userDefined1;
private String userDefined1;//备用1收货入库
/** 备用2 */
@Excel(name = "备用2")
@ -118,7 +132,7 @@ public class WmsRawOrderInSn extends BaseEntity {
@Excel(name = "有效标记")
private String activeFlag;
/** $column.columnComment */
/** $column.columnComment 工厂*/
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String factoryCode;
@ -126,11 +140,11 @@ public class WmsRawOrderInSn extends BaseEntity {
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String sapFactoryCode;
public void setRawOrderInSnId(Long rawOrderInSnId) {
public void setRawOrderInSnId(String rawOrderInSnId) {
this.rawOrderInSnId = rawOrderInSnId;
}
public Long getRawOrderInSnId() {
public String getRawOrderInSnId() {
return rawOrderInSnId;
}
public void setWhCode(String whCode) {

@ -0,0 +1,213 @@
package com.op.wms.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.op.common.core.web.domain.BaseEntity;
import java.util.Date;
import java.util.List;
@JsonInclude(JsonInclude.Include.NON_NULL)
public class WmsToWCSDTO extends BaseEntity {
private String reqCode;//请求ID
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date reqTime;//请求时间
private String planNo;
private List<OrderLine>orderLines;
private String code;//返回代码
private String location; //库位编码
private String message;//返回信息
private String colQty;//列数
private String factory;
private String qty;//数量(列数)
private String sku;//物料编码
private String qualityStatus;//质检状态 1合格2不合格
private String loadNo;
private String batchNo; //批次号
private String stationType;//收坯机台编号
private String stationNo;
private String rfidNo;//rfid编号
private String spec;
private String productionState;
private String warehouseNo;//仓库编号
private String orderNo;//订单号
private String workorderCode;
public String getOrderNo() {
return orderNo;
}
public void setOrderNo(String orderNo) {
this.orderNo = orderNo;
}
public String getWorkorderCode() {
return workorderCode;
}
public List<OrderLine> getOrderLines() {
return orderLines;
}
public void setOrderLines(List<OrderLine> orderLines) {
this.orderLines = orderLines;
}
public void setWorkorderCode(String workorderCode) {
this.workorderCode = workorderCode;
}
public String getWarehouseNo() {
return warehouseNo;
}
public void setWarehouseNo(String warehouseNo) {
this.warehouseNo = warehouseNo;
}
public String getLocation() {
return location;
}
public void setLocation(String location) {
this.location = location;
}
public String getReqCode() {
return reqCode;
}
public void setReqCode(String reqCode) {
this.reqCode = reqCode;
}
public Date getReqTime() {
return reqTime;
}
public void setReqTime(Date reqTime) {
this.reqTime = reqTime;
}
public String getPlanNo() {
return planNo;
}
public void setPlanNo(String planNo) {
this.planNo = planNo;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public String getColQty() {
return colQty;
}
public void setColQty(String colQty) {
this.colQty = colQty;
}
public String getFactory() {
return factory;
}
public void setFactory(String factory) {
this.factory = factory;
}
public String getQty() {
return qty;
}
public void setQty(String qty) {
this.qty = qty;
}
public String getSku() {
return sku;
}
public void setSku(String sku) {
this.sku = sku;
}
public String getQualityStatus() {
return qualityStatus;
}
public void setQualityStatus(String qualityStatus) {
this.qualityStatus = qualityStatus;
}
public String getLoadNo() {
return loadNo;
}
public void setLoadNo(String loadNo) {
this.loadNo = loadNo;
}
public String getBatchNo() {
return batchNo;
}
public void setBatchNo(String batchNo) {
this.batchNo = batchNo;
}
public String getStationType() {
return stationType;
}
public void setStationType(String stationType) {
this.stationType = stationType;
}
public String getStationNo() {
return stationNo;
}
public void setStationNo(String stationNo) {
this.stationNo = stationNo;
}
public String getRfidNo() {
return rfidNo;
}
public void setRfidNo(String rfidNo) {
this.rfidNo = rfidNo;
}
public String getSpec() {
return spec;
}
public void setSpec(String spec) {
this.spec = spec;
}
public String getProductionState() {
return productionState;
}
public void setProductionState(String productionState) {
this.productionState = productionState;
}
}

@ -6,14 +6,14 @@ import com.op.wms.domain.OdsProcureOrder;
/**
* Mapper
*
*
* @author Open Platform
* @date 2023-07-06
*/
public interface OdsProcureOrderMapper {
/**
*
*
*
* @param ID
* @return
*/
@ -21,7 +21,7 @@ public interface OdsProcureOrderMapper {
/**
*
*
*
* @param odsProcureOrder
* @return
*/
@ -29,7 +29,7 @@ public interface OdsProcureOrderMapper {
/**
*
*
*
* @param odsProcureOrder
* @return
*/
@ -37,7 +37,7 @@ public interface OdsProcureOrderMapper {
/**
*
*
*
* @param odsProcureOrder
* @return
*/
@ -45,7 +45,7 @@ public interface OdsProcureOrderMapper {
/**
*
*
*
* @param ID
* @return
*/
@ -53,9 +53,11 @@ public interface OdsProcureOrderMapper {
/**
*
*
*
* @param IDs
* @return
*/
public int deleteOdsProcureOrderByIDs(String[] IDs);
Integer updateRealityNuById(OdsProcureOrder odsProcureOrder);
}

@ -58,4 +58,6 @@ public interface WmsOdsEmStorageNewsMapper {
* @return
*/
public int deleteWmsOdsEmStorageNewsByStorageIds(String[] storageIds);
void updateAdd(WmsOdsEmStorageNews wmsOdsEmStorageNews);
}

@ -2,18 +2,19 @@ package com.op.wms.mapper;
import java.util.List;
import com.op.wms.domain.WmsOdsEmStorageNews;
import com.op.wms.domain.WmsOdsMateStorageNews;
/**
* Mapper
*
*
* @author Open Platform
* @date 2023-08-30
*/
public interface WmsOdsMateStorageNewsMapper {
/**
*
*
*
* @param storageId
* @return
*/
@ -21,7 +22,7 @@ public interface WmsOdsMateStorageNewsMapper {
/**
*
*
*
* @param wmsOdsMateStorageNews
* @return
*/
@ -29,7 +30,7 @@ public interface WmsOdsMateStorageNewsMapper {
/**
*
*
*
* @param wmsOdsMateStorageNews
* @return
*/
@ -37,7 +38,7 @@ public interface WmsOdsMateStorageNewsMapper {
/**
*
*
*
* @param wmsOdsMateStorageNews
* @return
*/
@ -45,7 +46,7 @@ public interface WmsOdsMateStorageNewsMapper {
/**
*
*
*
* @param storageId
* @return
*/
@ -53,9 +54,11 @@ public interface WmsOdsMateStorageNewsMapper {
/**
*
*
*
* @param storageIds
* @return
*/
public int deleteWmsOdsMateStorageNewsByStorageIds(String[] storageIds);
WmsOdsMateStorageNews selectByWhCodeAndMate(WmsOdsEmStorageNews wmsOdsEmStorageNews);
}

@ -2,18 +2,19 @@ package com.op.wms.mapper;
import java.util.List;
import com.op.wms.domain.WmsOdsEmStorageNews;
import com.op.wms.domain.WmsOdsMateStorageNewsSn;
/**
* Mapper
*
* Mapper
*
* @author Open Platform
* @date 2023-08-30
*/
public interface WmsOdsMateStorageNewsSnMapper {
/**
*
*
*
* @param mateOrderInSnId
* @return
*/
@ -21,7 +22,7 @@ public interface WmsOdsMateStorageNewsSnMapper {
/**
*
*
*
* @param wmsOdsMateStorageNewsSn
* @return
*/
@ -29,7 +30,7 @@ public interface WmsOdsMateStorageNewsSnMapper {
/**
*
*
*
* @param wmsOdsMateStorageNewsSn
* @return
*/
@ -37,7 +38,7 @@ public interface WmsOdsMateStorageNewsSnMapper {
/**
*
*
*
* @param wmsOdsMateStorageNewsSn
* @return
*/
@ -45,7 +46,7 @@ public interface WmsOdsMateStorageNewsSnMapper {
/**
*
*
*
* @param mateOrderInSnId
* @return
*/
@ -53,9 +54,13 @@ public interface WmsOdsMateStorageNewsSnMapper {
/**
*
*
*
* @param mateOrderInSnIds
* @return
*/
public int deleteWmsOdsMateStorageNewsSnByMateOrderInSnIds(Long[] mateOrderInSnIds);
void updateAdd(WmsOdsEmStorageNews wmsOdsEmStorageNews);
}

@ -6,14 +6,14 @@ import com.op.wms.domain.WmsOdsWhiteEmbryoIn;
/**
* Mapper
*
*
* @author Open Platform
* @date 2023-07-20
*/
public interface WmsOdsWhiteEmbryoInMapper {
/**
*
*
*
* @param ID
* @return
*/
@ -21,7 +21,7 @@ public interface WmsOdsWhiteEmbryoInMapper {
/**
*
*
*
* @param wmsOdsWhiteEmbryoIn
* @return
*/
@ -29,7 +29,7 @@ public interface WmsOdsWhiteEmbryoInMapper {
/**
*
*
*
* @param wmsOdsWhiteEmbryoIn
* @return
*/
@ -37,7 +37,7 @@ public interface WmsOdsWhiteEmbryoInMapper {
/**
*
*
*
* @param wmsOdsWhiteEmbryoIn
* @return
*/
@ -45,7 +45,7 @@ public interface WmsOdsWhiteEmbryoInMapper {
/**
*
*
*
* @param ID
* @return
*/
@ -53,9 +53,13 @@ public interface WmsOdsWhiteEmbryoInMapper {
/**
*
*
*
* @param IDs
* @return
*/
public int deleteWmsOdsWhiteEmbryoInByIDs(String[] IDs);
WmsOdsWhiteEmbryoIn selectWmsOdsWhiteEmbryoInByWorkorderCode(String workorderCode);
void updateWmsOdsWhiteEmbryoInByOrderCode(WmsOdsWhiteEmbryoIn wmsOdsWhiteEmbryoIn);
}

@ -3,17 +3,18 @@ package com.op.wms.mapper;
import java.util.List;
import com.op.wms.domain.WmsRawOrderIn;
import com.op.wms.domain.WmsToWCSDTO;
/**
* Mapper
*
*
* @author Open Platform
* @date 2023-08-30
*/
public interface WmsRawOrderInMapper {
/**
*
*
*
* @param rawOrderInId
* @return
*/
@ -21,7 +22,7 @@ public interface WmsRawOrderInMapper {
/**
*
*
*
* @param wmsRawOrderIn
* @return
*/
@ -29,7 +30,7 @@ public interface WmsRawOrderInMapper {
/**
*
*
*
* @param wmsRawOrderIn
* @return
*/
@ -37,7 +38,7 @@ public interface WmsRawOrderInMapper {
/**
*
*
*
* @param wmsRawOrderIn
* @return
*/
@ -45,7 +46,7 @@ public interface WmsRawOrderInMapper {
/**
*
*
*
* @param rawOrderInId
* @return
*/
@ -53,9 +54,11 @@ public interface WmsRawOrderInMapper {
/**
*
*
*
* @param rawOrderInIds
* @return
*/
public int deleteWmsRawOrderInByRawOrderInIds(String[] rawOrderInIds);
WmsToWCSDTO packagingStorage(WmsToWCSDTO wcsdto);
}

@ -3,17 +3,18 @@ package com.op.wms.mapper;
import java.util.List;
import com.op.wms.domain.WmsRawOrderInSn;
import com.op.wms.domain.WmsToWCSDTO;
/**
* Mapper
*
*
* @author Open Platform
* @date 2023-08-30
*/
public interface WmsRawOrderInSnMapper {
/**
*
*
*
* @param rawOrderInSnId
* @return
*/
@ -21,7 +22,7 @@ public interface WmsRawOrderInSnMapper {
/**
*
*
*
* @param wmsRawOrderInSn
* @return
*/
@ -29,7 +30,7 @@ public interface WmsRawOrderInSnMapper {
/**
*
*
*
* @param wmsRawOrderInSn
* @return
*/
@ -37,7 +38,7 @@ public interface WmsRawOrderInSnMapper {
/**
*
*
*
* @param wmsRawOrderInSn
* @return
*/
@ -45,7 +46,7 @@ public interface WmsRawOrderInSnMapper {
/**
*
*
*
* @param rawOrderInSnId
* @return
*/
@ -53,9 +54,13 @@ public interface WmsRawOrderInSnMapper {
/**
*
*
*
* @param rawOrderInSnIds
* @return
*/
public int deleteWmsRawOrderInSnByRawOrderInSnIds(Long[] rawOrderInSnIds);
WmsRawOrderInSn selectwmsRfidNo(WmsToWCSDTO wmsToWCSDTO);
void updateU1Byid(WmsRawOrderInSn wmsRawOrderInSn);
}

@ -0,0 +1,7 @@
package com.op.wms.mapper;
import com.op.wms.domain.WmsToWCSDTO;
public interface WmsToWCSInterfaceMapper {
WmsToWCSDTO selectWmsToWCSDTO(WmsToWCSDTO wcsdto);
}

@ -2,17 +2,18 @@ package com.op.wms.service;
import java.util.List;
import com.op.wms.domain.OdsProcureOrder;
import com.op.wms.domain.WmsRawOrderInSn;
/**
* Service
*
*
* @author Open Platform
* @date 2023-07-06
*/
public interface IOdsProcureOrderService {
/**
*
*
*
* @param ID
* @return
*/
@ -20,7 +21,7 @@ public interface IOdsProcureOrderService {
/**
*
*
*
* @param odsProcureOrder
* @return
*/
@ -28,7 +29,7 @@ public interface IOdsProcureOrderService {
/**
*
*
*
* @param odsProcureOrder
* @return
*/
@ -36,7 +37,7 @@ public interface IOdsProcureOrderService {
/**
*
*
*
* @param odsProcureOrder
* @return
*/
@ -44,7 +45,7 @@ public interface IOdsProcureOrderService {
/**
*
*
*
* @param IDs
* @return
*/
@ -52,9 +53,19 @@ public interface IOdsProcureOrderService {
/**
*
*
*
* @param ID
* @return
*/
public int deleteOdsProcureOrderByID(String ID);
List<OdsProcureOrder> PurchaseOrderPda(OdsProcureOrder odsProcureOrder);
int PurchaseOrderdeliPda(OdsProcureOrder odsProcureOrder);
List<WmsRawOrderInSn> PurchaseOrderdetailPda(WmsRawOrderInSn wmsRawOrderInSn);
List<WmsRawOrderInSn> PurchaseOrderWarehousingPda(WmsRawOrderInSn wmsRawOrderInSn);
void PurchaseOrderRKPda(WmsRawOrderInSn wmsRawOrderInSn);
}

@ -0,0 +1,15 @@
package com.op.wms.service;
import com.op.wms.domain.WmsToWCSDTO;
public interface IWmsToWCSInterfaceService {
WmsToWCSDTO requestMaterialLoadNo(WmsToWCSDTO wcsdto);
WmsToWCSDTO blankStorageOrTransferCompleted(WmsToWCSDTO wcsdto);
WmsToWCSDTO blankInventoryStatusUpdate(WmsToWCSDTO wcsdto);
WmsToWCSDTO issuanceOfBlankOutboundDemand(WmsToWCSDTO wcsdto);
WmsToWCSDTO blankDesignatedPalletOutbound(WmsToWCSDTO wcsdto);
}

@ -0,0 +1,11 @@
package com.op.wms.service;
import com.op.wms.domain.WmsToWCSDTO;
public interface IWmsToWCSmissionService {
WmsToWCSDTO packagingStorage(WmsToWCSDTO wcsdto);
WmsToWCSDTO packingMaterialsInboundCompleted(WmsToWCSDTO wcsdto);
WmsToWCSDTO packingMaterialsOutBoundCompleted(WmsToWCSDTO wcsdto);
}

@ -1,12 +1,19 @@
package com.op.wms.service.impl;
import java.math.BigDecimal;
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.utils.uuid.IdUtils;
import com.op.wms.domain.*;
import com.op.wms.mapper.WmsOdsMateStorageNewsMapper;
import com.op.wms.mapper.WmsOdsMateStorageNewsSnMapper;
import com.op.wms.mapper.WmsRawOrderInSnMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.op.wms.mapper.OdsProcureOrderMapper;
import com.op.wms.domain.OdsProcureOrder;
import com.op.wms.service.IOdsProcureOrderService;
/**
@ -19,6 +26,12 @@ import com.op.wms.service.IOdsProcureOrderService;
public class OdsProcureOrderServiceImpl implements IOdsProcureOrderService {
@Autowired
private OdsProcureOrderMapper odsProcureOrderMapper;
@Autowired
private WmsRawOrderInSnMapper wmsRawOrderInSnMapper;
@Autowired
private WmsOdsMateStorageNewsSnMapper wmsOdsMateStorageNewsSnMapper;
@Autowired
private WmsOdsMateStorageNewsMapper wmsOdsMateStorageNewsMapper;
/**
*
@ -91,4 +104,118 @@ public class OdsProcureOrderServiceImpl implements IOdsProcureOrderService {
public int deleteOdsProcureOrderByID(String ID) {
return odsProcureOrderMapper.deleteOdsProcureOrderByID(ID);
}
@Override
// @DS("#header.poolName")
public List<OdsProcureOrder> PurchaseOrderPda(OdsProcureOrder odsProcureOrder) {
DynamicDataSourceContextHolder.push("ds_" + odsProcureOrder.getFactoryCode());
return odsProcureOrderMapper.selectOdsProcureOrderList(odsProcureOrder);
}
@Override
//@DS("#header.poolName")
public int PurchaseOrderdeliPda(OdsProcureOrder odsProcureOrder) {
//收货记录rawOrderInSnId。修改收货数量
DynamicDataSourceContextHolder.push("ds_" + odsProcureOrder.getFactoryCode());
OdsProcureOrder order= odsProcureOrderMapper.selectOdsProcureOrderByID(odsProcureOrder.getID());
//wms_raw_order_in_sn
WmsRawOrderInSn wmsRawOrderInSn=new WmsRawOrderInSn();
wmsRawOrderInSn.setRawOrderInSnId(IdUtils.fastSimpleUUID());
wmsRawOrderInSn.setUserDefined1("1");//出入库
wmsRawOrderInSn.setUserDefined2(odsProcureOrder.getIncomeBatchNo());//批次
wmsRawOrderInSn.setWhCode(odsProcureOrder.getWhCode());//厂库编号
wmsRawOrderInSn.setPoNo(order.getProcureCode());//采购单号
// wmsRawOrderInSn.setPoLine(odsProcureOrder.getPoLine());//行项目
wmsRawOrderInSn.setMaterialCode(odsProcureOrder.getMaterialCode());
wmsRawOrderInSn.setMaterialDesc(odsProcureOrder.getMaterialDesc());
wmsRawOrderInSn.setAmount(odsProcureOrder.getPlanNumber());
wmsRawOrderInSn.setCreateBy(odsProcureOrder.getCreateBy());
wmsRawOrderInSn.setGmtCreate(new Date());
wmsRawOrderInSn.setActiveFlag("1");
wmsRawOrderInSn.setUserDefined4(order.getUnit());//单位
wmsRawOrderInSn.setSn(odsProcureOrder.getSn());//托盘号
wmsRawOrderInSn.setFactoryCode(odsProcureOrder.getSiteCode());
wmsRawOrderInSn.setUserDefined3(order.getID());
wmsRawOrderInSnMapper.insertWmsRawOrderInSn(wmsRawOrderInSn);
//插入收货记录
//如果收货完成了的话,就插入信息收货完成
odsProcureOrder.setOrderStatus("1");
BigDecimal result =order.getRealityNumber().add(odsProcureOrder.getPlanNumber());
if (result.equals(order.getPlanNumber())){
odsProcureOrder.setOrderStatus("2");
}
Integer tem= odsProcureOrderMapper.updateRealityNuById(odsProcureOrder);
return tem;
}
@Override
//@DS("#header.poolName")
public List<WmsRawOrderInSn> PurchaseOrderdetailPda(WmsRawOrderInSn wmsRawOrderInSn) {
DynamicDataSourceContextHolder.push("ds_" + wmsRawOrderInSn.getFactoryCode());
wmsRawOrderInSn.setActiveFlag("1");
//u3备注
return wmsRawOrderInSnMapper.selectWmsRawOrderInSnList(wmsRawOrderInSn);
}
@Override
public List<WmsRawOrderInSn> PurchaseOrderWarehousingPda(WmsRawOrderInSn wmsRawOrderInSn) {
DynamicDataSourceContextHolder.push("ds_" + wmsRawOrderInSn.getFactoryCode());
wmsRawOrderInSn.setActiveFlag("1");
//u3备注
return wmsRawOrderInSnMapper.selectWmsRawOrderInSnList(wmsRawOrderInSn);
}
@Override
public void PurchaseOrderRKPda(WmsRawOrderInSn wmsRawOrderInSn) {
//入库//修改备用1为2
DynamicDataSourceContextHolder.push("ds_" + wmsRawOrderInSn.getFactoryCode());
//判断如果收过就不能收了
// if("2".equals(wmsRawOrderInSn.getUserDefined1())){//已经入库--前端判断吧
//
// }
WmsOdsMateStorageNewsSn wmsOdsMateStorageNewsSn=new WmsOdsMateStorageNewsSn();
wmsOdsMateStorageNewsSn.setWhCode(wmsRawOrderInSn.getWhCode());//仓库编码
wmsOdsMateStorageNewsSn.setWlCode(wmsRawOrderInSn.getWlCode());//库位编码
wmsOdsMateStorageNewsSn.setMaterialCode(wmsRawOrderInSn.getMaterialCode());
wmsOdsMateStorageNewsSn.setMaterialDesc(wmsRawOrderInSn.getMaterialDesc());
wmsOdsMateStorageNewsSn.setSn(wmsRawOrderInSn.getSn());
wmsOdsMateStorageNewsSn.setAmount(wmsRawOrderInSn.getAmount());
wmsOdsMateStorageNewsSn.setCreateBy(wmsRawOrderInSn.getCreateBy());
wmsOdsMateStorageNewsSn.setGmtCreate(new Date());
wmsOdsMateStorageNewsSn.setFactoryCode(wmsRawOrderInSn.getFactoryCode());
wmsOdsMateStorageNewsSn.setSapFactoryCode(wmsRawOrderInSn.getFactoryCode());
wmsOdsMateStorageNewsSnMapper.insertWmsOdsMateStorageNewsSn(wmsOdsMateStorageNewsSn);
//修改库存
//2,修改库存---/加库存数量-/-冻结数量
WmsOdsEmStorageNews wmsOdsEmStorageNews=new WmsOdsEmStorageNews();
wmsOdsEmStorageNews.setWhCode(wmsRawOrderInSn.getWhCode());//仓库编码
wmsOdsEmStorageNews.setWlCode(wmsRawOrderInSn.getWlCode());//库位编码
wmsOdsEmStorageNews.setMaterialCode(wmsRawOrderInSn.getMaterialCode());
wmsOdsEmStorageNews.setAmount(wmsRawOrderInSn.getAmount());
//添加库存--这个要有个判断有没有这个库存如果没有的话,就插入
WmsOdsMateStorageNews wmsOdsMateStorageNews= wmsOdsMateStorageNewsMapper.selectByWhCodeAndMate(wmsOdsEmStorageNews);
if (wmsOdsMateStorageNews==null){
WmsOdsMateStorageNews wmsOdsMateStorageNews1=new WmsOdsMateStorageNews();
wmsOdsMateStorageNews1.setStorageId(IdUtils.fastSimpleUUID());
wmsOdsMateStorageNews1.setWhCode(wmsRawOrderInSn.getWhCode());
wmsOdsMateStorageNews1.setWlCode(wmsRawOrderInSn.getWlCode());
wmsOdsMateStorageNews1.setAmount(wmsRawOrderInSn.getAmount());
wmsOdsMateStorageNews1.setStorageAmount(wmsRawOrderInSn.getAmount());
wmsOdsMateStorageNews1.setMaterialCode(wmsRawOrderInSn.getMaterialCode());
wmsOdsMateStorageNews1.setMaterialDesc(wmsRawOrderInSn.getMaterialDesc());
wmsOdsMateStorageNews1.setStorageType("BC");
wmsOdsMateStorageNews1.setCreateBy(wmsRawOrderInSn.getCreateBy());
wmsOdsMateStorageNews1.setGmtCreate(new Date());
wmsOdsMateStorageNews1.setActiveFlag("1");
wmsOdsMateStorageNews1.setFactoryCode(wmsRawOrderInSn.getFactoryCode());
wmsOdsMateStorageNews1.setSapFactoryCode(wmsRawOrderInSn.getSapFactoryCode());
wmsOdsMateStorageNews1.setUserDefined1(wmsRawOrderInSn.getUserDefined4());//单位
wmsOdsMateStorageNewsMapper.insertWmsOdsMateStorageNews(wmsOdsMateStorageNews1);
}else {
wmsOdsMateStorageNewsSnMapper.updateAdd(wmsOdsEmStorageNews);
}
wmsRawOrderInSnMapper.updateU1Byid(wmsRawOrderInSn);
//修改库存--加,并且为冻结的,sap过账后再解
}
}

@ -0,0 +1,146 @@
package com.op.wms.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.common.core.utils.uuid.IdUtils;
import com.op.wms.domain.*;
import com.op.wms.mapper.*;
import com.op.wms.service.IWmsToWCSInterfaceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
@Service
public class WmsToWCSInterfaceServiceImpl implements IWmsToWCSInterfaceService {
@Autowired
private WmsToWCSInterfaceMapper wmsToWCSInterfaceMapper;
@Autowired
private WmsOdsWhiteEmbryoInMapper wmsOdsWhiteEmbryoInMapper;
@Autowired
private WmsOdsEmStorageNewsSnMapper wmsOdsEmStorageNewsSnMapper;
@Autowired
private WmsOdsEmStorageNewsMapper wmsOdsEmStorageNewsMapper;
@Autowired
private OdsWhiteEmbryoMapper odsWhiteEmbryoMapper;
@Override
@DS("#header.poolName")
public WmsToWCSDTO requestMaterialLoadNo(WmsToWCSDTO wcsdto) {
WmsToWCSDTO wmsToWCSDTO= wmsToWCSInterfaceMapper.selectWmsToWCSDTO(wcsdto);
// wmsToWCSDTO.set//
wmsToWCSDTO.setCode("0");
wmsToWCSDTO.setReqCode(wcsdto.getReqCode());
wmsToWCSDTO.setMessage("OK");
return wmsToWCSDTO;
}
/**
*
* @param wcsdto
* @return
*/
@Transactional
@Override
@DS("#header.poolName")
public WmsToWCSDTO blankStorageOrTransferCompleted(WmsToWCSDTO wcsdto) {
WmsOdsWhiteEmbryoIn wmsOdsWhiteEmbryoIn1=new WmsOdsWhiteEmbryoIn();
//rfidNo-托盘
WmsToWCSDTO wmsToWCSDTO= wmsToWCSInterfaceMapper.selectWmsToWCSDTO(wcsdto);
//AGV 将白坯放到库内--
String workorderCode= wmsToWCSDTO.getWorkorderCode();//单号
wmsOdsWhiteEmbryoIn1.setOrderCode(workorderCode);
WmsOdsWhiteEmbryoIn wmsOdsWhiteEmbryoIn= wmsOdsWhiteEmbryoInMapper.selectWmsOdsWhiteEmbryoInByWorkorderCode(workorderCode);
String qty = wmsToWCSDTO.getQty();//操作数量
BigDecimal planNumber = wmsOdsWhiteEmbryoIn.getPlanNumber();//计划数量
BigDecimal realityNumber = wmsOdsWhiteEmbryoIn.getRealityNumber();//已入数量
BigDecimal sum = new BigDecimal(qty).add(realityNumber); // 将qty转换为BigDecimal类型并与realityNumber相加
boolean ten = sum.compareTo(planNumber) >= 0; // 判断sum是否大于等于planNumber
if (ten) {
wmsOdsWhiteEmbryoIn1.setOrderStatus("1");
} else {
//小于
wmsOdsWhiteEmbryoIn1.setOrderStatus("2");
}
wmsOdsWhiteEmbryoIn1.setRealityNumber(sum);///操作数量+已入数量
//1,修改订单
wmsOdsWhiteEmbryoInMapper.updateWmsOdsWhiteEmbryoInByOrderCode(wmsOdsWhiteEmbryoIn1);
//2,修改库存---减冻结数量//加库存数量
WmsOdsEmStorageNews wmsOdsEmStorageNews=new WmsOdsEmStorageNews();
wmsOdsEmStorageNews.setWhCode(wcsdto.getWarehouseNo());//仓库编码
wmsOdsEmStorageNews.setWlCode(wcsdto.getLocation());//库位编码
wmsOdsEmStorageNews.setMaterialCode(wmsOdsWhiteEmbryoIn.getMaterialCode());
wmsOdsEmStorageNews.setAmount(new BigDecimal(wmsToWCSDTO.getQty()));
//解冻
wmsOdsEmStorageNewsMapper.updateAdd(wmsOdsEmStorageNews);
//3,添加记录
WmsOdsEmStorageNewsSn wmsOdsEmStorageNewsSn=new WmsOdsEmStorageNewsSn();
wmsOdsEmStorageNewsSn.setWhCode(wcsdto.getWarehouseNo());//仓库编码
wmsOdsEmStorageNewsSn.setWaCode(wcsdto.getLocation());//库区编码
wmsOdsEmStorageNewsSn.setWlCode(wcsdto.getLocation());//库位编码
wmsOdsEmStorageNewsSn.setMaterialCode(wmsOdsWhiteEmbryoIn.getMaterialCode());
wmsOdsEmStorageNewsSn.setMaterialDesc(wmsOdsWhiteEmbryoIn.getMaterialDesc());
wmsOdsEmStorageNewsSn.setSn(wcsdto.getRfidNo());//托盘号
wmsOdsEmStorageNewsSn.setAmount(new BigDecimal(wmsToWCSDTO.getQty()));
wmsOdsEmStorageNewsSn.setCreateTime(new Date());
wmsOdsEmStorageNewsSnMapper.insertWmsOdsEmStorageNewsSn(wmsOdsEmStorageNewsSn);
//
wmsToWCSDTO.setCode("0");
wmsToWCSDTO.setReqCode(wcsdto.getReqCode());
wmsToWCSDTO.setMessage("OK");
return wmsToWCSDTO;
}
@Override
public WmsToWCSDTO blankInventoryStatusUpdate(WmsToWCSDTO wcsdto) {
return null;
}
@Override
public WmsToWCSDTO issuanceOfBlankOutboundDemand(WmsToWCSDTO wcsdto) {
//默认合格即可-- 白坯出库需求下发
WmsToWCSDTO wmsToWCSDTO=new WmsToWCSDTO();
List<OrderLine> orderLineList= wcsdto.getOrderLines();
for (OrderLine orderLine:
orderLineList) {
//少传字段
orderLine.setOrderNo(wcsdto.getOrderNo());
orderLine.setWarehouseNo(wcsdto.getWarehouseNo());
OdsWhiteEmbryo odsWhiteEmbryo=new OdsWhiteEmbryo();
odsWhiteEmbryo.setID(IdUtils.fastSimpleUUID());
odsWhiteEmbryo.setSiteCode(wcsdto.getFactory());//工厂编码
odsWhiteEmbryo.setOrderCode(orderLine.getOrderNo());//出库单号
odsWhiteEmbryo.setMaterialCode(orderLine.getSku());//型号编码
odsWhiteEmbryo.setPlanDate(wcsdto.getReqTime());//计划日期
odsWhiteEmbryo.setPlanNumber(orderLine.getQty());//计划数量
odsWhiteEmbryo.setOrderStatus("0");
odsWhiteEmbryo.setUserDefined1(orderLine.getBatchNo());
odsWhiteEmbryo.setProductionLineCode(orderLine.getStationNo());//产线编号
//Loc_Code
//odsWhiteEmbryo.setUnit();
odsWhiteEmbryoMapper.insertOdsWhiteEmbryo(odsWhiteEmbryo);
}
wmsToWCSDTO.setCode("0");
wmsToWCSDTO.setReqCode(wcsdto.getReqCode());
wmsToWCSDTO.setMessage("OK");
return wmsToWCSDTO;
}
@Override
public WmsToWCSDTO blankDesignatedPalletOutbound(WmsToWCSDTO wcsdto) {
//先确定数量---托盘确定数量,在库存明细中取,然后出库
//orderNo--订单号--修改出库订单,修改库存数量,修改库存明细,--记录出库明细,---
return null;
}
}

@ -0,0 +1,104 @@
package com.op.wms.service.impl;
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
import com.op.wms.domain.WmsOdsEmStorageNews;
import com.op.wms.domain.WmsOdsMateStorageNewsSn;
import com.op.wms.domain.WmsRawOrderInSn;
import com.op.wms.domain.WmsToWCSDTO;
import com.op.wms.mapper.WmsOdsEmStorageNewsMapper;
import com.op.wms.mapper.WmsOdsMateStorageNewsSnMapper;
import com.op.wms.mapper.WmsRawOrderInMapper;
import com.op.wms.mapper.WmsRawOrderInSnMapper;
import com.op.wms.service.IWmsToWCSmissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.Date;
@Service
public class WmsToWCSmissionServiceImpl implements IWmsToWCSmissionService {
@Autowired
private WmsRawOrderInMapper wmsRawOrderInMapper;
@Autowired
private WmsRawOrderInSnMapper wmsRawOrderInSnMapper;
@Autowired
private WmsOdsMateStorageNewsSnMapper wmsOdsMateStorageNewsSnMapper;
@Autowired
private WmsOdsEmStorageNewsMapper wmsOdsEmStorageNewsMapper;
@Override
public WmsToWCSDTO packagingStorage(WmsToWCSDTO wcsdto) {
DynamicDataSourceContextHolder.push("ds_" + wcsdto.getFactory());
WmsToWCSDTO wmsToWCSDTO= wmsRawOrderInMapper.packagingStorage(wcsdto);
// wmsToWCSDTO.set//
if (wmsToWCSDTO==null){
WmsToWCSDTO wms=new WmsToWCSDTO();
wms.setCode("0");
wms.setReqCode(wcsdto.getReqCode());
wms.setMessage("OK");
return wms;
}
wmsToWCSDTO.setQualityStatus("1");
wmsToWCSDTO.setCode("0");
wmsToWCSDTO.setReqCode(wcsdto.getReqCode());
wmsToWCSDTO.setMessage("OK");
return wmsToWCSDTO;
}
/**
* WCS WMS WMS
* @param wcsdto
* @return
*/
@Override
public WmsToWCSDTO packingMaterialsInboundCompleted(WmsToWCSDTO wmsToWCSDTO) {
DynamicDataSourceContextHolder.push("ds_" + wmsToWCSDTO.getFactory());
WmsRawOrderInSn wmsRawOrderInSn= wmsRawOrderInSnMapper.selectwmsRfidNo(wmsToWCSDTO);
wmsRawOrderInSn.setWhCode(wmsToWCSDTO.getWarehouseNo());
wmsRawOrderInSn.setWlCode(wmsToWCSDTO.getLocation());
WmsOdsMateStorageNewsSn wmsOdsMateStorageNewsSn=new WmsOdsMateStorageNewsSn();
wmsOdsMateStorageNewsSn.setWhCode(wmsRawOrderInSn.getWhCode());//仓库编码
wmsOdsMateStorageNewsSn.setWlCode(wmsRawOrderInSn.getWlCode());//库位编码
wmsOdsMateStorageNewsSn.setMaterialCode(wmsRawOrderInSn.getMaterialCode());
wmsOdsMateStorageNewsSn.setMaterialDesc(wmsRawOrderInSn.getMaterialDesc());
wmsOdsMateStorageNewsSn.setSn(wmsRawOrderInSn.getSn());
wmsOdsMateStorageNewsSn.setAmount(wmsRawOrderInSn.getAmount());
wmsOdsMateStorageNewsSn.setCreateBy("AGV");
wmsOdsMateStorageNewsSn.setGmtCreate(new Date());
wmsOdsMateStorageNewsSn.setFactoryCode(wmsToWCSDTO.getFactory());
wmsOdsMateStorageNewsSn.setSapFactoryCode(wmsToWCSDTO.getFactory());
wmsOdsMateStorageNewsSnMapper.insertWmsOdsMateStorageNewsSn(wmsOdsMateStorageNewsSn);
//修改库存
//2,修改库存---/加库存数量-/-冻结数量
WmsOdsEmStorageNews wmsOdsEmStorageNews=new WmsOdsEmStorageNews();
wmsOdsEmStorageNews.setWhCode(wmsRawOrderInSn.getWhCode());//仓库编码
wmsOdsEmStorageNews.setWlCode(wmsRawOrderInSn.getWlCode());//库位编码
wmsOdsEmStorageNews.setMaterialCode(wmsRawOrderInSn.getMaterialCode());
wmsOdsEmStorageNews.setAmount(new BigDecimal(wmsToWCSDTO.getQty()));
//添加库存--这个要有个判断有没有这个库存如果没有的话,就插入
wmsOdsMateStorageNewsSnMapper.updateAdd(wmsOdsEmStorageNews);
//修改托盘记录为入库
wmsRawOrderInSnMapper.updateU1Byid(wmsRawOrderInSn);
wmsToWCSDTO.setCode("0");
wmsToWCSDTO.setMessage("OK");
return wmsToWCSDTO;
}
/**
*
* @param wcsdto
* @return
*/
@Override
public WmsToWCSDTO packingMaterialsOutBoundCompleted(WmsToWCSDTO wcsdto) {
//记录明细消减库存
DynamicDataSourceContextHolder.push("ds_" + wcsdto.getFactory());
return wcsdto;
}
}

@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.op.wms.mapper.OdsProcureOrderMapper">
<resultMap type="OdsProcureOrder" id="OdsProcureOrderResult">
<result property="siteCode" column="Site_code" />
<result property="ID" column="ID" />
@ -39,12 +39,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectOdsProcureOrderVo">
select Site_code, ID, Procure_Code, Material_Code, Material_Desc, Plan_Date, Plan_Number, Unit, Reality_Number, Order_Status, User_Defined1, User_Defined2, User_Defined3, User_Defined4, User_Defined5, User_Defined6, User_Defined7, User_Defined8, User_Defined9, User_Defined10, User_Defined11, Supplier_Code, Supplier_Name, Remark, Create_By, Create_Date, Last_Update_By, Last_Update_Date, Active, Enterprise_Id, Enterprise_Code from ods_procure_order
select Site_code, ID, Procure_Code, Material_Code, Material_Desc, Plan_Date, Plan_Number, Unit,COALESCE(Reality_Number, 0) Reality_Number, Order_Status, User_Defined1, User_Defined2, User_Defined3, User_Defined4, User_Defined5, User_Defined6, User_Defined7, User_Defined8, User_Defined9, User_Defined10, User_Defined11, Supplier_Code, Supplier_Name, Remark, Create_By, Create_Date, Last_Update_By, Last_Update_Date, Active, Enterprise_Id, Enterprise_Code from ods_procure_order
</sql>
<select id="selectOdsProcureOrderList" parameterType="OdsProcureOrder" resultMap="OdsProcureOrderResult">
<include refid="selectOdsProcureOrderVo"/>
<where>
<where>
<if test="siteCode != null and siteCode != ''"> and Site_code = #{siteCode}</if>
<if test="procureCode != null and procureCode != ''"> and Procure_Code = #{procureCode}</if>
<if test="materialCode != null and materialCode != ''"> and Material_Code = #{materialCode}</if>
@ -77,12 +77,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="enterpriseCode != null and enterpriseCode != ''"> and Enterprise_Code = #{enterpriseCode}</if>
</where>
</select>
<select id="selectOdsProcureOrderByID" parameterType="String" resultMap="OdsProcureOrderResult">
<include refid="selectOdsProcureOrderVo"/>
where ID = #{ID}
</select>
<insert id="insertOdsProcureOrder" parameterType="OdsProcureOrder">
insert into ods_procure_order
<trim prefix="(" suffix=")" suffixOverrides=",">
@ -195,9 +195,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteOdsProcureOrderByIDs" parameterType="String">
delete from ods_procure_order where ID in
delete from ods_procure_order where ID in
<foreach item="ID" collection="array" open="(" separator="," close=")">
#{ID}
</foreach>
</delete>
</mapper>
<update id="updateRealityNuById" parameterType="OdsProcureOrder">
update ods_procure_order
SET Reality_Number = COALESCE(Reality_Number, 0) + #{planNumber},
Order_Status=#{orderStatus}
where ID = #{ID}
</update>
</mapper>

@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.op.wms.mapper.WmsOdsEmStorageNewsMapper">
<resultMap type="WmsOdsEmStorageNews" id="WmsOdsEmStorageNewsResult">
<result property="storageId" column="storage_id" />
<result property="whCode" column="wh_code" />
@ -46,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectWmsOdsEmStorageNewsList" parameterType="WmsOdsEmStorageNews" resultMap="WmsOdsEmStorageNewsResult">
<include refid="selectWmsOdsEmStorageNewsVo"/>
<where>
<where>
<if test="storageId != null and storageId != ''"> and storage_id = #{storageId}</if>
<if test="whCode != null and whCode != ''"> and wh_code = #{whCode}</if>
<if test="regionCode != null and regionCode != ''"> and region_code = #{regionCode}</if>
@ -81,12 +81,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="wlName != null and wlName != ''"> and wl_name like concat('%', #{wlName}, '%')</if>
</where>
</select>
<select id="selectWmsOdsEmStorageNewsByStorageId" parameterType="String" resultMap="WmsOdsEmStorageNewsResult">
<include refid="selectWmsOdsEmStorageNewsVo"/>
where storage_id = #{storageId}
</select>
<insert id="insertWmsOdsEmStorageNews" parameterType="WmsOdsEmStorageNews">
insert into wms_ods_em_storage_news
<trim prefix="(" suffix=")" suffixOverrides=",">
@ -205,9 +205,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteWmsOdsEmStorageNewsByStorageIds" parameterType="String">
delete from wms_ods_em_storage_news where storage_id in
delete from wms_ods_em_storage_news where storage_id in
<foreach item="storageId" collection="array" open="(" separator="," close=")">
#{storageId}
</foreach>
</delete>
</mapper>
<update id="updateAdd">
update wms_ods_em_storage_news
set
storage_amount = IFNULL(storage_amount, 0) - #{amount},
gmt_modified=now()
where wh_code=#{whCode} and wl_code=#{wlCode} and material_code=#{materialCode}
</update>
</mapper>

@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.op.wms.mapper.WmsOdsMateStorageNewsMapper">
<resultMap type="WmsOdsMateStorageNews" id="WmsOdsMateStorageNewsResult">
<result property="storageId" column="storage_id" />
<result property="whCode" column="wh_code" />
@ -46,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectWmsOdsMateStorageNewsList" parameterType="WmsOdsMateStorageNews" resultMap="WmsOdsMateStorageNewsResult">
<include refid="selectWmsOdsMateStorageNewsVo"/>
<where>
<where>
<if test="storageId != null and storageId != ''"> and storage_id = #{storageId}</if>
<if test="whCode != null and whCode != ''"> and wh_code = #{whCode}</if>
<if test="regionCode != null and regionCode != ''"> and region_code = #{regionCode}</if>
@ -81,12 +81,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="wlName != null and wlName != ''"> and wl_name like concat('%', #{wlName}, '%')</if>
</where>
</select>
<select id="selectWmsOdsMateStorageNewsByStorageId" parameterType="String" resultMap="WmsOdsMateStorageNewsResult">
<include refid="selectWmsOdsMateStorageNewsVo"/>
where storage_id = #{storageId}
</select>
<insert id="insertWmsOdsMateStorageNews" parameterType="WmsOdsMateStorageNews">
insert into wms_ods_mate_storage_news
<trim prefix="(" suffix=")" suffixOverrides=",">
@ -205,9 +205,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteWmsOdsMateStorageNewsByStorageIds" parameterType="String">
delete from wms_ods_mate_storage_news where storage_id in
delete from wms_ods_mate_storage_news where storage_id in
<foreach item="storageId" collection="array" open="(" separator="," close=")">
#{storageId}
</foreach>
</delete>
</mapper>
<select id="selectByWhCodeAndMate">
</select>
</mapper>

@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.op.wms.mapper.WmsOdsMateStorageNewsSnMapper">
<resultMap type="WmsOdsMateStorageNewsSn" id="WmsOdsMateStorageNewsSnResult">
<result property="mateOrderInSnId" column="mate_order_in_sn_id" />
<result property="whCode" column="wh_code" />
@ -42,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectWmsOdsMateStorageNewsSnList" parameterType="WmsOdsMateStorageNewsSn" resultMap="WmsOdsMateStorageNewsSnResult">
<include refid="selectWmsOdsMateStorageNewsSnVo"/>
<where>
<where>
<if test="whCode != null and whCode != ''"> and wh_code = #{whCode}</if>
<if test="waCode != null and waCode != ''"> and wa_code = #{waCode}</if>
<if test="wlCode != null and wlCode != ''"> and wl_code = #{wlCode}</if>
@ -72,12 +72,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="sapFactoryCode != null and sapFactoryCode != ''"> and sap_factory_code = #{sapFactoryCode}</if>
</where>
</select>
<select id="selectWmsOdsMateStorageNewsSnByMateOrderInSnId" parameterType="Long" resultMap="WmsOdsMateStorageNewsSnResult">
<include refid="selectWmsOdsMateStorageNewsSnVo"/>
where mate_order_in_sn_id = #{mateOrderInSnId}
</select>
<insert id="insertWmsOdsMateStorageNewsSn" parameterType="WmsOdsMateStorageNewsSn" useGeneratedKeys="true" keyProperty="mateOrderInSnId">
insert into wms_ods_mate_storage_news_sn
<trim prefix="(" suffix=")" suffixOverrides=",">
@ -182,9 +182,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteWmsOdsMateStorageNewsSnByMateOrderInSnIds" parameterType="String">
delete from wms_ods_mate_storage_news_sn where mate_order_in_sn_id in
delete from wms_ods_mate_storage_news_sn where mate_order_in_sn_id in
<foreach item="mateOrderInSnId" collection="array" open="(" separator="," close=")">
#{mateOrderInSnId}
</foreach>
</delete>
</mapper>
<update id="updateAdd">
update wms_ods_mate_storage_news
set amount = IFNULL(amount, 0) + #{amount},
storage_amount = IFNULL(storage_amount, 0) + #{amount},
gmt_modified=now()
where wh_code=#{whCode} and wl_code=#{wlCode} and material_code=#{materialCode}
</update>
<select id="selectByWhCodeAndMate">
<include refid="selectWmsOdsMateStorageNewsSnVo"/>
where mate_order_in_sn_id = #{mateOrderInSnId}
</select>
</mapper>

@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.op.wms.mapper.WmsOdsWhiteEmbryoInMapper">
<resultMap type="WmsOdsWhiteEmbryoIn" id="WmsOdsWhiteEmbryoInResult">
<result property="siteCode" column="Site_code" />
<result property="ID" column="ID" />
@ -47,7 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectWmsOdsWhiteEmbryoInList" parameterType="WmsOdsWhiteEmbryoIn" resultMap="WmsOdsWhiteEmbryoInResult">
<include refid="selectWmsOdsWhiteEmbryoInVo"/>
<where>
<where>
<if test="siteCode != null and siteCode != ''"> and Site_code = #{siteCode}</if>
<if test="orderCode != null and orderCode != ''"> and Order_Code = #{orderCode}</if>
<if test="materialCode != null and materialCode != ''"> and Material_Code = #{materialCode}</if>
@ -83,12 +83,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="enterpriseCode != null and enterpriseCode != ''"> and Enterprise_Code = #{enterpriseCode}</if>
</where>
</select>
<select id="selectWmsOdsWhiteEmbryoInByWorkorderCode" parameterType="String" resultMap="WmsOdsWhiteEmbryoInResult">
<include refid="selectWmsOdsWhiteEmbryoInVo"/>
where Order_Code = #{workorderCode}
</select>
<select id="selectWmsOdsWhiteEmbryoInByID" parameterType="String" resultMap="WmsOdsWhiteEmbryoInResult">
<include refid="selectWmsOdsWhiteEmbryoInVo"/>
where ID = #{ID}
</select>
<insert id="insertWmsOdsWhiteEmbryoIn" parameterType="WmsOdsWhiteEmbryoIn">
insert into wms_ods_white_embryo_in
<trim prefix="(" suffix=")" suffixOverrides=",">
@ -210,9 +218,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteWmsOdsWhiteEmbryoInByIDs" parameterType="String">
delete from wms_ods_white_embryo_in where ID in
delete from wms_ods_white_embryo_in where ID in
<foreach item="ID" collection="array" open="(" separator="," close=")">
#{ID}
</foreach>
</delete>
</mapper>
<update id="updateWmsOdsWhiteEmbryoInByOrderCode">
update wms_ods_white_embryo_in
set
Order_Status = #{orderStatus},
Reality_Number=#{realityNumber},
Last_Update_Date = now()
where Order_Code=#{orderCode}
</update>
</mapper>

@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.op.wms.mapper.WmsRawOrderInMapper">
<resultMap type="WmsRawOrderIn" id="WmsRawOrderInResult">
<result property="rawOrderInId" column="raw_order_in_id" />
<result property="factoryCode" column="factory_code" />
@ -65,7 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectWmsRawOrderInList" parameterType="WmsRawOrderIn" resultMap="WmsRawOrderInResult">
<include refid="selectWmsRawOrderInVo"/>
<where>
<where>
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
<if test="whCode != null and whCode != ''"> and wh_code = #{whCode}</if>
<if test="waCode != null and waCode != ''"> and wa_code = #{waCode}</if>
@ -118,12 +118,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="activeFlag != null and activeFlag != ''"> and active_flag = #{activeFlag}</if>
</where>
</select>
<select id="selectWmsRawOrderInByRawOrderInId" parameterType="String" resultMap="WmsRawOrderInResult">
<include refid="selectWmsRawOrderInVo"/>
where raw_order_in_id = #{rawOrderInId}
</select>
<insert id="insertWmsRawOrderIn" parameterType="WmsRawOrderIn">
insert into wms_raw_order_in
<trim prefix="(" suffix=")" suffixOverrides=",">
@ -299,9 +299,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteWmsRawOrderInByRawOrderInIds" parameterType="String">
delete from wms_raw_order_in where raw_order_in_id in
delete from wms_raw_order_in where raw_order_in_id in
<foreach item="rawOrderInId" collection="array" open="(" separator="," close=")">
#{rawOrderInId}
</foreach>
</delete>
</mapper>
<select id="packagingStorage" resultType="com.op.wms.domain.WmsToWCSDTO">
SELECT
material_code as sku,
sn as rfidNo,
amount as qty,
user_defined1 as qualityStatus
FROM
[dbo].[wms_raw_order_in_sn]
where
sn=#{rfidNo}
and user_defined1 = '1'
</select>
</mapper>

@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.op.wms.mapper.WmsRawOrderInSnMapper">
<resultMap type="WmsRawOrderInSn" id="WmsRawOrderInSnResult">
<result property="rawOrderInSnId" column="raw_order_in_sn_id" />
<result property="whCode" column="wh_code" />
@ -41,7 +41,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectWmsRawOrderInSnList" parameterType="WmsRawOrderInSn" resultMap="WmsRawOrderInSnResult">
<include refid="selectWmsRawOrderInSnVo"/>
<where>
<where>
<if test="rawOrderInSnId != null and rawOrderInSnId != ''"> and raw_order_in_sn_id = #{rawOrderInSnId}</if>
<if test="whCode != null and whCode != ''"> and wh_code = #{whCode}</if>
<if test="waCode != null and waCode != ''"> and wa_code = #{waCode}</if>
<if test="wlCode != null and wlCode != ''"> and wl_code = #{wlCode}</if>
@ -70,15 +71,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="sapFactoryCode != null and sapFactoryCode != ''"> and sap_factory_code = #{sapFactoryCode}</if>
</where>
</select>
<select id="selectWmsRawOrderInSnByRawOrderInSnId" parameterType="Long" resultMap="WmsRawOrderInSnResult">
<include refid="selectWmsRawOrderInSnVo"/>
where raw_order_in_sn_id = #{rawOrderInSnId}
</select>
<insert id="insertWmsRawOrderInSn" parameterType="WmsRawOrderInSn" useGeneratedKeys="true" keyProperty="rawOrderInSnId">
insert into wms_raw_order_in_sn
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="whCode != null">raw_order_in_sn_id,</if>
<if test="whCode != null">wh_code,</if>
<if test="waCode != null">wa_code,</if>
<if test="wlCode != null">wl_code,</if>
@ -108,6 +110,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="sapFactoryCode != null">sap_factory_code,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="whCode != null">#{rawOrderInSnId},</if>
<if test="whCode != null">#{whCode},</if>
<if test="waCode != null">#{waCode},</if>
<if test="wlCode != null">#{wlCode},</if>
@ -177,9 +180,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteWmsRawOrderInSnByRawOrderInSnIds" parameterType="String">
delete from wms_raw_order_in_sn where raw_order_in_sn_id in
delete from wms_raw_order_in_sn where raw_order_in_sn_id in
<foreach item="rawOrderInSnId" collection="array" open="(" separator="," close=")">
#{rawOrderInSnId}
</foreach>
</delete>
</mapper>
<select id="selectwmsRfidNo" parameterType="com.op.wms.domain.WmsToWCSDTO" resultMap="WmsRawOrderInSnResult">
<include refid="selectWmsRawOrderInSnVo"/>
where
sn=#{rfidNo}
and
user_defined1='1'
</select>
<update id="updateU1Byid">
update wms_raw_order_in_sn
set
user_defined1 = '2'
where raw_order_in_sn_id=#{rawOrderInSnId}
</update>
</mapper>

Loading…
Cancel
Save