|
@@ -52,7 +52,7 @@ public class MotionTrailServiceImpl extends ServiceImpl<MotionTrailMapper, Motio
|
|
|
if (null == request.getCreateTime()) {
|
|
|
return RestResponse.fail("查询时间不能为空");
|
|
|
}
|
|
|
- if (null == request.getMobile()) {
|
|
|
+ if (null == request.getMobile() && request.getUserId() == null) {
|
|
|
return RestResponse.fail("维保工不能为空");
|
|
|
}
|
|
|
/*if (null == request.getMtCompanyId()) {
|
|
@@ -73,7 +73,7 @@ public class MotionTrailServiceImpl extends ServiceImpl<MotionTrailMapper, Motio
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
list.forEach(item -> {
|
|
|
String[] split = item.getPosition().split(",");
|
|
|
- List<Double> mark = Arrays.asList(Double.parseDouble(split[0]), Double.parseDouble(split[1]));
|
|
|
+ List<Double> mark = Arrays.asList(Double.parseDouble(split[1]), Double.parseDouble(split[0]));
|
|
|
polylines.add(mark);
|
|
|
|
|
|
Map temp = new HashMap();
|
|
@@ -115,6 +115,22 @@ public class MotionTrailServiceImpl extends ServiceImpl<MotionTrailMapper, Motio
|
|
|
UserInfoEntity byUserId = userInfoMapper.getByUserId(mt.getUserId());
|
|
|
mt.setUserInfo(byUserId);
|
|
|
}
|
|
|
- return RestResponse.success(queryTrailByTeam);
|
|
|
+ Map<String, List> rst = new HashMap<>();
|
|
|
+ List polylines = new ArrayList();
|
|
|
+ List texts = new ArrayList();
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+ queryTrailByTeam.forEach(item -> {
|
|
|
+ String[] split = item.getPosition().split(",");
|
|
|
+ List<Double> mark = Arrays.asList(Double.parseDouble(split[1]), Double.parseDouble(split[0]));
|
|
|
+ polylines.add(mark);
|
|
|
+
|
|
|
+ Map temp = new HashMap();
|
|
|
+ temp.put("position", mark);
|
|
|
+ temp.put("text", sdf.format(item.getCreateTime()));
|
|
|
+ texts.add(temp);
|
|
|
+ });
|
|
|
+ rst.put("polylines", polylines);
|
|
|
+ rst.put("texts", texts);
|
|
|
+ return RestResponse.success(rst);
|
|
|
}
|
|
|
}
|