移除dm
This commit is contained in:
parent
1530c56654
commit
30e0143fdb
@ -40,11 +40,5 @@ namespace APT.BaseData.Domain.IServices
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
bool DrillRecordEnd(string id);
|
||||
/// <summary>
|
||||
/// 机电管理 设备设施 维保
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
bool Audit(string id);
|
||||
}
|
||||
}
|
||||
|
||||
@ -18,7 +18,6 @@ using APT.MS.Domain.Entities.SC;
|
||||
using APT.MS.Domain.Entities.CM;
|
||||
using log4net.Filter;
|
||||
using Autofac.Features.Metadata;
|
||||
using APT.MS.Domain.Entities.DM;
|
||||
|
||||
namespace APT.BaseData.Services.DomainServices
|
||||
{
|
||||
@ -224,24 +223,6 @@ namespace APT.BaseData.Services.DomainServices
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设备设施维保
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
public bool Audit(string id)
|
||||
{
|
||||
Guid GUID = new Guid(id);
|
||||
var entity = GetEntity<T_DM_DEVICE_MAINTENANCE_CHECK>(GUID);
|
||||
entity.STATUS_APPROVE = PFStandardStatus.Archived;
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
if (entity != null)
|
||||
UpdateEntityNoCommit(entity);
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 应急演练活动记录表
|
||||
/// </summary>
|
||||
|
||||
@ -10,11 +10,9 @@ using APT.BaseData.Services.Services.FM;
|
||||
using APT.Infrastructure.Api;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Entities.BS;
|
||||
using APT.MS.Domain.Entities.DM;
|
||||
using APT.MS.Domain.Entities.FO;
|
||||
using APT.MS.Domain.Entities.HM;
|
||||
using APT.MS.Domain.Entities.PF;
|
||||
using APT.MS.Domain.Entities.SC.DM;
|
||||
using APT.MS.Domain.Entities.SC.PE;
|
||||
using APT.MS.Domain.Entities.SC.PR;
|
||||
using APT.MS.Domain.Entities.SC.PT;
|
||||
@ -223,12 +221,6 @@ namespace APT.BaseData.Services.DomainServices
|
||||
case "PR/PRChangeTaskImplement/BackUpdate"://绩效测量与评估
|
||||
result = BackUpdate_PRChangeTaskImplement(DATA_ID);
|
||||
break;
|
||||
case "DM/DMDetectionInspectionRecord/BackUpdate"://绩效测量与评估
|
||||
result = BackUpdate_DMDetectionInspectionRecord(DATA_ID);
|
||||
break;
|
||||
case "DM/DMDeviceApply/BackUpdate"://绩效测量与评估
|
||||
result = BackUpdate_DMDeviceApply(DATA_ID);
|
||||
break;
|
||||
case "FO/FOJobEventRecord/BackUpdate"://绩效测量与评估
|
||||
result = BackUpdate_FOJobEventRecord(DATA_ID);
|
||||
break;
|
||||
@ -256,11 +248,6 @@ namespace APT.BaseData.Services.DomainServices
|
||||
break;
|
||||
#endregion
|
||||
|
||||
#region 机电管理
|
||||
case "DM/DMDeviceMaintenanceCheck/Audit"://设备设施 维保
|
||||
result = PFApproveCallBackMTService.Audit(DATA_ID);
|
||||
break;
|
||||
#endregion
|
||||
default:
|
||||
SysLogService.AddLog(APT.Infrastructure.Api.AppContext.CurrentSession.OrgId.Value, APT.Infrastructure.Api.AppContext.CurrentSession.UserID.Value, PFSysLogTypeEnum.CommonApproveCallBack, "PF119", "审批流回调方法未完善", "PFApproveCallBackService=>CallBack: " + CALLBACK_INTERFACE, DATA_ID);
|
||||
break;
|
||||
@ -556,18 +543,6 @@ namespace APT.BaseData.Services.DomainServices
|
||||
BackUpdate_PESafetyEvaluationPlan(listDATA_ID[i]);
|
||||
}
|
||||
break;
|
||||
case "DM/DMDetectionInspectionRecord/BackUpdate"://绩效测量与评估
|
||||
for (int i = 0; i < listDATA_ID.Count; i++)
|
||||
{
|
||||
BackUpdate_DMDetectionInspectionRecord(listDATA_ID[i]);
|
||||
}
|
||||
break;
|
||||
case "DM/DMDeviceApply/BackUpdate"://绩效测量与评估
|
||||
for (int i = 0; i < listDATA_ID.Count; i++)
|
||||
{
|
||||
BackUpdate_DMDeviceApply(listDATA_ID[i]);
|
||||
}
|
||||
break;
|
||||
case "FO/FOJobEventRecord/BackUpdate"://绩效测量与评估
|
||||
for (int i = 0; i < listDATA_ID.Count; i++)
|
||||
{
|
||||
@ -613,14 +588,6 @@ namespace APT.BaseData.Services.DomainServices
|
||||
break;
|
||||
#endregion
|
||||
|
||||
#region 机电管理
|
||||
case "DM/DMDeviceMaintenanceCheck/Audit"://设备设施 维保
|
||||
for (int i = 0; i < listDATA_ID.Count; i++)
|
||||
{
|
||||
PFApproveCallBackMTService.Audit(listDATA_ID[i]);
|
||||
}
|
||||
break;
|
||||
#endregion
|
||||
default:
|
||||
SysLogService.AddLog(APT.Infrastructure.Api.AppContext.CurrentSession.OrgId.Value, APT.Infrastructure.Api.AppContext.CurrentSession.UserID.Value, PFSysLogTypeEnum.CommonApproveCallBack, "PF119", "审批流回调方法未完善", "PFApproveCallBackService=> list CallBack: " + CALLBACK_INTERFACE, String.Join(',', listDATA_ID));
|
||||
|
||||
@ -2570,101 +2537,8 @@ namespace APT.BaseData.Services.DomainServices
|
||||
});
|
||||
return true;
|
||||
}
|
||||
private bool BackUpdate_DMDeviceApply(string id)
|
||||
{
|
||||
var entity = this.GetEntity<T_DM_DEVICE_APPLY>(id, "Nav_Details");
|
||||
entity.STATUS = PFStandardStatus.Archived;
|
||||
T_FM_NOTIFICATION_TASK sendNotice = null;
|
||||
T_DM_DEVICE_ISSUE issue = null;
|
||||
List<T_DM_DEVICE_ISSUE_DETAIL> details = new List<T_DM_DEVICE_ISSUE_DETAIL>();
|
||||
var userInfo = this.GetEntity<T_FM_PARAM_SET>(t => t.NAME == "物资管理员", "Nav_User");
|
||||
if (userInfo != null)
|
||||
{
|
||||
issue = new T_DM_DEVICE_ISSUE();
|
||||
issue.ORG_ID = entity.ORG_ID;
|
||||
issue.CODE = entity.CODE;
|
||||
issue.TIME = DateTime.Now;
|
||||
issue.STATUS = PFStandardStatus.Draft;
|
||||
issue.USER_ID = userInfo.USER_ID;
|
||||
var user = this.GetEntity<T_FM_USER>(t => t.ID == userInfo.ID && t.ENABLE_STATUS == 0);
|
||||
issue.DEPARTMENT_ID = user?.DEPARTMENT_ID;
|
||||
issue.APPLY_ID = entity.ID;
|
||||
if (entity.Nav_Details != null && entity.Nav_Details.Any())
|
||||
{
|
||||
foreach (var item in entity.Nav_Details)
|
||||
{
|
||||
T_DM_DEVICE_ISSUE_DETAIL detail = new T_DM_DEVICE_ISSUE_DETAIL();
|
||||
detail.ORG_ID = item.ORG_ID;
|
||||
detail.DEVICE_ISSUE_ID = issue.ID;
|
||||
detail.DEVICE_BASE_ID = item.DEVICE_BASE_ID;
|
||||
detail.SPEC = item.SPEC;
|
||||
detail.QTY = item.QTY;
|
||||
detail.UNIT = item.UNIT;
|
||||
detail.RETURN_TIME = item.RETURN_TIME;
|
||||
details.Add(detail);
|
||||
}
|
||||
}
|
||||
sendNotice = NotificationTaskService.InsertUserNoticeTaskModel("设备设施领用发放表", issue.ID, entity.ORG_ID, userInfo.USER_ID.Value, userInfo.Nav_User.NAME, DateTime.Now, DateTime.Now.AddDays(30), (int)FMNoticeTypeEnum.消息, "DM016");
|
||||
}
|
||||
UnifiedCommit(() =>
|
||||
{
|
||||
if (entity != null)
|
||||
this.UpdateEntityNoCommit(entity);
|
||||
if (issue != null)
|
||||
this.UpdateEntityNoCommit(issue);
|
||||
if (details != null && details.Any())
|
||||
BantchSaveEntityNoCommit(details);
|
||||
if (sendNotice != null)
|
||||
this.UpdateEntityNoCommit(sendNotice);
|
||||
});
|
||||
return true;
|
||||
}
|
||||
private bool BackUpdate_DMDetectionInspectionRecord(string id)
|
||||
{
|
||||
var entity = this.GetEntity<T_DM_DETECTION_INSPECTION_RECORD>(id, "Nav_DeviceBase", "Nav_Files");
|
||||
entity.STATUS = PFStandardStatus.Archived;
|
||||
T_DM_DEVICE_BASE_INSPECTION inspec = null;
|
||||
List<T_DM_DEVICE_BASE_INSPECTION_FILE> files = new List<T_DM_DEVICE_BASE_INSPECTION_FILE>();
|
||||
if (entity.DEVICE_BASE_ID != null && entity.Nav_DeviceBase != null)
|
||||
{
|
||||
var deviceBase = this.GetEntity<T_DM_DEVICE_BASE>(t => t.NAME == entity.Nav_DeviceBase.NAME && t.SPEC == entity.SPEC && t.MACHINE_CODE == entity.MACHINE_CODE && t.POSITION == entity.POSITION);
|
||||
if (deviceBase != null)
|
||||
{
|
||||
var cycle = this.GetEntity<T_PT_TIME_SET>(t => t.SET_TYPE == PTSetTypeEnum.Inspection);
|
||||
inspec = new T_DM_DEVICE_BASE_INSPECTION();
|
||||
inspec.ORG_ID = entity.ORG_ID;
|
||||
inspec.DEVICE_BASE_ID = deviceBase.ID;
|
||||
inspec.TIME = entity.TIME.Value;
|
||||
inspec.CYCLE = cycle == null ? 0 : cycle.PLANCHECKFREQUENCY;
|
||||
inspec.DEPARTMENT_ID = entity.DEPARTMENT_ID;
|
||||
inspec.USER_ID = entity.USER_ID;
|
||||
inspec.MECHANISM = entity.MECHANISM;
|
||||
inspec.RESULT = entity.RESULT;
|
||||
if (entity.Nav_Files != null && entity.Nav_Files.Any())
|
||||
{
|
||||
foreach (var item in entity.Nav_Files)
|
||||
{
|
||||
T_DM_DEVICE_BASE_INSPECTION_FILE file = new T_DM_DEVICE_BASE_INSPECTION_FILE();
|
||||
file.ORG_ID = item.ORG_ID;
|
||||
file.PARENT_ID = inspec.ID;
|
||||
file.IMG_FILE_ID = item.IMG_FILE_ID;
|
||||
files.Add(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
UnifiedCommit(() =>
|
||||
{
|
||||
if (entity != null)
|
||||
this.UpdateEntityNoCommit(entity);
|
||||
if (inspec != null)
|
||||
this.UpdateEntityNoCommit(inspec);
|
||||
if (files != null && files.Any())
|
||||
this.BantchSaveEntityNoCommit(files);
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
private bool BackUpdate_PRChangeTaskImplement(string id)
|
||||
{
|
||||
var entity = this.GetEntity<T_PR_CHANGE_TASK_IMPLEMENT>(id, "Nav_Change");
|
||||
|
||||
75602
APT.Data.Migrations/Migrations/20240130031513_wjn202401-3001.Designer.cs
generated
Normal file
75602
APT.Data.Migrations/Migrations/20240130031513_wjn202401-3001.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
11088
APT.Data.Migrations/Migrations/20240130031513_wjn202401-3001.cs
Normal file
11088
APT.Data.Migrations/Migrations/20240130031513_wjn202401-3001.cs
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -18,8 +18,6 @@ using APT.MS.Domain.Entities.HM;
|
||||
using APT.MS.Domain.Entities.BI;
|
||||
using APT.MS.Domain.Entities.SC.BI;
|
||||
using APT.MS.Domain.Entities.CM;
|
||||
using APT.MS.Domain.Entities.DM;
|
||||
using APT.MS.Domain.Entities.SC.DM;
|
||||
using APT.MS.Domain.Entities.SC;
|
||||
using APT.MS.Domain.Entities.OG;
|
||||
using APT.MS.Domain.Entities.SC.PM;
|
||||
@ -4063,452 +4061,6 @@ builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelet
|
||||
builder.HasOne(t => t.Nav_UrgentEvent).WithMany(t=>t.Nav_ListEventRiskType).HasForeignKey(t => t.URGENT_EVENT_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_RiskType).WithMany().HasForeignKey(t => t.RISK_TYPE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region Category
|
||||
public partial class DMCategoryMap :APTEntityBaseMap<T_DM_CATEGORY>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_DM_CATEGORY> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.Property(t => t.NAME).HasMaxLength(200);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region DetectionInspectionRecord
|
||||
public partial class DMDetectionInspectionRecordMap :APTEntityBaseMap<T_DM_DETECTION_INSPECTION_RECORD>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_DM_DETECTION_INSPECTION_RECORD> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_DeviceBase).WithMany().HasForeignKey(t => t.DEVICE_BASE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.Property(t => t.SPEC).HasMaxLength(500);
|
||||
builder.Property(t => t.MACHINE_CODE).HasMaxLength(500);
|
||||
builder.Property(t => t.POSITION).HasMaxLength(500);
|
||||
builder.Property(t => t.MECHANISM).HasMaxLength(500);
|
||||
builder.Property(t => t.QUALIFICATION).HasMaxLength(500);
|
||||
builder.Ignore(t => t.PUBLISH);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region DetectionInspectionRecordFile
|
||||
public partial class DMDetectionInspectionRecordFileMap :APTEntityBaseMap<T_DM_DETECTION_INSPECTION_RECORD_FILE>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_DM_DETECTION_INSPECTION_RECORD_FILE> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_Record).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.DEVICE_RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region DeviceApply
|
||||
public partial class DMDeviceApplyMap :APTEntityBaseMap<T_DM_DEVICE_APPLY>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_DM_DEVICE_APPLY> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.Property(t => t.CODE).HasMaxLength(500);
|
||||
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.Ignore(t => t.PUBLISH);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region DeviceApplyDetail
|
||||
public partial class DMDeviceApplyDetailMap :APTEntityBaseMap<T_DM_DEVICE_APPLY_DETAIL>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_DM_DEVICE_APPLY_DETAIL> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_Apply).WithMany(t=>t.Nav_Details).HasForeignKey(t => t.DEVICE_APPLY_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_DeviceBase).WithMany().HasForeignKey(t => t.DEVICE_BASE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.Property(t => t.SPEC).HasMaxLength(500);
|
||||
builder.Property(t => t.UNIT).HasMaxLength(500);
|
||||
builder.Property(t => t.USE).HasMaxLength(500);
|
||||
builder.Property(t => t.DAY).HasMaxLength(500);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region DeviceBase
|
||||
public partial class DMDeviceBaseMap :APTEntityBaseMap<T_DM_DEVICE_BASE>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_DM_DEVICE_BASE> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.Property(t => t.CODE).HasMaxLength(500);
|
||||
builder.Property(t => t.NAME).HasMaxLength(500);
|
||||
builder.Property(t => t.MACHINE_CODE).HasMaxLength(500);
|
||||
builder.HasOne(t => t.Nav_Category).WithMany().HasForeignKey(t => t.CATEGORY_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_Type).WithMany().HasForeignKey(t => t.TYPE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.Property(t => t.SPEC).HasMaxLength(500);
|
||||
builder.Property(t => t.UNIT).HasMaxLength(500);
|
||||
builder.Property(t => t.PURPOSE).HasMaxLength(500);
|
||||
builder.Property(t => t.POSITION).HasMaxLength(500);
|
||||
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.Property(t => t.PARAMETER).HasMaxLength(500);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region DeviceBaseCheck
|
||||
public partial class DMDeviceBaseCheckMap :APTEntityBaseMap<T_DM_DEVICE_BASE_CHECK>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_DM_DEVICE_BASE_CHECK> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_DeviceBase).WithMany(t=>t.Nav_ListCheck).HasForeignKey(t => t.DEVICEBASE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.Property(t => t.RUNDATA).HasMaxLength(500);
|
||||
builder.Property(t => t.ITEM1).HasMaxLength(200);
|
||||
builder.Property(t => t.ITEM2).HasMaxLength(500);
|
||||
builder.Property(t => t.ITEM3).HasMaxLength(300);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region DeviceBaseCheckUser
|
||||
public partial class DMDeviceBaseCheckUserMap :APTEntityBaseMap<T_DM_DEVICE_BASE_CHECK_USER>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_DM_DEVICE_BASE_CHECK_USER> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_DeviceBaseCheck).WithMany(t=>t.Nav_ListUser).HasForeignKey(t => t.BASECHECK_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region DeviceBaseFile
|
||||
public partial class DMDeviceBaseFileMap :APTEntityBaseMap<T_DM_DEVICE_BASE_FILE>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_DM_DEVICE_BASE_FILE> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_DeviceBase).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.DEVICE_BASE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region DeviceBaseInspection
|
||||
public partial class DMDeviceBaseInspectionMap :APTEntityBaseMap<T_DM_DEVICE_BASE_INSPECTION>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_DM_DEVICE_BASE_INSPECTION> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_DeviceBase).WithMany(t=>t.Nav_Inspection).HasForeignKey(t => t.DEVICE_BASE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.Property(t => t.MECHANISM).HasMaxLength(500);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region DeviceBaseInspectionFile
|
||||
public partial class DMDeviceBaseInspectionFileMap :APTEntityBaseMap<T_DM_DEVICE_BASE_INSPECTION_FILE>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_DM_DEVICE_BASE_INSPECTION_FILE> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_Parent).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.PARENT_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region DeviceBaseOverhaul
|
||||
public partial class DMDeviceBaseOverhaulMap :APTEntityBaseMap<T_DM_DEVICE_BASE_OVERHAUL>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_DM_DEVICE_BASE_OVERHAUL> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_DeviceBase).WithMany(t=>t.Nav_Overhaul).HasForeignKey(t => t.DEVICE_BASE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.Property(t => t.MALFUCTION).HasMaxLength(500);
|
||||
builder.Property(t => t.DESCRIPTION).HasMaxLength(500);
|
||||
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.Property(t => t.EXTERNAL_SUPPORT).HasMaxLength(500);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region DeviceBaseOverhaulFile
|
||||
public partial class DMDeviceBaseOverhaulFileMap :APTEntityBaseMap<T_DM_DEVICE_BASE_OVERHAUL_FILE>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_DM_DEVICE_BASE_OVERHAUL_FILE> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_FileParent).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.FILE_PARENT_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region DeviceBasePurchase
|
||||
public partial class DMDeviceBasePurchaseMap :APTEntityBaseMap<T_DM_DEVICE_BASE_PURCHASE>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_DM_DEVICE_BASE_PURCHASE> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_DeviceBase).WithMany(t=>t.Nav_Purchases).HasForeignKey(t => t.DEVICE_BASE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.Property(t => t.SUPPLIER).HasMaxLength(500);
|
||||
builder.Property(t => t.MANUFACTURER).HasMaxLength(500);
|
||||
builder.Property(t => t.SERVICE_LIFE).HasMaxLength(500);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region DeviceCheck
|
||||
public partial class DMDeviceCheckMap :APTEntityBaseMap<T_DM_DEVICE_CHECK>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_DM_DEVICE_CHECK> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.Property(t => t.CODE).HasMaxLength(50);
|
||||
builder.Property(t => t.NAME).HasMaxLength(300);
|
||||
builder.Property(t => t.TEAM_NAME).HasMaxLength(200);
|
||||
builder.HasOne(t => t.Nav_Scheduling).WithMany().HasForeignKey(t => t.SCHEDULIN_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_DeviceBase).WithMany().HasForeignKey(t => t.DEVICEBASE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.Property(t => t.MACHINE_NAME).HasMaxLength(200);
|
||||
builder.Property(t => t.SPEC).HasMaxLength(100);
|
||||
builder.Property(t => t.MACHINE_CODE).HasMaxLength(100);
|
||||
builder.Property(t => t.POSITION_NAME).HasMaxLength(200);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region DeviceCheckDetail
|
||||
public partial class DMDeviceCheckDetailMap :APTEntityBaseMap<T_DM_DEVICE_CHECK_DETAIL>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_DM_DEVICE_CHECK_DETAIL> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_DeviceCheck).WithMany(t=>t.Nav_ListDetail).HasForeignKey(t => t.DEVICE_CHECK_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_BaseCheck).WithMany().HasForeignKey(t => t.BASECHECK_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.Property(t => t.ITEM1).HasMaxLength(200);
|
||||
builder.Property(t => t.ITEM2).HasMaxLength(500);
|
||||
builder.Property(t => t.ITEM3).HasMaxLength(300);
|
||||
builder.Property(t => t.DESCRIPTION).HasMaxLength(300);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region DeviceCheckFile
|
||||
public partial class DMDeviceCheckFileMap :APTEntityBaseMap<T_DM_DEVICE_CHECK_FILE>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_DM_DEVICE_CHECK_FILE> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_Check).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.CHECK_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region DeviceCheckType
|
||||
public partial class DMDeviceCheckTypeMap :APTEntityBaseMap<T_DM_DEVICE_CHECK_TYPE>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_DM_DEVICE_CHECK_TYPE> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.Property(t => t.CODE).HasMaxLength(50);
|
||||
builder.Property(t => t.NAME).HasMaxLength(500);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region DeviceCheckUser
|
||||
public partial class DMDeviceCheckUserMap :APTEntityBaseMap<T_DM_DEVICE_CHECK_USER>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_DM_DEVICE_CHECK_USER> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_Check).WithMany(t=>t.Nav_ListUser).HasForeignKey(t => t.CHECK_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region DeviceIssue
|
||||
public partial class DMDeviceIssueMap :APTEntityBaseMap<T_DM_DEVICE_ISSUE>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_DM_DEVICE_ISSUE> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.Property(t => t.CODE).HasMaxLength(500);
|
||||
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.Ignore(t => t.PUBLISH);
|
||||
builder.HasOne(t => t.Nav_Apply).WithMany().HasForeignKey(t => t.APPLY_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region DeviceIssueDetail
|
||||
public partial class DMDeviceIssueDetailMap :APTEntityBaseMap<T_DM_DEVICE_ISSUE_DETAIL>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_DM_DEVICE_ISSUE_DETAIL> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_Issue).WithMany(t=>t.Nav_Details).HasForeignKey(t => t.DEVICE_ISSUE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_DeviceBase).WithMany().HasForeignKey(t => t.DEVICE_BASE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.Property(t => t.SPEC).HasMaxLength(500);
|
||||
builder.Property(t => t.UNIT).HasMaxLength(500);
|
||||
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region DeviceMaintenanceCheck
|
||||
public partial class DMDeviceMaintenanceCheckMap :APTEntityBaseMap<T_DM_DEVICE_MAINTENANCE_CHECK>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_DM_DEVICE_MAINTENANCE_CHECK> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.Property(t => t.CODE).HasMaxLength(50);
|
||||
builder.Property(t => t.NAME).HasMaxLength(200);
|
||||
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_Approve).WithMany().HasForeignKey(t => t.APPROVE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region DeviceMaintenanceCheckDetail
|
||||
public partial class DMDeviceMaintenanceCheckDetailMap :APTEntityBaseMap<T_DM_DEVICE_MAINTENANCE_CHECK_DETAIL>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_DM_DEVICE_MAINTENANCE_CHECK_DETAIL> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_Plan).WithMany().HasForeignKey(t => t.PLANID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_Check).WithMany(t=>t.Nav_ListDetail).HasForeignKey(t => t.CHECK_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_DeviceBase).WithMany().HasForeignKey(t => t.DEVICEBASE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.Property(t => t.MACHINE_NAME).HasMaxLength(200);
|
||||
builder.Property(t => t.SPEC).HasMaxLength(200);
|
||||
builder.Property(t => t.POSITION).HasMaxLength(200);
|
||||
builder.Property(t => t.CONTENT).HasMaxLength(500);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region DeviceMaintenanceCheckUser
|
||||
public partial class DMDeviceMaintenanceCheckUserMap :APTEntityBaseMap<T_DM_DEVICE_MAINTENANCE_CHECK_USER>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_DM_DEVICE_MAINTENANCE_CHECK_USER> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_Check).WithMany(t=>t.Nav_ListUser).HasForeignKey(t => t.CHECK_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region DeviceMaintenancePlan
|
||||
public partial class DMDeviceMaintenancePlanMap :APTEntityBaseMap<T_DM_DEVICE_MAINTENANCE_PLAN>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_DM_DEVICE_MAINTENANCE_PLAN> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.Property(t => t.CODE).HasMaxLength(50);
|
||||
builder.Property(t => t.NAME).HasMaxLength(200);
|
||||
builder.HasOne(t => t.Nav_Category).WithMany().HasForeignKey(t => t.CATEGORY_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_DeviceBase).WithMany(t=>t.Nav_ListMaintenance).HasForeignKey(t => t.DEVICEBASE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.Property(t => t.MACHINE_NAME).HasMaxLength(200);
|
||||
builder.Property(t => t.SPEC).HasMaxLength(200);
|
||||
builder.Property(t => t.POSITION).HasMaxLength(200);
|
||||
builder.Property(t => t.CONTENT).HasMaxLength(500);
|
||||
builder.Property(t => t.RUNDATA).HasMaxLength(500);
|
||||
builder.HasOne(t => t.Nav_Approve).WithMany().HasForeignKey(t => t.APPROVE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region DeviceMaintenancePplanFile
|
||||
public partial class DMDeviceMaintenancePplanFileMap :APTEntityBaseMap<T_DM_DEVICE_MAINTENANCE_PPLAN_FILE>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_DM_DEVICE_MAINTENANCE_PPLAN_FILE> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_Plan).WithMany(t=>t.Nav_FilesPlan).HasForeignKey(t => t.PLAN_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region DeviceMaintenancePlanUser
|
||||
public partial class DMDeviceMaintenancePlanUserMap :APTEntityBaseMap<T_DM_DEVICE_MAINTENANCE_PLAN_USER>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_DM_DEVICE_MAINTENANCE_PLAN_USER> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_Plan).WithMany(t=>t.Nav_ListUser).HasForeignKey(t => t.PLAN_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region DeviceMaintenancePlanFile
|
||||
public partial class DMDeviceMaintenancePlanFileMap :APTEntityBaseMap<T_DM_DEVICE_MAINTENANCE_PLAN_FILE>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_DM_DEVICE_MAINTENANCE_PLAN_FILE> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_Plan).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.PLAN_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region DeviceOverhaul
|
||||
public partial class DMDeviceOverhaulMap :APTEntityBaseMap<T_DM_DEVICE_OVERHAUL>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_DM_DEVICE_OVERHAUL> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.Property(t => t.CODE).HasMaxLength(500);
|
||||
builder.Property(t => t.EXTERNAL_SUPPORT).HasMaxLength(500);
|
||||
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_Device).WithMany().HasForeignKey(t => t.DEVICE_BASE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.Property(t => t.MACHINE_NAME).HasMaxLength(500);
|
||||
builder.Property(t => t.SPEC).HasMaxLength(500);
|
||||
builder.Property(t => t.MACHINE_CODE).HasMaxLength(500);
|
||||
builder.Property(t => t.POSITION).HasMaxLength(500);
|
||||
builder.Property(t => t.MALFUCTION).HasMaxLength(500);
|
||||
builder.Property(t => t.DESCRIPTION).HasMaxLength(500);
|
||||
builder.HasOne(t => t.Nav_Repair).WithMany().HasForeignKey(t => t.REPAIR_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.Ignore(t => t.PUBLISH);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region DeviceOverhaulFile
|
||||
public partial class DMDeviceOverhaulFileMap :APTEntityBaseMap<T_DM_DEVICE_OVERHAUL_FILE>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_DM_DEVICE_OVERHAUL_FILE> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_Overhaul).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.OVERHAUL_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region DeviceRepair
|
||||
public partial class DMDeviceRepairMap :APTEntityBaseMap<T_DM_DEVICE_REPAIR>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_DM_DEVICE_REPAIR> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.Property(t => t.CODE).HasMaxLength(50);
|
||||
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_Device).WithMany().HasForeignKey(t => t.DEVICE_BASE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.Property(t => t.MACHINE_NAME).HasMaxLength(500);
|
||||
builder.Property(t => t.SPEC).HasMaxLength(500);
|
||||
builder.Property(t => t.MACHINE_CODE).HasMaxLength(500);
|
||||
builder.Property(t => t.POSITION).HasMaxLength(500);
|
||||
builder.Property(t => t.DESCRPTION).HasMaxLength(500);
|
||||
builder.HasOne(t => t.Nav_Repair_Charge_User).WithMany().HasForeignKey(t => t.REPAIR_CHARGE_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_Repair_User).WithMany().HasForeignKey(t => t.REPAIR_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.Ignore(t => t.PUBLISH);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region DeviceRepairFile
|
||||
public partial class DMDeviceRepairFileMap :APTEntityBaseMap<T_DM_DEVICE_REPAIR_FILE>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_DM_DEVICE_REPAIR_FILE> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_Repair).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.REPAIR_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region Type
|
||||
public partial class DMTypeMap :APTEntityBaseMap<T_DM_TYPE>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_DM_TYPE> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.Property(t => t.NAME).HasMaxLength(500);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region MtConfig
|
||||
|
||||
@ -1,27 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.BaseData.Domain.Enums;
|
||||
using APT.Infrastructure.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace APT.MS.Domain.Entities.DM
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备检查库系统分类
|
||||
/// </summary>
|
||||
[Description("设备检查库系统分类")]
|
||||
public class T_DM_CATEGORY : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
[Description("名称")]
|
||||
[FormFieldTable]
|
||||
[FormFieldEdit]
|
||||
[FormFieldQuery]
|
||||
[DataFieldLength(200)]
|
||||
public string NAME { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,63 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.BaseData.Domain.Enums.PF;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Entities.DM;
|
||||
using APT.MS.Domain.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Text;
|
||||
|
||||
namespace APT.MS.Domain.Entities.SC.DM
|
||||
{
|
||||
[Description("设备检测检验记录")]
|
||||
public class T_DM_DETECTION_INSPECTION_RECORD : MesEntityBase
|
||||
{
|
||||
[Description("时间")]
|
||||
public DateTime? TIME { get; set; }
|
||||
[Description("责任部门")]
|
||||
[DataFieldForeignKey("Nav_Department")]
|
||||
public Guid? DEPARTMENT_ID { get; set; }
|
||||
[Description("责任部门")]
|
||||
public T_FM_DEPARTMENT Nav_Department { get; set; }
|
||||
|
||||
[Description("责任人员")]
|
||||
[DataFieldForeignKey("Nav_User")]
|
||||
public Guid? USER_ID { get; set; }
|
||||
[Description("责任人员")]
|
||||
public T_FM_USER Nav_User { get; set; }
|
||||
|
||||
[Description("设备设施库")]
|
||||
[DataFieldForeignKey("Nav_DeviceBase")]
|
||||
public Guid? DEVICE_BASE_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 导航属性:设备设施库
|
||||
/// </summary>
|
||||
[Description("导航属性:设备设施库")]
|
||||
public T_DM_DEVICE_BASE Nav_DeviceBase { get; set; }
|
||||
[Description("规格")]
|
||||
public string SPEC { get; set; }
|
||||
[Description("设备设施编号")]
|
||||
public string MACHINE_CODE { get; set; }
|
||||
[Description("设备设施位置")]
|
||||
public string POSITION { get; set; }
|
||||
[Description("检测检验结果")]
|
||||
[EnumName("DMInspectionResultEnum")]
|
||||
public DMInspectionResultEnum RESULT { get; set; }
|
||||
[Description("检测检验机构")]
|
||||
public string MECHANISM { get; set; }
|
||||
[Description("检测检验资质")]
|
||||
public string QUALIFICATION { get; set; }
|
||||
|
||||
[Description("设施设备细表")]
|
||||
public ICollection<T_DM_DETECTION_INSPECTION_RECORD_FILE> Nav_Files { get; set; }
|
||||
|
||||
[Description("状态")]
|
||||
[EnumName("PFStandardStatus")]
|
||||
public PFStandardStatus STATUS { get; set; }
|
||||
|
||||
[Description("是否发布")]
|
||||
[DataFieldIngore]
|
||||
public string PUBLISH { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,30 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.Infrastructure.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Text;
|
||||
|
||||
namespace APT.MS.Domain.Entities.SC.DM
|
||||
{
|
||||
[Description("检测检验附件")]
|
||||
public class T_DM_DETECTION_INSPECTION_RECORD_FILE : MesEntityBase
|
||||
{
|
||||
[Description("检测检验")]
|
||||
[DataFieldForeignKey("Nav_Record", "Nav_Files")]
|
||||
public Guid DEVICE_RECORD_ID { get; set; }
|
||||
|
||||
[Description("检测检验")]
|
||||
public virtual T_DM_DETECTION_INSPECTION_RECORD Nav_Record { get; set; }
|
||||
|
||||
[Description("文件")]
|
||||
[DataFieldForeignKey("Nav_ImgFile")]
|
||||
public Guid IMG_FILE_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 导航属性:文件
|
||||
/// </summary>
|
||||
[Description("导航属性:文件")]
|
||||
public T_PF_IMG_FILE Nav_ImgFile { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,41 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.BaseData.Domain.Enums.PF;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Entities.SC.PR;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Text;
|
||||
|
||||
namespace APT.MS.Domain.Entities.SC.DM
|
||||
{
|
||||
[Description("设备设施申领")]
|
||||
public class T_DM_DEVICE_APPLY : MesEntityBase
|
||||
{
|
||||
[Description("编号")]
|
||||
public string CODE { get; set; }
|
||||
[Description("申请时间")]
|
||||
public DateTime? TIME { get; set; }
|
||||
|
||||
[Description("申请部门")]
|
||||
[DataFieldForeignKey("Nav_Department")]
|
||||
public Guid? DEPARTMENT_ID { get; set; }
|
||||
[Description("申请部门")]
|
||||
public T_FM_DEPARTMENT Nav_Department { get; set; }
|
||||
|
||||
[Description("申请人员")]
|
||||
[DataFieldForeignKey("Nav_User")]
|
||||
public Guid? USER_ID { get; set; }
|
||||
[Description("申请人员")]
|
||||
public T_FM_USER Nav_User { get; set; }
|
||||
[Description("设施设备细表")]
|
||||
public ICollection<T_DM_DEVICE_APPLY_DETAIL> Nav_Details { get; set; }
|
||||
[Description("状态")]
|
||||
[EnumName("PFStandardStatus")]
|
||||
public PFStandardStatus STATUS { get; set; }
|
||||
|
||||
[Description("是否发布")]
|
||||
[DataFieldIngore]
|
||||
public string PUBLISH { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,52 +0,0 @@
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Entities.DM;
|
||||
using APT.MS.Domain.Entities.SC.PR;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Text;
|
||||
|
||||
namespace APT.MS.Domain.Entities.SC.DM
|
||||
{
|
||||
[Description("设备设施申领细表")]
|
||||
public class T_DM_DEVICE_APPLY_DETAIL : MesEntityBase
|
||||
{
|
||||
[Description("设备设施申领")]
|
||||
[DataFieldForeignKey("Nav_Apply", "Nav_Details")]
|
||||
public Guid DEVICE_APPLY_ID { get; set; }
|
||||
|
||||
[Description("设备设施申领")]
|
||||
public virtual T_DM_DEVICE_APPLY Nav_Apply { get; set; }
|
||||
|
||||
[Description("序号")]
|
||||
public int? NUM { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备设施库
|
||||
/// </summary>
|
||||
[Description("设备设施库")]
|
||||
[DataFieldForeignKey("Nav_DeviceBase")]
|
||||
public Guid DEVICE_BASE_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 导航属性:设备设施库
|
||||
/// </summary>
|
||||
[Description("导航属性:设备设施库")]
|
||||
public T_DM_DEVICE_BASE Nav_DeviceBase { get; set; }
|
||||
|
||||
[Description("规格")]
|
||||
public string SPEC { get; set; }
|
||||
|
||||
[Description("领用量")]
|
||||
public int QTY { get; set; }
|
||||
[Description("单位")]
|
||||
public string UNIT { get; set; }
|
||||
|
||||
[Description("用途")]
|
||||
public string USE { get; set; }
|
||||
|
||||
[Description("领用期限")]
|
||||
public string DAY { get; set; }
|
||||
[Description("归还日期")]
|
||||
public DateTime? RETURN_TIME { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,215 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace APT.MS.Domain.Entities.DM
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备设施库
|
||||
/// </summary>
|
||||
[Description("设备设施库")]
|
||||
public class T_DM_DEVICE_BASE : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 编码
|
||||
/// </summary>
|
||||
[Description("编码")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
public string CODE { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
[Description("名称")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
public string NAME { get; set; }
|
||||
/// <summary>
|
||||
/// 内部编码
|
||||
/// </summary>
|
||||
[Description("内部编码")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
public string MACHINE_CODE { get; set; }
|
||||
/// <summary>
|
||||
/// TPMID
|
||||
/// </summary>
|
||||
[Description("TPMID")]
|
||||
public Guid? TPM_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 系统分类
|
||||
/// </summary>
|
||||
[Description("系统分类")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
[DataFieldForeignKey("Nav_Category")]
|
||||
public Guid? CATEGORY_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 系统分类
|
||||
/// </summary>
|
||||
[Description("系统分类")]
|
||||
public T_DM_CATEGORY Nav_Category { get; set; }
|
||||
/// <summary>
|
||||
/// 类型
|
||||
/// </summary>
|
||||
[Description("类型")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
[DataFieldForeignKey("Nav_Type")]
|
||||
public Guid? TYPE_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 类型
|
||||
/// </summary>
|
||||
[Description("类型")]
|
||||
public T_DM_TYPE Nav_Type { get; set; }
|
||||
/// <summary>
|
||||
///是否应急物资
|
||||
/// </summary>
|
||||
[Description("是否应急物资")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
public bool IS_EMERGENCY { get; set; }
|
||||
/// <summary>
|
||||
///规格
|
||||
/// </summary>
|
||||
[Description("规格")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
public string SPEC { get; set; }
|
||||
/// <summary>
|
||||
///数量
|
||||
/// </summary>
|
||||
[Description("数量")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
public int QTY { get; set; }
|
||||
/// <summary>
|
||||
///单位
|
||||
/// </summary>
|
||||
[Description("单位")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
public string UNIT { get; set; }
|
||||
/// <summary>
|
||||
///用途
|
||||
/// </summary>
|
||||
[Description("用途")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
public string PURPOSE { get; set; }
|
||||
/// <summary>
|
||||
///存放位置
|
||||
/// </summary>
|
||||
[Description("存放位置")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
public string POSITION { get; set; }
|
||||
/// <summary>
|
||||
///管理部门
|
||||
/// </summary>
|
||||
[Description("管理部门")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
[DataFieldForeignKey("Nav_Department")]
|
||||
public Guid? DEPARTMENT_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 管理部门
|
||||
/// </summary>
|
||||
[Description("管理部门")]
|
||||
public T_FM_DEPARTMENT Nav_Department { get; set; }
|
||||
/// <summary>
|
||||
///管理责任人
|
||||
/// </summary>
|
||||
[Description("管理责任人")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
[DataFieldForeignKey("Nav_User")]
|
||||
public Guid? USER_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 管理责任人
|
||||
/// </summary>
|
||||
[Description("管理责任人")]
|
||||
public T_FM_USER Nav_User { get; set; }
|
||||
/// <summary>
|
||||
///主要技术参数
|
||||
/// </summary>
|
||||
[Description("主要技术参数")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
public string PARAMETER { get; set; }
|
||||
/// <summary>
|
||||
/// 类别 :设备、设施、其他
|
||||
/// </summary>
|
||||
[Description("类别")]
|
||||
[EnumName("DMDeviceTypeEnum")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
public DMDeviceTypeEnum DEVICE_TYPE { get; set; }
|
||||
/// <summary>
|
||||
/// 是否已发送
|
||||
/// </summary>
|
||||
[Description("是否已发送")]
|
||||
public int IS_SEND { get; set; }
|
||||
/// <summary>
|
||||
/// 附件
|
||||
/// </summary>
|
||||
[Description("附件")]
|
||||
public List<T_DM_DEVICE_BASE_FILE> Nav_Files { get; set; }
|
||||
/// <summary>
|
||||
/// 采购
|
||||
/// </summary>
|
||||
[Description("采购")]
|
||||
[FormFieldEdit]
|
||||
public ICollection<T_DM_DEVICE_BASE_PURCHASE> Nav_Purchases { get; set; }
|
||||
/// <summary>
|
||||
/// 设备设施点检(有关联)
|
||||
/// </summary>
|
||||
[Description("设备设施点检")]
|
||||
public ICollection<T_DM_DEVICE_BASE_CHECK> Nav_ListCheck { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备设施巡检(没有关联)
|
||||
/// </summary>
|
||||
[Description("设备设施巡检")]
|
||||
public ICollection<T_DM_DEVICE_BASE_CHECK> Nav_ListCheckCircle { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 设备设施维保
|
||||
/// </summary>
|
||||
[Description("设备设施维保")]
|
||||
public ICollection<T_DM_DEVICE_MAINTENANCE_PLAN> Nav_ListMaintenance { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 检修记录
|
||||
/// </summary>
|
||||
[Description("检修记录")]
|
||||
[FormFieldEdit]
|
||||
public ICollection<T_DM_DEVICE_BASE_OVERHAUL> Nav_Overhaul { get; set; }
|
||||
/// <summary>
|
||||
/// 检验检测
|
||||
/// </summary>
|
||||
[Description("检验检测")]
|
||||
[FormFieldEdit]
|
||||
public ICollection<T_DM_DEVICE_BASE_INSPECTION> Nav_Inspection { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,112 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace APT.MS.Domain.Entities.DM
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备设施点检、巡检 检查明细
|
||||
/// </summary>
|
||||
[Description("设备设施检查明细")]
|
||||
public class T_DM_DEVICE_BASE_CHECK : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备设施库
|
||||
/// </summary>
|
||||
[Description("设备设施库")]
|
||||
[DataFieldForeignKey("Nav_DeviceBase", "Nav_ListCheck")]
|
||||
public Guid DEVICEBASE_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 导航属性:设备设施库
|
||||
/// </summary>
|
||||
[Description("导航属性:设备设施库")]
|
||||
public T_DM_DEVICE_BASE Nav_DeviceBase { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 检查类型
|
||||
/// </summary>
|
||||
[Description("检查类型")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
public CheckType CHECKTYPE { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 点检时间
|
||||
/// </summary>
|
||||
[Description("点检时间")]
|
||||
[FormFieldEdit]
|
||||
public DateTime CHECKTIME { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 检查周期
|
||||
/// </summary>
|
||||
[Description("检查周期")]
|
||||
[FormFieldTable]
|
||||
[FormFieldEdit]
|
||||
[FormFieldQuery]
|
||||
public BSPLANCHECKFREQUENCYEnum? PLANCHECKFREQUENCY { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 检查日期(日期 针对单次 有效) 例如:05-01,12-01
|
||||
/// </summary>
|
||||
[Description("检查日期")]
|
||||
[FormFieldEdit]
|
||||
public string RUNDATA { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 触发频率(日 针对每月/每季 有效)
|
||||
/// </summary>
|
||||
[Description("日")]
|
||||
[FormFieldEdit]
|
||||
public int? DATA { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 触发频率(星期 针对每周 有效)
|
||||
/// </summary>
|
||||
[Description("星期")]
|
||||
[FormFieldEdit]
|
||||
public WEEKDATAEnum? WEEKDATA { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 点检部位
|
||||
/// </summary>
|
||||
[Description("点检部位")]
|
||||
[DataFieldLength(200)]
|
||||
[FormFieldEdit]
|
||||
public string ITEM1 { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 点检内容
|
||||
/// </summary>
|
||||
[Description("点检内容")]
|
||||
[DataFieldLength(500)]
|
||||
[FormFieldEdit]
|
||||
public string ITEM2 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 点检标准
|
||||
/// </summary>
|
||||
[Description("点检标准")]
|
||||
[DataFieldLength(300)]
|
||||
[FormFieldEdit]
|
||||
public string ITEM3 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 点检人
|
||||
/// </summary>
|
||||
[Description("点检人")]
|
||||
public virtual ICollection<T_DM_DEVICE_BASE_CHECK_USER> Nav_ListUser { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 序号
|
||||
/// </summary>
|
||||
[Description("序号")]
|
||||
public int ROW_NO { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,48 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Enums;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace APT.MS.Domain.Entities.DM
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备设施点检、巡检 检查明细 点检人
|
||||
/// </summary>
|
||||
[Description("设备设施检查点检人")]
|
||||
public class T_DM_DEVICE_BASE_CHECK_USER : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备设施库
|
||||
/// </summary>
|
||||
[Description("设备设施库")]
|
||||
[DataFieldForeignKey("Nav_DeviceBaseCheck", "Nav_ListUser")]
|
||||
public Guid BASECHECK_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 导航属性:设备设施库
|
||||
/// </summary>
|
||||
[Description("导航属性:设备设施库")]
|
||||
public T_DM_DEVICE_BASE_CHECK Nav_DeviceBaseCheck { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 点检人员
|
||||
/// </summary>
|
||||
[Description("点检人员")]
|
||||
[DataFieldForeignKey("Nav_User")]
|
||||
public Guid USER_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 点检人员
|
||||
/// </summary>
|
||||
[Description("点检人员")]
|
||||
public T_FM_USER Nav_User { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否记录人
|
||||
/// </summary>
|
||||
[Description("是否记录人")]
|
||||
public bool ISMAIN { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,38 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.Infrastructure.Core;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace APT.MS.Domain.Entities.DM
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备设施库附件表
|
||||
/// </summary>
|
||||
[Description("设备设施库附件表")]
|
||||
public class T_DM_DEVICE_BASE_FILE : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备设施库
|
||||
/// </summary>
|
||||
[Description("设备设施库")]
|
||||
[DataFieldForeignKey("Nav_DeviceBase", "Nav_Files")]
|
||||
public Guid DEVICE_BASE_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 导航属性:设备设施库
|
||||
/// </summary>
|
||||
[Description("导航属性:设备设施库")]
|
||||
public T_DM_DEVICE_BASE Nav_DeviceBase { get; set; }
|
||||
/// <summary>
|
||||
/// 文件ID
|
||||
/// </summary>
|
||||
[Description("文件")]
|
||||
[DataFieldForeignKey("Nav_ImgFile")]
|
||||
public Guid IMG_FILE_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 导航属性:文件
|
||||
/// </summary>
|
||||
[Description("导航属性:文件")]
|
||||
public T_PF_IMG_FILE Nav_ImgFile { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,82 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace APT.MS.Domain.Entities.DM
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备设施检测检验记录
|
||||
/// </summary>
|
||||
[Description("设备设施检测检验记录")]
|
||||
public class T_DM_DEVICE_BASE_INSPECTION : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备设施库ID
|
||||
/// </summary>
|
||||
[Description("设备设施库ID")]
|
||||
[DataFieldForeignKey("Nav_DeviceBase", "Nav_Inspection")]
|
||||
public Guid DEVICE_BASE_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 导航属性:设备设施库
|
||||
/// </summary>
|
||||
[Description("导航属性:设备设施库")]
|
||||
public T_DM_DEVICE_BASE Nav_DeviceBase { get; set; }
|
||||
/// <summary>
|
||||
/// 时间
|
||||
/// </summary>
|
||||
[Description("时间")]
|
||||
[FormFieldEdit]
|
||||
public DateTime TIME { get; set; }
|
||||
[Description("周期")]
|
||||
[FormFieldEdit]
|
||||
[EnumName("BSPLANCHECKFREQUENCYEnum")]
|
||||
public BSPLANCHECKFREQUENCYEnum CYCLE { get; set; }
|
||||
/// <summary>
|
||||
/// 责任部门
|
||||
/// </summary>
|
||||
[Description("责任部门")]
|
||||
[FormFieldEdit]
|
||||
[DataFieldForeignKey("Nav_Department")]
|
||||
public Guid? DEPARTMENT_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 责任部门
|
||||
/// </summary>
|
||||
[Description("责任部门")]
|
||||
public T_FM_DEPARTMENT Nav_Department { get; set; }
|
||||
/// <summary>
|
||||
/// 责任人
|
||||
/// </summary>
|
||||
[Description("责任人")]
|
||||
[FormFieldEdit]
|
||||
[DataFieldForeignKey("Nav_User")]
|
||||
public Guid? USER_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 责任人
|
||||
/// </summary>
|
||||
[Description("责任人")]
|
||||
public T_FM_USER Nav_User { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单位
|
||||
/// </summary>
|
||||
[Description("单位")]
|
||||
[FormFieldEdit]
|
||||
public string MECHANISM { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 检测结果
|
||||
/// </summary>
|
||||
[Description("检测结果")]
|
||||
[EnumName("DMInspectionResultEnum")]
|
||||
[FormFieldEdit]
|
||||
public DMInspectionResultEnum RESULT { get; set; }
|
||||
/// <summary>
|
||||
/// 报告
|
||||
/// </summary>
|
||||
[Description("报告")]
|
||||
public List<T_DM_DEVICE_BASE_INSPECTION_FILE> Nav_Files { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,37 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.Infrastructure.Core;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace APT.MS.Domain.Entities.DM
|
||||
{
|
||||
/// <summary>
|
||||
/// 检测检验附件表
|
||||
/// </summary>
|
||||
[Description("检测检验附件表")]
|
||||
public class T_DM_DEVICE_BASE_INSPECTION_FILE : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 检测检验ID
|
||||
/// </summary>
|
||||
[Description("检测检验ID")]
|
||||
[DataFieldForeignKey("Nav_Parent", "Nav_Files")]
|
||||
public Guid PARENT_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 导航属性:设备设施检测检验
|
||||
/// </summary>
|
||||
[Description("导航属性:设备设施检测检验")]
|
||||
public T_DM_DEVICE_BASE_INSPECTION Nav_Parent { get; set; }
|
||||
/// <summary>
|
||||
/// 文件ID
|
||||
/// </summary>
|
||||
[Description("文件")]
|
||||
[DataFieldForeignKey("Nav_ImgFile")]
|
||||
public Guid IMG_FILE_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 导航属性:文件
|
||||
/// </summary>
|
||||
[Description("导航属性:文件")]
|
||||
public T_PF_IMG_FILE Nav_ImgFile { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,69 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace APT.MS.Domain.Entities.DM
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备设施检修记录
|
||||
/// </summary>
|
||||
[Description("设备设施检修记录")]
|
||||
public class T_DM_DEVICE_BASE_OVERHAUL : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备设施库
|
||||
/// </summary>
|
||||
[Description("设备设施库")]
|
||||
[DataFieldForeignKey("Nav_DeviceBase", "Nav_Overhaul")]
|
||||
public Guid DEVICE_BASE_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 导航属性:设备设施库
|
||||
/// </summary>
|
||||
[Description("导航属性:设备设施库")]
|
||||
public T_DM_DEVICE_BASE Nav_DeviceBase { get; set; }
|
||||
/// <summary>
|
||||
/// 时间
|
||||
/// </summary>
|
||||
[Description("时间")]
|
||||
[FormFieldEdit]
|
||||
public DateTime OVERHAUL_TIME { get; set; }
|
||||
/// <summary>
|
||||
/// 故障描述
|
||||
/// </summary>
|
||||
[Description("故障描述")]
|
||||
[FormFieldEdit]
|
||||
public string MALFUCTION { get; set; }
|
||||
/// <summary>
|
||||
/// 检修情况描述
|
||||
/// </summary>
|
||||
[Description("检修情况描述")]
|
||||
[FormFieldEdit]
|
||||
public string DESCRIPTION { get; set; }
|
||||
/// <summary>
|
||||
/// 检修人员
|
||||
/// </summary>
|
||||
[Description("检修人员")]
|
||||
[FormFieldEdit]
|
||||
[DataFieldForeignKey("Nav_User")]
|
||||
public Guid? USER_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 检修人员
|
||||
/// </summary>
|
||||
[Description("检修人员")]
|
||||
public T_FM_USER Nav_User { get; set; }
|
||||
/// <summary>
|
||||
/// 外部援助单位
|
||||
/// </summary>
|
||||
[Description("外部援助单位")]
|
||||
[FormFieldEdit]
|
||||
public string EXTERNAL_SUPPORT { get; set; }
|
||||
/// <summary>
|
||||
/// 附件
|
||||
/// </summary>
|
||||
[Description("附件")]
|
||||
public List<T_DM_DEVICE_BASE_OVERHAUL_FILE> Nav_Files { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,37 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.Infrastructure.Core;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace APT.MS.Domain.Entities.DM
|
||||
{
|
||||
/// <summary>
|
||||
/// 附件表
|
||||
/// </summary>
|
||||
[Description("附件表")]
|
||||
public class T_DM_DEVICE_BASE_OVERHAUL_FILE : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 主表id
|
||||
/// </summary>
|
||||
[Description("主表id")]
|
||||
[DataFieldForeignKey("Nav_FileParent", "Nav_Files")]
|
||||
public Guid FILE_PARENT_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 导航属性:设备设施检测检验
|
||||
/// </summary>
|
||||
[Description("导航属性:设备设施检测检验")]
|
||||
public T_DM_DEVICE_BASE_OVERHAUL Nav_FileParent { get; set; }
|
||||
/// <summary>
|
||||
/// 文件ID
|
||||
/// </summary>
|
||||
[Description("文件")]
|
||||
[DataFieldForeignKey("Nav_ImgFile")]
|
||||
public Guid IMG_FILE_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 导航属性:文件
|
||||
/// </summary>
|
||||
[Description("导航属性:文件")]
|
||||
public T_PF_IMG_FILE Nav_ImgFile { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,69 +0,0 @@
|
||||
using APT.Infrastructure.Core;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace APT.MS.Domain.Entities.DM
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备设施库采购记录
|
||||
/// </summary>
|
||||
[Description("设备设施库采购记录")]
|
||||
public class T_DM_DEVICE_BASE_PURCHASE : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备设施库ID
|
||||
/// </summary>
|
||||
[Description("设备设施库ID")]
|
||||
[DataFieldForeignKey("Nav_DeviceBase", "Nav_Purchases")]
|
||||
public Guid DEVICE_BASE_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 导航属性:设备设施库
|
||||
/// </summary>
|
||||
[Description("导航属性:设备设施库")]
|
||||
public T_DM_DEVICE_BASE Nav_DeviceBase { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// TPM_ID
|
||||
/// </summary>
|
||||
[Description("TPM_ID")]
|
||||
public Guid TPM_ID { get; set; }
|
||||
/// <summary>
|
||||
///供应商
|
||||
/// </summary>
|
||||
[Description("供应商")]
|
||||
[FormFieldEdit]
|
||||
public string SUPPLIER { get; set; }
|
||||
/// <summary>
|
||||
///制造商
|
||||
/// </summary>
|
||||
[Description("制造商")]
|
||||
[FormFieldEdit]
|
||||
public string MANUFACTURER { get; set; }
|
||||
/// <summary>
|
||||
///制造日期
|
||||
/// </summary>
|
||||
[Description("制造日期")]
|
||||
[FormFieldEdit]
|
||||
public DateTime? MANUFACTURE_DATE { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///购置日期
|
||||
/// </summary>
|
||||
[Description("购置日期")]
|
||||
[FormFieldEdit]
|
||||
public DateTime? PURCHASE_DATE { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///验收日期
|
||||
/// </summary>
|
||||
[Description("验收日期")]
|
||||
[FormFieldEdit]
|
||||
public DateTime? ACCEPT_DATE { get; set; }
|
||||
/// <summary>
|
||||
///使用年限
|
||||
/// </summary>
|
||||
[Description("使用年限")]
|
||||
[FormFieldEdit]
|
||||
public string SERVICE_LIFE { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,192 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.BaseData.Domain.Enums;
|
||||
using APT.BaseData.Domain.Enums.PF;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace APT.MS.Domain.Entities.DM
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备检查单
|
||||
/// </summary>
|
||||
[Description("设备检查")]
|
||||
public class T_DM_DEVICE_CHECK : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// T_DM_DEVICE_BASE_CHECK ID
|
||||
/// </summary>
|
||||
[Description("设备设施维保计划")]
|
||||
public Guid? PLANID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 编码
|
||||
/// </summary>
|
||||
[Description("编码")]
|
||||
[CodeRule((int)PFCodeRuleType.机电管理)]
|
||||
[CUnique]
|
||||
[FormFieldTable]
|
||||
[FormFieldEdit]
|
||||
[DataFieldLength(50)]
|
||||
public string CODE { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
[Description("名称")]
|
||||
[DataFieldLength(300)]
|
||||
public string NAME { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 检查类型
|
||||
/// </summary>
|
||||
[Description("检查类型")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
public CheckType CHECKTYPE { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 点检时间
|
||||
/// </summary>
|
||||
[Description("点检时间")]
|
||||
[FormFieldTable]
|
||||
[FormFieldEdit]
|
||||
[FormFieldQuery]
|
||||
public DateTime? RECORD_DATE { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 开始时间
|
||||
/// </summary>
|
||||
[Description("开始时间")]
|
||||
[FormFieldTable]
|
||||
[FormFieldEdit]
|
||||
[FormFieldQuery]
|
||||
public DateTime? START_TIME { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 结束时间
|
||||
/// </summary>
|
||||
[Description("结束时间")]
|
||||
[FormFieldTable]
|
||||
[FormFieldEdit]
|
||||
[FormFieldQuery]
|
||||
public DateTime? END_TIME { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 点检人员
|
||||
/// </summary>
|
||||
[Description("点检人员")]
|
||||
public virtual ICollection<T_DM_DEVICE_CHECK_USER> Nav_ListUser { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 班组
|
||||
/// </summary>
|
||||
[Description("班组")]
|
||||
[FormFieldTable]
|
||||
[FormFieldEdit]
|
||||
[FormFieldQuery]
|
||||
[DataFieldLength(200)]
|
||||
public string TEAM_NAME { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 班组
|
||||
/// </summary>
|
||||
[Description("班组")]
|
||||
public Guid? TEAM_ID { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 班次
|
||||
/// </summary>
|
||||
[Description("班次")]
|
||||
[DataFieldForeignKey("Nav_Scheduling")]
|
||||
public Guid? SCHEDULIN_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 班次
|
||||
/// </summary>
|
||||
[Description("班次")]
|
||||
[FormFieldTable]
|
||||
[FormFieldEdit]
|
||||
[FormFieldQuery]
|
||||
public virtual T_FM_DEPARTMENT_SCHEDULING Nav_Scheduling { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备设施库
|
||||
/// </summary>
|
||||
[Description("设备设施库")]
|
||||
[DataFieldForeignKey("Nav_DeviceBase")]
|
||||
public Guid? DEVICEBASE_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备设施库
|
||||
/// </summary>
|
||||
[Description("设备设施库")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
public virtual T_DM_DEVICE_BASE Nav_DeviceBase { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 设备名称
|
||||
/// </summary>
|
||||
[Description("设备名称")]
|
||||
[FormFieldTable]
|
||||
[FormFieldEdit]
|
||||
[FormFieldQuery]
|
||||
[DataFieldLength(200)]
|
||||
public string MACHINE_NAME { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格
|
||||
/// </summary>
|
||||
[Description("规格")]
|
||||
[FormFieldTable]
|
||||
[FormFieldEdit]
|
||||
[FormFieldQuery]
|
||||
[DataFieldLength(100)]
|
||||
public string SPEC { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备编号
|
||||
/// </summary>
|
||||
[Description("设备编号")]
|
||||
[FormFieldTable]
|
||||
[FormFieldEdit]
|
||||
[FormFieldQuery]
|
||||
[DataFieldLength(100)]
|
||||
public string MACHINE_CODE { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备位置
|
||||
/// </summary>
|
||||
[Description("设备位置")]
|
||||
[FormFieldTable]
|
||||
[FormFieldEdit]
|
||||
[FormFieldQuery]
|
||||
[DataFieldLength(200)]
|
||||
public string POSITION_NAME { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 记录明细列表
|
||||
/// </summary>
|
||||
[Description("记录明细列表")]
|
||||
public virtual ICollection<T_DM_DEVICE_CHECK_DETAIL> Nav_ListDetail { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 附件
|
||||
/// </summary>
|
||||
[Description("附件")]
|
||||
public virtual ICollection<T_DM_DEVICE_CHECK_FILE> Nav_Files { get; set; }
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
[Description("状态")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
public PFStandardStatus STATUS { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,91 +0,0 @@
|
||||
using APT.BaseData.Domain.Enums;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace APT.MS.Domain.Entities.DM
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备检查明细
|
||||
/// </summary>
|
||||
[Description("设备检查明细")]
|
||||
public class T_DM_DEVICE_CHECK_DETAIL : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 检查记录
|
||||
/// </summary>
|
||||
[Description("检查记录")]
|
||||
[DataFieldForeignKey("Nav_DeviceCheck", "Nav_ListDetail")]
|
||||
public Guid DEVICE_CHECK_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 检查记录
|
||||
/// </summary>
|
||||
[Description("检查记录")]
|
||||
public T_DM_DEVICE_CHECK Nav_DeviceCheck { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 检查记录
|
||||
/// </summary>
|
||||
[Description("检查记录")]
|
||||
[DataFieldForeignKey("Nav_BaseCheck")]
|
||||
public Guid BASECHECK_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 检查记录
|
||||
/// </summary>
|
||||
[Description("检查记录")]
|
||||
public T_DM_DEVICE_BASE_CHECK Nav_BaseCheck { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 序号
|
||||
/// </summary>
|
||||
[Description("序号")]
|
||||
public int ROW_NO { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备设施库
|
||||
/// </summary>
|
||||
[Description("设备设施库")]
|
||||
public Guid DEVICEBASE_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 点检部位
|
||||
/// </summary>
|
||||
[Description("点检部位")]
|
||||
[DataFieldLength(200)]
|
||||
public string ITEM1 { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 点检内容
|
||||
/// </summary>
|
||||
[Description("点检内容")]
|
||||
[DataFieldLength(500)]
|
||||
public string ITEM2 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 点检标准
|
||||
/// </summary>
|
||||
[Description("点检标准")]
|
||||
[DataFieldLength(300)]
|
||||
public string ITEM3 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 结论
|
||||
/// </summary>
|
||||
[Description("结论")]
|
||||
public CheckResult? CHECK_VALUE { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 问题描述
|
||||
/// </summary>
|
||||
[Description("问题描述")]
|
||||
[DataFieldLength(300)]
|
||||
public string DESCRIPTION { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,37 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.Infrastructure.Core;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace APT.MS.Domain.Entities.DM
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备检查附件表
|
||||
/// </summary>
|
||||
[Description("设备检查附件表")]
|
||||
public class T_DM_DEVICE_CHECK_FILE : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备检查
|
||||
/// </summary>
|
||||
[Description("设备检查")]
|
||||
[DataFieldForeignKey("Nav_Check", "Nav_Files")]
|
||||
public Guid CHECK_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 设备检查
|
||||
/// </summary>
|
||||
[Description("设备检查")]
|
||||
public T_DM_DEVICE_CHECK Nav_Check { get; set; }
|
||||
/// <summary>
|
||||
/// 文件ID
|
||||
/// </summary>
|
||||
[Description("文件")]
|
||||
[DataFieldForeignKey("Nav_ImgFile")]
|
||||
public Guid IMG_FILE_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 导航属性:文件
|
||||
/// </summary>
|
||||
[Description("导航属性:文件")]
|
||||
public T_PF_IMG_FILE Nav_ImgFile { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,33 +0,0 @@
|
||||
using APT.BaseData.Domain.Enums;
|
||||
using APT.Infrastructure.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace APT.MS.Domain.Entities.DM
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备检查类型
|
||||
/// </summary>
|
||||
[Description("设备检查类型")]
|
||||
public class T_DM_DEVICE_CHECK_TYPE : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 编码
|
||||
/// </summary>
|
||||
[Description("编码")]
|
||||
[CodeRule((int)PFCodeRuleType.机电管理)]
|
||||
[CUnique]
|
||||
[FormFieldTable]
|
||||
[FormFieldEdit]
|
||||
[DataFieldLength(50)]
|
||||
public string CODE { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
[Description("名称")]
|
||||
public string NAME { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,55 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.BaseData.Domain.Enums;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace APT.MS.Domain.Entities.DM
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备检查单
|
||||
/// </summary>
|
||||
[Description("设备检查人员")]
|
||||
public class T_DM_DEVICE_CHECK_USER : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备检查
|
||||
/// </summary>
|
||||
[Description("设备检查")]
|
||||
[DataFieldForeignKey("Nav_Check", "Nav_ListUser")]
|
||||
public Guid CHECK_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备检查
|
||||
/// </summary>
|
||||
[Description("设备检查")]
|
||||
public T_DM_DEVICE_CHECK Nav_Check { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 点检人员
|
||||
/// </summary>
|
||||
[Description("点检人员")]
|
||||
[DataFieldForeignKey("Nav_User")]
|
||||
public Guid USER_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 点检人员
|
||||
/// </summary>
|
||||
[Description("点检人员")]
|
||||
public T_FM_USER Nav_User { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否记录人
|
||||
/// </summary>
|
||||
[Description("是否记录人")]
|
||||
public bool ISMAIN { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否确认
|
||||
/// </summary>
|
||||
[Description("是否确认")]
|
||||
public bool ISCHECK { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,45 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.BaseData.Domain.Enums.PF;
|
||||
using APT.Infrastructure.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Text;
|
||||
|
||||
namespace APT.MS.Domain.Entities.SC.DM
|
||||
{
|
||||
[Description("设备设施发放表")]
|
||||
public class T_DM_DEVICE_ISSUE : MesEntityBase
|
||||
{
|
||||
[Description("编号")]
|
||||
public string CODE { get; set; }
|
||||
[Description("发放时间")]
|
||||
public DateTime? TIME { get; set; }
|
||||
|
||||
[Description("发放部门")]
|
||||
[DataFieldForeignKey("Nav_Department")]
|
||||
public Guid? DEPARTMENT_ID { get; set; }
|
||||
[Description("发放部门")]
|
||||
public T_FM_DEPARTMENT Nav_Department { get; set; }
|
||||
|
||||
[Description("发放人员")]
|
||||
[DataFieldForeignKey("Nav_User")]
|
||||
public Guid? USER_ID { get; set; }
|
||||
[Description("发放人员")]
|
||||
public T_FM_USER Nav_User { get; set; }
|
||||
[Description("设备设施发放细表")]
|
||||
public ICollection<T_DM_DEVICE_ISSUE_DETAIL> Nav_Details { get; set; }
|
||||
[Description("状态")]
|
||||
[EnumName("PFStandardStatus")]
|
||||
public PFStandardStatus STATUS { get; set; }
|
||||
|
||||
[Description("是否发布")]
|
||||
[DataFieldIngore]
|
||||
public string PUBLISH { get; set; }
|
||||
[Description("发放人员")]
|
||||
[DataFieldForeignKey("Nav_Apply")]
|
||||
public Guid? APPLY_ID { get; set; }
|
||||
[Description("发放人员")]
|
||||
public T_DM_DEVICE_APPLY Nav_Apply { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,67 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Entities.DM;
|
||||
using APT.MS.Domain.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Text;
|
||||
|
||||
namespace APT.MS.Domain.Entities.SC.DM
|
||||
{
|
||||
[Description("设备设施发放细表")]
|
||||
public class T_DM_DEVICE_ISSUE_DETAIL : MesEntityBase
|
||||
{
|
||||
[Description("设备设施发放")]
|
||||
[DataFieldForeignKey("Nav_Issue", "Nav_Details")]
|
||||
public Guid DEVICE_ISSUE_ID { get; set; }
|
||||
|
||||
[Description("设备设施发放")]
|
||||
public virtual T_DM_DEVICE_ISSUE Nav_Issue { get; set; }
|
||||
|
||||
[Description("序号")]
|
||||
public int? NUM { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备设施库
|
||||
/// </summary>
|
||||
[Description("设备设施库")]
|
||||
[DataFieldForeignKey("Nav_DeviceBase")]
|
||||
public Guid DEVICE_BASE_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 导航属性:设备设施库
|
||||
/// </summary>
|
||||
[Description("导航属性:设备设施库")]
|
||||
public T_DM_DEVICE_BASE Nav_DeviceBase { get; set; }
|
||||
|
||||
[Description("规格")]
|
||||
public string SPEC { get; set; }
|
||||
|
||||
[Description("数量")]
|
||||
public int QTY { get; set; }
|
||||
[Description("单位")]
|
||||
public string UNIT { get; set; }
|
||||
|
||||
[Description("领用部门")]
|
||||
[DataFieldForeignKey("Nav_Department")]
|
||||
public Guid? DEPARTMENT_ID { get; set; }
|
||||
[Description("领用部门")]
|
||||
public T_FM_DEPARTMENT Nav_Department { get; set; }
|
||||
|
||||
[Description("领用人员")]
|
||||
[DataFieldForeignKey("Nav_User")]
|
||||
public Guid? USER_ID { get; set; }
|
||||
[Description("领用人员")]
|
||||
public T_FM_USER Nav_User { get; set; }
|
||||
[Description("处理状态")]
|
||||
[EnumName("FOUserShiftStatusEnum")] //为枚举(0待处理 1已处理)
|
||||
public FOUserShiftStatusEnum DEAL_STATUS { get; set; }
|
||||
|
||||
[Description("是否归还")]
|
||||
[EnumName("DMIsReturnEnum")]
|
||||
public DMIsReturnEnum RETURN_STATUS { get; set; }
|
||||
|
||||
[Description("归还日期")]
|
||||
public DateTime? RETURN_TIME { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,92 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.BaseData.Domain.Enums;
|
||||
using APT.BaseData.Domain.Enums.PF;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace APT.MS.Domain.Entities.DM
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备设施维保
|
||||
/// </summary>
|
||||
[Description("设备设施维保")]
|
||||
public class T_DM_DEVICE_MAINTENANCE_CHECK : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 编码
|
||||
/// </summary>
|
||||
[Description("编码")]
|
||||
[CodeRule((int)PFCodeRuleType.机电管理)]
|
||||
[CUnique]
|
||||
[DataFieldLength(50)]
|
||||
public string CODE { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
[Description("名称")]
|
||||
[DataFieldLength(200)]
|
||||
public string NAME { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 维保时间
|
||||
/// </summary>
|
||||
[Description("维保时间")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
public DateTime CHECKDATETIME { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 维保人员
|
||||
/// </summary>
|
||||
[Description("维保人员")]
|
||||
public virtual ICollection<T_DM_DEVICE_MAINTENANCE_CHECK_USER> Nav_ListUser { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 维保明细
|
||||
/// </summary>
|
||||
[Description("维保明细")]
|
||||
[FormFieldEdit]
|
||||
public virtual ICollection<T_DM_DEVICE_MAINTENANCE_CHECK_DETAIL> Nav_ListDetail { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 负责人
|
||||
/// </summary>
|
||||
[Description("责任人")]
|
||||
[DataFieldForeignKey("Nav_User")]
|
||||
public Guid? USER_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 负责人(维保明细 对应设备 的责任人)
|
||||
/// </summary>
|
||||
[Description("责任人")]
|
||||
public T_FM_USER Nav_User { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 审批状态
|
||||
/// </summary>
|
||||
[Description("审批状态")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
public PFStandardStatus STATUS_APPROVE { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 审批流
|
||||
/// </summary>
|
||||
[Description("审批流")]
|
||||
[DataFieldForeignKey("Nav_Approve")]
|
||||
public Guid? APPROVE_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 审批流
|
||||
/// </summary>
|
||||
[Description("审批流")]
|
||||
public T_PF_APPROVE Nav_Approve { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,107 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.BaseData.Domain.Enums;
|
||||
using APT.BaseData.Domain.Enums.PF;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace APT.MS.Domain.Entities.DM
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备设施维保明细
|
||||
/// </summary>
|
||||
[Description("设备设施维保明细")]
|
||||
public class T_DM_DEVICE_MAINTENANCE_CHECK_DETAIL : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备设施维保计划
|
||||
/// </summary>
|
||||
[DataFieldForeignKey("Nav_Plan")]
|
||||
public Guid PLANID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备设施维保计划
|
||||
/// </summary>
|
||||
[Description("设备设施维保计划")]
|
||||
[FormFieldEdit]
|
||||
public T_DM_DEVICE_MAINTENANCE_PLAN Nav_Plan { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备设施维保计划
|
||||
/// </summary>
|
||||
[Description("设备设施维保")]
|
||||
[DataFieldForeignKey("Nav_Check", "Nav_ListDetail")]
|
||||
public Guid CHECK_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备设施维保计划
|
||||
/// </summary>
|
||||
[Description("设备设施维保")]
|
||||
[FormFieldEdit]
|
||||
public T_DM_DEVICE_MAINTENANCE_CHECK Nav_Check { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备设施
|
||||
/// </summary>
|
||||
[Description("设备设施")]
|
||||
[DataFieldForeignKey("Nav_DeviceBase")]
|
||||
public Guid? DEVICEBASE_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备设施
|
||||
/// </summary>
|
||||
[Description("设备设施")]
|
||||
[FormFieldEdit]
|
||||
public virtual T_DM_DEVICE_BASE Nav_DeviceBase { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备名称
|
||||
/// </summary>
|
||||
[Description("设备名称")]
|
||||
[FormFieldEdit]
|
||||
[DataFieldLength(200)]
|
||||
public string MACHINE_NAME { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格
|
||||
/// </summary>
|
||||
[Description("规格")]
|
||||
[FormFieldEdit]
|
||||
[DataFieldLength(200)]
|
||||
public string SPEC { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数量
|
||||
/// </summary>
|
||||
[Description("数量")]
|
||||
[FormFieldEdit]
|
||||
public int COUNT { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 位置
|
||||
/// </summary>
|
||||
[Description("位置")]
|
||||
[FormFieldEdit]
|
||||
[DataFieldLength(200)]
|
||||
public string POSITION { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 维保内容
|
||||
/// </summary>
|
||||
[Description("维保内容")]
|
||||
[FormFieldEdit]
|
||||
[DataFieldLength(500)]
|
||||
public string CONTENT { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 维保情况
|
||||
/// </summary>
|
||||
[Description("维保情况")]
|
||||
[FormFieldEdit]
|
||||
public MaintenanceResult? Result { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,61 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.BaseData.Domain.Enums;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace APT.MS.Domain.Entities.DM
|
||||
{
|
||||
/// <summary>
|
||||
/// 维保人员
|
||||
/// </summary>
|
||||
[Description("维保人员")]
|
||||
public class T_DM_DEVICE_MAINTENANCE_CHECK_USER : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 检查计划
|
||||
/// </summary>
|
||||
[Description("检查计划")]
|
||||
[DataFieldForeignKey("Nav_Check", "Nav_ListUser")]
|
||||
public Guid CHECK_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 检查计划
|
||||
/// </summary>
|
||||
[Description("检查计划")]
|
||||
public T_DM_DEVICE_MAINTENANCE_CHECK Nav_Check { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 点检人员
|
||||
/// </summary>
|
||||
[Description("点检人员")]
|
||||
[DataFieldForeignKey("Nav_User")]
|
||||
public Guid USER_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 点检人员
|
||||
/// </summary>
|
||||
[Description("点检人员")]
|
||||
public T_FM_USER Nav_User { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否记录人
|
||||
/// </summary>
|
||||
[Description("是否记录人")]
|
||||
public bool ISMAIN { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否确认
|
||||
/// </summary>
|
||||
[Description("是否确认")]
|
||||
public bool ISCHECK { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 确认时间
|
||||
/// </summary>
|
||||
[Description("确认时间")]
|
||||
public DateTime? CHECKTIME { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,213 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.BaseData.Domain.Enums;
|
||||
using APT.BaseData.Domain.Enums.PF;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace APT.MS.Domain.Entities.DM
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备设施维保计划
|
||||
/// </summary>
|
||||
[Description("设备设施维保计划")]
|
||||
public class T_DM_DEVICE_MAINTENANCE_PLAN : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 编码
|
||||
/// </summary>
|
||||
[Description("编码")]
|
||||
[CodeRule((int)PFCodeRuleType.机电管理)]
|
||||
[CUnique]
|
||||
[DataFieldLength(50)]
|
||||
public string CODE { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
[Description("名称")]
|
||||
[DataFieldLength(200)]
|
||||
public string NAME { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 年度
|
||||
/// </summary>
|
||||
[Description("年度")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
public int YEARPLAN { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 系统分类
|
||||
/// </summary>
|
||||
[Description("系统分类")]
|
||||
[DataFieldForeignKey("Nav_Category")]
|
||||
public Guid? CATEGORY_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 系统分类
|
||||
/// </summary>
|
||||
[Description("系统分类")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
public T_DM_CATEGORY Nav_Category { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备设施库
|
||||
/// </summary>
|
||||
[Description("设备设施库")]
|
||||
[DataFieldForeignKey("Nav_DeviceBase", "Nav_ListMaintenance")]
|
||||
public Guid? DEVICEBASE_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备设施库
|
||||
/// </summary>
|
||||
[Description("设备设施库")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
public virtual T_DM_DEVICE_BASE Nav_DeviceBase { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备名称
|
||||
/// </summary>
|
||||
[Description("设备名称")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
[DataFieldLength(200)]
|
||||
public string MACHINE_NAME { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格
|
||||
/// </summary>
|
||||
[Description("规格")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
[DataFieldLength(200)]
|
||||
public string SPEC { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数量
|
||||
/// </summary>
|
||||
[Description("数量")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
public int COUNT { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 位置
|
||||
/// </summary>
|
||||
[Description("位置")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
[DataFieldLength(200)]
|
||||
public string POSITION { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 维保内容
|
||||
/// </summary>
|
||||
[Description("维保内容")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
[DataFieldLength(500)]
|
||||
public string CONTENT { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 维修计划
|
||||
/// </summary>
|
||||
[Description("维修计划")]
|
||||
public virtual ICollection<T_DM_DEVICE_MAINTENANCE_PPLAN_FILE> Nav_FilesPlan { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 维保工作方案
|
||||
/// </summary>
|
||||
[Description("维保工作方案")]
|
||||
public virtual ICollection<T_DM_DEVICE_MAINTENANCE_PLAN_FILE> Nav_Files { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 计划检查人员
|
||||
/// </summary>
|
||||
[Description("计划检查人员")]
|
||||
public virtual ICollection<T_DM_DEVICE_MAINTENANCE_PLAN_USER> Nav_ListUser { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 触发频率
|
||||
/// </summary>
|
||||
[Description("触发频率")]
|
||||
[FormFieldTable]
|
||||
[FormFieldEdit]
|
||||
[FormFieldQuery]
|
||||
public BSPLANCHECKFREQUENCYEnum PLANCHECKFREQUENCY { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 触发日期(日期 针对单次 有效) 例如:05-01,12-01
|
||||
/// </summary>
|
||||
[Description("触发日期")]
|
||||
[FormFieldEdit]
|
||||
public string RUNDATA { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 触发频率(日 针对每月/每季 有效)
|
||||
/// </summary>
|
||||
[Description("日")]
|
||||
[FormFieldEdit]
|
||||
public int? DATA { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 触发频率(星期 针对每周 有效)
|
||||
/// </summary>
|
||||
[Description("星期")]
|
||||
[FormFieldEdit]
|
||||
public WEEKDATAEnum? WEEKDATA { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 执行时间
|
||||
/// </summary>
|
||||
[Description("执行时间")]
|
||||
[FormFieldEdit]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
public DateTime RUNSETTIME { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 启用标志
|
||||
/// </summary>
|
||||
[Description("启用标志")]
|
||||
[FormFieldTable]
|
||||
[FormFieldEdit]
|
||||
public FMEnableStatusEnum ENABLE_STATUS { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 审批状态
|
||||
/// </summary>
|
||||
[Description("审批状态")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
public PFStandardStatus STATUS_APPROVE { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 审批流
|
||||
/// </summary>
|
||||
[Description("审批流")]
|
||||
[DataFieldForeignKey("Nav_Approve")]
|
||||
public Guid? APPROVE_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 审批流
|
||||
/// </summary>
|
||||
[Description("审批流")]
|
||||
public T_PF_APPROVE Nav_Approve { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,42 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.Infrastructure.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace APT.MS.Domain.Entities.DM
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备维保计划维保工作方案
|
||||
/// </summary>
|
||||
[Description("设备维保计划维保工作方案")]
|
||||
public class T_DM_DEVICE_MAINTENANCE_PPLAN_FILE : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
///设备维保计划ID
|
||||
/// </summary>
|
||||
[Description("设备维保计划")]
|
||||
[DataFieldForeignKey("Nav_Plan", "Nav_FilesPlan")]
|
||||
public Guid PLAN_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 导航属性:设备维保计划
|
||||
/// </summary>
|
||||
[Description("导航属性:设备维保计划")]
|
||||
public T_DM_DEVICE_MAINTENANCE_PLAN Nav_Plan { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 文件ID
|
||||
/// </summary>
|
||||
[Description("文件")]
|
||||
[DataFieldForeignKey("Nav_ImgFile")]
|
||||
public Guid IMG_FILE_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 导航属性:文件
|
||||
/// </summary>
|
||||
[Description("导航属性:文件")]
|
||||
public virtual T_PF_IMG_FILE Nav_ImgFile { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,56 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.BaseData.Domain.Enums;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace APT.MS.Domain.Entities.DM
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备检查单
|
||||
/// </summary>
|
||||
[Description("计划检查人员")]
|
||||
public class T_DM_DEVICE_MAINTENANCE_PLAN_USER : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 检查计划
|
||||
/// </summary>
|
||||
[Description("检查计划")]
|
||||
[DataFieldForeignKey("Nav_Plan", "Nav_ListUser")]
|
||||
public Guid PLAN_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 检查计划
|
||||
/// </summary>
|
||||
[Description("检查计划")]
|
||||
public T_DM_DEVICE_MAINTENANCE_PLAN Nav_Plan { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 点检人员
|
||||
/// </summary>
|
||||
[Description("点检人员")]
|
||||
[DataFieldForeignKey("Nav_User")]
|
||||
public Guid USER_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 点检人员
|
||||
/// </summary>
|
||||
[Description("点检人员")]
|
||||
public T_FM_USER Nav_User { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否记录人
|
||||
/// </summary>
|
||||
[Description("是否记录人")]
|
||||
public bool ISMAIN { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否确认
|
||||
/// </summary>
|
||||
[Description("是否确认")]
|
||||
public bool ISCHECK { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,42 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.Infrastructure.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace APT.MS.Domain.Entities.DM
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备维保计划附件表
|
||||
/// </summary>
|
||||
[Description("设备维保计划附件表")]
|
||||
public class T_DM_DEVICE_MAINTENANCE_PLAN_FILE : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
///设备维保计划ID
|
||||
/// </summary>
|
||||
[Description("设备维保计划")]
|
||||
[DataFieldForeignKey("Nav_Plan", "Nav_Files")]
|
||||
public Guid PLAN_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 导航属性:设备维保计划
|
||||
/// </summary>
|
||||
[Description("导航属性:设备维保计划")]
|
||||
public T_DM_DEVICE_MAINTENANCE_PLAN Nav_Plan { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 文件ID
|
||||
/// </summary>
|
||||
[Description("文件")]
|
||||
[DataFieldForeignKey("Nav_ImgFile")]
|
||||
public Guid IMG_FILE_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 导航属性:文件
|
||||
/// </summary>
|
||||
[Description("导航属性:文件")]
|
||||
public virtual T_PF_IMG_FILE Nav_ImgFile { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,176 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.BaseData.Domain.Enums.PF;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace APT.MS.Domain.Entities.DM
|
||||
{
|
||||
/// <summary>
|
||||
/// 检修记录
|
||||
/// </summary>
|
||||
[Description("检修记录")]
|
||||
public class T_DM_DEVICE_OVERHAUL : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 编码
|
||||
/// </summary>
|
||||
[Description("编码")]
|
||||
public string CODE { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 检修时间
|
||||
/// </summary>
|
||||
[Description("检修时间")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
public DateTime OVERHAUL_TIME { get; set; }
|
||||
/// <summary>
|
||||
/// 外部援助单位
|
||||
/// </summary>
|
||||
[Description("外部援助单位")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
public string EXTERNAL_SUPPORT { get; set; }
|
||||
/// <summary>
|
||||
/// 是否申请外部援助
|
||||
/// </summary>
|
||||
[Description("是否申请外部援助")]
|
||||
public bool IS_HELP { get; set; }
|
||||
/// <summary>
|
||||
/// 检修人员
|
||||
/// </summary>
|
||||
[Description("检修人员")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
[DataFieldForeignKey("Nav_User")]
|
||||
public Guid? USER_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 检修人员
|
||||
/// </summary>
|
||||
[Description("检修人员")]
|
||||
public T_FM_USER Nav_User { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 设备设施名称
|
||||
/// </summary>
|
||||
[Description("设备设施名称")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
[DataFieldForeignKey("Nav_Device")]
|
||||
public Guid? DEVICE_BASE_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 导航_设备设施名称
|
||||
/// </summary>
|
||||
[Description("导航_设备设施名称")]
|
||||
public T_DM_DEVICE_BASE Nav_Device { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备名称
|
||||
/// </summary>
|
||||
[Description("设备名称")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
public string MACHINE_NAME { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格
|
||||
/// </summary>
|
||||
[Description("规格")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
public string SPEC { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备编号
|
||||
/// </summary>
|
||||
[Description("设备编号")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
public string MACHINE_CODE { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备位置
|
||||
/// </summary>
|
||||
[Description("设备位置")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
public string POSITION { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 故障描述
|
||||
/// </summary>
|
||||
[Description("故障描述")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
public string MALFUCTION { get; set; }
|
||||
/// <summary>
|
||||
/// 检修意见
|
||||
/// </summary>
|
||||
[Description("检修意见")]
|
||||
[EnumName("DMRepairOpinionEnum")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
public DMRepairOpinionEnum OPINION { get; set; }
|
||||
/// <summary>
|
||||
/// 检修情况描述
|
||||
/// </summary>
|
||||
[Description("检修情况描述")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
public string DESCRIPTION { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
///故障报修
|
||||
/// </summary>
|
||||
[Description("故障报修")]
|
||||
[DataFieldForeignKey("Nav_Repair")]
|
||||
|
||||
public Guid? REPAIR_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///导航_故障报修
|
||||
/// </summary>
|
||||
[Description("导航_故障报修")]
|
||||
public T_DM_DEVICE_REPAIR Nav_Repair { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 附件列表
|
||||
/// </summary>
|
||||
[Description("附件列表")]
|
||||
public List<T_DM_DEVICE_OVERHAUL_FILE> Nav_Files { get; set; }
|
||||
/// <summary>
|
||||
/// 验收意见
|
||||
/// </summary>
|
||||
[Description("验收意见")]
|
||||
[FormFieldEdit]
|
||||
public CheckOptionEnum CHECK_OPINION { get; set; }
|
||||
/// <summary>
|
||||
/// 状态:故障记录,检修中,完成
|
||||
/// </summary>
|
||||
[Description("状态")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[EnumName("PFStandardStatus")]
|
||||
public PFStandardStatus STATUS { get; set; }
|
||||
[Description("是否发布")]
|
||||
[DataFieldIngore]
|
||||
public string PUBLISH { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,37 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.Infrastructure.Core;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace APT.MS.Domain.Entities.DM
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备设施故障报修记录附件表
|
||||
/// </summary>
|
||||
[Description("设备设施故障报修记录附件表")]
|
||||
public class T_DM_DEVICE_OVERHAUL_FILE : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备设施故障报修记录ID
|
||||
/// </summary>
|
||||
[Description("设备设施故障报修记录ID")]
|
||||
[DataFieldForeignKey("Nav_Overhaul", "Nav_Files")]
|
||||
public Guid OVERHAUL_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 导航属性:设备设施检测检验
|
||||
/// </summary>
|
||||
[Description("导航属性:设备设施检测检验")]
|
||||
public T_DM_DEVICE_OVERHAUL Nav_Overhaul { get; set; }
|
||||
/// <summary>
|
||||
/// 文件ID
|
||||
/// </summary>
|
||||
[Description("文件")]
|
||||
[DataFieldForeignKey("Nav_ImgFile")]
|
||||
public Guid IMG_FILE_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 导航属性:文件
|
||||
/// </summary>
|
||||
[Description("导航属性:文件")]
|
||||
public T_PF_IMG_FILE Nav_ImgFile { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,157 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.BaseData.Domain.Enums.PF;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace APT.MS.Domain.Entities.DM
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备设施故障报修
|
||||
/// </summary>
|
||||
[Description("设备设施故障报修")]
|
||||
public class T_DM_DEVICE_REPAIR : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 编码
|
||||
/// </summary>
|
||||
[Description("编码")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[DataFieldLength(50)]
|
||||
public string CODE { get; set; }
|
||||
/// <summary>
|
||||
/// 报修时间
|
||||
/// </summary>
|
||||
[Description("报修时间")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
public DateTime REPAIR_TIME { get; set; }
|
||||
/// <summary>
|
||||
/// 报修人员
|
||||
/// </summary>
|
||||
[Description("报修人员")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
[DataFieldForeignKey("Nav_User")]
|
||||
public Guid? USER_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 导航_报修人员
|
||||
/// </summary>
|
||||
[Description("导航_报修人员")]
|
||||
public T_FM_USER Nav_User { get; set; }
|
||||
/// <summary>
|
||||
/// 设备设施名称
|
||||
/// </summary>
|
||||
[Description("设备设施名称")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
[DataFieldForeignKey("Nav_Device")]
|
||||
public Guid? DEVICE_BASE_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 导航_设备设施名称
|
||||
/// </summary>
|
||||
[Description("导航_设备设施名称")]
|
||||
public T_DM_DEVICE_BASE Nav_Device { get; set; }
|
||||
/// <summary>
|
||||
/// 设备名称
|
||||
/// </summary>
|
||||
[Description("设备名称")]
|
||||
public string MACHINE_NAME { get; set; }
|
||||
/// <summary>
|
||||
/// 规格
|
||||
/// </summary>
|
||||
[Description("规格")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
public string SPEC { get; set; }
|
||||
/// <summary>
|
||||
/// 设备编号
|
||||
/// </summary>
|
||||
[Description("设备编号")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
public string MACHINE_CODE { get; set; }
|
||||
/// <summary>
|
||||
/// 设备位置
|
||||
/// </summary>
|
||||
[Description("设备位置")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
public string POSITION { get; set; }
|
||||
/// <summary>
|
||||
/// 故障描述
|
||||
/// </summary>
|
||||
[Description("故障描述")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
public string DESCRPTION { get; set; }
|
||||
/// <summary>
|
||||
/// 维修紧迫性
|
||||
/// </summary>
|
||||
[Description("维修紧迫性")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
[EnumName("DMRepairStatusEnum")]
|
||||
public DMRepairStatusEnum EMERGENCY_LEVEL_NAME { get; set; }
|
||||
/// <summary>
|
||||
/// 状态:故障记录,检修中,完成
|
||||
/// </summary>
|
||||
[Description("状态")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[EnumName("PFStandardStatus")]
|
||||
public PFStandardStatus STATUS { get; set; }
|
||||
/// <summary>
|
||||
/// 维修负责人
|
||||
/// </summary>
|
||||
[Description("维修负责人")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
[DataFieldForeignKey("Nav_Repair_Charge_User")]
|
||||
public Guid? REPAIR_CHARGE_USER_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 导航_维修负责人
|
||||
/// </summary>
|
||||
[Description("导航_维修负责人")]
|
||||
public T_FM_USER Nav_Repair_Charge_User { get; set; }
|
||||
/// <summary>
|
||||
/// 是否申请外部援助
|
||||
/// </summary>
|
||||
[Description("是否申请外部援助")]
|
||||
public bool IS_HELP { get; set; }
|
||||
/// <summary>
|
||||
/// 维修人员
|
||||
/// </summary>
|
||||
[Description("维修人员")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
[DataFieldForeignKey("Nav_Repair_User")]
|
||||
public Guid? REPAIR_USER_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 导航_维修人员
|
||||
/// </summary>
|
||||
[Description("导航_维修人员")]
|
||||
public T_FM_USER Nav_Repair_User { get; set; }
|
||||
/// <summary>
|
||||
/// 附件
|
||||
/// </summary>
|
||||
[Description("附件")]
|
||||
public List<T_DM_DEVICE_REPAIR_FILE> Nav_Files { get; set; }
|
||||
[Description("是否发布")]
|
||||
[DataFieldIngore]
|
||||
public string PUBLISH { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,37 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.Infrastructure.Core;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace APT.MS.Domain.Entities.DM
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备设施故障报修附件表
|
||||
/// </summary>
|
||||
[Description("设备设施故障报修附件表")]
|
||||
public class T_DM_DEVICE_REPAIR_FILE : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备设施故障报修ID
|
||||
/// </summary>
|
||||
[Description("设备设施故障报修ID")]
|
||||
[DataFieldForeignKey("Nav_Repair", "Nav_Files")]
|
||||
public Guid REPAIR_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 导航属性:设备设施检测检验
|
||||
/// </summary>
|
||||
[Description("导航属性:设备设施检测检验")]
|
||||
public T_DM_DEVICE_REPAIR Nav_Repair { get; set; }
|
||||
/// <summary>
|
||||
/// 文件ID
|
||||
/// </summary>
|
||||
[Description("文件")]
|
||||
[DataFieldForeignKey("Nav_ImgFile")]
|
||||
public Guid IMG_FILE_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 导航属性:文件
|
||||
/// </summary>
|
||||
[Description("导航属性:文件")]
|
||||
public T_PF_IMG_FILE Nav_ImgFile { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,23 +0,0 @@
|
||||
using APT.Infrastructure.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace APT.MS.Domain.Entities.DM
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备检查库类型
|
||||
/// </summary>
|
||||
[Description("设备检查库类型")]
|
||||
public class T_DM_TYPE : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
[Description("名称")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
[FormFieldEdit]
|
||||
public string NAME { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,820 +0,0 @@
|
||||
using APT.BaseData.Domain.ApiModel;
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.BaseData.Domain.Enums;
|
||||
using APT.BaseData.Domain.Enums.PF;
|
||||
using APT.BaseData.Domain.IServices.FM;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Entities.DM;
|
||||
using APT.MS.Domain.Entities.SC.DM;
|
||||
using APT.MS.Domain.Entities.SC.PT;
|
||||
using APT.MS.Domain.Enums;
|
||||
using APT.Utility;
|
||||
using APT.WebApi.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
{
|
||||
[Route("api/PP/DM")]
|
||||
[TypeFilter(typeof(CustomActionFilterAttribute))]
|
||||
public partial class DMController : AuthorizeApiController<T_DM_DEVICE_MAINTENANCE_PLAN>
|
||||
{
|
||||
|
||||
IFMNotificationTaskService NotificationTaskService { get; set; }
|
||||
IFMUserService UserService { get; set; }
|
||||
IPFSysLogService SysLogService { get; set; }
|
||||
IFMSyncLogDetailService SyncLogDetailService { get; set; }
|
||||
public DMController(IFMNotificationTaskService notificationTaskService, IPFSysLogService sysLogService, IFMUserService userService, IFMSyncLogDetailService syncLogDetailService)
|
||||
{
|
||||
NotificationTaskService = notificationTaskService;
|
||||
SysLogService = sysLogService;
|
||||
UserService = userService;
|
||||
SyncLogDetailService = syncLogDetailService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断跑批时间是否符合
|
||||
/// </summary>
|
||||
/// <param name="RUNSETTIME"></param>
|
||||
/// <param name="dtNow"></param>
|
||||
/// <param name="minAdvance"></param>
|
||||
/// <param name="minLaster"></param>
|
||||
/// <returns></returns>
|
||||
private bool ISTimeOK(DateTime? RUNSETTIME, DateTime dtNow, int minAdvance, int minLaster)
|
||||
{
|
||||
if (RUNSETTIME == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (RUNSETTIME != null)
|
||||
{
|
||||
if (minAdvance != 0 || minLaster != 0)
|
||||
{
|
||||
DateTime dtSetTime = Convert.ToDateTime(dtNow.ToString("yyyy-MM-dd") + RUNSETTIME.Value.ToString(" HH:mm:ss"));
|
||||
if (minAdvance > 0 && minLaster > 0)
|
||||
{
|
||||
if (dtNow.AddMinutes(-1 * minAdvance) <= dtSetTime && dtSetTime <= dtNow.AddMinutes(minLaster))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (minAdvance > 0)
|
||||
{
|
||||
if (dtNow.AddMinutes(-1 * minAdvance) <= dtSetTime && dtSetTime <= dtNow)
|
||||
{
|
||||
//如果设置时间小于当前时间 并且 设置使劲按大于 当前时间大于当前时间往前偏移分钟数
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (dtNow <= dtSetTime && dtSetTime <= dtNow.AddMinutes(minLaster))
|
||||
{
|
||||
//如果 设置时间大于当前时间 并且设置时间小于当前时间往后偏移分钟数
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (RUNSETTIME.Value.ToString("HH:mm") == dtNow.ToString("HH:mm"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 机电管理 每天触发
|
||||
/// 数据逻辑自己控制
|
||||
/// 如果要写入此方法 每个人的代码用代码块包起来 以免冲突
|
||||
/// </summary>
|
||||
/// <param name="filter"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("DailyRun")]
|
||||
public JsonActionResult<bool> DailyRun([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return SafeExecute<bool>(() =>
|
||||
{
|
||||
DateTime dtNow = DateTime.Now;
|
||||
if (!string.IsNullOrEmpty(filter.Parameter1))
|
||||
{
|
||||
try
|
||||
{
|
||||
dtNow = Convert.ToDateTime(filter.Parameter1);
|
||||
}
|
||||
catch
|
||||
{
|
||||
dtNow = DateTime.Now;
|
||||
}
|
||||
}
|
||||
|
||||
bool isCheck = true;//点检 巡检
|
||||
bool isPlan = true; //设备维保
|
||||
int min = 5;//按设置时间 可以提前5分钟执行跑批生成代办任务
|
||||
|
||||
#region wyw 维保计划录入
|
||||
|
||||
var listDMPlan = GetEntities<T_DM_DEVICE_MAINTENANCE_PLAN>(e => e.PLANCHECKFREQUENCY != BSPLANCHECKFREQUENCYEnum.None && e.DEVICEBASE_ID.HasValue && e.ENABLE_STATUS == FMEnableStatusEnum.启用 && e.STATUS_APPROVE == PFStandardStatus.Archived && !e.IS_DELETED, null, "Nav_ListUser.Nav_User");
|
||||
|
||||
List<T_DM_DEVICE_MAINTENANCE_PLAN> listPlan = new List<T_DM_DEVICE_MAINTENANCE_PLAN>();
|
||||
if (listDMPlan != null && listDMPlan.Any())
|
||||
{
|
||||
|
||||
foreach (var item in listDMPlan)
|
||||
{
|
||||
if (ISTimeOK(item.RUNSETTIME, dtNow, min, min))//设置时间往前后各偏移 5 分钟 判断跑批
|
||||
{
|
||||
switch (item.PLANCHECKFREQUENCY)
|
||||
{
|
||||
case BSPLANCHECKFREQUENCYEnum.None:
|
||||
break;
|
||||
//case BSPLANCHECKFREQUENCYEnum.OneTime:
|
||||
case BSPLANCHECKFREQUENCYEnum.Year:
|
||||
if (!string.IsNullOrEmpty(item.RUNDATA))//05-01,10-01
|
||||
{
|
||||
List<string> listMMdd = item.RUNDATA.Split(",").ToList();
|
||||
if (item.RUNDATA.Contains("-"))
|
||||
{
|
||||
for (int j = 0; j < listMMdd.Count; j++)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!string.IsNullOrEmpty(listMMdd[j]) && (listMMdd[j] == dtNow.ToString("MM-dd") || listMMdd[j] == dtNow.ToString("M-d")))
|
||||
{
|
||||
listPlan.Add(item);
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
else if (item.RUNDATA.Contains("/"))
|
||||
{
|
||||
for (int j = 0; j < listMMdd.Count; j++)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!string.IsNullOrEmpty(listMMdd[j]) && (listMMdd[j] == dtNow.ToString("MM/dd") || listMMdd[j] == dtNow.ToString("M/d")))
|
||||
{
|
||||
listPlan.Add(item);
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case BSPLANCHECKFREQUENCYEnum.Date:
|
||||
listPlan.Add(item);
|
||||
break;
|
||||
case BSPLANCHECKFREQUENCYEnum.Week:
|
||||
if (item.WEEKDATA != null && (int)dtNow.DayOfWeek == (int)item.WEEKDATA.Value)
|
||||
{
|
||||
//星期匹配 DateTime.Now.DayOfWeek Thursday (int)DateTime.Now.DayOfWeek 4
|
||||
listPlan.Add(item);
|
||||
}
|
||||
break;
|
||||
case BSPLANCHECKFREQUENCYEnum.Month:
|
||||
case BSPLANCHECKFREQUENCYEnum.Quarter:
|
||||
if (item.DATA != null && item.DATA.Value == dtNow.Day)
|
||||
{
|
||||
listPlan.Add(item); //日匹配 (季度是季度第一月的某日 刚好也符合)
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
DateTime dtNowEdit = DateTime.Now;
|
||||
|
||||
|
||||
if (listPlan.Count < 1)
|
||||
{
|
||||
isPlan = false;
|
||||
}
|
||||
var listPlanID = listPlan.Select(e => e.ID);
|
||||
var listDateCheck = GetEntities<T_DM_DEVICE_MAINTENANCE_CHECK_DETAIL>(e => e.CREATE_TIME.Value.Date == dtNowEdit.Date && listPlanID.Contains(e.ID), null, null);
|
||||
if (listDateCheck != null && listDateCheck.Any())
|
||||
{
|
||||
for (int i = listPlan.Count(); i > -1; i--)
|
||||
{
|
||||
var checkDate = listDateCheck.FirstOrDefault(e => e.ID == listPlan[i].ID);
|
||||
if (checkDate != null)
|
||||
{
|
||||
listPlan.RemoveAt(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (listPlan.Count < 1)
|
||||
{
|
||||
isPlan = false;
|
||||
}
|
||||
|
||||
|
||||
#region 点检 巡检
|
||||
|
||||
List<T_DM_DEVICE_BASE> listDeviceBase = null; //点检 巡检 结果
|
||||
var listDeviceBaseT = GetEntities<T_DM_DEVICE_BASE>(e => !e.IS_DELETED && e.Nav_ListCheck != null && e.Nav_ListCheck.Any(), null, "Nav_ListCheck.Nav_ListUser.Nav_User");//&& e.QTY > 0
|
||||
if (listDeviceBaseT == null || !listDeviceBaseT.Any())
|
||||
{
|
||||
isCheck = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
//今天
|
||||
var ListDetail = GetEntities<T_DM_DEVICE_CHECK_DETAIL>(e => e.CREATE_TIME.HasValue && e.CREATE_TIME.Value.Date == dtNowEdit.Date, null, null);//listBaseCheckID.Contains(e.BASECHECK_ID) &&
|
||||
|
||||
listDeviceBase = listDeviceBaseT.ToList();
|
||||
List<T_DM_DEVICE_BASE_CHECK> listBaseCheck = null;
|
||||
foreach (var item in listDeviceBaseT)
|
||||
{
|
||||
var listBaseCheckT = item.Nav_ListCheck;
|
||||
if (listBaseCheckT != null && listBaseCheckT.Any())
|
||||
{
|
||||
listBaseCheck = listBaseCheckT.ToList();
|
||||
for (int i = listBaseCheck.Count - 1; i > -1; i--)
|
||||
{
|
||||
if (listBaseCheck[i].IS_DELETED)
|
||||
{
|
||||
listBaseCheck.RemoveAt(i);
|
||||
continue;
|
||||
}
|
||||
if (ListDetail != null && ListDetail.Any())
|
||||
{
|
||||
//var detail = ListDetail.FirstOrDefault(e => e.BASECHECK_ID == listBaseCheck[i].ID);
|
||||
var detail = ListDetail.FirstOrDefault(e => e.BASECHECK_ID == listBaseCheck[i].ID);
|
||||
if (detail != null)
|
||||
{
|
||||
listBaseCheck.RemoveAt(i);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (ISTimeOK(listBaseCheck[i].CHECKTIME, dtNow, min, min))//设置时间往前后各偏移 5 分钟 判断跑批
|
||||
{
|
||||
switch (listBaseCheck[i].PLANCHECKFREQUENCY)
|
||||
{
|
||||
case BSPLANCHECKFREQUENCYEnum.None:
|
||||
break;
|
||||
//TODO 0525
|
||||
//case BSPLANCHECKFREQUENCYEnum.OneTime:
|
||||
case BSPLANCHECKFREQUENCYEnum.Year:
|
||||
if (!string.IsNullOrEmpty(listBaseCheck[i].RUNDATA))//05-01,10-01
|
||||
{
|
||||
List<string> listMMdd = listBaseCheck[i].RUNDATA.Split(",").ToList();
|
||||
if (!listMMdd.Contains(dtNow.ToString("MM-dd")) && !listMMdd.Contains(dtNow.ToString("M-d")) && !listMMdd.Contains(dtNow.ToString("MM/dd")) && !listMMdd.Contains(dtNow.ToString("M/d")))
|
||||
{
|
||||
listBaseCheck.RemoveAt(i);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case BSPLANCHECKFREQUENCYEnum.Date:
|
||||
//listPlan.Add(listBaseCheck[i]);
|
||||
break;
|
||||
case BSPLANCHECKFREQUENCYEnum.Week:
|
||||
if (listBaseCheck[i].WEEKDATA == null || (int)dtNow.DayOfWeek != (int)listBaseCheck[i].WEEKDATA.Value)
|
||||
{
|
||||
listBaseCheck.RemoveAt(i);
|
||||
}
|
||||
break;
|
||||
case BSPLANCHECKFREQUENCYEnum.Month:
|
||||
case BSPLANCHECKFREQUENCYEnum.Quarter:
|
||||
if (listBaseCheck[i].DATA == null || listBaseCheck[i].DATA.Value != dtNow.Day)
|
||||
{
|
||||
listBaseCheck.RemoveAt(i);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
listBaseCheck.RemoveAt(i);
|
||||
}
|
||||
}
|
||||
item.Nav_ListCheck = listBaseCheck;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = listDeviceBase.Count - 1; i > -1; i--)
|
||||
{
|
||||
if (listDeviceBase[i].Nav_ListCheck == null || listDeviceBase[i].Nav_ListCheck.Count() == 0)
|
||||
{
|
||||
listDeviceBase.RemoveAt(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (listDeviceBase == null || listDeviceBase.Count < 1)
|
||||
{
|
||||
isCheck = false;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
if (!isPlan && !isCheck)//没有 维保计划 和点检、巡检
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
List<T_DM_DEVICE_MAINTENANCE_CHECK> listCheck = new List<T_DM_DEVICE_MAINTENANCE_CHECK>();
|
||||
List<T_DM_DEVICE_MAINTENANCE_CHECK_USER> listCheckUser = new List<T_DM_DEVICE_MAINTENANCE_CHECK_USER>();
|
||||
List<T_DM_DEVICE_MAINTENANCE_CHECK_USER> listCheckUserTemp = null;
|
||||
List<T_DM_DEVICE_MAINTENANCE_CHECK_DETAIL> listCheckDetail = new List<T_DM_DEVICE_MAINTENANCE_CHECK_DETAIL>();
|
||||
List<T_FM_NOTIFICATION_TASK> listTaskMaintCheck = new List<T_FM_NOTIFICATION_TASK>();
|
||||
|
||||
var listBaseID = listPlan.Select(e => e.DEVICEBASE_ID.Value);
|
||||
|
||||
var listBase = GetEntities<T_DM_DEVICE_BASE>(e => listBaseID.Contains(e.ID), null, "Nav_ListCheck.Nav_ListUser.Nav_User", "Nav_User");
|
||||
|
||||
|
||||
if (listBase == null || !listBase.Any())
|
||||
{
|
||||
isPlan = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var item in listPlan)
|
||||
{
|
||||
var DeviceBase = listBase.FirstOrDefault(e => e.ID == item.DEVICEBASE_ID.Value);
|
||||
if (DeviceBase != null)
|
||||
item.Nav_DeviceBase = DeviceBase;
|
||||
}
|
||||
}
|
||||
|
||||
if (isPlan)//维保计划
|
||||
{
|
||||
Guid CheckID = Guid.Empty;
|
||||
Guid UserID = Guid.Empty;
|
||||
string UserName = string.Empty;
|
||||
bool isHave = false;
|
||||
for (int i = 0; i < listPlan.Count; i++)
|
||||
{
|
||||
//所有 维保 计划 如果维保人员 维保设备负责人 完全一致 合并单
|
||||
foreach (var item in listCheck)
|
||||
{
|
||||
if (item.Nav_ListUser.Count() == listPlan[i].Nav_ListUser.Count() && listPlan[i].Nav_DeviceBase != null && item.USER_ID == listPlan[i].Nav_DeviceBase.USER_ID)
|
||||
{
|
||||
isHave = true;
|
||||
//查找 维保人员 如果一致
|
||||
foreach (var itemUser in item.Nav_ListUser)
|
||||
{
|
||||
var userCheck = listPlan[i].Nav_ListUser.FirstOrDefault(e => e.USER_ID == itemUser.USER_ID && e.ISMAIN == itemUser.ISMAIN);
|
||||
if (userCheck == null)
|
||||
{
|
||||
//没找到
|
||||
isHave = false;
|
||||
CheckID = Guid.Empty;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!isHave)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
CheckID = item.ID;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//如果 没有找到之前 一致的 维保ID
|
||||
if (CheckID == Guid.Empty)
|
||||
{
|
||||
CheckID = Guid.NewGuid();
|
||||
|
||||
listCheck.Add(new T_DM_DEVICE_MAINTENANCE_CHECK()
|
||||
{
|
||||
ID = CheckID,
|
||||
CODE = "WB" + dtNowEdit.ToString("yyyyMMddHHmmss"),
|
||||
NAME = "设备设施维保" + dtNowEdit.ToString("MMdd"),
|
||||
CHECKDATETIME = dtNowEdit,
|
||||
STATUS_APPROVE = PFStandardStatus.Draft,
|
||||
//APPROVE_ID = ,
|
||||
IS_DELETED = false,
|
||||
ORG_ID = listPlan[i].ORG_ID,
|
||||
//ENTITY_ORG_TPYE = ,
|
||||
//FORM_ID = ,
|
||||
//FLOW_STATUS = ,
|
||||
//FLOW_SEND_STATUS = ,
|
||||
//FLOW_ID = ,
|
||||
CREATE_TIME = dtNowEdit,
|
||||
MODIFY_TIME = dtNowEdit,
|
||||
//CREATER_ID = ,
|
||||
//MODIFIER_ID = ,
|
||||
USER_ID = listPlan[i].Nav_DeviceBase.USER_ID
|
||||
});
|
||||
listCheckUserTemp = new List<T_DM_DEVICE_MAINTENANCE_CHECK_USER>();
|
||||
foreach (var item in listPlan[i].Nav_ListUser)
|
||||
{
|
||||
if (item.ISMAIN)
|
||||
{
|
||||
UserID = item.USER_ID;
|
||||
UserName = item.Nav_User.NAME;
|
||||
}
|
||||
listCheckUserTemp.Add(new T_DM_DEVICE_MAINTENANCE_CHECK_USER()
|
||||
{
|
||||
ID = Guid.NewGuid(),
|
||||
CHECK_ID = CheckID,
|
||||
USER_ID = item.USER_ID,
|
||||
ISMAIN = item.ISMAIN,
|
||||
ISCHECK = item.ISMAIN,
|
||||
//CHECKTIME = ,
|
||||
IS_DELETED = false,
|
||||
ORG_ID = item.ORG_ID,
|
||||
//ENTITY_ORG_TPYE = ,
|
||||
//FORM_ID = ,
|
||||
//FLOW_STATUS = ,
|
||||
//FLOW_SEND_STATUS = ,
|
||||
//FLOW_ID = ,
|
||||
CREATE_TIME = dtNowEdit,
|
||||
MODIFY_TIME = dtNowEdit,
|
||||
//CREATER_ID = ,
|
||||
//MODIFIER_ID = ,
|
||||
});
|
||||
}
|
||||
|
||||
//维保人员赋值 容易查找
|
||||
listCheck[listCheck.Count - 1].Nav_ListUser = listCheckUserTemp;
|
||||
listCheckUser.AddRange(listCheckUserTemp);
|
||||
|
||||
//待办
|
||||
listTaskMaintCheck.Add(NotificationTaskService.InsertUserNoticeTaskModel("设备设施维保", CheckID, listCheck[0].ORG_ID, UserID, UserName, dtNowEdit, dtNowEdit.AddDays(1), 1, "DM030"));
|
||||
|
||||
}
|
||||
|
||||
|
||||
//检查明细
|
||||
listCheckDetail.Add(new T_DM_DEVICE_MAINTENANCE_CHECK_DETAIL()
|
||||
{
|
||||
ID = Guid.NewGuid(),
|
||||
PLANID = listPlan[i].ID,
|
||||
CHECK_ID = CheckID,
|
||||
DEVICEBASE_ID = listPlan[i].DEVICEBASE_ID,
|
||||
MACHINE_NAME = listPlan[i].MACHINE_NAME,
|
||||
SPEC = listPlan[i].SPEC,
|
||||
COUNT = listPlan[i].COUNT,
|
||||
POSITION = listPlan[i].POSITION,
|
||||
CONTENT = listPlan[i].CONTENT,
|
||||
//Result = ,
|
||||
IS_DELETED = false,
|
||||
ORG_ID = listPlan[i].ORG_ID,
|
||||
//ENTITY_ORG_TPYE = ,
|
||||
//FORM_ID = ,
|
||||
//FLOW_STATUS = ,
|
||||
//FLOW_SEND_STATUS = ,
|
||||
//FLOW_ID = ,
|
||||
CREATE_TIME = dtNowEdit,
|
||||
MODIFY_TIME = dtNowEdit,
|
||||
//CREATER_ID = ,
|
||||
//MODIFIER_ID = ,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//符合 条件的 计划 做设备点检、巡检
|
||||
//var listBaseID = listPlan.Select(e => e.DEVICEBASE_ID.Value);
|
||||
|
||||
//var listBase = GetEntities<T_DM_DEVICE_BASE>(e => listBaseID.Contains(e.ID), null, "Nav_ListCheck.Nav_ListUser.Nav_User");
|
||||
//if (listBase == null || !listBase.Any())
|
||||
//{
|
||||
// return true;
|
||||
//}
|
||||
|
||||
//给 符合条件的 计划 对应 设备设施库 中 点检、巡检 发送 点检 巡检 待办 给 第一个 巡检人员
|
||||
|
||||
List<T_DM_DEVICE_CHECK> listCheckSend = new List<T_DM_DEVICE_CHECK>();
|
||||
List<T_DM_DEVICE_CHECK_DETAIL> listCheckDetailSend = new List<T_DM_DEVICE_CHECK_DETAIL>();
|
||||
List<T_DM_DEVICE_CHECK_USER> listCheckUserSend = new List<T_DM_DEVICE_CHECK_USER>();
|
||||
List<T_FM_NOTIFICATION_TASK> listTask = new List<T_FM_NOTIFICATION_TASK>();
|
||||
|
||||
if (isCheck)//点检 巡检
|
||||
{
|
||||
int RowIndex = 1;
|
||||
Guid UserId = Guid.Empty;
|
||||
Guid CheckId = Guid.Empty;
|
||||
string userName = String.Empty;
|
||||
T_DM_DEVICE_BASE_CHECK_USER UserMain = null;
|
||||
T_DM_DEVICE_CHECK_DETAIL CheckDetail = null;
|
||||
CheckType? lastCheckType = null;
|
||||
foreach (var item in listDeviceBase)// listBase
|
||||
{
|
||||
if (item.Nav_ListCheck == null || !item.Nav_ListCheck.Any())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
//var listCheckCircle = item.Nav_ListCheck.Where(e => e.Nav_ListUser != null && e.Nav_ListUser.Any() && e.CHECKTYPE == CheckType.CheckCircuit);
|
||||
//var listCheck = item.Nav_ListCheck.Where(e => e.Nav_ListUser != null && e.Nav_ListUser.Any() && e.CHECKTYPE == CheckType.Check);
|
||||
|
||||
var listCheckBase = item.Nav_ListCheck.Where(e => e.Nav_ListUser != null && e.Nav_ListUser.Any()).OrderBy(e => e.CHECKTYPE);
|
||||
|
||||
if (listCheckBase != null && listCheckBase.Any())
|
||||
{
|
||||
RowIndex = 1;
|
||||
//巡检单
|
||||
foreach (var itemDetail in listCheckBase)
|
||||
{
|
||||
//检查人员
|
||||
UserMain = itemDetail.Nav_ListUser.FirstOrDefault(e => e.ISMAIN);
|
||||
|
||||
if (UserId == Guid.Empty || UserMain.USER_ID != UserId || (lastCheckType != null && lastCheckType != itemDetail.CHECKTYPE))
|
||||
{
|
||||
UserId = UserMain.USER_ID;
|
||||
userName = UserMain.Nav_User.NAME;
|
||||
|
||||
T_DM_DEVICE_CHECK checkCircle = new T_DM_DEVICE_CHECK();
|
||||
|
||||
#region 点检 巡检 单
|
||||
|
||||
checkCircle.ID = Guid.NewGuid();
|
||||
checkCircle.DEVICEBASE_ID = item.ID;
|
||||
checkCircle.CHECKTYPE = itemDetail.CHECKTYPE;
|
||||
|
||||
//checkCircle.PLANID = listPlan.Find(e => e.DEVICEBASE_ID == item.ID).ID;// null;
|
||||
checkCircle.CODE = dtNowEdit.ToString("yyyyMMddHHmmss") + RowIndex.ToString();
|
||||
checkCircle.NAME = (itemDetail.CHECKTYPE == CheckType.Check ? "点检" : "巡检") + dtNowEdit.ToString("MMdd");
|
||||
|
||||
checkCircle.RECORD_DATE = dtNowEdit;
|
||||
|
||||
|
||||
//checkCircle.START_TIME = ;
|
||||
//checkCircle.END_TIME = ;
|
||||
//checkCircle.TEAM_NAME = ;
|
||||
//checkCircle.TEAM_ID = ;
|
||||
//checkCircle.SCHEDULIN_ID = ;
|
||||
|
||||
checkCircle.MACHINE_NAME = item.NAME;
|
||||
checkCircle.SPEC = item.SPEC;
|
||||
checkCircle.MACHINE_CODE = item.CODE;
|
||||
checkCircle.POSITION_NAME = item.POSITION;
|
||||
checkCircle.STATUS = PFStandardStatus.Draft;
|
||||
checkCircle.IS_DELETED = false;
|
||||
checkCircle.ORG_ID = item.ORG_ID;
|
||||
//checkCircle.ENTITY_ORG_TPYE = ;
|
||||
//checkCircle.FORM_ID = ;
|
||||
//checkCircle.FLOW_STATUS = ;
|
||||
//checkCircle.FLOW_SEND_STATUS = ;
|
||||
//checkCircle.FLOW_ID = ;
|
||||
checkCircle.CREATE_TIME = dtNowEdit;
|
||||
checkCircle.MODIFY_TIME = dtNowEdit;
|
||||
//checkCircle.CREATER_ID = ;
|
||||
//checkCircle.MODIFIER_ID = ;
|
||||
#endregion
|
||||
|
||||
CheckId = checkCircle.ID;
|
||||
listCheckSend.Add(checkCircle);
|
||||
|
||||
|
||||
//添加待办
|
||||
listTask.Add(NotificationTaskService.InsertUserNoticeTaskModel("设备设施" + (itemDetail.CHECKTYPE == CheckType.Check ? "点检" : "巡检"), checkCircle.ID, checkCircle.ORG_ID, UserId, userName, dtNowEdit, dtNowEdit.AddDays(1), 1, (itemDetail.CHECKTYPE == CheckType.Check ? "DM010" : "DM032")));
|
||||
|
||||
#region 检查明细 检查人员
|
||||
|
||||
foreach (var itemDetailUser in itemDetail.Nav_ListUser)
|
||||
{
|
||||
listCheckUserSend.Add(new T_DM_DEVICE_CHECK_USER()
|
||||
{
|
||||
ID = Guid.NewGuid(),
|
||||
CHECK_ID = CheckId,// CheckDetail.ID,
|
||||
USER_ID = itemDetailUser.USER_ID,
|
||||
ISMAIN = itemDetailUser.ISMAIN,
|
||||
ISCHECK = itemDetailUser.ISMAIN ? true : false,//记录人 默认 确认过
|
||||
IS_DELETED = false,
|
||||
ORG_ID = itemDetailUser.ORG_ID,
|
||||
//ENTITY_ORG_TPYE = ,
|
||||
//FORM_ID = ,
|
||||
//FLOW_STATUS = ,
|
||||
//FLOW_SEND_STATUS = ,
|
||||
//FLOW_ID = ,
|
||||
CREATE_TIME = dtNowEdit,
|
||||
MODIFY_TIME = dtNowEdit,
|
||||
//CREATER_ID = ,
|
||||
//MODIFIER_ID = ,
|
||||
});
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
#region 点检、巡检 检查明细
|
||||
|
||||
CheckDetail = new T_DM_DEVICE_CHECK_DETAIL()
|
||||
{
|
||||
ID = Guid.NewGuid(),
|
||||
DEVICE_CHECK_ID = CheckId,
|
||||
ROW_NO = RowIndex,
|
||||
DEVICEBASE_ID = item.ID,
|
||||
ITEM1 = itemDetail.ITEM1,
|
||||
ITEM2 = itemDetail.ITEM2,
|
||||
ITEM3 = itemDetail.ITEM3,
|
||||
//CHECK_VALUE = ,
|
||||
////DESCRIPTION = ,
|
||||
IS_DELETED = false,
|
||||
ORG_ID = itemDetail.ORG_ID,
|
||||
//ENTITY_ORG_TPYE = ,
|
||||
//FORM_ID = ,
|
||||
//FLOW_STATUS = ,
|
||||
//FLOW_SEND_STATUS = ,
|
||||
//FLOW_ID = ,
|
||||
CREATE_TIME = dtNowEdit,
|
||||
MODIFY_TIME = dtNowEdit,
|
||||
//CREATER_ID = ,
|
||||
//MODIFIER_ID = ,
|
||||
BASECHECK_ID = itemDetail.ID,
|
||||
};
|
||||
listCheckDetailSend.Add(CheckDetail);
|
||||
|
||||
#endregion
|
||||
|
||||
RowIndex++;
|
||||
lastCheckType = itemDetail.CHECKTYPE;//检查类型赋值
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region 跑批信息修改
|
||||
|
||||
T_FM_SYNC_TASK task = null;
|
||||
task = GetEntity<T_FM_SYNC_TASK>(filter.Keyword);
|
||||
if (task != null)
|
||||
{
|
||||
task.UPDATE_SUCCES_TIME = DateTime.Now;//上次同步结束时间
|
||||
task.SYNC_PARAM = "";//清空参数
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
if (task != null)
|
||||
UpdateEntityNoCommit(task);//跑批信息
|
||||
|
||||
//点检 巡检
|
||||
if (listCheckSend != null && listCheckSend.Any())
|
||||
BantchSaveEntityNoCommit(listCheckSend);
|
||||
if (listCheckDetailSend != null && listCheckDetailSend.Any())
|
||||
BantchSaveEntityNoCommit(listCheckDetailSend);
|
||||
if (listCheckUserSend != null && listCheckUserSend.Any())
|
||||
BantchSaveEntityNoCommit(listCheckUserSend);
|
||||
if (listTask != null && listTask.Any())
|
||||
BantchSaveEntityNoCommit(listTask);
|
||||
|
||||
//维保
|
||||
if (listCheckUser != null && listCheckUser.Any())
|
||||
BantchSaveEntityNoCommit(listCheckUser);
|
||||
if (listCheck != null && listCheck.Any())
|
||||
BantchSaveEntityNoCommit(listCheck);
|
||||
if (listCheckDetail != null && listCheckDetail.Any())
|
||||
BantchSaveEntityNoCommit(listCheckDetail);
|
||||
if (listTaskMaintCheck != null && listTaskMaintCheck.Any())
|
||||
BantchSaveEntityNoCommit(listTaskMaintCheck);
|
||||
});
|
||||
|
||||
int Count = ((listCheckSend != null && listCheckSend.Any()) ? listCheckSend.Count : 0) + ((listCheckDetailSend != null && listCheckDetailSend.Any()) ? listCheckDetailSend.Count : 0) + ((listCheckUserSend != null && listCheckUserSend.Any()) ? listCheckUserSend.Count : 0) + ((listTask != null && listTask.Any()) ? listTask.Count : 0) + ((listCheckUser != null && listCheckUser.Any()) ? listCheckUser.Count : 0) + ((listCheck != null && listCheck.Any()) ? listCheck.Count : 0) + ((listCheckDetail != null && listCheckDetail.Any()) ? listCheckDetail.Count : 0) + ((listTaskMaintCheck != null && listTaskMaintCheck.Any()) ? listTaskMaintCheck.Count : 0);
|
||||
SyncLogDetailService.InsertSyncLogDetail(HttpContext.Items, HttpContext.TraceIdentifier, filter.OrgId, Count, filter.Parameter1, SyncLogType.BSCreateCheckPlanSet);
|
||||
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
#region HMR
|
||||
/// <summary>
|
||||
/// 触发设备设施检测检验
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("InspectionSync")]
|
||||
public JsonActionResult<bool> InspectionSync([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return SafeExecute<bool>(() =>
|
||||
{
|
||||
var dtNow = DateTime.Now;
|
||||
var month = dtNow.Month;
|
||||
var day = dtNow.Day;
|
||||
var time = dtNow.TimeOfDay;
|
||||
var week = dtNow.DayOfWeek;
|
||||
bool isSend = false;
|
||||
List<T_FM_NOTIFICATION_TASK> sendNotices = new List<T_FM_NOTIFICATION_TASK>();
|
||||
T_DM_DETECTION_INSPECTION_RECORD record = null;
|
||||
var newFilter = new BaseFilter(filter.OrgId);
|
||||
newFilter.SelectField = new List<string> { "PLANCHECKFREQUENCY", "MONTH", "DATA", "WEEKDATA", "RUNSETTIME" };
|
||||
var timeSet = GetEntity<T_PT_TIME_SET>(i => i.SET_TYPE == PTSetTypeEnum.Inspection, newFilter);
|
||||
if (timeSet != null)
|
||||
{
|
||||
switch (timeSet.PLANCHECKFREQUENCY)
|
||||
{
|
||||
//case BSPLANCHECKFREQUENCYEnum.OneTime:
|
||||
case BSPLANCHECKFREQUENCYEnum.Year:
|
||||
if (timeSet.MONTH == month && timeSet.DATA == day)
|
||||
isSend = true;
|
||||
break;
|
||||
case BSPLANCHECKFREQUENCYEnum.HalfYear:
|
||||
if ((timeSet.MONTH == month && timeSet.DATA == day) || ((timeSet.MONTH + 6) == month && (timeSet.DATA + 183) == day))
|
||||
isSend = true;
|
||||
break;
|
||||
case BSPLANCHECKFREQUENCYEnum.Date:
|
||||
isSend = true;
|
||||
break;
|
||||
case BSPLANCHECKFREQUENCYEnum.Week:
|
||||
if (timeSet.WEEKDATA != null && (int)timeSet.WEEKDATA.Value == (int)week)
|
||||
isSend = true;
|
||||
break;
|
||||
case BSPLANCHECKFREQUENCYEnum.Month:
|
||||
if (timeSet.DATA == day)
|
||||
isSend = true;
|
||||
break;
|
||||
case BSPLANCHECKFREQUENCYEnum.Quarter:
|
||||
if (timeSet.MONTH == 1)
|
||||
{
|
||||
if ((month == 1 || month == 4 || month == 7 || month == 10) && timeSet.DATA == day)
|
||||
isSend = true;
|
||||
}
|
||||
if (timeSet.MONTH == 2)
|
||||
{
|
||||
if ((month == 2 || month == 5 || month == 8 || month == 11) && timeSet.DATA == day)
|
||||
isSend = true;
|
||||
}
|
||||
if (timeSet.MONTH == 3)
|
||||
{
|
||||
if ((month == 3 || month == 6 || month == 9 || month == 12) && timeSet.DATA == day)
|
||||
isSend = true;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (isSend)
|
||||
{
|
||||
var userInfo = this.GetEntity<T_FM_PARAM_SET>(t => t.NAME == "检测检验责任人", "Nav_User");
|
||||
if (userInfo != null)
|
||||
{
|
||||
record = new T_DM_DETECTION_INSPECTION_RECORD();
|
||||
record.ORG_ID = userInfo.ORG_ID;
|
||||
record.STATUS = PFStandardStatus.Draft;
|
||||
record.TIME = DateTime.Now;
|
||||
record.RESULT = DMInspectionResultEnum.不合格;
|
||||
record.USER_ID = userInfo.USER_ID;
|
||||
var user = this.GetEntity<T_FM_USER>(t => t.ID == userInfo.USER_ID);
|
||||
record.DEPARTMENT_ID = user?.DEPARTMENT_ID;
|
||||
sendNotices.Add(NotificationTaskService.InsertUserNoticeTaskModel("设备设施检测检验记录", record.ID, filter.GetOrgId(), userInfo.USER_ID.Value, userInfo.Nav_User.NAME, DateTime.Now, DateTime.Now.AddDays(30), (int)FMNoticeTypeEnum.消息, "DM012"));
|
||||
}
|
||||
}
|
||||
UnifiedCommit(() =>
|
||||
{
|
||||
if (record != null)
|
||||
UpdateEntityNoCommit(record);
|
||||
if (sendNotices != null && sendNotices.Any())
|
||||
BantchSaveEntityNoCommit(sendNotices);
|
||||
});
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 触发设备设施归还记录
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("DeviceReturnSync")]
|
||||
public JsonActionResult<bool> DeviceReturnSync([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return SafeExecute<bool>(() =>
|
||||
{
|
||||
var dtNow = DateTime.Now;
|
||||
List<T_FM_NOTIFICATION_TASK> sendNotices = new List<T_FM_NOTIFICATION_TASK>();
|
||||
var details = GetEntities<T_DM_DEVICE_ISSUE_DETAIL>(i => i.RETURN_STATUS == DMIsReturnEnum.NG && i.RETURN_TIME.Value.Date == dtNow.Date, new BaseFilter(filter.OrgId), "Nav_User", "Nav_DeviceBase");
|
||||
if (details != null && details.Any())
|
||||
{
|
||||
foreach (var item in details)
|
||||
{
|
||||
sendNotices.Add(NotificationTaskService.InsertUserNoticeTaskModel("设备" + item.Nav_DeviceBase.NAME + "归还记录", item.ID, filter.GetOrgId(), item.USER_ID.Value, item.Nav_User.NAME, DateTime.Now, DateTime.Now.AddDays(30), (int)FMNoticeTypeEnum.消息, "DM026"));
|
||||
}
|
||||
}
|
||||
UnifiedCommit(() =>
|
||||
{
|
||||
if (sendNotices != null && sendNotices.Any())
|
||||
BantchSaveEntityNoCommit(sendNotices);
|
||||
});
|
||||
return true;
|
||||
});
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@ -1,229 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.BaseData.Domain.Enums.PF;
|
||||
using APT.BaseData.Domain.IServices;
|
||||
using APT.BaseData.Domain.IServices.FM;
|
||||
using APT.BaseData.Services.Services.FM;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Entities.DM;
|
||||
using APT.MS.Domain.Enums;
|
||||
using APT.Utility;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
|
||||
namespace APT.SC.WebApi.Controllers.Api.DM
|
||||
{
|
||||
[Route("api/DM/DMDeviceBase")]
|
||||
public class DMDeviceBaseController : AuthorizeApiController<T_DM_DEVICE_BASE>
|
||||
{
|
||||
IFMNotificationTaskService NotificationTaskService { get; set; }
|
||||
public DMDeviceBaseController(IFMNotificationTaskService notificationTaskService)
|
||||
{
|
||||
NotificationTaskService = notificationTaskService;
|
||||
}
|
||||
/// <summary>
|
||||
/// 设备设施维保计划 修改
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("FullUpdate")]
|
||||
public JsonActionResult<bool> FullUpdate([FromBody] T_DM_DEVICE_BASE entity)
|
||||
{
|
||||
return SafeExecute<bool>(() =>
|
||||
{
|
||||
var Files = entity.Nav_Files;
|
||||
entity.Nav_Files = null;
|
||||
var ListCheck = entity.Nav_ListCheck;
|
||||
entity.Nav_ListCheck = null;
|
||||
var ListCheckCircle = entity.Nav_ListCheckCircle;
|
||||
entity.Nav_ListCheckCircle = null;
|
||||
var Purchases = entity.Nav_Purchases;
|
||||
entity.Nav_Purchases = null;
|
||||
List<T_DM_DEVICE_BASE_CHECK_USER> listCheckUser = new List<T_DM_DEVICE_BASE_CHECK_USER>();
|
||||
int RowIndex = 1;
|
||||
if (ListCheck != null && ListCheck.Any())
|
||||
{
|
||||
foreach (var item in ListCheck)
|
||||
{
|
||||
item.CHECKTYPE = CheckType.Check;
|
||||
|
||||
#region 周期判断
|
||||
if (item.DATA == 0)
|
||||
{
|
||||
item.DATA = null;
|
||||
}
|
||||
if (item.PLANCHECKFREQUENCY == null)
|
||||
{
|
||||
throw new Exception("点检周期行:【" + RowIndex + "】不能为空!");
|
||||
}
|
||||
else if (item.PLANCHECKFREQUENCY.Value == BSPLANCHECKFREQUENCYEnum.Week)
|
||||
{
|
||||
if (item.WEEKDATA == null)
|
||||
{
|
||||
throw new Exception("点检明细行:【" + RowIndex + "】【星期】不能为空!");
|
||||
}
|
||||
if (item.DATA != null)
|
||||
{
|
||||
throw new Exception("点检明细行:【" + RowIndex + "】【日】不能填写!");
|
||||
}
|
||||
}
|
||||
else if (item.PLANCHECKFREQUENCY.Value == BSPLANCHECKFREQUENCYEnum.Date)
|
||||
{
|
||||
if (item.WEEKDATA != null)
|
||||
{
|
||||
throw new Exception("点检明细行:【" + RowIndex + "】【星期】不能填写!");
|
||||
}
|
||||
if (item.DATA != null)
|
||||
{
|
||||
throw new Exception("点检明细行:【" + RowIndex + "】【日】不能填写!");
|
||||
}
|
||||
}
|
||||
else if (item.PLANCHECKFREQUENCY.Value == BSPLANCHECKFREQUENCYEnum.Quarter || item.PLANCHECKFREQUENCY.Value == BSPLANCHECKFREQUENCYEnum.Month || item.PLANCHECKFREQUENCY.Value == BSPLANCHECKFREQUENCYEnum.Year || item.PLANCHECKFREQUENCY.Value == BSPLANCHECKFREQUENCYEnum.HalfYear)//OneTime
|
||||
{
|
||||
if (item.WEEKDATA != null)
|
||||
{
|
||||
throw new Exception("点检明细行:【" + RowIndex + "】【星期】不能填写!");
|
||||
}
|
||||
if (item.DATA == null)
|
||||
{
|
||||
throw new Exception("点检明细行:【" + RowIndex + "】【日】不能为空!");
|
||||
}
|
||||
if (item.DATA.Value < 1)
|
||||
{
|
||||
throw new Exception("点检明细行:【" + RowIndex + "】【日】必须大于零!");
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
if (item.Nav_ListUser != null && item.Nav_ListUser.Any())
|
||||
{
|
||||
List<T_DM_DEVICE_BASE_CHECK_USER> listCheckUserTemp = item.Nav_ListUser.ToList();
|
||||
listCheckUserTemp[0].ISMAIN = true;
|
||||
listCheckUser.AddRange(listCheckUserTemp);
|
||||
}
|
||||
RowIndex++;
|
||||
}
|
||||
}
|
||||
if (ListCheckCircle != null && ListCheckCircle.Any())
|
||||
{
|
||||
RowIndex = 1;
|
||||
foreach (var item in ListCheckCircle)
|
||||
{
|
||||
item.CHECKTYPE = CheckType.CheckCircuit;
|
||||
|
||||
#region 周期判断
|
||||
if (item.DATA == 0)
|
||||
{
|
||||
item.DATA = null;
|
||||
}
|
||||
if (item.PLANCHECKFREQUENCY == null)
|
||||
{
|
||||
throw new Exception("巡检周期行:【" + RowIndex + "】不能为空!");
|
||||
}
|
||||
else if (item.PLANCHECKFREQUENCY.Value == BSPLANCHECKFREQUENCYEnum.Week)
|
||||
{
|
||||
if (item.WEEKDATA == null)
|
||||
{
|
||||
throw new Exception("巡检明细行:【" + RowIndex + "】【星期】不能为空!");
|
||||
}
|
||||
if (item.DATA != null)
|
||||
{
|
||||
throw new Exception("巡检明细行:【" + RowIndex + "】【日】不能填写!");
|
||||
}
|
||||
}
|
||||
else if (item.PLANCHECKFREQUENCY.Value == BSPLANCHECKFREQUENCYEnum.Date)
|
||||
{
|
||||
if (item.WEEKDATA != null)
|
||||
{
|
||||
throw new Exception("巡检明细行:【" + RowIndex + "】【星期】不能填写!");
|
||||
}
|
||||
if (item.DATA != null)
|
||||
{
|
||||
throw new Exception("巡检明细行:【" + RowIndex + "】【日】不能填写!");
|
||||
}
|
||||
}
|
||||
else if (item.PLANCHECKFREQUENCY.Value == BSPLANCHECKFREQUENCYEnum.Quarter || item.PLANCHECKFREQUENCY.Value == BSPLANCHECKFREQUENCYEnum.Month || item.PLANCHECKFREQUENCY.Value == BSPLANCHECKFREQUENCYEnum.Year|| item.PLANCHECKFREQUENCY.Value == BSPLANCHECKFREQUENCYEnum.HalfYear)
|
||||
{
|
||||
if (item.WEEKDATA != null)
|
||||
{
|
||||
throw new Exception("巡检明细行:【" + RowIndex + "】【星期】不能填写!");
|
||||
}
|
||||
if (item.DATA == null)
|
||||
{
|
||||
throw new Exception("巡检明细行:【" + RowIndex + "】【日】不能为空!");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
if (item.Nav_ListUser != null && item.Nav_ListUser.Any())
|
||||
{
|
||||
List<T_DM_DEVICE_BASE_CHECK_USER> listCheckUserTemp = item.Nav_ListUser.ToList();
|
||||
listCheckUserTemp[0].ISMAIN = true;
|
||||
listCheckUser.AddRange(listCheckUserTemp);
|
||||
}
|
||||
}
|
||||
}
|
||||
var AHUser = GetEntity<T_FM_USER>(t => t.Nav_ApproveRole.NAME == "安环部负责人");
|
||||
T_FM_NOTIFICATION_TASK sendNotice = null;
|
||||
if (AHUser != null && entity.IS_SEND == 0)
|
||||
{
|
||||
entity.IS_SEND = 1;
|
||||
sendNotice = NotificationTaskService.InsertUserNoticeTaskModel(GetEntity<T_FM_DEPARTMENT>(entity.DEPARTMENT_ID.Value).NAME + "新采购了设备设施,请进行风险辨识与评价", entity.ID, entity.ORG_ID, AHUser.ID, AHUser.NAME, DateTime.Now, DateTime.Now.AddDays(10), (int)FMNoticeTypeEnum.今日提醒, "PF135");
|
||||
}
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
if (entity != null)
|
||||
UpdateEntityNoCommit(entity);
|
||||
if (Files != null && Files.Any())//维保工作方案
|
||||
BantchSaveEntityNoCommit(Files);
|
||||
if (ListCheck != null && ListCheck.Any())//维保工作方案
|
||||
BantchSaveEntityNoCommit(ListCheck);
|
||||
if (ListCheckCircle != null && ListCheckCircle.Any())//维保工作方案
|
||||
BantchSaveEntityNoCommit(ListCheckCircle);
|
||||
if (Purchases != null && Purchases.Any())//维保工作方案
|
||||
BantchSaveEntityNoCommit(Purchases);
|
||||
if (listCheckUser != null && listCheckUser.Any())//检查人
|
||||
BantchSaveEntityNoCommit(listCheckUser);
|
||||
if (sendNotice != null)
|
||||
AddEntityNoCommit(sendNotice);
|
||||
});
|
||||
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获得单条实体数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("GetShow")]
|
||||
public JsonActionResult<T_DM_DEVICE_BASE> GetShow([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return SafeExecute(() =>
|
||||
{
|
||||
var result = GetEntity<T_DM_DEVICE_BASE>(null, filter, null);
|
||||
if (result != null && result.Nav_ListCheck != null && result.Nav_ListCheck.Any())
|
||||
{
|
||||
foreach (var item in result.Nav_ListCheck)
|
||||
{
|
||||
if (item.Nav_ListUser != null && item.Nav_ListUser.Any())
|
||||
{
|
||||
item.Nav_ListUser = item.Nav_ListUser.OrderByDescending(e => e.ISMAIN).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
result.Nav_ListCheckCircle = result.Nav_ListCheck.Where(e => e.CHECKTYPE == CheckType.CheckCircuit).ToList();
|
||||
|
||||
result.Nav_ListCheck = result.Nav_ListCheck.Where(e => e.CHECKTYPE == CheckType.Check).ToList();
|
||||
}
|
||||
return result;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,277 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.BaseData.Domain.Enums.PF;
|
||||
using APT.BaseData.Domain.IServices;
|
||||
using APT.BaseData.Domain.IServices.FM;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Entities.DM;
|
||||
using APT.MS.Domain.Enums;
|
||||
using APT.Utility;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
|
||||
namespace APT.SC.WebApi.Controllers.Api.DM
|
||||
{
|
||||
[Route("api/DM/DMDeviceCheck")]
|
||||
public class DMDeviceCheckController : AuthorizeApiController<T_DM_DEVICE_CHECK>
|
||||
{
|
||||
IFMNotificationTaskService NotificationTaskService { get; set; }
|
||||
public DMDeviceCheckController(IFMNotificationTaskService notificationTaskService)
|
||||
{
|
||||
NotificationTaskService = notificationTaskService;
|
||||
}
|
||||
/// <summary>
|
||||
/// 设备设施维保计划 修改
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("FullUpdate")]
|
||||
public JsonActionResult<bool> FullUpdate([FromBody] T_DM_DEVICE_CHECK entity)
|
||||
{
|
||||
return SafeExecute<bool>(() =>
|
||||
{
|
||||
var ListDetail = entity.Nav_ListDetail;
|
||||
entity.Nav_ListDetail = null;
|
||||
T_FM_NOTIFICATION_TASK taskEnd = null;
|
||||
List<T_FM_NOTIFICATION_TASK> listTaskCheck = null;
|
||||
var files = entity.Nav_Files;
|
||||
entity.Nav_Files = null;
|
||||
|
||||
if (ListDetail == null)
|
||||
{
|
||||
throw new Exception(entity.CHECKTYPE.GetDescription() + "明细不能未空!");
|
||||
}
|
||||
if (entity.STATUS != PFStandardStatus.Draft)
|
||||
{
|
||||
int RowIndex = 1;
|
||||
foreach (var item in ListDetail)
|
||||
{
|
||||
if (item.CHECK_VALUE == null)
|
||||
{
|
||||
throw new Exception("请选择行:" + RowIndex + "检查结论!");
|
||||
}
|
||||
//else if ((item.CHECK_VALUE.Value == CheckResult.CheckWork || item.CHECK_VALUE.Value == CheckResult.CheckStop) && string.IsNullOrEmpty(item.DESCRIPTION))
|
||||
else if (item.CHECK_VALUE.Value == CheckResult.NotOK && string.IsNullOrEmpty(item.DESCRIPTION))
|
||||
{
|
||||
throw new Exception("请填写子表行:【" + RowIndex + "】的问题描述!");
|
||||
}
|
||||
RowIndex++;
|
||||
}
|
||||
|
||||
if (entity.TaskID != Guid.Empty)
|
||||
{
|
||||
//taskEnd = NotificationTaskService.GetEntityTask(entity.TaskID, "DM010_SHOWPRINT");
|
||||
taskEnd = NotificationTaskService.GetEntityTask(entity.TaskID, (entity.CHECKTYPE == CheckType.CheckCircuit ? "DM032_SHOWPRINT" : "DM010_SHOWPRINT"));
|
||||
}
|
||||
|
||||
//给其他人 发送待办 确认
|
||||
var listUser = GetEntities<T_DM_DEVICE_CHECK_USER>(e => e.CHECK_ID == entity.ID && !e.ISMAIN, null, "Nav_User");
|
||||
if (listUser == null || !listUser.Any())
|
||||
{
|
||||
//没有 别的检查人
|
||||
entity.STATUS = PFStandardStatus.Archived;
|
||||
}
|
||||
else
|
||||
{
|
||||
List<Guid> UserId = new List<Guid>();
|
||||
List<string> userName = new List<string>();
|
||||
foreach (var item in listUser)
|
||||
{
|
||||
UserId.Add(item.USER_ID);
|
||||
userName.Add(item.Nav_User.NAME);
|
||||
}
|
||||
|
||||
//listTaskCheck = NotificationTaskService.InsertUserNoticeTaskModels((entity.CHECKTYPE == CheckType.CheckCircuit ? "设备巡检" : "设备点检") + "确认" + (entity.CREATE_TIME.HasValue ? entity.CREATE_TIME.Value.ToString("MMdd") : ""), entity.ID, entity.ORG_ID, UserId, userName, DateTime.Now, DateTime.Now.AddDays(1), 1, "DM010_SHOWPRINT");
|
||||
|
||||
listTaskCheck = NotificationTaskService.InsertUserNoticeTaskModels((entity.CHECKTYPE == CheckType.CheckCircuit ? "设备设施巡检" : "设备设施点检") + "确认" + (entity.CREATE_TIME.HasValue ? entity.CREATE_TIME.Value.ToString("MMdd") : ""), entity.ID, entity.ORG_ID, UserId, userName, DateTime.Now, DateTime.Now.AddDays(1), 1, (entity.CHECKTYPE == CheckType.CheckCircuit ? "DM032_SHOWPRINT" : "DM010_SHOWPRINT"));
|
||||
}
|
||||
}
|
||||
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
if (entity != null)
|
||||
UpdateEntityNoCommit(entity);
|
||||
if (files != null)
|
||||
BantchSaveEntityNoCommit(files);
|
||||
if (taskEnd != null)//结束待办
|
||||
UpdateEntityNoCommit(taskEnd);
|
||||
if (ListDetail != null && ListDetail.Any())//检查明细
|
||||
BantchSaveEntityNoCommit(ListDetail);
|
||||
if (listTaskCheck != null && listTaskCheck.Any())//检查明细
|
||||
BantchSaveEntityNoCommit(listTaskCheck);
|
||||
});
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 点检人 确认
|
||||
/// </summary>
|
||||
[HttpPost, Route("Check")]
|
||||
public JsonActionResult<bool> Check([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return SafeExecute<bool>(() =>
|
||||
{
|
||||
if (string.IsNullOrEmpty(filter.Keyword) || string.IsNullOrEmpty(filter.Parameter1))
|
||||
{
|
||||
throw new Exception("传参有误!");
|
||||
}
|
||||
var guid = new Guid(filter.Keyword);
|
||||
var taskID = new Guid(filter.Parameter1);
|
||||
if (guid == Guid.Empty || taskID == Guid.Empty)
|
||||
{
|
||||
throw new Exception("传参有误!");
|
||||
}
|
||||
var task = NotificationTaskService.GetEntityTask(taskID);
|
||||
|
||||
var loginID = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
var Check = GetEntity<T_DM_DEVICE_CHECK_USER>(e => e.USER_ID == loginID && e.CHECK_ID == guid, "Nav_Check");
|
||||
|
||||
if (Check == null)
|
||||
{
|
||||
var DeviceCheck = GetEntity<T_DM_DEVICE_CHECK>(e => e.ID == guid); DeviceCheck.STATUS = PFStandardStatus.Archived;//状态修改
|
||||
//记录人 上级 确认
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
if (task != null)
|
||||
UpdateEntityNoCommit(task);
|
||||
if (DeviceCheck != null)
|
||||
UpdateEntityNoCommit(DeviceCheck);
|
||||
});
|
||||
|
||||
}
|
||||
else if (Check.ISCHECK)
|
||||
{
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
if (task != null)
|
||||
UpdateEntityNoCommit(task);
|
||||
});
|
||||
throw new Exception("您已审阅,无需再次操作!");
|
||||
}
|
||||
else
|
||||
{
|
||||
Check.ISCHECK = true;
|
||||
var UnCheck = GetEntity<T_DM_DEVICE_CHECK_USER>(e => e.USER_ID != loginID && e.CHECK_ID == guid && !e.ISCHECK);
|
||||
|
||||
T_FM_NOTIFICATION_TASK taskMaster = null;
|
||||
|
||||
if (UnCheck == null)
|
||||
{
|
||||
//最后一个确认 记录人的 上级 确认
|
||||
Guid UserId = Guid.Empty;
|
||||
string userName = string.Empty;
|
||||
Guid DEPID = Guid.Empty;
|
||||
|
||||
var CheckMain = GetEntity<T_DM_DEVICE_CHECK_USER>(e => e.CHECK_ID == guid && e.ISMAIN, "Nav_User.Nav_Department");
|
||||
if (CheckMain.Nav_User.Nav_Department.USER_ID != CheckMain.USER_ID)
|
||||
{
|
||||
if (CheckMain.Nav_User.Nav_Department.USER_ID.HasValue)
|
||||
{
|
||||
|
||||
UserId = CheckMain.Nav_User.Nav_Department.USER_ID.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
DEPID = CheckMain.Nav_User.DEPARTMENT_ID.Value;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var dep = GetEntity<T_FM_DEPARTMENT>(CheckMain.Nav_User.Nav_Department.PARENT_ID.Value);
|
||||
if (dep.USER_ID.HasValue)
|
||||
{
|
||||
|
||||
UserId = dep.USER_ID.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
DEPID = dep.ID;
|
||||
}
|
||||
}
|
||||
if (UserId != Guid.Empty)
|
||||
{
|
||||
userName = GetEntity<T_FM_USER>(UserId).NAME;
|
||||
}
|
||||
else
|
||||
{
|
||||
//先不管
|
||||
}
|
||||
if (UserId != Guid.Empty)
|
||||
{
|
||||
if (UserId == loginID)
|
||||
{
|
||||
//自己就是 填表人的 上级 不发送待办
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
taskMaster = NotificationTaskService.InsertUserNoticeTaskModel((Check.Nav_Check.CHECKTYPE == CheckType.CheckCircuit ? "设备巡检" : "设备点检") + "确认", CheckMain.CHECK_ID, CheckMain.ORG_ID, UserId, userName, DateTime.Now, DateTime.Now.AddDays(1), 1, (Check.Nav_Check.CHECKTYPE == CheckType.CheckCircuit ? "DM032_SHOWPRINT" : "DM010_SHOWPRINT"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//还有别人未 确认
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
if (task != null)
|
||||
UpdateEntityNoCommit(task);
|
||||
if (Check != null)
|
||||
UpdateEntityNoCommit(Check);
|
||||
if (taskMaster != null)
|
||||
UpdateEntityNoCommit(taskMaster);
|
||||
});
|
||||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("OrderPagedSuit")]
|
||||
public PagedActionResult<T_DM_DEVICE_CHECK> OrderPaged([FromBody] KeywordPageFilter pageFilter)
|
||||
{
|
||||
return SafeGetPagedData(delegate (PagedActionResult<T_DM_DEVICE_CHECK> result)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(pageFilter.MenuParameter) && pageFilter.MenuParameter.Contains("="))
|
||||
{
|
||||
var listParm = pageFilter.MenuParameter.Split("=");
|
||||
pageFilter.FilterGroup.Rules.Add(new FilterRule()
|
||||
{
|
||||
Field = listParm[0],
|
||||
Value = listParm[1]
|
||||
});
|
||||
}
|
||||
PagedActionResult<T_DM_DEVICE_CHECK> orderPageEntities = GetOrderPageEntities<T_DM_DEVICE_CHECK>(null, pageFilter, null);
|
||||
result.Data = orderPageEntities.Data;
|
||||
result.TotalCount = orderPageEntities.TotalCount;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获得单条实体数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("GetSuit")]
|
||||
public JsonActionResult<T_DM_DEVICE_CHECK> GetSuit([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return SafeExecute(() =>
|
||||
{
|
||||
var result = GetEntity<T_DM_DEVICE_CHECK>(null, filter, null);
|
||||
if (result.Nav_ListUser != null && result.Nav_ListUser.Any())
|
||||
{
|
||||
result.Nav_ListUser = result.Nav_ListUser.OrderByDescending(e => e.ISMAIN).ToList();
|
||||
}
|
||||
return result;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,40 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.BaseData.Domain.Enums.PF;
|
||||
using APT.BaseData.Domain.IServices;
|
||||
using APT.BaseData.Domain.IServices.FM;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Entities.DM;
|
||||
using APT.MS.Domain.Enums;
|
||||
using APT.Utility;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
|
||||
namespace APT.SC.WebApi.Controllers.Api.DM
|
||||
{
|
||||
[Route("api/DM/DMDeviceCheckDetail")]
|
||||
public class DMDeviceCheckDetailController : AuthorizeApiController<T_DM_DEVICE_CHECK_DETAIL>
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备设施库 选项卡记录查看
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("EntitiesShow")]
|
||||
public JsonActionResult<IEnumerable<T_DM_DEVICE_CHECK_DETAIL>> EntitiesShow([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return SafeExecute(() =>
|
||||
{
|
||||
var list = GetEntities<T_DM_DEVICE_CHECK_DETAIL>(e => e.Nav_DeviceCheck.STATUS != PFStandardStatus.Draft, filter,null);
|
||||
if (list != null && list.Any())
|
||||
{
|
||||
list = list.OrderByDescending(e => e.CREATE_TIME);
|
||||
}
|
||||
return list;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,262 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.BaseData.Domain.Enums.PF;
|
||||
using APT.BaseData.Domain.IServices;
|
||||
using APT.BaseData.Domain.IServices.FM;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Entities.DM;
|
||||
using APT.MS.Domain.Enums;
|
||||
using APT.Utility;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
|
||||
namespace APT.SC.WebApi.Controllers.Api.DM
|
||||
{
|
||||
[Route("api/DM/DMDeviceMaintenanceCheck")]
|
||||
public class DMDeviceMaintenanceCheckController : AuthorizeApiController<T_DM_DEVICE_MAINTENANCE_CHECK>
|
||||
{
|
||||
IFMNotificationTaskService NotificationTaskService { get; set; }
|
||||
IPFApproveCallBackService ApproveCallBackService { get; set; }
|
||||
IFMFlowPermitService MFlowPermitService { get; set; }
|
||||
public DMDeviceMaintenanceCheckController(IFMNotificationTaskService notificationTaskService, IPFApproveCallBackService approveCallBackService, IFMFlowPermitService mflowPermitService)
|
||||
{
|
||||
NotificationTaskService = notificationTaskService;
|
||||
ApproveCallBackService = approveCallBackService;
|
||||
MFlowPermitService = mflowPermitService;
|
||||
}
|
||||
/// <summary>
|
||||
/// 设备设施维保计划 修改
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("FullUpdate")]
|
||||
public JsonActionResult<bool> FullUpdate([FromBody] T_DM_DEVICE_MAINTENANCE_CHECK entity)
|
||||
{
|
||||
return SafeExecute<bool>(() =>
|
||||
{
|
||||
var ListUser = entity.Nav_ListUser;
|
||||
entity.Nav_ListUser = null;
|
||||
var ListDetail = entity.Nav_ListDetail;
|
||||
entity.Nav_ListDetail = null;
|
||||
T_FM_NOTIFICATION_TASK task = null;
|
||||
List<T_FM_NOTIFICATION_TASK> listTask = null;
|
||||
if (entity.STATUS_APPROVE != PFStandardStatus.Draft)
|
||||
{
|
||||
int rowIndex = 1;
|
||||
foreach (var item in ListDetail)
|
||||
{
|
||||
if (item.Result == null)
|
||||
{
|
||||
throw new Exception("请填写行:【" + rowIndex + "】的维保情况!");
|
||||
}
|
||||
rowIndex++;
|
||||
}
|
||||
|
||||
if (entity.TaskID != Guid.Empty)
|
||||
{
|
||||
task = NotificationTaskService.GetEntityTask(entity.TaskID, "DM030_SHOWPRINT");
|
||||
}
|
||||
//给其余人 确认
|
||||
List<Guid> UserId = new List<Guid>();
|
||||
List<string> userName = new List<string>();
|
||||
foreach (var item in ListUser)
|
||||
{
|
||||
if (item.USER_ID != APT.Infrastructure.Api.AppContext.CurrentSession.UserID)
|
||||
{
|
||||
UserId.Add(item.USER_ID);
|
||||
userName.Add(item.Nav_User.NAME);
|
||||
}
|
||||
}
|
||||
listTask = NotificationTaskService.InsertUserNoticeTaskModels("设备设施维保确认", entity.ID, entity.ORG_ID, UserId, userName, DateTime.Now, DateTime.Now.AddDays(1), 1, "DM030_SHOWPRINT");
|
||||
}
|
||||
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
if (entity != null)
|
||||
UpdateEntityNoCommit(entity);
|
||||
if (task != null)
|
||||
UpdateEntityNoCommit(task);
|
||||
if (ListDetail != null)//结束待办
|
||||
BantchSaveEntityNoCommit(ListDetail);
|
||||
if (listTask != null && listTask.Any())//结束待办
|
||||
BantchSaveEntityNoCommit(listTask);
|
||||
});
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获得单条实体数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("GetShow")]
|
||||
public JsonActionResult<T_DM_DEVICE_MAINTENANCE_CHECK> Get([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return SafeExecute(() =>
|
||||
{
|
||||
var check = GetEntity<T_DM_DEVICE_MAINTENANCE_CHECK>(null, filter, null);
|
||||
if (check != null && check.STATUS_APPROVE == PFStandardStatus.Draft)
|
||||
{
|
||||
check.CHECKDATETIME = DateTime.Now;
|
||||
}
|
||||
if (check.Nav_ListUser != null && check.Nav_ListUser.Any())
|
||||
{
|
||||
check.Nav_ListUser = check.Nav_ListUser.OrderByDescending(e => e.ISMAIN).ToList();
|
||||
}
|
||||
return check;
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 点检人 确认
|
||||
/// </summary>
|
||||
[HttpPost, Route("Check")]
|
||||
public JsonActionResult<bool> Check([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return SafeExecute<bool>(() =>
|
||||
{
|
||||
if (string.IsNullOrEmpty(filter.Keyword) || string.IsNullOrEmpty(filter.Parameter1))
|
||||
{
|
||||
throw new Exception("传参有误!");
|
||||
}
|
||||
var guid = new Guid(filter.Keyword);
|
||||
var taskID = new Guid(filter.Parameter1);
|
||||
if (guid == Guid.Empty || taskID == Guid.Empty)
|
||||
{
|
||||
throw new Exception("传参有误!");
|
||||
}
|
||||
var task = NotificationTaskService.GetEntityTask(taskID);
|
||||
|
||||
var loginID = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
T_DM_DEVICE_MAINTENANCE_CHECK check = null;
|
||||
var CheckUser = GetEntity<T_DM_DEVICE_MAINTENANCE_CHECK_USER>(e => e.USER_ID == loginID && e.CHECK_ID == guid);
|
||||
|
||||
if (CheckUser == null)
|
||||
{
|
||||
//记录人 上级 确认
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
if (task != null)
|
||||
UpdateEntityNoCommit(task);
|
||||
});
|
||||
|
||||
throw new Exception("未找到需要您确认的信息!");
|
||||
}
|
||||
else if (CheckUser.ISCHECK)
|
||||
{
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
if (task != null)
|
||||
UpdateEntityNoCommit(task);
|
||||
});
|
||||
throw new Exception("您已审阅,无需再次操作!");
|
||||
}
|
||||
else
|
||||
{
|
||||
CheckUser.ISCHECK = true;
|
||||
CheckUser.CHECKTIME = DateTime.Now;
|
||||
var UnCheck = GetEntity<T_DM_DEVICE_MAINTENANCE_CHECK_USER>(e => e.USER_ID != loginID && e.CHECK_ID == guid && !e.ISCHECK);
|
||||
List<T_FM_NOTIFICATION_TASK> ListTask = null;
|
||||
|
||||
if (UnCheck == null)
|
||||
{
|
||||
//check = GetEntity<T_DM_DEVICE_MAINTENANCE_CHECK>(guid, "Nav_ListDetail.Nav_DeviceBase.Nav_User");
|
||||
check = GetEntity<T_DM_DEVICE_MAINTENANCE_CHECK>(guid, "Nav_User");
|
||||
check.STATUS_APPROVE = PFStandardStatus.Approving;
|
||||
|
||||
//设备设施库 管理责任人员审阅
|
||||
//List<Guid> listUserId = new List<Guid>();
|
||||
//List<string> listUserName = new List<string>();
|
||||
|
||||
//foreach (var item in check.Nav_ListDetail)
|
||||
//{
|
||||
// if (item.Nav_DeviceBase.USER_ID.HasValue && !listUserId.Contains(item.Nav_DeviceBase.USER_ID.Value))
|
||||
// {
|
||||
// listUserId.Add(item.Nav_DeviceBase.USER_ID.Value);
|
||||
// listUserName.Add(item.Nav_DeviceBase.Nav_User.NAME);
|
||||
// }
|
||||
//}
|
||||
|
||||
if (check.USER_ID.HasValue)
|
||||
{
|
||||
//listUserId.Add(check.USER_ID.Value);
|
||||
//listUserName.Add(check.Nav_User.NAME);
|
||||
|
||||
//ListTask = NotificationTaskService.InsertUserNoticeTaskModels("设备设施维保确认", guid, CheckUser.ORG_ID, listUserId, listUserName, DateTime.Now, DateTime.Now.AddDays(1), 1, "DM030_SHOWPRINT");
|
||||
|
||||
//添加 审批流
|
||||
check.APPROVE_ID = Guid.NewGuid();
|
||||
Dictionary<int, T_FM_USER> dicApproveUser = new Dictionary<int, T_FM_USER>();
|
||||
dicApproveUser.Add(1, check.Nav_User);
|
||||
|
||||
MFlowPermitService.InsertApprove("WB" + DateTime.Now.ToString("yyyyMMddHHmmss"), "DM030", null, check.ID, "DM030_SHOWPRINT", null, true, () =>
|
||||
{
|
||||
if (task != null)
|
||||
UpdateEntityNoCommit(task);
|
||||
if (CheckUser != null)
|
||||
UpdateEntityNoCommit(CheckUser);
|
||||
if (ListTask != null && ListTask.Any())//给设备管理员 发送审阅
|
||||
BantchSaveEntityNoCommit(ListTask);
|
||||
if (check != null)//状态修改
|
||||
UpdateEntityNoCommit(check);
|
||||
|
||||
}, check.APPROVE_ID, null, dicApproveUser, null, null, "DM030_SHOWPRINT");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
check.STATUS_APPROVE = PFStandardStatus.Archived;//如果没有找到负责人
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
if (task != null)
|
||||
UpdateEntityNoCommit(task);
|
||||
if (CheckUser != null)
|
||||
UpdateEntityNoCommit(CheckUser);
|
||||
if (ListTask != null && ListTask.Any())//给设备管理员 发送审阅
|
||||
BantchSaveEntityNoCommit(ListTask);
|
||||
if (check != null)//状态修改
|
||||
UpdateEntityNoCommit(check);
|
||||
});
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//还有别人未 确认
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
if (task != null)
|
||||
UpdateEntityNoCommit(task);
|
||||
if (CheckUser != null)
|
||||
UpdateEntityNoCommit(CheckUser);
|
||||
if (ListTask != null && ListTask.Any())//给设备管理员 发送审阅
|
||||
BantchSaveEntityNoCommit(ListTask);
|
||||
if (check != null)//状态修改
|
||||
UpdateEntityNoCommit(check);
|
||||
});
|
||||
}
|
||||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 回调函数
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("Audit")]
|
||||
public JsonActionResult<bool> Audit(string id)
|
||||
{
|
||||
return SafeExecute(() =>
|
||||
{
|
||||
return ApproveCallBackService.CallBack("DM/DMDeviceMaintenanceCheck/Audit", id);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,235 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.BaseData.Domain.Enums.PF;
|
||||
using APT.BaseData.Domain.IServices;
|
||||
using APT.BaseData.Domain.IServices.FM;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Entities.DM;
|
||||
using APT.MS.Domain.Enums;
|
||||
using APT.Utility;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
|
||||
namespace APT.SC.WebApi.Controllers.Api.DM
|
||||
{
|
||||
[Route("api/DM/DMDeviceMaintenancePlan")]
|
||||
public class DMDeviceMaintenancePlanController : AuthorizeApiController<T_DM_DEVICE_MAINTENANCE_PLAN>
|
||||
{
|
||||
IFMNotificationTaskService NotificationTaskService { get; set; }
|
||||
public DMDeviceMaintenancePlanController(IFMNotificationTaskService notificationTaskService)
|
||||
{
|
||||
NotificationTaskService = notificationTaskService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设备设施维保计划 修改
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("FullUpdate")]
|
||||
public JsonActionResult<bool> FullUpdate([FromBody] T_DM_DEVICE_MAINTENANCE_PLAN entity)
|
||||
{
|
||||
return SafeExecute<bool>(() =>
|
||||
{
|
||||
var Files = entity.Nav_Files;
|
||||
entity.Nav_Files = null;
|
||||
var FilesPlan = entity.Nav_FilesPlan;
|
||||
entity.Nav_FilesPlan = null;
|
||||
var ListUser = entity.Nav_ListUser;
|
||||
entity.Nav_ListUser = null;
|
||||
if (!entity.DEVICEBASE_ID.HasValue)
|
||||
{
|
||||
throw new Exception("请选择设备设施!");
|
||||
}
|
||||
if (string.IsNullOrEmpty(entity.POSITION))
|
||||
{
|
||||
throw new Exception("请填写位置!");
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(entity.CONTENT))
|
||||
{
|
||||
throw new Exception("请填写维保内容!");
|
||||
}
|
||||
else if (entity.CONTENT.Length > 500)
|
||||
{
|
||||
throw new Exception("维保内容不能超过500字符!");
|
||||
}
|
||||
List<T_FM_NOTIFICATION_TASK> listTask = null;
|
||||
|
||||
if (entity.STATUS_APPROVE != PFStandardStatus.Draft)
|
||||
{
|
||||
if (ListUser == null || !ListUser.Any())
|
||||
{
|
||||
throw new Exception("请选择计划检查人员!");
|
||||
}
|
||||
else if (ListUser.Count() < 2)
|
||||
{
|
||||
throw new Exception("计划检查人员最少2人!");
|
||||
}
|
||||
|
||||
#region 周期提示
|
||||
|
||||
string Msg = string.Empty;
|
||||
switch (entity.PLANCHECKFREQUENCY)
|
||||
{
|
||||
case BSPLANCHECKFREQUENCYEnum.None:
|
||||
Msg = "请选频率";
|
||||
break;
|
||||
//case BSPLANCHECKFREQUENCYEnum.OneTime:
|
||||
case BSPLANCHECKFREQUENCYEnum.Year:
|
||||
case BSPLANCHECKFREQUENCYEnum.HalfYear:
|
||||
if (string.IsNullOrEmpty(entity.RUNDATA))
|
||||
{
|
||||
Msg = "请选择触发日期";
|
||||
}
|
||||
break;
|
||||
case BSPLANCHECKFREQUENCYEnum.Date:
|
||||
if (entity.RUNSETTIME == DateTime.MinValue)
|
||||
{
|
||||
Msg = "请选择执行时间";
|
||||
}
|
||||
break;
|
||||
case BSPLANCHECKFREQUENCYEnum.Week:
|
||||
if (!entity.WEEKDATA.HasValue)
|
||||
{
|
||||
Msg = "请选择星期";
|
||||
}
|
||||
break;
|
||||
case BSPLANCHECKFREQUENCYEnum.Month:
|
||||
case BSPLANCHECKFREQUENCYEnum.Quarter:
|
||||
if (!entity.DATA.HasValue)
|
||||
{
|
||||
Msg = "请选择日";
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Msg))
|
||||
{
|
||||
throw new Exception(Msg);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
List<Guid> UserId = new List<Guid>();
|
||||
List<string> userName = new List<string>();
|
||||
|
||||
//var listUserID = ListUser.Select(e => e.USER_ID);
|
||||
//var listUser = GetEntities<T_FM_USER>(e => listUserID.Contains(e.ID), null, null);
|
||||
foreach (var item in ListUser)
|
||||
{
|
||||
if (item.IS_DELETED)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
UserId.Add(item.USER_ID);
|
||||
userName.Add(item.Nav_User.NAME);
|
||||
}
|
||||
|
||||
listTask = NotificationTaskService.InsertUserNoticeTaskModels("设备设施维保计划确认", entity.ID, entity.ORG_ID, UserId, userName, DateTime.Now, DateTime.Now.AddDays(1), 1, "DM008_SHOWPRINT");
|
||||
}
|
||||
|
||||
int RowIndex = 0;//第一个 计划检查人员 为记录人
|
||||
foreach (var item in ListUser)
|
||||
{
|
||||
if (item.IS_DELETED)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (RowIndex == 0)
|
||||
{
|
||||
item.ISMAIN = true;
|
||||
}
|
||||
item.Nav_User = null;
|
||||
RowIndex++;
|
||||
}
|
||||
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
if (entity != null)
|
||||
UpdateEntityNoCommit(entity);
|
||||
if (Files != null && Files.Any())//维保工作方案
|
||||
BantchSaveEntityNoCommit(Files);
|
||||
if (FilesPlan != null && FilesPlan.Any())//维保工作方案
|
||||
BantchSaveEntityNoCommit(FilesPlan);
|
||||
if (ListUser != null && ListUser.Any())//维保工作方案
|
||||
BantchSaveEntityNoCommit(ListUser);
|
||||
if (listTask != null && listTask.Any())//维保工作方案
|
||||
BantchSaveEntityNoCommit(listTask);
|
||||
});
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 点检人 确认
|
||||
/// </summary>
|
||||
[HttpPost, Route("Check")]
|
||||
public JsonActionResult<bool> Check([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return SafeExecute<bool>(() =>
|
||||
{
|
||||
if (string.IsNullOrEmpty(filter.Keyword) || string.IsNullOrEmpty(filter.Parameter1))
|
||||
{
|
||||
throw new Exception("传参有误!");
|
||||
}
|
||||
var guid = new Guid(filter.Keyword);
|
||||
var taskID = new Guid(filter.Parameter1);
|
||||
if (guid == Guid.Empty || taskID == Guid.Empty)
|
||||
{
|
||||
throw new Exception("传参有误!");
|
||||
}
|
||||
var task = NotificationTaskService.GetEntityTask(taskID);
|
||||
|
||||
var loginID = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
var Check = GetEntity<T_DM_DEVICE_MAINTENANCE_PLAN_USER>(e => e.USER_ID == loginID && e.PLAN_ID == guid);
|
||||
|
||||
if (Check == null)
|
||||
{
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
if (task != null)
|
||||
UpdateEntityNoCommit(task);
|
||||
});
|
||||
}
|
||||
else if (Check.ISCHECK)
|
||||
{
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
if (task != null)
|
||||
UpdateEntityNoCommit(task);
|
||||
});
|
||||
throw new Exception("您已审阅,无需再次操作!");
|
||||
}
|
||||
else
|
||||
{
|
||||
Check.ISCHECK = true;
|
||||
var UnCheck = GetEntity<T_DM_DEVICE_MAINTENANCE_PLAN_USER>(e => e.USER_ID != loginID && e.PLAN_ID == guid && !e.ISCHECK);
|
||||
T_DM_DEVICE_MAINTENANCE_PLAN plan = null;
|
||||
if (UnCheck == null)
|
||||
{
|
||||
plan = GetEntity<T_DM_DEVICE_MAINTENANCE_PLAN>(e => e.ID == guid);
|
||||
plan.STATUS_APPROVE = PFStandardStatus.Archived;
|
||||
}
|
||||
|
||||
//还有别人未 确认
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
if (task != null)
|
||||
UpdateEntityNoCommit(task);
|
||||
if (Check != null)
|
||||
UpdateEntityNoCommit(Check);
|
||||
if (plan != null)//状态修改
|
||||
UpdateEntityNoCommit(plan);
|
||||
});
|
||||
}
|
||||
return true;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,105 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.BaseData.Domain.Enums;
|
||||
using APT.BaseData.Domain.Enums.PF;
|
||||
using APT.BaseData.Domain.IServices;
|
||||
using APT.BaseData.Domain.IServices.FM;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Entities.SC.DM;
|
||||
using APT.Utility;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace APT.SC.WebApi.Controllers.Api.DMController
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备检测检验记录
|
||||
/// </summary>
|
||||
[Route("api/DM/DMDetectionInspectionRecord")]
|
||||
public partial class DetectionInspectionRecordController : AuthorizeApiController<T_DM_DETECTION_INSPECTION_RECORD>
|
||||
{
|
||||
IPFCodeRuleService CodeRuleService { get; set; }
|
||||
IFMNotificationTaskService NotificationTaskService { get; set; }
|
||||
IFMFlowPermitService MFlowPermitService { get; set; }
|
||||
IPFApproveCallBackService ApproveCallBackService { get; set; }
|
||||
/// <summary>
|
||||
/// 设备检测检验记录
|
||||
/// </summary>
|
||||
/// <param name="notificationTaskService"></param>
|
||||
public DetectionInspectionRecordController(IPFCodeRuleService codeRuleService, IFMNotificationTaskService notificationTaskService, IFMFlowPermitService mFlowPermitService, IPFApproveCallBackService approveCallBackService)
|
||||
{
|
||||
CodeRuleService = codeRuleService;
|
||||
NotificationTaskService = notificationTaskService;
|
||||
MFlowPermitService = mFlowPermitService;
|
||||
ApproveCallBackService = approveCallBackService;
|
||||
}
|
||||
/// <summary>
|
||||
/// 新增/编辑
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("FullUpdate")]
|
||||
public JsonActionResult<bool> FullUpdate([FromBody] T_DM_DETECTION_INSPECTION_RECORD entity)
|
||||
{
|
||||
return SafeExecute(() =>
|
||||
{
|
||||
entity.TIME = DateTime.Now;
|
||||
entity.STATUS = PFStandardStatus.Draft;
|
||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
entity.USER_ID = loginUserId;
|
||||
var user = this.GetEntity<T_FM_USER>(t => t.ID == loginUserId.Value && t.ENABLE_STATUS == 0);
|
||||
entity.DEPARTMENT_ID = user?.DEPARTMENT_ID;
|
||||
var files = entity.Nav_Files;
|
||||
entity.Nav_Files = null;
|
||||
if (files != null && files.Any())
|
||||
{
|
||||
files.ForEach(t =>
|
||||
{
|
||||
t.ORG_ID = entity.ORG_ID; t.DEVICE_RECORD_ID = entity.ID;
|
||||
});
|
||||
}
|
||||
if (entity.PUBLISH != null && entity.PUBLISH.Equals("SaveAndNotify"))
|
||||
{
|
||||
entity.STATUS = PFStandardStatus.Approving;
|
||||
//取审批流水码
|
||||
var sysFilter = new SystemCodeFilter();
|
||||
sysFilter.CodeType = (int)PFCodeRuleType.审批流编码;
|
||||
sysFilter.Count = 1;
|
||||
sysFilter.OrgId = entity.ORG_ID;
|
||||
var codes = CodeRuleService.NewGenSerial(sysFilter);
|
||||
var serialCode = codes.Split(new char[] { ',' });
|
||||
MFlowPermitService.InsertApprove(serialCode[0], "DM012", "", entity.ID, "DM012_SHOWPRINT", entity.TaskID, true, () =>
|
||||
{
|
||||
if (entity != null)
|
||||
this.UpdateEntityNoCommit(entity);
|
||||
if (files != null && files.Any())
|
||||
this.BantchSaveEntityNoCommit(files);
|
||||
}, null, null, null, null, null, "DM012_SHOWPRINT", null);
|
||||
return true;
|
||||
}
|
||||
UnifiedCommit(() =>
|
||||
{
|
||||
if (entity != null)
|
||||
this.UpdateEntityNoCommit(entity);
|
||||
if (files != null && files.Any())
|
||||
this.BantchSaveEntityNoCommit(files);
|
||||
});
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 回调函数
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("BackUpdate")]
|
||||
public JsonActionResult<bool> BackUpdate(string id)
|
||||
{
|
||||
return SafeExecute(() =>
|
||||
{
|
||||
return ApproveCallBackService.CallBack("DM/DMDetectionInspectionRecord/BackUpdate", id);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,107 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.BaseData.Domain.Enums;
|
||||
using APT.BaseData.Domain.Enums.PF;
|
||||
using APT.BaseData.Domain.IServices;
|
||||
using APT.BaseData.Domain.IServices.FM;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Entities.SC.DM;
|
||||
using APT.Utility;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace APT.SC.WebApi.Controllers.Api.DMController
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备设施申领
|
||||
/// </summary>
|
||||
[Route("api/DM/DMDeviceApply")]
|
||||
public partial class DeviceApplyController : AuthorizeApiController<T_DM_DEVICE_APPLY>
|
||||
{
|
||||
IPFCodeRuleService CodeRuleService { get; set; }
|
||||
IFMNotificationTaskService NotificationTaskService { get; set; }
|
||||
IFMFlowPermitService MFlowPermitService { get; set; }
|
||||
IPFApproveCallBackService ApproveCallBackService { get; set; }
|
||||
/// <summary>
|
||||
/// 设备设施申领
|
||||
/// </summary>
|
||||
/// <param name="notificationTaskService"></param>
|
||||
public DeviceApplyController(IPFCodeRuleService codeRuleService, IFMNotificationTaskService notificationTaskService, IFMFlowPermitService mFlowPermitService, IPFApproveCallBackService approveCallBackService)
|
||||
{
|
||||
CodeRuleService = codeRuleService;
|
||||
NotificationTaskService = notificationTaskService;
|
||||
MFlowPermitService = mFlowPermitService;
|
||||
ApproveCallBackService = approveCallBackService;
|
||||
}
|
||||
/// <summary>
|
||||
/// 新增/编辑
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("FullUpdate")]
|
||||
public JsonActionResult<bool> FullUpdate([FromBody] T_DM_DEVICE_APPLY entity)
|
||||
{
|
||||
return SafeExecute(() =>
|
||||
{
|
||||
entity.TIME = DateTime.Now;
|
||||
entity.STATUS = PFStandardStatus.Draft;
|
||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
entity.USER_ID = loginUserId;
|
||||
var user = this.GetEntity<T_FM_USER>(t => t.ID == loginUserId.Value && t.ENABLE_STATUS == 0);
|
||||
entity.DEPARTMENT_ID = user?.DEPARTMENT_ID;
|
||||
if (string.IsNullOrEmpty(entity.CODE))
|
||||
entity.CODE = DateTime.Now.Year.ToString().PadLeft(4, '0') + DateTime.Now.Month.ToString().PadLeft(2, '0') + DateTime.Now.Day.ToString().PadLeft(2, '0') + new Random().Next().ToString();
|
||||
var details = entity.Nav_Details;
|
||||
entity.Nav_Details = null;
|
||||
if (details != null && details.Any())
|
||||
{
|
||||
details.ForEach(t =>
|
||||
{
|
||||
t.ORG_ID = entity.ORG_ID; t.DEVICE_APPLY_ID = entity.ID;
|
||||
});
|
||||
}
|
||||
if (entity.PUBLISH != null && entity.PUBLISH.Equals("SaveAndNotify"))
|
||||
{
|
||||
entity.STATUS = PFStandardStatus.Approving;
|
||||
//取审批流水码
|
||||
var sysFilter = new SystemCodeFilter();
|
||||
sysFilter.CodeType = (int)PFCodeRuleType.审批流编码;
|
||||
sysFilter.Count = 1;
|
||||
sysFilter.OrgId = entity.ORG_ID;
|
||||
var codes = CodeRuleService.NewGenSerial(sysFilter);
|
||||
var serialCode = codes.Split(new char[] { ',' });
|
||||
MFlowPermitService.InsertApprove(serialCode[0], "DM014", "", entity.ID, "DM014_SHOWPRINT", entity.TaskID, true, () =>
|
||||
{
|
||||
if (entity != null)
|
||||
this.UpdateEntityNoCommit(entity);
|
||||
if (details != null && details.Any())
|
||||
this.BantchSaveEntityNoCommit(details);
|
||||
}, null, null, null, null, null, "DM014_SHOWPRINT", null);
|
||||
return true;
|
||||
}
|
||||
UnifiedCommit(() =>
|
||||
{
|
||||
if (entity != null)
|
||||
this.UpdateEntityNoCommit(entity);
|
||||
if (details != null && details.Any())
|
||||
this.BantchSaveEntityNoCommit(details);
|
||||
});
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 回调函数
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("BackUpdate")]
|
||||
public JsonActionResult<bool> BackUpdate(string id)
|
||||
{
|
||||
return SafeExecute(() =>
|
||||
{
|
||||
return ApproveCallBackService.CallBack("DM/DMDeviceApply/BackUpdate", id);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,174 +0,0 @@
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.BaseData.Domain.Enums.PF;
|
||||
using APT.BaseData.Domain.IServices;
|
||||
using APT.BaseData.Domain.IServices.FM;
|
||||
using APT.BaseData.Services.Services.FM;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Entities.SC.DM;
|
||||
using APT.MS.Domain.Enums;
|
||||
using APT.Utility;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace APT.SC.WebApi.Controllers.Api.DMController
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备设施发放表
|
||||
/// </summary>
|
||||
[Route("api/DM/DMDeviceIssue")]
|
||||
public partial class DeviceIssueController : AuthorizeApiController<T_DM_DEVICE_ISSUE>
|
||||
{
|
||||
IPFCodeRuleService CodeRuleService { get; set; }
|
||||
IFMNotificationTaskService NotificationTaskService { get; set; }
|
||||
IFMFlowPermitService MFlowPermitService { get; set; }
|
||||
IPFApproveCallBackService ApproveCallBackService { get; set; }
|
||||
/// <summary>
|
||||
/// 设备设施发放表
|
||||
/// </summary>
|
||||
/// <param name="notificationTaskService"></param>
|
||||
public DeviceIssueController(IPFCodeRuleService codeRuleService, IFMNotificationTaskService notificationTaskService, IFMFlowPermitService mFlowPermitService, IPFApproveCallBackService approveCallBackService)
|
||||
{
|
||||
CodeRuleService = codeRuleService;
|
||||
NotificationTaskService = notificationTaskService;
|
||||
MFlowPermitService = mFlowPermitService;
|
||||
ApproveCallBackService = approveCallBackService;
|
||||
}
|
||||
/// <summary>
|
||||
/// 新增/编辑
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("FullUpdate")]
|
||||
public JsonActionResult<bool> FullUpdate([FromBody] T_DM_DEVICE_ISSUE entity)
|
||||
{
|
||||
return SafeExecute(() =>
|
||||
{
|
||||
entity.TIME = DateTime.Now;
|
||||
entity.STATUS = PFStandardStatus.Draft;
|
||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
entity.USER_ID = loginUserId;
|
||||
var user = this.GetEntity<T_FM_USER>(t => t.ID == loginUserId.Value && t.ENABLE_STATUS == 0);
|
||||
entity.DEPARTMENT_ID = user?.DEPARTMENT_ID;
|
||||
if (string.IsNullOrEmpty(entity.CODE))
|
||||
entity.CODE = DateTime.Now.Year.ToString().PadLeft(4, '0') + DateTime.Now.Month.ToString().PadLeft(2, '0') + DateTime.Now.Day.ToString().PadLeft(2, '0') + new Random().Next().ToString();
|
||||
var details = entity.Nav_Details;
|
||||
entity.Nav_Details = null;
|
||||
if (details != null && details.Any())
|
||||
{
|
||||
details.ForEach(t =>
|
||||
{
|
||||
t.ORG_ID = entity.ORG_ID; t.DEVICE_ISSUE_ID = entity.ID;
|
||||
});
|
||||
}
|
||||
List<T_FM_NOTIFICATION_TASK> notices = new List<T_FM_NOTIFICATION_TASK>();
|
||||
T_FM_NOTIFICATION_TASK task = null;
|
||||
if (entity.PUBLISH != null && entity.PUBLISH.Equals("SaveAndNotify"))
|
||||
{
|
||||
entity.STATUS = PFStandardStatus.Sign;
|
||||
details.ForEach(t =>
|
||||
{
|
||||
if (t.USER_ID == loginUserId)
|
||||
t.DEAL_STATUS = MS.Domain.Enums.FOUserShiftStatusEnum.已处理;
|
||||
});
|
||||
var userIds = details.Where(m=> m.USER_ID!= loginUserId).Select(t => t.USER_ID).Distinct().ToList();
|
||||
if (userIds != null && userIds.Any())
|
||||
{
|
||||
var users = this.GetEntities<T_FM_USER>(t => userIds.Contains(t.ID) && t.ENABLE_STATUS == 0, new BaseFilter(entity.ORG_ID));
|
||||
foreach (var item in userIds)
|
||||
{
|
||||
var userInfo = users.FirstOrDefault(t => t.ID == item.Value);
|
||||
if (userInfo != null)
|
||||
{
|
||||
notices.Add(NotificationTaskService.InsertUserNoticeTaskModel("设备设施领用发放确认", entity.ID, entity.ORG_ID, userInfo.ID, userInfo.NAME, DateTime.Now, DateTime.Now.AddDays(30), (int)FMNoticeTypeEnum.消息, "DM016_SHOWPRINT"));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (entity.TaskID != Guid.Empty)
|
||||
{
|
||||
task = NotificationTaskService.GetTaskFinishModel(entity.TaskID);
|
||||
task.SOURCE_FORMCODE = "DM016_SHOWPRINT";
|
||||
}
|
||||
}
|
||||
UnifiedCommit(() =>
|
||||
{
|
||||
if (entity != null)
|
||||
this.UpdateEntityNoCommit(entity);
|
||||
if (details != null && details.Any())
|
||||
this.BantchSaveEntityNoCommit(details);
|
||||
if (notices != null && notices.Any())
|
||||
this.BantchSaveEntityNoCommit(notices);
|
||||
if (task != null)
|
||||
this.UpdateEntityNoCommit(task);
|
||||
});
|
||||
return true;
|
||||
});
|
||||
}
|
||||
/// <summary>
|
||||
/// 识别人确认
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("IdentityUpdate")]
|
||||
public JsonActionResult<bool> IdentityUpdate([FromBody] T_DM_DEVICE_ISSUE entity)
|
||||
{
|
||||
return SafeExecute(() =>
|
||||
{
|
||||
var issue = this.GetEntity<T_DM_DEVICE_ISSUE>(entity.ID, "Nav_Details");
|
||||
var userId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
var user = this.GetEntity<T_DM_DEVICE_ISSUE_DETAIL>(t => t.DEVICE_ISSUE_ID == issue.ID && t.USER_ID == userId, new BaseFilter(issue.ORG_ID));
|
||||
user.DEAL_STATUS = FOUserShiftStatusEnum.已处理;
|
||||
T_FM_NOTIFICATION_TASK task = null;
|
||||
var todoCount = this.GetCount<T_DM_DEVICE_ISSUE_DETAIL>(t => t.DEVICE_ISSUE_ID == issue.ID && t.DEAL_STATUS == 0, new BaseFilter(issue.ORG_ID));
|
||||
if (todoCount == 0 || todoCount == 1)
|
||||
{
|
||||
issue.STATUS = PFStandardStatus.Archived;
|
||||
}
|
||||
if (entity.TaskID != Guid.Empty)
|
||||
{
|
||||
task = NotificationTaskService.GetTaskFinishModel(entity.TaskID);
|
||||
task.SOURCE_FORMCODE = "DM016_SHOWPRINT";
|
||||
}
|
||||
UnifiedCommit(() =>
|
||||
{
|
||||
if (issue != null)
|
||||
this.UpdateEntityNoCommit(issue);
|
||||
if (user != null)
|
||||
this.UpdateEntityNoCommit(user);
|
||||
if (task != null)
|
||||
this.UpdateEntityNoCommit(task);
|
||||
});
|
||||
return true;
|
||||
});
|
||||
}
|
||||
/// <summary>
|
||||
/// 归还
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("DetailUpdate")]
|
||||
public JsonActionResult<bool> DetailUpdate([FromBody] T_DM_DEVICE_ISSUE_DETAIL entity)
|
||||
{
|
||||
return SafeExecute(() =>
|
||||
{
|
||||
T_FM_NOTIFICATION_TASK task = null;
|
||||
if (entity.TaskID != Guid.Empty)
|
||||
{
|
||||
task = NotificationTaskService.GetTaskFinishModel(entity.TaskID);
|
||||
task.SOURCE_FORMCODE = "DM026_SHOWPRINT";
|
||||
}
|
||||
UnifiedCommit(() =>
|
||||
{
|
||||
if (entity != null)
|
||||
this.UpdateEntityNoCommit(entity);
|
||||
if (task != null)
|
||||
this.UpdateEntityNoCommit(task);
|
||||
});
|
||||
return true;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,100 +0,0 @@
|
||||
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.BaseData.Domain.Enums.PF;
|
||||
using APT.BaseData.Domain.IServices.FM;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Entities.DM;
|
||||
using APT.Utility;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace APT.SC.WebApi.Controllers.Api.DM
|
||||
{
|
||||
[Route("api/DM/DMDeviceOverhaul")]
|
||||
public class DeviceOverhaulController : AuthorizeApiController<T_DM_DEVICE_OVERHAUL>
|
||||
{
|
||||
IFMNotificationTaskService NotificationTaskService { get; set; }
|
||||
public DeviceOverhaulController(IFMNotificationTaskService notificationTaskService)
|
||||
{
|
||||
NotificationTaskService = notificationTaskService;
|
||||
}
|
||||
/// <summary>
|
||||
/// 更新
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("FullUpdate")]
|
||||
public JsonActionResult<bool> FullUpdate([FromBody]T_DM_DEVICE_OVERHAUL entity)
|
||||
{
|
||||
return SafeExecute<bool>(() =>
|
||||
{
|
||||
var files = entity.Nav_Files;
|
||||
entity.Nav_Files = null;
|
||||
T_FM_NOTIFICATION_TASK sendNotice = null;
|
||||
T_FM_NOTIFICATION_TASK finishNotice = null;
|
||||
T_DM_DEVICE_BASE_OVERHAUL overhaul=null;
|
||||
List<T_DM_DEVICE_BASE_OVERHAUL_FILE> overhaulFiles = new List<T_DM_DEVICE_BASE_OVERHAUL_FILE>();
|
||||
|
||||
if (entity.PUBLISH != null && entity.PUBLISH.Equals("SaveAndNotify"))
|
||||
{
|
||||
finishNotice = NotificationTaskService.FOGetTaskFinishModel(entity.TaskID,entity.ID, "DM021_SHOWPRINT");
|
||||
if (entity.STATUS== PFStandardStatus.Draft)
|
||||
{
|
||||
entity.STATUS = PFStandardStatus.Sign;
|
||||
var repair = GetEntity<T_DM_DEVICE_REPAIR>(entity.REPAIR_ID.Value);
|
||||
if (repair != null)
|
||||
{
|
||||
sendNotice = NotificationTaskService.InsertUserNoticeTaskModel("设备设施检修记录-"+entity.MACHINE_NAME+"-待验收", entity.ID, entity.ORG_ID, (Guid)repair.USER_ID, GetEntity<T_FM_USER>(repair.USER_ID.Value).NAME, DateTime.Now, DateTime.Now.AddDays(1), 0, "DM022");
|
||||
}
|
||||
}
|
||||
else if (entity.STATUS == PFStandardStatus.Sign)
|
||||
{
|
||||
entity.STATUS = PFStandardStatus.Archived;
|
||||
overhaul = new T_DM_DEVICE_BASE_OVERHAUL
|
||||
{
|
||||
ID=Guid.NewGuid(),
|
||||
ORG_ID = entity.ORG_ID,
|
||||
DEVICE_BASE_ID = (Guid)entity.DEVICE_BASE_ID,
|
||||
OVERHAUL_TIME = entity.OVERHAUL_TIME,
|
||||
MALFUCTION = entity.MALFUCTION,
|
||||
DESCRIPTION = entity.DESCRIPTION,
|
||||
USER_ID = entity.USER_ID,
|
||||
EXTERNAL_SUPPORT = entity.EXTERNAL_SUPPORT,
|
||||
};
|
||||
foreach(var item in files)
|
||||
{
|
||||
var newFile = new T_DM_DEVICE_BASE_OVERHAUL_FILE
|
||||
{
|
||||
FILE_PARENT_ID=overhaul.ID,
|
||||
IMG_FILE_ID=item.IMG_FILE_ID,
|
||||
ORG_ID=item.ORG_ID,
|
||||
};
|
||||
overhaulFiles.Add(newFile);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
UnifiedCommit(() =>
|
||||
{
|
||||
UpdateEntity(entity);
|
||||
if (files != null && files.Any())
|
||||
BantchSaveEntityNoCommit(files);
|
||||
if (sendNotice != null)
|
||||
AddEntityNoCommit(sendNotice);
|
||||
if (finishNotice != null)
|
||||
UpdateEntityNoCommit(finishNotice);
|
||||
if(overhaul!=null)
|
||||
AddEntityNoCommit(overhaul);
|
||||
if(overhaulFiles!=null&&overhaulFiles.Any())
|
||||
BantchAddEntityNoCommit(overhaulFiles);
|
||||
});
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,112 +0,0 @@
|
||||
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.BaseData.Domain.Enums.PF;
|
||||
using APT.BaseData.Domain.IServices.FM;
|
||||
using APT.BaseData.Domain.IServices;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Entities.DM;
|
||||
using APT.Utility;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
|
||||
namespace APT.SC.WebApi.Controllers.Api.DM
|
||||
{
|
||||
[Route("api/DM/DMDeviceRepair")]
|
||||
public class DeviceRepairController : AuthorizeApiController<T_DM_DEVICE_REPAIR>
|
||||
{
|
||||
IFMNotificationTaskService NotificationTaskService { get; set; }
|
||||
public DeviceRepairController(IFMNotificationTaskService notificationTaskService)
|
||||
{
|
||||
NotificationTaskService = notificationTaskService;
|
||||
}
|
||||
/// <summary>
|
||||
/// 更新
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("FullUpdate")]
|
||||
public JsonActionResult<bool> FullUpdate([FromBody] T_DM_DEVICE_REPAIR entity)
|
||||
{
|
||||
return SafeExecute<bool>(() =>
|
||||
{
|
||||
var files = entity.Nav_Files;
|
||||
entity.Nav_Files = null;
|
||||
if (entity.CODE == null)
|
||||
{
|
||||
entity.CODE = DateTime.Now.ToString("yyyyMMddHHmmss");
|
||||
}
|
||||
if (entity.USER_ID == null || entity.USER_ID == Guid.Empty)
|
||||
{
|
||||
entity.USER_ID = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
}
|
||||
if (entity.REPAIR_TIME == DateTime.Parse("0001-01-01 00:00:00"))
|
||||
{
|
||||
entity.REPAIR_TIME = DateTime.Now;
|
||||
}
|
||||
if(entity.STATUS== PFStandardStatus.Archived)
|
||||
{
|
||||
throw new Exception("已归档不能编辑");
|
||||
}
|
||||
T_FM_NOTIFICATION_TASK sendNotice = null;
|
||||
T_FM_NOTIFICATION_TASK finishNotice = null;
|
||||
T_DM_DEVICE_OVERHAUL overhaul= null;
|
||||
|
||||
if (entity.PUBLISH != null && entity.PUBLISH.Equals("SaveAndNotify"))
|
||||
{
|
||||
if (entity.STATUS == PFStandardStatus.Draft)
|
||||
{
|
||||
entity.STATUS = PFStandardStatus.Sign;
|
||||
sendNotice = NotificationTaskService.InsertUserNoticeTaskModel("设备设施故障报修-" + entity.MACHINE_NAME, entity.ID, entity.ORG_ID, (Guid)entity.REPAIR_CHARGE_USER_ID, GetEntity<T_FM_USER>(entity.REPAIR_CHARGE_USER_ID.Value).NAME, DateTime.Now, DateTime.Now.AddDays(1), 0, "DM020");
|
||||
}
|
||||
else if (entity.STATUS == PFStandardStatus.Sign)
|
||||
{
|
||||
entity.STATUS = PFStandardStatus.Archived;
|
||||
finishNotice = NotificationTaskService.FOGetTaskFinishModel(entity.TaskID,entity.ID, "DM020_SHOWPRINT");
|
||||
overhaul=new T_DM_DEVICE_OVERHAUL
|
||||
{
|
||||
ID= Guid.NewGuid(),
|
||||
OVERHAUL_TIME=DateTime.Now,
|
||||
CODE= DateTime.Now.ToString("yyyyMMddHHmmss"),
|
||||
USER_ID=entity.REPAIR_USER_ID,
|
||||
DEVICE_BASE_ID=entity.DEVICE_BASE_ID,
|
||||
MACHINE_NAME=entity.MACHINE_NAME,
|
||||
SPEC= entity.SPEC,
|
||||
MACHINE_CODE=entity.MACHINE_CODE,
|
||||
POSITION= entity.POSITION,
|
||||
MALFUCTION=entity.DESCRPTION,
|
||||
REPAIR_ID=entity.ID,
|
||||
ORG_ID=entity.ORG_ID,
|
||||
IS_HELP=entity.IS_HELP,
|
||||
};
|
||||
if (entity.IS_HELP == true)
|
||||
{
|
||||
sendNotice = NotificationTaskService.InsertUserNoticeTaskModel("设备设施检修记录-"+entity.MACHINE_NAME, overhaul.ID, entity.ORG_ID, (Guid)entity.REPAIR_CHARGE_USER_ID, GetEntity<T_FM_USER>(entity.REPAIR_CHARGE_USER_ID.Value).NAME, DateTime.Now, DateTime.Now.AddDays(1), 0, "DM022");
|
||||
}
|
||||
else
|
||||
{
|
||||
sendNotice = NotificationTaskService.InsertUserNoticeTaskModel("设备设施检修记录-" + entity.MACHINE_NAME, overhaul.ID, entity.ORG_ID, (Guid)entity.REPAIR_USER_ID, GetEntity<T_FM_USER>(entity.REPAIR_USER_ID.Value).NAME, DateTime.Now, DateTime.Now.AddDays(1), 0, "DM022");
|
||||
}
|
||||
}
|
||||
}
|
||||
UnifiedCommit(() =>
|
||||
{
|
||||
UpdateEntityNoCommit(entity);
|
||||
if (files != null && files.Any())
|
||||
BantchSaveEntityNoCommit(files);
|
||||
if (sendNotice != null)
|
||||
AddEntityNoCommit(sendNotice);
|
||||
if (finishNotice != null)
|
||||
UpdateEntityNoCommit(finishNotice);
|
||||
if (overhaul != null)
|
||||
AddEntityNoCommit(overhaul);
|
||||
});
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user