380 changed files with 38926 additions and 0 deletions
Binary file not shown.
Binary file not shown.
@ -0,0 +1,998 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!-- |
||||
|
|
||||
|
IIS configuration sections. |
||||
|
|
||||
|
For schema documentation, see |
||||
|
%IIS_BIN%\config\schema\IIS_schema.xml. |
||||
|
|
||||
|
Please make a backup of this file before making any changes to it. |
||||
|
|
||||
|
NOTE: The following environment variables are available to be used |
||||
|
within this file and are understood by the IIS Express. |
||||
|
|
||||
|
%IIS_USER_HOME% - The IIS Express home directory for the user |
||||
|
%IIS_SITES_HOME% - The default home directory for sites |
||||
|
%IIS_BIN% - The location of the IIS Express binaries |
||||
|
%SYSTEMDRIVE% - The drive letter of %IIS_BIN% |
||||
|
|
||||
|
--> |
||||
|
<configuration> |
||||
|
<!-- |
||||
|
|
||||
|
The <configSections> section controls the registration of sections. |
||||
|
Section is the basic unit of deployment, locking, searching and |
||||
|
containment for configuration settings. |
||||
|
|
||||
|
Every section belongs to one section group. |
||||
|
A section group is a container of logically-related sections. |
||||
|
|
||||
|
Sections cannot be nested. |
||||
|
Section groups may be nested. |
||||
|
|
||||
|
<section |
||||
|
name="" [Required, Collection Key] [XML name of the section] |
||||
|
allowDefinition="Everywhere" [MachineOnly|MachineToApplication|AppHostOnly|Everywhere] [Level where it can be set] |
||||
|
overrideModeDefault="Allow" [Allow|Deny] [Default delegation mode] |
||||
|
allowLocation="true" [true|false] [Allowed in location tags] |
||||
|
/> |
||||
|
|
||||
|
The recommended way to unlock sections is by using a location tag: |
||||
|
<location path="Default Web Site" overrideMode="Allow"> |
||||
|
<system.webServer> |
||||
|
<asp /> |
||||
|
</system.webServer> |
||||
|
</location> |
||||
|
|
||||
|
--> |
||||
|
<configSections> |
||||
|
<sectionGroup name="system.applicationHost"> |
||||
|
<section name="applicationPools" allowDefinition="AppHostOnly" overrideModeDefault="Deny" /> |
||||
|
<section name="configHistory" allowDefinition="AppHostOnly" overrideModeDefault="Deny" /> |
||||
|
<section name="customMetadata" allowDefinition="AppHostOnly" overrideModeDefault="Deny" /> |
||||
|
<section name="listenerAdapters" allowDefinition="AppHostOnly" overrideModeDefault="Deny" /> |
||||
|
<section name="log" allowDefinition="AppHostOnly" overrideModeDefault="Deny" /> |
||||
|
<section name="serviceAutoStartProviders" allowDefinition="AppHostOnly" overrideModeDefault="Deny" /> |
||||
|
<section name="sites" allowDefinition="AppHostOnly" overrideModeDefault="Deny" /> |
||||
|
<section name="webLimits" allowDefinition="AppHostOnly" overrideModeDefault="Deny" /> |
||||
|
</sectionGroup> |
||||
|
<sectionGroup name="system.webServer"> |
||||
|
<section name="asp" overrideModeDefault="Deny" /> |
||||
|
<section name="caching" overrideModeDefault="Allow" /> |
||||
|
<section name="cgi" overrideModeDefault="Deny" /> |
||||
|
<section name="defaultDocument" overrideModeDefault="Allow" /> |
||||
|
<section name="directoryBrowse" overrideModeDefault="Allow" /> |
||||
|
<section name="fastCgi" allowDefinition="AppHostOnly" overrideModeDefault="Deny" /> |
||||
|
<section name="globalModules" allowDefinition="AppHostOnly" overrideModeDefault="Deny" /> |
||||
|
<section name="handlers" overrideModeDefault="Deny" /> |
||||
|
<section name="httpCompression" overrideModeDefault="Allow" allowDefinition="Everywhere" /> |
||||
|
<section name="httpErrors" overrideModeDefault="Allow" /> |
||||
|
<section name="httpLogging" overrideModeDefault="Deny" /> |
||||
|
<section name="httpProtocol" overrideModeDefault="Allow" /> |
||||
|
<section name="httpRedirect" overrideModeDefault="Allow" /> |
||||
|
<section name="httpTracing" overrideModeDefault="Deny" /> |
||||
|
<section name="isapiFilters" allowDefinition="MachineToApplication" overrideModeDefault="Deny" /> |
||||
|
<section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Deny" /> |
||||
|
<section name="applicationInitialization" allowDefinition="MachineToApplication" overrideModeDefault="Allow" /> |
||||
|
<section name="odbcLogging" overrideModeDefault="Deny" /> |
||||
|
<sectionGroup name="security"> |
||||
|
<section name="access" overrideModeDefault="Deny" /> |
||||
|
<section name="applicationDependencies" overrideModeDefault="Deny" /> |
||||
|
<sectionGroup name="authentication"> |
||||
|
<section name="anonymousAuthentication" overrideModeDefault="Deny" /> |
||||
|
<section name="basicAuthentication" overrideModeDefault="Deny" /> |
||||
|
<section name="clientCertificateMappingAuthentication" overrideModeDefault="Deny" /> |
||||
|
<section name="digestAuthentication" overrideModeDefault="Deny" /> |
||||
|
<section name="iisClientCertificateMappingAuthentication" overrideModeDefault="Deny" /> |
||||
|
<section name="windowsAuthentication" overrideModeDefault="Deny" /> |
||||
|
</sectionGroup> |
||||
|
<section name="authorization" overrideModeDefault="Allow" /> |
||||
|
<section name="ipSecurity" overrideModeDefault="Deny" /> |
||||
|
<section name="dynamicIpSecurity" overrideModeDefault="Deny" /> |
||||
|
<section name="isapiCgiRestriction" allowDefinition="AppHostOnly" overrideModeDefault="Deny" /> |
||||
|
<section name="requestFiltering" overrideModeDefault="Allow" /> |
||||
|
</sectionGroup> |
||||
|
<section name="serverRuntime" overrideModeDefault="Deny" /> |
||||
|
<section name="serverSideInclude" overrideModeDefault="Deny" /> |
||||
|
<section name="staticContent" overrideModeDefault="Allow" /> |
||||
|
<sectionGroup name="tracing"> |
||||
|
<section name="traceFailedRequests" overrideModeDefault="Allow" /> |
||||
|
<section name="traceProviderDefinitions" overrideModeDefault="Deny" /> |
||||
|
</sectionGroup> |
||||
|
<section name="urlCompression" overrideModeDefault="Allow" /> |
||||
|
<section name="validation" overrideModeDefault="Allow" /> |
||||
|
<sectionGroup name="webdav"> |
||||
|
<section name="globalSettings" overrideModeDefault="Deny" /> |
||||
|
<section name="authoring" overrideModeDefault="Deny" /> |
||||
|
<section name="authoringRules" overrideModeDefault="Deny" /> |
||||
|
</sectionGroup> |
||||
|
<sectionGroup name="rewrite"> |
||||
|
<section name="allowedServerVariables" overrideModeDefault="Deny" /> |
||||
|
<section name="rules" overrideModeDefault="Allow" /> |
||||
|
<section name="outboundRules" overrideModeDefault="Allow" /> |
||||
|
<section name="globalRules" overrideModeDefault="Deny" allowDefinition="AppHostOnly" /> |
||||
|
<section name="providers" overrideModeDefault="Allow" /> |
||||
|
<section name="rewriteMaps" overrideModeDefault="Allow" /> |
||||
|
</sectionGroup> |
||||
|
<section name="webSocket" overrideModeDefault="Deny" /> |
||||
|
<section name="aspNetCore" overrideModeDefault="Allow" /> |
||||
|
</sectionGroup> |
||||
|
</configSections> |
||||
|
<configProtectedData> |
||||
|
<providers> |
||||
|
<add name="IISWASOnlyRsaProvider" type="" description="Uses RsaCryptoServiceProvider to encrypt and decrypt" keyContainerName="iisWasKey" cspProviderName="" useMachineContainer="true" useOAEP="false" /> |
||||
|
<add name="AesProvider" type="Microsoft.ApplicationHost.AesProtectedConfigurationProvider" description="Uses an AES session key to encrypt and decrypt" keyContainerName="iisConfigurationKey" cspProviderName="" useOAEP="false" useMachineContainer="true" sessionKey="AQIAAA5mAAAApAAA/HKxkz6alrlAPez0IUgujj/6k3WxCDriHp6jvpv3yEZmo7h6SMzGLxo4mTrIQVHSkB7tmElHKfUFTzE2BWF7nFWHY6Z6qmGBauFzwJMwESjril7Gjz69RBFH259HQ6aRDq9Xfx7U7H4HtdmnKNqGjgl/hwPQBGeIlWiDh+sYv3vKB0QU971tjX6H2B+9armlnC8UOuA6JYMDMI/VLLL16sng0fWAy5JYe0YVABVjiAWDW264RZW9Tr1Oax4qHZKg+SdjULxeOc2YmpX+d0yeITo1HkPF1hN1gHpIPIUDo05ilHUNfR3OkjVCIQK4cFKCq1s8NH+y+13MxUC4Fn1AlQ==" /> |
||||
|
<add name="IISWASOnlyAesProvider" type="Microsoft.ApplicationHost.AesProtectedConfigurationProvider" description="Uses an AES session key to encrypt and decrypt" keyContainerName="iisWasKey" cspProviderName="" useOAEP="false" useMachineContainer="true" sessionKey="AQIAAA5mAAAApAAALmU8lTC+v2qtfQiiiquvvLpUQqKLEXs+jSKoWCM/uPhyB++k4dwug19mGidNK5FYiWK2KYE1yhjVJcbp12E98Q0R2nT7eBiCMY2JairxQ591rqABK7keGaIjwH7PwGzSpILl3RJ4YFvJ/7ZXEJxeDZIjW8ZxWVXx+/VyHs9U3WguLEkgMUX3jrxJi8LouxaIVPJAv/YQ1ZCWs8zImitxX/C/7o7yaIxznfsN5nGQzQfpUDPeby99aw2zPVTtZI2LaWIBON8guABvZ6JtJVDWmfdK6sodbnwdZkr6/Z2rfvamT1dC1SpQrGG7ulR/f9/GXvCaW10ZVKxekBF/CYlNMg==" /> |
||||
|
</providers> |
||||
|
</configProtectedData> |
||||
|
<system.applicationHost> |
||||
|
<applicationPools> |
||||
|
<add name="Clr4IntegratedAppPool" managedRuntimeVersion="v4.0" managedPipelineMode="Integrated" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" /> |
||||
|
<add name="Clr4ClassicAppPool" managedRuntimeVersion="v4.0" managedPipelineMode="Classic" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" /> |
||||
|
<add name="Clr2IntegratedAppPool" managedRuntimeVersion="v2.0" managedPipelineMode="Integrated" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" /> |
||||
|
<add name="Clr2ClassicAppPool" managedRuntimeVersion="v2.0" managedPipelineMode="Classic" CLRConfigFile="%IIS_USER_HOME%\config\aspnet.config" autoStart="true" /> |
||||
|
<add name="UnmanagedClassicAppPool" managedRuntimeVersion="" managedPipelineMode="Classic" autoStart="true" /> |
||||
|
<add name="Znyc.Dispatching.Web.Entry AppPool" managedRuntimeVersion="" /> |
||||
|
<applicationPoolDefaults managedRuntimeVersion="v4.0"> |
||||
|
<processModel loadUserProfile="true" setProfileEnvironment="false" /> |
||||
|
</applicationPoolDefaults> |
||||
|
</applicationPools> |
||||
|
<!-- |
||||
|
|
||||
|
The <listenerAdapters> section defines the protocols with which the |
||||
|
Windows Process Activation Service (WAS) binds. |
||||
|
|
||||
|
--> |
||||
|
<listenerAdapters> |
||||
|
<add name="http" /> |
||||
|
</listenerAdapters> |
||||
|
<sites> |
||||
|
<site name="WebSite1" id="1" serverAutoStart="true"> |
||||
|
<application path="/"> |
||||
|
<virtualDirectory path="/" physicalPath="%IIS_SITES_HOME%\WebSite1" /> |
||||
|
</application> |
||||
|
<bindings> |
||||
|
<binding protocol="http" bindingInformation=":8080:localhost" /> |
||||
|
</bindings> |
||||
|
</site> |
||||
|
<site name="Znyc.Dispatching.Web.Entry" id="2"> |
||||
|
<application path="/" applicationPool="Znyc.Dispatching.Web.Entry AppPool"> |
||||
|
<virtualDirectory path="/" physicalPath="E:\ZNYC\Code\znyc.dispatching.api\Znyc.Dispatching.Web.Entry" /> |
||||
|
</application> |
||||
|
<bindings> |
||||
|
<binding protocol="http" bindingInformation="*:53785:localhost" /> |
||||
|
<binding protocol="https" bindingInformation="*:44342:localhost" /> |
||||
|
</bindings> |
||||
|
</site> |
||||
|
<siteDefaults> |
||||
|
<!-- To enable logging, please change the below attribute "enabled" to "true" --> |
||||
|
<logFile logFormat="W3C" directory="%AppData%\Microsoft\IISExpressLogs" enabled="false" /> |
||||
|
<traceFailedRequestsLogging directory="%AppData%\Microsoft" enabled="false" maxLogFileSizeKB="1024" /> |
||||
|
</siteDefaults> |
||||
|
<applicationDefaults applicationPool="Clr4IntegratedAppPool" /> |
||||
|
<virtualDirectoryDefaults allowSubDirConfig="true" /> |
||||
|
</sites> |
||||
|
<webLimits /> |
||||
|
</system.applicationHost> |
||||
|
<system.webServer> |
||||
|
<serverRuntime /> |
||||
|
<asp scriptErrorSentToBrowser="true"> |
||||
|
<cache diskTemplateCacheDirectory="%TEMP%\iisexpress\ASP Compiled Templates" /> |
||||
|
<limits /> |
||||
|
</asp> |
||||
|
<caching enabled="true" enableKernelCache="true"></caching> |
||||
|
<cgi /> |
||||
|
<defaultDocument enabled="true"> |
||||
|
<files> |
||||
|
<add value="Default.htm" /> |
||||
|
<add value="Default.asp" /> |
||||
|
<add value="index.htm" /> |
||||
|
<add value="index.html" /> |
||||
|
<add value="iisstart.htm" /> |
||||
|
<add value="default.aspx" /> |
||||
|
</files> |
||||
|
</defaultDocument> |
||||
|
<directoryBrowse enabled="false" /> |
||||
|
<fastCgi /> |
||||
|
<!-- |
||||
|
|
||||
|
The <globalModules> section defines all native-code modules. |
||||
|
To enable a module, specify it in the <modules> section. |
||||
|
|
||||
|
--> |
||||
|
<globalModules> |
||||
|
<add name="HttpLoggingModule" image="%IIS_BIN%\loghttp.dll" /> |
||||
|
<add name="UriCacheModule" image="%IIS_BIN%\cachuri.dll" /> |
||||
|
<add name="TokenCacheModule" image="%IIS_BIN%\cachtokn.dll" /> |
||||
|
<add name="DynamicCompressionModule" image="%IIS_BIN%\compdyn.dll" /> |
||||
|
<add name="StaticCompressionModule" image="%IIS_BIN%\compstat.dll" /> |
||||
|
<add name="DefaultDocumentModule" image="%IIS_BIN%\defdoc.dll" /> |
||||
|
<add name="DirectoryListingModule" image="%IIS_BIN%\dirlist.dll" /> |
||||
|
<add name="ProtocolSupportModule" image="%IIS_BIN%\protsup.dll" /> |
||||
|
<add name="HttpRedirectionModule" image="%IIS_BIN%\redirect.dll" /> |
||||
|
<add name="ServerSideIncludeModule" image="%IIS_BIN%\iis_ssi.dll" /> |
||||
|
<add name="StaticFileModule" image="%IIS_BIN%\static.dll" /> |
||||
|
<add name="AnonymousAuthenticationModule" image="%IIS_BIN%\authanon.dll" /> |
||||
|
<add name="CertificateMappingAuthenticationModule" image="%IIS_BIN%\authcert.dll" /> |
||||
|
<add name="UrlAuthorizationModule" image="%IIS_BIN%\urlauthz.dll" /> |
||||
|
<add name="BasicAuthenticationModule" image="%IIS_BIN%\authbas.dll" /> |
||||
|
<add name="WindowsAuthenticationModule" image="%IIS_BIN%\authsspi.dll" /> |
||||
|
<add name="IISCertificateMappingAuthenticationModule" image="%IIS_BIN%\authmap.dll" /> |
||||
|
<add name="IpRestrictionModule" image="%IIS_BIN%\iprestr.dll" /> |
||||
|
<add name="DynamicIpRestrictionModule" image="%IIS_BIN%\diprestr.dll" /> |
||||
|
<add name="RequestFilteringModule" image="%IIS_BIN%\modrqflt.dll" /> |
||||
|
<add name="CustomLoggingModule" image="%IIS_BIN%\logcust.dll" /> |
||||
|
<add name="CustomErrorModule" image="%IIS_BIN%\custerr.dll" /> |
||||
|
<add name="FailedRequestsTracingModule" image="%IIS_BIN%\iisfreb.dll" /> |
||||
|
<add name="RequestMonitorModule" image="%IIS_BIN%\iisreqs.dll" /> |
||||
|
<add name="IsapiModule" image="%IIS_BIN%\isapi.dll" /> |
||||
|
<add name="IsapiFilterModule" image="%IIS_BIN%\filter.dll" /> |
||||
|
<add name="CgiModule" image="%IIS_BIN%\cgi.dll" /> |
||||
|
<add name="FastCgiModule" image="%IIS_BIN%\iisfcgi.dll" /> |
||||
|
<!-- <add name="WebDAVModule" image="%IIS_BIN%\webdav.dll" /> --> |
||||
|
<add name="RewriteModule" image="%IIS_BIN%\rewrite.dll" /> |
||||
|
<add name="ConfigurationValidationModule" image="%IIS_BIN%\validcfg.dll" /> |
||||
|
<add name="WebSocketModule" image="%IIS_BIN%\iiswsock.dll" /> |
||||
|
<add name="WebMatrixSupportModule" image="%IIS_BIN%\webmatrixsup.dll" /> |
||||
|
<add name="ManagedEngine" image="%windir%\Microsoft.NET\Framework\v2.0.50727\webengine.dll" preCondition="integratedMode,runtimeVersionv2.0,bitness32" /> |
||||
|
<add name="ManagedEngine64" image="%windir%\Microsoft.NET\Framework64\v2.0.50727\webengine.dll" preCondition="integratedMode,runtimeVersionv2.0,bitness64" /> |
||||
|
<add name="ManagedEngineV4.0_32bit" image="%windir%\Microsoft.NET\Framework\v4.0.30319\webengine4.dll" preCondition="integratedMode,runtimeVersionv4.0,bitness32" /> |
||||
|
<add name="ManagedEngineV4.0_64bit" image="%windir%\Microsoft.NET\Framework64\v4.0.30319\webengine4.dll" preCondition="integratedMode,runtimeVersionv4.0,bitness64" /> |
||||
|
<add name="ApplicationInitializationModule" image="%IIS_BIN%\warmup.dll" /> |
||||
|
<add name="AspNetCoreModule" image="%IIS_BIN%\aspnetcore.dll" /> |
||||
|
<add name="AspNetCoreModuleV2" image="%IIS_BIN%\Asp.Net Core Module\V2\aspnetcorev2.dll" /> |
||||
|
</globalModules> |
||||
|
<httpCompression directory="%TEMP%"> |
||||
|
<scheme name="gzip" dll="%IIS_BIN%\gzip.dll" /> |
||||
|
<dynamicTypes> |
||||
|
<add mimeType="text/*" enabled="true" /> |
||||
|
<add mimeType="message/*" enabled="true" /> |
||||
|
<add mimeType="application/x-javascript" enabled="true" /> |
||||
|
<add mimeType="application/javascript" enabled="true" /> |
||||
|
<add mimeType="*/*" enabled="false" /> |
||||
|
</dynamicTypes> |
||||
|
<staticTypes> |
||||
|
<add mimeType="text/*" enabled="true" /> |
||||
|
<add mimeType="message/*" enabled="true" /> |
||||
|
<add mimeType="application/javascript" enabled="true" /> |
||||
|
<add mimeType="application/atom+xml" enabled="true" /> |
||||
|
<add mimeType="application/xaml+xml" enabled="true" /> |
||||
|
<add mimeType="image/svg+xml" enabled="true" /> |
||||
|
<add mimeType="*/*" enabled="false" /> |
||||
|
</staticTypes> |
||||
|
</httpCompression> |
||||
|
<httpErrors lockAttributes="allowAbsolutePathsWhenDelegated,defaultPath"> |
||||
|
<error statusCode="401" prefixLanguageFilePath="%IIS_BIN%\custerr" path="401.htm" /> |
||||
|
<error statusCode="403" prefixLanguageFilePath="%IIS_BIN%\custerr" path="403.htm" /> |
||||
|
<error statusCode="404" prefixLanguageFilePath="%IIS_BIN%\custerr" path="404.htm" /> |
||||
|
<error statusCode="405" prefixLanguageFilePath="%IIS_BIN%\custerr" path="405.htm" /> |
||||
|
<error statusCode="406" prefixLanguageFilePath="%IIS_BIN%\custerr" path="406.htm" /> |
||||
|
<error statusCode="412" prefixLanguageFilePath="%IIS_BIN%\custerr" path="412.htm" /> |
||||
|
<error statusCode="500" prefixLanguageFilePath="%IIS_BIN%\custerr" path="500.htm" /> |
||||
|
<error statusCode="501" prefixLanguageFilePath="%IIS_BIN%\custerr" path="501.htm" /> |
||||
|
<error statusCode="502" prefixLanguageFilePath="%IIS_BIN%\custerr" path="502.htm" /> |
||||
|
</httpErrors> |
||||
|
<httpLogging dontLog="false" /> |
||||
|
<httpProtocol> |
||||
|
<customHeaders> |
||||
|
<clear /> |
||||
|
<add name="X-Powered-By" value="ASP.NET" /> |
||||
|
</customHeaders> |
||||
|
<redirectHeaders> |
||||
|
<clear /> |
||||
|
</redirectHeaders> |
||||
|
</httpProtocol> |
||||
|
<httpRedirect enabled="false" /> |
||||
|
<httpTracing /> |
||||
|
<isapiFilters> |
||||
|
<filter name="ASP.Net_2.0.50727-64" path="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_filter.dll" enableCache="true" preCondition="bitness64,runtimeVersionv2.0" /> |
||||
|
<filter name="ASP.Net_2.0.50727.0" path="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_filter.dll" enableCache="true" preCondition="bitness32,runtimeVersionv2.0" /> |
||||
|
<filter name="ASP.Net_2.0_for_v1.1" path="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_filter.dll" enableCache="true" preCondition="runtimeVersionv1.1" /> |
||||
|
<filter name="ASP.Net_4.0_32bit" path="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_filter.dll" enableCache="true" preCondition="bitness32,runtimeVersionv4.0" /> |
||||
|
<filter name="ASP.Net_4.0_64bit" path="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_filter.dll" enableCache="true" preCondition="bitness64,runtimeVersionv4.0" /> |
||||
|
</isapiFilters> |
||||
|
<odbcLogging /> |
||||
|
<security> |
||||
|
<access sslFlags="None" /> |
||||
|
<applicationDependencies> |
||||
|
<application name="Active Server Pages" groupId="ASP" /> |
||||
|
</applicationDependencies> |
||||
|
<authentication> |
||||
|
<anonymousAuthentication enabled="true" userName="" /> |
||||
|
<basicAuthentication enabled="false" /> |
||||
|
<clientCertificateMappingAuthentication enabled="false" /> |
||||
|
<digestAuthentication enabled="false" /> |
||||
|
<iisClientCertificateMappingAuthentication enabled="false"></iisClientCertificateMappingAuthentication> |
||||
|
<windowsAuthentication enabled="false"> |
||||
|
<providers> |
||||
|
<add value="Negotiate" /> |
||||
|
<add value="NTLM" /> |
||||
|
</providers> |
||||
|
</windowsAuthentication> |
||||
|
</authentication> |
||||
|
<authorization> |
||||
|
<add accessType="Allow" users="*" /> |
||||
|
</authorization> |
||||
|
<ipSecurity allowUnlisted="true" /> |
||||
|
<isapiCgiRestriction notListedIsapisAllowed="true" notListedCgisAllowed="true"> |
||||
|
<add path="%windir%\Microsoft.NET\Framework64\v4.0.30319\webengine4.dll" allowed="true" groupId="ASP.NET_v4.0" description="ASP.NET_v4.0" /> |
||||
|
<add path="%windir%\Microsoft.NET\Framework\v4.0.30319\webengine4.dll" allowed="true" groupId="ASP.NET_v4.0" description="ASP.NET_v4.0" /> |
||||
|
<add path="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" allowed="true" groupId="ASP.NET v2.0.50727" description="ASP.NET v2.0.50727" /> |
||||
|
<add path="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" allowed="true" groupId="ASP.NET v2.0.50727" description="ASP.NET v2.0.50727" /> |
||||
|
</isapiCgiRestriction> |
||||
|
<requestFiltering> |
||||
|
<fileExtensions allowUnlisted="true" applyToWebDAV="true"> |
||||
|
<add fileExtension=".asa" allowed="false" /> |
||||
|
<add fileExtension=".asax" allowed="false" /> |
||||
|
<add fileExtension=".ascx" allowed="false" /> |
||||
|
<add fileExtension=".master" allowed="false" /> |
||||
|
<add fileExtension=".skin" allowed="false" /> |
||||
|
<add fileExtension=".browser" allowed="false" /> |
||||
|
<add fileExtension=".sitemap" allowed="false" /> |
||||
|
<add fileExtension=".config" allowed="false" /> |
||||
|
<add fileExtension=".cs" allowed="false" /> |
||||
|
<add fileExtension=".csproj" allowed="false" /> |
||||
|
<add fileExtension=".vb" allowed="false" /> |
||||
|
<add fileExtension=".vbproj" allowed="false" /> |
||||
|
<add fileExtension=".webinfo" allowed="false" /> |
||||
|
<add fileExtension=".licx" allowed="false" /> |
||||
|
<add fileExtension=".resx" allowed="false" /> |
||||
|
<add fileExtension=".resources" allowed="false" /> |
||||
|
<add fileExtension=".mdb" allowed="false" /> |
||||
|
<add fileExtension=".vjsproj" allowed="false" /> |
||||
|
<add fileExtension=".java" allowed="false" /> |
||||
|
<add fileExtension=".jsl" allowed="false" /> |
||||
|
<add fileExtension=".ldb" allowed="false" /> |
||||
|
<add fileExtension=".dsdgm" allowed="false" /> |
||||
|
<add fileExtension=".ssdgm" allowed="false" /> |
||||
|
<add fileExtension=".lsad" allowed="false" /> |
||||
|
<add fileExtension=".ssmap" allowed="false" /> |
||||
|
<add fileExtension=".cd" allowed="false" /> |
||||
|
<add fileExtension=".dsprototype" allowed="false" /> |
||||
|
<add fileExtension=".lsaprototype" allowed="false" /> |
||||
|
<add fileExtension=".sdm" allowed="false" /> |
||||
|
<add fileExtension=".sdmDocument" allowed="false" /> |
||||
|
<add fileExtension=".mdf" allowed="false" /> |
||||
|
<add fileExtension=".ldf" allowed="false" /> |
||||
|
<add fileExtension=".ad" allowed="false" /> |
||||
|
<add fileExtension=".dd" allowed="false" /> |
||||
|
<add fileExtension=".ldd" allowed="false" /> |
||||
|
<add fileExtension=".sd" allowed="false" /> |
||||
|
<add fileExtension=".adprototype" allowed="false" /> |
||||
|
<add fileExtension=".lddprototype" allowed="false" /> |
||||
|
<add fileExtension=".exclude" allowed="false" /> |
||||
|
<add fileExtension=".refresh" allowed="false" /> |
||||
|
<add fileExtension=".compiled" allowed="false" /> |
||||
|
<add fileExtension=".msgx" allowed="false" /> |
||||
|
<add fileExtension=".vsdisco" allowed="false" /> |
||||
|
<add fileExtension=".rules" allowed="false" /> |
||||
|
</fileExtensions> |
||||
|
<verbs allowUnlisted="true" applyToWebDAV="true" /> |
||||
|
<hiddenSegments applyToWebDAV="true"> |
||||
|
<add segment="web.config" /> |
||||
|
<add segment="bin" /> |
||||
|
<add segment="App_code" /> |
||||
|
<add segment="App_GlobalResources" /> |
||||
|
<add segment="App_LocalResources" /> |
||||
|
<add segment="App_WebReferences" /> |
||||
|
<add segment="App_Data" /> |
||||
|
<add segment="App_Browsers" /> |
||||
|
</hiddenSegments> |
||||
|
</requestFiltering> |
||||
|
</security> |
||||
|
<serverSideInclude ssiExecDisable="false" /> |
||||
|
<staticContent lockAttributes="isDocFooterFileName"> |
||||
|
<mimeMap fileExtension=".323" mimeType="text/h323" /> |
||||
|
<mimeMap fileExtension=".3g2" mimeType="video/3gpp2" /> |
||||
|
<mimeMap fileExtension=".3gp2" mimeType="video/3gpp2" /> |
||||
|
<mimeMap fileExtension=".3gp" mimeType="video/3gpp" /> |
||||
|
<mimeMap fileExtension=".3gpp" mimeType="video/3gpp" /> |
||||
|
<mimeMap fileExtension=".aac" mimeType="audio/aac" /> |
||||
|
<mimeMap fileExtension=".aaf" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".aca" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".accdb" mimeType="application/msaccess" /> |
||||
|
<mimeMap fileExtension=".accde" mimeType="application/msaccess" /> |
||||
|
<mimeMap fileExtension=".accdt" mimeType="application/msaccess" /> |
||||
|
<mimeMap fileExtension=".acx" mimeType="application/internet-property-stream" /> |
||||
|
<mimeMap fileExtension=".adt" mimeType="audio/vnd.dlna.adts" /> |
||||
|
<mimeMap fileExtension=".adts" mimeType="audio/vnd.dlna.adts" /> |
||||
|
<mimeMap fileExtension=".afm" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".ai" mimeType="application/postscript" /> |
||||
|
<mimeMap fileExtension=".aif" mimeType="audio/x-aiff" /> |
||||
|
<mimeMap fileExtension=".aifc" mimeType="audio/aiff" /> |
||||
|
<mimeMap fileExtension=".aiff" mimeType="audio/aiff" /> |
||||
|
<mimeMap fileExtension=".appcache" mimeType="text/cache-manifest" /> |
||||
|
<mimeMap fileExtension=".application" mimeType="application/x-ms-application" /> |
||||
|
<mimeMap fileExtension=".art" mimeType="image/x-jg" /> |
||||
|
<mimeMap fileExtension=".asd" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".asf" mimeType="video/x-ms-asf" /> |
||||
|
<mimeMap fileExtension=".asi" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".asm" mimeType="text/plain" /> |
||||
|
<mimeMap fileExtension=".asr" mimeType="video/x-ms-asf" /> |
||||
|
<mimeMap fileExtension=".asx" mimeType="video/x-ms-asf" /> |
||||
|
<mimeMap fileExtension=".atom" mimeType="application/atom+xml" /> |
||||
|
<mimeMap fileExtension=".au" mimeType="audio/basic" /> |
||||
|
<mimeMap fileExtension=".avi" mimeType="video/avi" /> |
||||
|
<mimeMap fileExtension=".axs" mimeType="application/olescript" /> |
||||
|
<mimeMap fileExtension=".bas" mimeType="text/plain" /> |
||||
|
<mimeMap fileExtension=".bcpio" mimeType="application/x-bcpio" /> |
||||
|
<mimeMap fileExtension=".bin" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".bmp" mimeType="image/bmp" /> |
||||
|
<mimeMap fileExtension=".c" mimeType="text/plain" /> |
||||
|
<mimeMap fileExtension=".cab" mimeType="application/vnd.ms-cab-compressed" /> |
||||
|
<mimeMap fileExtension=".calx" mimeType="application/vnd.ms-office.calx" /> |
||||
|
<mimeMap fileExtension=".cat" mimeType="application/vnd.ms-pki.seccat" /> |
||||
|
<mimeMap fileExtension=".cdf" mimeType="application/x-cdf" /> |
||||
|
<mimeMap fileExtension=".chm" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".class" mimeType="application/x-java-applet" /> |
||||
|
<mimeMap fileExtension=".clp" mimeType="application/x-msclip" /> |
||||
|
<mimeMap fileExtension=".cmx" mimeType="image/x-cmx" /> |
||||
|
<mimeMap fileExtension=".cnf" mimeType="text/plain" /> |
||||
|
<mimeMap fileExtension=".cod" mimeType="image/cis-cod" /> |
||||
|
<mimeMap fileExtension=".cpio" mimeType="application/x-cpio" /> |
||||
|
<mimeMap fileExtension=".cpp" mimeType="text/plain" /> |
||||
|
<mimeMap fileExtension=".crd" mimeType="application/x-mscardfile" /> |
||||
|
<mimeMap fileExtension=".crl" mimeType="application/pkix-crl" /> |
||||
|
<mimeMap fileExtension=".crt" mimeType="application/x-x509-ca-cert" /> |
||||
|
<mimeMap fileExtension=".csh" mimeType="application/x-csh" /> |
||||
|
<mimeMap fileExtension=".css" mimeType="text/css" /> |
||||
|
<mimeMap fileExtension=".csv" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".cur" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".dcr" mimeType="application/x-director" /> |
||||
|
<mimeMap fileExtension=".deploy" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".der" mimeType="application/x-x509-ca-cert" /> |
||||
|
<mimeMap fileExtension=".dib" mimeType="image/bmp" /> |
||||
|
<mimeMap fileExtension=".dir" mimeType="application/x-director" /> |
||||
|
<mimeMap fileExtension=".disco" mimeType="text/xml" /> |
||||
|
<mimeMap fileExtension=".dll" mimeType="application/x-msdownload" /> |
||||
|
<mimeMap fileExtension=".dll.config" mimeType="text/xml" /> |
||||
|
<mimeMap fileExtension=".dlm" mimeType="text/dlm" /> |
||||
|
<mimeMap fileExtension=".doc" mimeType="application/msword" /> |
||||
|
<mimeMap fileExtension=".docm" mimeType="application/vnd.ms-word.document.macroEnabled.12" /> |
||||
|
<mimeMap fileExtension=".docx" mimeType="application/vnd.openxmlformats-officedocument.wordprocessingml.document" /> |
||||
|
<mimeMap fileExtension=".dot" mimeType="application/msword" /> |
||||
|
<mimeMap fileExtension=".dotm" mimeType="application/vnd.ms-word.template.macroEnabled.12" /> |
||||
|
<mimeMap fileExtension=".dotx" mimeType="application/vnd.openxmlformats-officedocument.wordprocessingml.template" /> |
||||
|
<mimeMap fileExtension=".dsp" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".dtd" mimeType="text/xml" /> |
||||
|
<mimeMap fileExtension=".dvi" mimeType="application/x-dvi" /> |
||||
|
<mimeMap fileExtension=".dvr-ms" mimeType="video/x-ms-dvr" /> |
||||
|
<mimeMap fileExtension=".dwf" mimeType="drawing/x-dwf" /> |
||||
|
<mimeMap fileExtension=".dwp" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".dxr" mimeType="application/x-director" /> |
||||
|
<mimeMap fileExtension=".eml" mimeType="message/rfc822" /> |
||||
|
<mimeMap fileExtension=".emz" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".eot" mimeType="application/vnd.ms-fontobject" /> |
||||
|
<mimeMap fileExtension=".eps" mimeType="application/postscript" /> |
||||
|
<mimeMap fileExtension=".esd" mimeType="application/vnd.ms-cab-compressed" /> |
||||
|
<mimeMap fileExtension=".etx" mimeType="text/x-setext" /> |
||||
|
<mimeMap fileExtension=".evy" mimeType="application/envoy" /> |
||||
|
<mimeMap fileExtension=".exe" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".exe.config" mimeType="text/xml" /> |
||||
|
<mimeMap fileExtension=".fdf" mimeType="application/vnd.fdf" /> |
||||
|
<mimeMap fileExtension=".fif" mimeType="application/fractals" /> |
||||
|
<mimeMap fileExtension=".fla" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".flr" mimeType="x-world/x-vrml" /> |
||||
|
<mimeMap fileExtension=".flv" mimeType="video/x-flv" /> |
||||
|
<mimeMap fileExtension=".gif" mimeType="image/gif" /> |
||||
|
<mimeMap fileExtension=".glb" mimeType="model/gltf-binary" /> |
||||
|
<mimeMap fileExtension=".gtar" mimeType="application/x-gtar" /> |
||||
|
<mimeMap fileExtension=".gz" mimeType="application/x-gzip" /> |
||||
|
<mimeMap fileExtension=".h" mimeType="text/plain" /> |
||||
|
<mimeMap fileExtension=".hdf" mimeType="application/x-hdf" /> |
||||
|
<mimeMap fileExtension=".hdml" mimeType="text/x-hdml" /> |
||||
|
<mimeMap fileExtension=".hhc" mimeType="application/x-oleobject" /> |
||||
|
<mimeMap fileExtension=".hhk" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".hhp" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".hlp" mimeType="application/winhlp" /> |
||||
|
<mimeMap fileExtension=".hqx" mimeType="application/mac-binhex40" /> |
||||
|
<mimeMap fileExtension=".hta" mimeType="application/hta" /> |
||||
|
<mimeMap fileExtension=".htc" mimeType="text/x-component" /> |
||||
|
<mimeMap fileExtension=".htm" mimeType="text/html" /> |
||||
|
<mimeMap fileExtension=".html" mimeType="text/html" /> |
||||
|
<mimeMap fileExtension=".htt" mimeType="text/webviewhtml" /> |
||||
|
<mimeMap fileExtension=".hxt" mimeType="text/html" /> |
||||
|
<mimeMap fileExtension=".ico" mimeType="image/x-icon" /> |
||||
|
<mimeMap fileExtension=".ics" mimeType="text/calendar" /> |
||||
|
<mimeMap fileExtension=".ief" mimeType="image/ief" /> |
||||
|
<mimeMap fileExtension=".iii" mimeType="application/x-iphone" /> |
||||
|
<mimeMap fileExtension=".inf" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".ins" mimeType="application/x-internet-signup" /> |
||||
|
<mimeMap fileExtension=".isp" mimeType="application/x-internet-signup" /> |
||||
|
<mimeMap fileExtension=".IVF" mimeType="video/x-ivf" /> |
||||
|
<mimeMap fileExtension=".jar" mimeType="application/java-archive" /> |
||||
|
<mimeMap fileExtension=".java" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".jck" mimeType="application/liquidmotion" /> |
||||
|
<mimeMap fileExtension=".jcz" mimeType="application/liquidmotion" /> |
||||
|
<mimeMap fileExtension=".jfif" mimeType="image/pjpeg" /> |
||||
|
<mimeMap fileExtension=".jpb" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".jpe" mimeType="image/jpeg" /> |
||||
|
<mimeMap fileExtension=".jpeg" mimeType="image/jpeg" /> |
||||
|
<mimeMap fileExtension=".jpg" mimeType="image/jpeg" /> |
||||
|
<mimeMap fileExtension=".js" mimeType="application/javascript" /> |
||||
|
<mimeMap fileExtension=".json" mimeType="application/json" /> |
||||
|
<mimeMap fileExtension=".jsonld" mimeType="application/ld+json" /> |
||||
|
<mimeMap fileExtension=".jsx" mimeType="text/jscript" /> |
||||
|
<mimeMap fileExtension=".latex" mimeType="application/x-latex" /> |
||||
|
<mimeMap fileExtension=".less" mimeType="text/css" /> |
||||
|
<mimeMap fileExtension=".lit" mimeType="application/x-ms-reader" /> |
||||
|
<mimeMap fileExtension=".lpk" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".lsf" mimeType="video/x-la-asf" /> |
||||
|
<mimeMap fileExtension=".lsx" mimeType="video/x-la-asf" /> |
||||
|
<mimeMap fileExtension=".lzh" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".m13" mimeType="application/x-msmediaview" /> |
||||
|
<mimeMap fileExtension=".m14" mimeType="application/x-msmediaview" /> |
||||
|
<mimeMap fileExtension=".m1v" mimeType="video/mpeg" /> |
||||
|
<mimeMap fileExtension=".m2ts" mimeType="video/vnd.dlna.mpeg-tts" /> |
||||
|
<mimeMap fileExtension=".m3u" mimeType="audio/x-mpegurl" /> |
||||
|
<mimeMap fileExtension=".m4a" mimeType="audio/mp4" /> |
||||
|
<mimeMap fileExtension=".m4v" mimeType="video/mp4" /> |
||||
|
<mimeMap fileExtension=".man" mimeType="application/x-troff-man" /> |
||||
|
<mimeMap fileExtension=".manifest" mimeType="application/x-ms-manifest" /> |
||||
|
<mimeMap fileExtension=".map" mimeType="text/plain" /> |
||||
|
<mimeMap fileExtension=".mdb" mimeType="application/x-msaccess" /> |
||||
|
<mimeMap fileExtension=".mdp" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".me" mimeType="application/x-troff-me" /> |
||||
|
<mimeMap fileExtension=".mht" mimeType="message/rfc822" /> |
||||
|
<mimeMap fileExtension=".mhtml" mimeType="message/rfc822" /> |
||||
|
<mimeMap fileExtension=".mid" mimeType="audio/mid" /> |
||||
|
<mimeMap fileExtension=".midi" mimeType="audio/mid" /> |
||||
|
<mimeMap fileExtension=".mix" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".mmf" mimeType="application/x-smaf" /> |
||||
|
<mimeMap fileExtension=".mno" mimeType="text/xml" /> |
||||
|
<mimeMap fileExtension=".mny" mimeType="application/x-msmoney" /> |
||||
|
<mimeMap fileExtension=".mov" mimeType="video/quicktime" /> |
||||
|
<mimeMap fileExtension=".movie" mimeType="video/x-sgi-movie" /> |
||||
|
<mimeMap fileExtension=".mp2" mimeType="video/mpeg" /> |
||||
|
<mimeMap fileExtension=".mp3" mimeType="audio/mpeg" /> |
||||
|
<mimeMap fileExtension=".mp4" mimeType="video/mp4" /> |
||||
|
<mimeMap fileExtension=".mp4v" mimeType="video/mp4" /> |
||||
|
<mimeMap fileExtension=".mpa" mimeType="video/mpeg" /> |
||||
|
<mimeMap fileExtension=".mpe" mimeType="video/mpeg" /> |
||||
|
<mimeMap fileExtension=".mpeg" mimeType="video/mpeg" /> |
||||
|
<mimeMap fileExtension=".mpg" mimeType="video/mpeg" /> |
||||
|
<mimeMap fileExtension=".mpp" mimeType="application/vnd.ms-project" /> |
||||
|
<mimeMap fileExtension=".mpv2" mimeType="video/mpeg" /> |
||||
|
<mimeMap fileExtension=".ms" mimeType="application/x-troff-ms" /> |
||||
|
<mimeMap fileExtension=".msi" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".mso" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".mvb" mimeType="application/x-msmediaview" /> |
||||
|
<mimeMap fileExtension=".mvc" mimeType="application/x-miva-compiled" /> |
||||
|
<mimeMap fileExtension=".nc" mimeType="application/x-netcdf" /> |
||||
|
<mimeMap fileExtension=".nsc" mimeType="video/x-ms-asf" /> |
||||
|
<mimeMap fileExtension=".nws" mimeType="message/rfc822" /> |
||||
|
<mimeMap fileExtension=".ocx" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".oda" mimeType="application/oda" /> |
||||
|
<mimeMap fileExtension=".odc" mimeType="text/x-ms-odc" /> |
||||
|
<mimeMap fileExtension=".ods" mimeType="application/oleobject" /> |
||||
|
<mimeMap fileExtension=".oga" mimeType="audio/ogg" /> |
||||
|
<mimeMap fileExtension=".ogg" mimeType="video/ogg" /> |
||||
|
<mimeMap fileExtension=".ogv" mimeType="video/ogg" /> |
||||
|
<mimeMap fileExtension=".one" mimeType="application/onenote" /> |
||||
|
<mimeMap fileExtension=".onea" mimeType="application/onenote" /> |
||||
|
<mimeMap fileExtension=".onetoc" mimeType="application/onenote" /> |
||||
|
<mimeMap fileExtension=".onetoc2" mimeType="application/onenote" /> |
||||
|
<mimeMap fileExtension=".onetmp" mimeType="application/onenote" /> |
||||
|
<mimeMap fileExtension=".onepkg" mimeType="application/onenote" /> |
||||
|
<mimeMap fileExtension=".osdx" mimeType="application/opensearchdescription+xml" /> |
||||
|
<mimeMap fileExtension=".otf" mimeType="font/otf" /> |
||||
|
<mimeMap fileExtension=".p10" mimeType="application/pkcs10" /> |
||||
|
<mimeMap fileExtension=".p12" mimeType="application/x-pkcs12" /> |
||||
|
<mimeMap fileExtension=".p7b" mimeType="application/x-pkcs7-certificates" /> |
||||
|
<mimeMap fileExtension=".p7c" mimeType="application/pkcs7-mime" /> |
||||
|
<mimeMap fileExtension=".p7m" mimeType="application/pkcs7-mime" /> |
||||
|
<mimeMap fileExtension=".p7r" mimeType="application/x-pkcs7-certreqresp" /> |
||||
|
<mimeMap fileExtension=".p7s" mimeType="application/pkcs7-signature" /> |
||||
|
<mimeMap fileExtension=".pbm" mimeType="image/x-portable-bitmap" /> |
||||
|
<mimeMap fileExtension=".pcx" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".pcz" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".pdf" mimeType="application/pdf" /> |
||||
|
<mimeMap fileExtension=".pfb" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".pfm" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".pfx" mimeType="application/x-pkcs12" /> |
||||
|
<mimeMap fileExtension=".pgm" mimeType="image/x-portable-graymap" /> |
||||
|
<mimeMap fileExtension=".pko" mimeType="application/vnd.ms-pki.pko" /> |
||||
|
<mimeMap fileExtension=".pma" mimeType="application/x-perfmon" /> |
||||
|
<mimeMap fileExtension=".pmc" mimeType="application/x-perfmon" /> |
||||
|
<mimeMap fileExtension=".pml" mimeType="application/x-perfmon" /> |
||||
|
<mimeMap fileExtension=".pmr" mimeType="application/x-perfmon" /> |
||||
|
<mimeMap fileExtension=".pmw" mimeType="application/x-perfmon" /> |
||||
|
<mimeMap fileExtension=".png" mimeType="image/png" /> |
||||
|
<mimeMap fileExtension=".pnm" mimeType="image/x-portable-anymap" /> |
||||
|
<mimeMap fileExtension=".pnz" mimeType="image/png" /> |
||||
|
<mimeMap fileExtension=".pot" mimeType="application/vnd.ms-powerpoint" /> |
||||
|
<mimeMap fileExtension=".potm" mimeType="application/vnd.ms-powerpoint.template.macroEnabled.12" /> |
||||
|
<mimeMap fileExtension=".potx" mimeType="application/vnd.openxmlformats-officedocument.presentationml.template" /> |
||||
|
<mimeMap fileExtension=".ppam" mimeType="application/vnd.ms-powerpoint.addin.macroEnabled.12" /> |
||||
|
<mimeMap fileExtension=".ppm" mimeType="image/x-portable-pixmap" /> |
||||
|
<mimeMap fileExtension=".pps" mimeType="application/vnd.ms-powerpoint" /> |
||||
|
<mimeMap fileExtension=".ppsm" mimeType="application/vnd.ms-powerpoint.slideshow.macroEnabled.12" /> |
||||
|
<mimeMap fileExtension=".ppsx" mimeType="application/vnd.openxmlformats-officedocument.presentationml.slideshow" /> |
||||
|
<mimeMap fileExtension=".ppt" mimeType="application/vnd.ms-powerpoint" /> |
||||
|
<mimeMap fileExtension=".pptm" mimeType="application/vnd.ms-powerpoint.presentation.macroEnabled.12" /> |
||||
|
<mimeMap fileExtension=".pptx" mimeType="application/vnd.openxmlformats-officedocument.presentationml.presentation" /> |
||||
|
<mimeMap fileExtension=".prf" mimeType="application/pics-rules" /> |
||||
|
<mimeMap fileExtension=".prm" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".prx" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".ps" mimeType="application/postscript" /> |
||||
|
<mimeMap fileExtension=".psd" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".psm" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".psp" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".pub" mimeType="application/x-mspublisher" /> |
||||
|
<mimeMap fileExtension=".qt" mimeType="video/quicktime" /> |
||||
|
<mimeMap fileExtension=".qtl" mimeType="application/x-quicktimeplayer" /> |
||||
|
<mimeMap fileExtension=".qxd" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".ra" mimeType="audio/x-pn-realaudio" /> |
||||
|
<mimeMap fileExtension=".ram" mimeType="audio/x-pn-realaudio" /> |
||||
|
<mimeMap fileExtension=".rar" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".ras" mimeType="image/x-cmu-raster" /> |
||||
|
<mimeMap fileExtension=".rf" mimeType="image/vnd.rn-realflash" /> |
||||
|
<mimeMap fileExtension=".rgb" mimeType="image/x-rgb" /> |
||||
|
<mimeMap fileExtension=".rm" mimeType="application/vnd.rn-realmedia" /> |
||||
|
<mimeMap fileExtension=".rmi" mimeType="audio/mid" /> |
||||
|
<mimeMap fileExtension=".roff" mimeType="application/x-troff" /> |
||||
|
<mimeMap fileExtension=".rpm" mimeType="audio/x-pn-realaudio-plugin" /> |
||||
|
<mimeMap fileExtension=".rtf" mimeType="application/rtf" /> |
||||
|
<mimeMap fileExtension=".rtx" mimeType="text/richtext" /> |
||||
|
<mimeMap fileExtension=".scd" mimeType="application/x-msschedule" /> |
||||
|
<mimeMap fileExtension=".sct" mimeType="text/scriptlet" /> |
||||
|
<mimeMap fileExtension=".sea" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".setpay" mimeType="application/set-payment-initiation" /> |
||||
|
<mimeMap fileExtension=".setreg" mimeType="application/set-registration-initiation" /> |
||||
|
<mimeMap fileExtension=".sgml" mimeType="text/sgml" /> |
||||
|
<mimeMap fileExtension=".sh" mimeType="application/x-sh" /> |
||||
|
<mimeMap fileExtension=".shar" mimeType="application/x-shar" /> |
||||
|
<mimeMap fileExtension=".sit" mimeType="application/x-stuffit" /> |
||||
|
<mimeMap fileExtension=".sldm" mimeType="application/vnd.ms-powerpoint.slide.macroEnabled.12" /> |
||||
|
<mimeMap fileExtension=".sldx" mimeType="application/vnd.openxmlformats-officedocument.presentationml.slide" /> |
||||
|
<mimeMap fileExtension=".smd" mimeType="audio/x-smd" /> |
||||
|
<mimeMap fileExtension=".smi" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".smx" mimeType="audio/x-smd" /> |
||||
|
<mimeMap fileExtension=".smz" mimeType="audio/x-smd" /> |
||||
|
<mimeMap fileExtension=".snd" mimeType="audio/basic" /> |
||||
|
<mimeMap fileExtension=".snp" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".spc" mimeType="application/x-pkcs7-certificates" /> |
||||
|
<mimeMap fileExtension=".spl" mimeType="application/futuresplash" /> |
||||
|
<mimeMap fileExtension=".spx" mimeType="audio/ogg" /> |
||||
|
<mimeMap fileExtension=".src" mimeType="application/x-wais-source" /> |
||||
|
<mimeMap fileExtension=".ssm" mimeType="application/streamingmedia" /> |
||||
|
<mimeMap fileExtension=".sst" mimeType="application/vnd.ms-pki.certstore" /> |
||||
|
<mimeMap fileExtension=".stl" mimeType="application/vnd.ms-pki.stl" /> |
||||
|
<mimeMap fileExtension=".sv4cpio" mimeType="application/x-sv4cpio" /> |
||||
|
<mimeMap fileExtension=".sv4crc" mimeType="application/x-sv4crc" /> |
||||
|
<mimeMap fileExtension=".svg" mimeType="image/svg+xml" /> |
||||
|
<mimeMap fileExtension=".svgz" mimeType="image/svg+xml" /> |
||||
|
<mimeMap fileExtension=".swf" mimeType="application/x-shockwave-flash" /> |
||||
|
<mimeMap fileExtension=".t" mimeType="application/x-troff" /> |
||||
|
<mimeMap fileExtension=".tar" mimeType="application/x-tar" /> |
||||
|
<mimeMap fileExtension=".tcl" mimeType="application/x-tcl" /> |
||||
|
<mimeMap fileExtension=".tex" mimeType="application/x-tex" /> |
||||
|
<mimeMap fileExtension=".texi" mimeType="application/x-texinfo" /> |
||||
|
<mimeMap fileExtension=".texinfo" mimeType="application/x-texinfo" /> |
||||
|
<mimeMap fileExtension=".tgz" mimeType="application/x-compressed" /> |
||||
|
<mimeMap fileExtension=".thmx" mimeType="application/vnd.ms-officetheme" /> |
||||
|
<mimeMap fileExtension=".thn" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".tif" mimeType="image/tiff" /> |
||||
|
<mimeMap fileExtension=".tiff" mimeType="image/tiff" /> |
||||
|
<mimeMap fileExtension=".toc" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".tr" mimeType="application/x-troff" /> |
||||
|
<mimeMap fileExtension=".trm" mimeType="application/x-msterminal" /> |
||||
|
<mimeMap fileExtension=".ts" mimeType="video/vnd.dlna.mpeg-tts" /> |
||||
|
<mimeMap fileExtension=".tsv" mimeType="text/tab-separated-values" /> |
||||
|
<mimeMap fileExtension=".ttf" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".tts" mimeType="video/vnd.dlna.mpeg-tts" /> |
||||
|
<mimeMap fileExtension=".txt" mimeType="text/plain" /> |
||||
|
<mimeMap fileExtension=".u32" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".uls" mimeType="text/iuls" /> |
||||
|
<mimeMap fileExtension=".ustar" mimeType="application/x-ustar" /> |
||||
|
<mimeMap fileExtension=".vbs" mimeType="text/vbscript" /> |
||||
|
<mimeMap fileExtension=".vcf" mimeType="text/x-vcard" /> |
||||
|
<mimeMap fileExtension=".vcs" mimeType="text/plain" /> |
||||
|
<mimeMap fileExtension=".vdx" mimeType="application/vnd.ms-visio.viewer" /> |
||||
|
<mimeMap fileExtension=".vml" mimeType="text/xml" /> |
||||
|
<mimeMap fileExtension=".vsd" mimeType="application/vnd.visio" /> |
||||
|
<mimeMap fileExtension=".vss" mimeType="application/vnd.visio" /> |
||||
|
<mimeMap fileExtension=".vst" mimeType="application/vnd.visio" /> |
||||
|
<mimeMap fileExtension=".vsto" mimeType="application/x-ms-vsto" /> |
||||
|
<mimeMap fileExtension=".vsw" mimeType="application/vnd.visio" /> |
||||
|
<mimeMap fileExtension=".vsx" mimeType="application/vnd.visio" /> |
||||
|
<mimeMap fileExtension=".vtx" mimeType="application/vnd.visio" /> |
||||
|
<mimeMap fileExtension=".wasm" mimeType="application/wasm" /> |
||||
|
<mimeMap fileExtension=".wav" mimeType="audio/wav" /> |
||||
|
<mimeMap fileExtension=".wax" mimeType="audio/x-ms-wax" /> |
||||
|
<mimeMap fileExtension=".wbmp" mimeType="image/vnd.wap.wbmp" /> |
||||
|
<mimeMap fileExtension=".wcm" mimeType="application/vnd.ms-works" /> |
||||
|
<mimeMap fileExtension=".wdb" mimeType="application/vnd.ms-works" /> |
||||
|
<mimeMap fileExtension=".webm" mimeType="video/webm" /> |
||||
|
<mimeMap fileExtension=".wks" mimeType="application/vnd.ms-works" /> |
||||
|
<mimeMap fileExtension=".wm" mimeType="video/x-ms-wm" /> |
||||
|
<mimeMap fileExtension=".wma" mimeType="audio/x-ms-wma" /> |
||||
|
<mimeMap fileExtension=".wmd" mimeType="application/x-ms-wmd" /> |
||||
|
<mimeMap fileExtension=".wmf" mimeType="application/x-msmetafile" /> |
||||
|
<mimeMap fileExtension=".wml" mimeType="text/vnd.wap.wml" /> |
||||
|
<mimeMap fileExtension=".wmlc" mimeType="application/vnd.wap.wmlc" /> |
||||
|
<mimeMap fileExtension=".wmls" mimeType="text/vnd.wap.wmlscript" /> |
||||
|
<mimeMap fileExtension=".wmlsc" mimeType="application/vnd.wap.wmlscriptc" /> |
||||
|
<mimeMap fileExtension=".wmp" mimeType="video/x-ms-wmp" /> |
||||
|
<mimeMap fileExtension=".wmv" mimeType="video/x-ms-wmv" /> |
||||
|
<mimeMap fileExtension=".wmx" mimeType="video/x-ms-wmx" /> |
||||
|
<mimeMap fileExtension=".wmz" mimeType="application/x-ms-wmz" /> |
||||
|
<mimeMap fileExtension=".woff" mimeType="font/x-woff" /> |
||||
|
<mimeMap fileExtension=".woff2" mimeType="application/font-woff2" /> |
||||
|
<mimeMap fileExtension=".wps" mimeType="application/vnd.ms-works" /> |
||||
|
<mimeMap fileExtension=".wri" mimeType="application/x-mswrite" /> |
||||
|
<mimeMap fileExtension=".wrl" mimeType="x-world/x-vrml" /> |
||||
|
<mimeMap fileExtension=".wrz" mimeType="x-world/x-vrml" /> |
||||
|
<mimeMap fileExtension=".wsdl" mimeType="text/xml" /> |
||||
|
<mimeMap fileExtension=".wtv" mimeType="video/x-ms-wtv" /> |
||||
|
<mimeMap fileExtension=".wvx" mimeType="video/x-ms-wvx" /> |
||||
|
<mimeMap fileExtension=".x" mimeType="application/directx" /> |
||||
|
<mimeMap fileExtension=".xaf" mimeType="x-world/x-vrml" /> |
||||
|
<mimeMap fileExtension=".xaml" mimeType="application/xaml+xml" /> |
||||
|
<mimeMap fileExtension=".xap" mimeType="application/x-silverlight-app" /> |
||||
|
<mimeMap fileExtension=".xbap" mimeType="application/x-ms-xbap" /> |
||||
|
<mimeMap fileExtension=".xbm" mimeType="image/x-xbitmap" /> |
||||
|
<mimeMap fileExtension=".xdr" mimeType="text/plain" /> |
||||
|
<mimeMap fileExtension=".xht" mimeType="application/xhtml+xml" /> |
||||
|
<mimeMap fileExtension=".xhtml" mimeType="application/xhtml+xml" /> |
||||
|
<mimeMap fileExtension=".xla" mimeType="application/vnd.ms-excel" /> |
||||
|
<mimeMap fileExtension=".xlam" mimeType="application/vnd.ms-excel.addin.macroEnabled.12" /> |
||||
|
<mimeMap fileExtension=".xlc" mimeType="application/vnd.ms-excel" /> |
||||
|
<mimeMap fileExtension=".xlm" mimeType="application/vnd.ms-excel" /> |
||||
|
<mimeMap fileExtension=".xls" mimeType="application/vnd.ms-excel" /> |
||||
|
<mimeMap fileExtension=".xlsb" mimeType="application/vnd.ms-excel.sheet.binary.macroEnabled.12" /> |
||||
|
<mimeMap fileExtension=".xlsm" mimeType="application/vnd.ms-excel.sheet.macroEnabled.12" /> |
||||
|
<mimeMap fileExtension=".xlsx" mimeType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" /> |
||||
|
<mimeMap fileExtension=".xlt" mimeType="application/vnd.ms-excel" /> |
||||
|
<mimeMap fileExtension=".xltm" mimeType="application/vnd.ms-excel.template.macroEnabled.12" /> |
||||
|
<mimeMap fileExtension=".xltx" mimeType="application/vnd.openxmlformats-officedocument.spreadsheetml.template" /> |
||||
|
<mimeMap fileExtension=".xlw" mimeType="application/vnd.ms-excel" /> |
||||
|
<mimeMap fileExtension=".xml" mimeType="text/xml" /> |
||||
|
<mimeMap fileExtension=".xof" mimeType="x-world/x-vrml" /> |
||||
|
<mimeMap fileExtension=".xpm" mimeType="image/x-xpixmap" /> |
||||
|
<mimeMap fileExtension=".xps" mimeType="application/vnd.ms-xpsdocument" /> |
||||
|
<mimeMap fileExtension=".xsd" mimeType="text/xml" /> |
||||
|
<mimeMap fileExtension=".xsf" mimeType="text/xml" /> |
||||
|
<mimeMap fileExtension=".xsl" mimeType="text/xml" /> |
||||
|
<mimeMap fileExtension=".xslt" mimeType="text/xml" /> |
||||
|
<mimeMap fileExtension=".xsn" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".xtp" mimeType="application/octet-stream" /> |
||||
|
<mimeMap fileExtension=".xwd" mimeType="image/x-xwindowdump" /> |
||||
|
<mimeMap fileExtension=".z" mimeType="application/x-compress" /> |
||||
|
<mimeMap fileExtension=".zip" mimeType="application/x-zip-compressed" /> |
||||
|
</staticContent> |
||||
|
<tracing> |
||||
|
<traceFailedRequests> |
||||
|
<add path="*"> |
||||
|
<traceAreas> |
||||
|
<add provider="ASP" verbosity="Verbose" /> |
||||
|
<add provider="ASPNET" areas="Infrastructure,Module,Page,AppServices" verbosity="Verbose" /> |
||||
|
<add provider="ISAPI Extension" verbosity="Verbose" /> |
||||
|
<add provider="WWW Server" areas="Authentication,Security,Filter,StaticFile,CGI,Compression,Cache,RequestNotifications,Module,Rewrite,WebSocket" verbosity="Verbose" /> |
||||
|
</traceAreas> |
||||
|
<failureDefinitions statusCodes="200-999" /> |
||||
|
</add> |
||||
|
</traceFailedRequests> |
||||
|
<traceProviderDefinitions> |
||||
|
<add name="WWW Server" guid="{3a2a4e84-4c21-4981-ae10-3fda0d9b0f83}"> |
||||
|
<areas> |
||||
|
<clear /> |
||||
|
<add name="Authentication" value="2" /> |
||||
|
<add name="Security" value="4" /> |
||||
|
<add name="Filter" value="8" /> |
||||
|
<add name="StaticFile" value="16" /> |
||||
|
<add name="CGI" value="32" /> |
||||
|
<add name="Compression" value="64" /> |
||||
|
<add name="Cache" value="128" /> |
||||
|
<add name="RequestNotifications" value="256" /> |
||||
|
<add name="Module" value="512" /> |
||||
|
<add name="Rewrite" value="1024" /> |
||||
|
<add name="FastCGI" value="4096" /> |
||||
|
<add name="WebSocket" value="16384" /> |
||||
|
<add name="ANCM" value="65536" /> |
||||
|
</areas> |
||||
|
</add> |
||||
|
<add name="ASP" guid="{06b94d9a-b15e-456e-a4ef-37c984a2cb4b}"> |
||||
|
<areas> |
||||
|
<clear /> |
||||
|
</areas> |
||||
|
</add> |
||||
|
<add name="ISAPI Extension" guid="{a1c2040e-8840-4c31-ba11-9871031a19ea}"> |
||||
|
<areas> |
||||
|
<clear /> |
||||
|
</areas> |
||||
|
</add> |
||||
|
<add name="ASPNET" guid="{AFF081FE-0247-4275-9C4E-021F3DC1DA35}"> |
||||
|
<areas> |
||||
|
<add name="Infrastructure" value="1" /> |
||||
|
<add name="Module" value="2" /> |
||||
|
<add name="Page" value="4" /> |
||||
|
<add name="AppServices" value="8" /> |
||||
|
</areas> |
||||
|
</add> |
||||
|
</traceProviderDefinitions> |
||||
|
</tracing> |
||||
|
<urlCompression /> |
||||
|
<validation /> |
||||
|
<webdav> |
||||
|
<globalSettings> |
||||
|
<propertyStores> |
||||
|
<add name="webdav_simple_prop" image="%IIS_BIN%\webdav_simple_prop.dll" image32="%IIS_BIN%\webdav_simple_prop.dll" /> |
||||
|
</propertyStores> |
||||
|
<lockStores> |
||||
|
<add name="webdav_simple_lock" image="%IIS_BIN%\webdav_simple_lock.dll" image32="%IIS_BIN%\webdav_simple_lock.dll" /> |
||||
|
</lockStores> |
||||
|
</globalSettings> |
||||
|
<authoring> |
||||
|
<locks enabled="true" lockStore="webdav_simple_lock" /> |
||||
|
</authoring> |
||||
|
<authoringRules /> |
||||
|
</webdav> |
||||
|
<webSocket /> |
||||
|
<applicationInitialization /> |
||||
|
</system.webServer> |
||||
|
<location path="" overrideMode="Allow"> |
||||
|
<system.webServer> |
||||
|
<modules> |
||||
|
<add name="IsapiFilterModule" lockItem="true" /> |
||||
|
<add name="BasicAuthenticationModule" lockItem="true" /> |
||||
|
<add name="IsapiModule" lockItem="true" /> |
||||
|
<add name="HttpLoggingModule" lockItem="true" /> |
||||
|
<add name="DynamicCompressionModule" lockItem="true" /> |
||||
|
<add name="StaticCompressionModule" lockItem="true" /> |
||||
|
<add name="DefaultDocumentModule" lockItem="true" /> |
||||
|
<add name="DirectoryListingModule" lockItem="true" /> |
||||
|
<add name="ProtocolSupportModule" lockItem="true" /> |
||||
|
<add name="HttpRedirectionModule" lockItem="true" /> |
||||
|
<add name="ServerSideIncludeModule" lockItem="true" /> |
||||
|
<add name="StaticFileModule" lockItem="true" /> |
||||
|
<add name="AnonymousAuthenticationModule" lockItem="true" /> |
||||
|
<add name="CertificateMappingAuthenticationModule" lockItem="true" /> |
||||
|
<add name="UrlAuthorizationModule" lockItem="true" /> |
||||
|
<add name="WindowsAuthenticationModule" lockItem="true" /> |
||||
|
<add name="IISCertificateMappingAuthenticationModule" lockItem="true" /> |
||||
|
<add name="WebMatrixSupportModule" lockItem="true" /> |
||||
|
<add name="IpRestrictionModule" lockItem="true" /> |
||||
|
<add name="DynamicIpRestrictionModule" lockItem="true" /> |
||||
|
<add name="RequestFilteringModule" lockItem="true" /> |
||||
|
<add name="CustomLoggingModule" lockItem="true" /> |
||||
|
<add name="CustomErrorModule" lockItem="true" /> |
||||
|
<add name="FailedRequestsTracingModule" lockItem="true" /> |
||||
|
<add name="CgiModule" lockItem="true" /> |
||||
|
<add name="FastCgiModule" lockItem="true" /> |
||||
|
<!-- <add name="WebDAVModule" /> --> |
||||
|
<add name="RewriteModule" /> |
||||
|
<add name="OutputCache" type="System.Web.Caching.OutputCacheModule" preCondition="managedHandler" /> |
||||
|
<add name="Session" type="System.Web.SessionState.SessionStateModule" preCondition="managedHandler" /> |
||||
|
<add name="WindowsAuthentication" type="System.Web.Security.WindowsAuthenticationModule" preCondition="managedHandler" /> |
||||
|
<add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule" preCondition="managedHandler" /> |
||||
|
<add name="DefaultAuthentication" type="System.Web.Security.DefaultAuthenticationModule" preCondition="managedHandler" /> |
||||
|
<add name="RoleManager" type="System.Web.Security.RoleManagerModule" preCondition="managedHandler" /> |
||||
|
<add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule" preCondition="managedHandler" /> |
||||
|
<add name="FileAuthorization" type="System.Web.Security.FileAuthorizationModule" preCondition="managedHandler" /> |
||||
|
<add name="AnonymousIdentification" type="System.Web.Security.AnonymousIdentificationModule" preCondition="managedHandler" /> |
||||
|
<add name="Profile" type="System.Web.Profile.ProfileModule" preCondition="managedHandler" /> |
||||
|
<add name="UrlMappingsModule" type="System.Web.UrlMappingsModule" preCondition="managedHandler" /> |
||||
|
<add name="ApplicationInitializationModule" lockItem="true" /> |
||||
|
<add name="WebSocketModule" lockItem="true" /> |
||||
|
<add name="ServiceModel-4.0" type="System.ServiceModel.Activation.ServiceHttpModule,System.ServiceModel.Activation,Version=4.0.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35" preCondition="managedHandler,runtimeVersionv4.0" /> |
||||
|
<add name="ConfigurationValidationModule" lockItem="true" /> |
||||
|
<add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" preCondition="managedHandler,runtimeVersionv4.0" /> |
||||
|
<add name="ScriptModule-4.0" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="managedHandler,runtimeVersionv4.0" /> |
||||
|
<add name="ServiceModel" type="System.ServiceModel.Activation.HttpModule, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="managedHandler,runtimeVersionv2.0" /> |
||||
|
<add name="AspNetCoreModule" lockItem="true" /> |
||||
|
<add name="AspNetCoreModuleV2" lockItem="true" /> |
||||
|
</modules> |
||||
|
<handlers accessPolicy="Read, Script"> |
||||
|
<!-- <add name="WebDAV" path="*" verb="PROPFIND,PROPPATCH,MKCOL,PUT,COPY,DELETE,MOVE,LOCK,UNLOCK" modules="WebDAVModule" resourceType="Unspecified" requireAccess="None" /> --> |
||||
|
<add name="AXD-ISAPI-4.0_64bit" path="*.axd" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" /> |
||||
|
<add name="PageHandlerFactory-ISAPI-4.0_64bit" path="*.aspx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" /> |
||||
|
<add name="SimpleHandlerFactory-ISAPI-4.0_64bit" path="*.ashx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" /> |
||||
|
<add name="WebServiceHandlerFactory-ISAPI-4.0_64bit" path="*.asmx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" /> |
||||
|
<add name="HttpRemotingHandlerFactory-rem-ISAPI-4.0_64bit" path="*.rem" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" /> |
||||
|
<add name="HttpRemotingHandlerFactory-soap-ISAPI-4.0_64bit" path="*.soap" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" /> |
||||
|
<add name="svc-ISAPI-4.0_64bit" path="*.svc" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" /> |
||||
|
<add name="rules-ISAPI-4.0_64bit" path="*.rules" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" /> |
||||
|
<add name="xoml-ISAPI-4.0_64bit" path="*.xoml" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" /> |
||||
|
<add name="xamlx-ISAPI-4.0_64bit" path="*.xamlx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" /> |
||||
|
<add name="aspq-ISAPI-4.0_64bit" path="*.aspq" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" /> |
||||
|
<add name="cshtm-ISAPI-4.0_64bit" path="*.cshtm" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" /> |
||||
|
<add name="cshtml-ISAPI-4.0_64bit" path="*.cshtml" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" /> |
||||
|
<add name="vbhtm-ISAPI-4.0_64bit" path="*.vbhtm" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" /> |
||||
|
<add name="vbhtml-ISAPI-4.0_64bit" path="*.vbhtml" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" /> |
||||
|
<add name="svc-Integrated" path="*.svc" verb="*" type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="integratedMode,runtimeVersionv2.0" /> |
||||
|
<add name="svc-ISAPI-2.0" path="*.svc" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness32" /> |
||||
|
<add name="xoml-Integrated" path="*.xoml" verb="*" type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="integratedMode,runtimeVersionv2.0" /> |
||||
|
<add name="xoml-ISAPI-2.0" path="*.xoml" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness32" /> |
||||
|
<add name="rules-Integrated" path="*.rules" verb="*" type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="integratedMode,runtimeVersionv2.0" /> |
||||
|
<add name="rules-ISAPI-2.0" path="*.rules" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness32" /> |
||||
|
<add name="AXD-ISAPI-4.0_32bit" path="*.axd" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" /> |
||||
|
<add name="PageHandlerFactory-ISAPI-4.0_32bit" path="*.aspx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" /> |
||||
|
<add name="SimpleHandlerFactory-ISAPI-4.0_32bit" path="*.ashx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" /> |
||||
|
<add name="WebServiceHandlerFactory-ISAPI-4.0_32bit" path="*.asmx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" /> |
||||
|
<add name="HttpRemotingHandlerFactory-rem-ISAPI-4.0_32bit" path="*.rem" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" /> |
||||
|
<add name="HttpRemotingHandlerFactory-soap-ISAPI-4.0_32bit" path="*.soap" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" /> |
||||
|
<add name="svc-ISAPI-4.0_32bit" path="*.svc" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" /> |
||||
|
<add name="rules-ISAPI-4.0_32bit" path="*.rules" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" /> |
||||
|
<add name="xoml-ISAPI-4.0_32bit" path="*.xoml" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" /> |
||||
|
<add name="xamlx-ISAPI-4.0_32bit" path="*.xamlx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" /> |
||||
|
<add name="aspq-ISAPI-4.0_32bit" path="*.aspq" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" /> |
||||
|
<add name="cshtm-ISAPI-4.0_32bit" path="*.cshtm" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" /> |
||||
|
<add name="cshtml-ISAPI-4.0_32bit" path="*.cshtml" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" /> |
||||
|
<add name="vbhtm-ISAPI-4.0_32bit" path="*.vbhtm" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" /> |
||||
|
<add name="vbhtml-ISAPI-4.0_32bit" path="*.vbhtml" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" /> |
||||
|
<add name="TraceHandler-Integrated-4.0" path="trace.axd" verb="GET,HEAD,POST,DEBUG" type="System.Web.Handlers.TraceHandler" preCondition="integratedMode,runtimeVersionv4.0" /> |
||||
|
<add name="WebAdminHandler-Integrated-4.0" path="WebAdmin.axd" verb="GET,DEBUG" type="System.Web.Handlers.WebAdminHandler" preCondition="integratedMode,runtimeVersionv4.0" /> |
||||
|
<add name="AssemblyResourceLoader-Integrated-4.0" path="WebResource.axd" verb="GET,DEBUG" type="System.Web.Handlers.AssemblyResourceLoader" preCondition="integratedMode,runtimeVersionv4.0" /> |
||||
|
<add name="PageHandlerFactory-Integrated-4.0" path="*.aspx" verb="GET,HEAD,POST,DEBUG" type="System.Web.UI.PageHandlerFactory" preCondition="integratedMode,runtimeVersionv4.0" /> |
||||
|
<add name="SimpleHandlerFactory-Integrated-4.0" path="*.ashx" verb="GET,HEAD,POST,DEBUG" type="System.Web.UI.SimpleHandlerFactory" preCondition="integratedMode,runtimeVersionv4.0" /> |
||||
|
<add name="WebServiceHandlerFactory-Integrated-4.0" path="*.asmx" verb="GET,HEAD,POST,DEBUG" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="integratedMode,runtimeVersionv4.0" /> |
||||
|
<add name="HttpRemotingHandlerFactory-rem-Integrated-4.0" path="*.rem" verb="GET,HEAD,POST,DEBUG" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="integratedMode,runtimeVersionv4.0" /> |
||||
|
<add name="HttpRemotingHandlerFactory-soap-Integrated-4.0" path="*.soap" verb="GET,HEAD,POST,DEBUG" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="integratedMode,runtimeVersionv4.0" /> |
||||
|
<add name="svc-Integrated-4.0" path="*.svc" verb="*" type="System.ServiceModel.Activation.ServiceHttpHandlerFactory, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="integratedMode,runtimeVersionv4.0" /> |
||||
|
<add name="rules-Integrated-4.0" path="*.rules" verb="*" type="System.ServiceModel.Activation.ServiceHttpHandlerFactory, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="integratedMode,runtimeVersionv4.0" /> |
||||
|
<add name="xoml-Integrated-4.0" path="*.xoml" verb="*" type="System.ServiceModel.Activation.ServiceHttpHandlerFactory, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="integratedMode,runtimeVersionv4.0" /> |
||||
|
<add name="xamlx-Integrated-4.0" path="*.xamlx" verb="GET,HEAD,POST,DEBUG" type="System.Xaml.Hosting.XamlHttpHandlerFactory, System.Xaml.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="integratedMode,runtimeVersionv4.0" /> |
||||
|
<add name="aspq-Integrated-4.0" path="*.aspq" verb="GET,HEAD,POST,DEBUG" type="System.Web.HttpForbiddenHandler" preCondition="integratedMode,runtimeVersionv4.0" /> |
||||
|
<add name="cshtm-Integrated-4.0" path="*.cshtm" verb="GET,HEAD,POST,DEBUG" type="System.Web.HttpForbiddenHandler" preCondition="integratedMode,runtimeVersionv4.0" /> |
||||
|
<add name="cshtml-Integrated-4.0" path="*.cshtml" verb="GET,HEAD,POST,DEBUG" type="System.Web.HttpForbiddenHandler" preCondition="integratedMode,runtimeVersionv4.0" /> |
||||
|
<add name="vbhtm-Integrated-4.0" path="*.vbhtm" verb="GET,HEAD,POST,DEBUG" type="System.Web.HttpForbiddenHandler" preCondition="integratedMode,runtimeVersionv4.0" /> |
||||
|
<add name="vbhtml-Integrated-4.0" path="*.vbhtml" verb="GET,HEAD,POST,DEBUG" type="System.Web.HttpForbiddenHandler" preCondition="integratedMode,runtimeVersionv4.0" /> |
||||
|
<add name="ScriptHandlerFactoryAppServices-Integrated-4.0" path="*_AppService.axd" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" preCondition="integratedMode,runtimeVersionv4.0" /> |
||||
|
<add name="ScriptResourceIntegrated-4.0" path="*ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" preCondition="integratedMode,runtimeVersionv4.0" /> |
||||
|
<add name="ASPClassic" path="*.asp" verb="GET,HEAD,POST" modules="IsapiModule" scriptProcessor="%IIS_BIN%\asp.dll" resourceType="File" /> |
||||
|
<add name="SecurityCertificate" path="*.cer" verb="GET,HEAD,POST" modules="IsapiModule" scriptProcessor="%IIS_BIN%\asp.dll" resourceType="File" /> |
||||
|
<add name="ISAPI-dll" path="*.dll" verb="*" modules="IsapiModule" resourceType="File" requireAccess="Execute" allowPathInfo="true" /> |
||||
|
<add name="TraceHandler-Integrated" path="trace.axd" verb="GET,HEAD,POST,DEBUG" type="System.Web.Handlers.TraceHandler" preCondition="integratedMode,runtimeVersionv2.0" /> |
||||
|
<add name="WebAdminHandler-Integrated" path="WebAdmin.axd" verb="GET,DEBUG" type="System.Web.Handlers.WebAdminHandler" preCondition="integratedMode,runtimeVersionv2.0" /> |
||||
|
<add name="AssemblyResourceLoader-Integrated" path="WebResource.axd" verb="GET,DEBUG" type="System.Web.Handlers.AssemblyResourceLoader" preCondition="integratedMode,runtimeVersionv2.0" /> |
||||
|
<add name="PageHandlerFactory-Integrated" path="*.aspx" verb="GET,HEAD,POST,DEBUG" type="System.Web.UI.PageHandlerFactory" preCondition="integratedMode,runtimeVersionv2.0" /> |
||||
|
<add name="SimpleHandlerFactory-Integrated" path="*.ashx" verb="GET,HEAD,POST,DEBUG" type="System.Web.UI.SimpleHandlerFactory" preCondition="integratedMode,runtimeVersionv2.0" /> |
||||
|
<add name="WebServiceHandlerFactory-Integrated" path="*.asmx" verb="GET,HEAD,POST,DEBUG" type="System.Web.Services.Protocols.WebServiceHandlerFactory,System.Web.Services,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a" preCondition="integratedMode,runtimeVersionv2.0" /> |
||||
|
<add name="HttpRemotingHandlerFactory-rem-Integrated" path="*.rem" verb="GET,HEAD,POST,DEBUG" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory,System.Runtime.Remoting,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089" preCondition="integratedMode,runtimeVersionv2.0" /> |
||||
|
<add name="HttpRemotingHandlerFactory-soap-Integrated" path="*.soap" verb="GET,HEAD,POST,DEBUG" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory,System.Runtime.Remoting,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089" preCondition="integratedMode,runtimeVersionv2.0" /> |
||||
|
<add name="AXD-ISAPI-2.0" path="*.axd" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" /> |
||||
|
<add name="PageHandlerFactory-ISAPI-2.0" path="*.aspx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" /> |
||||
|
<add name="SimpleHandlerFactory-ISAPI-2.0" path="*.ashx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" /> |
||||
|
<add name="WebServiceHandlerFactory-ISAPI-2.0" path="*.asmx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" /> |
||||
|
<add name="HttpRemotingHandlerFactory-rem-ISAPI-2.0" path="*.rem" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" /> |
||||
|
<add name="HttpRemotingHandlerFactory-soap-ISAPI-2.0" path="*.soap" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" /> |
||||
|
<add name="svc-ISAPI-2.0-64" path="*.svc" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness64" /> |
||||
|
<add name="AXD-ISAPI-2.0-64" path="*.axd" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness64" responseBufferLimit="0" /> |
||||
|
<add name="PageHandlerFactory-ISAPI-2.0-64" path="*.aspx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness64" responseBufferLimit="0" /> |
||||
|
<add name="SimpleHandlerFactory-ISAPI-2.0-64" path="*.ashx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness64" responseBufferLimit="0" /> |
||||
|
<add name="WebServiceHandlerFactory-ISAPI-2.0-64" path="*.asmx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness64" responseBufferLimit="0" /> |
||||
|
<add name="HttpRemotingHandlerFactory-rem-ISAPI-2.0-64" path="*.rem" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness64" responseBufferLimit="0" /> |
||||
|
<add name="HttpRemotingHandlerFactory-soap-ISAPI-2.0-64" path="*.soap" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness64" responseBufferLimit="0" /> |
||||
|
<add name="rules-64-ISAPI-2.0" path="*.rules" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness64" /> |
||||
|
<add name="xoml-64-ISAPI-2.0" path="*.xoml" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness64" /> |
||||
|
<add name="CGI-exe" path="*.exe" verb="*" modules="CgiModule" resourceType="File" requireAccess="Execute" allowPathInfo="true" /> |
||||
|
<add name="SSINC-stm" path="*.stm" verb="GET,HEAD,POST" modules="ServerSideIncludeModule" resourceType="File" /> |
||||
|
<add name="SSINC-shtm" path="*.shtm" verb="GET,HEAD,POST" modules="ServerSideIncludeModule" resourceType="File" /> |
||||
|
<add name="SSINC-shtml" path="*.shtml" verb="GET,HEAD,POST" modules="ServerSideIncludeModule" resourceType="File" /> |
||||
|
<add name="TRACEVerbHandler" path="*" verb="TRACE" modules="ProtocolSupportModule" requireAccess="None" /> |
||||
|
<add name="OPTIONSVerbHandler" path="*" verb="OPTIONS" modules="ProtocolSupportModule" requireAccess="None" /> |
||||
|
<add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" /> |
||||
|
<add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" /> |
||||
|
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" responseBufferLimit="0" /> |
||||
|
<add name="StaticFile" path="*" verb="*" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" resourceType="Either" requireAccess="Read" /> |
||||
|
</handlers> |
||||
|
</system.webServer> |
||||
|
</location> |
||||
|
<location path="Znyc.Dispatching.Web.Entry" inheritInChildApplications="false"> |
||||
|
<system.webServer> |
||||
|
<modules> |
||||
|
<remove name="WebMatrixSupportModule" /> |
||||
|
</modules> |
||||
|
<handlers> |
||||
|
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" /> |
||||
|
</handlers> |
||||
|
<aspNetCore processPath="%LAUNCHER_PATH%" stdoutLogEnabled="false" hostingModel="InProcess" startupTimeLimit="3600" requestTimeout="23:00:00" /> |
||||
|
<httpCompression> |
||||
|
<dynamicTypes> |
||||
|
<add mimeType="text/event-stream" enabled="false" /> |
||||
|
</dynamicTypes> |
||||
|
</httpCompression> |
||||
|
</system.webServer> |
||||
|
</location> |
||||
|
</configuration> |
Binary file not shown.
@ -0,0 +1,69 @@ |
|||||
|
{ |
||||
|
// 使用 IntelliSense 了解相关属性。 |
||||
|
// 悬停以查看现有属性的描述。 |
||||
|
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 |
||||
|
"version": "0.2.0", |
||||
|
"configurations": [ |
||||
|
{ |
||||
|
"name": ".NET Core Launch (console)", |
||||
|
"type": "coreclr", |
||||
|
"request": "launch", |
||||
|
"preLaunchTask": "build", |
||||
|
"program": "${workspaceFolder}/bin/Debug/<target-framework>/<project-name.dll>", |
||||
|
"args": [], |
||||
|
"cwd": "${workspaceFolder}", |
||||
|
"stopAtEntry": false, |
||||
|
"console": "internalConsole", |
||||
|
"pipeTransport": { |
||||
|
"pipeCwd": "${workspaceFolder}", |
||||
|
"pipeProgram": "enter the fully qualified path for the pipe program name, for example '/usr/bin/ssh'", |
||||
|
"pipeArgs": [], |
||||
|
"debuggerPath": "enter the path for the debugger on the target machine, for example ~/vsdbg/vsdbg" |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
"name": ".NET Core Launch (web)", |
||||
|
"type": "coreclr", |
||||
|
"request": "launch", |
||||
|
"preLaunchTask": "build", |
||||
|
"program": "${workspaceFolder}/bin/Debug/<target-framework>/<project-name.dll>", |
||||
|
"args": [], |
||||
|
"cwd": "${workspaceFolder}", |
||||
|
"stopAtEntry": false, |
||||
|
"serverReadyAction": { |
||||
|
"action": "openExternally", |
||||
|
"pattern": "\\bNow listening on:\\s+(https?://\\S+)" |
||||
|
}, |
||||
|
"env": { |
||||
|
"ASPNETCORE_ENVIRONMENT": "Development" |
||||
|
}, |
||||
|
"sourceFileMap": { |
||||
|
"/Views": "${workspaceFolder}/Views" |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
"name": ".NET Core Launch (console)", |
||||
|
"type": "coreclr", |
||||
|
"request": "launch", |
||||
|
"preLaunchTask": "build", |
||||
|
"program": "${workspaceFolder}/bin/Debug/<target-framework>/<project-name.dll>", |
||||
|
"args": [], |
||||
|
"cwd": "${workspaceFolder}", |
||||
|
"stopAtEntry": false, |
||||
|
"console": "internalConsole" |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
"name": ".NET Core Launch (console)", |
||||
|
"type": "coreclr", |
||||
|
"request": "launch", |
||||
|
"preLaunchTask": "build", |
||||
|
"program": "${workspaceFolder}/bin/Debug/<target-framework>/<project-name.dll>", |
||||
|
"args": [], |
||||
|
"cwd": "${workspaceFolder}", |
||||
|
"stopAtEntry": false, |
||||
|
"console": "internalConsole" |
||||
|
} |
||||
|
|
||||
|
] |
||||
|
} |
@ -0,0 +1,8 @@ |
|||||
|
using System; |
||||
|
|
||||
|
namespace {{namespace}} |
||||
|
{ |
||||
|
public class {{name}} |
||||
|
{ |
||||
|
} |
||||
|
} |
@ -0,0 +1,3 @@ |
|||||
|
export class {{name}} { |
||||
|
|
||||
|
} |
@ -0,0 +1,9 @@ |
|||||
|
Imports System |
||||
|
|
||||
|
Namespace {{namespace}} |
||||
|
|
||||
|
Public Class {{name}} |
||||
|
|
||||
|
End Class |
||||
|
|
||||
|
End Namespace |
@ -0,0 +1,3 @@ |
|||||
|
export default {{name}} { |
||||
|
|
||||
|
} |
@ -0,0 +1,8 @@ |
|||||
|
using System; |
||||
|
|
||||
|
namespace {{namespace}} |
||||
|
{ |
||||
|
public enum {{name}} |
||||
|
{ |
||||
|
} |
||||
|
} |
@ -0,0 +1,8 @@ |
|||||
|
using System; |
||||
|
|
||||
|
namespace {{namespace}} |
||||
|
{ |
||||
|
public interface {{name}} |
||||
|
{ |
||||
|
} |
||||
|
} |
@ -0,0 +1,3 @@ |
|||||
|
export interface {{name}} { |
||||
|
|
||||
|
} |
@ -0,0 +1,46 @@ |
|||||
|
{ |
||||
|
"templates": [ |
||||
|
{ |
||||
|
"name": "Class", |
||||
|
"extension": "cs", |
||||
|
"file": "./class.cs-template", |
||||
|
"parameters": "./template-parameters.js" |
||||
|
}, |
||||
|
{ |
||||
|
"name": "Interface", |
||||
|
"extension": "cs", |
||||
|
"file": "./interface.cs-template", |
||||
|
"parameters": "./template-parameters.js" |
||||
|
}, |
||||
|
{ |
||||
|
"name": "Enum", |
||||
|
"extension": "cs", |
||||
|
"file": "./enum.cs-template", |
||||
|
"parameters": "./template-parameters.js" |
||||
|
}, |
||||
|
{ |
||||
|
"name": "Class", |
||||
|
"extension": "ts", |
||||
|
"file": "./class.ts-template", |
||||
|
"parameters": "./template-parameters.js" |
||||
|
}, |
||||
|
{ |
||||
|
"name": "Interface", |
||||
|
"extension": "ts", |
||||
|
"file": "./interface.ts-template", |
||||
|
"parameters": "./template-parameters.js" |
||||
|
}, |
||||
|
{ |
||||
|
"name": "Default", |
||||
|
"extension": "ts", |
||||
|
"file": "./default.ts-template", |
||||
|
"parameters": "./template-parameters.js" |
||||
|
}, |
||||
|
{ |
||||
|
"name": "Class", |
||||
|
"extension": "vb", |
||||
|
"file": "./class.vb-template", |
||||
|
"parameters": "./template-parameters.js" |
||||
|
} |
||||
|
] |
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
var path = require("path"); |
||||
|
|
||||
|
module.exports = function(filename, projectPath, folderPath) { |
||||
|
var namespace = "Unknown"; |
||||
|
if (projectPath) { |
||||
|
namespace = path.basename(projectPath, path.extname(projectPath)); |
||||
|
if (folderPath) { |
||||
|
namespace += "." + folderPath.replace(path.dirname(projectPath), "").substring(1).replace(/[\\\/]/g, "."); |
||||
|
} |
||||
|
namespace = namespace.replace(/[\\\-]/g, "_"); |
||||
|
} |
||||
|
|
||||
|
return { |
||||
|
namespace: namespace, |
||||
|
name: path.basename(filename, path.extname(filename)) |
||||
|
} |
||||
|
}; |
@ -0,0 +1,24 @@ |
|||||
|
{ |
||||
|
// See https://go.microsoft.com/fwlink/?LinkId=733558 |
||||
|
// for the documentation about the tasks.json format |
||||
|
"version": "2.0.0", |
||||
|
"tasks": [ |
||||
|
{ |
||||
|
"label": "build", |
||||
|
"command": "dotnet", |
||||
|
"type": "shell", |
||||
|
"args": [ |
||||
|
"build", |
||||
|
// Ask dotnet build to generate full paths for file names. |
||||
|
"/property:GenerateFullPaths=true", |
||||
|
// Do not generate summary otherwise it leads to duplicate errors in Problems panel |
||||
|
"/consoleloggerparameters:NoSummary" |
||||
|
], |
||||
|
"group": "build", |
||||
|
"presentation": { |
||||
|
"reveal": "silent" |
||||
|
}, |
||||
|
"problemMatcher": "$msCompile" |
||||
|
} |
||||
|
] |
||||
|
} |
@ -0,0 +1,34 @@ |
|||||
|
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. |
||||
|
|
||||
|
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base |
||||
|
WORKDIR /app |
||||
|
EXPOSE 80 |
||||
|
EXPOSE 443 |
||||
|
|
||||
|
ENV TZ=Asia/Shanghai |
||||
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone |
||||
|
|
||||
|
|
||||
|
|
||||
|
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build |
||||
|
WORKDIR /src |
||||
|
COPY ["Znyc.Dispatching.Web.Entry/Znyc.Dispatching.Web.Entry.csproj", "Znyc.Dispatching.Web.Entry/"] |
||||
|
COPY ["Znyc.Dispatching.Web.Core/Znyc.Dispatching.Web.Core.csproj", "Znyc.Dispatching.Web.Core/"] |
||||
|
COPY ["Znyc.Dispatching.Database.Migrations/Znyc.Dispatching.Database.Migrations.csproj", "Znyc.Dispatching.Database.Migrations/"] |
||||
|
COPY ["Znyc.Dispatching.EntityFramework.Core/Znyc.Dispatching.EntityFramework.Core.csproj", "Znyc.Dispatching.EntityFramework.Core/"] |
||||
|
COPY ["Znyc.Dispatching.Core/Znyc.Dispatching.Core.csproj", "Znyc.Dispatching.Core/"] |
||||
|
COPY ["Znyc.Dispatching.Application/Znyc.Dispatching.Application.csproj", "Znyc.Dispatching.Application/"] |
||||
|
COPY ["Znyc.Dispatching.MongoDb.Repository/Znyc.Dispatching.MongoDb.Repository.csproj", "Znyc.Dispatching.MongoDb.Repository/"] |
||||
|
COPY ["Znyc.Dispatching.WeChat.Core/Znyc.Dispatching.WeChat.Core.csproj", "Znyc.Dispatching.WeChat.Core/"] |
||||
|
RUN dotnet restore "Znyc.Dispatching.Web.Entry/Znyc.Dispatching.Web.Entry.csproj" |
||||
|
COPY . . |
||||
|
WORKDIR "/src/Znyc.Dispatching.Web.Entry" |
||||
|
RUN dotnet build "Znyc.Dispatching.Web.Entry.csproj" -c Release -o /app/build |
||||
|
|
||||
|
FROM build AS publish |
||||
|
RUN dotnet publish "Znyc.Dispatching.Web.Entry.csproj" -c Release -o /app/publish |
||||
|
|
||||
|
FROM base AS final |
||||
|
WORKDIR /app |
||||
|
COPY --from=publish /app/publish . |
||||
|
ENTRYPOINT ["dotnet", "Znyc.Dispatching.Web.Entry.dll"] |
@ -0,0 +1,25 @@ |
|||||
|
**/.classpath |
||||
|
**/.dockerignore |
||||
|
**/.env |
||||
|
**/.git |
||||
|
**/.gitignore |
||||
|
**/.project |
||||
|
**/.settings |
||||
|
**/.toolstarget |
||||
|
**/.vs |
||||
|
**/.vscode |
||||
|
**/*.*proj.user |
||||
|
**/*.dbmdl |
||||
|
**/*.jfm |
||||
|
**/azds.yaml |
||||
|
**/bin |
||||
|
**/charts |
||||
|
**/docker-compose* |
||||
|
**/Dockerfile* |
||||
|
**/node_modules |
||||
|
**/npm-debug.log |
||||
|
**/obj |
||||
|
**/secrets.dev.yaml |
||||
|
**/values.dev.yaml |
||||
|
LICENSE |
||||
|
README.md |
@ -0,0 +1,28 @@ |
|||||
|
## Ignore Visual Studio temporary files, build results, and |
||||
|
## files generated by popular Visual Studio add-ons. |
||||
|
|
||||
|
# User-specific files |
||||
|
*.suo |
||||
|
*.user |
||||
|
*.userosscache |
||||
|
*.sln.docstates |
||||
|
*.log |
||||
|
|
||||
|
# User-specific files (MonoDevelop/Xamarin Studio) |
||||
|
*.userprefs |
||||
|
|
||||
|
# Build results |
||||
|
[Dd]ebug/ |
||||
|
[Dd]ebugPublic/ |
||||
|
[Rr]elease/ |
||||
|
[Rr]eleases/ |
||||
|
x64/ |
||||
|
x86/ |
||||
|
bld/ |
||||
|
[Bb]in/ |
||||
|
[Oo]bj/ |
||||
|
[Ll]og/ |
||||
|
|
||||
|
# Visual Studio 2015 cache/options directory |
||||
|
.vs/ |
||||
|
# Uncomment if you have tasks that create the |
@ -0,0 +1,34 @@ |
|||||
|
{ |
||||
|
// 使用 IntelliSense 了解相关属性。 |
||||
|
// 悬停以查看现有属性的描述。 |
||||
|
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 |
||||
|
"version": "0.2.0", |
||||
|
"configurations": [ |
||||
|
{ |
||||
|
"name": ".NET Core Launch (web)", |
||||
|
"type": "coreclr", |
||||
|
"request": "launch", |
||||
|
"preLaunchTask": "build", |
||||
|
"program": "${workspaceFolder}/Znyc.Dispatching.Web.Entry/bin/Debug/net5.0/Znyc.Dispatching.Web.Entry.dll", |
||||
|
"args": [], |
||||
|
"cwd": "${workspaceFolder}/Znyc.Dispatching.Web.Entry", |
||||
|
"stopAtEntry": false, |
||||
|
"serverReadyAction": { |
||||
|
"action": "openExternally", |
||||
|
"pattern": "\\bNow listening on:\\s+(https?://\\S+)" |
||||
|
}, |
||||
|
"env": { |
||||
|
"ASPNETCORE_ENVIRONMENT": "Development" |
||||
|
}, |
||||
|
"sourceFileMap": { |
||||
|
"/Views": "${workspaceFolder}/Views" |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
"name": ".NET Core Attach", |
||||
|
"type": "coreclr", |
||||
|
"request": "attach", |
||||
|
"processId": "${command:pickProcess}" |
||||
|
} |
||||
|
] |
||||
|
} |
@ -0,0 +1,8 @@ |
|||||
|
using System; |
||||
|
|
||||
|
namespace {{namespace}} |
||||
|
{ |
||||
|
public class {{name}} |
||||
|
{ |
||||
|
} |
||||
|
} |
@ -0,0 +1,3 @@ |
|||||
|
export class {{name}} { |
||||
|
|
||||
|
} |
@ -0,0 +1,9 @@ |
|||||
|
Imports System |
||||
|
|
||||
|
Namespace {{namespace}} |
||||
|
|
||||
|
Public Class {{name}} |
||||
|
|
||||
|
End Class |
||||
|
|
||||
|
End Namespace |
@ -0,0 +1,3 @@ |
|||||
|
export default {{name}} { |
||||
|
|
||||
|
} |
@ -0,0 +1,8 @@ |
|||||
|
using System; |
||||
|
|
||||
|
namespace {{namespace}} |
||||
|
{ |
||||
|
public enum {{name}} |
||||
|
{ |
||||
|
} |
||||
|
} |
@ -0,0 +1,8 @@ |
|||||
|
using System; |
||||
|
|
||||
|
namespace {{namespace}} |
||||
|
{ |
||||
|
public interface {{name}} |
||||
|
{ |
||||
|
} |
||||
|
} |
@ -0,0 +1,3 @@ |
|||||
|
export interface {{name}} { |
||||
|
|
||||
|
} |
@ -0,0 +1,46 @@ |
|||||
|
{ |
||||
|
"templates": [ |
||||
|
{ |
||||
|
"name": "Class", |
||||
|
"extension": "cs", |
||||
|
"file": "./class.cs-template", |
||||
|
"parameters": "./template-parameters.js" |
||||
|
}, |
||||
|
{ |
||||
|
"name": "Interface", |
||||
|
"extension": "cs", |
||||
|
"file": "./interface.cs-template", |
||||
|
"parameters": "./template-parameters.js" |
||||
|
}, |
||||
|
{ |
||||
|
"name": "Enum", |
||||
|
"extension": "cs", |
||||
|
"file": "./enum.cs-template", |
||||
|
"parameters": "./template-parameters.js" |
||||
|
}, |
||||
|
{ |
||||
|
"name": "Class", |
||||
|
"extension": "ts", |
||||
|
"file": "./class.ts-template", |
||||
|
"parameters": "./template-parameters.js" |
||||
|
}, |
||||
|
{ |
||||
|
"name": "Interface", |
||||
|
"extension": "ts", |
||||
|
"file": "./interface.ts-template", |
||||
|
"parameters": "./template-parameters.js" |
||||
|
}, |
||||
|
{ |
||||
|
"name": "Default", |
||||
|
"extension": "ts", |
||||
|
"file": "./default.ts-template", |
||||
|
"parameters": "./template-parameters.js" |
||||
|
}, |
||||
|
{ |
||||
|
"name": "Class", |
||||
|
"extension": "vb", |
||||
|
"file": "./class.vb-template", |
||||
|
"parameters": "./template-parameters.js" |
||||
|
} |
||||
|
] |
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
var path = require("path"); |
||||
|
|
||||
|
module.exports = function(filename, projectPath, folderPath) { |
||||
|
var namespace = "Unknown"; |
||||
|
if (projectPath) { |
||||
|
namespace = path.basename(projectPath, path.extname(projectPath)); |
||||
|
if (folderPath) { |
||||
|
namespace += "." + folderPath.replace(path.dirname(projectPath), "").substring(1).replace(/[\\\/]/g, "."); |
||||
|
} |
||||
|
namespace = namespace.replace(/[\\\-]/g, "_"); |
||||
|
} |
||||
|
|
||||
|
return { |
||||
|
namespace: namespace, |
||||
|
name: path.basename(filename, path.extname(filename)) |
||||
|
} |
||||
|
}; |
@ -0,0 +1,42 @@ |
|||||
|
{ |
||||
|
"version": "2.0.0", |
||||
|
"tasks": [ |
||||
|
{ |
||||
|
"label": "build", |
||||
|
"command": "dotnet", |
||||
|
"type": "process", |
||||
|
"args": [ |
||||
|
"build", |
||||
|
"${workspaceFolder}/Znyc.Dispatching.Web.Entry/Znyc.Dispatching.Web.Entry.csproj", |
||||
|
"/property:GenerateFullPaths=true", |
||||
|
"/consoleloggerparameters:NoSummary" |
||||
|
], |
||||
|
"problemMatcher": "$msCompile" |
||||
|
}, |
||||
|
{ |
||||
|
"label": "publish", |
||||
|
"command": "dotnet", |
||||
|
"type": "process", |
||||
|
"args": [ |
||||
|
"publish", |
||||
|
"${workspaceFolder}/Znyc.Dispatching.Web.Entry/Znyc.Dispatching.Web.Entry.csproj", |
||||
|
"/property:GenerateFullPaths=true", |
||||
|
"/consoleloggerparameters:NoSummary" |
||||
|
], |
||||
|
"problemMatcher": "$msCompile" |
||||
|
}, |
||||
|
{ |
||||
|
"label": "watch", |
||||
|
"command": "dotnet", |
||||
|
"type": "process", |
||||
|
"args": [ |
||||
|
"watch", |
||||
|
"run", |
||||
|
"${workspaceFolder}/Znyc.Dispatching.Web.Entry/Znyc.Dispatching.Web.Entry.csproj", |
||||
|
"/property:GenerateFullPaths=true", |
||||
|
"/consoleloggerparameters:NoSummary" |
||||
|
], |
||||
|
"problemMatcher": "$msCompile" |
||||
|
} |
||||
|
] |
||||
|
} |
@ -0,0 +1,33 @@ |
|||||
|
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. |
||||
|
|
||||
|
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base |
||||
|
WORKDIR /app |
||||
|
EXPOSE 80 |
||||
|
EXPOSE 443 |
||||
|
|
||||
|
ENV TZ=Asia/Shanghai |
||||
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone |
||||
|
|
||||
|
|
||||
|
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build |
||||
|
WORKDIR /src |
||||
|
COPY ["Znyc.Dispatching.Web.Entry/Znyc.Dispatching.Web.Entry.csproj", "Znyc.Dispatching.Web.Entry/"] |
||||
|
COPY ["Znyc.Dispatching.Web.Core/Znyc.Dispatching.Web.Core.csproj", "Znyc.Dispatching.Web.Core/"] |
||||
|
COPY ["Znyc.Dispatching.Database.Migrations/Znyc.Dispatching.Database.Migrations.csproj", "Znyc.Dispatching.Database.Migrations/"] |
||||
|
COPY ["Znyc.Dispatching.EntityFramework.Core/Znyc.Dispatching.EntityFramework.Core.csproj", "Znyc.Dispatching.EntityFramework.Core/"] |
||||
|
COPY ["Znyc.Dispatching.Core/Znyc.Dispatching.Core.csproj", "Znyc.Dispatching.Core/"] |
||||
|
COPY ["Znyc.Dispatching.Application/Znyc.Dispatching.Application.csproj", "Znyc.Dispatching.Application/"] |
||||
|
COPY ["Znyc.Dispatching.MongoDb.Repository/Znyc.Dispatching.MongoDb.Repository.csproj", "Znyc.Dispatching.MongoDb.Repository/"] |
||||
|
COPY ["Znyc.Dispatching.WeChat.Core/Znyc.Dispatching.WeChat.Core.csproj", "Znyc.Dispatching.WeChat.Core/"] |
||||
|
RUN dotnet restore "Znyc.Dispatching.Web.Entry/Znyc.Dispatching.Web.Entry.csproj" |
||||
|
COPY . . |
||||
|
WORKDIR "/src/Znyc.Dispatching.Web.Entry" |
||||
|
RUN dotnet build "Znyc.Dispatching.Web.Entry.csproj" -c Release -o /app/build |
||||
|
|
||||
|
FROM build AS publish |
||||
|
RUN dotnet publish "Znyc.Dispatching.Web.Entry.csproj" -c Release -o /app/publish |
||||
|
|
||||
|
FROM base AS final |
||||
|
WORKDIR /app |
||||
|
COPY --from=publish /app/publish . |
||||
|
ENTRYPOINT ["dotnet", "Znyc.Dispatching.Web.Entry.dll"] |
@ -0,0 +1,18 @@ |
|||||
|
using Furion; |
||||
|
using Znyc.Dispatching.Application; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Tests.ServiceTests |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 登录单元测试
|
||||
|
/// </summary>
|
||||
|
public class LoginServiceTest |
||||
|
{ |
||||
|
private readonly ILoginService _loginService; |
||||
|
public LoginServiceTest() |
||||
|
{ |
||||
|
_loginService = App.GetService<ILoginService>(); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,77 @@ |
|||||
|
using Furion; |
||||
|
using Furion.DatabaseAccessor; |
||||
|
using Xunit; |
||||
|
using Znyc.Dispatching.Core.Entitys; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Tests |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 车辆测试
|
||||
|
/// </summary>
|
||||
|
public class VehicleServiceTest |
||||
|
{ |
||||
|
private readonly IRepository<Employee> _employeeRepository; |
||||
|
|
||||
|
/// private readonly ilo _vehicleService;
|
||||
|
public VehicleServiceTest() |
||||
|
{ |
||||
|
_employeeRepository = App.GetService<IRepository<Employee>>(); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据id获取车辆信息
|
||||
|
/// </summary>
|
||||
|
[Fact] |
||||
|
public async void GetVehicleByIdAsync() |
||||
|
{ |
||||
|
Employee res = await _employeeRepository.FindAsync(162538803421253); |
||||
|
Assert.NotNull(res); |
||||
|
} |
||||
|
|
||||
|
///// <summary>
|
||||
|
///// 根据id获取车辆Gps信息
|
||||
|
///// </summary>
|
||||
|
//[Fact]
|
||||
|
//public async void GetVehicleGpsByIdAsync()
|
||||
|
//{
|
||||
|
// var res = await _vehicleService.GetVehicleGpsByIdAsync(162538803421253);
|
||||
|
// Assert.NotNull(res);
|
||||
|
//}
|
||||
|
///// <summary>
|
||||
|
///// 获取地图信息
|
||||
|
///// </summary>
|
||||
|
//[Fact]
|
||||
|
//public async void GetMapMonitorAsync()
|
||||
|
//{
|
||||
|
// var res = await _vehicleService.GetMapMonitorAsync();
|
||||
|
// Assert.NotNull(res);
|
||||
|
//}
|
||||
|
|
||||
|
///// <summary>
|
||||
|
///// 分页查询
|
||||
|
///// </summary>
|
||||
|
//[Fact]
|
||||
|
//public async void PageAsync()
|
||||
|
//{
|
||||
|
// var res = await _vehicleService.PageAsync(0, 1, 10);
|
||||
|
// Assert.NotNull(res);
|
||||
|
//}
|
||||
|
|
||||
|
///// <summary>
|
||||
|
///// 修改车辆信息
|
||||
|
///// </summary>
|
||||
|
//[Fact]
|
||||
|
//public async void UpdateAsync()
|
||||
|
//{
|
||||
|
// VehicleUpdateInput input = new VehicleUpdateInput()
|
||||
|
// {
|
||||
|
// VehicleCode = "Z01",
|
||||
|
// VehiclePlate = "粤",
|
||||
|
// ContactPerson = "单元",
|
||||
|
// ContactPhone = "13111111111"
|
||||
|
// };
|
||||
|
// await _vehicleService.UpdateAsync(input);
|
||||
|
// Assert.True(true);
|
||||
|
//}
|
||||
|
} |
||||
|
} |
@ -0,0 +1,32 @@ |
|||||
|
using Furion; |
||||
|
using Microsoft.AspNetCore.Http; |
||||
|
using Microsoft.Extensions.DependencyInjection; |
||||
|
using Microsoft.Extensions.DependencyInjection.Extensions; |
||||
|
using Xunit; |
||||
|
using Xunit.Abstractions; |
||||
|
using Xunit.Sdk; |
||||
|
using Znyc.Dispatching.Core; |
||||
|
|
||||
|
// 配置启动类类型,第一个参数是 Startup 类完整限定名,第二个参数是当前项目程序集名称
|
||||
|
[assembly: TestFramework("Znyc.Dispatching.Tests.Startup", "Znyc.Dispatching.Tests")] |
||||
|
|
||||
|
namespace Znyc.Dispatching.Tests |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 单元测试启动类
|
||||
|
/// </summary>
|
||||
|
/// <remarks>在这里可以使用 Furion 几乎所有功能</remarks>
|
||||
|
public sealed class Startup : XunitTestFramework |
||||
|
{ |
||||
|
public Startup(IMessageSink messageSink) : base(messageSink) |
||||
|
{ |
||||
|
// 初始化 IServiceCollection 对象
|
||||
|
IServiceCollection services = Inject.Create(); |
||||
|
|
||||
|
services.AddScoped<IUserManager, UserManager>(); |
||||
|
services.TryAddSingleton<IHttpContextAccessor, HttpContextAccessor>(); |
||||
|
// 构建 ServiceProvider 对象
|
||||
|
services.Build(); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,13 @@ |
|||||
|
using Xunit; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Tests |
||||
|
{ |
||||
|
public class UnitTest1 |
||||
|
{ |
||||
|
[Fact] |
||||
|
public void Test1() |
||||
|
{ |
||||
|
Assert.Equal(2, 1 + 1); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,26 @@ |
|||||
|
<Project Sdk="Microsoft.NET.Sdk"> |
||||
|
|
||||
|
<PropertyGroup> |
||||
|
<TargetFramework>net6.0</TargetFramework> |
||||
|
<IsPackable>false</IsPackable> |
||||
|
</PropertyGroup> |
||||
|
<ItemGroup> |
||||
|
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="7.1.0" /> |
||||
|
<PackageReference Include="Furion" Version="3.0.6" /> |
||||
|
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="5.0.9" /> |
||||
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" /> |
||||
|
<PackageReference Include="xunit" Version="2.4.1" /> |
||||
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3"> |
||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> |
||||
|
<PrivateAssets>all</PrivateAssets> |
||||
|
</PackageReference> |
||||
|
<PackageReference Include="coverlet.collector" Version="3.1.0"> |
||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> |
||||
|
<PrivateAssets>all</PrivateAssets> |
||||
|
</PackageReference> |
||||
|
</ItemGroup> |
||||
|
<ItemGroup> |
||||
|
<ProjectReference Include="..\Znyc.Dispatching.Application\Znyc.Dispatching.Application.csproj" /> |
||||
|
<ProjectReference Include="..\Znyc.Dispatching.Core\Znyc.Dispatching.Core.csproj" /> |
||||
|
</ItemGroup> |
||||
|
</Project> |
File diff suppressed because it is too large
@ -0,0 +1,554 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Threading.Tasks; |
||||
|
using Znyc.Dispatching.Core.Entitys; |
||||
|
using Znyc.Dispatching.MongoDb.Repository.Collection; |
||||
|
using static CSRedis.CSRedisClient; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
public interface ICacheService |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 获取短信验证码
|
||||
|
/// </summary>
|
||||
|
/// <param name="phone"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task<string> GetSmsCodeAsync(string phone); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 设置验证码缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="phone"></param>
|
||||
|
/// <param name="smsCode"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task<bool> SetSmsCodeAsync(string phone, string smsCode); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 删除验证码
|
||||
|
/// </summary>
|
||||
|
/// <param name="phone"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task RemoveSmsCodeAsync(string phone); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取权限缓存(按钮)
|
||||
|
/// </summary>
|
||||
|
/// <param name="userId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task<List<string>> GetPermissionAsync(long userId); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 缓存权限
|
||||
|
/// </summary>
|
||||
|
/// <param name="userId"></param>
|
||||
|
/// <param name="permissions"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task SetPermissionAsync(long userId, List<string> permissions); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 同步车辆分组缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="companyId"></param>
|
||||
|
/// <param name="vehicleGroup"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task SetVehicleGroupListAsync(long companyId, List<VehicleGroup> vehicleGroup); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取车辆分组缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="companyId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task<List<VehicleGroup>> GetVehicleGroupListAsync(long companyId); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 同步车辆类型缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="vehicleType"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task SetVehicleTypeListAsync(List<VehicleType> vehicleType); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取车辆类型缓存
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
Task<List<VehicleType>> GetVehicleTypeListAsync(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 同步角色菜单缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="menuList"></param>
|
||||
|
/// <param name="roleId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task SetRoleMenuAsync(long roleId, List<MenuOutput> menuList); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取角色菜单缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="roleId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task<List<MenuOutput>> GetRoleMenuAsync(long roleId); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 删除角色菜单缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="roleId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task RemoveRoleMenuAsync(long roleId); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 同步角色缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="role"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task SetRoleAsync(List<RoleOutput> role); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取角色缓存
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
Task<List<RoleOutput>> GetRoleAsync(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取字典缓存
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
Task<List<DictionaryOutput>> GetDictionaryListAsync(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 同步字典缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="dictionaryLists"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task SetDictionaryListAsync(List<DictionaryOutput> dictionaryLists); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 同步公司缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="company"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task SetComanyAsync(CompanyOutput company); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取公司缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="companyId"></param>
|
||||
|
/// <param name="userId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task<CompanyOutput> GetCompanyAsync(long companyId, long userId); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 删除公司缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="companyId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task RemoveCompanyAsync(long companyId); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 同步用户缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="user"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task SetUserAsync(UserOutput user); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取用户缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="userId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task<UserOutput> GetUserAsync(long userId); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 移除用户缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="userId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task RemoveUserAsync(long userId); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 删除用户所有缓存
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
Task RemoveCacheByUserIdAsync(long userId); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 写入token
|
||||
|
/// </summary>
|
||||
|
/// <param name="userId"></param>
|
||||
|
/// <param name="token"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task SetTokenAsync(long userId, string token); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 移除token
|
||||
|
/// </summary>
|
||||
|
/// <param name="userId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task RemoveTokenAsync(long userId); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取token
|
||||
|
/// </summary>
|
||||
|
/// <param name="userId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task<string> GetTokenAsync(long userId); |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 发布
|
||||
|
/// </summary>
|
||||
|
/// <param name="channel"></param>
|
||||
|
/// <param name="message"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task<long> PublishAsync(string channel, string message); |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 订阅
|
||||
|
/// </summary>
|
||||
|
/// <param name="channels"></param>
|
||||
|
/// <returns></returns>
|
||||
|
SubscribeObject Subscribe(params (string, Action<SubscribeMessageEventArgs>)[] channels); |
||||
|
|
||||
|
#region 公司车辆
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 设置公司车辆缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="companyId"></param>
|
||||
|
/// <param name="vehicles"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task SetVehicleByCompanyIdAsync(long companyId, List<VehicleGpsOutput> vehicles); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 删除公司车辆缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="companyId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task RemoveVehicleByCompanyIdAsync(long companyId); |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 删除公司车辆缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="companyId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task RemoveAllVehicleByCompanyIdAsync(); |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取所有公司车辆缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="companyId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task<List<VehicleGpsOutput>> GetAllVehicleByCompanyIdAsync(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取公司车辆缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="companyId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task<List<VehicleGpsOutput>> GetVehicleByCompanyIdAsync(long companyId); |
||||
|
|
||||
|
#endregion 公司车辆
|
||||
|
|
||||
|
#region 车辆
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 设置车辆缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="vehicle"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task SetVehicleAsync(Vehicle vehicle); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 删除车辆缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="vehicleId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task RemoveVehicleAsync(long vehicleId); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取车辆缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="vehicleId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task<Vehicle> GetVehicleAsync(long vehicleId); |
||||
|
|
||||
|
#endregion 车辆
|
||||
|
|
||||
|
#region 员工
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 设置车辆缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="employee"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task SetEmployeeAsync(EmployeeOutput employee); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 删除员工缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="employeeId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task RemoveEmployeeAsync(long employeeId); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取员工缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="employeeId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task<EmployeeOutput> GetEmployeeAsync(long employeeId); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 设置员工列表缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="companyId"></param>
|
||||
|
/// <param name="employees"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task SetEmployeeListAsync(long companyId, List<EmployeeOutput> employees); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 删除员工列表缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="companyId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task RemoveEmployeeListAsync(long companyId); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取员工列表缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="companyId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task<List<EmployeeOutput>> GetEmployeeListAsync(long companyId); |
||||
|
|
||||
|
#endregion 员工
|
||||
|
|
||||
|
#region 未读警报提醒
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 设置未读警报提醒缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="userId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task SetUnreadAlarmAsync(long userId); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 删除未读警报提醒缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="userId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task RemoveUnreadAlarmAsync(long userId); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取未读警报提醒缓存
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
Task<DateTime> GetUnreadAlarmAsync(long userId); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region 轨迹回放
|
||||
|
/// <summary>
|
||||
|
/// 同步轨迹回放缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="trackPlaybackListOutput"></param>
|
||||
|
/// <param name="vehicleId"></param>
|
||||
|
/// <param name="startTime"></param>
|
||||
|
/// <param name="endTime"></param>
|
||||
|
/// <param name="expire"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task SeTrackPlaybackAsync(TrackPlaybackListOutput trackPlaybackListOutput, long vehicleId, DateTime startTime, DateTime endTime, TimeSpan expire); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取轨迹回放缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="vehicleId"></param>
|
||||
|
/// <param name="startTime"></param>
|
||||
|
/// <param name="endTime"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task<TrackPlaybackListOutput> GetTrackPlaybackAsync(long vehicleId, DateTime startTime, DateTime endTime); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 删除轨迹回放缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="vehicleId"></param>
|
||||
|
/// <param name="startTime"></param>
|
||||
|
/// <param name="endTime"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task RemoveTrackPlaybackAsync(long vehicleId, DateTime startTime, DateTime endTime); |
||||
|
#endregion
|
||||
|
|
||||
|
#region 车场
|
||||
|
/// <summary>
|
||||
|
/// 设置车场缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="yard"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task SetYardAsync(YardOutput yard); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 删除车场缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="yardId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task RemoveYardAsync(long yardId); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取车场缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="yardId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task<YardOutput> GetYardAsync(long yardId); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 设置车场列表缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="companyId"></param>
|
||||
|
/// <param name="yards"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task SetYardListAsync(long companyId, List<YardOutput> yards); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 删除车场列表缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="companyId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task RemoveYardListAsync(long companyId); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取车场列表缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="companyId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task<List<YardOutput>> GetYardListAsync(long companyId); |
||||
|
#endregion
|
||||
|
|
||||
|
|
||||
|
#region 工程信息
|
||||
|
/// <summary>
|
||||
|
/// 同步工程列表缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="projects"></param>
|
||||
|
/// <param name="companyId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task SetProjectListAsync(List<ProjectListOutput> projects, long companyId); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取工程列表缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="companyId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task<List<ProjectListOutput>> GetProjectListAsync(long companyId); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 删除工程列表缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="companyId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task RemoveProjectListAsync(long companyId); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 设置工程缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="project"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task SetProjectAsync(ProjectOutput project); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 删除工程缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="projectId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task RemoveProjectAsync(long projectId); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取工程缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="projectId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task<ProjectOutput> GetProjectAsync(long projectId); |
||||
|
#endregion
|
||||
|
|
||||
|
#region 车组人员
|
||||
|
/// <summary>
|
||||
|
/// 设置车辆车组人员缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="vehiclePerson"></param>
|
||||
|
/// <param name="vehicleId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task SetVehiclePersonAsync(List<VehiclePersonOutput> vehiclePerson, long vehicleId); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 删除车辆车组人员缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="vehicleId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task RemoveVehiclePersonAsync(long vehicleId); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取车辆车组人员缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="vehicleId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task<List<VehiclePersonOutput>> GetVehiclePersonAsync(long vehicleId); |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region Order
|
||||
|
/// <summary>
|
||||
|
/// 设置缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="orderId"></param>
|
||||
|
/// <param name="clay"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task SetVehicleGpsAsync(long orderId, dynamic clay); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 删除缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="orderId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task RemoveVehicleGpsAsync(long orderId); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="orderId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task<GpsRealTime> GetVehicleGpsAsync(long orderId); |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 设置缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="orderId"></param>
|
||||
|
/// <param name="messageType"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task SetOrderReadAsync(long orderId, string messageType); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 删除缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="orderId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task RemoveOrderReadAsync(long orderId); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取缓存
|
||||
|
/// </summary>
|
||||
|
/// <param name="orderId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task<string> GetOrderReadAsync(long orderId); |
||||
|
|
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 是否存在
|
||||
|
/// </summary>
|
||||
|
/// <param name="orderId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task<bool> ExistsOrderReadAsync(long orderId); |
||||
|
#endregion
|
||||
|
} |
||||
|
} |
@ -0,0 +1,59 @@ |
|||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 公司输入实体
|
||||
|
/// </summary>
|
||||
|
public class CompanyAddInput |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 公司名称
|
||||
|
/// </summary>
|
||||
|
[Required(ErrorMessage = "公司名称不能为空!")] |
||||
|
[MaxLength(18, ErrorMessage = "公司名称不得超过18个字")] |
||||
|
public string CompanyName { get; set; } |
||||
|
|
||||
|
///// <summary>
|
||||
|
///// 公司Logo
|
||||
|
///// </summary>
|
||||
|
// public string CompanyLogo { get; set; }
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 联系人
|
||||
|
/// </summary>
|
||||
|
[MaxLength(8, ErrorMessage = "联系人不得超过8个字")] |
||||
|
public string ContactPerson { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 联系人电话
|
||||
|
/// </summary>
|
||||
|
//[Required(ErrorMessage = "联系人电话不能为空!"), MaxLength(11, ErrorMessage = "联系电话不能超过11位")]
|
||||
|
//[RegularExpression("^[1][3,4,5,6,7,8,9][0-9]{9}$", ErrorMessage = "请输入正确的手机号码")]
|
||||
|
public string ContactPhone { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 精度
|
||||
|
/// </summary>
|
||||
|
[Required(ErrorMessage = "地址不能为空!")] |
||||
|
public decimal Longitude { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 纬度
|
||||
|
/// </summary>
|
||||
|
[Required(ErrorMessage = "地址不能为空!")] |
||||
|
public decimal Latitude { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 地址
|
||||
|
/// </summary>
|
||||
|
[Required(ErrorMessage = "地址不能为空!")] |
||||
|
[MaxLength(35, ErrorMessage = "地址不得超过35个字")] |
||||
|
public string Address { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// OpenId
|
||||
|
/// </summary>
|
||||
|
public string JsCode { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,9 @@ |
|||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// </summary>
|
||||
|
public class CompanyUpdateInput : CompanyAddInput |
||||
|
{ |
||||
|
public long Id { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,61 @@ |
|||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 平台入驻
|
||||
|
/// </summary>
|
||||
|
public class RegisterInuput |
||||
|
{ |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// JsCode
|
||||
|
/// </summary>
|
||||
|
public string JsCode { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用户名
|
||||
|
/// </summary>
|
||||
|
[MaxLength(8, ErrorMessage = "用户名不得超过8个字")] |
||||
|
public string UserName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 头像
|
||||
|
/// </summary>
|
||||
|
public string AvatarUrl { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 手机号
|
||||
|
/// </summary>
|
||||
|
[MaxLength(11, ErrorMessage = "手机号输入格式不正确")] |
||||
|
public string Phone { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 公司名称
|
||||
|
/// </summary>
|
||||
|
[Required(ErrorMessage = "公司名称不能为空!")] |
||||
|
[MaxLength(18, ErrorMessage = "公司名称不得超过18个字")] |
||||
|
public string CompanyName { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 精度
|
||||
|
/// </summary>
|
||||
|
[Required(ErrorMessage = "地址不能为空!")] |
||||
|
public decimal Longitude { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 纬度
|
||||
|
/// </summary>
|
||||
|
[Required(ErrorMessage = "地址不能为空!")] |
||||
|
public decimal Latitude { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 地址
|
||||
|
/// </summary>
|
||||
|
[Required(ErrorMessage = "地址不能为空!")] |
||||
|
[MaxLength(35, ErrorMessage = "地址不得超过35个字")] |
||||
|
public string Address { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,81 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
public class CompanyOutput |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 主键
|
||||
|
/// </summary>
|
||||
|
public long Id { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 公司名称
|
||||
|
/// </summary>
|
||||
|
public string CompanyName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 公司Logo
|
||||
|
/// </summary>
|
||||
|
public string CompanyLogo { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 精度
|
||||
|
/// </summary>
|
||||
|
public decimal Longitude { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 纬度
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public decimal Latitude { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 地址
|
||||
|
/// </summary>
|
||||
|
public string Address { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 状态(字典 0正常 1停用 2删除)
|
||||
|
/// </summary>
|
||||
|
public int Status { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 停留标示Id
|
||||
|
/// </summary>
|
||||
|
public long StopTag { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 车场
|
||||
|
/// </summary>
|
||||
|
public List<YardListOutput> yardList { get; set; } |
||||
|
|
||||
|
|
||||
|
#region #v1.2.3
|
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 一键派工是否显示工程名称
|
||||
|
/// </summary>
|
||||
|
public bool IsOpenDispatch { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 调度角色是否有添 加工程名称的权限
|
||||
|
/// </summary>
|
||||
|
public bool IsSchedulingAddProject { get; set; } |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
|
||||
|
|
||||
|
#region v1.2.7
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 是否启用任务车型选项,默认为关
|
||||
|
/// </summary>
|
||||
|
public bool IsOpenVehicleType { get; set; } |
||||
|
|
||||
|
#endregion
|
||||
|
} |
||||
|
} |
@ -0,0 +1,307 @@ |
|||||
|
using Furion.DatabaseAccessor; |
||||
|
using Furion.DependencyInjection; |
||||
|
using Furion.DynamicApiController; |
||||
|
using Furion.FriendlyException; |
||||
|
using Mapster; |
||||
|
using Microsoft.AspNetCore.Authorization; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using Microsoft.Extensions.Options; |
||||
|
using Senparc.Weixin.WxOpen.AdvancedAPIs.Sns; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using Znyc.Dispatching.Core; |
||||
|
using Znyc.Dispatching.Core.Entitys; |
||||
|
using Znyc.Dispatching.Core.Extension; |
||||
|
using Znyc.Dispatching.Core.Helpers; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 公司服务
|
||||
|
/// </summary>
|
||||
|
[ApiDescriptionSettings(Name = "company", Order = 30)] |
||||
|
public class CompanyService : ICompanyService, IDynamicApiController, ITransient |
||||
|
{ |
||||
|
private readonly ICacheService _cacheService; |
||||
|
private readonly IRepository<Employee> _employeeRepository; |
||||
|
private readonly IRepository<Company> _repository; |
||||
|
private readonly IUserManager _userManager; |
||||
|
private readonly IRepository<User> _userRepository; |
||||
|
private readonly IRepository<VehicleGroup> _vehicleGroupRepository; |
||||
|
private readonly WeixinSettingOptions _weixinSettingOptions; |
||||
|
private readonly IRepository<Yard> _yardRepository; |
||||
|
private readonly IRepository<UserYard> _userYardRepository; |
||||
|
|
||||
|
public CompanyService( |
||||
|
IRepository<Company> repository, |
||||
|
IRepository<Employee> employeeRepository, |
||||
|
IRepository<User> userRepository, |
||||
|
IRepository<VehicleGroup> vehicleGroupRepository, |
||||
|
IUserManager userManager, |
||||
|
ICacheService cacheService, |
||||
|
IRepository<Yard> yardRepository, |
||||
|
IOptions<WeixinSettingOptions> weixinSettingOptions, |
||||
|
IRepository<UserYard> userYardRepository |
||||
|
) |
||||
|
{ |
||||
|
_employeeRepository = employeeRepository; |
||||
|
_userRepository = userRepository; |
||||
|
_vehicleGroupRepository = vehicleGroupRepository; |
||||
|
_repository = repository; |
||||
|
_userManager = userManager; |
||||
|
_cacheService = cacheService; |
||||
|
_yardRepository = yardRepository; |
||||
|
_weixinSettingOptions = weixinSettingOptions.Value; |
||||
|
_userYardRepository = userYardRepository; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取当前公司信息
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpGet] |
||||
|
[Route("api/v1/company")] |
||||
|
public async Task<CompanyOutput> GetAsync() |
||||
|
{ |
||||
|
return await _cacheService.GetCompanyAsync(_userManager.CompanyId, _userManager.UserId); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据Id获取公司信息
|
||||
|
/// </summary>
|
||||
|
/// <param name="companyId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpGet] |
||||
|
[Route("api/v1/company/{companyId}")] |
||||
|
public async Task<CompanyOutput> GetByIdAsync(long companyId) |
||||
|
{ |
||||
|
return await _cacheService.GetCompanyAsync(companyId, _userManager.UserId); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新公司信息
|
||||
|
/// </summary>
|
||||
|
/// <param name="companyUpdate"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPut] |
||||
|
[Route("api/v1/company")] |
||||
|
public async Task UpdateAsync(CompanyUpdateInput companyUpdate) |
||||
|
{ |
||||
|
var company = await _repository.FindAsync(companyUpdate.Id); |
||||
|
if (company.IsNotNull()) |
||||
|
{ |
||||
|
company.CompanyName = companyUpdate.CompanyName; |
||||
|
company.Latitude = companyUpdate.Latitude; |
||||
|
company.Longitude = companyUpdate.Longitude; |
||||
|
company.Address = companyUpdate.Address; |
||||
|
} |
||||
|
var companyId = (await _repository.UpdateNowAsync(company)).Entity.Id; |
||||
|
if (companyId == 0) |
||||
|
{ |
||||
|
throw Oops.Bah("更新失败"); |
||||
|
} |
||||
|
await _cacheService.RemoveCompanyAsync(_userManager.CompanyId); |
||||
|
await _cacheService.RemoveUserAsync(_userManager.UserId); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 平台入驻
|
||||
|
/// </summary>
|
||||
|
/// <param name="registerInuput"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[AllowAnonymous] |
||||
|
[UnitOfWork] |
||||
|
[HttpPost] |
||||
|
[Route("api/v1/register")] |
||||
|
public async Task RegisterAsync(RegisterInuput registerInuput) |
||||
|
{ |
||||
|
var jsCode2JsonResult = |
||||
|
await SnsApi.JsCode2JsonAsync(_weixinSettingOptions.WxOpenAppId, _weixinSettingOptions.WxOpenAppSecret, |
||||
|
registerInuput.JsCode); |
||||
|
if (jsCode2JsonResult.IsNull()) |
||||
|
{ |
||||
|
throw Oops.Bah(ErrorCode.D1506); |
||||
|
} |
||||
|
var user = await _userRepository.FirstOrDefaultAsync(x => x.OpenId == jsCode2JsonResult.openid); |
||||
|
if (user.IsNotNull()) |
||||
|
{ |
||||
|
var employeeList = await _employeeRepository.DetachedEntities |
||||
|
.Where(x => x.UserId == user.Id && x.Status == (int)CommonStatusEnum.ENABLE) |
||||
|
.ToListAsync(); |
||||
|
var cIds = employeeList.Select(x => x.CompanyId).ToArray(); |
||||
|
|
||||
|
//如果未包含管理员权限,可以一直注册
|
||||
|
if (employeeList.Where(x => x.RoleId == (long)RoleStatusEnum.Administrator && x.Status == (int)CommonStatusEnum.ENABLE).Any()) |
||||
|
{ |
||||
|
throw Oops.Bah("您已注册公司"); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
var entity = registerInuput.Adapt<Company>(); |
||||
|
entity.Status = (int)CommonStatusEnum.REVIEW; |
||||
|
entity.ContactPerson = registerInuput.UserName ?? "企业管理员"; |
||||
|
entity.ContactPhone = registerInuput.Phone; |
||||
|
entity.CompanyLogo = CommonConst.DEFAULT_AVATARURL; |
||||
|
entity.StopTag = CommonConst.DEFAULT_STAPTAG; |
||||
|
var companyId = (await _repository.InsertNowAsync(entity)).Entity.Id; |
||||
|
if (companyId > 0) |
||||
|
{ |
||||
|
var userId = user.IsNull() ? 0 : user.Id; |
||||
|
if (user.IsNull()) |
||||
|
{ |
||||
|
//用户
|
||||
|
userId = (await _userRepository.InsertNowAsync(new User |
||||
|
{ |
||||
|
OpenId = jsCode2JsonResult.openid, |
||||
|
AvatarUrl = registerInuput.AvatarUrl, |
||||
|
UserName = registerInuput.UserName ?? "企业管理员", |
||||
|
Phone = registerInuput.Phone, |
||||
|
Status = CommonStatusEnum.ENABLE |
||||
|
})).Entity.Id; |
||||
|
} |
||||
|
//员工
|
||||
|
await _employeeRepository.InsertNowAsync(new Employee |
||||
|
{ |
||||
|
UserId = userId, |
||||
|
AvatarUrl = CommonConst.DEFAULT_AVATARURL, |
||||
|
EmployeeName = registerInuput.UserName ?? "企业管理员", |
||||
|
EmployeePhone = registerInuput.Phone, |
||||
|
CompanyId = companyId, |
||||
|
RoleId = (int)RoleStatusEnum.Administrator, |
||||
|
RoleName = typeof(RoleStatusEnum).GetDescription((int)RoleStatusEnum.Administrator), |
||||
|
Status = (int)CommonStatusEnum.ENABLE, |
||||
|
IsDefault = true |
||||
|
}); |
||||
|
//车辆分组
|
||||
|
await _vehicleGroupRepository.InsertNowAsync(new VehicleGroup |
||||
|
{ |
||||
|
CompanyId = companyId, |
||||
|
Name = "默认分组", |
||||
|
ParentId = 0 |
||||
|
}); |
||||
|
//车场
|
||||
|
var yardId = (await _yardRepository.InsertNowAsync(new Yard |
||||
|
{ |
||||
|
CompanyId = companyId, |
||||
|
Status = (int)CommonStatusEnum.ENABLE, |
||||
|
ContactPerson = registerInuput.UserName ?? "企业管理员", |
||||
|
ContactPhone = registerInuput.Phone, |
||||
|
Longitude = registerInuput.Longitude, |
||||
|
Latitude = registerInuput.Latitude, |
||||
|
Address = registerInuput.Address, |
||||
|
|
||||
|
})).Entity.Id; |
||||
|
|
||||
|
//用户车场映射
|
||||
|
await _userYardRepository.InsertNowAsync(new UserYard |
||||
|
{ |
||||
|
UserId = userId, |
||||
|
YardId = yardId, |
||||
|
CompanyId = companyId, |
||||
|
IsDefault = true |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取位置名称
|
||||
|
/// </summary>
|
||||
|
/// <param name="longitude"></param>
|
||||
|
/// <param name="latitude"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpGet] |
||||
|
[AllowAnonymous] |
||||
|
[Route("api/v1/address/{longitude}/{latitude}")] |
||||
|
public string GetAddress([Required] decimal longitude, [Required] decimal latitude) |
||||
|
{ |
||||
|
string adress = MapHelper.GetLocationByLngLat(longitude, latitude); |
||||
|
return adress; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 修改公司停留标示
|
||||
|
/// </summary>
|
||||
|
/// <param name="stopTag"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPut] |
||||
|
[Route("api/v1/company/stoptag/{stopTag}")] |
||||
|
public async Task UpdatStopTagAsync([Required] long stopTag) |
||||
|
{ |
||||
|
var company = await _repository.FirstOrDefaultAsync(x => x.Id == _userManager.CompanyId); |
||||
|
if (company.IsNull()) |
||||
|
{ |
||||
|
throw Oops.Bah("公司不存在"); |
||||
|
} |
||||
|
company.StopTag = stopTag; |
||||
|
await _repository.UpdateNowAsync(company); |
||||
|
await _cacheService.RemoveCompanyAsync(_userManager.CompanyId); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 一键派工是否显示工程名称
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPut] |
||||
|
[Route("api/v1/company/opendispatch")] |
||||
|
public async Task UpdateIsOpenDispatchAsync() |
||||
|
{ |
||||
|
var company = await _repository.FirstOrDefaultAsync(x => x.Id == _userManager.CompanyId); |
||||
|
if (company.IsNull()) |
||||
|
{ |
||||
|
throw Oops.Bah("公司不存在"); |
||||
|
|
||||
|
} |
||||
|
company.IsOpenDispatch = !company.IsOpenDispatch; |
||||
|
await _repository.UpdateNowAsync(company); |
||||
|
await _cacheService.RemoveCompanyAsync(_userManager.CompanyId); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 调度角色是否有添 加工程名称的权限
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPut] |
||||
|
[Route("api/v1/company/schedulingaddproject")] |
||||
|
public async Task UpdateIsSchedulingAddProjectAsync() |
||||
|
{ |
||||
|
var company = await _repository.FirstOrDefaultAsync(x => x.Id == _userManager.CompanyId); |
||||
|
if (company.IsNull()) |
||||
|
{ |
||||
|
throw Oops.Bah("公司不存在"); |
||||
|
|
||||
|
} |
||||
|
company.IsSchedulingAddProject = !company.IsSchedulingAddProject; |
||||
|
await _repository.UpdateNowAsync(company); |
||||
|
await _cacheService.RemoveCompanyAsync(_userManager.CompanyId); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPut] |
||||
|
[Route("api/v1/company/isOpenVehicleType")] |
||||
|
public async Task UpdateIsOpenVehicleTypeAsync() |
||||
|
{ |
||||
|
var company = await _repository.FirstOrDefaultAsync(x => x.Id == _userManager.CompanyId); |
||||
|
if (company.IsNull()) |
||||
|
{ |
||||
|
throw Oops.Bah("公司不存在"); |
||||
|
|
||||
|
} |
||||
|
company.IsOpenVehicleType = !company.IsOpenVehicleType; |
||||
|
await _repository.UpdateNowAsync(company); |
||||
|
await _cacheService.RemoveCompanyAsync(_userManager.CompanyId); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,68 @@ |
|||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
public interface ICompanyService |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 注册公司
|
||||
|
/// </summary>
|
||||
|
/// <param name="registerInuput"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task RegisterAsync(RegisterInuput registerInuput); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取当前公司信息
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
Task<CompanyOutput> GetAsync(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据Id获取公司信息
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
Task<CompanyOutput> GetByIdAsync(long companyId); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 更新公司信息
|
||||
|
/// </summary>
|
||||
|
/// <param name="input"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task UpdateAsync(CompanyUpdateInput input); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取位置名称
|
||||
|
/// </summary>
|
||||
|
/// <param name="longitude"></param>
|
||||
|
/// <param name="latitude"></param>
|
||||
|
/// <returns></returns>
|
||||
|
string GetAddress(decimal longitude, decimal latitude); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 修改公司停留标示
|
||||
|
/// </summary>
|
||||
|
/// <param name="stopTag"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task UpdatStopTagAsync(long stopTag); |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 一键派工是否显示工程名称
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
Task UpdateIsOpenDispatchAsync(); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 调度角色是否有添 加工程名称的权限
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
Task UpdateIsSchedulingAddProjectAsync(); |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新增是否启用任务车型选项,默认为关
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
Task UpdateIsOpenVehicleTypeAsync(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,32 @@ |
|||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
|
||||
|
namespace ZNYC.Recruitment.Service.Dictionary |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 添加
|
||||
|
/// </summary>
|
||||
|
public class ConstructionAddInput |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 施工单位
|
||||
|
/// </summary>
|
||||
|
[Required(ErrorMessage = "请填写施工单位")] |
||||
|
public string ConstructionName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 联系人
|
||||
|
/// </summary>
|
||||
|
public string ContactName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 联系电话
|
||||
|
/// </summary>
|
||||
|
public string ContactPhone { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 状态
|
||||
|
/// </summary>
|
||||
|
public bool Status { get; set; } |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
namespace ZNYC.Recruitment.Service.Dictionary |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 修改
|
||||
|
/// </summary>
|
||||
|
public class ConstructionUpdateInput : ConstructionAddInput |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 主键Id
|
||||
|
/// </summary>
|
||||
|
public long Id { get; set; } |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,56 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
public class ConstructionBaiscList |
||||
|
{ |
||||
|
public long Total { get; set; } |
||||
|
|
||||
|
public List<ConstructionLetterOutput> ConstructionLetterOutputs { get; set; } |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public class ConstructionLetterOutput |
||||
|
{ |
||||
|
public string Char { get; set; } |
||||
|
|
||||
|
public List<ConstructionOutput> List { get; set; } |
||||
|
} |
||||
|
|
||||
|
public class ConstructionOutput |
||||
|
{ |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Id
|
||||
|
/// </summary>
|
||||
|
public long Id { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 匹配索引列表,与车组人员共用一个列表,所以需增加UserId来进行匹配
|
||||
|
/// </summary>
|
||||
|
public long UserId |
||||
|
{ |
||||
|
get { return Id; } |
||||
|
set { Id = value; } |
||||
|
} |
||||
|
/// <summary>
|
||||
|
/// 施工单位
|
||||
|
/// </summary>
|
||||
|
public string ConstructionName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 联系人
|
||||
|
/// </summary>
|
||||
|
public string ContactName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 联系电话
|
||||
|
/// </summary>
|
||||
|
public string ContactPhone { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 状态
|
||||
|
/// </summary>
|
||||
|
public bool Status { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,151 @@ |
|||||
|
using Furion.DatabaseAccessor; |
||||
|
using Furion.DependencyInjection; |
||||
|
using Furion.DynamicApiController; |
||||
|
using Furion.FriendlyException; |
||||
|
using Mapster; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using Znyc.Dispatching.Core; |
||||
|
using Znyc.Dispatching.Core.Entitys; |
||||
|
using Znyc.Dispatching.Core.Extension; |
||||
|
using Znyc.Dispatching.Core.Helpers; |
||||
|
using ZNYC.Recruitment.Service.Dictionary; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application.Services |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 施工单位
|
||||
|
/// </summary>
|
||||
|
[ApiDescriptionSettings(Name = "construction", Order = 259)] |
||||
|
public class ConstructionService : IConstructionService, IDynamicApiController, ITransient |
||||
|
{ |
||||
|
private readonly ICacheService _cacheService; |
||||
|
private readonly IRepository<Construction> _repository; |
||||
|
private readonly IRepository<Project> _projectRepository; |
||||
|
|
||||
|
private readonly IUserManager _userManager; |
||||
|
private string[] INDEX_STRINGS = {"A", "B", "C", "D", "E", "F", "G", "H", "I", |
||||
|
"J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", |
||||
|
"W", "X", "Y", "Z", "#"}; |
||||
|
public ConstructionService( |
||||
|
IRepository<Construction> repository, |
||||
|
ICacheService cacheService, |
||||
|
IUserManager userManager, |
||||
|
IRepository<Project> projectRepository) |
||||
|
{ |
||||
|
_repository = repository; |
||||
|
_cacheService = cacheService; |
||||
|
_userManager = userManager; |
||||
|
_projectRepository = projectRepository; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// InsertAsync
|
||||
|
/// </summary>
|
||||
|
/// <param name="constructionAddInput"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPost] |
||||
|
[Route("api/v1/construction")] |
||||
|
public async Task<bool> InsertAsync(ConstructionAddInput constructionAddInput) |
||||
|
{ |
||||
|
var result = false; |
||||
|
if (constructionAddInput.IsNotNull()) |
||||
|
{ |
||||
|
var isRepeatConstructionName = await _repository.AnyAsync(x => x.ConstructionName == constructionAddInput.ConstructionName && x.CompanyId == _userManager.CompanyId); |
||||
|
if (isRepeatConstructionName) |
||||
|
{ |
||||
|
throw Oops.Bah($"施工单位重名,请修改"); |
||||
|
} |
||||
|
var construction = constructionAddInput.Adapt<Construction>(); |
||||
|
construction.CompanyId = _userManager.CompanyId; |
||||
|
long id = (await _repository.InsertNowAsync(construction)).Entity.Id; |
||||
|
if (id > 0) |
||||
|
{ |
||||
|
result = true; |
||||
|
} |
||||
|
} |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// UpdateAsync
|
||||
|
/// </summary>
|
||||
|
/// <param name="constructionUpdateInput"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPut] |
||||
|
[Route("api/v1/construction")] |
||||
|
public async Task<bool> UpdateAsync(ConstructionUpdateInput constructionUpdateInput) |
||||
|
{ |
||||
|
var result = false; |
||||
|
if (constructionUpdateInput.IsNotNull()) |
||||
|
{ |
||||
|
var construction = await _repository.FindAsync(constructionUpdateInput.Id); |
||||
|
if (construction.IsNotNull()) |
||||
|
{ |
||||
|
var isRepeatConstructionName = await _repository.AnyAsync(x => x.ConstructionName == constructionUpdateInput.ConstructionName && x.Id != constructionUpdateInput.Id && x.CompanyId == _userManager.CompanyId); |
||||
|
if (isRepeatConstructionName) |
||||
|
{ |
||||
|
throw Oops.Bah($"施工单位重名,请修改"); |
||||
|
} |
||||
|
construction.ConstructionName = constructionUpdateInput.ConstructionName; |
||||
|
construction.ContactName = constructionUpdateInput.ContactName; |
||||
|
construction.ContactPhone = constructionUpdateInput.ContactPhone; |
||||
|
construction.Status = constructionUpdateInput.Status; |
||||
|
long id = (await _repository.UpdateNowAsync(construction)).Entity.Id; |
||||
|
if (id > 0) |
||||
|
{ |
||||
|
//同步工程列表中施工单位名称
|
||||
|
var projects = _projectRepository.Where(x => x.ConstructionId == id).ToList(); |
||||
|
if (projects.Count > 0) |
||||
|
{ |
||||
|
foreach (var project in projects) |
||||
|
{ |
||||
|
project.ConstructionName = construction.ConstructionName; |
||||
|
await _projectRepository.UpdateNowAsync(project); |
||||
|
await _cacheService.RemoveProjectAsync(project.Id); |
||||
|
} |
||||
|
} |
||||
|
await _cacheService.RemoveProjectListAsync(_userManager.CompanyId); |
||||
|
|
||||
|
result = true; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// ListAsync
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpGet] |
||||
|
[Route("api/v1/constructions/search")] |
||||
|
public async Task<ConstructionBaiscList> ListAsync(string key, int status) |
||||
|
{ |
||||
|
var constructions = _repository.Where(x => x.CompanyId == _userManager.CompanyId) |
||||
|
.Where(key.IsNotEmptyOrNull(), x => x.ConstructionName.Contains(key)) |
||||
|
.Where(status > 0, x => x.Status) |
||||
|
.ToList().Adapt<List<ConstructionOutput>>(); |
||||
|
var constructionOutputs = new List<ConstructionLetterOutput>(); |
||||
|
foreach (var INDEX_STRING in INDEX_STRINGS) |
||||
|
{ |
||||
|
constructionOutputs.Add(new ConstructionLetterOutput() |
||||
|
{ |
||||
|
Char = INDEX_STRING, |
||||
|
List = constructions.Where(x => StringHelper.GetStringFirstSpell(x.ConstructionName) == INDEX_STRING).ToList() |
||||
|
}); |
||||
|
}; |
||||
|
var data = new ConstructionBaiscList() |
||||
|
{ |
||||
|
ConstructionLetterOutputs = constructionOutputs, |
||||
|
Total = constructions.Count |
||||
|
}; |
||||
|
return data; |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,31 @@ |
|||||
|
using System.Threading.Tasks; |
||||
|
using ZNYC.Recruitment.Service.Dictionary; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application.Services |
||||
|
{ |
||||
|
public interface IConstructionService |
||||
|
{ |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// InsertAsync
|
||||
|
/// </summary>
|
||||
|
/// <param name="constructionAddInput"></param>
|
||||
|
/// <returns></returns>
|
||||
|
public Task<bool> InsertAsync(ConstructionAddInput constructionAddInput); |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// UpdateAsync
|
||||
|
/// </summary>
|
||||
|
/// <param name="constructionUpdateInput"></param>
|
||||
|
/// <returns></returns>
|
||||
|
public Task<bool> UpdateAsync(ConstructionUpdateInput constructionUpdateInput); |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
Task<ConstructionBaiscList> ListAsync(string key, int status); |
||||
|
} |
||||
|
} |
@ -0,0 +1,38 @@ |
|||||
|
namespace ZNYC.Recruitment.Service.Dictionary |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 添加
|
||||
|
/// </summary>
|
||||
|
public class DictionaryAddInput |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 字典父级
|
||||
|
/// </summary>
|
||||
|
public int ParentId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 字典名称
|
||||
|
/// </summary>
|
||||
|
public string Name { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 字典编码
|
||||
|
/// </summary>
|
||||
|
public string Code { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 字典值
|
||||
|
/// </summary>
|
||||
|
public string Value { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 描述
|
||||
|
/// </summary>
|
||||
|
public string Description { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 启用
|
||||
|
/// </summary>
|
||||
|
public bool IsEnable { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,18 @@ |
|||||
|
namespace ZNYC.Recruitment.Service.Dictionary |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 修改
|
||||
|
/// </summary>
|
||||
|
public class DictionaryUpdateInput : DictionaryAddInput |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 主键Id
|
||||
|
/// </summary>
|
||||
|
public int Id { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 版本
|
||||
|
/// </summary>
|
||||
|
public int Version { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,30 @@ |
|||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
public class DictionaryOutput |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 主键Id
|
||||
|
/// </summary>
|
||||
|
public long Id { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 字典编码
|
||||
|
/// </summary>
|
||||
|
public string Code { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 字典值
|
||||
|
/// </summary>
|
||||
|
public string Value { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 字典名称
|
||||
|
/// </summary>
|
||||
|
public string Name { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 排序
|
||||
|
/// </summary>
|
||||
|
public int Sort { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,52 @@ |
|||||
|
using Furion.DatabaseAccessor; |
||||
|
using Furion.DependencyInjection; |
||||
|
using Furion.DynamicApiController; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Threading.Tasks; |
||||
|
using Znyc.Dispatching.Core.Entitys; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application.Services |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 字典服务
|
||||
|
/// </summary>
|
||||
|
[ApiDescriptionSettings(Name = "dictionary", Order = 200)] |
||||
|
public class DictionaryService : IDictionaryService, IDynamicApiController, ITransient |
||||
|
{ |
||||
|
private readonly ICacheService _cacheService; |
||||
|
private readonly IRepository<Dictionary> _repository; |
||||
|
|
||||
|
public DictionaryService( |
||||
|
IRepository<Dictionary> repository, |
||||
|
ICacheService cacheService) |
||||
|
{ |
||||
|
_repository = repository; |
||||
|
_cacheService = cacheService; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据Id获取字典
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpGet] |
||||
|
public async Task<DictionaryOutput> GetAsync(long id) |
||||
|
{ |
||||
|
List<DictionaryOutput> dictionarys = await _cacheService.GetDictionaryListAsync(); |
||||
|
return dictionarys.Find(x => x.Id == id); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据code获取字典
|
||||
|
/// </summary>
|
||||
|
/// <param name="code"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpGet] |
||||
|
public async Task<List<DictionaryOutput>> ListAsync(string code) |
||||
|
{ |
||||
|
List<DictionaryOutput> dictionarys = await _cacheService.GetDictionaryListAsync(); |
||||
|
return dictionarys.FindAll(x => x.Code == code); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,22 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application.Services |
||||
|
{ |
||||
|
public interface IDictionaryService |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 根据Id获取字典
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task<DictionaryOutput> GetAsync(long id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据code获取字典
|
||||
|
/// </summary>
|
||||
|
/// <param name="code"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task<List<DictionaryOutput>> ListAsync(string code); |
||||
|
} |
||||
|
} |
@ -0,0 +1,24 @@ |
|||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
public class BucketTokenOutput |
||||
|
{ |
||||
|
public Credentials Credentials { get; set; } |
||||
|
|
||||
|
public string Expiration { get; set; } |
||||
|
|
||||
|
public int ExpiredTime { get; set; } |
||||
|
|
||||
|
public string RequestId { get; set; } |
||||
|
|
||||
|
public int StartTime { get; set; } |
||||
|
} |
||||
|
|
||||
|
public class Credentials |
||||
|
{ |
||||
|
public string TmpSecretId { get; set; } |
||||
|
|
||||
|
public string TmpSecretKey { get; set; } |
||||
|
|
||||
|
public string Token { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,58 @@ |
|||||
|
using COSSTS; |
||||
|
using Furion.DependencyInjection; |
||||
|
using Furion.DynamicApiController; |
||||
|
using Microsoft.AspNetCore.Authorization; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Microsoft.Extensions.Options; |
||||
|
using Newtonsoft.Json; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using Znyc.Dispatching.Core; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// Cos服务
|
||||
|
/// </summary>
|
||||
|
[ApiDescriptionSettings(Name = "document", Order = 150, IgnoreApi = false)] |
||||
|
public class DocumentService : IDocumentService, IDynamicApiController, ITransient |
||||
|
{ |
||||
|
private readonly UploadInfoOptions _uploadInfoOptions; |
||||
|
|
||||
|
public DocumentService( |
||||
|
IOptions<UploadInfoOptions> options |
||||
|
) |
||||
|
{ |
||||
|
_uploadInfoOptions = options.Value; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取COS_Token
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpGet] |
||||
|
[AllowAnonymous] |
||||
|
[Route("api/v1/costoken")] |
||||
|
public BucketTokenOutput GetBucketTokenAsync() |
||||
|
{ |
||||
|
Dictionary<string, object> values = new Dictionary<string, object> |
||||
|
{ |
||||
|
["allowActions"] = _uploadInfoOptions.allowActions, |
||||
|
["bucket"] = _uploadInfoOptions.bucket, |
||||
|
["region"] = _uploadInfoOptions.region, |
||||
|
["allowPrefix"] = _uploadInfoOptions.allowPrefix, |
||||
|
["allowActions"] = _uploadInfoOptions.allowActions, |
||||
|
["durationSeconds"] = _uploadInfoOptions.durationSeconds, |
||||
|
["secretId"] = _uploadInfoOptions.secretId, |
||||
|
["secretKey"] = _uploadInfoOptions.secretKey |
||||
|
}; |
||||
|
Dictionary<string, object> credential = STSClient.genCredential(values); |
||||
|
foreach (KeyValuePair<string, object> kvp in credential) |
||||
|
{ |
||||
|
Console.WriteLine("{0} = {1}", kvp.Key, kvp.Value); |
||||
|
} |
||||
|
|
||||
|
return JsonConvert.DeserializeObject<BucketTokenOutput>(JsonConvert.SerializeObject(credential)); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,11 @@ |
|||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
public interface IDocumentService |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 获取COS_Token
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
BucketTokenOutput GetBucketTokenAsync(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,33 @@ |
|||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
public class EmployeeAddInput |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 员工名
|
||||
|
/// </summary>
|
||||
|
[Required(ErrorMessage = "员工名不能为空!")] |
||||
|
public string EmployeeName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 手机号
|
||||
|
/// </summary>
|
||||
|
[Required(ErrorMessage = "请输入手机号")] |
||||
|
[MaxLength(11, ErrorMessage = "手机号不能超过11位")] |
||||
|
[RegularExpression("^[1][3,4,5,6,7,8,9][0-9]{9}$", ErrorMessage = "请输入正确的手机号码")]
|
||||
|
public string EmployeePhone { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 角色
|
||||
|
/// </summary>
|
||||
|
public int RoleId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 角色名称
|
||||
|
/// </summary>
|
||||
|
[Required(ErrorMessage = "角色名称不能为空!")] |
||||
|
[MaxLength(20, ErrorMessage = "角色名称不得超过8个字")] |
||||
|
public string RoleName { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
public class EmployeeUpdateInput : EmployeeAddInput |
||||
|
{ |
||||
|
public long Id { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 状态
|
||||
|
/// </summary>
|
||||
|
public int Status { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 员工头像
|
||||
|
/// </summary>
|
||||
|
public string AvatarUrl { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,58 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
public class EmployeeListOutput |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// </summary>
|
||||
|
public long Id { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用户Id
|
||||
|
/// </summary>
|
||||
|
public long UserId { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
public int RoleId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
public string RoleName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 员工名
|
||||
|
/// </summary>
|
||||
|
public string EmployeeName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 手机号
|
||||
|
/// </summary>
|
||||
|
[MaxLength(11)] |
||||
|
public string EmployeePhone { get; set; } |
||||
|
|
||||
|
|
||||
|
public int Status { get; set; } |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public class EmployeeListOutputs |
||||
|
{ |
||||
|
public string Char { get; set; } |
||||
|
|
||||
|
public List<EmployeeListOutput> List { get; set; } |
||||
|
|
||||
|
} |
||||
|
|
||||
|
public class EmployeeListPage |
||||
|
{ |
||||
|
public List<EmployeeListOutputs> EmployeeList { get; set; } |
||||
|
|
||||
|
public long Total { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,52 @@ |
|||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
public class EmployeeOutput |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// </summary>
|
||||
|
public long Id { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用户Id
|
||||
|
/// </summary>
|
||||
|
public long UserId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 公司Id
|
||||
|
/// </summary>
|
||||
|
public long CompanyId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 员工名
|
||||
|
/// </summary>
|
||||
|
public string EmployeeName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 手机号
|
||||
|
/// </summary>
|
||||
|
[MaxLength(11)] |
||||
|
public string EmployeePhone { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 角色
|
||||
|
/// </summary>
|
||||
|
public long RoleId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 角色名称
|
||||
|
/// </summary>
|
||||
|
public string RoleName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 状态
|
||||
|
/// </summary>
|
||||
|
public int Status { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 员工头像
|
||||
|
/// </summary>
|
||||
|
public string AvatarUrl { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,7 @@ |
|||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
public class NoticeOutput |
||||
|
{ |
||||
|
public string OpenId { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,305 @@ |
|||||
|
using Furion.DatabaseAccessor; |
||||
|
using Furion.DependencyInjection; |
||||
|
using Furion.DynamicApiController; |
||||
|
using Furion.FriendlyException; |
||||
|
using Mapster; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using Microsoft.Extensions.Options; |
||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using Znyc.Dispatching.Common.Extensions; |
||||
|
using Znyc.Dispatching.Core; |
||||
|
using Znyc.Dispatching.Core.Entitys; |
||||
|
using Znyc.Dispatching.Core.Extension; |
||||
|
using Znyc.Dispatching.Core.Helpers; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 员工服务
|
||||
|
/// </summary>
|
||||
|
[ApiDescriptionSettings(Name = "employee", Order = 20)] |
||||
|
public class EmployeeService : IEmployeeService, IDynamicApiController, ITransient |
||||
|
{ |
||||
|
private string[] INDEX_STRINGS = {"A", "B", "C", "D", "E", "F", "G", "H", "I", |
||||
|
"J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", |
||||
|
"W", "X", "Y", "Z", "#"}; |
||||
|
|
||||
|
private string[] ROLEINDEX_STRINGS = { "C", "D", "J", "G", "W", "Y", "X", "#" }; |
||||
|
|
||||
|
|
||||
|
private readonly ICacheService _cacheService; |
||||
|
private readonly IRepository<Employee> _repository; |
||||
|
private readonly IRepository<User> _userRepository; |
||||
|
private readonly IRepository<UserRole> _userRoleRepository; |
||||
|
private readonly IRepository<Company> _companyRepository; |
||||
|
private readonly IUserManager _userManager; |
||||
|
private readonly IRepository<VehiclePerson> _vehiclePersonRepository; |
||||
|
private readonly IRepository<ProjectPerson> _projectPersonRepository; |
||||
|
|
||||
|
|
||||
|
public EmployeeService( |
||||
|
IRepository<Employee> repository, |
||||
|
IRepository<User> userRepository, |
||||
|
IRepository<Company> companyRepository, |
||||
|
IUserManager userManager, |
||||
|
ICacheService cacheService, |
||||
|
IRepository<UserRole> userRoleRepository, |
||||
|
IOptions<SmsProviderOptions> smsProviderOptions, |
||||
|
IRepository<VehiclePerson> vehiclePersonRepository, |
||||
|
IRepository<ProjectPerson> projectPersonRepository |
||||
|
) |
||||
|
{ |
||||
|
_repository = repository; |
||||
|
_userRepository = userRepository; |
||||
|
_companyRepository = companyRepository; |
||||
|
_userManager = userManager; |
||||
|
_cacheService = cacheService; |
||||
|
_userRoleRepository = userRoleRepository; |
||||
|
_vehiclePersonRepository = vehiclePersonRepository; |
||||
|
_projectPersonRepository = projectPersonRepository; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 员工信息
|
||||
|
/// </summary>
|
||||
|
/// <param name="currentPage"></param>
|
||||
|
/// <param name="pageSize"></param>
|
||||
|
/// <param name="roleId"></param>
|
||||
|
/// <param name="status">0全部,停用-1,正常1</param>
|
||||
|
/// <param name="key"></param>
|
||||
|
/// <param name="orderby"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpGet] |
||||
|
[Route("api/v1/employees/search")] |
||||
|
public async Task<EmployeeListPage> PageAsync([Required] int currentPage, [Required] int pageSize, [FromQuery] int status, [Required] int roleId, [FromQuery] string orderby, [FromQuery] string key = "") |
||||
|
{ |
||||
|
|
||||
|
var employees = (await _cacheService.GetEmployeeListAsync(_userManager.CompanyId)) |
||||
|
.WhereIf(status != 0, x => x.Status == status) |
||||
|
.WhereIf(roleId > 0, x => x.RoleId == roleId) |
||||
|
.WhereIf(new long[] { (long)RoleStatusEnum.Scheduling, (long)RoleStatusEnum.CarCaptain }.Contains(_userManager.RoleId), |
||||
|
x => new long[] { (long)RoleStatusEnum.CrewMembers, (long)RoleStatusEnum.Outside, |
||||
|
(long)RoleStatusEnum.PartTimeSalesman,(long)RoleStatusEnum.Salesman }.Contains(x.RoleId)) |
||||
|
.WhereIf(key.IsNotEmptyOrNull(), x => x.EmployeeName.Contains(key) || x.EmployeePhone.Contains(key)) |
||||
|
.Adapt<List<EmployeeListOutput>>(); |
||||
|
var employeeOutputs = new List<EmployeeListOutputs>(); |
||||
|
|
||||
|
if (orderby == "role") |
||||
|
{ |
||||
|
employees = employees.OrderBy(x => x.RoleName).ToList(); |
||||
|
foreach (var INDEX_STRING in ROLEINDEX_STRINGS) |
||||
|
{ |
||||
|
employeeOutputs.Add(new EmployeeListOutputs() |
||||
|
{ |
||||
|
Char = INDEX_STRING, |
||||
|
List = employees.Where(x => StringHelper.GetStringFirstSpell(x.RoleName) == INDEX_STRING).ToList() |
||||
|
}); |
||||
|
}; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
employees = employees.OrderBy(x => x.EmployeeName).ToList(); |
||||
|
|
||||
|
foreach (var INDEX_STRING in INDEX_STRINGS) |
||||
|
{ |
||||
|
employeeOutputs.Add(new EmployeeListOutputs() |
||||
|
{ |
||||
|
Char = INDEX_STRING, |
||||
|
List = employees.Where(x => StringHelper.GetStringFirstSpell(x.EmployeeName) == INDEX_STRING).ToList() |
||||
|
}); |
||||
|
}; |
||||
|
} |
||||
|
var data = new EmployeeListPage() |
||||
|
{ |
||||
|
EmployeeList = employeeOutputs, |
||||
|
Total = employees.Count |
||||
|
}; |
||||
|
return data; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据id获取员工资料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpGet] |
||||
|
[Route("api/v1/employee/{id}")] |
||||
|
public async Task<EmployeeOutput> GetByIdAsync(long id) |
||||
|
{ |
||||
|
return await _cacheService.GetEmployeeAsync(id); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 添加员工信息
|
||||
|
/// </summary>
|
||||
|
/// <param name="employeeAdd"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPost] |
||||
|
[UnitOfWork] |
||||
|
[NonAction] |
||||
|
//[Route("api/v1/employee")]
|
||||
|
public async Task<long> AddAsync(EmployeeAddInput employeeAdd) |
||||
|
{ |
||||
|
var user = await _userRepository.Where(x => x.Phone == employeeAdd.EmployeePhone).FirstOrDefaultAsync(); |
||||
|
if (user.IsNotNull()) |
||||
|
{ |
||||
|
return user.Id; |
||||
|
} |
||||
|
|
||||
|
var company = await _companyRepository.FindOrDefaultAsync(_userManager.CompanyId); |
||||
|
if (company.IsNotNull()) |
||||
|
{ |
||||
|
//用户
|
||||
|
var userEntity = await _userRepository.InsertNowAsync(new User |
||||
|
{ |
||||
|
OpenId = "", |
||||
|
UserName = employeeAdd.EmployeeName, |
||||
|
AvatarUrl = CommonConst.DEFAULT_AVATARURL_ALL, |
||||
|
Phone = employeeAdd.EmployeePhone, |
||||
|
Status = CommonStatusEnum.ENABLE |
||||
|
}); |
||||
|
//员工
|
||||
|
var employee = await _repository.InsertNowAsync(new Employee |
||||
|
{ |
||||
|
UserId = userEntity.Entity.Id, |
||||
|
AvatarUrl = CommonConst.DEFAULT_AVATARURL, |
||||
|
EmployeeName = employeeAdd.EmployeeName, |
||||
|
EmployeePhone = employeeAdd.EmployeePhone, |
||||
|
CompanyId = company.Id, |
||||
|
RoleId = employeeAdd.RoleId, |
||||
|
RoleName = employeeAdd.RoleName, |
||||
|
IsDefault = true, |
||||
|
Status = (int)CommonStatusEnum.ENABLE |
||||
|
}); |
||||
|
//用户角色
|
||||
|
await _userRoleRepository.InsertNowAsync(new UserRole |
||||
|
{ |
||||
|
UserId = userEntity.Entity.Id, |
||||
|
RoleId = employeeAdd.RoleId, |
||||
|
}); |
||||
|
//清除员工列表Cache
|
||||
|
await _cacheService.RemoveEmployeeListAsync(_userManager.CompanyId); |
||||
|
return employee.Entity.UserId; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
return 0; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 编辑员工信息
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPut] |
||||
|
[UnitOfWork] |
||||
|
[Route("api/v1/employee")] |
||||
|
public async Task UpdateAsync(EmployeeUpdateInput input) |
||||
|
{ |
||||
|
var employee = await _repository.FindOrDefaultAsync(input.Id); |
||||
|
//权限变动,清除对应缓存
|
||||
|
if (!employee.RoleId.Equals(input.RoleId)) |
||||
|
{ |
||||
|
await _cacheService.RemoveTokenAsync(employee.UserId); |
||||
|
} |
||||
|
employee = input.Adapt(employee); |
||||
|
employee.AvatarUrl = CommonConst.Prefix_AvataUrl + employee.AvatarUrl[(employee.AvatarUrl.LastIndexOf("/") + 1)..]; |
||||
|
var result = await _repository.UpdateNowAsync(employee); |
||||
|
if (result.IsNull()) |
||||
|
{ |
||||
|
throw Oops.Oh("更新员工信息失败"); |
||||
|
} |
||||
|
//同步更新user
|
||||
|
var user = await _userRepository.FirstOrDefaultAsync(x => x.Id == employee.UserId); |
||||
|
if (user.IsNotNull()) |
||||
|
{ |
||||
|
user.UserName = input.EmployeeName; |
||||
|
user.Phone = input.EmployeePhone; |
||||
|
user.AvatarUrl = employee.AvatarUrl; |
||||
|
await _userRepository.UpdateNowAsync(user); |
||||
|
await _cacheService.RemoveUserAsync(user.Id); |
||||
|
} |
||||
|
|
||||
|
//更新当前用户下所有角色姓名
|
||||
|
var employees = await _repository.Where(x => x.UserId == user.Id).ToListAsync(); |
||||
|
foreach (var employee2 in employees) |
||||
|
{ |
||||
|
if (employee.IsNotNull()) |
||||
|
{ |
||||
|
employee.EmployeePhone = input.EmployeePhone; |
||||
|
employee.EmployeeName = input.EmployeeName; |
||||
|
employee.AvatarUrl = CommonConst.Prefix_AvataUrl + input.AvatarUrl[(input.AvatarUrl.LastIndexOf("/") + 1)..]; |
||||
|
await _repository.UpdateNowAsync(employee2); |
||||
|
await _cacheService.RemoveEmployeeAsync(employee2.Id); |
||||
|
await _cacheService.RemoveEmployeeListAsync(employee2.CompanyId); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
//清除员工Cache
|
||||
|
await _cacheService.RemoveEmployeeAsync(employee.Id); |
||||
|
//清除用户Cache
|
||||
|
await _cacheService.RemoveUserAsync(employee.UserId); |
||||
|
//清除员工列表Cache
|
||||
|
await _cacheService.RemoveEmployeeListAsync(_userManager.CompanyId); |
||||
|
//同步车组人员表
|
||||
|
var vehiclePersons = await _vehiclePersonRepository.Where(x => x.IsDeleted == false && x.UserId == user.Id).ToListAsync(); |
||||
|
foreach (var item in vehiclePersons) |
||||
|
{ |
||||
|
//解除车组人员关联
|
||||
|
if (input.Status == (int)CommonStatusEnum.DISABLE) |
||||
|
{ |
||||
|
item.IsDeleted = true; |
||||
|
} |
||||
|
item.UserName = input.EmployeeName; |
||||
|
item.UserPhone = input.EmployeePhone; |
||||
|
await _vehiclePersonRepository.UpdateNowAsync(item); |
||||
|
//删除车组人员Cache
|
||||
|
await _cacheService.RemoveVehiclePersonAsync(item.VehicleId); |
||||
|
} |
||||
|
//同步工程联系人表
|
||||
|
var projectPersons = await _projectPersonRepository.Where(x => x.IsDeleted == false && x.ProjectPersonId == user.Id).ToListAsync(); |
||||
|
foreach (var item in projectPersons) |
||||
|
{ |
||||
|
item.ProjectPersonName = input.EmployeeName; |
||||
|
item.ProjectPersonPhone = input.EmployeePhone; |
||||
|
await _projectPersonRepository.UpdateNowAsync(item); |
||||
|
//清除工程信息Cache
|
||||
|
await _cacheService.RemoveProjectAsync(item.ProjectId); |
||||
|
//清除工程列表信息Cache
|
||||
|
await _cacheService.RemoveProjectListAsync(_userManager.CompanyId); |
||||
|
} |
||||
|
//同步用户角色表
|
||||
|
//var userRole = await _userRoleRepository.FirstOrDefaultAsync(x => x.UserId == employee.UserId);
|
||||
|
//userRole.RoleId = employee.RoleId;
|
||||
|
//await _userRoleRepository.UpdateNowAsync(userRole);
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 软删除员工信息
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpDelete] |
||||
|
[Route("api/v1/employee")] |
||||
|
|
||||
|
public async Task DeleteByIdAsync(long id) |
||||
|
{ |
||||
|
Employee employee = await _repository |
||||
|
.FirstOrDefaultAsync(x => x.Id == id && x.CompanyId == _userManager.CompanyId); |
||||
|
employee.IsDeleted = true; |
||||
|
await _repository.UpdateNowAsync(employee); |
||||
|
await _cacheService.RemoveCacheByUserIdAsync(employee.UserId); |
||||
|
await _cacheService.RemoveEmployeeAsync(employee.Id); |
||||
|
await _cacheService.RemoveEmployeeListAsync(_userManager.CompanyId); |
||||
|
await _cacheService.RemoveUserAsync(employee.UserId); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,50 @@ |
|||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
public interface IEmployeeService |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 员工信息
|
||||
|
/// </summary>
|
||||
|
/// <param name="currentPage"></param>
|
||||
|
/// <param name="pageSize"></param>
|
||||
|
///<param name="roleId"></param>
|
||||
|
/// <param name="status"></param>
|
||||
|
/// <param name="key"></param>
|
||||
|
/// <param name="orderby"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task<EmployeeListPage> PageAsync(int currentPage, int pageSize, int status, int roleId, string key, string orderby); |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据id获取员工资料
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
Task<EmployeeOutput> GetByIdAsync(long id); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 添加员工信息
|
||||
|
/// </summary>
|
||||
|
/// <param name="input"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task<long> AddAsync(EmployeeAddInput input); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 编辑员工信息
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
Task UpdateAsync(EmployeeUpdateInput input); |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 软删除员工信息
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task DeleteByIdAsync(long id); |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,83 @@ |
|||||
|
using Furion.DataValidation; |
||||
|
using Furion.TaskScheduler; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using Znyc.Dispatching.Core; |
||||
|
|
||||
|
namespace Dilon.Core.Service |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 任务调度参数
|
||||
|
/// </summary>
|
||||
|
public class JobInput : PageInputBase |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 任务名称
|
||||
|
/// </summary>
|
||||
|
public string JobName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 执行间隔时间(单位秒)
|
||||
|
/// </summary>
|
||||
|
/// <example>5</example>
|
||||
|
public int Interval { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Cron表达式
|
||||
|
/// </summary>
|
||||
|
public string Cron { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 定时器类型
|
||||
|
/// </summary>
|
||||
|
public SpareTimeTypes TimerType { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 执行次数
|
||||
|
/// </summary>
|
||||
|
public int? RunNumber { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 请求url
|
||||
|
/// </summary>
|
||||
|
public string RequestUrl { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 请求参数(Post,Put请求用)
|
||||
|
/// </summary>
|
||||
|
public string RequestParameters { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Headers(可以包含如:Authorization授权认证)
|
||||
|
/// 格式:{"Authorization":"userpassword.."}
|
||||
|
/// </summary>
|
||||
|
public string Headers { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 请求类型
|
||||
|
/// </summary>
|
||||
|
public RequestTypeEnum RequestType { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 备注
|
||||
|
/// </summary>
|
||||
|
public string Remark { get; set; } |
||||
|
} |
||||
|
|
||||
|
public class DeleteJobInput : JobInput |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 任务Id
|
||||
|
/// </summary>
|
||||
|
[Required(ErrorMessage = "任务Id不能为空")] |
||||
|
[DataValidation(ValidationTypes.Numeric)] |
||||
|
public long Id { get; set; } |
||||
|
} |
||||
|
|
||||
|
public class UpdateJobInput : DeleteJobInput |
||||
|
{ |
||||
|
} |
||||
|
|
||||
|
public class QueryJobInput : DeleteJobInput |
||||
|
{ |
||||
|
} |
||||
|
} |
@ -0,0 +1,78 @@ |
|||||
|
using Furion.TaskScheduler; |
||||
|
using Znyc.Dispatching.Core; |
||||
|
|
||||
|
namespace Dilon.Core.Service |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 任务信息---任务详情
|
||||
|
/// </summary>
|
||||
|
public class JobOutput |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// Id
|
||||
|
/// </summary>
|
||||
|
public long Id { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 任务名称
|
||||
|
/// </summary>
|
||||
|
public string JobName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 执行间隔时间(单位秒)
|
||||
|
/// </summary>
|
||||
|
public int Interval { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Cron表达式
|
||||
|
/// </summary>
|
||||
|
public string Cron { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 定时器类型
|
||||
|
/// </summary>
|
||||
|
public SpareTimeTypes TimerType { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 执行次数
|
||||
|
/// </summary>
|
||||
|
public long? RunNumber { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 请求url
|
||||
|
/// </summary>
|
||||
|
public string RequestUrl { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 请求参数(Post,Put请求用)
|
||||
|
/// </summary>
|
||||
|
public string RequestParameters { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Headers(可以包含如:Authorization授权认证)
|
||||
|
/// 格式:{"Authorization":"userpassword.."}
|
||||
|
/// </summary>
|
||||
|
public string Headers { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 请求类型
|
||||
|
/// </summary>
|
||||
|
/// <example>2</example>
|
||||
|
public RequestTypeEnum RequestType { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 备注
|
||||
|
/// </summary>
|
||||
|
public string Remark { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 定时器状态
|
||||
|
/// </summary>
|
||||
|
public SpareTimeStatus TimerStatus { get; set; } = SpareTimeStatus.Stopped; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 异常信息
|
||||
|
/// </summary>
|
||||
|
public string Exception { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,10 @@ |
|||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace Dilon.Core.Service |
||||
|
{ |
||||
|
public interface IJobService |
||||
|
{ |
||||
|
|
||||
|
Task SyncOrderStatusAsync(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,277 @@ |
|||||
|
using Furion.DatabaseAccessor; |
||||
|
using Furion.DependencyInjection; |
||||
|
using Furion.DynamicApiController; |
||||
|
using Microsoft.AspNetCore.Authorization; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using Microsoft.Extensions.Options; |
||||
|
using Newtonsoft.Json; |
||||
|
using Senparc.Weixin.MP.AdvancedAPIs; |
||||
|
using Senparc.Weixin.MP.AdvancedAPIs.TemplateMessage; |
||||
|
using System; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using Znyc.Dispatching.Application; |
||||
|
using Znyc.Dispatching.Core; |
||||
|
using Znyc.Dispatching.Core.Entitys; |
||||
|
using Znyc.Dispatching.Core.Extension; |
||||
|
using Znyc.Dispatching.Core.Helpers; |
||||
|
using Znyc.Dispatching.MongoDb.Repository.Repositorys; |
||||
|
using Znyc.Dispatching.WeChat.Core.CommonService.TemplateMessage; |
||||
|
|
||||
|
namespace Dilon.Core.Service |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 任务调度服务
|
||||
|
/// </summary>
|
||||
|
[ApiDescriptionSettings(Name = "job", Order = 40)] |
||||
|
public class JobService : IJobService, IDynamicApiController, IScoped |
||||
|
{ |
||||
|
private readonly IRepository<Role> _roleRepository; |
||||
|
private readonly IVehicleService _vehicleService; |
||||
|
private readonly IRepository<Menu> _menuRepository; |
||||
|
private readonly IRepository<RoleMenu> _roleMenuRepository; |
||||
|
private readonly IRepository<Order> _orderRepository; |
||||
|
private readonly IGpsRealTimeRepository _gpsRealTimeRepository; |
||||
|
private readonly ICacheService _cacheService; |
||||
|
private readonly IRepository<Employee> _employeeRepository; |
||||
|
private readonly IRepository<OrderVehicle> _orderVehicleRepository; |
||||
|
private readonly IRepository<WxUserRelation> _wxUserRelationRepository; |
||||
|
private readonly WeixinSettingOptions _weixinSettingOptions; |
||||
|
private readonly IRepository<Yard> _yardRepository; |
||||
|
private readonly IRepository<Company> _companyRepository; |
||||
|
public JobService( |
||||
|
IRepository<Role> roleRepository, |
||||
|
IVehicleService vehicleService, |
||||
|
ICacheService cacheService, |
||||
|
IRepository<Menu> menuRepository, |
||||
|
IRepository<Order> orderRepository, |
||||
|
IRepository<RoleMenu> roleMenuRepository, |
||||
|
IGpsRealTimeRepository gpsRealTimeRepository, |
||||
|
IRepository<Employee> employeeRepository, |
||||
|
IRepository<OrderVehicle> orderVehicleRepository, |
||||
|
IRepository<WxUserRelation> wxUserRelationRepository, |
||||
|
IOptions<WeixinSettingOptions> weixinSettingOptions, |
||||
|
IRepository<Yard> yardRepository, |
||||
|
IRepository<Company> companyRepository) |
||||
|
{ |
||||
|
_roleRepository = roleRepository; |
||||
|
_vehicleService = vehicleService; |
||||
|
_menuRepository = menuRepository; |
||||
|
_cacheService = cacheService; |
||||
|
_orderRepository = orderRepository; |
||||
|
_roleMenuRepository = roleMenuRepository; |
||||
|
_gpsRealTimeRepository = gpsRealTimeRepository; |
||||
|
_employeeRepository = employeeRepository; |
||||
|
_orderVehicleRepository = orderVehicleRepository; |
||||
|
_wxUserRelationRepository = wxUserRelationRepository; |
||||
|
_weixinSettingOptions = weixinSettingOptions.Value; |
||||
|
_yardRepository = yardRepository; |
||||
|
_companyRepository = companyRepository; |
||||
|
} |
||||
|
|
||||
|
#region Order
|
||||
|
|
||||
|
[HttpGet] |
||||
|
[AllowAnonymous] |
||||
|
public async Task SyncOrderStatusAsync() |
||||
|
{ |
||||
|
var orders = _orderRepository.Where(x => x.IsDeleted == false && new int[] { (int)OrderStatus.Receive, (int)OrderStatus.Travel, (int)OrderStatus.Appear, (int)OrderStatus.Sign, (int)OrderStatus.Leave }.Contains(x.Status)).ToList(); |
||||
|
var vehicleGpss = await _gpsRealTimeRepository.GetGpsRealTimeListByVehicleId(orders.Select(x => x.VehicleId).ToList()); |
||||
|
var arriveOrders = orders.Where(x => x.Status == (int)OrderStatus.Receive && x.Latitude > 0 && x.Longitude > 0).ToList(); |
||||
|
|
||||
|
foreach (var arriveOrder in arriveOrders) |
||||
|
{ |
||||
|
var vehicleGps = vehicleGpss.Where(x => x.VehicleId == arriveOrder.VehicleId).FirstOrDefault(); |
||||
|
if (vehicleGps.IsNotNull()) |
||||
|
{ |
||||
|
//已出发
|
||||
|
var vehicleTravelGps = await _cacheService.GetVehicleGpsAsync(arriveOrder.Id); |
||||
|
if (vehicleTravelGps.IsNotNull()) |
||||
|
{ |
||||
|
var distance = MapHelper.GetDistance((double)vehicleGps.Latitude, (double)vehicleGps.Longitude, (double)vehicleTravelGps.Latitude, (double)vehicleTravelGps.Longitude); |
||||
|
if (distance > 3000) |
||||
|
{ |
||||
|
arriveOrder.Status = (int)OrderStatus.Travel; |
||||
|
arriveOrder.TravelDate = DateTime.Now; |
||||
|
var orderId = (await _orderRepository.UpdateNowAsync(arriveOrder)).Entity.Id; |
||||
|
if (orderId > 0) |
||||
|
{ |
||||
|
var orderContent = arriveOrder.OrderContent.Length > 45 ? HtmlHelper.ReplaceHtmlMark(arriveOrder.OrderContent.Substring(0, 45)) + "..." : HtmlHelper.ReplaceHtmlMark(arriveOrder.OrderContent) + "..."; |
||||
|
|
||||
|
//管理员
|
||||
|
var adminUserIds = await _employeeRepository.DetachedEntities.Where(x => x.CompanyId == arriveOrder.CompanyId && x.RoleId == (int)RoleStatusEnum.Administrator && x.Status == 1 && !x.IsDeleted).Select(x => x.UserId).ToListAsync(); |
||||
|
//派单人
|
||||
|
adminUserIds.Add(arriveOrder.AssignUserId); |
||||
|
//获取订单所有车组人员信息
|
||||
|
var orderVehicles = await _orderVehicleRepository.DetachedEntities.Where(x => x.OrderId == arriveOrder.Id).ToListAsync(); |
||||
|
var orderVehicleDriverName = orderVehicles.FirstOrDefault(x => x.IsDriver).UserName; |
||||
|
var orderVehicleCrewsName = string.Join(",", orderVehicles.Where(x => !x.IsDriver).Select(x => x.UserName).ToList()); |
||||
|
foreach (var adminUserId in adminUserIds) |
||||
|
{ |
||||
|
var wxAdminUser = _wxUserRelationRepository.Where(x => x.UserId == adminUserId).FirstOrDefault(); |
||||
|
if (wxAdminUser.IsNotNull() && wxAdminUser.WxOfficialOpenId.IsNotNull()) |
||||
|
{ |
||||
|
var data = new WeixinTemplate_AssignOrder("已出发提醒", arriveOrder.ProjectName, "出车任务", orderContent, arriveOrder.ArriveDate.ToString("yyyy -MM-dd HH:mm:ss"), $"[{arriveOrder.VehicleCode}]号车,{orderVehicleDriverName},{orderVehicleCrewsName}已出发"); |
||||
|
TemplateModel_MiniProgram miniProgram = new TemplateModel_MiniProgram(); |
||||
|
miniProgram.appid = _weixinSettingOptions.WxOpenAppId; |
||||
|
miniProgram.pagepath = $"pages/taskInfo/taskInfo?id={arriveOrder.Id}&isDriver=false&type=2"; |
||||
|
var result = await TemplateApi.SendTemplateMessageAsync(_weixinSettingOptions.WeixinAppId, wxAdminUser.WxOfficialOpenId, data.TemplateId, "pages/index/index", data, miniProgram); |
||||
|
Console.WriteLine($"{miniProgram.pagepath}"); |
||||
|
Console.WriteLine($"已出发提醒{JsonConvert.SerializeObject(result)}"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
await _cacheService.RemoveVehicleGpsAsync(arriveOrder.Id); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
//已到达
|
||||
|
var appearOrders = orders.Where(x => x.Status == (int)OrderStatus.Travel && x.Latitude > 0 && x.Longitude > 0).ToList(); |
||||
|
foreach (var appearOrder in appearOrders) |
||||
|
{ |
||||
|
var vehicleGps = vehicleGpss.Where(x => x.VehicleId == appearOrder.VehicleId).FirstOrDefault(); |
||||
|
if (vehicleGps.IsNotNull()) |
||||
|
{ |
||||
|
var distance = MapHelper.GetDistance((double)vehicleGps.Latitude, (double)vehicleGps.Longitude, (double)appearOrder.Latitude, (double)appearOrder.Longitude); |
||||
|
if (distance < 200) |
||||
|
{ |
||||
|
appearOrder.Status = (int)OrderStatus.Appear; |
||||
|
appearOrder.AppearDate = DateTime.Now; |
||||
|
var orderId = (await _orderRepository.UpdateNowAsync(appearOrder)).Entity.Id; |
||||
|
if (orderId > 0) |
||||
|
{ |
||||
|
var orderContent = appearOrder.OrderContent.Length > 45 ? HtmlHelper.ReplaceHtmlMark(appearOrder.OrderContent.Substring(0, 45)) + "..." : HtmlHelper.ReplaceHtmlMark(appearOrder.OrderContent) + "..."; |
||||
|
|
||||
|
//管理员
|
||||
|
var adminUserIds = await _employeeRepository.DetachedEntities.Where(x => x.CompanyId == appearOrder.CompanyId && x.RoleId == (int)RoleStatusEnum.Administrator && x.Status == 1 && !x.IsDeleted).Select(x => x.UserId).ToListAsync(); |
||||
|
//派单人
|
||||
|
adminUserIds.Add(appearOrder.AssignUserId); |
||||
|
//获取订单所有车组人员信息
|
||||
|
var orderVehicles = await _orderVehicleRepository.DetachedEntities.Where(x => x.OrderId == appearOrder.Id).ToListAsync(); |
||||
|
var orderVehicleDriverName = orderVehicles.FirstOrDefault(x => x.IsDriver).UserName; |
||||
|
var orderVehicleCrewsName = string.Join(",", orderVehicles.Where(x => !x.IsDriver).Select(x => x.UserName).ToList()); |
||||
|
foreach (var adminUserId in adminUserIds) |
||||
|
{ |
||||
|
var wxAdminUser = _wxUserRelationRepository.Where(x => x.UserId == adminUserId).FirstOrDefault(); |
||||
|
if (wxAdminUser.IsNotNull() && wxAdminUser.WxOfficialOpenId.IsNotNull()) |
||||
|
{ |
||||
|
var data = new WeixinTemplate_AssignOrder("已到达提醒", appearOrder.ProjectName, "出车任务", orderContent, appearOrder.ArriveDate.ToString("yyyy -MM-dd HH:mm:ss"), $"[{appearOrder.VehicleCode}]号车,{orderVehicleDriverName},{orderVehicleCrewsName}已到达施工地点"); |
||||
|
TemplateModel_MiniProgram miniProgram = new TemplateModel_MiniProgram(); |
||||
|
miniProgram.appid = _weixinSettingOptions.WxOpenAppId; |
||||
|
miniProgram.pagepath = $"pages/taskInfo/taskInfo?id={appearOrder.Id}&isDriver=false&type=2"; |
||||
|
var result = await TemplateApi.SendTemplateMessageAsync(_weixinSettingOptions.WeixinAppId, wxAdminUser.WxOfficialOpenId, data.TemplateId, "pages/index/index", data, miniProgram); |
||||
|
Console.WriteLine($"{miniProgram.pagepath}"); |
||||
|
Console.WriteLine($"已到达提醒{JsonConvert.SerializeObject(result)}"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
//已离开
|
||||
|
var signeOrders = orders.Where(x => x.Status == (int)OrderStatus.Sign && x.Latitude > 0 && x.Longitude > 0).ToList(); |
||||
|
foreach (var signeOrder in signeOrders) |
||||
|
{ |
||||
|
var vehicleGps = vehicleGpss.Where(x => x.VehicleId == signeOrder.VehicleId).FirstOrDefault(); |
||||
|
if (vehicleGps.IsNotNull()) |
||||
|
{ |
||||
|
var distance = MapHelper.GetDistance((double)vehicleGps.Latitude, (double)vehicleGps.Longitude, (double)signeOrder.Latitude, (double)signeOrder.Longitude); |
||||
|
if (distance > 200) |
||||
|
{ |
||||
|
signeOrder.Status = (int)OrderStatus.Leave; |
||||
|
signeOrder.LeaveDate = DateTime.Now; |
||||
|
var orderId = (await _orderRepository.UpdateNowAsync(signeOrder)).Entity.Id; |
||||
|
if (orderId > 0) |
||||
|
{ |
||||
|
var orderContent = signeOrder.OrderContent.Length > 45 ? HtmlHelper.ReplaceHtmlMark(signeOrder.OrderContent.Substring(0, 45)) + "..." : HtmlHelper.ReplaceHtmlMark(signeOrder.OrderContent) + "..."; |
||||
|
|
||||
|
//管理员
|
||||
|
var adminUserIds = await _employeeRepository.DetachedEntities.Where(x => x.CompanyId == signeOrder.CompanyId && x.RoleId == (int)RoleStatusEnum.Administrator && x.Status == 1 && !x.IsDeleted).Select(x => x.UserId).ToListAsync(); |
||||
|
//派单人
|
||||
|
adminUserIds.Add(signeOrder.AssignUserId); |
||||
|
//获取订单所有车组人员信息
|
||||
|
var orderVehicles = await _orderVehicleRepository.DetachedEntities.Where(x => x.OrderId == signeOrder.Id).ToListAsync(); |
||||
|
var orderVehicleDriverName = orderVehicles.FirstOrDefault(x => x.IsDriver).UserName; |
||||
|
var orderVehicleCrewsName = string.Join(",", orderVehicles.Where(x => !x.IsDriver).Select(x => x.UserName).ToList()); |
||||
|
foreach (var adminUserId in adminUserIds) |
||||
|
{ |
||||
|
var wxAdminUser = _wxUserRelationRepository.Where(x => x.UserId == adminUserId).FirstOrDefault(); |
||||
|
if (wxAdminUser.IsNotNull() && wxAdminUser.WxOfficialOpenId.IsNotNull()) |
||||
|
{ |
||||
|
var data = new WeixinTemplate_AssignOrder("完工返回提醒", signeOrder.ProjectName, "出车任务", orderContent, signeOrder.ArriveDate.ToString("yyyy -MM-dd HH:mm:ss"), $"[{signeOrder.VehicleCode}]号车,{orderVehicleDriverName},{orderVehicleCrewsName}已完工返回"); |
||||
|
TemplateModel_MiniProgram miniProgram = new TemplateModel_MiniProgram(); |
||||
|
miniProgram.appid = _weixinSettingOptions.WxOpenAppId; |
||||
|
miniProgram.pagepath = $"pages/taskInfo/taskInfo?id={signeOrder.Id}&isDriver=false&type=2"; |
||||
|
var result = await TemplateApi.SendTemplateMessageAsync(_weixinSettingOptions.WeixinAppId, wxAdminUser.WxOfficialOpenId, data.TemplateId, "pages/index/index", data, miniProgram); |
||||
|
Console.WriteLine($"{miniProgram.pagepath}"); |
||||
|
Console.WriteLine($"已到达提醒{JsonConvert.SerializeObject(result)}"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
//已到家
|
||||
|
var homeOrders = orders.Where(x => x.Status == (int)OrderStatus.Leave && x.Latitude > 0 && x.Longitude > 0).ToList(); |
||||
|
foreach (var homeOrder in homeOrders) |
||||
|
{ |
||||
|
var vehicleGps = vehicleGpss.Where(x => x.VehicleId == homeOrder.VehicleId).FirstOrDefault(); |
||||
|
|
||||
|
//查询所有车场位置
|
||||
|
var yards = await _yardRepository.DetachedEntities.Where(x => x.CompanyId == homeOrder.CompanyId).ToListAsync(); |
||||
|
foreach (var yard in yards) |
||||
|
{ |
||||
|
if (vehicleGps.IsNotNull()) |
||||
|
{ |
||||
|
var distance = MapHelper.GetDistance((double)vehicleGps.Latitude, (double)vehicleGps.Longitude, (double)yard.Latitude, (double)yard.Longitude); |
||||
|
if (distance < 200) |
||||
|
{ |
||||
|
|
||||
|
homeOrder.Status = (int)OrderStatus.ArriveHome; |
||||
|
homeOrder.ArriveHomeDate = DateTime.Now; |
||||
|
var orderId = (await _orderRepository.UpdateNowAsync(homeOrder)).Entity.Id; |
||||
|
if (orderId > 0) |
||||
|
{ |
||||
|
|
||||
|
var orderContent = homeOrder.OrderContent.Length > 45 ? HtmlHelper.ReplaceHtmlMark(homeOrder.OrderContent.Substring(0, 45)) + "..." : HtmlHelper.ReplaceHtmlMark(homeOrder.OrderContent) + "..."; |
||||
|
//管理员
|
||||
|
var adminUserIds = await _employeeRepository.DetachedEntities.Where(x => x.CompanyId == homeOrder.CompanyId && x.RoleId == (int)RoleStatusEnum.Administrator && x.Status == 1 && !x.IsDeleted).Select(x => x.UserId).ToListAsync(); |
||||
|
//派单人
|
||||
|
adminUserIds.Add(homeOrder.AssignUserId); |
||||
|
//获取订单所有车组人员信息
|
||||
|
var orderVehicles = await _orderVehicleRepository.DetachedEntities.Where(x => x.OrderId == homeOrder.Id).ToListAsync(); |
||||
|
var orderVehicleDriverName = orderVehicles.FirstOrDefault(x => x.IsDriver).UserName; |
||||
|
var orderVehicleCrewsName = string.Join(",", orderVehicles.Where(x => !x.IsDriver).Select(x => x.UserName).ToList()); |
||||
|
foreach (var adminUserId in adminUserIds) |
||||
|
{ |
||||
|
var wxAdminUser = _wxUserRelationRepository.Where(x => x.UserId == adminUserId).FirstOrDefault(); |
||||
|
if (wxAdminUser.IsNotNull() && wxAdminUser.WxOfficialOpenId.IsNotNull()) |
||||
|
{ |
||||
|
var data = new WeixinTemplate_AssignOrder("完工到家提醒", homeOrder.ProjectName, "出车任务", orderContent, homeOrder.ArriveDate.ToString("yyyy -MM-dd HH:mm:ss"), $"[{homeOrder.VehicleCode}]号车,{orderVehicleDriverName},{orderVehicleCrewsName}已完工返回"); |
||||
|
TemplateModel_MiniProgram miniProgram = new TemplateModel_MiniProgram(); |
||||
|
miniProgram.appid = _weixinSettingOptions.WxOpenAppId; |
||||
|
miniProgram.pagepath = $"pages/taskInfo/taskInfo?id={homeOrder.Id}&isDriver=false&type=2"; |
||||
|
var result = await TemplateApi.SendTemplateMessageAsync(_weixinSettingOptions.WeixinAppId, wxAdminUser.WxOfficialOpenId, data.TemplateId, "pages/index/index", data, miniProgram); |
||||
|
Console.WriteLine($"{miniProgram.pagepath}"); |
||||
|
Console.WriteLine($"完工到家提醒{JsonConvert.SerializeObject(result)}"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
#endregion
|
||||
|
} |
||||
|
} |
@ -0,0 +1,6 @@ |
|||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
public interface ILogAuditService |
||||
|
{ |
||||
|
} |
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
using Furion.DependencyInjection; |
||||
|
using Furion.DynamicApiController; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 审计日志服务
|
||||
|
/// </summary>
|
||||
|
[ApiDescriptionSettings(Name = "audit", Order = 60, IgnoreApi = true)] |
||||
|
public class LogAuditService : ILogAuditService, IDynamicApiController, ITransient |
||||
|
{ |
||||
|
} |
||||
|
} |
@ -0,0 +1,6 @@ |
|||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
public interface ILogExService |
||||
|
{ |
||||
|
} |
||||
|
} |
@ -0,0 +1,22 @@ |
|||||
|
using Furion.DatabaseAccessor; |
||||
|
using Furion.DependencyInjection; |
||||
|
using Furion.DynamicApiController; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Znyc.Dispatching.Core.Entitys; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 异常日志服务
|
||||
|
/// </summary>
|
||||
|
[ApiDescriptionSettings(Name = "ex", Order = 70, IgnoreApi = true)] |
||||
|
public class LogExService : ILogExService, IDynamicApiController, ITransient |
||||
|
{ |
||||
|
private readonly IRepository<LogEx> _repository; |
||||
|
|
||||
|
public LogExService(IRepository<LogEx> repository) |
||||
|
{ |
||||
|
_repository = repository; |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,6 @@ |
|||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
public interface ILogOpService |
||||
|
{ |
||||
|
} |
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
using Furion.DependencyInjection; |
||||
|
using Furion.DynamicApiController; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 操作日志服务
|
||||
|
/// </summary>
|
||||
|
[ApiDescriptionSettings(Name = "op", Order = 80, IgnoreApi = true)] |
||||
|
public class LogOpService : ILogOpService, IDynamicApiController, ITransient |
||||
|
{ |
||||
|
} |
||||
|
} |
@ -0,0 +1,34 @@ |
|||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 登录实体
|
||||
|
/// </summary>
|
||||
|
public class LoginInput |
||||
|
{ |
||||
|
[Required(ErrorMessage = "JsCode不能为空!")] |
||||
|
public string JsCode { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// getuserinfo信息
|
||||
|
/// </summary>
|
||||
|
[Required(ErrorMessage = "未查询到用户信息")] |
||||
|
public UserInfo UserInfo { get; set; } |
||||
|
} |
||||
|
|
||||
|
public class UserInfo |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 昵称
|
||||
|
/// </summary>
|
||||
|
public string NickName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 头像地址
|
||||
|
/// </summary>
|
||||
|
public string AvatarUrl { get; set; } |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,22 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
public class LoginOutput |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// Token
|
||||
|
/// </summary>
|
||||
|
public string Token { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 跳转路径
|
||||
|
/// </summary>
|
||||
|
public string Url { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 角色菜单列表
|
||||
|
/// </summary>
|
||||
|
public List<MenuOutput> Menus { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
public interface ILoginService |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 用户登录
|
||||
|
/// </summary>
|
||||
|
/// <param name="loginInput"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task<LoginOutput> Login(LoginInput loginInput); |
||||
|
} |
||||
|
} |
@ -0,0 +1,182 @@ |
|||||
|
using Furion.DatabaseAccessor; |
||||
|
using Furion.DataEncryption; |
||||
|
using Furion.DependencyInjection; |
||||
|
using Furion.DynamicApiController; |
||||
|
using Furion.FriendlyException; |
||||
|
using MapsterMapper; |
||||
|
using Microsoft.AspNetCore.Authorization; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using Microsoft.Extensions.Logging; |
||||
|
using Microsoft.Extensions.Options; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using Znyc.Dispatching.Core; |
||||
|
using Znyc.Dispatching.Core.Entitys; |
||||
|
using Znyc.Dispatching.Core.Extension; |
||||
|
using Znyc.Dispatching.WeChat.Core.CommonService.TemplateMessage.WxOpen; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 登录服务
|
||||
|
/// </summary>
|
||||
|
[ApiDescriptionSettings(Name = "Login", Order = 146, IgnoreApi = false)] |
||||
|
public class LoginService : ILoginService, IDynamicApiController, ITransient |
||||
|
{ |
||||
|
private readonly ICacheService _cacheService; |
||||
|
private readonly IRepository<Company> _companyRepository; |
||||
|
private readonly IRepository<Employee> _employeeRepository; |
||||
|
private readonly IUserManager _userManager; |
||||
|
private readonly IRepository<User> _userRepository; |
||||
|
private readonly WeixinSettingOptions _weixinSettingOptions; |
||||
|
private readonly IWxUserRelationService _wxUserRelationService; |
||||
|
private readonly ILogger<LoginService> _logger; |
||||
|
private readonly IRoleMenuService _roleMenuService; |
||||
|
private readonly IMapper _mapper; |
||||
|
|
||||
|
public LoginService( |
||||
|
IRepository<User> userRepository, |
||||
|
IRepository<Employee> employeeRepository, |
||||
|
IRepository<Company> companyRepository, |
||||
|
IUserManager userManager, |
||||
|
ICacheService cacheService, |
||||
|
IOptions<WeixinSettingOptions> weixinSettingOptions, |
||||
|
IWxUserRelationService wxUserRelationService, |
||||
|
ILogger<LoginService> logger, |
||||
|
IMapper mapper, |
||||
|
IRoleMenuService roleMenuService |
||||
|
) |
||||
|
{ |
||||
|
_userRepository = userRepository; |
||||
|
_employeeRepository = employeeRepository; |
||||
|
_companyRepository = companyRepository; |
||||
|
_cacheService = cacheService; |
||||
|
_userManager = userManager; |
||||
|
_weixinSettingOptions = weixinSettingOptions.Value; |
||||
|
_wxUserRelationService = wxUserRelationService; |
||||
|
_logger = logger; |
||||
|
_mapper = mapper; |
||||
|
_roleMenuService = roleMenuService; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用户登录
|
||||
|
/// </summary>
|
||||
|
/// <param name="loginInput"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPost] |
||||
|
[UnitOfWork] |
||||
|
[AllowAnonymous] |
||||
|
[Route("api/v1/login")] |
||||
|
public async Task<LoginOutput> Login(LoginInput loginInput) |
||||
|
{ |
||||
|
var jsCode2JsonResult = |
||||
|
await SnsApi.JsCode2JsonAsync(_weixinSettingOptions.WxOpenAppId, _weixinSettingOptions.WxOpenAppSecret, |
||||
|
loginInput.JsCode); |
||||
|
if (jsCode2JsonResult.IsNull()) |
||||
|
{ |
||||
|
throw Oops.Bah("jsCode2JsonResult为空"); |
||||
|
} |
||||
|
var user = await _userRepository.Where(x => x.OpenId == jsCode2JsonResult.openid).Select(x => new |
||||
|
{ |
||||
|
x.Id, |
||||
|
x.UserName, |
||||
|
x.OpenId |
||||
|
}).FirstOrDefaultAsync(); |
||||
|
|
||||
|
if (user.IsNull()) |
||||
|
{ |
||||
|
throw Oops.Bah("您还未注册用户!").StatusCode(4012); |
||||
|
}; |
||||
|
|
||||
|
|
||||
|
var employeeList = await _employeeRepository.Where(x => x.UserId == user.Id && x.Status == (int)CommonStatusEnum.ENABLE).Select(x => new |
||||
|
{ |
||||
|
x.UserId, |
||||
|
x.CompanyId, |
||||
|
x.RoleId, |
||||
|
x.Status, |
||||
|
x.IsDefault |
||||
|
}).ToListAsync(); |
||||
|
|
||||
|
if (employeeList.Any(x => x.RoleId == (int)RoleStatusEnum.Outside)) |
||||
|
{ |
||||
|
employeeList.Remove(employeeList.Find(x => x.RoleId == (int)RoleStatusEnum.Outside)); |
||||
|
} |
||||
|
var cIds = employeeList.Select(x => x.CompanyId).ToArray(); |
||||
|
//公司
|
||||
|
var company = await _companyRepository.Where(x => cIds.Contains(x.Id) && x.Status == (int)CommonStatusEnum.ENABLE).Select(x => new |
||||
|
{ |
||||
|
x.Id, |
||||
|
x.Status |
||||
|
}).OrderByDescending(x => x.Id).FirstOrDefaultAsync(); |
||||
|
|
||||
|
if (company.IsNull()) |
||||
|
{ |
||||
|
throw Oops.Bah("").StatusCode(4012); |
||||
|
} |
||||
|
var employee = employeeList.Find(x => x.CompanyId == company.Id); |
||||
|
if (employee.Status == (int)CommonStatusEnum.DISABLE) |
||||
|
{ |
||||
|
throw Oops.Bah("此账号已被管理员停用"); |
||||
|
} |
||||
|
|
||||
|
//用户中间表
|
||||
|
await _wxUserRelationService.AddOrUpdateAsync(user.Id, jsCode2JsonResult.openid, jsCode2JsonResult.unionid); |
||||
|
// 生成 token
|
||||
|
string accessToken = JWTEncryption.Encrypt(new Dictionary<string, object> |
||||
|
{ |
||||
|
{ClaimConst.CLAINM_USERID, user.Id}, |
||||
|
{ClaimConst.CLAINM_COMPANYID, employee.CompanyId}, |
||||
|
{ClaimConst.CLAINM_ROLEID, employee.RoleId}, |
||||
|
{ClaimConst.CLAINM_USERNAME, user.UserName}, |
||||
|
{ClaimConst.CLAINM_SUPERADMIN, new long[] { (long)RoleStatusEnum.Administrator, (long)RoleStatusEnum.Scheduling,(long)RoleStatusEnum.CarCaptain }.Contains(employee.RoleId)} |
||||
|
}); |
||||
|
//RedisToken
|
||||
|
await _cacheService.SetTokenAsync(user.Id, accessToken); |
||||
|
LoginOutput loginOutput = new LoginOutput() |
||||
|
{ |
||||
|
Token = accessToken, |
||||
|
Menus = await _roleMenuService.GetRoleMenuListByIdAsync(employee.RoleId) |
||||
|
}; |
||||
|
switch (employee.RoleId) |
||||
|
{ |
||||
|
case (long)RoleStatusEnum.Administrator: |
||||
|
case (long)RoleStatusEnum.Scheduling: |
||||
|
case (long)RoleStatusEnum.CarCaptain: |
||||
|
case (long)RoleStatusEnum.Salesman: |
||||
|
case (long)RoleStatusEnum.Financial: |
||||
|
case (long)RoleStatusEnum.WareHouse: |
||||
|
loginOutput.Url = CommonConst.DEFAULT_SUPERADMIN_INDEX; |
||||
|
break; |
||||
|
case (long)RoleStatusEnum.CrewMembers: |
||||
|
case (long)RoleStatusEnum.ProjectPerson: |
||||
|
case (long)RoleStatusEnum.PartTimeSalesman: |
||||
|
loginOutput.Url = CommonConst.DEFAULT_DRIVER_INDEX; |
||||
|
break; |
||||
|
case (long)RoleStatusEnum.Outside: |
||||
|
loginOutput.Url = CommonConst.DEFAULT_OUTSIDE_INDEX; |
||||
|
break; |
||||
|
default: |
||||
|
loginOutput.Url = CommonConst.DEFAULT_DRIVER_INDEX; |
||||
|
break; |
||||
|
} |
||||
|
return loginOutput; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 清理缓存
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpGet] |
||||
|
public async Task ClearCache() |
||||
|
{ |
||||
|
await _cacheService.RemoveCacheByUserIdAsync(_userManager.UserId); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,22 @@ |
|||||
|
using Mapster; |
||||
|
using Znyc.Dispatching.Core; |
||||
|
using Znyc.Dispatching.Core.Entitys; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application.Mapper |
||||
|
{ |
||||
|
public class Mapper : IRegister |
||||
|
{ |
||||
|
public void Register(TypeAdapterConfig config) |
||||
|
{ |
||||
|
config.ForType<Order, OrderListOutput>() |
||||
|
.Map(dest => dest.OrderSourceName, src => typeof(OrderSourceEnum).GetDescription(src.OrderSource)); |
||||
|
|
||||
|
|
||||
|
|
||||
|
config.ForType<OrderVisa, OrderVisaOutput>() |
||||
|
.Map(dest => dest.Picture, src => CommonConst.DEFAULT_ORDERVISA + src.Picture); |
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,91 @@ |
|||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using Znyc.Dispatching.Core; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 菜单参数
|
||||
|
/// </summary>
|
||||
|
public class MenuInput |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 父Id
|
||||
|
/// </summary>
|
||||
|
public long ParentId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 所属层级
|
||||
|
/// </summary>
|
||||
|
public int Layers { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 名称
|
||||
|
/// </summary>
|
||||
|
[Required] |
||||
|
[MaxLength(20)] |
||||
|
public string Name { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 编码
|
||||
|
/// </summary>
|
||||
|
[Required] |
||||
|
[MaxLength(50)] |
||||
|
public string Code { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 菜单类型(字典 0目录 1菜单 2按钮)
|
||||
|
/// </summary>
|
||||
|
public MenuTypeEnum Type { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 图标
|
||||
|
/// </summary>
|
||||
|
[MaxLength(20)] |
||||
|
public string Icon { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 路由地址
|
||||
|
/// </summary>
|
||||
|
[MaxLength(100)] |
||||
|
public string Router { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 权限标识
|
||||
|
/// </summary>
|
||||
|
public string Permission { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 是否外链
|
||||
|
/// </summary>
|
||||
|
[MaxLength(5)] |
||||
|
public bool IsFrame { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 是否展开
|
||||
|
/// </summary>
|
||||
|
[MaxLength(5)] |
||||
|
public bool IsExpand { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 是否显示
|
||||
|
/// </summary>
|
||||
|
[MaxLength(5)] |
||||
|
public bool IsShow { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 排序
|
||||
|
/// </summary>
|
||||
|
public int Sort { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 详细描述
|
||||
|
/// </summary>
|
||||
|
[MaxLength(100)] |
||||
|
public string Description { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// CommonStatus
|
||||
|
/// </summary>
|
||||
|
public CommonStatusEnum Status { get; set; } = CommonStatusEnum.ENABLE; |
||||
|
} |
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 菜单树(列表形式)
|
||||
|
/// </summary>
|
||||
|
public class MenuOutput : MenuInput |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 菜单Id
|
||||
|
/// </summary>
|
||||
|
public long Id { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 子集
|
||||
|
/// </summary>
|
||||
|
public ICollection<MenuOutput> Childrens { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,10 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
public interface IMenuService |
||||
|
{ |
||||
|
Task<List<string>> GetLoginPermissionList(long userId); |
||||
|
} |
||||
|
} |
@ -0,0 +1,80 @@ |
|||||
|
using Furion.DatabaseAccessor; |
||||
|
using Furion.DependencyInjection; |
||||
|
using Furion.DynamicApiController; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using Znyc.Dispatching.Core; |
||||
|
using Znyc.Dispatching.Core.Entitys; |
||||
|
using Znyc.Dispatching.Core.Extension; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 系统菜单服务
|
||||
|
/// </summary>
|
||||
|
[ApiDescriptionSettings(Name = "menu", Order = 40, IgnoreApi = false)] |
||||
|
public class MenuService : IMenuService, IDynamicApiController, ITransient |
||||
|
{ |
||||
|
private readonly ICacheService _cacheService; |
||||
|
private readonly IRepository<Menu> _repository; |
||||
|
private readonly IRepository<RoleMenu> _roleMenuRepository; |
||||
|
private readonly IRoleMenuService _roleMenuService; |
||||
|
private readonly IRepository<Role> _roleRepository; |
||||
|
private readonly IUserManager _userManager; |
||||
|
private readonly IUserRoleService _userRoleService; |
||||
|
|
||||
|
public MenuService(IRepository<Menu> repository, |
||||
|
IRepository<RoleMenu> roleMenuRepository, |
||||
|
ICacheService cacheService, |
||||
|
IUserManager userManager, |
||||
|
IUserRoleService userRoleService, |
||||
|
IRoleMenuService roleMenuService, |
||||
|
IRepository<Role> roleRepository) |
||||
|
{ |
||||
|
_repository = repository; |
||||
|
_cacheService = cacheService; |
||||
|
_userManager = userManager; |
||||
|
_userRoleService = userRoleService; |
||||
|
_roleMenuService = roleMenuService; |
||||
|
_roleMenuRepository = roleMenuRepository; |
||||
|
_roleRepository = roleRepository; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取用户权限(按钮权限标识集合)
|
||||
|
/// </summary>
|
||||
|
/// <param name="userId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[NonAction] |
||||
|
public async Task<List<string>> GetLoginPermissionList(long userId) |
||||
|
{ |
||||
|
List<string> permissions = await _cacheService.GetPermissionAsync(userId); // 先从缓存里面读取
|
||||
|
if (permissions.IsNull() || permissions.Count < 1) |
||||
|
{ |
||||
|
if (!_userManager.SuperAdmin) |
||||
|
{ |
||||
|
List<long> roleIdList = await _userRoleService.GetUserRoleIdList(userId); |
||||
|
List<long> menuIdList = await _roleMenuService.GetRoleMenuIdList(roleIdList); |
||||
|
permissions = await _repository.Where(u => menuIdList.Contains(u.Id)) |
||||
|
.Where(u => u.Type == MenuTypeEnum.BTN) |
||||
|
.Where(u => u.Status == CommonStatusEnum.ENABLE) |
||||
|
.Select(u => u.Permission).ToListAsync(); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
permissions = await _repository.DetachedEntities |
||||
|
.Where(u => u.Type == MenuTypeEnum.BTN) |
||||
|
.Where(u => u.Status == CommonStatusEnum.ENABLE) |
||||
|
.Select(u => u.Permission).ToListAsync(); |
||||
|
} |
||||
|
|
||||
|
await _cacheService.SetPermissionAsync(userId, permissions); // 缓存结果
|
||||
|
} |
||||
|
|
||||
|
return permissions; |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,27 @@ |
|||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// </summary>
|
||||
|
public class MessageAddInput |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 消息标题
|
||||
|
/// </summary>
|
||||
|
[Required] |
||||
|
[MaxLength(12)] |
||||
|
public string MessageTitle { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 产品类型
|
||||
|
/// </summary>
|
||||
|
public int ProductType { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 消息内容
|
||||
|
/// </summary>
|
||||
|
[Required] |
||||
|
public string Content { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,27 @@ |
|||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// </summary>
|
||||
|
public class MessageOutput |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 主键
|
||||
|
/// </summary>
|
||||
|
public long Id { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 消息类型
|
||||
|
/// </summary>
|
||||
|
public int MessageType { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 消息标题
|
||||
|
/// </summary>
|
||||
|
public string MessageTitle { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 消息内容
|
||||
|
/// </summary>
|
||||
|
public string Content { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,6 @@ |
|||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
public interface IMessageService |
||||
|
{ |
||||
|
} |
||||
|
} |
@ -0,0 +1,61 @@ |
|||||
|
using Furion.DatabaseAccessor; |
||||
|
using Furion.DependencyInjection; |
||||
|
using Furion.DynamicApiController; |
||||
|
using Furion.FriendlyException; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using Znyc.Dispatching.Core.Entitys; |
||||
|
using Znyc.Dispatching.Core.Extension; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 站内消息服务
|
||||
|
/// </summary>
|
||||
|
[ApiDescriptionSettings(Name = "message", Order = 110)] |
||||
|
public class MessageService : IMessageService, IDynamicApiController, ITransient |
||||
|
{ |
||||
|
private readonly IRepository<Message> _repository; |
||||
|
|
||||
|
public MessageService(IRepository<Message> repository) |
||||
|
{ |
||||
|
_repository = repository; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 分页查询系统消息通知
|
||||
|
/// </summary>
|
||||
|
/// <param name="messageType"></param>
|
||||
|
/// <param name="currentPage"></param>
|
||||
|
/// <param name="pageSize"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpGet] |
||||
|
public async Task<PagedList<Message>> PageAsync(int messageType, int currentPage = 1, int pageSize = 10) |
||||
|
{ |
||||
|
PagedList<Message> pageList = await _repository |
||||
|
.Where(x => x.Type == 1 && x.MessageType == messageType) |
||||
|
.OrderByDescending(x => x.SendTime) |
||||
|
.ToPagedListAsync(currentPage, pageSize); |
||||
|
return pageList; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取消息通知详情
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpGet] |
||||
|
public async Task<Message> GetMessageById(long id) |
||||
|
{ |
||||
|
Message result = await _repository.FindOrDefaultAsync(id); |
||||
|
if (result.IsNull()) |
||||
|
{ |
||||
|
throw Oops.Oh("消息通知不存在"); |
||||
|
} |
||||
|
|
||||
|
return result; |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,23 @@ |
|||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 消息记录
|
||||
|
/// </summary>
|
||||
|
public class MessageRecordAddInput |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 接收者Id
|
||||
|
/// </summary>
|
||||
|
public long ReceiverId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 消息Id
|
||||
|
/// </summary>
|
||||
|
public long MessageId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 状态
|
||||
|
/// </summary>
|
||||
|
public int Status { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,22 @@ |
|||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// </summary>
|
||||
|
public class MessageRecordOutput |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 主键
|
||||
|
/// </summary>
|
||||
|
public long Id { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 消息标题
|
||||
|
/// </summary>
|
||||
|
public string MessageTitle { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 消息内容
|
||||
|
/// </summary>
|
||||
|
public string Content { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,6 @@ |
|||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
public interface IMessageRecordService |
||||
|
{ |
||||
|
} |
||||
|
} |
@ -0,0 +1,31 @@ |
|||||
|
using Furion.DatabaseAccessor; |
||||
|
using Furion.DependencyInjection; |
||||
|
using Furion.DynamicApiController; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Znyc.Dispatching.Core; |
||||
|
using Znyc.Dispatching.Core.Entitys; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 消息记录服务
|
||||
|
/// </summary>
|
||||
|
[ApiDescriptionSettings(Name = "messagerecord", Order = 120, IgnoreApi = true)] |
||||
|
public class MessageRecordService : IMessageRecordService, IDynamicApiController, ITransient |
||||
|
{ |
||||
|
private readonly IRepository<Message> _messageRepository; |
||||
|
private readonly IRepository<MessageRecord> _repository; |
||||
|
private readonly IUserManager _userManager; |
||||
|
|
||||
|
public MessageRecordService( |
||||
|
IRepository<MessageRecord> repository, |
||||
|
IUserManager userManager, |
||||
|
IRepository<Message> messageRepository |
||||
|
) |
||||
|
{ |
||||
|
_repository = repository; |
||||
|
_userManager = userManager; |
||||
|
_messageRepository = messageRepository; |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,51 @@ |
|||||
|
using System; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
///
|
||||
|
/// </summary>
|
||||
|
public class OilAddInput |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 加油日期
|
||||
|
/// </summary>
|
||||
|
[Required(ErrorMessage = "请选择加油日期")] |
||||
|
public DateTime PlusOilDate { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 车辆Id
|
||||
|
/// </summary>
|
||||
|
[Required(ErrorMessage = "请选择车辆编号")] |
||||
|
public long VehicleId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 车俩编号
|
||||
|
/// </summary>
|
||||
|
[Required(ErrorMessage = "请选择车辆编号")] |
||||
|
public string VehicleCode { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 加油单号
|
||||
|
/// </summary>
|
||||
|
public string PlusOilOrder { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 加油量
|
||||
|
/// </summary>
|
||||
|
[Required(ErrorMessage = "请填写加油量")] |
||||
|
[MaxLength(10, ErrorMessage = "加油量输入不正确")] |
||||
|
public string PlusOilAmount { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 油单价
|
||||
|
/// </summary>
|
||||
|
public decimal OilPrice { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 金额
|
||||
|
/// </summary>
|
||||
|
public decimal AmountMoney { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,9 @@ |
|||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// </summary>
|
||||
|
public class OilUpdateInput : OilAddInput |
||||
|
{ |
||||
|
public long Id { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,59 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 油耗统计
|
||||
|
/// </summary>
|
||||
|
public class CensusOilListOutput |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 主键
|
||||
|
/// </summary>
|
||||
|
public long VehicleId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 车俩编号
|
||||
|
/// </summary>
|
||||
|
public string VehicleCode { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 加油量
|
||||
|
/// </summary>
|
||||
|
public string PlusOilAmount { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 金额
|
||||
|
/// </summary>
|
||||
|
public decimal AmountMoney { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 加油次数
|
||||
|
/// </summary>
|
||||
|
public int PlusOilCount { get; set; } |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public class CensusOilOutput |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 加油总次数
|
||||
|
/// </summary>
|
||||
|
public int AllPlusOilCount { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 加油总量
|
||||
|
/// </summary>
|
||||
|
public int AllPlusOilAmount { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 总金额
|
||||
|
/// </summary>
|
||||
|
public decimal AllAmountMoney { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 油耗统计
|
||||
|
/// </summary>
|
||||
|
public List<CensusOilListOutput> CensusOilList { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,42 @@ |
|||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
public class OilOutput |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 主键
|
||||
|
/// </summary>
|
||||
|
public long Id { get; set; } |
||||
|
|
||||
|
public long VehicleId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 加油日期
|
||||
|
/// </summary>
|
||||
|
public string PlusOilDate { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 车俩编号
|
||||
|
/// </summary>
|
||||
|
public string VehicleCode { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 加油单号
|
||||
|
/// </summary>
|
||||
|
public string PlusOilOrder { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 加油量
|
||||
|
/// </summary>
|
||||
|
public string PlusOilAmount { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 油单价
|
||||
|
/// </summary>
|
||||
|
public decimal OilPrice { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 金额
|
||||
|
/// </summary>
|
||||
|
public decimal AmountMoney { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,59 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Threading.Tasks; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 油耗服务
|
||||
|
/// </summary>
|
||||
|
public interface IOilService |
||||
|
{ |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 加油记录
|
||||
|
/// </summary>
|
||||
|
/// <param name="currentPage"></param>
|
||||
|
/// <param name="pageSize"></param>
|
||||
|
/// <param name="startTime"></param>
|
||||
|
/// <param name="endTime"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task<PagedList<OilOutput>> PlusOilPageAsync(int currentPage, int pageSize, DateTime startTime, DateTime endTime); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 油耗统计
|
||||
|
/// </summary>
|
||||
|
/// <param name="startTime"></param>
|
||||
|
/// <param name="endTime"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task<CensusOilOutput> OilCensusPageAsync(DateTime startTime, DateTime endTime); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据Id获油耗信息
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
Task<OilOutput> GetByIdAsync(long companyId); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 添加油耗信息
|
||||
|
/// </summary>
|
||||
|
/// <param name="input"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task InsertAsync(OilAddInput input); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 修改油耗信息
|
||||
|
/// </summary>
|
||||
|
/// <param name="input"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task UpdateAsync(OilUpdateInput input); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 删除油耗信息
|
||||
|
/// </summary>
|
||||
|
/// <param name="oilId"></param>
|
||||
|
/// <returns></returns>
|
||||
|
Task DeleteAsync(long oilId); |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,169 @@ |
|||||
|
using Furion.DatabaseAccessor; |
||||
|
using Furion.DatabaseAccessor.Extensions; |
||||
|
using Furion.DependencyInjection; |
||||
|
using Furion.DynamicApiController; |
||||
|
using Furion.FriendlyException; |
||||
|
using Mapster; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using Znyc.Dispatching.Core; |
||||
|
using Znyc.Dispatching.Core.Entitys; |
||||
|
using Znyc.Dispatching.Core.Extension; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 油耗管理
|
||||
|
/// </summary>
|
||||
|
[ApiDescriptionSettings(Name = "oil", Order = 30)] |
||||
|
public class OilService : IOilService, IDynamicApiController, ITransient |
||||
|
{ |
||||
|
private readonly IRepository<Oil> _repository; |
||||
|
private readonly IUserManager _userManager; |
||||
|
|
||||
|
public OilService( |
||||
|
IRepository<Oil> repository, |
||||
|
IUserManager userManager |
||||
|
) |
||||
|
{ |
||||
|
_repository = repository; |
||||
|
_userManager = userManager; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 加油记录
|
||||
|
/// </summary>
|
||||
|
/// <param name="currentPage"></param>
|
||||
|
/// <param name="pageSize"></param>
|
||||
|
/// <param name="startTime"></param>
|
||||
|
/// <param name="endTime"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpGet] |
||||
|
[Route("api/v1/plus/oils/search")] |
||||
|
public async Task<PagedList<OilOutput>> PlusOilPageAsync(int currentPage, int pageSize, DateTime startTime, DateTime endTime) |
||||
|
{ |
||||
|
var oils = (await _repository.DetachedEntities |
||||
|
.Where(x => x.CompanyId == _userManager.CompanyId && x.IsDeleted == false) |
||||
|
.Where(startTime.IsNotNull(), x => x.CreatedTime >= startTime) |
||||
|
.Where(endTime.IsNotNull(), x => x.CreatedTime <= endTime) |
||||
|
.OrderByDescending(x => x.PlusOilDate) |
||||
|
.Select(x => new OilOutput() |
||||
|
{ |
||||
|
Id = x.Id, |
||||
|
VehicleId = x.VehicleId, |
||||
|
PlusOilDate = x.PlusOilDate.ToString("yyyy-MM-dd"), |
||||
|
VehicleCode = x.VehicleCode, |
||||
|
PlusOilOrder = x.PlusOilOrder, |
||||
|
PlusOilAmount = x.PlusOilAmount, |
||||
|
OilPrice = x.OilPrice, |
||||
|
AmountMoney = x.AmountMoney |
||||
|
}) |
||||
|
.ToPagedListAsync(currentPage, pageSize)).Adapt<PagedList<OilOutput>>(); |
||||
|
return oils; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 油耗统计
|
||||
|
/// </summary>
|
||||
|
/// <param name="startTime"></param>
|
||||
|
/// <param name="endTime"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpGet] |
||||
|
[Route("api/v1/census/oils/search")] |
||||
|
public async Task<CensusOilOutput> OilCensusPageAsync(DateTime startTime, DateTime endTime) |
||||
|
{ |
||||
|
var oilList = await @"SELECT VehicleCode,VehicleId,
|
||||
|
Count(CASE WHEN IsDeleted=FALSE THEN VehicleId END) AS PlusOilCount, |
||||
|
SUM(AmountMoney) AS AmountMoney, |
||||
|
SUM(PlusOilAmount)AS PlusOilAmount |
||||
|
FROM dc_oil WHERE CompanyId = @companyId AND IsDeleted=FALSE AND VehicleId > 0 And PlusOilDate >= @startTime And PlusOilDate <= @endTime |
||||
|
GROUP BY VehicleId,VehicleCode |
||||
|
ORDER BY PlusOilCount DESC,PlusOilAmount DESC,AmountMoney DESC"
|
||||
|
.SqlQueryAsync<CensusOilListOutput>(new { companyId = _userManager.CompanyId, startTime = startTime, endTime = endTime }); |
||||
|
CensusOilOutput data = new CensusOilOutput() { CensusOilList = oilList }; |
||||
|
foreach (var item in oilList) |
||||
|
{ |
||||
|
data.AllPlusOilCount += item.PlusOilCount; |
||||
|
data.AllPlusOilAmount += item.PlusOilAmount.ObjToInt(); |
||||
|
data.AllAmountMoney += item.AmountMoney; |
||||
|
} |
||||
|
return data; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据Id获油耗信息
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpGet] |
||||
|
[Route("api/v1/oil/{id}")] |
||||
|
public async Task<OilOutput> GetByIdAsync(long id) |
||||
|
{ |
||||
|
Oil oil = await _repository.DetachedEntities.FirstOrDefaultAsync(x => x.Id == id); |
||||
|
var result = oil.Adapt<OilOutput>(); |
||||
|
result.PlusOilDate = oil.PlusOilDate.ToString("yyyy-MM-dd"); |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 添加油耗信息
|
||||
|
/// </summary>
|
||||
|
/// <param name="input"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPost] |
||||
|
[Route("api/v1/oil")] |
||||
|
public async Task InsertAsync(OilAddInput input) |
||||
|
{ |
||||
|
var oil = input.Adapt<Oil>(); |
||||
|
oil.CompanyId = _userManager.CompanyId; |
||||
|
var result = await _repository.InsertNowAsync(oil); |
||||
|
if (result.IsNull()) |
||||
|
{ |
||||
|
throw Oops.Oh("添加油耗信息失败"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 修改油耗信息
|
||||
|
/// </summary>
|
||||
|
/// <param name="input"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPut] |
||||
|
[Route("api/v1/oil")] |
||||
|
public async Task UpdateAsync(OilUpdateInput input) |
||||
|
{ |
||||
|
var oil = await _repository.FirstOrDefaultAsync(x => x.Id == input.Id); |
||||
|
if (oil.IsNull()) throw Oops.Oh("暂无该信息"); |
||||
|
var result = await _repository.UpdateNowAsync(input.Adapt(oil)); |
||||
|
if (result.IsNull()) |
||||
|
{ |
||||
|
throw Oops.Oh("修改油耗信息失败"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 删除油耗信息
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpDelete] |
||||
|
[Route("api/v1/oil/{id}")] |
||||
|
public async Task DeleteAsync(long id) |
||||
|
{ |
||||
|
var oil = await _repository.FirstOrDefaultAsync(x => x.Id == id); |
||||
|
if (oil.IsNull()) throw Oops.Oh("暂无该信息"); |
||||
|
oil.IsDeleted = true; |
||||
|
var result = await _repository.UpdateNowAsync(oil); |
||||
|
if (result.IsNull()) |
||||
|
{ |
||||
|
throw Oops.Oh("删除油耗信息失败"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,49 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 指派订单实体
|
||||
|
/// </summary>
|
||||
|
public class AssignOrderInput : StayAssignInput |
||||
|
{ |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// OrderId
|
||||
|
/// </summary>
|
||||
|
public long Id { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 车辆Id
|
||||
|
/// </summary>
|
||||
|
public long VehicleId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 车辆编号
|
||||
|
/// </summary>
|
||||
|
public string VehicleCode { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 是否外请车
|
||||
|
/// </summary>
|
||||
|
public bool IsOutside { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 车组人员
|
||||
|
/// </summary>
|
||||
|
public string OrderVehiclePerson { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 是否替换车组人员
|
||||
|
/// </summary>
|
||||
|
public bool IsReplaceOrderVehicle { get; set; } |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 车组人员
|
||||
|
/// </summary>
|
||||
|
public List<OrderVehicleOutput> OrderVehicles { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 指派订单实体
|
||||
|
/// </summary>
|
||||
|
public class AssignUpdateInput : AssignOrderInput |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// OrderId
|
||||
|
/// </summary>
|
||||
|
public long Id { get; set; } |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,88 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
|
||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 派单订单表实体
|
||||
|
/// </summary>
|
||||
|
public class OrderAddInput |
||||
|
{ |
||||
|
|
||||
|
#region 待指派
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 工程Id
|
||||
|
/// </summary>
|
||||
|
[Required(ErrorMessage = "请选择工程")] |
||||
|
public long ProjectId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 工程名称
|
||||
|
/// </summary>
|
||||
|
public string ProjectName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 业务员Id
|
||||
|
/// </summary>
|
||||
|
public long SalesmanId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 到场时间
|
||||
|
/// </summary>
|
||||
|
[Required(ErrorMessage = "请选择到场时间")] |
||||
|
public DateTime ArriveDate { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 经度
|
||||
|
/// </summary>
|
||||
|
public decimal Longitude { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 纬度
|
||||
|
/// </summary>
|
||||
|
public decimal Latitude { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 地址
|
||||
|
/// </summary>
|
||||
|
[Required(ErrorMessage = "请选择所在位置")] |
||||
|
public string Address { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 订单内容
|
||||
|
/// </summary>
|
||||
|
[Required(ErrorMessage = "请输入派单内容")] |
||||
|
public string OrderContent { get; set; } |
||||
|
#endregion
|
||||
|
|
||||
|
|
||||
|
|
||||
|
#region 一键指派
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 车辆Id
|
||||
|
/// </summary>
|
||||
|
public long VehicleId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 是否外请车
|
||||
|
/// </summary>
|
||||
|
public bool IsOutside { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 车组人员
|
||||
|
/// </summary>
|
||||
|
public List<OrderVisaOutput> orderVehicles { get; set; } |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 任务车型
|
||||
|
/// </summary>
|
||||
|
public long VehicleType { get; set; } |
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,9 @@ |
|||||
|
namespace Znyc.Dispatching.Application |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// </summary>
|
||||
|
public class OrderUpdateInput : OrderAddInput |
||||
|
{ |
||||
|
public long Id { get; set; } |
||||
|
} |
||||
|
} |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue