lvzb 1 year ago
parent
commit
44ffff39e1
  1. 5
      Controller/CK.SCP.Controller.csproj
  2. 15
      Models/CK.SCP.Models.csproj
  3. 4
      Models/EntitiesFactory.cs
  4. 5
      UniApiGroup/CK.SCP.GrupUniApi.csproj
  5. 27
      UniApiGroup/Controller/OdbcApiQadController.cs

5
Controller/CK.SCP.Controller.csproj

@ -31,8 +31,9 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="ChangKeTec.Utils"> <Reference Include="ChangKeTec.Utils, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>D:\连接orlcor\ChangKeTec.Utils.dll</HintPath> <SpecificVersion>False</SpecificVersion>
<HintPath>bin\Debug\ChangKeTec.Utils.dll</HintPath>
</Reference> </Reference>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath> <HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath>

15
Models/CK.SCP.Models.csproj

@ -31,6 +31,9 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="ChangKeTec.Utils">
<HintPath>..\Controller\bin\Debug\ChangKeTec.Utils.dll</HintPath>
</Reference>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath> <HintPath>..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll</HintPath>
</Reference> </Reference>
@ -768,12 +771,6 @@
<None Include="UniApiEntity\App.config" /> <None Include="UniApiEntity\App.config" />
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Utils\CK.SCP.Utils.csproj">
<Project>{4c6a951d-ad7f-47ce-b2ce-32c205d8d6ba}</Project>
<Name>CK.SCP.Utils</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="WmsEntity\TableSchema.tt"> <Content Include="WmsEntity\TableSchema.tt">
<Generator>TextTemplatingFileGenerator</Generator> <Generator>TextTemplatingFileGenerator</Generator>
@ -786,5 +783,11 @@
<ItemGroup> <ItemGroup>
<Folder Include="WmsEntity\HyAntolin\" /> <Folder Include="WmsEntity\HyAntolin\" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Utils\CK.SCP.Utils.csproj">
<Project>{4C6A951D-AD7F-47CE-B2CE-32C205D8D6BA}</Project>
<Name>CK.SCP.Utils</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>

4
Models/EntitiesFactory.cs

@ -1,17 +1,15 @@
using System; using System;
using System.Data.Entity; using System.Data.Entity;
using System.Data.Entity.Core; using System.Data.Entity.Core;
using System.Data.Entity.Core.EntityClient;
using System.Data.SqlClient; using System.Data.SqlClient;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks;
using CK.SCP.Models.AppBoxEntity; using CK.SCP.Models.AppBoxEntity;
using CK.SCP.Models.Enums; using CK.SCP.Models.Enums;
using CK.SCP.Models.UniApiEntity; using CK.SCP.Models.UniApiEntity;
using CK.SCP.Utils;
using ChangKeTec.Wms.Models.Wms; using ChangKeTec.Wms.Models.Wms;
using System.ComponentModel; using System.ComponentModel;
using CK.SCP.Utils;
namespace CK.SCP.Models namespace CK.SCP.Models
{ {

5
UniApiGroup/CK.SCP.GrupUniApi.csproj

@ -48,8 +48,9 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="ChangKeTec.Utils"> <Reference Include="ChangKeTec.Utils, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>D:\连接orlcor\ChangKeTec.Utils.dll</HintPath> <SpecificVersion>False</SpecificVersion>
<HintPath>..\Controller\bin\Debug\ChangKeTec.Utils.dll</HintPath>
</Reference> </Reference>
<Reference Include="DevComponents.DotNetBar.Layout, Version=14.1.0.21, Culture=neutral, PublicKeyToken=7eb7c3a35b91de04, processorArchitecture=MSIL"> <Reference Include="DevComponents.DotNetBar.Layout, Version=14.1.0.21, Culture=neutral, PublicKeyToken=7eb7c3a35b91de04, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>

27
UniApiGroup/Controller/OdbcApiQadController.cs

@ -802,34 +802,15 @@ namespace CK.SCP.GrupUniApi.Controller
{ {
var _liii = _lii.ToList(); var _liii = _lii.ToList();
var _entity = _liii.First(); var _entity = _liii.First();
var _askdetail = wdb.TB_ASK_DETAIL.Count(p => p.PoBillNum == _entity.purDocNO && p.State > -1); // 根据 零件号作废
if(_askdetail== _liii.Count()) var askdetaill = wdb.TB_ASK_DETAIL.Where(p => p.PoBillNum == _entity.purDocNO && p.PartCode == _entity.mtlNO).ToList();
{
var ask = wdb.TB_ASK.FirstOrDefault(p=>p.PoBillNum==_entity.purDocNO);
ask.State = -1;
ask.IsDeleted = true;
wmsAskList.Add(ask);
var askdetaill=wdb.TB_ASK_DETAIL.Where(p => p.PoBillNum == _entity.purDocNO).ToList();
askdetaill.ForEach(p => askdetaill.ForEach(p =>
{ {
p.State = -1; p.State = -1;
p.IsDeleted = true; p.IsDeleted = true;
wmsAskDetailList.Add(p); wmsAskDetailList.Add(p);
});
}
else
{
var askdetaill = wdb.TB_ASK_DETAIL.Where(p => p.PoBillNum == _entity.purDocNO).ToList();
askdetaill.ForEach(p =>
{
p.State = -1;
p.IsDeleted = true;
wmsAskDetailList.Add(p);
}); });
} }
}
foreach (var qadPoNbr in Ilist) foreach (var qadPoNbr in Ilist)
{ {
var qadDataList = wmsPoList.Count(p => p.PoBillNum == qadPoNbr.purDocNO); var qadDataList = wmsPoList.Count(p => p.PoBillNum == qadPoNbr.purDocNO);
@ -897,6 +878,8 @@ namespace CK.SCP.GrupUniApi.Controller
var qadASKList = wmsAskDetailList.Count(p => p.PoBillNum == qadPoNbr.purDocNO && p.PartCode == qadPoNbr.mtlNO); var qadASKList = wmsAskDetailList.Count(p => p.PoBillNum == qadPoNbr.purDocNO && p.PartCode == qadPoNbr.mtlNO);
var wmsAskDetail1 = wdb.TB_ASK_DETAIL.Count(p => p.PoBillNum == qadPoNbr.purDocNO && p.PartCode == qadPoNbr.mtlNO); var wmsAskDetail1 = wdb.TB_ASK_DETAIL.Count(p => p.PoBillNum == qadPoNbr.purDocNO && p.PartCode == qadPoNbr.mtlNO);
//
var tapart = wdb.TA_PART.Where(q => q.PartCode == qadPoNbr.mtlNO.Trim()).ToList();
if (qadASKList == 0 && wmsAskDetail1 == 0) if (qadASKList == 0 && wmsAskDetail1 == 0)
{ {
String str = "k"; String str = "k";
@ -914,7 +897,7 @@ namespace CK.SCP.GrupUniApi.Controller
EndTime = qadPoNbr.itemDeliveryDate,//ÊÕ»õ½áÊøʱ¼ä EndTime = qadPoNbr.itemDeliveryDate,//ÊÕ»õ½áÊøʱ¼ä
Price = 0, Price = 0,
AskQty = qadPoNbr.quantity, AskQty = qadPoNbr.quantity,
DockCode = "YC", DockCode = tapart.Count()>0 ? tapart.FirstOrDefault().PartGroup:"YC",
PoUnit = qadPoNbr.baseUnitMeasure, PoUnit = qadPoNbr.baseUnitMeasure,
Currency = qadPoNbr.sizecoL, Currency = qadPoNbr.sizecoL,
}; };

Loading…
Cancel
Save