|
|
|
|
@ -117,6 +117,10 @@ public class ReportProjectController {
|
|
|
|
|
if(CollectionUtil.isNotEmpty(query.getContractTime())){ |
|
|
|
|
wrapper.between("p.contract_time",query.getContractTime().get(0),query.getContractTime().get(1)); |
|
|
|
|
} |
|
|
|
|
//归档时间
|
|
|
|
|
if(CollectionUtil.isNotEmpty(query.getArchivingTime())){ |
|
|
|
|
wrapper.between("p.archiving",query.getArchivingTime().get(0),query.getArchivingTime().get(1)); |
|
|
|
|
} |
|
|
|
|
//服务日期
|
|
|
|
|
if(query.getServiceStartTime()!= null & query.getServiceEndTime()!= null){ |
|
|
|
|
wrapper.ge("p.service_start_time",query.getServiceStartTime()); |
|
|
|
|
@ -127,6 +131,17 @@ public class ReportProjectController {
|
|
|
|
|
if(StrUtil.isNotBlank(query.getCode()) &&!"all".equals(query.getCode()) ){ |
|
|
|
|
wrapper.eq("p.is_recessed",Integer.parseInt(query.getCode())); |
|
|
|
|
} |
|
|
|
|
if (CollectionUtil.isNotEmpty(query.getNodeList())) { |
|
|
|
|
wrapper.in("p.node", query.getNodeList()); |
|
|
|
|
} |
|
|
|
|
if (StrUtil.isNotBlank(query.getAuditLevel())) { |
|
|
|
|
List<String> cityAuditUnitIds = departService.getAllNodeIds(AppConstants.DSZD); |
|
|
|
|
if ("city".equals(query.getAuditLevel())) { |
|
|
|
|
wrapper.in("p.audit_unit_id", cityAuditUnitIds); |
|
|
|
|
} else if ("second".equals(query.getAuditLevel())) { |
|
|
|
|
wrapper.notIn("p.audit_unit_id", cityAuditUnitIds); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (StrUtil.isNotBlank(query.getAuditUnitId())) { |
|
|
|
|
// 获取选择的审计单位及其所有子部门的ID
|
|
|
|
|
wrapper.in("p.audit_unit_id", departService.getAllNodeIds(query.getAuditUnitId())); |
|
|
|
|
@ -137,7 +152,8 @@ public class ReportProjectController {
|
|
|
|
|
//获取登陆人信息
|
|
|
|
|
UserAuth user = UserContextHolder.getCurrentUser(); |
|
|
|
|
log.info("user",user); |
|
|
|
|
boolean firstAuth = AppConstants.USER_TYPE_SUPER.equals(user.getUserType()) || user.getRoleCodes().contains(RoleCodeEnum.FIRST_ADMIN.getCode()); |
|
|
|
|
boolean superAuth = AppConstants.USER_TYPE_SUPER.equals(user.getUserType()); |
|
|
|
|
boolean firstAuth = superAuth || user.getRoleCodes().contains(RoleCodeEnum.FIRST_ADMIN.getCode()); |
|
|
|
|
//非超级管理员 && 非市级管理员
|
|
|
|
|
if( !firstAuth ){ |
|
|
|
|
List<String> orgIds = new ArrayList<>(); |
|
|
|
|
@ -149,8 +165,13 @@ public class ReportProjectController {
|
|
|
|
|
orgIds = departService.getAllNodeIds(user.getDepartId()); |
|
|
|
|
wrapper.in("p.project_unit_id", orgIds); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// 逻辑删除数据仅超级管理员可见
|
|
|
|
|
if (!superAuth) { |
|
|
|
|
wrapper.eq("p.delete_flag", DeleteStatusEnum.NO.getCode()); |
|
|
|
|
} |
|
|
|
|
// 审计层级
|
|
|
|
|
wrapper.eq("p.delete_flag", DeleteStatusEnum.NO.getCode()); |
|
|
|
|
wrapper.orderByDesc("p.crt_time"); |
|
|
|
|
wrapper.groupBy("p.id"); |
|
|
|
|
Page<EntryWindowVo> vo = reportProjectService.getPage(new Page<>(query.getCurrent(), query.getSize()), wrapper); |
|
|
|
|
@ -268,6 +289,12 @@ public class ReportProjectController {
|
|
|
|
|
s.setReductionRate(s.getReductionRate().setScale(2,RoundingMode.HALF_UP)); |
|
|
|
|
s.setNode(FlowEnum.contains(s.getNode())); |
|
|
|
|
}); |
|
|
|
|
for (int i = 0; i < list.size(); i++) { |
|
|
|
|
ConditionVo source = list.get(i); |
|
|
|
|
ConditionExcelVo target = dataList.get(i); |
|
|
|
|
target.setProjectUnit(source.getProjectUnitStr()); |
|
|
|
|
target.setAuditUnit(source.getAuditUnitStr()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//报审金额(元)
|
|
|
|
|
BigDecimal reportMoneySum = dataList.stream().map(ConditionExcelVo::getReportMoney).filter(Objects::nonNull) |
|
|
|
|
|