소스 검색

2-11、2-4

yangyj 4 주 전
부모
커밋
2f26c92f95

+ 7 - 3
blade-service/blade-manager/src/main/java/com/mixsmart/utils/CustomFunction.java

@@ -17,6 +17,7 @@ import org.springblade.manager.dto.ParamElements;
 import java.math.BigDecimal;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
+import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.util.*;
 import java.util.concurrent.atomic.AtomicInteger;
@@ -914,8 +915,8 @@ public class CustomFunction {
         return timePassed(t1, t2, "D", 0, "yyyy-MM-dd");
     }
 
-/*    public static void main(String[] args) {
-        LocalDateTime ldt1= LocalDateTime.now();
+   /* public static void main(String[] args) {
+       *//* LocalDateTime ldt1= LocalDateTime.now();
         LocalDateTime ldt2=ldt1.minusDays(-1);
         LocalDateTime ldt3=ldt1.minusDays(120L);
         System.out.println(daysPassed(ldt2,ldt1));
@@ -923,7 +924,10 @@ public class CustomFunction {
         System.out.println(hoursPassed(ldt2,ldt1));
         System.out.println(hoursPassed(ldt3,ldt1));
         System.out.println(minutesPassed(ldt2,ldt1));
-        System.out.println(minutesPassed(ldt3,ldt1));
+        System.out.println(minutesPassed(ldt3,ldt1));*//*
+      *//*  LocalDate t1 = LocalDate.of(2023, 1, 1);
+        LocalDate t2 = LocalDate.of(2023, 1, 1);t2=t2.plusDays(1);
+        System.out.println(timePassed(t1, t2, "D", 0, "yyyy-MM-dd"));*//*
     }*/
 
     public static Object hoursPassed(Object t1, Object t2) {

+ 3 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/formula/impl/ExecutorInit.java

@@ -82,8 +82,10 @@ public class ExecutorInit extends FormulaExecutor {
     }
     private MeterPeriodInfo addPeriodInfo(){
         /*加载合同材料、材料清单*/
-        tec.meterInfo.setMaterialsAll(materialFormFc.apply(tec.getContractId()));
+       /* tec.meterInfo.setMaterialsAll(materialFormFc.apply(tec.getContractId())); 中期计量支取关联的部分*/
         if(MeterType.MATERIAL.equals(tec.getMeterType())||MeterType.START.equals(tec.getMeterType())||MeterType.START_JL.equals(tec.getMeterType())){
+            /*加载合同材料、材料清单*/
+            tec.meterInfo.setMaterialsAll(materialFormFc.apply(tec.getContractId()));
             /*加载计量期信息*/
             tec.periodInfo=meterPeriodFc.apply(tec.getReportId());
         }else if(MeterType.INTERIM.equals(tec.getMeterType())||MeterType.INTERIM_JL.equals(tec.getMeterType())){

+ 3 - 2
blade-service/blade-manager/src/main/java/org/springblade/manager/formula/impl/ExecutorMeter.java

@@ -1943,8 +1943,9 @@ public class ExecutorMeter extends FormulaExecutor {
                 /*延长时间*/
                 int extended=BaseUtils.obj2IntegerZero(totalDay)-BaseUtils.obj2IntegerZero(contractDay);
                 /*已过去*/
-                String passDay=CustomFunction.join(CustomFunction.daysPassed(baseInfo.getStartDate(), LocalDate.now()),"").toString();
-
+                /*String passDay=CustomFunction.join(CustomFunction.daysPassed(baseInfo.getStartDate(), LocalDate.now()),"").toString();改为过去时间=计量期结束日期-开工日期 20241101 王博念提需求*/
+                LocalDate ld =tec.periodInfo.getEndDate().plusDays(1);
+                String passDay=CustomFunction.join(CustomFunction.daysPassed(baseInfo.getStartDate(), ld),"").toString();
                 String provisionalSum=tec.meterInfo.getBaseInfo().getProvisionalSum();
                 String BOQAmount=tec.meterInfo.getBaseInfo().getBOQAmount();
                 BigDecimal contractTotal=tec.meterInfo.getInventoryForms().stream().map(e->BaseUtils.str2BigDecimal(e.getContractMoney())).reduce(BigDecimal.ZERO,BigDecimal::add);