|
@@ -7,8 +7,11 @@ import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.time.LocalDate;
|
|
|
import java.util.*;
|
|
|
+import java.util.function.Function;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
+import cn.hutool.core.collection.CollUtil;
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
import com.rtrh.core.vo.Message;
|
|
|
import com.rtrh.projects.modules.projects.dao.*;
|
|
|
import com.rtrh.projects.modules.projects.dto.QTDTO;
|
|
@@ -24,7 +27,9 @@ import com.rtrh.projects.modules.system.po.*;
|
|
|
import com.rtrh.projects.modules.system.service.ISubInduService;
|
|
|
import com.rtrh.projects.modules.utils.DateUtils;
|
|
|
import com.rtrh.projects.outapi.vo.StaticsVO;
|
|
|
+import com.rtrh.projects.util.HttpClientUtil;
|
|
|
import com.rtrh.projects.util.TargetDataSource;
|
|
|
+import com.rtrh.projects.vo.RemoteRequestDto;
|
|
|
import com.rtrh.projects.vo.SubIdVO;
|
|
|
import com.rtrh.projects.vo.subject.MoveDbParamVo;
|
|
|
import com.rtrh.projects.vo.subject.SubinfoPreQueryVo;
|
|
@@ -5344,10 +5349,34 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
return list;
|
|
|
}
|
|
|
|
|
|
- @TargetDataSource("secondary")
|
|
|
+
|
|
|
@Override
|
|
|
public List<WorkBenchVO> queryExceedMonthlySize(String lastMonth) {
|
|
|
- return subInfoMapper.queryExceedMonthly(lastMonth);
|
|
|
+ List<SubInfoGxj> list = subInfoMapper.queryStatistics(new SubInfoQueryTzVO().setStatus("3"));
|
|
|
+ if (CollUtil.isNotEmpty(list)){
|
|
|
+ List<String> ids = new ArrayList<>();
|
|
|
+ Map<String, SubInfoGxj> map = list.stream()
|
|
|
+ .peek(e -> ids.add(e.getSubId()))
|
|
|
+ .collect(Collectors.toMap(SubInfoGxj::getSubId, Function.identity(), (v1, v2) -> v1));
|
|
|
+ RemoteRequestDto dto = new RemoteRequestDto()
|
|
|
+ .setMonth(lastMonth)
|
|
|
+ .setIds(ids);
|
|
|
+ Object o = HttpClientUtil.fgwPostRequest("/outApi/remote/queryExceedMonthly", dto);
|
|
|
+ if (o != null) {
|
|
|
+ List<WorkBenchVO> list1 = JSON.parseArray(JSON.toJSONString(o), WorkBenchVO.class);
|
|
|
+ list1.forEach(e->{
|
|
|
+ SubInfoGxj subInfoGxj = map.get(e.getId());
|
|
|
+ if (subInfoGxj != null) {
|
|
|
+ e.setSubjectId(subInfoGxj.getSubjectId());
|
|
|
+ e.setIndusKind(subInfoGxj.getIndusKind());
|
|
|
+ e.setAmtTotal(subInfoGxj.getAmtTotal());
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return list1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return new ArrayList<>();
|
|
|
+
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -5362,11 +5391,11 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
* 月报超期
|
|
|
*/
|
|
|
@Override
|
|
|
- @TargetDataSource("secondary")
|
|
|
+
|
|
|
public Map<String, Object> queryExceedMonthly(LoginUserVO loginUser, PreWarnDataQueryVO queryVO) {
|
|
|
String lastMonth = DateUtil.format(DateUtil.offsetMonth(DateUtil.date(), -1), "yyyyMM");
|
|
|
int dayOfMonth = DateUtil.dayOfMonth(new Date());
|
|
|
- List<WorkBenchVO> list;
|
|
|
+ List<WorkBenchVO> list = new ArrayList<>();
|
|
|
if (dayOfMonth < 5) {
|
|
|
return new HashMap<String, Object>(){{
|
|
|
put("listSubject", new ArrayList<>());
|
|
@@ -5374,7 +5403,8 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
put("listIndusKind", new ArrayList<>());
|
|
|
}};
|
|
|
}else {
|
|
|
- list = subInfoMapper.queryExceedMonthly(lastMonth);
|
|
|
+ list = this.queryExceedMonthlySize(lastMonth);
|
|
|
+
|
|
|
return getStringObjectMapSecond(list);
|
|
|
}
|
|
|
}
|
|
@@ -5443,7 +5473,17 @@ public class SubInfoServiceImpl implements SubInfoService {
|
|
|
|
|
|
|
|
|
List<SmzkDetailVo> dataList = Optional.ofNullable(
|
|
|
- subInfoMapper.exportSmzkDetailExcel(vo.getSubName(),vo.getSubjectId(),indusKinds,vo.getStartAmt(),vo.getEndAmt(),vo.getSbdw(),subjectIds)
|
|
|
+ subInfoMapper.exportSmzkDetailExcel(
|
|
|
+ vo.getSubName(),
|
|
|
+ vo.getSubjectId(),
|
|
|
+ indusKinds,
|
|
|
+ vo.getStartAmt(),
|
|
|
+ vo.getEndAmt(),
|
|
|
+ vo.getSbdw(),
|
|
|
+ subjectIds,
|
|
|
+ vo.getStatusRed(),
|
|
|
+ vo.getStatusList()
|
|
|
+ )
|
|
|
).orElse(Collections.emptyList());
|
|
|
|
|
|
|