修改
This commit is contained in:
@@ -5,9 +5,10 @@ using System.Text;
|
||||
|
||||
namespace NX.ERP.BLL.Model
|
||||
{
|
||||
public class Inbound:NX.ERP.Model.BaseModel
|
||||
public class Inbound : NX.ERP.Model.BaseModel
|
||||
{
|
||||
public string InboundNo { get; set; }
|
||||
//[Newtonsoft.Json.JsonConverter(typeof(NX.ERP.Model.TimestampConverter))]
|
||||
public DateTime InboundDate { get; set; }
|
||||
|
||||
public InboundType InboundType { get; set; }
|
||||
|
||||
@@ -31,6 +31,9 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net35\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
@@ -61,5 +64,8 @@
|
||||
<Name>NX.ERP.U8</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
4
NX.ERP.BLL/packages.config
Normal file
4
NX.ERP.BLL/packages.config
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net35" />
|
||||
</packages>
|
||||
@@ -61,6 +61,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="BaseModel.cs" />
|
||||
<Compile Include="TimestampConverter.cs" />
|
||||
<Compile Include="Request\Arrival.cs" />
|
||||
<Compile Include="Request\Bin.cs" />
|
||||
<Compile Include="Request\Customer.cs" />
|
||||
|
||||
36
NX.ERP.Model/TimestampConverter.cs
Normal file
36
NX.ERP.Model/TimestampConverter.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace NX.ERP.Model
|
||||
{
|
||||
public class TimestampConverter : JsonConverter
|
||||
{
|
||||
public override bool CanConvert(Type objectType)
|
||||
{
|
||||
return objectType == typeof(DateTime);
|
||||
}
|
||||
|
||||
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
|
||||
{
|
||||
return ConvertIntDateTime(int.Parse(reader.Value.ToString()));
|
||||
}
|
||||
|
||||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||
{
|
||||
writer.WriteValue(ConvertDateTimeInt((DateTime)value));
|
||||
}
|
||||
|
||||
public static DateTime ConvertIntDateTime(int aSeconds)
|
||||
{
|
||||
return new DateTime(1970, 1, 1).AddSeconds(aSeconds);
|
||||
}
|
||||
|
||||
public static int ConvertDateTimeInt(DateTime aDT)
|
||||
{
|
||||
return (int)(aDT - new DateTime(1970, 1, 1)).TotalSeconds;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,12 +15,12 @@ namespace NX.ERP.U8.Purchase
|
||||
B.Autoid as id,b.ID as ArrivalID,
|
||||
b.cInvCode AS MaterialCode,
|
||||
b.cBatch AS BatchNo,
|
||||
b.fRealQuantity as RealQuantity,
|
||||
b.fRefuseQuantity as RealQuantity,
|
||||
b.cUnitID AS UnitCode,b.ioricost as oricost,b.ioritaxcost as oritaxcost ,b.icost as cost,b.iorimoney as orimoney,b.ioritaxprice as oritaxprice,b.iorisum as orisum,
|
||||
B.iQuantity as Quantity,b.iposid as PosId ,B.CORDERCODE as OrderCode,C.POID as Poid from
|
||||
pu_ArrHead as a
|
||||
left join pu_arrbody as b on a.id=b.id
|
||||
Left Join PO_Podetails C WITH (NOLOCK) ON B.iPOsID = C.ID where ISNULL( a.cverifier,'')<>'' and a.id in (select id from PO_Podetails where fRealQuantity<>iQuantity ) ";
|
||||
Left Join PO_Podetails C WITH (NOLOCK) ON B.iPOsID = C.ID where ISNULL( a.cverifier,'')<>'' and a.id in (select id from PO_Podetails where isnull( fRefuseQuantity,0)<>isnull( iQuantity,0) ) ";
|
||||
if (!string.IsNullOrEmpty(strWhere))
|
||||
{
|
||||
strSQL += $" and {strWhere} ";
|
||||
|
||||
@@ -55,6 +55,8 @@ namespace NX.ERP.WebAPi
|
||||
{
|
||||
//忽略循环引用,如果设置为Error,则遇到循环引用的时候报错
|
||||
ReferenceLoopHandling = ReferenceLoopHandling.Ignore,
|
||||
DateTimeZoneHandling=DateTimeZoneHandling.Local,
|
||||
|
||||
//NullValueHandling = NullValueHandling.Ignore,
|
||||
//Formatting = Newtonsoft.Json.Formatting.Indented,
|
||||
//小驼峰命名法
|
||||
@@ -64,7 +66,7 @@ namespace NX.ERP.WebAPi
|
||||
NamingStrategy = new SnakeCaseNamingStrategy()
|
||||
}
|
||||
//格式化日期时间
|
||||
|
||||
|
||||
//空值处理
|
||||
//NullValueHandling = NullValueHandling.Ignore
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
-->
|
||||
<configuration>
|
||||
<appSettings>
|
||||
<add key="server" value="192.168.0.168"/>
|
||||
<add key="AccId" value="(default)@001"/>
|
||||
<add key="UserId" value="wx998"/>
|
||||
<add key="Password" value="nx123456"/>
|
||||
<add key="EaiPort" value="80"/>
|
||||
<add key="server" value="192.168.0.168" />
|
||||
<add key="AccId" value="(default)@001" />
|
||||
<add key="UserId" value="wx998" />
|
||||
<add key="Password" value="nx123456" />
|
||||
<add key="EaiPort" value="80" />
|
||||
<add key="EaiPath" value="U8EAI/import.asp" />
|
||||
<add key="webpages:Version" value="3.0.0.0" />
|
||||
<add key="webpages:Enabled" value="false" />
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
## U8API
|
||||
|
||||
##HTTP 错误 500.21 - Internal Server Error
|
||||
### HTTP 错误 500.21 - Internal Server Error
|
||||
处理程序“ExtensionlessUrlHandler-Integrated-4.0”在其模块列表中有一个错误模块“ManagedPipelineHandler”
|
||||
| C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i
|
||||
### 时间不一致问题
|
||||
注册表 搜索sShortDate 全改为 yyyy-MM-dd
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user