From c8ec9ec6d9d149eaac6ad78bedd980c3be1c3b5f Mon Sep 17 00:00:00 2001 From: zjh <2207896513@qq.com> Date: 星期六, 23 八月 2025 14:58:49 +0800 Subject: [PATCH] 产测解绑sn代码提交 --- StandardPda/MESApplication/Controllers/Warehouse/womdaaController.cs | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 53 insertions(+), 0 deletions(-) diff --git a/StandardPda/MESApplication/Controllers/Warehouse/womdaaController.cs b/StandardPda/MESApplication/Controllers/Warehouse/womdaaController.cs index b01caf4..e8f4f52 100644 --- a/StandardPda/MESApplication/Controllers/Warehouse/womdaaController.cs +++ b/StandardPda/MESApplication/Controllers/Warehouse/womdaaController.cs @@ -224,6 +224,59 @@ } } + /// <summary> + ///瑙g粦sn鐮� + /// </summary> + /// <returns></returns> + [HttpPost("UnbindAsnInfo")] + public ResponseResult UnbindAsnInfo(UnbindAsnInfoDto unbindAsnInfoDto) + { + var entity = new MessageCenter(); + entity.TableName = TableName; + entity.Url = URL + "SetStackCode"; + 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); + } + } } } -- Gitblit v1.9.3