From 8f19d764f9ce5eea37b25f5392507a0d8ed373f5 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期一, 01 七月 2024 10:16:48 +0800
Subject: [PATCH] 销售订单:多级审批
---
WebAPI/Controllers/SBGL/Sb_EquipMaintainPlanBillController.cs | 62 ++++++++++++++++++++++++++++++
1 files changed, 61 insertions(+), 1 deletions(-)
diff --git a/WebAPI/Controllers/SBGL/Sb_EquipMaintainPlanBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipMaintainPlanBillController.cs
index f845d74..4e2c548 100644
--- a/WebAPI/Controllers/SBGL/Sb_EquipMaintainPlanBillController.cs
+++ b/WebAPI/Controllers/SBGL/Sb_EquipMaintainPlanBillController.cs
@@ -1,4 +1,5 @@
锘縰sing DBUtility;
+using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
@@ -26,6 +27,7 @@
{
try
{
+ List<object> columnNameList = new List<object>();
if (!DBUtility.ClsPub.Security_Log("Sb_EquipMaintainPlanBillList", 1, false, user))
{
objJsonResult.code = "0";
@@ -46,11 +48,19 @@
ds = oCN.RunProcReturn(sql, "h_v_Sc_EquipMaintainPlan");
}
-
+ //娣诲姞鍒楀悕
+ 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鍒楀璞$殑鍒楀悕
+ }
+
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "Sucess锛�";
objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
return objJsonResult;
}
catch (Exception ex)
@@ -113,6 +123,8 @@
UserName = oItem.HMaker; //鍒跺崟浜�
oItem.HBillType = "3902";
oItem.HBillSubType = "3902";
+ oItem.HMainSourceInterID = oItem.HMouldMaintainRuleID;
+ oItem.HMainSourceBillNo = oItem.HMouldMaintainRuleNo;
//oItem.HInterID =0;
//oItem.HBillNo = "";
@@ -413,6 +425,54 @@
}
#endregion
+ #region[璁惧淇濆吇璁板綍琛紝閫変繚鍏昏鍒掕幏鍙栦繚鍏昏鍒掓竻鍗曚俊鎭痌
+ [Route("Sb_EquipMaintainPlanBill/Sb_EquipMaintainPlanBill_PlanList")]
+ [HttpGet]
+ public object Sb_EquipMaintainPlanBill_PlanList(string HInterID, string HDate)
+ {
+ DataSet ds,ds1;
+ try
+ {
+ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
+
+ List<DataTable> tableList = new List<DataTable>();
+
+ //鑾峰彇淇濆吇椤圭洰
+ ds = oCN.RunProcReturn("exec h_p_Sb_EquipMaintain_GetPlanList " + HInterID + ",'" + HDate + "'", "h_p_Sb_EquipMaintain_GetPlanList");
+
+ //鑾峰彇閰嶄欢椤圭洰缂栬緫鏁版嵁
+ string sql1 = "select HMaterID, 閰嶄欢浠g爜 HMaterNumber,閰嶄欢鍚嶇О HMaterName,鍗曚綅ID HUnitID,鍗曚綅浠g爜 HUnitNumber,鍗曚綅鍚嶇О HUnitName,鐢ㄩ噺 HQty,鏍囧噯鐢ㄩ噺 HQtyMust,琛ㄤ綋澶囨敞 HRemark,璐熻矗浜篒D HManagerID,璐熻矗浜轰唬鐮� HManagerNumber,璐熻矗浜� HManagerName from h_v_Sb_EquipMaintainPlanBillList where 1 = 1 and hmainid = " + HInterID;
+ ds1 = oCN.RunProcReturn(sql1, "h_v_Sb_EquipMaintainPlanBillList");
+
+ tableList.Add(ds.Tables[0]);
+ tableList.Add(ds1.Tables[0]);
+
+ if (ds.Tables[0].Rows.Count != 0 || ds != null)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鑾峰彇淇℃伅鎴愬姛锛�";
+ objJsonResult.data = tableList;
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "娌℃湁鏌ヨ鍒版暟鎹俊鎭紒";
+ objJsonResult.data = tableList;
+ }
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍙戠敓寮傚父锛屾病鏈夎繑鍥炰换浣曡鍒掞紒" + e.ToString();
+ objJsonResult.data = null;
+ }
+ return objJsonResult;
+ }
+ #endregion
+
#region[璁惧淇濆吇璁″垝琛ㄧ紪杈戞椂鑾峰彇琛ㄤ綋鏁版嵁--淇濆吇璁″垝]
[Route("Sb_EquipMaintainPlanBill/GetPlanList")]
[HttpGet]
--
Gitblit v1.9.1