using Microsoft.AspNetCore.Mvc; using DOAN.Model.Bydlms.Dto; using DOAN.Model.Bydlms; using DOAN.Service.Bydlms.IBydlmsService; using DOAN.Admin.WebApi.Filters; //创建时间:2025-02-19 namespace DOAN.Admin.WebApi.Controllers.Bydlms { /// /// 考勤打卡记录 /// [Verify] [Route("bydlms/BydClockInRecord")] public class BydClockInRecordController : BaseController { /// /// 考勤打卡记录接口 /// private readonly IBydClockInRecordService _BydClockInRecordService; public BydClockInRecordController(IBydClockInRecordService BydClockInRecordService) { _BydClockInRecordService = BydClockInRecordService; } /// /// 查询考勤打卡记录列表 /// /// /// [HttpGet("list")] [ActionPermissionFilter(Permission = "bydclockinrecord:list")] public IActionResult QueryBydClockInRecord([FromQuery] BydClockInRecordQueryDto parm) { var response = _BydClockInRecordService.GetList(parm); return SUCCESS(response); } /// /// 查询考勤打卡记录详情 /// /// /// [HttpGet("{Id}")] [ActionPermissionFilter(Permission = "bydclockinrecord:query")] public IActionResult GetBydClockInRecord(string Id) { var response = _BydClockInRecordService.GetInfo(Id); var info = response.Adapt(); return SUCCESS(info); } /// /// 添加考勤打卡记录 /// /// [HttpPost] [ActionPermissionFilter(Permission = "bydclockinrecord:add")] [Log(Title = "考勤打卡记录", BusinessType = BusinessType.INSERT)] public IActionResult AddBydClockInRecord([FromBody] BydClockInRecordDto parm) { var modal = parm.Adapt().ToCreate(HttpContext); var response = _BydClockInRecordService.AddBydClockInRecord(modal); return SUCCESS(response); } /// /// 更新考勤打卡记录 /// /// [HttpPut] [ActionPermissionFilter(Permission = "bydclockinrecord:edit")] [Log(Title = "考勤打卡记录", BusinessType = BusinessType.UPDATE)] public IActionResult UpdateBydClockInRecord([FromBody] BydClockInRecordDto parm) { var modal = parm.Adapt().ToUpdate(HttpContext); var response = _BydClockInRecordService.UpdateBydClockInRecord(modal); return ToResponse(response); } /// /// 删除考勤打卡记录 /// /// [HttpPost("delete/{ids}")] [ActionPermissionFilter(Permission = "bydclockinrecord:delete")] [Log(Title = "考勤打卡记录", BusinessType = BusinessType.DELETE)] public IActionResult DeleteBydClockInRecord([FromRoute]string ids) { var idArr = Tools.SplitAndConvert(ids); return ToResponse(_BydClockInRecordService.Delete(idArr)); } } }