陈昶聿
3 天以前 c885a9c26e624f403e3d73beac8c6346657ad561
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
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));
    }
}