|
@@ -31,7 +31,7 @@ namespace MySystem
|
|
PxcModels.WebCMSEntities db = new PxcModels.WebCMSEntities();
|
|
PxcModels.WebCMSEntities db = new PxcModels.WebCMSEntities();
|
|
DateTime start = DateTime.Now.AddDays(-5);
|
|
DateTime start = DateTime.Now.AddDays(-5);
|
|
int StartId = int.Parse(function.CheckInt(function.ReadInstance("/SycnSp/BindRecordId.txt")));
|
|
int StartId = int.Parse(function.CheckInt(function.ReadInstance("/SycnSp/BindRecordId.txt")));
|
|
- var Binds = spdb.BindRecord.Select(m => new { m.Id, m.CreateTime, m.Status, m.MerNo, m.MerSnNo, m.ProductType, m.Field1, m.Field5 }).Where(m => m.Id >= StartId && m.CreateTime >= start && m.Status == 1).OrderByDescending(m => m.Id).ToList();
|
|
|
|
|
|
+ var Binds = spdb.BindRecord.Select(m => new { m.Id, m.CreateTime, m.Status, m.MerNo, m.MerSnNo, m.ProductType, m.Remark, m.Field1, m.Field3, m.Field5 }).Where(m => m.Id >= StartId && m.CreateTime >= start && m.Status == 1).OrderByDescending(m => m.Id).ToList();
|
|
foreach (var Bind in Binds)
|
|
foreach (var Bind in Binds)
|
|
{
|
|
{
|
|
var tran = db.Database.BeginTransaction();
|
|
var tran = db.Database.BeginTransaction();
|
|
@@ -93,6 +93,10 @@ namespace MySystem
|
|
pos.BindingState = 1;
|
|
pos.BindingState = 1;
|
|
pos.BindingTime = Bind.CreateTime;
|
|
pos.BindingTime = Bind.CreateTime;
|
|
pos.Status = 0;
|
|
pos.Status = 0;
|
|
|
|
+ if(pos.BrandId == 14 && Bind.Field3 == "副卡")
|
|
|
|
+ {
|
|
|
|
+ pos.Detail = "1";
|
|
|
|
+ }
|
|
PxcModels.MachineForMerNo merFor = db.MachineForMerNo.FirstOrDefault(m => m.MerNo == Bind.MerNo);
|
|
PxcModels.MachineForMerNo merFor = db.MachineForMerNo.FirstOrDefault(m => m.MerNo == Bind.MerNo);
|
|
if (merFor == null)
|
|
if (merFor == null)
|
|
{
|
|
{
|
|
@@ -131,9 +135,7 @@ namespace MySystem
|
|
|
|
|
|
if(pos.BrandId == 14 && Bind.Field5 == "已激活")
|
|
if(pos.BrandId == 14 && Bind.Field5 == "已激活")
|
|
{
|
|
{
|
|
- pos.CreditTrade = 0.01M;
|
|
|
|
- db.SaveChanges();
|
|
|
|
- SycnSpTradeService.Instance.ActPos(db, pos, 0.01M, 30);
|
|
|
|
|
|
+ SycnSpTradeService.Instance.ActPos(db, pos, 0, 30);
|
|
}
|
|
}
|
|
|
|
|
|
if(pos.BuyUserId == 0 && pos.PreUserId > 0)
|
|
if(pos.BuyUserId == 0 && pos.PreUserId > 0)
|