using System.Dynamic; using MES.Service.Dto.service; using MES.Service.service.SpotCheck; using MES.Service.util; using Microsoft.AspNetCore.Mvc; namespace MESApplication.Controllers.SpotCheck; [ApiController] [Route("api/[controller]")] public class MesEqMaintainController : ControllerBase { [HttpPost("getDjDetail")] public ResponseResult getDjDetail([FromBody] DJPageResultDto queryObj) { // var releaseNo = data["releaseNo"].ToString(); try { dynamic resultInfos = new ExpandoObject(); var tbBillList = new SpotCheckService().GetDjDetail(queryObj); resultInfos.tbBillList = tbBillList; return new ResponseResult { status = 0, message = "OK", data = resultInfos }; } catch (Exception ex) { return ResponseResult.ResponseError(ex); } } // 之前的 UpDateDjDetail 方法 [HttpPost("UpDateDjDetail")] public ResponseResult UpDateDjDetail([FromBody] DJPageResultDto updateObj) { try { dynamic resultInfos = new ExpandoObject(); // 调用 SpotCheckService 中的 UpdateDjDetail 方法进行更新操作 var updateResult = new SpotCheckService().UpdateDjDetail(updateObj); resultInfos.updateResult = updateResult; return new ResponseResult { status = 0, message = "OK", data = resultInfos }; } catch (Exception ex) { return ResponseResult.ResponseError(ex); } } }