网站账号维护

booking_auth_dev
wanghaomei 2 years ago
parent fc32f81fe6
commit 2a71357808

@ -2,7 +2,7 @@
using SqlSugar;
using System.ComponentModel;
using Myshipping.Core.Entity;
namespace Myshipping.Application.Entity
namespace Myshipping.Core.Entity
{
/// <summary>
///

@ -0,0 +1,31 @@
using System;
using SqlSugar;
using System.ComponentModel;
using Myshipping.Core.Entity;
namespace Myshipping.Core.Entity
{
/// <summary>
/// 网站账号维护
/// </summary>
[SugarTable("djy_website_account_config")]
[Description("网站账号维护")]
public class DjyWebsiteAccountConfig : DBEntityTenant
{
/// <summary>
/// 类型代码
/// </summary>
public string TypeCode { get; set; }
/// <summary>
/// 账号
/// </summary>
public string Account { get; set; }
/// <summary>
/// 密码
/// </summary>
public string Password { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}
}

@ -1384,6 +1384,136 @@
备注
</summary>
</member>
<member name="T:Myshipping.Core.Entity.DjyEdiSetting">
<summary>
</summary>
</member>
<member name="P:Myshipping.Core.Entity.DjyEdiSetting.EDICODE">
<summary>
EDI类型代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.DjyEdiSetting.EDINAME">
<summary>
EDI类型名称
</summary>
</member>
<member name="P:Myshipping.Core.Entity.DjyEdiSetting.SERVERIP">
<summary>
服务器IP
</summary>
</member>
<member name="P:Myshipping.Core.Entity.DjyEdiSetting.FOLDERNAME">
<summary>
文件夹
</summary>
</member>
<member name="P:Myshipping.Core.Entity.DjyEdiSetting.USERNAME">
<summary>
用户名
</summary>
</member>
<member name="P:Myshipping.Core.Entity.DjyEdiSetting.PASSWORD">
<summary>
密码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.DjyEdiSetting.SENDCODE">
<summary>
发送方代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.DjyEdiSetting.RECEIVECODE">
<summary>
接收方代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.DjyEdiSetting.SENDNAME">
<summary>
发送方名称
</summary>
</member>
<member name="P:Myshipping.Core.Entity.DjyEdiSetting.SENDATTN">
<summary>
发送方联系人
</summary>
</member>
<member name="P:Myshipping.Core.Entity.DjyEdiSetting.SENDTEL">
<summary>
发送方邮箱
</summary>
</member>
<member name="P:Myshipping.Core.Entity.DjyEdiSetting.SENDEMAIL">
<summary>
发送方电话
</summary>
</member>
<member name="P:Myshipping.Core.Entity.DjyEdiSetting.SENDCOMPANYCODE">
<summary>
发送方公司代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.DjyEdiSetting.SENDSUBCOMPANYCODE">
<summary>
发送方部门代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.DjyEdiSetting.CARRIERID">
<summary>
船公司代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.DjyEdiSetting.RECEIVEEMAIL">
<summary>
接收方邮箱
</summary>
</member>
<member name="P:Myshipping.Core.Entity.DjyEdiSetting.RECEIVESIEMAIL">
<summary>
接收方SI邮箱
</summary>
</member>
<member name="P:Myshipping.Core.Entity.DjyEdiSetting.RECEIVEOP">
<summary>
接收方操作
</summary>
</member>
<member name="P:Myshipping.Core.Entity.DjyEdiSetting.RECEIVESALE">
<summary>
接收方销售
</summary>
</member>
<member name="P:Myshipping.Core.Entity.DjyEdiSetting.RECEIVEDEPT">
<summary>
接收方部门
</summary>
</member>
<member name="P:Myshipping.Core.Entity.DjyEdiSetting.SHIPPERTEL">
<summary>
发送人电话
</summary>
</member>
<member name="P:Myshipping.Core.Entity.DjyEdiSetting.CONSIGNEETEL">
<summary>
收货人电话
</summary>
</member>
<member name="P:Myshipping.Core.Entity.DjyEdiSetting.NOTIFYPARTYTEL">
<summary>
通知人电话
</summary>
</member>
<member name="P:Myshipping.Core.Entity.DjyEdiSetting.ISUSETEL">
<summary>
是否设置TEL
</summary>
</member>
<member name="P:Myshipping.Core.Entity.DjyEdiSetting.TenantName">
<summary>
租户名称
</summary>
</member>
<member name="T:Myshipping.Core.Entity.DjyTenantParam">
<summary>
租户参数类别表
@ -1489,6 +1619,31 @@
配置数据json
</summary>
</member>
<member name="T:Myshipping.Core.Entity.DjyWebsiteAccountConfig">
<summary>
网站账号维护
</summary>
</member>
<member name="P:Myshipping.Core.Entity.DjyWebsiteAccountConfig.TypeCode">
<summary>
类型代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.DjyWebsiteAccountConfig.Account">
<summary>
账号
</summary>
</member>
<member name="P:Myshipping.Core.Entity.DjyWebsiteAccountConfig.Password">
<summary>
密码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.DjyWebsiteAccountConfig.Remark">
<summary>
备注
</summary>
</member>
<member name="T:Myshipping.Core.Entity.Documentation">
<summary>
文档表
@ -7428,6 +7583,154 @@
配置数据json
</summary>
</member>
<member name="T:Myshipping.Core.Service.DjyWebsiteAccountConfigService">
<summary>
网站账号维护服务
</summary>
</member>
<member name="M:Myshipping.Core.Service.DjyWebsiteAccountConfigService.Page(Myshipping.Core.Service.QueryDjyWebsiteAccountConfigInput)">
<summary>
分页查询网站账号维护
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Myshipping.Core.Service.DjyWebsiteAccountConfigService.Add(Myshipping.Core.Service.AddDjyWebsiteAccountConfigInput)">
<summary>
增加网站账号维护(同一用户、同类型账号不会重复插入)
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Myshipping.Core.Service.DjyWebsiteAccountConfigService.Update(Myshipping.Core.Service.UpdateDjyWebsiteAccountConfigInput)">
<summary>
更新网站账号维护
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Myshipping.Core.Service.DjyWebsiteAccountConfigService.Delete(Myshipping.Core.Service.GetDjyWebsiteAccountConfigInput)">
<summary>
删除网站账号维护
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="T:Myshipping.Core.Service.DjyWebsiteAccountConfigInput">
<summary>
网站账号维护输入参数
</summary>
</member>
<member name="P:Myshipping.Core.Service.DjyWebsiteAccountConfigInput.TypeCode">
<summary>
类型代码
</summary>
</member>
<member name="P:Myshipping.Core.Service.DjyWebsiteAccountConfigInput.Account">
<summary>
账号
</summary>
</member>
<member name="P:Myshipping.Core.Service.DjyWebsiteAccountConfigInput.Password">
<summary>
密码
</summary>
</member>
<member name="P:Myshipping.Core.Service.DjyWebsiteAccountConfigInput.Remark">
<summary>
备注
</summary>
</member>
<member name="T:Myshipping.Core.Service.AddDjyWebsiteAccountConfigInput">
<summary>
网站账号维护新增输入参数
</summary>
</member>
<member name="T:Myshipping.Core.Service.UpdateDjyWebsiteAccountConfigInput">
<summary>
网站账号维护修改输入参数
</summary>
</member>
<member name="P:Myshipping.Core.Service.UpdateDjyWebsiteAccountConfigInput.Id">
<summary>
主键Id
</summary>
</member>
<member name="T:Myshipping.Core.Service.GetDjyWebsiteAccountConfigInput">
<summary>
网站账号维护获取(删除)输入参数
</summary>
</member>
<member name="P:Myshipping.Core.Service.GetDjyWebsiteAccountConfigInput.Id">
<summary>
主键Id
</summary>
</member>
<member name="T:Myshipping.Core.Service.QueryDjyWebsiteAccountConfigInput">
<summary>
网站账号维护查询输入参数
</summary>
</member>
<member name="P:Myshipping.Core.Service.QueryDjyWebsiteAccountConfigInput.Id">
<summary>
主键Id
</summary>
</member>
<member name="P:Myshipping.Core.Service.QueryDjyWebsiteAccountConfigInput.TypeCode">
<summary>
类型代码
</summary>
</member>
<member name="P:Myshipping.Core.Service.QueryDjyWebsiteAccountConfigInput.Account">
<summary>
账号
</summary>
</member>
<member name="P:Myshipping.Core.Service.QueryDjyWebsiteAccountConfigInput.Password">
<summary>
密码
</summary>
</member>
<member name="P:Myshipping.Core.Service.QueryDjyWebsiteAccountConfigInput.Remark">
<summary>
备注
</summary>
</member>
<member name="T:Myshipping.Core.Service.DjyWebsiteAccountConfigOutput">
<summary>
网站账号维护输出参数
</summary>
</member>
<member name="P:Myshipping.Core.Service.DjyWebsiteAccountConfigOutput.Id">
<summary>
主键Id
</summary>
</member>
<member name="P:Myshipping.Core.Service.DjyWebsiteAccountConfigOutput.TypeCode">
<summary>
类型代码
</summary>
</member>
<member name="P:Myshipping.Core.Service.DjyWebsiteAccountConfigOutput.Account">
<summary>
账号
</summary>
</member>
<member name="P:Myshipping.Core.Service.DjyWebsiteAccountConfigOutput.Password">
<summary>
密码
</summary>
</member>
<member name="P:Myshipping.Core.Service.DjyWebsiteAccountConfigOutput.Remark">
<summary>
备注
</summary>
</member>
<member name="P:Myshipping.Core.Service.DjyWebsiteAccountConfigOutput.TenantId">
<summary>
租户Id
</summary>
</member>
<member name="T:Myshipping.Core.Service.DocumentService">
<summary>
文档服务
@ -13236,135 +13539,5 @@
<param name="node"></param>
<param name="childNodeLists"></param>
</member>
<member name="T:Myshipping.Application.Entity.DjyEdiSetting">
<summary>
</summary>
</member>
<member name="P:Myshipping.Application.Entity.DjyEdiSetting.EDICODE">
<summary>
EDI类型代码
</summary>
</member>
<member name="P:Myshipping.Application.Entity.DjyEdiSetting.EDINAME">
<summary>
EDI类型名称
</summary>
</member>
<member name="P:Myshipping.Application.Entity.DjyEdiSetting.SERVERIP">
<summary>
服务器IP
</summary>
</member>
<member name="P:Myshipping.Application.Entity.DjyEdiSetting.FOLDERNAME">
<summary>
文件夹
</summary>
</member>
<member name="P:Myshipping.Application.Entity.DjyEdiSetting.USERNAME">
<summary>
用户名
</summary>
</member>
<member name="P:Myshipping.Application.Entity.DjyEdiSetting.PASSWORD">
<summary>
密码
</summary>
</member>
<member name="P:Myshipping.Application.Entity.DjyEdiSetting.SENDCODE">
<summary>
发送方代码
</summary>
</member>
<member name="P:Myshipping.Application.Entity.DjyEdiSetting.RECEIVECODE">
<summary>
接收方代码
</summary>
</member>
<member name="P:Myshipping.Application.Entity.DjyEdiSetting.SENDNAME">
<summary>
发送方名称
</summary>
</member>
<member name="P:Myshipping.Application.Entity.DjyEdiSetting.SENDATTN">
<summary>
发送方联系人
</summary>
</member>
<member name="P:Myshipping.Application.Entity.DjyEdiSetting.SENDTEL">
<summary>
发送方邮箱
</summary>
</member>
<member name="P:Myshipping.Application.Entity.DjyEdiSetting.SENDEMAIL">
<summary>
发送方电话
</summary>
</member>
<member name="P:Myshipping.Application.Entity.DjyEdiSetting.SENDCOMPANYCODE">
<summary>
发送方公司代码
</summary>
</member>
<member name="P:Myshipping.Application.Entity.DjyEdiSetting.SENDSUBCOMPANYCODE">
<summary>
发送方部门代码
</summary>
</member>
<member name="P:Myshipping.Application.Entity.DjyEdiSetting.CARRIERID">
<summary>
船公司代码
</summary>
</member>
<member name="P:Myshipping.Application.Entity.DjyEdiSetting.RECEIVEEMAIL">
<summary>
接收方邮箱
</summary>
</member>
<member name="P:Myshipping.Application.Entity.DjyEdiSetting.RECEIVESIEMAIL">
<summary>
接收方SI邮箱
</summary>
</member>
<member name="P:Myshipping.Application.Entity.DjyEdiSetting.RECEIVEOP">
<summary>
接收方操作
</summary>
</member>
<member name="P:Myshipping.Application.Entity.DjyEdiSetting.RECEIVESALE">
<summary>
接收方销售
</summary>
</member>
<member name="P:Myshipping.Application.Entity.DjyEdiSetting.RECEIVEDEPT">
<summary>
接收方部门
</summary>
</member>
<member name="P:Myshipping.Application.Entity.DjyEdiSetting.SHIPPERTEL">
<summary>
发送人电话
</summary>
</member>
<member name="P:Myshipping.Application.Entity.DjyEdiSetting.CONSIGNEETEL">
<summary>
收货人电话
</summary>
</member>
<member name="P:Myshipping.Application.Entity.DjyEdiSetting.NOTIFYPARTYTEL">
<summary>
通知人电话
</summary>
</member>
<member name="P:Myshipping.Application.Entity.DjyEdiSetting.ISUSETEL">
<summary>
是否设置TEL
</summary>
</member>
<member name="P:Myshipping.Application.Entity.DjyEdiSetting.TenantName">
<summary>
租户名称
</summary>
</member>
</members>
</doc>

@ -6,9 +6,9 @@ using Microsoft.AspNetCore.Mvc;
using SqlSugar;
using System.Linq;
using System.Threading.Tasks;
using Myshipping.Application.Entity;
using Furion.Logging;
using Microsoft.Extensions.Logging;
using Myshipping.Core.Entity;
namespace Myshipping.Core.Service
{

@ -1,7 +1,8 @@
using Myshipping.Core;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using Myshipping.Application.Entity;
using Myshipping.Core.Entity;
namespace Myshipping.Core.Service
{
public interface IDjyEdiSettingService

@ -6,7 +6,6 @@ using Microsoft.AspNetCore.Mvc;
using SqlSugar;
using System.Linq;
using System.Threading.Tasks;
using Myshipping.Application.Entity;
using Microsoft.Extensions.Logging;
using System.Collections.Generic;
using Myshipping.Core.Entity;

@ -1,7 +1,6 @@
using Myshipping.Core;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using Myshipping.Application.Entity;
using System.Collections.Generic;
using Myshipping.Core.Entity;

@ -0,0 +1,89 @@
using Myshipping.Core;
using Furion.DependencyInjection;
using Furion.DynamicApiController;
using Mapster;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;
using System.Linq;
using System.Threading.Tasks;
using Myshipping.Core.Entity;
using Microsoft.Extensions.Logging;
namespace Myshipping.Core.Service
{
/// <summary>
/// 网站账号维护服务
/// </summary>
[ApiDescriptionSettings(Name = "DjyWebsiteAccountConfig", Order = 1)]
public class DjyWebsiteAccountConfigService : IDjyWebsiteAccountConfigService, IDynamicApiController, ITransient
{
private readonly SqlSugarRepository<DjyWebsiteAccountConfig> _rep;
private readonly ILogger<DjyWebsiteAccountConfig> _logger;
public DjyWebsiteAccountConfigService(SqlSugarRepository<DjyWebsiteAccountConfig> rep, ILogger<DjyWebsiteAccountConfig> logger)
{
_rep = rep;
_logger = logger;
}
/// <summary>
/// 分页查询网站账号维护
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpGet("/DjyWebsiteAccountConfig/page")]
public async Task<dynamic> Page([FromQuery] QueryDjyWebsiteAccountConfigInput input)
{
var entities = await _rep.AsQueryable()
.WhereIF(!string.IsNullOrWhiteSpace(input.TypeCode), u => u.TypeCode == input.TypeCode)
.WhereIF(!string.IsNullOrWhiteSpace(input.Account), u => u.Account.Contains(input.Account.Trim()))
.ToPagedListAsync(input.PageNo, input.PageSize);
return entities.XnPagedResult();
}
/// <summary>
/// 增加网站账号维护(同一用户、同类型账号不会重复插入)
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("/DjyWebsiteAccountConfig/add")]
public async Task Add(AddDjyWebsiteAccountConfigInput input)
{
var entity = _rep.FirstOrDefault(x => x.TypeCode == input.TypeCode && x.CreatedUserId == UserManager.UserId);
if (entity == null)
{
entity = input.Adapt<DjyWebsiteAccountConfig>();
await _rep.InsertAsync(entity);
}
else
{
entity = input.Adapt(entity);
await _rep.UpdateAsync(entity);
}
}
/// <summary>
/// 更新网站账号维护
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("/DjyWebsiteAccountConfig/edit")]
public async Task Update(UpdateDjyWebsiteAccountConfigInput input)
{
var entity = input.Adapt<DjyWebsiteAccountConfig>();
await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
}
/// <summary>
/// 删除网站账号维护
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost("/DjyWebsiteAccountConfig/delete")]
public async Task Delete(GetDjyWebsiteAccountConfigInput input)
{
var entity = await _rep.FirstOrDefaultAsync(u => u.Id == input.Id);
await _rep.DeleteAsync(entity);
}
}
}

@ -0,0 +1,99 @@
using Myshipping.Core;
using System;
using System.ComponentModel.DataAnnotations;
namespace Myshipping.Core.Service
{
/// <summary>
/// 网站账号维护输入参数
/// </summary>
public class DjyWebsiteAccountConfigInput
{
/// <summary>
/// 类型代码
/// </summary>
public virtual string TypeCode { get; set; }
/// <summary>
/// 账号
/// </summary>
public virtual string Account { get; set; }
/// <summary>
/// 密码
/// </summary>
public virtual string Password { get; set; }
/// <summary>
/// 备注
/// </summary>
public virtual string Remark { get; set; }
}
/// <summary>
/// 网站账号维护新增输入参数
/// </summary>
public class AddDjyWebsiteAccountConfigInput : DjyWebsiteAccountConfigInput
{
}
/// <summary>
/// 网站账号维护修改输入参数
/// </summary>
public class UpdateDjyWebsiteAccountConfigInput : DjyWebsiteAccountConfigInput
{
/// <summary>
/// 主键Id
/// </summary>
[Required(ErrorMessage = "主键Id不能为空")]
public long Id { get; set; }
}
/// <summary>
/// 网站账号维护获取(删除)输入参数
/// </summary>
public class GetDjyWebsiteAccountConfigInput
{
/// <summary>
/// 主键Id
/// </summary>
[Required(ErrorMessage = "主键Id不能为空")]
public long Id { get; set; }
}
/// <summary>
/// 网站账号维护查询输入参数
/// </summary>
public class QueryDjyWebsiteAccountConfigInput : PageInputBase
{
/// <summary>
/// 主键Id
/// </summary>
public virtual long Id { get; set; }
/// <summary>
/// 类型代码
/// </summary>
public virtual string TypeCode { get; set; }
/// <summary>
/// 账号
/// </summary>
public virtual string Account { get; set; }
/// <summary>
/// 密码
/// </summary>
public virtual string Password { get; set; }
/// <summary>
/// 备注
/// </summary>
public virtual string Remark { get; set; }
}
}

@ -0,0 +1,41 @@
using System;
namespace Myshipping.Core.Service
{
/// <summary>
/// 网站账号维护输出参数
/// </summary>
public class DjyWebsiteAccountConfigOutput
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 类型代码
/// </summary>
public string TypeCode { get; set; }
/// <summary>
/// 账号
/// </summary>
public string Account { get; set; }
/// <summary>
/// 密码
/// </summary>
public string Password { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
/// <summary>
/// 租户Id
/// </summary>
public long TenantId { get; set; }
}
}

@ -0,0 +1,15 @@
using Myshipping.Core;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using Myshipping.Core.Entity;
namespace Myshipping.Core.Service
{
public interface IDjyWebsiteAccountConfigService
{
Task<dynamic> Page([FromQuery] QueryDjyWebsiteAccountConfigInput input);
Task Add(AddDjyWebsiteAccountConfigInput input);
Task Update(UpdateDjyWebsiteAccountConfigInput input);
Task Delete(GetDjyWebsiteAccountConfigInput input);
}
}

@ -150,7 +150,7 @@ public class SysTenantService : ISysTenantService, IDynamicApiController, ITrans
{
TenantId = tenantId,
Account = email,
Password = "e10adc3949ba59abbe56e057f20f883e",
Password = "BF5CB3105A1B733F",
Name = newTenant.AdminName,
NickName = newTenant.AdminName,
Email = newTenant.Email,

@ -65,7 +65,7 @@ namespace Myshipping.Report.Controllers
if (type == 1) //pdf
{
var saveFile = Path.Combine(savePath, "data.pdf");
var saveFile = Path.Combine(savePath, $"{bookingId}_{DateTime.Now.Ticks}.pdf");
PDFExport pdfExport = new PDFExport();
pdfExport.Export(report, saveFile);
resp.Success = true;
@ -74,7 +74,7 @@ namespace Myshipping.Report.Controllers
}
else if (type == 2) //
{
var saveFile = Path.Combine(savePath, "data.xlsx");
var saveFile = Path.Combine(savePath, $"{bookingId}_{DateTime.Now.Ticks}.xlsx");
Excel2007Export excelExport = new Excel2007Export();
excelExport.Export(report, saveFile);
resp.Success = true;

Loading…
Cancel
Save