Commit 157637f5 by 仙女 小

代码初始化

parent dc2974d7
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Kivii.Domain.Contents
{
internal class Configs
{
public const string TableNameReport = "LIMS_Reports";
}
}
......@@ -17,7 +17,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\Kivii%27s Dlls\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
......@@ -50,10 +50,14 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Configs.cs" />
<Compile Include="Entities\Report.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Transforms\RestfulReport.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
using Kivii.Domain.Contents.Entities;
using Kivii.Linq;
using Kivii.Web;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Kivii.Domain.Contents.Transforms
{
public class ReportQuery : RestfulExecution<Report>
{
public string ReportId { get; set; }
public string VerificationCode { get; set; }
public override object OnExecution(IRequest req, IResponse res)
{
var conn = KiviiContext.GetOpenedDbConnection<Report>();
var queryReport = conn.From<Report>();
queryReport.Where(o=>o.ReportId== ReportId&&o.TypeEx!="J");
var report = conn.Select(queryReport).FirstOrDefault();
(report == null).ThrowIfTrue("未查询到报告!请重新核对报告号信息.");
var code = report.Kvid.ToString();
code = code.Substring(code.Length-4,4);
(code != VerificationCode).ThrowIfTrue("验证码匹配失败!请重新核对验证码信息.");
var rtns = new RestfulQueryResponse<Report>();
rtns.Results = new List<Report>();
rtns.Results.Add(report);
rtns.Total = rtns.Results.Count;
return rtns;
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment