yangle
2022-09-01 c5755cc6918ff6c5ed6524d281a4e51bb93d749d
投产计划查询
1个文件已添加
1个文件已修改
64 ■■■■■ 已修改文件
WebAPI/Controllers/CJGL/ProductionPlanReportController.cs 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebAPI.csproj 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/CJGL/ProductionPlanReportController.cs
New file
@@ -0,0 +1,62 @@
using 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
    }
}
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\" />