This commit is contained in:
jl
2023-04-21 17:29:50 +08:00
parent ba8edecb11
commit 406c7a9733
10 changed files with 1484 additions and 1166 deletions

View File

@ -257,13 +257,19 @@ namespace Epost.DAL
return db.GetsqlForDT(sql);
}
#endregion
#region
public List<AddressstorageModel> GetAreaList(string block = "")
public List<AddressstorageModel> GetAreaList(string block, string shelfid)
{
string strwhere = string.Empty;
if (!string.IsNullOrEmpty(block))
{
strwhere = "and block ='" + block + "'";
strwhere += "and block ='" + block + "'";
}
if (!string.IsNullOrEmpty(shelfid))
{
strwhere += "and shelfid ='" + shelfid + "'";
}
string sql = string.Format("select area,block from Addressstorage where type=1 " + strwhere + " group by area,block");
DataTable dt = db.GetsqlForDT(sql);
@ -271,6 +277,22 @@ namespace Epost.DAL
return ModelConvertHelper<AddressstorageModel>.ConvertToList(dt);
}
#endregion
#region
public List<AddressstorageModel> GetshelfidList(string block)
{
string strwhere = string.Empty;
if (!string.IsNullOrEmpty(block))
{
strwhere += "and block ='" + block + "'";
}
string sql = string.Format("select shelfid,block from Addressstorage where type=1 " + strwhere + " group by shelfid,block");
DataTable dt = db.GetsqlForDT(sql);
return ModelConvertHelper<AddressstorageModel>.ConvertToList(dt);
}
#endregion
#region
public DataTable GetWayList()
{

View File

@ -0,0 +1,94 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Epost.DAL.Cache
{
public class WorkIngCacheDAL
{
private static object lockobj = new object();
public static string workingstate = string.Empty;
#region
public string GetWorkState()
{
//读取数据库 处理异常断电等情况------待开发
return workingstate;
}
#endregion
#region
public void ClearWork()
{
workingstate = "";
}
#endregion
#region Job缓存处理方法
/// <summary>
/// Job缓存处理方法
/// </summary>
/// <param name="JobParam"></param>
/// <param name="CommendType"></param>
/// <returns></returns>
public bool UpdateWorkModel(WorkEcommendType CommendType)
{
lock (lockobj)
{
if (CommendType.Equals(WorkEcommendType.Create))
{
workingstate = "Start";
}
else if (CommendType.Equals(WorkEcommendType.Complete))
{
workingstate = "";
}
return true;
}
}
#endregion
}
public enum WorkEcommendType
{
/// <summary>
/// 开始作业
/// </summary>
[Description("开始作业")]
Create,
/// <summary>
/// 结束作业
/// </summary>
[Description("结束作业")]
Complete
}
}

View File

@ -111,6 +111,7 @@
<Compile Include="Cache\ShowMesCacheDAL.cs" />
<Compile Include="Cache\UserLoginCacheDAL.cs" />
<Compile Include="Cache\UserModelCacheDAL.cs" />
<Compile Include="Cache\WorkIngCacheDAL.cs" />
<Compile Include="Cache\XgateCacheDAL.cs" />
<Compile Include="CommandDAL.cs" />
<Compile Include="DB.cs" />