#91 -- Reformat
This commit is contained in:
parent
d111121e24
commit
5c6b388901
@ -38,22 +38,22 @@ public class MarkupService {
|
||||
List<TimeSeriesForMarkup> tsForMarkup = new ArrayList<>();
|
||||
for (int i = 0; i < timeSeriesList.size(); i++) {
|
||||
TimeSeries ts1 = timeSeriesList.get(i);
|
||||
for (int j = i + 1; j < timeSeriesList.size(); j++) {
|
||||
for (int j = i+1; j < timeSeriesList.size(); j++) {
|
||||
TimeSeries ts2 = timeSeriesList.get(j);
|
||||
List<TimeSeriesValue> values1 = ts1.getValues();
|
||||
for (int k = 0; k < values1.size() - 1; k++) {
|
||||
for (int k = 0; k < values1.size()-1; k++) {
|
||||
List<TimeSeriesValue> values2 = ts2.getValues();
|
||||
for (int l = 0; l < values2.size() - 1; l++) {
|
||||
for (int l = 0; l < values2.size()-1; l++) {
|
||||
if (values1.get(k).getDate().equals(values2.get(l).getDate())
|
||||
&& values1.get(k + 1).getDate().equals(values2.get(l + 1).getDate())) {
|
||||
&& values1.get(k+1).getDate().equals(values2.get(l+1).getDate())) {
|
||||
final int index = k;
|
||||
TimeSeriesForMarkup found = tsForMarkup
|
||||
.stream()
|
||||
.filter(m -> m.getDateFrom().equals(values1.get(index).getDate()) && m.getDateTo().equals(values1.get(index + 1).getDate()))
|
||||
.filter(m -> m.getDateFrom().equals(values1.get(index).getDate()) && m.getDateTo().equals(values1.get(index+1).getDate()))
|
||||
.findAny()
|
||||
.orElse(null);
|
||||
if (found == null) {
|
||||
tsForMarkup.add(new TimeSeriesForMarkup(ts1, ts2, values1.get(index).getDate(), values1.get(index + 1).getDate()));
|
||||
tsForMarkup.add(new TimeSeriesForMarkup(ts1, ts2, values1.get(index).getDate(), values1.get(index+1).getDate()));
|
||||
} else {
|
||||
found.getTimeSeriesSet().add(ts1);
|
||||
found.getTimeSeriesSet().add(ts2);
|
||||
|
@ -22,9 +22,7 @@
|
||||
</option>
|
||||
</select>
|
||||
<script th:inline="javascript">
|
||||
$('#select-branch').val([[ * {branchId}]
|
||||
])
|
||||
;
|
||||
$('#select-branch').val([[*{branchId}]]);
|
||||
$('#select-branch').selectpicker('refresh');
|
||||
</script>
|
||||
</div>
|
||||
@ -41,10 +39,10 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="m, itemStat: *{timeSeriesForMarkupList}">
|
||||
<!-- <td><input type="hidden" th:field="*{markupRows[__${itemStat.index}__].timeSeries.id}"></span></td>-->
|
||||
<!-- <td><input type="hidden" th:field="*{markupRows[__${itemStat.index}__].timeSeries.id}"></span></td>-->
|
||||
<td><span class="badge badge-success" th:text="${m.dateFrom}"></span></td>
|
||||
<td><span class="badge badge-success" th:text="${m.dateTo}"></span></td>
|
||||
<td><input type="text"></input></td>
|
||||
<td><input type="text" ></input></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
Loading…
Reference in New Issue
Block a user