校验是否首件标签是否合格
This commit is contained in:
parent
f8055b8e6a
commit
0ed359496e
@ -0,0 +1,57 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Linq;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
|
||||
namespace DOAN.Model.Mobile
|
||||
{
|
||||
/// <summary>
|
||||
/// 标签检验
|
||||
/// </summary>
|
||||
[SugarTable("pro_inspection_label")]
|
||||
public class ProInspectionLabel
|
||||
{
|
||||
/// <summary>
|
||||
/// 雪花
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = false)]
|
||||
public string Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 工单号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "workorder")]
|
||||
public string Workorder { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(ColumnName = "first_label")]
|
||||
public string FirstLabel { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(ColumnName = "end_label")]
|
||||
public string EndLabel { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// CreatedTime
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "created_time")]
|
||||
public DateTime? CreatedTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// UpdatedBy
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "updated_by")]
|
||||
public string UpdatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// UpdatedTime
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "updated_time")]
|
||||
public DateTime? UpdatedTime { get; set; }
|
||||
}
|
||||
}
|
||||
@ -14,6 +14,7 @@ using System.Configuration;
|
||||
using linesider_screen_bankend.Core.Tools.HttpHepler;
|
||||
using System.Net.Http;
|
||||
using static Mysqlx.Crud.Order.Types;
|
||||
using DOAN.Model.Mobile;
|
||||
|
||||
namespace linesider_screen_bankend.Controller
|
||||
{
|
||||
@ -118,7 +119,14 @@ namespace linesider_screen_bankend.Controller
|
||||
string workorder = queryParams["workorder"];
|
||||
try
|
||||
{
|
||||
|
||||
string FirstLabel= SqlSugarHelper.Db.Queryable<ProInspectionLabel>().Where(x => x.Workorder == workorder).Select(it => it.FirstLabel).First();
|
||||
|
||||
if (string.IsNullOrEmpty(FirstLabel))
|
||||
{
|
||||
// 返回成功响应
|
||||
await this.HttpContext.SendApiFailAsync(500, "首件标签未通过");
|
||||
return;
|
||||
}
|
||||
await this.HttpContext.SendApiSuccessAsync(null);
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@ -91,11 +91,11 @@ namespace linesider_screen_bankend.Views
|
||||
var server = new WebServer(o => o
|
||||
.WithUrlPrefix(url)
|
||||
.WithMode(HttpListenerMode.EmbedIO))
|
||||
.WithCors(
|
||||
origins: "http://localhost:7005",
|
||||
headers: "content-type,authorization",
|
||||
methods: "GET,POST,PUT,DELETE"
|
||||
)
|
||||
.WithCors(
|
||||
origins: "http://localhost:7005",
|
||||
headers: "content-type,authorization",
|
||||
methods: "GET,POST,PUT,DELETE"
|
||||
)
|
||||
.WithWebApi("/print_api", m => m
|
||||
.WithController<PrintCommunicationController>(() => new PrintCommunicationController(AddLog))
|
||||
.WithController<OnlyPrintProductLabelController>(() => new OnlyPrintProductLabelController(AddLog)))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user