From f1685fb91078e9373cbed98a6774421e30063c67 Mon Sep 17 00:00:00 2001 From: duhe <226547893@qq.com> Date: 星期一, 11 十一月 2024 15:06:41 +0800 Subject: [PATCH] 工程项目,工程信息页签里 增加 工程相关 字段(见清单); 工程类:任务下达(改为 短文本 ),分包单位(供应商),管理员(职员),材料计划(日期类型),施工员(职员) 计划工期(数字),实际工期(数字),试压日期(日期类型),试压验收人(职员),试压记录(长文本) 排污日期(日期类型),通水日期(日期类型),竣工图编号,竣工资料,施工完成情况(长文本) 预算类:预算造价,合同造价,结算造价,审计造价,材料费,安装费,班组工费,预收款,工费结账,结算结账 增加一个 项目信息 的页签, 把 (客户,实施担当,开发担当,对应产品,产品名称,项目阶段清单,项目难易类型,结算方,结算金额,合同总金额,产品费,实施费用,其他费用,合同实施人天,合同二次开发人天) 迁移到 项目信息 的页签里; 增加必录项目:项目名称 取消必录项目:实施担当,开发担当,对应产品,结算方; 并且 子表允许为空; 单据号 在新增和修改的情况下,改为可编辑; --- WebAPI/InvokeHelper.cs | 86 +++++++++++++++++++++++++++++++++++++----- 1 files changed, 75 insertions(+), 11 deletions(-) diff --git a/WebAPI/InvokeHelper.cs b/WebAPI/InvokeHelper.cs index 1ba49f0..dcf04ee 100644 --- a/WebAPI/InvokeHelper.cs +++ b/WebAPI/InvokeHelper.cs @@ -1,31 +1,73 @@ 锘縰sing System; using System.Collections.Generic; +using System.Data; using System.Linq; using System.Text; using System.Threading.Tasks; using Newtonsoft.Json; +using WebAPI.Utility; namespace WebAPI { public static class InvokeHelper { - //private static string CloudUrl = "http://localhost/k3cloud/";//K/3 Cloud 涓氬姟绔欑偣鍦板潃 - //private static string CloudUrl = "http://60.190.4.42:9002/k3cloud/";//K/3 Cloud 涓氬姟绔欑偣鍦板潃 - //private static string CloudUrl = "http://47.96.97.237/k3cloud/";//K/3 Cloud 涓氬姟绔欑偣鍦板潃 - private static string CloudUrl = "http://60.190.4.42:9002/K3CLOUD/";//澶忓疂 - + private static string CloudUrl = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "KDApiUrl");//K/3 Cloud 涓氬姟绔欑偣鍦板潃 /// <summary> /// 鐧婚檰 /// </summary> public static string Login() { + //浠嶤鐩橀厤缃枃浠惰幏鍙� CLOUD缃戝潃銆佽处濂椾俊鎭�佺櫥褰曠敤鎴枫�佺櫥褰曞瘑鐮� + Pub_Class.ClsPub.GetCLOUDLoginInfo(ref Pub_Class.ClsPub.sExeReturnInfo); + var useName = Pub_Class.ClsPub.sCLOUDUseName; + var pwd = Pub_Class.ClsPub.sCLOUDPsd; + var dbId = Pub_Class.ClsPub.sCLOUDAcc; + CloudUrl = Pub_Class.ClsPub.sCLOUDUrl; + + //鍘熶粠Config/kdapi.config妯″潡涓幏鍙� 20240712灞忚斀 + //var dbId = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "DbId"); + //var useName = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "UserName"); + //var pwd = Util.GetConfigKey(AppDomain.CurrentDomain.BaseDirectory + "/Config/kdapi.config", "PassWord"); HttpClient httpClient = new HttpClient(); httpClient.Url = string.Concat(CloudUrl, "Kingdee.BOS.WebApi.ServicesStub.AuthService.ValidateUser.common.kdsvc"); List<object> Parameters = new List<object>(); - Parameters.Add("61b14ea86f5c8a");//璐﹀鏍囩ず - Parameters.Add("Administrator");//鐢ㄦ埛鍚� - Parameters.Add("888888");//瀵嗙爜 + Parameters.Add(dbId);//璐﹀鏍囩ず + Parameters.Add(useName);//鐢ㄦ埛鍚� + Parameters.Add(pwd);//瀵嗙爜 + Parameters.Add(2052);//2052浠h〃涓枃 + httpClient.Content = JsonConvert.SerializeObject(Parameters); + + return httpClient.SyncRequest(); + } + + public static string LoginUser(string user) + { + //浠嶤鐩橀厤缃枃浠惰幏鍙� CLOUD缃戝潃銆佽处濂椾俊鎭�佺櫥褰曠敤鎴枫�佺櫥褰曞瘑鐮� + Pub_Class.ClsPub.GetCLOUDLoginInfo(ref Pub_Class.ClsPub.sExeReturnInfo); + var useName = Pub_Class.ClsPub.sCLOUDUseName; + var pwd = Pub_Class.ClsPub.sCLOUDPsd; + var dbId = Pub_Class.ClsPub.sCLOUDAcc; + CloudUrl = Pub_Class.ClsPub.sCLOUDUrl; + + //鑾峰彇鐢ㄦ埛缁戝畾閲戣澏璐﹀彿 + DataSet ds; + SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); + ds = oCN.RunProcReturn("exec h_p_API_GetCloudUserByLoginUser '" + user.ToString() + "'", "h_p_API_GetCloudUserByLoginUser"); + + if (ds != null && ds.Tables[0].Rows.Count != 0) + { + useName = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HCloudUserName"]); + pwd = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HCloudUserPsd"]); + } + + HttpClient httpClient = new HttpClient(); + httpClient.Url = string.Concat(CloudUrl, "Kingdee.BOS.WebApi.ServicesStub.AuthService.ValidateUser.common.kdsvc"); + + List<object> Parameters = new List<object>(); + Parameters.Add(dbId);//璐﹀鏍囩ず + Parameters.Add(useName);//鐢ㄦ埛鍚� + Parameters.Add(pwd);//瀵嗙爜 Parameters.Add(2052);//2052浠h〃涓枃 httpClient.Content = JsonConvert.SerializeObject(Parameters); @@ -37,9 +79,9 @@ HttpClient httpClient = new HttpClient(); httpClient.Url = string.Concat(CloudUrl, "Kingdee.BOS.WebApi.ServicesStub.AuthService.ValidateUser.common.kdsvc"); List<object> Parameters = new List<object>(); - Parameters.Add("5f9258a311401c");//璐﹀鏍囩ず + Parameters.Add("622703e117d642");//璐﹀鏍囩ず Parameters.Add("Administrator");//鐢ㄦ埛鍚� - Parameters.Add("qaz!@#123");//瀵嗙爜 + Parameters.Add("sa@123456");//瀵嗙爜 Parameters.Add(2052);//2052浠h〃涓枃 httpClient.Content = JsonConvert.SerializeObject(Parameters); @@ -186,6 +228,7 @@ return httpClient.SyncRequest(); } + //鍙嶅鏍� public static string UnAudit(string formId, string content) { HttpClient httpClient = new HttpClient(); @@ -199,7 +242,7 @@ httpClient.Content = JsonConvert.SerializeObject(Parameters); return httpClient.SyncRequest(); } - + //涓嬫帹 public static string Push(string formId, string content) { HttpClient httpClient = new HttpClient(); @@ -214,6 +257,9 @@ return httpClient.SyncRequest(); } + /// <summary> + /// 鍗曟嵁鏌ヨ + /// </summary> public static string Query(string formId, string content) { HttpClient httpClient = new HttpClient(); @@ -241,5 +287,23 @@ httpClient.Content = JsonConvert.SerializeObject(args); return httpClient.SyncRequest(); } + + //鐢熶骇璁㈠崟 鎵ц + public static string ExcuteOperation(string formId, string opNumber, string content) + { + LogService.Write("鐢熶骇璁㈠崟 鎵ц锛宱pNumber锛� " + opNumber + ",content:" + content); + HttpClient httpClient = new HttpClient(); + httpClient.Url = string.Concat(CloudUrl, "Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.ExcuteOperation.common.kdsvc"); + + List<object> Parameters = new List<object>(); + //涓氬姟瀵硅薄Id + Parameters.Add(formId); + //鎿嶄綔 寮�宸�"ToStart" + Parameters.Add(opNumber); + //Json瀛椾覆 + Parameters.Add(content); + httpClient.Content = JsonConvert.SerializeObject(Parameters); + return httpClient.SyncRequest(); + } } } -- Gitblit v1.9.1