| | |
| | | /*"ConnectionStrings": "Data Source=192.168.1.146;Initial Catalog=TEST_MES;User ID=testUser;Password =qixi1qaz@WSXtest",*/ |
| | | "ConnectionStrings": "Data Source=192.168.8.8;Initial Catalog=YS_MES;User ID=sa;Password =JianHui@2025", |
| | | "TestErpUrl": "http://60.204.140.168:8080//kingdee/billWriteIn", |
| | | "TestErpUrl2": "http://192.168.1.149:8066/WebService1.asmx/MesToErpUpdateFlag", |
| | | "TestErpUrl2": "http://60.204.140.168:8080//kingdee/transferDirect", |
| | | "TestErpUrl3": "http://60.204.140.168:8888//kingdee/updateShdStatus", |
| | | "TestErpUrl4": "http://60.204.140.168:8888//kingdee/billReload", |
| | | "ProductionErpUrl": "http://192.168.1.149:8066/WebService1.asmx/mesToErpinfoFormal", |
| | | "ServicesPath": "Services", |
| | | "LogPath": "logs", |
| | |
| | | public FmController(IHttpContextAccessor httpContextAccessor) |
| | | { |
| | | _http = httpContextAccessor; |
| | | (_userCode, _userGuid, _orgFids) = |
| | | GetUserGuidAndOrgGuid(_http); |
| | | (_userCode, _userGuid, _orgFids) = GetUserGuidAndOrgGuid(_http); |
| | | } |
| | | |
| | | #region 版面 |
| | |
| | | return ReturnDto<string>.QuickReturn(strMsg, ReturnCode.Success, "读取成功!"); |
| | | } |
| | | |
| | | |
| | | #endregion |
| | | |
| | | private int? chkAdmin() |
| | |
| | | //string keyChild = model.keyChild;任务子节点名 |
| | | //string keyMeth = model.keyMeth;方法名 |
| | | //string keyNo = model.keyNo;单据编号 |
| | | //string idtype = model.idtype;推送类型 |
| | | int _rtnInt = 0; |
| | | string _rtnStr = ""; |
| | | try |
| | | { |
| | | string _erpJson = GetErpParam(model); |
| | | if (_erpJson.Length <= 0) |
| | | { |
| | | return "-1读取erp参数失败!"; |
| | | } |
| | | string keyUserGuid = model.keyUserGuid; |
| | | string keyGuid = model.keyGuid; |
| | | string keyNo = model.keyNo; |
| | | string idtype = model.idtype;//这个仅仅是更新工单状态的时候有 |
| | | if (string.IsNullOrEmpty(idtype)) |
| | | { |
| | | (_rtnInt, _rtnStr) = InterfaceUtil.HttpPostErp(_erpJson, keyUserGuid, keyGuid, keyNo); |
| | | else |
| | | } |
| | | else if(idtype=="2") |
| | | { |
| | | (_rtnInt, _rtnStr) = InterfaceUtil.HttpPostErp(_erpJson, keyUserGuid, keyGuid, keyNo, 2); |
| | | } |
| | | else if(idtype == "3") |
| | | { |
| | | (_rtnInt, _rtnStr) = InterfaceUtil.HttpPostErp(_erpJson, keyUserGuid, keyGuid, keyNo, 3); |
| | | } |
| | | else if (idtype == "4") |
| | | { |
| | | (_rtnInt, _rtnStr) = InterfaceUtil.HttpPostErp(_erpJson, keyUserGuid, keyGuid, keyNo, 4); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | string strLogGuid = Guid.NewGuid().ToString(); |
| | | string url = AppSettingsHelper.getValueByKey("TestErpUrl"); |
| | | if (urlType == 2) |
| | | { |
| | | url = AppSettingsHelper.getValueByKey("TestErpUrl2"); |
| | | } |
| | | else if (urlType == 3) |
| | | { |
| | | url = AppSettingsHelper.getValueByKey("TestErpUrl3"); |
| | | } |
| | | else if (urlType == 4) |
| | | { |
| | | url = AppSettingsHelper.getValueByKey("TestErpUrl4"); |
| | | } |
| | | HttpWebRequest request = null; |
| | | StreamWriter requestStream = null; |
| | | WebResponse response = null; |
| | |
| | | response = request.GetResponse(); |
| | | if (response != null) |
| | | { |
| | | var reader = new StreamReader(response.GetResponseStream(), |
| | | Encoding.UTF8); |
| | | var reader = new StreamReader(response.GetResponseStream(),Encoding.UTF8); |
| | | responseStr = reader.ReadToEnd(); |
| | | reader.Close(); |
| | | } |