|
@@ -30,6 +30,7 @@ import org.springframework.stereotype.Service;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
@@ -110,22 +111,23 @@ public class PassreCordsServiceImpl extends BaseService implements PassreCordsSe
|
|
|
Page<WarningVO> page = new Page<>(warningSearch.getPageNum(),warningSearch.getPageSize());
|
|
|
IPage<WarningVO> pageList =passreCordsMapper.warningPageList(page,warningSearch);
|
|
|
List<WarningVO> records = pageList.getRecords();
|
|
|
- /*获取数据中companyMap 和barnchMap*/
|
|
|
- Map<String, Company> companyMap = companyService.getCompanyMapByList(records,WarningVO::getCompanyId);
|
|
|
- Map<String, Company> barnchMap = companyService.getBranchMapByList(records,WarningVO::getBranchId);
|
|
|
+
|
|
|
/*获取id列表 并根据idList获取数据列表*/
|
|
|
List<Integer> idList = records.stream().map(WarningVO::getId).collect(Collectors.toList());
|
|
|
LambdaQueryWrapper<PassreCords> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
lambdaQueryWrapper.in(PassreCords::getId, idList);
|
|
|
+ lambdaQueryWrapper.orderByDesc(PassreCords::getId);
|
|
|
List<PassreCords> passreCords = passreCordsMapper.selectList(lambdaQueryWrapper);
|
|
|
Map<Integer, PassreCords> map = passreCords.stream().collect(Collectors.toMap(PassreCords::getId, Function.identity()));
|
|
|
-
|
|
|
+// /*获取数据中companyMap 和barnchMap*/
|
|
|
+// Map<String, Company> companyMap = companyService.getCompanyMapByList(passreCords,PassreCords::getCompanyId);
|
|
|
+// Map<String, Company> barnchMap = companyService.getBranchMapByList(passreCords,PassreCords::getBranchId);
|
|
|
/*数据填入*/
|
|
|
for (WarningVO record : records) {
|
|
|
BeanUtils.copyProperties(map.get(record.getId()),record);
|
|
|
- record.setCompanyName(companyMap.get(record.getCompanyId()) == null?"" : companyMap.get(record.getCompanyId()).getCompanyName());
|
|
|
- record.setBranchName(barnchMap.get(record.getCompanyId()+record.getBranchId()) == null ?
|
|
|
- "" : barnchMap.get(record.getCompanyId()+record.getBranchId()).getBranchName()).getBranchName();
|
|
|
+// record.setCompanyName(companyMap.get(record.getCompanyId()) == null?"" : companyMap.get(record.getCompanyId()).getCompanyName());
|
|
|
+// record.setBranchName(barnchMap.get(record.getCompanyId()+record.getBranchId()) == null ?
|
|
|
+// "" : barnchMap.get(record.getCompanyId()+record.getBranchId()).getBranchName()).getBranchName();
|
|
|
}
|
|
|
|
|
|
return pageList;
|
|
@@ -209,6 +211,10 @@ public class PassreCordsServiceImpl extends BaseService implements PassreCordsSe
|
|
|
// }
|
|
|
if(type == 2){
|
|
|
wrapper.select(PassreCords.class,p ->!p.getColumn().equals("scene_photo"));
|
|
|
+ List<Integer> list = new ArrayList<>();
|
|
|
+ list.add(0);
|
|
|
+ list.add(1);
|
|
|
+ wrapper.in(PassreCords::getPass, list);
|
|
|
}
|
|
|
|
|
|
JPersonVO userInfo = jPersonsService.getUserInfo();
|