|
@@ -4763,8 +4763,29 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
@Override
|
|
|
public List<SubInfoTotalExcel> getFixTotalExcel(SubInfoQueryTzVO vo) {
|
|
|
|
|
|
+ //查询出行业分类
|
|
|
+ List<SubIndu> subInduList = subInduService.selectAllSubIndu();
|
|
|
+
|
|
|
+ //保存行业code
|
|
|
+ List<String> indusKinds = new ArrayList<>();
|
|
|
+ //判断搜索条件中是否有行业分类条件
|
|
|
+ if (StringUtils.isNotBlank(vo.getIndusKind())) {
|
|
|
+ //在subInduList中找到code=queryVO.getIndusKinds()的数据
|
|
|
+ SubIndu subIndu = subInduList.stream().filter(item -> item.getCode().equals(vo.getIndusKind())).findFirst().orElse(null);
|
|
|
+
|
|
|
+ if (subIndu != null){
|
|
|
+ //判断这个行业是不是上级行业
|
|
|
+ if (StringUtils.isBlank(subIndu.getLastId())){
|
|
|
+ // 这个行业是上级行业,需要找到所有下级行业的code
|
|
|
+ indusKinds = subInduList.stream().filter(item -> item.getLastId() != null && item.getLastId().equals(subIndu.getId())).map(SubIndu::getCode).collect(Collectors.toList());
|
|
|
+ }else {
|
|
|
+ indusKinds.add(subIndu.getCode());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// 查询具体的sql数据
|
|
|
- List<SubInfoTotalExcel> dataList = subInfoMapper.getFixTotalExcel(vo.getStateFix(),vo.getYear());
|
|
|
+ List<SubInfoTotalExcel> dataList = subInfoMapper.getFixTotalExcel(vo.getStateFix(),vo.getYear(),vo.getSubName(),indusKinds,vo.getSbdw(),vo.getSubjectId(),vo.getStartAmt(),vo.getEndAmt());
|
|
|
|
|
|
return dataList;
|
|
|
}
|
|
@@ -4772,9 +4793,32 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
@Override
|
|
|
public List<SubInfoFixDetail> exportFixDetailExcel(SubInfoQueryTzVO vo) {
|
|
|
|
|
|
+ // 获取行业
|
|
|
+ List<SubIndu> subInduList = Optional.ofNullable(
|
|
|
+ subInduService.selectAllSubIndu()
|
|
|
+ ).orElse(Collections.emptyList());
|
|
|
+
|
|
|
+ //保存行业code
|
|
|
+ List<String> indusKinds = new ArrayList<>();
|
|
|
+ //判断搜索条件中是否有行业分类条件
|
|
|
+ if (StringUtils.isNotBlank(vo.getIndusKind())) {
|
|
|
+ //在subInduList中找到code=queryVO.getIndusKinds()的数据
|
|
|
+ SubIndu subIndu = subInduList.stream().filter(item -> item.getCode().equals(vo.getIndusKind())).findFirst().orElse(null);
|
|
|
+
|
|
|
+ if (subIndu != null){
|
|
|
+ //判断这个行业是不是上级行业
|
|
|
+ if (StringUtils.isBlank(subIndu.getLastId())){
|
|
|
+ // 这个行业是上级行业,需要找到所有下级行业的code
|
|
|
+ indusKinds = subInduList.stream().filter(item -> item.getLastId() != null && item.getLastId().equals(subIndu.getId())).map(SubIndu::getCode).collect(Collectors.toList());
|
|
|
+ }else {
|
|
|
+ indusKinds.add(subIndu.getCode());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// 查询所有的重点项目信息,若结果为空则初始化为一个空列表
|
|
|
List<SubInfoFixDetail> dataList = Optional.ofNullable(
|
|
|
- subInfoMapper.exportFixDetailExcel(vo.getStateFix(), vo.getYear())
|
|
|
+ subInfoMapper.exportFixDetailExcel(vo.getStateFix(), vo.getYear(),vo.getSubName(),indusKinds,vo.getSbdw(),vo.getSubjectId(),vo.getStartAmt(),vo.getEndAmt())
|
|
|
).orElse(Collections.emptyList());
|
|
|
|
|
|
// 收集所有重点项目信息的ID
|
|
@@ -4788,11 +4832,6 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
subInfoMapper.selectSubPreNewBySubIds(subIdList)
|
|
|
).orElse(Collections.emptyList());
|
|
|
|
|
|
- // 获取行业
|
|
|
- List<SubIndu> subInduList = Optional.ofNullable(
|
|
|
- subInduService.selectAllSubIndu()
|
|
|
- ).orElse(Collections.emptyList());
|
|
|
-
|
|
|
|
|
|
//对手续信息按照id进行分组
|
|
|
Map<String, List<SubInfoFixDetailPreNew>> preNewMap = preNewList.stream().collect(Collectors.groupingBy(SubInfoFixDetailPreNew::getSubId));
|
|
@@ -4867,9 +4906,33 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
@Override
|
|
|
public List<SubInfoFixCbDetail> exportFixCbDetailExcel(SubInfoQueryTzVO vo) {
|
|
|
|
|
|
+ // 获取行业
|
|
|
+ List<SubIndu> subInduList = Optional.ofNullable(
|
|
|
+ subInduService.selectAllSubIndu()
|
|
|
+ ).orElse(Collections.emptyList());
|
|
|
+
|
|
|
+ //保存行业code
|
|
|
+ List<String> indusKinds = new ArrayList<>();
|
|
|
+ //判断搜索条件中是否有行业分类条件
|
|
|
+ if (StringUtils.isNotBlank(vo.getIndusKind())) {
|
|
|
+ //在subInduList中找到code=queryVO.getIndusKinds()的数据
|
|
|
+ SubIndu subIndu = subInduList.stream().filter(item -> item.getCode().equals(vo.getIndusKind())).findFirst().orElse(null);
|
|
|
+
|
|
|
+ if (subIndu != null){
|
|
|
+ //判断这个行业是不是上级行业
|
|
|
+ if (StringUtils.isBlank(subIndu.getLastId())){
|
|
|
+ // 这个行业是上级行业,需要找到所有下级行业的code
|
|
|
+ indusKinds = subInduList.stream().filter(item -> item.getLastId() != null && item.getLastId().equals(subIndu.getId())).map(SubIndu::getCode).collect(Collectors.toList());
|
|
|
+ }else {
|
|
|
+ indusKinds.add(subIndu.getCode());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
// 查询所有的重点项目信息,若结果为空则初始化为一个空列表
|
|
|
List<SubInfoFixCbDetail> dataList = Optional.ofNullable(
|
|
|
- subInfoMapper.exportFixCbDetailExcel(vo.getStateFix(), vo.getYear())
|
|
|
+ subInfoMapper.exportFixCbDetailExcel(vo.getStateFix(), vo.getYear(),vo.getSubName(),indusKinds,vo.getSbdw(),vo.getSubjectId(),vo.getStartAmt(),vo.getEndAmt())
|
|
|
).orElse(Collections.emptyList());
|
|
|
|
|
|
// 获取项目建设地点
|
|
@@ -4877,11 +4940,6 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
tSysTableService.getByKind(SysTableKind.JSDD)
|
|
|
).orElse(Collections.emptyList());
|
|
|
|
|
|
- // 获取行业
|
|
|
- List<SubIndu> subInduList = Optional.ofNullable(
|
|
|
- subInduService.selectAllSubIndu()
|
|
|
- ).orElse(Collections.emptyList());
|
|
|
-
|
|
|
// 遍历重点项目信息,找到对应的前期手续信息,然后拼接手续完成情况为字符串,拼接到对应的重点项目信息中
|
|
|
dataList.forEach(e->{
|
|
|
//设置项目所在地
|
|
@@ -4918,9 +4976,32 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
@Override
|
|
|
public List<SubInfoFixZjDetail> exportFixZjDetailExcel(SubInfoQueryTzVO vo) {
|
|
|
|
|
|
+ // 获取行业
|
|
|
+ List<SubIndu> subInduList = Optional.ofNullable(
|
|
|
+ subInduService.selectAllSubIndu()
|
|
|
+ ).orElse(Collections.emptyList());
|
|
|
+
|
|
|
+ //保存行业code
|
|
|
+ List<String> indusKinds = new ArrayList<>();
|
|
|
+ //判断搜索条件中是否有行业分类条件
|
|
|
+ if (StringUtils.isNotBlank(vo.getIndusKind())) {
|
|
|
+ //在subInduList中找到code=queryVO.getIndusKinds()的数据
|
|
|
+ SubIndu subIndu = subInduList.stream().filter(item -> item.getCode().equals(vo.getIndusKind())).findFirst().orElse(null);
|
|
|
+
|
|
|
+ if (subIndu != null){
|
|
|
+ //判断这个行业是不是上级行业
|
|
|
+ if (StringUtils.isBlank(subIndu.getLastId())){
|
|
|
+ // 这个行业是上级行业,需要找到所有下级行业的code
|
|
|
+ indusKinds = subInduList.stream().filter(item -> item.getLastId() != null && item.getLastId().equals(subIndu.getId())).map(SubIndu::getCode).collect(Collectors.toList());
|
|
|
+ }else {
|
|
|
+ indusKinds.add(subIndu.getCode());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// 查询所有的重点项目信息,若结果为空则初始化为一个空列表
|
|
|
List<SubInfoFixZjDetail> dataList = Optional.ofNullable(
|
|
|
- subInfoMapper.exportFixZjDetailExcel(vo.getStateFix(), vo.getYear())
|
|
|
+ subInfoMapper.exportFixZjDetailExcel(vo.getStateFix(), vo.getYear(),vo.getSubName(),indusKinds,vo.getSbdw(),vo.getSubjectId(),vo.getStartAmt(),vo.getEndAmt())
|
|
|
).orElse(Collections.emptyList());
|
|
|
|
|
|
//获取所有SubInfoFixZjDetail的id
|
|
@@ -4945,11 +5026,6 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
tSysTableService.getByKind(SysTableKind.JSDD)
|
|
|
).orElse(Collections.emptyList());
|
|
|
|
|
|
- // 获取行业
|
|
|
- List<SubIndu> subInduList = Optional.ofNullable(
|
|
|
- subInduService.selectAllSubIndu()
|
|
|
- ).orElse(Collections.emptyList());
|
|
|
-
|
|
|
// 遍历重点项目信息,找到对应的前期手续信息,然后拼接手续完成情况为字符串,拼接到对应的重点项目信息中
|
|
|
dataList.forEach(e->{
|
|
|
//设置项目所在地
|
|
@@ -4993,9 +5069,32 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
@Override
|
|
|
public List<SubInfoFixTcDetail> exportFixTcDetailExcel(SubInfoQueryTzVO vo) {
|
|
|
|
|
|
+ // 获取行业
|
|
|
+ List<SubIndu> subInduList = Optional.ofNullable(
|
|
|
+ subInduService.selectAllSubIndu()
|
|
|
+ ).orElse(Collections.emptyList());
|
|
|
+
|
|
|
+ //保存行业code
|
|
|
+ List<String> indusKinds = new ArrayList<>();
|
|
|
+ //判断搜索条件中是否有行业分类条件
|
|
|
+ if (StringUtils.isNotBlank(vo.getIndusKind())) {
|
|
|
+ //在subInduList中找到code=queryVO.getIndusKinds()的数据
|
|
|
+ SubIndu subIndu = subInduList.stream().filter(item -> item.getCode().equals(vo.getIndusKind())).findFirst().orElse(null);
|
|
|
+
|
|
|
+ if (subIndu != null){
|
|
|
+ //判断这个行业是不是上级行业
|
|
|
+ if (StringUtils.isBlank(subIndu.getLastId())){
|
|
|
+ // 这个行业是上级行业,需要找到所有下级行业的code
|
|
|
+ indusKinds = subInduList.stream().filter(item -> item.getLastId() != null && item.getLastId().equals(subIndu.getId())).map(SubIndu::getCode).collect(Collectors.toList());
|
|
|
+ }else {
|
|
|
+ indusKinds.add(subIndu.getCode());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// 查询所有的重点项目信息,若结果为空则初始化为一个空列表
|
|
|
List<SubInfoFixTcDetail> dataList = Optional.ofNullable(
|
|
|
- subInfoMapper.exportFixTcDetailExcel(vo.getStateFix(), vo.getYear())
|
|
|
+ subInfoMapper.exportFixTcDetailExcel(vo.getStateFix(), vo.getYear(),vo.getSubName(),indusKinds,vo.getSbdw(),vo.getSubjectId(),vo.getStartAmt(),vo.getEndAmt())
|
|
|
).orElse(Collections.emptyList());
|
|
|
|
|
|
// 获取项目建设地点
|
|
@@ -5003,11 +5102,6 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
tSysTableService.getByKind(SysTableKind.JSDD)
|
|
|
).orElse(Collections.emptyList());
|
|
|
|
|
|
- // 获取行业
|
|
|
- List<SubIndu> subInduList = Optional.ofNullable(
|
|
|
- subInduService.selectAllSubIndu()
|
|
|
- ).orElse(Collections.emptyList());
|
|
|
-
|
|
|
// 遍历重点项目信息,找到对应的前期手续信息,然后拼接手续完成情况为字符串,拼接到对应的重点项目信息中
|
|
|
dataList.forEach(e->{
|
|
|
//设置项目所在地
|