去除引用common.props
This commit is contained in:
@@ -1,26 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Aspose.Cells.Drawing;
|
||||
using COSXML.Model.Tag;
|
||||
using JNPF.Common.Core.Manager;
|
||||
using JNPF.Common.Core.Manager;
|
||||
using JNPF.Common.Enums;
|
||||
using JNPF.DependencyInjection;
|
||||
using JNPF.DynamicApiController;
|
||||
using JNPF.FriendlyException;
|
||||
using JNPF.JsonSerialization;
|
||||
using JNPF.VisualDev;
|
||||
using JNPF.VisualDev.Interfaces;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.CodeAnalysis;
|
||||
using NPOI.SS.Formula.Eval;
|
||||
using NPOI.Util;
|
||||
using SqlSugar;
|
||||
using Tnb.Common;
|
||||
using Tnb.QcMgr.Entities;
|
||||
using Tnb.QcMgr.Interfaces;
|
||||
|
||||
@@ -48,8 +35,8 @@ namespace Tnb.QcMgr
|
||||
private async Task Delete(string id)
|
||||
{
|
||||
var db = _repository.AsSugarClient();
|
||||
var QcCheckItemsH=await db.Queryable< QcCheckItemsH >().Where(p=>p.id==id).FirstAsync();
|
||||
var QcCheckItemsRs = await db.Queryable<QcCheckItemsR>().Where(p => p.itemshid == id).ToListAsync() ;
|
||||
var QcCheckItemsH = await db.Queryable<QcCheckItemsH>().Where(p => p.id == id).FirstAsync();
|
||||
var QcCheckItemsRs = await db.Queryable<QcCheckItemsR>().Where(p => p.itemshid == id).ToListAsync();
|
||||
var QcCheckItemsDs = await db.Queryable<QcCheckItemsD>().Where(p => QcCheckItemsRs.Select(p => p.itemsdid).ToList().Contains(p.id)).ToListAsync();
|
||||
await db.Ado.BeginTranAsync();
|
||||
await db.Deleteable(QcCheckItemsH).ExecuteCommandAsync();
|
||||
@@ -243,7 +230,7 @@ namespace Tnb.QcMgr
|
||||
await db.Ado.CommitTranAsync();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
{
|
||||
await db.Ado.RollbackTranAsync();
|
||||
throw Oops.Oh(ErrorCode.COM1000);
|
||||
}
|
||||
|
||||
@@ -1,14 +1,4 @@
|
||||
using System;
|
||||
using System.ArrayExtensions;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Aspose.Cells.Drawing;
|
||||
using COSXML.Model.Tag;
|
||||
using JNPF.Common.Contracts;
|
||||
using JNPF.Common.Core.Manager;
|
||||
using JNPF.Common.Core.Manager;
|
||||
using JNPF.Common.Enums;
|
||||
using JNPF.Common.Security;
|
||||
using JNPF.DependencyInjection;
|
||||
@@ -21,10 +11,7 @@ using JNPF.TaskScheduler.Entitys.Dto.TaskScheduler;
|
||||
using JNPF.TaskScheduler.Entitys.Model;
|
||||
using JNPF.VisualDev;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
using SqlSugar;
|
||||
using Tnb.ProductionMgr.Entities;
|
||||
using Tnb.QcMgr.Entities;
|
||||
using Tnb.QcMgr.Entities;
|
||||
using Tnb.QcMgr.Entities.Entity;
|
||||
using Tnb.QcMgr.Entities.Enums;
|
||||
@@ -142,13 +129,13 @@ namespace Tnb.QcMgr
|
||||
Item.setShow.isexec = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!Item.setData.isexec.attachment&& !Item.setData.isexec.remark)
|
||||
{
|
||||
if (!Item.setData.isexec.attachment && !Item.setData.isexec.remark)
|
||||
Item.setShow.isexec = false;
|
||||
else
|
||||
else
|
||||
Item.setShow.isexec = true;
|
||||
}
|
||||
|
||||
|
||||
CheckPlansOut.checktypes.Where(p => p.checktypeid == QcCheckPlanD.typeid).First()?.items?.Add(Item);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 : "";
|
||||
|
||||
@@ -1,12 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Aspose.Cells.Drawing;
|
||||
using JNPF.Common.Core.Manager;
|
||||
using JNPF.Common.Enums;
|
||||
using JNPF.Common.Core.Manager;
|
||||
using JNPF.Common.Filter;
|
||||
using JNPF.Common.Security;
|
||||
using JNPF.DependencyInjection;
|
||||
@@ -17,21 +9,12 @@ using JNPF.Systems.Entitys.Permission;
|
||||
using JNPF.Systems.Entitys.System;
|
||||
using JNPF.VisualDev;
|
||||
using JNPF.VisualDev.Entitys.Dto.VisualDevModelData;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
using SqlSugar;
|
||||
using Tnb.BasicData.Entities;
|
||||
using Tnb.BasicData;
|
||||
using Tnb.EquipMgr.Entities;
|
||||
using Tnb.ProductionMgr.Entities.Dto;
|
||||
using Tnb.ProductionMgr.Entities;
|
||||
using Tnb.QcMgr.Entities;
|
||||
using Tnb.QcMgr.Entities;
|
||||
using Tnb.QcMgr.Entities.Entity;
|
||||
using Tnb.QcMgr.Interfaces;
|
||||
using JNPF.Common.Extension;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
|
||||
namespace Tnb.QcMgr
|
||||
{
|
||||
@@ -79,7 +62,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,
|
||||
@@ -145,7 +128,7 @@ namespace Tnb.QcMgr
|
||||
Item.name = QcCheckItems.Where(p => p.id == QcCheckExecD.itemid).First().name!;
|
||||
Item.setData = new ExecItemData();
|
||||
Item.setData.extype = QcCheckExecD.extype!;
|
||||
Item.setData.excontent = JSON.Deserialize<Excontent>(QcCheckExecD.excontent!);
|
||||
Item.setData.excontent = JSON.Deserialize<Excontent>(QcCheckExecD.excontent!);
|
||||
Item.setData.check = QcCheckExecD.check!;
|
||||
if (!string.IsNullOrEmpty(QcCheckExecD.errorcause))
|
||||
{
|
||||
@@ -174,7 +157,7 @@ namespace Tnb.QcMgr
|
||||
Item.setShow.extype = !string.IsNullOrEmpty(Item.setData.extype);
|
||||
Item.setShow.excontent = !string.IsNullOrEmpty(QcCheckExecD.excontent);
|
||||
Item.setShow.check = !string.IsNullOrEmpty(Item.setData.check);
|
||||
Item.setShow.errorcause = Item.setData.errorcause==null|| Item.setData.errorcause?.Count == 0 ? false : true;
|
||||
Item.setShow.errorcause = Item.setData.errorcause == null || Item.setData.errorcause?.Count == 0 ? false : true;
|
||||
Item.setShow.errorlevel = Item.setData.errorlevel == null || Item.setData.errorlevel?.Count == 0 ? false : true;
|
||||
Item.setShow.remark = !string.IsNullOrEmpty(Item.setData.remark);
|
||||
Item.setShow.attachment = !string.IsNullOrEmpty(Item.setData.attachment);
|
||||
@@ -197,8 +180,8 @@ namespace Tnb.QcMgr
|
||||
try
|
||||
{
|
||||
var QcCheckExecH = await db.Queryable<QcCheckExecH>().Where(p => p.id == CheckTaskInput.mainid).FirstAsync();
|
||||
var DictionaryType = await db.Queryable<DictionaryTypeEntity>().Where(p=>p.FullName== "质检状态").FirstAsync();
|
||||
var DictionaryData = await db.Queryable< DictionaryDataEntity >().Where(p => p.DictionaryTypeId==DictionaryType.Id&&p.FullName== "已完成").FirstAsync();
|
||||
var DictionaryType = await db.Queryable<DictionaryTypeEntity>().Where(p => p.FullName == "质检状态").FirstAsync();
|
||||
var DictionaryData = await db.Queryable<DictionaryDataEntity>().Where(p => p.DictionaryTypeId == DictionaryType.Id && p.FullName == "已完成").FirstAsync();
|
||||
QcCheckExecH.checknum = CheckTaskInput.checknum;
|
||||
QcCheckExecH.status = DictionaryData.Id;
|
||||
QcCheckExecH.result = CheckTaskInput.result;
|
||||
@@ -209,7 +192,7 @@ namespace Tnb.QcMgr
|
||||
var QcCheckExecDinsert = new List<QcCheckExecD>();
|
||||
if (CheckTaskInput.checktypes?.Count > 0)
|
||||
{
|
||||
for (int i=0;i< CheckTaskInput.checktypes.Count;i++)
|
||||
for (int i = 0; i < CheckTaskInput.checktypes.Count; i++)
|
||||
{
|
||||
if (CheckTaskInput.checktypes[i].Count > 0)
|
||||
{
|
||||
@@ -285,10 +268,10 @@ namespace Tnb.QcMgr
|
||||
Result.status = QcCheckExecH.status!;
|
||||
Result.checktypes = new List<List<Checktype>>();
|
||||
Result.result = QcCheckExecH.result;
|
||||
var groupkeys = QcCheckExecDs.Select(p=>p.checkindex).Distinct().ToList();
|
||||
var groupkeys = QcCheckExecDs.Select(p => p.checkindex).Distinct().ToList();
|
||||
foreach (var key in groupkeys)
|
||||
{
|
||||
var QcCheckExecDsbykey= QcCheckExecDs.Where(p=>p.checkindex==key).ToList();
|
||||
{
|
||||
var QcCheckExecDsbykey = QcCheckExecDs.Where(p => p.checkindex == key).ToList();
|
||||
var checktype = new List<Checktype>();
|
||||
foreach (var QcCheckExecD in QcCheckExecDsbykey)
|
||||
{
|
||||
@@ -349,7 +332,7 @@ namespace Tnb.QcMgr
|
||||
}
|
||||
Result.checktypes.Add(checktype);
|
||||
}
|
||||
|
||||
|
||||
return Result;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,24 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using JNPF.Common.Core.Manager;
|
||||
using JNPF.Common.Core.Manager;
|
||||
using JNPF.DependencyInjection;
|
||||
using JNPF.DynamicApiController;
|
||||
using JNPF.Systems.Interfaces.System;
|
||||
using JNPF.VisualDev;
|
||||
using JNPF.VisualDev.Entitys.Dto.VisualDevModelData;
|
||||
using JNPF.VisualDev.Entitys;
|
||||
using JNPF.VisualDev.Entitys.Dto.VisualDevModelData;
|
||||
using JNPF.VisualDev.Interfaces;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using NPOI.Util;
|
||||
using SqlSugar;
|
||||
using Tnb.QcMgr.Interfaces;
|
||||
using Tnb.QcMgr.Entities;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using JNPF.Systems.Entitys.Permission;
|
||||
using Tnb.QcMgr.Interfaces;
|
||||
|
||||
namespace Tnb.QcMgr
|
||||
{
|
||||
|
||||
@@ -1,25 +1,15 @@
|
||||
using System;
|
||||
using System.ArrayExtensions;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Aspose.Cells.Drawing;
|
||||
using JNPF.Common.Core.Manager;
|
||||
using JNPF.Common.Core.Manager;
|
||||
using JNPF.Common.Enums;
|
||||
using JNPF.DependencyInjection;
|
||||
using JNPF.DynamicApiController;
|
||||
using JNPF.FriendlyException;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Spire.Xls.Core;
|
||||
using SqlSugar;
|
||||
using Tnb.QcMgr.Entities;
|
||||
using Tnb.QcMgr.Entities.Entity;
|
||||
using Tnb.QcMgr.Interfaces;
|
||||
|
||||
namespace Tnb.QcMgr
|
||||
{
|
||||
{
|
||||
/// <summary>
|
||||
/// spc模块
|
||||
/// </summary>
|
||||
@@ -41,15 +31,15 @@ namespace Tnb.QcMgr
|
||||
[HttpPost]
|
||||
public async Task<dynamic> GetSpcItems(string id)
|
||||
{
|
||||
var datas= await _repository.AsSugarClient().Queryable<QcSpcD>().Where(p => p.mainid == id).ToListAsync();
|
||||
List<SpcDataInput> SpcDataInputs=new List<SpcDataInput>();
|
||||
var datas = await _repository.AsSugarClient().Queryable<QcSpcD>().Where(p => p.mainid == id).ToListAsync();
|
||||
List<SpcDataInput> SpcDataInputs = new List<SpcDataInput>();
|
||||
datas.ForEach(p =>
|
||||
{
|
||||
SpcDataInput SpcDataInput = new SpcDataInput();
|
||||
SpcDataInput.mainid = p.mainid;
|
||||
SpcDataInput.checktime = p.checktime;
|
||||
SpcDataInput.batch = p.batch;
|
||||
SpcDataInput.data = Array.ConvertAll(p.data!.Split(","),float.Parse);
|
||||
SpcDataInput.data = Array.ConvertAll(p.data!.Split(","), float.Parse);
|
||||
SpcDataInput.checknum = p.checknum;
|
||||
SpcDataInput.defectivenum = p.defectivenum;
|
||||
SpcDataInputs.Add(SpcDataInput);
|
||||
@@ -74,7 +64,7 @@ namespace Tnb.QcMgr
|
||||
|
||||
SpcDataInput.ForEach(p =>
|
||||
{
|
||||
QcSpcD QcSpcD=new QcSpcD();
|
||||
QcSpcD QcSpcD = new QcSpcD();
|
||||
QcSpcD.mainid = p.mainid;
|
||||
QcSpcD.checktime = p.checktime;
|
||||
QcSpcD.batch = p.batch;
|
||||
@@ -82,7 +72,7 @@ namespace Tnb.QcMgr
|
||||
QcSpcD.checknum = p.checknum;
|
||||
QcSpcD.defectivenum = p.defectivenum;
|
||||
QcSpcD.create_id = _userManager.UserId;
|
||||
QcSpcD.create_time=DateTime.Now;
|
||||
QcSpcD.create_time = DateTime.Now;
|
||||
QcSpcDs.Add(QcSpcD);
|
||||
});
|
||||
await db.Ado.BeginTranAsync();
|
||||
@@ -371,8 +361,8 @@ namespace Tnb.QcMgr
|
||||
private static float CalculateMovRange(IEnumerable<float> values)
|
||||
{
|
||||
List<float> floats = new List<float>();
|
||||
var arr=values.ToArray();
|
||||
for (int i = 0; i < arr.Length-1; i++)
|
||||
var arr = values.ToArray();
|
||||
for (int i = 0; i < arr.Length - 1; i++)
|
||||
{
|
||||
floats.Add(Math.Abs((arr[i + 1] - arr[i])));
|
||||
}
|
||||
@@ -380,6 +370,6 @@ namespace Tnb.QcMgr
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="$(SolutionDir)\common.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
|
||||
Reference in New Issue
Block a user