11
This commit is contained in:
@@ -855,7 +855,7 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 手动结束批(暂不用)
|
||||
/// 手动结束批
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
@@ -863,23 +863,30 @@ namespace FineUIPro.Web.WeldingProcess.TrustManage
|
||||
{
|
||||
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_PointManageMenuId, Const.BtnClearBatch))
|
||||
{
|
||||
string info = "该批次已关闭!";
|
||||
var point = BLL.Batch_PointBatchService.GetPointBatchById(this.PointBatchId);
|
||||
if (point != null && !point.EndDate.HasValue)
|
||||
string info = "该批次待处理状态的焊口已关闭!";
|
||||
var pointItemList = (from x in Funs.DB.Batch_PointBatchItem where x.PointBatchId == this.PointBatchId && (x.IsCompletedPoint == null || x.IsCompletedPoint == false) select x).ToList();
|
||||
foreach (var item in pointItemList)
|
||||
{
|
||||
var q = Funs.DB.Batch_PointBatchItem.FirstOrDefault(x => x.PointBatchId == PointBatchId && x.PointState == "1");
|
||||
if (q != null)
|
||||
{
|
||||
BLL.Batch_PointBatchService.UpdatePointBatch(PointBatchId, System.DateTime.Now);
|
||||
this.txtEndDate.Text = point.EndDate.Value.ToShortDateString();
|
||||
this.txtState.Text = "批关闭";
|
||||
BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_PointManageMenuId, Const.BtnClearBatch, this.PointBatchId);
|
||||
}
|
||||
else
|
||||
{
|
||||
info = "该批次未点口,请手动点口后再结束批!";
|
||||
}
|
||||
item.IsCompletedPoint = true;
|
||||
}
|
||||
Funs.DB.SubmitChanges();
|
||||
|
||||
//var point = BLL.Batch_PointBatchService.GetPointBatchById(this.PointBatchId);
|
||||
//if (point != null && !point.EndDate.HasValue)
|
||||
//{
|
||||
// var q = Funs.DB.Batch_PointBatchItem.FirstOrDefault(x => x.PointBatchId == PointBatchId && x.PointState == "1");
|
||||
// if (q != null)
|
||||
// {
|
||||
// BLL.Batch_PointBatchService.UpdatePointBatch(PointBatchId, System.DateTime.Now);
|
||||
// this.txtEndDate.Text = point.EndDate.Value.ToShortDateString();
|
||||
// this.txtState.Text = "批关闭";
|
||||
// BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_PointManageMenuId, Const.BtnClearBatch, this.PointBatchId);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// info = "该批次未点口,请手动点口后再结束批!";
|
||||
// }
|
||||
//}
|
||||
Alert.ShowInTop(info);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user