Commit 383682b2 LN

回温时间改为向上取整

1 个父辈 7620bb1c
...@@ -374,10 +374,14 @@ public class DataLog extends BasePo implements Serializable ,Comparable<DataLog> ...@@ -374,10 +374,14 @@ public class DataLog extends BasePo implements Serializable ,Comparable<DataLog>
/** /**
* 正在执行的出库任务,如果60秒还未完成,再次发送到客户端 * 正在执行的出库任务,如果60秒还未完成,再次发送到客户端
*/ */
public boolean needReSendToClient(){ public boolean needReSendToClient() {
if(isCheckOutTask() && isExecuting()){ if (isCheckOutTask() && isExecuting()) {
return System.currentTimeMillis() - super.getUpdateDate().getTime() >= 60 * 1000; return System.currentTimeMillis() - super.getUpdateDate().getTime() >= 60 * 1000;
} }
if (isRewarmTakingTask() && isExecuting()) {
//回温任务超过300秒重发
return System.currentTimeMillis() - super.getUpdateDate().getTime() >= 300 * 1000;
}
return false; return false;
} }
......
...@@ -157,7 +157,11 @@ public class ZhongCheSPApi extends BaseSmfApiListener { ...@@ -157,7 +157,11 @@ public class ZhongCheSPApi extends BaseSmfApiListener {
Object tempDpart = materialData.get("temp_dpart"); Object tempDpart = materialData.get("temp_dpart");
if (tempDpart != null) { if (tempDpart != null) {
double warmTimeHours = Double.parseDouble(tempDpart.toString()); double warmTimeHours = Double.parseDouble(tempDpart.toString());
component.setWarmTime((int) (warmTimeHours * 60)); // 转换为分钟保存 int warmTime=(int) Math.ceil(warmTimeHours * 60);
if(warmTime<=0&&warmTimeHours>0){
warmTime=1;
}
component.setWarmTime(warmTime); // 转换为分钟保存
component.updateAppendData("temp_dpart", tempDpart.toString()); component.updateAppendData("temp_dpart", tempDpart.toString());
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!