|
@@ -27,6 +27,7 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
import java.net.URLEncoder;
|
|
import java.net.URLEncoder;
|
|
|
|
+import java.text.DecimalFormat;
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -116,10 +117,18 @@ public class MaterialCutFrameServiceImpl extends ServiceImpl<MaterialCutFrameMap
|
|
|
|
|
|
snapshotConfig.put("OutputFile", output.toJSONString());
|
|
snapshotConfig.put("OutputFile", output.toJSONString());
|
|
// SnapshotConfig->Time
|
|
// SnapshotConfig->Time
|
|
- Integer time = ((secondDuration.intValue() - 2) / 14) + 1; // 时长 / 14 == 间隔时间
|
|
|
|
|
|
+ // 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);
|
|
|
|
+
|
|
snapshotConfig.put("Time", 2000);
|
|
snapshotConfig.put("Time", 2000);
|
|
// SnapshotConfig->Interval/Num
|
|
// SnapshotConfig->Interval/Num
|
|
- snapshotConfig.put("Interval", time);
|
|
|
|
|
|
+ snapshotConfig.put("Interval", format);
|
|
snapshotConfig.put("Num", "14");
|
|
snapshotConfig.put("Num", "14");
|
|
// SnapshotConfig->Width/Height
|
|
// SnapshotConfig->Width/Height
|
|
snapshotConfig.put("Height", height);
|
|
snapshotConfig.put("Height", height);
|