jt
2021-06-10 5d0d028456874576560552f5a5c4e8b801786f11
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HH.WMS.DAL;
using HH.WMS.Entitys;
using System.Data;
 
namespace HH.WMS.BLL
{
    public class TestBLL : DapperBaseBLL
    {
        public OperateResult Test(TN_WM_INCREASE_INVENTORY_MSTEntity entity)
        {
            return UseTransaction(trans =>
            {
                //新增入库主表
                CreateDAL<DapperDAL<TN_WM_INCREASE_INVENTORY_MSTEntity>>().Add(entity, trans);
                //新增入库子表
                CreateDAL<DapperDAL<TN_WM_INCREASE_INVENTORY_DTLEntity>>().AddRange(entity.DTLEntity, trans);
                //修改CN_S_OP_NO="Test11" 入库主表(所有字段都会修改)
                CreateDAL<DapperDAL<TN_WM_INCREASE_INVENTORY_MSTEntity>>().UpdateAll(entity
                    , new { CN_S_OP_NO = "Test11" }, trans);
 
                CreateDAL<DapperDAL<TN_WM_INCREASE_INVENTORY_MSTEntity>>().Update(
                    new
                    {
 
                    },
                    new
                    {
 
                    }, trans);
            });
        }
 
        /// <summary>
        /// 多表查询动态列 List
        /// </summary>
        /// <param name="opNo"></param>
        /// <returns></returns>
        public List<dynamic> GetTestDynamicList(string opNo)
        {
            return CreateDAL<TestDAL>().GetTestDynamicList(opNo);
        }
 
        /// <summary>
        /// 多表查询指定实体 List
        /// </summary>
        /// <param name="opNo"></param>
        /// <returns></returns>
        public List<TN_WM_INCREASE_INVENTORY_MSTEntity> GetTestList(string opNo)
        {
            return CreateDAL<TestDAL>().GetTestList(opNo);
        }
 
 
        /// <summary>
        /// 多表查询 Datatable
        /// </summary>
        /// <param name="opNo"></param>
        /// <returns></returns>
        public DataTable GetTestDataTable(string opNo)
        {
            return CreateDAL<TestDAL>().GetTestDataTable(opNo);
        }
 
    }
}