已重命名1个文件
已修改31个文件
已添加6个文件
| | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.http.HttpUtils; |
| | | import com.ruoyi.common.utils.sign.Md5Utils; |
| | | import com.ruoyi.quartz.util.RandomStringGenerator; |
| | | import com.smartor.common.RandomStringGenerator; |
| | | import com.smartor.common.SendService; |
| | | import com.smartor.config.RobotPhoneUtils; |
| | | import com.smartor.domain.*; |
| | |
| | | private RedisCache redisCache; |
| | | |
| | | @Autowired |
| | | private RobotPhoneUtils robotPhoneUtils; |
| | | |
| | | @Autowired |
| | | private ServiceTaskMapper svyTaskMapper; |
| | | |
| | | @Autowired |
| | | private ServiceSubtaskMapper serviceSubtaskMapper; |
| | | |
| | | @Autowired |
| | | private ISvyTaskTemplateService iSvyTaskTemplateService; |
| | | |
| | | @Autowired |
| | | private IServiceSubtaskRecordService serviceSubtaskRecordService; |
| | |
| | | //妿containsä¸ä¸ºtrue,说æå½åçæ£è
å·²ç»åéæåï¼ç´æ¥å¾ªç¯ä¸ä¸ä¸ªäººå°±è¡ |
| | | if (!contains) continue; |
| | | } |
| | | |
| | | try { |
| | | ServiceTask ivrTask = ivrTaskMapper.selectServiceTaskByTaskid(serviceSubtask.getTaskid()); |
| | | if (ivrTask.getSendState() != null && ivrTask.getSendState() == 3 || ivrTask.getSendState() != null && ivrTask.getSendState() == 4) { |
| | |
| | | //çä¿¡ |
| | | //对urlä¸ä¸¤ä¸ªåæ°å å¯ |
| | | RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample(); |
| | | String taskId = rsaPublicKeyExample.encryptedData(ivrTask1.getTaskid().toString(), pub_key); |
| | | |
| | | for (ServiceSubtask serviceSubtask : selectServiceSubtaskList) { |
| | | //å
夿ä¸ä¸ï¼subIdsæ¯å¦ä¸ºç©ºï¼å¦æä¸ä¸ºç©ºï¼åªæ§è¡subIdséçæ£è
|
| | |
| | | } |
| | | |
| | | try { |
| | | String patid = rsaPublicKeyExample.encryptedData(serviceSubtask.getPatid().toString(), pub_key); |
| | | SendMagParam sendMagParam = new SendMagParam(); |
| | | sendMagParam.setType("4"); |
| | | if (type == 1) { |
| | | //é访 |
| | | ServiceOutPath serviceOutPath = new ServiceOutPath(); |
| | | serviceOutPath.setParam1(taskId); |
| | | serviceOutPath.setParam2(patid); |
| | | serviceOutPath.setCreateTime(new Date()); |
| | | iServiceOutPathService.insertServiceOutPath(serviceOutPath); |
| | | // sendMagParam.setUrl(ip + ":" + req_path + "/followvisit/particty?param1=" + taskId + "¶m2=" + patid + "¶m5=false"); |
| | | //转æ16è¿å¶ |
| | | String format = String.format("%03X", serviceOutPath.getId()) + RandomStringGenerator.generateRandomString(); |
| | | serviceOutPath.setRadix(format); |
| | | serviceOutPath.setUpdateTime(new Date()); |
| | | iServiceOutPathService.updateServiceOutPath(serviceOutPath); |
| | | sendMagParam.setPhone(serviceSubtask.getPhone()); |
| | | sendMagParam.setUrl(ip + ":" + req_path + "/sf?p=" + format); |
| | | sendMagParam.setContent("æ¨å¥½ï¼é请æ¨å¡«ååºé¢éè®¿è°æ¥è¡¨ï¼è¯·ç¹å»" + sendMagParam.getUrl() + " å¡«åãæè°¢æ¨é
åï¼"); |
| | | log.info("888888888888:{}", sendMagParam); |
| | | sendMagParam.setContent("æ¨å¥½ï¼é请æ¨å¡«ååºé¢éè®¿è°æ¥è¡¨ï¼è¯·ç¹å»" + serviceSubtask.getOutPath() + " å¡«åãæè°¢æ¨é
åï¼"); |
| | | } else if (type == 2) { |
| | | //é®å¸ï¼é®é¢ï¼ |
| | | ServiceOutPath serviceOutPath = new ServiceOutPath(); |
| | | serviceOutPath.setParam1(taskId); |
| | | serviceOutPath.setParam2(patid); |
| | | // serviceOutPath.setParam3(URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString())); |
| | | serviceOutPath.setParam3(ivrTask1.getTaskName()); |
| | | serviceOutPath.setCreateTime(new Date()); |
| | | iServiceOutPathService.insertServiceOutPath(serviceOutPath); |
| | | String format = String.format("%03X", serviceOutPath.getId()) + RandomStringGenerator.generateRandomString(); |
| | | serviceOutPath.setRadix(format); |
| | | serviceOutPath.setUpdateTime(new Date()); |
| | | iServiceOutPathService.updateServiceOutPath(serviceOutPath); |
| | | |
| | | // sendMagParam.setUrl(ip + ":" + req_path + "/outsideChainwt?param1=" + taskId + "¶m2=" + patid + "¶m3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "¶m5=false"); |
| | | sendMagParam.setPhone(serviceSubtask.getPhone()); |
| | | sendMagParam.setUrl(ip + ":" + req_path + "/wt?p=" + format); |
| | | sendMagParam.setContent("æ¨å¥½ï¼é请æ¨å¡«ååºé¢è°æ¥è¡¨ï¼è¯·ç¹å»" + sendMagParam.getUrl() + " å¡«åãæè°¢æ¨é
åï¼"); |
| | | log.info("æ¨å¥½ï¼é请æ¨å¡«ååºé¢è°æ¥è¡¨ï¼è¯·ç¹å»,{}", sendMagParam.getUrl()); |
| | | sendMagParam.setContent("æ¨å¥½ï¼é请æ¨å¡«ååºé¢è°æ¥è¡¨ï¼è¯·ç¹å»" + serviceSubtask.getOutPath() + " å¡«åãæè°¢æ¨é
åï¼"); |
| | | } else if (type == 3) { |
| | | //宣æ |
| | | ServiceOutPath serviceOutPath = new ServiceOutPath(); |
| | | serviceOutPath.setParam1(taskId); |
| | | serviceOutPath.setParam2(patid); |
| | | // serviceOutPath.setParam3(URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString())); |
| | | serviceOutPath.setParam3(ivrTask1.getTaskName()); |
| | | serviceOutPath.setCreateTime(new Date()); |
| | | iServiceOutPathService.insertServiceOutPath(serviceOutPath); |
| | | String format = String.format("%03X", serviceOutPath.getId()) + RandomStringGenerator.generateRandomString(); |
| | | serviceOutPath.setRadix(format); |
| | | serviceOutPath.setUpdateTime(new Date()); |
| | | iServiceOutPathService.updateServiceOutPath(serviceOutPath); |
| | | // sendMagParam.setUrl(ip + ":" + req_path + "/outsideChainxj?param1=" + taskId + "¶m2=" + patid + "¶m3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "¶m5=false"); |
| | | sendMagParam.setPhone(serviceSubtask.getPhone()); |
| | | sendMagParam.setUrl(ip + ":" + req_path + "/xj?p=" + format); |
| | | sendMagParam.setContent("æ¨å¥½ï¼é请æ¨å¡«ååºé¢å®£æè°æ¥è¡¨ï¼è¯·ç¹å»" + sendMagParam.getUrl() + "æ¥çãæè°¢æ¨é
åï¼"); |
| | | log.info("-----------sendMagParamçå¼ä¸ºï¼{}", sendMagParam); |
| | | sendMagParam.setContent("æ¨å¥½ï¼é请æ¨å¡«ååºé¢å®£æè°æ¥è¡¨ï¼è¯·ç¹å»" + serviceSubtask.getOutPath() + "æ¥çãæè°¢æ¨é
åï¼"); |
| | | } |
| | | //çä¿¡è¿éè¦æ¨¡æ¿ |
| | | // Map<String, String> req = new HashMap<>(); |
| | | // req.put("phone", sendMagParam.getPhone()); |
| | | // req.put("content", sendMagParam.getContent()); |
| | | // String s = HttpUtil.postJsonRequest(xhsmsPath, new Gson().toJson(req)); |
| | | //send_macï¼ç¾åå¼ï¼=md5(send_source+send_to_mobiles+send_text+ç¾åç¼ç )ï¼32ä½å°å |
| | | String mac = "shuifang" + sendMagParam.getPhone() + sendMagParam.getContent() + "ShuiFang_jjty_20250106"; |
| | | |
| | | String mac = "shuifang" + serviceSubtask.getPhone() + sendMagParam.getContent() + "ShuiFang_jjty_20250106"; |
| | | |
| | | StringBuilder strb = new StringBuilder(); |
| | | strb.append("send_source=shuifang&send_to_mobiles=" + sendMagParam.getPhone()); |
| | | strb.append("send_source=shuifang&send_to_mobiles=" + serviceSubtask.getPhone()); |
| | | strb.append("&send_text=" + sendMagParam.getContent()); |
| | | strb.append("&send_mac=" + Md5Utils.hash(mac)); |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddhhmmsszzz"); // è¾åºæ¥ææ ¼å¼ |
| | |
| | | serviceSubtask.setRemark("çä¿¡åéæå"); |
| | | serviceSubtask.setGuid(uuid); |
| | | serviceSubtask.setSendstate(3L); |
| | | // serviceSubtask.setFinishtime(new Date()); |
| | | serviceSubtaskMapper.updateServiceSubtask(serviceSubtask); |
| | | |
| | | //ä»»å¡åéè®°å½ |
| | |
| | | sendMagParam.setContent(JSON.toJSONString(map)); |
| | | sendMagParam.setOpenid(serviceSubtask.getOpenid()); |
| | | Boolean aBoolean = sendService.sendMsg(sendMagParam); |
| | | String url = null; |
| | | |
| | | //// if (type == 1) { |
| | | //// url = ip + ":" + req_path + "/outsideChain?param1=" + taskId + "¶m2=" + patid + "¶m3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "¶m5=false"; |
| | | //// } else if (type == 2) { |
| | | //// url = ip + ":" + req_path + "/outsideChainwt?param1=" + taskId + "¶m2=" + patid + "¶m3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "¶m5=false"; |
| | | //// } else if (type == 3) { |
| | | //// url = ip + ":" + req_path + "/outsideChainxj?param1=" + taskId + "¶m2=" + patid + "¶m3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "¶m5=false"; |
| | | //// } |
| | | // if (type == 1) { |
| | | // //é访 |
| | | // ServiceOutPath serviceOutPath = new ServiceOutPath(); |
| | | // serviceOutPath.setParam1(taskId); |
| | | // serviceOutPath.setParam2(patid); |
| | | // serviceOutPath.setCreateTime(new Date()); |
| | | // iServiceOutPathService.insertServiceOutPath(serviceOutPath); |
| | | // String format = String.format("%03X", serviceOutPath.getId()); |
| | | // serviceOutPath.setRadix(format); |
| | | // serviceOutPath.setUpdateTime(new Date()); |
| | | // iServiceOutPathService.updateServiceOutPath(serviceOutPath); |
| | | //// sendMagParam.setUrl(ip + ":" + req_path + "/followvisit/particty?param1=" + taskId + "¶m2=" + patid + "¶m5=false"); |
| | | // url = ip + ":" + req_path + "/sf?p=" + format; |
| | | // } else if (type == 2) { |
| | | // //é®å¸ |
| | | // ServiceOutPath serviceOutPath = new ServiceOutPath(); |
| | | // serviceOutPath.setParam1(taskId); |
| | | // serviceOutPath.setParam2(patid); |
| | | //// serviceOutPath.setParam3(URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString())); |
| | | // serviceOutPath.setParam3(ivrTask1.getTaskName()); |
| | | // serviceOutPath.setCreateTime(new Date()); |
| | | // iServiceOutPathService.insertServiceOutPath(serviceOutPath); |
| | | // String format = String.format("%03X", serviceOutPath.getId()); |
| | | // serviceOutPath.setRadix(format); |
| | | // serviceOutPath.setUpdateTime(new Date()); |
| | | // iServiceOutPathService.updateServiceOutPath(serviceOutPath); |
| | | //// sendMagParam.setUrl(ip + ":" + req_path + "/outsideChainwt?param1=" + taskId + "¶m2=" + patid + "¶m3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "¶m5=false"); |
| | | // url = ip + ":" + req_path + "/wt?p=" + format; |
| | | // } else if (type == 3) { |
| | | // //宣æ |
| | | // ServiceOutPath serviceOutPath = new ServiceOutPath(); |
| | | // serviceOutPath.setParam1(taskId); |
| | | // serviceOutPath.setParam2(patid); |
| | | //// serviceOutPath.setParam3(URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString())); |
| | | // serviceOutPath.setParam3(ivrTask1.getTaskName()); |
| | | // serviceOutPath.setCreateTime(new Date()); |
| | | // iServiceOutPathService.insertServiceOutPath(serviceOutPath); |
| | | // String format = String.format("%03X", serviceOutPath.getId()); |
| | | // serviceOutPath.setRadix(format); |
| | | // serviceOutPath.setUpdateTime(new Date()); |
| | | // iServiceOutPathService.updateServiceOutPath(serviceOutPath); |
| | | // url = ip + ":" + req_path + "/xj?p=" + format; |
| | | // } |
| | | // |
| | | // String wxCode = getWXCode(serviceSubtask.getSfzh(), url, serviceSubtask.getTaskName(), serviceSubtask.getTaskDesc(), "æ "); |
| | | // Map<String, Object> map = JSONObject.parseObject(wxCode, Map.class); |
| | | // if (!map.isEmpty()) { |
| | | serviceSubtask.setResult("success"); |
| | | serviceSubtask.setSendstate(3L); |
| | | if (aBoolean == false) { |
| | |
| | | serviceSubtaskRecordService.insertServiceSubtaskRecord(serviceSubtaskRecord); |
| | | continue; |
| | | } |
| | | // } |
| | | } catch (Exception e) { |
| | | ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord(); |
| | | serviceSubtaskRecord.setTaskid(serviceSubtask.getTaskid().toString()); |
| | |
| | | serviceSubtask.setRemark("åé失败"); |
| | | serviceSubtask.setSendstate(5L); |
| | | serviceSubtask.setId(id); |
| | | // serviceSubtask.setFinishtime(new Date()); |
| | | serviceSubtaskMapper.updateServiceSubtask(serviceSubtask); |
| | | } |
| | | } |
| | |
| | | |
| | | } |
| | | |
| | | // /** |
| | | // * æºå¨äººç¬¬ä¸å¥è¯è¯é³ |
| | | // * concurrency = "50" å¹¶åæ°ä¸º50 |
| | | // */ |
| | | // @RabbitListener(queues = "ob_queue", concurrency = "50") |
| | | // public void obVisit(String content, Message message, Channel channel) throws IOException { |
| | | // try { |
| | | // IvrTaskcallPhoneMQ commonTaskcallMQ = null; |
| | | // ObjectMapper mapper = new ObjectMapper(); |
| | | // commonTaskcallMQ = mapper.readValue(content, IvrTaskcallPhoneMQ.class); |
| | | // //夿æ£è
æ¯å¦å·²ç»æ¥çµè¯ |
| | | // String str = redisCache.getCacheObject(commonTaskcallMQ.getUuid() + "state_id"); |
| | | // System.out.println("-----------------" + str); |
| | | // if (StringUtils.isNotEmpty(str) && str.equals("0")) { |
| | | // //æ£è
å·²ç»æ¥å¬äºçµè¯ |
| | | // new PhoneUtils().ttsPlayback(commonTaskcallMQ.getScript(), commonTaskcallMQ.getUuid()); |
| | | // } else if (StringUtils.isNotEmpty(str) && str.equals("-10")) { |
| | | // //è¿ä¸ªè¯´æ,å·²ç»æäºæå®éæ°è¿æ¯æ²¡æäººæ¥ï¼å¯ä»¥å°æ¶æ¯ä»éåä¸ç§»é¤äº |
| | | // channel.basicAck(message.getMessageProperties().getDeliveryTag(), false); |
| | | // return; |
| | | // } else { |
| | | // //è¿è¡éåå°¾é¨ï¼è¿è¡ä¸ä¸æ¬¡æ ¡éª |
| | | //// channel.basicRecover(false); |
| | | // channel.basicReject(message.getMessageProperties().getDeliveryTag(), true); |
| | | // System.out.println("++++++++++++++++++++++" + str); |
| | | // return; |
| | | // } |
| | | // //éç¥ MQ æ¶æ¯å·²è¢«æ¥æ¶,å¯ä»¥ACK(ä»éåä¸å é¤)äº ï¼è¿ä¸ªéè¦æ ¹æ®ä¸å¡åå»å¤çACKï¼ |
| | | // channel.basicAck(message.getMessageProperties().getDeliveryTag(), false); |
| | | // } catch (Exception e) { |
| | | // log.error("============æ¶è´¹å¤±è´¥,å°è¯æ¶æ¯è¡¥å忬¡æ¶è´¹!=============="); |
| | | // log.error(e.getMessage()); |
| | | // channel.basicReject(message.getMessageProperties().getDeliveryTag(), true); |
| | | // } |
| | | // } |
| | | private String getKey() { |
| | | Map<String, String> map = new HashMap<>(); |
| | | for (int i = 0; i < 6; i++) { |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.web.controller.smartor; |
| | | |
| | | import java.util.List; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.smartor.domain.PatServiceContract; |
| | | import com.smartor.service.IPatServiceContractService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * ãæ£è
æå¡ç¾çº¦ãController |
| | | * |
| | | * @author lihu |
| | | * @date 2025-12-08 |
| | | */ |
| | | @Api("æ£è
æå¡ç¾çº¦") |
| | | @RestController |
| | | @RequestMapping("/smartor/contract") |
| | | public class PatServiceContractController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IPatServiceContractService patServiceContractService; |
| | | |
| | | /** |
| | | * æ¥è¯¢ãæ£è
æå¡ç¾çº¦ãå表 |
| | | */ |
| | | @ApiOperation("æ¥è¯¢ãæ£è
æå¡ç¾çº¦ãå表") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:contract:list')") |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody PatServiceContract patServiceContract) |
| | | { |
| | | startPage(); |
| | | List<PatServiceContract> list = patServiceContractService.selectPatServiceContractList(patServiceContract); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºãæ£è
æå¡ç¾çº¦ãå表 |
| | | */ |
| | | @ApiOperation("导åºãæ£è
æå¡ç¾çº¦ãå表") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:contract:export')") |
| | | @Log(title = "ã请填ååè½åç§°ã", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, PatServiceContract patServiceContract) |
| | | { |
| | | List<PatServiceContract> list = patServiceContractService.selectPatServiceContractList(patServiceContract); |
| | | ExcelUtil<PatServiceContract> util = new ExcelUtil<PatServiceContract>(PatServiceContract.class); |
| | | util.exportExcel(response, list, "ã请填ååè½åç§°ãæ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·åãæ£è
æå¡ç¾çº¦ã详ç»ä¿¡æ¯ |
| | | */ |
| | | @ApiOperation("è·åãæ£è
æå¡ç¾çº¦ã详ç»ä¿¡æ¯") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:contract:query')") |
| | | @GetMapping(value = "/getInfo/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(patServiceContractService.selectPatServiceContractById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ãæ£è
æå¡ç¾çº¦ã |
| | | */ |
| | | @ApiOperation("æ°å¢ãæ£è
æå¡ç¾çº¦ã") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:contract:add')") |
| | | @Log(title = "ãæ£è
æå¡ç¾çº¦ã", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody PatServiceContract patServiceContract) |
| | | { |
| | | return toAjax(patServiceContractService.insertPatServiceContract(patServiceContract)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ãæ£è
æå¡ç¾çº¦ã |
| | | */ |
| | | @ApiOperation("ä¿®æ¹ãæ£è
æå¡ç¾çº¦ã") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:contract:edit')") |
| | | @Log(title = "ãæ£è
æå¡ç¾çº¦ã", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody PatServiceContract patServiceContract) |
| | | { |
| | | return toAjax(patServiceContractService.updatePatServiceContract(patServiceContract)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ãæ£è
æå¡ç¾çº¦ã |
| | | */ |
| | | @ApiOperation("å é¤ãæ£è
æå¡ç¾çº¦ã") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:contract:remove')") |
| | | @Log(title = "ã请填ååè½åç§°ã", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(patServiceContractService.deletePatServiceContractByIds(ids)); |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.service.IServiceSubtaskRecordService; |
| | | import com.smartor.service.IServiceSubtaskService; |
| | | import com.smartor.service.*; |
| | | import com.smartor.service.impl.IvrTaskTemplateServiceImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | return getDataTable2(total, list); |
| | | // return getDataTable(serviceSubtaskService.patItem(ivrTaskcall)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£è
éè®¿ä¿¡æ¯ |
| | |
| | | @Test |
| | | public void bb() { |
| | | RSAPublicKeyExample rsaPublicKeyExample=new RSAPublicKeyExample(); |
| | | // String s1 = rsaPublicKeyExample.encryptedData("123456", "MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALQzqW1EIXBKGMu+2oEYSB5gM7Ox/ihyYTeeoE0yPX1qtt4++5yNOeTBVd6EEM4iKzVEzWj6REIWVwaSNPn/SvUCAwEAAQ=="); |
| | | String s1 = rsaPublicKeyExample.encryptedData("123456", "MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALQzqW1EIXBKGMu+2oEYSB5gM7Ox/ihyYTeeoE0yPX1qtt4++5yNOeTBVd6EEM4iKzVEzWj6REIWVwaSNPn/SvUCAwEAAQ=="); |
| | | |
| | | String s = rsaPublicKeyExample.decryptedData("J7V6yb5WHW63bQMbMyzxeT07HGesIXJwy9w77zBa6KG4PnWe7uaZh00vX21w%2Bn5FW8%2BjUAAU1HatqRWzFp7fvA%3D%3D", "MIIBUwIBADANBgkqhkiG9w0BAQEFAASCAT0wggE5AgEAAkEAtDOpbUQhcEoYy77agRhIHmAzs7H+KHJhN56gTTI9fWq23j77nI055MFV3oQQziIrNUTNaPpEQhZXBpI0+f9K9QIDAQABAkB3n0fcWfrcoMN/FU3VnrnZOEF6CzFNxkgU9P8y36QECWKZ9JhYQkNpKrMC9oXlN3VSaRigV7B+L/I/a0Rs1W+tAiEA4jx7xcXJ4y4BNwAmVHt6NNiEkzIwWnwC/0qsEu8NsOsCIQDL6MMn1D2uznC6OuOWpxDCkBh1JL1NzZTZeH2G+hj7nwIgKGAC9tjFnvWm4dn0/T7MIIJDpsFeP8fCAS2iZ/6hwuECIAS/eLvWr1EAsZNEh8QcQ8GkBU3E+ztyjAK8UX/xFt/VAiBf79/1tDErX4/DChecM8w3c3DhbBcjuE3fHZn7p6/UKg=="); |
| | | System.out.println(s); |
| | | // String s = rsaPublicKeyExample.decryptedData("J7V6yb5WHW63bQMbMyzxeT07HGesIXJwy9w77zBa6KG4PnWe7uaZh00vX21w%2Bn5FW8%2BjUAAU1HatqRWzFp7fvA%3D%3D", "MIIBUwIBADANBgkqhkiG9w0BAQEFAASCAT0wggE5AgEAAkEAtDOpbUQhcEoYy77agRhIHmAzs7H+KHJhN56gTTI9fWq23j77nI055MFV3oQQziIrNUTNaPpEQhZXBpI0+f9K9QIDAQABAkB3n0fcWfrcoMN/FU3VnrnZOEF6CzFNxkgU9P8y36QECWKZ9JhYQkNpKrMC9oXlN3VSaRigV7B+L/I/a0Rs1W+tAiEA4jx7xcXJ4y4BNwAmVHt6NNiEkzIwWnwC/0qsEu8NsOsCIQDL6MMn1D2uznC6OuOWpxDCkBh1JL1NzZTZeH2G+hj7nwIgKGAC9tjFnvWm4dn0/T7MIIJDpsFeP8fCAS2iZ/6hwuECIAS/eLvWr1EAsZNEh8QcQ8GkBU3E+ztyjAK8UX/xFt/VAiBf79/1tDErX4/DChecM8w3c3DhbBcjuE3fHZn7p6/UKg=="); |
| | | System.out.println(s1); |
| | | } |
| | | |
| | | public void aa(MultipartFile file) throws IOException { |
| | |
| | | druid: |
| | | # ä¸»åºæ°æ®æº |
| | | master: |
| | | # å
¬å¸ |
| | | # url: jdbc:mysql://192.168.2.9:3308/smartor?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | # æ°å |
| | | # url: jdbc:mysql://192.168.191.181:3308/smartor?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | # username: smartor |
| | | # password: Smartor.2023 |
| | | # driverClassName: com.mysql.cj.jdbc.Driver |
| | | # å
¬å¸é«æ¯ |
| | | # url: jdbc:postgresql://192.168.2.202:15400/smartorwx2 |
| | | # username: csbsbxt |
| | | # password: csbsbxt@123 |
| | | # driver-class-name: org.postgresql.Driver |
| | | # æ¬å°é«æ¯ |
| | | # url: jdbc:postgresql://127.0.0.1:5432/postgres |
| | | # username: gaussdb |
| | | # password: Ls@123456 |
| | | # driver-class-name: org.postgresql.Driver |
| | | # 髿¯æ°æ®åºé¾æ¥ |
| | | url: jdbc:postgresql://127.0.0.1:15400/smartorwx?prepareThreshold=0 |
| | | username: shuifang |
| | | password: Shuifang@51868 |
| | | # url: jdbc:postgresql://192.168.100.132:5432/postgres |
| | | # username: gaussdb |
| | | # password: Ls@123456 |
| | | # driver-class-name: org.postgresql.Driver |
| | | # å
¬å¸æå¡å¨é«æ¯ |
| | | url: jdbc:postgresql://haiershi.a1.luyouxia.net:26155/postgres |
| | | username: gaussdb |
| | | password: Gauss@123 |
| | | driver-class-name: org.postgresql.Driver |
| | | # 髿¯æ°æ®åºé¾æ¥ |
| | | # url: jdbc:postgresql://172.20.32.115:15400/smartorwx?prepareThreshold=0 |
| | | # username: shuifang |
| | | # password: Shuifang@51868 |
| | | # driver-class-name: org.postgresql.Driver |
| | | |
| | | # å
¬å¸äº |
| | | # url: jdbc:mysql://116.62.18.175:6002/smartor?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | |
| | | # æ
¢SQLè®°å½ |
| | | log-slow-sql: true |
| | | slow-sql-millis: 1000 |
| | | merge-sql: false |
| | | merge-sql: true |
| | | wall: |
| | | config: |
| | | multi-statement-allow: true |
| | | # redis é
ç½® |
| | | redis: |
| | | # # å°åï¼æ é¡äººæ°å»é¢ï¼ |
| | | host: 127.0.0.1 |
| | | port: 6020 |
| | | # host: 127.0.0.1 |
| | | # port: 6020 |
| | | |
| | | # å°åï¼å
¬å¸ï¼ |
| | | # host: 116.62.18.175 |
| | | # host: 192.168.1.10 |
| | | # port: 6020 |
| | | host: 127.0.0.1 |
| | | port: 6020 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | |
| | | prefix: /api |
| | | readonly: false |
| | | sql-column-case: camel |
| | | show-sql: false #é
ç½®æå°SQL |
| | | show-sql: true #é
ç½®æå°SQL |
| | | page-config: |
| | | size: size |
| | | page: page |
| | |
| | | qrpath: D:\qrcode |
| | | |
| | | #æ é¡å
å¤é¾è¯·æ±IPå端å£å· |
| | | req_path: 8092/wxsf |
| | | localIP: http://www.wxchildren.com |
| | | req_path: 8093 |
| | | localIP: 127.0.0.1 |
| | | #req_path: 8092 |
| | | #localIP: http://61.160.111.174 |
| | | |
| | |
| | | # å½é
åèµæºæä»¶è·¯å¾ |
| | | basename: i18n/messages |
| | | profiles: |
| | | active: local |
| | | active: druid |
| | | # æä»¶ä¸ä¼ |
| | | servlet: |
| | | multipart: |
| | |
| | | package com.ruoyi.quartz.task; |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.fasterxml.jackson.core.JsonParser; |
| | | import com.fasterxml.jackson.databind.JsonNode; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.google.common.reflect.TypeToken; |
| | |
| | | import com.google.gson.JsonObject; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.enums.ServiceFromEnum; |
| | | import com.ruoyi.common.utils.DtoConversionUtils; |
| | | import com.ruoyi.common.utils.HttpUtil; |
| | | import com.ruoyi.common.utils.RSAPublicKeyExample; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.http.HttpUtils; |
| | | import com.ruoyi.common.utils.sign.Md5Utils; |
| | | import com.ruoyi.quartz.util.RandomStringGenerator; |
| | | import com.smartor.common.SendService; |
| | | import com.smartor.common.RandomStringGenerator; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.mapper.ServiceSubtaskMapper; |
| | | import com.smartor.mapper.ServiceTaskMapper; |
| | |
| | | import com.smartor.service.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | import java.io.File; |
| | | import java.io.FileWriter; |
| | | import java.io.IOException; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.lang.reflect.Type; |
| | | import java.net.URLEncoder; |
| | | import java.nio.charset.StandardCharsets; |
| | |
| | | import java.nio.file.Paths; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.LocalTime; |
| | | import java.time.ZoneId; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | |
| | | } |
| | | |
| | | } else if (descByCode.equals("çä¿¡")) { |
| | | RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample(); |
| | | String taskId = rsaPublicKeyExample.encryptedData(ivrTask1.getTaskid().toString(), pub_key); |
| | | |
| | | for (ServiceSubtask serviceSubtask : selectServiceSubtaskList) { |
| | | log.error("çä¿¡é¿æä»»å¡åé---------è¿æ¥äºåï¼{}", serviceSubtask); |
| | | boolean dateToday = isDateToday(serviceSubtask.getLongSendTime()); |
| | |
| | | serviceSubtask.setResult("error"); |
| | | serviceSubtask.setRemark(patArchive.getNotrequiredreason()); |
| | | serviceSubtask.setSendstate(4L); |
| | | // serviceSubtask.setFinishtime(new Date()); |
| | | iServiceSubtaskService.insertServiceSubtask(serviceSubtask); |
| | | continue; |
| | | } |
| | | String patid = rsaPublicKeyExample.encryptedData(serviceSubtask.getPatid().toString(), pub_key); |
| | | |
| | | SendMagParam sendMagParam = new SendMagParam(); |
| | | sendMagParam.setType("4"); |
| | | ServiceOutPath serviceOutPath = new ServiceOutPath(); |
| | | serviceOutPath.setParam1(taskId); |
| | | serviceOutPath.setParam2(patid); |
| | | serviceOutPath.setParam3(ivrTask1.getTaskName()); |
| | | serviceOutPath.setCreateTime(new Date()); |
| | | iServiceOutPathService.insertServiceOutPath(serviceOutPath); |
| | | //åå
è¿å¶ï¼åå å°æ¶æ° |
| | | String format = String.format("%03X", serviceOutPath.getId()) + RandomStringGenerator.generateRandomString(); |
| | | serviceOutPath.setRadix(format); |
| | | serviceOutPath.setUpdateTime(new Date()); |
| | | iServiceOutPathService.updateServiceOutPath(serviceOutPath); |
| | | sendMagParam.setPhone(serviceSubtask.getPhone()); |
| | | sendMagParam.setUrl(ip + ":" + req_path + "/wt?p=" + format); |
| | | sendMagParam.setContent("æ¨å¥½ï¼é请æ¨å¡«ååºé¢è°æ¥è¡¨ï¼è¯·ç¹å»" + sendMagParam.getUrl() + " å¡«åãæè°¢æ¨é
åï¼"); |
| | | sendMagParam.setContent("æ¨å¥½ï¼é请æ¨å¡«ååºé¢è°æ¥è¡¨ï¼è¯·ç¹å»" + serviceSubtask.getOutPath() + " å¡«åãæè°¢æ¨é
åï¼"); |
| | | |
| | | //send_macï¼ç¾åå¼ï¼=md5(send_source+send_to_mobiles+send_text+ç¾åç¼ç )ï¼32ä½å°å |
| | | String mac = "shuifang" + sendMagParam.getPhone() + sendMagParam.getContent() + "ShuiFang_jjty_20250106"; |
| | | String mac = "shuifang" + serviceSubtask.getPhone() + sendMagParam.getContent() + "ShuiFang_jjty_20250106"; |
| | | |
| | | StringBuilder strb = new StringBuilder(); |
| | | strb.append("send_source=shuifang&send_to_mobiles=" + sendMagParam.getPhone()); |
| | | strb.append("send_source=shuifang&send_to_mobiles=" + serviceSubtask.getPhone()); |
| | | strb.append("&send_text=" + sendMagParam.getContent()); |
| | | strb.append("&send_mac=" + Md5Utils.hash(mac)); |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddhhmmsszzz"); // è¾åºæ¥ææ ¼å¼ |
| | |
| | | import com.ruoyi.common.constant.UserConstants; |
| | | import com.ruoyi.common.core.domain.entity.*; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.DtoConversionUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.bean.BeanValidators; |
| | |
| | | /** |
| | | * éè¿ç¨æ·åæ¥è¯¢ç¨æ· |
| | | * |
| | | * @param userName ç¨æ·å |
| | | * @param phone ç¨æ·å |
| | | * @return ç¨æ·å¯¹è±¡ä¿¡æ¯ |
| | | */ |
| | | @Override |
| | |
| | | sysUserDept.setDeptType("2"); |
| | | sysUserDeptBQs = sysUserDeptMapper.selectSysUserDeptList(sysUserDept); |
| | | } |
| | | if (StringUtils.isNotEmpty(userName) && userName.equals("admin")) { |
| | | //妿æ¯adminï¼åªè½å»sys_deptå»åæ°æ® |
| | | SysDept dept = new SysDept(); |
| | | dept.setDeptType("1"); |
| | | sysDepts = sysDeptMapper.selectDeptList(dept); |
| | | sysUserDeptKSs = DtoConversionUtils.sourceToTarget(sysDepts, SysUserDept.class); |
| | | |
| | | dept.setDeptType("2"); |
| | | sysDepts = sysDeptMapper.selectDeptList(dept); |
| | | sysUserDeptBQs = DtoConversionUtils.sourceToTarget(sysDepts, SysUserDept.class); |
| | | |
| | | List<SysUserDept> distinctUserDepts = new ArrayList<>(); |
| | | Set<String> uniqueDeptCodes = new HashSet<>(); |
| | | for (SysUserDept userDept : sysUserDeptKSs) { |
| | | String deptCode = userDept.getDeptCode(); |
| | | if (StringUtils.isNotEmpty(deptCode) && !uniqueDeptCodes.contains(deptCode)) { |
| | | distinctUserDepts.add(userDept); |
| | | uniqueDeptCodes.add(deptCode); |
| | | } |
| | | } |
| | | |
| | | List<SysUserDept> distinctUserBQs = new ArrayList<>(); |
| | | Set<String> uniqueBQCodes = new HashSet<>(); |
| | | for (SysUserDept userDept : sysUserDeptBQs) { |
| | | String deptCode = userDept.getDeptCode(); |
| | | if (StringUtils.isNotEmpty(deptCode) && !uniqueBQCodes.contains(deptCode)) { |
| | | distinctUserBQs.add(userDept); |
| | | uniqueBQCodes.add(deptCode); |
| | | } |
| | | } |
| | | sysUserDeptKSs = distinctUserDepts; |
| | | sysUserDeptBQs = distinctUserBQs; |
| | | } |
| | | |
| | | sysUser.setDepts(deptIds); |
| | | if (!CollectionUtils.isEmpty(sysUserDeptBQs)) { |
| ÎļþÃû´Ó ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/RandomStringGenerator.java ÐÞ¸Ä |
| | |
| | | package com.ruoyi.quartz.util; |
| | | package com.smartor.common; |
| | | |
| | | import java.util.Random; |
| | | |
| | |
| | | // @ApiModelProperty(value = "ææ å") |
| | | // private String targetname; |
| | | |
| | | @ApiModelProperty(value = "åå¼ç±»åï¼1ï¼æ°åï¼2ï¼ç级") |
| | | private String scoreType; |
| | | |
| | | /** |
| | | * 模æ¿å |
| | | */ |
| | |
| | | @ApiModelProperty(value = "主é®") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "åå¼ç±»åï¼1ï¼æ°åï¼2ï¼ç级") |
| | | private String scoreType; |
| | | |
| | | /** |
| | | * 模æ¿ID |
| | | */ |
| | |
| | | @ApiModelProperty(value = "åºé¢å¤©æ°ï¼é¿æä»»å¡ï¼åºå®é¢åï¼ç¬¬å 天åéä¿¡æ¯ï¼") |
| | | private Integer sendDay; |
| | | |
| | | |
| | | @ApiModelProperty(value = "åå¼ç±»åï¼1ï¼æ°åï¼2ï¼ç级") |
| | | private String scoreType; |
| | | } |
| | |
| | | @ApiModelProperty(value = "主é®") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "åå¼ç±»åï¼1ï¼æ°åï¼2ï¼ç级") |
| | | private String scoreType; |
| | | |
| | | /** |
| | | * ä»»å¡id |
| | | */ |
| | |
| | | @ApiModelProperty("主è¦ç
§æ¤äººå¹´é¾") |
| | | @Excel(name = "主è¦ç
§æ¤äººå¹´é¾") |
| | | private String casePersonAge; |
| | | |
| | | @ApiModelProperty("ç
人æè¦") |
| | | @Excel(name = "ç
人æè¦") |
| | | private String patientOverview; |
| | | /** |
| | | * pageNum |
| | | */ |
| | |
| | | @ApiModelProperty("èªå¢ID") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("ç
人æè¦") |
| | | @Excel(name = "ç
人æè¦") |
| | | private String patientOverview; |
| | | |
| | | /** |
| | | * æå¡æ è¯ï¼1ï¼éè¦ï¼0ï¼ä¸éè¦ |
| | |
| | | @ApiModelProperty("é®é¢è¯æ¯idï¼ä¸»é®ï¼") |
| | | private Long patid; |
| | | |
| | | @ApiModelProperty("ç
人æè¦") |
| | | @Excel(name = "ç
人æè¦") |
| | | private String patientOverview; |
| | | |
| | | /** |
| | | * æ£è
ç¼å· |
| | | */ |
| | |
| | | @Excel(name = " æ£è
id ") |
| | | private String patid; |
| | | |
| | | @ApiModelProperty("ç
人æè¦") |
| | | @Excel(name = "ç
人æè¦") |
| | | private String patientOverview; |
| | | |
| | | /** |
| | | * å§å |
| | | */ |
| | |
| | | @ApiModelProperty("èªå¢ID") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("ç
人æè¦") |
| | | @Excel(name = "ç
人æè¦") |
| | | private String patientOverview; |
| | | |
| | | /** |
| | | * å§å |
| | | */ |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.domain; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * ã请填ååè½åç§°ã对象 pat_service_contract |
| | | * |
| | | * @author lihu |
| | | * @date 2025-12-08 |
| | | */ |
| | | @Data |
| | | @ApiModel("ã请填ååè½åç§°ã") |
| | | public class PatServiceContract extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** $column.columnComment */ |
| | | @ApiModelProperty("$column.columnComment") |
| | | private Long id; |
| | | |
| | | /** ååç¼å·ï¼è§åï¼HSP-YYYYMMDD-åºå·ï¼ */ |
| | | @ApiModelProperty("ååç¼å·ï¼è§åï¼HSP-YYYYMMDD-åºå·ï¼") |
| | | @Excel(name = "ååç¼å·", readConverterExp = "è§=åï¼HSP-YYYYMMDD-åºå·") |
| | | private String contractNo; |
| | | |
| | | /** $column.columnComment */ |
| | | @ApiModelProperty("$column.columnComment") |
| | | @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") |
| | | private Long patId; |
| | | |
| | | /** åååç±» */ |
| | | @ApiModelProperty("åååç±»") |
| | | @Excel(name = "åååç±»") |
| | | private String contractType; |
| | | |
| | | /** é宿¸ éï¼çº¿ä¸ãå®ç½ãAPPãå»çæ¨èï¼ */ |
| | | @ApiModelProperty("é宿¸ éï¼çº¿ä¸ãå®ç½ãAPPãå»çæ¨èï¼") |
| | | @Excel(name = "é宿¸ é", readConverterExp = "线=ä¸ãå®ç½ãAPPãå»çæ¨è") |
| | | private String salesChannel; |
| | | |
| | | /** ç¾çº¦éé¢ */ |
| | | @ApiModelProperty("ç¾çº¦éé¢") |
| | | @Excel(name = "ç¾çº¦éé¢") |
| | | private String contractAmount; |
| | | |
| | | /** æ¯ä»ç¶æï¼1:æªæ¯ä», 2:é¨åæ¯ä», 3:å·²æ¯ä», 4:鿬¾ä¸, 5:已鿬¾ï¼ */ |
| | | @ApiModelProperty("æ¯ä»ç¶æï¼1:æªæ¯ä», 2:é¨åæ¯ä», 3:å·²æ¯ä», 4:鿬¾ä¸, 5:已鿬¾ï¼") |
| | | @Excel(name = "æ¯ä»ç¶æ", readConverterExp = "1=:æªæ¯ä»,,2=:é¨åæ¯ä»,,3=:å·²æ¯ä»,,4=:鿬¾ä¸,,5=:已鿬¾") |
| | | private String paymentStatus; |
| | | |
| | | /** ååç¶æï¼1:å¾
çæ, 2:çæä¸, 3:å·²æå, 4:已尿, 5:æåç»æ¢ï¼ */ |
| | | @ApiModelProperty("ååç¶æï¼1:å¾
çæ, 2:çæä¸, 3:å·²æå, 4:已尿, 5:æåç»æ¢ï¼") |
| | | @Excel(name = "ååç¶æ", readConverterExp = "1=:å¾
çæ,,2=:çæä¸,,3=:å·²æå,,4=:已尿,,5=:æåç»æ¢") |
| | | private String contractStatus; |
| | | |
| | | /** æå¡å¼å§æ¥æ */ |
| | | @ApiModelProperty("æå¡å¼å§æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @Excel(name = "æå¡å¼å§æ¥æ", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | private Date startDate; |
| | | |
| | | /** æå¡ç»ææ¥æ */ |
| | | @ApiModelProperty("æå¡ç»ææ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @Excel(name = "æå¡ç»ææ¥æ", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | private Date endDate; |
| | | |
| | | /** å®é
ç»æ¢æ¥æ */ |
| | | @ApiModelProperty("å®é
ç»æ¢æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @Excel(name = "å®é
ç»æ¢æ¥æ", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | private Date actualEndDate; |
| | | |
| | | /** ç¶ID */ |
| | | @ApiModelProperty("ç¶ID") |
| | | @Excel(name = "ç¶ID") |
| | | private Long pid; |
| | | |
| | | /** guid */ |
| | | @ApiModelProperty("guid") |
| | | @Excel(name = "guid") |
| | | private String guid; |
| | | |
| | | /** å 餿 å¿ï¼0ï¼æªå é¤ 1ï¼å·²å é¤ï¼ */ |
| | | @ApiModelProperty("å 餿 å¿ï¼0ï¼æªå é¤ 1ï¼å·²å é¤ï¼") |
| | | private Long delFlag; |
| | | |
| | | /** å»é¢æºæid */ |
| | | @ApiModelProperty("å»é¢æºæid") |
| | | @Excel(name = "å»é¢æºæid") |
| | | private String orgid; |
| | | |
| | | /** æ¯å¦èªå¨ç»çº¦ */ |
| | | @ApiModelProperty("æ¯å¦èªå¨ç»çº¦") |
| | | @Excel(name = "æ¯å¦èªå¨ç»çº¦") |
| | | private String autoRenew; |
| | | |
| | | /** ç»çº¦æéæåå¤©æ° */ |
| | | @ApiModelProperty("ç»çº¦æéæå天æ°") |
| | | @Excel(name = "ç»çº¦æéæå天æ°") |
| | | private Long renewalReminderDays; |
| | | |
| | | /** ç¹æ®æ¡æ¬¾å¤æ³¨ */ |
| | | @ApiModelProperty("ç¹æ®æ¡æ¬¾å¤æ³¨") |
| | | @Excel(name = "ç¹æ®æ¡æ¬¾å¤æ³¨") |
| | | private String specialTerms; |
| | | |
| | | /** ç¾çº¦æ¶é´ */ |
| | | @ApiModelProperty("ç¾çº¦æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @Excel(name = "ç¾çº¦æ¶é´", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | private Date signedAt; |
| | | |
| | | /** æ£è
æ¯å¦å·²çµåç¾çº¦ */ |
| | | @ApiModelProperty("æ£è
æ¯å¦å·²çµåç¾çº¦") |
| | | @Excel(name = "æ£è
æ¯å¦å·²çµåç¾çº¦") |
| | | private String signedByPatient; |
| | | |
| | | /** å»é¢æ¯å¦å·²ç¡®è®¤ */ |
| | | @ApiModelProperty("å»é¢æ¯å¦å·²ç¡®è®¤") |
| | | @Excel(name = "å»é¢æ¯å¦å·²ç¡®è®¤") |
| | | private String signedByHospital; |
| | | |
| | | /** æåç»æ¢åå */ |
| | | @ApiModelProperty("æåç»æ¢åå ") |
| | | @Excel(name = "æåç»æ¢åå ") |
| | | private String cancellationReason; |
| | | |
| | | /** ç»æ¢æ¶é´ */ |
| | | @ApiModelProperty("ç»æ¢æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @Excel(name = "ç»æ¢æ¶é´", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | private Date cancelledAt; |
| | | |
| | | } |
| | | |
| | |
| | | @ApiModelProperty(value = "è¿å¶") |
| | | private String radix; |
| | | |
| | | @ApiModelProperty(value = " ivr è¿æ¯ svyçé®å·é访, 1ï¼ivr 2:svy 3:宣æ") |
| | | private Integer type; |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | private String tagname; |
| | | |
| | | /** |
| | | * å¤é¾å°å |
| | | */ |
| | | @ApiModelProperty(value = "å¤é¾å°å") |
| | | @Excel(name = " å¤é¾å°å ") |
| | | private String outPath; |
| | | |
| | | /** |
| | | * åºé¢ç
åºç¼å· |
| | | */ |
| | | @ApiModelProperty(value = "åºé¢ç
åºç¼å·éå") |
| | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | private String remark; |
| | | |
| | | /** |
| | | * å¤é¾å°å |
| | | */ |
| | | @ApiModelProperty(value = "å¤é¾å°å") |
| | | @Excel(name = " å¤é¾å°å ") |
| | | private String outPath; |
| | | |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "åå¤å¼å¸¸æ°") |
| | | private Long hfycs = 0L; |
| | | |
| | | /** |
| | | * å¤é¾å°å |
| | | */ |
| | | @ApiModelProperty(value = "å¤é¾å°å") |
| | | @Excel(name = " å¤é¾å°å ") |
| | | private String outPath; |
| | | |
| | | } |
| | |
| | | * |
| | | */ |
| | | @ApiModelProperty(value = "主é®id") |
| | | private Long subId; |
| | | private Long subid; |
| | | |
| | | |
| | | /** |
| | | * å¤é¾å°å |
| | | */ |
| | | @ApiModelProperty(value = "å¤é¾å°å") |
| | | @Excel(name = " å¤é¾å°å ") |
| | | private String outPath; |
| | | |
| | | |
| | | /** |
| | |
| | | @Excel(name = " åéç¶æ ") |
| | | @ApiModelProperty(value = "åéç¶æ : 1æ°å»º 2æ§è¡ä¸ 3æå 4ç»æ¢ 5宿") |
| | | private Long sendstate; |
| | | |
| | | |
| | | /** |
| | | * 详æ
ç»æï¼æµè¯ç¨ï¼åé¢å é¤ï¼ |
| | | */ |
| | | @Excel(name = " 详æ
ç»æï¼æµè¯ç¨ï¼åé¢å é¤ï¼ ") |
| | | @ApiModelProperty(value = "详æ
ç»æï¼æµè¯ç¨ï¼åé¢å é¤ï¼") |
| | | private String detailResult; |
| | | |
| | | |
| | | /** |
| | |
| | | @ApiModelProperty(value = "æ»å") |
| | | private Long score; |
| | | |
| | | /** |
| | | * å¼å§å |
| | | */ |
| | | @Excel(name = "å¼å§å") |
| | | @ApiModelProperty(value = "å¼å§å") |
| | | private Long scoreStart; |
| | | |
| | | /** |
| | | * ç»æå |
| | | */ |
| | | @Excel(name = "ç»æå") |
| | | @ApiModelProperty(value = "ç»æå") |
| | | private Long scoreEnd; |
| | | |
| | | |
| | | /** |
| | | * æ¯å¦æäº¤ |
| | |
| | | |
| | | @ApiModelProperty(value = "é¨é¨ç¼ç ") |
| | | private String deptCode; |
| | | |
| | | @ApiModelProperty(value = "åå¼ç±»åï¼1ï¼æ°åï¼2ï¼ç级") |
| | | private String scoreType; |
| | | } |
| | |
| | | @ApiModelProperty(value = "æ¯å¦æ¯é¿ææ¨¡æ¿ï¼ 0ï¼ä¸æ¯ 1ï¼æ¯") |
| | | private Integer longTemp; |
| | | |
| | | @ApiModelProperty(value = "åå¼ç±»åï¼1ï¼æ°åï¼2ï¼ç级") |
| | | private String scoreType; |
| | | |
| | | /** |
| | | * 模æ¿é®å·ID |
| | | */ |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.mapper; |
| | | |
| | | import java.util.List; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.smartor.domain.PatServiceContract; |
| | | |
| | | /** |
| | | * ã请填ååè½åç§°ãMapperæ¥å£ |
| | | * |
| | | * @author lihu |
| | | * @date 2025-12-08 |
| | | */ |
| | | @Mapper |
| | | public interface PatServiceContractMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢ã请填ååè½åç§°ã |
| | | * |
| | | * @param id ã请填ååè½åç§°ãä¸»é® |
| | | * @return ã请填ååè½åç§°ã |
| | | */ |
| | | public PatServiceContract selectPatServiceContractById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢ã请填ååè½åç§°ãå表 |
| | | * |
| | | * @param patServiceContract ã请填ååè½åç§°ã |
| | | * @return ã请填ååè½åç§°ãéå |
| | | */ |
| | | public List<PatServiceContract> selectPatServiceContractList(PatServiceContract patServiceContract); |
| | | |
| | | /** |
| | | * æ°å¢ã请填ååè½åç§°ã |
| | | * |
| | | * @param patServiceContract ã请填ååè½åç§°ã |
| | | * @return ç»æ |
| | | */ |
| | | public int insertPatServiceContract(PatServiceContract patServiceContract); |
| | | |
| | | /** |
| | | * ä¿®æ¹ã请填ååè½åç§°ã |
| | | * |
| | | * @param patServiceContract ã请填ååè½åç§°ã |
| | | * @return ç»æ |
| | | */ |
| | | public int updatePatServiceContract(PatServiceContract patServiceContract); |
| | | |
| | | /** |
| | | * å é¤ã请填ååè½åç§°ã |
| | | * |
| | | * @param id ã请填ååè½åç§°ãä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deletePatServiceContractById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤ã请填ååè½åç§°ã |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deletePatServiceContractByIds(Long[] ids); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.service; |
| | | |
| | | import java.util.List; |
| | | import com.smartor.domain.PatServiceContract; |
| | | |
| | | /** |
| | | * ã请填ååè½åç§°ãServiceæ¥å£ |
| | | * |
| | | * @author lihu |
| | | * @date 2025-12-08 |
| | | */ |
| | | public interface IPatServiceContractService |
| | | { |
| | | /** |
| | | * æ¥è¯¢ã请填ååè½åç§°ã |
| | | * |
| | | * @param id ã请填ååè½åç§°ãä¸»é® |
| | | * @return ã请填ååè½åç§°ã |
| | | */ |
| | | public PatServiceContract selectPatServiceContractById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢ã请填ååè½åç§°ãå表 |
| | | * |
| | | * @param patServiceContract ã请填ååè½åç§°ã |
| | | * @return ã请填ååè½åç§°ãéå |
| | | */ |
| | | public List<PatServiceContract> selectPatServiceContractList(PatServiceContract patServiceContract); |
| | | |
| | | /** |
| | | * æ°å¢ã请填ååè½åç§°ã |
| | | * |
| | | * @param patServiceContract ã请填ååè½åç§°ã |
| | | * @return ç»æ |
| | | */ |
| | | public int insertPatServiceContract(PatServiceContract patServiceContract); |
| | | |
| | | /** |
| | | * ä¿®æ¹ã请填ååè½åç§°ã |
| | | * |
| | | * @param patServiceContract ã请填ååè½åç§°ã |
| | | * @return ç»æ |
| | | */ |
| | | public int updatePatServiceContract(PatServiceContract patServiceContract); |
| | | |
| | | /** |
| | | * æ¹éå é¤ã请填ååè½åç§°ã |
| | | * |
| | | * @param ids éè¦å é¤çã请填ååè½åç§°ã主é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deletePatServiceContractByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å é¤ã请填ååè½åç§°ãä¿¡æ¯ |
| | | * |
| | | * @param id ã请填ååè½åç§°ãä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deletePatServiceContractById(Long id); |
| | | } |
| | |
| | | ivrLibaTargetAssort.setSeqno(seqMax + 1); |
| | | } |
| | | //-1代表主æ |
| | | if (ivrLibaTargetAssort.getPid() == null) ivrLibaTargetAssort.setPid((long) -1); |
| | | // if (ivrLibaTargetAssort.getPid() == null) ivrLibaTargetAssort.setPid((long) -1); |
| | | i = ivrLibaTargetAssortMapper.insertIvrLibaTargetAssort(ivrLibaTargetAssort); |
| | | log.info("ææ åç±»ä¸çº§æ ç主é®:{}", ivrLibaTargetAssort.getId()); |
| | | |
| | |
| | | seqMax1 = 0; |
| | | } |
| | | ivrLibaTargetAssort1.setPid(ivrLibaTargetAssort.getId()); |
| | | if (ivrLibaTargetAssort.getId() == null) ivrLibaTargetAssort1.setPid((long) -1); |
| | | ivrLibaTargetAssort1.setSeqno(1); |
| | | if (seqMax != null) { |
| | | ivrLibaTargetAssort1.setSeqno(seqMax1 + 1); |
| | |
| | | import com.ruoyi.common.core.domain.entity.SysDept; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.domain.model.LoginUser; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.DtoConversionUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.*; |
| | | import com.smartor.common.RandomStringGenerator; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.mapper.*; |
| | | import com.smartor.service.IServiceOutPathService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | |
| | | |
| | | @Autowired |
| | | private ServiceSubtaskMapper serviceSubtaskMapper; |
| | | |
| | | @Autowired |
| | | private SysUserDeptMapper sysUserDeptMapper; |
| | | private IServiceOutPathService iServiceOutPathService; |
| | | |
| | | @Value("${createTaskServiceType}") |
| | | private List<String> createTaskServiceType; |
| | | |
| | | @Value("${localIP}") |
| | | private String localIP; |
| | | |
| | | @Value("${req_path}") |
| | | private String req_path; |
| | | |
| | | @Value("${pub_key}") |
| | | private String pub_key; |
| | | |
| | | //è®°å½é¿æä»»å¡åºç¡ä¿¡æ¯ |
| | | List<IvrLibaTemplate> libaTemplates = new ArrayList<>(); |
| | |
| | | serviceSubtask1.setSendstate(4L); |
| | | serviceSubtask1.setRemark("æ£è
åå
¥é¢"); |
| | | serviceSubtask1.setResult("error"); |
| | | // serviceSubtask1.setFinishtime(new Date()); |
| | | Boolean aBoolean = serviceSubtaskMapper.updateServiceSubtask(serviceSubtask1); |
| | | if (aBoolean) i = 1; |
| | | } else { |
| | |
| | | } |
| | | } |
| | | } |
| | | //çæå¤é¾å°å |
| | | String outPath = null; |
| | | if (serviceTask.getType().equals("1")) |
| | | outPath = getOutPath(serviceSubtask.getPhone(), serviceSubtask.getTaskid(), serviceSubtask.getTaskName(), serviceSubtask.getPatid(), 1); |
| | | else if (serviceTask.getType().equals("2")) |
| | | outPath = getOutPath(serviceSubtask.getPhone(), serviceSubtask.getTaskid(), serviceSubtask.getTaskName(), serviceSubtask.getPatid(), 2); |
| | | else if (serviceTask.getType().equals("3")) |
| | | outPath = getOutPath(serviceSubtask.getPhone(), serviceSubtask.getTaskid(), serviceSubtask.getTaskName(), serviceSubtask.getPatid(), 3); |
| | | serviceSubtask.setOutPath(outPath); |
| | | |
| | | i = serviceSubtaskMapper.insertServiceSubtask(serviceSubtask); |
| | | if (i == 1) { |
| | | //å°check_flagæ¹æ1ï¼å·²å¤çï¼ |
| | |
| | | return calendar.getTime(); |
| | | } |
| | | |
| | | |
| | | private String getOutPath(String phone, Long tid, String taskName, Long pId, Integer type) { |
| | | //对urlä¸ä¸¤ä¸ªåæ°å å¯ |
| | | RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample(); |
| | | String taskId = rsaPublicKeyExample.encryptedData(tid.toString(), pub_key); |
| | | String outpath = null; |
| | | try { |
| | | String patid = rsaPublicKeyExample.encryptedData(pId.toString(), pub_key); |
| | | SendMagParam sendMagParam = new SendMagParam(); |
| | | sendMagParam.setType("4"); |
| | | if (type == 1) { |
| | | //é访 |
| | | ServiceOutPath serviceOutPath = new ServiceOutPath(); |
| | | serviceOutPath.setParam1(taskId); |
| | | serviceOutPath.setParam2(patid); |
| | | serviceOutPath.setCreateTime(new Date()); |
| | | serviceOutPath.setType(1); |
| | | iServiceOutPathService.insertServiceOutPath(serviceOutPath); |
| | | //转æ16è¿å¶ |
| | | String format = String.format("%03X", serviceOutPath.getId()) + RandomStringGenerator.generateRandomString(); |
| | | serviceOutPath.setRadix(format); |
| | | outpath = localIP + ":" + req_path + "/sf?p=" + format; |
| | | serviceOutPath.setUpdateTime(new Date()); |
| | | iServiceOutPathService.updateServiceOutPath(serviceOutPath); |
| | | sendMagParam.setPhone(phone); |
| | | sendMagParam.setUrl(outpath); |
| | | sendMagParam.setContent("æ¨å¥½ï¼é请æ¨å¡«ååºé¢éè®¿è°æ¥è¡¨ï¼è¯·ç¹å»" + sendMagParam.getUrl() + " å¡«åãæè°¢æ¨é
åï¼"); |
| | | } else if (type == 2) { |
| | | //é®å¸ï¼é®é¢ï¼ |
| | | ServiceOutPath serviceOutPath = new ServiceOutPath(); |
| | | serviceOutPath.setParam1(taskId); |
| | | serviceOutPath.setParam2(patid); |
| | | serviceOutPath.setParam3(taskName); |
| | | serviceOutPath.setCreateTime(new Date()); |
| | | serviceOutPath.setType(2); |
| | | iServiceOutPathService.insertServiceOutPath(serviceOutPath); |
| | | String format = String.format("%03X", serviceOutPath.getId()) + RandomStringGenerator.generateRandomString(); |
| | | serviceOutPath.setRadix(format); |
| | | serviceOutPath.setUpdateTime(new Date()); |
| | | outpath = localIP + ":" + req_path + "/wt?p=" + format; |
| | | iServiceOutPathService.updateServiceOutPath(serviceOutPath); |
| | | |
| | | // sendMagParam.setUrl(ip + ":" + req_path + "/outsideChainwt?param1=" + taskId + "¶m2=" + patid + "¶m3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "¶m5=false"); |
| | | sendMagParam.setPhone(phone); |
| | | sendMagParam.setUrl(outpath); |
| | | sendMagParam.setContent("æ¨å¥½ï¼é请æ¨å¡«ååºé¢è°æ¥è¡¨ï¼è¯·ç¹å»" + sendMagParam.getUrl() + " å¡«åãæè°¢æ¨é
åï¼"); |
| | | log.info("æ¨å¥½ï¼é请æ¨å¡«ååºé¢è°æ¥è¡¨ï¼è¯·ç¹å»,{}", sendMagParam.getUrl()); |
| | | } else if (type == 3) { |
| | | //宣æ |
| | | ServiceOutPath serviceOutPath = new ServiceOutPath(); |
| | | serviceOutPath.setParam1(taskId); |
| | | serviceOutPath.setParam2(patid); |
| | | serviceOutPath.setParam3(taskName); |
| | | serviceOutPath.setCreateTime(new Date()); |
| | | serviceOutPath.setType(3); |
| | | iServiceOutPathService.insertServiceOutPath(serviceOutPath); |
| | | String format = String.format("%03X", serviceOutPath.getId()) + RandomStringGenerator.generateRandomString(); |
| | | serviceOutPath.setRadix(format); |
| | | serviceOutPath.setUpdateTime(new Date()); |
| | | outpath = localIP + ":" + req_path + "/xj?p=" + format; |
| | | iServiceOutPathService.updateServiceOutPath(serviceOutPath); |
| | | sendMagParam.setPhone(phone); |
| | | sendMagParam.setUrl(outpath); |
| | | sendMagParam.setContent("æ¨å¥½ï¼é请æ¨å¡«ååºé¢å®£æè°æ¥è¡¨ï¼è¯·ç¹å»" + sendMagParam.getUrl() + "æ¥çãæè°¢æ¨é
åï¼"); |
| | | log.info("-----------sendMagParamçå¼ä¸ºï¼{}", sendMagParam); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("çæå¤±è´¥äºï¼{}", e.getMessage()); |
| | | } |
| | | return outpath; |
| | | } |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.service.impl; |
| | | |
| | | import java.util.List; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.smartor.mapper.PatServiceContractMapper; |
| | | import com.smartor.domain.PatServiceContract; |
| | | import com.smartor.service.IPatServiceContractService; |
| | | |
| | | /** |
| | | * ã请填ååè½åç§°ãServiceä¸å¡å±å¤ç |
| | | * |
| | | * @author lihu |
| | | * @date 2025-12-08 |
| | | */ |
| | | @Service |
| | | public class PatServiceContractServiceImpl implements IPatServiceContractService |
| | | { |
| | | @Autowired |
| | | private PatServiceContractMapper patServiceContractMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢ã请填ååè½åç§°ã |
| | | * |
| | | * @param id ã请填ååè½åç§°ãä¸»é® |
| | | * @return ã请填ååè½åç§°ã |
| | | */ |
| | | @Override |
| | | public PatServiceContract selectPatServiceContractById(Long id) |
| | | { |
| | | return patServiceContractMapper.selectPatServiceContractById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ã请填ååè½åç§°ãå表 |
| | | * |
| | | * @param patServiceContract ã请填ååè½åç§°ã |
| | | * @return ã请填ååè½åç§°ã |
| | | */ |
| | | @Override |
| | | public List<PatServiceContract> selectPatServiceContractList(PatServiceContract patServiceContract) |
| | | { |
| | | return patServiceContractMapper.selectPatServiceContractList(patServiceContract); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ã请填ååè½åç§°ã |
| | | * |
| | | * @param patServiceContract ã请填ååè½åç§°ã |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertPatServiceContract(PatServiceContract patServiceContract) |
| | | { |
| | | return patServiceContractMapper.insertPatServiceContract(patServiceContract); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ã请填ååè½åç§°ã |
| | | * |
| | | * @param patServiceContract ã请填ååè½åç§°ã |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updatePatServiceContract(PatServiceContract patServiceContract) |
| | | { |
| | | patServiceContract.setUpdateTime(DateUtils.getNowDate()); |
| | | return patServiceContractMapper.updatePatServiceContract(patServiceContract); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ã请填ååè½åç§°ã |
| | | * |
| | | * @param ids éè¦å é¤çã请填ååè½åç§°ãä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deletePatServiceContractByIds(Long[] ids) |
| | | { |
| | | return patServiceContractMapper.deletePatServiceContractByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ã请填ååè½åç§°ãä¿¡æ¯ |
| | | * |
| | | * @param id ã请填ååè½åç§°ãä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deletePatServiceContractById(Long id) |
| | | { |
| | | return patServiceContractMapper.deletePatServiceContractById(id); |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.*; |
| | | import com.smartor.common.FtpService; |
| | | import com.smartor.common.RandomStringGenerator; |
| | | import com.smartor.common.SendService; |
| | | import com.smartor.config.PhoneUtils; |
| | | import com.smartor.domain.*; |
| | |
| | | private IServiceTaskService serviceTaskService; |
| | | |
| | | @Autowired |
| | | private IvrTaskTemplateTargetoptionMapper serviceTaskScriptTargetoptionMapper; |
| | | |
| | | @Autowired |
| | | private IvrTaskVisitResultMapper serviceTaskVisitResultMapper; |
| | | |
| | | @Autowired |
| | |
| | | |
| | | @Autowired |
| | | private IIvrTaskTemplateService ivrTaskTemplateService; |
| | | @Autowired |
| | | private IIvrTaskTemplateScriptService iIvrTaskTemplateScriptService; |
| | | @Autowired |
| | | private IvrTaskTemplateTargetoptionMapper serviceTaskScriptTargetoptionMapper; |
| | | |
| | | @Autowired |
| | | private ISvyTaskTemplateService svyTaskTemplateService; |
| | | |
| | | @Autowired |
| | | private IIvrTaskTemplateScriptService iIvrTaskTemplateScriptService; |
| | | private ISvyLibTemplateScriptService svyLibTemplateScriptService; |
| | | @Autowired |
| | | private ISvyLibTemplateTargetoptionService svyLibTemplateTargetoptionService; |
| | | |
| | | |
| | | @Autowired |
| | | private IServiceOutPathService iServiceOutPathService; |
| | |
| | | |
| | | @Value("${ASRCallBackPath}") |
| | | private String ASRCallBackPath; |
| | | |
| | | @Autowired |
| | | private SendService sendService; |
| | | |
| | | @Value("${hangup}") |
| | | private String hangup; |
| | |
| | | |
| | | @Value("${phoneUpEveryHour}") |
| | | private Integer phoneUpEveryHour; |
| | | |
| | | @Value("${phoneEndHour}") |
| | | private Integer phoneEndHour; |
| | | |
| | |
| | | @Override |
| | | public List<ServiceSubtask> patItem(ServiceSubtaskVO serviceSubtaskVO) { |
| | | List<ServiceSubtask> selectServiceSubtaskList = this.selectServiceSubtaskList(serviceSubtaskVO); |
| | | return selectServiceSubtaskList; |
| | | List<ServiceSubtask> serviceSubtaskList = new ArrayList<>(); |
| | | //è·ååæ° |
| | | for (ServiceSubtask serviceSubtask : selectServiceSubtaskList) { |
| | | //è®¡ç®æ£è
çåæ° |
| | | if (serviceSubtask.getScore() == null || BigDecimal.ZERO.equals(serviceSubtask.getScore())) { |
| | | //å¦æä¸ºç©ºçè¯ï¼å»detailéæ¿å°æ¯ä¸ªé¢çé项åï¼å¦ææ¯ä½çé¢ï¼ç´æ¥æ¿é¢ç®åï¼åé¢ï¼è¯¥æ¨¡æ¿æ¯åæ°ç±»åï¼ |
| | | Map<String, Object> map = getScore(serviceSubtask, serviceSubtaskVO.getDetailResult()); |
| | | serviceSubtask.setScore((BigDecimal) map.get("score")); |
| | | serviceSubtaskMapper.updateServiceSubtask(serviceSubtask); |
| | | if ((Boolean) map.get("isExist") == true) { |
| | | //æµè¯å®å é¤ï¼åºä»æµè¯ç¨çï¼ |
| | | serviceSubtaskList.add(serviceSubtask); |
| | | } |
| | | } else { |
| | | //æµè¯å®å é¤ï¼åºä»æµè¯ç¨çï¼ |
| | | if (!StringUtils.isEmpty(serviceSubtaskVO.getDetailResult())) { |
| | | ServiceSubtaskDetail serviceSubtaskDetail = new ServiceSubtaskDetail(); |
| | | serviceSubtaskDetail.setSubId(serviceSubtask.getId()); |
| | | List<ServiceSubtaskDetail> serviceSubtaskDetails = serviceSubtaskDetailMapper.selectServiceSubtaskDetailList(serviceSubtaskDetail); |
| | | for (ServiceSubtaskDetail ssd : serviceSubtaskDetails) { |
| | | if (ssd.getAsrtext().equals(serviceSubtaskVO.getDetailResult())) { |
| | | serviceSubtaskList.add(serviceSubtask); |
| | | } |
| | | } |
| | | }else { |
| | | serviceSubtaskList.add(serviceSubtask); |
| | | } |
| | | } |
| | | } |
| | | return serviceSubtaskList; |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | if (serviceTaskVO.getLongTask() != null && serviceTaskVO.getLongTask() == 1) |
| | | serviceSubtask.setLongSendTime(patTaskRelevance.getLongSendTime()); |
| | | |
| | | //çæå¤é¾å°å |
| | | String outPath = null; |
| | | if (serviceTaskVO.getType().equals("1")) |
| | | outPath = getOutPath(serviceSubtask.getPhone(), serviceSubtask.getTaskid(), serviceSubtask.getTaskName(), serviceSubtask.getPatid(), 1); |
| | | else if (serviceTaskVO.getType().equals("2")) |
| | | outPath = getOutPath(serviceSubtask.getPhone(), serviceSubtask.getTaskid(), serviceSubtask.getTaskName(), serviceSubtask.getPatid(), 2); |
| | | else if (serviceTaskVO.getType().equals("3")) |
| | | outPath = getOutPath(serviceSubtask.getPhone(), serviceSubtask.getTaskid(), serviceSubtask.getTaskName(), serviceSubtask.getPatid(), 3); |
| | | serviceSubtask.setOutPath(outPath); |
| | | serviceSubtaskMapper.insertServiceSubtask(serviceSubtask); |
| | | serviceSubtask.getId().intValue(); |
| | | } |
| | |
| | | serviceSubtask.setNurseName(patTaskRelevance.getNurseName()); |
| | | serviceSubtask.setVisitTime(patTaskRelevance.getVisitTime()); |
| | | serviceSubtask.setTextParam(new Gson().toJson(serviceTaskVO.getTextParam())); |
| | | //çæå¤é¾å°å |
| | | String outPath = null; |
| | | if (serviceTaskVO.getType().equals("1")) |
| | | outPath = getOutPath(serviceSubtask.getPhone(), serviceSubtask.getTaskid(), serviceSubtask.getTaskName(), serviceSubtask.getPatid(), 1); |
| | | else if (serviceTaskVO.getType().equals("2")) |
| | | outPath = getOutPath(serviceSubtask.getPhone(), serviceSubtask.getTaskid(), serviceSubtask.getTaskName(), serviceSubtask.getPatid(), 2); |
| | | else if (serviceTaskVO.getType().equals("3")) |
| | | outPath = getOutPath(serviceSubtask.getPhone(), serviceSubtask.getTaskid(), serviceSubtask.getTaskName(), serviceSubtask.getPatid(), 3); |
| | | |
| | | if (patTaskRelevance.getIsoperation() != null) { |
| | | if (patTaskRelevance.getIsoperation() == 2) serviceSubtask.setUpdateTime(new Date()); |
| | | serviceSubtaskMapper.updateServiceSubtaskByCondition(serviceSubtask); |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | private ServiceSubtaskStatistic getStatistic(List<ServiceSubtask> serviceSubtaskList) { |
| | | log.error("-------------serviceSubtaskListçå¼ä¸ºï¼{}", serviceSubtaskList); |
| | | ServiceSubtaskStatistic serviceSubtaskStatistic = new ServiceSubtaskStatistic(); |
| | |
| | | int remainingCalls = (int) (remainingHours * phoneUpEveryHour); |
| | | return remainingCalls; |
| | | } |
| | | |
| | | private String getOutPath(String phone, Long tid, String taskName, Long pId, Integer type) { |
| | | //对urlä¸ä¸¤ä¸ªåæ°å å¯ |
| | | RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample(); |
| | | String taskId = rsaPublicKeyExample.encryptedData(tid.toString(), pub_key); |
| | | String outpath = null; |
| | | try { |
| | | String patid = rsaPublicKeyExample.encryptedData(pId.toString(), pub_key); |
| | | SendMagParam sendMagParam = new SendMagParam(); |
| | | sendMagParam.setType("4"); |
| | | if (type == 1) { |
| | | //é访 |
| | | ServiceOutPath serviceOutPath = new ServiceOutPath(); |
| | | serviceOutPath.setParam1(taskId); |
| | | serviceOutPath.setParam2(patid); |
| | | serviceOutPath.setCreateTime(new Date()); |
| | | serviceOutPath.setType(1); |
| | | iServiceOutPathService.insertServiceOutPath(serviceOutPath); |
| | | //转æ16è¿å¶ |
| | | String format = String.format("%03X", serviceOutPath.getId()) + RandomStringGenerator.generateRandomString(); |
| | | serviceOutPath.setRadix(format); |
| | | outpath = localIP + ":" + req_path + "/sf?p=" + format; |
| | | serviceOutPath.setUpdateTime(new Date()); |
| | | iServiceOutPathService.updateServiceOutPath(serviceOutPath); |
| | | sendMagParam.setPhone(phone); |
| | | sendMagParam.setUrl(outpath); |
| | | sendMagParam.setContent("æ¨å¥½ï¼é请æ¨å¡«ååºé¢éè®¿è°æ¥è¡¨ï¼è¯·ç¹å»" + sendMagParam.getUrl() + " å¡«åãæè°¢æ¨é
åï¼"); |
| | | } else if (type == 2) { |
| | | //é®å¸ï¼é®é¢ï¼ |
| | | ServiceOutPath serviceOutPath = new ServiceOutPath(); |
| | | serviceOutPath.setParam1(taskId); |
| | | serviceOutPath.setParam2(patid); |
| | | serviceOutPath.setParam3(taskName); |
| | | serviceOutPath.setCreateTime(new Date()); |
| | | serviceOutPath.setType(2); |
| | | iServiceOutPathService.insertServiceOutPath(serviceOutPath); |
| | | String format = String.format("%03X", serviceOutPath.getId()) + RandomStringGenerator.generateRandomString(); |
| | | serviceOutPath.setRadix(format); |
| | | serviceOutPath.setUpdateTime(new Date()); |
| | | outpath = localIP + ":" + req_path + "/wt?p=" + format; |
| | | iServiceOutPathService.updateServiceOutPath(serviceOutPath); |
| | | |
| | | // sendMagParam.setUrl(ip + ":" + req_path + "/outsideChainwt?param1=" + taskId + "¶m2=" + patid + "¶m3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "¶m5=false"); |
| | | sendMagParam.setPhone(phone); |
| | | sendMagParam.setUrl(outpath); |
| | | sendMagParam.setContent("æ¨å¥½ï¼é请æ¨å¡«ååºé¢è°æ¥è¡¨ï¼è¯·ç¹å»" + sendMagParam.getUrl() + " å¡«åãæè°¢æ¨é
åï¼"); |
| | | log.info("æ¨å¥½ï¼é请æ¨å¡«ååºé¢è°æ¥è¡¨ï¼è¯·ç¹å»,{}", sendMagParam.getUrl()); |
| | | } else if (type == 3) { |
| | | //宣æ |
| | | ServiceOutPath serviceOutPath = new ServiceOutPath(); |
| | | serviceOutPath.setParam1(taskId); |
| | | serviceOutPath.setParam2(patid); |
| | | serviceOutPath.setParam3(taskName); |
| | | serviceOutPath.setCreateTime(new Date()); |
| | | serviceOutPath.setType(3); |
| | | iServiceOutPathService.insertServiceOutPath(serviceOutPath); |
| | | String format = String.format("%03X", serviceOutPath.getId()) + RandomStringGenerator.generateRandomString(); |
| | | serviceOutPath.setRadix(format); |
| | | serviceOutPath.setUpdateTime(new Date()); |
| | | outpath = localIP + ":" + req_path + "/xj?p=" + format; |
| | | iServiceOutPathService.updateServiceOutPath(serviceOutPath); |
| | | sendMagParam.setPhone(phone); |
| | | sendMagParam.setUrl(outpath); |
| | | sendMagParam.setContent("æ¨å¥½ï¼é请æ¨å¡«ååºé¢å®£æè°æ¥è¡¨ï¼è¯·ç¹å»" + sendMagParam.getUrl() + "æ¥çãæè°¢æ¨é
åï¼"); |
| | | log.info("-----------sendMagParamçå¼ä¸ºï¼{}", sendMagParam); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("çæå¤±è´¥äºï¼{}", e.getMessage()); |
| | | } |
| | | return outpath; |
| | | } |
| | | |
| | | private Map<String, Object> getScore(ServiceSubtask serviceSubtask, String detailResult) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | Boolean isExist = false; |
| | | //ç»è®¡æ»å |
| | | BigDecimal bigDecimal = BigDecimal.ZERO; |
| | | if (serviceSubtask.getScore() != null && !BigDecimal.ZERO.equals(serviceSubtask.getScore())) { |
| | | //妿æåæ°ï¼ç´æ¥è¿å |
| | | map.put("score", serviceSubtask.getScore()); |
| | | //isExiståºä»æµè¯ç¨çï¼æµè¯å®åå é¤ |
| | | map.put("isExist", true); |
| | | return map; |
| | | } |
| | | |
| | | if (serviceSubtask.getScore() == null || BigDecimal.ZERO.equals(serviceSubtask.getScore())) { |
| | | //å¦æä¸ºç©ºçè¯ï¼å»detailéæ¿å°æ¯ä¸ªé¢çé项åï¼å¦ææ¯ä½çé¢ï¼ç´æ¥æ¿é¢ç®åï¼åé¢ï¼è¯¥æ¨¡æ¿æ¯åæ°ç±»åï¼ |
| | | ServiceTask serviceTask = serviceTaskService.selectServiceTaskByTaskid(serviceSubtask.getTaskid()); |
| | | if (serviceTask.getType().equals("1")) { |
| | | //å¦ææ¯æºå¨äººè¯é³ |
| | | IvrTaskTemplate ivrTaskTemplate = ivrTaskTemplateService.selectIvrTaskTemplateByID(serviceTask.getTemplateid()); |
| | | //夿æ¯ä¸æ¯è¯å |
| | | if (StringUtils.isNotEmpty(ivrTaskTemplate.getScoreType()) && ivrTaskTemplate.getScoreType().equals("1")) { |
| | | ServiceSubtaskDetail serviceSubtaskDetail = new ServiceSubtaskDetail(); |
| | | serviceSubtaskDetail.setSubId(serviceSubtask.getId()); |
| | | List<ServiceSubtaskDetail> serviceSubtaskDetailList = serviceSubtaskDetailMapper.selectServiceSubtaskDetailList(serviceSubtaskDetail); |
| | | for (ServiceSubtaskDetail serviceSubtaskDetail1 : serviceSubtaskDetailList) { |
| | | Long scriptid = serviceSubtaskDetail1.getScriptid(); |
| | | IvrTaskTemplateScript ivrTaskTemplateScript = iIvrTaskTemplateScriptService.selectIvrTaskTemplateScriptByID(scriptid); |
| | | if (StringUtils.isNotEmpty(ivrTaskTemplateScript.getScriptType())) { |
| | | if (ivrTaskTemplateScript.getScriptType().equals("3") || ivrTaskTemplateScript.getScriptType().equals("4")) { |
| | | if (StringUtils.isNotEmpty(serviceSubtaskDetail1.getAsrtext())) { |
| | | //䏿¯éæ©é¢ï¼ç´æ¥æ¿é¢ç®å |
| | | bigDecimal = bigDecimal.add(ivrTaskTemplateScript.getScore()); |
| | | } |
| | | } else if (ivrTaskTemplateScript.getScriptType().equals("1") || ivrTaskTemplateScript.getScriptType().equals("2")) { |
| | | IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption = new IvrTaskTemplateTargetoption(); |
| | | ivrTaskTemplateTargetoption.setScriptid(scriptid); |
| | | List<IvrTaskTemplateTargetoption> ivrTaskTemplateTargetoptions = serviceTaskScriptTargetoptionMapper.selectIvrTaskTemplateTargetoptionList(ivrTaskTemplateTargetoption); |
| | | //è·åé项ï¼ç¨éä¸çå¼å»é项éå¹é
ï¼æ¿å°é项å |
| | | for (IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption1 : ivrTaskTemplateTargetoptions) { |
| | | if (ivrTaskTemplateTargetoption1.getTargetvalue().equals(serviceSubtaskDetail1.getMatchedtext())) { |
| | | bigDecimal = bigDecimal.add(ivrTaskTemplateTargetoption1.getScore()); |
| | | //æµè¯å®å é¤ |
| | | if (StringUtils.isEmpty(detailResult) || ivrTaskTemplateTargetoption1.getTargetvalue().equals(detailResult)) { |
| | | isExist = true; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if (serviceTask.getType().equals("2")) { |
| | | //妿æ¯é®å· |
| | | SvyTaskTemplate svyTaskTemplate = svyTaskTemplateService.selectSvyTaskTemplateBySvyid(serviceTask.getTemplateid()); |
| | | //夿æ¯ä¸æ¯è¯å |
| | | if (StringUtils.isNotEmpty(svyTaskTemplate.getScoreType()) && svyTaskTemplate.getScoreType().equals("1")) { |
| | | ServiceSubtaskDetail serviceSubtaskDetail = new ServiceSubtaskDetail(); |
| | | serviceSubtaskDetail.setSubId(serviceSubtask.getId()); |
| | | List<ServiceSubtaskDetail> serviceSubtaskDetailList = serviceSubtaskDetailMapper.selectServiceSubtaskDetailList(serviceSubtaskDetail); |
| | | for (ServiceSubtaskDetail serviceSubtaskDetail1 : serviceSubtaskDetailList) { |
| | | Long scriptid = serviceSubtaskDetail1.getScriptid(); |
| | | SvyLibTemplateScript svyLibTemplateScript = svyLibTemplateScriptService.selectSvyLibTemplateScriptByTopicid(scriptid); |
| | | if (StringUtils.isNotEmpty(svyLibTemplateScript.getScriptType())) { |
| | | if (svyLibTemplateScript.getScriptType().equals("3") || svyLibTemplateScript.getScriptType().equals("4")) { |
| | | if (StringUtils.isNotEmpty(serviceSubtaskDetail1.getAsrtext())) { |
| | | //䏿¯éæ©é¢ï¼ç´æ¥æ¿é¢ç®å |
| | | bigDecimal = bigDecimal.add(svyLibTemplateScript.getScore()); |
| | | } |
| | | } else if (svyLibTemplateScript.getScriptType().equals("1") || svyLibTemplateScript.getScriptType().equals("2")) { |
| | | SvyLibTemplateTargetoption svyLibTemplateTargetoption = new SvyLibTemplateTargetoption(); |
| | | svyLibTemplateTargetoption.setScriptid(scriptid); |
| | | List<SvyLibTemplateTargetoption> svyLibTemplateTargetoptions = svyLibTemplateTargetoptionService.selectSvyLibTemplateTargetoptionList(svyLibTemplateTargetoption); |
| | | //è·åé项ï¼ç¨éä¸çå¼å»é项éå¹é
ï¼æ¿å°é项å |
| | | for (SvyLibTemplateTargetoption svyLibTemplateTargetoption1 : svyLibTemplateTargetoptions) { |
| | | if (svyLibTemplateTargetoption1.getOptioncontent().equals(serviceSubtaskDetail1.getAsrtext())) { |
| | | bigDecimal = bigDecimal.add(svyLibTemplateTargetoption1.getScore()); |
| | | //æµè¯å®å é¤ |
| | | if (StringUtils.isEmpty(detailResult) || svyLibTemplateTargetoption1.getOptioncontent().equals(detailResult)) { |
| | | isExist = true; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | map.put("score", bigDecimal); |
| | | map.put("isExist", isExist); |
| | | return map; |
| | | } |
| | | |
| | | } |
| | |
| | | <result property="sendDay" column="send_day"/> |
| | | <result property="longTemp" column="long_temp"/> |
| | | <result property="deptCode" column="dept_code"/> |
| | | <result property="scoreType" column="score_type"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectIvrLibaTemplateVo"> |
| | | select id, |
| | | revisit_before, |
| | | revisit_after, |
| | | score_type, |
| | | send_day, |
| | | dept_code, |
| | | long_temp, |
| | |
| | | a.revisit_before, |
| | | a.revisit_after, |
| | | a.send_day, |
| | | a.score_type, |
| | | a.dept_code, |
| | | a.long_temp, |
| | | a.templateName, |
| | |
| | | '%') |
| | | </if> |
| | | <if test="id != null ">and a.id = #{id}</if> |
| | | <if test="scoreType != null ">and a.score_type = #{scoreType}</if> |
| | | <if test="tag != null ">and b.tag_name = #{tag}</if> |
| | | <if test="sendDay != null ">and a.send_day = #{sendDay}</if> |
| | | <if test="longTemp != null ">and a.long_temp = #{longTemp}</if> |
| | |
| | | a.isenable, |
| | | a.campus, |
| | | a.suitway, |
| | | a.score_type, |
| | | a.mate_num, |
| | | a.no_voice_num, |
| | | a.submodule, a.language, a.note, |
| | |
| | | <if test="sendDay != null ">send_day,</if> |
| | | <if test="longTemp != null ">long_temp,</if> |
| | | <if test="deptCode != null">dept_code,</if> |
| | | <if test="scoreType != null">score_type,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="templateName != null and templateName != ''">#{templateName},</if> |
| | |
| | | <if test="sendDay != null ">#{sendDay},</if> |
| | | <if test="longTemp != null ">#{longTemp},</if> |
| | | <if test="deptCode != null">#{deptCode},</if> |
| | | <if test="scoreType != null">#{scoreType},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="sendDay != null ">send_day = #{sendDay},</if> |
| | | <if test="longTemp != null ">long_temp = #{longTemp},</if> |
| | | <if test="deptCode != null">dept_code = #{deptCode},</if> |
| | | <if test="scoreType != null">score_type = #{scoreType},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | <result property="sendDay" column="send_day"/> |
| | | <result property="deptCode" column="dept_code"/> |
| | | <result property="longTemp" column="long_temp"/> |
| | | <result property="scoreType" column="score_type"/> |
| | | |
| | | </resultMap> |
| | | |
| | | <sql id="selectIvrTaskTemplateVo"> |
| | | select id, |
| | | taskid, |
| | | score_type, |
| | | long_temp, |
| | | send_day, |
| | | recallcount, |
| | |
| | | <if test="recallcount != null">and recallcount = #{prologrecallcountue}</if> |
| | | <if test="deptCode != null">and dept_code = #{deptCode}</if> |
| | | <if test="longTemp != null">and long_temp = #{longTemp}</if> |
| | | <if test="scoreType != null ">and score_type = #{scoreType}</if> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | <if test="sendDay != null ">send_day,</if> |
| | | <if test="deptCode != null">dept_code,</if> |
| | | <if test="longTemp != null">long_temp,</if> |
| | | <if test="scoreType != null ">score_type,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="taskid != null">#{taskid},</if> |
| | |
| | | <if test="sendDay != null ">#{sendDay},</if> |
| | | <if test="deptCode != null">#{deptCode},</if> |
| | | <if test="longTemp != null">#{longTemp},</if> |
| | | <if test="scoreType != null ">#{scoreType},</if> |
| | | |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="sendDay != null ">send_day = #{sendDay},</if> |
| | | <if test="deptCode != null">dept_code = #{deptCode},</if> |
| | | <if test="longTemp != null">long_temp = #{longTemp},</if> |
| | | <if test="scoreType != null ">score_type = #{scoreType},</if> |
| | | |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | <result property="carePerson" column="care_person"/> |
| | | <result property="casePersonAge" column="case_person_age"/> |
| | | <result property="reservedPhone" column="reserved_phone"/> |
| | | <result property="patientOverview" column="patient_overview"/> |
| | | </resultMap> |
| | | |
| | | |
| | |
| | | <result property="leavehospitaldistrictcode" column="leavehospitaldistrictcode"/> |
| | | <result property="admitdate" column="admitdate"/> |
| | | <result property="reservedPhone" column="reserved_phone"/> |
| | | <result property="patientOverview" column="patient_overview"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectPatArchiveVo"> |
| | | select id, |
| | | notrequired_flag, |
| | | notrequiredreason, |
| | | patientOverview, |
| | | patientno, |
| | | patid_his, |
| | | age_unit, |
| | |
| | | <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if> |
| | | <if test="idcardno != null and idcardno != ''">and idcardno = #{idcardno}</if> |
| | | <if test="sourcefrom != null ">and sourcefrom = #{sourcefrom}</if> |
| | | <if test="patientOverview != null ">and patient_overview = #{patientOverview}</if> |
| | | <if test="telcode != null and telcode != ''">and telcode = #{telcode}</if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="id != null and id != ''">and id = #{id}</if> |
| | |
| | | select |
| | | a.id, |
| | | a.age_unit, |
| | | a.patient_overview, |
| | | a.notrequired_flag, |
| | | a.notrequiredreason, |
| | | a.patientno, |
| | |
| | | <if test="carePerson != null ">care_person,</if> |
| | | <if test="casePersonAge != null ">case_person_age,</if> |
| | | <if test="reservedPhone != null ">reserved_phone,</if> |
| | | <if test="patientOverview != null ">patient_overview,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="patientno != null">#{patientno},</if> |
| | |
| | | <if test="carePerson != null ">#{carePerson},</if> |
| | | <if test="casePersonAge != null ">#{casePersonAge},</if> |
| | | <if test="reservedPhone != null ">#{reservedPhone},</if> |
| | | <if test="patientOverview != null ">#{patientOverview},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | insert into |
| | | pat_archive(name,viptype,sex,idcardno,birthdate,place_of_residence,age,age2,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,patientno,patid_his,sd_flag,age_unit,age_unit2,notrequired_flag,notrequiredreason,care_facilities,case_path, |
| | | degree_of_education,marital_status,income,medicare_type,care_person,case_person_age,reserved_phone) |
| | | degree_of_education,marital_status,income,medicare_type,care_person,case_person_age,reserved_phone,patient_overview) |
| | | values |
| | | <foreach item="item" index="index" collection="list" separator=","> |
| | | (#{item.name},#{item.viptype},#{item.sex},#{item.idcardno},#{item.birthdate},#{item.placeOfResidence},#{item.age},#{item.age2},#{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.nation},#{item.birthplace},#{item.nativePlace},#{item.patientno}, |
| | | #{item.patidHis},#{item.sdFlag},#{item.ageUnit},#{item.ageUnit2},#{item.notrequiredFlag},#{item.notrequiredreason} |
| | | ,#{item.careFacilities},#{item.casePath},#{item.degreeOfEducation},#{item.maritalStatus},#{item.income},#{item.medicareType},#{item.carePerson},#{item.casePersonAge},#{item.reservedPhone}) |
| | | ,#{item.careFacilities},#{item.casePath},#{item.degreeOfEducation},#{item.maritalStatus},#{item.income},#{item.medicareType},#{item.carePerson},#{item.casePersonAge},#{item.reservedPhone},#{item.patientOverview}) |
| | | </foreach> |
| | | </insert> |
| | | |
| | |
| | | <if test="carePerson != null ">care_person = #{carePerson},</if> |
| | | <if test="casePersonAge != null ">case_person_age = #{casePersonAge},</if> |
| | | <if test="reservedPhone != null ">reserved_phone = #{reservedPhone},</if> |
| | | <if test="patientOverview != null ">patient_overview = #{patientOverview},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | a.viptype, |
| | | a.pattype, |
| | | a.reserved_phone, |
| | | a.patient_overview, |
| | | COALESCE(( |
| | | SELECT string_agg(d.tagname, ', ') |
| | | FROM pat_archivetag d |
| | |
| | | a.reserved_phone, |
| | | a.upload_time, |
| | | a.pattype, |
| | | a.patient_overview, |
| | | d.bed_no, |
| | | d.starttime, |
| | | d.endtime, |
| | |
| | | a.create_time, |
| | | a.isupload, |
| | | a.upload_time, |
| | | a.patient_overview, |
| | | a.reserved_phone, |
| | | COALESCE(( |
| | | SELECT string_agg(dd.tagname, ', ') |
| | |
| | | a.notrequired_flag, |
| | | a.notrequiredreason, |
| | | a.patid_his, |
| | | a.patient_overview, |
| | | a.sd_flag, |
| | | a.patientno, |
| | | a.sex, |
| | |
| | | a.create_time, |
| | | a.isupload, |
| | | a.upload_time, |
| | | a.patient_overview, |
| | | a.pattype, |
| | | a.reserved_phone, |
| | | d.bed_no, |
| | |
| | | a.isupload, |
| | | a.reserved_phone, |
| | | a.upload_time, |
| | | a.patient_overview, |
| | | rt.tagname, |
| | | ROW_NUMBER() OVER (PARTITION BY a.idcardno ORDER BY a.update_time DESC) AS rn, |
| | | a.pattype |
| | |
| | | a.isupload, |
| | | a.upload_time, |
| | | a.reserved_phone, |
| | | a.patient_overview, |
| | | COALESCE(( |
| | | SELECT string_agg(dd.tagname, ', ') |
| | | FROM pat_archivetag dd |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.smartor.mapper.PatServiceContractMapper"> |
| | | |
| | | <resultMap type="com.smartor.domain.PatServiceContract" id="PatServiceContractResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="contractNo" column="contract_no"/> |
| | | <result property="patId" column="pat_id"/> |
| | | <result property="contractType" column="contract_type"/> |
| | | <result property="salesChannel" column="sales_channel"/> |
| | | <result property="contractAmount" column="contract_amount"/> |
| | | <result property="paymentStatus" column="payment_status"/> |
| | | <result property="contractStatus" column="contract_status"/> |
| | | <result property="startDate" column="start_date"/> |
| | | <result property="endDate" column="end_date"/> |
| | | <result property="actualEndDate" column="actual_end_date"/> |
| | | <result property="pid" column="pid"/> |
| | | <result property="guid" column="guid"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="orgid" column="orgid"/> |
| | | <result property="autoRenew" column="auto_renew"/> |
| | | <result property="renewalReminderDays" column="renewal_reminder_days"/> |
| | | <result property="specialTerms" column="special_terms"/> |
| | | <result property="signedAt" column="signed_at"/> |
| | | <result property="signedByPatient" column="signed_by_patient"/> |
| | | <result property="signedByHospital" column="signed_by_hospital"/> |
| | | <result property="cancellationReason" column="cancellation_reason"/> |
| | | <result property="cancelledAt" column="cancelled_at"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectPatServiceContractVo"> |
| | | select id, |
| | | contract_no, |
| | | pat_id, |
| | | contract_type, |
| | | sales_channel, |
| | | contract_amount, |
| | | payment_status, |
| | | contract_status, |
| | | start_date, |
| | | end_date, |
| | | actual_end_date, |
| | | pid, |
| | | guid, |
| | | del_flag, |
| | | create_by, |
| | | update_by, |
| | | update_time, |
| | | orgid, |
| | | auto_renew, |
| | | renewal_reminder_days, |
| | | special_terms, |
| | | signed_at, |
| | | signed_by_patient, |
| | | signed_by_hospital, |
| | | cancellation_reason, |
| | | cancelled_at |
| | | from pat_service_contract |
| | | </sql> |
| | | |
| | | <select id="selectPatServiceContractList" parameterType="com.smartor.domain.PatServiceContract" |
| | | resultMap="PatServiceContractResult"> |
| | | <include refid="selectPatServiceContractVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | <if test="contractNo != null and contractNo != ''"> |
| | | and contract_no = #{contractNo} |
| | | </if> |
| | | <if test="patId != null "> |
| | | and pat_id = #{patId} |
| | | </if> |
| | | <if test="contractType != null and contractType != ''"> |
| | | and contract_type = #{contractType} |
| | | </if> |
| | | <if test="salesChannel != null and salesChannel != ''"> |
| | | and sales_channel = #{salesChannel} |
| | | </if> |
| | | <if test="contractAmount != null and contractAmount != ''"> |
| | | and contract_amount = #{contractAmount} |
| | | </if> |
| | | <if test="paymentStatus != null and paymentStatus != ''"> |
| | | and payment_status = #{paymentStatus} |
| | | </if> |
| | | <if test="contractStatus != null and contractStatus != ''"> |
| | | and contract_status = #{contractStatus} |
| | | </if> |
| | | <if test="startDate != null "> |
| | | and start_date = #{startDate} |
| | | </if> |
| | | <if test="endDate != null "> |
| | | and end_date = #{endDate} |
| | | </if> |
| | | <if test="actualEndDate != null "> |
| | | and actual_end_date = #{actualEndDate} |
| | | </if> |
| | | <if test="pid != null "> |
| | | and pid = #{pid} |
| | | </if> |
| | | <if test="guid != null and guid != ''"> |
| | | and guid = #{guid} |
| | | </if> |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="autoRenew != null and autoRenew != ''"> |
| | | and auto_renew = #{autoRenew} |
| | | </if> |
| | | <if test="renewalReminderDays != null "> |
| | | and renewal_reminder_days = #{renewalReminderDays} |
| | | </if> |
| | | <if test="specialTerms != null and specialTerms != ''"> |
| | | and special_terms = #{specialTerms} |
| | | </if> |
| | | <if test="signedAt != null "> |
| | | and signed_at = #{signedAt} |
| | | </if> |
| | | <if test="signedByPatient != null and signedByPatient != ''"> |
| | | and signed_by_patient = #{signedByPatient} |
| | | </if> |
| | | <if test="signedByHospital != null and signedByHospital != ''"> |
| | | and signed_by_hospital = #{signedByHospital} |
| | | </if> |
| | | <if test="cancellationReason != null and cancellationReason != ''"> |
| | | and cancellation_reason = #{cancellationReason} |
| | | </if> |
| | | <if test="cancelledAt != null "> |
| | | and cancelled_at = #{cancelledAt} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectPatServiceContractById" parameterType="Long" |
| | | resultMap="PatServiceContractResult"> |
| | | <include refid="selectPatServiceContractVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertPatServiceContract" parameterType="com.smartor.domain.PatServiceContract"> |
| | | insert into pat_service_contract |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id, |
| | | </if> |
| | | <if test="contractNo != null">contract_no, |
| | | </if> |
| | | <if test="patId != null">pat_id, |
| | | </if> |
| | | <if test="contractType != null">contract_type, |
| | | </if> |
| | | <if test="salesChannel != null">sales_channel, |
| | | </if> |
| | | <if test="contractAmount != null">contract_amount, |
| | | </if> |
| | | <if test="paymentStatus != null">payment_status, |
| | | </if> |
| | | <if test="contractStatus != null">contract_status, |
| | | </if> |
| | | <if test="startDate != null">start_date, |
| | | </if> |
| | | <if test="endDate != null">end_date, |
| | | </if> |
| | | <if test="actualEndDate != null">actual_end_date, |
| | | </if> |
| | | <if test="pid != null">pid, |
| | | </if> |
| | | <if test="guid != null">guid, |
| | | </if> |
| | | <if test="delFlag != null">del_flag, |
| | | </if> |
| | | <if test="createBy != null">create_by, |
| | | </if> |
| | | <if test="updateBy != null">update_by, |
| | | </if> |
| | | <if test="updateTime != null">update_time, |
| | | </if> |
| | | <if test="orgid != null">orgid, |
| | | </if> |
| | | <if test="autoRenew != null">auto_renew, |
| | | </if> |
| | | <if test="renewalReminderDays != null">renewal_reminder_days, |
| | | </if> |
| | | <if test="specialTerms != null">special_terms, |
| | | </if> |
| | | <if test="signedAt != null">signed_at, |
| | | </if> |
| | | <if test="signedByPatient != null">signed_by_patient, |
| | | </if> |
| | | <if test="signedByHospital != null">signed_by_hospital, |
| | | </if> |
| | | <if test="cancellationReason != null">cancellation_reason, |
| | | </if> |
| | | <if test="cancelledAt != null">cancelled_at, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id}, |
| | | </if> |
| | | <if test="contractNo != null">#{contractNo}, |
| | | </if> |
| | | <if test="patId != null">#{patId}, |
| | | </if> |
| | | <if test="contractType != null">#{contractType}, |
| | | </if> |
| | | <if test="salesChannel != null">#{salesChannel}, |
| | | </if> |
| | | <if test="contractAmount != null">#{contractAmount}, |
| | | </if> |
| | | <if test="paymentStatus != null">#{paymentStatus}, |
| | | </if> |
| | | <if test="contractStatus != null">#{contractStatus}, |
| | | </if> |
| | | <if test="startDate != null">#{startDate}, |
| | | </if> |
| | | <if test="endDate != null">#{endDate}, |
| | | </if> |
| | | <if test="actualEndDate != null">#{actualEndDate}, |
| | | </if> |
| | | <if test="pid != null">#{pid}, |
| | | </if> |
| | | <if test="guid != null">#{guid}, |
| | | </if> |
| | | <if test="delFlag != null">#{delFlag}, |
| | | </if> |
| | | <if test="createBy != null">#{createBy}, |
| | | </if> |
| | | <if test="updateBy != null">#{updateBy}, |
| | | </if> |
| | | <if test="updateTime != null">#{updateTime}, |
| | | </if> |
| | | <if test="orgid != null">#{orgid}, |
| | | </if> |
| | | <if test="autoRenew != null">#{autoRenew}, |
| | | </if> |
| | | <if test="renewalReminderDays != null">#{renewalReminderDays}, |
| | | </if> |
| | | <if test="specialTerms != null">#{specialTerms}, |
| | | </if> |
| | | <if test="signedAt != null">#{signedAt}, |
| | | </if> |
| | | <if test="signedByPatient != null">#{signedByPatient}, |
| | | </if> |
| | | <if test="signedByHospital != null">#{signedByHospital}, |
| | | </if> |
| | | <if test="cancellationReason != null">#{cancellationReason}, |
| | | </if> |
| | | <if test="cancelledAt != null">#{cancelledAt}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updatePatServiceContract" parameterType="com.smartor.domain.PatServiceContract"> |
| | | update pat_service_contract |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="contractNo != null">contract_no = |
| | | #{contractNo}, |
| | | </if> |
| | | <if test="patId != null">pat_id = |
| | | #{patId}, |
| | | </if> |
| | | <if test="contractType != null">contract_type = |
| | | #{contractType}, |
| | | </if> |
| | | <if test="salesChannel != null">sales_channel = |
| | | #{salesChannel}, |
| | | </if> |
| | | <if test="contractAmount != null">contract_amount = |
| | | #{contractAmount}, |
| | | </if> |
| | | <if test="paymentStatus != null">payment_status = |
| | | #{paymentStatus}, |
| | | </if> |
| | | <if test="contractStatus != null">contract_status = |
| | | #{contractStatus}, |
| | | </if> |
| | | <if test="startDate != null">start_date = |
| | | #{startDate}, |
| | | </if> |
| | | <if test="endDate != null">end_date = |
| | | #{endDate}, |
| | | </if> |
| | | <if test="actualEndDate != null">actual_end_date = |
| | | #{actualEndDate}, |
| | | </if> |
| | | <if test="pid != null">pid = |
| | | #{pid}, |
| | | </if> |
| | | <if test="guid != null">guid = |
| | | #{guid}, |
| | | </if> |
| | | <if test="delFlag != null">del_flag = |
| | | #{delFlag}, |
| | | </if> |
| | | <if test="createBy != null">create_by = |
| | | #{createBy}, |
| | | </if> |
| | | <if test="updateBy != null">update_by = |
| | | #{updateBy}, |
| | | </if> |
| | | <if test="updateTime != null">update_time = |
| | | #{updateTime}, |
| | | </if> |
| | | <if test="orgid != null">orgid = |
| | | #{orgid}, |
| | | </if> |
| | | <if test="autoRenew != null">auto_renew = |
| | | #{autoRenew}, |
| | | </if> |
| | | <if test="renewalReminderDays != null">renewal_reminder_days = |
| | | #{renewalReminderDays}, |
| | | </if> |
| | | <if test="specialTerms != null">special_terms = |
| | | #{specialTerms}, |
| | | </if> |
| | | <if test="signedAt != null">signed_at = |
| | | #{signedAt}, |
| | | </if> |
| | | <if test="signedByPatient != null">signed_by_patient = |
| | | #{signedByPatient}, |
| | | </if> |
| | | <if test="signedByHospital != null">signed_by_hospital = |
| | | #{signedByHospital}, |
| | | </if> |
| | | <if test="cancellationReason != null">cancellation_reason = |
| | | #{cancellationReason}, |
| | | </if> |
| | | <if test="cancelledAt != null">cancelled_at = |
| | | #{cancelledAt}, |
| | | </if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deletePatServiceContractById" parameterType="Long"> |
| | | update pat_service_contract |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | del_flag =1 |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deletePatServiceContractByIds" parameterType="String"> |
| | | update pat_service_contract |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | del_flag =1 |
| | | </trim> |
| | | where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </update> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | <result property="tagname" column="tagname"/> |
| | | <result property="visitTime" column="visit_time"/> |
| | | <result property="leavediagname" column="leavediagname"/> |
| | | <result property="outPath" column="out_path"/> |
| | | </resultMap> |
| | | |
| | | <resultMap type="com.smartor.domain.ServiceSubtaskCount" id="ServiceSubtaskResult2"> |
| | |
| | | <sql id="selectServiceSubtaskVo"> |
| | | select id, |
| | | hosp_type, |
| | | out_path, |
| | | suggest, |
| | | sendstate, |
| | | endtime, |
| | |
| | | del_flag=0 |
| | | <if test="sendname != null and sendname != ''">and sendname like concat('%', #{sendname}, '%')</if> |
| | | <if test="phone != null and phone != ''">and phone = #{phone}</if> |
| | | <if test="outPath != null and outPath != ''">and out_path = #{outPath}</if> |
| | | <if test="leavehospitaldistrictcode != null and leavehospitaldistrictcode != ''">and |
| | | leavehospitaldistrictcode = #{leavehospitaldistrictcode} |
| | | </if> |
| | |
| | | <if test="sex != null and sex != ''">and sex = #{sex}</if> |
| | | <if test="age != null ">and age = #{age}</if> |
| | | <if test="patguid != null ">and patguid = #{patguid}</if> |
| | | <if test="subId != null ">and id = #{subId}</if> |
| | | <if test="subid != null ">and id = #{subid}</if> |
| | | <if test="inhospid != null ">and inhospid = #{inhospid}</if> |
| | | <if test="submit != null ">and submit = #{submit}</if> |
| | | <if test="upid != null ">and upid = #{upid}</if> |
| | |
| | | <if test="endtime != null ">and endtime = #{endtime}</if> |
| | | <if test="excep != null ">and excep = #{excep}</if> |
| | | <if test="nurseName != null ">and nurse_name = #{nurseName}</if> |
| | | <if test="score != null">and score = #{score}</if> |
| | | <if test="scoreStart != null">and score >= #{scoreStart}</if> |
| | | <if test="scoreEnd != null">and score <= #{scoreEnd}</if> |
| | | <!-- <if test="visitCount != null">and visit_count = #{visitCount}</if>--> |
| | | <if test="visitCount != null and visitCount == 1"> |
| | | AND visit_count = 1 |
| | |
| | | <if test="taskGuid != null">and task_guid = #{taskGuid}</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="visitDeptName != null">and visit_dept_name = #{visitDeptName}</if>--> |
| | | <if test="visitCount != null and visitCount > 1 and visitDeptCodes != null and visitDeptCodes.size() > 0"> |
| | | AND visit_dept_code IN |
| | | <foreach collection="visitDeptCodes" item="visitDeptCodes" open="(" |
| | |
| | | <if test="inhospid != null ">inhospid,</if> |
| | | <if test="visitTime != null ">visit_time,</if> |
| | | <if test="leavediagname != null ">leavediagname,</if> |
| | | <if test="outPath != null">out_path,</if> |
| | | |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="sendname != null">#{sendname},</if> |
| | |
| | | <if test="inhospid != null ">#{inhospid},</if> |
| | | <if test="visitTime != null ">#{visitTime},</if> |
| | | <if test="leavediagname != null ">#{leavediagname},</if> |
| | | <if test="outPath != null">#{outPath},</if> |
| | | |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="inhospid != null ">inhospid=#{inhospid},</if> |
| | | <if test="visitTime != null ">visit_time=#{visitTime},</if> |
| | | <if test="leavediagname != null ">leavediagname=#{leavediagname},</if> |
| | | <if test="outPath != null">out_path = #{outPath},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | <if test="inhospid != null ">inhospid=#{inhospid},</if> |
| | | <if test="visitTime != null ">visitTime=#{visitTime},</if> |
| | | <if test="delFlag != null ">del_flag=#{delFlag},</if> |
| | | <if test="outPath != null ">out_path = #{outPath},</if> |
| | | </trim> |
| | | <where> |
| | | <if test="patid != null ">patid=#{patid}</if> |
| | | <if test="taskid != null ">and taskid=#{taskid}</if> |
| | | <if test="leavediagname != null ">and leavediagname=#{leavediagname}</if> |
| | | <if test="outPath != null and outPath != ''">and out_path = #{outPath}</if> |
| | | </where> |
| | | </update> |
| | | |
| | |
| | | <if test="inhospid != null ">inhospid=#{inhospid},</if> |
| | | <if test="visitTime != null ">visit_time=#{visitTime},</if> |
| | | <if test="leavediagname != null ">leavediagname=#{leavediagname},</if> |
| | | <if test="outPath != null">out_path = #{outPath},</if> |
| | | </trim> |
| | | where patid = #{patid} and taskid = #{taskid} |
| | | </update> |
| | |
| | | remark, |
| | | visit_time, |
| | | leavediagname, |
| | | out_path, |
| | | diagname |
| | | FROM service_subtask, |
| | | JSON_TABLE(send_time_slot, '$[*]' COLUMNS ( |
| | |
| | | WHERE |
| | | del_flag = '0' |
| | | <if test="startDate != null and endDate != null"> |
| | | AND visit_time >= #{startDate} |
| | | AND visit_time <= #{endDate} |
| | | AND visit_time >= #{startDate} |
| | | AND visit_time <= #{endDate} |
| | | </if> |
| | | |
| | | <if test="orgid != null"> |
| | |
| | | FROM pat_med_inhosp |
| | | WHERE del_flag = '0' |
| | | <if test="startDate != null and endDate != null"> |
| | | AND endtime >= #{startDate} |
| | | AND endtime <= #{endDate} |
| | | AND endtime >= #{startDate} |
| | | AND endtime <= #{endDate} |
| | | </if> |
| | | |
| | | AND inhospstate=1 |
| | |
| | | GROUP BY timePeriod |
| | | ORDER BY timePeriod DESC |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | <result property="deptCode" column="dept_code"/> |
| | | <result property="longTemp" column="long_temp"/> |
| | | <result property="sendDay" column="send_day"/> |
| | | <result property="scoreType" column="score_type"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectSvyTaskTemplateVo"> |
| | | select id, |
| | | templateid, |
| | | prologue, |
| | | score_type, |
| | | dept_code, |
| | | long_temp, |
| | | send_day, |
| | |
| | | <where> |
| | | del_flag=0 |
| | | <if test="templateid != null ">and templateid = #{templateid}</if> |
| | | <if test="scoreType != null ">and score_type = #{scoreType}</if> |
| | | <if test="categoryid != null ">and categoryid = #{categoryid}</if> |
| | | <if test="svycode != null and svycode != ''">and svycode = #{svycode}</if> |
| | | <if test="svyname != null and svyname != ''">and svyname like concat('%', #{svyname}, '%')</if> |
| | |
| | | |
| | | <select id="selectSvyTaskTemplateBySvyid" parameterType="Long" resultMap="SvyTaskTemplateResult"> |
| | | <include refid="selectSvyTaskTemplateVo"/> |
| | | where del_flag=0 and id = #{id} |
| | | where del_flag=0 and id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertSvyTaskTemplate" parameterType="com.smartor.domain.SvyTaskTemplate" useGeneratedKeys="true" |
| | |
| | | <if test="deptCode != null ">dept_code,</if> |
| | | <if test="longTemp != null ">long_temp,</if> |
| | | <if test="sendDay != null ">send_day,</if> |
| | | <if test="scoreType != null ">score_type,</if> |
| | | |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="templateid != null">#{templateid},</if> |
| | |
| | | <if test="deptCode != null ">#{deptCode},</if> |
| | | <if test="longTemp != null ">#{longTemp},</if> |
| | | <if test="sendDay != null ">#{sendDay},</if> |
| | | <if test="scoreType != null ">#{scoreType},</if> |
| | | |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="deptCode != null ">dept_code = #{deptCode},</if> |
| | | <if test="longTemp != null ">long_temp = #{longTemp},</if> |
| | | <if test="sendDay != null ">send_day = #{sendDay},</if> |
| | | <if test="scoreType != null ">,score_type = #{scoreType},</if> |
| | | |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |