This commit is contained in:
@ -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()
|
||||
{
|
||||
|
94
Epost.DAL/Cache/WorkIngCacheDAL.cs
Normal file
94
Epost.DAL/Cache/WorkIngCacheDAL.cs
Normal 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
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -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" />
|
||||
|
Reference in New Issue
Block a user