| | |
| | | * @date 2021-11-10 |
| | | */ |
| | | @Slf4j |
| | | @Api(description = "潜在捐献信息管理") |
| | | @Api(description = "潜在捐献信息管理",tags={"潜在捐献信息管理"}) |
| | | @RestController |
| | | @RequestMapping("/project/donatebaseinfo") |
| | | public class ServiceDonatebaseinfoController extends BaseController { |
| | |
| | | * 查询捐献基础列表 |
| | | */ |
| | | @ApiOperation("潜在捐献信息列表") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ServiceDonatebaseinfo serviceDonatebaseinfo) { |
| | | @PostMapping("/list") |
| | | public Map<String, Object> list(@RequestBody ServiceDonatebaseinfo serviceDonatebaseinfo) { |
| | | log.info("潜在捐献信息列表:{}", serviceDonatebaseinfo); |
| | | startPage(); |
| | | Integer offset = PageUtils.getOffset(serviceDonatebaseinfo.getPageNum(), serviceDonatebaseinfo.getPageSize()); |
| | | serviceDonatebaseinfo.setPageNum(offset); |
| | | List<ServiceDonatebaseinfo> list = serviceDonatebaseinfoService.selectServiceDonatebaseinfoList(serviceDonatebaseinfo); |
| | | return getDataTable(list); |
| | | |
| | | //获取总数 |
| | | serviceDonatebaseinfo.setPageNum(null); |
| | | serviceDonatebaseinfo.setPageSize(null); |
| | | Integer totalCount = 0; |
| | | List<ServiceDonatebaseinfo> total = serviceDonatebaseinfoService.selectServiceDonatebaseinfoList(serviceDonatebaseinfo); |
| | | |
| | | if (!CollectionUtils.isEmpty(total)) totalCount = total.size(); |
| | | return getDataTable(list, totalCount); |
| | | } |
| | | |
| | | @ApiOperation("小程序端潜在捐献信息列表") |
| | |
| | | |
| | | //获取捐献进程进度 |
| | | Map<Integer, Long> terminationCase = total.stream().filter(Objects::nonNull).map(DonatebaseinfoProgressDTO::getTerminationCase).filter(Objects::nonNull).collect(Collectors.groupingBy(type -> type, Collectors.counting())); |
| | | |
| | | List<Map<String,Object>> totals= serviceDonatebaseinfoService.totalConfirmationBaseInfo(donatebaseinfoProgressVO); |
| | | //数据封装 |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("terminationCase", terminationCase); |
| | | map.put("donatebaseinfoProgressDTOS", donatebaseinfoProgressDTOS); |
| | | map.put("total", totals); |
| | | |
| | | if (!CollectionUtils.isEmpty(total)) totalCount = total.size(); |
| | | return getDataTable(map, totalCount); |