cjy 3 months ago
commit 2e9cc49270

@ -165,6 +165,19 @@ public class InfoClientTag : BaseModelV2<long>
/// </summary>
[SugarColumn(ColumnDescription = "是否约主", DefaultValue = "0")]
public bool? IsContract { get; set; } = false;
/// <summary>
/// 是否国内同行
/// </summary>
[SugarColumn(ColumnDescription = "是否国内同行", DefaultValue = "0")]
public bool IsDomesticPeers { get; set; }
/// <summary>
/// 是否国内同行
/// </summary>
[SugarColumn(ColumnDescription = "是否国外同行", DefaultValue = "0")]
public bool IsForeignCounterparts { get; set; }
/// <summary>
/// 机构Id
/// </summary>

@ -0,0 +1,107 @@
@* @model DS.WMS.Core.Op.Entity.MailTemplateModel<DS.WMS.Core.Op.Dtos.SeaExportRes> *@
@{
var item = Model.Primary;
}
<style>
.parent {
position: relative;
height: 300px;
width: 300px;
}
.child {
position: absolute;
bottom: 0;
right: 0;
width: 50px;
height: 50px;
}
.title {
background-color: darkblue;
color: whitesmoke;
font-size: 20px;
font-weight: 300;
}
</style>
<span>*** Auto Email, please reply to all (delete sender Admin)!If only reply to sender, we will not be able to find and deal with it! ***</span>
<br />
Dear @Model.Contacts
<div class="title">
RE: BOOKING - JOB NO.
</div>
请查看附件中的订舱委托请2小时内先行回复订舱号给我们并帮忙催促船东尽快放舱如下信息同订舱委托一致便于您查阅
CARRIER@item.Carrier
S/QXX
ETD : @item.ETD
POL: @item.LoadPort
POD: @item.DischargePort
FPOD: @item.DeliveryPlace
VOL: XX
Commdity: XX取中文品名
HS CODE: @item.HSCode
POD FREE TIME
REMARK
(取供应商备注)
此票订舱我司对接同事的联系方式如下,任何问题请及时跟我们沟通,谢谢!
<table>
<thead>
<tr>
<th>CN Name</th>
<th>Name</th>
<th>Tel No.</th>
<th>Mobile/Wechat/QQ</th>
<th>Email</th>
<th>Position</th>
</tr>
</thead>
<tbody>
<tr>
<td>邵 芳</td>
<td>Candy</td>
<td>0532-80688387</td>
<td>13375570007 2853083550</td>
<td>candy@sunniness.net</td>
<td>Cooperation</td>
</tr>
<tr>
<td>魏涛</td>
<td>Wilson</td>
<td>0532-80688353</td>
<td>13969858993 2853083555</td>
<td>ope@sunniness.net</td>
<td>OP manager</td>
</tr>
<tr>
<td>徐平平</td>
<td>Cathy</td>
<td>0532-80688350</td>
<td>13969662965 2853083551</td>
<td>opg@sunniness.net</td>
<td>Document</td>
</tr>
</tbody>
</table>
<div class="parent">
<div id="sign" class="child">
@* Tks + Brgds
Candy SHAO 邵芳 (此处用当票操作的信息)
General Manager | SUNNINESS LOGISTICS CO.,LTD.
TEL: +86-0532-80688387 |MB./We chat: +86-18866622731|QQ:2853083553 | Email:candy@sunniness.net *@
</div>
</div>
@* 此邮件模板是订舱委托推送的邮件模板,在商务订单审核通过后,自动生成,并推送:
1蓝色是调取系统数据、红色是醒目提醒
2订舱委托PDF格式作为附件一起发出
3邮件发给订舱代理联系人抄送我司销售/客服和操作/单证;未勾选推送的订舱代理,仅推送我司干系人! *@

@ -117,8 +117,10 @@ public interface IClientCommonService
/// <summary>
/// 获取所有往来单位下拉列表
/// </summary>
/// <param name="id"></param>
/// <param name="type"></param>
/// <returns></returns>
public DataResult<List<ClientSelectRes>> GetAllClientList();
public DataResult<List<ClientSelectRes>> GetAllClientList(long? id = null, string? type = null);
/// <summary>
/// 获取船公司下拉列表
/// </summary>

@ -57,7 +57,7 @@ public class ClientCommonService : IClientCommonService
/// 获取航线操作员列表
/// </summary>
/// <returns></returns>
public async Task<DataResult<List<UserSelectRes>>> GetLaneUserList(string queryKey = "")
public async Task<DataResult<List<UserSelectRes>>> GetLaneUserList(string queryKey = "")
{
var data = await db.Queryable<SysUser>()
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt() && a.IsLaner == true)
@ -83,7 +83,7 @@ public class ClientCommonService : IClientCommonService
{
Id = a.Id,
PinYinCode = a.ShortName + "(" + a.CodeName + ")"
},true
}, true
).Take(20).WithCache($"{SqlSugarCacheConst.InfoClient}{user.TenantId}").ToListAsync();
return await Task.FromResult(DataResult<List<ControllerClientRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess));
}
@ -91,15 +91,16 @@ public class ClientCommonService : IClientCommonService
/// 获取船公司下拉列表
/// </summary>
/// <returns></returns>
public async Task<DataResult<List<CodeCarrierRes>>> GetCarrierSelectList(string queryKey = "") {
public async Task<DataResult<List<CodeCarrierRes>>> GetCarrierSelectList(string queryKey = "")
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var list = await tenantDb.Queryable<CodeCarrier>()
.WhereIF(!string.IsNullOrEmpty(queryKey), a => a.Code.Contains(queryKey) || a.CnName.Contains(queryKey))
.Select(a => new CodeCarrierRes()
{
PinYinCode = a.CnName + "(" + a.Code + ")",
},
{
PinYinCode = a.CnName + "(" + a.Code + ")",
},
true)
.Take(20)
.WithCache($"{SqlSugarCacheConst.Carrier}{user.TenantId}")
@ -128,10 +129,10 @@ public class ClientCommonService : IClientCommonService
/// 获取商品下拉列表-客户端
/// </summary>
/// <returns></returns>
public async Task<DataResult<List<CodeGoodsSelectRes>>> GetClientGoodsList(string queryKey ="")
public async Task<DataResult<List<CodeGoodsSelectRes>>> GetClientGoodsList(string queryKey = "")
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var list = await tenantDb.Queryable<CodeGoods>().Where(a=> a.Status == StatusEnum.Enable)
var list = await tenantDb.Queryable<CodeGoods>().Where(a => a.Status == StatusEnum.Enable)
.WhereIF(!string.IsNullOrEmpty(queryKey), a => a.GoodsCode.Contains(queryKey) || a.GoodName.Contains(queryKey))
.Select(a => new CodeGoodsSelectRes()
{
@ -234,7 +235,7 @@ public class ClientCommonService : IClientCommonService
var dictvalue = db.Queryable<SysDictData>().InnerJoin<SysDictType>((a, b) => a.TypeId == b.Id)
.Where((a, b) => b.Code == "fee_unit").Select((a, b) => a.Value).ToList();
if (dictvalue.Where(x=>x ==req.Code).Any())
if (dictvalue.Where(x => x == req.Code).Any())
{
var data = GetSeaExportUnit(info, req.Code);
return DataResult<UnitSelectInfoRes>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
@ -290,7 +291,7 @@ public class ClientCommonService : IClientCommonService
data.Quantity = seaExport.PKGS;
break;
case "JF"://计费吨
data.Quantity = seaExport.KGS/1000> seaExport.CBM? seaExport.KGS/1000: seaExport.CBM;
data.Quantity = seaExport.KGS / 1000 > seaExport.CBM ? seaExport.KGS / 1000 : seaExport.CBM;
break;
//默认
default:
@ -355,7 +356,7 @@ public class ClientCommonService : IClientCommonService
return DataResult<ClientSelectInfoRes>.Failed("业务信息不存在!");
}
var data = GetSeaExportClientInfo(info,code);
var data = GetSeaExportClientInfo(info, code);
data.ClientList = list;
return DataResult<ClientSelectInfoRes>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
}
@ -1134,7 +1135,7 @@ public class ClientCommonService : IClientCommonService
/// 根据类型获取往来单位下拉列表
/// </summary>
/// <returns></returns>
public async Task<DataResult<List<ClientSelectRes>>> GetClientListByCode(string code,string queryKey ="")
public async Task<DataResult<List<ClientSelectRes>>> GetClientListByCode(string code, string queryKey = "")
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
@ -1176,24 +1177,41 @@ public class ClientCommonService : IClientCommonService
).Take(20).WithCache($"{SqlSugarCacheConst.InfoClient}{user.TenantId}").ToListAsync();
return await Task.FromResult(DataResult<List<ClientSelectRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess));
}
/// <summary>
/// 获取所有往来单位下拉列表
/// </summary>
/// <param name="id"></param>
/// <param name="type"></param>
/// <returns></returns>
public DataResult<List<ClientSelectRes>> GetAllClientList()
public DataResult<List<ClientSelectRes>> GetAllClientList(long? id = null, string? type = null)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var data = tenantDb.Queryable<InfoClient>()
.InnerJoin<InfoClientTag>((a, b) => a.Id == b.ClientId)
.Where((a, b) => a.Status == StatusEnum.Enable.ToEnumInt())
.Select((a, b) => new ClientSelectRes
List<IConditionalModel> conditions = [];
if (!string.IsNullOrEmpty(type))
{
conditions.Add(new ConditionalModel
{
FieldName = "b.Is" + type.ToUpperCamelCase(),
FieldValue = "1",
CSharpTypeName = "int",
ConditionalType = ConditionalType.Equal
});
}
var data = tenantDb.Queryable<InfoClient>().InnerJoin<InfoClientTag>((a, b) => a.Id == b.ClientId)
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt())
.Where(conditions)
.WhereIF(id.GetValueOrDefault() > 0, a => a.Id != id)
.Select(a => new ClientSelectRes
{
Id = a.Id,
CodeName = a.CodeName,
ShortName = a.ShortName,
EnShortName = a.EnShortName
}
).ToList();
}).ToList();
return DataResult<List<ClientSelectRes>>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess);
}
/// <summary>
@ -1645,7 +1663,7 @@ public class ClientCommonService : IClientCommonService
/// 获取包装类型下拉列表
/// </summary>
/// <returns></returns>
public DataResult<List<CodePackageSelectRes>> GetPackageSelectList(string queryKey ="")
public DataResult<List<CodePackageSelectRes>> GetPackageSelectList(string queryKey = "")
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var data = tenantDb.Queryable<CodePackage>()
@ -1735,7 +1753,7 @@ public class ClientCommonService : IClientCommonService
/// 获取单证员列表
/// </summary>
/// <returns></returns>
public DataResult<List<UserSelectRes>> GetVouchingClerkList(string queryKey ="")
public DataResult<List<UserSelectRes>> GetVouchingClerkList(string queryKey = "")
{
var data = db.Queryable<SysUser>()
.Where(a => a.Status == StatusEnum.Enable.ToEnumInt() && a.IsVouchingClerk == true)
@ -1852,7 +1870,7 @@ public class ClientCommonService : IClientCommonService
public DataResult<SysQuerySet> GetUserQuerySet(string permissionId, int tagNo = 0)
{
var info = db.Queryable<SysQuerySet>()
.Where(x => x.UserId == long.Parse(user.UserId) && x.PermissionId == long.Parse(permissionId)&& x.TagNo == tagNo).First();
.Where(x => x.UserId == long.Parse(user.UserId) && x.PermissionId == long.Parse(permissionId) && x.TagNo == tagNo).First();
return DataResult<SysQuerySet>.Success(info);
}

@ -1,5 +1,4 @@
using DS.Module.Core;
using DS.Module.Core.Extensions;
using DS.WMS.Core.Code.Dtos;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Info.Dtos;
@ -7,9 +6,7 @@ using DS.WMS.Core.Op.Dtos;
using DS.WMS.Core.Sys.Dtos;
using DS.WMS.Core.Sys.Entity;
using DS.WMS.Core.Sys.Interface;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;
namespace DS.WMS.MainApi.Controllers;
@ -180,6 +177,7 @@ public class ClientCommonController : ApiController
var res = _invokeService.GetClientSelectInfoByCode(req);
return res;
}
/// <summary>
/// 获取往来单位下拉集合列表
/// </summary>
@ -191,6 +189,7 @@ public class ClientCommonController : ApiController
var res = await _invokeService.GetMultiClientList();
return res;
}
/// <summary>
/// 提取汇率信息 先提取CodeConfig 参数ExchangeRateType(ETD\AccountDate\CreateTime) 再提取SysConfig配置最后默认取业务订单ETD
/// </summary>
@ -255,7 +254,7 @@ public class ClientCommonController : ApiController
/// <returns></returns>
[HttpGet]
[Route("GetClientListByCode")]
public async Task<DataResult<List<ClientSelectRes>>> GetClientListByCode([FromQuery]string code, string queryKey = "")
public async Task<DataResult<List<ClientSelectRes>>> GetClientListByCode([FromQuery] string code, string queryKey = "")
{
var res = await _invokeService.GetClientListByCode(code, queryKey);
return res;
@ -263,12 +262,13 @@ public class ClientCommonController : ApiController
/// <summary>
/// 获取所有往来单位下拉列表
/// </summary>
/// <param name="id">当前往来单位的ID可空</param>
/// <param name="type">类型字符串(与系统配置保持一致,可空)</param>
/// <returns></returns>
[HttpGet]
[Route("GetAllClientList")]
public DataResult<List<ClientSelectRes>> GetAllClientList()
[HttpGet, Route("GetAllClientList")]
public DataResult<List<ClientSelectRes>> GetAllClientList([FromQuery] long? id = null, [FromQuery] string? type = null)
{
var res = _invokeService.GetAllClientList();
var res = _invokeService.GetAllClientList(id, type);
return res;
}
/// <summary>
@ -620,7 +620,7 @@ public class ClientCommonController : ApiController
/// <returns></returns>
[HttpGet]
[Route("GetPackageSelectList")]
public DataResult<List<CodePackageSelectRes>> GetPackageSelectList([FromQuery]string queryKey = "")
public DataResult<List<CodePackageSelectRes>> GetPackageSelectList([FromQuery] string queryKey = "")
{
var res = _invokeService.GetPackageSelectList(queryKey);
return res;

Loading…
Cancel
Save