|
@@ -47,6 +47,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|
|
import java.io.File;
|
|
|
import java.io.FileInputStream;
|
|
|
import java.io.FileNotFoundException;
|
|
|
+import java.io.IOException;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
@@ -130,7 +131,7 @@ public class MixProportionInfoServiceImpl extends BaseServiceImpl<MixProportionI
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public R calculateWater(MoistureContentDTO dto) throws FileNotFoundException {
|
|
|
+ public R calculateWater(MoistureContentDTO dto) throws IOException {
|
|
|
if (StringUtils.isBlank(dto.getDesignStrength())){
|
|
|
throw new ServiceException("请先选择设计强度");
|
|
|
}
|
|
@@ -156,6 +157,7 @@ public class MixProportionInfoServiceImpl extends BaseServiceImpl<MixProportionI
|
|
|
}
|
|
|
}
|
|
|
if (!isFiled){
|
|
|
+ inputStream.close();
|
|
|
return R.data(null);
|
|
|
}
|
|
|
//获取位置前缀后缀
|
|
@@ -171,6 +173,7 @@ public class MixProportionInfoServiceImpl extends BaseServiceImpl<MixProportionI
|
|
|
.eq(MixProportionInfo::getContractId,dto.getContractId())
|
|
|
.eq(MixProportionInfo::getDesignStrength,dto.getDesignStrength()));
|
|
|
if (info == null){
|
|
|
+ inputStream.close();
|
|
|
throw new ServiceException("获取配合比信息失败");
|
|
|
}
|
|
|
//含水量计算
|
|
@@ -226,6 +229,7 @@ public class MixProportionInfoServiceImpl extends BaseServiceImpl<MixProportionI
|
|
|
//矿渣粉
|
|
|
BigDecimal slagPowder = info.getSlagPowder();
|
|
|
map.put(prefix + "__" +s1 + "_" +(s2+8),slagPowder);
|
|
|
+ inputStream.close();
|
|
|
return R.data(map);
|
|
|
}
|
|
|
}
|