| | |
| | | List<IvrTaskTemplateScriptVO> ivrTaskTemplateScriptVOList = redisCache.getCacheObject(userId + "ivrTaskTemplateScriptVOList"); |
| | | //æ ¹æ®åç«¯ä¼ åçæ¡ä»¶ï¼è·åå½åé¢ç® |
| | | IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO = questionMessage.getNowQuestion(); |
| | | if (ivrTaskTemplateScriptVO.getID() == null) { |
| | | if (ivrTaskTemplateScriptVO.getId() == null) { |
| | | QuestionMessage returnQues = redisCache.getCacheObject(userId + "returnQues"); |
| | | ivrTaskTemplateScriptVO = returnQues.getNowQuestion(); |
| | | } |
| | |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.smartor.domain.ServiceSubTaskAnswerReq; |
| | | import com.smartor.domain.ServiceSubTaskCacheReq; |
| | | import com.smartor.domain.ServiceSubTaskQueryReq; |
| | | import com.smartor.domain.ServiceSubtaskAnswer; |
| | | import com.smartor.service.IServiceSubtaskAnswerService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | public AjaxResult saveQuestionCache(@RequestBody ServiceSubTaskCacheReq serviceSubTaskCacheReq) { |
| | | return toAjax(serviceSubtaskAnswerService.saveQuestionCache(serviceSubTaskCacheReq)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("å»çæ¥è¯¢æ£è
é®é¢ç»æ(å¤é¾)") |
| | | @PostMapping("/selectPatQuestionResult") |
| | | public AjaxResult selectPatQuestionResult(@RequestBody ServiceSubTaskQueryReq serviceSubTaskQueryReq) { |
| | | return AjaxResult.success(serviceSubtaskAnswerService.selectPatQuestionResult(serviceSubTaskQueryReq)); |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | /** |
| | | * éç¨é¢åï¼1.åé 2å¤é 3填空 4å
¶å®ï¼ |
| | | */ |
| | | @Excel(name = "éç¨é¢åï¼1.åé 2å¤é 3填空 4å
¶å®ï¼") |
| | | @ApiModelProperty(value = "éç¨é¢åï¼1.åé 2å¤é 3填空 4å
¶å®ï¼") |
| | | private String scriptType; |
| | | |
| | | /** |
| | | * 模æ¿ID |
| | | */ |
| | | @Excel(name = "模æ¿ID") |
| | |
| | | * 主é®ID |
| | | */ |
| | | @ApiModelProperty(value = "主é®") |
| | | private Long ID; |
| | | private Long id; |
| | | |
| | | /** |
| | | * ä»»å¡id |
| | |
| | | @ApiModelProperty(value = "模æ¿è¯æ¯ç¼å·") |
| | | private Long scriptno; |
| | | |
| | | |
| | | /** |
| | | * éç¨é¢åï¼1.åé 2å¤é 3填空 4å
¶å®ï¼ |
| | | */ |
| | | @Excel(name = "éç¨é¢åï¼1.åé 2å¤é 3填空 4å
¶å®ï¼") |
| | | @ApiModelProperty(value = "éç¨é¢åï¼1.åé 2å¤é 3é®ç 4填空 5å
¶å®ï¼") |
| | | private String scriptType; |
| | | |
| | | /** |
| | | * 模æ¿ID |
| | | */ |
| | |
| | | private String targetvalue; |
| | | |
| | | /** |
| | | * æ¨¡æ¿ææ å¼ |
| | | */ |
| | | @Excel(name = "æ¨¡æ¿ææ å¼") |
| | | @ApiModelProperty(value = "æ¨¡æ¿ææ å¼") |
| | | private String appenddesc; |
| | | |
| | | /** |
| | | * æ¨¡æ¿ææ æ£å2 |
| | | */ |
| | | @Excel(name = "æ¨¡æ¿ææ æ£å2") |
| | |
| | | @ApiModelProperty(value = "æ¯å¦æ¯ç¨æ·éæ©çé项") |
| | | private Boolean isUserOperation = false; |
| | | |
| | | |
| | | /** |
| | | * é项ç»å· |
| | | */ |
| | | @Excel(name = "é项ç»å·") |
| | | @ApiModelProperty(value = "é项ç»å·") |
| | | private String optionCode; |
| | | } |
| | |
| | | * èªå¢ID |
| | | */ |
| | | @ApiModelProperty(value = "èªå¢ID") |
| | | private Long patid; |
| | | private Long id; |
| | | |
| | | /** |
| | | * å§å |
| | |
| | | private String param2; |
| | | |
| | | @ApiModelProperty(value = "é®é¢åçæç»(é访)") |
| | | private List<IvrLibaTemplateScriptVO> ivrLibaTemplateScriptVOList; |
| | | private List<IvrTaskTemplateScriptVO> ivrTaskTemplateScriptVOList; |
| | | |
| | | @ApiModelProperty(value = "é®é¢åçæç»(é®å·)") |
| | | List<SvyLibTemplateScriptVO> svyLibTemplateScriptVOList; |
| | | List<SvyTaskTemplateScriptVO> svyTaskTemplateScriptVOList; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.domain; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.annotation.Nonnull; |
| | | |
| | | |
| | | /** |
| | | * å»çæ¥è¯¢æ£è
åçä¿¡æ¯ |
| | | * |
| | | * @author ls |
| | | * @date 2023-06-05 |
| | | */ |
| | | @ApiModel(value = "ServiceSubTaskQueryReq", description = "å»çæ¥è¯¢æ£è
åçä¿¡æ¯") |
| | | @Data |
| | | public class ServiceSubTaskQueryReq { |
| | | |
| | | @ApiModelProperty(value = "ä»»å¡ç±»åï¼1ï¼åºé¢é访ï¼2ï¼ä½æ£éç¥ï¼3ï¼æ»¡æåº¦è°æ¥ï¼4ï¼å®£æï¼ ") |
| | | private Long type; |
| | | |
| | | /** |
| | | * ä»»å¡ID |
| | | */ |
| | | @Nonnull |
| | | @ApiModelProperty(value = "ä»»å¡ID") |
| | | private Long taskid; |
| | | |
| | | /** |
| | | * æ£è
ID |
| | | */ |
| | | @ApiModelProperty(value = "æ£è
ID") |
| | | private Long patId; |
| | | |
| | | /** |
| | | * é¢ç®ID |
| | | */ |
| | | @ApiModelProperty(value = "é¢ç®ID") |
| | | private Long scriptid; |
| | | |
| | | } |
| | |
| | | private Long taskid; |
| | | |
| | | /** |
| | | * åä»»å¡ID |
| | | * æ£è
ID |
| | | */ |
| | | @ApiModelProperty(value = "åä»»å¡ID") |
| | | @ApiModelProperty(value = "æ£è
ID") |
| | | private Long patId; |
| | | |
| | | /** |
| | |
| | | * éè¦è·è¿ï¼æ¯ï¼1ãå¦ï¼0ï¼ |
| | | */ |
| | | @ApiModelProperty(value = "éè¦è·è¿") |
| | | private String istrack; |
| | | private String trackFlag; |
| | | |
| | | /** |
| | | * å¼å¸¸é¢è¦ï¼æ¯ï¼1ãå¦ï¼0ï¼ |
| | | */ |
| | | @ApiModelProperty(value = "å¼å¸¸é¢è¦") |
| | | private String isabnormal; |
| | | private String warningFlag; |
| | | |
| | | /** |
| | | * éé¡¹çæ¡çéå ä¿¡æ¯ |
| | | */ |
| | | @ApiModelProperty(value = "éé¡¹çæ¡çéå ä¿¡æ¯") |
| | | private String answerps; |
| | | |
| | | /** |
| | | * å 餿 å¿ï¼0ï¼æªå é¤ 1ï¼å·²å é¤ï¼ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.domain; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * ä»»å¡é®å·é®é¢é项对象 service_subtask_answer |
| | | * |
| | | * @author ruoyi |
| | | * @date 2024-07-18 |
| | | */ |
| | | @ApiModel(value = "ServiceSubtaskOptionAnswer", description = "å¤é¾éé¡¹ç»æ") |
| | | @Data |
| | | public class ServiceSubtaskOptionAnswer extends BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 任塿¨¡æ¿é项ID |
| | | */ |
| | | @ApiModelProperty(value = "任塿¨¡æ¿é项ID") |
| | | private Long id; |
| | | |
| | | /** |
| | | * ä»»å¡ID |
| | | */ |
| | | @ApiModelProperty(value = "é项code") |
| | | private String code; |
| | | |
| | | /** |
| | | * æ£è
ID |
| | | */ |
| | | @ApiModelProperty(value = "é项å¼") |
| | | private String value; |
| | | |
| | | /** |
| | | * é¢ç®ID |
| | | */ |
| | | @ApiModelProperty(value = "æè¿°") |
| | | private String appenddesc; |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | @Excel(name = "é项ç¼å·") |
| | | @ApiModelProperty(value = "é项ç¼å·") |
| | | private Long optionNo; |
| | | private String optionCode; |
| | | |
| | | /** |
| | | * è¯æ¯ID |
| | |
| | | * åºç¡ææ ç±»åï¼1 é项 2 ææ¬ 3 æ°å¼ï¼ |
| | | */ |
| | | @ApiModelProperty(value = "åºç¡ææ ç±»å1=é项,2=ææ¬,3=æ°å¼") |
| | | private String targettype; |
| | | private String scriptType; |
| | | |
| | | /** |
| | | * åºç¡ææ ID(ææ¶å½åºå·id) |
| | |
| | | /** |
| | | * 主é®ID |
| | | */ |
| | | private Long ID; |
| | | private Long id; |
| | | |
| | | /** |
| | | * é¢ç®ä¸»é¢ |
| | |
| | | * åºç¡ææ ç±»åï¼1 é项 2 ææ¬ 3 æ°å¼ï¼ |
| | | */ |
| | | @ApiModelProperty(value = "åºç¡ææ ç±»å 1=é项,2=ææ¬,3=æ°å¼") |
| | | private String targettype; |
| | | private String scriptType; |
| | | |
| | | /** |
| | | * åºç¡ææ ID(ææ¶å½åºå·id) |
| | |
| | | @ApiModelProperty(value = "é项å¾çè·¯å¾") |
| | | private String picturePath; |
| | | |
| | | |
| | | /** |
| | | * é项éå æ è¯ï¼0-æ éå ï¼1-æéä»¶ï¼ |
| | | */ |
| | | @ApiModelProperty(value = "é项å¾çè·¯å¾") |
| | | private String appendflag; |
| | | |
| | | /** |
| | | * éä»¶ä¿¡æ¯ |
| | | */ |
| | | @ApiModelProperty(value = "éä»¶ä¿¡æ¯(é®çé¢çç»æä¹æ¯æ¾å¨è¿ä¸ªéé¢)") |
| | | private String appenddesc; |
| | | |
| | | /** |
| | | * æ¯å¦å卿ä½ï¼1 æ°å¢ 2ä¿®æ¹ 3å é¤ |
| | | */ |
| | | @ApiModelProperty(value = "æ¯å¦å卿ä½ï¼1 æ°å¢ 2ä¿®æ¹ 3å é¤") |
| | | private Integer isoperation; |
| | | |
| | | /** |
| | | * é项ç»å· |
| | | */ |
| | | @ApiModelProperty(value = "é项ç»å·") |
| | | private String optionCode; |
| | | |
| | | /** |
| | | * æ¯å¦æ¯ç¨æ·éæ©çé项 |
| | | */ |
| | | @ApiModelProperty(value = "æ¯å¦æ¯ç¨æ·éæ©çé项") |
| | | private Boolean isUserOperation = false; |
| | | |
| | | } |
| | |
| | | package com.smartor.service; |
| | | |
| | | import com.smartor.domain.ServiceSubTaskAnswerReq; |
| | | import com.smartor.domain.ServiceSubTaskCacheReq; |
| | | import com.smartor.domain.ServiceSubTaskDetailReq; |
| | | import com.smartor.domain.ServiceSubtaskAnswer; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.smartor.domain.*; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | */ |
| | | public Integer saveQuestionCache(ServiceSubTaskCacheReq serviceSubTaskCacheReq); |
| | | |
| | | public List<ServiceSubtaskAnswer> selectPatQuestionResult(ServiceSubTaskQueryReq serviceSubTaskQueryReq); |
| | | |
| | | } |
| | |
| | | |
| | | //éè¿è¯æ¯IDè·åé项 |
| | | for (IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO : ivrTaskTemplateScriptVOS) { |
| | | log.info("ivrLibaTemplateScriptVOç主é®id为ï¼{}", ivrTaskTemplateScriptVO.getID()); |
| | | log.info("ivrLibaTemplateScriptVOç主é®id为ï¼{}", ivrTaskTemplateScriptVO.getId()); |
| | | IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption = new IvrTaskTemplateTargetoption(); |
| | | ivrTaskTemplateTargetoption.setScriptid(ivrTaskTemplateScriptVO.getID()); |
| | | ivrTaskTemplateTargetoption.setScriptid(ivrTaskTemplateScriptVO.getId()); |
| | | List<IvrTaskTemplateTargetoption> ivrTaskTemplateTargetoptions = ivrTaskTemplateTargetoptionMapper.selectIvrTaskTemplateTargetoptionList(ivrTaskTemplateTargetoption); |
| | | for (IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption1 : ivrTaskTemplateTargetoptions) { |
| | | ObjectMapper mapper = new ObjectMapper(); |
| | |
| | | |
| | | } else if (isoperation == 3) { |
| | | //å é¤ |
| | | if (ivrTaskTemplateScriptVO.getID() == null) { |
| | | if (ivrTaskTemplateScriptVO.getId() == null) { |
| | | log.info("å é¤å¤±è´¥,模æ¿è¯æ¯id为空"); |
| | | } else { |
| | | ivrTaskTemplateScriptVO.setUpdateTime(new Date()); |
| | | ivrTaskTemplateScriptMapper.deleteIvrTaskTemplateScriptByID(ivrTaskTemplateScriptVO.getID()); |
| | | ivrTaskTemplateScriptMapper.deleteIvrTaskTemplateScriptByID(ivrTaskTemplateScriptVO.getId()); |
| | | } |
| | | } |
| | | return ivrTaskTemplateScript; |
| | |
| | | public Boolean saveOrUpdatePatInfo(PatArchiveVO patArchiveVO) { |
| | | //éè¿isoperationæ¥å¤ææ¯å¦æ°å¢ |
| | | PatArchive patArchive = DtoConversionUtils.sourceToTarget(patArchiveVO, PatArchive.class); |
| | | if (patArchiveVO.getIsoperation() != null && patArchiveVO.getIsoperation() == 1 || patArchiveVO.getPatid() == null) { |
| | | if (patArchiveVO.getIsoperation() != null && patArchiveVO.getIsoperation() == 1 || patArchiveVO.getId() == null) { |
| | | //æ°å¢ |
| | | List<PatArchive> patArchives = new ArrayList<>(); |
| | | patArchive.setUpdateTime(DateUtils.getNowDate()); |
| | | patArchives.add(patArchive); |
| | | patArchiveMapper.insertPatArchive(patArchives); |
| | | } else if (patArchiveVO.getIsoperation() != null && patArchiveVO.getIsoperation() == 2 || patArchiveVO.getPatid() != null) { |
| | | } else if (patArchiveVO.getIsoperation() != null && patArchiveVO.getIsoperation() == 2 || patArchiveVO.getId() != null) { |
| | | //ä¿®æ¹ |
| | | patArchiveVO.setIsoperation(2); |
| | | patArchiveMapper.updatePatArchive(patArchive); |
| | |
| | | patArchiveList.addAll(patArchives3); |
| | | } |
| | | } |
| | | |
| | | |
| | | //æ ¹æ®æ£è
IDè¿è¡åç» |
| | | Map<Long, List<PatArchive>> listMap = patArchiveList.stream().collect(Collectors.groupingBy(PatArchive::getId)); |
| | |
| | | package com.smartor.service.impl; |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.google.gson.JsonArray; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.DtoConversionUtils; |
| | | import com.ruoyi.common.utils.RSAPublicKeyExample; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.mapper.IvrTaskTemplateScriptMapper; |
| | | import com.smartor.mapper.ServiceSubtaskAnswerMapper; |
| | | import com.smartor.mapper.ServiceSubtaskMapper; |
| | | import com.smartor.mapper.ServiceTaskMapper; |
| | | import com.smartor.service.IIvrTaskTemplateService; |
| | | import com.smartor.service.IServiceSubtaskAnswerService; |
| | | import com.smartor.service.ISvyTaskTemplateService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | import java.util.HashSet; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * ä»»å¡é®å·é®é¢é项Serviceä¸å¡å±å¤ç |
| | |
| | | public class ServiceSubtaskAnswerServiceImpl implements IServiceSubtaskAnswerService { |
| | | @Autowired |
| | | private ServiceSubtaskAnswerMapper serviceSubtaskAnswerMapper; |
| | | |
| | | @Autowired |
| | | private ServiceSubtaskMapper serviceSubtaskMapper; |
| | | |
| | | @Autowired |
| | | private RedisCache redisCache; |
| | |
| | | |
| | | allKeys = new HashSet<>(); |
| | | if (serviceSubTaskAnswerReq.getType() == 1) { |
| | | // allKeys.add(redisCache.getCacheObject(pid + "-" + tid + "-SFscriptCache")); |
| | | allKeys.add(pid + "-" + tid + "-SFscriptCache"); |
| | | } else if (serviceSubTaskAnswerReq.getType() == 2) { |
| | | // allKeys.add(redisCache.getCacheObject(pid + "-" + tid + "-WJscriptCache")); |
| | | allKeys.add(pid + "-" + tid + "-WJscriptCache"); |
| | | } |
| | | } |
| | |
| | | String[] split = key.split("-"); |
| | | if (key.contains("-SFscriptCache")) { |
| | | //å
å«äº,说æäºæ¯é访é®é¢ |
| | | List<IvrLibaTemplateScriptVO> cacheList = redisCache.getCacheObject(key); |
| | | List<IvrTaskTemplateScriptVO> cacheList = redisCache.getCacheObject(key); |
| | | for (int i = 0; i < cacheList.size(); i++) { |
| | | if (i == 0) { |
| | | // è¯´ææ¯ç¬¬ä¸é¢ |
| | | IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO = cacheList.get(0); |
| | | IvrTaskTemplateScriptVO ivrLibaTemplateScriptVO = cacheList.get(0); |
| | | //å°ç¬¬ä¸é¢çä¿¡æ¯æ¾å°è¡¨ä¸ |
| | | setSFInfo(ivrLibaTemplateScriptVO, Long.valueOf(split[1]), Long.valueOf(split[0])); |
| | | nextScriptno = cacheList.get(0).getNextScriptno(); |
| | | } else { |
| | | //䏿¯ç¬¬ ä¸ é¢ |
| | | for (IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO : cacheList) { |
| | | for (IvrTaskTemplateScriptVO ivrLibaTemplateScriptVO : cacheList) { |
| | | if (ivrLibaTemplateScriptVO.getId() == nextScriptno) { |
| | | setSFInfo(ivrLibaTemplateScriptVO, Long.valueOf(split[1]), Long.valueOf(split[0])); |
| | | nextScriptno = ivrLibaTemplateScriptVO.getNextScriptno(); |
| | |
| | | } |
| | | } |
| | | } else if (key.contains("-WJscriptCache")) { |
| | | List<SvyLibTemplateScriptVO> cacheList = redisCache.getCacheList(key); |
| | | List<SvyTaskTemplateScriptVO> cacheList = redisCache.getCacheList(key); |
| | | for (int i = 0; i < cacheList.size(); i++) { |
| | | if (i == 0) { |
| | | // è¯´ææ¯ç¬¬ä¸é¢ |
| | |
| | | setWJInfo(cacheList.get(0), Long.valueOf(split[1]), Long.valueOf(split[0])); |
| | | nextScriptno = Long.valueOf(cacheList.get(0).getNextScriptno()); |
| | | } else { |
| | | for (SvyLibTemplateScriptVO svyLibTemplateScriptVO : cacheList) { |
| | | if (svyLibTemplateScriptVO.getId() == nextScriptno) { |
| | | for (SvyTaskTemplateScriptVO svyTaskTemplateScriptVO : cacheList) { |
| | | if (svyTaskTemplateScriptVO.getId() == nextScriptno) { |
| | | //å°ç¬¬ä¸é¢çä¿¡æ¯æ¾å°è¡¨ä¸ |
| | | setWJInfo(svyLibTemplateScriptVO, Long.valueOf(split[1]), Long.valueOf(split[0])); |
| | | setWJInfo(svyTaskTemplateScriptVO, Long.valueOf(split[1]), Long.valueOf(split[0])); |
| | | nextScriptno = Long.valueOf(cacheList.get(0).getNextScriptno()); |
| | | } |
| | | |
| | |
| | | RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample(); |
| | | Long tid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskCacheReq.getParam1(), pri_key)); |
| | | Long pid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskCacheReq.getParam2(), pri_key)); |
| | | if (CollectionUtils.isNotEmpty(serviceSubTaskCacheReq.getIvrLibaTemplateScriptVOList())) { |
| | | if (CollectionUtils.isNotEmpty(serviceSubTaskCacheReq.getIvrTaskTemplateScriptVOList())) { |
| | | //é访 |
| | | redisCache.setCacheObject(pid + "-" + tid + "-SFscriptCache", serviceSubTaskCacheReq.getIvrLibaTemplateScriptVOList()); |
| | | } else if (CollectionUtils.isNotEmpty(serviceSubTaskCacheReq.getSvyLibTemplateScriptVOList())) { |
| | | redisCache.setCacheObject(pid + "-" + tid + "-SFscriptCache", serviceSubTaskCacheReq.getIvrTaskTemplateScriptVOList()); |
| | | } else if (CollectionUtils.isNotEmpty(serviceSubTaskCacheReq.getSvyTaskTemplateScriptVOList())) { |
| | | //é®å· |
| | | redisCache.setCacheObject(pid + "-" + tid + "-WJscriptCache", serviceSubTaskCacheReq.getSvyLibTemplateScriptVOList()); |
| | | redisCache.setCacheObject(pid + "-" + tid + "-WJscriptCache", serviceSubTaskCacheReq.getSvyTaskTemplateScriptVOList()); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | @Override |
| | | public List<ServiceSubtaskAnswer> selectPatQuestionResult(ServiceSubTaskQueryReq serviceSubTaskQueryReq) { |
| | | log.error("selectPatQuesTionResultçå
¥å为ï¼{}", serviceSubTaskQueryReq); |
| | | ServiceSubtaskAnswer serviceSubtaskAnswer = new ServiceSubtaskAnswer(); |
| | | serviceSubtaskAnswer.setTaskid(serviceSubTaskQueryReq.getTaskid()); |
| | | serviceSubtaskAnswer.setPatId(serviceSubTaskQueryReq.getPatId()); |
| | | serviceSubtaskAnswer.setScriptid(serviceSubTaskQueryReq.getScriptid()); |
| | | List<ServiceSubtaskAnswer> serviceSubtaskAnswerList = serviceSubtaskAnswerMapper.selectServiceSubtaskAnswerList(serviceSubtaskAnswer); |
| | | return serviceSubtaskAnswerList; |
| | | } |
| | | |
| | | private void setSFInfo(IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO, Long taskid, Long patid) { |
| | | |
| | | private void setSFInfo(IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO, Long taskid, Long patid) { |
| | | ServiceSubtaskAnswer serviceSubtaskAnswer = null; |
| | | String dx = ""; |
| | | if (StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getScriptType()) && ivrLibaTemplateScriptVO.getScriptType().equals("1") || StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getScriptType()) && ivrLibaTemplateScriptVO.getScriptType().equals("2")) { |
| | | List<ServiceSubtaskOptionAnswer> answerList = new ArrayList<>(); |
| | | if (StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getScriptType()) && ivrTaskTemplateScriptVO.getScriptType().equals("1") || StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getScriptType()) && ivrTaskTemplateScriptVO.getScriptType().equals("2")) { |
| | | //1ã2为åéæå¤é |
| | | for (IvrLibaTemplateTargetoption ivrLibaTemplateTargetoption : ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList()) { |
| | | for (IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption : ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList()) { |
| | | //è·åç¨æ·éä¸çéé¡¹å· |
| | | dx = dx + "," + ivrLibaTemplateTargetoption.getOptionNo().toString(); |
| | | if (ivrTaskTemplateTargetoption.getIsUserOperation() == true) { |
| | | ServiceSubtaskOptionAnswer serviceSubtaskOptionAnswer = new ServiceSubtaskOptionAnswer(); |
| | | serviceSubtaskOptionAnswer.setId(ivrTaskTemplateTargetoption.getId()); |
| | | serviceSubtaskOptionAnswer.setCode(ivrTaskTemplateTargetoption.getOptionCode()); |
| | | serviceSubtaskOptionAnswer.setValue(ivrTaskTemplateTargetoption.getTargetvalue()); |
| | | serviceSubtaskOptionAnswer.setAppenddesc(ivrTaskTemplateTargetoption.getAppenddesc()); |
| | | answerList.add(serviceSubtaskOptionAnswer); |
| | | } |
| | | } |
| | | } else if (StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getScriptType()) && ivrTaskTemplateScriptVO.getScriptType().equals("4")) { |
| | | //填空 |
| | | for (IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption : ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList()) { |
| | | log.error("ivrTaskTemplateTargetoptionçå¼ä¸ºï¼{}", ivrTaskTemplateTargetoption); |
| | | String[] split = ivrTaskTemplateTargetoption.getTargetvalue().split("|"); |
| | | for (String s : split) { |
| | | ServiceSubtaskOptionAnswer serviceSubtaskOptionAnswer = new ServiceSubtaskOptionAnswer(); |
| | | serviceSubtaskOptionAnswer.setId(ivrTaskTemplateTargetoption.getId()); |
| | | serviceSubtaskOptionAnswer.setCode(ivrTaskTemplateTargetoption.getOptionCode()); |
| | | serviceSubtaskOptionAnswer.setValue(s); |
| | | serviceSubtaskOptionAnswer.setAppenddesc(ivrTaskTemplateTargetoption.getAppenddesc()); |
| | | answerList.add(serviceSubtaskOptionAnswer); |
| | | } |
| | | } |
| | | } else { |
| | | //éåå¤é |
| | | if (CollectionUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList())) { |
| | | dx = ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(0).getAppenddesc(); |
| | | //éåå¤éï¼é®çï¼ |
| | | if (CollectionUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList())) { |
| | | log.error("IvrTaskScriptTargetoptionListçå¼ä¸ºï¼{}", ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList()); |
| | | ServiceSubtaskOptionAnswer serviceSubtaskOptionAnswer = new ServiceSubtaskOptionAnswer(); |
| | | serviceSubtaskOptionAnswer.setId(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(0).getId()); |
| | | serviceSubtaskOptionAnswer.setCode(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(0).getOptionCode()); |
| | | serviceSubtaskOptionAnswer.setValue(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(0).getTargetvalue()); |
| | | serviceSubtaskOptionAnswer.setAppenddesc(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(0).getAppenddesc()); |
| | | answerList.add(serviceSubtaskOptionAnswer); |
| | | } |
| | | } |
| | | //æ°æ®ä¿å |
| | | serviceSubtaskAnswer.setTaskid(taskid); |
| | | serviceSubtaskAnswer.setPatId(patid); |
| | | serviceSubtaskAnswer.setScriptid(ivrLibaTemplateScriptVO.getId()); |
| | | serviceSubtaskAnswer.setScriptType(Long.valueOf(ivrLibaTemplateScriptVO.getScriptType())); |
| | | serviceSubtaskAnswer.setAnswer(dx.substring(1)); |
| | | serviceSubtaskAnswer.setScriptid(ivrTaskTemplateScriptVO.getId()); |
| | | serviceSubtaskAnswer.setScriptType(Long.valueOf(ivrTaskTemplateScriptVO.getScriptType())); |
| | | serviceSubtaskAnswer.setAnswer(JSON.toJSONString(answerList)); |
| | | serviceSubtaskAnswer.setComment(null); |
| | | serviceSubtaskAnswer.setCreateTime(new Date()); |
| | | serviceSubtaskAnswer.setUpdateTime(new Date()); |
| | | serviceSubtaskAnswerMapper.insertServiceSubtaskAnswer(serviceSubtaskAnswer); |
| | | } |
| | | |
| | | private void setWJInfo(SvyLibTemplateScriptVO svyLibTemplateScriptVO, Long taskid, Long patid) { |
| | | private void setWJInfo(SvyTaskTemplateScriptVO svyTaskTemplateScriptVO, Long taskid, Long patid) { |
| | | ServiceSubtaskAnswer serviceSubtaskAnswer = null; |
| | | String dx = ""; |
| | | if (svyLibTemplateScriptVO.getScriptType().equals("1") || svyLibTemplateScriptVO.getScriptType().equals("2")) { |
| | | List<ServiceSubtaskOptionAnswer> answerList = new ArrayList<>(); |
| | | if (svyTaskTemplateScriptVO.getScriptType().equals("1") || svyTaskTemplateScriptVO.getScriptType().equals("2")) { |
| | | //1ã2为åéæå¤é |
| | | for (SvyLibTemplateTargetoption svyLibTemplateTargetoption : svyLibTemplateScriptVO.getSvyLibTemplateTargetoptions()) { |
| | | //è·åç¨æ·éä¸çéé¡¹å· |
| | | dx = dx + "," + svyLibTemplateTargetoption.getOptionNo().toString(); |
| | | for (SvyTaskTemplateTargetoption svyTaskTemplateTargetoption : svyTaskTemplateScriptVO.getSvyTaskTemplateTargetoptions()) { |
| | | if (svyTaskTemplateTargetoption.getIsUserOperation() == true) { |
| | | ServiceSubtaskOptionAnswer serviceSubtaskOptionAnswer = new ServiceSubtaskOptionAnswer(); |
| | | serviceSubtaskOptionAnswer.setId(svyTaskTemplateTargetoption.getId()); |
| | | serviceSubtaskOptionAnswer.setCode(svyTaskTemplateTargetoption.getOptionCode()); |
| | | serviceSubtaskOptionAnswer.setValue(svyTaskTemplateTargetoption.getTargetvalue()); |
| | | serviceSubtaskOptionAnswer.setAppenddesc(svyTaskTemplateTargetoption.getAppenddesc()); |
| | | answerList.add(serviceSubtaskOptionAnswer); |
| | | } |
| | | } |
| | | } else { |
| | | //éåå¤é |
| | | if (CollectionUtils.isNotEmpty(svyLibTemplateScriptVO.getSvyLibTemplateTargetoptions())) { |
| | | dx = svyLibTemplateScriptVO.getSvyLibTemplateTargetoptions().get(0).getAppenddesc(); |
| | | if (CollectionUtils.isNotEmpty(svyTaskTemplateScriptVO.getSvyTaskTemplateTargetoptions())) { |
| | | ServiceSubtaskOptionAnswer serviceSubtaskOptionAnswer = new ServiceSubtaskOptionAnswer(); |
| | | serviceSubtaskOptionAnswer.setId(svyTaskTemplateScriptVO.getSvyTaskTemplateTargetoptions().get(0).getId()); |
| | | serviceSubtaskOptionAnswer.setCode(svyTaskTemplateScriptVO.getSvyTaskTemplateTargetoptions().get(0).getOptionCode()); |
| | | serviceSubtaskOptionAnswer.setValue(svyTaskTemplateScriptVO.getSvyTaskTemplateTargetoptions().get(0).getTargetvalue()); |
| | | serviceSubtaskOptionAnswer.setAppenddesc(svyTaskTemplateScriptVO.getSvyTaskTemplateTargetoptions().get(0).getAppenddesc()); |
| | | answerList.add(serviceSubtaskOptionAnswer); |
| | | } |
| | | } |
| | | serviceSubtaskAnswer.setTaskid(Long.valueOf(taskid)); |
| | | serviceSubtaskAnswer.setPatId(Long.valueOf(patid)); |
| | | serviceSubtaskAnswer.setScriptid(svyLibTemplateScriptVO.getId()); |
| | | serviceSubtaskAnswer.setScriptType(Long.valueOf(svyLibTemplateScriptVO.getScriptType())); |
| | | serviceSubtaskAnswer.setAnswer(dx.substring(1)); |
| | | serviceSubtaskAnswer.setScriptid(svyTaskTemplateScriptVO.getId()); |
| | | serviceSubtaskAnswer.setScriptType(Long.valueOf(svyTaskTemplateScriptVO.getScriptType())); |
| | | serviceSubtaskAnswer.setAnswer(JSON.toJSONString(answerList)); |
| | | serviceSubtaskAnswer.setComment(null); |
| | | serviceSubtaskAnswer.setCreateTime(new Date()); |
| | | serviceSubtaskAnswer.setUpdateTime(new Date()); |
| | |
| | | package com.smartor.service.impl; |
| | | |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.DtoConversionUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.mapper.*; |
| | |
| | | public class SvyLibTemplateServiceImpl implements ISvyLibTemplateService { |
| | | @Autowired |
| | | private SvyLibTemplateMapper svyLibTemplateMapper; |
| | | @Autowired |
| | | private Icd10AssociationMapper icd10AssociationMapper; |
| | | @Autowired |
| | | private SvyLibTemplateScriptMapper svyLibTemplateScriptMapper; |
| | | @Autowired |
| | |
| | | |
| | | //éè¿è¯æ¯IDè·åé项 |
| | | for (SvyTaskTemplateScriptVO svyTaskTemplateScriptVO : svyTaskTemplateScriptVOS) { |
| | | log.info("svyLibaTemplateScriptVOç主é®id为ï¼{}", svyTaskTemplateScriptVO.getID()); |
| | | log.info("svyLibaTemplateScriptVOç主é®id为ï¼{}", svyTaskTemplateScriptVO.getId()); |
| | | SvyTaskTemplateTargetoption svyTaskTemplateTargetoption = new SvyTaskTemplateTargetoption(); |
| | | svyTaskTemplateTargetoption.setScriptid(svyTaskTemplateScriptVO.getID()); |
| | | svyTaskTemplateTargetoption.setScriptid(svyTaskTemplateScriptVO.getId()); |
| | | List<SvyTaskTemplateTargetoption> svyTaskTemplateTargetoptions = svyTaskTemplateTargetoptionMapper.selectSvyTaskTemplateTargetoptionList(svyTaskTemplateTargetoption); |
| | | for (SvyTaskTemplateTargetoption svyTaskTemplateTargetoption1 : svyTaskTemplateTargetoptions) { |
| | | ObjectMapper mapper = new ObjectMapper(); |
| | |
| | | svyTaskTemplateScriptMapper.updateSvyTaskTemplateScript(svyTaskTemplateScript); |
| | | svyTaskTemplateScript.setIsoperation(2); |
| | | } else if (isoperation == 3) { |
| | | if (svyTaskTemplateScriptVO.getID() == null) { |
| | | if (svyTaskTemplateScriptVO.getId() == null) { |
| | | log.info("å é¤å¤±è´¥,模æ¿è¯æ¯id为空"); |
| | | } else { |
| | | svyTaskTemplateScriptVO.setUpdateTime(new Date()); |
| | | svyTaskTemplateScriptMapper.deleteSvyTaskTemplateScriptByID(svyTaskTemplateScriptVO.getID()); |
| | | svyTaskTemplateScriptMapper.deleteSvyTaskTemplateScriptByID(svyTaskTemplateScriptVO.getId()); |
| | | } |
| | | } |
| | | return svyTaskTemplateScript; |
| | |
| | | <result property="questionResult" column="question_result" /> |
| | | <result property="branchFlag" column="branch_flag"/> |
| | | <result property="branchNextscriptno" column="branch_nextscriptno"/> |
| | | <result property="scriptType" column="script_type"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectIvrTaskTemplateScriptVo"> |
| | | select id, taskid,branch_flag,branch_nextscriptno, templateID, questionPoint, noMatchText, noMatchVoice, slienceText, slienceVoice, submoduleText, submoduleVoice, noClearlyText, noClearlyVoice, categoryName, targetOptions, language, playWavOnly, value_type, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid, targettype, targetid, targetvalue, otherdata, is_must, question_result from ivr_task_template_script |
| | | select id, |
| | | taskid, |
| | | script_type, |
| | | branch_flag, |
| | | branch_nextscriptno, |
| | | templateID, |
| | | questionPoint, |
| | | noMatchText, |
| | | noMatchVoice, |
| | | slienceText, |
| | | slienceVoice, |
| | | submoduleText, |
| | | submoduleVoice, |
| | | noClearlyText, |
| | | noClearlyVoice, |
| | | categoryName, |
| | | targetOptions, language, playWavOnly, value_type, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid, targettype, targetid, targetvalue, otherdata, is_must, question_result |
| | | from ivr_task_template_script |
| | | </sql> |
| | | |
| | | <select id="selectIvrTaskTemplateScriptList" parameterType="com.smartor.domain.IvrTaskTemplateScript" resultMap="IvrTaskTemplateScriptResult"> |
| | | <select id="selectIvrTaskTemplateScriptList" parameterType="com.smartor.domain.IvrTaskTemplateScript" |
| | | resultMap="IvrTaskTemplateScriptResult"> |
| | | <include refid="selectIvrTaskTemplateScriptVo"/> |
| | | <where> |
| | | <if test="taskid != null "> and taskid = #{taskid}</if> |
| | |
| | | <if test="submoduleVoice != null and submoduleVoice != ''"> and submoduleVoice = #{submoduleVoice}</if> |
| | | <if test="noClearlyText != null and noClearlyText != ''"> and noClearlyText = #{noClearlyText}</if> |
| | | <if test="noClearlyVoice != null and noClearlyVoice != ''"> and noClearlyVoice = #{noClearlyVoice}</if> |
| | | <if test="categoryName != null and categoryName != ''"> and categoryName like concat('%', #{categoryName}, '%')</if> |
| | | <if test="categoryName != null and categoryName != ''">and categoryName like concat('%', #{categoryName}, |
| | | '%') |
| | | </if> |
| | | <if test="targetOptions != null and targetOptions != ''"> and targetOptions = #{targetOptions}</if> |
| | | <if test="language != null and language != ''"> and language = #{language}</if> |
| | | <if test="playWavOnly != null "> and playWavOnly = #{playWavOnly}</if> |
| | |
| | | <if test="isMust != null and isMust != ''"> and is_must = #{isMust}</if> |
| | | <if test="questionResult != null and questionResult != ''"> and question_result = #{questionResult}</if> |
| | | <if test="branchFlag != null and branchFlag != ''">and branch_flag = #{branchFlag}</if> |
| | | <if test="branchNextscriptno != null and branchNextscriptno != ''">and branch_nextscriptno = #{branchNextscriptno} |
| | | <if test="scriptType != null and scriptType != ''">and script_type = #{scriptType}</if> |
| | | <if test="branchNextscriptno != null and branchNextscriptno != ''">and branch_nextscriptno = |
| | | #{branchNextscriptno} |
| | | </if> |
| | | </where> |
| | | </select> |
| | |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertIvrTaskTemplateScript" parameterType="com.smartor.domain.IvrTaskTemplateScript" useGeneratedKeys="true" keyProperty="id"> |
| | | <insert id="insertIvrTaskTemplateScript" parameterType="com.smartor.domain.IvrTaskTemplateScript" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into ivr_task_template_script |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="taskid != null">taskid,</if> |
| | |
| | | <if test="questionResult != null">question_result,</if> |
| | | <if test="branchFlag != null and branchFlag != ''">branch_flag,</if> |
| | | <if test="branchNextscriptno != null and branchNextscriptno != ''">branch_nextscriptno,</if> |
| | | <if test="scriptType != null and scriptType != ''">script_type,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="taskid != null">#{taskid},</if> |
| | |
| | | <if test="questionResult != null">#{questionResult},</if> |
| | | <if test="branchFlag != null and branchFlag != ''">#{branchFlag},</if> |
| | | <if test="branchNextscriptno != null and branchNextscriptno != ''">#{branchNextscriptno},</if> |
| | | <if test="scriptType != null and scriptType != ''">#{scriptType},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="branchNextscriptno != null and branchNextscriptno != ''">branch_nextscriptno = |
| | | #{branchNextscriptno}, |
| | | </if> |
| | | <if test="scriptType != null and scriptType != ''">script_type = #{scriptType},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteIvrTaskTemplateScriptByID" parameterType="Long"> |
| | | delete from ivr_task_template_script where ID = #{ID} |
| | | delete |
| | | from ivr_task_template_script |
| | | where ID = #{ID} |
| | | </delete> |
| | | |
| | | <delete id="deleteIvrTaskTemplateScriptByIDs" parameterType="String"> |
| | |
| | | <result property="nodynamiccruxsJson" column="nodynamiccruxs"/> |
| | | <result property="dynamiccruxsJson" column="dynamiccruxs"/> |
| | | <result property="nextQuestion" column="next_question"/> |
| | | <result property="appenddesc" column="appenddesc"/> |
| | | <result property="optionCode" column="option_code"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectIvrTaskTemplateTargetoptionVo"> |
| | | select id, |
| | | taskid, |
| | | templateID, |
| | | appenddesc, |
| | | targetid, |
| | | option_code, |
| | | targetname, |
| | | targettype, |
| | | categoryName, |
| | |
| | | </if> |
| | | <if test="dynamiccruxsJson != null and dynamiccruxsJson != ''">and dynamiccruxs = #{dynamiccruxsJson}</if> |
| | | <if test="nextQuestion != null ">and next_question = #{nextQuestion}</if> |
| | | <if test="appenddesc != null ">and appenddesc = #{appenddesc}</if> |
| | | <if test="optionCode != null ">and option_code = #{optionCode}</if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | <if test="nodynamiccruxsJson != null">nodynamiccruxs,</if> |
| | | <if test="dynamiccruxsJson != null">dynamiccruxs,</if> |
| | | <if test="nextQuestion != null">next_question,</if> |
| | | <if test="appenddesc != null">appenddesc,</if> |
| | | <if test="optionCode != null ">option_code,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="taskid != null">#{taskid},</if> |
| | |
| | | <if test="nodynamiccruxsJson != null">#{nodynamiccruxsJson},</if> |
| | | <if test="dynamiccruxsJson != null">#{dynamiccruxsJson},</if> |
| | | <if test="nextQuestion != null">#{nextQuestion},</if> |
| | | <if test="appenddesc != null">#{appenddesc},</if> |
| | | <if test="optionCode != null ">#{optionCode},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="nodynamiccruxsJson != null">nodynamiccruxs = #{nodynamiccruxsJson},</if> |
| | | <if test="dynamiccruxsJson != null">dynamiccruxs = #{dynamiccruxsJson},</if> |
| | | <if test="nextQuestion != null">next_question = #{nextQuestion},</if> |
| | | <if test="appenddesc != null">appenddesc = #{appenddesc},</if> |
| | | <if test="optionCode != null ">option_code = #{optionCode},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | <!-- </trim>--> |
| | | |
| | | insert into |
| | | pat_archive(name,viptype,sex,idcardno,birthdate,birthplace,place_of_residence,age,sourcefrom,archivetime,archiveby,telcode,relativetelcode,idcardtype,orgid,openid,dduserid,update_by,update_time |
| | | ,create_by,create_time,isupload,upload_time,pattype,place_of_residence,nation,birthplace,native_place) values |
| | | pat_archive(name,viptype,sex,idcardno,birthdate,place_of_residence,age,sourcefrom,archivetime,archiveby,telcode,relativetelcode,idcardtype,orgid,openid,dduserid,update_by,update_time |
| | | ,create_by,create_time,isupload,upload_time,pattype,nation,birthplace,native_place) values |
| | | <foreach item="item" index="index" collection="list" separator=","> |
| | | (#{item.name},#{item.viptype},#{item.sex},#{item.idcardno},#{item.birthdate},#{item.birthplace},#{item.placeOfResidence},#{item.age},#{item.sourcefrom},#{item.archivetime},#{item.archiveby} |
| | | (#{item.name},#{item.viptype},#{item.sex},#{item.idcardno},#{item.birthdate},#{item.placeOfResidence},#{item.age},#{item.sourcefrom},#{item.archivetime},#{item.archiveby} |
| | | ,#{item.telcode},#{item.archiveby},#{item.idcardtype},#{item.orgid},#{item.openid},#{item.dduserid},#{item.updateBy}, |
| | | #{item.updateTime},#{item.createBy},#{item.createTime},#{item.isupload},#{item.uploadTime},#{item.pattype},#{item.placeOfResidence},#{item.nation},#{item.birthplace},#{item.nativePlace} |
| | | #{item.updateTime},#{item.createBy},#{item.createTime},#{item.isupload},#{item.uploadTime},#{item.pattype},#{item.nation},#{item.birthplace},#{item.nativePlace} |
| | | ) |
| | | </foreach> |
| | | </insert> |
| | |
| | | <result property="score" column="score"/> |
| | | <result property="answer" column="answer"/> |
| | | <result property="comment" column="comment"/> |
| | | <result property="istrack" column="istrack"/> |
| | | <result property="isabnormal" column="isabnormal"/> |
| | | <result property="trackFlag" column="trackFlag"/> |
| | | <result property="warningFlag" column="warning_flag"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | |
| | | <result property="uploadTime" column="upload_time"/> |
| | | <result property="pid" column="pid"/> |
| | | <result property="guid" column="guid"/> |
| | | <result property="answerps" column="answerps"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectServiceSubtaskAnswerVo"> |
| | | select id, |
| | | taskid, |
| | | answerps, |
| | | pat_id, |
| | | scriptid, |
| | | script_type, |
| | | score, |
| | | answer, |
| | | comment, |
| | | istrack, |
| | | isabnormal, |
| | | track_flag, |
| | | warning_flag, |
| | | del_flag, |
| | | create_by, |
| | | create_time, |
| | |
| | | <if test="score != null and score != ''">and score = #{score}</if> |
| | | <if test="answer != null and answer != ''">and answer = #{answer}</if> |
| | | <if test="comment != null and comment != ''">and comment = #{comment}</if> |
| | | <if test="istrack != null and istrack != ''">and istrack = #{istrack}</if> |
| | | <if test="isabnormal != null and isabnormal != ''">and isabnormal = #{isabnormal}</if> |
| | | <if test="trackFlag != null and trackFlag != ''">and track_flag = #{trackFlag}</if> |
| | | <if test="warningFlag != null and warningFlag != ''">and warning_flag = #{warningFlag}</if> |
| | | <if test="isupload != null ">and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> |
| | | <if test="pid != null and pid != ''">and pid = #{pid}</if> |
| | | <if test="guid != null and guid != ''">and guid = #{guid}</if> |
| | | <if test="answerps != null and answerps != ''">and answerps = #{answerps}</if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | <if test="score != null">score,</if> |
| | | <if test="answer != null">answer,</if> |
| | | <if test="comment != null">comment,</if> |
| | | <if test="istrack != null">istrack,</if> |
| | | <if test="isabnormal != null">isabnormal,</if> |
| | | <if test="trackFlag != null">track_flag,</if> |
| | | <if test="warningFlag != null">warning_flag,</if> |
| | | <if test="delFlag != null">del_flag,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | |
| | | <if test="uploadTime != null">upload_time,</if> |
| | | <if test="pid != null">pid,</if> |
| | | <if test="guid != null">guid,</if> |
| | | <if test="answerps != null">answerps,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="taskid != null">#{taskid},</if> |
| | |
| | | <if test="score != null">#{score},</if> |
| | | <if test="answer != null">#{answer},</if> |
| | | <if test="comment != null">#{comment},</if> |
| | | <if test="istrack != null">#{istrack},</if> |
| | | <if test="isabnormal != null">#{isabnormal},</if> |
| | | <if test="trackFlag != null">#{trackFlag},</if> |
| | | <if test="warningFlag != null">#{warningFlag},</if> |
| | | <if test="delFlag != null">#{delFlag},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | |
| | | <if test="uploadTime != null">#{uploadTime},</if> |
| | | <if test="pid != null">#{pid},</if> |
| | | <if test="guid != null">#{guid},</if> |
| | | <if test="answerps != null">#{answerps},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="score != null">score = #{score},</if> |
| | | <if test="answer != null">answer = #{answer},</if> |
| | | <if test="comment != null">comment = #{comment},</if> |
| | | <if test="istrack != null">istrack = #{istrack},</if> |
| | | <if test="isabnormal != null">isabnormal = #{isabnormal},</if> |
| | | <if test="trackFlag != null">track_flag = #{trackFlag},</if> |
| | | <if test="warningFlag != null">warning_flag = #{warningFlag},</if> |
| | | <if test="delFlag != null">del_flag = #{delFlag},</if> |
| | | <if test="createBy != null">create_by = #{createBy},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | |
| | | <if test="uploadTime != null">upload_time = #{uploadTime},</if> |
| | | <if test="pid != null">pid = #{pid},</if> |
| | | <if test="guid != null">guid = #{guid},</if> |
| | | <if test="answerps != null">answerps = #{answerps},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | <result property="guid" column="guid"/> |
| | | <result property="valueType" column="value_type"/> |
| | | <result property="targetOptions" column="targetOptions"/> |
| | | <result property="targettype" column="targettype"/> |
| | | <result property="scriptType" column="script_type"/> |
| | | <result property="targetid" column="targetid"/> |
| | | <result property="targetvalue" column="targetvalue"/> |
| | | <result property="nextScriptno" column="next_scriptno"/> |
| | |
| | | scriptno, |
| | | templateID, |
| | | scriptid, |
| | | script_topic, language, categoryName, script_content, is_must, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid, value_type, targetOptions, targettype, targetid, targetvalue, next_scriptno, script_result, otherdata, picture_path |
| | | script_topic, language, categoryName, script_content, is_must, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid, value_type, targetOptions, script_type, targetid, targetvalue, next_scriptno, script_result, otherdata, picture_path |
| | | from svy_task_template_script |
| | | </sql> |
| | | |
| | |
| | | <if test="guid != null and guid != ''">and guid = #{guid}</if> |
| | | <if test="valueType != null ">and value_type = #{valueType}</if> |
| | | <if test="targetOptions != null and targetOptions != ''">and targetOptions = #{targetOptions}</if> |
| | | <if test="targettype != null and targettype != ''">and targettype = #{targettype}</if> |
| | | <if test="scriptType != null and scriptType != ''">and script_type = #{scriptType}</if> |
| | | <if test="targetid != null ">and targetid = #{targetid}</if> |
| | | <if test="targetvalue != null and targetvalue != ''">and targetvalue = #{targetvalue}</if> |
| | | <if test="nextScriptno != null ">and next_scriptno = #{nextScriptno}</if> |
| | |
| | | <if test="guid != null">guid,</if> |
| | | <if test="valueType != null">value_type,</if> |
| | | <if test="targetOptions != null">targetOptions,</if> |
| | | <if test="targettype != null">targettype,</if> |
| | | <if test="scriptType != null">script_type,</if> |
| | | <if test="targetid != null">targetid,</if> |
| | | <if test="targetvalue != null">targetvalue,</if> |
| | | <if test="nextScriptno != null">next_scriptno,</if> |
| | |
| | | <if test="guid != null">#{guid},</if> |
| | | <if test="valueType != null">#{valueType},</if> |
| | | <if test="targetOptions != null">#{targetOptions},</if> |
| | | <if test="targettype != null">#{targettype},</if> |
| | | <if test="scriptType != null">#{scriptType},</if> |
| | | <if test="targetid != null">#{targetid},</if> |
| | | <if test="targetvalue != null">#{targetvalue},</if> |
| | | <if test="nextScriptno != null">#{nextScriptno},</if> |
| | |
| | | <if test="guid != null">guid = #{guid},</if> |
| | | <if test="valueType != null">value_type = #{valueType},</if> |
| | | <if test="targetOptions != null">targetOptions = #{targetOptions},</if> |
| | | <if test="targettype != null">targettype = #{targettype},</if> |
| | | <if test="scriptType != null">script_type = #{scriptType},</if> |
| | | <if test="targetid != null">targetid = #{targetid},</if> |
| | | <if test="targetvalue != null">targetvalue = #{targetvalue},</if> |
| | | <if test="nextScriptno != null">next_scriptno = #{nextScriptno},</if> |
| | |
| | | <result property="dynamiccruxsJson" column="dynamiccruxs" /> |
| | | <result property="nextQuestion" column="next_question" /> |
| | | <result property="picturePath" column="picture_path" /> |
| | | <result property="optionCode" column="option_code"/> |
| | | <result property="appendflag" column="appendflag"/> |
| | | <result property="appenddesc" column="appenddesc"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectSvyTaskTemplateTargetoptionVo"> |
| | | select id, taskid, templateID, targetid, targetname, targettype, categoryName, targetvalue, targetregex2, targetregex, optioncontent, language, version, groupid, isabnormal, warnup, warndown, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid, scriptid, nodynamiccruxs, dynamiccruxs, next_question, picture_path from svy_task_template_targetoption |
| | | select id, |
| | | option_code, |
| | | appendflag, |
| | | appenddesc, |
| | | taskid, |
| | | templateID, |
| | | targetid, |
| | | targetname, |
| | | targettype, |
| | | categoryName, |
| | | targetvalue, |
| | | targetregex2, |
| | | targetregex, |
| | | optioncontent, language, version, groupid, isabnormal, warnup, warndown, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, orgid, pid, guid, scriptid, nodynamiccruxs, dynamiccruxs, next_question, picture_path |
| | | from svy_task_template_targetoption |
| | | </sql> |
| | | |
| | | <select id="selectSvyTaskTemplateTargetoptionList" parameterType="com.smartor.domain.SvyTaskTemplateTargetoption" resultMap="SvyTaskTemplateTargetoptionResult"> |
| | | <select id="selectSvyTaskTemplateTargetoptionList" parameterType="com.smartor.domain.SvyTaskTemplateTargetoption" |
| | | resultMap="SvyTaskTemplateTargetoptionResult"> |
| | | <include refid="selectSvyTaskTemplateTargetoptionVo"/> |
| | | <where> |
| | | <if test="taskid != null "> and taskid = #{taskid}</if> |
| | |
| | | <if test="targetid != null "> and targetid = #{targetid}</if> |
| | | <if test="targetname != null and targetname != ''"> and targetname like concat('%', #{targetname}, '%')</if> |
| | | <if test="targettype != null and targettype != ''"> and targettype = #{targettype}</if> |
| | | <if test="categoryName != null and categoryName != ''"> and categoryName like concat('%', #{categoryName}, '%')</if> |
| | | <if test="categoryName != null and categoryName != ''">and categoryName like concat('%', #{categoryName}, |
| | | '%') |
| | | </if> |
| | | <if test="targetvalue != null and targetvalue != ''"> and targetvalue = #{targetvalue}</if> |
| | | <if test="targetregex2 != null and targetregex2 != ''"> and targetregex2 = #{targetregex2}</if> |
| | | <if test="targetregex != null and targetregex != ''"> and targetregex = #{targetregex}</if> |
| | |
| | | <if test="dynamiccruxs != null and dynamiccruxs != ''"> and dynamiccruxs = #{dynamiccruxsJson}</if> |
| | | <if test="nextQuestion != null "> and next_question = #{nextQuestion}</if> |
| | | <if test="picturePath != null and picturePath != ''"> and picture_path = #{picturePath}</if> |
| | | <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> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSvyTaskTemplateTargetoptionById" parameterType="Long" resultMap="SvyTaskTemplateTargetoptionResult"> |
| | | <select id="selectSvyTaskTemplateTargetoptionById" parameterType="Long" |
| | | resultMap="SvyTaskTemplateTargetoptionResult"> |
| | | <include refid="selectSvyTaskTemplateTargetoptionVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertSvyTaskTemplateTargetoption" parameterType="com.smartor.domain.SvyTaskTemplateTargetoption" useGeneratedKeys="true" keyProperty="id"> |
| | | <insert id="insertSvyTaskTemplateTargetoption" parameterType="com.smartor.domain.SvyTaskTemplateTargetoption" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | | insert into svy_task_template_targetoption |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="taskid != null">taskid,</if> |
| | |
| | | <if test="dynamiccruxs != null">dynamiccruxs,</if> |
| | | <if test="nextQuestion != null">next_question,</if> |
| | | <if test="picturePath != null">picture_path,</if> |
| | | <if test="optionCode != null">option_code,</if> |
| | | <if test="appendflag != null">appendflag,</if> |
| | | <if test="appenddesc != null">appenddesc,</if> |
| | | |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="taskid != null">#{taskid},</if> |
| | |
| | | <if test="dynamiccruxs != null">#{dynamiccruxsJson},</if> |
| | | <if test="nextQuestion != null">#{nextQuestion},</if> |
| | | <if test="picturePath != null">#{picturePath},</if> |
| | | <if test="optionCode != null">#{optionCode}</if> |
| | | <if test="appendflag != null">#{appendflag}</if> |
| | | <if test="appenddesc != null">#{appenddesc}</if> |
| | | |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="dynamiccruxs != null">dynamiccruxs = #{dynamiccruxsJson},</if> |
| | | <if test="nextQuestion != null">next_question = #{nextQuestion},</if> |
| | | <if test="picturePath != null">picture_path = #{picturePath},</if> |
| | | <if test="optionCode != null">option_code = #{optionCode},</if> |
| | | <if test="appendflag != null">appendflag = #{appendflag},</if> |
| | | <if test="appenddesc != null">appenddesc = #{appenddesc},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteSvyTaskTemplateTargetoptionById" parameterType="Long"> |
| | | delete from svy_task_template_targetoption where id = #{id} |
| | | delete |
| | | from svy_task_template_targetoption |
| | | where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteSvyTaskTemplateTargetoptionByIds" parameterType="String"> |