| | |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.concurrent.Executor; |
| | | import java.util.concurrent.Executors; |
| | | |
| | |
| | | * @author smartor |
| | | * @date 2023-03-04 |
| | | */ |
| | | @Slf4j |
| | | @Api(description = "患者档案") |
| | | @RestController |
| | | @RequestMapping("/smartor/patarchive") |
| | |
| | | return success(patArchiveService.selectPatArchiveByPatid(patid)); |
| | | } |
| | | |
| | | // /** |
| | | // * 新增患者档案 |
| | | // */ |
| | | // @ApiOperation("新增患者档案") |
| | | // //@PreAuthorize("@ss.hasPermi('smartor:patarchive:add')") |
| | | // @Log(title = "患者档案", businessType = BusinessType.INSERT) |
| | | // @PostMapping("/add") |
| | | // public AjaxResult add(@RequestBody PatArchive patArchive) { |
| | | // return toAjax(patArchiveService.insertPatArchive(patArchive)); |
| | | // } |
| | | /** |
| | | * 新增患者档案 |
| | | */ |
| | | @ApiOperation("新增患者档案") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:patarchive:add')") |
| | | @Log(title = "患者档案", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody PatArchive patArchive) { |
| | | return toAjax(patArchiveService.insertPatArchive(patArchive)); |
| | | } |
| | | |
| | | /** |
| | | * 新增患者档案 |
| | |
| | | @ApiOperation("查询患者列表") |
| | | @PostMapping("/patInfoByContion") |
| | | public TableDataInfo patInfoByCondition(@RequestBody PatArchiveReq patArchive) { |
| | | // PageUtils.startPageByPost(patArchive.getPageNum(), patArchive.getPageSize()); |
| | | // PageUtils.startPageByPost(patArchive.getPageNum(), patArchive.getPageSize()); |
| | | LoginUser loginUser = getLoginUser(); |
| | | SysUser user = loginUser.getUser(); |
| | | patArchive.setOrgid(user.getOrgid()); |
| | |
| | | long count = PageUtils.count(new ISelect() { |
| | | @Override |
| | | public void doSelect() { |
| | | patArchive.setPn(null); |
| | | patArchive.setPs(null); |
| | | patArchiveService.patInfoByContion(patArchive); |
| | | } |
| | | }); |
| | |
| | | */ |
| | | @ApiOperation("获取患者信息") |
| | | @PostMapping("/getPatientInfoQC") |
| | | public TableDataInfo getPatientInfoQC(@RequestBody PatArchiveReq patArchiveReq) { |
| | | PageUtils.startPageByPost(patArchiveReq.getPageNum(), patArchiveReq.getPageSize()); |
| | | public Map<String, Object> getPatientInfoQC(@RequestBody PatArchiveReq patArchiveReq) { |
| | | patArchiveReq.setPageNum(PageUtils.getOffset(patArchiveReq.getPageNum(), patArchiveReq.getPageSize())); |
| | | |
| | | LoginUser loginUser = getLoginUser(); |
| | | SysUser user = loginUser.getUser(); |
| | | patArchiveReq.setOrgid(user.getOrgid()); |
| | |
| | | patArchiveReq.setLeaveldeptcodes(null); |
| | | } |
| | | List<PatArchiveOthreInfo> patientInfo = patArchiveService.getPatientInfoQC(patArchiveReq); |
| | | long count = PageUtils.count(new ISelect() { |
| | | @Override |
| | | public void doSelect() { |
| | | patArchiveService.getPatientInfoQC(patArchiveReq); |
| | | } |
| | | }); |
| | | return getDataTable2(count, patientInfo); |
| | | |
| | | patArchiveReq.setPageSize(null); |
| | | patArchiveReq.setPageNum(null); |
| | | List<PatArchiveOthreInfo> patientInfoQC = patArchiveService.getPatientInfoQC(patArchiveReq); |
| | | |
| | | // long count = PageUtils.count(new ISelect() { |
| | | // @Override |
| | | // public void doSelect() { |
| | | // patArchiveService.getPatientInfoQC(patArchiveReq); |
| | | // } |
| | | // }); |
| | | return getDataTable3(patientInfoQC.size(), patientInfo); |
| | | } |
| | | |
| | | } |