From 8b67ee8a1b3e954de07014724f94875815c2783a Mon Sep 17 00:00:00 2001 From: cnf <3200815559@qq.com> Date: 星期二, 25 三月 2025 18:12:22 +0800 Subject: [PATCH] 111 --- MESApplication/Controllers/BasicData/SentLaboratoryTestingItemsControllor.cs | 74 ++++++++++++++++++++++++++++++++++++ 1 files changed, 73 insertions(+), 1 deletions(-) diff --git a/MESApplication/Controllers/BasicData/SentLaboratoryTestingItemsControllor.cs b/MESApplication/Controllers/BasicData/SentLaboratoryTestingItemsControllor.cs index ec6835e..6e3aed9 100644 --- a/MESApplication/Controllers/BasicData/SentLaboratoryTestingItemsControllor.cs +++ b/MESApplication/Controllers/BasicData/SentLaboratoryTestingItemsControllor.cs @@ -1,11 +1,16 @@ -锘縰sing System.Dynamic; +锘縰sing System.Diagnostics; +using System.Dynamic; using MES.Service.Dto.webApi; using MES.Service.Modes; +using MES.Service.Modes.QcIssueResult; +using MES.Service.Modes.SentLaboratory; using MES.Service.service; using MES.Service.service.BasicData; +using MES.Service.service.SentLaboratory; using MES.Service.util; using Microsoft.AspNetCore.Mvc; using Newtonsoft.Json; +using Newtonsoft.Json.Linq; namespace MESApplication.Controllers.BasicData; @@ -15,6 +20,7 @@ { private readonly MessageCenterManager _manager = new(); private readonly SentLaboratoryTestingItemsManager m = new(); + private readonly SaveLaboratoryManager n = new(); private readonly string METHOD = "POST"; @@ -33,6 +39,8 @@ { dynamic resultInfos = new ExpandoObject(); resultInfos.tbBillList = m.GetList(); + resultInfos.ReleaseNo = m.GetBillCode("1000", "1000", "SJDH"); + return new ResponseResult { status = 0, @@ -45,4 +53,68 @@ return ResponseResult.ResponseError(ex); } } + + [HttpPost("GetLaboratoryList")] + public ResponseResult GetLaboratoryList() + { + try + { + dynamic resultInfos = new ExpandoObject(); + resultInfos.tbBillList = n.GetList(); + + return new ResponseResult + { + status = 0, + message = "OK", + data = resultInfos + }; + } + catch (Exception ex) + { + return ResponseResult.ResponseError(ex); + } + } + + [HttpPost("SaveLaboratoryDetails")] + public IActionResult SaveLaboratoryDetails([FromBody] GetLaboratoryDetails getLaboratoryDetails) + { + + try + { + + var result = n.Save(getLaboratoryDetails); + + string getLaboratoryDetailsJson = JsonConvert.SerializeObject(getLaboratoryDetails, Formatting.Indented); + Debug.WriteLine("getLaboratoryDetails: " + getLaboratoryDetailsJson); + + + //return Ok(result); + return Ok(result); + } + catch (Exception ex) + { + // 鎹曡幏寮傚父骞惰繑鍥為敊璇俊鎭� + return StatusCode(500, $"{ex.Message}"); + } + } + + [HttpPost("DeleteLaboratoryDetails")] + public IActionResult DeleteLaboratoryDetails(string JYDH) + { + try + { + + var result = n.DeleteLaboratory(JYDH); + + + //return Ok(result); + return Ok(result); + } + catch (Exception ex) + { + // 鎹曡幏寮傚父骞惰繑鍥為敊璇俊鎭� + return StatusCode(500, $"{ex.Message}"); + } + } + } -- Gitblit v1.9.3