去除引用common.props
This commit is contained in:
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Aspose.Cells.Drawing;
|
||||
using System.Linq.Expressions;
|
||||
using JNPF.Common.Core.Manager;
|
||||
using JNPF.Common.Filter;
|
||||
using JNPF.DependencyInjection;
|
||||
@@ -15,7 +9,6 @@ using JNPF.VisualDev;
|
||||
using JNPF.VisualDev.Entitys.Dto.VisualDevModelData;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using SqlSugar;
|
||||
using Tnb.BasicData.Entities;
|
||||
using Tnb.QcMgr.Entities;
|
||||
@@ -42,7 +35,7 @@ namespace Tnb.QcMgr
|
||||
private async Task<dynamic> GetListAsync(VisualDevModelListQueryInput input)
|
||||
{
|
||||
var db = _repository.AsSugarClient();
|
||||
Dictionary<string,string> dic= new Dictionary<string,string>();
|
||||
Dictionary<string, string> dic = new Dictionary<string, string>();
|
||||
dic.Add("ok", "合格");
|
||||
dic.Add("no", "不合格");
|
||||
dic.Add("barelyok", "让步合格");
|
||||
@@ -55,7 +48,7 @@ namespace Tnb.QcMgr
|
||||
var list = await db.Queryable<DictionaryDataEntity>()
|
||||
.LeftJoin<DictionaryTypeEntity>((a, b) => a.DictionaryTypeId == b.Id)
|
||||
.Where((a, b) => b.FullName == "质检状态" || b.FullName == "质检类型选择").ToListAsync();
|
||||
var BasLocations= await db.Queryable<BasLocation>().ToListAsync();
|
||||
var BasLocations = await db.Queryable<BasLocation>().ToListAsync();
|
||||
var result = await db.Queryable<QcCheckExecH>()
|
||||
.LeftJoin<BasMaterial>((a, b) => a.materialid == b.id)
|
||||
.LeftJoin<BasProcess>((a, b, c) => a.processid == c.id)
|
||||
@@ -79,13 +72,13 @@ namespace Tnb.QcMgr
|
||||
tasktime = a.tasktime == null ? "" : a.tasktime,
|
||||
exectime = a.exectime == null ? "" : a.exectime,
|
||||
execuser = e.RealName == null ? "" : e.RealName,
|
||||
}).OrderByDescending(a =>DateTime.Parse( a.exectime)).ToPagedListAsync(input.currentPage, input.pageSize);
|
||||
}).OrderByDescending(a => DateTime.Parse(a.exectime)).ToPagedListAsync(input.currentPage, input.pageSize);
|
||||
foreach (var item in result.list)
|
||||
{
|
||||
item.checktype = list.Select(p => p.Id).Contains(item.checktype) ? list.Where(p => p.Id == item.checktype).First().FullName : "";
|
||||
item.status = list.Select(p => p.Id).Contains(item.status) ? list.Where(p => p.Id == item.status).First().FullName : "";
|
||||
item.result = dic.Where(p => p.Key == item.result).Any() ? dic.Where(p => p.Key == item.result).First().Value : "";
|
||||
item.wareid = BasLocations.Where(p => p.id == item.wareid).Any() ? BasLocations.Where(p => p.id == item.wareid).First().location_code: "";
|
||||
item.wareid = BasLocations.Where(p => p.id == item.wareid).Any() ? BasLocations.Where(p => p.id == item.wareid).First().location_code : "";
|
||||
}
|
||||
return PageResult<QcCheckExecHOut>.SqlSugarPageResult(result);
|
||||
}
|
||||
@@ -125,7 +118,7 @@ namespace Tnb.QcMgr
|
||||
.WhereIF(!string.IsNullOrEmpty(materialid), (a, b, c, d, e) => a.materialid == materialid)
|
||||
.WhereIF(!string.IsNullOrEmpty(checktype), (a, b, c, d, e) => a.checktype == checktype)
|
||||
.WhereIF(!string.IsNullOrEmpty(status), (a, b, c, d, e) => a.status == status)
|
||||
// .Where((a, b, c, d, e) => a.status == list.Where(p => p.FullName == "已完成").First().Id)
|
||||
// .Where((a, b, c, d, e) => a.status == list.Where(p => p.FullName == "已完成").First().Id)
|
||||
.Select((a, b, c, d, e) => new QcCheckExecHOut
|
||||
{
|
||||
id = a.id,
|
||||
@@ -141,7 +134,7 @@ namespace Tnb.QcMgr
|
||||
exectime = a.exectime == null ? "" : a.exectime,
|
||||
execuser = e.RealName == null ? "" : e.RealName,
|
||||
}).OrderByDescending(expression).ToPagedListAsync(input.currentPage, input.pageSize);
|
||||
|
||||
|
||||
foreach (var item in result.list)
|
||||
{
|
||||
item.checktype = list.Select(p => p.Id).Contains(item.checktype) ? list.Where(p => p.Id == item.checktype).First().FullName : "";
|
||||
|
||||
Reference in New Issue
Block a user