From 36bee35f0b585085d0b162ff31ff195096a7c584 Mon Sep 17 00:00:00 2001
From: zgq <519541279@qq.com>
Date: 星期二, 19 一月 2021 16:02:03 +0800
Subject: [PATCH] nothing

---
 WebAPI/Controllers/NewApiController.cs |   86 +-----------------------------------------
 1 files changed, 3 insertions(+), 83 deletions(-)

diff --git a/WebAPI/Controllers/NewApiController.cs b/WebAPI/Controllers/NewApiController.cs
index 504fce4..970c4f4 100644
--- a/WebAPI/Controllers/NewApiController.cs
+++ b/WebAPI/Controllers/NewApiController.cs
@@ -2,9 +2,6 @@
 using System.Collections.Generic;
 using System.Data;
 using System.Linq;
-using System.Net;
-using System.Net.Http;
-using System.Web;
 using System.Web.Http;
 using WebAPI.Models;
 using WebAPI.Service;
@@ -98,88 +95,11 @@
         /// <returns></returns>
         [Route("api/newBill/setStationInBill")]
         [HttpPost]
-        public ApiResult SetStationInBill()
+        public ApiResult SetStationInBill(ClsSc_StationInBillMain oMain)
         {
-            HttpContextBase context = (HttpContextBase)Request.Properties["MS_HttpContext"];//鑾峰彇浼犵粺context
-            HttpRequestBase request = context.Request;//瀹氫箟浼犵粺request瀵硅薄
-            var omain = GetOMind(request);
-            return YqnQbService.SetStationInBill(omain);
+            return YqnQbService.SetStationInBill(oMain);
         }
-        ClsSc_StationInBillMain GetOMind(HttpRequestBase request)
-        {
-            ClsSc_StationInBillMain oMain = new ClsSc_StationInBillMain();
-            if(request.Form["HAddr"]!=null)
-            {
-                oMain.HAddr = request.Form["HAddr"].ToString();
-            }
-            if (request.Form["HBarCode"] != null)
-            {
-                oMain.HBarCode = request.Form["HBarCode"].ToString();
-            }
-            if (request.Form["HProcExchBillNo"] != null)
-            {
-                oMain.HProcExchBillNo = request.Form["HProcExchBillNo"].ToString();
-            }
-            
-            if (!string.IsNullOrEmpty(request.Form["HProcID"]))
-            {
-                oMain.HProcID = long.Parse(request.Form["HProcID"].ToString());
-            }
-            if (!string.IsNullOrEmpty(request.Form["HEmpID"]))
-            {
-                oMain.HEmpID =long.Parse(request.Form["HEmpID"].ToString());
-            }
-            if (!string.IsNullOrEmpty(request.Form["HQty"]))
-            {
-                oMain.HQty =double.Parse(request.Form["HQty"].ToString());
-            }
-            if (!string.IsNullOrEmpty(request.Form["HSourceID"]))
-            {
-                oMain.HSourceID =long.Parse(request.Form["HSourceID"].ToString());
-            }
-            if (!string.IsNullOrEmpty(request.Form["HGroupID"]))
-            {
-                oMain.HGroupID =long.Parse(request.Form["HGroupID"].ToString());
-            }
-            if (request.Form["HCenterID"] != null)
-            {
-                //oMain.HCenterID = request.Form["HCenterID"].ToString();
-            }
-            if (request.Form["HBillNo"] != null)
-            {
-                oMain.HBillNo = request.Form["HBillNo"].ToString();
-            }
-            if (!string.IsNullOrEmpty(request.Form["HInterID"]))
-            {
-                oMain.HInterID =long.Parse(request.Form["HInterID"].ToString());
-            }
-            if (request.Form["HStationInTime"] != null)
-            {
-                oMain.HStationInTime =DateTime.Parse(request.Form["HStationInTime"].ToString());
-            }
-            if (request.Form["HICMOBillNo"] != null)
-            {
-                oMain.HICMOBillNo = request.Form["HICMOBillNo"].ToString();
-            }
-            if (request.Form["HMaterID"] != null)
-            {
-                oMain.HMaterID =long.Parse(request.Form["HMaterID"].ToString());
-            }
-            if (!string.IsNullOrEmpty(request.Form["HICMOQty"]))
-            {
-                oMain.HICMOQty =double.Parse( request.Form["HICMOQty"].ToString());
-            }
-            if (request.Form["HICMOInterID"] != null)
-            {
-                oMain.HICMOInterID =long.Parse( request.Form["HICMOInterID"].ToString());
-            }
-            if (!string.IsNullOrEmpty(request.Form["HDeptID"]))
-            {
-                oMain.HDeptID = long.Parse(request.Form["HDeptID"].ToString());
-            }
-            return oMain;
-
-        }
+       
         /// <summary>
         /// 鍑虹珯绔欐帴鏀跺崟
         /// </summary>

--
Gitblit v1.9.1