20240311
This commit is contained in:
@@ -17,6 +17,11 @@ using Kingdee.BOS.Core.List;
|
||||
using Kingdee.BOS.Util;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using HandleUtils;
|
||||
using Kingdee.BOS.ServiceFacade.KDServiceClient.User;
|
||||
using Kingdee.BOS.Authentication;
|
||||
using Kingdee.BOS.App.Data;
|
||||
using System.Data;
|
||||
using Kingdee.BOS.Core;
|
||||
|
||||
namespace UnitTestProject1
|
||||
{
|
||||
@@ -37,42 +42,12 @@ namespace UnitTestProject1
|
||||
[TestMethod]
|
||||
public void TestMethod2()
|
||||
{
|
||||
|
||||
var json = "{\"a\":\"0\"}";
|
||||
var jToken = JsonConvert.DeserializeObject<JToken>(json);
|
||||
|
||||
var a = jToken["a"].ToString();
|
||||
string formattedValue2 = $"CD{DateTime.Now.ToString("yyMMddHHmmss")}";
|
||||
int i = 0;
|
||||
string itemNo = $"CD{DateTime.Now:yyMMddHHmmss}" + i++.ToString("D2");
|
||||
string yearAbbreviation = DateTime.Now.Year.ToString().Substring(2, 2); // 获取年份的缩写,比如2023年的缩写为23
|
||||
string formattedValue = $"CD{yearAbbreviation}{DateTime.Now.ToString("MMddHHmmss")}";
|
||||
//var list = new List<TestEntity>();
|
||||
//list.Add(new TestEntity(1, "ttetett"));
|
||||
//list.Add(new TestEntity(1, "ttetett"));
|
||||
//list.Add(new TestEntity(1, "ttetett"));
|
||||
//list.Add(new TestEntity(1, "ttetett"));
|
||||
//list.Add(new TestEntity(1, "ttetett"));
|
||||
//list.Add(new TestEntity(1, "ttetett"));
|
||||
//list.Add(new TestEntity(1, "ttetett"));
|
||||
//list.Add(new TestEntity(1, "ttetett"));
|
||||
//list.Add(new TestEntity(1, "ttetett"));
|
||||
//list.Add(new TestEntity(1, "ttetett"));
|
||||
//list.Add(new TestEntity(1, "ttetett"));
|
||||
//list.Add(new TestEntity(2, "ttetett"));
|
||||
//list.Add(new TestEntity(2, "ttetett"));
|
||||
//list.Add(new TestEntity(2, "ttetett"));
|
||||
//list.Add(new TestEntity(2, "ttetett"));
|
||||
//list.Add(new TestEntity(2, "ttetett"));
|
||||
//list.Add(new TestEntity(2, "ttetett"));
|
||||
//list.Add(new TestEntity(2, "ttetett"));
|
||||
|
||||
//var ttt = list.GroupBy(x => x.id);
|
||||
|
||||
//var count = ttt.Count();
|
||||
|
||||
var tt = " ";
|
||||
var b = formattedValue2.Equals(formattedValue);
|
||||
var ttt = "STK_Inventory";
|
||||
var paramList = new List<string>();
|
||||
if (!ttt.IsNullOrEmpty())
|
||||
paramList = ttt
|
||||
.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries)
|
||||
.ToList();
|
||||
//var i = tt.ToDecimal();
|
||||
|
||||
return;
|
||||
@@ -296,6 +271,30 @@ namespace UnitTestProject1
|
||||
return;
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void TestMethod5()
|
||||
{
|
||||
UserServiceProxy proxy = new UserServiceProxy();// 引用Kingdee.BOS.ServiceFacade.KDServiceClient.dll
|
||||
proxy.HostURL = @"http://61.145.228.58:9656/k3cloud";//k/3cloud地址
|
||||
var loginInfo = new LoginInfo();
|
||||
loginInfo.AcctID = "002481f61575a79e11e3d3f2ef7641c4";
|
||||
loginInfo.Username = "冷宝荣";
|
||||
loginInfo.Password = "lbr@123456";
|
||||
var ret = proxy.ValidateUser(proxy.HostURL, loginInfo);
|
||||
//var cloudUrl = "http://localhost/K3Cloud";
|
||||
//UserServiceProxy proxy = new UserServiceProxy();// 引用Kingdee.BOS.ServiceFacade.KDServiceClient.dll
|
||||
//proxy.HostURL = @"http://localhost/K3Cloud";//k/3cloud地址
|
||||
//var info = new LoginInfo();
|
||||
//info.AcctID = "654e408a013340";
|
||||
//info.Username = "demo";
|
||||
//info.Password = "123qwe!@#";
|
||||
//info.PasswordIsEncrypted = false;
|
||||
//var ret= proxy.ValidateUser(cloudUrl, info);
|
||||
|
||||
var sql = @"";
|
||||
IDataReader reader = DBUtils.ExecuteReader(ret.Context, sql);
|
||||
}
|
||||
|
||||
//public string GetSignature(string[] arr)
|
||||
//{
|
||||
// //1. 将数组进行排序
|
||||
|
||||
@@ -42,9 +42,21 @@
|
||||
<Reference Include="Kingdee.BOS">
|
||||
<HintPath>..\..\..\..\..\Program Files (x86)\Kingdee\K3Cloud\WebSite\bin\Kingdee.BOS.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Kingdee.BOS.App">
|
||||
<HintPath>..\..\..\..\..\Program Files (x86)\Kingdee\K3Cloud\WebSite\bin\Kingdee.BOS.App.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Kingdee.BOS.Core">
|
||||
<HintPath>..\..\..\..\..\Program Files (x86)\Kingdee\K3Cloud\WebSite\bin\Kingdee.BOS.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Kingdee.BOS.ServiceFacade.KDServiceClient">
|
||||
<HintPath>..\..\..\..\..\Program Files (x86)\Kingdee\K3Cloud\WebSite\bin\Kingdee.BOS.ServiceFacade.KDServiceClient.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Kingdee.BOS.ServiceFacade.KDServiceClientFx">
|
||||
<HintPath>..\..\..\..\..\Program Files (x86)\Kingdee\K3Cloud\WebSite\bin\Kingdee.BOS.ServiceFacade.KDServiceClientFx.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Kingdee.BOS.ServiceHelper">
|
||||
<HintPath>..\..\..\..\..\Program Files (x86)\Kingdee\K3Cloud\WebSite\bin\Kingdee.BOS.ServiceHelper.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualStudio.TestPlatform.TestFramework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MSTest.TestFramework.2.2.10\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -57,6 +69,7 @@
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http">
|
||||
<HintPath>..\..\..\..\..\Program Files (x86)\Kingdee\K3Cloud\WebSite\bin\System.Net.Http.dll</HintPath>
|
||||
</Reference>
|
||||
|
||||
Reference in New Issue
Block a user