320 lines
9.9 KiB
C#
320 lines
9.9 KiB
C#
using System.Data;
|
||
using DeiNiu.Utils;
|
||
using DeiNiu.wms.Data.Model;
|
||
using DeiNiu.wms.Logical;
|
||
namespace DeiNiu.Wcf
|
||
{
|
||
// 注意: 使用“重构”菜单上的“重命名”命令,可以同时更改代码、svc 和配置文件中的类名“LocationService”。
|
||
public class StockLocationService : basicService, IStockLocationService
|
||
{
|
||
private static lWmslocation _loc;
|
||
private static lWmsStock _stock;
|
||
private static lWmsStockPandian _pandian;
|
||
|
||
lWmsStockPandian pandian
|
||
{
|
||
get
|
||
{
|
||
if (_pandian == null || _pandian.operId != getOperId())
|
||
{
|
||
_pandian = new lWmsStockPandian(getOperId());
|
||
}
|
||
return _pandian;
|
||
}
|
||
}
|
||
|
||
lWmsStock stock
|
||
{
|
||
get
|
||
{
|
||
if (_stock == null || _stock.operId != getOperId())
|
||
{
|
||
_stock = new lWmsStock(getOperId());
|
||
}
|
||
return _stock;
|
||
}
|
||
}
|
||
|
||
lWmslocation loc
|
||
{
|
||
get
|
||
{
|
||
if (_loc == null || _loc.operId != getOperId())
|
||
{
|
||
_loc = new lWmslocation(getOperId());
|
||
}
|
||
return _loc;
|
||
}
|
||
}
|
||
|
||
public void addLocations(Structs locs)
|
||
{
|
||
loc.addLocations(locs);
|
||
}
|
||
|
||
public bool updateWhLocations(int[] ids, Structs locs)
|
||
{
|
||
return loc.updateWhLocations(ids, locs);
|
||
}
|
||
public bool updateSizeLocations(int[] ids, Structs locs)
|
||
{
|
||
return loc.updateSizeLocations(ids, locs);
|
||
}
|
||
public bool updateLocationTranLines(int[] ids, Structs locs)
|
||
{
|
||
return loc.updateLocationTranLines(ids, locs);
|
||
}
|
||
public bool updateLocationABC(int[] ids, Structs locs)
|
||
{
|
||
return loc.updateLocationABC(ids, locs);
|
||
}
|
||
public bool updateLocationStoreType(int[] ids, Structs locs)
|
||
{
|
||
return loc.updateLocationStoreType(ids, locs);
|
||
}
|
||
|
||
public bool updateLocationLabelId(int[] ids, Structs locs)
|
||
{
|
||
return loc.updateLocationLabelId(ids, locs);
|
||
}
|
||
public bool updateLocationStatus(int[] ids, int status)
|
||
{
|
||
return loc.updateLocationStatus(ids, status);
|
||
}
|
||
public bool updateLocationOwner(int[] ids, Structs locs)
|
||
{
|
||
return loc.updateLocationOwner(ids, locs);
|
||
}
|
||
public DataSet Query(string querystr, int rownumStart, int rownumEnd)
|
||
{
|
||
return loc.Query(querystr, rownumStart, rownumEnd);
|
||
|
||
}
|
||
public DataSet QueryNodes(DataTable dic, string query, int rownumStart, int rownumEnd)
|
||
{
|
||
return loc.Query(dic, query, rownumStart, rownumEnd);
|
||
}
|
||
public DataTable getStockRecord(string orderNo)
|
||
{
|
||
return stock.wmsStock.getStockRecord(orderNo);
|
||
}
|
||
|
||
public DataSet getStockDiff(string querystr, int rownumStart, int rownumEnd)
|
||
{
|
||
return stock.wmsStock.getStockDiff(querystr, rownumStart, rownumEnd);
|
||
}
|
||
|
||
public DataTable getWmsStockDetails(string goodsId,int skuId,string extrQuery)
|
||
{
|
||
return stock.wmsStock.getWmsStockDetails(goodsId,skuId, extrQuery);
|
||
}
|
||
|
||
public DataTable getStockFreeLocations(string goodsId, int count)
|
||
{
|
||
return stock.wmsStock.getFreeStockLocations(goodsId, count);
|
||
}
|
||
|
||
|
||
public int upDownStockLocation(string locId, string goodsId, int skuId, string batch, string reason, decimal count, int type)
|
||
{
|
||
return (int)stock.upDownGoodsCountWithLocation(locId, goodsId, skuId, batch, count, reason, (enumStockRecordType)type, -1);
|
||
|
||
}
|
||
|
||
public DataSet getDataWaiting4Maintain(string query,int start,int end)
|
||
{
|
||
return new WmsStockMaintain().getDataWaiting4Maintain(query, start, end);
|
||
}
|
||
|
||
|
||
/// <summary>
|
||
/// 养护记录
|
||
/// </summary>
|
||
/// <param name="query"></param>
|
||
/// <returns></returns>
|
||
|
||
public DataSet getDataMaintainRecords(string query,int start,int end)
|
||
{
|
||
return new WmsStockMaintain().getDataMaintainRecords(query, start, end);
|
||
}
|
||
|
||
|
||
/// <summary>
|
||
/// 临近有效期列表
|
||
/// </summary>
|
||
/// <param name="days"></param>
|
||
/// <returns></returns>
|
||
|
||
public DataSet getDataNearValid(int days, int start, int end)
|
||
{
|
||
return new WmsStockMaintain().getDataNearValid(days, start, end);
|
||
}
|
||
|
||
|
||
/// <summary>
|
||
/// 失效药品
|
||
/// </summary>
|
||
/// <param name="query"></param>
|
||
/// <returns></returns>
|
||
|
||
public DataSet getDataInvaild( int start,int end)
|
||
{
|
||
return new WmsStockMaintain().getDataInvaild( start, end);
|
||
}
|
||
public int updateJobCross(int[] ids, bool isCross)
|
||
{
|
||
return loc.updateLocJobCross(ids, isCross);
|
||
}
|
||
|
||
public DataSet queryStockGoods(string queryStr, int start, int end)
|
||
{
|
||
return stock.Query(queryStr, start, end);
|
||
}
|
||
public DataSet querySumStockGoods(string queryStr, int start, int end)
|
||
{
|
||
return stock.wmsStock.QuerySum(queryStr, start, end);
|
||
}
|
||
public DataSet querySumStockGoodsNoBatch(string querystr, int rownumStart, int rownumEnd)
|
||
{
|
||
return stock.wmsStock.QuerySumNoBatch(querystr, rownumStart, rownumEnd);
|
||
}
|
||
public DataSet queryBulkRep(string queryStr, int start, int end)
|
||
{
|
||
return stock.wmsStock.QueryBulkRep(queryStr, start, end);
|
||
}
|
||
|
||
public bool createGoodsRepOrder(string[] goodsRep)
|
||
{
|
||
return new lWmsOutRequest(getOperId()).createGoodsRepOrder(goodsRep);
|
||
}
|
||
|
||
public DataTable getLocationsUsedPercent()
|
||
{
|
||
return loc.getLocationsUsedPercent();
|
||
}
|
||
public DataSet queryStockRecords(string querystr, int rownumStart, int rownumEnd)
|
||
{
|
||
return stock.wmsStock.queryStockRecords(querystr, rownumStart, rownumEnd);
|
||
}
|
||
|
||
public void initalSkus(bool isDownOnly,int start)
|
||
{
|
||
stock.initialSkus( isDownOnly,start);
|
||
}
|
||
|
||
|
||
//-----------------------盘点-------------------------------------------------------
|
||
|
||
|
||
public bool createPandianOrder(int panType, bool noticeErp, int createBy, string inputValues, string stockCondition)
|
||
{
|
||
pandian.createPanOrder(panType, noticeErp, createBy, inputValues, stockCondition);
|
||
return true;
|
||
}
|
||
|
||
public bool startPandianOrder(string orderNo)
|
||
{
|
||
return pandian.startPandian(orderNo);
|
||
}
|
||
|
||
public bool canStartNewPandian()
|
||
{
|
||
return pandian.canStartNewPandian();
|
||
}
|
||
|
||
|
||
public DataSet queryPandianOrders(string queryStr, int start, int end)
|
||
{
|
||
return pandian.Query(queryStr, start, end);
|
||
}
|
||
public bool delPandianOrder(string orderNo)
|
||
{
|
||
return pandian.delPandian(orderNo);
|
||
}
|
||
|
||
public DataSet queryPandianBanlanceDetail(string orderNo, string goodsId, int start, int end)
|
||
{
|
||
return pandian.getWmsStockPandian.getPandianBanlanceDetail(orderNo,start,end,goodsId);
|
||
}
|
||
|
||
public DataSet queryPandianResult(string orderNo, string goodsId, int start, int end)
|
||
{
|
||
return pandian.getWmsStockPandian.queryPandianResult(orderNo, start, end, goodsId);
|
||
}
|
||
public DataSet queryPandianResultSum(string orderNo, string goodsId, int start, int end)
|
||
{
|
||
return pandian.getWmsStockPandian.queryPandianResultSum(orderNo, start, end, goodsId);
|
||
}
|
||
public DataSet getPandianBanlance(string orderNo, int start, int end)
|
||
{
|
||
return pandian.getWmsStockPandian.getPandianBanlance(orderNo ,start, end);
|
||
}
|
||
|
||
public DataTable getPandianOrder(string orderNo)
|
||
{
|
||
return pandian.getWmsStockPandian.getPandianOrder(orderNo);
|
||
}
|
||
|
||
public DataTable getPandianTargetItem(string orderNo,string locationId)
|
||
{
|
||
return pandian.getWmsStockPandian.getPandianTargetItem(orderNo, locationId);
|
||
}
|
||
|
||
public DataTable getPandianTargetItems(string orderNo )
|
||
{
|
||
return pandian.getWmsStockPandian.getPandianTargetItems(orderNo );
|
||
}
|
||
|
||
|
||
|
||
public bool adjustPandianStock(string orderNo,bool isRollBack )
|
||
{
|
||
return pandian.adjustPandianStock(orderNo, isRollBack);
|
||
}
|
||
|
||
public bool finishPandian(string orderNo)
|
||
{
|
||
return pandian.finishPandian(orderNo) ;
|
||
}
|
||
/// <summary>
|
||
/// 采集完成
|
||
/// </summary>
|
||
/// <param name="orderNo"></param>
|
||
/// <returns></returns>
|
||
public bool stopPandianPick(string orderNo)
|
||
{
|
||
return pandian.stopPandianPick(orderNo);
|
||
}
|
||
|
||
//test only
|
||
public void initalErpSaleSku()
|
||
{
|
||
stock.initialErpSaledSku();
|
||
}
|
||
public void formatLocName()
|
||
{
|
||
new WmsLocation().formatLocName();
|
||
}
|
||
|
||
public bool updateLocScale(int[] ids, Structs locs)
|
||
{
|
||
return loc.updateLocScale(ids, locs);
|
||
}
|
||
|
||
public DataSet queryPlateStock(string querystr, int rownumStart, int rownumEnd)
|
||
{
|
||
return stock.wmsStock.queryPlateStock(querystr, rownumStart, rownumEnd);
|
||
}
|
||
public DataTable queryPerformanceKPI(string querystr,bool isSum)
|
||
{
|
||
return stock.wmsStock.queryPerformanceKPI(querystr,isSum);
|
||
}
|
||
public DataTable getElbPartStks(string locationId)
|
||
{
|
||
|
||
return stock.wmsStock.getElbPartStks(new WmsLocation(locationId).part);
|
||
}
|
||
|
||
}
|
||
}
|