usertest
cjy 4 months ago
parent 9d6d9c44de
commit 58409d5e3d

@ -1,4 +1,5 @@
using DS.Module.Core; using DS.Module.Core;
using SqlSugar;
namespace DS.WMS.Core.Code.Dtos; namespace DS.WMS.Core.Code.Dtos;
@ -20,7 +21,10 @@ public class CodeServiceSelectRes
/// </summary> /// </summary>
public string CnName { get; set; } public string CnName { get; set; }
/// <summary>
/// EDI代码
/// </summary>
public string EdiCode { get; set; }
/// <summary> /// <summary>
/// 备注 /// 备注
/// </summary> /// </summary>

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<NameOfLastUsedPublishProfile>D:\Source\Repos\DS8\ds-wms-service\DS.WMS.MainApi\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile> <NameOfLastUsedPublishProfile>D:\Code\DS\ds8-solution-pro\ds-wms-service\DS.WMS.MainApi\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

@ -14,6 +14,7 @@ using System.Collections.Generic;
using Newtonsoft.Json; using Newtonsoft.Json;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using DS.WMS.PrintApi.Middleware; using DS.WMS.PrintApi.Middleware;
using Newtonsoft.Json.Schema;
namespace DS.WMS.PrintApi.Service namespace DS.WMS.PrintApi.Service
{ {
@ -322,18 +323,42 @@ namespace DS.WMS.PrintApi.Service
FastReport.Report report = new FastReport.Report(); FastReport.Report report = new FastReport.Report();
report.Load(printFile); report.Load(printFile);
report.Dictionary.Connections.Clear();
//var dataSource = report.Dictionary.Connections[0] as JsonDataSourceConnection;
var str = new FastReport.Data.JsonConnection.JsonDataSourceConnectionStringBuilder(); var str = new FastReport.Data.JsonConnection.JsonDataSourceConnectionStringBuilder();
str.Json = JsonConvert.SerializeObject(data); str.Json = JsonConvert.SerializeObject(data);
//dataSource.ConnectionString = str.ConnectionString; if (report.Dictionary.Connections.Count == 0)
{
//重置数据源 //重置数据源
report.Dictionary.Connections.Add(new JsonDataSourceConnection() report.Dictionary.Connections.Add(new JsonDataSourceConnection()
{ {
ConnectionString = str.ConnectionString, ConnectionString = str.ConnectionString,
Alias = "JSON" Name = "Connection",
}); });
}
else {
var dataSource = report.Dictionary.Connections[0] as JsonDataSourceConnection;
dataSource.ConnectionString = str.ConnectionString;
}
//var dataSource = report.Dictionary.Connections[0] as JsonDataSourceConnection;
//var str = new FastReport.Data.JsonConnection.JsonDataSourceConnectionStringBuilder();
//str.Json = JsonConvert.SerializeObject(data);
//dataSource.ConnectionString = str.ConnectionString;
//JsonSchemaGenerator generator = new JsonSchemaGenerator();
//JsonSchema jsonSchema = generator.Generate()
//report.Dictionary.Connections.Clear();
//var dataSource = report.Dictionary.Connections[0] as JsonDataSourceConnection;
//var str = new FastReport.Data.JsonConnection.JsonDataSourceConnectionStringBuilder();
//str.Json = JsonConvert.SerializeObject(data);
////dataSource.ConnectionString = str.ConnectionString;
////重置数据源
//report.Dictionary.Connections.Add(new JsonDataSourceConnection()
//{
// ConnectionString = str.ConnectionString,
// Alias = "JSON"
//});
//report.Dictionary.Connections[0].ConnectionString = str.ConnectionString; //report.Dictionary.Connections[0].ConnectionString = str.ConnectionString;
report.Prepare(); report.Prepare();

Loading…
Cancel
Save