From bf780b6c83012b5beb3d7515b8fb61753c5fb736 Mon Sep 17 00:00:00 2001 From: sjz <1240968267@qq.com> Date: 星期四, 26 六月 2025 08:48:37 +0800 Subject: [PATCH] 采购承诺交期改string类型 --- MESApplication/Controllers/BasicData/SentLaboratoryTestingItemsControllor.cs | 84 +++++++++++++++++++++++++++++++++++++++++- 1 files changed, 82 insertions(+), 2 deletions(-) diff --git a/MESApplication/Controllers/BasicData/SentLaboratoryTestingItemsControllor.cs b/MESApplication/Controllers/BasicData/SentLaboratoryTestingItemsControllor.cs index ec6835e..eada4fb 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"; @@ -23,7 +29,7 @@ private readonly string URL = "http://localhost:10054/api/SentLaboratoryTestingItems/"; /// <summary> - /// 鑾峰彇鎵�鏈� + /// 鑾峰彇閫佹鍗曞彿 /// </summary> /// <returns></returns> [HttpPost("GetList")] @@ -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,76 @@ return ResponseResult.ResponseError(ex); } } + + [HttpPost("GetLaboratoryList")] + public ResponseResult GetLaboratoryList(string RELEASE_NO) + { + try + { + dynamic resultInfos = new ExpandoObject(); + resultInfos.tbBillList = n.GetListAll(RELEASE_NO); + + return new ResponseResult + { + status = 0, + message = "OK", + data = resultInfos + }; + } + catch (Exception ex) + { + return ResponseResult.ResponseError(ex); + } + } + + /// <summary> + /// 淇濆瓨鎴栨彁浜ら�佹鍗曟暟鎹� + /// </summary> + /// <returns></returns> + [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}"); + } + } + + /// <summary> + /// 鎾ゅ洖閫佹鍗� + /// </summary> + /// <returns></returns> + [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