陈昶聿
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
package com.smartor.mapper;
 
import com.smartor.domain.MchFollowupPlanItem;
import com.smartor.domain.MchFollowupTaskQuery;
import com.smartor.domain.MchFollowupTaskVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
 
import java.util.Date;
import java.util.List;
 
/**
 * 妇幼随访计划节点 Mapper。
 */
@Mapper
public interface MchFollowupPlanItemMapper {
 
    int insertMchFollowupPlanItem(MchFollowupPlanItem item);
 
    int updateMchFollowupPlanItem(MchFollowupPlanItem item);
 
    int updateSendResult(MchFollowupPlanItem item);
 
    /**
     * 回填人工随访结果:随访日期、随访人员、随访情况、随访状态。
     */
    int updateFollowupResult(MchFollowupPlanItem item);
 
    MchFollowupPlanItem selectMchFollowupPlanItemById(@Param("id") Long id);
 
    List<MchFollowupPlanItem> selectByPlanId(@Param("planId") Long planId);
 
    /**
     * 查询到期节点:计划有效、机构为丽水妇幼、待发送、到达发送时间、且不在重试等待中。
     */
    List<MchFollowupPlanItem> selectDueItems(@Param("orgid") String orgid,
                                             @Param("now") Date now,
                                             @Param("limit") int limit);
 
    int claimItem(@Param("id") Long id, @Param("now") Date now);
 
    int cancelPendingByPlanId(@Param("planId") Long planId, @Param("now") Date now);
 
    int countPendingByPlanId(@Param("planId") Long planId);
 
    /**
     * 妇幼随访任务列表:join 计划、档案详情、门诊记录。
     */
    List<MchFollowupTaskVO> selectTaskList(MchFollowupTaskQuery query);
}