Browse Source

需求单No.141658

master
wugang 7 years ago
parent
commit
772027d6db
4 changed files with 49 additions and 3 deletions
  1. +9
    -1
      B3_QiLianMuGe.Web/B3_QiLianMuGe.Web.csproj
  2. +3
    -1
      B3_QiLianMuGe.Web/PluginClass.cs
  3. +1
    -1
      B3_QiLianMuGe/B3_QiLianMuGe.csproj
  4. +36
    -0
      B3_QiLianMuGe/TypeIOCs/CheckSameCowBatchIOC.cs

+ 9
- 1
B3_QiLianMuGe.Web/B3_QiLianMuGe.Web.csproj View File

@ -35,6 +35,10 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\tsref\Debug\B3CowButcherManage.dll</HintPath>
</Reference>
<Reference Include="B3CowButcherManage.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3a973053c7ebf11c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\tsref\Debug\B3CowButcherManage.Web.dll</HintPath>
</Reference>
<Reference Include="B3ExportBase, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3a973053c7ebf11c, processorArchitecture=MSIL" />
<Reference Include="B3ExportBase.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3a973053c7ebf11c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
@ -151,11 +155,15 @@
<ProjectReference Include="..\B3_QiLianMuGe\B3_QiLianMuGe.csproj">
<Project>{19FBD9C0-0959-41C9-9698-FFB2AD98CDD3}</Project>
<Name>B3_QiLianMuGe</Name>
<Private>False</Private></ProjectReference>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Pages\B3_QiLianMuGe\ToK3Cloud\PayToK3CloudList.xml" />
</ItemGroup>
<ItemGroup>
<Folder Include="TypeIOCs\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.


+ 3
- 1
B3_QiLianMuGe.Web/PluginClass.cs View File

@ -1,4 +1,5 @@
using BWP.B3Sale;
using BWP.B3CowButcherManage;
using BWP.B3Sale;
using TSingSoft.WebPluginFramework;
@ -10,6 +11,7 @@ namespace BWP.B3_QiLianMuGe.Web
{
GlobalFlags.On(B3SaleConsts.Flags.BillDoCheckUnCheckGoodsBatch);
GlobalFlags.On(B3SaleConsts.Flags.SaleOutStoreListOrderByID);
GlobalFlags.On(B3CowButcherManageConsts.GlobalFlags.);
}
}
}

+ 1
- 1
B3_QiLianMuGe/B3_QiLianMuGe.csproj View File

@ -133,11 +133,11 @@
<Compile Include="BL\SaleOutStoreToK3CloudBL.cs" />
<Compile Include="B3QiLianMuGeConsts.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TypeIOCs\CheckSameCowBatchIOC.cs" />
<Compile Include="Utils\CreateInOutStoreBillIOC.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="BO\" />
<Folder Include="TypeIOCs\" />
</ItemGroup>
<ItemGroup>
<None Include="BL\script\付款单导金蝶云凭证.py" />


+ 36
- 0
B3_QiLianMuGe/TypeIOCs/CheckSameCowBatchIOC.cs View File

@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BWP.B3CowButcherManage.BL;
using BWP.B3CowButcherManage.BO;
using BWP.B3Frameworks;
using Forks.EnterpriseServices.DomainObjects2;
using Forks.EnterpriseServices.DomainObjects2.DQuery;
using Forks.EnterpriseServices.SqlDoms;
namespace B3_QiLianMuGe.TypeIOCs
{
[TypeIOC(typeof(WeightBL), typeof(WeightBL.ICheckSameCowBatch))]
public class CheckSameCowBatchIOC : WeightBL.ICheckSameCowBatch
{
public void Invoke(IDmoSession session, Weight dmo)
{
if (string.IsNullOrEmpty(dmo.CowBatch))
{
throw new ApplicationException("屠宰批次不能为空");
}
var query = new DQueryDom(new JoinAlias(typeof(Weight)));
if (dmo.ID > 0)
{
query.Where.Conditions.Add(DQCondition.InEQ("ID", dmo.ID));
}
query.Where.Conditions.Add(DQCondition.EQ("CowBatch", dmo.CowBatch));
query.Range = SelectRange.Top(1);
query.Columns.Add(DQSelectColumn.Create(DQExpression.Snippet<int>("1"), "Column1"));
var flag = session.ExecuteScalar(query) != null;
if (flag)
throw new ApplicationException("存在相同名称的屠宰批号");
}
}
}

Loading…
Cancel
Save