diff --git a/B3ClientService.Web/B3ClientService.Web.csproj b/B3ClientService.Web/B3ClientService.Web.csproj
index aae79c8..4790cd3 100644
--- a/B3ClientService.Web/B3ClientService.Web.csproj
+++ b/B3ClientService.Web/B3ClientService.Web.csproj
@@ -114,6 +114,12 @@
ASPXCodeBehind
+
+ ASPXCodeBehind
+
+
+ ASPXCodeBehind
+
ASPXCodeBehind
diff --git a/B3ClientService.Web/Pages/B3ClientService/Reports/CarcassInOutStoreAnalyse_/CarcassDetailDialog.cs b/B3ClientService.Web/Pages/B3ClientService/Reports/CarcassInOutStoreAnalyse_/CarcassDetailDialog.cs
new file mode 100644
index 0000000..7cb3db2
--- /dev/null
+++ b/B3ClientService.Web/Pages/B3ClientService/Reports/CarcassInOutStoreAnalyse_/CarcassDetailDialog.cs
@@ -0,0 +1,184 @@
+using BWP.B3ClientService.BO;
+using BWP.Web.Utils;
+using BWP.Web.WebControls;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using TSingSoft.WebPluginFramework.Controls;
+using TSingSoft.WebPluginFramework.Pages;
+using TSingSoft.WebControls2;
+using BWP.B3Frameworks.Utils;
+using System.Web.UI.WebControls;
+using Forks.EnterpriseServices.DomainObjects2.DQuery;
+using Forks.EnterpriseServices.SqlDoms;
+using Forks.EnterpriseServices.DataForm;
+using Forks.EnterpriseServices.DomainObjects2;
+using TSingSoft.WebPluginFramework;
+
+namespace BWP.Web.Pages.B3ClientService.Reports.CarcassInOutStoreAnalyse_
+{
+ class CarcassDetailDialog : ServerPage
+ {
+ long? GoodsID
+ {
+ get
+ {
+ if (string.IsNullOrEmpty(Request.QueryString["Goods_ID"]))
+ return null;
+ return long.Parse(Request.QueryString["Goods_ID"]);
+ }
+ }
+
+ int Flag
+ {
+ get { return int.Parse(Request.QueryString["flag"]); }
+ }
+
+ DateTime startTime { get { return DateTime.Parse(Request.QueryString["Start"]); } }
+
+ DateTime endTime { get { return DateTime.Parse(Request.QueryString["End"]) + new TimeSpan(23, 59, 59); } }
+
+ protected override void InitForm(System.Web.UI.HtmlControls.HtmlForm form)
+ {
+ var pageTitle = BuildTitle();
+ form.Controls.Add(new PageTitle(pageTitle));
+
+ CreateResultPanel(form.EAdd(new TitlePanel("查询结果")));
+ }
+
+ string BuildTitle()
+ {
+ var goodsName = string.Empty;
+ if (GoodsID.HasValue)
+ goodsName = WebBLUtil.GetDmoPropertyByID(typeof(Goods), "Name", GoodsID.Value);
+ var billName = "期末";
+ switch (Flag)
+ {
+ case 0:
+ billName = "成品入库";
+ break;
+ case 1:
+ billName = "分割领用";
+ break;
+ case 2:
+ billName = "销售出库";
+ break;
+ }
+
+ return string.Format("{0}{1}信息", goodsName, billName);
+ }
+
+ DFBrowseGrid mBrowseGrid;
+ private void CreateResultPanel(TitlePanel titlePanel)
+ {
+ mBrowseGrid = titlePanel.EAdd(new DFBrowseGrid(new DFDataTableEditor()) { Width = Unit.Percentage(100) });
+ mBrowseGrid.Columns.Add(new DFBrowseGridAutoColumn());
+ }
+
+ void StartQuery()
+ {
+ var sumColumns = new List();
+ var query = new DQueryDom(new JoinAlias(typeof(UnionTemp)));
+ query.RegisterQueryTable(typeof(UnionTemp), new string[] { "ProductBatch_ID", "Weight", "Time", "Flag" }, GetUnionDom(endTime));
+ query.Columns.Add(DQSelectColumn.Field("ProductBatch_Name", "批次"));
+
+ if (Flag == -1)
+ {
+ query.Columns.Add(DQSelectColumn.Create(DQExpression.Sum(DQExpression.LogicCase(DQCondition.EQ("Flag", 0), DQExpression.Value(1), DQExpression.Value(-1))).ECastType(), "头数"));
+ query.Columns.Add(DQSelectColumn.Create(DQExpression.Sum(DQExpression.LogicCase(DQCondition.EQ("Flag", 0), DQExpression.Field("Weight"), DQExpression.Multiply(DQExpression.Value(-1), DQExpression.Field("Weight")))).ECastType(), "重量"));
+ }
+ else
+ {
+ query.Columns.Add(DQSelectColumn.Create(DQExpression.Sum(DQExpression.LogicCase(DQCondition.And(DQCondition.GreaterThanOrEqual("Time", startTime), DQCondition.EQ("Flag", Flag)), DQExpression.Value(1))).ECastType(), "头数"));
+ query.Columns.Add(DQSelectColumn.Create(DQExpression.Sum(DQExpression.LogicCase(DQCondition.And(DQCondition.GreaterThanOrEqual("Time", startTime), DQCondition.EQ("Flag", Flag)), DQExpression.Field("Weight"))).ECastType(), "重量"));
+ }
+ query.GroupBy.Expressions.Add(DQExpression.Field("ProductBatch_Name"));
+
+ query.Having.Conditions.Add(DQCondition.Or(DQCondition.InEQ(DQExpression.Sum(DQExpression.LogicCase(DQCondition.EQ("Flag", 0), DQExpression.Value(1), DQExpression.Value(-1))), DQExpression.Value(0)), DQCondition.InEQ(DQExpression.Sum(DQExpression.LogicCase(DQCondition.EQ("Flag", 0), DQExpression.Field("Weight"), DQExpression.Multiply(DQExpression.Value(-1), DQExpression.Field("Weight")))), DQExpression.Value(0))));
+ var args = new LoadArguments(query);
+ for (var idx = 1; idx < query.Columns.Count; idx++)
+ {
+ args.SumColumns.Add(idx);
+ args.GroupSumColumns.Add(idx);
+ }
+ mBrowseGrid.LoadArguments = args;
+ mBrowseGrid.DataBind();
+ }
+
+ protected override void OnLoad(EventArgs e)
+ {
+ base.OnLoad(e);
+ if (!IsPostBack)
+ StartQuery();
+ }
+
+ [DFClass]
+ class UnionTemp
+ {
+ public long ProductBatch_ID { get; set; }
+ public decimal Weight { get; set; }
+ public DateTime Time { get; set; }
+ public int Flag { get; set; }
+
+ [ReferenceTo(typeof(ProductBatch), "Name")]
+ [Join("ProductBatch_ID", "ID")]
+ public string ProductBatch_Name { get; set; }
+ }
+
+ DQueryDom GetUnionDom(DateTime endTime)
+ {
+ var u1 = GetInStore(endTime);
+ var u2 = GetPickOutStore(endTime);
+ u1.UnionNext.Select = u2;
+ u1.UnionNext.Type = UnionType.All;
+ u2.UnionNext.Select = GetSaleOutStore(endTime);
+ u2.UnionNext.Type = UnionType.All;
+ return u1;
+ }
+
+ DQueryDom GetInStore(DateTime endTime)
+ {
+ var query = new DQueryDom(new JoinAlias("_inStore", typeof(CarcassFullInfo)));
+ query.Columns.Add(DQSelectColumn.Field("ProductBatch_ID"));
+ query.Columns.Add(DQSelectColumn.Field("InStoreWeight"));
+ query.Columns.Add(DQSelectColumn.Field("InStoreTime"));
+ query.Columns.Add(DQSelectColumn.Create(DQExpression.Value(0), "Falg"));
+ query.Where.Conditions.Add(DQCondition.LessThanOrEqual("InStoreTime", endTime));
+ AddGoodsCondition(query, "InStoreGoods_ID");
+ return query;
+ }
+
+ DQueryDom GetPickOutStore(DateTime endTime)
+ {
+ var query = new DQueryDom(new JoinAlias("_pickOut", typeof(CarcassFullInfo)));
+ query.Columns.Add(DQSelectColumn.Field("ProductBatch_ID"));
+ query.Columns.Add(DQSelectColumn.Field("PickWeight"));
+ query.Columns.Add(DQSelectColumn.Field("PickTime"));
+ query.Columns.Add(DQSelectColumn.Create(DQExpression.Value(1), "Falg"));
+ query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("PickType", 0), DQCondition.LessThanOrEqual("PickTime", endTime)));
+ AddGoodsCondition(query, "InStoreGoods_ID");
+ return query;
+ }
+
+ DQueryDom GetSaleOutStore(DateTime endTime)
+ {
+ var query = new DQueryDom(new JoinAlias("_saleOut", typeof(CarcassFullInfo)));
+ query.Columns.Add(DQSelectColumn.Field("ProductBatch_ID"));
+ query.Columns.Add(DQSelectColumn.Field("PickWeight"));
+ query.Columns.Add(DQSelectColumn.Field("PickTime"));
+ query.Columns.Add(DQSelectColumn.Create(DQExpression.Value(2), "Falg"));
+ query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("PickType", 1), DQCondition.LessThanOrEqual("PickTime", endTime)));
+ AddGoodsCondition(query, "SaleGoods_ID");
+ return query;
+ }
+
+ void AddGoodsCondition(DQueryDom query, string goodsField)
+ {
+ if (GoodsID.HasValue)
+ query.Where.Conditions.Add(DQCondition.EQ(goodsField, GoodsID));
+ else
+ query.Where.Conditions.Add(DQCondition.IsNull(DQExpression.Field(goodsField)));
+ }
+ }
+}
diff --git a/B3ClientService.Web/Pages/B3ClientService/Reports/CarcassInOutStoreAnalyse_/CarcassInOutStoreAnalyse.cs b/B3ClientService.Web/Pages/B3ClientService/Reports/CarcassInOutStoreAnalyse_/CarcassInOutStoreAnalyse.cs
new file mode 100644
index 0000000..8f1861d
--- /dev/null
+++ b/B3ClientService.Web/Pages/B3ClientService/Reports/CarcassInOutStoreAnalyse_/CarcassInOutStoreAnalyse.cs
@@ -0,0 +1,235 @@
+using BWP.B3ClientService;
+using BWP.B3ClientService.BO;
+using BWP.B3Frameworks.Utils;
+using BWP.Web.Utils;
+using BWP.Web.WebControls;
+using Forks.EnterpriseServices.DataForm;
+using Forks.EnterpriseServices.DomainObjects2;
+using Forks.EnterpriseServices.DomainObjects2.DQuery;
+using Forks.EnterpriseServices.SqlDoms;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Security;
+using System.Text;
+using System.Web.UI;
+using System.Web.UI.HtmlControls;
+using System.Web.UI.WebControls;
+using TSingSoft.WebControls2;
+using TSingSoft.WebPluginFramework.Controls;
+using TSingSoft.WebPluginFramework.Pages;
+using TSingSoft.WebPluginFramework;
+using System.Web;
+
+namespace BWP.Web.Pages.B3ClientService.Reports.CarcassInOutStoreAnalyse_
+{
+ class CarcassInOutStoreAnalyse : ServerPage
+ {
+ protected override void OnInit(EventArgs e)
+ {
+ if (!User.IsInRole("B3ClientService.报表展示.白条进销存"))
+ throw new SecurityException();
+ base.OnInit(e);
+ }
+
+ DFBrowseGrid mBrowseGrid;
+ protected override void InitForm(HtmlForm form)
+ {
+ form.EAdd(new PageTitle("白条进销存"));
+
+ var queryPanel = new Panel();
+ queryPanel.Style.Add(HtmlTextWriterStyle.BackgroundColor, "white");
+ queryPanel.CssClass = "QueryPanel PrintInVisible";
+ form.Controls.Add(queryPanel);
+
+ AddQueryControl(queryPanel);
+
+ var mZone = new TitlePanelZone();
+ form.Controls.Add(mZone);
+
+ mZone.Add(CreateResultTab());
+
+ mBrowseGrid.OnDetailDataBound = (tr, obj, index) =>
+ {
+ var row = obj as DFDataRow;
+ var gName = (string)row["Goods_Name"];
+ var url = BuildUrl(string.Format("{0}", row["Goods_ID"]));
+ url = WpfPageUrl.ToGlobal(url);
+ url = AspUtil.AddParamToUrl(url, "flag", "0");
+ SetCellAtt(tr.Cells[4], url, "进销存明细");
+
+ url = AspUtil.UpdateUrlParam(url, "flag", "1");
+ SetCellAtt(tr.Cells[6], url, "进销存明细");
+
+ url = AspUtil.UpdateUrlParam(url, "flag", "2");
+ SetCellAtt(tr.Cells[7], url, "进销存明细");
+
+ url = AspUtil.UpdateUrlParam(url, "flag", "-1");
+ SetCellAtt(tr.Cells[9], url, "进销存明细");
+ };
+ }
+
+ string BuildUrl(string goodsID)
+ {
+ var url = "~/B3ClientService/Reports/CarcassInOutStoreAnalyse_/CarcassDetailDialog.aspx";
+ url = AspUtil.AddParamToUrl(url, "Start", HttpUtility.UrlEncode(startTime.ToString("yyyy/MM/dd")));
+ url = AspUtil.AddParamToUrl(url, "End", HttpUtility.UrlEncode(endTime.ToString("yyyy/MM/dd")));
+ url = AspUtil.AddParamToUrl(url, "Goods_ID", goodsID);
+ return url;
+ }
+
+ void SetCellAtt(HtmlTableCell cell, string url, string title)
+ {
+ cell.Attributes["onclick"] = "OpenUrlInTopTab('" + url + "','" + title + "');";
+ cell.Style.Add("color", "blue");
+ cell.Style.Add("text-decoration", "underline");
+ cell.Style.Add("cursor", "pointer");
+ }
+
+ DFDateInput startInput;
+ DFDateInput endInput;
+ DateTime startTime;
+ DateTime endTime;
+ private void AddQueryControl(Panel queryPanel)
+ {
+ var hPanel = queryPanel.EAdd(new Panel());
+ hPanel.Style.Add("float", "right");
+ hPanel.EAdd(new SimpleLabel("期间"));
+ startInput = hPanel.EAdd(new DFDateInput() { Date = DateTime.Today });
+ hPanel.EAdd(new LiteralControl("-"));
+ endInput = hPanel.EAdd(new DFDateInput() { Date = DateTime.Today, DefaultTime = DateInputDefaultTime.maxValue });
+ hPanel.EAdd(new TSButton("开始查询", delegate { StartQuery(); }));
+ hPanel.EAdd(new RedirectTSButton("清除条件"));
+ }
+
+ private TitlePanel CreateResultTab()
+ {
+ var result = new TitlePanel("查询结果");
+ mBrowseGrid = result.EAdd(new DFBrowseGrid(new DFDataTableEditor()) { Width = Unit.Percentage(100) });
+ mBrowseGrid.Columns.Add(new DFBrowseGridAutoColumn("Goods_ID"));
+ var hPanel = result.EAdd(new HLayoutPanel());
+ PageUtil.AddExcelExportPanel(hPanel, mBrowseGrid, "白条进销存");
+ return result;
+ }
+
+ void StartQuery()
+ {
+ startTime = new DateTime(2017, 10, 10);
+ endTime = DateTime.Today + new TimeSpan(23, 59, 59);
+ if (startInput.Value.HasValue)
+ startTime = startInput.Date;
+ if (endInput.Value.HasValue)
+ endTime = endInput.Date;
+ var sumColumns = new List();
+ var query = new DQueryDom(new JoinAlias(typeof(UnionTemp)));
+ query.RegisterQueryTable(typeof(UnionTemp), new string[] { "Goods_ID", "Weight", "Time", "Flag" }, GetUnionDom(endTime));
+ query.Columns.Add(DQSelectColumn.Field("Goods_ID"));
+ query.Columns.Add(DQSelectColumn.Field("Goods_Code", "存货编码"));
+ query.Columns.Add(DQSelectColumn.Field("Goods_Name", "存货名称"));
+ query.Columns.Add(DQSelectColumn.Field("Goods_Spec", "存货规格"));
+
+ query.Columns.Add(DQSelectColumn.Create(DQExpression.Sum(DQExpression.LogicCase(DQCondition.LessThan("Time", startTime), DQExpression.LogicCase(DQCondition.EQ("Flag", 0), DQExpression.Value(1), DQExpression.Value(-1)))).ECastType(), "期初头数"));
+ query.Columns.Add(DQSelectColumn.Create(DQExpression.Sum(DQExpression.LogicCase(DQCondition.And(DQCondition.GreaterThanOrEqual("Time", startTime), DQCondition.EQ("Flag", 0)), DQExpression.Value(1))).ECastType(), "本期增加头数|成品入库"));
+ query.Columns.Add(DQSelectColumn.Create(DQExpression.Sum(DQExpression.LogicCase(DQCondition.And(DQCondition.GreaterThanOrEqual("Time", startTime), DQCondition.EQ("Flag", 0)), DQExpression.Value(1))).ECastType(), "本期增加头数|合计"));
+ query.Columns.Add(DQSelectColumn.Create(DQExpression.Sum(DQExpression.LogicCase(DQCondition.And(DQCondition.GreaterThanOrEqual("Time", startTime), DQCondition.EQ("Flag", 1)), DQExpression.Value(1))).ECastType(), "本期减少头数|分割领用"));
+ query.Columns.Add(DQSelectColumn.Create(DQExpression.Sum(DQExpression.LogicCase(DQCondition.And(DQCondition.GreaterThanOrEqual("Time", startTime), DQCondition.EQ("Flag", 2)), DQExpression.Value(1))).ECastType(), "本期减少头数|销售出库"));
+ query.Columns.Add(DQSelectColumn.Create(DQExpression.Sum(DQExpression.LogicCase(DQCondition.And(DQCondition.GreaterThanOrEqual("Time", startTime), DQCondition.InEQ("Flag", 0)), DQExpression.Value(1))).ECastType(), "本期减少头数|合计"));
+ query.Columns.Add(DQSelectColumn.Create(DQExpression.Sum(DQExpression.LogicCase(DQCondition.EQ("Flag", 0), DQExpression.Value(1), DQExpression.Value(-1))).ECastType(), "期末头数"));
+
+ query.Columns.Add(DQSelectColumn.Create(DQExpression.Sum(DQExpression.LogicCase(DQCondition.LessThan("Time", startTime), DQExpression.LogicCase(DQCondition.EQ("Flag", 0), DQExpression.Field("Weight"), DQExpression.Multiply(DQExpression.Value(-1), DQExpression.Field("Weight"))))).ECastType(), "期初重量"));
+ query.Columns.Add(DQSelectColumn.Create(DQExpression.Sum(DQExpression.LogicCase(DQCondition.And(DQCondition.GreaterThanOrEqual("Time", startTime), DQCondition.EQ("Flag", 0)), DQExpression.Field("Weight"))).ECastType(), "本期增加重量|成品入库"));
+ query.Columns.Add(DQSelectColumn.Create(DQExpression.Sum(DQExpression.LogicCase(DQCondition.And(DQCondition.GreaterThanOrEqual("Time", startTime), DQCondition.EQ("Flag", 0)), DQExpression.Field("Weight"))).ECastType(), "本期增加重量|合计"));
+ query.Columns.Add(DQSelectColumn.Create(DQExpression.Sum(DQExpression.LogicCase(DQCondition.And(DQCondition.GreaterThanOrEqual("Time", startTime), DQCondition.EQ("Flag", 1)), DQExpression.Field("Weight"))).ECastType(), "本期减少重量|分割领用"));
+ query.Columns.Add(DQSelectColumn.Create(DQExpression.Sum(DQExpression.LogicCase(DQCondition.And(DQCondition.GreaterThanOrEqual("Time", startTime), DQCondition.EQ("Flag", 2)), DQExpression.Field("Weight"))).ECastType(), "本期减少重量|销售出库"));
+ query.Columns.Add(DQSelectColumn.Create(DQExpression.Sum(DQExpression.LogicCase(DQCondition.And(DQCondition.GreaterThanOrEqual("Time", startTime), DQCondition.InEQ("Flag", 0)), DQExpression.Field("Weight"))).ECastType(), "本期减少重量|合计"));
+ query.Columns.Add(DQSelectColumn.Create(DQExpression.Sum(DQExpression.LogicCase(DQCondition.EQ("Flag", 0), DQExpression.Field("Weight"), DQExpression.Multiply(DQExpression.Value(-1), DQExpression.Field("Weight")))).ECastType(), "期末重量"));
+
+ query.GroupBy.Expressions.Add(DQExpression.Field("Goods_ID"));
+ query.GroupBy.Expressions.Add(DQExpression.Field("Goods_Code"));
+ query.GroupBy.Expressions.Add(DQExpression.Field("Goods_Name"));
+ query.GroupBy.Expressions.Add(DQExpression.Field("Goods_Spec"));
+
+ query.Having.Conditions.Add(DQCondition.Or(DQCondition.InEQ(DQExpression.Sum(DQExpression.LogicCase(DQCondition.EQ("Flag", 0), DQExpression.Value(1), DQExpression.Value(-1))), DQExpression.Value(0)), DQCondition.InEQ(DQExpression.Sum(DQExpression.LogicCase(DQCondition.EQ("Flag", 0), DQExpression.Field("Weight"), DQExpression.Multiply(DQExpression.Value(-1), DQExpression.Field("Weight")))), DQExpression.Value(0))));
+ var args = new LoadArguments(query);
+ for (var idx = 4; idx < query.Columns.Count; idx++)
+ {
+ args.SumColumns.Add(idx);
+ args.GroupSumColumns.Add(idx);
+ }
+ mBrowseGrid.LoadArguments = args;
+ mBrowseGrid.DataBind();
+ }
+
+ protected override void OnLoad(EventArgs e)
+ {
+ base.OnLoad(e);
+ if (!IsPostBack)
+ StartQuery();
+ }
+
+ [DFClass]
+ class UnionTemp
+ {
+ public long Goods_ID { get; set; }
+ public decimal Weight { get; set; }
+ public DateTime Time { get; set; }
+ public int Flag { get; set; }
+
+ [ReferenceTo(typeof(Goods), "Name")]
+ [Join("Goods_ID", "ID")]
+ public string Goods_Name { get; set; }
+
+ [ReferenceTo(typeof(Goods), "Code")]
+ [Join("Goods_ID", "ID")]
+ public string Goods_Code { get; set; }
+
+ [ReferenceTo(typeof(Goods), "Spec")]
+ [Join("Goods_ID", "ID")]
+ public string Goods_Spec { get; set; }
+ }
+
+ DQueryDom GetUnionDom(DateTime endTime)
+ {
+ var u1 = GetInStore(endTime);
+ var u2 = GetPickOutStore(endTime);
+ u1.UnionNext.Select = u2;
+ u1.UnionNext.Type = UnionType.All;
+ u2.UnionNext.Select = GetSaleOutStore(endTime);
+ u2.UnionNext.Type = UnionType.All;
+ return u1;
+ }
+
+ DQueryDom GetInStore(DateTime endTime)
+ {
+ var query = new DQueryDom(new JoinAlias("_inStore", typeof(CarcassFullInfo)));
+ query.Columns.Add(DQSelectColumn.Field("InStoreGoods_ID"));
+ query.Columns.Add(DQSelectColumn.Field("InStoreWeight"));
+ query.Columns.Add(DQSelectColumn.Field("InStoreTime"));
+ query.Columns.Add(DQSelectColumn.Create(DQExpression.Value(0), "Falg"));
+ query.Where.Conditions.Add(DQCondition.LessThanOrEqual("InStoreTime", endTime));
+ return query;
+ }
+
+ DQueryDom GetPickOutStore(DateTime endTime)
+ {
+ var query = new DQueryDom(new JoinAlias("_pickOut", typeof(CarcassFullInfo)));
+ query.Columns.Add(DQSelectColumn.Field("InStoreGoods_ID"));
+ query.Columns.Add(DQSelectColumn.Field("PickWeight"));
+ query.Columns.Add(DQSelectColumn.Field("PickTime"));
+ query.Columns.Add(DQSelectColumn.Create(DQExpression.Value(1), "Falg"));
+ query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("PickType", 0), DQCondition.LessThanOrEqual("PickTime", endTime)));
+ return query;
+ }
+
+ DQueryDom GetSaleOutStore(DateTime endTime)
+ {
+ var query = new DQueryDom(new JoinAlias("_saleOut", typeof(CarcassFullInfo)));
+ query.Columns.Add(DQSelectColumn.Field("SaleGoods_ID"));
+ query.Columns.Add(DQSelectColumn.Field("PickWeight"));
+ query.Columns.Add(DQSelectColumn.Field("PickTime"));
+ query.Columns.Add(DQSelectColumn.Create(DQExpression.Value(2), "Falg"));
+ query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("PickType", 1), DQCondition.LessThanOrEqual("PickTime", endTime)));
+ return query;
+ }
+ }
+}
diff --git a/B3ClientService/OfflinRpc/CarcassTakeOutRpc.cs b/B3ClientService/OfflinRpc/CarcassTakeOutRpc.cs
index afe27bb..3b48752 100644
--- a/B3ClientService/OfflinRpc/CarcassTakeOutRpc.cs
+++ b/B3ClientService/OfflinRpc/CarcassTakeOutRpc.cs
@@ -68,6 +68,11 @@ namespace BWP.B3ClientService.Rpcs
entity.PickGroupID = obj.GroupID;
entity.PickTime = obj.Time;
entity.PickType = 领用类型.分割领用;
+ if (string.IsNullOrEmpty(entity.BarCode))
+ {
+ entity.InStoreGoods_ID = obj.Goods_ID;
+ entity.ProductBatch_ID = obj.ProductBatch_ID;
+ }
session.Insert(entity);
}
@@ -94,6 +99,8 @@ namespace BWP.B3ClientService.Rpcs
public string BarCode { get; set; }
public long? TakeOutWorker_ID { get; set; }
public long? WorkUnit_ID { get; set; }
+ public long? ProductBatch_ID { get; set; }
+ public long? Goods_ID { get; set; }
public decimal? Weight { get; set; }
public DateTime? Time { get; set; }
public long? GroupID { get; set; }
diff --git a/B3ClientService/Rpcs/InterfaceRpc/GoodsRpc.cs b/B3ClientService/Rpcs/InterfaceRpc/GoodsRpc.cs
new file mode 100644
index 0000000..1104e77
--- /dev/null
+++ b/B3ClientService/Rpcs/InterfaceRpc/GoodsRpc.cs
@@ -0,0 +1,14 @@
+using Forks.EnterpriseServices.JsonRpc;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace BWP.B3ClientService.Rpcs.InterfaceRpc
+{
+ [Rpc]
+
+ public static class GoodsRpc
+ {
+ }
+}
diff --git a/WebFolder/config/plugins/B3ClientService.plugin b/WebFolder/config/plugins/B3ClientService.plugin
index 7d340ac..9b74ede 100644
--- a/WebFolder/config/plugins/B3ClientService.plugin
+++ b/WebFolder/config/plugins/B3ClientService.plugin
@@ -44,6 +44,7 @@
+
@@ -111,6 +112,7 @@
+