| | |
| | | { |
| | | private readonly MesCutterLedgerManager m = new(); |
| | | |
| | | public record ToolActionRequest( |
| | | string workOrderNo, |
| | | string machineNo, |
| | | string toolNo, |
| | | string type, |
| | | int? useLimit |
| | | ); |
| | | |
| | | public record FormDataRequest( |
| | | string workOrderNo, |
| | | string machineNo |
| | | ); |
| | | |
| | | /// <summary> |
| | | /// 刀具查询(支持编号或名称模糊查询)MesCutterLedger |
| | |
| | | return Ok(ResponseResult.ResponseError(ex)); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取刀具表单数据(根据工单号和机台编码) |
| | | /// </summary> |
| | | [HttpPost("GetFormData")] |
| | | public ResponseResult GetFormData([FromBody] FormDataRequest req) |
| | | { |
| | | try |
| | | { |
| | | var data = m.GetFormData(req.workOrderNo, req.machineNo); |
| | | return new ResponseResult |
| | | { |
| | | status = 0, |
| | | message = "OK", |
| | | data = data |
| | | }; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | } |