修改提单管理

dev
jianghaiqing 4 weeks ago
parent 694bd228b0
commit 77963723cb

@ -0,0 +1,229 @@
using SqlSugar;
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 BLIssueManageBaseDto
{
/// <summary>
/// 提单管理主键
/// </summary>
public long Id { get; set; }
/// <summary>
/// 订舱主键,关联订舱主表ID
/// </summary>
public long BookingId { get; set; }
/// <summary>
/// 业务类型SeaExport-海运出口)
/// </summary>
public string BusiType { get; set; }
/// <summary>
/// 业务类型名称SeaExport-海运出口)
/// </summary>
public string BusiTypeName { get; set; }
/// <summary>
/// 单证编号
/// </summary>
public string BLNo { get; set; }
/// <summary>
/// 单证类型
/// </summary>
public string BLType { get; set; }
/// <summary>
/// 单证类型名称
/// </summary>
public string BLTypeName { get; set; }
/// <summary>
/// 结算日期
/// </summary>
public Nullable<DateTime> StlDate { get; set; }
/// <summary>
/// 提单签发状态代码
/// </summary>
public string Status { get; set; }
/// <summary>
/// 提单签发状态名称
/// </summary>
public string StatusName { get; set; }
/// <summary>
/// 委托单位Id
/// </summary>
public long CustomerId { get; set; }
/// <summary>
/// 委托单位
/// </summary>
public string CustomerName { get; set; }
/// <summary>
/// 揽货人Id
/// </summary>
public long SaleId { get; set; }
/// <summary>
/// 揽货人
/// </summary>
public string Sale { get; set; }
/// <summary>
/// 签入日期
/// </summary>
public Nullable<DateTime> CheckInDate { get; set; }
/// <summary>
/// 签入备注
/// </summary>
public string CheckInNote { get; set; }
/// <summary>
/// 签入人
/// </summary>
public long CheckInBy { get; set; }
/// <summary>
/// 签入人名称
/// </summary>
public string CheckInUserName { get; set; }
/// <summary>
/// 是否特殊放单
/// </summary>
public bool IsSpecialRelese { get; set; }
/// <summary>
/// 特殊放单状态代码
/// </summary>
public string SpecialReleseStatus { get; set; }
/// <summary>
/// 特殊放单状态名称
/// </summary>
public string SpecialReleseStatusName { get; set; }
/// <summary>
/// 特殊放单备注
/// </summary>
public string SpecialReleseNotes { get; set; }
/// <summary>
/// 是否船证
/// </summary>
public bool IsShipCertificate { get; set; }
/// <summary>
/// 开船日期
/// </summary>
public DateTime? ETD { get; set; }
/// <summary>
/// 预抵日期
/// </summary>
public DateTime? ETA { get; set; }
/// <summary>
/// 协议天数
/// </summary>
public Nullable<Int16> AgreementDays { get; set; }
/// <summary>
/// 超期天数
/// </summary>
public Nullable<Int16> OverdueDays { get; set; }
/// <summary>
/// 实际天数
/// </summary>
public Nullable<Int16> RealDays { get; set; }
/// <summary>
/// USD未收
/// </summary>
public Nullable<decimal> NoPayAmountUSD { get; set; }
/// <summary>
/// RMB未收
/// </summary>
public Nullable<decimal> NoPayAmountCNY { get; set; }
/// <summary>
/// 未收合计
/// </summary>
public Nullable<decimal> NoPayAmountTotal { get; set; }
/// <summary>
/// 不含税应收款总计
/// </summary>
public Nullable<decimal> NoTaxReceivableTotal { get; set; }
/// <summary>
/// 不含税应付款总计
/// </summary>
public Nullable<decimal> NoTaxPayableTotal { get; set; }
/// <summary>
/// 不含税利润总计
/// </summary>
public decimal NoTaxProfitTotal { get; set; }
/// <summary>
/// 不含税人民币应收款
/// </summary>
public Nullable<decimal> NoTaxReceivableCNY { get; set; }
/// <summary>
/// 不含税人民币应付款
/// </summary>
public Nullable<decimal> NoTaxPayableCNY { get; set; }
/// <summary>
/// 不含税人民币利润
/// </summary>
public Nullable<decimal> NoTaxProfitCNY { get { return NoTaxReceivableCNY - NoTaxPayableCNY; } }
/// <summary>
/// 不含税美元应收款
/// </summary>
public Nullable<decimal> NoTaxReceivableUSD { get; set; }
/// <summary>
/// 不含税美元应付款
/// </summary>
public Nullable<decimal> NoTaxPayableUSD { get; set; }
/// <summary>
/// 不含税美元利润
/// </summary>
public Nullable<decimal> NoTaxProfitUSD { get { return NoTaxReceivableUSD - NoTaxPayableUSD; } }
/// <summary>
/// 不含税其他币种应收款
/// </summary>
public Nullable<decimal> NoTaxReceivableOther { get; set; }
/// <summary>
/// 不含税其他币种应付款
/// </summary>
public Nullable<decimal> NoTaxPayableOther { get; set; }
/// <summary>
/// 不含税其他币种利润
/// </summary>
public Nullable<decimal> NoTaxProfitOther { get; set; }
}
}

@ -0,0 +1,61 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.WMS.Core.Op.Dtos.Enum
{
/// <summary>
/// 提单状态枚举
/// </summary>
public enum BLIssueStatusEnum
{
/// <summary>
/// 未签入
/// </summary>
[Description("未签入")]
UnCheckIn,
/// <summary>
/// 签入未签出
/// </summary>
[Description("签入未签出")]
CheckInUnCheckOut,
/// <summary>
/// 状态更改
/// </summary>
[Description("状态更改")]
StatusModify,
/// <summary>
/// 放单通知
/// </summary>
[Description("放单通知")]
ReleaseNotice,
/// <summary>
/// 更改提单
/// </summary>
[Description("更改提单")]
BLModify,
/// <summary>
/// 提单签出
/// </summary>
[Description("提单签出")]
CheckOut,
/// <summary>
/// 提单签入
/// </summary>
[Description("提单签入")]
CheckIn,
/// <summary>
/// 扣单
/// </summary>
[Description("扣单")]
BLSeize,
/// <summary>
/// 未签出
/// </summary>
[Description("未签出")]
UnCheckOut
}
}

@ -7,7 +7,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.WMS.Core.Op.Entity.BLManage
namespace DS.WMS.Core.Op.Entity
{
/// <summary>
/// 提单管理主信息
@ -180,90 +180,90 @@ namespace DS.WMS.Core.Op.Entity.BLManage
/// USD未收
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "USD未收", Length = 18, DecimalDigits = 3, IsNullable = true)]
public decimal NoPayAmountUSD { get; set; }
public Nullable<decimal> NoPayAmountUSD { get; set; }
/// <summary>
/// RMB未收
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "RMB未收", Length = 18, DecimalDigits = 3, IsNullable = true)]
public decimal NoPayAmountCNY { get; set; }
public Nullable<decimal> NoPayAmountCNY { get; set; }
/// <summary>
/// 未收合计
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "未收合计", Length = 18, DecimalDigits = 3, IsNullable = true)]
public decimal NoPayAmountTotal { get; set; }
public Nullable<decimal> NoPayAmountTotal { get; set; }
/// <summary>
/// 不含税应收款总计
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "不含税应收款总计", Length = 18, DecimalDigits = 3, IsNullable = true)]
public decimal NoTaxReceivableTotal { get; set; }
public Nullable<decimal> NoTaxReceivableTotal { get; set; }
/// <summary>
/// 不含税应付款总计
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "不含税应付款总计", Length = 18, DecimalDigits = 3, IsNullable = true)]
public decimal NoTaxPayableTotal { get; set; }
public Nullable<decimal> NoTaxPayableTotal { get; set; }
/// <summary>
/// 不含税利润总计
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "不含税利润总计", Length = 18, DecimalDigits = 3, IsNullable = true)]
public decimal NoTaxProfitTotal { get; set; }
public Nullable<decimal> NoTaxProfitTotal { get; set; }
/// <summary>
/// 不含税人民币应收款
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "不含税利润总计", Length = 18, DecimalDigits = 3, IsNullable = true)]
public decimal NoTaxReceivableCNY { get; set; }
public Nullable<decimal> NoTaxReceivableCNY { get; set; }
/// <summary>
/// 不含税人民币应付款
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "不含税利润总计", Length = 18, DecimalDigits = 3, IsNullable = true)]
public decimal NoTaxPayableCNY { get; set; }
public Nullable<decimal> NoTaxPayableCNY { get; set; }
/// <summary>
/// 不含税人民币利润
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "不含税利润总计", Length = 18, DecimalDigits = 3, IsNullable = true)]
public decimal NoTaxProfitCNY { get { return NoTaxReceivableCNY - NoTaxPayableCNY; } }
public Nullable<decimal> NoTaxProfitCNY { get { return NoTaxReceivableCNY - NoTaxPayableCNY; } }
/// <summary>
/// 不含税美元应收款
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "不含税利润总计", Length = 18, DecimalDigits = 3, IsNullable = true)]
public decimal NoTaxReceivableUSD { get; set; }
public Nullable<decimal> NoTaxReceivableUSD { get; set; }
/// <summary>
/// 不含税美元应付款
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "不含税美元应付款", Length = 18, DecimalDigits = 3, IsNullable = true)]
public decimal NoTaxPayableUSD { get; set; }
public Nullable<decimal> NoTaxPayableUSD { get; set; }
/// <summary>
/// 不含税美元利润
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "不含税美元利润", Length = 18, DecimalDigits = 3, IsNullable = true)]
public decimal NoTaxProfitUSD { get { return NoTaxReceivableUSD - NoTaxPayableUSD; } }
public Nullable<decimal> NoTaxProfitUSD { get { return NoTaxReceivableUSD - NoTaxPayableUSD; } }
/// <summary>
/// 不含税其他币种应收款
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "不含税其他币种应收款", Length = 18, DecimalDigits = 3, IsNullable = true)]
public decimal NoTaxReceivableOther { get; set; }
public Nullable<decimal> NoTaxReceivableOther { get; set; }
/// <summary>
/// 不含税其他币种应付款
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "不含税其他币种应付款", Length = 18, DecimalDigits = 3, IsNullable = true)]
public decimal NoTaxPayableOther { get; set; }
public Nullable<decimal> NoTaxPayableOther { get; set; }
/// <summary>
/// 不含税其他币种利润
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "不含税其他币种利润", Length = 18, DecimalDigits = 3, IsNullable = true)]
public decimal NoTaxProfitOther { get; set; }
public Nullable<decimal> NoTaxProfitOther { get; set; }
}
}

@ -18,7 +18,7 @@ namespace DS.WMS.Core.Op.Interface
/// </summary>
/// <param name="querySearch">查询条件</param>
/// <returns>返回回执</returns>
Task<DataResult<List<BookingSlotBaseDto>>> GetPageAsync(PageRequest querySearch);
Task<DataResult<List<BLIssueManageBaseDto>>> GetPageAsync(PageRequest querySearch);
/// <summary>
/// 导出

@ -64,6 +64,8 @@ using Masuit.Tools.Systems;
using System.Threading;
using NPOI.OpenXmlFormats.Wordprocessing;
using DS.WMS.Core.Invoice.Dtos;
using DS.Module.Core.Enums;
using DS.WMS.Core.Application.Dtos;
namespace DS.WMS.Core.Op.Method
{
@ -95,8 +97,40 @@ namespace DS.WMS.Core.Op.Method
/// </summary>
/// <param name="querySearch">查询条件</param>
/// <returns>返回回执</returns>
public async Task<DataResult<List<BookingSlotBaseDto>>> GetPageAsync(PageRequest querySearch)
public async Task<DataResult<List<BLIssueManageBaseDto>>> GetPageAsync(PageRequest querySearch)
{
/*
1
*/
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var query = tenantDb.Queryable<SeaExport>().ClearFilter(typeof(IOrgId))
.LeftJoin<BLIssueManageBase>((l, r) => l.Id == r.BookingId)
.Select((l, r) => new { order = l, bl = r });
if (!querySearch.QueryCondition.IsNullOrEmpty())
{
var whereList = querySearch.GetConditionalModels(db);
query = query.Where(whereList);
}
var result = await query.ToQueryPageAsync(querySearch.PageCondition);
if (result.Data.Count > 0)
{
//var orgIds = result.Data.Select(x => x.SaleDeptId).Distinct();
//var orgs = await Db.Queryable<SysOrg>().Where(x => orgIds.Contains(x.Id)).Select(x => new { x.Id, x.OrgName }).ToListAsync();
//var userIds = result.Data.Select(x => x.CreateBy).Distinct();
//var users = await Db.Queryable<SysUser>().Where(x => userIds.Contains(x.Id)).Select(x => new { x.Id, x.UserName }).ToListAsync();
//foreach (var item in result.Data)
//{
// item.SaleDeptName = orgs.Find(x => x.Id == item.SaleDeptId)?.OrgName;
// item.SaleDeptName = users.Find(x => x.Id == item.CreateBy)?.UserName;
//}
}
return null;
}
#endregion

@ -27,7 +27,7 @@ namespace DS.WMS.OpApi.Controllers
/// <returns>返回回执</returns>
[HttpPost]
[Route("GetPage")]
public async Task<DataResult<List<BookingSlotBaseDto>>> GetPageAsync([FromBody] PageRequest querySearch)
public async Task<DataResult<List<BLIssueManageBaseDto>>> GetPageAsync([FromBody] PageRequest querySearch)
{
return await _BLIssueManageService.GetPageAsync(querySearch);
}

Loading…
Cancel
Save