提交订单

dev
cjy 3 weeks ago
parent d6a9cc244d
commit 730139257c

@ -273,4 +273,11 @@ public interface ISeaExportService
/// <param name="Ids"></param> /// <param name="Ids"></param>
/// <returns></returns> /// <returns></returns>
public Task<DataResult<string>> RefreshYard(long[] Ids); public Task<DataResult<string>> RefreshYard(long[] Ids);
/// <summary>
/// 提交订单
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
public Task<DataResult> CreateOrderAuditTaskAsync(IdModel req);
} }

@ -1608,43 +1608,48 @@ public partial class SeaExportService : ISeaExportService
///// <summary> /// <summary>
///// /// 提交订单
///// </summary> /// </summary>
///// <param name="req"></param> /// <param name="req"></param>
///// <returns></returns> /// <returns></returns>
//public async Task<DataResult> CreateOrderAuditTaskAsync(IdModel req) public async Task<DataResult> CreateOrderAuditTaskAsync(IdModel req)
//{ {
// var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
// var id = long.Parse(req.Id);
// var info = await tenantDb.Queryable<SeaExport>().Where(x => x.Id == id).FirstAsync();
// if (info.IsNull())
// return await Task.FromResult(DataResult.Failed("不存在的海运出口信息!", MultiLanguageConst.SeaExportExist));
// if (string.IsNullOrEmpty(info.ServiceItem)) var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
// return await Task.FromResult(DataResult.Failed("海运出口服务项目不能为空!", MultiLanguageConst.SeaExportServiceItemNotExist)); var id = long.Parse(req.Id);
var info = await tenantDb.Queryable<SeaExport>().Where(x => x.Id == id).FirstAsync();
if (info.IsNull())
return await Task.FromResult(DataResult.Failed("不存在的海运出口信息!", MultiLanguageConst.SeaExportExist));
if (string.IsNullOrEmpty(info.ServiceItem))
return await Task.FromResult(DataResult.Failed("海运出口服务项目不能为空!", MultiLanguageConst.SeaExportServiceItemNotExist));
// var items = info.ServiceItem.Split(','); var items = info.ServiceItem.Split(',');
//订舱 走审单流程
if (items.Contains("dingcang"))
{
var taskReq = new TaskCreationRequest()
{
BusinessId = id,
BusinessType = BusinessType.OceanShippingExport,
TaskTypeName = TaskBaseTypeEnum.WAIT_ORDER_AUDIT.ToString(),
};
var result = await _seaTaskService.CreateTaskAsync(taskReq, false);
if (!result.Succeeded)
return await Task.FromResult(DataResult.Failed(result.Message));
return result;
}
else //没有订舱服务不调用审单流程生成订舱相关任务,直接根据服务项目生成任务。
{
var taskReq = new BusinessTask()
{
BusinessId = id,
BusinessType = BusinessType.OceanShippingExport,
};
await _seaTaskService.CreateSubTaskAsync(taskReq);
// if (items.Contains("dingcang")) return DataResult.Success;
// { }
// var taskReq = new TaskCreationRequest() }
// {
// BusinessId = id,
// BusinessType = BusinessType.OceanShippingExport,
// TaskTypeName = TaskBaseTypeEnum.WAIT_ORDER_AUDIT.ToString(),
// };
// var result = await _seaTaskService.CreateTaskAsync(taskReq, false);
// if (!result.Succeeded)
// return await Task.FromResult(DataResult.Failed(result.Message));
// return
// }
// else
// {
// return await Task.FromResult(DataResult.Failed("不存在的海运出口信息!"));
// }
//}
} }

@ -88,6 +88,11 @@ public class BankReq
/// 英文银行地址 /// 英文银行地址
/// </summary> /// </summary>
public string BankEnAddress { get; set; } public string BankEnAddress { get; set; }
/// <summary>
/// 银行国际代码
/// </summary>
public string? SwiftCode { get; set; }
} }

@ -89,4 +89,8 @@ public class BankRes
/// 英文银行地址 /// 英文银行地址
/// </summary> /// </summary>
public string BankEnAddress { get; set; } public string BankEnAddress { get; set; }
/// <summary>
/// 银行国际代码
/// </summary>
public string? SwiftCode { get; set; }
} }

@ -101,5 +101,11 @@ namespace DS.WMS.Core.Sys.Entity
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "英文银行地址", IsNullable = true, Length = 200)] [SugarColumn(ColumnDescription = "英文银行地址", IsNullable = true, Length = 200)]
public string BankEnAddress { get; set; } public string BankEnAddress { get; set; }
/// <summary>
/// 银行国际代码
/// </summary>
[SugarColumn(ColumnDescription = "银行国际代码", Length = 150, IsNullable = true)]
public string? SwiftCode { get; set; }
} }
} }

@ -582,5 +582,16 @@ public class SeaExportController : ApiController
{ {
return await _chargeFeeService.ChargeFee(model); return await _chargeFeeService.ChargeFee(model);
} }
/// <summary>
/// 提交订单
/// </summary>
/// <param name="req">订舱主键id</param>
[HttpPost]
[Route("SubmitOrderAudit")]
public async Task<DataResult> CreateOrderAuditTaskAsync([FromBody] IdModel req)
{
var res = await _invokeService.CreateOrderAuditTaskAsync(req);
return res;
}
} }
Loading…
Cancel
Save