public string GetNewCellCode(string shelfcode) { using (PersistentManager persistentManager = new PersistentManager()) { WarehouseCellDao dao = new WarehouseCellDao(); return(dao.GetNewCellCode(shelfcode)); } }
public DataSet QueryWarehouseCell(string filter, int pageIndex, int pageSize) { using (PersistentManager persistentManager = new PersistentManager()) { WarehouseCellDao dao = new WarehouseCellDao(); string sql = string.Format("select * from V_WMS_WH_CELL WHERE {0} ORDER BY AREACODE,SHELFCODE,CELLCODE", filter); return(dao.Query(sql, pageIndex, pageSize)); } }
/// <summary> /// 查询产品分布 /// </summary> public DataSet QueryProductDistribution(int pageIndex, int pageSize, string filter) { using (PersistentManager persistentManager = new PersistentManager()) { WarehouseCellDao dao = new WarehouseCellDao(); string sql = string.Format("SELECT * FROM {0} WHERE {1} ORDER BY CURRENTPRODUCT,CELLCODE", strTableView, filter); return(dao.Query(sql, pageIndex, pageSize)); } }
//private string strPrimaryKey = ""; //private string strOrderByFields = "ExceptionalLogID ASC"; //private string strQueryFields = "*"; public DataSet QueryAllCell() { using (PersistentManager persistentManager = new PersistentManager()) { WarehouseCellDao dao = new WarehouseCellDao(); string sql = "select * from V_WMS_WH_CELL ORDER BY AREACODE,SHELFCODE,CELLCODE"; return(dao.GetData(sql)); } }
//获取移位单产生的货位变化 public DataSet MoveChangeCell(DateTime timeNow) { using (PersistentManager pm = new PersistentManager()) { WarehouseCellDao dao = new WarehouseCellDao(); dao.SetPersistentManager(pm); string sql = string.Format("SELECT OUT_CELLCODE,IN_CELLCODE FROM WMS_MOVE_BILLDETAIL WHERE FINISHTIME<='{0}' AND FINISHTIME>=(select max(billdate) from WMS_OUT_BILLMASTER) AND STATUS='2'", timeNow); return(dao.Query(sql)); } }
//报表 public DataTable QueryProductDistribution(string filter) { using (PersistentManager pm = new PersistentManager()) { WarehouseCellDao dao = new WarehouseCellDao(); dao.SetPersistentManager(pm); string sql = string.Format("SELECT * FROM {0} WHERE {1} ORDER BY CURRENTPRODUCT,CELLCODE", strTableView, filter); return(dao.Query(sql).Tables[0]); } }
public string QueryShelfCode(string productCode) { using (PersistentManager persistentManager = new PersistentManager()) { WarehouseCellDao dao = new WarehouseCellDao(); string sql = string.Format("SELECT SHELFCODE FROM WMS_WH_CELL WHERE ASSIGNEDPRODUCT='{0}' AND AREATYPE='0' GROUP BY SHELFCODE", productCode); DataTable shelfTable = dao.GetData(sql).Tables[0]; string shelfList = UtinString.StringMake(shelfTable, "SHELFCODE"); return(UtinString.StringMake(shelfList)); } }
public bool Delete(DataSet dataSet) { bool flag = false; using (PersistentManager persistentManager = new PersistentManager()) { WarehouseCellDao dao = new WarehouseCellDao(); dao.DeleteEntity(dataSet); flag = true; } return(flag); }
public bool Delete(int CellID) { bool flag = false; using (PersistentManager persistentManager = new PersistentManager()) { WarehouseCellDao dao = new WarehouseCellDao(); string sql = string.Format("delete from WMS_WH_CELL WHERE CELL_ID={0}", CellID); dao.SetData(sql); flag = true; } return(flag); }
public bool UpdateCellEx() { bool flag = false; using (PersistentManager persistentManager = new PersistentManager()) { WarehouseCellDao dao = new WarehouseCellDao(); StringBuilder sb = new StringBuilder(); sb.Append(string.Format("update wms_wh_cell set quantity=quantity-frozen_out_qty,frozen_out_qty=0 where FROZEN_OUT_QTY<0")); sb.Append(string.Format("update wms_wh_cell set quantity=quantity+frozen_in_qty,frozen_in_qty=0 where frozen_in_qty<0")); dao.SetData(sb.ToString()); flag = true; } return(flag); }
//更新货位信息,将没有重要信息的货位初始化 public bool UpdateCell() { bool flag = false; using (PersistentManager persistentManager = new PersistentManager()) { WarehouseCellDao dao = new WarehouseCellDao(); string sql = string.Format("UPDATE WMS_WH_CELL set CURRENTPRODUCT=NULL,INPUTDATE=NULL WHERE ISACTIVE=1 AND QUANTITY=0 AND FROZEN_IN_QTY=0 AND FROZEN_OUT_QTY=0 AND ISLOCKED=0 AND AREATYPE<> 1"); dao.SetData(sql); flag = true; } return(flag); }
public bool UpdateFrozenQty(string cellCode) { bool flag = false; using (PersistentManager persistentManager = new PersistentManager()) { WarehouseCellDao dao = new WarehouseCellDao(); string sql = string.Format("update WMS_WH_CELL set FROZEN_IN_QTY='{0}'where CELLCODE='{1}'" , this.FROZEN_IN_QTY, cellCode); dao.SetData(sql); flag = true; } return(flag); }
public bool UpdateBatch() { bool flag = false; using (PersistentManager persistentManager = new PersistentManager()) { WarehouseCellDao dao = new WarehouseCellDao(); string sql = string.Format("update WMS_WH_CELL set ISACTIVE='{1}',ASSIGNEDPRODUCT='{2}',ISVIRTUAL='{3}',UNITCODE='{4}' where CELL_ID='{0}'" , this.CELL_ID, this.ISACTIVE, this.ASSIGNEDPRODUCT, this.ISVIRTUAL, this.UNITCODE); dao.SetData(sql); dao.SetData("update wms_wh_cell set assignedproduct=null where assignedproduct=''"); flag = true; } return(flag); }
public bool Insert() { bool flag = false; using (PersistentManager persistentManager = new PersistentManager()) { WarehouseCellDao dao = new WarehouseCellDao(); string sql = string.Format("Insert into WMS_WH_CELL (SHELFCODE,CELLCODE,CELLNAME,ISACTIVE,MAX_QUANTITY,LAYER_NO,ASSIGNEDPRODUCT,PALLETID,ELECTRICGROUP,ELECTRICCOM,ELECTRICADDRESS,ISVIRTUAL,UNITCODE,AREATYPE) values('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}','{10}','{11}','{12}','{13}')" , this.SHELFCODE, this.CELLCODE, this.CELLNAME, this.ISACTIVE, this.MAX_QUANTITY, this.LAYER_NO, this.ASSIGNEDPRODUCT, this.PALLETID, this.ELECTRICGROUP, this.ELECTRICCOM, this.ELECTRICADDRESS, this.ISVIRTUAL, this.UNITCODE, AREATYPE); dao.SetData(sql); flag = true; } return(flag); }