|
@@ -9,12 +9,15 @@ import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
+import com.github.pagehelper.PageHelper;
|
|
|
+import com.github.pagehelper.PageInfo;
|
|
|
import com.google.common.base.Strings;
|
|
|
import com.rtrh.projects.modules.projects.dao.SubAmtPlanDao;
|
|
|
import com.rtrh.projects.modules.projects.dao.SubLabelDao;
|
|
|
import com.rtrh.projects.modules.projects.dao.SubSourceDao;
|
|
|
import com.rtrh.projects.modules.projects.po.SubAmtPlan;
|
|
|
import com.rtrh.projects.modules.projects.po.SubInfo;
|
|
|
+import com.rtrh.projects.modules.projects.po.SubInfoGxj;
|
|
|
import com.rtrh.projects.modules.projects.service.SubRptContService;
|
|
|
import com.rtrh.projects.modules.projects.vo.*;
|
|
|
import com.rtrh.projects.modules.projects.vo.export.SubInfoFixVO;
|
|
@@ -23,6 +26,7 @@ import com.rtrh.projects.modules.system.enums.SysTableKind;
|
|
|
import com.rtrh.projects.modules.system.po.JUnit;
|
|
|
import com.rtrh.projects.modules.system.po.TSystable;
|
|
|
import com.rtrh.projects.modules.system.service.TSysTableService;
|
|
|
+import com.rtrh.projects.modules.system.vo.PersonInfoVO;
|
|
|
import com.rtrh.projects.modules.utils.DateUtils;
|
|
|
import com.rtrh.projects.vo.statics.OtherQueryVO;
|
|
|
import com.rtrh.projects.vo.statics.ProjectQueryVO;
|
|
@@ -88,7 +92,7 @@ public class SubInfoQueryServiceImpl implements SubInfoQueryService {
|
|
|
map.put("kg", 0);
|
|
|
map.put("qq", 0);
|
|
|
map.put("jg", 0);
|
|
|
- if (subInfo != null){
|
|
|
+ if (subInfo != null) {
|
|
|
// 1、月报超期情况:查询sub_rpt_cont表中是否有本项目上月的月报 超期5天以上亮红灯,超期5天内亮黄灯
|
|
|
if (subInfo.getStatus().equals(ProjectStatusEnum.YKG.getKey())) {
|
|
|
// 获取当前年份
|
|
@@ -108,8 +112,8 @@ public class SubInfoQueryServiceImpl implements SubInfoQueryService {
|
|
|
}
|
|
|
}
|
|
|
// 2、开工超期情况:根据项目计划开工日期和当前日期进行比较,如果项目还处于新建或储备阶段,日期已经过去的话,则开工超期警告
|
|
|
- if (subInfo.getStatus().equals(ProjectStatusEnum.PRE.getKey()) || subInfo.getStatus().equals(ProjectStatusEnum.DKG.getKey())){
|
|
|
- if (subInfo.getBeginDate() != null && subInfo.getBeginDate().compareTo(new Date()) < 0){
|
|
|
+ if (subInfo.getStatus().equals(ProjectStatusEnum.PRE.getKey()) || subInfo.getStatus().equals(ProjectStatusEnum.DKG.getKey())) {
|
|
|
+ if (subInfo.getBeginDate() != null && subInfo.getBeginDate().compareTo(new Date()) < 0) {
|
|
|
map.put("kg", 2);
|
|
|
}
|
|
|
}
|
|
@@ -119,20 +123,20 @@ public class SubInfoQueryServiceImpl implements SubInfoQueryService {
|
|
|
String status = "1"; // 1代表需要办理,2代表无需办理
|
|
|
String statusConf = "1"; // 0-未开始办理 1-开始办理 2-办理完成 3-退回
|
|
|
String logicDeleteFlag = "0"; // 代表记录未被删除
|
|
|
- Integer preNewRedCount = subInfoMapper.selectSubPreNewRed(subId,status,statusConf,logicDeleteFlag);
|
|
|
- if (!subInfo.getStatus().equals(ProjectStatusEnum.TEMPSAVE.getKey()) && preNewRedCount > 0){
|
|
|
+ Integer preNewRedCount = subInfoMapper.selectSubPreNewRed(subId, status, statusConf, logicDeleteFlag);
|
|
|
+ if (!subInfo.getStatus().equals(ProjectStatusEnum.TEMPSAVE.getKey()) && preNewRedCount > 0) {
|
|
|
map.put("qq", 2);
|
|
|
- }else if (!subInfo.getStatus().equals(ProjectStatusEnum.TEMPSAVE.getKey())){
|
|
|
+ } else if (!subInfo.getStatus().equals(ProjectStatusEnum.TEMPSAVE.getKey())) {
|
|
|
// 判断是否有黄灯手续
|
|
|
- Integer preNewYellowCount = subInfoMapper.selectSubPreNewYellow(subId,status,statusConf,logicDeleteFlag);
|
|
|
+ Integer preNewYellowCount = subInfoMapper.selectSubPreNewYellow(subId, status, statusConf, logicDeleteFlag);
|
|
|
if (preNewYellowCount > 0) {
|
|
|
map.put("qq", 1);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// 4、竣工超期情况:查询项目竣工日期和当前日期进行比较,如果项目已经竣工,则项目竣工超期
|
|
|
- if (!subInfo.getStatus().equals(ProjectStatusEnum.TEMPSAVE.getKey()) && !subInfo.getStatus().equals(ProjectStatusEnum.END.getKey())){
|
|
|
- if (subInfo.getEndDate() != null && subInfo.getEndDate().compareTo(new Date()) < 0){
|
|
|
+ if (!subInfo.getStatus().equals(ProjectStatusEnum.TEMPSAVE.getKey()) && !subInfo.getStatus().equals(ProjectStatusEnum.END.getKey())) {
|
|
|
+ if (subInfo.getEndDate() != null && subInfo.getEndDate().compareTo(new Date()) < 0) {
|
|
|
map.put("jg", 2);
|
|
|
}
|
|
|
}
|
|
@@ -142,6 +146,30 @@ public class SubInfoQueryServiceImpl implements SubInfoQueryService {
|
|
|
return map;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Page queryPage(Page page, LoginUserVO loginUser, SubInfoQueryTzVO queryVO) {
|
|
|
+ PageHelper.startPage(page.getPageNo(), page.getPageSize());
|
|
|
+ if (StringUtils.isNotBlank(queryVO.getStartAmt()))
|
|
|
+ queryVO.setStartAmt(new BigDecimal(queryVO.getStartAmt()).multiply(new BigDecimal("10000")).toString());
|
|
|
+ if (StringUtils.isNotBlank(queryVO.getEndAmt())) {
|
|
|
+ queryVO.setEndAmt(new BigDecimal(queryVO.getEndAmt()).multiply(new BigDecimal("10000")).toString());
|
|
|
+ }
|
|
|
+ List<SubInfoGxj> data = subInfoMapper.queryPage(queryVO);
|
|
|
+ PageInfo<SubInfoGxj> pageInfo = new PageInfo<>(data);
|
|
|
+ page.setList(data);
|
|
|
+ List<TSystable> byKind = tSysTableService.getByKind(SysTableKind.JSDD);
|
|
|
+ if (CollectionUtil.isNotEmpty(data)) {
|
|
|
+ data.forEach(e ->
|
|
|
+ byKind.stream()
|
|
|
+ .filter(k -> e.getSubjectId().equals(k.getCode()))
|
|
|
+ .findFirst()
|
|
|
+ .ifPresent(k -> e.setSubjectName(k.getTitle()))
|
|
|
+ );
|
|
|
+ }
|
|
|
+ page.setTotalCount(pageInfo.getTotal());
|
|
|
+ return page;
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public Page pageAll(Page page, LoginUserVO loginUserVO, SubInfoQueryTzVO queryTzVO) {
|
|
|
StringBuffer sql = new StringBuffer();
|