|
@@ -5364,7 +5364,7 @@ namespace aipsvr.Services
|
|
|
GoldStandardAssignedCount = actualAddedGoldStandardCount,
|
|
|
SelfCheckAssignedCount = actualAddedSelfCheckCount,
|
|
|
};
|
|
|
- if (totalDevelopConfirmInfo.Status!=DevelopConfirmStatus.WaitForConfirm)
|
|
|
+ if (totalDevelopConfirmInfo.Status != DevelopConfirmStatus.WaitForConfirm)
|
|
|
{
|
|
|
labelerGroup.LabelCaseQuantityItem.Remaining += requiredFrameTotal;
|
|
|
labelerGroup.LabelCaseQuantityItem.Required += requiredFrameTotal;
|
|
@@ -12407,6 +12407,76 @@ namespace aipsvr.Services
|
|
|
throw new InvalidOperationException("InvalidAdminSession");
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 新增个体定价
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="item"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public async Task CreateIndividualPriceAsync(long sessionId, IndividualPrice item)
|
|
|
+ {
|
|
|
+ ActivateSession(sessionId);
|
|
|
+ var session = SessionManager.GetSession(sessionId);
|
|
|
+ if (session != null)
|
|
|
+ {
|
|
|
+ if (session.Type == SessionType.Admin)
|
|
|
+ {
|
|
|
+ var databaseService = ServiceManager.GetService<IDatabaseService>();
|
|
|
+ var pricingDataManager = databaseService.GetManager<IPricingDataManager>();
|
|
|
+
|
|
|
+ await pricingDataManager.CreateIndividualPriceAsync(item);
|
|
|
+
|
|
|
+ var log = new PricingOperateLog
|
|
|
+ {
|
|
|
+ IndividualPriceId = item.Id,
|
|
|
+ Operation = $"{session.Name} - 创建",
|
|
|
+ Message = $"{JsonConvert.SerializeObject(item)}",
|
|
|
+ };
|
|
|
+ await pricingDataManager.CreatePricingOperateLogAsync(log);
|
|
|
+ //await SystemLogger.WriteLogAsync($"Admin - {session.Name} create the Individual Price of id {item.Id}.");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ throw new InvalidOperationException("InvalidAdminSession");
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 更新个体定价
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="price"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public async Task UpdateIndividualPriceAsync(long sessionId, long id, double price)
|
|
|
+ {
|
|
|
+ ActivateSession(sessionId);
|
|
|
+ var session = SessionManager.GetSession(sessionId);
|
|
|
+ if (session != null)
|
|
|
+ {
|
|
|
+ if (session.Type == SessionType.Admin)
|
|
|
+ {
|
|
|
+ var databaseService = ServiceManager.GetService<IDatabaseService>();
|
|
|
+ var pricingDataManager = databaseService.GetManager<IPricingDataManager>();
|
|
|
+
|
|
|
+ var item = await pricingDataManager.GetIndividualPriceAsync(id);
|
|
|
+ if (item == null)
|
|
|
+ {
|
|
|
+ throw new InvalidOperationException("IndividualPriceNotExist");
|
|
|
+ }
|
|
|
+ item.Price = price;
|
|
|
+ await pricingDataManager.UpdateIndividualPriceAsync(item);
|
|
|
+
|
|
|
+ var log = new PricingOperateLog
|
|
|
+ {
|
|
|
+ IndividualPriceId = item.Id,
|
|
|
+ Operation = $"{session.Name} - 更新",
|
|
|
+ Message = $"{JsonConvert.SerializeObject(item)}",
|
|
|
+ };
|
|
|
+ await pricingDataManager.CreatePricingOperateLogAsync(log);
|
|
|
+ //await SystemLogger.WriteLogAsync($"Admin - {session.Name} update the Individual Price by id {id}.");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ throw new InvalidOperationException("InvalidAdminSession");
|
|
|
+ }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 获取个体系数
|
|
|
/// </summary>
|
|
@@ -12482,7 +12552,7 @@ namespace aipsvr.Services
|
|
|
Message = $"{JsonConvert.SerializeObject(item)}",
|
|
|
};
|
|
|
await pricingDataManager.CreatePricingOperateLogAsync(log);
|
|
|
- await SystemLogger.WriteLogAsync($"Admin - {session.Name} create the Individual Coefficient of id {item.Id}.");
|
|
|
+ //await SystemLogger.WriteLogAsync($"Admin - {session.Name} create the Individual Coefficient of id {item.Id}.");
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
@@ -12523,7 +12593,7 @@ namespace aipsvr.Services
|
|
|
Message = $"{JsonConvert.SerializeObject(item)}",
|
|
|
};
|
|
|
await pricingDataManager.CreatePricingOperateLogAsync(log);
|
|
|
- await SystemLogger.WriteLogAsync($"Admin - {session.Name} update the Individual Coefficient by id {id}.");
|
|
|
+ //await SystemLogger.WriteLogAsync($"Admin - {session.Name} update the Individual Coefficient by id {id}.");
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
@@ -12553,7 +12623,7 @@ namespace aipsvr.Services
|
|
|
Operation = $"{session.Name} - 删除",
|
|
|
};
|
|
|
await pricingDataManager.CreatePricingOperateLogAsync(log);
|
|
|
- await SystemLogger.WriteLogAsync($"Admin - {session.Name} delete the Individual Coefficient by id {id}.");
|
|
|
+ //await SystemLogger.WriteLogAsync($"Admin - {session.Name} delete the Individual Coefficient by id {id}.");
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
@@ -12633,7 +12703,7 @@ namespace aipsvr.Services
|
|
|
Message = $"{JsonConvert.SerializeObject(item)}",
|
|
|
};
|
|
|
await pricingDataManager.CreatePricingOperateLogAsync(log);
|
|
|
- await SystemLogger.WriteLogAsync($"Admin - {session.Name} create the Institutional Price of id {item.Id}.");
|
|
|
+ //await SystemLogger.WriteLogAsync($"Admin - {session.Name} create the Institutional Price of id {item.Id}.");
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
@@ -12678,7 +12748,7 @@ namespace aipsvr.Services
|
|
|
Message = $"{JsonConvert.SerializeObject(item)}",
|
|
|
};
|
|
|
await pricingDataManager.CreatePricingOperateLogAsync(log);
|
|
|
- await SystemLogger.WriteLogAsync($"Admin - {session.Name} update the Institutional Price by id {id}.");
|
|
|
+ //await SystemLogger.WriteLogAsync($"Admin - {session.Name} update the Institutional Price by id {id}.");
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
@@ -12708,7 +12778,7 @@ namespace aipsvr.Services
|
|
|
Operation = $"{session.Name} - 删除",
|
|
|
};
|
|
|
await pricingDataManager.CreatePricingOperateLogAsync(log);
|
|
|
- await SystemLogger.WriteLogAsync($"Admin - {session.Name} delete the Institutional Price by id {id}.");
|
|
|
+ //await SystemLogger.WriteLogAsync($"Admin - {session.Name} delete the Institutional Price by id {id}.");
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
@@ -12732,7 +12802,7 @@ namespace aipsvr.Services
|
|
|
var pricingDataManager = databaseService.GetManager<IPricingDataManager>();
|
|
|
|
|
|
await pricingDataManager.CreatePricingOperateLogAsync(item);
|
|
|
- await SystemLogger.WriteLogAsync($"Admin - {session.Name} create the Pricing Operate Log of id {item.Id}.");
|
|
|
+ //await SystemLogger.WriteLogAsync($"Admin - {session.Name} create the Pricing Operate Log of id {item.Id}.");
|
|
|
return;
|
|
|
}
|
|
|
}
|