From 1a92948effc5d28692c847e40d820284e6b1701c Mon Sep 17 00:00:00 2001
From: tjx <t2856754968@163.com>
Date: 星期一, 13 十月 2025 13:11:41 +0800
Subject: [PATCH] SpiAoi_API.md的接口文档说明
---
MESApplication/Controllers/BasicData/MesDeliveryNoteBarcodeController.cs | 160 ++++++++++++++++------------------------------------
1 files changed, 50 insertions(+), 110 deletions(-)
diff --git a/MESApplication/Controllers/BasicData/MesDeliveryNoteBarcodeController.cs b/MESApplication/Controllers/BasicData/MesDeliveryNoteBarcodeController.cs
index bd5d18b..c55bfbe 100644
--- a/MESApplication/Controllers/BasicData/MesDeliveryNoteBarcodeController.cs
+++ b/MESApplication/Controllers/BasicData/MesDeliveryNoteBarcodeController.cs
@@ -20,7 +20,8 @@
private readonly string TableName = "MES_DELIVERY_NOTE_BARCODE";
- private readonly string URL = "http://localhost:10054/api/MesDeliveryNoteBarcode/";
+ private readonly string URL =
+ "http://localhost:10054/api/MesDeliveryNoteBarcode/";
[HttpPost("Save")]
public ResponseResult Save(ErpBarcode barcode)
@@ -108,19 +109,28 @@
}
}
- /***杩涘叆妯$増绠$悊鍙互淇敼妯$増***/
-
- /// <summary>
- /// 鑾峰彇鎵�鏈�
- /// </summary>
- /// <returns></returns>
- [HttpPost("GetList")]
- public ResponseResult GetList()
+ [HttpPost("Delete")]
+ public ResponseResult Delete(DelBarcode barcode)
{
+ var entity = new MessageCenter();
+ entity.TableName = TableName;
+ entity.Url = URL + "Delete";
+ entity.Method = METHOD;
+ entity.Data = JsonConvert.SerializeObject(barcode);
+ entity.Status = 1;
+ entity.CreateBy = "PL017";
try
{
dynamic resultInfos = new ExpandoObject();
- resultInfos.tbBillList = m.GetList();
+ var save = m.Delete(barcode);
+ resultInfos.tbBillList = save;
+
+ entity.Result = 0;
+ if (save) entity.Result = 1;
+
+ entity.DealWith = 1;
+ _manager.save(entity);
+
return new ResponseResult
{
status = 0,
@@ -130,22 +140,40 @@
}
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("GetById")]
- public ResponseResult GetById(int id)
+ [HttpPost("DeleteList")]
+ public ResponseResult DeleteList(List<DelBarcode> barcodes)
{
+ var entity = new MessageCenter();
+ entity.TableName = TableName;
+ entity.Url = URL + "DeleteList";
+ entity.Method = METHOD;
+ entity.Data = JsonConvert.SerializeObject(barcodes);
+ entity.Status = 1;
+ entity.CreateBy = "PL017";
try
{
dynamic resultInfos = new ExpandoObject();
- resultInfos.tbBillList = m.GetById(id);
+ var save = m.DeleteList(barcodes);
+ resultInfos.tbBillList = save;
+
+ entity.Result = 0;
+ if (save) entity.Result = 1;
+
+ entity.DealWith = 1;
+ _manager.save(entity);
+
return new ResponseResult
{
status = 0,
@@ -155,102 +183,14 @@
}
catch (Exception ex)
{
- return ResponseResult.ResponseError(ex);
- }
- }
+ entity.Result = 0;
- /// <summary>
- /// 鏍规嵁涓婚敭鍒犻櫎
- /// </summary>
- /// <returns></returns>
- [HttpPost("DeleteByIds")]
- public ResponseResult DeleteByIds([FromBody] object[] ids)
- {
- try
- {
- dynamic resultInfos = new ExpandoObject();
- resultInfos.tbBillList = m.DeleteByIds(ids);
- return new ResponseResult
- {
- status = 0,
- message = "OK",
- data = resultInfos
- };
- }
- catch (Exception ex)
- {
- return ResponseResult.ResponseError(ex);
- }
- }
+ entity.DealWith = 0;
- /// <summary>
- /// 娣诲姞
- /// </summary>
- /// <returns></returns>
- [HttpPost("Insert")]
- public ResponseResult Add([FromBody] MesDeliveryNoteBarcode data)
- {
- try
- {
- dynamic resultInfos = new ExpandoObject();
- resultInfos.tbBillList = m.Insert(data);
- return new ResponseResult
- {
- status = 0,
- message = "OK",
- data = resultInfos
- };
- }
- catch (Exception ex)
- {
- return ResponseResult.ResponseError(ex);
- }
- }
+ entity.ResultData = ex.Message;
- /// <summary>
- /// 娣诲姞杩斿洖鑷
- /// </summary>
- /// <returns></returns>
- [HttpPost("InsertReturnIdentity")]
- public ResponseResult InsertReturnIdentity([FromBody] MesDeliveryNoteBarcode data)
- {
- try
- {
- dynamic resultInfos = new ExpandoObject();
- resultInfos.tbBillList = m.InsertReturnIdentity(data);
- return new ResponseResult
- {
- status = 0,
- message = "OK",
- data = resultInfos
- };
- }
- catch (Exception ex)
- {
- return ResponseResult.ResponseError(ex);
- }
- }
+ _manager.save(entity);
- /// <summary>
- /// 淇敼
- /// </summary>
- /// <returns></returns>
- [HttpPost("Update")]
- public ResponseResult Update([FromBody] MesDeliveryNoteBarcode data)
- {
- try
- {
- dynamic resultInfos = new ExpandoObject();
- resultInfos.tbBillList = m.Update(data);
- return new ResponseResult
- {
- status = 0,
- message = "OK",
- data = resultInfos
- };
- }
- catch (Exception ex)
- {
return ResponseResult.ResponseError(ex);
}
}
--
Gitblit v1.9.3