Merge branch 'master' of https://gitee.com/doan-tech/zhuangpei-mesbackend
This commit is contained in:
commit
b7d31da9e5
@ -0,0 +1,108 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using DOAN.Model.MES.group;
|
||||
using DOAN.Model.MES.group.Dto;
|
||||
using DOAN.Service.group.IService;
|
||||
using DOAN.Admin.WebApi.Filters;
|
||||
|
||||
//创建时间:2024-08-12
|
||||
namespace DOAN.Admin.WebApi.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// 人员技能矩阵图
|
||||
/// </summary>
|
||||
[Verify]
|
||||
[Route("mes/groupManagement/GroupPersonSkillMatrix")]
|
||||
public class GroupPersonSkillMatrixController : BaseController
|
||||
{
|
||||
/// <summary>
|
||||
/// 人员技能矩阵图接口
|
||||
/// </summary>
|
||||
private readonly IGroupPersonSkillMatrixService _GroupPersonSkillMatrixService;
|
||||
|
||||
public GroupPersonSkillMatrixController(IGroupPersonSkillMatrixService GroupPersonSkillMatrixService)
|
||||
{
|
||||
_GroupPersonSkillMatrixService = GroupPersonSkillMatrixService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询人员技能矩阵图列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("list")]
|
||||
[ActionPermissionFilter(Permission = "groupManagement:grouppersonskillmatrix:list")]
|
||||
public IActionResult QueryGroupPersonSkillMatrix([FromQuery] GroupPersonSkillMatrixQueryDto parm)
|
||||
{
|
||||
var response = _GroupPersonSkillMatrixService.GetList(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询人员技能矩阵图详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{Id}")]
|
||||
[ActionPermissionFilter(Permission = "groupManagement:grouppersonskillmatrix:query")]
|
||||
public IActionResult GetGroupPersonSkillMatrix(string Id)
|
||||
{
|
||||
var response = _GroupPersonSkillMatrixService.GetInfo(Id);
|
||||
|
||||
var info = response.Adapt<GroupPersonSkillMatrix>();
|
||||
return SUCCESS(info);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加人员技能矩阵图
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ActionPermissionFilter(Permission = "groupManagement:grouppersonskillmatrix:add")]
|
||||
[Log(Title = "人员技能矩阵图", BusinessType = BusinessType.INSERT)]
|
||||
public IActionResult AddGroupPersonSkillMatrix([FromBody] GroupPersonSkillMatrixDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<GroupPersonSkillMatrix>().ToCreate(HttpContext);
|
||||
|
||||
var response = _GroupPersonSkillMatrixService.AddGroupPersonSkillMatrix(modal);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新人员技能矩阵图
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[ActionPermissionFilter(Permission = "groupManagement:grouppersonskillmatrix:edit")]
|
||||
[Log(Title = "人员技能矩阵图", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult UpdateGroupPersonSkillMatrix([FromBody] GroupPersonSkillMatrixDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<GroupPersonSkillMatrix>().ToUpdate(HttpContext);
|
||||
var response = _GroupPersonSkillMatrixService.UpdateGroupPersonSkillMatrix(modal);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除人员技能矩阵图
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpDelete("{ids}")]
|
||||
[ActionPermissionFilter(Permission = "groupManagement:grouppersonskillmatrix:delete")]
|
||||
[Log(Title = "人员技能矩阵图", BusinessType = BusinessType.DELETE)]
|
||||
public IActionResult DeleteGroupPersonSkillMatrix(string ids)
|
||||
{
|
||||
int[] idsArr = Tools.SpitIntArrary(ids);
|
||||
if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); }
|
||||
|
||||
var response = _GroupPersonSkillMatrixService.Delete(idsArr);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<key id="26118b0d-b472-4603-9c7c-6882b3acb8d9" version="1">
|
||||
<creationDate>2024-08-12T06:14:54.3041032Z</creationDate>
|
||||
<activationDate>2024-08-14T03:44:20.6307352Z</activationDate>
|
||||
<expirationDate>2024-11-10T06:14:53.9862227Z</expirationDate>
|
||||
<descriptor deserializerType="Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60">
|
||||
<descriptor>
|
||||
<encryption algorithm="AES_256_CBC" />
|
||||
<validation algorithm="HMACSHA256" />
|
||||
<masterKey p4:requiresEncryption="true" xmlns:p4="http://schemas.asp.net/2015/03/dataProtection">
|
||||
<!-- Warning: the key below is in an unencrypted form. -->
|
||||
<value>Yrzn06EqoMRXvV+cO3XK6M+PFfMrzwaHrZ7QnlbOx2bhWX6iqZtwB1TvcEvfLWqQFq35OVWMDGcNjjxAMNfq0Q==</value>
|
||||
</masterKey>
|
||||
</descriptor>
|
||||
</descriptor>
|
||||
</key>
|
||||
41
DOAN.Model/MES/group/Dto/GroupPersonSkillMatrixDto.cs
Normal file
41
DOAN.Model/MES/group/Dto/GroupPersonSkillMatrixDto.cs
Normal file
@ -0,0 +1,41 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace DOAN.Model.MES.group.Dto
|
||||
{
|
||||
/// <summary>
|
||||
/// 人员技能矩阵图查询对象
|
||||
/// </summary>
|
||||
public class GroupPersonSkillMatrixQueryDto : PagerInfo
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 人员技能矩阵图输入输出对象
|
||||
/// </summary>
|
||||
public class GroupPersonSkillMatrixDto
|
||||
{
|
||||
[Required(ErrorMessage = "雪花不能为空")]
|
||||
public string Id { get; set; }
|
||||
|
||||
public string SkillName { get; set; }
|
||||
|
||||
public string Image { get; set; }
|
||||
|
||||
public string Vedio { get; set; }
|
||||
|
||||
public string Remark { get; set; }
|
||||
|
||||
public int? Status { get; set; }
|
||||
|
||||
public string CreatedBy { get; set; }
|
||||
|
||||
public DateTime? CreatedTime { get; set; }
|
||||
|
||||
public string UpdatedBy { get; set; }
|
||||
|
||||
public DateTime? UpdatedTime { get; set; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
66
DOAN.Model/MES/group/GroupPersonSkillMatrix.cs
Normal file
66
DOAN.Model/MES/group/GroupPersonSkillMatrix.cs
Normal file
@ -0,0 +1,66 @@
|
||||
namespace DOAN.Model.MES.group
|
||||
{
|
||||
/// <summary>
|
||||
/// 人员技能矩阵图
|
||||
/// </summary>
|
||||
[SugarTable("group_person_skill_matrix")]
|
||||
public class GroupPersonSkillMatrix
|
||||
{
|
||||
/// <summary>
|
||||
/// 雪花
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = false)]
|
||||
public string Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 技能名称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "skill_name")]
|
||||
public string SkillName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 教学图片
|
||||
/// </summary>
|
||||
public string Image { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 教学视频
|
||||
/// </summary>
|
||||
public string Vedio { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Remark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public int? Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "cREATED_BY")]
|
||||
public string CreatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "cREATED_TIME")]
|
||||
public DateTime? CreatedTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "uPDATED_BY")]
|
||||
public string UpdatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "uPDATED_TIME")]
|
||||
public DateTime? UpdatedTime { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
57
DOAN.Model/MES/group/GroupRelPersonSkill.cs
Normal file
57
DOAN.Model/MES/group/GroupRelPersonSkill.cs
Normal file
@ -0,0 +1,57 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DOAN.Model.MES.group
|
||||
{
|
||||
/// <summary>
|
||||
/// 人员与技能关联表
|
||||
/// </summary>
|
||||
[SugarTable("group_rel_person_skill")]
|
||||
public class GroupRelPersonSkill
|
||||
{
|
||||
/// <summary>
|
||||
/// 技能id
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = false, ColumnName = "fk_skill_id")]
|
||||
public string FkSkillId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 人员id
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = false, ColumnName = "fk_person_id")]
|
||||
public string FkPersonId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 评分
|
||||
/// </summary>
|
||||
public int? Score { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "cREATED_TIME")]
|
||||
public DateTime? CreatedTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "cREATED_BY")]
|
||||
public string CreatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "uPDATED_BY")]
|
||||
public string UpdatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "uPDATED_TIME")]
|
||||
public DateTime? UpdatedTime { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
52
DOAN.Model/MES/group/GroupRelWorkstationSkill.cs
Normal file
52
DOAN.Model/MES/group/GroupRelWorkstationSkill.cs
Normal file
@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DOAN.Model.MES.group
|
||||
{
|
||||
/// <summary>
|
||||
/// 工位与技能关联表
|
||||
/// </summary>
|
||||
[SugarTable("group_rel_workstation_skill")]
|
||||
public class GroupRelWorkstationSkill
|
||||
{
|
||||
/// <summary>
|
||||
/// 技能id
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = false, ColumnName = "fk_skill_id")]
|
||||
public string FkSkillId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 工位id
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = false, ColumnName = "fk_workstation_id")]
|
||||
public int FkWorkstationId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "cREATED_BY")]
|
||||
public string CreatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "cREATED_TIME")]
|
||||
public DateTime? CreatedTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "uPDATED_BY")]
|
||||
public string UpdatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "uPDATED_TIME")]
|
||||
public DateTime? UpdatedTime { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@ -10,7 +10,7 @@ using DOAN.Repository;
|
||||
using DOAN.Service.group.IService;
|
||||
using System.Linq;
|
||||
|
||||
namespace DOAN.Service.Business
|
||||
namespace DOAN.Service.group
|
||||
{
|
||||
/// <summary>
|
||||
/// 人员Service业务层处理
|
||||
|
||||
86
DOAN.Service/MES/group/GroupPersonSkillMatrixService.cs
Normal file
86
DOAN.Service/MES/group/GroupPersonSkillMatrixService.cs
Normal file
@ -0,0 +1,86 @@
|
||||
using System;
|
||||
using SqlSugar;
|
||||
using Infrastructure.Attribute;
|
||||
using Infrastructure.Extensions;
|
||||
using DOAN.Model;
|
||||
using DOAN.Model.Dto;
|
||||
using DOAN.Model.MES.group;
|
||||
using DOAN.Model.MES.group.Dto;
|
||||
using DOAN.Repository;
|
||||
using DOAN.Service.group.IService;
|
||||
using System.Linq;
|
||||
|
||||
namespace DOAN.Service.group
|
||||
{
|
||||
/// <summary>
|
||||
/// 人员技能矩阵图Service业务层处理
|
||||
/// </summary>
|
||||
[AppService(ServiceType = typeof(IGroupPersonSkillMatrixService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class GroupPersonSkillMatrixService : BaseService<GroupPersonSkillMatrix>, IGroupPersonSkillMatrixService
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询人员技能矩阵图列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
public PagedInfo<GroupPersonSkillMatrixDto> GetList(GroupPersonSkillMatrixQueryDto parm)
|
||||
{
|
||||
var predicate = Expressionable.Create<GroupPersonSkillMatrix>();
|
||||
|
||||
var response = Queryable()
|
||||
.Where(predicate.ToExpression())
|
||||
.ToPage<GroupPersonSkillMatrix, GroupPersonSkillMatrixDto>(parm);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public GroupPersonSkillMatrix GetInfo(string Id)
|
||||
{
|
||||
var response = Queryable()
|
||||
.Where(x => x.Id == Id)
|
||||
.First();
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加人员技能矩阵图
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public GroupPersonSkillMatrix AddGroupPersonSkillMatrix(GroupPersonSkillMatrix model)
|
||||
{
|
||||
return Context.Insertable(model).ExecuteReturnEntity();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改人员技能矩阵图
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public int UpdateGroupPersonSkillMatrix(GroupPersonSkillMatrix model)
|
||||
{
|
||||
//var response = Update(w => w.Id == model.Id, it => new GroupPersonSkillMatrix()
|
||||
//{
|
||||
// SkillName = model.SkillName,
|
||||
// Image = model.Image,
|
||||
// Vedio = model.Vedio,
|
||||
// Remark = model.Remark,
|
||||
// Status = model.Status,
|
||||
// CreatedBy = model.CreatedBy,
|
||||
// CreatedTime = model.CreatedTime,
|
||||
// UpdatedBy = model.UpdatedBy,
|
||||
// UpdatedTime = model.UpdatedTime,
|
||||
//});
|
||||
//return response;
|
||||
return Update(model, true);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using DOAN.Model;
|
||||
using DOAN.Model.Dto;
|
||||
using DOAN.Model.MES.group;
|
||||
using DOAN.Model.MES.group.Dto;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace DOAN.Service.group.IService
|
||||
{
|
||||
/// <summary>
|
||||
/// 人员技能矩阵图service接口
|
||||
/// </summary>
|
||||
public interface IGroupPersonSkillMatrixService : IBaseService<GroupPersonSkillMatrix>
|
||||
{
|
||||
PagedInfo<GroupPersonSkillMatrixDto> GetList(GroupPersonSkillMatrixQueryDto parm);
|
||||
|
||||
GroupPersonSkillMatrix GetInfo(string Id);
|
||||
|
||||
GroupPersonSkillMatrix AddGroupPersonSkillMatrix(GroupPersonSkillMatrix parm);
|
||||
|
||||
int UpdateGroupPersonSkillMatrix(GroupPersonSkillMatrix parm);
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user