From cfb616bf02b554b185f04bf92a8b8af489490102 Mon Sep 17 00:00:00 2001
From: zjh <2207896513@qq.com>
Date: 星期一, 17 十一月 2025 16:38:37 +0800
Subject: [PATCH] 栈板绑定代码提交
---
StandardPda/MESApplication/Controllers/Warehouse/womdaaController.cs | 233 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 230 insertions(+), 3 deletions(-)
diff --git a/StandardPda/MESApplication/Controllers/Warehouse/womdaaController.cs b/StandardPda/MESApplication/Controllers/Warehouse/womdaaController.cs
index c0f541e..f41d0bc 100644
--- a/StandardPda/MESApplication/Controllers/Warehouse/womdaaController.cs
+++ b/StandardPda/MESApplication/Controllers/Warehouse/womdaaController.cs
@@ -1,4 +1,5 @@
-锘縰sing MES.Service.Dto.service;
+锘縰sing AngleSharp.Text;
+using MES.Service.Dto.service;
using MES.Service.Modes;
using MES.Service.service;
using MES.Service.service.Warehouse;
@@ -18,7 +19,7 @@
private readonly WomdaaManager m = new();
private readonly MessageCenterManager _manager = new();
-
+
private readonly string METHOD = "POST";
private readonly string TableName = "womdaa";
@@ -41,7 +42,9 @@
try
{
dynamic resultInfos = new ExpandoObject();
- var result = m.GetTickeInfo(ccLoginDto.LoginId);
+ //var result = m.GetTickeInfo(ccLoginDto.LoginId);
+ //浼犵嚎浣撶紪鐮侊紝鏍规嵁绾夸綋缂栫爜鑾峰彇宸ュ崟淇℃伅
+ var result = m.GetTickeInfo(ccLoginDto.LineId, ccLoginDto.LoginId);
resultInfos.tbBillList = result;
entity.Result = 0;
@@ -111,6 +114,230 @@
}
}
+ /// <summary>
+ ///璁剧疆涓鐮�
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost("SetMediumBoxCode")]
+ public ResponseResult SetMediumBoxCode(MesMiddleBox MesMiddleBox)
+ {
+ var entity = new MessageCenter();
+ entity.TableName = TableName;
+ entity.Url = URL + "SetMediumBoxCode";
+ entity.Method = METHOD;
+ entity.Data = Newtonsoft.Json.JsonConvert.SerializeObject(MesMiddleBox);
+ entity.Status = 1;
+ entity.CreateBy = "PL017";
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ var result = m.SetMediumBoxCode(MesMiddleBox);
+ resultInfos.tbBillList = result;
+
+ entity.Result = 0;
+ if (result[0].ToBoolean()) entity.Result = 1;
+ entity.DealWith = 1;
+ _manager.save(entity);
+
+ if (result[0].ToBoolean())
+ {
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ else {
+ return new ResponseResult
+ {
+ status = 1,
+ message = result[1],
+ data = resultInfos
+ };
+ }
+
+ }
+ catch (Exception ex)
+ {
+ entity.Result = 0;
+ entity.DealWith = 0;
+ entity.ResultData = ex.Message;
+ _manager.save(entity);
+
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+ /// <summary>
+ ///璁剧疆鏍堟澘鐮�
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost("SetStackCode")]
+ public ResponseResult SetStackCode(MesPalletBinding mesPalletBinding)
+ {
+ var entity = new MessageCenter();
+ entity.TableName = TableName;
+ entity.Url = URL + "SetStackCode";
+ entity.Method = METHOD;
+ entity.Data = Newtonsoft.Json.JsonConvert.SerializeObject(mesPalletBinding);
+ entity.Status = 1;
+ entity.CreateBy = "PL017";
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ var result = m.SetStackCode(mesPalletBinding);
+ resultInfos.tbBillList = result;
+
+ entity.Result = 0;
+ if (result[0].ToBoolean()) entity.Result = 1;
+ entity.DealWith = 1;
+ _manager.save(entity);
+
+ if (result[0].ToBoolean())
+ {
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ else
+ {
+ return new ResponseResult
+ {
+ status = 1,
+ message = result[1],
+ data = resultInfos
+ };
+ }
+ }
+ catch (Exception ex)
+ {
+ entity.Result = 0;
+ entity.DealWith = 0;
+ entity.ResultData = ex.Message;
+ _manager.save(entity);
+
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+ /// <summary>
+ ///瑙g粦sn鐮�
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost("UnbindAsnInfo")]
+ public ResponseResult UnbindAsnInfo(UnbindAsnInfoDto unbindAsnInfoDto)
+ {
+ var entity = new MessageCenter();
+ entity.TableName = TableName;
+ entity.Url = URL + "UnbindAsnInfo";
+ entity.Method = METHOD;
+ entity.Data = Newtonsoft.Json.JsonConvert.SerializeObject(unbindAsnInfoDto);
+ entity.Status = 1;
+ entity.CreateBy = "PL017";
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ bool result = m.ProcessSn(unbindAsnInfoDto);
+ resultInfos.tbBillList = result;
+
+ entity.Result = 0;
+ if (result) entity.Result = 1;
+ entity.DealWith = 1;
+ _manager.save(entity);
+
+ if (result)
+ {
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ else
+ {
+ return new ResponseResult
+ {
+ status = 1,
+ message = result.ToString(),
+ data = resultInfos
+ };
+ }
+ }
+ catch (Exception ex)
+ {
+ entity.Result = 0;
+ entity.DealWith = 0;
+ entity.ResultData = ex.Message;
+ _manager.save(entity);
+
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+
+
+ /// <summary>
+ ///pda璁剧疆鏍堟澘鐮�
+ /// </summary>
+ /// <returns></returns>
+ [HttpPost("SyncStackCodeFromApi")]
+ public ResponseResult SyncStackCodeFromApi(SyncStackCodeFromApi syncStackCodeFromApi)
+ {
+ var entity = new MessageCenter();
+ entity.TableName = TableName;
+ entity.Url = URL + "SetStackCode";
+ entity.Method = METHOD;
+ entity.Data = Newtonsoft.Json.JsonConvert.SerializeObject(syncStackCodeFromApi);
+ entity.Status = 1;
+ entity.CreateBy = "PL017";
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ var result = m.SyncStackCodeFromApi(syncStackCodeFromApi.StackCode, syncStackCodeFromApi.UserId);
+ resultInfos.tbBillList = result;
+
+ entity.Result = 0;
+ if (result[0].ToBoolean()) entity.Result = 1;
+ entity.DealWith = 1;
+ _manager.save(entity);
+
+ if (result[0].ToBoolean())
+ {
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ else
+ {
+ return new ResponseResult
+ {
+ status = 1,
+ message = result[1],
+ data = resultInfos
+ };
+ }
+ }
+ catch (Exception ex)
+ {
+ entity.Result = 0;
+ entity.DealWith = 0;
+ entity.ResultData = ex.Message;
+ _manager.save(entity);
+
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+
+
}
}
--
Gitblit v1.9.3