| | |
| | | package com.mes.md.controller; |
| | | |
| | | |
| | | import com.mes.md.service.TaskingLogService; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | |
| | | @Autowired |
| | | TaskingLogService taskingLogService; |
| | | |
| | | @ApiOperation("查询报表") |
| | | @PostMapping("/mechanicalReport") |
| | | @ResponseBody |
| | | public Result mechanicalReport( |
| | | @RequestParam(required = false) Integer dayCount, |
| | | @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date startDate, |
| | | @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date endDate, |
| | | @RequestParam(required = false) String taskType, |
| | | @RequestParam(required = false) String operationRecord, |
| | | @RequestParam(required = false) String lineType) { |
| | | try { |
| | | List<Map> result = taskingLogService.selectMechanicalReport( |
| | | dayCount, |
| | | startDate, |
| | | endDate, |
| | | taskType, |
| | | operationRecord, |
| | | lineType |
| | | ); |
| | | return Result.build(200, "查询成功", result); |
| | | } catch (Exception e) { |
| | | return Result.build(199, "查询异常", null); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation("提交日志以及报工数据到九牧数据库") |
| | | @PostMapping("/reportTaskingLog") |
| | |
| | | return Result.build(199,"提交异常",map); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |