diff --git a/linesider_screen_bankend/Models/linesider_sreen_bankend.Models/ProInspectionLabel.cs b/linesider_screen_bankend/Models/linesider_sreen_bankend.Models/ProInspectionLabel.cs
new file mode 100644
index 0000000..04fd715
--- /dev/null
+++ b/linesider_screen_bankend/Models/linesider_sreen_bankend.Models/ProInspectionLabel.cs
@@ -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
+{
+ ///
+ /// 标签检验
+ ///
+ [SugarTable("pro_inspection_label")]
+ public class ProInspectionLabel
+ {
+ ///
+ /// 雪花
+ ///
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = false)]
+ public string Id { get; set; }
+
+ ///
+ /// 工单号
+ ///
+ [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; }
+
+
+ ///
+ /// CreatedTime
+ ///
+ [SugarColumn(ColumnName = "created_time")]
+ public DateTime? CreatedTime { get; set; }
+
+ ///
+ /// UpdatedBy
+ ///
+ [SugarColumn(ColumnName = "updated_by")]
+ public string UpdatedBy { get; set; }
+
+ ///
+ /// UpdatedTime
+ ///
+ [SugarColumn(ColumnName = "updated_time")]
+ public DateTime? UpdatedTime { get; set; }
+ }
+}
diff --git a/linesider_screen_bankend/linesider_screen_bankend/Controller/OnlyPrintProductLabelController.cs b/linesider_screen_bankend/linesider_screen_bankend/Controller/OnlyPrintProductLabelController.cs
index e0c770a..345b5cf 100644
--- a/linesider_screen_bankend/linesider_screen_bankend/Controller/OnlyPrintProductLabelController.cs
+++ b/linesider_screen_bankend/linesider_screen_bankend/Controller/OnlyPrintProductLabelController.cs
@@ -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().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)
diff --git a/linesider_screen_bankend/linesider_screen_bankend/Views/MainWindow.xaml.cs b/linesider_screen_bankend/linesider_screen_bankend/Views/MainWindow.xaml.cs
index 7a734bc..cf252fc 100644
--- a/linesider_screen_bankend/linesider_screen_bankend/Views/MainWindow.xaml.cs
+++ b/linesider_screen_bankend/linesider_screen_bankend/Views/MainWindow.xaml.cs
@@ -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(() => new PrintCommunicationController(AddLog))
.WithController(() => new OnlyPrintProductLabelController(AddLog)))