| | |
| | | public class WomdaaController : ControllerBase |
| | | { |
| | | private readonly WomdaaManager m = new(); |
| | | |
| | | public class BillNoBgQueryDto |
| | | { |
| | | public string BillNo { get; set; } |
| | | public string MachineNo { get; set; } |
| | | public DateTime? From { get; set; } |
| | | public DateTime? To { get; set; } |
| | | public int PageIndex { get; set; } = 1; |
| | | public int PageSize { get; set; } = 500; |
| | | } |
| | | |
| | | //GetWomdaasByMachine |
| | | [HttpPost("GetWomdaasByMachine")] |
| | |
| | | return ResponseResult.ResponseError(ex); |
| | | } |
| | | } |
| | | } |
| | | |
| | | [HttpPost("GetByBillNoBG")] |
| | | public IActionResult GetByBillNoBG([FromBody] BillNoBgQueryDto dto) |
| | | { |
| | | if (string.IsNullOrWhiteSpace(dto.BillNo)) |
| | | return Ok(new { status = 1, message = "billNo不能为空" }); |
| | | |
| | | try |
| | | { |
| | | var (tbBillList, totalCount) = m.GetByBillNoBG( |
| | | dto.BillNo, dto.MachineNo, dto.From, dto.To, dto.PageIndex, dto.PageSize); |
| | | |
| | | return Ok(new |
| | | { |
| | | status = 0, |
| | | message = "Ok", |
| | | data = new |
| | | { |
| | | tbBillList, |
| | | totalCount |
| | | } |
| | | }); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | // 记录日志 ex |
| | | return Ok(new { status = 1, message = "服务器错误" }); |
| | | } |
| | | } |
| | | } |
| | | |