From 5159c3dc64fc7a783384b1c13da01f338340e5dd Mon Sep 17 00:00:00 2001 From: xwt <2740516069@qq.com> Date: 星期五, 16 五月 2025 15:58:02 +0800 Subject: [PATCH] bug修改 --- StandardInterface/MESApplication/Controllers/SRM/MesDeliveryNoteBarcodeController.cs | 86 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 86 insertions(+), 0 deletions(-) diff --git a/StandardInterface/MESApplication/Controllers/SRM/MesDeliveryNoteBarcodeController.cs b/StandardInterface/MESApplication/Controllers/SRM/MesDeliveryNoteBarcodeController.cs index 0510f0f..6b195ec 100644 --- a/StandardInterface/MESApplication/Controllers/SRM/MesDeliveryNoteBarcodeController.cs +++ b/StandardInterface/MESApplication/Controllers/SRM/MesDeliveryNoteBarcodeController.cs @@ -198,5 +198,91 @@ } } + [HttpPost("DeleteByNo")] + public ResponseResult DeleteByNo(ErpDelivery delivery) + { + var entity = new MessageCenter(); + entity.TableName = TableName; + entity.Url = URL + "DeleteByNo"; + entity.Method = METHOD; + entity.Data = JsonConvert.SerializeObject(delivery); + entity.Status = 1; + entity.CreateBy = "PL017"; + try + { + dynamic resultInfos = new ExpandoObject(); + var save = m.DeleteByNo(delivery); + resultInfos = save; + + entity.Result = 0; + if (save) entity.Result = 1; + + entity.DealWith = 1; + _manager.save(entity); + + return new ResponseResult + { + status = 0, + message = "OK", + data = resultInfos + }; + } + catch (Exception ex) + { + entity.Result = 0; + + entity.DealWith = 0; + + entity.ResultData = ex.Message; + + _manager.save(entity); + + return ResponseResult.ResponseError(ex); + } + } + + [HttpPost("DeleteListByNo")] + public ResponseResult DeleteListByNo(List<ErpDelivery> delivery) + { + var entity = new MessageCenter(); + entity.TableName = TableName; + entity.Url = URL + "DeleteListByNo"; + entity.Method = METHOD; + entity.Data = JsonConvert.SerializeObject(delivery); + entity.Status = 1; + entity.CreateBy = "PL017"; + try + { + dynamic resultInfos = new ExpandoObject(); + var save = m.DeleteListByNo(delivery); + resultInfos= save; + + entity.Result = 0; + if (save) entity.Result = 1; + + entity.DealWith = 1; + _manager.save(entity); + + return new ResponseResult + { + status = 0, + message = "OK", + 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