| | |
| | | import com.smartor.service.IServiceSubtaskRecordService; |
| | | import com.smartor.service.IServiceSubtaskService; |
| | | import com.smartor.service.IServiceTaskService; |
| | | import com.smartor.service.impl.ServiceSubtaskServiceImpl; |
| | | import com.sun.org.apache.bcel.internal.generic.NEW; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | list.add(map); |
| | | |
| | | serviceSubtaskVO.setPageNum(null); |
| | | serviceSubtaskVO.setPageSize(null); |
| | | serviceSubtaskEntity.setPageNum(null); |
| | | serviceSubtaskEntity.setPageSize(null); |
| | | List<ServiceSubtaskRes> serviceSubtasks = serviceSubtaskService.patItem(serviceSubtaskEntity); |
| | | |
| | | return getDataTable3(CollectionUtils.isNotEmpty(serviceSubtasks) ? serviceSubtasks.size() : 0L, list); |
| | |
| | | return map; |
| | | } |
| | | |
| | | /** |
| | | * 统计任务各种状态的数量(优化版) |
| | | * @return Map<String, Object> 包含各状态统计数据 |
| | | * pendingVisitCount: 当前登录人截止今日待随访总量 |
| | | * failedVisitCount: 当前登录人随访任务失败总量 |
| | | * abnormalVisitVount: 当前登录人随访任务异常总量 |
| | | */ |
| | | @ApiOperation("获取当前用户随访数量统计") |
| | | @PostMapping("/getCurrentUserServiceSubtaskCount") |
| | | public Map<String, Object> getCurrentUserServiceSubtaskCount() { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | LoginUser loginUser = getLoginUser(); |
| | | SysUser sysUser = loginUser.getUser(); |
| | | if (ObjectUtils.isNotEmpty(sysUser)) { |
| | | List<String> deptCodes = sysUser.getDeptCodes(); |
| | | List<String> wardCodes = sysUser.getWardCodes(); |
| | | ServiceSubtaskEntity entity = new ServiceSubtaskEntity(); |
| | | entity.setLeaveldeptcodes(deptCodes); |
| | | entity.setLeavehospitaldistrictcodes(wardCodes); |
| | | map = serviceSubtaskService.getCurrentUserServiceSubtaskCount(entity); |
| | | } |
| | | return map; |
| | | } |
| | | } |