From 4f33ac39577a3a20860e3895f748d6f10bd39b23 Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期四, 04 十二月 2025 16:25:09 +0800
Subject: [PATCH] 修改注释
---
Controllers/MesCutterLedgerController.cs | 28 +++++++++++++++++++---------
1 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/Controllers/MesCutterLedgerController.cs b/Controllers/MesCutterLedgerController.cs
index 709a95b..1864a70 100644
--- a/Controllers/MesCutterLedgerController.cs
+++ b/Controllers/MesCutterLedgerController.cs
@@ -12,16 +12,21 @@
/// </summary>
[ApiController]
[Route("api/[controller]")]
+[Route("[controller]")] // 鍏佽 /MesCutterLedger/... 褰㈠紡鐨勮矾鐢憋紝鍏煎鍓嶇褰撳墠鍐欐硶
public class MesCutterLedgerController : ControllerBase
{
private readonly MesCutterLedgerManager m = new();
+ // 鍔犲叆 sdjs銆亁djs 涓哄彲绌� decimal锛屼繚鎸佷笌鍓嶇 JSON 瀛楁鍚嶄竴鑷�
public record ToolActionRequest(
string workOrderNo,
string machineNo,
string toolNo,
string type,
- int? useLimit
+ int? useLimit,
+ decimal? sdjs,
+ decimal? xdjs,
+ decimal? modlLifeWorning
);
public record FormDataRequest(
@@ -58,19 +63,24 @@
/// <summary>
/// 涓婁笅鍒�鎿嶄綔锛堜笂鍒�type=0锛屼笅鍒�type=1锛�
+ /// 鎺ユ敹 JSON 璇锋眰浣擄紙Content-Type: application/json锛夛紝骞跺皢 sdjs/xdjs 涓�骞朵紶鍏ユ湇鍔″眰
/// </summary>
[HttpPost("SubmitToolAction")]
- public IActionResult SubmitToolAction(
- [FromForm] string workOrderNo,
- [FromForm] string machineNo,
- [FromForm] string toolNo,
- [FromForm] string type, // string 绫诲瀷
- [FromForm] int? useLimit
- )
+ public IActionResult SubmitToolAction([FromBody] ToolActionRequest req)
{
try
{
- var result = m.SubmitToolAction(workOrderNo, machineNo, toolNo, type, useLimit);
+ var result = m.SubmitToolAction(
+ req.workOrderNo,
+ req.machineNo,
+ req.toolNo,
+ req.type,
+ req.useLimit,
+ req.sdjs,
+ req.xdjs,
+ req.modlLifeWorning
+ );
+
return Ok(new ResponseResult
{
status = 0,
--
Gitblit v1.9.3