This commit is contained in:
2025-04-30 23:48:07 +08:00
parent b40b82d812
commit 8b845a27c2
61 changed files with 29041 additions and 3462 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
Binary file not shown.
@@ -0,0 +1,244 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>Microsoft.Extensions.DependencyInjection</name>
</assembly>
<members>
<member name="T:Microsoft.Extensions.DependencyInjection.DefaultServiceProviderFactory">
<summary>
Default implementation of <see cref="T:Microsoft.Extensions.DependencyInjection.IServiceProviderFactory`1"/>.
</summary>
</member>
<member name="M:Microsoft.Extensions.DependencyInjection.DefaultServiceProviderFactory.#ctor">
<summary>
Initializes a new instance of the <see cref="T:Microsoft.Extensions.DependencyInjection.DefaultServiceProviderFactory"/> class
with default options.
</summary>
<seealso cref="F:Microsoft.Extensions.DependencyInjection.ServiceProviderOptions.Default"/>
</member>
<member name="M:Microsoft.Extensions.DependencyInjection.DefaultServiceProviderFactory.#ctor(Microsoft.Extensions.DependencyInjection.ServiceProviderOptions)">
<summary>
Initializes a new instance of the <see cref="T:Microsoft.Extensions.DependencyInjection.DefaultServiceProviderFactory"/> class
with the specified <paramref name="options"/>.
</summary>
<param name="options">The options to use for this instance.</param>
</member>
<member name="M:Microsoft.Extensions.DependencyInjection.DefaultServiceProviderFactory.CreateBuilder(Microsoft.Extensions.DependencyInjection.IServiceCollection)">
<inheritdoc />
</member>
<member name="M:Microsoft.Extensions.DependencyInjection.DefaultServiceProviderFactory.CreateServiceProvider(Microsoft.Extensions.DependencyInjection.IServiceCollection)">
<inheritdoc />
</member>
<member name="P:Microsoft.Extensions.DependencyInjection.Resources.AmbiguousConstructorException">
<summary>
Unable to activate type '{0}'. The following constructors are ambiguous:
</summary>
</member>
<member name="M:Microsoft.Extensions.DependencyInjection.Resources.FormatAmbiguousConstructorException(System.Object)">
<summary>
Unable to activate type '{0}'. The following constructors are ambiguous:
</summary>
</member>
<member name="P:Microsoft.Extensions.DependencyInjection.Resources.CannotResolveService">
<summary>
Unable to resolve service for type '{0}' while attempting to activate '{1}'.
</summary>
</member>
<member name="M:Microsoft.Extensions.DependencyInjection.Resources.FormatCannotResolveService(System.Object,System.Object)">
<summary>
Unable to resolve service for type '{0}' while attempting to activate '{1}'.
</summary>
</member>
<member name="P:Microsoft.Extensions.DependencyInjection.Resources.CircularDependencyException">
<summary>
A circular dependency was detected for the service of type '{0}'.
</summary>
</member>
<member name="M:Microsoft.Extensions.DependencyInjection.Resources.FormatCircularDependencyException(System.Object)">
<summary>
A circular dependency was detected for the service of type '{0}'.
</summary>
</member>
<member name="P:Microsoft.Extensions.DependencyInjection.Resources.UnableToActivateTypeException">
<summary>
No constructor for type '{0}' can be instantiated using services from the service container and default values.
</summary>
</member>
<member name="M:Microsoft.Extensions.DependencyInjection.Resources.FormatUnableToActivateTypeException(System.Object)">
<summary>
No constructor for type '{0}' can be instantiated using services from the service container and default values.
</summary>
</member>
<member name="P:Microsoft.Extensions.DependencyInjection.Resources.OpenGenericServiceRequiresOpenGenericImplementation">
<summary>
Open generic service type '{0}' requires registering an open generic implementation type.
</summary>
</member>
<member name="M:Microsoft.Extensions.DependencyInjection.Resources.FormatOpenGenericServiceRequiresOpenGenericImplementation(System.Object)">
<summary>
Open generic service type '{0}' requires registering an open generic implementation type.
</summary>
</member>
<member name="P:Microsoft.Extensions.DependencyInjection.Resources.TypeCannotBeActivated">
<summary>
Cannot instantiate implementation type '{0}' for service type '{1}'.
</summary>
</member>
<member name="M:Microsoft.Extensions.DependencyInjection.Resources.FormatTypeCannotBeActivated(System.Object,System.Object)">
<summary>
Cannot instantiate implementation type '{0}' for service type '{1}'.
</summary>
</member>
<member name="P:Microsoft.Extensions.DependencyInjection.Resources.NoConstructorMatch">
<summary>
A suitable constructor for type '{0}' could not be located. Ensure the type is concrete and services are registered for all parameters of a public constructor.
</summary>
</member>
<member name="M:Microsoft.Extensions.DependencyInjection.Resources.FormatNoConstructorMatch(System.Object)">
<summary>
A suitable constructor for type '{0}' could not be located. Ensure the type is concrete and services are registered for all parameters of a public constructor.
</summary>
</member>
<member name="P:Microsoft.Extensions.DependencyInjection.Resources.ScopedInSingletonException">
<summary>
Cannot consume {2} service '{0}' from {3} '{1}'.
</summary>
</member>
<member name="M:Microsoft.Extensions.DependencyInjection.Resources.FormatScopedInSingletonException(System.Object,System.Object,System.Object,System.Object)">
<summary>
Cannot consume {2} service '{0}' from {3} '{1}'.
</summary>
</member>
<member name="P:Microsoft.Extensions.DependencyInjection.Resources.ScopedResolvedFromRootException">
<summary>
Cannot resolve '{0}' from root provider because it requires {2} service '{1}'.
</summary>
</member>
<member name="M:Microsoft.Extensions.DependencyInjection.Resources.FormatScopedResolvedFromRootException(System.Object,System.Object,System.Object)">
<summary>
Cannot resolve '{0}' from root provider because it requires {2} service '{1}'.
</summary>
</member>
<member name="P:Microsoft.Extensions.DependencyInjection.Resources.DirectScopedResolvedFromRootException">
<summary>
Cannot resolve {1} service '{0}' from root provider.
</summary>
</member>
<member name="M:Microsoft.Extensions.DependencyInjection.Resources.FormatDirectScopedResolvedFromRootException(System.Object,System.Object)">
<summary>
Cannot resolve {1} service '{0}' from root provider.
</summary>
</member>
<member name="T:Microsoft.Extensions.DependencyInjection.ServiceCollection">
<summary>
Default implementation of <see cref="T:Microsoft.Extensions.DependencyInjection.IServiceCollection"/>.
</summary>
</member>
<member name="P:Microsoft.Extensions.DependencyInjection.ServiceCollection.Count">
<inheritdoc />
</member>
<member name="P:Microsoft.Extensions.DependencyInjection.ServiceCollection.IsReadOnly">
<inheritdoc />
</member>
<member name="P:Microsoft.Extensions.DependencyInjection.ServiceCollection.Item(System.Int32)">
<inheritdoc />
</member>
<member name="M:Microsoft.Extensions.DependencyInjection.ServiceCollection.Clear">
<inheritdoc />
</member>
<member name="M:Microsoft.Extensions.DependencyInjection.ServiceCollection.Contains(Microsoft.Extensions.DependencyInjection.ServiceDescriptor)">
<inheritdoc />
</member>
<member name="M:Microsoft.Extensions.DependencyInjection.ServiceCollection.CopyTo(Microsoft.Extensions.DependencyInjection.ServiceDescriptor[],System.Int32)">
<inheritdoc />
</member>
<member name="M:Microsoft.Extensions.DependencyInjection.ServiceCollection.Remove(Microsoft.Extensions.DependencyInjection.ServiceDescriptor)">
<inheritdoc />
</member>
<member name="M:Microsoft.Extensions.DependencyInjection.ServiceCollection.GetEnumerator">
<inheritdoc />
</member>
<member name="M:Microsoft.Extensions.DependencyInjection.ServiceCollection.IndexOf(Microsoft.Extensions.DependencyInjection.ServiceDescriptor)">
<inheritdoc />
</member>
<member name="M:Microsoft.Extensions.DependencyInjection.ServiceCollection.Insert(System.Int32,Microsoft.Extensions.DependencyInjection.ServiceDescriptor)">
<inheritdoc />
</member>
<member name="M:Microsoft.Extensions.DependencyInjection.ServiceCollection.RemoveAt(System.Int32)">
<inheritdoc />
</member>
<member name="T:Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions">
<summary>
Extension methods for building a <see cref="T:Microsoft.Extensions.DependencyInjection.ServiceProvider"/> from an <see cref="T:Microsoft.Extensions.DependencyInjection.IServiceCollection"/>.
</summary>
</member>
<member name="M:Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(Microsoft.Extensions.DependencyInjection.IServiceCollection)">
<summary>
Creates a <see cref="T:Microsoft.Extensions.DependencyInjection.ServiceProvider"/> containing services from the provided <see cref="T:Microsoft.Extensions.DependencyInjection.IServiceCollection"/>.
</summary>
<param name="services">The <see cref="T:Microsoft.Extensions.DependencyInjection.IServiceCollection"/> containing service descriptors.</param>
<returns>The <see cref="T:Microsoft.Extensions.DependencyInjection.ServiceProvider"/>.</returns>
</member>
<member name="M:Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.Boolean)">
<summary>
Creates a <see cref="T:Microsoft.Extensions.DependencyInjection.ServiceProvider"/> containing services from the provided <see cref="T:Microsoft.Extensions.DependencyInjection.IServiceCollection"/>
optionaly enabling scope validation.
</summary>
<param name="services">The <see cref="T:Microsoft.Extensions.DependencyInjection.IServiceCollection"/> containing service descriptors.</param>
<param name="validateScopes">
<c>true</c> to perform check verifying that scoped services never gets resolved from root provider; otherwise <c>false</c>.
</param>
<returns>The <see cref="T:Microsoft.Extensions.DependencyInjection.ServiceProvider"/>.</returns>
</member>
<member name="M:Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(Microsoft.Extensions.DependencyInjection.IServiceCollection,Microsoft.Extensions.DependencyInjection.ServiceProviderOptions)">
<summary>
Creates a <see cref="T:Microsoft.Extensions.DependencyInjection.ServiceProvider"/> containing services from the provided <see cref="T:Microsoft.Extensions.DependencyInjection.IServiceCollection"/>
optionaly enabling scope validation.
</summary>
<param name="services">The <see cref="T:Microsoft.Extensions.DependencyInjection.IServiceCollection"/> containing service descriptors.</param>
<param name="options">
Configures various service provider behaviors.
</param>
<returns>The <see cref="T:Microsoft.Extensions.DependencyInjection.ServiceProvider"/>.</returns>
</member>
<member name="T:Microsoft.Extensions.DependencyInjection.ServiceLookup.IServiceCallSite">
<summary>
Summary description for IServiceCallSite
</summary>
</member>
<member name="T:Microsoft.Extensions.DependencyInjection.ServiceProvider">
<summary>
The default IServiceProvider.
</summary>
</member>
<member name="M:Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(System.Type)">
<summary>
Gets the service object of the specified type.
</summary>
<param name="serviceType"></param>
<returns></returns>
</member>
<member name="M:Microsoft.Extensions.DependencyInjection.ServiceProvider.Dispose">
<inheritdoc />
</member>
<member name="T:Microsoft.Extensions.DependencyInjection.ServiceProviderOptions">
<summary>
Options for configuring various behaviors of the default <see cref="T:System.IServiceProvider"/> implementation.
</summary>
</member>
<member name="P:Microsoft.Extensions.DependencyInjection.ServiceProviderOptions.ValidateScopes">
<summary>
<c>true</c> to perform check verifying that scoped services never gets resolved from root provider; otherwise <c>false</c>.
</summary>
</member>
<member name="M:Microsoft.Extensions.Internal.TypeNameHelper.GetTypeDisplayName(System.Type,System.Boolean,System.Boolean)">
<summary>
Pretty print a type name.
</summary>
<param name="type">The <see cref="T:System.Type"/>.</param>
<param name="fullName"><c>true</c> to print a fully qualified name.</param>
<param name="includeGenericParameterNames"><c>true</c> to include generic parameter names.</param>
<returns>The pretty printed type name.</returns>
</member>
</members>
</doc>
Binary file not shown.
Binary file not shown.
+6203 -3312
View File
File diff suppressed because it is too large Load Diff
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+140 -113
View File
@@ -1,56 +1,57 @@
<?xml version="1.0"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<configSections> <configSections>
<!--activerecord的配置--> <!--activerecord的配置-->
<section name="activerecord" type="Castle.ActiveRecord.Framework.Config.ActiveRecordSectionHandler, Castle.ActiveRecord"/> <section name="activerecord" type="Castle.ActiveRecord.Framework.Config.ActiveRecordSectionHandler, Castle.ActiveRecord" />
</configSections> <section name="dataProviderModel" type="MSharp.Framework.Data.DataProviderModelConfigurationSection, MSharp.Framework.Core" />
<connectionStrings> </configSections>
<add name="RedisConn" connectionString="127.0.0.1:6379,password=,allowAdmin=true"/> <connectionStrings>
<!--正式--> <add name="RedisConn" connectionString="127.0.0.1:6379,password=,allowAdmin=true" />
<add name="ConnString" connectionString="waSaLjFS1MAAoSe9+gKWJQ1CDnZ6dnO1QM0VzexKlXubMo4FCxLb4bGGAU51LHdcMfZxFkJQRZYr0VE6xFGB7Kpc8NKm8oz5p/9017hMVXqnAFPNyQ0zlOCGtSn5SrZEwFoWi1DEWddm1Qa251ScTdaiUfKARB9gsjoXWWM6JnnBGsHvhHU7EMZtm4NsIlz6xKpZh3BNuuLI75CDc6r68YjHv+FyfOAK"/> <!--正式-->
<add name="ConnString2" connectionString="waSaLjFS1MAAoSe9+gKWJQ1CDnZ6dnO1QM0VzexKlXubMo4FCxLb4bGGAU51LHdcMfZxFkJQRZYr0VE6xFGB7Kpc8NKm8oz5p/9017hMVXqnAFPNyQ0zlOCGtSn5SrZEwFoWi1DEWddm1Qa251ScTdaiUfKARB9gsjoXWWM6JnnBGsHvhHU7EMZtm4NsIlz6ARKPn6RYCp2Zza8Ht7FTpX+ivahgu7qH"/> <add name="ConnString" connectionString="waSaLjFS1MAAoSe9+gKWJQ1CDnZ6dnO1QM0VzexKlXubMo4FCxLb4bGGAU51LHdcMfZxFkJQRZYr0VE6xFGB7Kpc8NKm8oz5p/9017hMVXqnAFPNyQ0zlOCGtSn5SrZEwFoWi1DEWddm1Qa251ScTdaiUfKARB9gsjoXWWM6JnnBGsHvhHU7EMZtm4NsIlz6xKpZh3BNuuLI75CDc6r68YjHv+FyfOAK" />
</connectionStrings> <add name="ConnString2" connectionString="waSaLjFS1MAAoSe9+gKWJQ1CDnZ6dnO1QM0VzexKlXubMo4FCxLb4bGGAU51LHdcMfZxFkJQRZYr0VE6xFGB7Kpc8NKm8oz5p/9017hMVXqnAFPNyQ0zlOCGtSn5SrZEwFoWi1DEWddm1Qa251ScTdaiUfKARB9gsjoXWWM6JnnBGsHvhHU7EMZtm4NsIlz6ARKPn6RYCp2Zza8Ht7FTpX+ivahgu7qH" />
<appSettings> </connectionStrings>
<add key="vs:EnableBrowserLink" value="false"/> <appSettings>
<add key="upPath" value="G:\_YangCai\upload"/> <add key="vs:EnableBrowserLink" value="false" />
<add key="curPath" value="G:\_YangCai\upload"/> <add key="upPath" value="G:\_YangCai\upload" />
<add key="copyPath" value="G:\fireant\ecomerp\document\copy"/> <add key="curPath" value="G:\_YangCai\upload" />
<add key="dPath" value="D:\fireant\ecomerp\document"/> <add key="copyPath" value="G:\fireant\ecomerp\document\copy" />
<add key="OriSiteUrl" value="http://localhost:911/Handler/sync.ashx?t=file_downback"/> <add key="dPath" value="G:\_YangCai\upload" />
</appSettings> <add key="OriSiteUrl" value="http://localhost:911/Handler/sync.ashx?t=file_downback" />
<!--activerecord的配置--> </appSettings>
<activerecord> <!--activerecord的配置-->
<config> <activerecord>
<add key="hibernate.connection.driver_class" value="NHibernate.Driver.SqlClientDriver"/> <config>
<add key="hibernate.dialect" value="NHibernate.Dialect.MsSql2000Dialect"/> <add key="hibernate.connection.driver_class" value="NHibernate.Driver.SqlClientDriver" />
<add key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider"/> <add key="hibernate.dialect" value="NHibernate.Dialect.MsSql2000Dialect" />
<add key="hibernate.connection.connection_string" value="ConnectionString = ${ConnString}"/> <add key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider" />
</config> <add key="hibernate.connection.connection_string" value="ConnectionString = ${ConnString}" />
</activerecord> </config>
<location> </activerecord>
<system.web> <location>
<!-- <compilation targetFramework="2.0" debug="true"/> <system.web>
<!-- <compilation targetFramework="2.0" debug="true"/>
<trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true"/> <trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true"/>
--> -->
<!-- <!--
The <authentication> section enables configuration The <authentication> section enables configuration
of the security authentication mode used by of the security authentication mode used by
ASP.NET to identify an incoming user. ASP.NET to identify an incoming user.
--> -->
<authentication mode="Windows"/> <authentication mode="Windows" />
<!-- <!--
The <customErrors> section enables configuration The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs of what to do if/when an unhandled error occurs
during the execution of a request. Specifically, during the execution of a request. Specifically,
it enables developers to configure html error pages it enables developers to configure html error pages
to be displayed in place of a error stack trace. to be displayed in place of a error stack trace.
--> -->
<customErrors mode="RemoteOnly" defaultRedirect="ErrorPage.htm"> <customErrors mode="RemoteOnly" defaultRedirect="ErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm"/> <error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm"/> <error statusCode="404" redirect="FileNotFound.htm" />
</customErrors> </customErrors>
<!-- <!--
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"> <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
<controls> <controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
@@ -59,79 +60,91 @@
</controls> </controls>
</pages> </pages>
--> -->
<httpHandlers> <httpHandlers>
<remove verb="*" path="*.asmx"/> <remove verb="*" path="*.asmx" />
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</httpHandlers> </httpHandlers>
<httpModules> <httpModules>
<!--<remove name="Session" />--> <!--<remove name="Session" />-->
<remove name="WindowsAuthentication"/> <remove name="WindowsAuthentication" />
<remove name="PassportAuthentication"/> <remove name="PassportAuthentication" />
<remove name="AnonymousIdentification"/> <remove name="AnonymousIdentification" />
<remove name="UrlAuthorization"/> <remove name="UrlAuthorization" />
<remove name="FileAuthorization"/> <remove name="FileAuthorization" />
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</httpModules> </httpModules>
<httpRuntime requestValidationMode="2.0" maxRequestLength="73400000" executionTimeout="300" appRequestQueueLimit="100"/> <httpRuntime requestValidationMode="2.0" maxRequestLength="73400000" executionTimeout="300" appRequestQueueLimit="100" />
<!--<identity impersonate="true" userName="xjh_develop" password="123123"/>--> <!--<identity impersonate="true" userName="xjh_develop" password="123123"/>-->
</system.web> </system.web>
</location> </location>
<!-- <!--
The system.webServer section is required for running ASP.NET AJAX under Internet The system.webServer section is required for running ASP.NET AJAX under Internet
Information Services 7.0. It is not necessary for previous version of IIS. Information Services 7.0. It is not necessary for previous version of IIS.
--> -->
<location> <location>
<system.webServer> <system.webServer>
<validation validateIntegratedModeConfiguration="false"/> <validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="false"> <modules runAllManagedModulesForAllRequests="false">
<remove name="ScriptModule"/> <remove name="ScriptModule" />
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</modules> </modules>
<handlers> <handlers>
<remove name="HttpHandler-32"/> <remove name="HttpHandler-32" />
<remove name="HttpHandler"/> <remove name="HttpHandler" />
<remove name="WebServiceHandlerFactory-Integrated"/> <remove name="WebServiceHandlerFactory-Integrated" />
<remove name="ScriptHandlerFactory"/> <remove name="ScriptHandlerFactory" />
<remove name="ScriptHandlerFactoryAppServices"/> <remove name="ScriptHandlerFactoryAppServices" />
<remove name="ScriptResource"/> <remove name="ScriptResource" />
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> <add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</handlers> </handlers>
<defaultDocument> <defaultDocument>
<files> <files>
<clear/> <clear />
<add value="index.html"/> <add value="index.html" />
<add value="index.aspx"/> <add value="index.aspx" />
<add value="/"/> <add value="/" />
<add value="default.aspx"/> <add value="default.aspx" />
</files> </files>
</defaultDocument> </defaultDocument>
<httpProtocol allowKeepAlive="true"> <httpProtocol allowKeepAlive="true">
<customHeaders> <customHeaders>
<add name="Access-Control-Allow-Origin" value="*"/> <add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Headers" value="*"/> <add name="Access-Control-Allow-Headers" value="*" />
<add name="Access-Control-Allow-Methods" value="GET,POST,OPTIONS"/> <add name="Access-Control-Allow-Methods" value="GET,POST,OPTIONS" />
</customHeaders> </customHeaders>
</httpProtocol> </httpProtocol>
<security> <security>
<requestFiltering> <requestFiltering>
<requestLimits maxAllowedContentLength="419430400"/> <requestLimits maxAllowedContentLength="419430400" />
</requestFiltering> </requestFiltering>
</security> </security>
</system.webServer> </system.webServer>
</location> </location>
<runtime> <runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/> <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.5.0.0" newVersion="4.5.0.0"/> <bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
</dependentAssembly> </dependentAssembly>
</assemblyBinding> <dependentAssembly>
</runtime> <assemblyIdentity name="HtmlAgilityPack" publicKeyToken="bd319b19eaf3b43a" culture="neutral" />
<!-- <bindingRedirect oldVersion="0.0.0.0-1.11.2.0" newVersion="1.11.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="NPOI" publicKeyToken="0df73ec7942b34e1" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.1.0" newVersion="2.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="NPOI.OOXML" publicKeyToken="0df73ec7942b34e1" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.1.0" newVersion="2.0.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<!--
有关 web.config 更改的说明,请参见 http://go.microsoft.com/fwlink/?LinkId=235367。 有关 web.config 更改的说明,请参见 http://go.microsoft.com/fwlink/?LinkId=235367。
可在 <httpRuntime> 标记上设置以下特性。 可在 <httpRuntime> 标记上设置以下特性。
@@ -139,8 +152,22 @@
<httpRuntime targetFramework="4.8.1" /> <httpRuntime targetFramework="4.8.1" />
</system.Web> </system.Web>
--> -->
<system.web> <system.web>
<compilation targetFramework="4.8.1" debug="true"/> <compilation targetFramework="4.8.1" debug="true">
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/> <assemblies>
</system.web> <add assembly="System.ComponentModel.Composition, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Net.Http, Version=4.2.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Data.OracleClient, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Net, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.ServiceProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" />
</assemblies>
</compilation>
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
<controls>
<add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />
</controls>
</pages>
</system.web>
</configuration> </configuration>
+20 -8
View File
@@ -54,7 +54,7 @@ public partial class copydownload : System.Web.UI.Page
} }
tids = string.Join(",", tLst.ToArray()); tids = string.Join(",", tLst.ToArray());
StringBuilder sql = new StringBuilder(); StringBuilder sql = new StringBuilder();
sql.AppendFormat("select ctid,seller_memo,FinishDesignTime,OrderState,SupplierName from view_erptradecell where orderstate=5 and ctid in ({0})", tids); sql.AppendFormat("select ctid,seller_memo,FinishDesignTime,OrderState,SupplierName,OrderSn,tid from view_erptradecell where orderstate=5 and ctid in ({0})", tids);
DataTable dt = CeErpTradeCell.ExecuteDataset(sql.ToString()).Tables[0]; DataTable dt = CeErpTradeCell.ExecuteDataset(sql.ToString()).Tables[0];
if (dt == null || dt.Rows.Count < 1) if (dt == null || dt.Rows.Count < 1)
{ {
@@ -81,12 +81,23 @@ public partial class copydownload : System.Web.UI.Page
dTime = getDesignTimeWithDay(dr["FinishDesignTime"]);//这个时间以后得按天分文件夹 dTime = getDesignTimeWithDay(dr["FinishDesignTime"]);//这个时间以后得按天分文件夹
} }
else else
dTime = getDesignTime(dr["FinishDesignTime"]);//上传原来按月分文件夹 {
dTime = getDesignTime(dr["FinishDesignTime"]);//上传原来按月分文件夹
}
string tid = dr["tid"].ToString();
string orderSn = dr["OrderSn"].ToString();
string rname = "";
df_name = upPath + "\\" + dTime + "\\" + formatMemo(dr["seller_memo"]); df_name = upPath + "\\" + dTime + "\\" + formatMemo(dr["seller_memo"]);
foreach (string ext in extArr) foreach (string ext in extArr)
{ {
if (!string.IsNullOrEmpty(tid) && !string.IsNullOrEmpty(orderSn))
{
rname = formatMemo(dr["seller_memo"]).Replace(orderSn, tid);
rname = rname + "《" + orderSn + "》";
}
fname = df_name + ext; fname = df_name + ext;
rname = rname + ext;
if (!hasFile) if (!hasFile)
{ {
if (File.Exists(fname)) if (File.Exists(fname))
@@ -103,7 +114,7 @@ public partial class copydownload : System.Web.UI.Page
} }
hasFile = true; hasFile = true;
files.Add(fname); files.Add(fname);
copyFile(getDesignDate(dr["FinishDesignTime"]), dr["SupplierName"].ToString(), fname, payment); copyFile(getDesignDate(dr["FinishDesignTime"]), dr["SupplierName"].ToString(), fname, payment, rname);
fc++; fc++;
} }
catch (Exception ex) catch (Exception ex)
@@ -264,7 +275,7 @@ public partial class copydownload : System.Web.UI.Page
{ "素芸", "棉卡" }, { "素芸", "棉卡" },
{ "玉蕊", "蛋壳" } { "玉蕊", "蛋壳" }
}; };
private void copyFile(string date, string supplier, string file, double payment) private void copyFile(string date, string supplier, string file, double payment, string rname)
{ {
string SupName = supplier; string SupName = supplier;
@@ -277,12 +288,13 @@ public partial class copydownload : System.Web.UI.Page
string fname = Path.GetFileName(file); string fname = Path.GetFileName(file);
foreach (var rule in replaceRules) foreach (var rule in replaceRules)
{ {
fname = fname.Replace(rule.Key, rule.Value); rname = rname.Replace(rule.Key, rule.Value);
} }
File.Copy(file, path + "\\" + fname, true);
if (!File.Exists(path + "\\" + fname)) File.Copy(file, path + "\\" + rname, true);
if (!File.Exists(path + "\\" + rname))
{ {
File.Copy(file, path + "\\" + fname, true); File.Copy(file, path + "\\" + rname, true);
} }
+23
View File
@@ -1,7 +1,30 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="7z.Libs" version="21.7.0" targetFramework="net48" /> <package id="7z.Libs" version="21.7.0" targetFramework="net48" />
<package id="AjaxControlToolkit" version="18.1.1" targetFramework="net481" />
<package id="Aliyun.OSS.SDK.NetCore" version="2.14.1" targetFramework="net481" />
<package id="HtmlAgilityPack" version="1.11.2" targetFramework="net481" />
<package id="Microsoft.CSharp" version="4.5.0" targetFramework="net481" />
<package id="Microsoft.Extensions.DependencyInjection" version="2.2.0" targetFramework="net481" />
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="2.2.0" targetFramework="net481" />
<package id="Microsoft.NETCore.Platforms" version="2.1.0" targetFramework="net481" />
<package id="MSharp.Framework" version="4.0.201" targetFramework="net481" />
<package id="MSharp.Framework.Core" version="4.0.106" targetFramework="net481" />
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net481" />
<package id="Squid-Box.SevenZipSharp.Lite" version="1.5.0.366" targetFramework="net48" /> <package id="Squid-Box.SevenZipSharp.Lite" version="1.5.0.366" targetFramework="net48" />
<package id="System.Configuration.ConfigurationManager" version="4.5.0" targetFramework="net481" />
<package id="System.Data.SqlClient" version="4.6.1" targetFramework="net481" />
<package id="System.Drawing.Common" version="4.5.1" targetFramework="net481" />
<package id="System.IO" version="4.3.0" targetFramework="net481" />
<package id="System.Net.Http" version="4.3.4" targetFramework="net481" />
<package id="System.Runtime" version="4.3.0" targetFramework="net481" />
<package id="System.Security.AccessControl" version="4.5.0" targetFramework="net481" />
<package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net481" />
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net481" />
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net481" />
<package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net481" />
<package id="System.Security.Permissions" version="4.5.0" targetFramework="net481" />
<package id="System.Security.Principal.Windows" version="4.5.0" targetFramework="net481" />
<package id="WindowsAPICodePack-Core" version="1.1.1" targetFramework="net481" /> <package id="WindowsAPICodePack-Core" version="1.1.1" targetFramework="net481" />
<package id="WindowsAPICodePack-Shell" version="1.1.1" targetFramework="net481" /> <package id="WindowsAPICodePack-Shell" version="1.1.1" targetFramework="net481" />
</packages> </packages>
+1
View File
@@ -0,0 +1 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="supplierBuildFile.aspx.cs" Inherits="supplierBuildFile" %>
+343
View File
@@ -0,0 +1,343 @@
using Aliyun.OSS;
using Aliyun.OSS.Common;
using BizCom;
using ICSharpCode.SharpZipLib.Zip;
using NPOI.OpenXmlFormats.Dml.Diagram;
using NPOI.OpenXmlFormats.Shared;
using SiteCore.Handler;
using SiteCore.Redis;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using System.Runtime.InteropServices;
using System.Security.Principal;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Web;
using System.Web.Services.Description;
using System.Web.UI;
public partial class supplierBuildFile : System.Web.UI.Page
{
public static string upPath = ConfigurationManager.AppSettings["upPath"];
public static string copyPath = ConfigurationManager.AppSettings["copyPath"];
public static string siteUrl = ConfigurationManager.AppSettings["OriSiteUrl"];
[DllImport("DrvInterface64.dll", CharSet = CharSet.Unicode)]
public static extern uint DecFile(string filename);
[DllImport("DrvInterface64.dll", CharSet = CharSet.Unicode)]
public static extern int IsFileEncrypted(string filename);//返回1为加密,0为未被加密
[DllImport("DrvInterface64.dll", CharSet = CharSet.Ansi)]
public static extern void CreateUserKey(StringBuilder key, int len);
[DllImport("DrvInterface64.dll", CharSet = CharSet.Ansi)]
public static extern int InitAesKey(StringBuilder key, int len);
[DllImport("DrvInterface64.dll")]
public static extern int IsInitedAesKey();
private void conErc(string msg)
{
XLog.SaveLog(0, msg);
Response.Write(msg);
//Response.StatusCode = (int)HttpStatusCode.NotFound;
//Response.End();
}
private void conSuc(string msg)
{
Response.Write("{\"type\":\"success\",\"result\":\"" + msg + "\"}");
//Response.End();
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Response.Buffer = true;
downloadMore();
}
}
private string getCanDownFile(string fileName)
{
string[] extArr = new string[] { ".cdr", ".zip", ".rar", ".pdf" };
foreach (string ext in extArr)
{
string fname = fileName + ext;
if (File.Exists(fname))
{
return fname;
}
}
return "";
}
static bool running = false;
private void downloadMore()
{
if (running)
{
conSuc("运行中!");
return;
}
running = true;
var identity = WindowsIdentity.GetCurrent();
var principal = new WindowsPrincipal(identity);
Task.Run(async () =>
{
try
{
using (identity.Impersonate())
{
MemoryStream ms = new MemoryStream();
byte[] buffer = null;
List<string> addFiles = new List<string>();
List<string> addCtid = new List<string>();
using (ZipFile file = ZipFile.Create(ms))
{
}
}
running = false;
}
catch (Exception ex)
{
running = false;
}
});
conSuc("运行结束!");
//FileOssUp();
}
private string formatMemo(object memo)
{
string m = memo.ToString();
m = m.Replace("\\", "").Replace("/", "").Replace(":", "").Replace("*", "").Replace("?", "").Replace("<", "").Replace(">", "").Replace("|", "");
return m;
}
private void copyFile(string date, string supplier, string file)
{
string path = copyPath + "\\" + date + "\\" + supplier + "\\" + "车间下载";
if (!Directory.Exists(path)) Directory.CreateDirectory(path);
string fname = Path.GetFileName(file);
File.Copy(file, path + "\\" + fname, true);
if (!File.Exists(path + "\\" + fname))
{
File.Copy(file, path + "\\" + fname, true);
}
}
private string getDesignTime(object v)
{
if (v.ToString() == "") return "";
return Convert.ToDateTime(v).ToString("yyyyMMdd");
}
private string getDesignDate(object v)
{
return DateTime.Now.ToString("yyyy-MM-dd");
/*if (v.ToString() == "") return "";
return Convert.ToDateTime(v).ToString("yyyy-MM-dd");*/
}
private void FileOssUp()
{
// yourEndpoint填写Bucket所在地域对应的Endpoint。以华东1(杭州)为例,Endpoint填写为https://oss-cn-hangzhou.aliyuncs.com。
var endpoint = "https://oss-cn-fuzhou.aliyuncs.com";
// 从环境变量中获取访问凭证。运行本代码示例之前,请确保已设置环境变量OSS_ACCESS_KEY_ID和OSS_ACCESS_KEY_SECRET。
var accessKeyId = "LTAI5tE7wuNkeT9jZ42bQnyr";
var accessKeySecret = "NnutvWhKl4HbQFSad3HosYbCkEkbjN";
// 填写Bucket名称,例如examplebucket。
var bucketName = "dfdiyfile";
// 填写Object完整路径,完整路径中不能包含Bucket名称,例如exampledir/exampleobject.txt。
var objectName = "supplierFile/test.zip";
// 填写Bucket所在地域对应的Region。以华东1(杭州)为例,Region填写为cn-hangzhou。
string region = "cn-fuzhou";
// 创建ClientConfiguration实例,按照您的需要修改默认参数。
var conf = new ClientConfiguration();
// 设置v4签名。
conf.SignatureVersion = SignatureVersion.V4;
// 创建OssClient实例。
var client = new OssClient(endpoint, accessKeyId, accessKeySecret, conf);
client.SetRegion(region);
try
{
MemoryStream ms = new MemoryStream();
byte[] buffer = null;
using (ZipFile file = ZipFile.Create(ms))
{
file.BeginUpdate();
//file.NameTransform = new ZipNameTransform();
file.NameTransform = new MyNameTransfom();
file.Add("C:\\Users\\231010\\Downloads\\setup.exe");
file.CommitUpdate();
buffer = new byte[ms.Length];
ms.Position = 0;
ms.Read(buffer, 0, buffer.Length); //读取文件内容(1次读ms.Length/1024M)
ms.Flush();
ms.Close();
}
MemoryStream requestContent = new MemoryStream(buffer);
// 上传文件。
client.PutObject(bucketName, objectName, requestContent);
Debug.WriteLine("Put object succeeded");
}
catch (Exception ex)
{
Debug.WriteLine("Put object failed" + ex.Message);
}
conSuc("上传成功!");
return;
}
/// 批量进行多个文件压缩到一个文件
/// </summary>
/// <param name="files">文件列表(绝对路径)</param> 这里用的数组,你可以用list 等或者
/// <param name="zipFileName">生成的zip文件名称</param>
private void ZipFileDownload(int userId, List<string> ctidLst, List<string> files, string zipFileName, int onlyDownFile, int isFromClient)
{
// yourEndpoint填写Bucket所在地域对应的Endpoint。以华东1(杭州)为例,Endpoint填写为https://oss-cn-hangzhou.aliyuncs.com。
var endpoint = "https://oss-cn-fuzhou.aliyuncs.com";
// 从环境变量中获取访问凭证。运行本代码示例之前,请确保已设置环境变量OSS_ACCESS_KEY_ID和OSS_ACCESS_KEY_SECRET。
var accessKeyId = "LTAI5tE7wuNkeT9jZ42bQnyr";
var accessKeySecret = "NnutvWhKl4HbQFSad3HosYbCkEkbjN";
// 填写Bucket名称,例如examplebucket。
var bucketName = "dfdiyfile";
// 填写Object完整路径,完整路径中不能包含Bucket名称,例如exampledir/exampleobject.txt。
var objectName = "exampledir/exampleobject.txt";
// 填写字符串。
var objectContent = "More than just cloud.";
// 填写Bucket所在地域对应的Region。以华东1(杭州)为例,Region填写为cn-hangzhou。
const string region = "oss-cn-fuzhou";
// 创建ClientConfiguration实例,按照您的需要修改默认参数。
var conf = new ClientConfiguration();
// 设置v4签名。
conf.SignatureVersion = SignatureVersion.V4;
// 创建OssClient实例。
var client = new OssClient(endpoint, accessKeyId, accessKeySecret, conf);
client.SetRegion(region);
try
{
MemoryStream ms = new MemoryStream();
byte[] buffer = null;
using (ZipFile file = ZipFile.Create(ms))
{
file.BeginUpdate();
//file.NameTransform = new ZipNameTransform();
file.NameTransform = new MyNameTransfom();
file.Add("C:\\Users\\231010\\Downloads\\setup.exe");
file.CommitUpdate();
buffer = new byte[ms.Length];
ms.Position = 0;
ms.Read(buffer, 0, buffer.Length); //读取文件内容(1次读ms.Length/1024M)
ms.Flush();
ms.Close();
}
MemoryStream requestContent = new MemoryStream(buffer);
// 上传文件。
client.PutObject(bucketName, objectName, requestContent);
Console.WriteLine("Put object succeeded");
}
catch (Exception ex)
{
Console.WriteLine("Put object failed, {0}", ex.Message);
}
conSuc("上传成功!");
return;
//for (int i = 0; i < addFiles.Count; i++)
//{
// updateIsDownSuccess(userId, addCtid[i]);
//}
//StringBuilder sql = new StringBuilder();
//string tids = string.Join(",", addCtid);
//sql.AppendFormat("update CE_ErpTradeCell set OrderState = 6 where ctid in ({0}) ;", ("'" + tids.Replace(",", "','") + "'"));
//CeErpTradeCell.ExecuteNonQuery(sql.ToString());
//sql = new StringBuilder();
//sql.AppendFormat("insert into CE_ErpTradeLog(tid,orderstate,userid,operatetime,con) select ctid,{1},{2},getdate(),'{3}' from ce_erptradecell where ctid in ({0}) ;", ("'" + tids.Replace(",", "','") + "'"), (int)OrderState.下单完成, userId, "下载设计文件");
//CeErpTradeCell.ExecuteNonQuery(sql.ToString());
}
//public static object downfileObj = new object();
private void downLoadFile(int userId, string ctid, string file, int onlyDownFile, int isFromClient)
{
string filePath = file;
string dfile = Path.GetFileName(file);
FileStream fs = new FileStream(filePath, FileMode.Open);
byte[] bytes = new byte[(int)fs.Length];
fs.Read(bytes, 0, bytes.Length);
fs.Close();
Response.Clear();
//
Response.ClearContent();
Response.ClearHeaders();
Response.ContentType = "application/octet-stream";
//通知浏览器下载文件而不是打开\\fileDownload=true; path=/
Response.AddHeader("Set-Cookie", "fileDownload=true; path=/;");
//Response.AddHeader("Cache-Control", "no-cache, no-store, must-revalidate");
Response.AddHeader("Content-Disposition", "attachment; filename=" + HttpUtility.UrlEncode(dfile, System.Text.Encoding.UTF8));
Response.AddHeader("Content-Length", bytes.Length.ToString());
Response.AddHeader("Access-Control-Expose-Headers", "Content-Disposition");
Response.BinaryWrite(bytes);
Response.Flush();
//updateIsDownSuccess(userId, ctid);
//StringBuilder sql = new StringBuilder();
//string tids = string.Join(",", ctid);
//sql.AppendFormat("update CE_ErpTradeCell set OrderState = 6 where ctid in ({0}) ;", ("'" + tids.Replace(",", "','") + "'"));
//CeErpTradeCell.ExecuteNonQuery(sql.ToString());
//sql = new StringBuilder();
//sql.AppendFormat("insert into CE_ErpTradeLog(tid,orderstate,userid,operatetime,con) select ctid,{1},{2},getdate(),'{3}' from ce_erptradecell where ctid in ({0}) ;", ("'" + tids.Replace(",", "','") + "'"), (int)OrderState.下单完成, userId, "下载设计文件");
//CeErpTradeCell.ExecuteNonQuery(sql.ToString());
}
public static void addLog(string ctid, int userid, string con, int orderState = 0, int aftersaleState = 0)
{
CeErpTradeLog log = new CeErpTradeLog();
log.tid = ctid;
log.UserId = userid;
log.Con = con;
log.OrderState = orderState;
log.AfterSaleState = aftersaleState;
log.OperateTime = DateTime.Now;
log.Create();
}
}
+59 -26
View File
@@ -68,7 +68,7 @@ public partial class supplierDownload : System.Web.UI.Page
string fname = fileName + ext; string fname = fileName + ext;
if (File.Exists(fname)) if (File.Exists(fname))
{ {
return fname; return ext;
} }
} }
@@ -123,7 +123,7 @@ public partial class supplierDownload : System.Web.UI.Page
int mvClientDown = 0;//转移到客户端下载 int mvClientDown = 0;//转移到客户端下载
int isFromClient = 0; int isFromClient = 0;
if (onlyDownFile != 1) if (onlyDownFile != 1)
{ {
if (Request["supplier"] == null || Request["supplier"].ToString() != "1")//如果不是只下文件,那他就要是供应商 if (Request["supplier"] == null || Request["supplier"].ToString() != "1")//如果不是只下文件,那他就要是供应商
@@ -133,23 +133,23 @@ public partial class supplierDownload : System.Web.UI.Page
} }
else else
{ {
/* Int32.TryParse(Request["isFromClient"], out isFromClient); /* Int32.TryParse(Request["isFromClient"], out isFromClient);
if (userId > 0 && isFromClient != 1) if (userId > 0 && isFromClient != 1)
{ {
string file_client_down_flg = erpRedis.RedisHelper.StringGet("file_client_down_flg_" + userId); string file_client_down_flg = erpRedis.RedisHelper.StringGet("file_client_down_flg_" + userId);
if (file_client_down_flg != null && file_client_down_flg == "1") if (file_client_down_flg != null && file_client_down_flg == "1")
{ {
mvClientDown = 1; mvClientDown = 1;
} }
}*/ }*/
} }
} }
try try
{ {
StringBuilder sql = new StringBuilder(); StringBuilder sql = new StringBuilder();
sql.AppendFormat("select ctid,seller_memo,FinishDesignTime,OrderState,SupplierName,FileMd5 from view_erptradecell where FinishDesignTime is not null and ctid in ({0}) {1}", ("'" + tids.Replace(",", "','") + "'"), ((onlyDownFile == 1 || isFromClient == 1) ? "" : " and OrderState=5 ")); sql.AppendFormat("select ctid,seller_memo,FinishDesignTime,OrderState,SupplierName,FileMd5,OrderSn,tid from view_erptradecell where FinishDesignTime is not null and ctid in ({0}) {1}", ("'" + tids.Replace(",", "','") + "'"), ((onlyDownFile == 1 || isFromClient == 1) ? "" : " and OrderState=5 "));
DataTable dt = CeErpTradeCell.ExecuteDataset(sql.ToString()).Tables[0]; DataTable dt = CeErpTradeCell.ExecuteDataset(sql.ToString()).Tables[0];
if (dt == null || dt.Rows.Count < 1) if (dt == null || dt.Rows.Count < 1)
{ {
@@ -160,12 +160,23 @@ public partial class supplierDownload : System.Web.UI.Page
List<string> files = new List<string>(); List<string> files = new List<string>();
List<string> noFileLst = new List<string>(); List<string> noFileLst = new List<string>();
List<string> ctidLst = new List<string>(); List<string> ctidLst = new List<string>();
List<string> rnameList = new List<string>();
foreach (DataRow dr in dt.Rows) foreach (DataRow dr in dt.Rows)
{ {
string finishDesignTime = getDesignTime(dr["FinishDesignTime"]); string finishDesignTime = getDesignTime(dr["FinishDesignTime"]);
string ctid = dr["ctid"].ToString(); string ctid = dr["ctid"].ToString();
string df_name = upPath + "\\" + finishDesignTime + "\\" + formatMemo(dr["seller_memo"]); string df_name = upPath + "\\" + finishDesignTime + "\\" + formatMemo(dr["seller_memo"]);
string fname = getCanDownFile(df_name); string ext = getCanDownFile(df_name);
string fname = df_name + ext;
string tid = dr["tid"].ToString();
string orderSn = dr["OrderSn"].ToString();
string rname = "";
if (!string.IsNullOrEmpty(tid) && !string.IsNullOrEmpty(orderSn))
{
rname = formatMemo(dr["seller_memo"]).Replace(orderSn, tid);
rname = rname + "《" + orderSn + "》";
rname = rname + ext;
}
int IsFileEncrypt = IsFileEncrypted(fname); int IsFileEncrypt = IsFileEncrypted(fname);
if (IsFileEncrypt == 1 && File.Exists(fname)) if (IsFileEncrypt == 1 && File.Exists(fname))
{ {
@@ -200,11 +211,14 @@ public partial class supplierDownload : System.Web.UI.Page
files.Add(fname); files.Add(fname);
ctidLst.Add(ctid); ctidLst.Add(ctid);
rnameList.Add(rname);
fileMd5 += "," + dr["FileMd5"].ToString(); fileMd5 += "," + dr["FileMd5"].ToString();
fileNames += "#$#" + Path.GetFileName(fname); fileNames += "#$#" + Path.GetFileName(fname);
if (onlyDownFile != 1 && mvClientDown != 1) if (onlyDownFile != 1 && mvClientDown != 1)
copyFile(getDesignDate(dr["FinishDesignTime"]), dr["SupplierName"].ToString(), fname); {
copyFile(getDesignDate(dr["FinishDesignTime"]), dr["SupplierName"].ToString(), fname, rname);
}
} }
if (files.Count == 0) if (files.Count == 0)
@@ -243,11 +257,11 @@ public partial class supplierDownload : System.Web.UI.Page
if (files.Count == 1) if (files.Count == 1)
{ {
downLoadFile(userId, ctidLst[0], files[0], onlyDownFile, isFromClient); downLoadFile(userId, ctidLst[0], files[0], onlyDownFile, isFromClient, rnameList[0]);
} }
else else
{ {
ZipFileDownload(userId, ctidLst, files, "LT_" + DateTime.Now.ToString("yyyyMMddhhMmss") + ".zip", onlyDownFile, isFromClient); //downLoadFile(userId, ctidLst[i], files[i]); ZipFileDownload(userId, ctidLst, files, "LT_" + DateTime.Now.ToString("yyyyMMddhhMmss") + ".zip", onlyDownFile, isFromClient, rnameList); //downLoadFile(userId, ctidLst[i], files[i]);
} }
//conSuc("文件已下载完成"); //conSuc("文件已下载完成");
@@ -269,16 +283,35 @@ public partial class supplierDownload : System.Web.UI.Page
m = m.Replace("\\", "").Replace("/", "").Replace(":", "").Replace("*", "").Replace("?", "").Replace("<", "").Replace(">", "").Replace("|", ""); m = m.Replace("\\", "").Replace("/", "").Replace(":", "").Replace("*", "").Replace("?", "").Replace("<", "").Replace(">", "").Replace("|", "");
return m; return m;
} }
Dictionary<string, string> replaceRules = new Dictionary<string, string>
private void copyFile(string date, string supplier, string file) {
{ "皙贝", "白卡" },
{ "睿狐", "莱尼" },
{ "岚蝶", "安格" },
{ "琮纹", "刚古" },
{ "珠光", "珠光" },
{ "溪雪", "珠光" },
{ "雅柔", "雅柔" },
{ "萱姿", "雅柔" },
{ "草香", "草香" },
{ "芳怡", "草香" },
{ "金绒", "牛皮" },
{ "素芸", "棉卡" },
{ "玉蕊", "蛋壳" }
};
private void copyFile(string date, string supplier, string file, string rname)
{ {
string path = copyPath + "\\" + date + "\\" + supplier + "\\" + "车间下载"; string path = copyPath + "\\" + date + "\\" + supplier + "\\" + "车间下载";
if (!Directory.Exists(path)) Directory.CreateDirectory(path); if (!Directory.Exists(path)) Directory.CreateDirectory(path);
string fname = Path.GetFileName(file); foreach (var rule in replaceRules)
File.Copy(file, path + "\\" + fname, true);
if (!File.Exists(path + "\\" + fname))
{ {
File.Copy(file, path + "\\" + fname, true); rname = rname.Replace(rule.Key, rule.Value);
}
File.Copy(file, path + "\\" + rname, true);
if (!File.Exists(path + "\\" + rname))
{
File.Copy(file, path + "\\" + rname, true);
} }
} }
@@ -299,7 +332,7 @@ public partial class supplierDownload : System.Web.UI.Page
/// </summary> /// </summary>
/// <param name="files">文件列表(绝对路径)</param> 这里用的数组,你可以用list 等或者 /// <param name="files">文件列表(绝对路径)</param> 这里用的数组,你可以用list 等或者
/// <param name="zipFileName">生成的zip文件名称</param> /// <param name="zipFileName">生成的zip文件名称</param>
private void ZipFileDownload(int userId, List<string> ctidLst, List<string> files, string zipFileName, int onlyDownFile, int isFromClient) private void ZipFileDownload(int userId, List<string> ctidLst, List<string> files, string zipFileName, int onlyDownFile, int isFromClient, List<string> rnameList)
{ {
MemoryStream ms = new MemoryStream(); MemoryStream ms = new MemoryStream();
byte[] buffer = null; byte[] buffer = null;
@@ -317,7 +350,7 @@ public partial class supplierDownload : System.Web.UI.Page
{ {
try try
{ {
file.Add(files[i]); file.Add(files[i], rnameList[i]);
addFiles.Add(files[i]); addFiles.Add(files[i]);
addCtid.Add(ctidLst[i]); addCtid.Add(ctidLst[i]);
} }
@@ -360,7 +393,7 @@ public partial class supplierDownload : System.Web.UI.Page
} }
//public static object downfileObj = new object(); //public static object downfileObj = new object();
private void downLoadFile(int userId, string ctid, string file, int onlyDownFile, int isFromClient) private void downLoadFile(int userId, string ctid, string file, int onlyDownFile, int isFromClient, string fname)
{ {
string filePath = file; string filePath = file;
string dfile = Path.GetFileName(file); string dfile = Path.GetFileName(file);
@@ -380,7 +413,7 @@ public partial class supplierDownload : System.Web.UI.Page
//通知浏览器下载文件而不是打开\\fileDownload=true; path=/ //通知浏览器下载文件而不是打开\\fileDownload=true; path=/
Response.AddHeader("Set-Cookie", "fileDownload=true; path=/;"); Response.AddHeader("Set-Cookie", "fileDownload=true; path=/;");
//Response.AddHeader("Cache-Control", "no-cache, no-store, must-revalidate"); //Response.AddHeader("Cache-Control", "no-cache, no-store, must-revalidate");
Response.AddHeader("Content-Disposition", "attachment; filename=" + HttpUtility.UrlEncode(dfile, System.Text.Encoding.UTF8)); Response.AddHeader("Content-Disposition", "attachment; filename=" + HttpUtility.UrlEncode(fname, System.Text.Encoding.UTF8));
Response.AddHeader("Content-Length", bytes.Length.ToString()); Response.AddHeader("Content-Length", bytes.Length.ToString());
Response.AddHeader("Access-Control-Expose-Headers", "Content-Disposition"); Response.AddHeader("Access-Control-Expose-Headers", "Content-Disposition");
Response.BinaryWrite(bytes); Response.BinaryWrite(bytes);
+29 -3
View File
@@ -217,8 +217,14 @@ public partial class uploadFile : System.Web.UI.Page
entity.FinishDesignTime = DateTime.Now; entity.FinishDesignTime = DateTime.Now;
if (entity.isDianziOrder == 1 || entity.ProductId == 57 || entity.ProductId == 28) if (entity.isDianziOrder == 1 || entity.ProductId == 57 || entity.ProductId == 28)
{ {
entity.OrderState = 7; entity.OrderState = 6;
commonHelper.setOrderDummyDelivery(entity.tid); entity.SupplierId = 35;
entity.FinishPlaceTime = DateTime.Now;
bool sendResult = commonHelper.SetOrderDummyDelivery(entity.tid);
if (sendResult)
{
entity.OrderState = 7;
}
} }
else else
entity.OrderState = 5; //设计完成 entity.OrderState = 5; //设计完成
@@ -264,7 +270,7 @@ public partial class uploadFile : System.Web.UI.Page
entity.FinishPlaceTime = DateTime.Now; entity.FinishPlaceTime = DateTime.Now;
} }
} }
if (((entity.seller_memo.Contains("条幅彩色") && !entity.seller_memo.Contains("辽宁") && !entity.seller_memo.Contains("山东")) || entity.seller_memo.Contains("贡锻布") || entity.seller_memo.Contains("贡缎布")) && !entity.seller_memo.Contains("双喷")) if (((entity.seller_memo.Contains("条幅彩色") && !entity.seller_memo.Contains("辽宁") && !entity.seller_memo.Contains("山东")) || entity.seller_memo.Contains("贡锻布") || entity.seller_memo.Contains("贡缎布") || entity.seller_memo.Contains("旗帜布")) && !entity.seller_memo.Contains("双喷"))
{ {
entity.IsVerifyToSupplier = true; entity.IsVerifyToSupplier = true;
entity.SupplierId = 98; entity.SupplierId = 98;
@@ -310,7 +316,27 @@ public partial class uploadFile : System.Web.UI.Page
CeErpTradeCell.UpdateRelationOrder(entity.ctid); CeErpTradeCell.UpdateRelationOrder(entity.ctid);
CeErpTradeLog.AddLog(entity.ctid, entity.OrderState, userId, "上传设计文件-" + saveFile); CeErpTradeLog.AddLog(entity.ctid, entity.OrderState, userId, "上传设计文件-" + saveFile);
if (ctid.IndexOf("S_") >= -1)
{
StringBuilder sql = new StringBuilder();
sql.AppendFormat("select * from Ce_ErpTradeCellExtend where ctid='{0}'", entity.ctid);
DataTable cellEx = CeErpTradeCell.ExecuteDataset(sql.ToString()).Tables[0];
if (cellEx.Rows.Count > 0)
{
string txtReprintTime = cellEx.Rows[0]["ReprintTime"].ToString();
if (!string.IsNullOrEmpty(txtReprintTime) && !"null".Equals(txtReprintTime))
{
DateTime reprint = DateTime.Parse(txtReprintTime);
if (DateTime.Compare(DateTime.Now.AddHours(-24), reprint) >= 0)
{
string parentId = entity.ctid.Substring(2);
string update_sql = string.Format("update Ce_ErpTradeAfterSaleExtend set ReprintOut = ReprintOut+1 where tid= '{0}' ;", parentId);
CeErpTradeLog.ExecuteNonQuery(update_sql);
}
}
}
}
if (Path.GetExtension(saveFile).IndexOf("cdr", StringComparison.OrdinalIgnoreCase) != -1) if (Path.GetExtension(saveFile).IndexOf("cdr", StringComparison.OrdinalIgnoreCase) != -1)
{ {
//string sql = string.Format("insert into s_cdrtopng(name,addtime)values('{0}',getdate()) ;", saveFile); //string sql = string.Format("insert into s_cdrtopng(name,addtime)values('{0}',getdate()) ;", saveFile);