| 
														
															@@ -13,8 +13,10 @@ import com.qmrb.system.pojo.form.BarninRecordForm; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.qmrb.system.pojo.vo.BarninRecordVO; 
														 | 
														
														 | 
														
															 import com.qmrb.system.pojo.vo.BarninRecordVO; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.qmrb.system.pojo.query.BarninRecordQuery; 
														 | 
														
														 | 
														
															 import com.qmrb.system.pojo.query.BarninRecordQuery; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.qmrb.system.mapper.BarninRecordMapper; 
														 | 
														
														 | 
														
															 import com.qmrb.system.mapper.BarninRecordMapper; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import com.qmrb.system.service.IBarnRecordService; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.qmrb.system.service.IBarninRecordService; 
														 | 
														
														 | 
														
															 import com.qmrb.system.service.IBarninRecordService; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 
														 | 
														
														 | 
														
															 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import org.springframework.beans.factory.annotation.Autowired; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import org.springframework.stereotype.Service; 
														 | 
														
														 | 
														
															 import org.springframework.stereotype.Service; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import cn.hutool.core.lang.Assert; 
														 | 
														
														 | 
														
															 import cn.hutool.core.lang.Assert; 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -38,6 +40,8 @@ import java.util.stream.Collectors; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 public class BarninRecordServiceImpl extends ServiceImpl<BarninRecordMapper, BarninRecord> implements IBarninRecordService { 
														 | 
														
														 | 
														
															 public class BarninRecordServiceImpl extends ServiceImpl<BarninRecordMapper, BarninRecord> implements IBarninRecordService { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     private final BarninRecordConverter converter; 
														 | 
														
														 | 
														
															     private final BarninRecordConverter converter; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    @Autowired 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    private IBarnRecordService barnRecordService; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     /** 
														 | 
														
														 | 
														
															     /** 
														 | 
													
												
											
												
													
														| 
														 | 
														
															      * 分页查询 
														 | 
														
														 | 
														
															      * 分页查询 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -111,7 +115,7 @@ public class BarninRecordServiceImpl extends ServiceImpl<BarninRecordMapper, Bar 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 .filter(id -> id != null) 
														 | 
														
														 | 
														
															                 .filter(id -> id != null) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 .collect(Collectors.toList()); 
														 | 
														
														 | 
														
															                 .collect(Collectors.toList()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        // 删除数据库中存在这些 id 的数据 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        // 删除数据库中存在这些 id 的数据 插入停车入场记录 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         if (!CollectionUtil.isEmpty(idsToDelete)) { 
														 | 
														
														 | 
														
															         if (!CollectionUtil.isEmpty(idsToDelete)) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             this.removeByIds(idsToDelete); 
														 | 
														
														 | 
														
															             this.removeByIds(idsToDelete); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         } 
														 | 
														
														 | 
														
															         } 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -119,8 +123,21 @@ public class BarninRecordServiceImpl extends ServiceImpl<BarninRecordMapper, Bar 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             BarninRecord barninRecord = new BarninRecord(); 
														 | 
														
														 | 
														
															             BarninRecord barninRecord = new BarninRecord(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             BeanUtil.copyProperties(barninRecordForm, barninRecord); 
														 | 
														
														 | 
														
															             BeanUtil.copyProperties(barninRecordForm, barninRecord); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 			saveList.add(barninRecord); 
														 | 
														
														 | 
														
															 			saveList.add(barninRecord); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            // 更新停车记录表 根据placeNo,carNumber,inTime定位该条数据 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            List<BarnRecord> equalList = barnRecordService.list(new LambdaQueryWrapper<BarnRecord>() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    .eq(BarnRecord::getPlaceNo, barninRecordForm.getPlaceNo()) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    .eq(BarnRecord::getCarNumber, barninRecordForm.getCarNumber()) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    .eq(BarnRecord::getInTime, barninRecordForm.getInTime()) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            ); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            if (CollectionUtil.isEmpty(equalList)) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                // 如果不存在,则更新停车记录 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                BarnRecord barnRecord = new BarnRecord(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                BeanUtil.copyProperties(barninRecordForm, barnRecord,"id"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                barnRecordService.save(barnRecord); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         } 
														 | 
														
														 | 
														
															         } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         boolean saveFlag = this.saveBatch(saveList); 
														 | 
														
														 | 
														
															         boolean saveFlag = this.saveBatch(saveList); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         return list; 
														 | 
														
														 | 
														
															         return list; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 |