去除引用common.props
This commit is contained in:
@@ -15,8 +15,8 @@ using Tnb.EquipMgr.Entities;
|
||||
using Tnb.PerMgr.Entities;
|
||||
using Tnb.ProductionMgr.Entities;
|
||||
using Tnb.ProductionMgr.Entities.Dto.PrdManage;
|
||||
using Tnb.ProductionMgr.Interfaces;
|
||||
using Tnb.ProductionMgr.Entities.Entity;
|
||||
using Tnb.ProductionMgr.Interfaces;
|
||||
|
||||
|
||||
namespace Tnb.ProductionMgr
|
||||
@@ -53,7 +53,7 @@ namespace Tnb.ProductionMgr
|
||||
list = Array.Empty<string>()
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
List<PackReportTreeOutput> trees = new();
|
||||
var dic = await _dictionaryDataService.GetDicByTypeId(DictConst.PrdTaskStatusTypeId);
|
||||
var list = await _db.Queryable<OrganizeEntity>().Where(it => it.Category == "workline").ToListAsync();
|
||||
@@ -63,12 +63,12 @@ namespace Tnb.ProductionMgr
|
||||
_dicWorkLine = list.ToDictionary(x => x.Id, x => Tuple.Create<string, string>(x.EnCode, x.FullName));
|
||||
}
|
||||
bool start = false;
|
||||
bool end=false;
|
||||
bool end = false;
|
||||
DateTime[] startTimes = new DateTime[2];
|
||||
DateTime[] endTimes = new DateTime[2];
|
||||
if (input.estimated_start_date != null && input.estimated_start_date.Count() == 2)
|
||||
{
|
||||
start=true;
|
||||
start = true;
|
||||
startTimes[0] = GetDateTimeMilliseconds(input.estimated_start_date![0]);
|
||||
startTimes[1] = GetDateTimeMilliseconds(input.estimated_start_date![1]);
|
||||
|
||||
@@ -83,14 +83,14 @@ namespace Tnb.ProductionMgr
|
||||
var items = await _db.Queryable<PrdMoTask>()
|
||||
.LeftJoin<BasProcess>((a, b) => a.process_id == b.id)
|
||||
.LeftJoin<PrdMo>((a, b, c) => a.mo_id == c.id)
|
||||
.LeftJoin<PrdMoTask>((a,b,c,d)=>a.id==d.parent_id)
|
||||
.LeftJoin<PrdMoTask>((a, b, c, d) => a.id == d.parent_id)
|
||||
.WhereIF(!string.IsNullOrEmpty(input.mo_task_code), a => a.mo_task_code == input.mo_task_code.Trim())
|
||||
// .WhereIF(start, a => a.estimated_start_date != null&& startTimes[0] <= a.estimated_start_date && startTimes[1] >= a.estimated_start_date)
|
||||
// .WhereIF(end, a => a.estimated_end_date != null && endTimes[0] <= a.estimated_end_date && endTimes[1] >= a.estimated_end_date)
|
||||
// .WhereIF(start, a => a.estimated_start_date != null&& startTimes[0] <= a.estimated_start_date && startTimes[1] >= a.estimated_start_date)
|
||||
// .WhereIF(end, a => a.estimated_end_date != null && endTimes[0] <= a.estimated_end_date && endTimes[1] >= a.estimated_end_date)
|
||||
.WhereIF(!string.IsNullOrEmpty(input.workline), a => list.Where(p => p.EnCode.Contains(input.workline) || p.FullName.Contains(input.workline)).Select(p => p.Id).ToList().Contains(a.workline_id!))
|
||||
.Where(a => string.IsNullOrEmpty(a.parent_id) && a.schedule_type == 2 && a.mo_task_status != "ToBeScheduled")
|
||||
.Where((a,b,c,d)=>d.workstation_id==input.stationId)
|
||||
.OrderByDescending(a=>a.create_time)
|
||||
.Where((a, b, c, d) => d.workstation_id == input.stationId)
|
||||
.OrderByDescending(a => a.create_time)
|
||||
.Select((a, b, c) => new PrdMoTask
|
||||
{
|
||||
id = a.id,
|
||||
@@ -107,9 +107,9 @@ namespace Tnb.ProductionMgr
|
||||
})
|
||||
.ToPagedListAsync(input.currentPage, input.pageSize);
|
||||
if (start)
|
||||
items.list= items.list.Where(a => startTimes[0] <= a.plan_start_date && startTimes[1] >= a.plan_start_date).ToList();
|
||||
items.list = items.list.Where(a => startTimes[0] <= a.plan_start_date && startTimes[1] >= a.plan_start_date).ToList();
|
||||
if (end)
|
||||
items.list= items.list.Where(a => endTimes[0] <= a.plan_end_date && endTimes[1] >= a.plan_end_date).ToList();
|
||||
items.list = items.list.Where(a => endTimes[0] <= a.plan_end_date && endTimes[1] >= a.plan_end_date).ToList();
|
||||
_db.ThenMapper(items.list, it =>
|
||||
{
|
||||
it.mo_task_status = it.mo_task_status.IsNotEmptyOrNull() && dic.ContainsKey(it.mo_task_status) ? dic[it.mo_task_status].ToString() : "";
|
||||
@@ -131,31 +131,31 @@ namespace Tnb.ProductionMgr
|
||||
}
|
||||
node.plan_start_date = item.plan_start_date.HasValue ? item.plan_start_date.Value.ToString("yyyy-MM-dd HH:mm:ss") : "";
|
||||
node.plan_end_date = item.plan_end_date.HasValue ? item.plan_end_date.Value.ToString("yyyy-MM-dd HH:mm:ss") : "";
|
||||
await GetChild(item.id, trees, dic,input.stationId);
|
||||
await GetChild(item.id, trees, dic, input.stationId);
|
||||
trees.Add(node);
|
||||
}
|
||||
}
|
||||
var treeList = trees.ToTree();
|
||||
if (!string.IsNullOrEmpty(input.process))
|
||||
{
|
||||
List< PackReportTreeOutput > removelist = new List< PackReportTreeOutput >();
|
||||
List<PackReportTreeOutput> removelist = new List<PackReportTreeOutput>();
|
||||
foreach (var item in treeList)
|
||||
{
|
||||
bool flag = false;
|
||||
if (item.process_id != null && item.process_id.Contains(input.process))
|
||||
flag = true;
|
||||
if (item.children != null&& item.children.Count>0)
|
||||
if (item.children != null && item.children.Count > 0)
|
||||
{
|
||||
var childs = item.children.Adapt<List<PackReportTreeOutput>>();
|
||||
var childs = item.children.Adapt<List<PackReportTreeOutput>>();
|
||||
if (childs.Where(p => p.process_id.Contains(input.process)).Any())
|
||||
flag = true;
|
||||
}
|
||||
if (!flag)
|
||||
removelist.Add(item);
|
||||
|
||||
|
||||
}
|
||||
removelist.ForEach(p => treeList.Remove(p));
|
||||
|
||||
|
||||
}
|
||||
SqlSugarPagedList<PackReportTreeOutput> pagedList = new()
|
||||
{
|
||||
@@ -179,13 +179,13 @@ namespace Tnb.ProductionMgr
|
||||
return dt;
|
||||
|
||||
}
|
||||
private async Task GetChild(string parentId, List<PackReportTreeOutput> nodes, Dictionary<string, object> dic,string stationId)
|
||||
private async Task GetChild(string parentId, List<PackReportTreeOutput> nodes, Dictionary<string, object> dic, string stationId)
|
||||
{
|
||||
var items = await _db.Queryable<PrdMoTask>()
|
||||
.LeftJoin<BasProcess>((a, b) => a.process_id == b.id)
|
||||
.LeftJoin<PrdMo>((a, b, c) => a.mo_id == c.id)
|
||||
.LeftJoin<BasMbomProcess>((a, b, c, d) => a.mbom_process_id == d.id)
|
||||
.Where(a => a.parent_id == parentId && a.mo_task_status != "ToBeScheduled" && a.workstation_id==stationId)
|
||||
.Where(a => a.parent_id == parentId && a.mo_task_status != "ToBeScheduled" && a.workstation_id == stationId)
|
||||
.OrderBy((a, b, c, d) => d.ordinal)
|
||||
.Select((a, b, c) => new PrdMoTask
|
||||
{
|
||||
@@ -199,7 +199,7 @@ namespace Tnb.ProductionMgr
|
||||
plan_end_date = a.estimated_end_date,
|
||||
plan_qty = a.scheduled_qty,
|
||||
//complete_qty = SqlFunc.Subqueryable<PrdReport>().Where(it => it.mo_task_code == a.mo_task_code).Sum(it => it.reported_work_qty),
|
||||
complete_qty = SqlFunc.IsNull(a.reported_work_qty,0) + SqlFunc.IsNull(a.scrap_qty,0),
|
||||
complete_qty = SqlFunc.IsNull(a.reported_work_qty, 0) + SqlFunc.IsNull(a.scrap_qty, 0),
|
||||
mo_task_status = a.mo_task_status,
|
||||
|
||||
}).ToListAsync();
|
||||
@@ -217,7 +217,7 @@ namespace Tnb.ProductionMgr
|
||||
nsChild[i].process_id = $"{items[i].process_code}/{items[i].process_name}";
|
||||
nsChild[i].plan_start_date = items[i].plan_start_date.HasValue ? items[i].plan_start_date.Value.ToString("yyyy-MM-dd HH:mm:ss") : "";
|
||||
nsChild[i].plan_end_date = items[i].plan_end_date.HasValue ? items[i].plan_end_date.Value.ToString("yyyy-MM-dd HH:mm:ss") : "";
|
||||
|
||||
|
||||
if (nsChild[i].workline_id.IsNotEmptyOrNull())
|
||||
{
|
||||
var workLine = _dicWorkLine.ContainsKey(nsChild[i].workline_id) ? (Tuple<string, string>)_dicWorkLine[nsChild[i].workline_id] : null;
|
||||
@@ -231,11 +231,11 @@ namespace Tnb.ProductionMgr
|
||||
nodes.AddRange(nsChild);
|
||||
foreach (var item in items)
|
||||
{
|
||||
await GetChild(item.id, nodes, dic,stationId);
|
||||
await GetChild(item.id, nodes, dic, stationId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// pda端根据工位获取注塑挤出列表
|
||||
/// </summary>
|
||||
@@ -251,16 +251,16 @@ namespace Tnb.ProductionMgr
|
||||
list = Array.Empty<string>()
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
var result = await _db.Queryable<PrdMoTask>()
|
||||
.LeftJoin<BasMaterial>((a, b) => a.material_id == b.id)
|
||||
.LeftJoin<BasProcess>((a, b, c) => a.process_id == c.id)
|
||||
.LeftJoin<DictionaryDataEntity>((a, b, c, e) => e.DictionaryTypeId == DictConst.PrdTaskStatusTypeId && a.mo_task_status == e.EnCode)
|
||||
.LeftJoin<EqpEquipment>((a,b,c,e,f)=>a.eqp_id==f.id)
|
||||
.LeftJoin<ToolMolds>((a,b,c,e,f,g)=>a.mold_id==g.id)
|
||||
.Where((a, b) => a.workstation_id == input.stationId && a.mo_task_status != DictConst.ToBeScheduledEncode && a.schedule_type==1)
|
||||
.LeftJoin<EqpEquipment>((a, b, c, e, f) => a.eqp_id == f.id)
|
||||
.LeftJoin<ToolMolds>((a, b, c, e, f, g) => a.mold_id == g.id)
|
||||
.Where((a, b) => a.workstation_id == input.stationId && a.mo_task_status != DictConst.ToBeScheduledEncode && a.schedule_type == 1)
|
||||
.OrderByDescending((a, b) => a.create_time)
|
||||
.Select((a, b, c, e,f,g) => new PADPackageTaskPageOutput
|
||||
.Select((a, b, c, e, f, g) => new PADPackageTaskPageOutput
|
||||
{
|
||||
id = a.id,
|
||||
mo_task_code = a.mo_task_code,
|
||||
@@ -272,12 +272,12 @@ namespace Tnb.ProductionMgr
|
||||
// workline_name = d.FullName,
|
||||
bom_id = a.bom_id,
|
||||
mo_task_status = e.FullName,
|
||||
complete_qty = SqlFunc.IsNull(a.reported_work_qty,0) + SqlFunc.IsNull(a.scrap_qty,0),
|
||||
complete_qty = SqlFunc.IsNull(a.reported_work_qty, 0) + SqlFunc.IsNull(a.scrap_qty, 0),
|
||||
scrap_qty = a.scrap_qty,
|
||||
scheduled_qty = a.scheduled_qty,
|
||||
reported_work_qty = a.reported_work_qty,
|
||||
estimated_start_date = a.estimated_start_date==null ? "" : a.estimated_start_date.Value.ToString(DbTimeFormat.SS),
|
||||
estimated_end_date = a.estimated_end_date==null ? "" : a.estimated_end_date.Value.ToString(DbTimeFormat.SS),
|
||||
estimated_start_date = a.estimated_start_date == null ? "" : a.estimated_start_date.Value.ToString(DbTimeFormat.SS),
|
||||
estimated_end_date = a.estimated_end_date == null ? "" : a.estimated_end_date.Value.ToString(DbTimeFormat.SS),
|
||||
parent_id = a.parent_id,
|
||||
process_id = a.process_id,
|
||||
process_name = c.process_name,
|
||||
@@ -308,13 +308,13 @@ namespace Tnb.ProductionMgr
|
||||
list = Array.Empty<string>()
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
var result = await _db.Queryable<PrdMoTask>()
|
||||
.LeftJoin<BasMaterial>((a, b) => a.material_id == b.id)
|
||||
.LeftJoin<BasProcess>((a, b, c) => a.process_id == c.id)
|
||||
.LeftJoin<OrganizeEntity>((a, b, c, d) => a.workline_id == d.Id)
|
||||
.LeftJoin<DictionaryDataEntity>((a, b, c, d, e) => e.DictionaryTypeId == DictConst.PrdTaskStatusTypeId && a.mo_task_status == e.EnCode)
|
||||
.Where((a, b) => a.workstation_id == input.stationId && a.mo_task_status != DictConst.ToBeScheduledEncode && a.schedule_type==2)
|
||||
.Where((a, b) => a.workstation_id == input.stationId && a.mo_task_status != DictConst.ToBeScheduledEncode && a.schedule_type == 2)
|
||||
.OrderByDescending((a, b) => a.create_time)
|
||||
.Select((a, b, c, d, e) => new PADPackageTaskPageOutput
|
||||
{
|
||||
@@ -328,12 +328,12 @@ namespace Tnb.ProductionMgr
|
||||
workline_name = d.FullName,
|
||||
bom_id = a.bom_id,
|
||||
mo_task_status = e.FullName,
|
||||
complete_qty = SqlFunc.IsNull(a.reported_work_qty,0) + SqlFunc.IsNull(a.scrap_qty,0),
|
||||
complete_qty = SqlFunc.IsNull(a.reported_work_qty, 0) + SqlFunc.IsNull(a.scrap_qty, 0),
|
||||
scrap_qty = a.scrap_qty,
|
||||
scheduled_qty = a.scheduled_qty,
|
||||
reported_work_qty = a.reported_work_qty,
|
||||
estimated_start_date = a.estimated_start_date==null ? "" : a.estimated_start_date.Value.ToString(DbTimeFormat.SS),
|
||||
estimated_end_date = a.estimated_end_date==null ? "" : a.estimated_end_date.Value.ToString(DbTimeFormat.SS),
|
||||
estimated_start_date = a.estimated_start_date == null ? "" : a.estimated_start_date.Value.ToString(DbTimeFormat.SS),
|
||||
estimated_end_date = a.estimated_end_date == null ? "" : a.estimated_end_date.Value.ToString(DbTimeFormat.SS),
|
||||
parent_id = a.parent_id,
|
||||
process_id = a.process_id,
|
||||
process_name = c.process_name,
|
||||
@@ -342,7 +342,7 @@ namespace Tnb.ProductionMgr
|
||||
|
||||
return PageResult<PADPackageTaskPageOutput>.SqlSugarPageResult(result);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// pda端根据工位获取任务单列表
|
||||
/// </summary>
|
||||
@@ -358,12 +358,12 @@ namespace Tnb.ProductionMgr
|
||||
list = Array.Empty<string>()
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Dictionary<string, object> queryJson = string.IsNullOrEmpty(input.queryJson) ? new Dictionary<string, object>() : input.queryJson.ToObject<Dictionary<string, object>>();
|
||||
string mo_task_code = queryJson.ContainsKey("mo_task_code") ? queryJson["mo_task_code"].ToString() : "";
|
||||
string status = queryJson.ContainsKey("status") ? queryJson["status"].ToString() : "";
|
||||
DateTime? start_time = queryJson.ContainsKey("start_time") ? queryJson["start_time"].ToString()=="" ? null : Convert.ToDateTime(queryJson["start_time"]) : null;
|
||||
DateTime? end_time = queryJson.ContainsKey("end_time") ? queryJson["end_time"].ToString()=="" ? null : Convert.ToDateTime(queryJson["end_time"]) : null;
|
||||
DateTime? start_time = queryJson.ContainsKey("start_time") ? queryJson["start_time"].ToString() == "" ? null : Convert.ToDateTime(queryJson["start_time"]) : null;
|
||||
DateTime? end_time = queryJson.ContainsKey("end_time") ? queryJson["end_time"].ToString() == "" ? null : Convert.ToDateTime(queryJson["end_time"]) : null;
|
||||
List<string> statusList = new List<string>();
|
||||
if (!string.IsNullOrEmpty(status))
|
||||
{
|
||||
@@ -389,26 +389,26 @@ namespace Tnb.ProductionMgr
|
||||
input.sidx = "create_time";
|
||||
input.sort = "desc";
|
||||
}
|
||||
|
||||
|
||||
var result = await _db.Queryable<PrdMoTask>()
|
||||
.LeftJoin<BasMaterial>((a, b) => a.material_id == b.id)
|
||||
.LeftJoin<BasProcess>((a, b, c) => a.process_id == c.id)
|
||||
.LeftJoin<OrganizeEntity>((a, b, c, d) => a.workline_id == d.Id)
|
||||
.LeftJoin<DictionaryDataEntity>((a, b, c, d, e) => e.DictionaryTypeId == DictConst.PrdTaskStatusTypeId && a.mo_task_status == e.EnCode)
|
||||
.LeftJoin<EqpEquipment>((a,b,c,d,e,f)=>a.eqp_id==f.id)
|
||||
.LeftJoin<ToolMolds>((a,b,c,d,e,f,g)=>a.mold_id==g.id)
|
||||
.LeftJoin<PerProcessStandardsH>((a,b,c,d,e,f,g,h)=>a.material_id==h.output_material_id && a.eqp_id==h.equip_id && a.mold_id==h.molds_id && h.enabled==1)
|
||||
.LeftJoin<BasStandardTime>((a,b,c,d,e,f,g,h,i)=>a.process_id==i.process_id && i.enabled==1)
|
||||
.LeftJoin<PrdMo>((a,b,c,d,e,f,g,h,i,j)=>a.mo_id==j.id)
|
||||
.LeftJoin<BasMaterialUnit>((a,b,c,d,e,f,g,h,i,j,k)=>a.material_id==k.material_id && k.auxiliary_unit_id=="kg")
|
||||
.LeftJoin<EqpDaq>((a,b,c,d,e,f,g,h,i,j,k,l)=>a.eqp_id==l.equip_id && l.enabled==1 && l.label_point=="提报装箱称重点位")
|
||||
.Where((a, b) => a.workstation_id == input.stationId && (a.mo_task_status == DictConst.ToBeStartedEnCode || a.mo_task_status == DictConst.MoStatusPauseCode || a.mo_task_status == DictConst.ComplatedEnCode || a.mo_task_status == DictConst.InProgressEnCode) )
|
||||
.WhereIF(!string.IsNullOrEmpty(mo_task_code),a=>a.mo_task_code.Contains(mo_task_code))
|
||||
.LeftJoin<EqpEquipment>((a, b, c, d, e, f) => a.eqp_id == f.id)
|
||||
.LeftJoin<ToolMolds>((a, b, c, d, e, f, g) => a.mold_id == g.id)
|
||||
.LeftJoin<PerProcessStandardsH>((a, b, c, d, e, f, g, h) => a.material_id == h.output_material_id && a.eqp_id == h.equip_id && a.mold_id == h.molds_id && h.enabled == 1)
|
||||
.LeftJoin<BasStandardTime>((a, b, c, d, e, f, g, h, i) => a.process_id == i.process_id && i.enabled == 1)
|
||||
.LeftJoin<PrdMo>((a, b, c, d, e, f, g, h, i, j) => a.mo_id == j.id)
|
||||
.LeftJoin<BasMaterialUnit>((a, b, c, d, e, f, g, h, i, j, k) => a.material_id == k.material_id && k.auxiliary_unit_id == "kg")
|
||||
.LeftJoin<EqpDaq>((a, b, c, d, e, f, g, h, i, j, k, l) => a.eqp_id == l.equip_id && l.enabled == 1 && l.label_point == "提报装箱称重点位")
|
||||
.Where((a, b) => a.workstation_id == input.stationId && (a.mo_task_status == DictConst.ToBeStartedEnCode || a.mo_task_status == DictConst.MoStatusPauseCode || a.mo_task_status == DictConst.ComplatedEnCode || a.mo_task_status == DictConst.InProgressEnCode))
|
||||
.WhereIF(!string.IsNullOrEmpty(mo_task_code), a => a.mo_task_code.Contains(mo_task_code))
|
||||
//.WhereIF(!string.IsNullOrEmpty(mo_task_status),a=>a.mo_task_status==mo_task_status)
|
||||
.WhereIF(statusList.Count>0,a=>statusList.Contains(a.mo_task_status))
|
||||
.WhereIF(status=="3" && start_time!=null,a=>a.act_end_date>=start_time)
|
||||
.WhereIF(status=="3" && end_time!=null,a=>a.act_end_date<=end_time)
|
||||
.Select((a, b, c, d, e,f,g,h,i,j,k,l) => new PADPackageTaskPageOutput
|
||||
.WhereIF(statusList.Count > 0, a => statusList.Contains(a.mo_task_status))
|
||||
.WhereIF(status == "3" && start_time != null, a => a.act_end_date >= start_time)
|
||||
.WhereIF(status == "3" && end_time != null, a => a.act_end_date <= end_time)
|
||||
.Select((a, b, c, d, e, f, g, h, i, j, k, l) => new PADPackageTaskPageOutput
|
||||
{
|
||||
id = a.id,
|
||||
mo_task_code = a.mo_task_code,
|
||||
@@ -421,12 +421,12 @@ namespace Tnb.ProductionMgr
|
||||
workline_name = d.FullName,
|
||||
bom_id = a.bom_id,
|
||||
mo_task_status = e.FullName,
|
||||
complete_qty = SqlFunc.IsNull(a.reported_work_qty,0) + SqlFunc.IsNull(a.scrap_qty,0),
|
||||
complete_qty = SqlFunc.IsNull(a.reported_work_qty, 0) + SqlFunc.IsNull(a.scrap_qty, 0),
|
||||
scrap_qty = a.scrap_qty,
|
||||
scheduled_qty = a.scheduled_qty,
|
||||
reported_work_qty = a.reported_work_qty,
|
||||
estimated_start_date = a.estimated_start_date==null ? "" : a.estimated_start_date.Value.ToString(DbTimeFormat.SS),
|
||||
estimated_end_date = a.estimated_end_date==null ? "" : a.estimated_end_date.Value.ToString(DbTimeFormat.SS),
|
||||
estimated_start_date = a.estimated_start_date == null ? "" : a.estimated_start_date.Value.ToString(DbTimeFormat.SS),
|
||||
estimated_end_date = a.estimated_end_date == null ? "" : a.estimated_end_date.Value.ToString(DbTimeFormat.SS),
|
||||
parent_id = a.parent_id,
|
||||
process_id = a.process_id,
|
||||
process_name = c.process_name,
|
||||
@@ -442,9 +442,9 @@ namespace Tnb.ProductionMgr
|
||||
mold_cavity = g.mold_cavity,
|
||||
moulding_cycle = h.moulding_cycle,
|
||||
standard_time = i.standard_time,
|
||||
act_start_date = a.act_start_date==null ? "" : a.act_start_date.Value.ToString(DbTimeFormat.SS),
|
||||
act_end_date = a.act_end_date==null ? "" : a.act_end_date.Value.ToString(DbTimeFormat.SS),
|
||||
plan_end_date = a.plan_end_date==null ? "" : a.plan_end_date.Value.ToString(DbTimeFormat.SS),
|
||||
act_start_date = a.act_start_date == null ? "" : a.act_start_date.Value.ToString(DbTimeFormat.SS),
|
||||
act_end_date = a.act_end_date == null ? "" : a.act_end_date.Value.ToString(DbTimeFormat.SS),
|
||||
plan_end_date = a.plan_end_date == null ? "" : a.plan_end_date.Value.ToString(DbTimeFormat.SS),
|
||||
tube = f.tube,
|
||||
minpacking = b.minpacking,
|
||||
main_num = k.number_of_primary_unit,
|
||||
@@ -457,7 +457,7 @@ namespace Tnb.ProductionMgr
|
||||
.ToPagedListAsync(input.currentPage, input.pageSize);
|
||||
|
||||
return PageResult<PADPackageTaskPageOutput>.SqlSugarPageResult(result);
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -468,8 +468,8 @@ namespace Tnb.ProductionMgr
|
||||
public async Task<dynamic> CheckMold(CheckMoldInput input)
|
||||
{
|
||||
PrdMoTask prdMoTask = await _db.Queryable<PrdMoTask>().SingleAsync(x => x.id == input.mo_task_id);
|
||||
BasQrcode basQrcode = await _db.Queryable<BasQrcode>().Where(x=>x.source_name=="TOOL_MOLDS" && x.code==input.mold_qrcode).FirstAsync();
|
||||
if (prdMoTask != null && basQrcode!=null)
|
||||
BasQrcode basQrcode = await _db.Queryable<BasQrcode>().Where(x => x.source_name == "TOOL_MOLDS" && x.code == input.mold_qrcode).FirstAsync();
|
||||
if (prdMoTask != null && basQrcode != null)
|
||||
{
|
||||
return prdMoTask.mold_id == basQrcode.source_id;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user