Quellcode durchsuchen

修复中亚蒸汽计算BUG

wukai vor 2 Tagen
Ursprung
Commit
89cc522325

+ 8 - 3
jjt-admin/src/test/java/com/jjt/data/ElecTest.java

@@ -7,6 +7,7 @@ import com.jjt.ws.service.ITwinWorkshopCalcService;
 import javafx.util.Pair;
 import org.junit.jupiter.api.Test;
 import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.ActiveProfiles;
 
 import javax.annotation.Resource;
 import java.math.BigDecimal;
@@ -17,6 +18,7 @@ import java.util.Map;
  * 印花机
  */
 @SpringBootTest(classes = JjtApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
+@ActiveProfiles("devp")
 public class ElecTest {
     @Resource
     private ITwinWorkshopCalcService calcService;
@@ -27,10 +29,13 @@ public class ElecTest {
 
     @Test
     void test() {
-        String st = "2025-03-07";
+        String st = "2025-06-03";
         LocalDate localDate = LocalDate.parse(st);
-        Map<Integer, Pair<String, BigDecimal>> result = priceService.getPrice(localDate);
-        System.err.println(result);
+
+        calcService.calc(localDate);
+
+//        Map<Integer, Pair<String, BigDecimal>> result = priceService.getPrice(localDate);
+//        System.err.println(result);
     }
 
 }

+ 1 - 1
jjt-admin/src/test/java/com/jjt/task/YhjTaskTest.java

@@ -21,7 +21,7 @@ import java.time.LocalTime;
  * @date 2024/5/7 11:49
  */
 @SpringBootTest(classes = JjtApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
-@ActiveProfiles("devp")
+//@ActiveProfiles("devp")
 public class YhjTaskTest {
     @Resource
     private ITwinCalcDayYhjService dayService;

+ 4 - 4
jjt-biz/src/main/java/com/jjt/ws/service/impl/TwinRzCalcMonthServiceImpl.java

@@ -183,10 +183,10 @@ public class TwinRzCalcMonthServiceImpl implements ITwinRzCalcMonthService {
                     vo.setQLowUse(calc.getTotalValue());
                     break;
                 case "WS03-Q-ZY":
-                    if (vo.getQMidUse() != null && vo.getQMidUse().intValue() != 0) {
-                        vo.setQMidPrice(calc.getTotalPrice());
-                        vo.setQMidUse(calc.getTotalValue());
-                    }
+//                    if (vo.getQMidUse() != null && vo.getQMidUse().intValue() != 0) {
+                    vo.setQMidPrice(calc.getTotalPrice());
+                    vo.setQMidUse(calc.getTotalValue());
+//                    }
                     break;
                 default:
             }