完善HIS接口
This commit is contained in:
parent
a52a446843
commit
257bf48a4f
|
@ -7,15 +7,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cmdjy", "Cmdjy\Cmdjy.csproj
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CmdjyTests", "CmdjyTests\CmdjyTests.csproj", "{812C9905-9C11-40FD-B58F-02C8A880C494}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CmdjyTests", "CmdjyTests\CmdjyTests.csproj", "{812C9905-9C11-40FD-B58F-02C8A880C494}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CmdjyHisFront", "CmdjyHisFront\CmdjyHisFront.csproj", "{E8B0B70C-74D8-419D-94DD-19FF4015C23B}"
|
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
|
||||||
{03F35833-1CF9-42BC-BF51-444F7181A967} = {03F35833-1CF9-42BC-BF51-444F7181A967}
|
|
||||||
EndProjectSection
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HisInterfaceModels", "HisInterfaceModels\HisInterfaceModels.csproj", "{D0FE758C-DA33-45C7-8110-563056A58717}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HisInterfaceModels", "HisInterfaceModels\HisInterfaceModels.csproj", "{D0FE758C-DA33-45C7-8110-563056A58717}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommonHelper", "CommonHelper\CommonHelper.csproj", "{AA5638CD-29E5-48E7-96F2-F3A32D42BE9F}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommonHelper", "CommonHelper\CommonHelper.csproj", "{AA5638CD-29E5-48E7-96F2-F3A32D42BE9F}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CmdjyHisFront", "CmdjyHisFront\CmdjyHisFront.csproj", "{E8B0B70C-74D8-419D-94DD-19FF4015C23B}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
@ -30,10 +27,6 @@ Global
|
||||||
{812C9905-9C11-40FD-B58F-02C8A880C494}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{812C9905-9C11-40FD-B58F-02C8A880C494}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{812C9905-9C11-40FD-B58F-02C8A880C494}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{812C9905-9C11-40FD-B58F-02C8A880C494}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{812C9905-9C11-40FD-B58F-02C8A880C494}.Release|Any CPU.Build.0 = Release|Any CPU
|
{812C9905-9C11-40FD-B58F-02C8A880C494}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{E8B0B70C-74D8-419D-94DD-19FF4015C23B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{E8B0B70C-74D8-419D-94DD-19FF4015C23B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{E8B0B70C-74D8-419D-94DD-19FF4015C23B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{E8B0B70C-74D8-419D-94DD-19FF4015C23B}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{D0FE758C-DA33-45C7-8110-563056A58717}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{D0FE758C-DA33-45C7-8110-563056A58717}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{D0FE758C-DA33-45C7-8110-563056A58717}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{D0FE758C-DA33-45C7-8110-563056A58717}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{D0FE758C-DA33-45C7-8110-563056A58717}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{D0FE758C-DA33-45C7-8110-563056A58717}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
@ -42,6 +35,10 @@ Global
|
||||||
{AA5638CD-29E5-48E7-96F2-F3A32D42BE9F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{AA5638CD-29E5-48E7-96F2-F3A32D42BE9F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{AA5638CD-29E5-48E7-96F2-F3A32D42BE9F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{AA5638CD-29E5-48E7-96F2-F3A32D42BE9F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{AA5638CD-29E5-48E7-96F2-F3A32D42BE9F}.Release|Any CPU.Build.0 = Release|Any CPU
|
{AA5638CD-29E5-48E7-96F2-F3A32D42BE9F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{E8B0B70C-74D8-419D-94DD-19FF4015C23B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{E8B0B70C-74D8-419D-94DD-19FF4015C23B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{E8B0B70C-74D8-419D-94DD-19FF4015C23B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{E8B0B70C-74D8-419D-94DD-19FF4015C23B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
|
|
@ -204,8 +204,6 @@
|
||||||
<Compile Include="Dal\Tables\CompanyInfo.cs" />
|
<Compile Include="Dal\Tables\CompanyInfo.cs" />
|
||||||
<Compile Include="Dal\Tables\HospitalInfo.cs" />
|
<Compile Include="Dal\Tables\HospitalInfo.cs" />
|
||||||
<Compile Include="Dal\Tables\WsdRequestLog.cs" />
|
<Compile Include="Dal\Tables\WsdRequestLog.cs" />
|
||||||
<Compile Include="Dal\Wappers\HisDrugInfoWapper.cs" />
|
|
||||||
<Compile Include="Dal\Wappers\HisPrescriptyInfoWapper.cs" />
|
|
||||||
<Compile Include="Controllers\HomeController.cs" />
|
<Compile Include="Controllers\HomeController.cs" />
|
||||||
<Compile Include="Controllers\TestController.cs" />
|
<Compile Include="Controllers\TestController.cs" />
|
||||||
<Compile Include="Dal\DjyDbContext.cs" />
|
<Compile Include="Dal\DjyDbContext.cs" />
|
||||||
|
@ -283,6 +281,7 @@
|
||||||
<Folder Include="App_Data\" />
|
<Folder Include="App_Data\" />
|
||||||
<Folder Include="Views\HisUpdata\" />
|
<Folder Include="Views\HisUpdata\" />
|
||||||
<Folder Include="Views\Test\" />
|
<Folder Include="Views\Test\" />
|
||||||
|
<Folder Include="Views\WsdInterface\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="fonts\glyphicons-halflings-regular.woff2" />
|
<Content Include="fonts\glyphicons-halflings-regular.woff2" />
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace Cmdjy.Dal
|
||||||
internal partial class Configuration:DbMigrationsConfiguration<DjyDbContext>
|
internal partial class Configuration:DbMigrationsConfiguration<DjyDbContext>
|
||||||
{
|
{
|
||||||
public Configuration() {
|
public Configuration() {
|
||||||
AutomaticMigrationsEnabled = WebSettings.AutoMigrations;
|
AutomaticMigrationsEnabled = true;
|
||||||
AutomaticMigrationDataLossAllowed = false;
|
AutomaticMigrationDataLossAllowed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
using HisInterfaceModels;
|
|
||||||
|
|
||||||
namespace Cmdjy.Dal.Wappers
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 药品信息墙纸
|
|
||||||
/// </summary>
|
|
||||||
public class HisDrugInfoWapper:Dal.Tables.HisDrugInfo
|
|
||||||
{
|
|
||||||
public HisDrugInfoWapper(HisDrugInfo s) {
|
|
||||||
if(s == null) return;
|
|
||||||
foreach(var p in s.GetType().GetProperties()) {
|
|
||||||
var tp = this.GetType().GetProperty(p.Name);
|
|
||||||
if(tp != null && tp.CanWrite && p.CanRead) {
|
|
||||||
tp.SetValue(this,p.GetValue(s));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
using HisInterfaceModels;
|
|
||||||
|
|
||||||
namespace Cmdjy.Dal.Wappers
|
|
||||||
{
|
|
||||||
public class HisPrescriptyInfoWapper:Dal.Tables.HisPrescriptionInfo
|
|
||||||
{
|
|
||||||
public HisPrescriptyInfoWapper() { }
|
|
||||||
public HisPrescriptyInfoWapper(HisPrescriptionInfo s) {
|
|
||||||
if(s == null) return;
|
|
||||||
foreach(var p in s.GetType().GetProperties()) {
|
|
||||||
var tp = this.GetType().GetProperty(p.Name);
|
|
||||||
if(tp != null && tp.CanWrite && p.CanRead) {
|
|
||||||
tp.SetValue(this,p.GetValue(s));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -9,7 +9,12 @@ namespace Cmdjy
|
||||||
public class MvcApplication:System.Web.HttpApplication
|
public class MvcApplication:System.Web.HttpApplication
|
||||||
{
|
{
|
||||||
protected void Application_Start() {
|
protected void Application_Start() {
|
||||||
Database.SetInitializer(new MigrateDatabaseToLatestVersion<DjyDbContext,Configuration>());
|
if(WebSettings.AutoMigrations) {
|
||||||
|
Database.SetInitializer(new MigrateDatabaseToLatestVersion<DjyDbContext,Configuration>());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Database.SetInitializer<DjyDbContext>(null);
|
||||||
|
}
|
||||||
|
|
||||||
AreaRegistration.RegisterAllAreas();
|
AreaRegistration.RegisterAllAreas();
|
||||||
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
|
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
|
||||||
|
|
|
@ -24,7 +24,8 @@
|
||||||
|
|
||||||
</appSettings>
|
</appSettings>
|
||||||
<connectionStrings>
|
<connectionStrings>
|
||||||
<add name="DjyDbContext" connectionString="Data Source=FALCON-PC\SQLSERVER2008R2;Persist Security info=True;Initial Catalog=cmdjy;Integrated Security=True" providerName="System.Data.SqlClient" />
|
<!--<add name="DjyDbContext" connectionString="Data Source=FALCON-PC\SQLSERVER2008R2;Persist Security info=True;Initial Catalog=cmdjy;Integrated Security=True" providerName="System.Data.SqlClient" />-->
|
||||||
|
<add name="DjyDbContext" connectionString="Data Source=10.244.216.112;Initial Catalog=cmdjy;User ID=cmdjy;Password=win@00*" providerName="System.Data.SqlClient" />
|
||||||
</connectionStrings>
|
</connectionStrings>
|
||||||
<system.web>
|
<system.web>
|
||||||
<compilation debug="true" targetFramework="4.6.1" />
|
<compilation debug="true" targetFramework="4.6.1" />
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
using System.Data.Entity;
|
using System.Data.Entity;
|
||||||
using System.Web.Services;
|
using System.Web.Services;
|
||||||
using Cmdjy.Dal;
|
using Cmdjy.Dal;
|
||||||
using Cmdjy.Dal.Wappers;
|
|
||||||
using HisInterfaceModels;
|
using HisInterfaceModels;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using CommonHelper;
|
||||||
|
|
||||||
namespace Cmdjy.ws
|
namespace Cmdjy.ws
|
||||||
{
|
{
|
||||||
|
@ -29,7 +29,8 @@ namespace Cmdjy.ws
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
using(var db = DbContextFactory.CreateDbContext()) {
|
using(var db = DbContextFactory.CreateDbContext()) {
|
||||||
var en = new HisPrescriptyInfoWapper(info) as Dal.Tables.HisPrescriptionInfo;
|
var en = new Dal.Tables.HisPrescriptionInfo();
|
||||||
|
en.CopyFrom(info);
|
||||||
en.RawAddress = this.Context.Request.UserHostAddress;
|
en.RawAddress = this.Context.Request.UserHostAddress;
|
||||||
en.CreateDatetime = DateTime.Now;
|
en.CreateDatetime = DateTime.Now;
|
||||||
db.Entry(en).State = EntityState.Added;
|
db.Entry(en).State = EntityState.Added;
|
||||||
|
@ -62,7 +63,7 @@ namespace Cmdjy.ws
|
||||||
}
|
}
|
||||||
|
|
||||||
using(var db = DbContextFactory.CreateDbContext()) {
|
using(var db = DbContextFactory.CreateDbContext()) {
|
||||||
var en = new HisDrugInfoWapper(info) as Dal.Tables.HisDrugInfo;
|
var en = new Dal.Tables.HisDrugInfo().CopyFrom(info);
|
||||||
en.RawAddress = this.Context.Request.UserHostAddress;
|
en.RawAddress = this.Context.Request.UserHostAddress;
|
||||||
en.CreateDatetime = DateTime.Now;
|
en.CreateDatetime = DateTime.Now;
|
||||||
db.Entry(en).State = EntityState.Added;
|
db.Entry(en).State = EntityState.Added;
|
||||||
|
|
|
@ -5,6 +5,7 @@ using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using CommonHelper;
|
||||||
|
|
||||||
namespace Cmdjy.Bll.Tests
|
namespace Cmdjy.Bll.Tests
|
||||||
{
|
{
|
||||||
|
|
|
@ -84,6 +84,10 @@
|
||||||
<Project>{03F35833-1CF9-42BC-BF51-444F7181A967}</Project>
|
<Project>{03F35833-1CF9-42BC-BF51-444F7181A967}</Project>
|
||||||
<Name>Cmdjy</Name>
|
<Name>Cmdjy</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\CommonHelper\CommonHelper.csproj">
|
||||||
|
<Project>{aa5638cd-29e5-48e7-96f2-f3a32d42be9f}</Project>
|
||||||
|
<Name>CommonHelper</Name>
|
||||||
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\HisInterfaceModels\HisInterfaceModels.csproj">
|
<ProjectReference Include="..\HisInterfaceModels\HisInterfaceModels.csproj">
|
||||||
<Project>{d0fe758c-da33-45c7-8110-563056a58717}</Project>
|
<Project>{d0fe758c-da33-45c7-8110-563056a58717}</Project>
|
||||||
<Name>HisInterfaceModels</Name>
|
<Name>HisInterfaceModels</Name>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user