From 7a783a92137f59a02041d71dcdc8bca7e5a3a0b4 Mon Sep 17 00:00:00 2001
From: zyf <1071160500@qq.com>
Date: 星期四, 30 十月 2025 12:11:12 +0800
Subject: [PATCH] 优化首检巡检生成检验
---
MESApplication/Controllers/QC/SJController.cs | 85 ++++++++++++++++++++++++++++++++++++++++++
1 files changed, 84 insertions(+), 1 deletions(-)
diff --git a/MESApplication/Controllers/QC/SJController.cs b/MESApplication/Controllers/QC/SJController.cs
index 36f3636..3a95d9e 100644
--- a/MESApplication/Controllers/QC/SJController.cs
+++ b/MESApplication/Controllers/QC/SJController.cs
@@ -8,6 +8,7 @@
using MES.Service.util;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json.Linq;
+using SqlSugar.Extensions;
namespace MESApplication.Controllers.QC;
@@ -61,16 +62,18 @@
}
+
//SetQSItems
[HttpPost("SetQSItems")]
public ResponseResult SetQSItems([FromBody] JObject data)
{
var itemNo = data["itemNo"].ToString();
+ var planName = data["planName"].ToString();
try
{
dynamic resultInfos = new ExpandoObject();
var tbBillList = new SJService();
- var detail021 = tbBillList.SetQSItems(itemNo);
+ var detail021 = tbBillList.SetQSItems(itemNo, planName);
resultInfos.tbBillList = detail021;
return new ResponseResult
{
@@ -85,6 +88,86 @@
}
}
+ [HttpPost("SavePlan")]
+ public ResponseResult SavePlan([FromBody] JObject data)
+ {
+ decimal pid = Convert.ToDecimal(data["pid"]);
+ string planName = data["planName"].ToString();
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ var SJ = new SJService();
+ decimal res = SJ.SavePlan(pid, planName);
+ resultInfos.res = res;
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+ [HttpPost("GetItemProj")]
+ public ResponseResult GetItemProj([FromBody] JObject data)
+ {
+ var itemNo = data["itemNo"]?.ToString();
+
+ try
+ {
+ var service = new SJService();
+ var qaPlans = service.GetItemProj(itemNo);
+
+ dynamic resultInfos = new ExpandoObject();
+ resultInfos.qaPlans = qaPlans; // 杩斿洖鍒板墠绔�
+
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+ [HttpPost("CreateNew")]
+ public ResponseResult CreateNew([FromBody] JObject data)
+ {
+ var daaNo = data["daaNo"]?.ToString();
+ var userNo = data["statusUser"]?.ToString();
+ var planName = data["planName"]?.ToString();
+
+ try
+ {
+ var service = new SJService();
+ var (res, msg, billNo) = service.CreateNew(daaNo, userNo,planName);
+
+ dynamic resultInfos = new ExpandoObject();
+ resultInfos.res = res;
+ resultInfos.msg = msg;
+ resultInfos.billNo = billNo;// 杩斿洖鍒板墠绔�
+
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
[HttpPost("Save")]
public ResponseResult Save([FromBody] QsItem item)
{
--
Gitblit v1.9.3