万仕达接口模型放到独立库

This commit is contained in:
falcon 2019-03-26 13:52:38 +08:00
parent 257bf48a4f
commit 1208647496
12 changed files with 430 additions and 292 deletions

View File

@ -13,6 +13,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommonHelper", "CommonHelpe
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CmdjyHisFront", "CmdjyHisFront\CmdjyHisFront.csproj", "{E8B0B70C-74D8-419D-94DD-19FF4015C23B}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CmdjyHisFront", "CmdjyHisFront\CmdjyHisFront.csproj", "{E8B0B70C-74D8-419D-94DD-19FF4015C23B}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WsdInterfaceModels", "WsdInterfaceModels\WsdInterfaceModels.csproj", "{925C0CBC-0FFA-4C54-8683-540637FA9E3E}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -39,6 +41,10 @@ Global
{E8B0B70C-74D8-419D-94DD-19FF4015C23B}.Debug|Any CPU.Build.0 = 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.ActiveCfg = Release|Any CPU
{E8B0B70C-74D8-419D-94DD-19FF4015C23B}.Release|Any CPU.Build.0 = Release|Any CPU {E8B0B70C-74D8-419D-94DD-19FF4015C23B}.Release|Any CPU.Build.0 = Release|Any CPU
{925C0CBC-0FFA-4C54-8683-540637FA9E3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{925C0CBC-0FFA-4C54-8683-540637FA9E3E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{925C0CBC-0FFA-4C54-8683-540637FA9E3E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{925C0CBC-0FFA-4C54-8683-540637FA9E3E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View File

@ -196,6 +196,7 @@
<Compile Include="Controllers\CompanyController.cs" /> <Compile Include="Controllers\CompanyController.cs" />
<Compile Include="Controllers\HisInfoController.cs" /> <Compile Include="Controllers\HisInfoController.cs" />
<Compile Include="Controllers\HisUpdataController.cs" /> <Compile Include="Controllers\HisUpdataController.cs" />
<Compile Include="Controllers\WsdInterfaceController.cs" />
<Compile Include="Dal\Configuration.cs" /> <Compile Include="Dal\Configuration.cs" />
<Compile Include="Dal\DbContextFactory.cs" /> <Compile Include="Dal\DbContextFactory.cs" />
<Compile Include="Dal\Queryes\HisDrugQuery.cs" /> <Compile Include="Dal\Queryes\HisDrugQuery.cs" />
@ -305,6 +306,10 @@
<Project>{d0fe758c-da33-45c7-8110-563056a58717}</Project> <Project>{d0fe758c-da33-45c7-8110-563056a58717}</Project>
<Name>HisInterfaceModels</Name> <Name>HisInterfaceModels</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\WsdInterfaceModels\WsdInterfaceModels.csproj">
<Project>{925c0cbc-0ffa-4c54-8683-540637fa9e3e}</Project>
<Name>WsdInterfaceModels</Name>
</ProjectReference>
</ItemGroup> </ItemGroup>
<PropertyGroup> <PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion> <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Cmdjy.Controllers
{
public class WsdInterfaceController : Controller
{
// GET: WsdInterface
public ActionResult Index()
{
return View();
}
}
}

View File

@ -6,6 +6,7 @@ using Cmdjy.Bll;
using Cmdjy.Dal; using Cmdjy.Dal;
using CommonHelper; using CommonHelper;
using Newtonsoft.Json; using Newtonsoft.Json;
using WsdInterfaceModels;
namespace Cmdjy.ws namespace Cmdjy.ws
{ {
@ -160,296 +161,4 @@ namespace Cmdjy.ws
return result; return result;
} }
} }
/// <summary>
/// 第三方请求数据
/// </summary>
public class WsdRequest
{
/// <summary>
/// 代煎药厂商编码。
/// </summary>
public string CompanyCode { get; set; }
/// <summary>
/// 代煎药厂商名称
/// </summary>
public string CompanyName { get; set; }
/// <summary>
/// 处方起始流水号。按照数字从1开始累加。返回结果包含此编号的处方。
/// </summary>
public string StartNo { get; set; }
/// <summary>
/// 最大本次获取的处方数量。根据客户网络和服务器配置情况自行调整
/// </summary>
public string MaxCount { get; set; }
}
/// <summary>
/// 服务器响应数据
/// </summary>
public class WsdResult
{
/// <summary>
/// 返回信息代码
/// </summary>
public EnumCode Code { get; set; }
/// <summary>
/// 返回信息
/// </summary>
public string Msg { get; set; }
/// <summary>
/// 本次发送的处方数
/// </summary>
public int Count { get; set; }
/// <summary>
/// 是否还有处方未下载。不已历史是否下载为准,只计算此次下载后是否剩余未下载。
/// </summary>
public bool More { get; set; }
/// <summary>
/// 处方信息
/// </summary>
public List<WsdPrescriptionInfo> Prescriptions { get; set; }
}
/// <summary>
/// 返回信息代码
/// </summary>
[Flags]
public enum EnumCode
{
/// <summary>
/// 执行成功。
/// </summary>
Success = 1,
/// <summary>
/// 发生异常异常信息见msg参数。
/// </summary>
Exception = 2,
}
/// <summary>
/// 处方信息
/// </summary>
public class WsdPrescriptionInfo
{
/// <summary>
/// 处方流水号
/// </summary>
public int Id { get; set; }
/// <summary>
/// 处方类型
/// </summary>
public WsdPrescriptionType Type { get; set; }
/// <summary>
/// 如果为退方,这里传要退的处方流水号。此编号在下单应答消息中提供
/// </summary>
public string RawRecordId { get; set; }
/// <summary>
/// 药品明细数量
/// </summary>
public string DrugCount { get; set; }
/// <summary>
/// 处方备注
/// </summary>
public string Remark { get; set; }
/// <summary>
/// 带回病房 否
/// </summary>
public string TakeBack { get; set; }
/// <summary>
/// "操作类型": "煎药自取", or "操作类型": "煎药快递", or "操作类型": "配药快递"
/// </summary>
public string OpType { get; set; }
/// <summary>
/// 操作员
/// </summary>
public string OpUser { get; set; }
/// <summary>
/// 病区
/// </summary>
public string Area { get; set; }
/// <summary>
/// 病床号
/// </summary>
public string Bed { get; set; }
/// <summary>
/// 操作时间
/// </summary>
public string OpDatatime { get; set; }
/// <summary>
/// 处方号
/// </summary>
public string PrescriptionNo { get; set; }
/// <summary>
/// 处方日期
/// </summary>
public string PrescriptionDatatime { get; set; }
/// <summary>
/// 单位编号 医疗机构编号
/// </summary>
public string HosNo { get; set; }
/// <summary>
/// 医疗机构名称
/// </summary>
public string HosName { get; set; }
/// <summary>
/// 发票号
/// </summary>
public string InvoiceNo { get; set; }
/// <summary>
/// 病人编号
/// </summary>
public string PatientNo { get; set; }
/// <summary>
/// 病人卡号
/// </summary>
public string CardNo { get; set; }
/// <summary>
/// 科室名称
/// </summary>
public string DepName { get; set; }
/// <summary>
/// 病人年龄
/// </summary>
public string PatientAge { get; set; }
/// <summary>
/// 病人生日
/// </summary>
public string PatientBrithday { get; set; }
/// <summary>
/// 病人手机号码
/// </summary>
public string PatientMobile { get; set; }
/// <summary>
/// 病人电话
/// </summary>
public string PatientPhone { get; set; }
/// <summary>
/// 所在区县街道
/// </summary>
public string District { get; set; }
/// <summary>
/// 送货地址
/// </summary>
public string PostAddress { get; set; }
/// <summary>
/// 送货时间
/// </summary>
public string PostDatatime { get; set; }
/// <summary>
/// 贴数
/// </summary>
public string UseCount { get; set; }
/// <summary>
/// 病人性别
/// </summary>
public string PatientSex { get; set; }
/// <summary>
/// 病人姓名
/// </summary>
public string PatientName { get; set; }
/// <summary>
/// 医生姓名
/// </summary>
public string DoctorName { get; set; }
/// <summary>
/// 诊断
/// </summary>
public string Diagnosis { get; set; }
/// <summary>
/// 用法
/// </summary>
public string Usage { get; set; }
/// <summary>
/// 治疗号
/// </summary>
public string Zlh { get; set; }
/// <summary>
/// 收费序号
/// </summary>
public int Sfxh { get; set; }
/// <summary>
/// 收费费用序号
/// </summary>
public string Sffyxh { get; set; }
/// <summary>
/// 处方对应药品
/// </summary>
public List<WsdDrugInfo> Drugs { get; set; }
}
/// <summary>
/// 药品信息
/// </summary>
public class WsdDrugInfo
{
/// <summary>
/// 药品流水号
/// </summary>
public int Id { get; set; }
/// <summary>
/// 处方流水号
/// </summary>
public string PrescriptionId { get; set; }
/// <summary>
/// "药品医保代码":"YP0306401000650",
/// </summary>
public string DrugNo { get; set; }
/// <summary>
/// 药品单价 0.085
/// </summary>
public string Price { get; set; }
/// <summary>
/// 单贴数量
/// </summary>
public string Count { get; set; }
/// <summary>
/// 单位 克
/// </summary>
public string Unit { get; set; }
/// <summary>
/// 单项总价
/// </summary>
public string Sum { get; set; }
/// <summary>
/// 规格 15.00000000
/// </summary>
public string DrugType { get; set; }
/// <summary>
/// 药品编码
/// </summary>
public string DrugLocalNo { get; set; }
/// <summary>
/// 药品名称
/// </summary>
public string DrugName { get; set; }
/// <summary>
/// 特殊要求
/// </summary>
public string Remark { get; set; }
}
/// <summary>
/// 处方类型
/// </summary>
[Flags]
public enum WsdPrescriptionType
{
/// <summary>
/// 订单
/// </summary>
Order = 1,
/// <summary>
/// 撤销订单,退单
/// </summary>
CancelOrder = 2,
/// <summary>
/// 测试方。无效处方,测试用
/// </summary>
TestOrder = 4,
/// <summary>
/// 空处方,无此处方,调用方应该跳过该处方
/// </summary>
NullOrder = 8,
}
} }

View File

@ -0,0 +1,20 @@
using System;
namespace WsdInterfaceModels
{
/// <summary>
/// 返回信息代码
/// </summary>
[Flags]
public enum EnumCode
{
/// <summary>
/// 执行成功。
/// </summary>
Success = 1,
/// <summary>
/// 发生异常异常信息见msg参数。
/// </summary>
Exception = 2,
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("WsdInterfaceModels")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("WsdInterfaceModels")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2019")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("925c0cbc-0ffa-4c54-8683-540637fa9e3e")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,53 @@
namespace WsdInterfaceModels
{
/// <summary>
/// 药品信息
/// </summary>
public class WsdDrugInfo
{
/// <summary>
/// 药品流水号
/// </summary>
public int Id { get; set; }
/// <summary>
/// 处方流水号
/// </summary>
public string PrescriptionId { get; set; }
/// <summary>
/// "药品医保代码":"YP0306401000650",
/// </summary>
public string DrugNo { get; set; }
/// <summary>
/// 药品单价 0.085
/// </summary>
public string Price { get; set; }
/// <summary>
/// 单贴数量
/// </summary>
public string Count { get; set; }
/// <summary>
/// 单位 克
/// </summary>
public string Unit { get; set; }
/// <summary>
/// 单项总价
/// </summary>
public string Sum { get; set; }
/// <summary>
/// 规格 15.00000000
/// </summary>
public string DrugType { get; set; }
/// <summary>
/// 药品编码
/// </summary>
public string DrugLocalNo { get; set; }
/// <summary>
/// 药品名称
/// </summary>
public string DrugName { get; set; }
/// <summary>
/// 特殊要求
/// </summary>
public string Remark { get; set; }
}
}

View File

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{925C0CBC-0FFA-4C54-8683-540637FA9E3E}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>WsdInterfaceModels</RootNamespace>
<AssemblyName>WsdInterfaceModels</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="EnumCode.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="WsdDrugInfo.cs" />
<Compile Include="WsdPrescriptionInfo.cs" />
<Compile Include="WsdPrescriptionType.cs" />
<Compile Include="WsdRequest.cs" />
<Compile Include="WsdResult.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -0,0 +1,155 @@
using System.Collections.Generic;
namespace WsdInterfaceModels
{
/// <summary>
/// 处方信息
/// </summary>
public class WsdPrescriptionInfo
{
/// <summary>
/// 处方流水号
/// </summary>
public int Id { get; set; }
/// <summary>
/// 处方类型
/// </summary>
public WsdPrescriptionType Type { get; set; }
/// <summary>
/// 如果为退方,这里传要退的处方流水号。此编号在下单应答消息中提供
/// </summary>
public string RawRecordId { get; set; }
/// <summary>
/// 药品明细数量
/// </summary>
public string DrugCount { get; set; }
/// <summary>
/// 处方备注
/// </summary>
public string Remark { get; set; }
/// <summary>
/// 带回病房 否
/// </summary>
public string TakeBack { get; set; }
/// <summary>
/// "操作类型": "煎药自取", or "操作类型": "煎药快递", or "操作类型": "配药快递"
/// </summary>
public string OpType { get; set; }
/// <summary>
/// 操作员
/// </summary>
public string OpUser { get; set; }
/// <summary>
/// 病区
/// </summary>
public string Area { get; set; }
/// <summary>
/// 病床号
/// </summary>
public string Bed { get; set; }
/// <summary>
/// 操作时间
/// </summary>
public string OpDatatime { get; set; }
/// <summary>
/// 处方号
/// </summary>
public string PrescriptionNo { get; set; }
/// <summary>
/// 处方日期
/// </summary>
public string PrescriptionDatatime { get; set; }
/// <summary>
/// 单位编号 医疗机构编号
/// </summary>
public string HosNo { get; set; }
/// <summary>
/// 医疗机构名称
/// </summary>
public string HosName { get; set; }
/// <summary>
/// 发票号
/// </summary>
public string InvoiceNo { get; set; }
/// <summary>
/// 病人编号
/// </summary>
public string PatientNo { get; set; }
/// <summary>
/// 病人卡号
/// </summary>
public string CardNo { get; set; }
/// <summary>
/// 科室名称
/// </summary>
public string DepName { get; set; }
/// <summary>
/// 病人年龄
/// </summary>
public string PatientAge { get; set; }
/// <summary>
/// 病人生日
/// </summary>
public string PatientBrithday { get; set; }
/// <summary>
/// 病人手机号码
/// </summary>
public string PatientMobile { get; set; }
/// <summary>
/// 病人电话
/// </summary>
public string PatientPhone { get; set; }
/// <summary>
/// 所在区县街道
/// </summary>
public string District { get; set; }
/// <summary>
/// 送货地址
/// </summary>
public string PostAddress { get; set; }
/// <summary>
/// 送货时间
/// </summary>
public string PostDatatime { get; set; }
/// <summary>
/// 贴数
/// </summary>
public string UseCount { get; set; }
/// <summary>
/// 病人性别
/// </summary>
public string PatientSex { get; set; }
/// <summary>
/// 病人姓名
/// </summary>
public string PatientName { get; set; }
/// <summary>
/// 医生姓名
/// </summary>
public string DoctorName { get; set; }
/// <summary>
/// 诊断
/// </summary>
public string Diagnosis { get; set; }
/// <summary>
/// 用法
/// </summary>
public string Usage { get; set; }
/// <summary>
/// 治疗号
/// </summary>
public string Zlh { get; set; }
/// <summary>
/// 收费序号
/// </summary>
public int Sfxh { get; set; }
/// <summary>
/// 收费费用序号
/// </summary>
public string Sffyxh { get; set; }
/// <summary>
/// 处方对应药品
/// </summary>
public List<WsdDrugInfo> Drugs { get; set; }
}
}

View File

@ -0,0 +1,29 @@
using System;
namespace WsdInterfaceModels
{
/// <summary>
/// 处方类型
/// </summary>
[Flags]
public enum WsdPrescriptionType
{
/// <summary>
/// 订单
/// </summary>
Order = 1,
/// <summary>
/// 撤销订单,退单
/// </summary>
CancelOrder = 2,
/// <summary>
/// 测试方。无效处方,测试用
/// </summary>
TestOrder = 4,
/// <summary>
/// 空处方,无此处方,调用方应该跳过该处方
/// </summary>
NullOrder = 8,
}
}

View File

@ -0,0 +1,25 @@
namespace WsdInterfaceModels
{
/// <summary>
/// 第三方请求数据
/// </summary>
public class WsdRequest
{
/// <summary>
/// 代煎药厂商编码。
/// </summary>
public string CompanyCode { get; set; }
/// <summary>
/// 代煎药厂商名称
/// </summary>
public string CompanyName { get; set; }
/// <summary>
/// 处方起始流水号。按照数字从1开始累加。返回结果包含此编号的处方。
/// </summary>
public string StartNo { get; set; }
/// <summary>
/// 最大本次获取的处方数量。根据客户网络和服务器配置情况自行调整
/// </summary>
public string MaxCount { get; set; }
}
}

View File

@ -0,0 +1,31 @@
using System.Collections.Generic;
namespace WsdInterfaceModels
{
/// <summary>
/// 服务器响应数据
/// </summary>
public class WsdResult
{
/// <summary>
/// 返回信息代码
/// </summary>
public EnumCode Code { get; set; }
/// <summary>
/// 返回信息
/// </summary>
public string Msg { get; set; }
/// <summary>
/// 本次发送的处方数
/// </summary>
public int Count { get; set; }
/// <summary>
/// 是否还有处方未下载。不已历史是否下载为准,只计算此次下载后是否剩余未下载。
/// </summary>
public bool More { get; set; }
/// <summary>
/// 处方信息
/// </summary>
public List<WsdPrescriptionInfo> Prescriptions { get; set; }
}
}