巡检
This commit is contained in:
@@ -15,6 +15,7 @@ using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
using SqlSugar;
|
||||
using Tnb.BasicData.Entities;
|
||||
using Tnb.EquipMgr.Entities;
|
||||
using Tnb.ProductionMgr.Entities.Dto.PrdManage;
|
||||
using Tnb.QcMgr.Entities;
|
||||
using Tnb.QcMgr.Interfaces;
|
||||
@@ -83,11 +84,13 @@ namespace Tnb.QcMgr
|
||||
.LeftJoin<OrganizeEntity>((a, b, c, d) => a.workid == d.Id)
|
||||
.LeftJoin<UserEntity>((a, b, c, d, e) => a.execuser == e.Id)
|
||||
.LeftJoin<PrdReport>((a,b,c,d,e,f)=>a.report_id==f.id)
|
||||
.LeftJoin<PrdMoTask>((a,b,c,d,e,f,g)=>a.mo_task_code==g.mo_task_code)
|
||||
.LeftJoin<EqpEquipment>((a,b,c,d,e,f,g,h)=>g.eqp_id==h.id)
|
||||
.WhereIF(!string.IsNullOrEmpty(materialid), (a, b, c, d,e) => b.name.Contains(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)
|
||||
.Select((a, b, c, d, e,f) => new QcCheckExecHOut
|
||||
.Select((a, b, c, d, e,f,g,h) => new QcCheckExecHOut
|
||||
{
|
||||
id = a.id,
|
||||
materialid = b.name,
|
||||
@@ -103,7 +106,10 @@ namespace Tnb.QcMgr
|
||||
execuser = e.RealName ?? "",
|
||||
mo_task_code = a.mo_task_code,
|
||||
batch = a.batch,
|
||||
qty = a.qty
|
||||
qty = a.qty,
|
||||
material_standard = b.material_standard,
|
||||
material_specification = b.material_specification,
|
||||
equip_name = h.name,
|
||||
}).OrderByDescending(a => DateTime.Parse(a.tasktime)).ToPagedListAsync(input.currentPage, input.pageSize);
|
||||
foreach (QcCheckExecHOut? item in result.list)
|
||||
{
|
||||
@@ -408,6 +414,21 @@ namespace Tnb.QcMgr
|
||||
checktypes = new List<List<Checktype>>(),
|
||||
result = QcCheckExecH.result
|
||||
};
|
||||
if (!string.IsNullOrEmpty(QcCheckExecH.carry_code))
|
||||
{
|
||||
WmsCarryH carryH = await db.Queryable<WmsCarryH>().FirstAsync(x => x.carry_code == QcCheckExecH.carry_code);
|
||||
WmsCarryCode carryCode = await db.Queryable<WmsCarryCode>().FirstAsync(x => x.carry_id == carryH.id);
|
||||
string materialId = carryCode?.id ?? "";
|
||||
BasMaterial basMaterial = await db.Queryable<BasMaterial>().SingleAsync(x=>x.id==materialId);
|
||||
Result.carryInfo = new CheckCarry()
|
||||
{
|
||||
carry_name = carryH.carry_name,
|
||||
location_id = carryH.location_id,
|
||||
location_code = carryH.location_code,
|
||||
material_name = basMaterial?.name,
|
||||
qty = carryCode?.codeqty ?? 0,
|
||||
};
|
||||
}
|
||||
List<string?> groupkeys = QcCheckExecDs.Select(p => p.checkindex).Distinct().ToList();
|
||||
foreach (string? key in groupkeys)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user