diff --git a/admin.net.pro/Admin.NET/Vistar.Application/Entity/Obj81.cs b/admin.net.pro/Admin.NET/Vistar.Application/Entity/Obj81.cs new file mode 100644 index 0000000..626401f --- /dev/null +++ b/admin.net.pro/Admin.NET/Vistar.Application/Entity/Obj81.cs @@ -0,0 +1,453 @@ +// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。 +// +// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。 +// +// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! + +using Admin.NET.Core; +using SqlSugar; +using System.ComponentModel.DataAnnotations; +namespace Vistar.Application.Entity; + +/// +/// +/// +[SugarTable("Obj81","")] +[Tenant("启威星 1.94.4.74")] +public class Obj81 +{ + /// + /// + /// + [Required] + [SugarColumn(ColumnName = "idRecord", IsIdentity = true, ColumnDescription = "", IsPrimaryKey = true)] + public long idRecord { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "CheckedStatus", ColumnDescription = "")] + public bool? CheckedStatus { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "VersionIndex", ColumnDescription = "")] + public bool? VersionIndex { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "IsLatestVersion", ColumnDescription = "")] + public bool? IsLatestVersion { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "CreatedDate", ColumnDescription = "")] + public DateTime? CreatedDate { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "dateModified", ColumnDescription = "")] + public DateTime? dateModified { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "UserCreatedId", ColumnDescription = "")] + public long? UserCreatedId { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "UserModifiedId", ColumnDescription = "")] + public long? UserModifiedId { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "RecordGuid", ColumnDescription = "", Length = 40)] + public string? RecordGuid { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "isVisibilityNormal", ColumnDescription = "")] + public bool? isVisibilityNormal { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "deleted", ColumnDescription = "")] + public bool? deleted { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "SubObjectGuid", ColumnDescription = "", Length = 40)] + public string? SubObjectGuid { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "PreviousStatus", ColumnDescription = "")] + public bool? PreviousStatus { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "revision", ColumnDescription = "", Length = 50)] + public string? revision { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "Record_image160_160", ColumnDescription = "")] + public byte[]? Record_image160_160 { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "Record_Image320_240", ColumnDescription = "")] + public byte[]? Record_Image320_240 { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "Record_ImageMax", ColumnDescription = "")] + public byte[]? Record_ImageMax { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "_System_objNBS", ColumnDescription = "", Length = 100)] + public string? _System_objNBS { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "_System_ObjDescription", ColumnDescription = "", Length = 200)] + public string? _System_ObjDescription { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "_System_Effectivity_Begin", ColumnDescription = "")] + public DateTime? _System_Effectivity_Begin { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "_System_Effectivity_End", ColumnDescription = "")] + public DateTime? _System_Effectivity_End { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "CheckedOutPc", ColumnDescription = "", Length = 255)] + public string? CheckedOutPc { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "GroupObjId", ColumnDescription = "")] + public long? GroupObjId { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "EnableNotifications", ColumnDescription = "")] + public bool? EnableNotifications { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "UserId", ColumnDescription = "")] + public long? UserId { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "FirstName", ColumnDescription = "", Length = -1)] + public string? FirstName { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "LastName", ColumnDescription = "", Length = -1)] + public string? LastName { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "VersionCreatedDate", ColumnDescription = "")] + public DateTime? VersionCreatedDate { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "VersionUserCreatedId", ColumnDescription = "")] + public long? VersionUserCreatedId { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "LineManager", ColumnDescription = "")] + public long? LineManager { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "LineManager_Rec", ColumnDescription = "", Length = 40)] + public string? LineManager_Rec { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "LineManagerOther", ColumnDescription = "")] + public long? LineManagerOther { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "LineManagerOther_Rec", ColumnDescription = "", Length = 40)] + public string? LineManagerOther_Rec { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "_CheckOutInProgress", ColumnDescription = "")] + public bool? _CheckOutInProgress { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "LinkDrw", ColumnDescription = "")] + public bool? LinkDrw { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "ParentRecordGuid", ColumnDescription = "", Length = 50)] + public string? ParentRecordGuid { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "fld003866", ColumnDescription = "", Length = -1)] + public string? fld003866 { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "fld003975", ColumnDescription = "", Length = -1)] + public string? fld003975 { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "fld003976", ColumnDescription = "", Length = -1)] + public string? fld003976 { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "fld003977", ColumnDescription = "", Length = -1)] + public string? fld003977 { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "fld003978", ColumnDescription = "", Length = -1)] + public string? fld003978 { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "fld003979", ColumnDescription = "", Length = -1)] + public string? fld003979 { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "fld003980", ColumnDescription = "", Length = -1)] + public string? fld003980 { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "fld003981", ColumnDescription = "", Length = -1)] + public string? fld003981 { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "fld003982", ColumnDescription = "", Length = -1)] + public string? fld003982 { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "fld003983", ColumnDescription = "", Length = -1)] + public string? fld003983 { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "fld003984", ColumnDescription = "", Length = -1)] + public string? fld003984 { get; set; } + + /// + /// + /// + [Required] + [SugarColumn(ColumnName = "_System_ObjNbsAuto", ColumnDescription = "", Length = 50)] + public string _System_ObjNbsAuto { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "fld004216", ColumnDescription = "", Length = -1)] + public string? fld004216 { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "fld004217", ColumnDescription = "", Length = -1)] + public string? fld004217 { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "fld004218", ColumnDescription = "", Length = -1)] + public string? fld004218 { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "fld004219", ColumnDescription = "", Length = -1)] + public string? fld004219 { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "fld004220", ColumnDescription = "", Length = -1)] + public string? fld004220 { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "fld004221", ColumnDescription = "", Length = -1)] + public string? fld004221 { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "fld004222", ColumnDescription = "", Length = -1)] + public string? fld004222 { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "fld004223", ColumnDescription = "", Length = -1)] + public string? fld004223 { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "fld004224", ColumnDescription = "", Length = -1)] + public string? fld004224 { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "fld004225", ColumnDescription = "", Length = -1)] + public string? fld004225 { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "fld004226", ColumnDescription = "", Length = -1)] + public string? fld004226 { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "fld004227", ColumnDescription = "", Length = -1)] + public string? fld004227 { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "fld004228", ColumnDescription = "", Length = -1)] + public string? fld004228 { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "fld004229", ColumnDescription = "", Length = -1)] + public string? fld004229 { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "fld004230", ColumnDescription = "", Length = -1)] + public string? fld004230 { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "fld004231", ColumnDescription = "", Length = -1)] + public string? fld004231 { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "fld004232", ColumnDescription = "", Length = -1)] + public string? fld004232 { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "fld004233", ColumnDescription = "", Length = -1)] + public string? fld004233 { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "fld004234", ColumnDescription = "", Length = -1)] + public string? fld004234 { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "_System_WebLink", ColumnDescription = "", Length = 500)] + public string? _System_WebLink { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "isReleasedVersion", ColumnDescription = "")] + public bool? isReleasedVersion { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "fld004900", ColumnDescription = "", Length = -1)] + public string? fld004900 { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "fld005700", ColumnDescription = "", Length = -1)] + public string? fld005700 { get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "fld006088", ColumnDescription = "", Length = -1)] + public string? fld006088 { get; set; } + +} diff --git a/admin.net.pro/Admin.NET/Vistar.Application/Service/OaOpenInterface/Dto/OaCreateProcessInput.cs b/admin.net.pro/Admin.NET/Vistar.Application/Service/OaOpenInterface/Dto/OaCreateProcessInput.cs index 9d2165b..7c00290 100644 --- a/admin.net.pro/Admin.NET/Vistar.Application/Service/OaOpenInterface/Dto/OaCreateProcessInput.cs +++ b/admin.net.pro/Admin.NET/Vistar.Application/Service/OaOpenInterface/Dto/OaCreateProcessInput.cs @@ -54,7 +54,7 @@ public class OaCreateProcessInput public string fld005836 { get; set; } /// - /// 问题处理人员 + /// 机械问题处理人员 /// public string fld005838 { get; set; } @@ -122,4 +122,14 @@ public class OaCreateProcessInput /// 变更等级说明 /// public string fld005845 { get; set; } + + /// + /// 电气问题处理人员 + /// + public string fld006061 { get; set; } + + /// + /// 软件问题处理人员 + /// + public string fld006062 { get; set; } } diff --git a/admin.net.pro/Admin.NET/Vistar.Application/Service/OaOpenInterface/OaOpenInterfaceService.cs b/admin.net.pro/Admin.NET/Vistar.Application/Service/OaOpenInterface/OaOpenInterfaceService.cs index 3a7ae2d..a907717 100644 --- a/admin.net.pro/Admin.NET/Vistar.Application/Service/OaOpenInterface/OaOpenInterfaceService.cs +++ b/admin.net.pro/Admin.NET/Vistar.Application/Service/OaOpenInterface/OaOpenInterfaceService.cs @@ -34,19 +34,24 @@ public class OaOpenInterfaceService : IDynamicApiController, ITransient public SolidWorksManageService.SolidWorksManageService _solidWorksManageService; public SqlSugarRepository _objectFieldsGroupsRep; public SqlSugarRepository _fieldGroupDefaultRep; + public SqlSugarRepository _obj81Rep; public OaOpenInterfaceService( SqlSugarRepository obj109Rep, SqlSugarRepository obj140Rep, + SqlSugarRepository obj81Rep, SolidWorksManageService.SolidWorksManageService solidWorksManageService, SqlSugarRepository objectFieldsGroupsRep, - SqlSugarRepository fieldGroupDefaultRep) + SqlSugarRepository fieldGroupDefaultRep + + ) { _obj109Rep = obj109Rep; _obj140Rep = obj140Rep; _solidWorksManageService = solidWorksManageService; _objectFieldsGroupsRep = objectFieldsGroupsRep; _fieldGroupDefaultRep = fieldGroupDefaultRep; + _obj81Rep= obj81Rep; } /// @@ -155,7 +160,7 @@ public class OaOpenInterfaceService : IDynamicApiController, ITransient } /// - /// OA创建流程 + /// OA创建问题报告 /// /// /// @@ -175,13 +180,13 @@ public class OaOpenInterfaceService : IDynamicApiController, ITransient string.IsNullOrWhiteSpace(input.fld005836) || string.IsNullOrWhiteSpace(input.fld005842) || string.IsNullOrWhiteSpace(input.fld005847) || - string.IsNullOrWhiteSpace(input.fld005849.ToString("yyyy-MM-dd HH:mm:ss")) || + input.fld005849 == default(DateTime) || + //string.IsNullOrWhiteSpace(input.fld005849.ToString("yyyy-MM-dd HH:mm:ss")) || string.IsNullOrWhiteSpace(input.fld005850) || - string.IsNullOrWhiteSpace(input.fld005852.ToString("yyyy-MM-dd HH:mm:ss")) || + input.fld005852 == default(DateTime) || + //string.IsNullOrWhiteSpace(input.fld005852.ToString("yyyy-MM-dd HH:mm:ss")) || string.IsNullOrWhiteSpace(input.fld005853) || string.IsNullOrWhiteSpace(input.fld005854) - - ) { response.Success = true; @@ -201,11 +206,30 @@ public class OaOpenInterfaceService : IDynamicApiController, ITransient fieldList.Add(new Field { key = "fld005831", value = input.fld005831 }); fieldList.Add(new Field { key = "fld005832", value = input.fld005832 }); fieldList.Add(new Field { key = "fld005833", value = input.fld005833 }); - fieldList.Add(new Field { key = "fld005836", value = input.fld005836 }); + var responsiblePersonOaData = await _obj81Rep.AsQueryable().Where(x=>x.fld004900==input.fld005836 && x.deleted==false).ToListAsync(); + if (responsiblePersonOaData.Count!=0) + { + fieldList.Add(new Field { key = "fld005836", value = "81" }); + fieldList.Add(new Field { key = "fld005836_Rec", value = responsiblePersonOaData[0].RecordGuid }); + } + fieldList.Add(new Field { key = "fld005842", value = input.fld005842 }); - fieldList.Add(new Field { key = "fld005847", value = input.fld005847 }); + var createPersonOaData=await _obj81Rep.AsQueryable().Where(x=>x.fld004900==input.fld005847 && x.deleted==false).ToListAsync(); + if (createPersonOaData.Count!=0) + { + fieldList.Add(new Field { key = "fld005848", value = "81" }); + fieldList.Add(new Field { key = "fld005848_Rec", value = createPersonOaData[0].RecordGuid }); + } + + fieldList.Add(new Field { key = "fld005849", value = input.fld005849.ToString("yyyy-MM-dd HH:mm:ss") }); - fieldList.Add(new Field { key = "fld005850", value = input.fld005850 }); + var reviewerOaData = await _obj81Rep.AsQueryable().Where(x => x.fld004900 == input.fld005850 && x.deleted == false).ToListAsync(); + if (reviewerOaData.Count != 0) + { + fieldList.Add(new Field { key = "fld005851", value = "81" }); + fieldList.Add(new Field { key = "fld005851_Rec", value = reviewerOaData[0].RecordGuid }); + } + fieldList.Add(new Field { key = "fld005852", value = input.fld005852.ToString("yyyy-MM-dd HH:mm:ss") }); fieldList.Add(new Field { key = "fld005853", value = input.fld005853 }); fieldList.Add(new Field { key = "fld005854", value = input.fld005854 }); @@ -213,7 +237,12 @@ public class OaOpenInterfaceService : IDynamicApiController, ITransient if (!string.IsNullOrWhiteSpace(input.fld005838)) { - fieldList.Add(new Field { key = "fld005838", value = input.fld005838 }); + var mechanicalProblemHandlerOaId = await _obj81Rep.AsQueryable().Where(x => x.fld004900 == input.fld005838 && x.deleted == false).ToListAsync(); + if (mechanicalProblemHandlerOaId.Count != 0) + { + fieldList.Add(new Field { key = "fld005837", value = "81" }); + fieldList.Add(new Field { key = "fld005837_Rec", value = mechanicalProblemHandlerOaId[0].RecordGuid }); + } } if (!string.IsNullOrWhiteSpace(input.fld005841)) { @@ -235,7 +264,28 @@ public class OaOpenInterfaceService : IDynamicApiController, ITransient { fieldList.Add(new Field { key = "fld005845", value = input.fld005845 }); } - var fieldGroup = await _objectFieldsGroupsRep.AsQueryable().Where(x => x.GroupName == input.field_group && x.ObjectId==140).FirstAsync(); + + if (!string.IsNullOrWhiteSpace(input.fld006061)) + { + var electricalProblemHandlerOaData = await _obj81Rep.AsQueryable().Where(x => x.fld004900 == input.fld006061 && x.deleted == false).ToListAsync(); + if (electricalProblemHandlerOaData.Count != 0) + { + fieldList.Add(new Field { key = "fld006063", value = "81" }); + fieldList.Add(new Field { key = "fld006063_Rec", value = electricalProblemHandlerOaData[0].RecordGuid }); + } + } + + if (!string.IsNullOrWhiteSpace(input.fld006062)) + { + var softwareProblemHandlerOaData = await _obj81Rep.AsQueryable().Where(x => x.fld004900 == input.fld006062 && x.deleted == false).ToListAsync(); + if (softwareProblemHandlerOaData.Count != 0) + { + fieldList.Add(new Field { key = "fld006062", value = "81" }); + fieldList.Add(new Field { key = "fld006062_Rec", value = softwareProblemHandlerOaData[0].RecordGuid }); + } + } + + var fieldGroup = await _objectFieldsGroupsRep.AsQueryable().Where(x => x.GroupName == input.field_group && x.ObjectId == 140).FirstAsync(); var data = new CreateProjectInput { @@ -255,7 +305,8 @@ public class OaOpenInterfaceService : IDynamicApiController, ITransient await _solidWorksManageService.CheckIn(CheckData); } - else { + else + { response.Success = true; response.Message = "编码已存在"; } @@ -263,4 +314,7 @@ public class OaOpenInterfaceService : IDynamicApiController, ITransient return response; } + + + }