Browse Source

【口岸监管服务系统】企业资质备案,申报时间比录入时间还早?

heguanxun 3 months ago
parent
commit
546f22659c

+ 8 - 0
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/qyrecord/service/impl/QyRecordServiceImpl.java

@@ -34,6 +34,7 @@ import vip.xiaonuo.biz.modular.qyrecord.param.QyRecordIdParam;
 import vip.xiaonuo.biz.modular.qyrecord.param.QyRecordPageParam;
 import vip.xiaonuo.biz.modular.qyrecord.service.QyRecordService;
 
+import java.util.Date;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -92,6 +93,13 @@ public class QyRecordServiceImpl extends ServiceImpl<QyRecordMapper, QyRecord> i
     @Override
     public void add(QyRecordAddParam qyRecordAddParam) {
         QyRecord qyRecord = BeanUtil.toBean(qyRecordAddParam, QyRecord.class);
+        qyRecord.setCreateTime(new Date());
+        Date createTime = qyRecord.getCreateTime();
+        Date applyTime = qyRecord.getApplyTime();
+        int i = applyTime.compareTo(createTime);
+        if (i<0){
+            qyRecord.setCreateTime(applyTime);
+        }
         this.save(qyRecord);
     }