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.page.TableDataInfo;
|
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.utils.PageUtils;
|
import com.smartor.domain.MchFollowupPlanItem;
|
import com.smartor.domain.MchFollowupTaskQuery;
|
import com.smartor.domain.MchFollowupTaskVO;
|
import com.smartor.service.mch.IMchFollowupPlanService;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import java.util.List;
|
|
/**
|
* 妇幼随访计划节点 Controller。
|
*
|
* <p>用于查询计划节点和回填人工随访结果(随访日期、随访人员、随访情况、随访状态)。</p>
|
*/
|
@Slf4j
|
@Api(description = "妇幼随访节点")
|
@RestController
|
@RequestMapping("/smartor/mchFollowupItem")
|
public class MchFollowupPlanItemController extends BaseController {
|
|
@Autowired
|
private IMchFollowupPlanService mchFollowupPlanService;
|
|
/**
|
* 查询某个计划下的随访节点。
|
*/
|
@ApiOperation("查询随访节点列表")
|
@GetMapping("/list/{planId}")
|
public AjaxResult list(@PathVariable Long planId) {
|
return success(mchFollowupPlanService.listItems(planId));
|
}
|
|
/**
|
* 查询妇幼随访任务列表。
|
*
|
* <p>返回门诊日期、计划/实际随访日期、随访人、sendname、patid 等字段;
|
* taskid 为空,taskname 为档案类型+随访。</p>
|
*/
|
@ApiOperation("查询妇幼随访任务列表")
|
@AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid", skipIfPresent = false)
|
@PostMapping("/taskList")
|
public TableDataInfo taskList(@RequestBody MchFollowupTaskQuery query) {
|
PageUtils.startPageByPost(query.getPageNum(), query.getPageSize());
|
List<MchFollowupTaskVO> list = mchFollowupPlanService.listTasks(query);
|
return getDataTable(list);
|
}
|
|
/**
|
* 回填人工随访结果。
|
*/
|
@ApiOperation("回填随访结果")
|
@Log(title = "妇幼随访节点", businessType = BusinessType.UPDATE)
|
@PostMapping("/updateFollowupResult")
|
public AjaxResult updateFollowupResult(@RequestBody MchFollowupPlanItem item) {
|
return toAjax(mchFollowupPlanService.updateItemFollowupResult(item));
|
}
|
}
|