| | |
| | | public static string U9CAuthLoginUrl { get; set; } = ApiConfig.IsTestServer ? Cache.SysParam["U9CAuthLoginUrl_Test", "U9CUrl"].PARAM_VALUE : Cache.SysParam["U9CAuthLoginUrl", "U9CUrl"].PARAM_VALUE; // "http://172.16.80.20/U9C/webapi/OAuth2/AuthLogin?"; 测试 |
| | | //public static string U9CAuthLoginUrl { get; set; } = Cache.SysParam["U9CAuthLoginUrl", "U9CUrl"].PARAM_VALUE; //正式 |
| | | public static string secret = "&entcode=02&orgcode=101&clientid=mes&clientsecret=12c8ee7e9bb74ad2a6a0fb3315c8af20"; |
| | | /// <summary> |
| | | /// 审核人 |
| | | /// </summary> |
| | | public static string Reviewer = Cache.SysParam["Reviewer", "U9CUrl"].PARAM_VALUE; |
| | | public static string CreateRcvBySrcASNUrl |
| | | { get; set; } = "http://172.16.80.20/U9C/webapi/Receivement/CreateRcvBySrcASN"; //ApiConfig.IsTestServer ? Cache.SysParam["CreateRcvBySrcASNUrl_Test", "U9CUrl"].PARAM_VALUE : Cache.SysParam["CreateRcvBySrcASNUrl", "U9CUrl"].PARAM_VALUE; //"http://172.16.80.20/U9C/webapi/Receivement/CreateRcvBySrcASN"; 测试 |
| | | public static string CreateReceivementUrl |
| | |
| | | { get; set; } = "http://172.16.80.20/u9c/webapi/Receivement/SubmitLine"; // ApiConfig.IsTestServer ? Cache.SysParam["SubmitLineUrl_Test", "U9CUrl"].PARAM_VALUE : Cache.SysParam["SubmitLineUrl", "U9CUrl"].PARAM_VALUE; //http://172.16.80.20/u9c/webapi/Receivement/SubmitLine; 测试 |
| | | public static string ApproveLineUrl |
| | | { get; set; } = "http://172.16.80.20/u9c/webapi/Receivement/ApproveLine"; // ApiConfig.IsTestServer ? Cache.SysParam["ApproveLineUrl_Test", "U9CUrl"].PARAM_VALUE : Cache.SysParam["ApproveLineUrl", "U9CUrl"].PARAM_VALUE; //http://172.16.80.20/u9c/webapi/Receivement/ApproveLine; 测试 |
| | | /// <summary> |
| | | /// 创建生产领料单 |
| | | /// </summary> |
| | | public static string CreateProdMaterialReqUrl |
| | | { get; set; } = "http://172.16.80.20/u9c/webapi/IssueDoc/Create"; // ApiConfig.IsTestServer ? Cache.SysParam["CreateProdMaterialReqUrl_Test", "U9CUrl"].PARAM_VALUE : Cache.SysParam["CreateProdMaterialReqUrl", "U9CUrl"].PARAM_VALUE; //http://172.16.80.20/u9c/webapi/IssueDoc/Create |
| | | public static string CreateProdReturnOrderUrl |
| | | /// <summary> |
| | | /// 创建生产退料单-按行退料 |
| | | /// </summary> |
| | | public static string CreateProdReturnOrderNewUrl |
| | | { get; set; } = "http://172.16.80.20/u9c/webapi/IssueDoc/CreateRecedeIssueDocNew"; // ApiConfig.IsTestServer ? Cache.SysParam["CreateProdReturnOrderUrl_Test", "U9CUrl"].PARAM_VALUE : Cache.SysParam["CreateProdReturnOrderUrl", "U9CUrl"].PARAM_VALUE; //http://172.16.80.20/u9c/webapi/IssueDoc/CreateRecedeIssueDocNew |
| | | /// <summary> |
| | | /// 创建委外生产领料单 |
| | | /// </summary> |
| | | public static string CreateOutProdMaterialReqUrl |
| | | { get; set; } = "http://172.16.80.20/u9c/webapi/PMIssueDoc/Create"; // ApiConfig.IsTestServer ? Cache.SysParam["CreateOutProdMaterialReqUrl_Test", "U9CUrl"].PARAM_VALUE : Cache.SysParam["CreateOutProdMaterialReqUrl", "U9CUrl"].PARAM_VALUE; //http://172.16.80.20/u9c/webapi/PMIssueDoc/Create |
| | | /// <summary> |
| | | /// 创建委外生产退料单 |
| | | /// </summary> |
| | | public static string CreateOutProdReturnOrderUrl |
| | | { get; set; } = "http://172.16.80.20/u9c/webapi/PMIssueDoc/CreateRecedeIssueDoc"; // ApiConfig.IsTestServer ? Cache.SysParam["CreateOutProdReturnOrderUrl_Test", "U9CUrl"].PARAM_VALUE : Cache.SysParam["CreateOutProdReturnOrderUrl", "U9CUrl"].PARAM_VALUE; //http://172.16.80.20/u9c/webapi/PMIssueDoc/CreateRecedeIssueDoc |
| | | /// <summary> |
| | | /// 创建调入单 |
| | | /// </summary> |
| | | public static string CreateTransferInUrl |
| | | { get; set; } = "http://172.16.80.20/u9c/webapi/TransferIn/Create"; // ApiConfig.IsTestServer ? Cache.SysParam["CreateTransferInUrl_Test", "U9CUrl"].PARAM_VALUE : Cache.SysParam["CreateTransferInUrl", "U9CUrl"].PARAM_VALUE; //http://172.16.80.20/u9c/webapi/TransferIn/Create |
| | | |
| | |
| | | //如果已经登录则不需要再次登录,直接使用传入的token |
| | | if (input.IsLogin) |
| | | { |
| | | var u9CLoginResult = await HttpHelper.GetAsync<U9CLoginResult>($"{U9CAuthLoginUrl}userCode={input.userId}{secret}"); |
| | | var u9CLoginResult = await HttpHelper.GetAsync<U9CLoginResult>($"{U9CAuthLoginUrl}userCode={Reviewer}{secret}"); |
| | | if (u9CLoginResult.Success) |
| | | { |
| | | input.token = u9CLoginResult.Data; |