海运出口放舱通知部分修改

usertest
cjy 3 months ago
parent 53dc407ff6
commit 53387b2202

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.WMS.Core.Op.Dtos
{
/// <summary>
/// 订单链接地址
/// </summary>
public class BookingOrderUrlRes
{
/// <summary>
/// 提箱小票链接
/// </summary>
public string UrlTxxp { get; set; }
/// <summary>
/// VGM链接
/// </summary>
public string UrlVgm { get; set; }
/// <summary>
/// VGM SI链接
/// </summary>
public string UrlVgmSi { get; set; }
}
}

@ -0,0 +1,245 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.WMS.Core.Op.Dtos
{
/// <summary>
/// 放舱通知历史引入
/// </summary>
public class OpBusinessYardHistoryRes
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 业务Id
/// </summary>
public long BusinessId { get; set; }
/// <summary>
/// 通知人
/// </summary>
public string ToName { get; set; }
/// <summary>
/// 联系人
/// </summary>
public string ToAttn { get; set; }
/// <summary>
/// ATTN电话
/// </summary>
public string ToAttnTel { get; set; }
/// <summary>
/// ATTN手机号
/// </summary>
public string ToAttnMobile { get; set; }
/// <summary>
/// ATTN传真
/// </summary>
public string ToAttnFax { get; set; }
/// <summary>
/// ATTN邮箱
/// </summary>
public string ToAttnEmail { get; set; }
/// <summary>
/// 通知人
/// </summary>
public string FromName { get; set; }
/// <summary>
/// FROM电话
/// </summary>
public string FromTel { get; set; }
/// <summary>
/// FROM手机号
/// </summary>
public string FromMobile { get; set; }
/// <summary>
/// FROM传真
/// </summary>
public string FromFax { get; set; }
/// <summary>
/// FROM邮箱
/// </summary>
public string FromEmail { get; set; }
/// <summary>
/// 主提单号
/// </summary>
public string MBLNO { get; set; }
/// <summary>
/// 分提单号
/// </summary>
public string HBLNO { get; set; }
/// <summary>
/// 委托编号
/// </summary>
public string CustomerNo { get; set; }
/// <summary>
/// 委托单位Id
/// </summary>
public long CustomerId { get; set; }
/// <summary>
/// 委托单位名称
/// </summary>
public string CustomerName { get; set; }
/// <summary>
/// 卸货港Id
/// </summary>
public long? DischargePortId { get; set; }
/// <summary>
/// 卸货港
/// </summary>
public string DischargePort { get; set; }
/// <summary>
/// 船名航次
/// </summary>
public string VesselVoyNo { get; set; }
/// <summary>
/// 开船日期
/// </summary>
public DateTime? ETD { get; set; }
/// <summary>
/// 目的地
/// </summary>
public string Destination { get; set; }
/// <summary>
/// 件重尺
/// </summary>
public string PKC { get; set; }
/// <summary>
/// 货物描述
/// </summary>
public string Description { get; set; }
/// <summary>
/// 提箱场站
/// </summary>
public long? YardId { get; set; }
/// <summary>
/// 提箱场站名称
/// </summary>
public string YardName { get; set; }
/// <summary>
/// 地址
/// </summary>
public string YardAddress { get; set; }
/// <summary>
/// 电话
/// </summary>
public string YardTel { get; set; }
/// <summary>
/// 提箱联系人
/// </summary>
public long YardAttn { get; set; }
/// <summary>
/// 入货场站
/// </summary>
public long? ReceiveYardId { get; set; }
/// <summary>
/// 入货场站名称
/// </summary>
public string ReceiveYardName { get; set; }
/// <summary>
/// 入货地址
/// </summary>
public string ReceiveAddress { get; set; }
/// <summary>
/// 入货电话
/// </summary>
public string ReceiveTel { get; set; }
/// <summary>
/// 入货联系人
/// </summary>
public long ReceiveAttn { get; set; }
/// <summary>
/// Desc:单证Id
/// </summary>
public long Doc { get; set; }
/// <summary>
/// Desc:单证人员名称
/// </summary>
public string DocName { get; set; }
/// <summary>
/// 单证电话
/// </summary>
public string DocTel { get; set; }
/// <summary>
/// 单证传真
/// </summary>
public string DocFax { get; set; }
/// <summary>
/// 单证邮箱
/// </summary>
public string DocEmail { get; set; }
/// <summary>
/// 截港日期
/// </summary>
public DateTime? ClosingDate { get; set; }
/// <summary>
/// 截单日期
/// </summary>
public DateTime CloseDocDate { get; set; }
/// <summary>
/// 截VGM日期
/// </summary>
public DateTime CloseVGMDate { get; set; }
/// <summary>
/// 出口海关
/// </summary>
public string ExportCustoms { get; set; }
/// <summary>
/// 海关代码
/// </summary>
public string CustomsCode { get; set; }
/// <summary>
/// 报关代码
/// </summary>
public string DeclarationCode { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
/// <summary>
/// 提箱时间
/// </summary>
public DateTime PickUpTime { get; set; }
/// <summary>
/// 入货时间
/// </summary>
public DateTime ReceiveTime { get; set; }
/// <summary>
/// 箱型箱量
/// </summary>
public string CntrTotal { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; }
}
}

@ -36,6 +36,10 @@ namespace DS.WMS.Core.Op.Dtos
/// </summary>
public string ToAttnTel { get; set; }
/// <summary>
/// ATTN手机号
/// </summary>
public string ToAttnMobile { get; set; }
/// <summary>
/// ATTN传真
/// </summary>
public string ToAttnFax { get; set; }
@ -72,7 +76,7 @@ namespace DS.WMS.Core.Op.Dtos
/// <summary>
/// 卸货港Id
/// </summary>
public long DischargePortId { get; set; }
public long? DischargePortId { get; set; }
/// <summary>
/// 卸货港
/// </summary>
@ -104,7 +108,7 @@ namespace DS.WMS.Core.Op.Dtos
/// <summary>
/// 提箱场站
/// </summary>
public long YardId { get; set; }
public long? YardId { get; set; }
/// <summary>
/// 提箱场站名称
@ -127,7 +131,7 @@ namespace DS.WMS.Core.Op.Dtos
/// <summary>
/// 入货场站
/// </summary>
public long ReceiveYardId { get; set; }
public long? ReceiveYardId { get; set; }
/// <summary>
/// 入货场站名称
@ -200,12 +204,7 @@ namespace DS.WMS.Core.Op.Dtos
/// 备注
/// </summary>
public string Remark { get; set; }
/// <summary>
/// 提箱小票地址
/// </summary>
public string PickReceiptUrl { get; set; }
/// <summary>
/// 提箱时间
/// </summary>
@ -220,5 +219,7 @@ namespace DS.WMS.Core.Op.Dtos
/// 箱型箱量
/// </summary>
public string CntrTotal { get; set; }
}
}

@ -28,6 +28,11 @@
/// ATTN电话
/// </summary>
public string ToAttnTel { get; set; }
/// <summary>
/// ATTN手机号
/// </summary>
public string ToAttnMobile { get; set; }
/// <summary>
/// ATTN传真
/// </summary>
@ -61,11 +66,27 @@
/// 主提单号
/// </summary>
public string MBLNO { get; set; }
/// <summary>
/// 分提单号
/// </summary>
public string HBLNO { get; set; }
/// <summary>
/// 委托编号
/// </summary>
public string CustomerNo { get; set; }
/// <summary>
/// 委托单位Id
/// </summary>
public long CustomerId { get; set; }
/// <summary>
/// 委托单位名称
/// </summary>
public string CustomerName { get; set; }
/// <summary>
/// 卸货港Id
/// </summary>
public long DischargePortId { get; set; }
public long? DischargePortId { get; set; }
/// <summary>
/// 卸货港
/// </summary>
@ -97,7 +118,7 @@
/// <summary>
/// 提箱场站
/// </summary>
public long YardId { get; set; }
public long? YardId { get; set; }
/// <summary>
/// 提箱场站名称
@ -120,7 +141,7 @@
/// <summary>
/// 入货场站
/// </summary>
public long ReceiveYardId { get; set; }
public long? ReceiveYardId { get; set; }
/// <summary>
/// 入货场站名称
@ -193,12 +214,7 @@
/// 备注
/// </summary>
public string Remark { get; set; }
/// <summary>
/// 提箱小票地址
/// </summary>
public string PickReceiptUrl { get; set; }
/// <summary>
/// 提箱时间
/// </summary>
@ -212,6 +228,10 @@
/// <summary>
/// 箱型箱量
/// </summary>
public string CntrTotal { get; set; }
}
public string CntrTotal { get; set; }
/// <summary>
/// 订单链接地址
/// </summary>
public BookingOrderUrlRes Urls { get; set; }
}
}

@ -41,6 +41,11 @@ namespace DS.WMS.Core.Op.Entity
[SugarColumn(ColumnDescription = "ATTN传真", IsNullable = true, Length = 30)]
public string ToAttnFax { get; set; }
/// <summary>
/// ATTN手机号
/// </summary>
[SugarColumn(ColumnDescription = "ATTN手机号", IsNullable = true, Length = 30)]
public string ToAttnMobile { get; set; }
/// <summary>
/// ATTN邮箱
/// </summary>
[SugarColumn(ColumnDescription = "ATTN邮箱", IsNullable = true, Length = 30)]
@ -81,7 +86,7 @@ namespace DS.WMS.Core.Op.Entity
/// 卸货港Id
/// </summary>
[SugarColumn(ColumnDescription = "卸货港Id", IsNullable = true)]
public long DischargePortId { get; set; }
public long? DischargePortId { get; set; }
/// <summary>
/// 卸货港
/// </summary>
@ -119,8 +124,8 @@ namespace DS.WMS.Core.Op.Entity
/// <summary>
/// 提箱场站
/// </summary>
[SugarColumn(ColumnDescription = "YardId")]
public long YardId { get; set; }
[SugarColumn(ColumnDescription = "YardId", IsNullable = true)]
public long? YardId { get; set; }
/// <summary>
/// 提箱场站名称
@ -147,8 +152,8 @@ namespace DS.WMS.Core.Op.Entity
/// <summary>
/// 入货场站
/// </summary>
[SugarColumn(ColumnDescription = "入货场站Id")]
public long ReceiveYardId { get; set; }
[SugarColumn(ColumnDescription = "入货场站Id", IsNullable = true)]
public long? ReceiveYardId { get; set; }
/// <summary>
/// 入货场站名称
@ -250,7 +255,16 @@ namespace DS.WMS.Core.Op.Entity
[SugarColumn(ColumnDescription = "提箱时间", IsNullable = true)]
public DateTime PickUpTime { get; set; }
/// <summary>
/// VGM链接
/// </summary>
[SugarColumn(ColumnDescription = "VGM链接", IsNullable = true, Length = 260)]
public string VgmUrl { get; set; }
/// <summary>
/// VGM&SI链接
/// </summary>
[SugarColumn(ColumnDescription = "VGM&SI链接", IsNullable = true, Length = 260)]
public string VgmSiUrl { get; set; }
/// <summary>
/// 入货时间
/// </summary>

@ -24,7 +24,12 @@ namespace DS.WMS.Core.Op.Interface
/// <returns></returns>
DataResult<List<OpBusinessYardRes>> GetListByPage(PageRequest request);
/// <summary>
/// 历史引入列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
Task<DataResult<List<OpBusinessYardHistoryRes>>> GetYardHistoryList(PageRequest request);
/// <summary>
/// 编辑
/// </summary>

@ -1,4 +1,5 @@
using DS.Module.Core;
using Amazon.Runtime.Internal.Util;
using DS.Module.Core;
using DS.Module.Core.Data;
using DS.Module.Core.Extensions;
using DS.Module.SqlSugar;
@ -48,7 +49,24 @@ namespace DS.WMS.Core.Op.Method
.Select<OpBusinessYardRes>().ToQueryPage(request.PageCondition);
return data;
}
public async Task<DataResult<List<OpBusinessYardHistoryRes>>> GetYardHistoryList(PageRequest request)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
//序列化查询条件
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
var data = await tenantDb.Queryable<BusinessYard>()
.LeftJoin<SeaExport>((a,b)=>a.BusinessId == b.Id)
.Select((a,b)=> new OpBusinessYardHistoryRes
{
CreateTime = a.CreateTime,
HBLNO = b.HBLNO,
CustomerId = b.CustomerId,
CustomerName =b.CustomerName,
CustomerNo =b.CustomerNo,
},true)
.Where(whereList).ToQueryPageAsync(request.PageCondition);
return data;
}
public DataResult EditOpBusinessYard(OpBusinessYardReq req)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
@ -57,7 +75,6 @@ namespace DS.WMS.Core.Op.Method
{
var data = req.Adapt<BusinessYard>();
var entity = tenantDb.Insertable(data).ExecuteReturnEntity();
return DataResult.Successed("添加成功!", entity.Id, MultiLanguageConst.DataCreateSuccess);
}
else
{
@ -69,18 +86,46 @@ namespace DS.WMS.Core.Op.Method
{
it.BusinessId,
}).ExecuteCommand();
return DataResult.Successed("更新成功!", MultiLanguageConst.DataUpdateSuccess);
}
return DataResult.Successed("保存成功!", MultiLanguageConst.DataUpdateSuccess);
}
//private void CreateLink() {
// //生成提箱小票
// var allowCarrier = _cache.GetAllDictData().Result.Where(x => x.TypeCode == "txxp_carrier_list").Select(x => x.Code).ToList();
// if (allowCarrier.Contains(order.CARRIERID))
// {
// try
// {
// var txxpLink = await TxxpLink(input.BookingId);
// }
// catch { }
// }
// //vgm链接
// allowCarrier = _cache.GetAllDictData().Result.Where(x => x.TypeCode == "vgm_carrier_list").Select(x => x.Code).ToList();
// if (allowCarrier.Contains(order.CARRIERID))
// {
// try
// {
// await VgmLink(input.BookingId);
// }
// catch { }
// }
//}
public DataResult<OpBusinessYardRes> GetOpBusinessYardInfo(string id)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var data = tenantDb.Queryable<BusinessYard>()
.Where(a => a.Id == long.Parse(id))
.Select<OpBusinessYardRes>()
.Mapper(it=>
it.Urls = tenantDb.Queryable<BookingOrderUrl>().Where(x => x.BusinessId == it.BusinessId).Select<BookingOrderUrlRes>().First()
)
.First();
//data.Urls = tenantDb.Queryable<BookingOrderUrl>().Where(x => x.BusinessId == data.BusinessId).Select<BookingOrderUrlRes>().First();
return DataResult<OpBusinessYardRes>.Success(data, MultiLanguageConst.DataQuerySuccess);
}
public DataResult<OpBusinessYardRes> GetBusinessYardByKeyId(string id)
@ -89,6 +134,9 @@ namespace DS.WMS.Core.Op.Method
var data = tenantDb.Queryable<BusinessYard>()
.Where(a => a.BusinessId == long.Parse(id))
.Select<OpBusinessYardRes>()
.Mapper(it =>
it.Urls = tenantDb.Queryable<BookingOrderUrl>().Where(x => x.BusinessId == it.BusinessId).Select<BookingOrderUrlRes>().First()
)
.First();
return DataResult<OpBusinessYardRes>.Success(data, MultiLanguageConst.DataQuerySuccess);
}

@ -850,7 +850,7 @@ public class CommonService : ICommonService
/// <summary>
/// 查询客户 用户拥有的菜单权限
/// 查询客户 用户拥有的菜单权限
/// </summary>
/// <returns></returns>
public async Task<DataResult<List<RouteItem>>> GetClientUserPermissions()
@ -863,6 +863,10 @@ public class CommonService : ICommonService
var roleIds = await db.Queryable<SysRoleUser>().Where(x => x.UserId == userId).Select(x => x.RoleId).ToListAsync();
if (roleIds.Count == 0)
{
return await Task.FromResult(DataResult<List<RouteItem>>.Failed("该用户未绑定角色!"));
}
var permissions = await db.Queryable<SysRolePermission>().Where(x => roleIds.Contains(x.RoleId))
.Select(x => x.PermissionId).Distinct().ToListAsync();
@ -924,38 +928,7 @@ public class CommonService : ICommonService
childs.Distinct();
//排序
childs = childs.OrderBy(x => x.SortCode).ToList();
foreach (var child in childs)
{
var grandsons = await db.Queryable<SysPermissionTenant>().Where(x =>
x.MenuType == 2 && x.ParentId == child.ParentId && x.IsHidden == false &&
permissions.Contains(x.PermissionId)) //获取第三层路由
.OrderBy(x => x.SortCode)
.Select(a => new RouteItem
{
Id = a.Id,
ParentId = a.PermissionId,
Path = a.Url,
Name = a.PermissionName,
EnName = a.PermissionEnName,
Component = a.Component,
IsCache = a.IsCache,
Meta = new RouteMeta()
{
Title = a.Title,
Icon = a.Icon,
}
}).ToListAsync();
if (grandsons.Count > 0)
{
//去重
grandsons.Distinct();
//排序
grandsons = grandsons.OrderBy(x => x.SortCode).ToList();
child.Children = grandsons;
}
}
item.Children = childs;

@ -191,9 +191,9 @@ namespace DS.WMS.Core.Sys.Method
{
var data = await db.Queryable<SysPrintModule>().Where(x=>x.Disable == false)
.Select<SysPrintModuleRes>()
.Mapper(async it =>
.Mapper(it =>
{
it.TemplateCount = await db.Queryable<SysPrintTemplate>().Where(x => x.ModuleId == it.Id && x.Disable == false).CountAsync();
it.TemplateCount = db.Queryable<SysPrintTemplate>().Where(x => x.ModuleId == it.Id && x.Disable == false).Count();
} )
.ToListAsync();
return await Task.FromResult(DataResult<List<SysPrintModuleRes>>.Success(data));

@ -37,7 +37,18 @@ public class OpBusinessYardController : ApiController
var res = _invokeService.GetListByPage(request);
return res;
}
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
[Route("GetYardHistoryList")]
public async Task<DataResult<List<OpBusinessYardHistoryRes>>> GetYardHistoryList([FromBody] PageRequest request)
{
var res = await _invokeService.GetYardHistoryList(request);
return res;
}
/// <summary>
/// 编辑
/// </summary>

@ -61,7 +61,7 @@ public class SaasDBUpdateTest
var tenantDb = saasService.GetBizDbScopeById(item.TenantId).CopyNew();
StaticConfig.CodeFirst_MySqlCollate = "utf8mb4_0900_ai_ci"; //较高版本支持
//tenantDb.CodeFirst.InitTables(types); //指定表空间下的实体
tenantDb.CodeFirst.InitTables(typeof(MappingFrt));//指定更新特定实体
tenantDb.CodeFirst.InitTables(typeof(BusinessYard));//指定更新特定实体
}
Assert.True(true);

Loading…
Cancel
Save