EquipmentVisualService.cs
1.63 KB
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
using Hh.Mes.Common.Request;
using Hh.Mes.POJO.Entity;
using Hh.Mes.POJO.Response;
using Hh.Mes.Service.Repository;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
namespace Hh.Mes.Service.WebService.Equipment
{
/// <summary>
/// 设备可视化参数
/// </summary>
public class BaseEquipmentService : RepositorySqlSugar<base_equipment>
{
/// <summary>
/// //获取列表
/// </summary>
public Response GetEquipmentFileListById(base_equipment equipment)
{
var result = new Response();
var stringBuilder = new StringBuilder();
stringBuilder.AppendLine($@" select
t1.* , t2.lineName,
t4.workCenterName
from base_equipment t1 with(nolock)
left join base_line t2 with(nolock) on t1.lineCode = t2.lineCode
left join base_work_center_station_rel t3 on t3.workStationCode =t1.workStationCode
left join base_work_center t4 on t4.workCenterCode = t3.workCenterCode ");
var dt = base.Context.Ado.GetDataTable(stringBuilder.ToString(), new List<SugarParameter>(){ });
//result.Result = ds.Tables[0];
result.Result = dt;
result.Count = dt.Rows.Count;//model.Exel ? (int)result.Result.Rows.Count : (int)ds.Tables[1].Rows[0]["rowTotal"];
return result;
}
}
}