部门查询添加排序字段

This commit is contained in:
2022-11-10 12:49:10 +08:00
parent 3eff054c3e
commit cc8979d589
3 changed files with 7 additions and 3 deletions

View File

@@ -167,8 +167,9 @@ public class LineServiceImpl extends ServiceImpl<LineMapper, Line> implements Li
@Override
public CommunicateVO getComFlagInfoData(String id, String searchBeginTime, String searchEndTime) {
String devId = lineMapper.getDevIndex(id);
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
List<Communicate> communicateList = getCommunicate(id, searchBeginTime, searchEndTime);
List<Communicate> communicateList = getCommunicate(devId, searchBeginTime, searchEndTime);
CommunicateVO communicateVOList = new CommunicateVO();
List<String> updateTime = new ArrayList<>();
List<Integer> comType = new ArrayList<>();
@@ -659,7 +660,7 @@ public class LineServiceImpl extends ServiceImpl<LineMapper, Line> implements Li
//组装sql语句
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("time >= '").append(DateUtil.beginOfDay(DateUtil.parse(startTime))).append("' and ").append("time <= '").append(DateUtil.endOfDay(DateUtil.parse(endTime))).append("' and ");
stringBuilder.append("line_id = '").append(lineIndex).append("' group by line_id ").append(InfluxDBPublicParam.TIME_ZONE);
stringBuilder.append("dev_id = '").append(lineIndex).append("' group by dev_id ").append(InfluxDBPublicParam.TIME_ZONE);
String sql = "select * from " + InfluxDBPublicParam.PQS_COMMUNICATE + " where " + stringBuilder.toString();
//获取暂降事件
QueryResult result = influxDbUtils.query(sql);

View File

@@ -28,6 +28,8 @@ public class DeptDTO implements Serializable {
private String remark;
private Integer sort;
/**
* 部门类型 0-非自定义1-web自定义2-App自定义3-web测试
*/

View File

@@ -126,7 +126,8 @@
T3.NAME,
T3.type,
T5.NAME area ,
T3.Remark
T3.Remark,
T3.sort
FROM
(
SELECT