|
|
@ -29,6 +29,7 @@ namespace ButcherFactory.BO.LocalBL |
|
|
query.Columns.Add(DQSelectColumn.Field("GroupID")); |
|
|
query.Columns.Add(DQSelectColumn.Field("GroupID")); |
|
|
query.Columns.Add(DQSelectColumn.Field("TrunOutID")); |
|
|
query.Columns.Add(DQSelectColumn.Field("TrunOutID")); |
|
|
query.Columns.Add(DQSelectColumn.Field("Goods_Spec")); |
|
|
query.Columns.Add(DQSelectColumn.Field("Goods_Spec")); |
|
|
|
|
|
query.Columns.Add(DQSelectColumn.Field("StandardPic")); |
|
|
query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("InStored", false), DQCondition.EQ("Delete", false), DQCondition.EQ("Submited", submited))); |
|
|
query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("InStored", false), DQCondition.EQ("Delete", false), DQCondition.EQ("Submited", submited))); |
|
|
query.OrderBy.Expressions.Add(DQOrderByExpression.Create("ID", true)); |
|
|
query.OrderBy.Expressions.Add(DQOrderByExpression.Create("ID", true)); |
|
|
if (submited) |
|
|
if (submited) |
|
|
@ -52,6 +53,7 @@ namespace ButcherFactory.BO.LocalBL |
|
|
entity.GroupID = (long?)reader[5]; |
|
|
entity.GroupID = (long?)reader[5]; |
|
|
entity.TrunOutID = (long?)reader[6]; |
|
|
entity.TrunOutID = (long?)reader[6]; |
|
|
entity.Goods_Spec = (string)reader[7]; |
|
|
entity.Goods_Spec = (string)reader[7]; |
|
|
|
|
|
entity.StandardPic = (bool)reader[8]; |
|
|
entity.Submited = submited; |
|
|
entity.Submited = submited; |
|
|
list.Add(entity); |
|
|
list.Add(entity); |
|
|
} |
|
|
} |
|
|
@ -79,17 +81,12 @@ namespace ButcherFactory.BO.LocalBL |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public static SegmentProduction InsertAndSetGroupID(long goodsID, decimal weight, long? workUnitID, long productBatchID, DateTime batchDate, bool test) |
|
|
|
|
|
|
|
|
public static SegmentProduction InsertAndSetGroupID(SegmentProduction entity,DateTime batchDate, bool test) |
|
|
{ |
|
|
{ |
|
|
using (var session = DmoSession.New()) |
|
|
using (var session = DmoSession.New()) |
|
|
{ |
|
|
{ |
|
|
var entity = new SegmentProduction(); |
|
|
|
|
|
entity.Goods_ID = goodsID; |
|
|
|
|
|
entity.Weight = weight; |
|
|
|
|
|
entity.UserID = AppContext.Worker.ID; |
|
|
entity.UserID = AppContext.Worker.ID; |
|
|
entity.WorkUnit_ID = workUnitID; |
|
|
|
|
|
entity.ProductBatch_ID = productBatchID; |
|
|
|
|
|
entity.RowIndex = GenerateRowIndex(productBatchID, session); |
|
|
|
|
|
|
|
|
entity.RowIndex = GenerateRowIndex(entity.ProductBatch_ID, session); |
|
|
entity.BarCode = string.Format("260912011{0:yyyyMMdd}{1}{2:00000}", batchDate, AppContext.ConnectInfo.ClientCode, entity.RowIndex); |
|
|
entity.BarCode = string.Format("260912011{0:yyyyMMdd}{1}{2:00000}", batchDate, AppContext.ConnectInfo.ClientCode, entity.RowIndex); |
|
|
entity.Submited = true; |
|
|
entity.Submited = true; |
|
|
if (!test) |
|
|
if (!test) |
|
|
@ -167,8 +164,18 @@ namespace ButcherFactory.BO.LocalBL |
|
|
|
|
|
|
|
|
public static List<string> GetInStoreState(List<string> codeArr) |
|
|
public static List<string> GetInStoreState(List<string> codeArr) |
|
|
{ |
|
|
{ |
|
|
var json = RpcFacade.Call<string>(RpcPath + "CheckInStored", JsonConvert.SerializeObject(codeArr)); |
|
|
|
|
|
return JsonConvert.DeserializeObject<List<string>>(json); |
|
|
|
|
|
|
|
|
try |
|
|
|
|
|
{ |
|
|
|
|
|
var json = RpcFacade.Call<string>(RpcPath + "CheckInStored", JsonConvert.SerializeObject(codeArr)); |
|
|
|
|
|
return JsonConvert.DeserializeObject<List<string>>(json); |
|
|
|
|
|
} |
|
|
|
|
|
catch(Exception ex) |
|
|
|
|
|
{ |
|
|
|
|
|
#if DEBUG
|
|
|
|
|
|
throw; |
|
|
|
|
|
#endif
|
|
|
|
|
|
return new List<string>(); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public static void SetInStored(List<long> ids) |
|
|
public static void SetInStored(List<long> ids) |
|
|
@ -262,6 +269,7 @@ namespace ButcherFactory.BO.LocalBL |
|
|
query.Columns.Add(DQSelectColumn.Field("Weight")); |
|
|
query.Columns.Add(DQSelectColumn.Field("Weight")); |
|
|
query.Columns.Add(DQSelectColumn.Field("CreateTime")); |
|
|
query.Columns.Add(DQSelectColumn.Field("CreateTime")); |
|
|
query.Columns.Add(DQSelectColumn.Field("Delete")); |
|
|
query.Columns.Add(DQSelectColumn.Field("Delete")); |
|
|
|
|
|
query.Columns.Add(DQSelectColumn.Field("StandardPic")); |
|
|
query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("Submited", true), DQCondition.EQ("Sync", false))); |
|
|
query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("Submited", true), DQCondition.EQ("Sync", false))); |
|
|
query.Range = SelectRange.Top(10); |
|
|
query.Range = SelectRange.Top(10); |
|
|
query.OrderBy.Expressions.Add(DQOrderByExpression.Create("ID")); |
|
|
query.OrderBy.Expressions.Add(DQOrderByExpression.Create("ID")); |
|
|
@ -282,6 +290,7 @@ namespace ButcherFactory.BO.LocalBL |
|
|
obj.Weight = (decimal)reader[7]; |
|
|
obj.Weight = (decimal)reader[7]; |
|
|
obj.ProductTime = (DateTime)reader[8]; |
|
|
obj.ProductTime = (DateTime)reader[8]; |
|
|
obj.Delete = (bool)reader[9]; |
|
|
obj.Delete = (bool)reader[9]; |
|
|
|
|
|
obj.StandardPic = (bool)reader[10]; |
|
|
upload.Add(obj); |
|
|
upload.Add(obj); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -341,6 +350,7 @@ namespace ButcherFactory.BO.LocalBL |
|
|
public decimal? Weight { get; set; } |
|
|
public decimal? Weight { get; set; } |
|
|
public DateTime? InStoreTime { get; set; } |
|
|
public DateTime? InStoreTime { get; set; } |
|
|
public bool Delete { get; set; } |
|
|
public bool Delete { get; set; } |
|
|
|
|
|
public bool StandardPic { get; set; } |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
class TaskTemp |
|
|
class TaskTemp |
|
|
|