From 2d0c8d06924703c957db688785891cc4b99abf0f Mon Sep 17 00:00:00 2001
From: zjh <2207896513@qq.com>
Date: 星期一, 04 八月 2025 15:34:48 +0800
Subject: [PATCH] 配置文件新增配置,控制携客云切正式\测试环境切换
---
StandardPda/MESApplication/Controllers/QC/LljController.cs | 318 ++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 277 insertions(+), 41 deletions(-)
diff --git a/StandardPda/MESApplication/Controllers/QC/LljController.cs b/StandardPda/MESApplication/Controllers/QC/LljController.cs
index be983b3..d3dcc89 100644
--- a/StandardPda/MESApplication/Controllers/QC/LljController.cs
+++ b/StandardPda/MESApplication/Controllers/QC/LljController.cs
@@ -3,11 +3,12 @@
using MES.Service.service.QC;
using MES.Service.util;
using Microsoft.AspNetCore.Mvc;
-using NetTaste;
+using Microsoft.EntityFrameworkCore.Metadata.Internal;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System.Data;
using System.Dynamic;
+using static System.Runtime.InteropServices.JavaScript.JSType;
namespace MESApplication.Controllers.QC;
@@ -49,7 +50,7 @@
{
dynamic resultInfos = new ExpandoObject();
- string[] msg = new LljService().SetItems(itemNo, quantity, releaseNo);
+ var msg = new LljService().SetItems(itemNo, quantity, releaseNo);
return new ResponseResult
{
@@ -97,10 +98,10 @@
var releaseNo = data["releaseNo"].ToString();
var NewStaffUserID = data["NewStaffUserID"].ToString();
- string[] msg = new LljService().SaveCheckBy(NewStaffUserID, userID, releaseNo);
+ var msg =
+ new LljService().SaveCheckBy(NewStaffUserID, userID, releaseNo);
-
return new ResponseResult
{
status = int.Parse(msg[0]),
@@ -142,20 +143,18 @@
}
/// <summary>
- /// 鑾峰彇涓�鑷存�ф牳瀵归」鐩�
+ /// 鑾峰彇涓�鑷存�ф牳瀵归」鐩�
/// </summary>
/// <param name="data"></param>
/// <returns></returns>
[HttpPost("getYzxItem")]
public ResponseResult getYzxItem([FromBody] JObject data)
{
-
var id = data["id"]?.ToString();
- var releaseNo = data["releaseNo"]?.ToString();
try
{
- var tbBillList =new LljService().getYzxBDlist(id);
-
+ var tbBillList = new LljService().getYzxBDlist(id);
+
return new ResponseResult
{
status = 0,
@@ -170,26 +169,63 @@
}
/// <summary>
- /// 淇濆瓨涓�鑷存�ф牳瀵归」鐩�
+ /// 鑾峰彇妫�楠屽崟鎵�鏈変笉鑹弿杩�
+ /// </summary>
+ /// <param name="data"></param>
+ /// <returns></returns>
+ [HttpPost("getJYBlmsItem")]
+ public ResponseResult getJYBlmsItem([FromBody] JObject data)
+ {
+ var id = data["id"]?.ToString();
+
+ try
+ {
+ var tbBillList = new LljService().getBlmsItem(id);
+
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = tbBillList
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+
+ /// <summary>
+ /// 淇濆瓨涓�鑷存�ф牳瀵归」鐩�
/// </summary>
/// <param name="data"></param>
/// <returns></returns>
[HttpPost("saveYzxItem")]
public ResponseResult saveYzxItem([FromBody] JObject data)
{
-
var id = data["id"]?.ToString();
var dataDt = data["data"]?.ToString();
- DataTable dt = JsonConvert.DeserializeObject<DataTable>(dataDt);
+ var dt = JsonConvert.DeserializeObject<DataTable>(dataDt);
try
{
+ if (!dt.Columns.Contains("id"))
+ {
+ return new ResponseResult
+ {
+ status = 1,
+ message = "璇峰厛閫夋嫨鏁版嵁鍐嶄繚瀛橈紒",
+ data = "璇峰厛閫夋嫨鏁版嵁鍐嶄繚瀛橈紒"
+ };
+ }
new LljService().saveYzxBDlist(id, dt);
+ var msg = new LljService().YzxImgVerify(id);
return new ResponseResult
{
- status = 0,
- message = "OK",
- data = "ok"
+ status = int.Parse(msg[0]),
+ message = msg[1],
+ data = ""
};
}
catch (Exception ex)
@@ -199,14 +235,13 @@
}
/// <summary>
- /// 鑾峰彇鎵�鏈夋楠屽憳淇℃伅
+ /// 鑾峰彇鎵�鏈夋楠屽憳淇℃伅
/// </summary>
/// <param name="data"></param>
/// <returns></returns>
[HttpPost("getAllInspectors")]
public ResponseResult getAllInspectors([FromBody] JObject data)
{
-
try
{
var tbBillList = new LljService().getAllInspectors();
@@ -251,7 +286,7 @@
/// <summary>
- /// 閫氳繃鏉$爜鑾峰彇閫佹鍗曚俊鎭�
+ /// 閫氳繃鏉$爜鑾峰彇閫佹鍗曚俊鎭�
/// </summary>
/// <param name="data"></param>
/// <returns></returns>
@@ -266,12 +301,40 @@
var tbBillList =
new LljService().getFromInfo(id);
resultInfos.tbBillList = tbBillList;
- return new ResponseResult
+ if (resultInfos.tbBillList.Rows.Count>0)
{
- status = 0,
- message = "OK",
- data = resultInfos
- };
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ else
+ {
+ var mj =
+ new LljService().getFromMJCount(id);
+ if (mj>0)
+ {
+ return new ResponseResult
+ {
+ status = 1,
+ message = "璇ョ墿鏂欎负鍏嶆鐗╂枡锛屾棤闇�妫�楠岋紒",
+ data = resultInfos
+ };
+ }
+ else
+ {
+ return new ResponseResult
+ {
+ status = 1,
+ message = "鎵句笉鍒版楠屽崟鎹紝璇风‘璁よ揣鐗╂槸鍚︾鏀讹紒",
+ data = resultInfos
+ };
+ }
+
+ }
+
}
catch (Exception ex)
{
@@ -279,6 +342,34 @@
}
}
+
+ /// <summary>
+ /// 鑾峰彇涓嶈壇鎻忚堪淇℃伅
+ /// </summary>
+ /// <param name="data"></param>
+ /// <returns></returns>
+ [HttpPost("getBlmsItem")]
+ public ResponseResult getBlmsItem([FromBody] JObject data)
+ {
+ try
+ {
+ var tbBillList = new LljService().getBlmsItem();
+ string[] arrRate = tbBillList.AsEnumerable()
+ .Select(d => d.Field<string>("DEFECT_NAME")).ToArray();
+
+
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = arrRate
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
[HttpPost("SetQSItemDetail")]
@@ -405,7 +496,7 @@
{
dynamic resultInfos = new ExpandoObject();
var msg = new LljService().IqcQaSubmit(rkjDto);
-
+
return new ResponseResult
{
status = int.Parse(msg[0]),
@@ -418,6 +509,7 @@
return ResponseResult.ResponseError(ex);
}
}
+
//IqcQaSubmit
[HttpPost("getImgBDlist")]
public ResponseResult getImgBDlist([FromBody] JObject data)
@@ -425,7 +517,7 @@
try
{
var id = data["id"]?.ToString();
-
+
var db = new LljService().getImgBDlist(id);
return new ResponseResult
@@ -442,12 +534,13 @@
}
/// <summary>
- /// 鑾峰彇U9鍥剧焊鏁版嵁
+ /// 鑾峰彇U9鍥剧焊鏁版嵁
/// </summary>
/// <param name="data"></param>
/// <returns></returns>
[HttpPost("GetFileUrlByU9List")]
- public async Task<ResponseResult> GetFileUrlByU9List([FromBody] JObject data)
+ public async Task<ResponseResult> GetFileUrlByU9List(
+ [FromBody] JObject data)
{
try
{
@@ -457,32 +550,28 @@
var lljService = new LljService();
var tbBillList = await lljService.GetFileUrlByU9List(type, itemID);
if (tbBillList != null)
- {
return new ResponseResult
{
status = 0,
message = "OK",
data = tbBillList
};
- }
- else
- {
- return new ResponseResult
- {
- status = 0,
- message = "OK",
- data = ""
- };
- }
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = ""
+ };
}
catch (Exception ex)
{
return ResponseResult.ResponseError(ex);
}
}
+
/// <summary>
- /// 瀹為獙瀹ら�佹鏁版嵁淇濆瓨
+ /// 瀹為獙瀹ら�佹鏁版嵁淇濆瓨
/// </summary>
/// <param name="sysSubmit">瀹為獙瀹ら�佹鏁版嵁</param>
/// <returns></returns>
@@ -491,8 +580,7 @@
{
try
{
-
- string[] msg = new LljService().SaveSysSubmit(sysSubmit);
+ var msg = new LljService().SaveSysSubmit(sysSubmit);
return new ResponseResult
{
@@ -506,4 +594,152 @@
return ResponseResult.ResponseError(ex);
}
}
+
+ /// <summary>
+ /// 閫佽揣鍗曠鏀跺苟鐢熸垚鍒拌揣鍗�
+ /// </summary>
+ /// <param name="id"></param>
+ /// <returns></returns>
+ [HttpPost("SignDelivery")]
+ public async Task<ResponseResult> SignDelivery(string id)
+ {
+ try
+ {
+ //string[] msg = new LljService().SaveSysSubmit(sysSubmit);
+ var msg = await new LljService().SignDelivery(id);
+ return new ResponseResult
+ {
+ status = int.Parse(msg[0]),
+ message = msg[1],
+ data = msg[1]
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+ /// <summary>
+ /// 閫佽揣鍗曠鏀跺苟鐢熸垚鍒拌揣鍗�
+ /// </summary>
+ /// <param name="id"></param>
+ /// <returns></returns>
+ [HttpPost("SignDelivery2")]
+ public async Task<ResponseResult> SignDelivery2(string id,string c_user)
+ {
+ try
+ {
+ //string[] msg = new LljService().SaveSysSubmit(sysSubmit);
+ var msg = await new LljService().SignDelivery2(id, c_user);
+ return new ResponseResult
+ {
+ status = int.Parse(msg[0]),
+ message = msg[1],
+ data = msg[1]
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+ /// <summary>
+ /// 鑾峰彇鎼哄浜戞祴璇曠幆澧冪鍚�
+ /// </summary>
+ /// <param name="id"></param>
+ /// <returns></returns>
+ [HttpGet("getTestXKYSign")]
+ public async Task<ResponseResult> getTestXKYSign()
+ {
+ try
+ {
+ //string[] msg = new LljService().SaveSysSubmit(sysSubmit);
+ var msg = await new LljService().getTestXKYSign();
+ return new ResponseResult
+ {
+ status = int.Parse(msg[0]),
+ message = "OK",
+ data = msg[1]
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+ /// <summary>
+ /// 鎼哄浜戞敼鍠勬姤鍛婃柊澧�
+ /// </summary>
+ /// <param name="id"></param>
+ /// <returns></returns>
+ [HttpPost("SaveXkyImproveReport")]
+ public async Task<ResponseResult> SaveXkyImproveReport(string id)
+ {
+ try
+ {
+ var msg = await new LljService().SaveXkyImproveReport(id);
+
+ return new ResponseResult
+ {
+ status = int.Parse(msg[0]),
+ message = msg[1],
+ data = msg[1]
+ };
+
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+ /// <summary>
+ /// 鎼哄浜戞敼鍠勬姤鍛婂鏍�
+ /// </summary>
+ /// <param name="id"></param>
+ /// <returns></returns>
+ [HttpPost("AuditXkyImproveReport")]
+ public async Task<ResponseResult> AuditXkyImproveReport(string id)
+ {
+ try
+ {
+ //string[] msg = new LljService().SaveSysSubmit(sysSubmit);
+ var msg = await new LljService().AuditXkyImproveReport(id);
+ return new ResponseResult
+ {
+ status = int.Parse(msg[0]),
+ message = msg[1],
+ data = msg[1]
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
+ /// <summary>
+ /// 鎵归噺鍒锋柊鏀瑰杽鎶ュ憡渚涘簲鍟嗘湭鍥炲鍗曟嵁
+ /// </summary>
+ /// <param name="id"></param>
+ /// <returns></returns>
+ [HttpPost("FlushedXkyImproveReport")]
+ public async Task<ResponseResult> FlushedXkyImproveReport(string id="")
+ {
+ try
+ {
+ //string[] msg = new LljService().SaveSysSubmit(sysSubmit);
+ var msg = await new LljService().FlushedXkyImproveReport(id);
+ return new ResponseResult
+ {
+ status = int.Parse(msg[0]),
+ message = msg[1],
+ data = msg[1]
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
}
\ No newline at end of file
--
Gitblit v1.9.3