| | |
| | | using Microsoft.AspNetCore.Mvc; |
| | | using Microsoft.Extensions.Logging; |
| | | using SqlSugar; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Threading.Tasks; |
| | | using System.Dynamic; |
| | | using System.Dynamic; |
| | | using MES.Service.Dto.service; |
| | | using MES.Service.Modes; |
| | | using MES.Service.service; |
| | | using MES.Service.service.QC; |
| | | using MES.Service.service.SpotCheck; |
| | | using MES.Service.util; |
| | | using Newtonsoft.Json.Linq; |
| | | using Microsoft.AspNetCore.Mvc; |
| | | |
| | | namespace MESApplication.Controllers.SpotCheck |
| | | namespace MESApplication.Controllers.SpotCheck; |
| | | |
| | | [ApiController] |
| | | [Route("api/[controller]")] |
| | | public class MesEqMaintainController : ControllerBase |
| | | { |
| | | [ApiController] |
| | | [Route("api/[controller]")] |
| | | public class MesEqMaintainController : ControllerBase |
| | | [HttpPost("getDjDetail")] |
| | | public ResponseResult getDjDetail([FromBody] DJPageResultDto queryObj) |
| | | { |
| | | |
| | | [HttpPost("getDjDetail")] |
| | | public ResponseResult getDjDetail([FromBody] DJPageResultDto queryObj) |
| | | // var releaseNo = data["releaseNo"].ToString(); |
| | | try |
| | | { |
| | | // var releaseNo = data["releaseNo"].ToString(); |
| | | try |
| | | dynamic resultInfos = new ExpandoObject(); |
| | | var tbBillList = |
| | | new SpotCheckService().GetDjDetail(queryObj); |
| | | resultInfos.tbBillList = tbBillList; |
| | | return new ResponseResult |
| | | { |
| | | 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); |
| | | } |
| | | status = 0, |
| | | message = "OK", |
| | | data = resultInfos |
| | | }; |
| | | } |
| | | |
| | | |
| | | // 之前的 UpDateDjDetail 方法 |
| | | [HttpPost("UpDateDjDetail")] |
| | | public ResponseResult UpDateDjDetail([FromBody] DJPageResultDto updateObj) |
| | | catch (Exception ex) |
| | | { |
| | | 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); |
| | | } |
| | | 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); |
| | | } |
| | | } |
| | | } |