85 lines
2.4 KiB
C#
85 lines
2.4 KiB
C#
using DOAN.Model.MES.product;
|
|
using DOAN.Model.Mobile;
|
|
using DOAN.Service.Mobile.IService;
|
|
using Infrastructure.Attribute;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace DOAN.Service.Mobile
|
|
{
|
|
|
|
[AppService(ServiceType = typeof(IPADPrintAndReportWork2Service), ServiceLifetime = LifeTime.Transient)]
|
|
public class PADPrintAndReportWork2Service : BaseService<ProReportwork>, IPADPrintAndReportWork2Service
|
|
{
|
|
|
|
public string GetFirstInspectionLabel(string workorder)
|
|
{
|
|
return Context.Queryable<ProInspectionLabel>().Where(it => it.Workorder == workorder).Select(it => it.FirstLabel).First();
|
|
|
|
}
|
|
public string CheckFirstInspectionLabel(string workorder, string first_label)
|
|
{
|
|
if (!string.IsNullOrEmpty(first_label))
|
|
{
|
|
string[] stringArray = first_label.Split("|");
|
|
if (stringArray.Length > 0)
|
|
{
|
|
if (stringArray[0] == workorder)
|
|
{
|
|
return "合格";
|
|
}
|
|
else
|
|
{
|
|
return "标签不匹配";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
return "标签异常";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
return "标签异常";
|
|
}
|
|
}
|
|
|
|
public string CheckEndInspectionLabel(string workorder, string end_label)
|
|
{
|
|
if (!string.IsNullOrEmpty(end_label))
|
|
{
|
|
string[] stringArray = end_label.Split("|");
|
|
if (stringArray.Length > 0)
|
|
{
|
|
if (stringArray[0] == workorder)
|
|
{
|
|
return "合格";
|
|
}
|
|
else
|
|
{
|
|
return "标签不匹配";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
return "标签异常";
|
|
}
|
|
}
|
|
else
|
|
{
|
|
return "标签异常";
|
|
}
|
|
}
|
|
|
|
public string GetEndInspectionLabel(string workorder)
|
|
{
|
|
return Context.Queryable<ProInspectionLabel>().Where(it => it.Workorder == workorder).Select(it => it.EndLabel).First();
|
|
}
|
|
|
|
|
|
}
|
|
}
|