From d7f491034ae9694741178f17f809143f48470520 Mon Sep 17 00:00:00 2001
From: zyf <1071160500@qq.com>
Date: 星期四, 27 十一月 2025 13:12:19 +0800
Subject: [PATCH] 钉钉人员接口、检验撤回单据、首检保存备注
---
MESApplication/Controllers/QC/XJController.cs | 201 +++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 191 insertions(+), 10 deletions(-)
diff --git a/MESApplication/Controllers/QC/XJController.cs b/MESApplication/Controllers/QC/XJController.cs
index ef25d6b..9830512 100644
--- a/MESApplication/Controllers/QC/XJController.cs
+++ b/MESApplication/Controllers/QC/XJController.cs
@@ -60,13 +60,14 @@
//getLine
[HttpPost("getLineAll")]
- public ResponseResult getLineAll()
+ public ResponseResult getLineAll([FromBody] JObject data)
{
try
{
+ string UserNo = data["userNo"]?.ToString();
dynamic resultInfos = new ExpandoObject();
var tbBillList =
- new XJService().getLineAll();
+ new XJService().getLineAll(UserNo);
resultInfos.tbBillList = tbBillList;
return new ResponseResult
{
@@ -88,13 +89,13 @@
[HttpPost("getDaa001")]
public ResponseResult getDaa001([FromBody] JObject data)
{
- var daa020 = data["daa020"].ToString();
- var item = data["item"].ToString();
+ //var daa020 = data["daa020"].ToString();
+ //var item = data["item"].ToString();
try
{
dynamic resultInfos = new ExpandoObject();
var tbBillList =
- new XJService().getDaa001(daa020, item);
+ new XJService().getDaa001(data);
resultInfos.tbBillList = tbBillList;
return new ResponseResult
{
@@ -165,11 +166,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
{
@@ -194,6 +196,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,
@@ -236,14 +262,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)
@@ -419,6 +445,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")]
@@ -442,4 +491,136 @@
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>
+ [HttpPost("XJReSubmit")]
+ public ResponseResult XJReSubmit(LLJDto rkjDto)
+ {
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ var res =
+ new XJService().XJReSubmit(rkjDto);
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = res
+ };
+ }
+ 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