Browse Source

修改 Store

集成Redis
郑勃旭 2 years ago
parent
commit
e9bed3700d
  1. 63
      be/Hosts/Basedata.Host/Win_in.Sfs.Basedata.HttpApi.Host/Properties/Resources.Designer.cs
  2. 101
      be/Hosts/Basedata.Host/Win_in.Sfs.Basedata.HttpApi.Host/Properties/Resources.resx
  3. 13
      be/Modules/Shared/src/Win_in.Sfs.Shared.Application.Contracts/ISfsImportAppService.cs
  4. 14
      be/Modules/Shared/src/Win_in.Sfs.Shared.Application/SfsCrudWithDetailsAppServiceBase.cs
  5. 20
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Orders/PurchaseOrders/Project/FuWeiDongYang/FuWeiDongYang_PurchaseOrderAppService.cs
  6. 9
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Orders/PurchaseOrders/PurchaseOrderAppService.cs
  7. 1
      be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Win_in.Sfs.Wms.Store.Application.csproj
  8. 18
      build/src/docker/publish/settings/appsettings.Development.json
  9. 2
      fe/PC/public/config.js

63
be/Hosts/Basedata.Host/Win_in.Sfs.Basedata.HttpApi.Host/Properties/Resources.Designer.cs

@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Win_in.Sfs.Basedata.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// 返回此类使用的缓存的 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Win_in.Sfs.Basedata.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 重写当前线程的 CurrentUICulture 属性,对
/// 使用此强类型资源类的所有资源查找执行重写。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

101
be/Hosts/Basedata.Host/Win_in.Sfs.Basedata.HttpApi.Host/Properties/Resources.resx

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 1.3
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">1.3</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1">this is my long string</data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
[base64 mime encoded serialized .NET Framework object]
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
[base64 mime encoded string representing a byte array form of the .NET Framework object]
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

13
be/Modules/Shared/src/Win_in.Sfs.Shared.Application.Contracts/ISfsImportAppService.cs

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
namespace Win_in.Sfs.Shared.Application.Contracts;
public interface ISfsImportAppService<TEntity>
{
Task<Dictionary<TEntity, EntityState>> ImportProcessingEntityAsync(
Dictionary<TEntity, EntityState> dictionary);
}

14
be/Modules/Shared/src/Win_in.Sfs.Shared.Application/SfsCrudWithDetailsAppServiceBase.cs

@ -504,6 +504,7 @@ public abstract class SfsCrudWithDetailsAppServiceBase<TEntity, TEntityDto, TReq
var modelList = ExportImportService.Import<TImportInput>(inputFileBytes);
var modelDict = new Dictionary<TImportInput, List<ValidationResult>>();
var entityDict = new Dictionary<TEntity, EntityState>();
foreach (var model in modelList)
{
// DataAnnotations 静态验证
@ -511,6 +512,7 @@ public abstract class SfsCrudWithDetailsAppServiceBase<TEntity, TEntityDto, TReq
modelDict.Add(model, validationRresults);
Validator.TryValidateObject(model, new ValidationContext(model, null, null), validationRresults);
}
// 如果没有验证错误或允许部分导入
if (!modelDict.SelectMany(o => o.Value).Any() || requestInput.IsAllowPartImport)
{
@ -538,6 +540,8 @@ public abstract class SfsCrudWithDetailsAppServiceBase<TEntity, TEntityDto, TReq
// 批量更新
if (entityDict.Any())
{
entityDict=await ImportProcessingEntityAsync(entityDict);
// 调用批量验证
var entityListStatus = await ValidateImportEntities(entityDict).ConfigureAwait(false);
if (entityListStatus)
@ -563,6 +567,16 @@ public abstract class SfsCrudWithDetailsAppServiceBase<TEntity, TEntityDto, TReq
}
}
/// <summary>
/// 用来重写 导入数据时可以加工数据
/// </summary>
/// <param name="dictionary"></param>
/// <returns></returns>
protected virtual async Task<Dictionary<TEntity, EntityState>> ImportProcessingEntityAsync(Dictionary<TEntity, EntityState> dictionary)
{
return dictionary;
}
/// <summary>
/// 导入保存到数据库,可重写
/// </summary>

20
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Orders/PurchaseOrders/Project/FuWeiDongYang/FuWeiDongYang_PurchaseOrderAppService.cs

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Wms.Store.Application;
using Win_in.Sfs.Wms.Store.Domain;
namespace Win_in.Sfs.Wms.Store.Orders.PurchaseOrders.Project.FuWeiDongYang;
public class FuWeiDongYang_PurchaseOrderAppService
{
//public FuWeiDongYang_PurchaseOrderAppService(IPurchaseOrderRepository repository, IPurchaseOrderManager purchaseOrderManager, ISupplierAppService supplierAppService) : base(repository, purchaseOrderManager, supplierAppService)
//{
//}
}

9
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Orders/PurchaseOrders/PurchaseOrderAppService.cs

@ -5,9 +5,11 @@ using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp;
using Win_in.Sfs.Basedata.Application.Contracts;
using Win_in.Sfs.Shared.Application.Contracts;
using Win_in.Sfs.Shared.Domain.Shared;
using Win_in.Sfs.Wms.Store.Application.Contracts;
using Win_in.Sfs.Wms.Store.Domain;
@ -19,7 +21,7 @@ namespace Win_in.Sfs.Wms.Store.Application;
[Authorize]
[Route($"{StoreConsts.RootPath}purchase-order")]
public class PurchaseOrderAppService :
public abstract class PurchaseOrderAppService :
SfsStoreWithDetailsAppServiceBase<PurchaseOrder, PurchaseOrderDTO, SfsStoreRequestInputBase, PurchaseOrderEditInput, PurchaseOrderDetail, PurchaseOrderDetailDTO, SfsStoreRequestInputBase, PurchaseOrderImportInput>,
IPurchaseOrderAppService
{
@ -202,4 +204,9 @@ public class PurchaseOrderAppService :
return dtos;
}
protected override Task<SfsImportResult> ImportInternalAsync(SfsImportRequestInput requestInput, byte[] inputFileBytes)
{
return base.ImportInternalAsync(requestInput, inputFileBytes);
}
}

1
be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Win_in.Sfs.Wms.Store.Application.csproj

@ -29,7 +29,6 @@
<ItemGroup>
<Folder Include="Notes" />
<Folder Include="Orders" />
<Folder Include="Plans" />
<Folder Include="Requests" />
</ItemGroup>

18
build/src/docker/publish/settings/appsettings.Development.json

@ -1,5 +1,5 @@
{
"AlwaysAllowAuthorization": "False",
"AlwaysAllowAuthorization": "True",
"App": {
"CorsOrigins": [
"http://localhost:59080",
@ -45,7 +45,7 @@
},
"AuthServer": {
"Audience": "Auth",
"Authority": "http://localhost:59093/",
"Authority": "http://dev.ccwin-in.com:21293/",
"ClientId": "Auth_App",
"ClientSecret": "1q2w3E*",
"RequireHttpsMetadata": "false",
@ -95,7 +95,7 @@
},
"IdentityClients": {
"Default": {
"Authority": "http://localhost:59093",
"Authority": "http://dev.ccwin-in.com:21293",
"ClientId": "Auth_App",
"ClientSecret": "1q2w3E*",
"GrantType": "client_credentials",
@ -105,27 +105,27 @@
},
"IsMultiTenancy": "True",
"Redis": {
"Configuration": "localhost:21194",
"Configuration": "dev.ccwin-in.com:21194",
"KeyPrefix": "Wms:"
},
"RemoteServices": {
"Auth": {
"BaseUrl": "http://dev.ccwin-in.com:59093/"
"BaseUrl": "http://dev.ccwin-in.com:21293/"
},
"BaseData": {
"BaseUrl": "http://dev.ccwin-in.com:59094/"
},
"Default": {
"BaseUrl": "http://dev.ccwin-in.com:59093"
"BaseUrl": "http://dev.ccwin-in.com:21293"
},
"FileStorage": {
"BaseUrl": "http://dev.ccwin-in.com:59092/"
},
"Inventory": {
"BaseUrl": "http://dev.ccwin-in.com:59095/"
"BaseUrl": "http://localhost:59095/"
},
"Job": {
"BaseUrl": "http://dev.ccwin-in.com:59095/"
"BaseUrl": "http://localhost:59095/"
},
"Label": {
"BaseUrl": "http://dev.ccwin-in.com:59092/"
@ -134,7 +134,7 @@
"BaseUrl": "http://dev.ccwin-in.com:59092/"
},
"Store": {
"BaseUrl": "http://dev.ccwin-in.com:59095/"
"BaseUrl": "http://localhost:59095/"
}
},
"Serilog": {

2
fe/PC/public/config.js

@ -20,7 +20,7 @@
// localhost
window.SITE_CONFIG['base'] = 'http://localhost:21093'
window.SITE_CONFIG['user'] = 'http://localhost:21093/api/auth'
window.SITE_CONFIG['user'] = 'http://dev.ccwin-in.com:21093/api/auth'
window.SITE_CONFIG['print'] = 'print'
window.SITE_CONFIG['largeScreen'] = 'http://localhost:59082'
window.SITE_CONFIG['warehouseCode'] = 'T8'

Loading…
Cancel
Save