| | |
| | | |
| | | import com.moral.api.pojo.dto.dataDisplay.MonitorPointDataDisplayDTO; |
| | | import com.moral.api.pojo.form.dataDisplay.MonitorPointDataDisplayForm; |
| | | import com.moral.api.service.DataDisplayService; |
| | | import com.moral.constant.ResponseCodeEnum; |
| | | import com.moral.constant.ResultMessage; |
| | | import com.moral.util.DateUtils; |
| | | import io.swagger.annotations.Api; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.CrossOrigin; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | @RequestMapping("/dataDisplay") |
| | | public class DataDisplayController { |
| | | |
| | | @Autowired |
| | | DataDisplayService dataDisplayService; |
| | | |
| | | @GetMapping("monitorPointDataDisplay") |
| | | public ResultMessage monitorPointDataDisplay(MonitorPointDataDisplayForm form){ |
| | | //判断是否缺少参数 |
| | |
| | | return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), |
| | | ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg()); |
| | | |
| | | MonitorPointDataDisplayDTO dto = new MonitorPointDataDisplayDTO(); |
| | | List<MonitorPointDataDisplayDTO> list = dataDisplayService.getMonitorPointDisplayData(form); |
| | | /*MonitorPointDataDisplayDTO dto = new MonitorPointDataDisplayDTO(); |
| | | MonitorPointDataDisplayDTO dto1 = new MonitorPointDataDisplayDTO(); |
| | | MonitorPointDataDisplayDTO dto2 = new MonitorPointDataDisplayDTO(); |
| | | |
| | |
| | | dto1.setOrganizationName("模拟组织2"); |
| | | dto2.setOrganizationName("模拟组织3"); |
| | | |
| | | Map<String,Object> valueMap = new HashMap<>(); |
| | | valueMap.put("a21026",1); |
| | | valueMap.put("a21004",1); |
| | | valueMap.put("a34002",1); |
| | | valueMap.put("a34004",1); |
| | | valueMap.put("a21005",1); |
| | | valueMap.put("a05024",1); |
| | | valueMap.put("a99054",1); |
| | | valueMap.put("AQI",1); |
| | | dto.setA05024(1); |
| | | dto1.setA05024(1); |
| | | dto2.setA05024(1); |
| | | |
| | | dto.setValues(valueMap); |
| | | dto1.setValues(valueMap); |
| | | dto2.setValues(valueMap); |
| | | dto.setA21005(1d); |
| | | dto1.setA21005(1d); |
| | | dto2.setA21005(1d); |
| | | |
| | | dto.setA21004(1); |
| | | dto1.setA21004(1); |
| | | dto2.setA21004(1); |
| | | |
| | | dto.setA21026(1); |
| | | dto1.setA21026(1); |
| | | dto2.setA21026(1); |
| | | |
| | | dto.setA34002(1); |
| | | dto1.setA34002(1); |
| | | dto2.setA34002(1); |
| | | |
| | | dto.setA34004(1); |
| | | dto1.setA34004(1); |
| | | dto2.setA34004(1); |
| | | |
| | | dto.setA99054(1d); |
| | | dto1.setA99054(1d); |
| | | dto2.setA99054(1d); |
| | | |
| | | dto.setAQI(1); |
| | | dto1.setAQI(1); |
| | | dto2.setAQI(1); |
| | | |
| | | List<MonitorPointDataDisplayDTO> list = new ArrayList<>(); |
| | | list.add(dto); |
| | | list.add(dto1); |
| | | list.add(dto2); |
| | | list.add(dto2);*/ |
| | | return new ResultMessage(ResponseCodeEnum.SUCCESS.getCode(), ResponseCodeEnum.SUCCESS.getMsg(),list); |
| | | } |
| | | |