添加报工人

This commit is contained in:
qianhao.xu
2024-12-16 13:46:46 +08:00
parent 73b6acd375
commit ac20efae2f
12 changed files with 188 additions and 52 deletions

View File

@@ -2,6 +2,7 @@ using DOAN.Model.MES.base_;
using DOAN.Model.MES.product;
using DOAN.Model.Mobile.ReportFlow.Dto;
using DOAN.Model.Public;
using DOAN.Model.System;
using DOAN.Service.Mobile.IService;
using DOAN.Service.Public.IPublicService;
using Infrastructure.Attribute;
@@ -41,6 +42,9 @@ 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;
if (Exist)
{
result = Context.Updateable<ProReportwork01>().Where(it => it.Workorder == workorder && it.ProcessId == processId)
@@ -81,6 +85,8 @@ public class ReportFlowService : BaseService<ProReportwork01>, IReportFlowServic
{
int result = 0;
bool Exist = Context.Queryable<ProReportwork01>().Where(it => it.Workorder == workorder && it.ProcessId == process).Any();
string NickName = Context.Queryable<SysUser>().Where(it => it.UserName == Worker).Select(it => it.NickName).First();
Worker = string.IsNullOrEmpty(NickName) ? Worker : NickName;
if (Exist)
{
result = Context.Updateable<ProReportwork01>().Where(it => it.Workorder == workorder && it.ProcessId == process)
@@ -125,6 +131,8 @@ 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;
if (Exist)
{
result = Context.Updateable<ProReportwork01>()