wanghaomei 2 years ago
commit 5c2d948f15

@ -876,6 +876,11 @@ namespace Myshipping.Application.Entity
/// </summary> /// </summary>
public string LstShipOrderCompareRltName { get; set; } public string LstShipOrderCompareRltName { get; set; }
/// <summary>
/// 最后下货纸比对方式 MANUAL-手动 AUTO-自动
/// </summary>
public string LstShipOrderCompareMode { get; set; }
/// <summary> /// <summary>
/// 是否占舱 /// 是否占舱
/// </summary> /// </summary>

@ -211,5 +211,10 @@ namespace Myshipping.Application.Entity
/// </summary> /// </summary>
[Description("派车流水号")] [Description("派车流水号")]
public string TruckFlowNo { get; set; } public string TruckFlowNo { get; set; }
/// <summary>
/// 任务流水号
/// </summary>
[Description("任务流水号")]
public string TaskNo { get; set; }
} }
} }

@ -64,6 +64,29 @@ namespace Myshipping.Application
TaskManageOrderResultDto result = new TaskManageOrderResultDto(); TaskManageOrderResultDto result = new TaskManageOrderResultDto();
try try
{
var id = InnerSave(info);
result.succ = true;
result.msg = "保存成功";
result.ext = id;
}
catch (Exception ex)
{
result.succ = false;
result.msg = $"保存派车异常,原因:{ex.Message}";
}
return result;
}
/// <summary>
/// 保存内部方法
/// </summary>
/// <param name="info">派车信息</param>
/// <returns>返回派车Id</returns>
private async Task<long> InnerSave(BookingTruckDto info)
{ {
BookingTruck entity = info.Adapt<BookingTruck>(); BookingTruck entity = info.Adapt<BookingTruck>();
@ -119,17 +142,7 @@ namespace Myshipping.Application
} }
} }
result.succ = true; return entity.Id;
result.msg = "保存成功";
result.ext = entity.Id;
}
catch (Exception ex)
{
result.succ = false;
result.msg = $"保存派车异常,原因:{ex.Message}";
}
return result;
} }
/// <summary> /// <summary>
@ -472,11 +485,19 @@ namespace Myshipping.Application
try try
{ {
var model = InnerCreateTruckFromBookingOrder(bookingId);
result.succ = true;
if (model != null && model.ContaList != null && model.ContaList.Count > 0)
{
result.ext = model.ContaList;
}
} }
catch (Exception ex) catch (Exception ex)
{ {
result.succ = false;
result.msg = $"引入订舱详情生成派车信息异常,原因:{ex.Message}";
} }
return result; return result;
@ -492,9 +513,21 @@ namespace Myshipping.Application
{ {
TaskManageOrderResultDto result = new TaskManageOrderResultDto(); TaskManageOrderResultDto result = new TaskManageOrderResultDto();
/*
1
2
3ID
4
*/
try try
{ {
//先保存
var id = InnerSave(info);
//更新派车订单为已提交
//推送新增派车任务接口
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -514,6 +547,13 @@ namespace Myshipping.Application
{ {
TaskManageOrderResultDto result = new TaskManageOrderResultDto(); TaskManageOrderResultDto result = new TaskManageOrderResultDto();
/*
1
2
3ID
4
*/
try try
{ {
@ -534,6 +574,14 @@ namespace Myshipping.Application
[HttpGet("/BookingTruck/Cancel")] [HttpGet("/BookingTruck/Cancel")]
public async Task<TaskManageOrderResultDto> Cancel(long id) public async Task<TaskManageOrderResultDto> Cancel(long id)
{ {
/*
1
2
3
4
*/
TaskManageOrderResultDto result = new TaskManageOrderResultDto(); TaskManageOrderResultDto result = new TaskManageOrderResultDto();
try try
@ -557,6 +605,13 @@ namespace Myshipping.Application
{ {
TaskManageOrderResultDto result = new TaskManageOrderResultDto(); TaskManageOrderResultDto result = new TaskManageOrderResultDto();
/*
1
2
3
4
*/
try try
{ {

@ -96,5 +96,17 @@ namespace Myshipping.Application
/// 备注 /// 备注
/// </summary> /// </summary>
public string REMARK { get; set; } public string REMARK { get; set; }
/// <summary>
/// 车牌号
/// </summary>
public string CarNumber { get; set; }
/// <summary>
/// 司机
/// </summary>
public string CarDriver { get; set; }
/// <summary>
/// 司机电话
/// </summary>
public string CarDriverTel { get; set; }
} }
} }

@ -361,7 +361,8 @@ namespace Myshipping.Application
it.LstShipOrderCompareId, it.LstShipOrderCompareId,
it.LstShipOrderCompareDate, it.LstShipOrderCompareDate,
it.LstShipOrderCompareRlt, it.LstShipOrderCompareRlt,
it.LstShipOrderCompareRltName it.LstShipOrderCompareRltName,
it.LstShipOrderCompareMode
}).ExecuteCommandAsync(); }).ExecuteCommandAsync();
//记录日志 //记录日志
@ -977,7 +978,8 @@ namespace Myshipping.Application
it.CreatedUserName, it.CreatedUserName,
it.LstShipOrderCompareId, it.LstShipOrderCompareId,
it.LstShipOrderCompareDate, it.LstShipOrderCompareDate,
it.LstShipOrderCompareRltName it.LstShipOrderCompareRltName,
it.LstShipOrderCompareMode
}).ExecuteCommandAsync(); }).ExecuteCommandAsync();
var ctnlist = await _repCtn.AsQueryable().Where(x => x.BILLID == main.Id).Select(x => x.Id).ToListAsync(); var ctnlist = await _repCtn.AsQueryable().Where(x => x.BILLID == main.Id).Select(x => x.Id).ToListAsync();
await _repCtn.DeleteAsync(x => x.BILLID == main.Id); await _repCtn.DeleteAsync(x => x.BILLID == main.Id);

@ -1,4 +1,5 @@
using System; using Myshipping.Core.Service;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
@ -116,5 +117,14 @@ namespace Myshipping.Application
/// <param name="QuerySearch">约号参数台账查询请求</param> /// <param name="QuerySearch">约号参数台账查询请求</param>
/// <returns>返回结果</returns> /// <returns>返回结果</returns>
Task<dynamic> GetParaContractNoPageAsync(QueryParaContractNoDto QuerySearch); Task<dynamic> GetParaContractNoPageAsync(QueryParaContractNoDto QuerySearch);
/// <summary>
/// 检索车队参数
/// </summary>
/// <param name="queryItem">检索值</param>
/// <param name="queryType">检索类型 fleet-车队默认customs_broker-报关行</param>
/// <param name="top">默认最大行数</param>
/// <returns>返回回执</returns>
//Task<List<DjyCustomerDto>> QuerytDjyCustomerInfo(string queryItem, string queryType = "fleet", int top = 10);
} }
} }

@ -135,8 +135,12 @@ namespace Myshipping.Application
if (orderInfo != null) if (orderInfo != null)
{ {
orderInfo.LstShipOrderCompareDate = bDate;
if (compareResult.succ) if (compareResult.succ)
{ {
orderInfo.LstShipOrderCompareMode = "MANUAL";
if (compareResult.extra.IsExistsDiff) if (compareResult.extra.IsExistsDiff)
{ {
orderInfo.LstShipOrderCompareRlt = "DIFF"; orderInfo.LstShipOrderCompareRlt = "DIFF";
@ -147,7 +151,6 @@ namespace Myshipping.Application
orderInfo.LstShipOrderCompareRlt = "NO_DIFF"; orderInfo.LstShipOrderCompareRlt = "NO_DIFF";
orderInfo.LstShipOrderCompareRltName = "正常"; orderInfo.LstShipOrderCompareRltName = "正常";
} }
orderInfo.LstShipOrderCompareDate = bDate;
} }
else else
{ {
@ -165,6 +168,7 @@ namespace Myshipping.Application
it.LstShipOrderCompareDate, it.LstShipOrderCompareDate,
it.LstShipOrderCompareRlt, it.LstShipOrderCompareRlt,
it.LstShipOrderCompareRltName, it.LstShipOrderCompareRltName,
it.LstShipOrderCompareMode,
}).ExecuteCommandAsync(); }).ExecuteCommandAsync();
} }

@ -9922,6 +9922,15 @@
<param name="type">类型参考字典参数客户属性djy_cust_prop</param> <param name="type">类型参考字典参数客户属性djy_cust_prop</param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Myshipping.Core.Service.DjyCustomerService.QuerytDjyCustomerInfo(System.String,System.String[],System.Int32)">
<summary>
检索往来单位(包含车队)
</summary>
<param name="queryItem">检索值</param>
<param name="queryType">检索类型数组(可传多个) fleet-车队customs_broker-报关行</param>
<param name="top">默认最大行数</param>
<returns>返回回执</returns>
</member>
<member name="T:Myshipping.Core.Service.DjyCustomerContactDto"> <member name="T:Myshipping.Core.Service.DjyCustomerContactDto">
<summary> <summary>
订舱客户联系人输出参数 订舱客户联系人输出参数
@ -10772,6 +10781,15 @@
服务项目 服务项目
</summary> </summary>
</member> </member>
<member name="M:Myshipping.Core.Service.IDjyCustomerService.QuerytDjyCustomerInfo(System.String,System.String[],System.Int32)">
<summary>
检索车队参数
</summary>
<param name="queryItem">检索值</param>
<param name="queryType">检索类型数组(可传多个) fleet-车队customs_broker-报关行</param>
<param name="top">默认最大行数</param>
<returns>返回回执</returns>
</member>
<member name="T:Myshipping.Core.Service.DjyDingtalkGroupConfigService"> <member name="T:Myshipping.Core.Service.DjyDingtalkGroupConfigService">
<summary> <summary>
钉钉客服通知群配置服务 钉钉客服通知群配置服务

@ -11,6 +11,9 @@ using System.Collections.Generic;
using Furion.FriendlyException; using Furion.FriendlyException;
using Furion.Logging; using Furion.Logging;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using System;
using System.Text.RegularExpressions;
using NPOI.Util;
namespace Myshipping.Core.Service namespace Myshipping.Core.Service
{ {
@ -203,5 +206,64 @@ namespace Myshipping.Core.Service
return entities.XnPagedResult(); return entities.XnPagedResult();
} }
/// <summary>
/// 检索往来单位(包含车队)
/// </summary>
/// <param name="queryItem">检索值</param>
/// <param name="queryType">检索类型数组(可传多个) fleet-车队customs_broker-报关行</param>
/// <param name="top">默认最大行数</param>
/// <returns>返回回执</returns>
[HttpGet("/DjyCustomer/QuerytDjyCustomerInfo")]
public async Task<List<DjyCustomerOutput>> QuerytDjyCustomerInfo([FromQuery] string queryItem, [FromQuery] string[] queryType, [FromQuery] int top = 10)
{
List<DjyCustomerOutput> list = new List<DjyCustomerOutput>();
try
{
string sqlWhere = "1=1";
if (!string.IsNullOrWhiteSpace(queryItem))
{
sqlWhere += $" and (CodeName like '%{queryItem.Trim()}%' or ShortName like '%{queryItem.Trim()}%' or FullName like '%{queryItem.Trim()}%')";
}
if (queryType.Length > 0)
{
sqlWhere += $" and PropString REGEXP '" + string.Join("|", queryType) + "'";
}
var entityList = await _rep.AsQueryable().Where(sqlWhere).Take(top).OrderBy(a => a.FullName)
.ToListAsync();
if (entityList.Count > 0)
{
list = entityList.Adapt<List<DjyCustomerOutput>>();
var custsArg = list.Select(a => a.Id).ToArray();
var contactList = _repContact.AsQueryable()
.Where(a => custsArg.Contains(a.CustomerId.Value)).ToList();
list = list.GroupJoin(contactList, l => l.Id, r => r.CustomerId.Value, (l, r) =>
{
var curList = r.ToList();
if (curList.Count > 0)
l.Contacts = curList.Adapt<List<DjyCustomerContactOutput>>();
return l;
}).ToList();
}
}
catch (Exception ex)
{
_logger.LogError("检索车队异常请求queryItem={0}queryType={1}top={2} 异常:{3}", queryItem, queryType, top, ex.Message);
throw Oops.Bah("检索车队异常,异常{msg}", ex.Message);
}
return list;
}
} }
} }

@ -15,5 +15,14 @@ namespace Myshipping.Core.Service
Task<DjyCustomerOutput> Detail([FromQuery] GetDjyCustomerInput input); Task<DjyCustomerOutput> Detail([FromQuery] GetDjyCustomerInput input);
//Task<dynamic> List([FromQuery] QueryBookingCustomerInput input); //Task<dynamic> List([FromQuery] QueryBookingCustomerInput input);
Task<List<DjyCustomerContactOutput>> ListContact(long customerId); Task<List<DjyCustomerContactOutput>> ListContact(long customerId);
/// <summary>
/// 检索车队参数
/// </summary>
/// <param name="queryItem">检索值</param>
/// <param name="queryType">检索类型数组(可传多个) fleet-车队customs_broker-报关行</param>
/// <param name="top">默认最大行数</param>
/// <returns>返回回执</returns>
Task<List<DjyCustomerOutput>> QuerytDjyCustomerInfo(string queryItem, string[] queryType, int top = 10);
} }
} }

Loading…
Cancel
Save