From f8187896eeafc43457b81f4d08a1f0821bf51f1c Mon Sep 17 00:00:00 2001 From: zjh <2207896513@qq.com> Date: 星期六, 26 四月 2025 16:32:54 +0800 Subject: [PATCH] 代码提交 --- StandardPda/MESApplication/Controllers/QC/LljController.cs | 31 +++++++++++++++ StandardPda/MES.Service/service/QC/LljService.cs | 11 +++++ StandardPda/MESApplication/Controllers/Base/LoginController.cs | 45 ++++++++++++++++++++++ 3 files changed, 86 insertions(+), 1 deletions(-) diff --git a/StandardPda/MES.Service/service/QC/LljService.cs b/StandardPda/MES.Service/service/QC/LljService.cs index 8972618..edeabfd 100644 --- a/StandardPda/MES.Service/service/QC/LljService.cs +++ b/StandardPda/MES.Service/service/QC/LljService.cs @@ -687,6 +687,17 @@ return rkjDto; } + + public DataTable getFromInfo(string BarCode) + { + OracleSQLHelper SQLHelper = new(); + var sql = string.Format(@"select b.ID,b.LOT_NO,b.RELEASE_NO,b.FSUBMIT from MES_INV_ITEM_BARCODES A + left join MES_QA_ITEMS_DETECT_01 B on A.BILL_NO=b.LOT_NO and A.ITEM_ID=b.ITEM_ID + where ITEM_BARCODE='"+ BarCode + "'"); + return SQLHelper.ExecuteQuery(sql); + } + + public int UpdateQSItemDetail(MesQaItemsDetectDetail12 detail) { var withOracle = SqlSugarHelper.UseTransactionWithOracle(db => diff --git a/StandardPda/MESApplication/Controllers/Base/LoginController.cs b/StandardPda/MESApplication/Controllers/Base/LoginController.cs index 093741e..04794f5 100644 --- a/StandardPda/MESApplication/Controllers/Base/LoginController.cs +++ b/StandardPda/MESApplication/Controllers/Base/LoginController.cs @@ -1,9 +1,14 @@ -锘縰sing MES.Service.Dto.@base; +锘縰sing Masuit.Tools; +using Masuit.Tools.Database; +using MES.Service.Dto.@base; using MES.Service.service; using MES.Service.util; using Microsoft.AspNetCore.Mvc; +using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System.Dynamic; +using static MES.Service.service.QC.LljService; +using Newtonsoft.Json; namespace MESApplication.Controllers.Base; @@ -105,4 +110,42 @@ return ResponseResult.ResponseError(ex); } } + public class Root + { + public string version { get; set; } + + public string apkUrl { get; set; } + } + + /// <summary> + /// 鑾峰彇App鏈�鏂扮増鏈俊鎭� + /// </summary> + /// <param name="data"></param> + /// <returns></returns> + [HttpPost("getAppUpgradeInfo")] + public async Task<ResponseResult> getAppUpgradeInfo() + { + + try + { + HttpClient client = new(); + var requestUrl = $"http://192.168.1.104:8081/UpgradeInformation.json"; + var response = await client.GetAsync(requestUrl); + response.EnsureSuccessStatusCode(); // 妫�鏌TTP鐘舵�佺爜 + var responseContent = await response.Content.ReadAsStringAsync(); + var a= JsonConvert.DeserializeObject<Root>(responseContent); + return new ResponseResult + { + status = 0, + message = "OK", + data = a + }; + + } + catch (Exception ex) + { + return null; + } + } + } \ No newline at end of file diff --git a/StandardPda/MESApplication/Controllers/QC/LljController.cs b/StandardPda/MESApplication/Controllers/QC/LljController.cs index 19f3217..7f9a583 100644 --- a/StandardPda/MESApplication/Controllers/QC/LljController.cs +++ b/StandardPda/MESApplication/Controllers/QC/LljController.cs @@ -190,6 +190,37 @@ } + /// <summary> + /// 閫氳繃鏉$爜鑾峰彇閫佹鍗曚俊鎭� + /// </summary> + /// <param name="data"></param> + /// <returns></returns> + [HttpPost("getFromInfo")] + public ResponseResult getFromInfo([FromBody] JObject data) + { + var id = data["Barcode"]?.ToString(); + + try + { + dynamic resultInfos = new ExpandoObject(); + var tbBillList = + new LljService().getFromInfo(id); + resultInfos.tbBillList = tbBillList; + return new ResponseResult + { + status = 0, + message = "OK", + data = resultInfos + }; + } + catch (Exception ex) + { + return ResponseResult.ResponseError(ex); + } + } + + + [HttpPost("SetQSItemDetail")] public ResponseResult SetQSItemDetail( [FromBody] MesQaItemsDetectDetail12 detail) -- Gitblit v1.9.3