| 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
 | | using System; |  | using System.Collections.Generic; |  | using System.Linq; |  | using System.Text; |  | using System.Web; |  | using WebAPI.Dapper; |  |   |  | namespace WebAPI.Service |  | { |  |     public class ProcessDal |  |     { |  |         public static List<Models.M_StationBillMail> GetProcessList(string hName,int hLevel,string hNumber,string hBillSubType) |  |         { |  |             var sqlBuilder = new StringBuilder(); |  |             sqlBuilder.Append("select a.HItemID,a.HNumber,a.HName ,a.HLevel,a.HTypeFlow ,a.HTypeCount ,a.HBillSubType "); |  |             sqlBuilder.Append(",a.HEndFlag,a.HStopFlag,b.hname,a.HSNo,a.HProcessID_K3,a.HFixPrice,a.HOverFixPrice "); |  |             sqlBuilder.Append(",a.HEndFlag,a.HStopFlag,b.hname,a.HSNo,a.HProcessID_K3,a.HFixPrice,a.HOverFixPrice "); |  |             sqlBuilder.Append(",a.HAutoTrunFlag,a.HRemark ,a.HProcessID_K3 from gy_Process a left join h_v_IF_Department b on a.HDeptID=b.hitemid where 1=1 "); |  |             if (!string.IsNullOrEmpty(hName)) |  |                 sqlBuilder.Append(" and a.HName like '%@hName%'"); |  |             if(!string.IsNullOrEmpty(hNumber)) |  |                 sqlBuilder.Append(" and a.HNumbe like '%@hNumber%'"); |  |             if (!string.IsNullOrEmpty(hBillSubType)) |  |                 sqlBuilder.Append(" and a.HBillSubType like '%@hBillSubType%'"); |  |             if(hLevel!=0) |  |                 sqlBuilder.Append(" and a.HLevel=@hLevel"); |  |             var list = SqlPools.GetInstance("YqnConn").GetModelList<Models.M_StationBillMail>(sqlBuilder.ToString(), new { hName, hLevel, hNumber, hBillSubType }); |  |             return list; |  |         } |  |         public static Models.M_StationBillMail GetProcessDetail(int hItemID) |  |         { |  |             var sql = "select HNumber,HHelpCode,HName,HNumber,HDeptID,HProcMulID,HRemark,HSNo,HFixPrice,HOverFixPrice,HBillSubType,HStopflag, HTypeFlow, HTypeCount, HAutoTrunFlag, HItemID from Gy_Process where HItemID=@hItemID"; |  |             var model = SqlPools.GetInstance("YqnConn").GetModel<Models.M_StationBillMail>(sql, new { hItemID }); |  |             return model; |  |         } |  |     } |  | } | 
 |