guoshuai 4 semanas atrás
pai
commit
48d7595e74

+ 2 - 2
src/main/java/com/qmrb/system/service/impl/BarnRecordServiceImpl.java

@@ -121,7 +121,7 @@ public class BarnRecordServiceImpl extends ServiceImpl<BarnRecordMapper, BarnRec
             }
 
             if(record.getBillingStartTime() == null){
-                record.setBillingStartTime(new Date());
+                record.setBillingStartTime(record.getInTime());
             }
             // 计算计费时长
             if (record.getOutTime() != null) {
@@ -207,7 +207,7 @@ public class BarnRecordServiceImpl extends ServiceImpl<BarnRecordMapper, BarnRec
         BarnRecordForm form = converter.entity2Form(entity);
 
         if(form.getBillingStartTime() == null){
-            form.setBillingStartTime(new Date());
+            form.setBillingStartTime(form.getInTime());
         }
         // 计算计费时长
         if (form.getOutTime() != null) {