wet 1 year ago
commit e4c546de68

@ -0,0 +1,192 @@
using System;
using SqlSugar;
using System.ComponentModel;
using Myshipping.Core.Entity;
namespace Myshipping.Application.Entity
{
/// <summary>
/// 客户订舱
/// </summary>
[SugarTable("booking_customer_order")]
[Description("客户订舱")]
public class BookingCustomerOrder : DBEntityTenant
{
/// <summary>
/// 业务状态
/// </summary>
public string BSSTATUS { get; set; }
/// <summary>
/// 业务日期
/// </summary>
public DateTime? BSDATE { get; set; }
/// <summary>
/// 系统编号
/// </summary>
public string BOOKINGNO { get; set; }
/// <summary>
/// 船名
/// </summary>
public string VESSEL { get; set; }
/// <summary>
/// 海关航次
/// </summary>
public string VOYNO { get; set; }
/// <summary>
/// 内部航次
/// </summary>
public string VOYNOINNER { get; set; }
/// <summary>
/// 场站代码
/// </summary>
public string YARDID { get; set; }
/// <summary>
/// 场站
/// </summary>
public string YARD { get; set; }
/// <summary>
/// 开船日期
/// </summary>
public DateTime? ETD { get; set; }
/// <summary>
/// 合约号
/// </summary>
public string CONTRACTNO { get; set; }
/// <summary>
/// 发货人
/// </summary>
public string SHIPPER { get; set; }
/// <summary>
/// 收货人
/// </summary>
public string CONSIGNEE { get; set; }
/// <summary>
/// 通知人
/// </summary>
public string NOTIFYPARTY { get; set; }
/// <summary>
/// 第二通知人
/// </summary>
public string NOTIFYPARTY2 { get; set; }
/// <summary>
/// 起运港代码
/// </summary>
public string PORTLOADID { get; set; }
/// <summary>
/// 起运港
/// </summary>
public string PORTLOAD { get; set; }
/// <summary>
/// 卸货港代码
/// </summary>
public string PORTDISCHARGEID { get; set; }
/// <summary>
/// 卸货港
/// </summary>
public string PORTDISCHARGE { get; set; }
/// <summary>
/// 运输条款
/// </summary>
public string SERVICE { get; set; }
/// <summary>
/// 付费方式
/// </summary>
public string BLFRT { get; set; }
/// <summary>
/// HS代码
/// </summary>
public string HSCODE { get; set; }
/// <summary>
/// 货描
/// </summary>
public string DESCRIPTION { get; set; }
/// <summary>
/// 件数
/// </summary>
public int? PKGS { get; set; }
/// <summary>
/// 包装
/// </summary>
public string KINDPKGS { get; set; }
/// <summary>
/// 毛重
/// </summary>
public decimal? KGS { get; set; }
/// <summary>
/// 尺码
/// </summary>
public decimal? CBM { get; set; }
/// <summary>
/// 件数大写
/// </summary>
public string TOTALNO { get; set; }
/// <summary>
/// 集装箱
/// </summary>
public string CNTRTOTAL { get; set; }
/// <summary>
/// 船公司代号
/// </summary>
public string CARRIERID { get; set; }
/// <summary>
/// 船公司
/// </summary>
public string CARRIER { get; set; }
/// <summary>
/// 货物标识
/// </summary>
public string CARGOID { get; set; }
/// <summary>
/// 危险品类别
/// </summary>
public string DCLASS { get; set; }
/// <summary>
/// 危险品编号
/// </summary>
public string DUNNO { get; set; }
/// <summary>
/// 危险品页号
/// </summary>
public string DPAGE { get; set; }
/// <summary>
/// 危险品标签
/// </summary>
public string DLABEL { get; set; }
/// <summary>
/// 危险品联系人
/// </summary>
public string LINKMAN { get; set; }
/// <summary>
/// 温度单位
/// </summary>
public string TEMPID { get; set; }
/// <summary>
/// 设置温度
/// </summary>
public string TEMPSET { get; set; }
/// <summary>
/// 通风度
/// </summary>
public string REEFERF { get; set; }
/// <summary>
/// 湿度
/// </summary>
public string HUMIDITY { get; set; }
/// <summary>
/// 最低温度
/// </summary>
public string TEMPMIN { get; set; }
/// <summary>
/// 最高温度
/// </summary>
public string TEMPMAX { get; set; }
/// <summary>
/// SO备注
/// </summary>
public string SOREMARK { get; set; }
/// <summary>
/// 租户名称
/// </summary>
public string TenantName { get; set; }
}
}

@ -0,0 +1,301 @@
using Furion;
using Furion.DependencyInjection;
using Furion.DynamicApiController;
using Furion.FriendlyException;
using Mapster;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Myshipping.Application.ConfigOption;
using Myshipping.Application.Entity;
using Myshipping.Core;
using Myshipping.Core.Service;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;
using Yitter.IdGenerator;
namespace Myshipping.Application
{
/// <summary>
/// 客户订舱
/// </summary>
[ApiDescriptionSettings("Application", Name = "BookingCustomerOrder", Order = 1)]
public class BookingCustomerOrderService : IDynamicApiController, ITransient
{
private readonly SqlSugarRepository<BookingCustomerOrder> _rep;
private readonly SqlSugarRepository<BookingCtn> _repCtn;
private readonly ILogger<BookingOrderService> _logger;
private readonly ISysCacheService _cache;
private readonly SqlSugarRepository<BookingFile> _repFile;
private readonly SqlSugarRepository<BookingStatusLog> _repStatuslog;
public BookingCustomerOrderService(SqlSugarRepository<BookingCustomerOrder> rep, SqlSugarRepository<BookingCtn> repCtn,
ILogger<BookingOrderService> logger, ISysCacheService cache, SqlSugarRepository<BookingFile> repFile, SqlSugarRepository<BookingStatusLog> statuslog)
{
this._logger = logger;
this._rep = rep;
this._repCtn = repCtn;
this._cache = cache;
this._repFile = repFile;
this._repStatuslog = statuslog;
}
//查询台账
[HttpPost("/BookingCustomerOrder/PageData")]
public async Task<SqlSugarPagedList<BookingCustomerOrderListOutput>> PageData(BookingCustomerOrderQueryInput input)
{
var query = _rep.AsQueryable();
var entities = await query.ToPagedListAsync(input.PageNo, input.PageSize);
var list = entities.Adapt<SqlSugarPagedList<BookingCustomerOrderListOutput>>();
return list;
}
/// <summary>
/// 保存数据
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("/BookingCustomerOrder/Save")]
public async Task<BookingCustomerOrderSaveOutput> Save(BookingCustomerOrderSaveInput input)
{
if (input == null)
{
throw Oops.Bah("请传入正常数据!");
}
var ms = JsonUtil.TrimFields(input);
if (!string.IsNullOrEmpty(ms))
{
throw Oops.Bah(ms);
}
BookingCustomerOrder entity = null;
List<BookingCtn> ctnList = new List<BookingCtn>();
if (input.Id == 0)
{
entity = input.Adapt<BookingCustomerOrder>();
if (string.IsNullOrEmpty(entity.VOYNO))
{
entity.VOYNO = entity.VOYNOINNER;
}
entity.BSSTATUS = "已录入";
entity.BOOKINGNO = $"BK{YitIdHelper.NextId()}";
await _rep.InsertAsync(entity);
}
else
{
entity = await _rep.AsQueryable().Filter(null, true).FirstAsync(x => x.Id == input.Id);
if (entity.BSSTATUS != "已录入" || entity.BSSTATUS != "已驳回")
{
throw Oops.Bah("当前状态不允许修改");
}
if (string.IsNullOrEmpty(entity.VOYNO))
{
entity.VOYNO = entity.VOYNOINNER;
}
entity = input.Adapt(entity);
await _rep.UpdateAsync(entity);
await _repCtn.DeleteAsync(x => x.BILLID == input.Id);
}
//箱信息保存
if (input.CtnList != null)
{
foreach (var item in input.CtnList)
{
var ctnentity = item.Adapt<BookingCtn>();
ctnentity.BILLID = entity.Id;
await _repCtn.InsertAsync(ctnentity);
ctnList.Add(ctnentity);
}
}
//文件
var dbFiles = _repFile.AsQueryable().Where(x => x.BookingId == entity.Id).ToList();
var opt = App.GetOptions<BookingAttachOptions>();
var dirAbs = string.Empty;
if (string.IsNullOrEmpty(opt.basePath))
{
dirAbs = Path.Combine(App.WebHostEnvironment.WebRootPath, opt.relativePath);
}
else
{
dirAbs = Path.Combine(opt.basePath, opt.relativePath);
}
if (!Directory.Exists(dirAbs))
Directory.CreateDirectory(dirAbs);
//临时文件转为正式文件
if (input.TempFileNames != null && input.TempFileNames.Count() > 0)
{
var optTempFile = App.GetOptions<TempFileOptions>().Path;
foreach (var tmpFile in input.TempFileNames)
{
var tempPath = Path.Combine(optTempFile, tmpFile);
if (File.Exists(tempPath))
{
var saveFileName = $"{DateTime.Now.Ticks}{Path.GetExtension(tmpFile)}";
var fileRelaPath = Path.Combine(opt.relativePath, saveFileName).ToLower();
var fileAbsPath = Path.Combine(dirAbs, saveFileName).ToLower();
File.Copy(tempPath, fileAbsPath, true);
var newFile = new BookingFile
{
Id = YitIdHelper.NextId(),
FileName = Path.GetFileName(tmpFile),
FilePath = fileRelaPath,
TypeCode = "tuodan",
TypeName = "托单文件",
BookingId = entity.Id,
};
await _repFile.InsertAsync(newFile);
}
}
}
//清除前端已删除的文件
if (input.Files != null && input.Files.Count() > 0)
{
var delIds = dbFiles.Where(x => !input.Files.Contains(x.Id)).Select(x => x.Id);
await _repFile.DeleteAsync(x => delIds.Contains(x.Id));
}
else
{
await _repFile.DeleteAsync(x => x.BookingId == entity.Id);
}
//日志动态
var staLog = new BookingStatusLog();
staLog.Status = input.Id == 0 ? "已录入" : "已修改";
staLog.CreatedUserId = UserManager.UserId;
staLog.CreatedUserName = UserManager.Name;
staLog.CreatedTime = DateTime.Now;
staLog.OpTime = DateTime.Now;
staLog.BookingId = entity.Id;
_repStatuslog.Insert(staLog);
var outModel = entity.Adapt<BookingCustomerOrderSaveOutput>();
outModel.CtnList = ctnList.Adapt<List<BookingCustomerCtnDto>>();
var dicFile = new Dictionary<long, string>();
_repFile.AsQueryable().Where(x => x.BookingId == entity.Id).ForEach(x => dicFile.Add(x.Id, x.FileName));
outModel.Files = dicFile;
outModel.LogList = _repStatuslog.AsQueryable().Where(x => x.BookingId == entity.Id).ToList().Adapt<List<BookingCustomerLogDto>>();
return outModel;
}
/// <summary>
/// 获取详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpPost("/BookingCustomerOrder/Get")]
public async Task<BookingCustomerOrderSaveOutput> Get(long id)
{
var entity = await _rep.AsQueryable().Filter(null, true).FirstAsync(x => x.Id == id);
var outModel = entity.Adapt<BookingCustomerOrderSaveOutput>();
outModel.CtnList = _repCtn.Where(x => x.BILLID == id).Adapt<List<BookingCustomerCtnDto>>();
var dicFile = new Dictionary<long, string>();
_repFile.AsQueryable().Where(x => x.BookingId == entity.Id).ForEach(x => dicFile.Add(x.Id, x.FileName));
outModel.Files = dicFile;
outModel.LogList = _repStatuslog.AsQueryable().Where(x => x.BookingId == entity.Id).ToList().Adapt<List<BookingCustomerLogDto>>();
return outModel;
}
/// <summary>
/// 上传临时文件
/// </summary>
/// <param name="file"></param>
/// <returns></returns>
[HttpPost("/BookingCustomerOrder/UploadTempFile")]
public async Task<string> UploadTempFile(IFormFile file)
{
//未上传文件
if (file == null || file.Length == 0)
{
throw Oops.Bah("未上传任何文件");
}
var optTempFile = App.GetOptions<TempFileOptions>().Path;
var tempFilePath = $"{DateTime.Now.Ticks}"; //临时存放目录
var tempSavePath = Path.Combine(optTempFile, tempFilePath);
Directory.CreateDirectory(tempSavePath);
var fileFullPath = Path.Combine(tempSavePath, file.FileName);//服务器路径
using (var stream = File.Create(fileFullPath))
{
await file.CopyToAsync(stream);
}
return Path.Combine(tempFilePath, file.FileName);
}
/// <summary>
/// 下载查看上传的文件
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet("/BookingCustomerOrder/GetFile"), AllowAnonymous]
public async Task<IActionResult> GetFile(long id)
{
var savedFile = await _repFile.AsQueryable().Filter(null, true).FirstAsync(u => u.Id == id);
if (savedFile == null)
{
throw Oops.Oh("文件不存在");
}
var opt = App.GetOptions<BookingAttachOptions>();
var dirAbs = opt.basePath;
if (string.IsNullOrEmpty(dirAbs))
{
dirAbs = App.WebHostEnvironment.WebRootPath;
}
var fileFullPath = Path.Combine(dirAbs, savedFile.FilePath);
if (!File.Exists(fileFullPath))
{
throw Oops.Oh("文件不存在");
}
var fileName = HttpUtility.UrlEncode(savedFile.FileName, Encoding.GetEncoding("UTF-8"));
var result = new FileStreamResult(new FileStream(fileFullPath, FileMode.Open), "application/octet-stream") { FileDownloadName = fileName };
return result;
}
/// <summary>
/// 提交订舱
/// </summary>
/// <returns></returns>
[HttpPost("/BookingCustomerOrder/Submit")]
public async Task Submit()
{
}
}
}

@ -0,0 +1,282 @@
using Myshipping.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
public class BookingCustomerOrderQueryInput : PageInputBase
{
}
//dto
public class BookingCustomerOrderDto
{
/// <summary>
/// 主键
/// </summary>
public long Id { get; set; }
/// <summary>
/// 船名
/// </summary>
public string VESSEL { get; set; }
/// <summary>
/// 海关航次
/// </summary>
public string VOYNO { get; set; }
/// <summary>
/// 内部航次
/// </summary>
public string VOYNOINNER { get; set; }
/// <summary>
/// 场站代码
/// </summary>
public string YARDID { get; set; }
/// <summary>
/// 场站
/// </summary>
public string YARD { get; set; }
/// <summary>
/// 开船日期
/// </summary>
public DateTime? ETD { get; set; }
/// <summary>
/// 合约号
/// </summary>
public string CONTRACTNO { get; set; }
/// <summary>
/// 发货人
/// </summary>
public string SHIPPER { get; set; }
/// <summary>
/// 收货人
/// </summary>
public string CONSIGNEE { get; set; }
/// <summary>
/// 通知人
/// </summary>
public string NOTIFYPARTY { get; set; }
/// <summary>
/// 第二通知人
/// </summary>
public string NOTIFYPARTY2 { get; set; }
/// <summary>
/// 起运港代码
/// </summary>
public string PORTLOADID { get; set; }
/// <summary>
/// 起运港
/// </summary>
public string PORTLOAD { get; set; }
/// <summary>
/// 卸货港代码
/// </summary>
public string PORTDISCHARGEID { get; set; }
/// <summary>
/// 卸货港
/// </summary>
public string PORTDISCHARGE { get; set; }
/// <summary>
/// 运输条款
/// </summary>
public string SERVICE { get; set; }
/// <summary>
/// 付费方式
/// </summary>
public string BLFRT { get; set; }
/// <summary>
/// HS代码
/// </summary>
public string HSCODE { get; set; }
/// <summary>
/// 货描
/// </summary>
public string DESCRIPTION { get; set; }
/// <summary>
/// 件数
/// </summary>
public int? PKGS { get; set; }
/// <summary>
/// 包装
/// </summary>
public string KINDPKGS { get; set; }
/// <summary>
/// 毛重
/// </summary>
public decimal? KGS { get; set; }
/// <summary>
/// 尺码
/// </summary>
public decimal? CBM { get; set; }
/// <summary>
/// 件数大写
/// </summary>
public string TOTALNO { get; set; }
/// <summary>
/// 集装箱
/// </summary>
public string CNTRTOTAL { get; set; }
/// <summary>
/// 船公司代号
/// </summary>
public string CARRIERID { get; set; }
/// <summary>
/// 船公司
/// </summary>
public string CARRIER { get; set; }
/// <summary>
/// 货物标识
/// </summary>
public string CARGOID { get; set; }
/// <summary>
/// 危险品类别
/// </summary>
public string DCLASS { get; set; }
/// <summary>
/// 危险品编号
/// </summary>
public string DUNNO { get; set; }
/// <summary>
/// 危险品页号
/// </summary>
public string DPAGE { get; set; }
/// <summary>
/// 危险品标签
/// </summary>
public string DLABEL { get; set; }
/// <summary>
/// 危险品联系人
/// </summary>
public string LINKMAN { get; set; }
/// <summary>
/// 温度单位
/// </summary>
public string TEMPID { get; set; }
/// <summary>
/// 设置温度
/// </summary>
public string TEMPSET { get; set; }
/// <summary>
/// 通风度
/// </summary>
public string REEFERF { get; set; }
/// <summary>
/// 湿度
/// </summary>
public string HUMIDITY { get; set; }
/// <summary>
/// 最低温度
/// </summary>
public string TEMPMIN { get; set; }
/// <summary>
/// 最高温度
/// </summary>
public string TEMPMAX { get; set; }
/// <summary>
/// SO备注
/// </summary>
public string SOREMARK { get; set; }
}
//保存dto
public class BookingCustomerOrderSaveInput : BookingCustomerOrderDto
{
/// <summary>
/// 上传还未保存的文件
/// </summary>
public List<string> TempFileNames { get; set; }
/// <summary>
/// 已保存过的需要保留的文件
/// </summary>
public List<long> Files { get; set; }
/// <summary>
/// 箱信息
/// </summary>
public List<BookingCustomerCtnDto> CtnList { get; set; }
}
//台账返回dto
public class BookingCustomerOrderListOutput : BookingCustomerOrderDto
{
/// <summary>
/// 系统编号
/// </summary>
public string BOOKINGNO { get; set; }
}
//保存返回dto
public class BookingCustomerOrderSaveOutput : BookingCustomerOrderDto
{
/// <summary>
/// 系统编号
/// </summary>
public string BOOKINGNO { get; set; }
/// <summary>
/// 文件列表
/// </summary>
public Dictionary<long, string> Files { get; set; }
/// <summary>
/// 箱信息
/// </summary>
public List<BookingCustomerCtnDto> CtnList { get; set; }
/// <summary>
/// 日志信息
/// </summary>
public List<BookingCustomerLogDto> LogList { get; set; }
}
/// <summary>
/// 箱信息dto
/// </summary>
public class BookingCustomerCtnDto
{
/// <summary>
/// 主键
/// </summary>
public long? Id { get; set; }
/// <summary>
/// 箱型代码
/// </summary>
public string CTNCODE { get; set; }
/// <summary>
/// 箱型
/// </summary>
public string CTNALL { get; set; }
/// <summary>
/// 箱量
/// </summary>
public int? CTNNUM { get; set; }
}
/// <summary>
/// 日志信息dto
/// </summary>
public class BookingCustomerLogDto
{
/// <summary>
/// 状态
/// </summary>
public string Status { get; set; }
/// <summary>
/// 状态时间
/// </summary>
public DateTime? OpTime { get; set; }
/// <summary>
/// 创建者名称
/// </summary>
public virtual string CreatedUserName { get; set; }
}
}

@ -6319,6 +6319,16 @@ namespace Myshipping.Application
primaryModel.ORDERNO = order.BOOKINGNO;
}
//2023-06-15 按照沟通要求,如果主提单号为空,并且订舱编号不为空,可以去订舱编号填入主提单号
if (string.IsNullOrWhiteSpace(primaryModel.MBLNO))
{
if (!string.IsNullOrWhiteSpace(order.CUSTNO))
{
_logger.LogInformation("批次={no} 主题单号为空 MBLNO={mblno} 取订舱编号补到主提单号 custno={custno}", batchNo, primaryModel.MBLNO, order.CUSTNO);
primaryModel.MBLNO = order.CUSTNO;
}
}
var curBasePkgs = basePkgsList.FirstOrDefault(p => p.Name.Equals(order.KINDPKGS, StringComparison.OrdinalIgnoreCase));

@ -1182,6 +1182,129 @@ namespace Myshipping.Application
}
#endregion
/// <summary>
/// 提交规则意见
/// </summary>
/// <param name="model">规则意见详情</param>
/// <returns>返回回执</returns>
[HttpPost("/BookingValueAdded/SubmitRuleOpinion")]
public async Task<TaskManageOrderResultDto> SubmitRuleOpinion([FromBody] RulesEngineUserFeedBackDto model)
{
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
string batchNo = IDGen.NextID().ToString();
DateTime nowDate = DateTime.Now;
try
{
RulesEngineUserFeedBackMessageInfo msgModel = new RulesEngineUserFeedBackMessageInfo();
msgModel.Head = new RulesEngineUserFeedBackHead
{
GID = batchNo,
MessageType = "BUSI_RULE",
SenderId = App.Configuration["RulesEngineSender"],
SenderName = App.Configuration["RulesEngineSenderName"],
SenderKey = App.Configuration["RulesEngineAuthKey"],
ReceiverId = "RulesEngine",
ReceiverName = "大简云规则引擎",
Version = "1.0",
RequestDate = nowDate.ToString("yyyy-MM-dd HH:mm:ss"),
RequestAction = "Add",
};
msgModel.Main = new RulesEngineUserFeedBackMain
{
ruleName = model.ruleName,
opinionType = model.opinionType,
opinionContent = model.opinionContent,
ruleNotice = model.ruleNotice,
submitUser = UserManager.Name
};
var rlt = await ExcuteRuleOpinion(App.Configuration["RulesEngineOpinionUrl"], msgModel, batchNo);
}
catch (Exception ex)
{
result.succ = false;
result.msg = $"提交规则意见失败,{ex.Message}";
}
return result;
}
/// <summary>
/// 查询规则意见历史
/// </summary>
/// <param name="model">规则意见详情</param>
/// <returns>返回回执</returns>
[HttpPost("/BookingValueAdded/GetRuleOpinionLog")]
public async Task<TaskManageOrderResultDto> GetRuleOpinionLog([FromBody] RulesEngineUserFeedBackDto model)
{
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
try
{
}
catch (Exception ex)
{
result.succ = false;
result.msg = $"查询规则意见历史失败,{ex.Message}";
}
return result;
}
#region 规则用户反馈请求远端
/// <summary>
/// 规则用户反馈请求远端
/// </summary>
/// <param name="url">请求URL</param>
/// <param name="info">请求详情</param>
/// <param name="batchNo">批次号</param>
/// <returns>返回结果</returns>
[NonAction]
private async Task<RulesEngineWebApiResult> ExcuteRuleOpinion(string url, RulesEngineUserFeedBackMessageInfo info, string batchNo)
{
RulesEngineWebApiResult model = null;
/*
1JSON
2POST
3
*/
try
{
_logger.LogInformation("批次={no} 对应请求报文 request={res}", batchNo, JSON.Serialize(info));
var res = await url.OnClientCreating(client => {
// client 为 HttpClient 对象
client.Timeout = TimeSpan.FromMinutes(15); // 设置超时时间 15分钟
}).SetHttpMethod(HttpMethod.Post)
.SetBody(JSON.Serialize(info), "application/json")
.SetContentEncoding(Encoding.UTF8)
.PostAsync();
_logger.LogInformation("批次={no} 对应请求报文完成 res={res}", batchNo, JSON.Serialize(res));
if (res.StatusCode == System.Net.HttpStatusCode.OK)
{
var userResult = await res.Content.ReadAsStringAsync();
model = JSON.Deserialize<RulesEngineWebApiResult>(userResult);
}
}
catch (Exception ex)
{
//写日志
if (ex is HttpRequestException)
throw Oops.Oh(10000002);
}
return model;
}
#endregion
/// <summary>
/// 获取个人或公司网站账户配置

@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
/// <summary>
/// 规则用户反馈
/// </summary>
public class RulesEngineUserFeedBackDto
{
/// <summary>
/// 规则名称
/// </summary>
public string ruleName { get; set; }
/// <summary>
/// 规则提示
/// </summary>
public string ruleNotice { get; set; }
/// <summary>
/// 规则反馈用户名
/// </summary>
public string submitUser { get; set; }
/// <summary>
/// 规则反馈意见类型
/// </summary>
public string opinionType { get; set; }
/// <summary>
/// 规则反馈意见内容
/// </summary>
public string opinionContent { get; set; }
}
}

@ -0,0 +1,69 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
/// <summary>
/// 规则用户反馈报文详情
/// </summary>
public class RulesEngineUserFeedBackMessageInfo
{
/// <summary>
/// 表头
/// </summary>
public RulesEngineUserFeedBackHead Head { get; set; }
/// <summary>
/// 表体
/// </summary>
public RulesEngineUserFeedBackMain Main { get; set; }
}
/// <summary>
/// 报文表头
/// </summary>
public class RulesEngineUserFeedBackHead : WebAPIHeadBase
{
/// <summary>
/// 请求授权KEY
/// </summary>
/// <example>FQbjpRF6vgrrGqxdcArDHtuQQqbXhefn+1KY28aeNUho7dL25glogc0n1uIJUwsCdsEhTdWM0w6qj7HgxWi9nD0r3aONCdP+nOYtRx2+BvA=</example>
[Required(ErrorMessage = "必填")]
public string SenderKey { get; set; }
}
/// <summary>
/// 报文表体
/// </summary>
public class RulesEngineUserFeedBackMain
{
/// <summary>
/// 规则名称
/// </summary>
public string ruleName { get; set; }
/// <summary>
/// 规则提示
/// </summary>
public string ruleNotice { get; set; }
/// <summary>
/// 规则反馈用户名
/// </summary>
public string submitUser { get; set; }
/// <summary>
/// 规则反馈意见类型
/// </summary>
public string opinionType { get; set; }
/// <summary>
/// 规则反馈意见内容
/// </summary>
public string opinionContent { get; set; }
}
}

@ -57,5 +57,21 @@ namespace Myshipping.Application
/// <param name="batchBCList">批量BC更新列表</param>
/// <returns>返回回执</returns>
Task<TaskManageOrderResultDto> BatchBCUpdate(List<BatchBCDto> batchBCList);
/// <summary>
/// 提交规则意见
/// </summary>
/// <param name="model">规则意见详情</param>
/// <returns>返回回执</returns>
Task<TaskManageOrderResultDto> SubmitRuleOpinion(RulesEngineUserFeedBackDto model);
/// <summary>
/// 查询规则意见历史
/// </summary>
/// <param name="model">规则意见详情</param>
/// <returns>返回回执</returns>
Task<TaskManageOrderResultDto> GetRuleOpinionLog(RulesEngineUserFeedBackDto model);
}
}

@ -711,17 +711,17 @@ namespace Myshipping.Application
if (!string.IsNullOrWhiteSpace(lane))
{
query = query.Where(t => t.LANE_CODE.Contains(lane));
query = query.Where(t => string.IsNullOrWhiteSpace(t.LANE_CODE) || t.LANE_CODE.Contains(lane));
}
if (!string.IsNullOrWhiteSpace(lanecname))
{
query = query.Where(t => t.LANE_CNAME.Contains(lanecname));
query = query.Where(t => string.IsNullOrWhiteSpace(t.LANE_CNAME) || t.LANE_CNAME.Contains(lanecname));
}
if (!string.IsNullOrWhiteSpace(pod))
{
query = query.Where(t => t.POD_CODE.Contains(pod));
query = query.Where(t => string.IsNullOrWhiteSpace(t.POD_CODE) || t.POD_CODE.Contains(pod));
}
query = query.OrderBy("CONTRACT_NO asc");

@ -112,6 +112,8 @@
"RulesEngineSender": "NewOceanBooking",
"RulesEngineSenderName": "新海运订舱平台",
"RulesEngineProjects": "OCEAN_BOOKING",
"RulesEngineOpinionUrl": "http://60.209.125.238:35210/api/RulesEngineUserFeedBackManage/SubmitUserFeedBack",
"RulesEngineQueryOpinionUrl": "http://60.209.125.238:35210/api/RulesEngineUserFeedBackManage/QueryUserFeedBackLog",
"FriendlyExceptionSettings": {
"HideErrorCode": true
},

Loading…
Cancel
Save