소스 검색

计算碳源投加调整

王苗苗 6 달 전
부모
커밋
40d2544535
1개의 변경된 파일53개의 추가작업 그리고 4개의 파일을 삭제
  1. 53 4
      slibra-system/src/main/java/com/slibra/business/service/impl/TXinyiMedicineParamServiceImpl.java

+ 53 - 4
slibra-system/src/main/java/com/slibra/business/service/impl/TXinyiMedicineParamServiceImpl.java

@@ -222,7 +222,8 @@ public class TXinyiMedicineParamServiceImpl implements ITXinyiMedicineParamServi
         BigDecimal jzxs = param.getJzxs();
 
         Integer jsLlType = param.getJsLlType();
-        BigDecimal jsLlOne = param.getJsLlOne();//两个池子的值是一样的
+        BigDecimal jsLlOne = param.getJsLlOne();
+        BigDecimal jsLlTwo = param.getJsLlTwo();
 
         BigDecimal slfpxs = param.getSlfpxs();
 
@@ -252,7 +253,7 @@ public class TXinyiMedicineParamServiceImpl implements ITXinyiMedicineParamServi
             //计算1号池的值
             BigDecimal oneResult = this.getResultByDiff(hycXsyType, hycXsyOne, htfksd, qycAdType, qycAdOne, qycYxyType, qycYxyOne, xzxs, jzxs, jsLlType, jsLlOne, slfpxs, kzxs, jsCodType, jsCodOne, zhxs, tydl, "one", yymd, sxps);
             //计算二号池的值
-            BigDecimal twoResult = this.getResultByDiff(hycXsyType, hycXsyTwo, htfksd, qycAdType, qycAdTwo, qycYxyType, qycYxyTwo, xzxs, jzxs, jsLlType, jsLlOne, slfpxs, kzxs, jsCodType, jsCodTwo, zhxs, tydl, "two", yymd, sxps);
+            BigDecimal twoResult = this.getResultByDiff(hycXsyType, hycXsyTwo, htfksd, qycAdType, qycAdTwo, qycYxyType, qycYxyTwo, xzxs, jzxs, jsLlType, jsLlTwo, slfpxs, kzxs, jsCodType, jsCodTwo, zhxs, tydl, "two", yymd, sxps);
             //判断,返回值
             if(0 == type)
                 return oneResult.compareTo(twoResult) > 0 ? oneResult : twoResult;
@@ -369,7 +370,55 @@ public class TXinyiMedicineParamServiceImpl implements ITXinyiMedicineParamServi
         return result;
     }
 
-    public static void main(String[] args) {
+    /*public static void main(String[] args) {
         System.out.println(Math.random() < 0.5 ? 0 : 1);
-    }
+        String strJson = "{\n" +
+                "    \"createBy\": \"test11\",\n" +
+                "    \"createTime\": \"2024-09-19 11:39:00\",\n" +
+                "    \"updateBy\": null,\n" +
+                "    \"updateTime\": null,\n" +
+                "    \"remark\": null,\n" +
+                "    \"id\": 29,\n" +
+                "    \"numberBeng\": 1,\n" +
+                "    \"type\": 2,\n" +
+                "    \"jsLlType\": 0,\n" +
+                "    \"jsLlOne\": 2815,\n" +
+                "    \"jsLlTwo\": 3,\n" +
+                "    \"jsCodType\": 0,\n" +
+                "    \"jsCodOne\": 179.78,\n" +
+                "    \"jsCodTwo\": 4,\n" +
+                "    \"hycXsyType\": 0,\n" +
+                "    \"hycXsyOne\": 12.29,\n" +
+                "    \"hycXsyTwo\": 5,\n" +
+                "    \"qycYxyType\": 0,\n" +
+                "    \"qycYxyOne\": 3.7,\n" +
+                "    \"qycYxyTwo\": 6,\n" +
+                "    \"qycAdType\": 0,\n" +
+                "    \"qycAdOne\": 9.41,\n" +
+                "    \"qycAdTwo\": 7,\n" +
+                "    \"jsTnType\": 0,\n" +
+                "    \"jsTnOne\": 46.31,\n" +
+                "    \"jsTnTwo\": 8,\n" +
+                "    \"htfksd\": 12,\n" +
+                "    \"jzxs\": 11.5,\n" +
+                "    \"xzxs\": 5,\n" +
+                "    \"kzxs\": 5.5,\n" +
+                "    \"slfpxs\": 4,\n" +
+                "    \"tydl\": 1.2,\n" +
+                "    \"zhxs\": 0.8,\n" +
+                "    \"sxps\": 4,\n" +
+                "    \"yymd\": 4,\n" +
+                "    \"zxqdll\": 1.02,\n" +
+                "    \"tdb\": 1.54,\n" +
+                "    \"medicineAmount\": 27.606,\n" +
+                "    \"delFlag\": 0,\n" +
+                "    \"revision\": null,\n" +
+                "    \"tytjTransientLL\": 0.0101,\n" +
+                "    \"addType\": 1,\n" +
+                "    \"timeBegin\": null,\n" +
+                "    \"timeEnd\": null\n" +
+                "}";
+        TXinyiMedicineParam tXinyiMedicineParam = JSON.parseObject(strJson, TXinyiMedicineParam.class);
+        System.out.println(calculateMedicineByLastRecord(tXinyiMedicineParam));
+    }*/
 }