|
@@ -4879,13 +4879,10 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
@Override
|
|
|
public SubInfoGxj findById(String subId) {
|
|
|
SubInfoGxj subInfo = subInfoMapper.findById(subId);
|
|
|
- String hql = "FROM RptCont WHERE logicDeleteFlag = 0 AND subId = :subId AND kind = :kind AND content IS NOT NULL ORDER BY kjMonth DESC";
|
|
|
- Query query = rptContDao.createQuery(hql);
|
|
|
- query.setParameter("subId", subInfo.getSubId());
|
|
|
- query.setParameter("kind", RptContKindEnum.MONTH.getCode());
|
|
|
- query.setMaxResults(1);
|
|
|
- Object result = query.uniqueResult();
|
|
|
- Optional.ofNullable(result).map(o -> (RptCont) o).ifPresent(o -> subInfo.setProgress(o.getContent()));
|
|
|
+ if (Arrays.asList(SubInfoStatusEnum.ZJ.getCode(), SubInfoStatusEnum.TC.getCode()).contains(subInfo.getStatus())){
|
|
|
+ String content = subRptContService.selectNewestMonthReportByIdAndKind(subId, RptContKindEnum.MONTH.getCode());
|
|
|
+ subInfo.setProgress(content);
|
|
|
+ }
|
|
|
subInduService.queryAll(null).stream()
|
|
|
.filter(e -> e.getCode().equals(subInfo.getIndusKind()))
|
|
|
.findFirst().ifPresent(e-> subInfo.setIndusName(e.getTitle()));
|