2023-05-23 16:13:17 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Runtime.Serialization;
|
|
|
|
|
using System.ServiceModel;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using DeiNiu.wms.Logical;
|
|
|
|
|
using System.Data;
|
|
|
|
|
using DeiNiu.Utils;
|
|
|
|
|
|
|
|
|
|
namespace DeiNiu.Wcf
|
|
|
|
|
{
|
|
|
|
|
// 注意: 使用“重构”菜单上的“重命名”命令,可以同时更改代码、svc 和配置文件中的类名“WmsInRequest”。
|
|
|
|
|
public class WmsInRequestService : basicService, IWmsInRequest
|
|
|
|
|
{
|
|
|
|
|
static lWmsInRequest _lir;
|
|
|
|
|
|
|
|
|
|
lWmsInRequest lir {
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
if (_lir == null || _lir.operId != getOperId())
|
|
|
|
|
{
|
|
|
|
|
_lir = new lWmsInRequest(getOperId());
|
|
|
|
|
}
|
|
|
|
|
return _lir;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool requestInStock(string requestOrder)
|
|
|
|
|
{
|
|
|
|
|
return lir.requestInStock(requestOrder);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
public DataSet Query(string querystr, int rownumStart, int rownumEnd)
|
|
|
|
|
{
|
|
|
|
|
return lir.Query(querystr, rownumStart, rownumEnd);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
public DataSet queryReceives(string querystr, int rownumStart, int rownumEnd)
|
|
|
|
|
{
|
|
|
|
|
return lir.queryReceives(querystr, rownumStart, rownumEnd);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
public DataSet queryReceivesByVender(string querystr, int rownumStart, int rownumEnd)
|
|
|
|
|
{
|
|
|
|
|
return lir.queryReceivesByVender(querystr, rownumStart, rownumEnd);
|
|
|
|
|
}
|
|
|
|
|
public void getInRequests()
|
|
|
|
|
{
|
|
|
|
|
lir.syncOrders();
|
|
|
|
|
}
|
|
|
|
|
public DataTable getRequestByVenderPinyin(string pinYin, enumInStockOrderStatus status,int orderType=0)
|
|
|
|
|
{
|
|
|
|
|
return lir.getRequestByVenderPinyin(pinYin, status, orderType);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public DataTable getInvalidInRequestDetail(string orderNo)
|
|
|
|
|
{
|
|
|
|
|
return lir.getWmsInRequest.getInvalidInRequestDetail(orderNo).Tables[0];
|
|
|
|
|
}
|
|
|
|
|
public DataTable getInvalidInRequest()
|
|
|
|
|
{
|
|
|
|
|
return lir.getWmsInRequest.getInvalidInRequest().Tables[0];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public DataTable getRequestInStockDetail(string orderNo)
|
|
|
|
|
{
|
|
|
|
|
return lir.getWmsInRequest.getRequestInStockDetail(orderNo).Tables[0];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public DataTable getRequestInDetail(string orderNo,int status)
|
|
|
|
|
{
|
|
|
|
|
return lir.getRequestInDetail(orderNo,status);
|
|
|
|
|
}
|
|
|
|
|
public DataTable getRequestInDetailByVender(string venderId, int status)
|
|
|
|
|
{
|
|
|
|
|
return lir.queryPurchDetailByVender(venderId, status);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public DataTable get4ValidDetail(string orderNo)
|
|
|
|
|
{
|
|
|
|
|
return lir.get4ValidDetail(orderNo);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool receiveDetailPre(string orderNo,int orderType,int id, decimal arriveNumber ,string inRemark, int shipId )
|
|
|
|
|
{
|
|
|
|
|
return lir.receiveDetailPre(orderNo,(enumInOrderType)orderType,id, arriveNumber, inRemark, shipId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public string receiveDetailsPre(string venderId,int orderType, int[] ids, int shipId)
|
|
|
|
|
{
|
|
|
|
|
return lir.receiveDetailsPre((enumInOrderType)orderType, ids, shipId,venderId);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//电脑收货
|
|
|
|
|
public bool receiveDetail(string preInNo, int id, decimal arriveNumber, decimal receiveNumber, int inType, string inRemark, int shipId, bool isCache, int cachePartion)
|
|
|
|
|
{
|
|
|
|
|
return lir.receiveDetail(preInNo,id, arriveNumber, receiveNumber, inType, inRemark, shipId, isCache, cachePartion);
|
|
|
|
|
}
|
2024-02-06 19:36:47 +08:00
|
|
|
|
public string receiveByOrder(string orderNo, int inType, string inRemark, int shipId, bool isCache, int cachePartion)
|
2023-05-23 16:13:17 +08:00
|
|
|
|
{
|
|
|
|
|
return lir.receiveByOrder(orderNo, inType, inRemark , shipId , isCache, cachePartion);
|
|
|
|
|
}
|
2024-02-06 19:36:47 +08:00
|
|
|
|
public string receiveByOrderPre(string orderNo, string vender, int orderType, string inRemark, int shipId)
|
2023-05-23 16:13:17 +08:00
|
|
|
|
{
|
2024-02-06 19:36:47 +08:00
|
|
|
|
return lir.receiveByOrderPre( orderNo,vender, (enumInOrderType) orderType, inRemark, shipId);
|
2023-05-23 16:13:17 +08:00
|
|
|
|
}
|
|
|
|
|
public DataTable getValidedInDetail(string orderNo, int status)
|
|
|
|
|
{
|
|
|
|
|
return lir.getValidedInDetail(orderNo, status);
|
|
|
|
|
}
|
|
|
|
|
public bool retrieveValid(int flowNo, int jobId)
|
|
|
|
|
{
|
|
|
|
|
return lir.retrieveValidByJobId(jobId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public DataTable getRequestDetail(string orderNo)
|
|
|
|
|
{
|
|
|
|
|
return lir.getWmsInRequest.getRequestDetail(orderNo).Tables[0];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool deleteInRequest(string orderNo)
|
|
|
|
|
{
|
|
|
|
|
return lir.deleteInRequest(orderNo);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public DataSet queryValidation(string querystr, int rownumStart, int rownumEnd)
|
|
|
|
|
{
|
|
|
|
|
return lir.queryValidation(querystr, rownumStart, rownumEnd);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public DataSet queryValidationLog(string querystr, int rownumStart, int rownumEnd)
|
|
|
|
|
{
|
|
|
|
|
return lir.queryValidationLog(querystr, rownumStart, rownumEnd);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool validInOld(StructsValideIn validIn)
|
|
|
|
|
{
|
|
|
|
|
return lir.validIn(validIn);
|
|
|
|
|
}
|
|
|
|
|
|
2023-11-21 19:18:23 +08:00
|
|
|
|
public DataTable getPreValidResult(string preInNo)
|
|
|
|
|
{
|
|
|
|
|
return lir.getPreValidResult(preInNo);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2023-05-23 16:13:17 +08:00
|
|
|
|
public DataTable getReceiveHistory(string orderNo)
|
|
|
|
|
{
|
|
|
|
|
return lir.getReceiveHistory(orderNo);
|
|
|
|
|
}
|
2024-03-06 20:48:05 +08:00
|
|
|
|
|
|
|
|
|
public DataTable getReceiveMuiltiHistory(string orderNo)
|
|
|
|
|
{
|
|
|
|
|
return lir.getReceiveMuiltiHistory(orderNo);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-05-23 16:13:17 +08:00
|
|
|
|
public DataTable getReceivePreTmpSumByVender(string venderId)
|
|
|
|
|
{
|
|
|
|
|
return lir.getReceivePreSumByVender(venderId);
|
|
|
|
|
}
|
|
|
|
|
public DataTable getReceivePreSumByVenderNotValided(string venderId)
|
|
|
|
|
{
|
|
|
|
|
return lir.getReceivePreSumByVenderNotValided(venderId);
|
|
|
|
|
}
|
|
|
|
|
public DataTable getReceivePreSumByPreNo(string preNo)
|
|
|
|
|
{
|
|
|
|
|
return lir.getReceivePreSumByPreNo(preNo);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int newShipInfo(structShip ship)
|
|
|
|
|
{
|
|
|
|
|
return lir.newShipInfo(ship);
|
|
|
|
|
}
|
|
|
|
|
public DataTable getShipDetail(string shipNo)
|
|
|
|
|
{
|
|
|
|
|
return lir.getShipDetail(shipNo);
|
|
|
|
|
}
|
|
|
|
|
public DataSet getShipRecs(string querystr, int rownumStart, int rownumEnd)
|
|
|
|
|
{
|
|
|
|
|
return lir.getShipRecs( querystr, rownumStart, rownumEnd);
|
|
|
|
|
}
|
|
|
|
|
public DataSet getReceiveRecs(string querystr, int rownumStart, int rownumEnd)
|
|
|
|
|
{
|
|
|
|
|
return lir.getReceiveRecs(querystr, rownumStart, rownumEnd);
|
|
|
|
|
}
|
2023-11-21 19:18:23 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-05-23 16:13:17 +08:00
|
|
|
|
public DataTable getShipReceiveDetail(string shipNo)
|
|
|
|
|
{
|
|
|
|
|
return lir.getShipReceiveDetail(shipNo );
|
|
|
|
|
}
|
|
|
|
|
public DataTable getShipReceiveDetailByShipId(int shipId)
|
|
|
|
|
{
|
|
|
|
|
return lir.getShipReceiveDetail(shipId);
|
|
|
|
|
}
|
|
|
|
|
public string postPreIn(string venderId,int shipid)
|
|
|
|
|
{
|
|
|
|
|
return lir.postPreIn(venderId,shipid);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public DataTable getPreInDetail(string preInNo )
|
|
|
|
|
{
|
|
|
|
|
return lir.getPreInDetail(preInNo);
|
|
|
|
|
}
|
2023-11-21 19:18:23 +08:00
|
|
|
|
|
|
|
|
|
public DataTable getPreInSumary(string preInNo)
|
|
|
|
|
{
|
|
|
|
|
return lir.getPreInSumary(preInNo);
|
|
|
|
|
}
|
|
|
|
|
public enumValidInResult validIn(string preInNo, string flowNo, string goodsId, decimal batchCount, decimal seedsCount,
|
2023-09-04 22:41:19 +08:00
|
|
|
|
string[] skuKeys, string[] skuValues, bool isPass, bool isIsuLocations, bool isVirtualIn, int secondValidUserId,int prefWarehouse, bool ischeckLeftValidDays=true )
|
2023-05-23 16:13:17 +08:00
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
Dictionary<string, string> sku = new Dictionary<string, string>();
|
|
|
|
|
for (int i = 0; i < skuKeys.Length; i++)
|
|
|
|
|
{
|
|
|
|
|
sku.Add(skuKeys[i], skuValues[i]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return lir.validIn(preInNo, flowNo, goodsId.Trim(), batchCount, seedsCount, sku, isPass,
|
2023-09-04 22:41:19 +08:00
|
|
|
|
isIsuLocations, isVirtualIn, secondValidUserId, prefWarehouse, ischeckLeftValidDays);
|
2023-05-23 16:13:17 +08:00
|
|
|
|
}
|
2023-09-04 22:41:19 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public DataTable getReceiveDetailByBarcode(string preInOrder, string barcode)
|
2023-05-23 16:13:17 +08:00
|
|
|
|
{
|
|
|
|
|
return lir.getReceiveDetailByBarcode(preInOrder, barcode);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public DataTable getReceiveDetailByPreInOrder(string preInOrder )
|
|
|
|
|
{
|
|
|
|
|
return lir.getReceiveDetailByPreInOrder(preInOrder );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public DataSet getPreInVenderDetailsWindows(string pinyin,int orderType)
|
|
|
|
|
{
|
|
|
|
|
return lir.getPreInVendDetailsWindows(pinyin, orderType);
|
|
|
|
|
}
|
|
|
|
|
|
2023-09-04 22:41:19 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//---------------------入库测试
|
|
|
|
|
public bool testPuchIn(string vender, int itemCnt, decimal boxcnt,decimal bulkcnt, int orderType)
|
|
|
|
|
{
|
2023-11-21 19:18:23 +08:00
|
|
|
|
|
2023-09-04 22:41:19 +08:00
|
|
|
|
return lir.createTestIn( vender, itemCnt, boxcnt, bulkcnt, orderType);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool autoValidIn()
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
return !string.IsNullOrEmpty(lir.autoValidIn());
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
{
|
|
|
|
|
log.Error(e);
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string autoPreIn(string vender)
|
|
|
|
|
{
|
|
|
|
|
return lir.autoPreIn(vender);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool autoOnShelf(string preInNo, string flowNo, bool showAllusers)
|
|
|
|
|
{
|
|
|
|
|
return lir.autoOnShelf(preInNo,flowNo, showAllusers);
|
|
|
|
|
}
|
|
|
|
|
|
2023-11-21 19:18:23 +08:00
|
|
|
|
DataSet IWmsInRequest.queryStockInSum(string querystr, int rownumStart, int rownumEnd)
|
|
|
|
|
{
|
|
|
|
|
return lir.queryStockInSum(querystr, rownumStart, rownumEnd);
|
|
|
|
|
}
|
2023-05-23 16:13:17 +08:00
|
|
|
|
}
|
|
|
|
|
}
|