using HH.WMS.Entitys;
|
using HH.WMS.Entitys.Basic;
|
/********************************************************************************
|
|
** auth: DBS
|
|
** date: 2018/12/12 15:43:01
|
|
** desc: 尚未编写描述
|
|
** Ver.: V1.0.0
|
|
*********************************************************************************/
|
using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
|
namespace HH.WMS.DAL.Basic
|
{
|
public class TN_WM_PRINT_TASKDAL:DapperBaseDAL
|
{
|
#region 更新打印任务标识
|
/// <summary>
|
/// 更新打印任务标识
|
/// </summary>
|
/// <param name="guids">打印任务guid,多个用逗号隔开</param>
|
/// <returns></returns>
|
/// <History>[Hanhe(DBS)] created 2018/12/13</History>
|
public OperateResult UpdatePrintFlag(string guids)
|
{
|
string sql = "update TN_WM_PRINT_TASK set CN_C_IS_PRINTED='Y' where CN_GUID in('"+guids.Replace(",","','")+"')";
|
|
return ExecuteTranSql(sql,null,null);
|
}
|
#endregion
|
|
#region 查询打印任务
|
/// <summary>
|
/// 查询打印任务
|
/// </summary>
|
/// <param name="mac">机器MAC地址</param>
|
/// <param name="isHistory">是否查询已打印记录(Y/N)</param>
|
/// <param name="key">模糊搜索的打印任务</param>
|
/// <param name="startDate">开始时间</param>
|
/// <param name="endDate">结束时间</param>
|
/// <returns></returns>
|
/// <History>[Hanhe(DBS)] created 2018/12/12</History>
|
public List<TN_WM_PRINT_TASKEntity> GetList(string mac, string isHistory, string key, string startDate, string endDate)
|
{
|
string sql = "select * from TN_WM_PRINT_TASK where CN_S_MAC=@CN_S_MAC and CN_C_IS_PRINTED=@CN_C_IS_PRINTED ";
|
if (!string.IsNullOrEmpty(startDate))
|
sql += " and CN_T_CREATE >='" + startDate+"'";
|
if (!string.IsNullOrEmpty(endDate))
|
sql += " and CN_T_CREATE <='"+endDate+"'";
|
sql += " and CN_S_CONTENT like @CN_S_CONTENT";
|
return ExecuteQuery <TN_WM_PRINT_TASKEntity>(sql, new
|
{
|
CN_S_MAC =mac,
|
CN_C_IS_PRINTED = isHistory,
|
CN_S_CONTENT= "%"+key+"%"
|
});
|
}
|
#endregion
|
}
|
}
|