From 838f159c0219270bcb97f2f87406778cada4f550 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期二, 26 十一月 2024 09:00:17 +0800
Subject: [PATCH] 分布式调入单、分布式调出单:增加字段 项目HProjectID
---
WebAPI/Controllers/QC_POStockInCheckBillController.cs | 48 ++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 44 insertions(+), 4 deletions(-)
diff --git a/WebAPI/Controllers/QC_POStockInCheckBillController.cs b/WebAPI/Controllers/QC_POStockInCheckBillController.cs
index a3f9caf..4932707 100644
--- a/WebAPI/Controllers/QC_POStockInCheckBillController.cs
+++ b/WebAPI/Controllers/QC_POStockInCheckBillController.cs
@@ -1,4 +1,5 @@
-锘縰sing Newtonsoft.Json.Linq;
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
using Pub_Class;
using System;
using System.Collections;
@@ -24,21 +25,39 @@
/// <summary>
/// 杩斿洖鍒楄〃
+ /// 鏉ユ枡鍏ュ簱妫�楠屽崟
///鍙傛暟锛歴tring sql銆�
///杩斿洖鍊硷細object銆�
/// </summary>
- [Route("QC_POStockInCheckBill/GetPOStockInCheckBill")]
+ [Route("QC_POStockInCheckBill/GetPOStockInCheckBill")]
[HttpGet]
- public object GetPOStockInCheckBill(string sWhere)
+ public object GetPOStockInCheckBill(string sWhere,string user)
{
try
{
+ List<object> a = new List<object>();
+ //鏌ョ湅鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("QC_POStockInCheckBill_Query", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
ds = QC_POStockInCheckBill(sWhere);
+ foreach (DataColumn col in ds.Tables[0].Columns)//閬嶅巻ds涓涓�涓〃锛圱ables[0]锛夌殑鎵�鏈夊垪锛圕olumns锛夋瘡娆″惊鐜腑锛宑ol鍙橀噺浼氭寔鏈夊綋鍓嶅垪鐨勫紩鐢�
+ {
+ Type dataType = col.DataType; //鑾峰彇褰撳墠鏁版嵁绫诲瀷浼犲叆 鑷畾涔夊彉閲廳atadataType
+ string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; //瀛楃涓叉嫾鎺� // 灏嗗垪鍚嶅拰鏁版嵁绫诲瀷淇℃伅鎷兼帴鎴愪竴涓狫SON鏍煎紡鐨勫瓧绗︿覆
+ a.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+ }
objJsonResult.code = "1";
objJsonResult.count = 1;
objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�";
objJsonResult.data = ds.Tables[0];
+ objJsonResult.list=a;
return objJsonResult;
}
catch (Exception ex)
@@ -148,8 +167,19 @@
string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
string msg2 = sArray[0].ToString();
string msg3 = sArray[1].ToString();
+ string user = sArray[2].ToString();
try
{
+ //鍒ゆ柇鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("QC_POStockInCheckBill_Edit", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犱繚瀛樻潈闄�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
msg2 = "[" + msg2.ToString() + "]";
List<QC_POStockInCheckBill> mainList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<QC_POStockInCheckBill>>(msg2);
int HYear = 2021;
@@ -275,10 +305,20 @@
/// <returns></returns>
[Route("QC_POStockInCheckBill/DeltetPOStockInCheckBill")]
[HttpGet]
- public object DeltetPOStockInCheckBill(string HInterID)
+ public object DeltetPOStockInCheckBill(string HInterID,string user)
{
try
{
+ //鏌ョ湅鏉冮檺
+ if (!DBUtility.ClsPub.Security_Log("QC_POStockInCheckBill_Delete", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犲垹闄ゆ潈闄愶紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
oCN.BeginTran();
oCN.RunProc("Delete From QC_POStockInCheckBillMain where HInterID = " + HInterID);
oCN.RunProc("Delete From QC_POStockInCheckBillSub where HInterID = " + HInterID);
--
Gitblit v1.9.1