From ded234fb90ed5f25a71cff7179df7232d5758800 Mon Sep 17 00:00:00 2001 From: zjh <2207896513@qq.com> Date: 星期一, 24 三月 2025 09:14:40 +0800 Subject: [PATCH] 1代码整理 2移动端来料检添加项目字段,并能根据此字段搜索 3来料检明细添加‘获取检验项目’按钮,实现在移动端重新获取检验项目 --- StandardPda/MESApplication/Controllers/QC/LljController.cs | 56 +++++++++++++++++++++++++++++++++----------------------- 1 files changed, 33 insertions(+), 23 deletions(-) diff --git a/StandardPda/MESApplication/Controllers/QC/LljController.cs b/StandardPda/MESApplication/Controllers/QC/LljController.cs index f4c58c0..5e1b71e 100644 --- a/StandardPda/MESApplication/Controllers/QC/LljController.cs +++ b/StandardPda/MESApplication/Controllers/QC/LljController.cs @@ -1,10 +1,10 @@ -锘縰sing System.Dynamic; -using MES.Service.Dto.service; +锘縰sing MES.Service.Dto.service; using MES.Service.Modes; using MES.Service.service.QC; using MES.Service.util; using Microsoft.AspNetCore.Mvc; using Newtonsoft.Json.Linq; +using System.Dynamic; namespace MESApplication.Controllers.QC; @@ -45,14 +45,14 @@ try { dynamic resultInfos = new ExpandoObject(); - var tbBillList = - new LljService().SetItems(itemNo, quantity, releaseNo); - resultInfos.tbBillList = tbBillList; + + string[] msg= new LljService().SetItems(itemNo, quantity, releaseNo); + return new ResponseResult { - status = 0, - message = "OK", - data = resultInfos + status = int.Parse(msg[0]), + message = msg[1], + data = msg[1] }; } catch (Exception ex) @@ -273,27 +273,37 @@ return ResponseResult.ResponseError(ex); } } + //IqcQaSubmit [HttpPost("GetFileUrlByU9List")] - public ResponseResult GetFileUrlByU9List(LLJDto rkjDto) + public async Task<ResponseResult> GetFileUrlByU9List([FromBody] JObject data) { try { - //dynamic resultInfos = new ExpandoObject(); - //var tbBillList = - // new LljService().IqcQaSubmit(rkjDto); - //resultInfos.tbBillList = tbBillList; - string[] fileUrls = - { - "https://new-service.oss-cn-hangzhou.aliyuncs.com/sheet-attachment/1728624575152_ty5VSi9R.png", - "https://new-service.oss-cn-hangzhou.aliyuncs.com/sheet-attachment/1728624610583_EwIN55BL.pdf" -}; - return new ResponseResult + var type = data["type"]?.ToString(); + var itemID = data["u9No"]?.ToString(); + dynamic resultInfos = new ExpandoObject(); + var lljService = new LljService(); + var tbBillList = await lljService.GetFileUrlByU9List(type, itemID); + if (tbBillList != null) { - status = 0, - message = "OK", - data = fileUrls - }; + return new ResponseResult + { + status = 0, + message = "OK", + data = tbBillList + }; + } + else + { + return new ResponseResult + { + status = 0, + message = "OK", + data = "" + }; + } + } catch (Exception ex) { -- Gitblit v1.9.3