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 更新打印任务标识
///
/// 更新打印任务标识
///
/// 打印任务guid,多个用逗号隔开
///
/// [Hanhe(DBS)] created 2018/12/13
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 查询打印任务
///
/// 查询打印任务
///
/// 机器MAC地址
/// 是否查询已打印记录(Y/N)
/// 模糊搜索的打印任务
/// 开始时间
/// 结束时间
///
/// [Hanhe(DBS)] created 2018/12/12
public List 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 (sql, new
{
CN_S_MAC =mac,
CN_C_IS_PRINTED = isHistory,
CN_S_CONTENT= "%"+key+"%"
});
}
#endregion
}
}