From 59e981656f036352ef84e6a54a37e330afe90c01 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期二, 27 六月 2023 13:06:12 +0800
Subject: [PATCH] 基础资料(职员、客户、供应商、工作中心)添加审核、反审核、禁用、反禁用功能
---
WebAPI/Controllers/BaseSet/Gy_ProcessController.cs | 29 +++++++++++++++++++++--------
1 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/WebAPI/Controllers/BaseSet/Gy_ProcessController.cs b/WebAPI/Controllers/BaseSet/Gy_ProcessController.cs
index a995beb..4ee1994 100644
--- a/WebAPI/Controllers/BaseSet/Gy_ProcessController.cs
+++ b/WebAPI/Controllers/BaseSet/Gy_ProcessController.cs
@@ -1,4 +1,5 @@
-锘縰sing Newtonsoft.Json.Linq;
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
using Pub_Class;
using System;
using System.Collections;
@@ -304,7 +305,7 @@
bool HTypeCount = list[0].HTypeCount;
string HDeptNumber = "";
long HLevel = ClsPub.GetLevel(list[0].HNumber.Trim());
- bool HEndFlag = false;
+ bool HEndFlag = true;
long HProcessID_K3 = list[0].HProcessID_K3;
string HBillSubType = list[0].HType;
bool HAutoTrunFlag = list[0].HAutoTrunFlag;
@@ -312,7 +313,7 @@
string HOverFixPrice = list[0].HOverFixPrice;
string HSNo = list[0].HSNo;
string HBarCode = list[0].HBarCode;
- string HProcMulID = list[0].HProcMulID;
+ string HProcMulID = list[0].HProcMulID==null?"0": list[0].HProcMulID;
string HProcCheckNote = list[0].HProcCheckNote;
string HRemark = list[0].HRemark;
bool HStopflag = list[0].HStopflag;
@@ -322,6 +323,7 @@
long HDeptID = list[0].HDeptID;
long HProcID = list[0].HProcID;
int HUSEORGID = list[0].HUSEORGID;
+ bool HTProcessFlag = list[0].HTProcessFlag;
@@ -372,13 +374,13 @@
",HTypeFlow,HTypeCount,HDeptNumber,HSNo" +
",HLevel,HEndFlag,HStopflag,HRemark,HDeptID,HBarCodeForBase,HProcessID_K3,HBillSubType,HAutoTrunFlag" +
",HFixPrice,HOverFixPrice,HProcMulID,HProcCheckNote" +
- ",HUSEORGID,HWorkCenterID,HBadWHID,HWasterWHID,HBadCountDevelopWHID,HWWBadWHID,HWWWasterWHID,HWHID) " +
+ ",HUSEORGID,HWorkCenterID,HBadWHID,HWasterWHID,HBadCountDevelopWHID,HWWBadWHID,HWWWasterWHID,HWHID,HTProcessFlag) " +
" Values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "'," + HParentID.ToString() +
"," + Convert.ToString(HTypeFlow ? 1 : 0) + "," + Convert.ToString(HTypeCount ? 1 : 0) + ",'" + HDeptNumber + "','" + HSNo.ToString() +
"'," + HLevel.ToString() + "," + Convert.ToString(HEndFlag ? 1 : 0) + "," + Convert.ToString(HStopflag ? 1 : 0) + ",'" + HRemark + "'," + HDeptID +
- ",'" + HBarCode + "'," + HProcessID_K3 + ",'" +HBillSubType + "'," + Convert.ToString(HAutoTrunFlag ? 1 : 0) +
+ ",'" + HBarCode + "'," + HProcessID_K3 + ",'" + HBillSubType + "'," + Convert.ToString(HAutoTrunFlag ? 1 : 0) +
",'" + HFixPrice.ToString() + "'," + HOverFixPrice.ToString() + "," + HProcMulID.ToString() + ",'" + HProcCheckNote.ToString() + "'" +
- ","+ HUSEORGID + "," + HWorkCenterID + "," + HBadWHID + "," + HWasterWHID + "," + HBadCountDevelopWHID + "," + HWWBadWHID + "," + HWWWasterWHID + "," + HWHID + ")", ref DBUtility.ClsPub.sExeReturnInfo);
+ "," + HUSEORGID + "," + HWorkCenterID + "," + HBadWHID + "," + HWasterWHID + "," + HBadCountDevelopWHID + "," + HWWBadWHID + "," + HWWWasterWHID + "," + HWHID + "," + Convert.ToString(HTProcessFlag ? 1 : 0) + ")", ref DBUtility.ClsPub.sExeReturnInfo);
//淇敼涓婄骇涓洪潪鏈骇浠g爜
oCN.RunProc("Update Gy_Process set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo);
oCN.Commit();
@@ -399,10 +401,11 @@
",HSNo= " + HSNo +
",HLevel= " + HLevel +
",HEndFlag= '" + HEndFlag + "'" +
+ ",HTProcessFlag= '" + HTProcessFlag + "'" +
",HStopflag= '" + HStopflag + "'" +
",HRemark='" + HRemark + "'" +
",HDeptID= " + HDeptID +
- ",HBarCodeForBase='" + HBarCodeForBase + "'" +
+ ",HBarCodeForBase='" + HBarCode + "'" +
",HProcessID_K3= " + HProcessID_K3 +
",HBillSubType='" + HBillSubType + "'" +
",HAutoTrunFlag= '" + HAutoTrunFlag + "'" +
@@ -450,6 +453,7 @@
{
try
{
+ List<object> columnNameList = new List<object>();
//鏌ョ湅鏉冮檺
if (!DBUtility.ClsPub.Security_Log("Gy_Process_Query", 1, false, user))
{
@@ -471,12 +475,21 @@
ds = oCN.RunProcReturn(sql, "h_v_Gy_ProcessList");
}
+ //娣诲姞鍒楀悕
+ 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鍒楀璞$殑鍒楀悕
+ }
+
//if (ds.Tables[0].Rows.Count != 0 || ds != null)
//{
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "Sucess锛�";
objJsonResult.data = ds.Tables[0];
+ objJsonResult.list = columnNameList;
return objJsonResult;
//}
//else
@@ -538,7 +551,7 @@
return objJsonResult;
}
}
- /// <summary>Gy_Process/cx
+ /// <summary>
/// 宸ュ簭鍒楄〃鍒犻櫎鍔熻兘
/// </summary>
/// <returns></returns>
--
Gitblit v1.9.1