dengzedong
2025-02-27 6205c22a959fbb3b69735f34af8d3316c4082a5d
iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/sample/SampleInfoConstructor.java
@@ -82,9 +82,12 @@
        calendar.setTime(originalTime);
        switch (ModelParamType.getEumByCode(columnItem.getParamType())) {
            case DATAPOINT:
            case IND:
            case PLAN:
                dateTime = calculateTime(originalTime, true, columnItem.getDataLength(), columnItem.getGranularity());
                break;
            case IND:
            case IND_ASCII:
                dateTime = calculateTime(originalTime, true, columnItem.getDataLength()-1, columnItem.getGranularity());
                break;
            case NORMALITEM:
            case MERGEITEM:
@@ -111,6 +114,7 @@
        switch (ModelParamType.getEumByCode(columnItem.getParamType())) {
            case DATAPOINT:
            case IND:
            case IND_ASCII:
            case PLAN:
                dateTime = calendar.getTime();
                break;
@@ -131,7 +135,7 @@
     * @return
     * @throws Exception
     */
    protected Integer getGranularity(ColumnItem columnItem,Map<String, ApiPointDTO> pointMap, Map<String, ApiPlanItemDTO> planMap) {
    protected Integer getGranularity(ColumnItem columnItem,Map<String, ApiPointDTO> pointMap, Map<String, ApiPlanItemDTO> planMap,Map<String, ApiIndItemDTO> indMap) {
        // 默认60s
        Integer granularity = 60;
        switch (ModelParamType.getEumByCode(columnItem.getParamType())) {
@@ -144,7 +148,8 @@
                granularity = mmPredictItemService.getItemByOutPutId(columnItem.getParamId()).getGranularity();
                break;
            case IND:
                ApiIndItemDTO indItemDTO = indItemApi.getInfoById(columnItem.getParamId());
            case IND_ASCII:
                ApiIndItemDTO indItemDTO = indMap.get(columnItem.getParamId());
                granularity = TimeGranularitySecEnum.getEumByCode(indItemDTO.getTimeGranularity()).getValue();;
                break;
            case PLAN: