You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
302 lines
8.3 KiB
C#
302 lines
8.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using FreeSql.DataAnnotations;
|
|
using Ys.Core.Common;
|
|
namespace djy.Paas.Model
|
|
{
|
|
/// <summary>
|
|
/// 提箱小票单
|
|
/// </summary>
|
|
public class tb_txxp_BillOrderList : DataBase
|
|
{
|
|
|
|
/// <summary>
|
|
/// 发货单ID 提箱小票打印时依赖此ID
|
|
/// </summary>
|
|
///
|
|
|
|
public string billOrderId { get; set; }
|
|
|
|
/// <summary>
|
|
/// 提单号
|
|
/// </summary>
|
|
public string SendOrderCode { get; set; }
|
|
/// <summary>
|
|
/// 客户名称
|
|
/// </summary>
|
|
public string CustomerName { get; set; }
|
|
/// <summary>
|
|
/// 客户Id
|
|
/// </summary>
|
|
public string CustomerId { get; set; }
|
|
/// <summary>
|
|
/// UserID 大简云内userid
|
|
/// </summary>
|
|
[Column(IsNullable = true)]
|
|
public string UserId { get; set; }
|
|
/// <summary>
|
|
/// 订舱代理名称
|
|
/// </summary>
|
|
public string AgentName { get; set; }
|
|
|
|
/// <summary>
|
|
/// 订舱代理code
|
|
/// </summary>
|
|
public string AgentCode { get; set; }
|
|
/// <summary>
|
|
/// 船务公司代码
|
|
/// </summary>
|
|
public string CarrierCode { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
/// 船务公司名称
|
|
/// </summary>
|
|
public string CarrierName { get; set; }
|
|
|
|
/// <summary>
|
|
/// 归属企业公司ID
|
|
/// </summary>
|
|
public Guid? CompayId { get; set; }
|
|
/// <summary>
|
|
/// UserName 用户账户
|
|
/// </summary>
|
|
public string UserName { get; set; }
|
|
/// <summary>
|
|
/// userpasword 用户密码
|
|
/// </summary>
|
|
public string UserPassword { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
/// 平台用户名 比如意通网站
|
|
/// </summary>
|
|
public string SysLoginName { get; set; }
|
|
/// <summary>
|
|
/// 平台密码 比如意通网站
|
|
/// </summary>
|
|
public string SysPsssword { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
/// 操作员
|
|
/// </summary>
|
|
public string OperatorName { get; set; }
|
|
/// <summary>
|
|
/// 场站编码
|
|
/// </summary>
|
|
public string DepotCode { get; set; }
|
|
/// <summary>
|
|
/// 场站名称
|
|
/// </summary>
|
|
public string DepotName { get; set; }
|
|
/// <summary>
|
|
/// 联系人
|
|
/// </summary>
|
|
public string LinkName { get; set; }
|
|
/// <summary>
|
|
/// 联系人信息
|
|
/// </summary>
|
|
public string LinkMobile { get; set; }
|
|
/// <summary>
|
|
/// 备注
|
|
/// </summary>
|
|
public string Memo { get; set; }
|
|
/// <summary>
|
|
/// 订单箱子类型和数量
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public List<BoxInfoDto> BoxInfo
|
|
{
|
|
set
|
|
{
|
|
if (value.Count > 0)
|
|
{
|
|
var boxstr = "";
|
|
foreach (var item in value)
|
|
{
|
|
|
|
if (boxstr.IsNull()) { boxstr = item.BoxType + "*" + item.BoxCount.ToString(); }
|
|
else
|
|
{
|
|
boxstr += "," + item.BoxType + "*" + item.BoxCount.ToString();
|
|
}
|
|
}
|
|
|
|
BoxInfoStr = boxstr;
|
|
}
|
|
}
|
|
|
|
get
|
|
{
|
|
var list = new List<BoxInfoDto>();
|
|
if (BoxInfoStr.IsNotNull())
|
|
{
|
|
foreach (var item in BoxInfoStr.Split(','))
|
|
{
|
|
var tem = item.Split('*');
|
|
if (tem.Length == 2)
|
|
{
|
|
list.Add(new BoxInfoDto { BoxType = tem[0], BoxCount = int.Parse(tem[1]) });
|
|
}
|
|
}
|
|
}
|
|
return list;
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 提单箱型箱量
|
|
/// </summary>
|
|
[Column(StringLength = 500)]
|
|
public string BoxInfoStr { get; set; }
|
|
/// <summary>
|
|
///接收的Email
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public string Email { get; set; }
|
|
/// <summary>
|
|
/// 附属接受条件 日志ID
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public string LogsId { get; set; }
|
|
/// <summary>
|
|
/// 来源系统code编码
|
|
/// </summary>
|
|
public string SystemCode { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
/// 船名
|
|
/// </summary>
|
|
public string ShipName { get; set; }
|
|
/// <summary>
|
|
/// 航次
|
|
/// </summary>
|
|
public string VoyNo { get; set; }
|
|
|
|
/// <summary>
|
|
/// 截港时间
|
|
/// </summary>
|
|
public long EtdTime { get; set; }
|
|
/// <summary>
|
|
/// 卸货港
|
|
/// </summary>
|
|
public string Portdischarge { get; set; }
|
|
/// <summary>
|
|
///卸货港code编码
|
|
/// </summary>
|
|
[Column(StringLength = 50)]
|
|
public string portdischargeCode { get; set; }
|
|
|
|
/// <summary>
|
|
/// 打印回写回调的通知url地址
|
|
/// </summary>
|
|
[Column(StringLength = 500)]
|
|
public string ReturnUrl { get; set; }
|
|
/// <summary>
|
|
/// 打印链接
|
|
/// </summary>
|
|
public string PrintUrl { get; set; }
|
|
/// <summary>
|
|
/// 扣费状态
|
|
/// </summary>
|
|
public int PayStatus { get; set; }
|
|
|
|
/// <summary>
|
|
/// 打印成功次数
|
|
/// </summary>
|
|
public long printOkCount { get; set; }
|
|
|
|
|
|
/// <summary>
|
|
/// 总的成功打印箱量
|
|
/// </summary>
|
|
public int printOkCountTotal { get; set; }
|
|
|
|
/// <summary>
|
|
/// 打印次数
|
|
/// </summary>
|
|
[Column(IsIgnore =true)]
|
|
public long printCount { get; set; }
|
|
|
|
/// <summary>
|
|
/// 提箱量
|
|
/// </summary>
|
|
public int BoxCount { get; set; }
|
|
|
|
/// <summary>
|
|
/// 是否自动刷小票
|
|
/// </summary>
|
|
public bool IsAuto { get; set; }
|
|
|
|
/// <summary>
|
|
/// 自动刷小票开始时间
|
|
/// </summary>
|
|
public DateTime? AutoTime { get; set; }
|
|
|
|
/// <summary>
|
|
/// 结束时间(小时)
|
|
/// </summary>
|
|
public int AutoFinish { get; set; }
|
|
|
|
|
|
#region 20220124 新增的锁定规则
|
|
|
|
/// <summary>
|
|
///已经打印成功的统计数据 用于验证是否锁定
|
|
/// </summary>
|
|
[Column(StringLength = 1000)]
|
|
public string PrintTotalInfoJson { get; set; }
|
|
/// <summary>
|
|
/// 获取序列化已打印的提箱数据List
|
|
/// </summary>
|
|
[Column(IsIgnore = true)]
|
|
public List<BoxInfoDto> PrintTotalInfo
|
|
{
|
|
get
|
|
{
|
|
|
|
var list = new List<BoxInfoDto>();
|
|
if (PrintTotalInfoJson.IsNotNull())
|
|
{
|
|
foreach (var item in PrintTotalInfoJson.Split(','))
|
|
{
|
|
var tem = item.Split('*');
|
|
if (tem.Length == 2)
|
|
{
|
|
list.Add(new BoxInfoDto { BoxType = tem[0], BoxCount = int.Parse(tem[1]) });
|
|
}
|
|
}
|
|
}
|
|
return list;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取是否锁定状态
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
[Column(IsIgnore = true)]
|
|
public bool GetIsLock
|
|
{
|
|
get
|
|
{
|
|
var _pboxinfolist = PrintTotalInfo;
|
|
var _boxinfolist = BoxInfo.GroupBy(x => x.BoxType).Select(x => new BoxInfoDto { BoxType = x.Key, BoxCount = x.Sum(s => s.BoxCount) }).ToList();
|
|
foreach (var box in _boxinfolist)
|
|
{
|
|
var pbox = _pboxinfolist.Where(w => w.BoxType == box.BoxType).FirstOrDefault();
|
|
if (pbox == null || box.BoxCount > pbox.BoxCount)
|
|
return false;
|
|
|
|
}
|
|
return true;
|
|
}
|
|
}
|
|
#endregion
|
|
}
|
|
}
|