Browse Source

fix:处理小数

master
白凤吉 2 days ago
parent
commit
c732ccc114
  1. 2
      src/main/java/com/iflytop/handacid/app/service/ChannelCtrlService.java

2
src/main/java/com/iflytop/handacid/app/service/ChannelCtrlService.java

@ -339,7 +339,7 @@ public class ChannelCtrlService {
throw new IllegalArgumentException("Formulation 或其字段 volume/revolutions 不能为空");
}
Integer pumpConversionFactor = systemConfigService.getValueByKeyToInteger(SystemConfigKey.PUMP_CONVERSION_FACTOR);
double deltaRevolutions = (afterPosition - beforePosition) / pumpConversionFactor;
int deltaRevolutions = (int) (((afterPosition - beforePosition) / pumpConversionFactor));
double targetVolume = formulation.getVolume();
double targetRevs = formulation.getRevolutions();
if (targetRevs == 0) {

Loading…
Cancel
Save