Browse Source

需求单No.141791

master
wugang 7 years ago
parent
commit
19bd79d8f3
3 changed files with 59 additions and 1 deletions
  1. +2
    -1
      B3_QiLianMuGe.Web/Pages/Overlays/SaleOutStoreEdit_Ext.cs
  2. +1
    -0
      B3_QiLianMuGe/B3_QiLianMuGe.csproj
  3. +56
    -0
      B3_QiLianMuGe/TypeIOCs/SaleOutStoreDoNullifyDoSomethingIoc.cs

+ 2
- 1
B3_QiLianMuGe.Web/Pages/Overlays/SaleOutStoreEdit_Ext.cs View File

@ -4,6 +4,7 @@ using System.Linq;
using System.Text;
using BWP.Web.Pages.B3Sale.Bills.SaleOutStore_;
using TSingSoft.WebControls2;
using Forks.Utils.Collections;
namespace BWP.Web.Pages.Overlays
{
@ -11,7 +12,7 @@ namespace BWP.Web.Pages.Overlays
{
protected override void AddCustomerDetailColumns(DFEditGrid detailGrid)
{
detailGrid.Columns.Add(new DFEditGridColumn<DFValueLabel>("PackageNum"));
detailGrid.Columns.EAdd(new DFEditGridColumn<DFValueLabel>("PackageNum")).SumMode = SumMode.Sum;
}
}
}

+ 1
- 0
B3_QiLianMuGe/B3_QiLianMuGe.csproj View File

@ -134,6 +134,7 @@
<Compile Include="B3QiLianMuGeConsts.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TypeIOCs\CheckSameCowBatchIOC.cs" />
<Compile Include="TypeIOCs\SaleOutStoreDoNullifyDoSomethingIOC.cs" />
<Compile Include="Utils\CreateInOutStoreBillIOC.cs" />
</ItemGroup>
<ItemGroup>


+ 56
- 0
B3_QiLianMuGe/TypeIOCs/SaleOutStoreDoNullifyDoSomethingIoc.cs View File

@ -0,0 +1,56 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BWP.B3CowButcherManage.BO;
using BWP.B3Frameworks;
using BWP.B3Sale.BL;
using BWP.B3Sale.BO;
using BWP.B3Sale.Utils;
using Forks.EnterpriseServices.DomainObjects2;
using Forks.EnterpriseServices.DomainObjects2.DQuery;
namespace B3_QiLianMuGe.TypeIOCs
{
[TypeIOC(typeof(SaleOutStoreBL), typeof(SaleOutStoreBL.IDoNullifyDoSomething))]
class SaleOutStoreDoNullifyDoSomethingIOC : SaleOutStoreBL.IDoNullifyDoSomething
{
public void Invoke(SaleOutStore outStore, IDmoSession session)
{
var billType = DmoTypeIDAttribute.GetID(typeof(SaleOutStore));
DeleteByFunc<WeightingInfor>(session, () => { return DQCondition.And(DQCondition.EQ("BillID", outStore.ID), DQCondition.EQ("BillType", billType)); });
DeleteByFunc<WeightingInfo_ScanDetail>(session, () => { return DQCondition.EQ("BillID", outStore.ID); });
UpdateSaleOutStoreInfo(session,outStore.ID);
UpdateAssignGoodsInfo(session,outStore.ID);
}
private void UpdateSaleOutStoreInfo(IDmoSession session, long id)
{
var update = new DQUpdateDom(typeof(SaleOutStore));
update.Columns.Add(new DQUpdateColumn("AssignState", DQExpression.Value(.)));
update.Where.Conditions.Add(DQCondition.EQ("ID", id));
session.ExecuteNonQuery(update);
var update2 = new DQUpdateDom(typeof(SaleOutStore));
update2.Columns.Add(new DQUpdateColumn("RowVersion", DQExpression.Add(DQExpression.Field("RowVersion"), DQExpression.Value(1))));
update2.Where.Conditions.Add(DQCondition.EQ("ID", id));
session.ExecuteNonQuery(update2);
}
public static void UpdateAssignGoodsInfo(IDmoSession session, long? billID)
{
var update = new DQUpdateDom(typeof(BarCodeProductionInfo));
update.Columns.Add(new DQUpdateColumn("IsAssignGoods", false));
update.Columns.Add(new DQUpdateColumn("AssignBillID", DQExpression.NULL));
update.Where.Conditions.Add(DQCondition.EQ("AssignBillID",billID));
session.ExecuteNonQuery(update);
}
void DeleteByFunc<T>(IDmoSession session, Func<IDQExpression> func)
{
var delete = new DQDeleteDom(typeof(T));
delete.Where.Conditions.Add(func());
session.ExecuteNonQuery(delete);
}
}
}

Loading…
Cancel
Save