Browse Source

成品入库支持多个客户端同时入库。

master
yibo 7 years ago
parent
commit
e33ebe7db7
3 changed files with 16 additions and 1 deletions
  1. +7
    -0
      B3ClientService/BO/Bill/SegmentProductionInfo.cs
  2. +3
    -0
      B3ClientService/OfflinRpc/SegmentInStoreRpc.cs
  3. +6
    -1
      B3ClientService/Tasks/UpdateLoad/UploadProductInStore.cs

+ 7
- 0
B3ClientService/BO/Bill/SegmentProductionInfo.cs View File

@ -69,6 +69,9 @@ namespace BWP.B3ClientService.BO
[LogicName("仓库")] [LogicName("仓库")]
public long? Store_ID { get; set; } public long? Store_ID { get; set; }
[LogicName("入库操作员")]
public long? InStoreWorker_ID { get; set; }
#endregion #endregion
#region 退库信息 #region 退库信息
@ -136,5 +139,9 @@ namespace BWP.B3ClientService.BO
[ReferenceTo(typeof(ProductBatch), "Name")] [ReferenceTo(typeof(ProductBatch), "Name")]
[Join("ProductBatch_ID", "ID")] [Join("ProductBatch_ID", "ID")]
public string ProductBatch_Name { get; set; } public string ProductBatch_Name { get; set; }
[ReferenceTo(typeof(Worker), "Name")]
[Join("InStoreWorker_ID", "ID")]
public string InStoreWorker_Name { get; set; }
} }
} }

+ 3
- 0
B3ClientService/OfflinRpc/SegmentInStoreRpc.cs View File

@ -34,6 +34,7 @@ namespace BWP.B3ClientService.Rpcs
if (id == null) if (id == null)
{ {
var entity = new SegmentProductionInfo(); var entity = new SegmentProductionInfo();
entity.InStoreWorker_ID = item.Worker_ID;
entity.BarCode = item.BarCode; entity.BarCode = item.BarCode;
entity.InStoreTime = item.InStoreTime; entity.InStoreTime = item.InStoreTime;
entity.BackTime = item.BackStoreTime; entity.BackTime = item.BackStoreTime;
@ -59,6 +60,7 @@ namespace BWP.B3ClientService.Rpcs
private static void Update(IDmoSession session, long id, SegmentInStoreObj entity) private static void Update(IDmoSession session, long id, SegmentInStoreObj entity)
{ {
var update = new DQUpdateDom(typeof(SegmentProductionInfo)); var update = new DQUpdateDom(typeof(SegmentProductionInfo));
update.Columns.Add(new DQUpdateColumn("InStoreWorker_ID", entity.Worker_ID));
update.Columns.Add(new DQUpdateColumn("InStoreTime", entity.InStoreTime)); update.Columns.Add(new DQUpdateColumn("InStoreTime", entity.InStoreTime));
update.Columns.Add(new DQUpdateColumn("Store_ID", entity.Store_ID)); update.Columns.Add(new DQUpdateColumn("Store_ID", entity.Store_ID));
update.Columns.Add(new DQUpdateColumn("BackTime", DQExpression.Value(entity.BackStoreTime))); update.Columns.Add(new DQUpdateColumn("BackTime", DQExpression.Value(entity.BackStoreTime)));
@ -169,6 +171,7 @@ namespace BWP.B3ClientService.Rpcs
public long? Store_ID { get; set; } public long? Store_ID { get; set; }
public DateTime? BackStoreTime { get; set; } public DateTime? BackStoreTime { get; set; }
public long? Worker_ID { get; set; }
} }
class SegmentProductObj class SegmentProductObj


+ 6
- 1
B3ClientService/Tasks/UpdateLoad/UploadProductInStore.cs View File

@ -47,12 +47,13 @@ namespace BWP.B3ClientService.Tasks
{ {
var arr = GetArrList(item.Item1, item.Item2); var arr = GetArrList(item.Item1, item.Item2);
var summary = new List<ProductInStoreJson>(); var summary = new List<ProductInStoreJson>();
foreach (var g in arr.GroupBy(x => new { x.ProductBatch, x.StoreCode, x.Goods_Code }))
foreach (var g in arr.GroupBy(x => new { x.ProductBatch, x.StoreCode, x.Goods_Code, x.Worker_Name }))
{ {
var detail = new ProductInStoreJson(); var detail = new ProductInStoreJson();
detail.ProductBatch = g.Key.ProductBatch; detail.ProductBatch = g.Key.ProductBatch;
detail.StoreCode = g.Key.StoreCode; detail.StoreCode = g.Key.StoreCode;
detail.Goods_Code = g.Key.Goods_Code; detail.Goods_Code = g.Key.Goods_Code;
detail.Worker_Name = g.Key.Worker_Name;
detail.Number = g.Sum(x => x.Number ?? 0); detail.Number = g.Sum(x => x.Number ?? 0);
detail.SecondNumber = g.Sum(x => x.SecondNumber ?? 0); detail.SecondNumber = g.Sum(x => x.SecondNumber ?? 0);
summary.Add(detail); summary.Add(detail);
@ -94,6 +95,7 @@ namespace BWP.B3ClientService.Tasks
query.Columns.Add(DQSelectColumn.Field("Weight")); query.Columns.Add(DQSelectColumn.Field("Weight"));
query.Columns.Add(DQSelectColumn.Field("RowVersion")); query.Columns.Add(DQSelectColumn.Field("RowVersion"));
query.Columns.Add(DQSelectColumn.Field("ID")); query.Columns.Add(DQSelectColumn.Field("ID"));
query.Columns.Add(DQSelectColumn.Field("InStoreWorker_Name"));
var list = new List<ProductInStoreJson>(); var list = new List<ProductInStoreJson>();
using (var session = Dmo.NewSession()) using (var session = Dmo.NewSession())
{ {
@ -110,6 +112,7 @@ namespace BWP.B3ClientService.Tasks
detail.SecondNumber = need * 1; detail.SecondNumber = need * 1;
detail.RowVersion = (int)reader[5]; detail.RowVersion = (int)reader[5];
detail.ID = (long)reader[6]; detail.ID = (long)reader[6];
detail.Worker_Name = (string)reader[7];
list.Add(detail); list.Add(detail);
} }
} }
@ -142,6 +145,8 @@ namespace BWP.B3ClientService.Tasks
public decimal? SecondNumber { get; set; } public decimal? SecondNumber { get; set; }
public string Worker_Name { get; set; }
[JsonIgnore] [JsonIgnore]
public int RowVersion { get; set; } public int RowVersion { get; set; }


Loading…
Cancel
Save