代码无效引用清理,试压包资料界面看板修改
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
@@ -15,13 +12,17 @@ namespace BLL
|
||||
/// <param name="PersonId"></param>
|
||||
public static void SaveTrainInfoConfirmArrival(string id, string PersonId)
|
||||
{
|
||||
var model=TrainNumberManageService.GetModelById(id);
|
||||
if (model!=null)
|
||||
var model = TrainNumberManageService.GetModelById(id);
|
||||
if (model != null)
|
||||
{
|
||||
model.ReceiveDate = DateTime.Now;
|
||||
TrainNumberManageService.Update(model);
|
||||
}
|
||||
var packManagerList= HJGLPackagingmanageService.GetPackagingManage(id);
|
||||
else
|
||||
{
|
||||
throw new Exception("车次信息有误,请检查!");
|
||||
}
|
||||
var packManagerList = HJGLPackagingmanageService.GetPackagingManage(id);
|
||||
foreach (var item in packManagerList)
|
||||
{
|
||||
BLL.APIPackagingManageService.GetPackingInfoConfirmArrival(item.PackagingManageId, PersonId);
|
||||
@@ -65,13 +66,52 @@ namespace BLL
|
||||
{
|
||||
throw new Exception("未找到对应的包装信息");
|
||||
}
|
||||
if (packModel.State != HJGLPackagingmanageService.state_0)
|
||||
/*if (packModel.State != HJGLPackagingmanageService.state_0)
|
||||
{
|
||||
throw new Exception("当前包装状态不可修改车次号");
|
||||
}
|
||||
}*/
|
||||
packModel.TrainNumberId = null;
|
||||
packModel.TrainNumber = null;
|
||||
HJGLPackagingmanageService.UpdateHJGL_PackagingManage(packModel);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 新增或更新车次信息。若 model.Id 为空则新增,否则修改。返回创建或更新后的Id。
|
||||
/// 新增时 State=0,ReceiveDate=null;修改时保持原有 State 和 ReceiveDate。
|
||||
/// </summary>
|
||||
public static string AddOrUpdateTrainNumber(Model.HJGL_TrainNumberManage model)
|
||||
{
|
||||
if (model == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(model));
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(model.Id))
|
||||
{
|
||||
// 新增
|
||||
model.Id = SQLHelper.GetNewID(typeof(Model.HJGL_TrainNumberManage));
|
||||
model.ReceiveDate = null;
|
||||
TrainNumberManageService.Add(model);
|
||||
return model.Id;
|
||||
}
|
||||
else
|
||||
{
|
||||
// 修改
|
||||
var exist = TrainNumberManageService.GetModelById(model.Id);
|
||||
if (exist == null)
|
||||
{
|
||||
model.ReceiveDate = null;
|
||||
TrainNumberManageService.Add(model);
|
||||
return model.Id;
|
||||
}
|
||||
else
|
||||
{
|
||||
// 保持原有ReceiveDate
|
||||
model.ReceiveDate = exist.ReceiveDate;
|
||||
TrainNumberManageService.Update(model);
|
||||
return model.Id;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user