模具保养执行代码提交
This commit is contained in:
@@ -35,7 +35,7 @@ namespace Tnb.ProductionMgr
|
||||
{
|
||||
private readonly ISqlSugarClient _db;
|
||||
private readonly IDictionaryDataService _dictionaryDataService;
|
||||
private static Dictionary<string, Tuple<string,string>> _dicWorkLine = new Dictionary<string, Tuple<string, string>>();
|
||||
private static Dictionary<string, Tuple<string, string>> _dicWorkLine = new Dictionary<string, Tuple<string, string>>();
|
||||
public PrdPackReportService(ISqlSugarRepository<PrdMoTask> repository, IDictionaryDataService dictionaryDataService)
|
||||
{
|
||||
_db = repository.AsSugarClient();
|
||||
@@ -53,12 +53,12 @@ namespace Tnb.ProductionMgr
|
||||
var dic = await _dictionaryDataService.GetDicByTypeId(DictConst.PrdTaskStatusTypeId);
|
||||
if (_dicWorkLine.Count < 1)
|
||||
{
|
||||
var list = await _db.Queryable<OrganizeEntity>().Where(it => it.Category == "workline").ToListAsync();
|
||||
var list = await _db.Queryable<OrganizeEntity>().Where(it => it.Category == "workline").ToListAsync();
|
||||
_dicWorkLine = list.ToDictionary(x => x.Id, x => Tuple.Create<string, string>(x.EnCode, x.FullName));
|
||||
}
|
||||
|
||||
|
||||
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)
|
||||
.WhereIF(!string.IsNullOrEmpty(input.mo_task_code), a => a.mo_task_code == input.mo_task_code)
|
||||
.WhereIF(!string.IsNullOrEmpty(input.mo_task_code), a => a.mo_task_code == input.mo_task_code.Trim())
|
||||
.Where(a => string.IsNullOrEmpty(a.parent_id) && a.schedule_type == 2 && a.mo_task_status != "ToBeScheduled")
|
||||
.Select((a, b, c) => new PrdMoTask
|
||||
{
|
||||
@@ -123,7 +123,7 @@ namespace Tnb.ProductionMgr
|
||||
mo_task_code = a.mo_task_code,
|
||||
workline_id = a.workline_id,
|
||||
process_id = a.process_id,
|
||||
process_code =b.process_code,
|
||||
process_code = b.process_code,
|
||||
process_name = b.process_name,
|
||||
plan_start_date = a.estimated_start_date,
|
||||
plan_end_date = a.estimated_end_date,
|
||||
|
||||
Reference in New Issue
Block a user