kyy
2025-07-14 fbbb2e3801dc7a1073d555278f92353d5c14ab86
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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);
            }
        }
        
    }
}