奥体项目修改返回时间的格式
正在显示
1 个修改的文件
包含
17 行增加
和
2 行删除
... | @@ -1513,7 +1513,15 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService { | ... | @@ -1513,7 +1513,15 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService { |
1513 | if(dataList.size()>0){ | 1513 | if(dataList.size()>0){ |
1514 | for (Map<String, Object> map:dataList) { | 1514 | for (Map<String, Object> map:dataList) { |
1515 | EchartResult echartResult = new EchartResult(); | 1515 | EchartResult echartResult = new EchartResult(); |
1516 | echartResult.setName(map.get("time").toString()); | 1516 | String datatime = map.get("time").toString(); |
1517 | if("today".equals(timeType)){ | ||
1518 | datatime = datatime.substring(11,16); | ||
1519 | }else if("week".equals(timeType)){ | ||
1520 | datatime = datatime.substring(5,16); | ||
1521 | }else{ | ||
1522 | datatime = datatime.substring(5,10); | ||
1523 | } | ||
1524 | echartResult.setName(datatime); | ||
1517 | if("p".equals(type)){ | 1525 | if("p".equals(type)){ |
1518 | if(map.get(wList.get(0).getMonitorId())==null){ | 1526 | if(map.get(wList.get(0).getMonitorId())==null){ |
1519 | echartResult.setValue(""); | 1527 | echartResult.setValue(""); |
... | @@ -1539,7 +1547,14 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService { | ... | @@ -1539,7 +1547,14 @@ public class OlympicCenterServiceImpl implements IOlympicCenterService { |
1539 | }else if("f".equals(type)){ | 1547 | }else if("f".equals(type)){ |
1540 | for (WhatStructData whatStructData:wList) { | 1548 | for (WhatStructData whatStructData:wList) { |
1541 | EchartResult eResult = new EchartResult(); | 1549 | EchartResult eResult = new EchartResult(); |
1542 | eResult.setName(map.get("time").toString()); | 1550 | if("today".equals(timeType)){ |
1551 | datatime = datatime.substring(11,16); | ||
1552 | }else if("week".equals(timeType)){ | ||
1553 | datatime = datatime.substring(5,16); | ||
1554 | }else{ | ||
1555 | datatime = datatime.substring(5,10); | ||
1556 | } | ||
1557 | eResult.setName(datatime); | ||
1543 | if(whatStructData.getMonitorId()==null){ | 1558 | if(whatStructData.getMonitorId()==null){ |
1544 | eResult.setValue(""); | 1559 | eResult.setValue(""); |
1545 | }else{ | 1560 | }else{ | ... | ... |
-
请 注册 或 登录 后发表评论