From 76cdb99e924eebdd5025584c103fa9bfdf0adecc Mon Sep 17 00:00:00 2001
From: zjh <2207896513@qq.com>
Date: 星期一, 12 五月 2025 19:14:11 +0800
Subject: [PATCH] 获取所有检验单图片接口上传
---
StandardPda/MESApplication/Controllers/QC/LljController.cs | 29 ++++++++++++++
StandardPda/MES.Service/service/QC/BaseService.cs | 14 +++++++
StandardPda/MES.Service/service/QC/LljService.cs | 11 +++++
StandardPda/MESApplication/Controllers/QC/BaseController.cs | 30 +++++++++++++++
4 files changed, 84 insertions(+), 0 deletions(-)
diff --git a/StandardPda/MES.Service/service/QC/BaseService.cs b/StandardPda/MES.Service/service/QC/BaseService.cs
index 4c9af3a..7e4abef 100644
--- a/StandardPda/MES.Service/service/QC/BaseService.cs
+++ b/StandardPda/MES.Service/service/QC/BaseService.cs
@@ -1,5 +1,6 @@
锘縰sing MES.Service.DB;
using MES.Service.Modes;
+using SqlSugar;
namespace MES.Service.service.QC;
@@ -50,4 +51,17 @@
});
return mesQsImages;
}
+ public List<MesQsImage> getLljAllImgByFid(string id, string qsType)
+ {
+ var db = SqlSugarHelper.GetInstance();
+ var mesQsImages = db.Queryable<MesQsImage,MesQaItemsDetectDetail5>((a,b)=>
+ new JoinQueryInfos(JoinType.Left,a.Fid==b.Id))
+ .Where((a,b)=> b.ReleaseNo == id && a.Id != null).ToList();
+ mesQsImages.ForEach(s =>
+ {
+ if (s.ImageData is { Length: > 0 })
+ s.base64Date = Convert.ToBase64String(s.ImageData);
+ });
+ return mesQsImages;
+ }
}
\ No newline at end of file
diff --git a/StandardPda/MES.Service/service/QC/LljService.cs b/StandardPda/MES.Service/service/QC/LljService.cs
index 2659e0b..9689a68 100644
--- a/StandardPda/MES.Service/service/QC/LljService.cs
+++ b/StandardPda/MES.Service/service/QC/LljService.cs
@@ -762,6 +762,17 @@
}
return Components;
}
+
+ public DataTable getBlmsItem()
+ {
+ OracleSQLHelper SQLHelper = new();
+ //鏌ヤ笉鑹弿杩�
+ var sql1 = string.Format(@"select DEFECT_NAME
+ from MES_DEFECT_CODE A
+ left join MES_DEFECT_TYPE X ON X.TYPE_NO = A.DEFECT_SORT AND X.COMPANY = A.COMPANY AND X.FACTORY = A.FACTORY");
+
+ return SQLHelper.ExecuteQuery(sql1);
+ }
public void saveYzxBDlist(string id,DataTable DB)
{
OracleSQLHelper SQLHelper = new();
diff --git a/StandardPda/MESApplication/Controllers/QC/BaseController.cs b/StandardPda/MESApplication/Controllers/QC/BaseController.cs
index 926f2db..bfd4538 100644
--- a/StandardPda/MESApplication/Controllers/QC/BaseController.cs
+++ b/StandardPda/MESApplication/Controllers/QC/BaseController.cs
@@ -81,4 +81,34 @@
return ResponseResult.ResponseError(ex);
}
}
+
+ /// <summary>
+ /// 鑾峰彇鏉ユ枡妫�鍗曚釜妫�楠屽崟涓婁紶鐨勬墍鏈夊浘鐗�
+ /// </summary>
+ /// <param name="data"></param>
+ /// <returns></returns>
+ [HttpPost("getLljAllImgByFid")]
+ public ResponseResult getLljAllImgByFid([FromBody] JObject data)
+ {
+ var id = data["id"].ToString();
+ var qsType = data["qsType"].ToString();
+ try
+ {
+ dynamic resultInfos = new ExpandoObject();
+ var tbBillList =
+ new BaseService().getLljAllImgByFid(id, qsType);
+ resultInfos.tbBillList = tbBillList;
+ return new ResponseResult
+ {
+ status = 0,
+ message = "OK",
+ data = resultInfos
+ };
+ }
+ catch (Exception ex)
+ {
+ return ResponseResult.ResponseError(ex);
+ }
+ }
+
}
\ No newline at end of file
diff --git a/StandardPda/MESApplication/Controllers/QC/LljController.cs b/StandardPda/MESApplication/Controllers/QC/LljController.cs
index be983b3..ba87f37 100644
--- a/StandardPda/MESApplication/Controllers/QC/LljController.cs
+++ b/StandardPda/MESApplication/Controllers/QC/LljController.cs
@@ -280,6 +280,35 @@
}
+ /// <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")]
public ResponseResult SetQSItemDetail(
--
Gitblit v1.9.3