| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.web.controller.smartor; |
| | | |
| | | import com.ruoyi.common.annotation.AddOrgId; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.domain.entity.SysDept; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.system.service.ISysDeptService; |
| | | import com.smartor.domain.Icd10; |
| | | import com.smartor.domain.ServiceTaskSchedule; |
| | | import com.smartor.domain.ServiceTaskdiag; |
| | | import com.smartor.service.IIcd10Service; |
| | | import com.smartor.service.IServiceTaskScheduleService; |
| | | import com.smartor.service.IServiceTaskdiagService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import static com.alibaba.fastjson2.JSONValidator.Type.Array; |
| | | |
| | | /** |
| | | * é访任å¡ç»å
³èController |
| | | * |
| | | * @author éæ¶è¿ |
| | | * @date 2026-08-06 |
| | | */ |
| | | @Api("é访任å¡ç»å
³è") |
| | | @RestController |
| | | @RequestMapping("/smartor/taskSchedule") |
| | | public class ServiceTaskscheduleController extends BaseController { |
| | | @Autowired |
| | | private IServiceTaskScheduleService serviceTaskScheduleService; |
| | | |
| | | @Autowired |
| | | private IIcd10Service icd10Service; |
| | | |
| | | @Autowired |
| | | private ISysDeptService sysDeptService; |
| | | |
| | | /** |
| | | * æ¥è¯¢é访任å¡ç»ç§å®¤å
³èå表 |
| | | */ |
| | | @ApiOperation("æ¥è¯¢é访任å¡ç»ç§å®¤å
³èå表") |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("getTaskScheduleDeptList") |
| | | public Map<String, Object> getTaskScheduleDeptList(@RequestBody ServiceTaskSchedule serviceTaskSchedule) { |
| | | List<SysDept> list = new ArrayList<>(); |
| | | //ä»»å¡ç»ä¿¡æ¯ |
| | | if(ObjectUtils.isNotEmpty(serviceTaskSchedule.getTaskid())){ |
| | | ServiceTaskSchedule schedule = serviceTaskScheduleService.selectByTaskid(serviceTaskSchedule.getTaskid()); |
| | | if(ObjectUtils.isNotEmpty(schedule) && StringUtils.isNotEmpty(schedule.getDeptCodes())){ |
| | | String[] split = schedule.getDeptCodes().split(","); |
| | | SysDept sysDept = new SysDept(); |
| | | sysDept.setOrgid(schedule.getOrgid()); |
| | | sysDept.setDeptType("1"); |
| | | sysDept.setDeptCodes(Arrays.asList(split)); |
| | | list = sysDeptService.selectDeptList(sysDept); |
| | | } |
| | | |
| | | if(ObjectUtils.isNotEmpty(schedule) && StringUtils.isNotEmpty(schedule.getWardCodes())){ |
| | | String[] split = schedule.getWardCodes().split(","); |
| | | SysDept sysDept = new SysDept(); |
| | | sysDept.setOrgid(schedule.getOrgid()); |
| | | sysDept.setDeptType("2"); |
| | | sysDept.setDeptCodes(Arrays.asList(split)); |
| | | list = sysDeptService.selectDeptList(sysDept); |
| | | } |
| | | } |
| | | |
| | | return getDataTable3(CollectionUtils.isEmpty(list) ? 0 : list.size(), list); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢é访任å¡ç»ç¾ç
å
³èå表 |
| | | */ |
| | | @ApiOperation("æ¥è¯¢é访任å¡ç»ç¾ç
å
³èå表") |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("getTaskScheduleDiagList") |
| | | public Map<String, Object> getTaskScheduleDiagList(@RequestBody ServiceTaskSchedule serviceTaskSchedule) { |
| | | List<Icd10> list = new ArrayList<>(); |
| | | //ä»»å¡ç»ä¿¡æ¯ |
| | | if(ObjectUtils.isNotEmpty(serviceTaskSchedule.getTaskid())){ |
| | | ServiceTaskSchedule schedule = serviceTaskScheduleService.selectByTaskid(serviceTaskSchedule.getTaskid()); |
| | | if(ObjectUtils.isNotEmpty(schedule) && StringUtils.isNotEmpty(schedule.getIcd10Codes())){ |
| | | Icd10 icd10 = new Icd10(); |
| | | String[] split = schedule.getIcd10Codes().split(","); |
| | | icd10.setIcdcodes(Arrays.asList(split)); |
| | | icd10.setOrgid(schedule.getOrgid()); |
| | | list = icd10Service.selectIcd10List(icd10); |
| | | } |
| | | } |
| | | |
| | | return getDataTable3(CollectionUtils.isEmpty(list) ? 0 : list.size(), list); |
| | | } |
| | | } |