| | |
| | | import com.sinata.system.domain.*; |
| | | import com.sinata.system.domain.dto.CheckOutDto; |
| | | import com.sinata.system.domain.dto.CollectTotalUpDto; |
| | | import com.sinata.system.domain.dto.CountTwoDto; |
| | | import com.sinata.system.domain.dto.SysDepartmentDTO; |
| | | import com.sinata.system.domain.vo.SysDepartmentVO; |
| | | import com.sinata.system.mapper.SysDepartmentMapper; |
| | |
| | | return R.ok(sysDepartmentService.getRegionTree1(keyword)); |
| | | } |
| | | |
| | | @ApiOperation("获取区域树") |
| | | @PostMapping("/pub/regionTree") |
| | | @ApiImplicitParam(name = "keyword", value = "关键字", required = false) |
| | | public R<List<SysDepartmentVO>> getRegionTree1(@RequestParam(required = false) String keyword) { |
| | | return R.ok(sysDepartmentService.getRegionTree1(keyword)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @ApiOperation("获取单位详情") |
| | | @PostMapping("/detail") |
| | | public R<SysDepartment> getRegionTree(@RequestParam(required = true) Long id) { |
| | | return R.ok(sysDepartmentService.getById(id)); |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取区域树 |
| | | * |
| | |
| | | @ApiOperation(value = "获取全部/区域/医疗机构/处置单位/监管单位树-搜索框用", notes = "0:全部 1:区域 2:医疗机构 3:处置单位 4:监管单位") |
| | | @PostMapping("/departmentSearchTree") |
| | | @ApiImplicitParam(name = "type", value = "查询类型", required = true) |
| | | public R<List<SysDepartmentVO>> getDepartmentSearchTree(@RequestParam(value = "type", required = true) @NotNull(message = "类型不能为空") Integer type) { |
| | | return R.ok(sysDepartmentService.listByType(type)); |
| | | public R<List<SysDepartmentVO>> getDepartmentSearchTree() { |
| | | return R.ok(sysDepartmentService.getRegionTree2(null)); |
| | | } |
| | | |
| | | @ApiOperation("获取医院监管列表") |
| | |
| | | return R.ok(collectRecordService.collectTotal3(departmentId)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("医院暂存间情况上") |
| | | @PostMapping("/up/room") |
| | | public R<MwStagingRoom> collecttotal2(@ApiParam("医院id")@RequestParam Long departmentId) { |
| | | MwStagingRoom one = roomService.lambdaQuery().eq(MwStagingRoom::getDepartmentId, departmentId).one(); |
| | | Long count = collectRecordService.lambdaQuery().eq(MwCollectRecord::getStagingRoomId, one.getId()).eq(MwCollectRecord::getStatus, 1).count(); |
| | | MwCollectRecord one1 = collectRecordService.lambdaQuery().eq(MwCollectRecord::getStagingRoomId, one.getId()).eq(MwCollectRecord::getStatus, 1).orderByDesc(MwCollectRecord::getBoxTime).last("limit 1").one(); |
| | | one.setCount(count); |
| | | one.setBoxTime(one1.getBoxTime()); |
| | | return R.ok(one); |
| | | } |
| | | |
| | | @ApiOperation(value = "医院转运记录") |
| | | @PostMapping("/trans") |
| | | public R<List<CheckOutDto>> trans(LocalDate date,@ApiParam("医院id")@RequestParam Long departmentId) { |
| | |
| | | return R.ok(backList); |
| | | } |
| | | |
| | | @ApiOperation(value = "处置详情上") |
| | | @PostMapping("/end/total/up") |
| | | public R<CountTwoDto> outtotal2(@ApiParam("处置机构id")@RequestParam Long departmentId) { |
| | | CountTwoDto countTwoDto = new CountTwoDto(); |
| | | LocalDate now = LocalDate.now(); |
| | | Long count = collectRecordService.lambdaQuery().eq(MwCollectRecord::getReceiveDepartmentId, departmentId).eq(MwCollectRecord::getReceiveTime, now).count(); |
| | | Long count1 = collectRecordService.lambdaQuery().eq(MwCollectRecord::getReceiveDepartmentId, departmentId).eq(MwCollectRecord::getDisposalTime, now).count(); |
| | | countTwoDto.setCount(count); |
| | | countTwoDto.setCount1(count1); |
| | | return R.ok(countTwoDto); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "处置详情") |
| | | @PostMapping("/end/total") |
| | | public R<List<CollectTotalUpDto>> outtotal1(@ApiParam("处置机构id")@RequestParam Long departmentId) { |