潘志宝
3 天以前 e03a3567aa5ae98cf3d17efcf8bae535d13d3860
POINT columnItem.getDataLength() - 1
已修改1个文件
5 ■■■■■ 文件已修改
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/sample/SampleInfoConstructor.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/sample/SampleInfoConstructor.java
@@ -78,7 +78,8 @@
        Date dateTime = new Date();
        switch (ModelParamType.getEumByCode(columnItem.getParamType())) {
            case DATAPOINT:
                dateTime = calculateTime(originalTime, true, columnItem.getDataLength(), columnItem.getGranularity());
                dateTime = calculateTime(originalTime, true,
                        columnItem.getDataLength() > 1 ? (columnItem.getDataLength() - 1) : columnItem.getDataLength(), columnItem.getGranularity());
                break;
            case PLAN:
                dateTime = originalTime;
@@ -111,7 +112,7 @@
        calendar.setTime(originalTime);
        switch (ModelParamType.getEumByCode(columnItem.getParamType())) {
            case DATAPOINT:
                dateTime = calculateTime(originalTime, true, 1, columnItem.getGranularity());
                dateTime = calculateTime(originalTime, true, 0, columnItem.getGranularity());
                break;
            case PLAN:
                dateTime = calculateTime(originalTime, false, columnItem.getDataLength()-1, columnItem.getGranularity());