using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
using HH.WMS.Entitys;
|
using System.Data;
|
|
namespace HH.WMS.DAL
|
{
|
public class TestDAL : DapperBaseDAL
|
{
|
/// <summary>
|
/// 多表查询动态列 List
|
/// </summary>
|
/// <param name="opNo"></param>
|
/// <returns></returns>
|
public List<dynamic> GetTestDynamicList(string opNo)
|
{
|
string sql = "select a.*,b.CN_S_ITEM_CODE from TN_WM_INCREASE_INVENTORY_MST a, TN_WM_INCREASE_INVENTORY_DTL b where a.CN_S_OP_NO = b.CN_S_OP_NO and a.CN_S_OP_NO=@CN_S_OP_NO";
|
|
return ExecuteDynamicList(sql, new
|
{
|
CN_S_OP_NO = opNo
|
});
|
}
|
|
|
/// <summary>
|
/// 多表查询指定实体 List
|
/// </summary>
|
/// <param name="opNo"></param>
|
/// <returns></returns>
|
public List<TN_WM_INCREASE_INVENTORY_MSTEntity> GetTestList(string opNo)
|
{
|
string sql = "select a.*,b.CN_S_ITEM_CODE from TN_WM_INCREASE_INVENTORY_MST a, TN_WM_INCREASE_INVENTORY_DTL b where a.CN_S_OP_NO = b.CN_S_OP_NO and a.CN_S_OP_NO=@CN_S_OP_NO";
|
|
return ExecuteQuery<TN_WM_INCREASE_INVENTORY_MSTEntity>(sql, new
|
{
|
CN_S_OP_NO = opNo
|
});
|
}
|
|
/// <summary>
|
/// 多表查询 Datatable
|
/// </summary>
|
/// <param name="opNo"></param>
|
/// <returns></returns>
|
public DataTable GetTestDataTable(string opNo)
|
{
|
string sql = "select a.*,b.CN_S_ITEM_CODE from TN_WM_INCREASE_INVENTORY_MST a, TN_WM_INCREASE_INVENTORY_DTL b where a.CN_S_OP_NO = b.CN_S_OP_NO and a.CN_S_OP_NO=@CN_S_OP_NO";
|
|
return ExecuteDataTable(sql, new
|
{
|
CN_S_OP_NO = opNo
|
});
|
}
|
|
/// <summary>
|
/// 修改测试
|
/// </summary>
|
/// <param name="opNo"></param>
|
/// <param name="trans"></param>
|
/// <returns></returns>
|
public OperateResult UpdateTest(string opNo, IDbTransaction trans)
|
{
|
string sql = "update TN_WM_INCREASE_INVENTORY_MST set CN_S_EXT1 = @CN_S_EXT1 where CN_S_OP_NO=@CN_S_OP_NO";
|
return ExecuteTranSql(sql, new
|
{
|
CN_S_EXT1 = "TestUpdate",
|
CN_S_OP_NO = opNo
|
}, trans);
|
}
|
|
|
}
|
}
|