fix: 调整运维统计返回

dev
huangfeng 10 months ago
parent 517df2d7a7
commit 4e292e0e5e

@ -34,7 +34,7 @@
<jwt.version>0.9.0</jwt.version> <jwt.version>0.9.0</jwt.version>
<mybatisplus.version>3.2.0</mybatisplus.version> <mybatisplus.version>3.2.0</mybatisplus.version>
<easyexcel.version>3.3.4</easyexcel.version> <easyexcel.version>3.3.4</easyexcel.version>
<jackson.version>2.17.1</jackson.version> <jackson.version>2.16.2</jackson.version>
</properties> </properties>
<dependencyManagement> <dependencyManagement>

@ -19,6 +19,7 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map;
@RestController @RestController
@Api(tags = {"设备接入接口"}) @Api(tags = {"设备接入接口"})
@ -37,7 +38,7 @@ public class MntnController extends BaseController {
String url = req.getRequestURI(); String url = req.getRequestURI();
try { try {
String multi = req.getHeader("Accept-Cmds"); String multi = req.getHeader("Accept-Cmds");
HashMap<String, Object> map = JSONUtil.json2Object(data, HashMap.class); Map<String, Object> map = JSONUtil.json2Object(data, Map.class);
String cmdid = (String) map.get("id"); String cmdid = (String) map.get("id");
if (StringUtils.isBlank(cmdid)) { if (StringUtils.isBlank(cmdid)) {
throw new ApiException("id不能为空"); throw new ApiException("id不能为空");

@ -123,6 +123,7 @@ public class TerminalExtController extends BaseController {
vo.setPagesize(10000); vo.setPagesize(10000);
long cost = System.currentTimeMillis(); long cost = System.currentTimeMillis();
StatMaintain result = terminalExtService.statMaintain(vo); StatMaintain result = terminalExtService.statMaintain(vo);
result.setLineId(vo.getLineId());
cost = System.currentTimeMillis() - cost; cost = System.currentTimeMillis() - cost;
log.info("statMaintain cost=" + cost); log.info("statMaintain cost=" + cost);
return ResponseReult.success(result); return ResponseReult.success(result);

@ -12,6 +12,7 @@ import java.util.List;
public class StatMaintain { public class StatMaintain {
List<View_Dy_Line_Tower_Terminals> termList; List<View_Dy_Line_Tower_Terminals> termList;
List<StatDay> dayList = new ArrayList<>(); List<StatDay> dayList = new ArrayList<>();
int lineId;
public void initDayList(Long d1, Long d2) throws Exception { public void initDayList(Long d1, Long d2) throws Exception {
Date start = new Date(d1 * 1000); Date start = new Date(d1 * 1000);

@ -68,8 +68,6 @@ public class JSONProcessor {
return mapper.readValue(json, clazz); return mapper.readValue(json, clazz);
} catch (UnrecognizedPropertyException e) { } catch (UnrecognizedPropertyException e) {
throw new Exception(e.getPropertyName(), e); throw new Exception(e.getPropertyName(), e);
} catch (Exception e) {
throw new Exception("JSON Object transform failed. ", e);
} }
} }

Loading…
Cancel
Save