From 2ec1b01d8a5e076eba607d83b902846876957a3e Mon Sep 17 00:00:00 2001
From: pzy <2829717936@qq.com>
Date: 星期四, 03 十月 2024 23:00:03 +0800
Subject: [PATCH] 111

---
 WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs |   66 +++++++++++++++++++++++++++++++++
 1 files changed, 66 insertions(+), 0 deletions(-)

diff --git a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
index d1cdbb4..43bedb9 100644
--- a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
+++ b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs
@@ -2,6 +2,7 @@
 using Newtonsoft.Json;
 using Newtonsoft.Json.Linq;
 using Pub_Class;
+using SyntacticSugar.constant;
 using System;
 using System.Collections;
 using System.Collections.Generic;
@@ -273,6 +274,19 @@
                             objJsonResult.code = "0";
                             objJsonResult.count = 0;
                             objJsonResult.Message = "鍚堟牸鏁伴噺鍔犳姤搴熸暟閲忓姞涓嶈壇鏁伴噺涓嶈兘涓�0锛�";
+                            objJsonResult.data = null;
+                            return objJsonResult;
+                        }
+                    }
+                    //鍒ゆ柇褰撳墠宸ュ崟鏄惁寮�宸�
+                    else if (oSystemParameter.omodel.MES_StationOutBill_MustBeginWorkCtl == "Y")
+                    {
+                        ds = oCN.RunProcReturn("select * from Sc_ICMOBillStatus_Tmp where HSourceID = '" + HSourceID + "' and HICMOBillNo = '" + HICMOBillNo + "' and HInterID = '" + HICMOInterID + "' and hicmostatus =1", "Sc_ICMOBillStatus_Tmp");
+                        if (ds.Tables[0].Rows[0]["HICMOStatus"].ToString() != "1")
+                        {
+                            objJsonResult.code = "0";
+                            objJsonResult.count = 0;
+                            objJsonResult.Message = "褰撳墠宸ュ崟涓嶆槸寮�宸ョ姸鎬佷笉鑳芥眹鎶ワ紒";
                             objJsonResult.data = null;
                             return objJsonResult;
                         }
@@ -1702,6 +1716,58 @@
         }
         #endregion
 
+        #region 宸ュ簭鍑虹珯姹囨姤鍗曞垪琛�
+        [Route("Cj_StationOutBill/page")]
+        [HttpGet]
+        public json page(string sWhere, string user, int page, int size)
+        {
+            json res = new json();
+            try
+            {
+                List<object> columnNameList = new List<object>();
+                    //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
+             if (!DBUtility.ClsPub.Security_Log("Cj_StationOutBill_Query", 1, false, user))
+                    {
+                        res.code = "0";
+                        res.count = 0;
+                        res.Message = "鍑虹珯鍗曟棤鏌ヨ鏉冮檺!";
+                        res.data = null;
+                        return res;
+                    }
+                if (sWhere == null || sWhere.Equals(""))
+                {
+                    ds = oCN.RunProcReturn("exec h_p_MES_StationOutBillList " + page + "," + size + ",''", "h_p_MES_StationOutBillList");
+                }
+                else
+                {
+                    ds = oCN.RunProcReturn("exec h_p_MES_StationOutBillList " + page + "," + size + ",'" + sWhere + "'", "h_p_MES_StationOutBillList");
+                }
+
+                //娣诲姞鍒楀悕
+                foreach (DataColumn col in ds.Tables[0].Columns)
+                {
+                    Type dataType = col.DataType;
+                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                }
+
+                res.code = CodeConstant.SUCCEED;
+                res.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString());
+                res.Message = "Sucess锛�";
+                res.list = columnNameList;
+                res.data = ds.Tables[0];
+                return res;
+            }
+            catch (Exception e)
+            {
+                res.code = CodeConstant.FAIL;
+                res.count = CountConstant.FAIL;
+                res.Message = "Exception锛�" + e.ToString();
+                res.data = null;
+                return objJsonResult;
+            }
+        }
+        #endregion
         #region 宸ュ簭鍑虹珯姹囨姤鍗� 瀛愯〃鏌ヨ
         [Route("Cj_StationOutBill/get_SubDisplay")]
         [HttpGet]

--
Gitblit v1.9.1