From 93e6a8bf1c1d3586528978f614b17c9aa1f9734e Mon Sep 17 00:00:00 2001 From: hao <1836460075@qq.com> Date: 星期五, 13 六月 2025 16:04:41 +0800 Subject: [PATCH] Merge branch 'master' of http://43.142.96.171:8080/r/~yhj/HM_JK --- StandardInterface/MESApplication/Controllers/SRM/MesDeliveryNoteBarcodeController.cs | 89 ++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 89 insertions(+), 0 deletions(-) diff --git a/StandardInterface/MESApplication/Controllers/SRM/MesDeliveryNoteBarcodeController.cs b/StandardInterface/MESApplication/Controllers/SRM/MesDeliveryNoteBarcodeController.cs index 7713f50..0f423b8 100644 --- a/StandardInterface/MESApplication/Controllers/SRM/MesDeliveryNoteBarcodeController.cs +++ b/StandardInterface/MESApplication/Controllers/SRM/MesDeliveryNoteBarcodeController.cs @@ -286,5 +286,94 @@ } } + [HttpPost("DeleteByItem")] + public ResponseResult DeleteByItem(DeliveryItem dt) + { + var entity = new MessageCenter(); + entity.TableName = TableName; + entity.Url = URL + "DeleteByItem"; + entity.Method = METHOD; + entity.Data = JsonConvert.SerializeObject(dt); + entity.Status = 1; + entity.CreateBy = "PL017"; + try + { + dynamic resultInfos = new ExpandoObject(); + var save = m.DeleteByItem(dt); + 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("DeleteListByItem")] + public ResponseResult DeleteListByItem(List<DeliveryItem> dts) + { + var entity = new MessageCenter(); + entity.TableName = TableName; + entity.Url = URL + "DeleteListByItem"; + entity.Method = METHOD; + entity.Data = JsonConvert.SerializeObject(dts); + entity.Status = 1; + entity.CreateBy = "PL017"; + try + { + dynamic resultInfos = new ExpandoObject(); + var save = m.DeleteListByItem(dts); + 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