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/XJController.cs | 175 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 168 insertions(+), 7 deletions(-)
diff --git a/MESApplication/Controllers/QC/XJController.cs b/MESApplication/Controllers/QC/XJController.cs
index e43cb9f..03616a0 100644
--- a/MESApplication/Controllers/QC/XJController.cs
+++ b/MESApplication/Controllers/QC/XJController.cs
@@ -82,7 +82,9 @@
}
- //getDaa001
+ /// <summary>
+ /// 鑾峰彇宸ュ崟
+ /// </summary>
[HttpPost("getDaa001")]
public ResponseResult getDaa001([FromBody] JObject data)
{
@@ -107,7 +109,10 @@
}
}
- //getBoardItem
+ /// <summary>
+ /// 鏍规嵁浜х嚎鑾峰彇鐗╂枡缂栫爜 lineNo
+ /// </summary>
+ /// <returns></returns>
[HttpPost("getBoardItem")]
public ResponseResult getBoardItem([FromBody] JObject data)
{
@@ -160,11 +165,12 @@
public ResponseResult setJYItem([FromBody] JObject data)
{
var itemNo = data["itemNo"].ToString();
+ var planName = data["planName"].ToString();
try
{
dynamic resultInfos = new ExpandoObject();
var tbBillList =
- new XJService().setJYItem(itemNo);
+ new XJService().setJYItem(itemNo, planName);
resultInfos.tbBillList = tbBillList;
return new ResponseResult
{
@@ -189,6 +195,30 @@
var tbBillList =
new XJService().save(xjDto);
resultInfos.tbBillList = tbBillList;
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+ [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 XJ = new XJService();
+ decimal res = XJ.SavePlan(pid, planName);
+ resultInfos.res = res;
return new ResponseResult
{
status = 0,
@@ -231,14 +261,14 @@
try
{
dynamic resultInfos = new ExpandoObject();
- var tbBillList =
- new XJService().getPage(queryObj);
- resultInfos.tbBillList = tbBillList;
+ var (items, totalCount) = new XJService().getPage(queryObj);
+ resultInfos.tbBillList = items;
return new ResponseResult
{
status = 0,
message = "OK",
- data = resultInfos
+ data = resultInfos,
+ TotalCount = totalCount
};
}
catch (Exception ex)
@@ -414,6 +444,29 @@
return ResponseResult.ResponseError(ex);
}
}
+
+ //saveNotesPid 淇敼鏁存敼鎺柦
+ [HttpPost("saveNotesPid")]
+ public ResponseResult saveNotesPid([FromBody] XJDto rkjDto)
+ {
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ var tbBillList =
+ new XJService().saveNotesPid(rkjDto);
+ resultInfos.tbBillList = tbBillList;
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
//saveRemarksById
[HttpPost("saveRemarksById")]
@@ -437,4 +490,112 @@
return ResponseResult.ResponseError(ex);
}
}
+
+ [HttpPost("XJQaSubmit")]
+ public ResponseResult XJQaSubmit(LLJDto rkjDto)
+ {
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ var tbBillList =
+ new XJService().XJQaSubmit(rkjDto);
+ resultInfos.tbBillList = tbBillList;
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+ /// <summary>
+ /// 鑾峰彇琛屼笉鑹師鍥�
+ /// </summary>
+ /// <param name="data"></param>
+ /// <returns></returns>
+ [HttpPost("GetReason")]
+ public ResponseResult GetReason([FromBody] JObject data)
+ {
+ string billNo = data["billNo"].ToString();
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ var tbBillList = new XJService();
+ var reasons = tbBillList.GetReason(billNo);
+ resultInfos.tbBillList = reasons;
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = reasons
+ };
+ }
+ 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 XJService();
+ 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("GetItemProj")]
+ public ResponseResult GetItemProj([FromBody] JObject data)
+ {
+ var itemNo = data["itemNo"]?.ToString();
+
+ try
+ {
+ var service = new XJService();
+ 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);
+ }
+ }
}
\ No newline at end of file
--
Gitblit v1.9.3