whyclxw
2025-02-17 70f6a8d6b295e8149e209b9ca9add886c57a4e11
src/main/java/com/whyc/service/SubTableService.java
@@ -129,6 +129,17 @@
        if(his.getEndTime()!=null){
            sql+=" and alm_start_time  <='"+ThreadLocalUtil.format(his.getEndTime(),1)+"' ";
        }
        if(his.getAlmIds()!=null){
            String[] almId=his.getAlmIds().split(",");
            sql+=" and  history.alm_id in (";
            for (int i=0;i<almId.length;i++) {
                if(i==almId.length-1){
                    sql=sql+almId[i]+") ";
                }else{
                    sql=sql+almId[i]+",";
                }
            }
        }
        List list = sqlExecuteService.executeQuery_call(sql, new CallBack() {
            @Override
            public List getResults(ResultSet rs) throws SQLException {
@@ -169,6 +180,17 @@
        if(his.getEndTime()!=null){
            sql+=" and alm_start_time  <='"+ThreadLocalUtil.format(his.getEndTime(),1)+"' ";
        }
        if(his.getAlmIds()!=null){
            String[] almId=his.getAlmIds().split(",");
            sql+=" and  history.alm_id in (";
            for (int i=0;i<almId.length;i++) {
                if(i==almId.length-1){
                    sql=sql+almId[i]+") ";
                }else{
                    sql=sql+almId[i]+",";
                }
            }
        }
        sql+="  ORDER BY alm_start_time asc  limit "+ his.getLimitStart()+","+ his.getLimitEnd()+" ";
        List<LockAlarmHis> list=sqlExecuteService.executeQuery_call(sql, new CallBack() {
            @Override