cjy 3 months ago
commit 2e9cc49270

@ -165,6 +165,19 @@ public class InfoClientTag : BaseModelV2<long>
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "是否约主", DefaultValue = "0")] [SugarColumn(ColumnDescription = "是否约主", DefaultValue = "0")]
public bool? IsContract { get; set; } = false; 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> /// <summary>
/// 机构Id /// 机构Id
/// </summary> /// </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>
/// 获取所有往来单位下拉列表 /// 获取所有往来单位下拉列表
/// </summary> /// </summary>
/// <param name="id"></param>
/// <param name="type"></param>
/// <returns></returns> /// <returns></returns>
public DataResult<List<ClientSelectRes>> GetAllClientList(); public DataResult<List<ClientSelectRes>> GetAllClientList(long? id = null, string? type = null);
/// <summary> /// <summary>
/// 获取船公司下拉列表 /// 获取船公司下拉列表
/// </summary> /// </summary>

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

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

Loading…
Cancel
Save