| | |
| | | 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; |
| | |
| | | @Api(description = "患者用药记录") |
| | | @RestController |
| | | @RequestMapping("/system/drug") |
| | | public class PatMedDrugController extends BaseController |
| | | { |
| | | public class PatMedDrugController extends BaseController { |
| | | @Autowired |
| | | private IPatMedDrugService patMedDrugService; |
| | | |
| | |
| | | */ |
| | | @ApiOperation("查询患者用药记录列表") |
| | | //@PreAuthorize("@ss.hasPermi('system:drug:list')") |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody PatMedDrug patMedDrug) |
| | | { |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("list") |
| | | public TableDataInfo list(@RequestBody PatMedDrug patMedDrug) { |
| | | startPage(); |
| | | List<PatMedDrug> list = patMedDrugService.selectPatMedDrugList(patMedDrug); |
| | | return getDataTable(list); |
| | |
| | | //@PreAuthorize("@ss.hasPermi('system:drug:export')") |
| | | @Log(title = "患者用药记录", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, PatMedDrug patMedDrug) |
| | | { |
| | | public void export(HttpServletResponse response, PatMedDrug patMedDrug) { |
| | | List<PatMedDrug> list = patMedDrugService.selectPatMedDrugList(patMedDrug); |
| | | ExcelUtil<PatMedDrug> util = new ExcelUtil<PatMedDrug>(PatMedDrug.class); |
| | | util.exportExcel(response, list, "患者用药记录数据"); |
| | |
| | | @ApiOperation("获取患者用药记录详细信息") |
| | | //@PreAuthorize("@ss.hasPermi('system:drug:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) { |
| | | return success(patMedDrugService.selectPatMedDrugById(id)); |
| | | } |
| | | |
| | |
| | | @ApiOperation("新增患者用药记录") |
| | | //@PreAuthorize("@ss.hasPermi('system:drug:add')") |
| | | @Log(title = "患者用药记录", businessType = BusinessType.INSERT) |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody PatMedDrug patMedDrug) |
| | | { |
| | | public AjaxResult add(@RequestBody PatMedDrug patMedDrug) { |
| | | return toAjax(patMedDrugService.insertPatMedDrug(patMedDrug)); |
| | | } |
| | | |
| | |
| | | @ApiOperation("修改患者用药记录") |
| | | //@PreAuthorize("@ss.hasPermi('system:drug:edit')") |
| | | @Log(title = "患者用药记录", businessType = BusinessType.UPDATE) |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody PatMedDrug patMedDrug) |
| | | { |
| | | public AjaxResult edit(@RequestBody PatMedDrug patMedDrug) { |
| | | return toAjax(patMedDrugService.updatePatMedDrug(patMedDrug)); |
| | | } |
| | | |
| | |
| | | @ApiOperation("删除患者用药记录") |
| | | //@PreAuthorize("@ss.hasPermi('system:drug:remove')") |
| | | @Log(title = "患者用药记录", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | @GetMapping("/remove/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) { |
| | | return toAjax(patMedDrugService.deletePatMedDrugByIds(ids)); |
| | | } |
| | | } |