ldj/WcfService1/WmsInRequestService.svc.cs

289 lines
9.2 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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);
}
public string receiveByOrder(string orderNo, int inType, string inRemark, int shipId, bool isCache, int cachePartion)
{
return lir.receiveByOrder(orderNo, inType, inRemark , shipId , isCache, cachePartion);
}
public string receiveByOrderPre(string orderNo, string vender, int orderType, string inRemark, int shipId)
{
return lir.receiveByOrderPre( orderNo,vender, (enumInOrderType) orderType, inRemark, shipId);
}
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);
}
public DataTable getPreValidResult(string preInNo)
{
return lir.getPreValidResult(preInNo);
}
public DataTable getReceiveHistory(string orderNo)
{
return lir.getReceiveHistory(orderNo);
}
public DataTable getReceiveMuiltiHistory(string orderNo)
{
return lir.getReceiveMuiltiHistory(orderNo);
}
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);
}
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);
}
public DataTable getPreInSumary(string preInNo)
{
return lir.getPreInSumary(preInNo);
}
public enumValidInResult validIn(string preInNo, string flowNo, string goodsId, decimal batchCount, decimal seedsCount,
string[] skuKeys, string[] skuValues, bool isPass, bool isIsuLocations, bool isVirtualIn, int secondValidUserId,int prefWarehouse, bool ischeckLeftValidDays=true )
{
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,
isIsuLocations, isVirtualIn, secondValidUserId, prefWarehouse, ischeckLeftValidDays);
}
public DataTable getReceiveDetailByBarcode(string preInOrder, string barcode)
{
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);
}
//---------------------入库测试
public bool testPuchIn(string vender, int itemCnt, decimal boxcnt,decimal bulkcnt, int orderType)
{
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);
}
DataSet IWmsInRequest.queryStockInSum(string querystr, int rownumStart, int rownumEnd)
{
return lir.queryStockInSum(querystr, rownumStart, rownumEnd);
}
}
}