From 3373a075081a707b094c6225759a776d18ee1e53 Mon Sep 17 00:00:00 2001
From: 移动系统liao <liaoxujun@qq.com>
Date: 星期三, 04 六月 2025 15:14:10 +0800
Subject: [PATCH] no message
---
Admin.NET/FZCZTB.TSCL.Application/Service/ProcurementComplaint/Dto/ProcurementComplaintOutput.cs | 2
Admin.NET/FZCZTB.NET.MD/ProcurementComplaint.cs | 69 ++++++++++++++++
Admin.NET/FZCZTB.NET.MD/FZCZTB.NET.MD.csproj | 1
Admin.NET/FZCZTB.TSCL.Application/FZCZTB.TSCL.Application.csproj | 1
Admin.NET/Admin.NET.Application/Configuration/Swagger.json | 13 ++
Admin.NET/Admin.NET.Application/Const/ApplicationConst.cs | 2
Admin.NET/FZCZTB.TSCL.Application/Service/ProcurementComplaint/Dto/ProcurementComplaintInput.cs | 14 ++
Admin.NET/FZCZTB.TSCL.Application/Service/ProcurementComplaint/ProcurementComplaintService.cs | 97 ++++++++++++++----------
8 files changed, 149 insertions(+), 50 deletions(-)
diff --git a/Admin.NET/Admin.NET.Application/Configuration/Swagger.json b/Admin.NET/Admin.NET.Application/Configuration/Swagger.json
index 6d636b7..cf54d66 100644
--- a/Admin.NET/Admin.NET.Application/Configuration/Swagger.json
+++ b/Admin.NET/Admin.NET.Application/Configuration/Swagger.json
@@ -6,17 +6,24 @@
"GroupOpenApiInfos": [
{
"Group": "Default",
- "Title": "Admin.NET 閫氱敤鏉冮檺寮�鍙戝钩鍙�",
- "Description": "璁� .NET 寮�鍙戞洿绠�鍗曘�佹洿閫氱敤銆佹洿娴佽銆傛暣鍚堟渶鏂版妧鏈紝妯″潡鎻掍欢寮忓紑鍙戯紝鍓嶅悗绔垎绂伙紝寮�绠卞嵆鐢ㄣ��",
+ "Title": "绯荤粺",
+ "Description": "",
"Version": "1.0.0",
"Order": 1000
},
{
"Group": "All Groups",
"Title": "鎵�鏈夋帴鍙�",
- "Description": "璁� .NET 寮�鍙戞洿绠�鍗曘�佹洿閫氱敤銆佹洿娴佽銆傛暣鍚堟渶鏂版妧鏈紝妯″潡鎻掍欢寮忓紑鍙戯紝鍓嶅悗绔垎绂伙紝寮�绠卞嵆鐢ㄣ��",
+ "Description": "",
"Version": "1.0.0",
"Order": 0
+ },
+ {
+ "Group": "FZCCGPT",
+ "Title": "闈炴斂搴滈噰璐氦鏄撳钩鍙�",
+ "Description": "闈炴斂搴滈噰璐氦鏄撳钩鍙�",
+ "Version": "1.0.0",
+ "Order": 10000
}
],
"DefaultGroupName": "Default", // 榛樿鍒嗙粍鍚�
diff --git a/Admin.NET/Admin.NET.Application/Const/ApplicationConst.cs b/Admin.NET/Admin.NET.Application/Const/ApplicationConst.cs
index 70ee2b6..3121eab 100644
--- a/Admin.NET/Admin.NET.Application/Const/ApplicationConst.cs
+++ b/Admin.NET/Admin.NET.Application/Const/ApplicationConst.cs
@@ -14,5 +14,5 @@
/// <summary>
/// API鍒嗙粍鍚嶇О
/// </summary>
- public const string GroupName = "xxx涓氬姟搴旂敤";
+ public const string GroupName = "FZCCGPT";
}
\ No newline at end of file
diff --git a/Admin.NET/FZCZTB.NET.MD/FZCZTB.NET.MD.csproj b/Admin.NET/FZCZTB.NET.MD/FZCZTB.NET.MD.csproj
index 6347951..9e7fdd3 100644
--- a/Admin.NET/FZCZTB.NET.MD/FZCZTB.NET.MD.csproj
+++ b/Admin.NET/FZCZTB.NET.MD/FZCZTB.NET.MD.csproj
@@ -4,6 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
+ <GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup>
diff --git a/Admin.NET/FZCZTB.NET.MD/ProcurementComplaint.cs b/Admin.NET/FZCZTB.NET.MD/ProcurementComplaint.cs
index 3d4d86e..c566b19 100644
--- a/Admin.NET/FZCZTB.NET.MD/ProcurementComplaint.cs
+++ b/Admin.NET/FZCZTB.NET.MD/ProcurementComplaint.cs
@@ -2,6 +2,7 @@
using SqlSugar;
using System;
using System.Collections.Generic;
+using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -12,7 +13,7 @@
/// 鎶曡瘔璐ㄧ枒缁撴灉
/// </summary>
[SugarTable("FB_ProcurementComplaints")]
- public partial class ProcurementComplaint: EntityBase
+ public partial class ProcurementComplaint: basemodelNoId
{
/// <summary>
/// 鎶曡瘔ID锛屼富閿�
@@ -75,7 +76,7 @@
/// <summary>
/// 鎶曡瘔浜嬮」
/// </summary>
- [Navigate(NavigateType.OneToMany,nameof(ProcurementComplaintItems.ComplaintId))]
+ [Navigate(NavigateType.OneToMany,nameof(ProcurementComplaintItems.ComplaintId), nameof(ProcurementComplaint.Id))]
public List<ProcurementComplaintItems>? Complaints { get; set; }
}
@@ -114,6 +115,12 @@
/// </summary>
[SugarColumn(Length = 1000,IsNullable = true, ColumnDescription = "澶勭悊缁撴灉")]
public string? HandlingResult { get; set; }
+
+ /// <summary>
+ /// 鎺掑簭
+ /// </summary>
+ [SugarColumn( IsNullable = true, ColumnDescription = "澶勭悊缁撴灉")]
+ public int sort { get; set; } = 0;
}
public enum PComplaintStatus
@@ -121,26 +128,84 @@
/// <summary>
/// 鍏朵粬
/// </summary>
+ [Description("鍏跺畠"), Theme("info")]
Other = 0,
/// <summary>
/// 鎴愮珛
/// </summary>
+ [Description("鎴愮珛")]
Valid = 1,
/// <summary>
/// 椹冲洖
/// </summary>
+ [Description("椹冲洖")]
Rejected = 2,
/// <summary>
/// 閮ㄥ垎鎴愮珛
/// </summary>
+ [Description("閮ㄥ垎鎴愮珛")]
PartiallyValid = 3
}
+ public class basemodelNoId
+ {
+
+ /// 鍒涘缓鏃堕棿
+ /// </summary>
+ [SugarColumn(ColumnDescription = "鍒涘缓鏃堕棿", IsNullable = true, IsOnlyIgnoreUpdate = true)]
+ public virtual DateTime CreateTime { get; set; }
+ /// <summary>
+ /// 鏇存柊鏃堕棿
+ /// </summary>
+ [SugarColumn(ColumnDescription = "鏇存柊鏃堕棿")]
+ public virtual DateTime? UpdateTime { get; set; }
+
+ /// <summary>
+ /// 鍒涘缓鑰匢d
+ /// </summary>
+ [OwnerUser]
+ [SugarColumn(ColumnDescription = "鍒涘缓鑰匢d", IsOnlyIgnoreUpdate = true)]
+ public virtual long? CreateUserId { get; set; }
+
+ ///// <summary>
+ ///// 鍒涘缓鑰�
+ ///// </summary>
+ //[Newtonsoft.Json.JsonIgnore]
+ //[System.Text.Json.Serialization.JsonIgnore]
+ //[Navigate(NavigateType.OneToOne, nameof(CreateUserId))]
+ //public virtual SysUser CreateUser { get; set; }
+
+ /// <summary>
+ /// 鍒涘缓鑰呭鍚�
+ /// </summary>
+ [SugarColumn(ColumnDescription = "鍒涘缓鑰呭鍚�", Length = 64, IsOnlyIgnoreUpdate = true)]
+ public virtual string? CreateUserName { get; set; }
+
+ /// <summary>
+ /// 淇敼鑰匢d
+ /// </summary>
+ [SugarColumn(ColumnDescription = "淇敼鑰匢d")]
+ public virtual long? UpdateUserId { get; set; }
+
+ ///// <summary>
+ ///// 淇敼鑰�
+ ///// </summary>
+ //[Newtonsoft.Json.JsonIgnore]
+ //[System.Text.Json.Serialization.JsonIgnore]
+ //[Navigate(NavigateType.OneToOne, nameof(UpdateUserId))]
+ //public virtual SysUser UpdateUser { get; set; }
+
+ /// <summary>
+ /// 淇敼鑰呭鍚�
+ /// </summary>
+ [SugarColumn(ColumnDescription = "淇敼鑰呭鍚�", Length = 64)]
+ public virtual string? UpdateUserName { get; set; }
+ }
}
diff --git a/Admin.NET/FZCZTB.TSCL.Application/FZCZTB.TSCL.Application.csproj b/Admin.NET/FZCZTB.TSCL.Application/FZCZTB.TSCL.Application.csproj
index 0d2279b..0b5a247 100644
--- a/Admin.NET/FZCZTB.TSCL.Application/FZCZTB.TSCL.Application.csproj
+++ b/Admin.NET/FZCZTB.TSCL.Application/FZCZTB.TSCL.Application.csproj
@@ -4,6 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
+ <GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup>
diff --git a/Admin.NET/FZCZTB.TSCL.Application/Service/ProcurementComplaint/Dto/ProcurementComplaintInput.cs b/Admin.NET/FZCZTB.TSCL.Application/Service/ProcurementComplaint/Dto/ProcurementComplaintInput.cs
index 547c953..750251b 100644
--- a/Admin.NET/FZCZTB.TSCL.Application/Service/ProcurementComplaint/Dto/ProcurementComplaintInput.cs
+++ b/Admin.NET/FZCZTB.TSCL.Application/Service/ProcurementComplaint/Dto/ProcurementComplaintInput.cs
@@ -113,11 +113,15 @@
/// 绾夸笂鍦板潃
/// </summary>
public string? Url { get; set; }
-
+ /// <summary>
+ /// 澶勭悊浜嬮」
+ /// </summary>
+ public List<ProcurementComplaintItems>? Complaints { get; set; }
+
/// <summary>
/// 閫変腑涓婚敭鍒楄〃
/// </summary>
- public List<Guid> SelectKeyList { get; set; }
+ public List<Guid> SelectKeyList { get; set; }
}
/// <summary>
@@ -258,7 +262,11 @@
/// </summary>
[MaxLength(255, ErrorMessage = "绾夸笂鍦板潃瀛楃闀垮害涓嶈兘瓒呰繃255")]
public string? Url { get; set; }
-
+ /// <summary>
+ /// 浜嬮」
+ /// </summary>
+ public List<ProcurementComplaintItems>? Complaints { get; set; }
+
}
/// <summary>
diff --git a/Admin.NET/FZCZTB.TSCL.Application/Service/ProcurementComplaint/Dto/ProcurementComplaintOutput.cs b/Admin.NET/FZCZTB.TSCL.Application/Service/ProcurementComplaint/Dto/ProcurementComplaintOutput.cs
index 86a7e3f..956dbe8 100644
--- a/Admin.NET/FZCZTB.TSCL.Application/Service/ProcurementComplaint/Dto/ProcurementComplaintOutput.cs
+++ b/Admin.NET/FZCZTB.TSCL.Application/Service/ProcurementComplaint/Dto/ProcurementComplaintOutput.cs
@@ -85,6 +85,8 @@
/// 淇敼鑰呭鍚�
/// </summary>
public string? UpdateUserName { get; set; }
+
+
}
diff --git a/Admin.NET/FZCZTB.TSCL.Application/Service/ProcurementComplaint/ProcurementComplaintService.cs b/Admin.NET/FZCZTB.TSCL.Application/Service/ProcurementComplaint/ProcurementComplaintService.cs
index ba9bcc3..a9dec84 100644
--- a/Admin.NET/FZCZTB.TSCL.Application/Service/ProcurementComplaint/ProcurementComplaintService.cs
+++ b/Admin.NET/FZCZTB.TSCL.Application/Service/ProcurementComplaint/ProcurementComplaintService.cs
@@ -50,8 +50,8 @@
public async Task<SqlSugarPagedList<ProcurementComplaintOutput>> Page(PageProcurementComplaintInput input)
{
input.Keyword = input.Keyword?.Trim();
- var query = _procurementComplaintRep.AsQueryable()
- .WhereIF(!string.IsNullOrWhiteSpace(input.Keyword), u => u.ProjectCode.Contains(input.Keyword) || u.ProjectName.Contains(input.Keyword) || u.Purchaser.Contains(input.Keyword) || u.ProcurementAgency.Contains(input.Keyword) || u.Complainant.Contains(input.Keyword) || u.ProcurementSupervisionDepartment.Contains(input.Keyword) || u.Url.Contains(input.Keyword))
+ var query = _procurementComplaintRep.AsQueryable().Includes(x=>x.Complaints)
+ .WhereIF(!string.IsNullOrWhiteSpace(input.Keyword), u => u.Complaints.Any(uu=>uu.ItemDescription.Contains(input.Keyword)))
.WhereIF(!string.IsNullOrWhiteSpace(input.ProjectCode), u => u.ProjectCode.Contains(input.ProjectCode.Trim()))
.WhereIF(!string.IsNullOrWhiteSpace(input.ProjectName), u => u.ProjectName.Contains(input.ProjectName.Trim()))
.WhereIF(!string.IsNullOrWhiteSpace(input.Purchaser), u => u.Purchaser.Contains(input.Purchaser.Trim()))
@@ -73,7 +73,8 @@
[ApiDescriptionSettings(Name = "Detail"), HttpGet]
public async Task<ProcurementComplaint> Detail([FromQuery] QueryByIdProcurementComplaintInput input)
{
- return await _procurementComplaintRep.GetFirstAsync(u => u.Id == input.Id);
+
+ return await _procurementComplaintRep.AsQueryable().Where(x=>x.Id==input.Id).Includes(x=>x.Complaints.OrderBy(xx=>xx.sort).ToList()).FirstAsync();
}
/// <summary>
@@ -87,6 +88,13 @@
{
var entity = input.Adapt<ProcurementComplaint>();
entity.Id = Guid.NewGuid();
+ int index = 0;
+ if (entity.Complaints != null)
+ foreach (var item in entity.Complaints)
+ {
+ item.Id = Guid.NewGuid();
+ item.sort = index++;
+ }
return await _sqlSugarClient.InsertNav(entity).Include(x=>x.Complaints).ExecuteCommandAsync();
}
@@ -101,7 +109,14 @@
public async Task Update(UpdateProcurementComplaintInput input)
{
var entity = input.Adapt<ProcurementComplaint>();
- await _procurementComplaintRep.AsUpdateable(entity)
+ int index = 0;
+ if(entity.Complaints!=null)
+ foreach (var item in entity.Complaints)
+ {
+ item.Id = Guid.NewGuid();
+ item.sort= index++;
+ }
+ await _procurementComplaintRep.AsSugarClient().UpdateNav(entity).Include(x=>x.Complaints)
.ExecuteCommandAsync();
}
@@ -167,46 +182,46 @@
/// 瀵煎叆鏀垮簻閲囪喘鎶曡瘔鏁版嵁澶勭悊璁板綍 馃捑
/// </summary>
/// <returns></returns>
- [DisplayName("瀵煎叆鏀垮簻閲囪喘鎶曡瘔鏁版嵁澶勭悊璁板綍")]
- [ApiDescriptionSettings(Name = "Import"), HttpPost, NonUnify, UnitOfWork]
- public IActionResult ImportData([Required] IFormFile file)
- {
- lock (_procurementComplaintImportLock)
- {
- var stream = ExcelHelper.ImportData<ImportProcurementComplaintInput, ProcurementComplaint>(file, (list, markerErrorAction) =>
- {
- _sqlSugarClient.Utilities.PageEach(list, 2048, pageItems =>
- {
+ //[DisplayName("瀵煎叆鏀垮簻閲囪喘鎶曡瘔鏁版嵁澶勭悊璁板綍")]
+ //[ApiDescriptionSettings(Name = "Import"), HttpPost, NonUnify, UnitOfWork]
+ //public IActionResult ImportData([Required] IFormFile file)
+ //{
+ // lock (_procurementComplaintImportLock)
+ // {
+ // var stream = ExcelHelper.ImportData<ImportProcurementComplaintInput, ProcurementComplaint>(file, (list, markerErrorAction) =>
+ // {
+ // _sqlSugarClient.Utilities.PageEach(list, 2048, pageItems =>
+ // {
- // 鏍¢獙骞惰繃婊ゅ繀濉熀鏈被鍨嬩负null鐨勫瓧娈�
- var rows = pageItems.Where(x => {
- return true;
- }).Adapt<List<ProcurementComplaint>>();
+ // // 鏍¢獙骞惰繃婊ゅ繀濉熀鏈被鍨嬩负null鐨勫瓧娈�
+ // var rows = pageItems.Where(x => {
+ // return true;
+ // }).Adapt<List<ProcurementComplaint>>();
- var storageable = _procurementComplaintRep.Context.Storageable(rows)
- .SplitError(it => string.IsNullOrWhiteSpace(it.Item.ProjectCode), "椤圭洰缂栧彿涓嶈兘涓虹┖")
- .SplitError(it => it.Item.ProjectCode?.Length > 50, "椤圭洰缂栧彿闀垮害涓嶈兘瓒呰繃50涓瓧绗�")
- .SplitError(it => string.IsNullOrWhiteSpace(it.Item.ProjectName), "椤圭洰鍚嶇О涓嶈兘涓虹┖")
- .SplitError(it => it.Item.ProjectName?.Length > 200, "椤圭洰鍚嶇О闀垮害涓嶈兘瓒呰繃200涓瓧绗�")
- .SplitError(it => string.IsNullOrWhiteSpace(it.Item.Purchaser), "閲囪喘浜轰笉鑳戒负绌�")
- .SplitError(it => it.Item.Purchaser?.Length > 100, "閲囪喘浜洪暱搴︿笉鑳借秴杩�100涓瓧绗�")
- .SplitError(it => string.IsNullOrWhiteSpace(it.Item.ProcurementAgency), "閲囪喘浠g悊鏈烘瀯涓嶈兘涓虹┖")
- .SplitError(it => it.Item.ProcurementAgency?.Length > 100, "閲囪喘浠g悊鏈烘瀯闀垮害涓嶈兘瓒呰繃100涓瓧绗�")
- .SplitError(it => it.Item.Complainant?.Length > 100, "鎶曡瘔浜洪暱搴︿笉鑳借秴杩�100涓瓧绗�")
- .SplitError(it => it.Item.ProcurementSupervisionDepartment?.Length > 100, "閲囪喘鐩戠潱閮ㄩ棬闀垮害涓嶈兘瓒呰繃100涓瓧绗�")
- .SplitError(it => it.Item.Url?.Length > 255, "绾夸笂鍦板潃闀垮害涓嶈兘瓒呰繃255涓瓧绗�")
- .SplitInsert(_ => true)
- .ToStorage();
+ // var storageable = _procurementComplaintRep.Context.Storageable(rows)
+ // .SplitError(it => string.IsNullOrWhiteSpace(it.Item.ProjectCode), "椤圭洰缂栧彿涓嶈兘涓虹┖")
+ // .SplitError(it => it.Item.ProjectCode?.Length > 50, "椤圭洰缂栧彿闀垮害涓嶈兘瓒呰繃50涓瓧绗�")
+ // .SplitError(it => string.IsNullOrWhiteSpace(it.Item.ProjectName), "椤圭洰鍚嶇О涓嶈兘涓虹┖")
+ // .SplitError(it => it.Item.ProjectName?.Length > 200, "椤圭洰鍚嶇О闀垮害涓嶈兘瓒呰繃200涓瓧绗�")
+ // .SplitError(it => string.IsNullOrWhiteSpace(it.Item.Purchaser), "閲囪喘浜轰笉鑳戒负绌�")
+ // .SplitError(it => it.Item.Purchaser?.Length > 100, "閲囪喘浜洪暱搴︿笉鑳借秴杩�100涓瓧绗�")
+ // .SplitError(it => string.IsNullOrWhiteSpace(it.Item.ProcurementAgency), "閲囪喘浠g悊鏈烘瀯涓嶈兘涓虹┖")
+ // .SplitError(it => it.Item.ProcurementAgency?.Length > 100, "閲囪喘浠g悊鏈烘瀯闀垮害涓嶈兘瓒呰繃100涓瓧绗�")
+ // .SplitError(it => it.Item.Complainant?.Length > 100, "鎶曡瘔浜洪暱搴︿笉鑳借秴杩�100涓瓧绗�")
+ // .SplitError(it => it.Item.ProcurementSupervisionDepartment?.Length > 100, "閲囪喘鐩戠潱閮ㄩ棬闀垮害涓嶈兘瓒呰繃100涓瓧绗�")
+ // .SplitError(it => it.Item.Url?.Length > 255, "绾夸笂鍦板潃闀垮害涓嶈兘瓒呰繃255涓瓧绗�")
+ // .SplitInsert(_ => true)
+ // .ToStorage();
- storageable.AsInsertable.ExecuteCommand();// 涓嶅瓨鍦ㄦ彃鍏�
- storageable.AsUpdateable.ExecuteCommand();// 瀛樺湪鏇存柊
+ // storageable.AsInsertable.ExecuteCommand();// 涓嶅瓨鍦ㄦ彃鍏�
+ // storageable.AsUpdateable.ExecuteCommand();// 瀛樺湪鏇存柊
- // 鏍囪閿欒淇℃伅
- markerErrorAction.Invoke(storageable, pageItems, rows);
- });
- });
+ // // 鏍囪閿欒淇℃伅
+ // markerErrorAction.Invoke(storageable, pageItems, rows);
+ // });
+ // });
- return stream;
- }
- }
+ // return stream;
+ // }
+ //}
}
--
Gitblit v1.9.1