Browse Source

审计整改结果核对更新

master
buaixuexideshitongxue 2 months ago
parent
commit
cc9e9559da
  1. 35
      src/main/java/com/biutag/supervision/mapper/NegativeMapper.java
  2. 17
      src/main/java/com/biutag/supervision/service/NegativeQueryService.java

35
src/main/java/com/biutag/supervision/mapper/NegativeMapper.java

@ -202,21 +202,40 @@ public interface NegativeMapper extends BaseMapper<Negative> {
SupervisionNotifyOverView getAllSupervisionNotifyCount(Date beginTime, Date endTime); SupervisionNotifyOverView getAllSupervisionNotifyCount(Date beginTime, Date endTime);
// @Select("SELECT " +
// " sd.short_name as label, " +
// "COUNT(DISTINCT ng.id) AS denominator, " +
// "COUNT( DISTINCT IF(ng.processing_status in ('signing', 'processing', 'approval'), ng.id, NULL) ) AS processingNumber, " +
// "COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS numerator, " +
// "IFNULL(ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS value " +
// "FROM negative ng " +
// "LEFT JOIN sup_depart sd ON ng.second_involve_depart_id=sd.id " +
// "WHERE problemSourcesCode IN (27,28,29,30) " +
// "AND sd.statistics_group_id=#{groupId} " +
// "AND crtTime BETWEEN #{beginTime} AND #{endTime} " +
// " GROUP BY sd.short_name " +
// " ORDER BY value desc ")
// List<AuditNegativeVo> getAuditNegativeVo(Date beginTime, Date endTime,String groupId);
@Select("SELECT " + @Select("SELECT " +
" sd.short_name as label, " + " sd.short_name AS label, " +
" COUNT(DISTINCT ng.id) AS denominator, " + " COUNT(DISTINCT ng.id) AS denominator, " +
"COUNT( DISTINCT IF(ng.processing_status in ('signing', 'processing', 'approval'), ng.id, NULL) ) AS processingNumber, " + " COUNT(DISTINCT IF(ng.isRectifyCode = 1, ng.id, NULL)) AS numerator, " +
"COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) ) AS numerator, " + " COUNT( DISTINCT IF(COALESCE(ng.isRectifyCode, 0) != 1, ng.id, NULL)) AS processingNumber, " +
"IFNULL(ROUND( COUNT( DISTINCT IF(ng.processing_status='completed', ng.id, NULL) )/COUNT( DISTINCT ng.id )*100, 1), 0) AS value " + " IFNULL( ROUND( COUNT(DISTINCT IF(ng.isRectifyCode = 1, ng.id, NULL)) / NULLIF(COUNT(DISTINCT ng.id), 0) * 100, 0 ), 0 ) AS value " +
"FROM negative ng " + "FROM negative ng " +
"LEFT JOIN sup_depart sd ON ng.second_involve_depart_id = sd.id " + "LEFT JOIN sup_depart sd ON ng.second_involve_depart_id = sd.id " +
"WHERE problemSourcesCode IN (27,28,29,30) " + "LEFT JOIN sup_depart sd2 ON ng.three_involve_depart_id = sd2.id " +
"WHERE ng.problemSourcesCode IN (27, 28, 29, 30) " +
"AND ng.crtTime BETWEEN #{beginTime} AND #{endTime} " +
"AND sd.statistics_group_id = #{groupId} " + "AND sd.statistics_group_id = #{groupId} " +
"AND crtTime BETWEEN #{beginTime} AND #{endTime} " + "GROUP BY second_involve_depart_id, sd.short_name " +
" GROUP BY sd.short_name " + "ORDER BY VALUE DESC;")
" ORDER BY value desc ")
List<AuditNegativeVo> getAuditNegativeVo(Date beginTime, Date endTime,String groupId); List<AuditNegativeVo> getAuditNegativeVo(Date beginTime, Date endTime,String groupId);
@Select("SELECT " + @Select("SELECT " +
"sd.short_name AS `name`, " + "sd.short_name AS `name`, " +
"sd.id AS departId, " + "sd.id AS departId, " +

17
src/main/java/com/biutag/supervision/service/NegativeQueryService.java

@ -178,14 +178,15 @@ public class NegativeQueryService {
queryWrapper.orderByDesc(Negative::getUpdTime); queryWrapper.orderByDesc(Negative::getUpdTime);
Page<Negative> page = negativeService.page(Page.of(param.getCurrent(), param.getSize()), queryWrapper); Page<Negative> page = negativeService.page(Page.of(param.getCurrent(), param.getSize()), queryWrapper);
long l = System.currentTimeMillis(); long l = System.currentTimeMillis();
List<NegativeQueryVo> list = page.getRecords().stream().map(item -> { // List<NegativeQueryVo> list = page.getRecords().stream().map(item -> {
NegativeQueryVo vo = new NegativeQueryVo(); // NegativeQueryVo vo = new NegativeQueryVo();
BeanUtils.copyProperties(item, vo); // BeanUtils.copyProperties(item, vo);
if (Objects.nonNull(item.getFirstDistributeTime()) && !ProcessingStatusEnum.completed.name().equals(item.getProcessingStatus())) { // if (Objects.nonNull(item.getFirstDistributeTime()) && !ProcessingStatusEnum.completed.name().equals(item.getProcessingStatus())) {
vo.setRemainingDuration(TimeUtil.getRemainingDuration(item.getFirstDistributeTime(), item.getMaxSignDuration(), item.getMaxHandleDuration(), item.getExtensionDays(), item.getFlowKey())); // vo.setRemainingDuration(TimeUtil.getRemainingDuration(item.getFirstDistributeTime(), item.getMaxSignDuration(), item.getMaxHandleDuration(), item.getExtensionDays(), item.getFlowKey()));
} // }
return vo; // return vo;
}).toList(); // }).toList();
List<NegativeQueryVo> list = new ArrayList<>();
System.out.printf("耗时:%sms", System.currentTimeMillis() - l); System.out.printf("耗时:%sms", System.currentTimeMillis() - l);
return new Page<NegativeQueryVo>().setRecords(list).setTotal(page.getTotal()); return new Page<NegativeQueryVo>().setRecords(list).setTotal(page.getTotal());
} }

Loading…
Cancel
Save