|
@@ -27,7 +27,6 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
import java.net.URLEncoder;
|
|
|
-import java.text.DecimalFormat;
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -119,16 +118,12 @@ public class MaterialCutFrameServiceImpl extends ServiceImpl<MaterialCutFrameMap
|
|
|
// SnapshotConfig->Time
|
|
|
// Integer time = ((secondDuration.intValue() - 2) / 14) + 1; // 时长 / 14 == 间隔时间
|
|
|
|
|
|
- float num = (float) secondDuration / 14;
|
|
|
-
|
|
|
- DecimalFormat df = new DecimalFormat("0.0");
|
|
|
-
|
|
|
- String format = df.format(num);
|
|
|
- log.info("相隔时间数:{}", format);
|
|
|
-
|
|
|
+ double num = (double) secondDuration / 14;
|
|
|
+ double rint = Math.rint(num);
|
|
|
+ log.info("相隔时间数:{}", rint);
|
|
|
snapshotConfig.put("Time", 2000);
|
|
|
// SnapshotConfig->Interval/Num
|
|
|
- snapshotConfig.put("Interval", format);
|
|
|
+ snapshotConfig.put("Interval", rint);
|
|
|
snapshotConfig.put("Num", "14");
|
|
|
// SnapshotConfig->Width/Height
|
|
|
snapshotConfig.put("Height", height);
|