From b0688c1efd606284fd5bc31f2d60a1fec9aef968 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期二, 08 四月 2025 11:20:50 +0800
Subject: [PATCH] 自定义菜单优化
---
WebAPI/Controllers/项目管理/工程项目/PM_ProjectBillController.cs | 190 +++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 190 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 7bb0a32..748f631 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"
@@ -5936,5 +5936,195 @@
#endregion
#endregion
+
+ #region 椤圭洰璐圭敤寰呬繚瀛樺垪琛�
+ #region 宸ョ▼椤圭洰璐圭敤寰呬繚瀛樺垪琛�
+ [Route("PM_ProjectBill/NeedSaveQuery")]
+ [HttpGet]
+ public object PM_ProjectBillNeedSaveQuery(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_ProjectBillNeedSaveQuery ", "h_p_PM_ProjectBillNeedSaveQuery");
+
+ //娣诲姞鍒楀悕
+ 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/SaveTaskMoney")]
+ [HttpGet]
+ public object SaveTaskMoney(string HInterID, string Type, string user,int HMoney)
+ {
+ try
+ {
+ //鍒ゆ柇鏄惁鏈夊鏍告潈闄�
+ if (!DBUtility.ClsPub.Security_Log("Pm_ProjectBill_edit", 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 == "SetupMoneySave")
+ {
+ if (ds.Tables[0].Rows[0]["HTaskSetupMoneySaveFlag"].ToString() == "False")
+ {
+ oCN.RunProcReturn("update PM_ProjectBillMain set HTaskSetupMoneySaveFlag = 1,HTaskSetupMoney="+HMoney+" where HInterID = " + HInterID, "PM_ProjectBillMain");
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璐圭敤宸蹭繚瀛橈紒";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+ }
+ //浠诲姟闄勫睘淇濆瓨
+ else if (Type == "OtherMoneySave")
+ {
+ if (ds.Tables[0].Rows[0]["HTaskOtherMoneySaveFlag"].ToString() == "False")
+ {
+ oCN.RunProcReturn("update PM_ProjectBillMain set HTaskOtherMoneySaveFlag = 1,HTaskOtherMoney=" + HMoney + " where HInterID = " + HInterID, "PM_ProjectBillMain");
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璐圭敤宸蹭繚瀛橈紒";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+ }
+ //浠诲姟鑰冩牳璐逛繚瀛�
+ else if (Type == "ExamMoneySave")
+ {
+ if (ds.Tables[0].Rows[0]["HTaskExamMoneySaveFlag"].ToString() == "False")
+ {
+ oCN.RunProcReturn("update PM_ProjectBillMain set HTaskExamMoneySaveFlag = 1,HTaskExamMoney=" + HMoney + " where HInterID = " + HInterID, "PM_ProjectBillMain");
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璐圭敤宸蹭繚瀛橈紒";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+ }
+ //浠诲姟宸ヨ垂淇濆瓨鏍囪
+ else if (Type == "WorkMoneySave")
+ {
+ if (ds.Tables[0].Rows[0]["HTaskWorkMoneySaveFlag"].ToString() == "False")
+ {
+ oCN.RunProcReturn("update PM_ProjectBillMain set HTaskWorkMoneySaveFlag = 1,HTaskWorkMoney=" + HMoney + " where HInterID = " + HInterID, "PM_ProjectBillMain");
+ }
+ else
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 0;
+ objJsonResult.Message = "璐圭敤宸蹭繚瀛橈紒";
+ objJsonResult.data = null;
+ return objJsonResult; ;
+ }
+ }
+ //鍙嶄繚瀛樿垂鐢�
+ else if (Type == "UnSave")
+ {
+
+ oCN.RunProcReturn("update PM_ProjectBillMain set HTaskWorkMoneySaveFlag = 0,HTaskExamMoneySaveFlag = 0,HTaskOtherMoneySaveFlag = 0,HTaskSetupMoneySaveFlag = 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