|
|
|
@ -187,7 +187,8 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
|
|
|
|
|
if (accDate.IsNull())
|
|
|
|
|
{
|
|
|
|
|
return DataResult<CustomerStlRes>.Success(new CustomerStlRes() {
|
|
|
|
|
return DataResult<CustomerStlRes>.Success(new CustomerStlRes()
|
|
|
|
|
{
|
|
|
|
|
StlName = "票结",
|
|
|
|
|
StlDate = req.ETD,
|
|
|
|
|
AccountDate = Convert.ToDateTime(req.ETD).ToString("yyyy-MM")
|
|
|
|
@ -281,7 +282,8 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
}
|
|
|
|
|
stlDate = DateTime.Parse(tmpYear.ToString() + "-" + tmpMonth.ToString() + "-" + tmpDay.ToString());
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
tmpDay = (int)accDate.AccountMonth;
|
|
|
|
|
if ((int)accDate.AccountMonth > 28)
|
|
|
|
@ -984,15 +986,20 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
if (list != null)
|
|
|
|
|
{
|
|
|
|
|
//回写主单状态
|
|
|
|
|
var StatusName = list.Where(x => x.FinishTime.HasValue).OrderByDescending(x => x.OrderNo).Select(x => x.StatusName).FirstOrDefault();
|
|
|
|
|
if (StatusName == null)
|
|
|
|
|
var status = list.Where(x => x.FinishTime.HasValue).OrderByDescending(x => x.OrderNo).Select(x => new { x.SystemCode, x.StatusName }).FirstOrDefault();
|
|
|
|
|
if (status == null)
|
|
|
|
|
{
|
|
|
|
|
StatusName = "";
|
|
|
|
|
status = new
|
|
|
|
|
{
|
|
|
|
|
SystemCode = "",
|
|
|
|
|
StatusName = ""
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
var oldOrder = order.Adapt<SeaExport>();
|
|
|
|
|
order.BusinessStatusName = StatusName;
|
|
|
|
|
order.BusinessStatusName = status.StatusName;
|
|
|
|
|
order.BusinessStatus = status.SystemCode;
|
|
|
|
|
//order.Note = "更新主单货物状态";
|
|
|
|
|
await tenantDb.Updateable(order).EnableDiffLogEvent().ExecuteCommandAsync();
|
|
|
|
|
await tenantDb.Updateable(order).UpdateColumns(x => new { x.BusinessStatusName, x.BusinessStatus }).EnableDiffLogEvent().ExecuteCommandAsync();
|
|
|
|
|
// 记录日志
|
|
|
|
|
await SaveSeaExportLogAsync(new SeaExportSaveLog()
|
|
|
|
|
{
|
|
|
|
@ -2061,7 +2068,8 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
|
|
|
|
|
var order = tenantDb.Queryable<SeaExport>().Where(x => x.Id == req.Id).First();
|
|
|
|
|
|
|
|
|
|
if (order.IsNull()) {
|
|
|
|
|
if (order.IsNull())
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
return await Task.FromResult(DataResult.Failed("海运出口信息不存在!", MultiLanguageConst.SeaExportNotExist));
|
|
|
|
|
}
|
|
|
|
|