From 687c7eb08e7c3a803a3b60dedc9c394dbb6ba411 Mon Sep 17 00:00:00 2001
From: 啊鑫 <t2856754968@163.com>
Date: 星期三, 24 七月 2024 10:46:07 +0800
Subject: [PATCH] 增加采购验退,调整代码结构

---
 MESApplication/Controllers/Warehouse/MesInvItemArnDetailController.cs |   55 +++++++++++++++++--------------------------------------
 1 files changed, 17 insertions(+), 38 deletions(-)

diff --git a/MESApplication/Controllers/MessageCenterController.cs b/MESApplication/Controllers/Warehouse/MesInvItemArnDetailController.cs
similarity index 75%
copy from MESApplication/Controllers/MessageCenterController.cs
copy to MESApplication/Controllers/Warehouse/MesInvItemArnDetailController.cs
index e275539..3e88398 100644
--- a/MESApplication/Controllers/MessageCenterController.cs
+++ b/MESApplication/Controllers/Warehouse/MesInvItemArnDetailController.cs
@@ -1,26 +1,25 @@
 锘縰sing System.Dynamic;
+using MES.Service.Dto.service;
 using MES.Service.Modes;
-using MES.Service.service;
+using MES.Service.service.Warehouse;
 using MES.Service.util;
 using Microsoft.AspNetCore.Mvc;
 
-namespace MESApplication.Controllers;
+namespace MESApplication.Controllers.Warehouse;
 
 [ApiController]
 [Route("api/[controller]")]
-public class MessageCenterController : ControllerBase
+public class MesInvItemArnDetailController : ControllerBase
 {
-    private readonly MessageCenterManager m = new();
+    private readonly MesInvItemArnDetailManager m = new();
 
-
-    //ResetUpdate
-    [HttpPost("ResetUpdate")]
-    public ResponseResult ResetUpdate([FromBody] MessageCenter data)
+    [HttpPost("GetDetails")]
+    public ResponseResult GetDetails(WarehouseQuery query)
     {
         try
         {
             dynamic resultInfos = new ExpandoObject();
-            resultInfos.tbBillList = m.ResetUpdate(data);
+            resultInfos.tbBillList = m.GetDetails(query);
             return new ResponseResult
             {
                 status = 0,
@@ -34,13 +33,14 @@
         }
     }
 
-    [HttpPost("GetByPid")]
-    public ResponseResult ResetUpdate(int pid)
+    //
+    [HttpPost("GetMaterial")]
+    public ResponseResult GetMaterial(WarehouseQuery query)
     {
         try
         {
             dynamic resultInfos = new ExpandoObject();
-            resultInfos.tbBillList = m.GetList(it => it.Pid == pid);
+            resultInfos.tbBillList = m.GetMaterial(query);
             return new ResponseResult
             {
                 status = 0,
@@ -53,28 +53,6 @@
             return ResponseResult.ResponseError(ex);
         }
     }
-
-    [HttpPost("getPushFailed")]
-    public ResponseResult getPushFailed(MessageCenter query)
-    {
-        try
-        {
-            dynamic resultInfos = new ExpandoObject();
-            resultInfos.tbBillList = m.getPushFailedPage(query);
-            return new ResponseResult
-            {
-                status = 0,
-                message = "OK",
-                data = resultInfos
-            };
-        }
-        catch (Exception ex)
-        {
-            return ResponseResult.ResponseError(ex);
-        }
-    }
-
-    /***杩涘叆妯$増绠$悊鍙互淇敼妯$増***/
 
     /// <summary>
     ///     鑾峰彇鎵�鏈�
@@ -154,12 +132,12 @@
     /// </summary>
     /// <returns></returns>
     [HttpPost("Insert")]
-    public ResponseResult Add([FromBody] MessageCenter data)
+    public ResponseResult Add([FromBody] MesInvItemArnDetail data)
     {
         try
         {
             dynamic resultInfos = new ExpandoObject();
-            resultInfos.tbBillList = m.save(data);
+            resultInfos.tbBillList = m.Insert(data);
             return new ResponseResult
             {
                 status = 0,
@@ -178,7 +156,8 @@
     /// </summary>
     /// <returns></returns>
     [HttpPost("InsertReturnIdentity")]
-    public ResponseResult InsertReturnIdentity([FromBody] MessageCenter data)
+    public ResponseResult InsertReturnIdentity(
+        [FromBody] MesInvItemArnDetail data)
     {
         try
         {
@@ -202,7 +181,7 @@
     /// </summary>
     /// <returns></returns>
     [HttpPost("Update")]
-    public ResponseResult Update([FromBody] MessageCenter data)
+    public ResponseResult Update([FromBody] MesInvItemArnDetail data)
     {
         try
         {

--
Gitblit v1.9.3