From 9ecae8f6fba505d5e1f8cb766641ce7e25b4ebd0 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期三, 26 三月 2025 08:23:40 +0800
Subject: [PATCH] 班组工艺路线bug处理
---
WebAPI/Controllers/项目管理/工程项目/PM_ProjectBillController.cs | 191 +++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 191 insertions(+), 0 deletions(-)
diff --git "a/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectBillController.cs" "b/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectBillController.cs"
index 5b28c04..17724f9 100644
--- "a/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectBillController.cs"
+++ "b/WebAPI/Controllers/\351\241\271\347\233\256\347\256\241\347\220\206/\345\267\245\347\250\213\351\241\271\347\233\256/PM_ProjectBillController.cs"
@@ -5670,5 +5670,196 @@
}
#endregion
#endregion
+
+
+ #region 椤圭洰璐圭敤寰呭鏍稿垪琛�
+ #region 宸ョ▼椤圭洰璐圭敤寰呭鏍稿垪琛�
+ [Route("PM_ProjectBill/NeedCheckQuery")]
+ [HttpGet]
+ public object PM_ProjectBillNeedCheckQuery(string user)
+ {
+ DataSet ds;
+ try
+ {
+ List<object> columnNameList = new List<object>();
+ //鍒ゆ柇鏉冮檺
+ //if (!DBUtility.ClsPub.Security_Log("Cg_POInStockBillQuery", 1, false, user))
+ //{
+ // objJsonResult.code = CodeConstant.FAIL;
+ // objJsonResult.count = CountConstant.FAIL;
+ // objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒";
+ // objJsonResult.data = null;
+ // return objJsonResult;
+ //}
+ //sWhere = sWhere.Replace("'", "''");
+ ds = oCN.RunProcReturn("exec h_p_PM_ProjectBillNeedCheckQuery ", "h_p_PM_ProjectBillNeedCheckQuery");
+
+ //娣诲姞鍒楀悕
+ 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 = CodeConstant.SUCCEED;
+ objJsonResult.count = CountConstant.SUCCEED;
+ objJsonResult.Message = "Sucess锛�";
+ objJsonResult.list = columnNameList;
+ objJsonResult.data = ds.Tables[0];
+ return objJsonResult;
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = CodeConstant.FAIL;
+ objJsonResult.count = CountConstant.FAIL;
+ objJsonResult.Message = "Exception锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #region 宸ョ▼椤圭洰璐圭敤 瀹℃牳/鍙嶅鏍�
+
+ [Route("PM_ProjectBill/AuditTaskMoney")]
+ [HttpGet]
+ public object AuditTaskMoney(string HInterID, string Type, string user)
+ {
+ try
+ {
+ //鍒ゆ柇鏄惁鏈夊鏍告潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Pm_ProjectBill_Check", 1, false, user))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鏃犳潈闄愬鏍�!";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ if (string.IsNullOrWhiteSpace(HInterID))
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "HInterID涓虹┖锛�";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+
+ ClsPub.CurUserName = user;
+ BillOld.MvarItemKey = "PM_ProjectBillMain";
+ oCN.BeginTran();//寮�濮嬩簨鍔�
+ DataSet ds;
+ string sql = "select * from " + BillOld.MvarItemKey + " where HinterID = " + HInterID;
+ ds = oCN.RunProcReturn(sql, BillOld.MvarItemKey);
+ if (ds == null || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鍗曟嵁涓嶅瓨鍦紒";
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ //Type 浠诲姟瀹夎璐瑰鏍告爣璁�
+ if (Type == "SetupMoneyCheck")
+ {
+ if (ds.Tables[0].Rows[0]["HTaskSetupMoneyCheckFlag"].ToString() == "False")
+ {
+ oCN.RunProcReturn("update PM_ProjectBillMain set HTaskSetupMoneyCheckFlag = 1 where HInterID = " + HInterID, "PM_ProjectBillMain");
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璐圭敤宸插鏍革紒";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+ }
+ //浠诲姟闄勫睘瀹℃牳
+ else if (Type == "OtherMoneyCheck")
+ {
+ if (ds.Tables[0].Rows[0]["HTaskOtherMoneyCheckFlag"].ToString() == "False")
+ {
+ oCN.RunProcReturn("update PM_ProjectBillMain set HTaskOtherMoneyCheckFlag = 1 where HInterID = " + HInterID, "PM_ProjectBillMain");
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璐圭敤宸插鏍革紒";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+ }
+ //浠诲姟鑰冩牳璐瑰鏍�
+ else if (Type == "ExamMoneyCheck")
+ {
+ if (ds.Tables[0].Rows[0]["HTaskExamMoneyCheckFlag"].ToString() == "False")
+ {
+ oCN.RunProcReturn("update PM_ProjectBillMain set HTaskExamMoneyCheckFlag = 1 where HInterID = " + HInterID, "PM_ProjectBillMain");
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璐圭敤宸插鏍革紒";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+ }
+ //浠诲姟宸ヨ垂瀹℃牳鏍囪
+ else if (Type == "WorkMoneyCheck")
+ {
+ if (ds.Tables[0].Rows[0]["HTaskWorkMoneyCheckFlag"].ToString() == "False")
+ {
+ oCN.RunProcReturn("update PM_ProjectBillMain set HTaskWorkMoneyCheckFlag = 1 where HInterID = " + HInterID, "PM_ProjectBillMain");
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璐圭敤宸插鏍革紒";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+ }
+ //鍙嶅鏍歌垂鐢�
+ else if (Type == "UnCheck")
+ {
+
+ oCN.RunProcReturn("update PM_ProjectBillMain set HTaskWorkMoneyCheckFlag = 0,HTaskExamMoneyCheckFlag = 0,HTaskOtherMoneyCheckFlag = 0,HTaskSetupMoneyCheckFlag = 0 where HInterID = " + HInterID, "PM_ProjectBillMain");
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "瀹℃牳绫诲瀷涓嶅瓨鍦紒";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+
+ oCN.Commit();//鎻愪氦浜嬪姟
+
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "鎵ц鎴愬姛锛�";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+
+ }
+ catch (Exception e)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "鎵ц澶辫触锛�" + e.ToString();
+ objJsonResult.data = null;
+ return objJsonResult;
+ }
+ }
+ #endregion
+
+ #endregion
}
}
\ No newline at end of file
--
Gitblit v1.9.1