88 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			C#
		
	
	
	
			
		
		
	
	
			88 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			C#
		
	
	
	
| 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.wms.Data.Model;
 | ||
| 
 | ||
| namespace DeiNiu.Wcf
 | ||
| {
 | ||
|     // 注意: 使用“重构”菜单上的“重命名”命令,可以同时更改代码、svc 和配置文件中的类名“GoodsServicesvc”。
 | ||
|     public class GoodsService :basicService, IGoods
 | ||
|     {
 | ||
|         lWmsGoods _lgoods;
 | ||
| 
 | ||
|         lWmsGoods lGoods
 | ||
|         {
 | ||
|             get
 | ||
|             {
 | ||
|                 if (_lgoods == null)
 | ||
|                 {
 | ||
|                     _lgoods = new lWmsGoods(getOperId());
 | ||
|                 }
 | ||
|                 return _lgoods;
 | ||
|             }
 | ||
|         }
 | ||
| 
 | ||
|         public  DataSet Query(string querystr, int rownumStart, int rownumEnd)
 | ||
|         {
 | ||
|             return lGoods.Query(querystr, rownumStart, rownumEnd);
 | ||
|         }
 | ||
|         public bool update(List<WcfWmsGoods> goods)
 | ||
|         {
 | ||
|             foreach (WcfWmsGoods wg in goods)
 | ||
|             {
 | ||
|                 //  log.Debug("goods name " + wg.goodsId + " , canSeedOut :" + wg.canSeedOut);
 | ||
|              
 | ||
|                 WmsGoods gd = wg.getDbObject();// getWmsGoods(wg);
 | ||
|                 log.Debug(  getOperId()+ " to update " + gd);
 | ||
|                 gd.Update();
 | ||
|             }
 | ||
| 
 | ||
|             return true;
 | ||
|         }
 | ||
| 
 | ||
|      /*
 | ||
|        WmsGoods getWmsGoods(wcfGoods wg)
 | ||
|        {
 | ||
|            WmsGoods  goods = new WmsGoods ();
 | ||
| 
 | ||
|            goods.ID = wg.id;
 | ||
|            goods.batchMax1 = wg.batchMax1;
 | ||
|            goods.batchMax2 = wg.batchMax2;
 | ||
|            goods.batchMax3 = wg.batchMax3;
 | ||
|            goods.batchMax4 = wg.batchMax4; 
 | ||
|            goods.bulkMax = wg.bulkMax;
 | ||
|            goods.bulkMax1 = wg.bulkMax1;
 | ||
|            goods.goodsId = wg.goodsId;
 | ||
|            goods.goodsType = wg.goodsType;
 | ||
|            goods.height = wg.height;
 | ||
|            goods.length = wg.length;
 | ||
|            goods.width = wg.width;
 | ||
|            goods.weight = wg.weight;
 | ||
|            goods.operater = getOperId();
 | ||
|            goods.part = wg.part;
 | ||
|            goods.repType = wg.repType;
 | ||
|            goods.bigCount = wg.bigCount;
 | ||
|            goods.ABC = wg.ABC;
 | ||
|            goods.highStore = wg.highStore;
 | ||
|            goods.lowStore = wg.lowStore;
 | ||
|            goods.plotId = wg.plotId;
 | ||
|            return goods;
 | ||
| 
 | ||
|        }
 | ||
|         */
 | ||
|        public void syncGoods()
 | ||
|        {
 | ||
|            new WmsGoods().syncGoods();
 | ||
|        }
 | ||
|        public DataTable QueryPacking(string goodsId)
 | ||
|        {
 | ||
|            return lGoods.QueryPacking(goodsId);
 | ||
|        }
 | ||
|     }
 | ||
| }
 |