批量编辑功能及指定列更新

master
ZR20090193-陈敬勇 7 months ago
parent 8d6f67f0a8
commit 78959d7287

@ -303,6 +303,14 @@ public static class MultiLanguageConst
[Description("海运出口信息已存在")]
public const string SeaExportExist = "Sea_Export_Exist";
[Description("海运出口信息业务已锁定")]
public const string SeaExportBusinessLock = "Sea_Export_Business_Lock";
[Description("海运出口信息费用已锁定")]
public const string SeaExportFeeLock = "Sea_Export_Fee_Lock";
[Description("海运出口批量编辑未勾选")]
public const string SeaExportBatchEditNoSelect = "Sea_Export_Batch_Edit_No_Select";
[Description("函电信息不存在")]
public const string LetterNotExist = "Letter_Not_Exist";

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.Module.Core
{
/// <summary>
/// 租户类型枚举
/// </summary>
[Description("租户类型枚举")]
public enum TenantTypeEnum
{
/// <summary>
/// 普通租户
/// </summary>
[Description("普通租户")]
Common = 0,
/// <summary>
/// 系统租户
/// </summary>
[Description("系统租户")]
System = 1,
}
}

@ -118,6 +118,73 @@ public static class EntityExtensions
return res;
}
/// <summary>
/// 获取实体有值内容
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="t"></param>
/// <returns></returns>
public static Dictionary<string, string> GetProperties<T>(this T t)
{
Dictionary<string, string> ret = new Dictionary<string, string>();
if (t == null)
{
return null;
}
System.Reflection.PropertyInfo[] properties = t.GetType().GetProperties(System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public);
if (properties.Length <= 0)
{
return null;
}
foreach (System.Reflection.PropertyInfo item in properties)
{
string name = item.Name; //实体类字段名称
string value = item.GetValue(t, null).ToString(); //该字段的值
if (item.PropertyType.IsValueType || item.PropertyType.Name.StartsWith("String"))
{
ret.Add(name, value); //在此可转换value的类型
}
}
return ret;
}
/// <summary>
/// 获取实体有值内容
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="t"></param>
/// <returns></returns>
public static string[] GetPropertiesArray<T>(this T t)
{
List<string> ret = new List<string>();
if (t == null)
{
return null;
}
System.Reflection.PropertyInfo[] properties = t.GetType().GetProperties(System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public);
if (properties.Length <= 0)
{
return null;
}
foreach (System.Reflection.PropertyInfo item in properties)
{
string name = item.Name; //实体类字段名称
object value = item.GetValue(t, null); //该字段的值
if ((item.PropertyType.IsValueType || item.PropertyType.Name.StartsWith("String")) && value.IsNotNull())
{
ret.Add(name); //在此可转换value的类型
}
}
return ret.ToArray();
}
}
public class EntityFieldProperty

@ -8,7 +8,6 @@ using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;
using static SKIT.FlurlHttpClient.Wechat.Api.Models.TCBGetPressureTestReportResponse.Types;
using static System.Net.Mime.MediaTypeNames;
namespace DS.Module.PrintModule

@ -0,0 +1,346 @@
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 SeaExportBatchEditReq
{
/// <summary>
/// 业务Ids
/// </summary>
public List<long> Ids { get; set; }
/// <summary>
/// 场站Id t_crm_client CUSTNAME
/// </summary>
public long YardId { get; set; }
/// <summary>
/// 场站 t_crm_client CUSTNAME
/// </summary>
public string Yard { get; set; }
/// <summary>
/// 船公司Id
/// </summary>
public long CarrierId { get; set; }
/// <summary>
/// 船公司
/// </summary>
public string Carrier { get; set; }
/// <summary>
/// 货代公司Id
/// </summary>
public long ForwarderId { get; set; }
/// <summary>
/// 货代公司
/// </summary>
public string Forwarder { get; set; }
/// <summary>
/// 分提单号
/// </summary>
public string HBLNO { get; set; }
/// <summary>
/// 航线Id
/// </summary>
public long LaneId { get; set; }
/// <summary>
/// 航线
/// </summary>
public string Lane { get; set; }
/// <summary>
/// 揽货人Id
/// </summary>
public long SaleId { get; set; }
/// <summary>
/// 揽货人
/// </summary>
public string Sale { get; set; }
/// <summary>
/// 报关行Id
/// </summary>
public long CustomserId { get; set; }
/// <summary>
/// 报关行
/// </summary>
public string Customser { get; set; }
/// <summary>
/// 承运车队Id
/// </summary>
public long TruckerId { get; set; }
/// <summary>
/// 承运车队
/// </summary>
public string Trucker { get; set; }
/// <summary>
/// 装货港代码
/// </summary>
public long LoadPortId { get; set; }
/// <summary>
/// 装货港
/// </summary>
public string LoadPort { get; set; }
/// <summary>
/// 卸货港代码
/// </summary>
public long DischargePortId { get; set; }
/// <summary>
/// 卸货港
/// </summary>
public string DischargePort { get; set; }
/// <summary>
/// 船名
/// </summary>
public string Vessel { get; set; }
/// <summary>
/// 船名Id
/// </summary>
public long VesselId { get; set; }
/// <summary>
/// 内部航次
/// </summary>
public string InnerVoyno { get; set; }
/// <summary>
/// 航次
/// </summary>
public string Voyno { get; set; }
/// <summary>
/// 国外代理人Id t_info_client CUSTNAME
/// </summary>
public long? AgentId { get; set; }
/// <summary>
/// 国外代理人 t_info_client CUSTNAME
/// </summary>
public string Agent { get; set; }
/// <summary>
/// 装运方式 整箱、拼箱单票、拼箱主票、拼箱分票
/// </summary>
public string BLType { get; set; }
/// <summary>
/// Desc:单证
/// </summary>
public long Doc { get; set; }
/// <summary>
/// 客服
/// </summary>
public long CustomerService { get; set; }
/// <summary>
/// 海外客服
/// </summary>
public long ForeignCustomerService { get; set; }
/// <summary>
/// 操作员
/// </summary>
public long OperatorId { get; set; }
/// <summary>
/// ATD
/// </summary>
public DateTime? ATD { get; set; }
/// <summary>
/// 开船日期
/// </summary>
public DateTime? ETD { get; set; }
/// <summary>
/// 截港日期
/// </summary>
public DateTime? ClosingDate { get; set; }
/// <summary>
/// 截单日期
/// </summary>
public DateTime? CloseDocDate { get; set; }
/// <summary>
/// 运费协议号
/// </summary>
public string ContractNo { get; set; }
/// <summary>
/// Desc:服务合同号
/// </summary>
public string ServiceContractNo { get; set; }
/// <summary>
/// Desc:业务来源Id
/// </summary>
public long SourceId { get; set; }
/// <summary>
/// Desc:业务来源明细Id
/// </summary>
public long SourceDetailId { get; set; }
/// <summary>
/// 船代Id
/// </summary>
public long ShipAgencyId { get; set; }
/// <summary>
/// 船代
/// </summary>
public long ShipAgency { get; set; }
///// <summary>
///// 海关航次
///// </summary>
//public string Voyno { get; set; }
/// <summary>
/// 目的地代码
/// </summary>
public string DestinationId { get; set; }
/// <summary>
/// 目的地
/// </summary>
public string Destination { get; set; }
/// <summary>
/// 交货地代码
/// </summary>
public long DeliveryPlaceId { get; set; }
/// <summary>
/// 交货地
/// </summary>
public string DeliveryPlace { get; set; }
/// <summary>
/// 签单日期
/// </summary>
public DateTime? IssueDate { get; set; }
/// <summary>
/// 签单地点Id
/// </summary>
public long IssuePlaceId { get; set; }
/// <summary>
/// 签单地点
/// </summary>
public string IssuePlace { get; set; }
/// <summary>
/// Desc:海关代码
/// </summary>
public string HSCode { get; set; }
/// <summary>
/// Desc:订舱编号
/// </summary>
public string OrderNo { get; set; }
/// <summary>
/// Desc:所属业务部门
/// </summary>
public long SaleDeptId { get; set; }
/// <summary>
/// 代理内容
/// </summary>
public string AgentContent { get; set; }
/// <summary>
/// Desc:备注
/// </summary>
public string Remark { get; set; }
/// <summary>
/// 委托单位Id
/// </summary>
public long CustomerId { get; set; }
/// <summary>
/// 委托单位 t_info_client CUSTNAME
/// </summary>
public string CustomerName { get; set; }
/// <summary>
/// 财务日期
/// </summary>
public string AccountDate { get; set; }
/// <summary>
/// 销售公司Id
/// </summary>
public long SaleOrgId { get; set; }
/// <summary>
/// 货物标识 S/R/D/O
/// </summary>
public string CargoId { get; set; }
/// <summary>
/// 设置温度
/// </summary>
public string TemperatureSet { get; set; }
/// <summary>
/// 场站联系人
/// </summary>
public string YardATTN { get; set; }
/// <summary>
/// 场站联系方式
/// </summary>
public string YardTel { get; set; }
/// <summary>
/// Desc:报检
/// </summary>
public bool? IsInspection { get; set; } = false;
/// <summary>
/// Desc:仅报关
/// </summary>
public bool? IsCustoms { get; set; } = false;
/// <summary>
/// Desc:订舱
/// </summary>
public bool? IsBooking { get; set; } = false;
/// <summary>
/// Desc:分单签单
/// </summary>
public bool? IsHBLNO { get; set; } = false;
/// <summary>
/// Desc:陆运
/// </summary>
public bool? IsLand { get; set; } = false;
/// <summary>
/// Desc:使用代理
/// </summary>
public bool? IsAgent { get; set; } = false;
/// <summary>
/// Desc:仓储
/// </summary>
public bool? IsStorage { get; set; } = false;
}
}

@ -0,0 +1,29 @@
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 SeaExportBatchEditShipagencyReq
{
/// <summary>
/// 业务Ids
/// </summary>
public List<long> Ids { get; set; }
/// <summary>
/// 船代
/// </summary>
public string ShipAgency { get; set; }
/// <summary>
/// 船代ID
/// </summary>
public string ShipAgencyId { get; set; }
}
}

@ -1,5 +1,6 @@
using DS.Module.Core;
using FluentValidation;
using SqlSugar;
namespace DS.WMS.Core.Op.Dtos;
@ -14,14 +15,9 @@ public class SeaExportReq
public long Id { get; set; }
/// <summary>
/// 业务编号
/// 主单Id
/// </summary>
public string BSNO { get; set; }
/// <summary>
/// 主票业务编号
/// </summary>
public string MasterNo { get; set; }
public long ParentId { get; set; } = 0;
/// <summary>
/// 业务状态
@ -38,6 +34,16 @@ public class SeaExportReq
/// </summary>
public DateTime BillFeeStatusTime { get; set; }
///// <summary>
///// Desc:是否业务锁定
///// </summary>
//[SugarColumn(ColumnDescription = "是否业务锁定", DefaultValue = "0")]
//public bool? IsBusinessLocking { get; set; } = false;
///// <summary>
///// Desc:是否费用锁定
///// </summary>
//[SugarColumn(ColumnDescription = "是否费用锁定", DefaultValue = "0")]
//public bool? IsFeeLocking { get; set; } = false;
/// <summary>
/// 费用状态
/// </summary>
@ -73,6 +79,10 @@ public class SeaExportReq
/// </summary>
public string TransNo { get; set; }
/// <summary>
/// 委托单位Id
/// </summary>
public long CustomerId { get; set; }
/// <summary>
/// 委托单位 t_info_client CUSTNAME
/// </summary>
@ -98,10 +108,15 @@ public class SeaExportReq
/// </summary>
public long? NotifyPartyId { get; set; }
/// <summary>
/// 国外代理人 t_info_client CUSTNAME
/// 国外代理人Id t_info_client CUSTNAME
/// </summary>
public long? AgentId { get; set; }
/// <summary>
/// 国外代理人 t_info_client CUSTNAME
/// </summary>
public string Agent { get; set; }
/// <summary>
/// 发货人内容
@ -123,6 +138,10 @@ public class SeaExportReq
/// </summary>
public string AgentContent { get; set; }
/// <summary>
/// 场站Id t_crm_client CUSTNAME
/// </summary>
public long YardId { get; set; }
/// <summary>
/// 场站 t_crm_client CUSTNAME
/// </summary>
@ -414,35 +433,59 @@ public class SeaExportReq
/// </summary>
public long ForeignCustomerService { get; set; }
/// <summary>
/// 航线
/// 航线Id
/// </summary>
public long LaneId { get; set; }
/// <summary>
/// 航线
/// </summary>
public string Lane { get; set; }
/// <summary>
/// 揽货人Id
/// </summary>
public long SaleId { get; set; }
/// <summary>
/// 揽货人
/// </summary>
public long Sale { get; set; }
public string Sale { get; set; }
/// <summary>
/// 船公司Id
/// </summary>
public long CarrierId { get; set; }
/// <summary>
/// 船公司
/// </summary>
public long Carrier { get; set; }
public string Carrier { get; set; }
/// <summary>
/// 货代公司Id
/// </summary>
public long ForwarderId { get; set; }
/// <summary>
/// 货代公司
/// </summary>
public long Forwarder { get; set; }
public string Forwarder { get; set; }
/// <summary>
/// 报关行Id
/// </summary>
public long CustomserId { get; set; }
/// <summary>
/// 报关行
/// </summary>
public long Customser { get; set; }
public string Customser { get; set; }
/// <summary>
/// 承运车队Id
/// </summary>
public long TruckerId { get; set; }
/// <summary>
/// 承运车队
/// </summary>
public long Trucker { get; set; }
public string Trucker { get; set; }
/// <summary>
@ -639,7 +682,7 @@ public class SeaExportReq
/// <summary>
/// Desc:单证
/// </summary>
public string Doc { get; set; }
public long Doc { get; set; }
/// <summary>
/// Desc:装箱类型
@ -686,6 +729,10 @@ public class SeaExportReq
/// Desc:委托方式
/// </summary>
public string OrderType { get; set; }
/// <summary>
/// Desc:订舱编号
/// </summary>
public string OrderNo { get; set; }
/// <summary>
/// Desc:操作员代码
@ -835,6 +882,11 @@ public class SeaExportReq
/// </summary>
public long ShipAgencyId { get; set; }
/// <summary>
/// 船代
/// </summary>
public long ShipAgency { get; set; }
/// <summary>
/// Desc:湿度
/// </summary>
@ -980,10 +1032,6 @@ public class SeaExportReqValidator : AbstractValidator<SeaExportReq>
/// </summary>
public SeaExportReqValidator()
{
this.RuleFor(o => o.BSNO)
.NotEmpty().WithName("业务编号");
this.RuleFor(o => o.MasterNo)
.NotEmpty().WithName("主票业务编号");
this.RuleFor(o => o.BusinessDate)
.NotEmpty().WithName("录入日期");
this.RuleFor(o => o.AccountDate)

@ -1,4 +1,5 @@
using DS.Module.Core;
using SqlSugar;
namespace DS.WMS.Core.Op.Dtos;
@ -13,14 +14,9 @@ public class SeaExportRes
public long Id { get; set; }
/// <summary>
/// 业务编号
/// 主单Id
/// </summary>
public string BSNO { get; set; }
/// <summary>
/// 主票业务编号
/// </summary>
public string MasterNo { get; set; }
public long ParentId { get; set; }
/// <summary>
/// 业务状态
@ -42,6 +38,14 @@ public class SeaExportRes
/// </summary>
public int FeeStatus { get; set; }
/// <summary>
/// Desc:是否业务锁定
/// </summary>
public bool? IsBusinessLocking { get; set; } = false;
/// <summary>
/// Desc:是否费用锁定
/// </summary>
public bool? IsFeeLocking { get; set; } = false;
/// <summary>
/// 录入日期
/// </summary>
@ -72,6 +76,10 @@ public class SeaExportRes
/// </summary>
public string TransNo { get; set; }
/// <summary>
/// 委托单位Id
/// </summary>
public long CustomerId { get; set; }
/// <summary>
/// 委托单位 t_info_client CUSTNAME
/// </summary>
@ -97,10 +105,15 @@ public class SeaExportRes
/// </summary>
public long? NotifyPartyId { get; set; }
/// <summary>
/// 国外代理人 t_info_client CUSTNAME
/// 国外代理人Id t_info_client CUSTNAME
/// </summary>
public long? AgentId { get; set; }
/// <summary>
/// 国外代理人 t_info_client CUSTNAME
/// </summary>
public string Agent { get; set; }
/// <summary>
/// 发货人内容
@ -122,6 +135,10 @@ public class SeaExportRes
/// </summary>
public string AgentContent { get; set; }
/// <summary>
/// 场站Id t_crm_client CUSTNAME
/// </summary>
public long YardId { get; set; }
/// <summary>
/// 场站 t_crm_client CUSTNAME
/// </summary>
@ -413,35 +430,60 @@ public class SeaExportRes
/// </summary>
public long ForeignCustomerService { get; set; }
/// <summary>
/// 航线
/// 航线Id
/// </summary>
public long LaneId { get; set; }
/// <summary>
/// 航线
/// </summary>
public string Lane { get; set; }
/// <summary>
/// 揽货人Id
/// </summary>
public long SaleId { get; set; }
/// <summary>
/// 揽货人
/// </summary>
public long Sale { get; set; }
public string Sale { get; set; }
/// <summary>
/// 船公司Id
/// </summary>
public long CarrierId { get; set; }
/// <summary>
/// 船公司
/// </summary>
public long Carrier { get; set; }
public string Carrier { get; set; }
/// <summary>
/// 货代公司Id
/// </summary>
public long ForwarderId { get; set; }
/// <summary>
/// 货代公司
/// </summary>
public long Forwarder { get; set; }
public string Forwarder { get; set; }
/// <summary>
/// 报关行Id
/// </summary>
public long CustomserId { get; set; }
/// <summary>
/// 报关行
/// </summary>
public long Customser { get; set; }
public string Customser { get; set; }
/// <summary>
/// 承运车队Id
/// </summary>
public long TruckerId { get; set; }
/// <summary>
/// 承运车队
/// </summary>
public long Trucker { get; set; }
public string Trucker { get; set; }
/// <summary>
@ -638,7 +680,7 @@ public class SeaExportRes
/// <summary>
/// Desc:单证
/// </summary>
public string Doc { get; set; }
public long Doc { get; set; }
/// <summary>
/// Desc:装箱类型
@ -686,6 +728,11 @@ public class SeaExportRes
/// </summary>
public string OrderType { get; set; }
/// <summary>
/// Desc:订舱编号
/// </summary>
public string OrderNo { get; set; }
/// <summary>
/// Desc:操作员代码
/// </summary>
@ -834,6 +881,10 @@ public class SeaExportRes
/// </summary>
public long ShipAgencyId { get; set; }
/// <summary>
/// 船代
/// </summary>
public long ShipAgency { get; set; }
/// <summary>
/// Desc:湿度
/// </summary>

@ -9,18 +9,12 @@ namespace DS.WMS.Core.Op.Entity;
[SqlSugar.SugarTable("op_sea_export", "海运出口表")]
public class SeaExport : BaseOrgModel<long>
{
/// <summary>
/// 业务编号
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "业务编号", IsNullable = false, Length = 100)]
public string BSNO { get; set; }
/// <summary>
/// 主票业务编号
/// 主单Id
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "主票业务编号", IsNullable = false, Length = 100)]
public string MasterNo { get; set; }
[SqlSugar.SugarColumn(ColumnDescription = "主单Id", IsNullable = false,DefaultValue = "0")]
public long ParentId { get; set; }
/// <summary>
/// 业务状态
/// </summary>
@ -45,6 +39,17 @@ public class SeaExport : BaseOrgModel<long>
[SqlSugar.SugarColumn(ColumnDescription = "费用状态", IsNullable = false, DefaultValue = "0")]
public int FeeStatus { get; set; }
/// <summary>
/// Desc:是否业务锁定
/// </summary>
[SugarColumn(ColumnDescription = "是否业务锁定", DefaultValue = "0")]
public bool? IsBusinessLocking { get; set; } = false;
/// <summary>
/// Desc:是否费用锁定
/// </summary>
[SugarColumn(ColumnDescription = "是否费用锁定", DefaultValue = "0")]
public bool? IsFeeLocking { get; set; } = false;
/// <summary>
/// 录入日期
/// </summary>
@ -80,7 +85,11 @@ public class SeaExport : BaseOrgModel<long>
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "运单号", IsNullable = true, Length = 30)]
public string TransNo { get; set; }
/// <summary>
/// 委托单位Id
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "委托单位Id", IsNullable = false, DefaultValue = "0")]
public long CustomerId { get; set; }
/// <summary>
/// 委托单位 t_info_client CUSTNAME
/// </summary>
@ -112,11 +121,15 @@ public class SeaExport : BaseOrgModel<long>
public long? NotifyPartyId { get; set; }
/// <summary>
/// 国外代理人 t_info_client CUSTNAME
/// 国外代理人Id t_info_client CUSTNAME
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "国外代理人", IsNullable = true)]
[SqlSugar.SugarColumn(ColumnDescription = "国外代理人Id", IsNullable = true)]
public long? AgentId { get; set; }
/// <summary>
/// 国外代理人 t_info_client CUSTNAME
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "国外代理人", IsNullable = true, Length = 600)]
public string Agent { get; set; }
/// <summary>
/// 发货人内容
/// </summary>
@ -141,10 +154,15 @@ public class SeaExport : BaseOrgModel<long>
[SqlSugar.SugarColumn(ColumnDescription = "国外代理内容", IsNullable = true, Length = 600)]
public string AgentContent { get; set; }
/// <summary>
/// 场站Id t_crm_client CUSTNAME
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "场站Id", IsNullable = true, DefaultValue ="0")]
public long YardId { get; set; }
/// <summary>
/// 场站 t_crm_client CUSTNAME
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "场站", IsNullable = true, Length = 20)]
[SqlSugar.SugarColumn(ColumnDescription = "场站", IsNullable = true, Length = 100)]
public string Yard { get; set; }
/// <summary>
@ -491,41 +509,68 @@ public class SeaExport : BaseOrgModel<long>
public long ForeignCustomerService { get; set; }
/// <summary>
/// 航线
/// 航线Id
/// </summary>
[SugarColumn(ColumnDescription = "航线", IsNullable = true, DefaultValue = "0")]
[SugarColumn(ColumnDescription = "航线Id", IsNullable = true, DefaultValue = "0")]
public long LaneId { get; set; }
/// <summary>
/// 揽货人
/// 航线
/// </summary>
[SugarColumn(ColumnDescription = "揽货人", IsNullable = true, DefaultValue = "0")]
public long Sale { get; set; }
[SugarColumn(ColumnDescription = "航线", IsNullable = true, Length = 100 )]
public string Lane { get; set; }
/// <summary>
/// 揽货人Id
/// </summary>
[SugarColumn(ColumnDescription = "揽货人Id", IsNullable = true, DefaultValue = "0")]
public long SaleId { get; set; }
/// <summary>
/// 揽货人
/// </summary>
[SugarColumn(ColumnDescription = "揽货人", IsNullable = true, Length = 100)]
public string Sale { get; set; }
/// <summary>
/// 船公司Id
/// </summary>
[SugarColumn(ColumnDescription = "船公司Id", IsNullable = true, DefaultValue = "0")]
public long CarrierId { get; set; }
/// <summary>
/// 船公司
/// </summary>
[SugarColumn(ColumnDescription = "船公司", IsNullable = true, DefaultValue = "0")]
public long Carrier { get; set; }
[SugarColumn(ColumnDescription = "船公司", IsNullable = true, Length = 100)]
public string Carrier { get; set; }
/// <summary>
/// 货代公司Id
/// </summary>
[SugarColumn(ColumnDescription = "货代公司Id", IsNullable = true, DefaultValue = "0")]
public long ForwarderId { get; set; }
/// <summary>
/// 货代公司
/// </summary>
[SugarColumn(ColumnDescription = "货代公司", IsNullable = true, DefaultValue = "0")]
public long Forwarder { get; set; }
[SugarColumn(ColumnDescription = "货代公司", IsNullable = true, Length = 100)]
public string Forwarder { get; set; }
/// <summary>
/// 报关行Id
/// </summary>
[SugarColumn(ColumnDescription = "报关行Id", IsNullable = true, DefaultValue = "0")]
public long CustomserId { get; set; }
/// <summary>
/// 报关行
/// </summary>
[SugarColumn(ColumnDescription = "报关行", IsNullable = true, DefaultValue = "0")]
public long Customser { get; set; }
[SugarColumn(ColumnDescription = "报关行", IsNullable = true, Length = 100)]
public string Customser { get; set; }
/// <summary>
/// 承运车队Id
/// </summary>
[SugarColumn(ColumnDescription = "承运车队Id", IsNullable = true, DefaultValue = "0")]
public long TruckerId { get; set; }
/// <summary>
/// 承运车队
/// </summary>
[SugarColumn(ColumnDescription = "承运车队", IsNullable = true, DefaultValue = "0")]
public long Trucker { get; set; }
[SugarColumn(ColumnDescription = "承运车队", IsNullable = true, Length = 100)]
public string Trucker { get; set; }
/// <summary>
/// 发票号
@ -759,8 +804,8 @@ public class SeaExport : BaseOrgModel<long>
/// <summary>
/// Desc:单证
/// </summary>
[SugarColumn(ColumnDescription = "单证", IsNullable = true, Length = 10)]
public string Doc { get; set; }
[SugarColumn(ColumnDescription = "单证", IsNullable = true, DefaultValue = "0")]
public long Doc { get; set; }
/// <summary>
/// Desc:装箱类型
@ -817,6 +862,12 @@ public class SeaExport : BaseOrgModel<long>
[SugarColumn(ColumnDescription = "委托方式", IsNullable = true, Length = 10)]
public string OrderType { get; set; }
/// <summary>
/// Desc:订舱编号
/// </summary>
[SugarColumn(ColumnDescription = "订舱编号", IsNullable = true, Length = 100)]
public string OrderNo { get; set; }
/// <summary>
/// Desc:操作员代码
/// </summary>
@ -988,6 +1039,11 @@ public class SeaExport : BaseOrgModel<long>
[SugarColumn(ColumnDescription = "报检项目", Length = 20, IsNullable = true)]
public string InsperctService { get; set; }
/// <summary>
/// 船代
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "船代", IsNullable = true,Length = 100)]
public long ShipAgency { get; set; }
/// <summary>
/// 船代Id
/// </summary>

@ -26,4 +26,13 @@ public interface ISeaExportService
/// <param name="id"></param>
/// <returns></returns>
DataResult<SeaExportRes> GetSeaExportInfo(string id);
/// <summary>
/// 批量编辑单据
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
DataResult SeaExportBatchEdit(SeaExportBatchEditReq req);
}

@ -55,9 +55,9 @@ public class SeaExportService:ISeaExportService
if (req.Id == 0)
{
if (tenantDb.Queryable<SeaExport>().Where(x=>x.MasterNo == req.MasterNo.Trim()).Any())
if (tenantDb.Queryable<SeaExport>().Where(x=>x.CustomerNo == req.CustomerNo.Trim()).Any())
{
return DataResult.Failed("客户银行信息已存在!",MultiLanguageConst.SeaExportExist);
return DataResult.Failed("海运出口信息已存在!",MultiLanguageConst.SeaExportExist);
}
var data = req.Adapt<SeaExport>();
@ -90,4 +90,45 @@ public class SeaExportService:ISeaExportService
.First();
return DataResult<SeaExportRes>.Success(data,MultiLanguageConst.DataQuerySuccess);
}
/// <summary>
/// 批量更新
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
public DataResult SeaExportBatchEdit(SeaExportBatchEditReq req)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
if (req.Ids.Count == 0)
{
return DataResult.Failed("海运出口批量编辑未勾选!", MultiLanguageConst.SeaExportBatchEditNoSelect);
}
if (tenantDb.Queryable<SeaExport>().Where(x => !req.Ids.Contains(x.Id)).Any())
{
return DataResult.Failed("不存在的海运出口信息!", MultiLanguageConst.SeaExportExist);
}
if (tenantDb.Queryable<SeaExport>().Where(x => req.Ids.Contains(x.Id)&& x.IsBusinessLocking == true).Any())
{
return DataResult.Failed("海运出口信息业务已锁定!", MultiLanguageConst.SeaExportBusinessLock);
}
if (req.AccountDate.ToString().IsNotNull())
{
if (tenantDb.Queryable<SeaExport>().Where(x => req.Ids.Contains(x.Id) && x.IsFeeLocking == true).Any())
{
return DataResult.Failed("海运出口信息费用已锁定!", MultiLanguageConst.SeaExportFeeLock);
}
}
var orderList = tenantDb.Queryable<SeaExport>().Where(x => req.Ids.Contains(x.Id)).ToList();
var dic = req.GetPropertiesArray();
foreach (var item in orderList)
{
var info = item;
info = req.Adapt(info);
tenantDb.Updateable(info).UpdateColumns(dic).EnableDiffLogEvent().ExecuteCommand();
}
return DataResult.Successed("更新成功!", MultiLanguageConst.DataUpdateSuccess);
}
}

@ -63,4 +63,17 @@ public class SeaExportController : ApiController
var res = _invokeService.GetSeaExportInfo(id);
return res;
}
/// <summary>
/// 批量编辑
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
[HttpPost]
[Route("SeaExportBatchEdit")]
public DataResult SeaExportBatchEdit([FromBody] SeaExportBatchEditReq req)
{
var res = _invokeService.SeaExportBatchEdit(req);
return res;
}
}

@ -10,7 +10,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="9.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="Xunit.DependencyInjection" Version="8.9.1" />

@ -2,8 +2,12 @@ using System.Reflection;
using DS.Module.Core;
using DS.Module.Core.Extensions;
using DS.Module.SqlSugar;
using DS.WMS.Core.Info.Entity;
using DS.WMS.Core.System.Entity;
using Mapster;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Owin.BuilderProperties;
using Org.BouncyCastle.Ocsp;
using SqlSugar;
using SqlSugar.IOC;
using Xunit;
@ -40,7 +44,48 @@ public class SaasTest
// tenantDb.CodeFirst.InitTables(typeof(CodeCountry));
Assert.True(true);
}
[Fact]
public void ClientBatchEdit()
{
var tenantDb = saasService.GetBizDbScopeById("1750335377144680448");
var info = tenantDb.Queryable<InfoClient>().Filter(null,true).Where(x => x.Id == 1772138307266940928).First();
var temp = new ClientTemp
{
Address = "4",
Name = "4",
};
var dic = temp.GetPropertiesArray();
info = temp.Adapt(info);
tenantDb.Updateable(info).UpdateColumns(dic).ExecuteCommand();
Assert.True(true);
}
public class ClientTemp
{
/// <summary>
/// Desc:客户中文名称或描述信息
/// </summary>
public string Description { get; set; }
/// <summary>
/// Desc:客户英文简称
/// </summary>
public string Name { get; set; }
/// <summary>
/// Desc:客户英文全称
/// </summary>
public string EnFullName { get; set; }
/// <summary>
/// Desc:通讯地址
/// </summary>
public string Address { get; set; }
}
}
Loading…
Cancel
Save