| | |
| | | from service_subtask |
| | | </sql> |
| | | |
| | | <!-- 完成时状态(finish_state)计算:仅当本次更新把 sendstate 置为 6(随访完成)时使用。 |
| | | <!-- 超时完成、延期完成逻辑 完成时状态(finish_state)计算:仅当本次更新把 sendstate 置为 6(随访完成)时使用。 |
| | | 基准截止时间 base = endtime + send_day(缺省1) + (Σ service_subtask_preachform.compensate_time + 1) 天, |
| | | 与 RyTask/RedisMqReceiver 的 isSubtaskDeadline 口径保持一致; |
| | | delay = COALESCE(service_task.delay_finish_days, 0); |
| | |
| | | continue_count, |
| | | continue_time_next, |
| | | task_situation, |
| | | finish_state, |
| | | is_manually_called |
| | | from service_subtask |
| | | where 1=1 |
| | |
| | | task_situation, |
| | | remark, |
| | | doctor_opinion, |
| | | finish_state, |
| | | is_manually_called |
| | | from service_subtask |
| | | where 1=1 |
| | |
| | | <if test="taskSituation != null"> |
| | | AND task_situation = #{taskSituation} |
| | | </if> |
| | | <if test="finishState != null"> |
| | | AND finish_state = #{finishState} |
| | | </if> |
| | | <if test="drcode != null and drcode != ''"> |
| | | AND drcode = #{drcode} |
| | | </if> |