| | |
| | | //将状态改成完成 |
| | | ServiceTask serviceTask = new ServiceTask(); |
| | | serviceTask.setTaskid(Long.valueOf(commonTaskcallMQ.getTaskid())); |
| | | |
| | | //在问卷中,选中某个选项要进行服务补偿时,只是借用该服务的外壳,不对该服务有任务影响 |
| | | if (commonTaskcallMQ.getUpdateSendstate() == null || commonTaskcallMQ.getUpdateSendstate() == 1) { |
| | | serviceTask.setSendState(5L); |
| | | serviceTask.setFail(1L); |
| | | svyTaskMapper.updateServiceTask(serviceTask); |
| | | } |
| | | } catch (Exception e) { |
| | | Integer integer = redisCache.getCacheObject(commonTaskcallMQ.getTaskid().toString()); |
| | | if (integer != null && integer == 3) { |
| | |
| | | serviceSubtaskPreachform.setTaskid(serviceSubtask.getTaskid()); |
| | | serviceSubtaskPreachform.setOrgid(serviceSubtask.getOrgid()); |
| | | serviceSubtaskPreachform.setSendstate(failSendstate); |
| | | if (serviceSubtask.getType().equals("3") || serviceSubtask.getType().equals("4")) { |
| | | //如果是宣教或通知,并且发送成功,直接将发送状态改成9 |
| | | if (failSendstate.equals("2")) serviceSubtaskPreachform.setSendstate("9"); |
| | | } |
| | | serviceSubtaskPreachformMapper.updateSSPByCondition(serviceSubtaskPreachform); |
| | | |
| | | return true; |
| | | } |
| | | |
| | |
| | | if (CollectionUtils.isNotEmpty(serviceSubtaskPreachforms)) { |
| | | ServiceSubtaskPreachform serviceSubtaskPreachform1 = serviceSubtaskPreachforms.get(0); |
| | | serviceSubtaskPreachform1.setSendstate(failSendstate); |
| | | if (serviceSubtask.getType().equals("3") || serviceSubtask.getType().equals("4")) { |
| | | //如果是宣教或通知,并且发送成功,直接将发送状态改成9 |
| | | if (failSendstate.equals("2")) serviceSubtaskPreachform1.setSendstate("9"); |
| | | } |
| | | serviceSubtaskPreachform1.setRemark(remark); |
| | | serviceSubtaskPreachformMapper.updateServiceSubtaskPreachform(serviceSubtaskPreachform1); |
| | | //如果当前的preachform已经是最后一个了,并且本次还是发送失败,那直接将serviceSubtask的sendstate状态改成5就行了(全失败了) |
| | |
| | | serviceSubtask.setCurrentPreachform(preachform); |
| | | serviceSubtask.setVisitTime(getNextVisitTime(serviceSubtask.getId(), serviceSubtask.getTaskid(), serviceSubtask.getVisitTime(), serviceSubtask.getCurrentPreachform())); |
| | | serviceSubtask.setSendstate(3L); |
| | | if (serviceSubtask.getType().equals("3") || serviceSubtask.getType().equals("4")) { |
| | | //如果是宣教或通知,并且发送成功,则直接将serviceSubtask状态改成6L(这个患者是没有题做的,不会再触发接口进行状态修改) |
| | | if (failSendstate.equals("2")) { |
| | | serviceSubtask.setSendstate(6L); |
| | | } |
| | | } |
| | | serviceSubtaskMapper.updateServiceSubtask(serviceSubtask); |
| | | return true; |
| | | } |
| | |
| | | package com.ruoyi.web.controller.system; |
| | | |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.constant.HttpStatus; |
| | | import com.ruoyi.common.constant.UserConstants; |
| | | 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.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:user:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SysUser user) { |
| | | startPage(); |
| | | public Map<String, Object> list(SysUser user) { |
| | | LoginUser loginUser = getLoginUser(); |
| | | String orgid = loginUser.getUser().getOrgid(); |
| | | user.setOrgid(orgid); |
| | | List<SysUser> list = userService.selectUserList(user); |
| | | return getDataTable(list); |
| | | user.setPageNum(PageUtils.getOffset(user.getPageNum(), user.getPageSize())); |
| | | List<SysUser> list = userService.getUserList(user); |
| | | |
| | | Map<String, Object> rspData = new HashMap(); |
| | | rspData.put("code", HttpStatus.SUCCESS); |
| | | rspData.put("msg", "查询成功"); |
| | | rspData.put("rows", list); |
| | | |
| | | user.setPageNum(null); |
| | | user.setPageSize(null); |
| | | List<SysUser> total = userService.getUserList(user); |
| | | rspData.put("total", total.size()); |
| | | |
| | | return rspData; |
| | | } |
| | | |
| | | @Log(title = "用户管理", businessType = BusinessType.EXPORT) |
| | |
| | | */ |
| | | public List<SysUser> selectUserList(SysUser sysUser); |
| | | |
| | | public List<SysUser> getUserList(SysUser sysUser); |
| | | |
| | | /** |
| | | * 根据条件分页查询已配用户角色列表 |
| | | * |
| | |
| | | * @return 用户对象信息 |
| | | */ |
| | | public SysUser selectUserByUserName(String userName); |
| | | |
| | | /** |
| | | * 通过用户名查询用户 |
| | | * |
| | |
| | | @DataScope(deptAlias = "d", userAlias = "u") |
| | | public List<SysUser> selectUserList(SysUser user) { |
| | | return userMapper.selectUserList(user); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public List<SysUser> getUserList(SysUser user) { |
| | | return userMapper.getUserList(user); |
| | | } |
| | | |
| | | /** |
| | |
| | | <!-- 数据范围过滤 --> |
| | | ${params.dataScope} |
| | | </select> |
| | | <select id="getUserList" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserResult"> |
| | | select u.user_id,u.title,u.his_user_id,u.hosp_info,u.dept_info, u.searchscope, u.dept_id, u.user_type, |
| | | u.nick_name, u.user_name, |
| | | u.email,u.id_card, |
| | | u.avatar, |
| | | u.dept_name, |
| | | u.dept_code, |
| | | u.birthday, |
| | | u.job_phone, |
| | | u.phonenumber, u.sex, u.status, |
| | | u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark from sys_user u |
| | | where u.del_flag = '0' |
| | | <if test="userId != null"> |
| | | AND u.user_id = #{userId} |
| | | </if> |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND u.orgid = #{orgid} |
| | | </if> |
| | | <if test="userName != null and userName != ''"> |
| | | AND u.user_name like concat('%', #{userName}, '%') |
| | | </if> |
| | | <if test="nickName != null and nickName != ''"> |
| | | AND u.nick_name like concat('%', #{nickName}, '%') |
| | | </if> |
| | | <if test="status != null and status != ''"> |
| | | AND u.status = #{status} |
| | | </if> |
| | | <if test="idCard != null and idCard != ''"> |
| | | AND u.id_card = #{idCard} |
| | | </if> |
| | | <if test="title != null and title != ''"> |
| | | AND u.title = #{title} |
| | | </if> |
| | | <if test="jobPhone != null and jobPhone != ''"> |
| | | AND u.job_phone = #{jobPhone} |
| | | </if> |
| | | <if test="birthday != null and birthday != ''"> |
| | | AND u.birthday = #{birthday} |
| | | </if> |
| | | <if test="deptName != null and deptName != ''"> |
| | | AND u.dept_name = #{deptName} |
| | | </if> |
| | | <if test="deptCode != null and deptCode != ''"> |
| | | AND u.dept_code = #{deptCode} |
| | | </if> |
| | | <if test="hisUserId != null and hisUserId != ''"> |
| | | AND u.his_user_id = #{hisUserId} |
| | | </if> |
| | | <if test="phonenumber != null and phonenumber != ''"> |
| | | AND u.phonenumber like concat('%', #{phonenumber}, '%') |
| | | </if> |
| | | <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> |
| | | AND date_format(u.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') |
| | | </if> |
| | | <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> |
| | | AND date_format(u.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') |
| | | </if> |
| | | <if test="deptId != null and deptId != 0"> |
| | | AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, |
| | | ancestors) )) |
| | | </if> |
| | | <if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if> |
| | | </select> |
| | | |
| | | <select id="selectAllocatedList" parameterType="com.ruoyi.common.core.domain.entity.SysUser" |
| | | resultMap="SysUserResult"> |
| | |
| | | */ |
| | | @ApiModelProperty(value = "发送时间段 ") |
| | | private TaskSendTimeVO sendTimeslot; |
| | | /** |
| | | * 服务状态修改:1修改 2不修改 |
| | | */ |
| | | @ApiModelProperty(value = "服务状态修改:1修改 2不修改 ") |
| | | private Integer updateSendstate; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "是否结束 0:不结束 1:结束") |
| | | private Integer isEnd; |
| | | |
| | | /** |
| | | * 选中该选项后,需要给当前患者立即发送的服务的id |
| | | */ |
| | | @ApiModelProperty(value = "选中该选项后,需要给当前患者立即发送的服务的id") |
| | | private Integer sendTaskid; |
| | | |
| | | /** |
| | | * 服务的名称 |
| | | */ |
| | | @ApiModelProperty(value = "服务的名称") |
| | | private String sendTaskname; |
| | | } |
| | |
| | | @ApiModelProperty(value = "异常预警:0绿色;1红色;2黄色") |
| | | private Long isabnormal; |
| | | |
| | | private List<Integer> sendTaskids; |
| | | |
| | | /** |
| | | * 话术选项 |
| | | */ |
| | |
| | | |
| | | @ApiModelProperty(value = "是否结束 0:不结束 1:结束") |
| | | private Integer isEnd; |
| | | |
| | | /** |
| | | * 选中该选项后,需要给当前患者立即发送的服务的id |
| | | */ |
| | | @ApiModelProperty(value = "选中该选项后,需要给当前患者立即发送的服务的id") |
| | | private Integer sendTaskid; |
| | | |
| | | /** |
| | | * 服务的名称 |
| | | */ |
| | | @ApiModelProperty(value = "服务的名称") |
| | | private String sendTaskname; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "异常标识") |
| | | private String excep; |
| | | |
| | | private String guid; |
| | | |
| | | private String orgid; |
| | | |
| | | @ApiModelProperty(value = "试卷类型:1 随访 2 问卷") |
| | | private Integer type; |
| | | |
| | | /** |
| | | * 异常预警:0绿色;1红色;2黄色 |
| | | */ |
| | | @ApiModelProperty(value = "异常预警:0绿色;1红色;2黄色") |
| | | private Integer isabnormal; |
| | | |
| | | @ApiModelProperty(value = "问题结果详情") |
| | | private List<ServiceSubtaskDetail> serviceSubtaskDetailList; |
| | | } |
| | |
| | | @ApiModelProperty(value = "ps") |
| | | private Integer ps; |
| | | |
| | | |
| | | /** |
| | | * 患者来源 |
| | | */ |
| | | @ApiModelProperty(value = "经管医生编码") |
| | | private String managementDoctorCode; |
| | | |
| | | /** |
| | | * 患者来源 |
| | | */ |
| | | @ApiModelProperty(value = "经管医生") |
| | | private String managementDoctor; |
| | | |
| | | @ApiModelProperty(value = "随访情况:1正常语音,2患者拒接或拒访,3面访或者接诊,4微信随访,5随访电话不正确,6其他") |
| | | private Integer taskSituation; |
| | | |
| | | @ApiModelProperty(value = "异常预警:0绿色;1红色;2黄色") |
| | | private Integer isabnormal; |
| | | } |
| | |
| | | private Long userId; |
| | | |
| | | private Integer visitCount; |
| | | |
| | | private Integer isVisitAgain; |
| | | |
| | | @ApiModelProperty(value = "异常预警:0绿色;1红色;2黄色") |
| | | private Integer isabnormal; |
| | | |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "开始时间") |
| | | private Date startTime; |
| | |
| | | * 结束出院日期 |
| | | */ |
| | | @ApiModelProperty(value = "结束出院日期") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date endOutHospTime; |
| | | |
| | | /** |
| | |
| | | @ApiModelProperty(value = "随访部门名称") |
| | | private String visitDeptName; |
| | | |
| | | @ApiModelProperty(value = "异常预警:0绿色;1红色;2黄色") |
| | | private Integer isabnormal; |
| | | |
| | | @ApiModelProperty(value = "随访部门编码集合") |
| | | private List<String> visitDeptCodes; |
| | | } |
| | |
| | | @ApiModelProperty(value = "选中提示") |
| | | private String prompt; |
| | | |
| | | /** |
| | | * 选中该选项后,需要给当前患者立即发送的服务的id |
| | | */ |
| | | @ApiModelProperty(value = "选中该选项后,需要给当前患者立即发送的服务的id") |
| | | private Integer sendTaskid; |
| | | |
| | | /** |
| | | * 服务的名称 |
| | | */ |
| | | @ApiModelProperty(value = "服务的名称") |
| | | private String sendTaskname; |
| | | } |
| | |
| | | @ApiModelProperty(value = "组别") |
| | | private String groupName; |
| | | |
| | | @ApiModelProperty(value = "选中该选项后,需要给当前患者立即发送的服务的id集合") |
| | | private List<Integer> sendTaskids; |
| | | |
| | | /** |
| | | * 话术选项 |
| | |
| | | private Integer isoperation; |
| | | |
| | | /** |
| | | * 选中该选项后,需要给当前患者立即发送的服务的id |
| | | */ |
| | | @ApiModelProperty(value = "选中该选项后,需要给当前患者立即发送的服务的id") |
| | | private Integer sendTaskid; |
| | | |
| | | /** |
| | | * 服务的名称 |
| | | */ |
| | | @ApiModelProperty(value = "服务的名称") |
| | | private String sendTaskname; |
| | | |
| | | /** |
| | | * 选项续号 |
| | | */ |
| | | @ApiModelProperty(value = "选项续号") |
| | |
| | | package com.smartor.service.impl; |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.DtoConversionUtils; |
| | |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | /** |
| | | * 任务问卷问题选项Service业务层处理 |
| | |
| | | serviceSubtask.setTaskid(tid); |
| | | serviceSubtask.setPatid(pid); |
| | | serviceSubtask.setSubmit(1L); |
| | | serviceSubtask.setIsabnormal(serviceSubTaskAnswerReq.getIsabnormal()); |
| | | serviceSubtask.setSendstate(6L); |
| | | serviceSubtask.setExcep(serviceSubTaskAnswerReq.getExcep()); |
| | | serviceSubtask.setFinishtime(new Date()); |
| | |
| | | } |
| | | serviceSubtaskDetailVO.setAsrtext(StringUtils.isEmpty(svyTaskTemplateScriptVO.getScriptResult()) ? "" : svyTaskTemplateScriptVO.getScriptResult().replaceAll("^\"|\"$", "")); |
| | | serviceSubtaskDetailVO.setMatchedtext(StringUtils.isEmpty(svyTaskTemplateScriptVO.getScriptResult()) ? "" : svyTaskTemplateScriptVO.getScriptResult().replaceAll("^\"|\"$", "")); |
| | | // if (StringUtils.isEmpty(serviceSubtaskDetailVO.getAsrtext())) { |
| | | // nextScriptNo = svyTaskTemplateScriptVO.getNextScriptno().toString(); |
| | | // } |
| | | // serviceSubtaskDetailVO.setSvyTaskTemplateTargetoptions(svyTaskTemplateScriptVO.getSvyTaskTemplateTargetoptions()); |
| | | } else { |
| | | //非单多选 |
| | | if (StringUtils.isNotEmpty(svyTaskTemplateScriptVO.getScriptResult())) { |
| | |
| | | ServiceSubtaskDetail serviceSubtaskDetail = DtoConversionUtils.sourceToTarget(serviceSubtaskDetailVO, ServiceSubtaskDetail.class); |
| | | serviceSubtaskDetailMapper.insertServiceSubtaskDetail(serviceSubtaskDetail); |
| | | |
| | | //如何这需要服务补偿的服务ID不为空的话,则进行立即发送 |
| | | if (CollectionUtils.isNotEmpty(svyTaskTemplateScriptVO.getSendTaskids()) && CollectionUtils.isNotEmpty(selectServiceSubtaskList)) { |
| | | sendTaskIds(svyTaskTemplateScriptVO.getSendTaskids(), selectServiceSubtaskList.get(0)); |
| | | } |
| | | |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("nextScriptNo", nextScriptNo); |
| | | map.put("score", score); |
| | | map.put("id", "" + serviceSubtaskDetail.getId()); |
| | | return map; |
| | | } |
| | | |
| | | private Boolean sendTaskIds(List<Integer> sendTaskids, ServiceSubtask serviceSubtask) { |
| | | for (Integer taskId : sendTaskids) { |
| | | ServiceTask serviceTask = serviceTaskService.selectServiceTaskByTaskid(Long.valueOf(taskId)); |
| | | String content = sendMQContent(serviceTask, null); |
| | | //先修改状态 |
| | | insertServiceSubtask(serviceTask, new Date(), serviceSubtask); |
| | | //立即发送 |
| | | redisCache.setCacheObject(content, content, 1, TimeUnit.SECONDS); |
| | | serviceTask.setStopState(null); |
| | | log.info("消息发送成功"); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | private void insertServiceSubtask(ServiceTask serviceTask, Date date, ServiceSubtask serviceSubtask) { |
| | | //只要进入队列就算待发送 |
| | | serviceSubtask.setTaskid(serviceTask.getTaskid()); |
| | | serviceSubtask.setTaskName(serviceTask.getTaskName()); |
| | | serviceSubtask.setLibtemplateid(StringUtils.isNotEmpty(serviceTask.getLibtemplateid()) ? Long.valueOf(serviceTask.getLibtemplateid()) : null); |
| | | serviceSubtask.setTemplatename(serviceTask.getTemplatename()); |
| | | serviceSubtask.setTemplateid(serviceTask.getTemplateid()); |
| | | serviceSubtask.setSendstate(2L); |
| | | serviceSubtask.setVisitTime(date); |
| | | serviceSubtask.setId(null); |
| | | serviceSubtaskMapper.insertServiceSubtask(serviceSubtask); |
| | | |
| | | //设置发送补偿方式(这个完全按照服务的发送方式来走) |
| | | if (StringUtils.isNotEmpty(serviceTask.getPreachformDesc())) { |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | try { |
| | | List<Map<String, Object>> pfList = objectMapper.readValue(serviceTask.getPreachformDesc(), List.class); |
| | | for (Map<String, Object> map : pfList) { |
| | | ServiceSubtaskPreachform serviceSubtaskPreachform = new ServiceSubtaskPreachform(); |
| | | serviceSubtaskPreachform.setSort(ObjectUtils.isEmpty(map.get("sort")) ? 0 : Long.valueOf(map.get("sort").toString())); |
| | | serviceSubtaskPreachform.setPreachform(ObjectUtils.isEmpty(map.get("preachform")) ? "" : map.get("preachform").toString()); |
| | | serviceSubtaskPreachform.setCompensateTime(ObjectUtils.isEmpty(map.get("compensateTime")) ? "" : map.get("compensateTime").toString()); |
| | | serviceSubtaskPreachform.setTaskid(serviceTask.getTaskid()); |
| | | serviceSubtaskPreachform.setSubid(serviceSubtask.getId()); |
| | | //这个sendstate需要在数据库设置一个默认值为“1” |
| | | serviceSubtaskPreachform.setSendstate("1"); |
| | | serviceSubtaskPreachform.setOrgid(serviceTask.getOrgid()); |
| | | serviceSubtaskPreachform.setCreateTime(new Date()); |
| | | serviceSubtaskPreachformMapper.insertServiceSubtaskPreachform(serviceSubtaskPreachform); |
| | | } |
| | | } catch (JsonProcessingException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | private String sendMQContent(ServiceTask serviceTask, TaskSendTimeVO sendTimeslot) { |
| | | CommonTaskcallMQ commonTaskcallMQ = new CommonTaskcallMQ(); |
| | | commonTaskcallMQ.setTaskid(serviceTask.getTaskid()); |
| | | commonTaskcallMQ.setSendType("2"); |
| | | commonTaskcallMQ.setTemplateid(ObjectUtils.isNotEmpty(serviceTask.getTemplateid()) ? serviceTask.getTemplateid().toString() : null); |
| | | commonTaskcallMQ.setPreachform(serviceTask.getPreachform()); |
| | | commonTaskcallMQ.setStopState(serviceTask.getStopState()); |
| | | commonTaskcallMQ.setTaskType(StringUtils.isNotEmpty(serviceTask.getType()) ? Integer.valueOf(serviceTask.getType()) : null); |
| | | commonTaskcallMQ.setSendTimeslot(sendTimeslot); |
| | | commonTaskcallMQ.setUpdateSendstate(2); |
| | | |
| | | String commonTaskcallMQJson = JSON.toJSONString(commonTaskcallMQ); |
| | | commonTaskcallMQJson = commonTaskcallMQJson.substring(1, commonTaskcallMQJson.length() - 1); |
| | | return commonTaskcallMQJson; |
| | | } |
| | | |
| | | private Map<String, String> setSFInfo(IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO, Long taskid, Long patid) { |
| | |
| | | ServiceSubtaskDetail serviceSubtaskDetail = DtoConversionUtils.sourceToTarget(serviceSubtaskDetailVO, ServiceSubtaskDetail.class); |
| | | serviceSubtaskDetailMapper.insertServiceSubtaskDetail(serviceSubtaskDetail); |
| | | |
| | | //如何这需要服务补偿的服务ID不为空的话,则进行立即发送 |
| | | if (CollectionUtils.isNotEmpty(ivrTaskTemplateScriptVO.getSendTaskids()) && CollectionUtils.isNotEmpty(selectServiceSubtaskList)) { |
| | | sendTaskIds(ivrTaskTemplateScriptVO.getSendTaskids(), selectServiceSubtaskList.get(0)); |
| | | } |
| | | |
| | | |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("nextScriptNo", nextScriptNo); |
| | | map.put("score", score); |
| | |
| | | <result property="score" column="score"/> |
| | | <result property="prompt" column="prompt"/> |
| | | <result property="isEnd" column="is_end"/> |
| | | <result property="sendTaskid" column="send_taskid"/> |
| | | <result property="sendTaskname" column="send_taskname"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectIvrLibaTemplateTargetoptionVo"> |
| | | select id, |
| | | targetid, |
| | | send_taskid, |
| | | send_taskname, |
| | | is_end, |
| | | score, |
| | | appendflag, |
| | |
| | | <if test="appendflag != null">and appendflag = #{appendflag}</if> |
| | | <if test="appenddesc != null">and appenddesc = #{appenddesc}</if> |
| | | <if test="optionNo != null">and option_no = #{optionNo}</if> |
| | | <if test="sendTaskid != null">and send_taskid= #{sendTaskid}</if> |
| | | <if test="sendTaskname != null">and send_taskname = #{sendTaskname}</if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | <if test="optionNo != null">option_no,</if> |
| | | <if test="score != null">score,</if> |
| | | <if test="isEnd != null ">is_end,</if> |
| | | <if test="sendTaskid != null">send_taskid,</if> |
| | | <if test="sendTaskname != null">send_taskname,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="targetid != null">#{targetid},</if> |
| | |
| | | <if test="optionNo != null">#{optionNo},</if> |
| | | <if test="score != null">#{score},</if> |
| | | <if test="isEnd != null ">#{isEnd},</if> |
| | | <if test="sendTaskid != null">#{sendTaskid},</if> |
| | | <if test="sendTaskname != null">#{sendTaskname},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="optionNo != null">option_no = #{optionNo},</if> |
| | | <if test="score != null">score = #{score},</if> |
| | | <if test="isEnd != null ">is_end = #{isEnd},</if> |
| | | <if test="sendTaskid != null">send_taskid= #{sendTaskid},</if> |
| | | <if test="sendTaskname != null">send_taskname = #{sendTaskname},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | <result property="score" column="score"/> |
| | | <result property="prompt" column="prompt"/> |
| | | <result property="isEnd" column="is_end"/> |
| | | <result property="sendTaskid" column="send_taskid"/> |
| | | <result property="sendTaskname" column="send_taskname"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectIvrTaskTemplateTargetoptionVo"> |
| | | select id, |
| | | taskid, |
| | | send_taskid, |
| | | send_taskname, |
| | | is_end, |
| | | templateID, |
| | | score, |
| | |
| | | <if test="optionCode != null ">and option_code = #{optionCode}</if> |
| | | <if test="isUserOperation != null ">and is_user_operation = #{isUserOperation}</if> |
| | | <if test="score != null ">and score = #{score}</if> |
| | | <if test="sendTaskid != null">and send_taskid= #{sendTaskid}</if> |
| | | <if test="sendTaskname != null">and send_taskname = #{sendTaskname}</if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | <if test="isUserOperation != null ">is_user_operation,</if> |
| | | <if test="score != null ">score,</if> |
| | | <if test="isEnd != null ">is_end,</if> |
| | | <if test="sendTaskid != null">send_taskid,</if> |
| | | <if test="sendTaskname != null">send_taskname,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="taskid != null">#{taskid},</if> |
| | |
| | | <if test="isUserOperation != null ">#{isUserOperation},</if> |
| | | <if test="score != null ">#{score},</if> |
| | | <if test="isEnd != null ">#{isEnd},</if> |
| | | <if test="sendTaskid != null">#{sendTaskid},</if> |
| | | <if test="sendTaskname != null">#{sendTaskname},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="isUserOperation != null ">is_user_operation = #{isUserOperation},</if> |
| | | <if test="score != null ">score = #{score},</if> |
| | | <if test="isEnd != null ">is_end = #{isEnd},</if> |
| | | <if test="sendTaskid != null">send_taskid= #{sendTaskid},</if> |
| | | <if test="sendTaskname != null">send_taskname = #{sendTaskname},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | <result property="managementDoctorCode" column="management_doctor_code"/> |
| | | <result property="currentPreachform" column="current_preachform"/> |
| | | <result property="taskSituation" column="task_situation"/> |
| | | <result property="isabnormal" column="isabnormal"/> |
| | | </resultMap> |
| | | |
| | | <resultMap type="com.smartor.domain.ServiceSubtaskCount" id="ServiceSubtaskResult2"> |
| | |
| | | management_doctor_code, |
| | | current_preachform, |
| | | upid, |
| | | isabnormal, |
| | | visit_dept_name, |
| | | visit_dept_code, |
| | | visit_time, |
| | |
| | | <if test="suggest != null">and suggest = #{suggest}</if> |
| | | <if test="createBy != null">and create_by = #{createBy}</if> |
| | | <if test="taskGuid != null">and task_guid = #{taskGuid}</if> |
| | | <if test="isabnormal != null">and isabnormal = #{isabnormal}</if> |
| | | <if test="isVisitAgain != null">and is_visit_again = #{isVisitAgain}</if> |
| | | <!-- <if test="visitTime != null">and visit_time = #{visitTime}</if> --> |
| | | <!--<if test="visitDeptCode != null">and visit_dept_code = #{visitDeptCode}</if> |
| | |
| | | <if test="managementDoctorCode != null">and management_doctor_code = #{managementDoctorCode}</if> |
| | | <if test="managementDoctor != null">and management_doctor = #{managementDoctor}</if> |
| | | <if test="currentPreachform != null">and current_preachform = #{currentPreachform}</if> |
| | | <if test="isabnormal != null">and isabnormal = #{isabnormal}</if> |
| | | </where> |
| | | |
| | | </select> |
| | |
| | | <if test="visitDeptName != null">and visit_dept_name = #{visitDeptName}</if> |
| | | <if test="currentPreachform != null">and current_preachform = #{currentPreachform}</if> |
| | | <if test="managementDoctorCode != null">and management_doctor_code = #{managementDoctorCode}</if> |
| | | <if test="isabnormal != null">and isabnormal = #{isabnormal}</if> |
| | | <if test="managementDoctor != null">and management_doctor like concat('%',#{managementDoctor}, '%')</if> |
| | | </where> |
| | | |
| | |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="deptcode != null and deptcode != ''">and deptcode = #{deptcode}</if> |
| | | <if test="deptname != null and deptname != ''">and deptname = #{deptname}</if> |
| | | <if test="isabnormal != null">and isabnormal = #{isabnormal}</if> |
| | | <if test="leavehospitaldistrictcode != null and leavehospitaldistrictcode != ''">and |
| | | leavehospitaldistrictcode = #{leavehospitaldistrictcode} |
| | | </if> |
| | |
| | | AND date_format(visit_time,'%y%m%d') <= date_format(#{endtime},'%y%m%d') |
| | | </if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="isabnormal != null ">and isabnormal = #{isabnormal}</if> |
| | | <if test="deptcode != null and deptcode != ''">and deptcode = #{deptcode}</if> |
| | | <if test="deptname != null and deptname != ''">and deptname = #{deptname}</if> |
| | | <if test="leavehospitaldistrictcode != null and leavehospitaldistrictcode != ''">and |
| | |
| | | <if test="managementDoctor != null">management_doctor,</if> |
| | | <if test="currentPreachform != null">current_preachform,</if> |
| | | <if test="taskSituation != null">task_situation,</if> |
| | | <if test="isabnormal != null">isabnormal,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="sendname != null">#{sendname},</if> |
| | |
| | | <if test="managementDoctor != null">#{managementDoctor},</if> |
| | | <if test="currentPreachform != null">#{currentPreachform},</if> |
| | | <if test="taskSituation != null">#{taskSituation},</if> |
| | | <if test="isabnormal != null">#{isabnormal},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="managementDoctor != null">management_doctor=#{managementDoctor},</if> |
| | | <if test="currentPreachform != null">current_preachform=#{currentPreachform},</if> |
| | | <if test="taskSituation != null">task_situation=#{taskSituation},</if> |
| | | <if test="isabnormal != null">isabnormal=#{isabnormal},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | <if test="managementDoctor != null">management_doctor=#{managementDoctor},</if> |
| | | <if test="currentPreachform != null">current_preachform=#{currentPreachform},</if> |
| | | <if test="taskSituation != null">task_situation=#{taskSituation},</if> |
| | | <if test="isabnormal != null">isabnormal=#{isabnormal},</if> |
| | | </trim> |
| | | <where> |
| | | <if test="patid != null ">and patid = #{patid}</if> |
| | |
| | | <if test="managementDoctor != null">management_doctor=#{managementDoctor},</if> |
| | | <if test="currentPreachform != null">current_preachform=#{currentPreachform},</if> |
| | | <if test="taskSituation != null">task_situation=#{taskSituation},</if> |
| | | <if test="isabnormal != null">isabnormal=#{isabnormal},</if> |
| | | </trim> |
| | | where patid = #{patid} and taskid = #{taskid} |
| | | </update> |
| | |
| | | <if test="managementDoctor != null">management_doctor=#{managementDoctor},</if> |
| | | <if test="currentPreachform != null">current_preachform=#{currentPreachform},</if> |
| | | <if test="taskSituation != null">task_situation=#{taskSituation},</if> |
| | | <if test="isabnormal != null">isabnormal=#{isabnormal},</if> |
| | | </trim> |
| | | where task_guid = #{taskGuid} and task_name = #{taskName} |
| | | </update> |
| | |
| | | </if> |
| | | <if test="visitDeptCode != null">and visit_dept_code = #{visitDeptCode}</if> |
| | | <if test="visitDeptName != null">abd visit_dept_name = #{visitDeptName}</if> |
| | | <if test="isabnormal != null">abd isabnormal = #{isabnormal}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="getSfStatisticsJoy" parameterType="com.smartor.domain.ServiceSubtaskCountReq" |
| | | resultMap="ServiceSubtaskResult2"> |
| | | SELECT sub_id as subTaskId,COUNT(sub_id) joyCount, |
| | | (SELECT COUNT(1) FROM ivr_liba_target WHERE assortid IN (SELECT config_value FROM sys_config WHERE config_key='joyCount')) joyAllCount |
| | | (SELECT COUNT(1) FROM ivr_liba_target WHERE assortid IN (SELECT config_value FROM sys_config WHERE |
| | | config_key='joyCount')) joyAllCount |
| | | FROM service_subtask_detail a |
| | | WHERE sub_id IN(SELECT id FROM service_subtask t |
| | | <where> |
| | |
| | | </if> |
| | | <if test="visitDeptCode != null">and visit_dept_code = #{visitDeptCode}</if> |
| | | <if test="visitDeptName != null">abd visit_dept_name = #{visitDeptName}</if> |
| | | <if test="isabnormal != null">abd isabnormal = #{isabnormal}</if> |
| | | </where> |
| | | ) |
| | | AND targetid IN ( SELECT id FROM ivr_liba_target WHERE assortid IN (SELECT config_value FROM sys_config WHERE config_key='joyCount')) |
| | | AND targetid IN ( SELECT id FROM ivr_liba_target WHERE assortid IN (SELECT config_value FROM sys_config WHERE |
| | | config_key='joyCount')) |
| | | GROUP BY sub_id |
| | | </select> |
| | | |
| | |
| | | visitDeptName, |
| | | management_doctor_code, |
| | | management_doctor, |
| | | isabnormal, |
| | | leaveicd10code |
| | | FROM service_subtask, |
| | | JSON_TABLE(send_time_slot, '$[*]' COLUMNS ( |
| | |
| | | <result property="appenddesc" column="appenddesc"/> |
| | | <result property="optionNo" column="option_no"/> |
| | | <result property="prompt" column="prompt"/> |
| | | <result property="sendTaskid" column="send_taskid"/> |
| | | <result property="sendTaskname" column="send_taskname"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectSvyLibTemplateTargetoptionVo"> |
| | | select id, |
| | | groupid, |
| | | send_taskid, |
| | | send_taskname, |
| | | score, |
| | | prompt, |
| | | option_no, |
| | |
| | | <if test="appendflag != null">and appendflag = #{appendflag}</if> |
| | | <if test="appenddesc != null">and appenddesc = #{appenddesc}</if> |
| | | <if test="optionNo != null">and option_no = #{optionNo}</if> |
| | | <if test="sendTaskid != null">and send_taskid= #{sendTaskid}</if> |
| | | <if test="sendTaskname != null">and send_taskname = #{sendTaskname}</if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | <if test="appenddesc != null">appenddesc,</if> |
| | | <if test="optionNo != null">option_no,</if> |
| | | <if test="prompt != null">prompt,</if> |
| | | <if test="sendTaskid != null">send_taskid,</if> |
| | | <if test="sendTaskname != null">send_taskname,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="groupid != null">#{groupid},</if> |
| | |
| | | <if test="appenddesc != null">#{appenddesc},</if> |
| | | <if test="optionNo != null">#{optionNo},</if> |
| | | <if test="prompt != null">#{prompt},</if> |
| | | <if test="sendTaskid != null">#{sendTaskid},</if> |
| | | <if test="sendTaskname != null">#{sendTaskname},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="appenddesc != null">appenddesc = #{appenddesc},</if> |
| | | <if test="optionNo != null">option_no = #{optionNo},</if> |
| | | <if test="prompt != null">prompt = #{prompt},</if> |
| | | <if test="sendTaskid != null">send_taskid= #{sendTaskid},</if> |
| | | <if test="sendTaskname != null">send_taskname = #{sendTaskname},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | <result property="score" column="score"/> |
| | | <result property="score" column="score"/> |
| | | <result property="prompt" column="prompt"/> |
| | | <result property="sendTaskid" column="send_taskid"/> |
| | | <result property="sendTaskname" column="send_taskname"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectSvyTaskTemplateTargetoptionVo"> |
| | | select id, |
| | | option_code, |
| | | send_taskid, |
| | | send_taskname, |
| | | score, |
| | | prompt, |
| | | appendflag, |
| | |
| | | <if test="optionCode != null">and option_code = #{optionCode}</if> |
| | | <if test="appendflag != null">and appendflag = #{appendflag}</if> |
| | | <if test="appenddesc != null">and appenddesc = #{appenddesc}</if> |
| | | <if test="sendTaskid != null">and send_taskid= #{sendTaskid}</if> |
| | | <if test="sendTaskname != null">and send_taskname = #{sendTaskname}</if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | <if test="appenddesc != null">appenddesc,</if> |
| | | <if test="score != null">score,</if> |
| | | <if test="prompt != null">prompt,</if> |
| | | |
| | | <if test="sendTaskid != null">send_taskid,</if> |
| | | <if test="sendTaskname != null">send_taskname,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="taskid != null">#{taskid},</if> |
| | |
| | | <if test="appenddesc != null">#{appenddesc},</if> |
| | | <if test="score != null">#{score},</if> |
| | | <if test="prompt != null">#{prompt},</if> |
| | | |
| | | <if test="sendTaskid != null">#{sendTaskid}</if> |
| | | <if test="sendTaskname != null">#{sendTaskname}</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="appenddesc != null">appenddesc = #{appenddesc},</if> |
| | | <if test="score != null">score = #{score},</if> |
| | | <if test="prompt != null">score = #{prompt},</if> |
| | | <if test="sendTaskid != null">send_taskid= #{sendTaskid},</if> |
| | | <if test="sendTaskname != null">send_taskname = #{sendTaskname},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |