You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
94 lines
3.1 KiB
Java
94 lines
3.1 KiB
Java
package com.supervision.controller;
|
|
|
|
import com.supervision.model.ConfigDrug;
|
|
import com.supervision.model.Process;
|
|
import com.supervision.model.TreatmentPlanRecord;
|
|
import com.supervision.pojo.vo.DealPlanResVO;
|
|
import com.supervision.pojo.vo.TreatmentPlanConfirmReqVo;
|
|
import com.supervision.service.TreatmentPlanService;
|
|
import com.supervision.vo.manage.TreatmentPlanTreeNode;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiParam;
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.apache.ibatis.annotations.Param;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import java.util.List;
|
|
|
|
@Slf4j
|
|
@Api(tags = "处置计划")
|
|
@RestController
|
|
@RequestMapping("/treatmentPlan")
|
|
@RequiredArgsConstructor
|
|
public class TreatmentPlanController {
|
|
|
|
|
|
private final TreatmentPlanService treatmentPlanService;
|
|
|
|
@ApiOperation("新增处置计划记录")
|
|
@PostMapping("/record/save")
|
|
public boolean saveTreatmentPlanRecord(@RequestBody TreatmentPlanRecord treatmentPlanRecord) {
|
|
|
|
return treatmentPlanService.saveTreatmentPlanRecord(treatmentPlanRecord);
|
|
}
|
|
|
|
|
|
@ApiOperation("确认处置计划")
|
|
@PostMapping("/confirm")
|
|
public boolean confirmTreatmentPlan(@RequestBody TreatmentPlanConfirmReqVo reqVo) {
|
|
|
|
return treatmentPlanService.confirmTreatmentPlan(reqVo.getProcessId(),String.valueOf(reqVo.getStatus()));
|
|
}
|
|
|
|
@ApiOperation("修改处置计划记录")
|
|
@PutMapping("/record/update")
|
|
public boolean updateTreatmentPlanRecord(@RequestBody TreatmentPlanRecord treatmentPlanRecord) {
|
|
|
|
return treatmentPlanService.updateTreatmentPlanRecord(treatmentPlanRecord);
|
|
}
|
|
|
|
|
|
@ApiOperation("删除处置计划记录")
|
|
@DeleteMapping("/record/delete")
|
|
public boolean deleteTreatmentPlanRecord(@Param("记录主键id") @RequestParam String id) {
|
|
|
|
return treatmentPlanService.deleteTreatmentPlanRecord(id);
|
|
}
|
|
|
|
|
|
@ApiOperation("查询处置计划记录列表")
|
|
@GetMapping("/record/queryRecord")
|
|
public List<TreatmentPlanRecord> queryTreatmentPlanRecord(@ApiParam("流程实例id") @RequestParam("processId") String processId,
|
|
@ApiParam("处置计划类型 药物:0 其他:1") String disposalPlanType) {
|
|
|
|
return treatmentPlanService.queryTreatmentPlanRecord(processId, disposalPlanType);
|
|
}
|
|
|
|
@ApiOperation("查询处置计划详情")
|
|
@GetMapping("/record/queryDetails")
|
|
public DealPlanResVO queryTreatmentPlanDetails(@ApiParam("流程实例id") @RequestParam("processId") String processId) {
|
|
|
|
return treatmentPlanService.queryTreatmentPlanDetails(processId);
|
|
}
|
|
|
|
|
|
@ApiOperation("查询药品列表")
|
|
@GetMapping("/getDrugList")
|
|
public List<ConfigDrug> getDrugList() {
|
|
|
|
return treatmentPlanService.getDrugList();
|
|
}
|
|
|
|
@ApiOperation("查询处置计划树")
|
|
@GetMapping("/queryTree")
|
|
public List<TreatmentPlanTreeNode> queryTree(@ApiParam("处置方式")@RequestParam(required = false) Integer disposalMethod) {
|
|
|
|
return treatmentPlanService.queryTree(disposalMethod);
|
|
|
|
}
|
|
|
|
|
|
}
|