1
This commit is contained in:
parent
cadd709e06
commit
050e5f1a19
@ -171,7 +171,11 @@ namespace APT.BaseData.Domain.Entities.FM
|
||||
[Description("离职时间")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
public DateTime? DEPARTURETIME { get; set; }
|
||||
public DateTime? DEPARTURETIME { get; set; }
|
||||
|
||||
[Description("出生日期")]
|
||||
[FormFieldEdit]
|
||||
public DateTime? BORN_DATE { get; set; }
|
||||
/// <summary>
|
||||
/// 班组
|
||||
/// </summary>
|
||||
|
||||
135242
APT.Data.Migrations/Migrations/20251107101616_hmr2025110702.Designer.cs
generated
Normal file
135242
APT.Data.Migrations/Migrations/20251107101616_hmr2025110702.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace APT.Data.Migrations.Migrations
|
||||
{
|
||||
public partial class hmr2025110702 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "BORN_DATE",
|
||||
table: "T_FM_USER",
|
||||
type: "datetime2",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "BORN_DATE",
|
||||
table: "T_FM_USER");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -6744,6 +6744,9 @@ namespace APT.Data.Migrations.Migrations
|
||||
b.Property<Guid?>("APPROVE_ROLE_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime?>("BORN_DATE")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("CODE")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,248 @@
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.BaseData.Domain.Enums;
|
||||
using APT.BaseData.Services.Services.FM;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Entities.FO;
|
||||
using APT.MS.Domain.Enums;
|
||||
using APT.Utility;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace APT.FO.WebApi.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// 专业人员履历表
|
||||
/// </summary>
|
||||
[Route("api/FO/FOProfessionalResume")]
|
||||
public partial class ProfessionalResumeController : AuthorizeApiController<T_FO_PROFESSIONAL_RESUME>
|
||||
{
|
||||
[HttpPost, Route("GetEdit")]
|
||||
public JsonActionResult<T_FO_PROFESSIONAL_RESUME> GetEdit([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return SafeExecute(() =>
|
||||
{
|
||||
var id = filter.FilterGroup.Rules.FirstOrDefault(t => t.Field == "ID").Value.ToString();
|
||||
if (string.IsNullOrEmpty(id))
|
||||
this.ThrowError("060010");
|
||||
var entity = this.GetEntity<T_FO_PROFESSIONAL_RESUME>(id, "Nav_ApplyUser", "Nav_Company", "Nav_ApplyDepartment", "Nav_User", "Nav_Educational", "Nav_Category", "Nav_TechPost",
|
||||
"Nav_EducationalFiles.Nav_ImgFile.Nav_File", "Nav_PostFiles.Nav_ImgFile.Nav_File", "Nav_CertificateFiles.Nav_ImgFile.Nav_File", "Nav_MedicalFiles.Nav_ImgFile.Nav_File",
|
||||
"Nav_TrainFiles.Nav_ImgFile.Nav_File", "Nav_OtherFiles.Nav_ImgFile.Nav_File");
|
||||
if (entity != null)
|
||||
{
|
||||
var details = this.GetEntities<T_FO_PROFESSIONAL_RESUME_DETAIL>(t => t.PROFESSIONAL_RESUME_ID == entity.ID, new BaseFilter(entity.ORG_ID), "Nav_DetailFiles.Nav_ImgFile.Nav_File").ToList();
|
||||
entity.Nav_Details = details.OrderByDescending(t => t.START_DATE).ToList();
|
||||
}
|
||||
return entity;
|
||||
});
|
||||
}
|
||||
/// <summary>
|
||||
/// 新增修改
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("FullUpdate")]
|
||||
public JsonActionResult<bool> FullUpdate([FromBody] T_FO_PROFESSIONAL_RESUME entity)
|
||||
{
|
||||
return SafeExecute<bool>(() =>
|
||||
{
|
||||
if (entity.AGE > 60)
|
||||
{
|
||||
throw new Exception("年龄不得大于60周岁");
|
||||
}
|
||||
var type = this.GetEntity<T_FO_PROFESSIONAL_CATEGORY>(entity.PROFESSIONAL_CATEGORY_ID.ToString());
|
||||
if (entity.YEAR <= 10 && type!=null && type.NAME =="五职")
|
||||
{
|
||||
throw new Exception("五职人员,从业经历年限要大于10年");
|
||||
}
|
||||
if (entity.YEAR <= 5 && type != null && type.NAME == "五科")
|
||||
{
|
||||
throw new Exception("五职人员,从业经历年限要大于5年");
|
||||
}
|
||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
var departmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
|
||||
entity.APPLY_USER_ID = loginUserId;
|
||||
entity.APPLY_DEPARTMENT_ID = departmentId;
|
||||
var details = entity.Nav_Details;
|
||||
if (details != null && details.Any())
|
||||
{
|
||||
details = details.Where(t => !t.IS_DELETED).ToList();
|
||||
}
|
||||
entity.Nav_Details = null;
|
||||
var detailIds = this.GetEntities<T_FO_PROFESSIONAL_RESUME_DETAIL>(t => t.PROFESSIONAL_RESUME_ID == entity.ID, new BaseFilter(entity.ORG_ID)).Select(m => m.ID).ToList();
|
||||
var detailFileIds = this.GetEntities<T_FO_PROFESSIONAL_RESUME_DETAIL_FILE>(t => detailIds.Contains(t.PROFESSIONAL_RESUME_DETAIL_ID), new BaseFilter(entity.ORG_ID)).Select(m => m.ID).ToList();
|
||||
var detailList = new List<T_FO_PROFESSIONAL_RESUME_DETAIL>();
|
||||
var detailFileList = new List<T_FO_PROFESSIONAL_RESUME_DETAIL_FILE>();
|
||||
if (details != null && details.Any())
|
||||
{
|
||||
foreach (var item in details)
|
||||
{
|
||||
if (item.Nav_DetailFiles != null && item.Nav_DetailFiles.Any())
|
||||
{
|
||||
foreach (var item2 in item.Nav_DetailFiles)
|
||||
{
|
||||
item2.ORG_ID = entity.ORG_ID;
|
||||
item2.PROFESSIONAL_RESUME_DETAIL_ID = item.ID;
|
||||
item2.Nav_ImgFile = null;
|
||||
detailFileList.Add(item2);
|
||||
}
|
||||
}
|
||||
item.ORG_ID = entity.ORG_ID;
|
||||
item.PROFESSIONAL_RESUME_ID = entity.ID;
|
||||
item.Nav_DetailFiles = null;
|
||||
detailList.Add(item);
|
||||
}
|
||||
}
|
||||
var educationals = entity.Nav_EducationalFiles;
|
||||
if (educationals != null && educationals.Any())
|
||||
{
|
||||
educationals = educationals.Where(t => !t.IS_DELETED).ToList();
|
||||
}
|
||||
entity.Nav_EducationalFiles = null;
|
||||
var educationalIds = this.GetEntities<T_FO_PROFESSIONAL_RESUME_EDUCATIONAL_FILE>(t => t.PROFESSIONAL_RESUME_ID == entity.ID, new BaseFilter(entity.ORG_ID)).Select(m => m.ID).ToList();
|
||||
var educationalList = new List<T_FO_PROFESSIONAL_RESUME_EDUCATIONAL_FILE>();
|
||||
if (educationals != null && educationals.Any())
|
||||
{
|
||||
foreach (var item in educationals)
|
||||
{
|
||||
item.ORG_ID = entity.ORG_ID;
|
||||
item.PROFESSIONAL_RESUME_ID = entity.ID;
|
||||
item.Nav_ImgFile = null;
|
||||
educationalList.Add(item);
|
||||
}
|
||||
}
|
||||
var posts = entity.Nav_PostFiles;
|
||||
if (posts != null && posts.Any())
|
||||
{
|
||||
posts = posts.Where(t => !t.IS_DELETED).ToList();
|
||||
}
|
||||
entity.Nav_PostFiles = null;
|
||||
var postIds = this.GetEntities<T_FO_PROFESSIONAL_RESUME_POST_FILE>(t => t.PROFESSIONAL_RESUME_ID == entity.ID, new BaseFilter(entity.ORG_ID)).Select(m => m.ID).ToList();
|
||||
var postList = new List<T_FO_PROFESSIONAL_RESUME_POST_FILE>();
|
||||
if (posts != null && posts.Any())
|
||||
{
|
||||
foreach (var item in posts)
|
||||
{
|
||||
item.ORG_ID = entity.ORG_ID;
|
||||
item.PROFESSIONAL_RESUME_ID = entity.ID;
|
||||
item.Nav_ImgFile = null;
|
||||
postList.Add(item);
|
||||
}
|
||||
}
|
||||
var certificates = entity.Nav_CertificateFiles;
|
||||
if (certificates != null && certificates.Any())
|
||||
{
|
||||
certificates = certificates.Where(t => !t.IS_DELETED).ToList();
|
||||
}
|
||||
entity.Nav_CertificateFiles = null;
|
||||
var certificateIds = this.GetEntities<T_FO_PROFESSIONAL_RESUME_CERTIFICATE_FILE>(t => t.PROFESSIONAL_RESUME_ID == entity.ID, new BaseFilter(entity.ORG_ID)).Select(m => m.ID).ToList();
|
||||
var certificateList = new List<T_FO_PROFESSIONAL_RESUME_CERTIFICATE_FILE>();
|
||||
if (certificates != null && certificates.Any())
|
||||
{
|
||||
foreach (var item in certificates)
|
||||
{
|
||||
item.ORG_ID = entity.ORG_ID;
|
||||
item.PROFESSIONAL_RESUME_ID = entity.ID;
|
||||
item.Nav_ImgFile = null;
|
||||
certificateList.Add(item);
|
||||
}
|
||||
}
|
||||
var medicals = entity.Nav_MedicalFiles;
|
||||
if (medicals != null && medicals.Any())
|
||||
{
|
||||
medicals = medicals.Where(t => !t.IS_DELETED).ToList();
|
||||
}
|
||||
entity.Nav_MedicalFiles = null;
|
||||
var medicalIds = this.GetEntities<T_FO_PROFESSIONAL_RESUME_MEDICAL_FILE>(t => t.PROFESSIONAL_RESUME_ID == entity.ID, new BaseFilter(entity.ORG_ID)).Select(m => m.ID).ToList();
|
||||
var medicalList = new List<T_FO_PROFESSIONAL_RESUME_MEDICAL_FILE>();
|
||||
if (medicals != null && medicals.Any())
|
||||
{
|
||||
foreach (var item in medicals)
|
||||
{
|
||||
item.ORG_ID = entity.ORG_ID;
|
||||
item.PROFESSIONAL_RESUME_ID = entity.ID;
|
||||
item.Nav_ImgFile = null;
|
||||
medicalList.Add(item);
|
||||
}
|
||||
}
|
||||
var trains = entity.Nav_TrainFiles;
|
||||
if (trains != null && trains.Any())
|
||||
{
|
||||
trains = trains.Where(t => !t.IS_DELETED).ToList();
|
||||
}
|
||||
entity.Nav_TrainFiles = null;
|
||||
var trainIds = this.GetEntities<T_FO_PROFESSIONAL_RESUME_TRAIN_FILE>(t => t.PROFESSIONAL_RESUME_ID == entity.ID, new BaseFilter(entity.ORG_ID)).Select(m => m.ID).ToList();
|
||||
var trainList = new List<T_FO_PROFESSIONAL_RESUME_TRAIN_FILE>();
|
||||
if (trains != null && trains.Any())
|
||||
{
|
||||
foreach (var item in trains)
|
||||
{
|
||||
item.ORG_ID = entity.ORG_ID;
|
||||
item.PROFESSIONAL_RESUME_ID = entity.ID;
|
||||
item.Nav_ImgFile = null;
|
||||
trainList.Add(item);
|
||||
}
|
||||
}
|
||||
var others = entity.Nav_OtherFiles;
|
||||
if (others != null && others.Any())
|
||||
{
|
||||
others = others.Where(t => !t.IS_DELETED).ToList();
|
||||
}
|
||||
entity.Nav_OtherFiles = null;
|
||||
var otherIds = this.GetEntities<T_FO_PROFESSIONAL_RESUME_OTHER_FILE>(t => t.PROFESSIONAL_RESUME_ID == entity.ID, new BaseFilter(entity.ORG_ID)).Select(m => m.ID).ToList();
|
||||
var otherList = new List<T_FO_PROFESSIONAL_RESUME_OTHER_FILE>();
|
||||
if (others != null && others.Any())
|
||||
{
|
||||
foreach (var item in others)
|
||||
{
|
||||
item.ORG_ID = entity.ORG_ID;
|
||||
item.PROFESSIONAL_RESUME_ID = entity.ID;
|
||||
item.Nav_ImgFile = null;
|
||||
otherList.Add(item);
|
||||
}
|
||||
}
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
if (detailFileIds != null && detailFileIds.Any())
|
||||
this.BantchDeleteEntityNoCommit<T_FO_PROFESSIONAL_RESUME_DETAIL_FILE>(detailFileIds);
|
||||
if (detailIds != null && detailIds.Any())
|
||||
this.BantchDeleteEntityNoCommit<T_FO_PROFESSIONAL_RESUME_DETAIL>(detailIds);
|
||||
if (educationalIds != null && educationalIds.Any())
|
||||
this.BantchDeleteEntityNoCommit<T_FO_PROFESSIONAL_RESUME_EDUCATIONAL_FILE>(educationalIds);
|
||||
if (postIds != null && postIds.Any())
|
||||
this.BantchDeleteEntityNoCommit<T_FO_PROFESSIONAL_RESUME_POST_FILE>(postIds);
|
||||
if (certificateIds != null && certificateIds.Any())
|
||||
this.BantchDeleteEntityNoCommit<T_FO_PROFESSIONAL_RESUME_CERTIFICATE_FILE>(certificateIds);
|
||||
if (medicalIds != null && medicalIds.Any())
|
||||
this.BantchDeleteEntityNoCommit<T_FO_PROFESSIONAL_RESUME_MEDICAL_FILE>(medicalIds);
|
||||
if (trainIds != null && trainIds.Any())
|
||||
this.BantchDeleteEntityNoCommit<T_FO_PROFESSIONAL_RESUME_TRAIN_FILE>(trainIds);
|
||||
if (otherIds != null && otherIds.Any())
|
||||
this.BantchDeleteEntityNoCommit<T_FO_PROFESSIONAL_RESUME_OTHER_FILE>(otherIds);
|
||||
if (entity != null)
|
||||
UpdateEntityNoCommit(entity);
|
||||
if (detailList != null && detailList.Any())
|
||||
this.BantchSaveEntityNoCommit(detailList);
|
||||
if (detailFileList != null && detailFileList.Any())
|
||||
this.BantchSaveEntityNoCommit(detailFileList);
|
||||
if (educationalList != null && educationalList.Any())
|
||||
this.BantchSaveEntityNoCommit(educationalList);
|
||||
if (postList != null && postList.Any())
|
||||
this.BantchSaveEntityNoCommit(postList);
|
||||
if (certificateList != null && certificateList.Any())
|
||||
this.BantchSaveEntityNoCommit(certificateList);
|
||||
if (medicalList != null && medicalList.Any())
|
||||
this.BantchSaveEntityNoCommit(medicalList);
|
||||
if (trainList != null && trainList.Any())
|
||||
this.BantchSaveEntityNoCommit(trainList);
|
||||
if (otherList != null && otherList.Any())
|
||||
this.BantchSaveEntityNoCommit(otherList);
|
||||
});
|
||||
return true;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,179 @@
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.BaseData.Domain.Enums;
|
||||
using APT.BaseData.Domain.IServices.FM;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Entities.FO;
|
||||
using APT.MS.Domain.Enums;
|
||||
using APT.Utility;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace APT.FO.WebApi.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// 安全交底表
|
||||
/// </summary>
|
||||
[Route("api/FO/FOTechDisclosureFromSafe")]
|
||||
public partial class TechDisclosureFromSafeController : AuthorizeApiController<T_FO_TECH_DISCLOSURE_FROM_SAFE>
|
||||
{
|
||||
IFMNotificationTaskService NotificationTaskService { get; set; }
|
||||
/// <summary>
|
||||
/// FOPreOperSch
|
||||
/// </summary>
|
||||
/// <param name="codeRuleService"></param>
|
||||
public TechDisclosureFromSafeController(IFMNotificationTaskService notificationTaskService)
|
||||
{
|
||||
NotificationTaskService = notificationTaskService;
|
||||
}
|
||||
[HttpPost, Route("GetEdit")]
|
||||
public JsonActionResult<T_FO_TECH_DISCLOSURE_FROM_SAFE> GetEdit([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return SafeExecute(() =>
|
||||
{
|
||||
var id = filter.FilterGroup.Rules.FirstOrDefault(t => t.Field == "ID").Value.ToString();
|
||||
if (string.IsNullOrEmpty(id))
|
||||
this.ThrowError("060010");
|
||||
var entity = this.GetEntity<T_FO_TECH_DISCLOSURE_FROM_SAFE>(id, "Nav_OperationStep", "Nav_User.Nav_Signs.Nav_ImgFile", "Nav_Department");
|
||||
if (entity != null)
|
||||
{
|
||||
var newFilter = new BaseFilter(filter.OrgId);
|
||||
newFilter.SelectField = new List<string> { "ID", "DEAL_STATUS", "TECH_DISCLOSURE_FROM_ID", "USER_ID", "Nav_User.NAME", "Nav_User.CODE", "Nav_User.FILE_PATH", "Nav_User.Nav_Signs.Nav_ImgFile" };
|
||||
var persons = this.GetEntities<T_FO_TECH_DISCLOSURE_FROM_SAFE_PERSON>(t => t.TECH_DISCLOSURE_FROM_ID == entity.ID, newFilter).ToList();
|
||||
entity.Nav_Person = persons.OrderBy(t => t.MODIFY_TIME).ThenByDescending(m => m.DEAL_STATUS).ToList();
|
||||
}
|
||||
return entity;
|
||||
});
|
||||
}
|
||||
/// <summary>
|
||||
/// 新增修改
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("FullUpdate")]
|
||||
public JsonActionResult<bool> FullUpdate([FromBody] T_FO_TECH_DISCLOSURE_FROM_SAFE entity)
|
||||
{
|
||||
return SafeExecute<bool>(() =>
|
||||
{
|
||||
entity.FORM_STATUS = (int)FOTeamActivityState.草稿;
|
||||
var persons = entity.Nav_Person;
|
||||
var deleteIds = this.GetEntities<T_FO_TECH_DISCLOSURE_FROM_SAFE_PERSON>(t => t.TECH_DISCLOSURE_FROM_ID == entity.ID, new BaseFilter(entity.ORG_ID)).Select(m => m.ID).ToList();
|
||||
if (persons != null && persons.Any())
|
||||
{
|
||||
persons = persons.Where(t => !t.IS_DELETED && t.USER_ID != null).ToList();
|
||||
}
|
||||
entity.Nav_Person = null;
|
||||
List<T_FM_NOTIFICATION_TASK> notices = new List<T_FM_NOTIFICATION_TASK>();
|
||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
var departmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
|
||||
entity.DEPARTMENT_ID = departmentId;
|
||||
if (string.IsNullOrEmpty(entity.DisclosureContent))
|
||||
{
|
||||
throw new Exception("交底内容必需填写");
|
||||
}
|
||||
entity.DisclosureContent = entity.DisclosureContent.Trim().Replace(" ", "");
|
||||
if (persons != null && persons.Any())
|
||||
{
|
||||
persons.ForEach(t =>
|
||||
{
|
||||
t.ORG_ID = entity.ORG_ID; t.TECH_DISCLOSURE_FROM_ID = entity.ID;
|
||||
t.Nav_User = null;
|
||||
});
|
||||
}
|
||||
if (entity.PUBLISH != null && entity.PUBLISH.Equals("SaveAndNotify"))
|
||||
{
|
||||
if (entity.DISCLOSURE_DATE == null || entity.DISCLOSURE_DATE == DateTime.Parse("0001-01-01 00:00:00"))
|
||||
throw new Exception("交底时间必需填写");
|
||||
|
||||
entity.FORM_STATUS = (int)FOTeamActivityState.签到中;
|
||||
persons.ForEach(t =>
|
||||
{
|
||||
if (t.USER_ID == loginUserId)
|
||||
t.DEAL_STATUS = FOUserShiftStatusEnum.已处理;
|
||||
});
|
||||
//新增的消息通知
|
||||
var userIds = persons.Where(m => m.USER_ID != null && m.USER_ID != loginUserId).Select(t => (Guid)t.USER_ID).Distinct().ToList();
|
||||
if (userIds != null && userIds.Any())
|
||||
{
|
||||
var UserNames = new List<string>();
|
||||
var user = this.GetEntities<T_FM_USER>(t => t.ENABLE_STATUS == (int)FMEnableStatusEnum.启用 && userIds.Contains(t.ID), new BaseFilter(entity.ORG_ID));
|
||||
foreach (var u in userIds)
|
||||
{
|
||||
var current = user.FirstOrDefault(t => t.ID == u);
|
||||
UserNames.Add(current?.NAME);
|
||||
}
|
||||
//发消息
|
||||
DateTime dtEnd = NotificationTaskService.GetTaskEndTime(FMTASKTYPE.JobSite, entity.ORG_ID.Value, DateTime.Now, null, null);
|
||||
notices = NotificationTaskService.InsertUserNoticeTaskModels("安全交底表确认" + DateTime.Now.Month.ToString().PadLeft(2, '0') + DateTime.Now.Day.ToString().PadLeft(2, '0'), entity.ID, entity.ORG_ID, userIds, UserNames, DateTime.Now,
|
||||
dtEnd, (int)FMNoticeTypeEnum.消息, "FO033_SHOWPRINT");
|
||||
}
|
||||
else
|
||||
{
|
||||
entity.FORM_STATUS = (int)FOTeamActivityState.已归档;
|
||||
}
|
||||
}
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
if (deleteIds != null && deleteIds.Any())
|
||||
this.BantchDeleteEntityNoCommit<T_FO_TECH_DISCLOSURE_FROM_SAFE_PERSON>(deleteIds);
|
||||
if (entity != null)
|
||||
UpdateEntityNoCommit(entity);
|
||||
if (persons != null && persons.Any())
|
||||
this.BantchSaveEntityNoCommit(persons);
|
||||
if (notices != null && notices.Any())
|
||||
this.BantchSaveEntityNoCommit(notices);
|
||||
});
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 签到同意
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("PersonalAgree")]
|
||||
public JsonActionResult<bool> PersonalAgree([FromBody] T_FO_TECH_DISCLOSURE_FROM_SAFE entity)
|
||||
{
|
||||
return SafeExecute<bool>(() =>
|
||||
{
|
||||
var orgId = APT.Infrastructure.Api.AppContext.CurrentSession.OrgId;
|
||||
var userID = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
if (entity.TaskID != Guid.Empty)
|
||||
{
|
||||
var currTask = GetEntity<T_FM_NOTIFICATION_TASK>(t => t.ID == entity.TaskID);
|
||||
if (currTask != null)
|
||||
{
|
||||
userID = currTask.USER_ID;
|
||||
}
|
||||
}
|
||||
var tech = this.GetEntity<T_FO_TECH_DISCLOSURE_FROM_SAFE>(entity.ID);
|
||||
var user = this.GetEntity<T_FO_TECH_DISCLOSURE_FROM_SAFE_PERSON>(t => t.TECH_DISCLOSURE_FROM_ID == tech.ID && t.USER_ID == userID, new BaseFilter(orgId));
|
||||
user.DEAL_STATUS = FOUserShiftStatusEnum.已处理;
|
||||
var todoCount = this.GetCount<T_FO_TECH_DISCLOSURE_FROM_SAFE_PERSON>(t => t.TECH_DISCLOSURE_FROM_ID == tech.ID && t.DEAL_STATUS == 0 && t.USER_ID != null && t.USER_ID != userID, new BaseFilter(orgId));
|
||||
if (todoCount == 0 || todoCount == 1)
|
||||
{
|
||||
tech.FORM_STATUS = (int)FOTeamActivityState.已归档;
|
||||
}
|
||||
T_FM_NOTIFICATION_TASK task = null;
|
||||
if (entity.TaskID != Guid.Empty)
|
||||
{
|
||||
task = NotificationTaskService.GetTaskFinishModel(entity.TaskID);
|
||||
task.SOURCE_FORMCODE = "FO033_SHOWPRINT";
|
||||
}
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
if (tech != null)
|
||||
UpdateEntityNoCommit(tech);
|
||||
if (user != null)
|
||||
this.UpdateEntityNoCommit(user);
|
||||
if (task != null)
|
||||
this.UpdateEntityNoCommit(task);
|
||||
});
|
||||
return true;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,181 @@
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.BaseData.Domain.Enums;
|
||||
using APT.BaseData.Domain.IServices;
|
||||
using APT.BaseData.Domain.IServices.FM;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Entities.FO;
|
||||
using APT.MS.Domain.Enums;
|
||||
using APT.Utility;
|
||||
using log4net.Filter;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace APT.FO.WebApi.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// 技术交底表
|
||||
/// </summary>
|
||||
[Route("api/FO/FOTechDisclosureFromTech")]
|
||||
public partial class TechDisclosureFromTechController : AuthorizeApiController<T_FO_TECH_DISCLOSURE_FROM_TECH>
|
||||
{
|
||||
IFMNotificationTaskService NotificationTaskService { get; set; }
|
||||
/// <summary>
|
||||
/// FOPreOperSch
|
||||
/// </summary>
|
||||
/// <param name="codeRuleService"></param>
|
||||
public TechDisclosureFromTechController(IFMNotificationTaskService notificationTaskService)
|
||||
{
|
||||
NotificationTaskService = notificationTaskService;
|
||||
}
|
||||
[HttpPost, Route("GetEdit")]
|
||||
public JsonActionResult<T_FO_TECH_DISCLOSURE_FROM_TECH> GetEdit([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return SafeExecute(() =>
|
||||
{
|
||||
var id = filter.FilterGroup.Rules.FirstOrDefault(t => t.Field == "ID").Value.ToString();
|
||||
if (string.IsNullOrEmpty(id))
|
||||
this.ThrowError("060010");
|
||||
var entity = this.GetEntity<T_FO_TECH_DISCLOSURE_FROM_TECH>(id, "Nav_OperationStep", "Nav_User.Nav_Signs.Nav_ImgFile", "Nav_Department");
|
||||
if (entity != null)
|
||||
{
|
||||
var newFilter = new BaseFilter(filter.OrgId);
|
||||
newFilter.SelectField = new List<string> { "ID", "DEAL_STATUS", "TECH_DISCLOSURE_FROM_ID", "USER_ID", "Nav_User.NAME", "Nav_User.CODE", "Nav_User.FILE_PATH", "Nav_User.Nav_Signs.Nav_ImgFile" };
|
||||
var persons = this.GetEntities<T_FO_TECH_DISCLOSURE_FROM_TECH_PERSON>(t => t.TECH_DISCLOSURE_FROM_ID == entity.ID, newFilter).ToList();
|
||||
entity.Nav_Person = persons.OrderBy(t => t.MODIFY_TIME).ThenByDescending(m => m.DEAL_STATUS).ToList();
|
||||
}
|
||||
return entity;
|
||||
});
|
||||
}
|
||||
/// <summary>
|
||||
/// 新增修改
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("FullUpdate")]
|
||||
public JsonActionResult<bool> FullUpdate([FromBody] T_FO_TECH_DISCLOSURE_FROM_TECH entity)
|
||||
{
|
||||
return SafeExecute<bool>(() =>
|
||||
{
|
||||
entity.FORM_STATUS = (int)FOTeamActivityState.草稿;
|
||||
var persons = entity.Nav_Person;
|
||||
var deleteIds = this.GetEntities<T_FO_TECH_DISCLOSURE_FROM_TECH_PERSON>(t => t.TECH_DISCLOSURE_FROM_ID == entity.ID, new BaseFilter(entity.ORG_ID)).Select(m=>m.ID).ToList();
|
||||
if (persons != null && persons.Any())
|
||||
{
|
||||
persons = persons.Where(t => !t.IS_DELETED && t.USER_ID != null).ToList();
|
||||
}
|
||||
entity.Nav_Person = null;
|
||||
List<T_FM_NOTIFICATION_TASK> notices = new List<T_FM_NOTIFICATION_TASK>();
|
||||
var loginUserId = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
var departmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
|
||||
entity.DEPARTMENT_ID = departmentId;
|
||||
if (string.IsNullOrEmpty(entity.DisclosureContent))
|
||||
{
|
||||
throw new Exception("交底内容必需填写");
|
||||
}
|
||||
entity.DisclosureContent = entity.DisclosureContent.Trim().Replace(" ", "");
|
||||
if (persons != null && persons.Any())
|
||||
{
|
||||
persons.ForEach(t =>
|
||||
{
|
||||
t.ORG_ID = entity.ORG_ID; t.TECH_DISCLOSURE_FROM_ID = entity.ID;
|
||||
t.Nav_User = null;
|
||||
});
|
||||
}
|
||||
if (entity.PUBLISH != null && entity.PUBLISH.Equals("SaveAndNotify"))
|
||||
{
|
||||
if (entity.DISCLOSURE_DATE == null || entity.DISCLOSURE_DATE == DateTime.Parse("0001-01-01 00:00:00"))
|
||||
throw new Exception("交底时间必需填写");
|
||||
|
||||
entity.FORM_STATUS = (int)FOTeamActivityState.签到中;
|
||||
persons.ForEach(t =>
|
||||
{
|
||||
if (t.USER_ID == loginUserId)
|
||||
t.DEAL_STATUS = FOUserShiftStatusEnum.已处理;
|
||||
});
|
||||
//新增的消息通知
|
||||
var userIds = persons.Where(m => m.USER_ID != null && m.USER_ID != loginUserId).Select(t => (Guid)t.USER_ID).Distinct().ToList();
|
||||
if (userIds != null && userIds.Any())
|
||||
{
|
||||
var UserNames = new List<string>();
|
||||
var user = this.GetEntities<T_FM_USER>(t => t.ENABLE_STATUS == (int)FMEnableStatusEnum.启用 && userIds.Contains(t.ID), new BaseFilter(entity.ORG_ID));
|
||||
foreach (var u in userIds)
|
||||
{
|
||||
var current = user.FirstOrDefault(t => t.ID == u);
|
||||
UserNames.Add(current?.NAME);
|
||||
}
|
||||
//发消息
|
||||
DateTime dtEnd = NotificationTaskService.GetTaskEndTime(FMTASKTYPE.JobSite, entity.ORG_ID.Value, DateTime.Now, null, null);
|
||||
notices = NotificationTaskService.InsertUserNoticeTaskModels("技术交底表确认"+DateTime.Now.Month.ToString().PadLeft(2,'0') + DateTime.Now.Day.ToString().PadLeft(2, '0'), entity.ID, entity.ORG_ID, userIds, UserNames, DateTime.Now,
|
||||
dtEnd, (int)FMNoticeTypeEnum.消息, "FO031_SHOWPRINT");
|
||||
}
|
||||
else
|
||||
{
|
||||
entity.FORM_STATUS = (int)FOTeamActivityState.已归档;
|
||||
}
|
||||
}
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
if (deleteIds != null && deleteIds.Any())
|
||||
this.BantchDeleteEntityNoCommit<T_FO_TECH_DISCLOSURE_FROM_TECH_PERSON>(deleteIds);
|
||||
if (entity != null)
|
||||
UpdateEntityNoCommit(entity);
|
||||
if (persons != null && persons.Any())
|
||||
this.BantchSaveEntityNoCommit(persons);
|
||||
if (notices != null && notices.Any())
|
||||
this.BantchSaveEntityNoCommit(notices);
|
||||
});
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 签到同意
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("PersonalAgree")]
|
||||
public JsonActionResult<bool> PersonalAgree([FromBody] T_FO_TECH_DISCLOSURE_FROM_TECH entity)
|
||||
{
|
||||
return SafeExecute<bool>(() =>
|
||||
{
|
||||
var orgId = APT.Infrastructure.Api.AppContext.CurrentSession.OrgId;
|
||||
var userID = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
if (entity.TaskID != Guid.Empty)
|
||||
{
|
||||
var currTask = GetEntity<T_FM_NOTIFICATION_TASK>(t => t.ID == entity.TaskID);
|
||||
if (currTask != null)
|
||||
{
|
||||
userID = currTask.USER_ID;
|
||||
}
|
||||
}
|
||||
var tech = this.GetEntity<T_FO_TECH_DISCLOSURE_FROM_TECH>(entity.ID);
|
||||
var user = this.GetEntity<T_FO_TECH_DISCLOSURE_FROM_TECH_PERSON>(t => t.TECH_DISCLOSURE_FROM_ID == tech.ID && t.USER_ID == userID, new BaseFilter(orgId));
|
||||
user.DEAL_STATUS = FOUserShiftStatusEnum.已处理;
|
||||
var todoCount = this.GetCount<T_FO_TECH_DISCLOSURE_FROM_TECH_PERSON>(t => t.TECH_DISCLOSURE_FROM_ID == tech.ID && t.DEAL_STATUS == 0 && t.USER_ID != null && t.USER_ID != userID, new BaseFilter(orgId));
|
||||
if (todoCount == 0 || todoCount == 1)
|
||||
{
|
||||
tech.FORM_STATUS = (int)FOTeamActivityState.已归档;
|
||||
}
|
||||
T_FM_NOTIFICATION_TASK task = null;
|
||||
if (entity.TaskID != Guid.Empty)
|
||||
{
|
||||
task = NotificationTaskService.GetTaskFinishModel(entity.TaskID);
|
||||
task.SOURCE_FORMCODE = "FO031_SHOWPRINT";
|
||||
}
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
if (tech != null)
|
||||
UpdateEntityNoCommit(tech);
|
||||
if (user != null)
|
||||
this.UpdateEntityNoCommit(user);
|
||||
if (task != null)
|
||||
this.UpdateEntityNoCommit(task);
|
||||
});
|
||||
return true;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,128 +1,137 @@
|
||||
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// T4模板文件:基础接口类
|
||||
// 此代码由T4模板自动生成
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//------------------------------------------------------------------------------
|
||||
using APT.Infrastructure.Core;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
using APT.Utility;
|
||||
using APT.Infrastructure.Api;
|
||||
using APT.BaseData.Domain.ApiModel.PF;
|
||||
namespace APT.LG.WebApi.Controllers.Api
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// T4模板文件:基础接口类
|
||||
// 此代码由T4模板自动生成
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//------------------------------------------------------------------------------
|
||||
using APT.Infrastructure.Core;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
using APT.Utility;
|
||||
using APT.Infrastructure.Api;
|
||||
using APT.BaseData.Domain.ApiModel.PF;
|
||||
namespace APT.LG.WebApi.Controllers.Api
|
||||
{
|
||||
using APT.BaseData.Domain.Entities.LG;
|
||||
#region Oprate-表单操作日志表
|
||||
/// <summary>
|
||||
/// 表单操作日志表
|
||||
/// </summary>
|
||||
[Route("api/LG/Oprate")]
|
||||
public partial class OprateController : AuthorizeApiController<T_LG_OPRATE>
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Entities")]
|
||||
public JsonActionResult<IEnumerable<T_LG_OPRATE>> Entities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpPost, Route("OrderEntities")]
|
||||
public JsonActionResult<IEnumerable<T_LG_OPRATE>> OrderEntities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitOrderEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Paged")]
|
||||
public PagedActionResult<T_LG_OPRATE> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
public PagedActionResult<T_LG_OPRATE> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitOrderPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除数据
|
||||
/// </summary>
|
||||
/// <param name="id">主键ID</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("Delete")]
|
||||
public JsonActionResult<bool> Delete(string id)
|
||||
{
|
||||
return WitRealDelete(id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新或新增数据
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Update")]
|
||||
public JsonActionResult<bool> Update([FromBody]T_LG_OPRATE entity)
|
||||
{
|
||||
return WitUpdate(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量更新
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("BatchUpdate")]
|
||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_LG_OPRATE> entity)
|
||||
{
|
||||
return WitBantchUpdate(entity?.Data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量删除数据
|
||||
/// </summary>
|
||||
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("BatchDelete")]
|
||||
public JsonActionResult<bool> BatchDelete(string ids)
|
||||
{
|
||||
return WitRealBatchDelete(ids);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得单条实体数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Get")]
|
||||
public JsonActionResult<T_LG_OPRATE> Get([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return WitEntity(null, filter);
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
#region Oprate-表单操作日志表
|
||||
/// <summary>
|
||||
/// 表单操作日志表
|
||||
/// </summary>
|
||||
[Route("api/LG/Oprate")]
|
||||
public partial class OprateController : AuthorizeApiController<T_LG_OPRATE>
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Entities")]
|
||||
public JsonActionResult<IEnumerable<T_LG_OPRATE>> Entities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpPost, Route("OrderEntities")]
|
||||
public JsonActionResult<IEnumerable<T_LG_OPRATE>> OrderEntities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitOrderEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Paged")]
|
||||
public PagedActionResult<T_LG_OPRATE> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
public PagedActionResult<T_LG_OPRATE> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitOrderPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除数据
|
||||
/// </summary>
|
||||
/// <param name="id">主键ID</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("Delete")]
|
||||
public JsonActionResult<bool> Delete(string id)
|
||||
{
|
||||
return WitRealDelete(id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新或新增数据
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Update")]
|
||||
public JsonActionResult<bool> Update([FromBody]T_LG_OPRATE entity)
|
||||
{
|
||||
return WitUpdate(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量更新
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("BatchUpdate")]
|
||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_LG_OPRATE> entity)
|
||||
{
|
||||
return WitBantchUpdate(entity?.Data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量删除数据
|
||||
/// </summary>
|
||||
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("BatchDelete")]
|
||||
public JsonActionResult<bool> BatchDelete(string ids)
|
||||
{
|
||||
return WitRealBatchDelete(ids);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得单条实体数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Get")]
|
||||
public JsonActionResult<T_LG_OPRATE> Get([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return WitEntity(null, filter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
@ -1,356 +1,370 @@
|
||||
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// T4模板文件:基础接口类
|
||||
// 此代码由T4模板自动生成
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//------------------------------------------------------------------------------
|
||||
using APT.Infrastructure.Core;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
using APT.Utility;
|
||||
using APT.Infrastructure.Api;
|
||||
using APT.BaseData.Domain.ApiModel.PF;
|
||||
namespace APT.NW.WebApi.Controllers.Api
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// T4模板文件:基础接口类
|
||||
// 此代码由T4模板自动生成
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//------------------------------------------------------------------------------
|
||||
using APT.Infrastructure.Core;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
using APT.Utility;
|
||||
using APT.Infrastructure.Api;
|
||||
using APT.BaseData.Domain.ApiModel.PF;
|
||||
namespace APT.NW.WebApi.Controllers.Api
|
||||
{
|
||||
using APT.BaseData.Domain.Entities.NW;
|
||||
#region Enterprise-子企业表
|
||||
/// <summary>
|
||||
/// 子企业表
|
||||
/// </summary>
|
||||
[Route("api/NW/Enterprise")]
|
||||
public partial class EnterpriseController : AuthorizeTreeApiController<T_NW_ENTERPRISE>
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Entities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ENTERPRISE>> Entities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpPost, Route("OrderEntities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ENTERPRISE>> OrderEntities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitOrderEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Paged")]
|
||||
public PagedActionResult<T_NW_ENTERPRISE> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
public PagedActionResult<T_NW_ENTERPRISE> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitOrderPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除数据
|
||||
/// </summary>
|
||||
/// <param name="id">主键ID</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("Delete")]
|
||||
public JsonActionResult<bool> Delete(string id)
|
||||
{
|
||||
return WitRealDelete(id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新或新增数据
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Update")]
|
||||
public JsonActionResult<bool> Update([FromBody]T_NW_ENTERPRISE entity)
|
||||
{
|
||||
return WitUpdate(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量更新
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("BatchUpdate")]
|
||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_NW_ENTERPRISE> entity)
|
||||
{
|
||||
return WitBantchUpdate(entity?.Data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量删除数据
|
||||
/// </summary>
|
||||
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("BatchDelete")]
|
||||
public JsonActionResult<bool> BatchDelete(string ids)
|
||||
{
|
||||
return WitRealBatchDelete(ids);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得单条实体数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Get")]
|
||||
public JsonActionResult<T_NW_ENTERPRISE> Get([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return WitEntity(null, filter);
|
||||
}
|
||||
/// <summary>
|
||||
/// 获得树形实体数据
|
||||
/// </summary>
|
||||
/// <param name="filter"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("TreeData")]
|
||||
public JsonActionResult<IEnumerable<TreeNode<T_NW_ENTERPRISE>>> TreeData([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return WitTreeOrderEntities(null, filter);
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
#region RoleDataPerm-子企业数据权限表
|
||||
/// <summary>
|
||||
/// 子企业数据权限表
|
||||
/// </summary>
|
||||
[Route("api/NW/RoleDataPerm")]
|
||||
public partial class RoleDataPermController : AuthorizeApiController<T_NW_ROLE_DATA_PERM>
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Entities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ROLE_DATA_PERM>> Entities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpPost, Route("OrderEntities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ROLE_DATA_PERM>> OrderEntities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitOrderEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Paged")]
|
||||
public PagedActionResult<T_NW_ROLE_DATA_PERM> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
public PagedActionResult<T_NW_ROLE_DATA_PERM> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitOrderPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除数据
|
||||
/// </summary>
|
||||
/// <param name="id">主键ID</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("Delete")]
|
||||
public JsonActionResult<bool> Delete(string id)
|
||||
{
|
||||
return WitRealDelete(id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新或新增数据
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Update")]
|
||||
public JsonActionResult<bool> Update([FromBody]T_NW_ROLE_DATA_PERM entity)
|
||||
{
|
||||
return WitUpdate(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量更新
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("BatchUpdate")]
|
||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_NW_ROLE_DATA_PERM> entity)
|
||||
{
|
||||
return WitBantchUpdate(entity?.Data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量删除数据
|
||||
/// </summary>
|
||||
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("BatchDelete")]
|
||||
public JsonActionResult<bool> BatchDelete(string ids)
|
||||
{
|
||||
return WitRealBatchDelete(ids);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得单条实体数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Get")]
|
||||
public JsonActionResult<T_NW_ROLE_DATA_PERM> Get([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return WitEntity(null, filter);
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
#region RoleMenu-子企业权限表
|
||||
/// <summary>
|
||||
/// 子企业权限表
|
||||
/// </summary>
|
||||
[Route("api/NW/RoleMenu")]
|
||||
public partial class RoleMenuController : AuthorizeApiController<T_NW_ROLE_MENU>
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Entities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ROLE_MENU>> Entities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpPost, Route("OrderEntities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ROLE_MENU>> OrderEntities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitOrderEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Paged")]
|
||||
public PagedActionResult<T_NW_ROLE_MENU> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
public PagedActionResult<T_NW_ROLE_MENU> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitOrderPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除数据
|
||||
/// </summary>
|
||||
/// <param name="id">主键ID</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("Delete")]
|
||||
public JsonActionResult<bool> Delete(string id)
|
||||
{
|
||||
return WitRealDelete(id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新或新增数据
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Update")]
|
||||
public JsonActionResult<bool> Update([FromBody]T_NW_ROLE_MENU entity)
|
||||
{
|
||||
return WitUpdate(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量更新
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("BatchUpdate")]
|
||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_NW_ROLE_MENU> entity)
|
||||
{
|
||||
return WitBantchUpdate(entity?.Data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量删除数据
|
||||
/// </summary>
|
||||
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("BatchDelete")]
|
||||
public JsonActionResult<bool> BatchDelete(string ids)
|
||||
{
|
||||
return WitRealBatchDelete(ids);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得单条实体数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Get")]
|
||||
public JsonActionResult<T_NW_ROLE_MENU> Get([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return WitEntity(null, filter);
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
#region Enterprise-子企业表
|
||||
/// <summary>
|
||||
/// 子企业表
|
||||
/// </summary>
|
||||
[Route("api/NW/Enterprise")]
|
||||
public partial class EnterpriseController : AuthorizeTreeApiController<T_NW_ENTERPRISE>
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Entities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ENTERPRISE>> Entities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpPost, Route("OrderEntities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ENTERPRISE>> OrderEntities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitOrderEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Paged")]
|
||||
public PagedActionResult<T_NW_ENTERPRISE> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
public PagedActionResult<T_NW_ENTERPRISE> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitOrderPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除数据
|
||||
/// </summary>
|
||||
/// <param name="id">主键ID</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("Delete")]
|
||||
public JsonActionResult<bool> Delete(string id)
|
||||
{
|
||||
return WitRealDelete(id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新或新增数据
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Update")]
|
||||
public JsonActionResult<bool> Update([FromBody]T_NW_ENTERPRISE entity)
|
||||
{
|
||||
return WitUpdate(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量更新
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("BatchUpdate")]
|
||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_NW_ENTERPRISE> entity)
|
||||
{
|
||||
return WitBantchUpdate(entity?.Data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量删除数据
|
||||
/// </summary>
|
||||
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("BatchDelete")]
|
||||
public JsonActionResult<bool> BatchDelete(string ids)
|
||||
{
|
||||
return WitRealBatchDelete(ids);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得单条实体数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Get")]
|
||||
public JsonActionResult<T_NW_ENTERPRISE> Get([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return WitEntity(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得树形实体数据
|
||||
/// </summary>
|
||||
/// <param name="filter"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("TreeData")]
|
||||
public JsonActionResult<IEnumerable<TreeNode<T_NW_ENTERPRISE>>> TreeData([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return WitTreeOrderEntities(null, filter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region RoleDataPerm-子企业数据权限表
|
||||
/// <summary>
|
||||
/// 子企业数据权限表
|
||||
/// </summary>
|
||||
[Route("api/NW/RoleDataPerm")]
|
||||
public partial class RoleDataPermController : AuthorizeApiController<T_NW_ROLE_DATA_PERM>
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Entities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ROLE_DATA_PERM>> Entities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpPost, Route("OrderEntities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ROLE_DATA_PERM>> OrderEntities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitOrderEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Paged")]
|
||||
public PagedActionResult<T_NW_ROLE_DATA_PERM> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
public PagedActionResult<T_NW_ROLE_DATA_PERM> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitOrderPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除数据
|
||||
/// </summary>
|
||||
/// <param name="id">主键ID</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("Delete")]
|
||||
public JsonActionResult<bool> Delete(string id)
|
||||
{
|
||||
return WitRealDelete(id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新或新增数据
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Update")]
|
||||
public JsonActionResult<bool> Update([FromBody]T_NW_ROLE_DATA_PERM entity)
|
||||
{
|
||||
return WitUpdate(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量更新
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("BatchUpdate")]
|
||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_NW_ROLE_DATA_PERM> entity)
|
||||
{
|
||||
return WitBantchUpdate(entity?.Data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量删除数据
|
||||
/// </summary>
|
||||
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("BatchDelete")]
|
||||
public JsonActionResult<bool> BatchDelete(string ids)
|
||||
{
|
||||
return WitRealBatchDelete(ids);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得单条实体数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Get")]
|
||||
public JsonActionResult<T_NW_ROLE_DATA_PERM> Get([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return WitEntity(null, filter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region RoleMenu-子企业权限表
|
||||
/// <summary>
|
||||
/// 子企业权限表
|
||||
/// </summary>
|
||||
[Route("api/NW/RoleMenu")]
|
||||
public partial class RoleMenuController : AuthorizeApiController<T_NW_ROLE_MENU>
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Entities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ROLE_MENU>> Entities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpPost, Route("OrderEntities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ROLE_MENU>> OrderEntities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitOrderEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Paged")]
|
||||
public PagedActionResult<T_NW_ROLE_MENU> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
public PagedActionResult<T_NW_ROLE_MENU> OrderPaged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitOrderPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除数据
|
||||
/// </summary>
|
||||
/// <param name="id">主键ID</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("Delete")]
|
||||
public JsonActionResult<bool> Delete(string id)
|
||||
{
|
||||
return WitRealDelete(id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新或新增数据
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Update")]
|
||||
public JsonActionResult<bool> Update([FromBody]T_NW_ROLE_MENU entity)
|
||||
{
|
||||
return WitUpdate(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量更新
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("BatchUpdate")]
|
||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_NW_ROLE_MENU> entity)
|
||||
{
|
||||
return WitBantchUpdate(entity?.Data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量删除数据
|
||||
/// </summary>
|
||||
/// <param name="ids">id字符串(id用逗号分隔)</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("BatchDelete")]
|
||||
public JsonActionResult<bool> BatchDelete(string ids)
|
||||
{
|
||||
return WitRealBatchDelete(ids);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得单条实体数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Get")]
|
||||
public JsonActionResult<T_NW_ROLE_MENU> Get([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return WitEntity(null, filter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,13 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// T4模板文件:基础接口类
|
||||
// 此代码由T4模板自动生成
|
||||
@ -15,4 +21,5 @@ using APT.Infrastructure.Api;
|
||||
using APT.BaseData.Domain.ApiModel.PF;
|
||||
namespace APT.PP.WebApi.Controllers.Api
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user