Commit 06c18f03 by 陶然

初始化

parents
################################################################################
# 此 .gitignore 文件已由 Microsoft(R) Visual Studio 自动创建。
################################################################################
/.vs
/Src/bin/Debug
/Src/obj/Debug
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<connectionStrings>
<!--<add name="Database" providerName="MySql" connectionString="data source=localhost; database=dbName;username=root;password=123456"/>-->
</connectionStrings></configuration>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Kivii.Third.Scjgj
{
internal class Configs
{
public const string TableNamePlan = "PM_PLAN";
public const string TableNamePlanDetail = "PM_PLAN_SUB";
}
}
<?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>{6CA8C1B0-C62C-4ED0-8EA4-208926A920A6}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Kivii.Third.Scjgj</RootNamespace>
<AssemblyName>Kivii.Third.Scjgj.V4.5</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</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="Kivii.Common.V4.5, Version=5.6.2024.5200, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Kivii.Common.5.6.2024.5200\lib\net45\Kivii.Common.V4.5.dll</HintPath>
</Reference>
<Reference Include="Kivii.Core.V4.5, Version=5.6.2024.5200, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Kivii.Core.5.6.2024.5200\lib\net45\Kivii.Core.V4.5.dll</HintPath>
</Reference>
<Reference Include="Kivii.Linq.Oracle.V4.5, Version=5.6.2024.1000, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Kivii.Linq.Oracle.5.6.2024.1000\lib\net45\Kivii.Linq.Oracle.V4.5.dll</HintPath>
</Reference>
<Reference Include="Kivii.Linq.V4.5, Version=5.6.2024.6000, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Kivii.Linq.5.6.2024.6000\lib\net45\Kivii.Linq.V4.5.dll</HintPath>
</Reference>
<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="Configs.cs" />
<Compile Include="Entities\Plan.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RestfulPlan.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Kivii.Biz.Lims\Src\Kivii.Biz.Lims.V4.5.csproj">
<Project>{a1971816-ee6f-4558-8923-b1b85779cb7f}</Project>
<Name>Kivii.Biz.Lims.V4.5</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("Kivii.Third.Scjgj.V4.5")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Kivii.Third.Scjgj.V4.5")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("6ca8c1b0-c62c-4ed0-8ea4-208926a920a6")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
using Kivii.Linq;
using Kivii.Third.Scjgj.Entities;
using Kivii.Web;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Kivii.Third.Scjgj
{
[RequiresAnyRole(MemberRoles.Everyone)]
public class PlanQuery : RestfulExecution<Plan>
{
public int? Skip { get; set; } = 0;
public int? Take { get; set; } = 50;
public string OrderBy { get; set; }
public string QueryKeys { get; set; }
public string QueryValues { get; set; }
public override object OnExecution(IRequest req, IResponse res)
{
var rtns = new RestfulQueryResponse<Plan>();
rtns.Results = new List<Plan>();
var conn = KiviiContext.GetOpenedDbConnection<Plan>();
var query = conn.From<Plan>();
if (!QueryValues.IsNullOrEmpty()) query.Where(o => o.PLAN_CODE.Contains(QueryValues));
if (Skip.HasValue && Skip.Value >= 0) query.Skip(Skip.Value);
if (Take.HasValue && Take.Value > 0) query.Take(Take.Value);
if (!OrderBy.IsNullOrEmpty()) query.OrderBy(OrderBy);
rtns.Results = conn.Select(query);
rtns.Total = rtns.Results.Count;
return rtns;
}
}
[RequiresAnyRole(MemberRoles.Everyone)]
public class PlanDetailQuery : RestfulExecution<PlanDetail>
{
public int? Skip { get; set; } = 0;
public int? Take { get; set; } = 50;
public string OrderBy { get; set; }
public string QueryKeys { get; set; }
public string QueryValues { get; set; }
public override object OnExecution(IRequest req, IResponse res)
{
var rtns = new RestfulQueryResponse<PlanDetail>();
rtns.Results = new List<PlanDetail>();
var conn = KiviiContext.GetOpenedDbConnection<Plan>();
var query = conn.From<PlanDetail>();
if (!QueryValues.IsNullOrEmpty()) query.Where(o => o.PLAN_CODE.Contains(QueryValues));
if (Skip.HasValue&&Skip.Value>=0) query.Skip(Skip.Value);
if (Take.HasValue&&Take.Value>0) query.Take(Take.Value);
if (!OrderBy.IsNullOrEmpty()) query.OrderBy(OrderBy);
rtns.Results = conn.Select(query);
rtns.Total = rtns.Results.Count;
return rtns;
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Kivii.Common" version="5.6.2024.5200" targetFramework="net45" />
<package id="Kivii.Core" version="5.6.2024.5200" targetFramework="net45" />
<package id="Kivii.Linq" version="5.6.2024.6000" targetFramework="net45" />
<package id="Kivii.Linq.Oracle" version="5.6.2024.1000" targetFramework="net45" />
</packages>
\ No newline at end of file
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