Ver código fonte

停车场记录

xlq 1 mês atrás
pai
commit
e71e1e1de0

+ 2 - 0
src/main/java/com/qmrb/system/framework/security/config/SecurityConfig.java

@@ -73,6 +73,8 @@ public class SecurityConfig {
     public WebSecurityCustomizer webSecurityCustomizer() {
         return (web) -> web.ignoring()
                 .requestMatchers(
+                        "/api/v1/record/saveBatchOrUpdate",
+                        "/api/v1/barnin_record/saveBatch",
                         "/api/v1/auth/captcha",
                         "/websocket/**",
 //                        "/api/v1/emreditor/**",

+ 3 - 2
src/main/java/com/qmrb/system/pojo/form/BarninRecordForm.java

@@ -1,5 +1,6 @@
 package com.qmrb.system.pojo.form;
 
+import cn.hutool.core.date.DateTime;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 
@@ -20,10 +21,10 @@ public class BarninRecordForm {
     private Long barnId;
     private String placeNo;
     private String carNumber;
-    private Date inTime;
+    private DateTime inTime;
     private String inImage;
     private Integer inChannelId;
-    private Date outTime;
+    private DateTime outTime;
     private Integer outChannelId;
     private Integer status;
     /**

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

@@ -5,17 +5,14 @@ import java.time.LocalDateTime;
 import java.time.ZoneId;
 import java.time.temporal.ChronoUnit;
 import java.util.*;
-import java.util.stream.Collectors;
 
 import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.bean.copier.CopyOptions;
 import cn.hutool.core.date.DateUnit;
 import cn.hutool.core.date.DateUtil;
 import com.qmrb.system.pojo.entity.CarPark;
 import com.qmrb.system.pojo.entity.MyCarPlateNumber;
 import com.qmrb.system.service.ICarParkService;
 import com.qmrb.system.service.IMyCarPlateNumberService;
-import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -193,6 +190,7 @@ public class BarnRecordServiceImpl extends ServiceImpl<BarnRecordMapper, BarnRec
     public List<BarnRecordForm> saveBatchOrUpdate(@Valid List<BarnRecordForm> list) {
         List<BarnRecord> saveList = new ArrayList<>();
         List<BarnRecord> updateList = new ArrayList<>();
+        List<BarnRecord> result = new ArrayList<>();
         for (BarnRecordForm barnRecordForm : list) {
             BarnRecord barnRecord = new BarnRecord();
             BeanUtil.copyProperties(barnRecordForm, barnRecord);