From c5755cc6918ff6c5ed6524d281a4e51bb93d749d Mon Sep 17 00:00:00 2001 From: yangle <admin@YINMOU> Date: 星期四, 01 九月 2022 15:07:07 +0800 Subject: [PATCH] 投产计划查询 --- WebAPI/Controllers/CJGL/ProductionPlanReportController.cs | 62 +++++++++++++++++++++++++++++++ WebAPI/WebAPI.csproj | 2 + 2 files changed, 64 insertions(+), 0 deletions(-) diff --git a/WebAPI/Controllers/CJGL/ProductionPlanReportController.cs b/WebAPI/Controllers/CJGL/ProductionPlanReportController.cs new file mode 100644 index 0000000..81dd391 --- /dev/null +++ b/WebAPI/Controllers/CJGL/ProductionPlanReportController.cs @@ -0,0 +1,62 @@ +锘縰sing DBUtility; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Web.Http; +using WebAPI.Models; + +namespace WebAPI.Controllers.CJGL +{ + public class ProductionPlanReportController : ApiController + { + public DBUtility.ClsPub.Enum_BillStatus BillStatus; + private json objJsonResult = new json(); + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + DataSet ds; + + #region 鎶曚骇璁″垝鎶ヨ〃 鏌ヨ + public class ProductionPlanReport + { + public int HOrgID; + public DateTime HBeginDate; + public DateTime HEndDate; + public string HICMOBillNo; + public string HWorkShopID; + public string HSeOrderBillNo; + public string HMaterNumber; + } + [Route("ProductionPlanReport/ProductionPlanReportList")] + [HttpGet] + public object ProductionPlanReportList(string sWhere) + { + try + { + //鍙嶅簭鍒楀寲浼犻�掔殑鍊� + ProductionPlanReport com = JsonConvert.DeserializeObject<ProductionPlanReport>(sWhere.ToString()); + + ds = oCN.RunProcReturn($"exec h_p_Cj_ProductionPlanReportList {com.HOrgID},'{com.HBeginDate}','{com.HEndDate}'" + + $",'{com.HICMOBillNo}',{com.HWorkShopID},'{com.HSeOrderBillNo}','{com.HMaterNumber}'", "h_p_Cj_ProductionPlanReportList"); + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + } +} \ No newline at end of file diff --git a/WebAPI/WebAPI.csproj b/WebAPI/WebAPI.csproj index 7fb7eee..5592753 100644 --- a/WebAPI/WebAPI.csproj +++ b/WebAPI/WebAPI.csproj @@ -373,6 +373,7 @@ <Compile Include="Controllers\CJGL\Cj_ComplementGoodsBillController.cs" /> <Compile Include="Controllers\CJGL\Cj_NoPassProcController.cs" /> <Compile Include="Controllers\CJGL\Cj_SendGoodsBillController.cs" /> + <Compile Include="Controllers\CJGL\ProductionPlanReportController.cs" /> <Compile Include="Controllers\CJGL\Sc_ProcessExchangeBillController.cs" /> <Compile Include="Controllers\CJGL\Cj_StationOutBillController.cs" /> <Compile Include="Controllers\CJGL\Cj_StationInBillController.cs" /> @@ -848,6 +849,7 @@ <Folder Include="Views\kf_StepFoldinBill\" /> <Folder Include="Views\Kf_StepFoldOutBill\" /> <Folder Include="Views\MoveStockBill\" /> + <Folder Include="Views\ProductionPlanReport\" /> <Folder Include="Views\ProductionReturnBill\" /> <Folder Include="Views\QC_Management\" /> <Folder Include="Views\Sb_EquipRepairSendWorkBill\" /> -- Gitblit v1.9.1