触摸屏修改
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using DOAN.Model.MES.base_;
|
||||
using DOAN.Model.MES.base_.Dto;
|
||||
using DOAN.Model.MES.product;
|
||||
using DOAN.Model.Mobile.ReportFlow.Dto;
|
||||
using DOAN.Model.Public;
|
||||
@@ -6,6 +7,7 @@ using DOAN.Model.System;
|
||||
using DOAN.Service.Mobile.IService;
|
||||
using DOAN.Service.Public.IPublicService;
|
||||
using Infrastructure.Attribute;
|
||||
using Mapster;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SqlSugar.DistributedSystem.Snowflake;
|
||||
using System.Diagnostics;
|
||||
@@ -22,6 +24,11 @@ public class ReportFlowService : BaseService<ProReportwork01>, IReportFlowServic
|
||||
{
|
||||
return Context.Queryable<ProWorkorder>().Where(x => x.Workorder == workorder).First();
|
||||
}
|
||||
public List<ProWorkorder> GetWorkOrdersByDate(DateTime startDate, DateTime endDate)
|
||||
{
|
||||
return Context.Queryable<ProWorkorder>()
|
||||
.Where(it => it.WorkorderDate >= startDate && it.WorkorderDate <= endDate).ToList();
|
||||
}
|
||||
|
||||
public ProReportwork01 GetProcessReportWorkDetail(string workorder, int process)
|
||||
{
|
||||
@@ -43,7 +50,7 @@ public class ReportFlowService : BaseService<ProReportwork01>, IReportFlowServic
|
||||
int result = 0;
|
||||
bool Exist = Context.Queryable<ProReportwork01>().Where(it => it.Workorder == workorder && it.ProcessId == processId).Any();
|
||||
|
||||
string NickName= Context.Queryable<SysUser>().Where(it=>it.UserName==Worker).Select(it=>it.NickName).First();
|
||||
string NickName = Context.Queryable<SysUser>().Where(it => it.UserName == Worker).Select(it => it.NickName).First();
|
||||
Worker = string.IsNullOrEmpty(NickName) ? Worker + "|异常人员|" : NickName;
|
||||
if (Exist)
|
||||
{
|
||||
@@ -132,13 +139,13 @@ public class ReportFlowService : BaseService<ProReportwork01>, IReportFlowServic
|
||||
int result = 0;
|
||||
bool Exist = Context.Queryable<ProReportwork01>().Where(it => it.Workorder == workorder && it.ProcessId == processId).Any();
|
||||
string NickName = Context.Queryable<SysUser>().Where(it => it.UserName == Worker).Select(it => it.NickName).First();
|
||||
Worker = string.IsNullOrEmpty(NickName) ? Worker+"|异常人员|" : NickName;
|
||||
Worker = string.IsNullOrEmpty(NickName) ? Worker + "|异常人员|" : NickName;
|
||||
if (Exist)
|
||||
{
|
||||
result = Context.Updateable<ProReportwork01>()
|
||||
.Where(it => it.Workorder == workorder && it.ProcessId == processId)
|
||||
.SetColumns(it => it.FinishNum == finish_num)
|
||||
.SetColumns(it=>it.BadNum == bad_num)
|
||||
.SetColumns(it => it.BadNum == bad_num)
|
||||
.SetColumns(it => it.Worker == Worker)
|
||||
.SetColumns(it => it.JobDate == DateTime.Now)
|
||||
.SetColumns(it => it.UpdatedBy == Worker)
|
||||
@@ -181,10 +188,49 @@ public class ReportFlowService : BaseService<ProReportwork01>, IReportFlowServic
|
||||
ProcessName = wp.Name,
|
||||
}, true)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
public List<ProReportWorkDetialDto> GetReportInfoByName(string Name)
|
||||
{
|
||||
|
||||
string NickName = Context.Queryable<SysUser>().Where(it => it.UserName == Name).Select(it => it.NickName).First();
|
||||
Name = string.IsNullOrEmpty(NickName) ? Name + "|异常人员|" : NickName;
|
||||
|
||||
return Context.Queryable<ProReportwork01>()
|
||||
.LeftJoin<BaseWorkProcesses>((rw, wp) => rw.ProcessId == wp.Id)
|
||||
.Where((rw, wp) => rw.Worker == Name && rw.JobDate >= DateTime.Today && rw.JobDate < DateTime.Today.AddDays(1))
|
||||
.OrderBy(rw => rw.ProcessId)
|
||||
.Select((rw, wp) => new ProReportWorkDetialDto()
|
||||
{
|
||||
ProcessName = wp.Name,
|
||||
}, true)
|
||||
.ToList();
|
||||
|
||||
}
|
||||
|
||||
public List<BaseWorkProcessesDto> GetProcessByRoute(int route_id)
|
||||
{
|
||||
|
||||
return Context.Queryable<BaseRelWorkRouteProcesses>()
|
||||
.LeftJoin<BaseWorkProcesses>((rel, pro) => rel.FkWorkProcesses == pro.Id)
|
||||
.Where((rel, pro) => rel.FkWorkRoute == route_id)
|
||||
.Select((rel, pro) => pro)
|
||||
.ToList()
|
||||
.Adapt<List<BaseWorkProcesses>, List<BaseWorkProcessesDto>>();
|
||||
|
||||
}
|
||||
|
||||
public List<ProReportWorkDetialDto> GetReportByProcessId(int processId)
|
||||
{
|
||||
return Context.Queryable<ProReportwork01>()
|
||||
.LeftJoin<BaseWorkProcesses>((rw, wp) => rw.ProcessId == wp.Id)
|
||||
.Where((rw, wp) => rw.ProcessId == processId && rw.JobDate >= DateTime.Today && rw.JobDate < DateTime.Today.AddDays(1))
|
||||
.OrderBy(rw => rw.ProcessId)
|
||||
.Select((rw, wp) => new ProReportWorkDetialDto()
|
||||
{
|
||||
ProcessName = wp.Name,
|
||||
}, true)
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user