BiDecisionOhterService.cs
1.78 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
45
46
47
48
49
50
51
52
53
54
55
56
using Hh.Mes.Common.log;
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.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Hh.Mes.Service
{
public partial class BiDecisionService : RepositorySqlSugar<sys_user>
{
/// <summary>
/// 供应商列表
/// </summary>
public dynamic GetSuppliersInfo()
{
var response = new Response();
return ExceptionsHelp.Instance.ExecuteT(() =>
{
var options = new List<dynamic>
{
new { value = "全部", label = "全部" }
};
var list = base.Context.Queryable<base_project_client_info>().Select(x => new
{
value = x.keys,
label = x.clientName
}).ToList();
var finalList = options.Concat(list).ToList();
response.Result = finalList;
response.Count = finalList.Count;
return response;
}, catchRetrunValue: "GetSuppliersInfo");
}
/// <summary>
/// 供应商对应的项目
/// </summary>
public dynamic GeteProjectInfoByClientInfoKeys(Guid clientInfoKeys)
{
var response = new Response();
return ExceptionsHelp.Instance.ExecuteT(() =>
{
var list = base.Context.Queryable<base_project>().Where(x=>x.projectClientInfoKeys==clientInfoKeys).ToList();
response.Result = list;
response.Count = list.Count;
return response;
}, catchRetrunValue: "list");
}
}
}