diff --git a/Myshipping.Core/Entity/DJY/DjyEdiSetting.cs b/Myshipping.Core/Entity/DJY/DjyEdiSetting.cs index bbe469dc..e0186db6 100644 --- a/Myshipping.Core/Entity/DJY/DjyEdiSetting.cs +++ b/Myshipping.Core/Entity/DJY/DjyEdiSetting.cs @@ -2,7 +2,7 @@ using SqlSugar; using System.ComponentModel; using Myshipping.Core.Entity; -namespace Myshipping.Application.Entity +namespace Myshipping.Core.Entity { /// /// diff --git a/Myshipping.Core/Entity/DJY/DjyWebsiteAccountConfig.cs b/Myshipping.Core/Entity/DJY/DjyWebsiteAccountConfig.cs new file mode 100644 index 00000000..262562fd --- /dev/null +++ b/Myshipping.Core/Entity/DJY/DjyWebsiteAccountConfig.cs @@ -0,0 +1,31 @@ +using System; +using SqlSugar; +using System.ComponentModel; +using Myshipping.Core.Entity; +namespace Myshipping.Core.Entity +{ + /// + /// 网站账号维护 + /// + [SugarTable("djy_website_account_config")] + [Description("网站账号维护")] + public class DjyWebsiteAccountConfig : DBEntityTenant + { + /// + /// 类型代码 + /// + public string TypeCode { get; set; } + /// + /// 账号 + /// + public string Account { get; set; } + /// + /// 密码 + /// + public string Password { get; set; } + /// + /// 备注 + /// + public string Remark { get; set; } + } +} \ No newline at end of file diff --git a/Myshipping.Core/Myshipping.Core.xml b/Myshipping.Core/Myshipping.Core.xml index c2daf2b7..c913ecec 100644 --- a/Myshipping.Core/Myshipping.Core.xml +++ b/Myshipping.Core/Myshipping.Core.xml @@ -1384,6 +1384,136 @@ 备注 + + + + + + + + EDI类型代码 + + + + + EDI类型名称 + + + + + 服务器IP + + + + + 文件夹 + + + + + 用户名 + + + + + 密码 + + + + + 发送方代码 + + + + + 接收方代码 + + + + + 发送方名称 + + + + + 发送方联系人 + + + + + 发送方邮箱 + + + + + 发送方电话 + + + + + 发送方公司代码 + + + + + 发送方部门代码 + + + + + 船公司代码 + + + + + 接收方邮箱 + + + + + 接收方SI邮箱 + + + + + 接收方操作 + + + + + 接收方销售 + + + + + 接收方部门 + + + + + 发送人电话 + + + + + 收货人电话 + + + + + 通知人电话 + + + + + 是否设置TEL + + + + + 租户名称 + + 租户参数类别表 @@ -1489,6 +1619,31 @@ 配置数据json + + + 网站账号维护 + + + + + 类型代码 + + + + + 账号 + + + + + 密码 + + + + + 备注 + + 文档表 @@ -7428,6 +7583,154 @@ 配置数据json + + + 网站账号维护服务 + + + + + 分页查询网站账号维护 + + + + + + + 增加网站账号维护(同一用户、同类型账号不会重复插入) + + + + + + + 更新网站账号维护 + + + + + + + 删除网站账号维护 + + + + + + + 网站账号维护输入参数 + + + + + 类型代码 + + + + + 账号 + + + + + 密码 + + + + + 备注 + + + + + 网站账号维护新增输入参数 + + + + + 网站账号维护修改输入参数 + + + + + 主键Id + + + + + 网站账号维护获取(删除)输入参数 + + + + + 主键Id + + + + + 网站账号维护查询输入参数 + + + + + 主键Id + + + + + 类型代码 + + + + + 账号 + + + + + 密码 + + + + + 备注 + + + + + 网站账号维护输出参数 + + + + + 主键Id + + + + + 类型代码 + + + + + 账号 + + + + + 密码 + + + + + 备注 + + + + + 租户Id + + 文档服务 @@ -13236,135 +13539,5 @@ - - - - - - - - EDI类型代码 - - - - - EDI类型名称 - - - - - 服务器IP - - - - - 文件夹 - - - - - 用户名 - - - - - 密码 - - - - - 发送方代码 - - - - - 接收方代码 - - - - - 发送方名称 - - - - - 发送方联系人 - - - - - 发送方邮箱 - - - - - 发送方电话 - - - - - 发送方公司代码 - - - - - 发送方部门代码 - - - - - 船公司代码 - - - - - 接收方邮箱 - - - - - 接收方SI邮箱 - - - - - 接收方操作 - - - - - 接收方销售 - - - - - 接收方部门 - - - - - 发送人电话 - - - - - 收货人电话 - - - - - 通知人电话 - - - - - 是否设置TEL - - - - - 租户名称 - - diff --git a/Myshipping.Core/Service/DjyEdiSetting/DjyEdiSettingService.cs b/Myshipping.Core/Service/DjyEdiSetting/DjyEdiSettingService.cs index fb9bb43a..782e1c45 100644 --- a/Myshipping.Core/Service/DjyEdiSetting/DjyEdiSettingService.cs +++ b/Myshipping.Core/Service/DjyEdiSetting/DjyEdiSettingService.cs @@ -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 { diff --git a/Myshipping.Core/Service/DjyEdiSetting/IDjyEdiSettingService.cs b/Myshipping.Core/Service/DjyEdiSetting/IDjyEdiSettingService.cs index e463d674..c1f19b9c 100644 --- a/Myshipping.Core/Service/DjyEdiSetting/IDjyEdiSettingService.cs +++ b/Myshipping.Core/Service/DjyEdiSetting/IDjyEdiSettingService.cs @@ -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 diff --git a/Myshipping.Core/Service/DjyTenantParam/DjyTenantParamService.cs b/Myshipping.Core/Service/DjyTenantParam/DjyTenantParamService.cs index 514987d7..0938e99f 100644 --- a/Myshipping.Core/Service/DjyTenantParam/DjyTenantParamService.cs +++ b/Myshipping.Core/Service/DjyTenantParam/DjyTenantParamService.cs @@ -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; diff --git a/Myshipping.Core/Service/DjyTenantParam/IDjyTenantParamService.cs b/Myshipping.Core/Service/DjyTenantParam/IDjyTenantParamService.cs index 9782948c..c31f1f23 100644 --- a/Myshipping.Core/Service/DjyTenantParam/IDjyTenantParamService.cs +++ b/Myshipping.Core/Service/DjyTenantParam/IDjyTenantParamService.cs @@ -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; diff --git a/Myshipping.Core/Service/DjyWebsiteAccountConfig/DjyWebsiteAccountConfigService.cs b/Myshipping.Core/Service/DjyWebsiteAccountConfig/DjyWebsiteAccountConfigService.cs new file mode 100644 index 00000000..31c587b8 --- /dev/null +++ b/Myshipping.Core/Service/DjyWebsiteAccountConfig/DjyWebsiteAccountConfigService.cs @@ -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 +{ + /// + /// 网站账号维护服务 + /// + [ApiDescriptionSettings(Name = "DjyWebsiteAccountConfig", Order = 1)] + public class DjyWebsiteAccountConfigService : IDjyWebsiteAccountConfigService, IDynamicApiController, ITransient + { + private readonly SqlSugarRepository _rep; + private readonly ILogger _logger; + + public DjyWebsiteAccountConfigService(SqlSugarRepository rep, ILogger logger) + { + _rep = rep; + _logger = logger; + } + + /// + /// 分页查询网站账号维护 + /// + /// + /// + [HttpGet("/DjyWebsiteAccountConfig/page")] + public async Task 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(); + } + + /// + /// 增加网站账号维护(同一用户、同类型账号不会重复插入) + /// + /// + /// + [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(); + await _rep.InsertAsync(entity); + } + else + { + entity = input.Adapt(entity); + await _rep.UpdateAsync(entity); + } + } + + /// + /// 更新网站账号维护 + /// + /// + /// + [HttpPost("/DjyWebsiteAccountConfig/edit")] + public async Task Update(UpdateDjyWebsiteAccountConfigInput input) + { + var entity = input.Adapt(); + await _rep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); + } + + /// + /// 删除网站账号维护 + /// + /// + /// + [HttpPost("/DjyWebsiteAccountConfig/delete")] + public async Task Delete(GetDjyWebsiteAccountConfigInput input) + { + var entity = await _rep.FirstOrDefaultAsync(u => u.Id == input.Id); + await _rep.DeleteAsync(entity); + } + } +} diff --git a/Myshipping.Core/Service/DjyWebsiteAccountConfig/Dto/DjyWebsiteAccountConfigInput.cs b/Myshipping.Core/Service/DjyWebsiteAccountConfig/Dto/DjyWebsiteAccountConfigInput.cs new file mode 100644 index 00000000..6d79c0f2 --- /dev/null +++ b/Myshipping.Core/Service/DjyWebsiteAccountConfig/Dto/DjyWebsiteAccountConfigInput.cs @@ -0,0 +1,99 @@ +using Myshipping.Core; +using System; +using System.ComponentModel.DataAnnotations; + +namespace Myshipping.Core.Service +{ + /// + /// 网站账号维护输入参数 + /// + public class DjyWebsiteAccountConfigInput + { + /// + /// 类型代码 + /// + public virtual string TypeCode { get; set; } + + /// + /// 账号 + /// + public virtual string Account { get; set; } + + /// + /// 密码 + /// + public virtual string Password { get; set; } + + /// + /// 备注 + /// + public virtual string Remark { get; set; } + + + } + + /// + /// 网站账号维护新增输入参数 + /// + public class AddDjyWebsiteAccountConfigInput : DjyWebsiteAccountConfigInput + { + } + + /// + /// 网站账号维护修改输入参数 + /// + public class UpdateDjyWebsiteAccountConfigInput : DjyWebsiteAccountConfigInput + { + /// + /// 主键Id + /// + [Required(ErrorMessage = "主键Id不能为空")] + public long Id { get; set; } + + } + + /// + /// 网站账号维护获取(删除)输入参数 + /// + public class GetDjyWebsiteAccountConfigInput + { + /// + /// 主键Id + /// + [Required(ErrorMessage = "主键Id不能为空")] + public long Id { get; set; } + + } + + /// + /// 网站账号维护查询输入参数 + /// + public class QueryDjyWebsiteAccountConfigInput : PageInputBase + { + /// + /// 主键Id + /// + public virtual long Id { get; set; } + + /// + /// 类型代码 + /// + public virtual string TypeCode { get; set; } + + /// + /// 账号 + /// + public virtual string Account { get; set; } + + /// + /// 密码 + /// + public virtual string Password { get; set; } + + /// + /// 备注 + /// + public virtual string Remark { get; set; } + + } +} diff --git a/Myshipping.Core/Service/DjyWebsiteAccountConfig/Dto/DjyWebsiteAccountConfigOutput.cs b/Myshipping.Core/Service/DjyWebsiteAccountConfig/Dto/DjyWebsiteAccountConfigOutput.cs new file mode 100644 index 00000000..57561fa7 --- /dev/null +++ b/Myshipping.Core/Service/DjyWebsiteAccountConfig/Dto/DjyWebsiteAccountConfigOutput.cs @@ -0,0 +1,41 @@ +using System; + +namespace Myshipping.Core.Service +{ + /// + /// 网站账号维护输出参数 + /// + public class DjyWebsiteAccountConfigOutput + { + /// + /// 主键Id + /// + public long Id { get; set; } + + /// + /// 类型代码 + /// + public string TypeCode { get; set; } + + /// + /// 账号 + /// + public string Account { get; set; } + + /// + /// 密码 + /// + public string Password { get; set; } + + /// + /// 备注 + /// + public string Remark { get; set; } + + /// + /// 租户Id + /// + public long TenantId { get; set; } + + } +} diff --git a/Myshipping.Core/Service/DjyWebsiteAccountConfig/IDjyWebsiteAccountConfigService.cs b/Myshipping.Core/Service/DjyWebsiteAccountConfig/IDjyWebsiteAccountConfigService.cs new file mode 100644 index 00000000..ad0b4cba --- /dev/null +++ b/Myshipping.Core/Service/DjyWebsiteAccountConfig/IDjyWebsiteAccountConfigService.cs @@ -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 Page([FromQuery] QueryDjyWebsiteAccountConfigInput input); + Task Add(AddDjyWebsiteAccountConfigInput input); + Task Update(UpdateDjyWebsiteAccountConfigInput input); + Task Delete(GetDjyWebsiteAccountConfigInput input); + } +} \ No newline at end of file diff --git a/Myshipping.Core/Service/Tenant/SysTenantService.cs b/Myshipping.Core/Service/Tenant/SysTenantService.cs index b74ac2f2..32adccdb 100644 --- a/Myshipping.Core/Service/Tenant/SysTenantService.cs +++ b/Myshipping.Core/Service/Tenant/SysTenantService.cs @@ -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, diff --git a/Myshipping.Report/Controllers/ReportController.cs b/Myshipping.Report/Controllers/ReportController.cs index 2bf2c14f..54691884 100644 --- a/Myshipping.Report/Controllers/ReportController.cs +++ b/Myshipping.Report/Controllers/ReportController.cs @@ -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;