|
@@ -13,6 +13,7 @@ import com.slibra.business.service.IFrontService;
|
|
|
import com.slibra.common.DecimalUtils;
|
|
|
import com.slibra.common.utils.DateUtils;
|
|
|
import com.slibra.common.utils.StringUtils;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import com.slibra.business.mapper.TXinyiMedicineParamMapper;
|
|
@@ -27,6 +28,7 @@ import static com.slibra.common.constant.MyConstants.*;
|
|
|
* @author slibra
|
|
|
* @date 2024-09-09
|
|
|
*/
|
|
|
+@Slf4j
|
|
|
@Service
|
|
|
public class TXinyiMedicineParamServiceImpl implements ITXinyiMedicineParamService
|
|
|
{
|
|
@@ -351,11 +353,15 @@ public class TXinyiMedicineParamServiceImpl implements ITXinyiMedicineParamServi
|
|
|
return null;//除数不能为0
|
|
|
//1)计算挟走量
|
|
|
BigDecimal xzl = (((BigDecimal_2.multiply(hycXsyVal).subtract(htfksd)).add(((qycAdVal.add(qycYxyVal)).multiply(xzxs).subtract(htfksd)))).multiply((jzxs.subtract(BigDecimal_1)))).multiply((jsLlVal.multiply(slfpxs))).divide(BigDecimal_1000, NUMBER_SCALE_4, RoundingMode.HALF_UP);
|
|
|
+ log.info("挟走量是{}", xzl);
|
|
|
//2)计算碳源投加总量
|
|
|
BigDecimal total = (xzl.multiply(kzxs).subtract((jsLlVal.multiply(slfpxs).multiply(jsCodVal).multiply(zhxs).divide(BigDecimal_1000, NUMBER_SCALE_4, RoundingMode.HALF_UP)))).divide(tydl, NUMBER_SCALE_4, RoundingMode.HALF_UP);
|
|
|
+ log.info("碳源投加总量是{}", total);
|
|
|
//2024年09月14日15:33:37 计算出来的结果太大,是几千,把第三步公式也加上
|
|
|
//计算加药流量
|
|
|
- return DecimalUtils.getNLengthHalfUp(total.divide(yymd, NUMBER_SCALE_10, RoundingMode.HALF_UP).divide(BigDecimal_1000, NUMBER_SCALE_10, RoundingMode.HALF_UP), INT_3);
|
|
|
+ BigDecimal result = DecimalUtils.getNLengthHalfUp(total.divide(yymd, NUMBER_SCALE_10, RoundingMode.HALF_UP).divide(BigDecimal_1000, NUMBER_SCALE_10, RoundingMode.HALF_UP), INT_3);
|
|
|
+ log.info("最终的加药流量是{}", result);
|
|
|
+ return result;
|
|
|
}
|
|
|
|
|
|
public static void main(String[] args) {
|