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 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;
|
|
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);
|
}
|
}
|
|
}
|
}
|