已添加9个文件
已删除3个文件
已修改38个文件
已重命名12个文件
| | |
| | | <project version="4"> |
| | | <component name="CompilerConfiguration"> |
| | | <annotationProcessing> |
| | | <profile default="true" name="Default" enabled="true" /> |
| | | <profile name="Maven default annotation processors profile" enabled="true"> |
| | | <sourceOutputDir name="target/generated-sources/annotations" /> |
| | | <sourceTestOutputDir name="target/generated-test-sources/test-annotations" /> |
| | |
| | | <module name="ruoyi-framework" /> |
| | | <module name="ruoyi-system" /> |
| | | <module name="smartor" /> |
| | | <module name="smartor-admin" /> |
| | | <module name="ruoyi-common" /> |
| | | <module name="ruoyi-generator" /> |
| | | <module name="smartor-admin" /> |
| | | <module name="smartor-suifang" /> |
| | | <module name="ruoyi-quartz" /> |
| | | </profile> |
| | | </annotationProcessing> |
| | | <bytecodeTargetLevel> |
| | | <module name="ruoyi" target="1.8" /> |
| | | <module name="ruoyi-common" target="1.8" /> |
| | | <module name="ruoyi-framework" target="1.8" /> |
| | | <module name="ruoyi-generator" target="1.8" /> |
| | | <module name="ruoyi-quartz" target="1.8" /> |
| | | <module name="ruoyi-system" target="1.8" /> |
| | | <module name="smartor" target="1.8" /> |
| | | <module name="smartor-admin" target="1.8" /> |
| | | </bytecodeTargetLevel> |
| | | </component> |
| | | </project> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | private boolean sendLishuiSms(ServiceSubtask serviceSubtask, SendMagParam sendMagParam) { |
| | | Map<String, String> map = MsgLSEnum.getAddressByCode(serviceSubtask.getOrgid()); |
| | | String token = LSHospTokenUtil.getToken(serviceSubtask.getOrgid()); |
| | | if (ObjectUtils.isNotEmpty(map) && StringUtils.isEmpty(map.get("address"))) { |
| | | ServiceSubtask ss = new ServiceSubtask(); |
| | | ss.setResult("error"); |
| | | ss.setRemark("çä¿¡åé失败,è¯¥æºææ²¡æé
ç½®çä¿¡å°å"); |
| | | ss.setSendstate(5L); |
| | | ss.setId(serviceSubtask.getId()); |
| | | serviceSubtaskMapper.updateServiceSubtask(ss); |
| | | return false; |
| | | } |
| | | log.info("ãsfHandlleã丽水çä¿¡åéï¼å°åï¼{}ï¼åæ°ï¼{}ï¼æºæIDï¼{}", map.get("address"), sendMagParam, serviceSubtask.getOrgid()); |
| | | String dxCode = getDXCode(map.get("address"), sendMagParam.getPhone(), sendMagParam.getContent(), map.get("sendPersonId"), map.get("sendPersonName"), MsgLSEnum.getHeaderByCode(serviceSubtask.getOrgid()), token); |
| | | log.info("ãsfHandlleã丽水çä¿¡åéç»æï¼{}", dxCode); |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | Map<String, Object> textParam = objectMapper.readValue(dxCode, Map.class); |
| | | String code = textParam.get("Code").toString(); |
| | | return code.equals("0"); |
| | | } |
| | | |
| | | // å¨åæä»£ç ä¸è°ç¨è¿ä¸ªæ¹æ³ |
| | | boolean isSuccess = sendLishuiSms(serviceSubtask, sendMagParam); |
| | |
| | | } |
| | | log.info("==============================Targetregexçå¼ä¸ºï¼{}, Targetregex2çå¼ä¸ºï¼{}", ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex(), ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()); |
| | | |
| | | if (StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() && |
| | | StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches() || |
| | | StringUtils.isEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && |
| | | StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && |
| | | matcher.matches()) { |
| | | if (StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() && StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches() || StringUtils.isEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex2()) && StringUtils.isNotEmpty(ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches()) { |
| | | log.info("å¹é
æ£ç¡®äº"); |
| | | //说æå¹é
æ£ç¡®äº |
| | | ivrLibaTemplateScriptVO.getIvrLibaScriptTargetoptionList().get(j).setIsUserOperation(1); |
| | |
| | | redisCache.setCacheObject(userId + "isOver", 1, 120, TimeUnit.MINUTES); |
| | | } else { |
| | | for (IvrLibaTemplateScriptVO script : ivrLibaTemplateScriptVOList) { |
| | | if (script.getSort() == nextQuestion) { |
| | | if (script.getSort().intValue() == nextQuestion) { |
| | | QuestionMessagePhone returnQues = new QuestionMessagePhone(); |
| | | returnQues.setNowQuestion(script); |
| | | redisCache.setCacheObject(userId + "returnQues", returnQues, 120, TimeUnit.MINUTES); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.web.controller.smartor; |
| | | |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.domain.entity.SysDept; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.smartor.domain.PatMedInhosp; |
| | | import com.smartor.domain.PatMedOuthosp; |
| | | import com.smartor.domain.PatMedReq; |
| | | import com.smartor.domain.PatMedRes; |
| | | import com.smartor.service.IHNGatherPatArchiveService; |
| | | import com.smartor.service.IPatMedOuthospService; |
| | | import com.smartor.service.impl.HNGatherPatArchiveServiceImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.lang.reflect.Array; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æ²³åé鿣è
ä¿¡æ¯æ¥å£Controller |
| | | * |
| | | * @author smartor |
| | | * @date 2025-07-09 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/smartor/hngather") |
| | | @Api(description = "æ²³åé鿣è
ä¿¡æ¯æ¥å£") |
| | | public class HNGatherPatArchiveController extends BaseController { |
| | | @Autowired |
| | | private IHNGatherPatArchiveService ihnGatherPatArchiveService; |
| | | |
| | | /** |
| | | * æ²³åæ°æ®éé |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:patouthosp:list')") |
| | | @PostMapping("/selectGatherList") |
| | | @ApiOperation("æ²³åæ°æ®éé") |
| | | public Integer selectUserList(@RequestBody SysUser sysUser) { |
| | | // Integer integer = ihnGatherPatArchiveService.selectUserList(null); |
| | | // Integer deptInt = ihnGatherPatArchiveService.selectDeptList(null); |
| | | // Integer icdInt = ihnGatherPatArchiveService.selectIcd10List(null); |
| | | Integer integer = ihnGatherPatArchiveService.selectPatMedInhospList(new PatMedInhosp()); |
| | | return integer; |
| | | } |
| | | |
| | | } |
| | |
| | | return AjaxResult.success(serviceSubtaskAnswerService.selectPatQuestionResult(serviceSubTaskQueryReq)); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | //@PreAuthorize("@ss.hasPermi('system:taskcall:list')") |
| | | @PostMapping("/patItem") |
| | | public TableDataInfo patItem(@RequestBody ServiceSubtaskVO serviceSubtaskVO) { |
| | | PageUtils.startPageByPost(serviceSubtaskVO.getPageNum(), serviceSubtaskVO.getPageSize()); |
| | | List<ServiceSubtask> serviceSubtaskList = null; |
| | | LoginUser loginUser = getLoginUser(); |
| | | SysUser user = loginUser.getUser(); |
| | | serviceSubtaskVO.setOrgid(user.getOrgid()); |
| | | if (serviceSubtaskVO != null) { |
| | | PageUtils.startPageByPost(serviceSubtaskVO.getPageNum(), serviceSubtaskVO.getPageSize()); |
| | | serviceSubtaskList = serviceSubtaskService.patItem(serviceSubtaskVO); |
| | | } |
| | | for (ServiceSubtask serviceSubtask : serviceSubtaskList) { |
| | | ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord(); |
| | | serviceSubtaskRecord.setSubtaskId(serviceSubtask.getId()); |
| | | serviceSubtaskRecord.setOrgid(serviceSubtask.getOrgid()); |
| | | if (ObjectUtils.isNotEmpty((serviceSubtask.getTaskid()))) |
| | | serviceSubtaskRecord.setTaskid(serviceSubtask.getTaskid().toString()); |
| | | serviceSubtask.setServiceSubtaskRecordList(serviceSubtaskRecordService.selectServiceSubtaskRecordList(serviceSubtaskRecord)); |
| | |
| | | } |
| | | |
| | | /** |
| | | * è·åéè®¿åæ¶ç |
| | | */ |
| | | @ApiOperation("è·åéè®¿åæ¶ç") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:ServiceTask:add')") |
| | | @Log(title = "è·åéè®¿åæ¶ç", businessType = BusinessType.INSERT) |
| | | @PostMapping("/selectTimelyRate") |
| | | public AjaxResult selectTimelyRate(@RequestBody ServiceSubtask serviceSubtask) { |
| | | SysUser user = getLoginUser().getUser(); |
| | | serviceSubtask.setOrgid(user.getOrgid()); |
| | | return success(serviceTaskService.selectTimelyRate(serviceSubtask)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹è¯é³ä»»å¡ |
| | | */ |
| | | @ApiOperation("ä¿®æ¹ä»»å¡") |
| | |
| | | import java.util.List; |
| | | 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 com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.smartor.domain.SmsParam; |
| | | import com.smartor.service.ISmsParamService; |
| | | import com.ruoyi.system.domain.SmsParam; |
| | | import com.ruoyi.system.service.ISmsParamService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | |
| | |
| | | import java.util.List; |
| | | 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 com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.smartor.domain.SmsRecords; |
| | | import com.smartor.service.ISmsRecordsService; |
| | | import com.ruoyi.system.domain.SmsRecords; |
| | | import com.ruoyi.system.service.ISmsRecordsService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | |
| | |
| | | |
| | | import java.util.List; |
| | | 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 com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.smartor.domain.SmsTemplet; |
| | | import com.smartor.service.ISmsTempletService; |
| | | import com.ruoyi.system.domain.SmsTemplet; |
| | | import com.ruoyi.system.service.ISmsTempletService; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * ç信模æ¿Controller |
| | | * |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-06 |
| | | */ |
| | |
| | | # å
¬å¸ |
| | | # url: jdbc:mysql://192.168.2.9:3308/smartor?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | # 丽水 |
| | | # url: jdbc:mysql://127.0.0.1:3308/smartor-lisui?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | # username: smartor |
| | | # password: Smartor.2023 |
| | | # driverClassName: com.mysql.cj.jdbc.Driver |
| | | # url: jdbc:mysql://127.0.0.1:3308/smartor-lisui?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | # username: smartor |
| | | # password: Smartor.2023 |
| | | # driverClassName: com.mysql.cj.jdbc.Driver |
| | | # æ²³å |
| | | # url: jdbc:mysql://127.0.0.1:3308/smartor_hn?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | # username: root |
| | |
| | | password: Hxerp2000 |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | |
| | | # # 髿¯æ°æ®åºé
ç½® |
| | | # url: jdbc:postgresql://127.0.0.1:5432/smartorlishui |
| | | # username: gaussdb |
| | | # password: Ls@123456 |
| | | # driverClassName: org.postgresql.Driver |
| | | # # 髿¯æ°æ®åºé
ç½® |
| | | # url: jdbc:postgresql://127.0.0.1:5432/smartorlishui |
| | | # username: gaussdb |
| | | # password: Ls@123456 |
| | | # driverClassName: org.postgresql.Driver |
| | | |
| | | # ä»åºæ°æ®æº |
| | | slave: |
| | |
| | | hosp_info_url: http://esb-core-rest.wowjoy.cn/esb/exchange |
| | | |
| | | # 0代表走é»è®¤çä¸ä¼ 1 代ç èµ°æ°åå»é¢çä¸ä¼ |
| | | uploadSwitch: 1 |
| | | uploadSwitch: 0 |
| | | |
| | | # æå®asråè°çurlè·¯å¾(æ¬å°) |
| | | ASRCallBackPath: http://127.0.0.1:8095/smartor/serviceSubtask/phoneCallBackYQ |
| | | ASRCallBackPath: http://192.168.100.10:8095/smartor/serviceSubtask/phoneCallBackYQ |
| | | #ææIP(æ¬å°) |
| | | hangup: http://192.168.100.6:8089/hangup |
| | | #fsæä½¿ç¨çé¿éçapp_key(æ¬å°) |
| | |
| | | # ä¸»åºæ°æ®æº |
| | | master: |
| | | # æ²³å |
| | | url: jdbc:mysql://127.0.0.1:3308/smartor_hn?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | url: jdbc:mysql://127.0.0.1:3308/smartor_hn?useUnicode=true&characterEncoding=utf8&&rewriteBatchedStatements=true&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: 123456 |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | |
| | | |
| | | # ä»åºæ°æ®æº |
| | | slave: |
| | | # 仿°æ®æºå¼å
³/é»è®¤å
³é(å
¬å¸) |
| | | # enabled: true |
| | | # url: jdbc:sqlserver://116.62.18.175:6001;DatabaseName=iv-ywey;encrypt=false;SelectMethod=cursor |
| | | # username: sa |
| | | # password: Hxerp2000 |
| | | # driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | # 仿°æ®æºå¼å
³/é»è®¤å
³é(å
¬å¸) |
| | | enabled: true |
| | | url: jdbc:postgresql://10.10.13.108:5432/hdr |
| | | username: mbsjjk |
| | | password: sjjk@2025 |
| | | driver-class-name: org.postgresql.Driver |
| | | |
| | | # 仿°æ®æºå¼å
³/é»è®¤å
³é(ä¹ä¹äºé¢) |
| | | # enabled: true |
| | |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | |
| | | # PageHelperå页æä»¶ |
| | | pagehelper: |
| | | helperDialect: postgresql |
| | | supportMethodsArguments: true |
| | | params: count=countSql |
| | | |
| | | # Swaggeré
ç½® |
| | | swagger: |
| | | # æ¯å¦å¼å¯swagger |
| | |
| | | # 请æ±åç¼ |
| | | pathMapping: /dev-api |
| | | |
| | | # PageHelperå页æä»¶ |
| | | pagehelper: |
| | | helperDialect: mysql |
| | | supportMethodsArguments: true |
| | | params: count=countSql |
| | | |
| | | magic-api: |
| | | web: /magic/web |
| | |
| | | default-page: 1 |
| | | default-size: 10 |
| | | |
| | | # PageHelperå页æä»¶ |
| | | pagehelper: |
| | | helperDialect: mysql |
| | | supportMethodsArguments: true |
| | | params: count=countSql |
| | | |
| | | #ééçå¯é¥ |
| | | dingAppid: dingn8iip5ubj7clrrsv |
| | | dingAppSecret: qlEK8D3oOVwGPOTiBQIBYTqQVlAfy9S_qQizEQFjJdSScwemWFryg4gbneu-NqWD |
| | |
| | | |
| | | #æ°åå»é¢å¤é¾è¯·æ±IPå端å£å· |
| | | req_path: 8093 |
| | | #localIP: https://wx.lihusmart.com |
| | | #丽水å¤é¾è¯·æ±IPå端å£å· |
| | | localIP: http://221.12.19.26 |
| | | localIP: https://wx.lihusmart.com |
| | | |
| | | |
| | | #è·åæ£è
ä¿¡æ¯URL(ååæä¾) |
| | | hosp_info_url: http://esb-core-rest.wowjoy.cn/esb/exchange |
| | |
| | | configuration: |
| | | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | |
| | | # PageHelperå页æä»¶ |
| | | pagehelper: |
| | | helperDialect: mysql |
| | | supportMethodsArguments: true |
| | | params: count=countSql |
| | | |
| | | |
| | | |
| | | # 鲿¢XSSæ»å» |
| | |
| | | import java.util.stream.Collectors; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.connection.DataType; |
| | | import org.springframework.data.redis.core.*; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | |
| | | /** |
| | | * ç¼åListæ°æ® |
| | | * |
| | | * @param cacheKey ç¼åçé®å¼ |
| | | * @param list å¾
ç¼åçListæ°æ®(è¿é妿æ°å¢çè¯ï¼æ¯å¾å¤´é¨æ°å¢)å¹¶å»é |
| | | * @param cacheKey ç¼åçé®å¼ |
| | | * @param list å¾
ç¼åçListæ°æ®(è¿é妿æ°å¢çè¯ï¼æ¯å¾å¤´é¨æ°å¢)å¹¶å»é |
| | | * @return ç¼åç对象 |
| | | */ |
| | | public void setCacheListLeftAndDistinct(String cacheKey, List<String> list) { |
| | | // è·å ListOperations 对象ï¼ç¨äºæä½ Redis List |
| | | ListOperations<String, String> listOps = redisTemplate.opsForList(); |
| | | // æ£æ¥ key ç±»å |
| | | DataType keyType = redisTemplate.type(cacheKey); |
| | | if (keyType != DataType.NONE && keyType != DataType.LIST) { |
| | | // 妿已ç»åå¨ä½ä¸æ¯ list ç±»åï¼å é¤å®ï¼æç´æ¥æå¼å¸¸ä¹å¯ï¼ |
| | | redisTemplate.delete(cacheKey); |
| | | } |
| | | |
| | | // è·åç°æç cache-0 å表ä¸çææå¼ |
| | | ListOperations<String, String> listOps = redisTemplate.opsForList(); |
| | | List<String> existingValues = listOps.range(cacheKey, 0, -1); |
| | | |
| | | // è¿æ»¤åºä¸å¨ Redis å表ä¸çå¼ |
| | | List<String> newValues = list.stream().filter(value -> !existingValues.contains(value)).collect(Collectors.toList()); |
| | | |
| | | // å°æ°ç弿·»å å° Redis å表ç左侧 |
| | | if (!newValues.isEmpty()) { |
| | | listOps.leftPushAll(cacheKey, newValues); |
| | | } |
| | |
| | | } |
| | | |
| | | // ä¿®æ¹ SQLï¼æ·»å orgid æ¡ä»¶ |
| | | String modifiedSql = modifySqlWithorgidId(originalSql, orgid); |
| | | String modifiedSql = modifySqlWithOrgId(originalSql, orgid); |
| | | |
| | | // å°ä¿®æ¹åç SQL åå |
| | | metaObject.setValue("delegate.boundSql.sql", modifiedSql); |
| | |
| | | * ä¿®æ¹ SQLï¼æ³¨å
¥ orgid æ¡ä»¶ |
| | | * |
| | | * @param originalSql åå§ SQL |
| | | * @param orgid å½åå»é¢ ID |
| | | * @param orgId å½åå»é¢ ID |
| | | * @return ä¿®æ¹åç SQL |
| | | */ |
| | | private String modifySqlWithorgidId(String originalSql, String orgid) { |
| | | if (originalSql.contains("insert into") || originalSql.contains("INSERT INTO") || originalSql.contains("from sys_menu") || originalSql.contains("sys_job") || originalSql.contains("update sys_menu") || originalSql.contains("information_schema.tables") || originalSql.contains("information_schema.columns") || originalSql.contains("gen_table") || originalSql.toUpperCase().contains("ORGID IS NULL")) { |
| | | private String modifySqlWithOrgId(String originalSql, String orgid) { |
| | | if (originalSql.contains("insert into") || originalSql.contains("INSERT INTO") || originalSql.contains("from sys_menu") || originalSql.contains("sys_job") || originalSql.contains("update sys_menu") || originalSql.contains("information_schema.tables") || originalSql.contains("information_schema.columns") || originalSql.contains("gen_table") || originalSql.toUpperCase().contains("ORGID IS NULL") || originalSql.toUpperCase().contains("FROM CRYXX") || originalSql.toUpperCase().contains("FROM MZXX") || originalSql.toUpperCase().contains("FROM JBXX") || originalSql.toUpperCase().contains("FROM BMXX")) { |
| | | return originalSql; |
| | | } |
| | | // æå orgid ç WHERE åå¥ |
| | |
| | | } |
| | | |
| | | // ä¿®æ¹ SQL |
| | | if (originalSql.toUpperCase().contains("ORGID =") || originalSql.toUpperCase().contains("ORGID=")) { |
| | | if (originalSql.toUpperCase().contains("ORGID =") || originalSql.toUpperCase().contains("ORGID=") || originalSql.toUpperCase().contains("ORGID IN")) { |
| | | return originalSql; |
| | | } else if (originalSql.toUpperCase().contains("WHERE")) { |
| | | // å¨å·²æ WHERE åæ·»å orgid æ¡ä»¶ |
| | |
| | | serviceSubtask.setResult("error"); |
| | | serviceSubtask.setRemark("ç³»ç»é误"); |
| | | serviceSubtask.setSendstate(5L); |
| | | // serviceSubtask.setFinishtime(new Date()); |
| | | serviceSubtask.setGuid(guid); |
| | | iServiceSubtaskService.updateServiceSubtask(serviceSubtask); |
| | | } |
| | |
| | | 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); |
| | | String url = null; |
| | | url = ip + ":" + req_path + "/outsideChainwt?param1=" + taskId + "¶m2=" + patid + "¶m3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "¶m5=false"; |
| | | // String wxCode = getWXCode(serviceSubtask.getSfzh(), url, serviceSubtask.getTaskName(), serviceSubtask.getTaskDesc(), "æ "); |
| | | |
| | | //è·å微信å
¬ä¼å·è¯·æ±ä¿¡æ¯æ ¹æ®æºæID |
| | | List<String> wxqqxx = WxGZHEnum.getDescByCode(patArchive.getOrgid()); |
| | |
| | | ss.setRemark("è¯¥æºæçå
¬ä¼å·é
置信æ¯ä¸å
¨ï¼æ æ³éè¿å
¬ä¼å·åé"); |
| | | ss.setSendstate(5L); |
| | | ss.setId(serviceSubtask.getId()); |
| | | // ss.setFinishtime(new Date()); |
| | | serviceSubtaskMapper.updateServiceSubtask(ss); |
| | | continue; |
| | | } |
| | |
| | | ss.setRemark("å
¬ä¼å·åé失败,hisç³»ç»çæ£è
id为空"); |
| | | ss.setSendstate(5L); |
| | | ss.setId(serviceSubtask.getId()); |
| | | // ss.setFinishtime(new Date()); |
| | | serviceSubtaskMapper.updateServiceSubtask(ss); |
| | | continue; |
| | | } |
| | |
| | | serviceSubtask.setResult("error"); |
| | | serviceSubtask.setRemark("ç³»ç»é误"); |
| | | serviceSubtask.setSendstate(5L); |
| | | // serviceSubtask.setFinishtime(new Date()); |
| | | serviceSubtask.setGuid(guid); |
| | | iServiceSubtaskService.updateServiceSubtask(serviceSubtask); |
| | | } |
ÎļþÃû´Ó smartor/src/main/java/com/smartor/domain/SmsParam.java ÐÞ¸Ä |
| | |
| | | package com.smartor.domain; |
| | | package com.ruoyi.system.domain; |
| | | |
| | | import java.util.Date; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | |
| | | |
| | | /** |
| | | * çä¿¡åæ°å¯¹è±¡ sms_param |
| | | * |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-06 |
| | | */ |
| | |
| | | @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") |
| | | private Date uploadTime; |
| | | |
| | | public void setParamid(Long paramid) |
| | | public void setParamid(Long paramid) |
| | | { |
| | | this.paramid = paramid; |
| | | } |
| | | |
| | | public Long getParamid() |
| | | public Long getParamid() |
| | | { |
| | | return paramid; |
| | | } |
| | | public void setParamname(String paramname) |
| | | public void setParamname(String paramname) |
| | | { |
| | | this.paramname = paramname; |
| | | } |
| | | |
| | | public String getParamname() |
| | | public String getParamname() |
| | | { |
| | | return paramname; |
| | | } |
| | | public void setParamval(String paramval) |
| | | public void setParamval(String paramval) |
| | | { |
| | | this.paramval = paramval; |
| | | } |
| | | |
| | | public String getParamval() |
| | | public String getParamval() |
| | | { |
| | | return paramval; |
| | | } |
| | | public void setDescirbe(String descirbe) |
| | | public void setDescirbe(String descirbe) |
| | | { |
| | | this.descirbe = descirbe; |
| | | } |
| | | |
| | | public String getDescirbe() |
| | | public String getDescirbe() |
| | | { |
| | | return descirbe; |
| | | } |
| | | public void setUsestatus(Long usestatus) |
| | | public void setUsestatus(Long usestatus) |
| | | { |
| | | this.usestatus = usestatus; |
| | | } |
| | | |
| | | public Long getUsestatus() |
| | | public Long getUsestatus() |
| | | { |
| | | return usestatus; |
| | | } |
| | | public void setDelFlag(String delFlag) |
| | | public void setDelFlag(String delFlag) |
| | | { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | public String getDelFlag() |
| | | public String getDelFlag() |
| | | { |
| | | return delFlag; |
| | | } |
| | | public void setIsupload(Long isupload) |
| | | public void setIsupload(Long isupload) |
| | | { |
| | | this.isupload = isupload; |
| | | } |
| | | |
| | | public Long getIsupload() |
| | | public Long getIsupload() |
| | | { |
| | | return isupload; |
| | | } |
| | | public void setUploadTime(Date uploadTime) |
| | | public void setUploadTime(Date uploadTime) |
| | | { |
| | | this.uploadTime = uploadTime; |
| | | } |
| | | |
| | | public Date getUploadTime() |
| | | public Date getUploadTime() |
| | | { |
| | | return uploadTime; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.system.domain; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | |
| | | /** |
| | | * çä¿¡è®°å½å¯¹è±¡ sms_records |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-06 |
| | | */ |
| | | @Data |
| | | public class SmsRecords extends BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * è®°å½ID |
| | | */ |
| | | private Long recordid; |
| | | |
| | | /** |
| | | * åä»»å¡ID |
| | | */ |
| | | private Long subId; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @Excel(name = "ç¨æ·ID") |
| | | private String userid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @Excel(name = "ç¨æ·å") |
| | | private String username; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @Excel(name = "ææºå·") |
| | | private String phone; |
| | | |
| | | /** |
| | | * çä¿¡ç¼å· |
| | | */ |
| | | @Excel(name = "çä¿¡ç¼å·") |
| | | private String msgno; |
| | | |
| | | /** |
| | | * çä¿¡å
容 |
| | | */ |
| | | @Excel(name = "çä¿¡å
容") |
| | | private String msg; |
| | | |
| | | /** |
| | | * æ°å¢æ¶é´ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private Date inserttime; |
| | | |
| | | /** |
| | | * åéæ¶é´ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private Date sendtime; |
| | | |
| | | /** |
| | | * åéå¤±è´¥æ¬¡æ° |
| | | */ |
| | | @Excel(name = "åé失败次æ°") |
| | | private Long sendfailedcount; |
| | | |
| | | /** |
| | | * ç»ææ¶é´ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private Date resulttime; |
| | | |
| | | /** |
| | | * ç»æå
容 |
| | | */ |
| | | @Excel(name = "") |
| | | private String resultmsg; |
| | | |
| | | /** |
| | | * åéç¶æ |
| | | */ |
| | | @Excel(name = "åéç¶æ: 0æªåé 1.å·²åé") |
| | | private Long sendstate; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @Excel(name = "") |
| | | private Long inserttype; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @Excel(name = "") |
| | | private Long insertsystem; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @Excel(name = "") |
| | | private String insertmodule; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @Excel(name = "") |
| | | private String moduleid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @Excel(name = "") |
| | | private String msgidentify; |
| | | |
| | | /** |
| | | * $column.columnComment |
| | | */ |
| | | @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") |
| | | private Long accountid; |
| | | |
| | | /** |
| | | * æºæID |
| | | */ |
| | | @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") |
| | | private String orgid; |
| | | |
| | | private List<String> orgidList; |
| | | |
| | | /** |
| | | * å 餿 å¿ |
| | | */ |
| | | private String delFlag; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @Excel(name = "") |
| | | private Long isupload; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private Date uploadTime; |
| | | /** |
| | | * |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private Date visitTime; |
| | | |
| | | } |
ÎļþÃû´Ó smartor/src/main/java/com/smartor/domain/SmsTemplet.java ÐÞ¸Ä |
| | |
| | | package com.smartor.domain; |
| | | package com.ruoyi.system.domain; |
| | | |
| | | import java.util.Date; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | |
| | | |
| | | /** |
| | | * ç信模æ¿å¯¹è±¡ sms_templet |
| | | * |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-06 |
| | | */ |
| | |
| | | @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") |
| | | private Date uploadTime; |
| | | |
| | | public void setTempletid(Long templetid) |
| | | public void setTempletid(Long templetid) |
| | | { |
| | | this.templetid = templetid; |
| | | } |
| | | |
| | | public Long getTempletid() |
| | | public Long getTempletid() |
| | | { |
| | | return templetid; |
| | | } |
| | | public void setTempletno(String templetno) |
| | | public void setTempletno(String templetno) |
| | | { |
| | | this.templetno = templetno; |
| | | } |
| | | |
| | | public String getTempletno() |
| | | public String getTempletno() |
| | | { |
| | | return templetno; |
| | | } |
| | | public void setTempletname(String templetname) |
| | | public void setTempletname(String templetname) |
| | | { |
| | | this.templetname = templetname; |
| | | } |
| | | |
| | | public String getTempletname() |
| | | public String getTempletname() |
| | | { |
| | | return templetname; |
| | | } |
| | | public void setTempletcontent(String templetcontent) |
| | | public void setTempletcontent(String templetcontent) |
| | | { |
| | | this.templetcontent = templetcontent; |
| | | } |
| | | |
| | | public String getTempletcontent() |
| | | public String getTempletcontent() |
| | | { |
| | | return templetcontent; |
| | | } |
| | | public void setDelFlag(String delFlag) |
| | | public void setDelFlag(String delFlag) |
| | | { |
| | | this.delFlag = delFlag; |
| | | } |
| | | |
| | | public String getDelFlag() |
| | | public String getDelFlag() |
| | | { |
| | | return delFlag; |
| | | } |
| | | public void setIsupload(Long isupload) |
| | | public void setIsupload(Long isupload) |
| | | { |
| | | this.isupload = isupload; |
| | | } |
| | | |
| | | public Long getIsupload() |
| | | public Long getIsupload() |
| | | { |
| | | return isupload; |
| | | } |
| | | public void setUploadTime(Date uploadTime) |
| | | public void setUploadTime(Date uploadTime) |
| | | { |
| | | this.uploadTime = uploadTime; |
| | | } |
| | | |
| | | public Date getUploadTime() |
| | | public Date getUploadTime() |
| | | { |
| | | return uploadTime; |
| | | } |
ÎļþÃû´Ó smartor/src/main/java/com/smartor/mapper/SmsParamMapper.java ÐÞ¸Ä |
| | |
| | | package com.smartor.mapper; |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.smartor.domain.SmsParam; |
| | | import com.ruoyi.system.domain.SmsParam; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
ÎļþÃû´Ó smartor/src/main/java/com/smartor/mapper/SmsRecordsMapper.java ÐÞ¸Ä |
| | |
| | | package com.smartor.mapper; |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.ruoyi.system.domain.SmsRecords; |
| | | |
| | | import java.util.List; |
| | | import com.smartor.domain.SmsRecords; |
| | | |
| | | /** |
| | | * çä¿¡è®°å½Mapperæ¥å£ |
| | | * |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-06 |
| | | */ |
| | | public interface SmsRecordsMapper |
| | | public interface SmsRecordsMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢çä¿¡è®°å½ |
| | | * |
| | | * |
| | | * @param recordid çä¿¡è®°å½ä¸»é® |
| | | * @return çä¿¡è®°å½ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¥è¯¢çä¿¡è®°å½å表 |
| | | * |
| | | * |
| | | * @param smsRecords çä¿¡è®°å½ |
| | | * @return çä¿¡è®°å½éå |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ°å¢çä¿¡è®°å½ |
| | | * |
| | | * |
| | | * @param smsRecords çä¿¡è®°å½ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¿®æ¹çä¿¡è®°å½ |
| | | * |
| | | * |
| | | * @param smsRecords çä¿¡è®°å½ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * å é¤çä¿¡è®°å½ |
| | | * |
| | | * |
| | | * @param recordid çä¿¡è®°å½ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éå é¤çä¿¡è®°å½ |
| | | * |
| | | * |
| | | * @param recordids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
ÎļþÃû´Ó smartor/src/main/java/com/smartor/mapper/SmsTempletMapper.java ÐÞ¸Ä |
| | |
| | | package com.smartor.mapper; |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.ruoyi.system.domain.SmsTemplet; |
| | | |
| | | import java.util.List; |
| | | import com.smartor.domain.SmsTemplet; |
| | | |
| | | /** |
| | | * ç信模æ¿Mapperæ¥å£ |
| | | * |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-06 |
| | | */ |
| | | public interface SmsTempletMapper |
| | | public interface SmsTempletMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢çä¿¡æ¨¡æ¿ |
| | | * |
| | | * |
| | | * @param templetid ç信模æ¿ä¸»é® |
| | | * @return çä¿¡æ¨¡æ¿ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¥è¯¢ç信模æ¿å表 |
| | | * |
| | | * |
| | | * @param smsTemplet çä¿¡æ¨¡æ¿ |
| | | * @return ç信模æ¿éå |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ°å¢çä¿¡æ¨¡æ¿ |
| | | * |
| | | * |
| | | * @param smsTemplet çä¿¡æ¨¡æ¿ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¿®æ¹çä¿¡æ¨¡æ¿ |
| | | * |
| | | * |
| | | * @param smsTemplet çä¿¡æ¨¡æ¿ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * å é¤çä¿¡æ¨¡æ¿ |
| | | * |
| | | * |
| | | * @param templetid ç信模æ¿ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éå é¤çä¿¡æ¨¡æ¿ |
| | | * |
| | | * |
| | | * @param templetids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
ÎļþÃû´Ó smartor/src/main/java/com/smartor/service/ISmsParamService.java ÐÞ¸Ä |
| | |
| | | package com.smartor.service; |
| | | package com.ruoyi.system.service; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.smartor.domain.SmsParam; |
| | | import com.ruoyi.system.domain.SmsParam; |
| | | |
| | | /** |
| | | * çä¿¡åæ°Serviceæ¥å£ |
ÎļþÃû´Ó smartor/src/main/java/com/smartor/service/ISmsRecordsService.java ÐÞ¸Ä |
| | |
| | | package com.smartor.service; |
| | | package com.ruoyi.system.service; |
| | | |
| | | import java.util.List; |
| | | import com.smartor.domain.SmsRecords; |
| | | |
| | | import com.ruoyi.system.domain.SmsRecords; |
| | | |
| | | /** |
| | | * çä¿¡è®°å½Serviceæ¥å£ |
| | | * |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-06 |
| | | */ |
| | | public interface ISmsRecordsService |
| | | { |
| | | public interface ISmsRecordsService { |
| | | /** |
| | | * æ¥è¯¢çä¿¡è®°å½ |
| | | * |
| | | * |
| | | * @param recordid çä¿¡è®°å½ä¸»é® |
| | | * @return çä¿¡è®°å½ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¥è¯¢çä¿¡è®°å½å表 |
| | | * |
| | | * |
| | | * @param smsRecords çä¿¡è®°å½ |
| | | * @return çä¿¡è®°å½éå |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ°å¢çä¿¡è®°å½ |
| | | * |
| | | * |
| | | * @param smsRecords çä¿¡è®°å½ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertSmsRecords(SmsRecords smsRecords); |
| | | |
| | | /** |
| | | * çä¿¡åé |
| | | * |
| | | * @param smsRecords |
| | | * @return |
| | | */ |
| | | public Boolean sendSmsRecords(SmsRecords smsRecords); |
| | | |
| | | /** |
| | | * ä¿®æ¹çä¿¡è®°å½ |
| | | * |
| | | * |
| | | * @param smsRecords çä¿¡è®°å½ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éå é¤çä¿¡è®°å½ |
| | | * |
| | | * |
| | | * @param recordids éè¦å é¤ççä¿¡è®°å½ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * å é¤çä¿¡è®°å½ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param recordid çä¿¡è®°å½ä¸»é® |
| | | * @return ç»æ |
| | | */ |
ÎļþÃû´Ó smartor/src/main/java/com/smartor/service/ISmsTempletService.java ÐÞ¸Ä |
| | |
| | | package com.smartor.service; |
| | | package com.ruoyi.system.service; |
| | | |
| | | import java.util.List; |
| | | import com.smartor.domain.SmsTemplet; |
| | | import com.ruoyi.system.domain.SmsTemplet; |
| | | |
| | | /** |
| | | * ç信模æ¿Serviceæ¥å£ |
| | | * |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-06 |
| | | */ |
| | | public interface ISmsTempletService |
| | | public interface ISmsTempletService |
| | | { |
| | | /** |
| | | * æ¥è¯¢çä¿¡æ¨¡æ¿ |
| | | * |
| | | * |
| | | * @param templetid ç信模æ¿ä¸»é® |
| | | * @return çä¿¡æ¨¡æ¿ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¥è¯¢ç信模æ¿å表 |
| | | * |
| | | * |
| | | * @param smsTemplet çä¿¡æ¨¡æ¿ |
| | | * @return ç信模æ¿éå |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ°å¢çä¿¡æ¨¡æ¿ |
| | | * |
| | | * |
| | | * @param smsTemplet çä¿¡æ¨¡æ¿ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¿®æ¹çä¿¡æ¨¡æ¿ |
| | | * |
| | | * |
| | | * @param smsTemplet çä¿¡æ¨¡æ¿ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éå é¤çä¿¡æ¨¡æ¿ |
| | | * |
| | | * |
| | | * @param templetids éè¦å é¤çç信模æ¿ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * å é¤ç信模æ¿ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param templetid ç信模æ¿ä¸»é® |
| | | * @return ç»æ |
| | | */ |
ÎļþÃû´Ó smartor/src/main/java/com/smartor/service/impl/SmsParamServiceImpl.java ÐÞ¸Ä |
| | |
| | | package com.smartor.service.impl; |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import WebServiceClient.MessagingInsertLocator; |
| | | import WebServiceClient.MessagingInsertSoap12Stub; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.smartor.domain.SmsParam; |
| | | import com.smartor.mapper.SmsParamMapper; |
| | | import com.smartor.service.ISmsParamService; |
| | | import com.ruoyi.system.domain.SmsParam; |
| | | import com.ruoyi.system.mapper.SmsParamMapper; |
| | | import com.ruoyi.system.service.ISmsParamService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import java.io.IOException; |
| | | import java.sql.Date; |
| | | import java.time.LocalDate; |
| | | import java.util.Arrays; |
| | | import java.util.LinkedHashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.google.gson.Gson; |
| | | import com.ruoyi.common.enums.MsgLSEnum; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.OkHttpExample; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.system.service.ISysConfigService; |
| | | import com.smartor.common.LSHospTokenUtil; |
| | | import com.smartor.domain.ServiceSubtask; |
| | | import com.smartor.mapper.ServiceSubtaskMapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.ruoyi.system.mapper.SmsRecordsMapper; |
| | | import com.ruoyi.system.domain.SmsRecords; |
| | | import com.ruoyi.system.service.ISmsRecordsService; |
| | | |
| | | /** |
| | | * çä¿¡è®°å½Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-06 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class SmsRecordsServiceImpl implements ISmsRecordsService { |
| | | @Autowired |
| | | private SmsRecordsMapper smsRecordsMapper; |
| | | |
| | | @Autowired |
| | | private ISysConfigService iSysConfigService; |
| | | |
| | | @Autowired |
| | | private ServiceSubtaskMapper serviceSubtaskMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢çä¿¡è®°å½ |
| | | * |
| | | * @param recordid çä¿¡è®°å½ä¸»é® |
| | | * @return çä¿¡è®°å½ |
| | | */ |
| | | @Override |
| | | public SmsRecords selectSmsRecordsByRecordid(Long recordid) { |
| | | return smsRecordsMapper.selectSmsRecordsByRecordid(recordid); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢çä¿¡è®°å½å表 |
| | | * |
| | | * @param smsRecords çä¿¡è®°å½ |
| | | * @return çä¿¡è®°å½ |
| | | */ |
| | | @Override |
| | | public List<SmsRecords> selectSmsRecordsList(SmsRecords smsRecords) { |
| | | return smsRecordsMapper.selectSmsRecordsList(smsRecords); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢çä¿¡è®°å½ |
| | | * |
| | | * @param smsRecords çä¿¡è®°å½ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertSmsRecords(SmsRecords smsRecords) { |
| | | smsRecords.setCreateTime(DateUtils.getNowDate()); |
| | | return smsRecordsMapper.insertSmsRecords(smsRecords); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢çä¿¡è®°å½ |
| | | * |
| | | * @param smsRecords çä¿¡è®°å½ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public Boolean sendSmsRecords(SmsRecords smsRecords) { |
| | | //è·åéç¥çä¿¡æå"å 天"åé |
| | | Integer days = 0; |
| | | String noticeSmsBeforeSend = iSysConfigService.selectConfigByKey("notice_sms_before_send"); |
| | | //è·åå»é¢æºæID |
| | | String hospOrgid = iSysConfigService.selectConfigByKey("hosp_orgid"); |
| | | if (StringUtils.isNotEmpty(noticeSmsBeforeSend)) days = Integer.valueOf(noticeSmsBeforeSend); |
| | | |
| | | //éè¿å½åæ¥æï¼å 䏿åç天æ°ï¼è·åè¦ |
| | | LocalDate newDate = LocalDate.now().plusDays(days); |
| | | Date date = Date.valueOf(newDate); |
| | | smsRecords.setVisitTime(date); |
| | | |
| | | List<String> orgidList = null; |
| | | if (StringUtils.isNotEmpty(hospOrgid)) { |
| | | orgidList = Arrays.asList(hospOrgid.split(",")); |
| | | smsRecords.setOrgidList(orgidList); |
| | | } |
| | | List<SmsRecords> selectSmsRecordsList = smsRecordsMapper.selectSmsRecordsList(smsRecords); |
| | | for (SmsRecords record : selectSmsRecordsList) { |
| | | Boolean aBoolean = sendSMS(record.getOrgid(), record.getPhone(), record.getMsg()); |
| | | ServiceSubtask serviceSubtask = new ServiceSubtask(); |
| | | serviceSubtask.setId(record.getSubId()); |
| | | if (aBoolean) serviceSubtask.setVisitNotice(1); |
| | | serviceSubtaskMapper.updateServiceSubtask(serviceSubtask); |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | public Boolean sendSMS(String orgid, String phone, String content) { |
| | | //丽水ççä¿¡åéæ¹å¼ |
| | | Boolean isSuccess = false; |
| | | try { |
| | | Map<String, String> map = MsgLSEnum.getAddressByCode(orgid); |
| | | String token = LSHospTokenUtil.getToken(orgid); |
| | | log.info("ãsfHandlleã丽水çä¿¡åéï¼å°åï¼{}ï¼åæ°ï¼{}ï¼æºæIDï¼{}", map.get("address"), orgid); |
| | | String dxCode = getDXCode(map.get("address"), phone, content, map.get("sendPersonId"), map.get("sendPersonName"), MsgLSEnum.getHeaderByCode(orgid), token); |
| | | log.info("ãsfHandlleã丽水çä¿¡åéç»æï¼{}", dxCode); |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | Map<String, Object> textParam = null; |
| | | textParam = objectMapper.readValue(dxCode, Map.class); |
| | | String code = textParam.get("Code").toString(); |
| | | if (code.equals("0")) { |
| | | isSuccess = true; |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return isSuccess; |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹çä¿¡è®°å½ |
| | | * |
| | | * @param smsRecords çä¿¡è®°å½ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateSmsRecords(SmsRecords smsRecords) { |
| | | smsRecords.setUpdateTime(DateUtils.getNowDate()); |
| | | return smsRecordsMapper.updateSmsRecords(smsRecords); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤çä¿¡è®°å½ |
| | | * |
| | | * @param recordids éè¦å é¤ççä¿¡è®°å½ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteSmsRecordsByRecordids(Long[] recordids) { |
| | | return smsRecordsMapper.deleteSmsRecordsByRecordids(recordids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤çä¿¡è®°å½ä¿¡æ¯ |
| | | * |
| | | * @param recordid çä¿¡è®°å½ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteSmsRecordsByRecordid(Long recordid) { |
| | | return smsRecordsMapper.deleteSmsRecordsByRecordid(recordid); |
| | | } |
| | | |
| | | |
| | | private String getDXCode(String address, String ShouJiHM, String FaSongNR, String FaSongRID, String FaSongRXM, Map<String, Object> headerMap, String token) { |
| | | Map<String, Object> map = new LinkedHashMap<>(); |
| | | |
| | | Map<String, Object> YeWuXX = new LinkedHashMap<>(); |
| | | Map<String, Object> DuanXinXX = new LinkedHashMap<>(); |
| | | DuanXinXX.put("ShouJiHM", ShouJiHM); |
| | | DuanXinXX.put("FaSongNR", FaSongNR); |
| | | DuanXinXX.put("FaSongRID", FaSongRID); |
| | | DuanXinXX.put("FaSongRXM", FaSongRXM); |
| | | YeWuXX.put("DuanXinXX", DuanXinXX); |
| | | |
| | | map.put("XiaoXiTou", headerMap); |
| | | map.put("YeWuXX", YeWuXX); |
| | | |
| | | String body = new Gson().toJson(map); |
| | | |
| | | // String result = HttpUtils.sendPost(address, body); |
| | | String result = null; |
| | | try { |
| | | result = OkHttpExample.sendPostRequest(address, body, token); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | log.info("ãgetDXCodeãçä¿¡åéç»æï¼{}", result); |
| | | |
| | | JSONObject jsonObject = JSONObject.parseObject(result); |
| | | String code = (String) jsonObject.toString(); |
| | | return code; |
| | | } |
| | | } |
ÎļþÃû´Ó smartor/src/main/java/com/smartor/service/impl/SmsTempletServiceImpl.java ÐÞ¸Ä |
| | |
| | | package com.smartor.service.impl; |
| | | package com.ruoyi.system.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.SmsTempletMapper; |
| | | import com.smartor.domain.SmsTemplet; |
| | | import com.smartor.service.ISmsTempletService; |
| | | import com.ruoyi.system.mapper.SmsTempletMapper; |
| | | import com.ruoyi.system.domain.SmsTemplet; |
| | | import com.ruoyi.system.service.ISmsTempletService; |
| | | |
| | | /** |
| | | * ç信模æ¿Serviceä¸å¡å±å¤ç |
| | | * |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-06 |
| | | */ |
| | | @Service |
| | | public class SmsTempletServiceImpl implements ISmsTempletService |
| | | public class SmsTempletServiceImpl implements ISmsTempletService |
| | | { |
| | | @Autowired |
| | | private SmsTempletMapper smsTempletMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢çä¿¡æ¨¡æ¿ |
| | | * |
| | | * |
| | | * @param templetid ç信模æ¿ä¸»é® |
| | | * @return çä¿¡æ¨¡æ¿ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¥è¯¢ç信模æ¿å表 |
| | | * |
| | | * |
| | | * @param smsTemplet çä¿¡æ¨¡æ¿ |
| | | * @return çä¿¡æ¨¡æ¿ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ°å¢çä¿¡æ¨¡æ¿ |
| | | * |
| | | * |
| | | * @param smsTemplet çä¿¡æ¨¡æ¿ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¿®æ¹çä¿¡æ¨¡æ¿ |
| | | * |
| | | * |
| | | * @param smsTemplet çä¿¡æ¨¡æ¿ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éå é¤çä¿¡æ¨¡æ¿ |
| | | * |
| | | * |
| | | * @param templetids éè¦å é¤çç信模æ¿ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * å é¤ç信模æ¿ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param templetid ç信模æ¿ä¸»é® |
| | | * @return ç»æ |
| | | */ |
ÎļþÃû´Ó smartor/src/main/resources/mapper/smartor/SmsParamMapper.xml ÐÞ¸Ä |
| | |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.smartor.mapper.SmsParamMapper"> |
| | | <mapper namespace="com.ruoyi.system.mapper.SmsParamMapper"> |
| | | |
| | | <resultMap type="SmsParam" id="SmsParamResult"> |
| | | <result property="paramid" column="paramid" /> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.ruoyi.system.mapper.SmsRecordsMapper"> |
| | | |
| | | <resultMap type="com.ruoyi.system.domain.SmsRecords" id="SmsRecordsResult"> |
| | | <result property="recordid" column="recordid"/> |
| | | <result property="userid" column="userid"/> |
| | | <result property="username" column="username"/> |
| | | <result property="phone" column="phone"/> |
| | | <result property="msgno" column="msgno"/> |
| | | <result property="msg" column="msg"/> |
| | | <result property="inserttime" column="inserttime"/> |
| | | <result property="sendtime" column="sendtime"/> |
| | | <result property="sendfailedcount" column="sendfailedcount"/> |
| | | <result property="resulttime" column="resulttime"/> |
| | | <result property="resultmsg" column="resultmsg"/> |
| | | <result property="sendstate" column="sendstate"/> |
| | | <result property="inserttype" column="inserttype"/> |
| | | <result property="insertsystem" column="insertsystem"/> |
| | | <result property="insertmodule" column="insertmodule"/> |
| | | <result property="moduleid" column="moduleid"/> |
| | | <result property="msgidentify" column="msgidentify"/> |
| | | <result property="accountid" column="accountid"/> |
| | | <result property="orgid" column="orgid"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="isupload" column="isupload"/> |
| | | <result property="uploadTime" column="upload_time"/> |
| | | <result property="guid" column="guid"/> |
| | | <result property="visitTime" column="visit_time"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectSmsRecordsVo"> |
| | | select recordid, |
| | | userid, |
| | | guid, |
| | | username, |
| | | phone, |
| | | msgno, |
| | | msg, |
| | | inserttime, |
| | | sendtime, |
| | | sendfailedcount, |
| | | resulttime, |
| | | resultmsg, |
| | | sendstate, |
| | | inserttype, |
| | | insertsystem, |
| | | insertmodule, |
| | | moduleid, |
| | | msgidentify, |
| | | accountid, |
| | | orgid, |
| | | del_flag, |
| | | update_by, |
| | | update_time, |
| | | create_by, |
| | | create_time, |
| | | isupload, |
| | | visit_time, |
| | | upload_time |
| | | from sms_records |
| | | </sql> |
| | | |
| | | <select id="selectSmsRecordsList" parameterType="com.ruoyi.system.domain.SmsRecords" resultMap="SmsRecordsResult"> |
| | | <include refid="selectSmsRecordsVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | <if test="userid != null and userid != ''">and userid = #{userid}</if> |
| | | <if test="username != null and username != ''">and username like concat('%', #{username}, '%')</if> |
| | | <if test="phone != null and phone != ''">and phone = #{phone}</if> |
| | | <if test="msgno != null and msgno != ''">and msgno = #{msgno}</if> |
| | | <if test="msg != null and msg != ''">and msg = #{msg}</if> |
| | | <if test="inserttime != null ">and inserttime = #{inserttime}</if> |
| | | <if test="sendtime != null ">and sendtime = #{sendtime}</if> |
| | | <if test="sendfailedcount != null ">and sendfailedcount = #{sendfailedcount}</if> |
| | | <if test="resulttime != null ">and resulttime = #{resulttime}</if> |
| | | <if test="resultmsg != null and resultmsg != ''">and resultmsg = #{resultmsg}</if> |
| | | <if test="sendstate != null ">and sendstate = #{sendstate}</if> |
| | | <if test="inserttype != null ">and inserttype = #{inserttype}</if> |
| | | <if test="insertsystem != null ">and insertsystem = #{insertsystem}</if> |
| | | <if test="insertmodule != null and insertmodule != ''">and insertmodule = #{insertmodule}</if> |
| | | <if test="moduleid != null and moduleid != ''">and moduleid = #{moduleid}</if> |
| | | <if test="msgidentify != null and msgidentify != ''">and msgidentify = #{msgidentify}</if> |
| | | <if test="accountid != null ">and accountid = #{accountid}</if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="isupload != null ">and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> |
| | | <if test="visitTime != null ">and date_format(visit_time,'%y%m%d') = |
| | | date_format(#{visitTime},'%y%m%d') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSmsRecordsByRecordid" parameterType="Long" resultMap="SmsRecordsResult"> |
| | | <include refid="selectSmsRecordsVo"/> |
| | | where del_flag=0 and recordid = #{recordid} |
| | | </select> |
| | | |
| | | <insert id="insertSmsRecords" parameterType="com.ruoyi.system.domain.SmsRecords"> |
| | | insert into sms_records |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="recordid != null">recordid,</if> |
| | | <if test="userid != null">userid,</if> |
| | | <if test="username != null">username,</if> |
| | | <if test="phone != null">phone,</if> |
| | | <if test="msgno != null">msgno,</if> |
| | | <if test="msg != null">msg,</if> |
| | | <if test="inserttime != null">inserttime,</if> |
| | | <if test="sendtime != null">sendtime,</if> |
| | | <if test="sendfailedcount != null">sendfailedcount,</if> |
| | | <if test="resulttime != null">resulttime,</if> |
| | | <if test="resultmsg != null">resultmsg,</if> |
| | | <if test="sendstate != null">sendstate,</if> |
| | | <if test="inserttype != null">inserttype,</if> |
| | | <if test="insertsystem != null">insertsystem,</if> |
| | | <if test="insertmodule != null">insertmodule,</if> |
| | | <if test="moduleid != null">moduleid,</if> |
| | | <if test="msgidentify != null">msgidentify,</if> |
| | | <if test="accountid != null">accountid,</if> |
| | | <if test="orgid != null">orgid,</if> |
| | | <if test="delFlag != null">del_flag,</if> |
| | | <if test="updateBy != null">update_by,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="createBy != null">create_by,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="isupload != null">isupload,</if> |
| | | <if test="uploadTime != null">upload_time,</if> |
| | | <if test="guid != null">guid,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="recordid != null">#{recordid},</if> |
| | | <if test="userid != null">#{userid},</if> |
| | | <if test="username != null">#{username},</if> |
| | | <if test="phone != null">#{phone},</if> |
| | | <if test="msgno != null">#{msgno},</if> |
| | | <if test="msg != null">#{msg},</if> |
| | | <if test="inserttime != null">#{inserttime},</if> |
| | | <if test="sendtime != null">#{sendtime},</if> |
| | | <if test="sendfailedcount != null">#{sendfailedcount},</if> |
| | | <if test="resulttime != null">#{resulttime},</if> |
| | | <if test="resultmsg != null">#{resultmsg},</if> |
| | | <if test="sendstate != null">#{sendstate},</if> |
| | | <if test="inserttype != null">#{inserttype},</if> |
| | | <if test="insertsystem != null">#{insertsystem},</if> |
| | | <if test="insertmodule != null">#{insertmodule},</if> |
| | | <if test="moduleid != null">#{moduleid},</if> |
| | | <if test="msgidentify != null">#{msgidentify},</if> |
| | | <if test="accountid != null">#{accountid},</if> |
| | | <if test="orgid != null">#{orgid},</if> |
| | | <if test="delFlag != null">#{delFlag},</if> |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="createBy != null">#{createBy},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="isupload != null">#{isupload},</if> |
| | | <if test="uploadTime != null">#{uploadTime},</if> |
| | | <if test="guid != null">#{guid},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateSmsRecords" parameterType="com.ruoyi.system.domain.SmsRecords"> |
| | | update sms_records |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="userid != null">userid = #{userid},</if> |
| | | <if test="username != null">username = #{username},</if> |
| | | <if test="phone != null">phone = #{phone},</if> |
| | | <if test="msgno != null">msgno = #{msgno},</if> |
| | | <if test="msg != null">msg = #{msg},</if> |
| | | <if test="inserttime != null">inserttime = #{inserttime},</if> |
| | | <if test="sendtime != null">sendtime = #{sendtime},</if> |
| | | <if test="sendfailedcount != null">sendfailedcount = #{sendfailedcount},</if> |
| | | <if test="resulttime != null">resulttime = #{resulttime},</if> |
| | | <if test="resultmsg != null">resultmsg = #{resultmsg},</if> |
| | | <if test="sendstate != null">sendstate = #{sendstate},</if> |
| | | <if test="inserttype != null">inserttype = #{inserttype},</if> |
| | | <if test="insertsystem != null">insertsystem = #{insertsystem},</if> |
| | | <if test="insertmodule != null">insertmodule = #{insertmodule},</if> |
| | | <if test="moduleid != null">moduleid = #{moduleid},</if> |
| | | <if test="msgidentify != null">msgidentify = #{msgidentify},</if> |
| | | <if test="accountid != null">accountid = #{accountid},</if> |
| | | <if test="orgid != null">orgid = #{orgid},</if> |
| | | <if test="delFlag != null">del_flag = #{delFlag},</if> |
| | | <if test="updateBy != null">update_by = #{updateBy},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="createBy != null">create_by = #{createBy},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="isupload != null">isupload = #{isupload},</if> |
| | | <if test="uploadTime != null">upload_time = #{uploadTime},</if> |
| | | <if test="guid != null">guid = #{guid},</if> |
| | | </trim> |
| | | where recordid = #{recordid} |
| | | </update> |
| | | |
| | | <delete id="deleteSmsRecordsByRecordid" parameterType="Long"> |
| | | delete |
| | | from sms_records |
| | | where recordid = #{recordid} |
| | | </delete> |
| | | |
| | | <delete id="deleteSmsRecordsByRecordids" parameterType="String"> |
| | | delete from sms_records where recordid in |
| | | <foreach item="recordid" collection="array" open="(" separator="," close=")"> |
| | | #{recordid} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
ÎļþÃû´Ó smartor/src/main/resources/mapper/smartor/SmsTempletMapper.xml ÐÞ¸Ä |
| | |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.smartor.mapper.SmsTempletMapper"> |
| | | <mapper namespace="com.ruoyi.system.mapper.SmsTempletMapper"> |
| | | |
| | | <resultMap type="SmsTemplet" id="SmsTempletResult"> |
| | | <result property="templetid" column="templetid" /> |
| | |
| | | * åºå· |
| | | */ |
| | | @ApiModelProperty(value = "åºå·") |
| | | private Integer sort; |
| | | private Long sort; |
| | | |
| | | |
| | | /** |
| | |
| | | * åºå· |
| | | */ |
| | | @ApiModelProperty(value = "åºå·") |
| | | private Integer sort; |
| | | private Long sort; |
| | | |
| | | // /** |
| | | // * åºç¡ææ ç±»å |
| | |
| | | */ |
| | | @ApiModelProperty("pageSize") |
| | | private Integer pageSize; |
| | | |
| | | /** |
| | | * pageNum |
| | | */ |
| | | @ApiModelProperty("pn") |
| | | private Integer pn; |
| | | |
| | | /** |
| | | * pageSize |
| | | */ |
| | | @ApiModelProperty("ps") |
| | | private Integer ps; |
| | | /** |
| | | * åºé¢æ¹å¼åºå· |
| | | */ |
| | |
| | | * $column.columnComment |
| | | */ |
| | | @ApiModelProperty("æ£è
å§å") |
| | | @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") |
| | | @Excel(name = "æ£è
å§å") |
| | | private String patName; |
| | | |
| | | /** |
| | | * $column.columnComment |
| | | */ |
| | | @ApiModelProperty("æ£è
ç¼ç ") |
| | | @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") |
| | | @Excel(name = "æ£è
ç¼ç ") |
| | | private String patCode; |
| | | |
| | | /** |
| | | * $column.columnComment |
| | | */ |
| | | @ApiModelProperty("ææºå·") |
| | | @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") |
| | | @Excel(name = "ææºå·") |
| | | private String phone; |
| | | |
| | | /** |
| | | * $column.columnComment |
| | | */ |
| | | @ApiModelProperty("ç
åºåç§°") |
| | | @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") |
| | | @Excel(name = "ç
åºåç§°") |
| | | private String hospitaldistrictname; |
| | | |
| | | /** |
| | | * $column.columnComment |
| | | */ |
| | | @ApiModelProperty("ç
åºç¼ç ") |
| | | @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") |
| | | @Excel(name = "ç
åºç¼ç ") |
| | | private String hospitaldistrictcode; |
| | | |
| | | /** |
| | | * $column.columnComment |
| | | */ |
| | | @ApiModelProperty("é¨é¨åç§°") |
| | | @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") |
| | | @Excel(name = "é¨é¨åç§°") |
| | | private String deptname; |
| | | |
| | | /** |
| | | * é¨é¨ç¼ç |
| | | */ |
| | | @ApiModelProperty("é¨é¨ç¼ç ") |
| | | @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") |
| | | @Excel(name = "é¨é¨ç¼ç ") |
| | | private String deptcode; |
| | | |
| | | /** |
| | |
| | | * $column.columnComment |
| | | */ |
| | | @ApiModelProperty("æ¤å£«æ»¡æåº¦") |
| | | @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") |
| | | @Excel(name = "æ¤å£«æ»¡æåº¦") |
| | | private double nurseSatisfaction; |
| | | |
| | | @ApiModelProperty("æ»å") |
| | | @Excel(name = "æ»å") |
| | | private double total; |
| | | |
| | | /** |
| | |
| | | * åºé¢æ¶é´ |
| | | */ |
| | | @ApiModelProperty(value = "åºé¢æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date endtime; |
| | | |
| | | /** |
| | | * å
¥é¢æ¶é´ |
| | | */ |
| | | @ApiModelProperty(value = "å
¥é¢æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date starttime; |
| | | |
| | | /** |
| | |
| | | private Integer visitCount; |
| | | |
| | | /** |
| | | * å¤è¯éç¥ï¼0å·²éç¥ 1æªéç¥ |
| | | */ |
| | | @ApiModelProperty(value = "å¤è¯éç¥ï¼0å·²éç¥ 1æªéç¥") |
| | | private Integer visitNotice; |
| | | |
| | | /** |
| | | * æ¯å¦å¨æ¬¡é访ï¼1å¦ 2æ¯ |
| | | */ |
| | | @ApiModelProperty(value = "æ¯å¦å¨æ¬¡é访ï¼1æ¯ 2å¦") |
| | |
| | | private Integer upid; |
| | | |
| | | @ApiModelProperty(value = "é访æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date visitTime; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @ApiModelProperty(value = "é访æ¹å¼") |
| | | private String visitType; |
| | | |
| | | |
| | | |
| | | @ApiModelProperty(value = "é访é¨é¨ç¼ç ") |
| | |
| | | |
| | | @ApiModelProperty(value = "é访é¨é¨ç¼ç éå") |
| | | private List<String> visitDeptCodes; |
| | | |
| | | /** |
| | | * pageNum |
| | | */ |
| | | @Excel(name = "pn") |
| | | @ApiModelProperty(value = "pn") |
| | | private Integer pn; |
| | | |
| | | /** |
| | | * pageSize |
| | | */ |
| | | @Excel(name = "ps") |
| | | @ApiModelProperty(value = "ps") |
| | | private Integer ps; |
| | | } |
| | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "æå¡æ»é") |
| | | @Excel(name = " æå¡æ»é ") |
| | | private Integer serviceCount = 0; |
| | | |
| | | @ApiModelProperty(value = "æ£è
è¿æ»¤éï¼ä¸æ§è¡æ°éï¼") |
| | | @Excel(name = " æ£è
è¿æ»¤é ") |
| | | private Long bzxCount = 0L; |
| | | |
| | | @ApiModelProperty(value = "åºé访é") |
| | | @Excel(name = " åºé访é ") |
| | | private Long ysfCount = 0L; |
| | | |
| | | @ApiModelProperty(value = "åé失败访é") |
| | | @Excel(name = " åé失败 ") |
| | | private Long fssbCount = 0L; |
| | | |
| | | @ApiModelProperty(value = "å¾
åéæ°é") |
| | | @Excel(name = " å¾
åé ") |
| | | private Long dfsCount = 0L; |
| | | |
| | | @ApiModelProperty(value = "å·²åéæ°é") |
| | | @Excel(name = " å·²åé ") |
| | | private Long yfsCount = 0L; |
| | | |
| | | |
| | | @ApiModelProperty(value = "已宿æ°é") |
| | | @Excel(name = " 已宿 ") |
| | | private Long ywcCount = 0L; |
| | | |
| | | @ApiModelProperty(value = "éè®¿å®æç") |
| | | @Excel(name = " éè®¿å®æç ") |
| | | private String sfwcl; |
| | | |
| | | @ApiModelProperty(value = "çä¿¡å鿬¡æ°") |
| | |
| | | private Long dhsfwcl = 0L; |
| | | |
| | | @ApiModelProperty(value = "å¼å¸¸æ»æ°") |
| | | @Excel(name = " å¼å¸¸æ»æ° ") |
| | | private Long yczs = 0L; |
| | | |
| | | @ApiModelProperty(value = "åå¤å¼å¸¸æ°") |
| | | @Excel(name = " åå¤å¼å¸¸æ° ") |
| | | private Long hfycs = 0L; |
| | | |
| | | @ApiModelProperty(value = "åæ¶ç") |
| | | @Excel(name = " åæ¶ç ") |
| | | private Double rate = 0.0; |
| | | |
| | | /** |
| | | * 06-04æ°ç»è®¡é¡µé¢å段 |
| | | * 06-04æ°ç»è®¡é¡µé¢å段 |
| | | */ |
| | | |
| | | @ApiModelProperty(value = "åºé¢ç
åºç¼å·") |
| | |
| | | private Long followUpNeeded = 0L; |
| | | |
| | | @ApiModelProperty(value = "馿¬¡åºé访") |
| | | @Excel(name = " 馿¬¡åºé访 ") |
| | | private Long needFollowUp = 0L; |
| | | |
| | | @ApiModelProperty(value = "馿¬¡å¾
é访") |
| | | @Excel(name = " 馿¬¡å¾
é访 ") |
| | | private Long pendingFollowUp = 0L; |
| | | |
| | | @ApiModelProperty(value = "馿¬¡é访æå") |
| | | @Excel(name = " 馿¬¡é访æå ") |
| | | private Long followUpSuccess = 0L; |
| | | |
| | | @ApiModelProperty(value = "馿¬¡é访失败") |
| | | @Excel(name = " 馿¬¡é访失败 ") |
| | | private Long followUpFail = 0L; |
| | | |
| | | @ApiModelProperty(value = "馿¬¡é访ç") |
| | | @Excel(name = " 馿¬¡é访ç ") |
| | | private String followUpRate; |
| | | |
| | | @ApiModelProperty(value = "馿¬¡äººå·¥") |
| | | @Excel(name = " 馿¬¡äººå·¥ ") |
| | | private Long manual = 0L; |
| | | |
| | | @ApiModelProperty(value = "馿¬¡çä¿¡") |
| | | @Excel(name = " 馿¬¡çä¿¡ ") |
| | | private Long sms = 0L; |
| | | |
| | | @ApiModelProperty(value = "馿¬¡å¾®ä¿¡") |
| | | @Excel(name = " 馿¬¡å¾®ä¿¡ ") |
| | | private Long weChat = 0L; |
| | | |
| | | @ApiModelProperty(value = "ç»æå¼å¸¸") |
| | | private Long abnormal = 0L; |
| | | |
| | | @ApiModelProperty(value = "äºæ¬¡åºé访") |
| | | @Excel(name = " äºæ¬¡åºé访 ") |
| | | private Long needFollowUpAgain = 0L; |
| | | |
| | | @ApiModelProperty(value = "äºæ¬¡å¾
é访") |
| | | @Excel(name = " äºæ¬¡å¾
é访 ") |
| | | private Long pendingFollowUpAgain = 0L; |
| | | |
| | | @ApiModelProperty(value = "äºæ¬¡é访æå") |
| | | @Excel(name = " äºæ¬¡é访æå ") |
| | | private Long followUpSuccessAgain = 0L; |
| | | |
| | | @ApiModelProperty(value = "äºæ¬¡é访失败") |
| | | @Excel(name = " äºæ¬¡é访失败 ") |
| | | private Long followUpFailAgain = 0L; |
| | | |
| | | @ApiModelProperty(value = "äºæ¬¡é访ç") |
| | | @Excel(name = " äºæ¬¡é访ç ") |
| | | private String followUpRateAgain; |
| | | |
| | | @ApiModelProperty(value = "äºæ¬¡äººå·¥") |
| | | @Excel(name = " äºæ¬¡äººå·¥ ") |
| | | private Long manualAgain = 0L; |
| | | |
| | | @ApiModelProperty(value = "äºæ¬¡çä¿¡") |
| | | @Excel(name = " äºæ¬¡çä¿¡ ") |
| | | private Long smsAgain = 0L; |
| | | |
| | | @ApiModelProperty(value = "äºæ¬¡å¾®ä¿¡") |
| | | @Excel(name = " äºæ¬¡å¾®ä¿¡ ") |
| | | private Long weChatAgain = 0L; |
| | | |
| | | @ApiModelProperty(value = "ç»æå¼å¸¸") |
| | | private Long abnormalAgain = 0L; |
| | | |
| | |
| | | private Integer visitCount; |
| | | |
| | | /** |
| | | * å¤è¯éç¥ï¼0å·²éç¥ 1æªéç¥ |
| | | */ |
| | | @ApiModelProperty(value = "å¤è¯éç¥ï¼0å·²éç¥ 1æªéç¥") |
| | | private Integer visitNotice; |
| | | |
| | | /** |
| | | * æ¯å¦å¨æ¬¡é访ï¼1å¦ 2æ¯ |
| | | */ |
| | | @ApiModelProperty(value = "æ¯å¦å¨æ¬¡é访ï¼1æ¯ 2å¦") |
| | |
| | | * åºé¢æ¶é´ |
| | | */ |
| | | @ApiModelProperty(value = "åºé¢æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date endtime; |
| | | |
| | | /** |
| | | * å
¥é¢æ¶é´ |
| | | */ |
| | | @ApiModelProperty(value = "å
¥é¢æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date starttime; |
| | | |
| | | |
| | |
| | | */ |
| | | @ApiModelProperty(value = "é访æ¹å¼") |
| | | private String visitType; |
| | | |
| | | |
| | | @ApiModelProperty(value = "é访é¨é¨ç¼ç ") |
| | | private String visitDeptCode; |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.mapper; |
| | | |
| | | import com.ruoyi.common.annotation.DataSource; |
| | | import com.ruoyi.common.core.domain.entity.SysDept; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.enums.DataSourceType; |
| | | import com.smartor.domain.*; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æ²³åé鿣è
ä¿¡æ¯Mapperæ¥å£ |
| | | * |
| | | * @author smartor |
| | | * @date 2025-07-09 |
| | | */ |
| | | @DataSource(value = DataSourceType.SLAVE) |
| | | @Mapper |
| | | public interface HNGatherPatArchiveMapper { |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£è
æ¡£æ¡å表 |
| | | * |
| | | * @param patArchive æ£è
æ¡£æ¡ |
| | | * @return æ£è
æ¡£æ¡éå |
| | | */ |
| | | public List<PatArchive> selectPatArchiveList(PatArchive patArchive); |
| | | |
| | | /** |
| | | * åºå
¥é¢ä¿¡æ¯ |
| | | * |
| | | * @param patMedInhosp |
| | | * @return |
| | | */ |
| | | public List<PatMedInhosp> selectPatMedInhospList(PatMedInhosp patMedInhosp); |
| | | |
| | | public Long selectPatMedInhospListCount(PatMedInhosp patMedInhosp); |
| | | |
| | | /** |
| | | * 鍿¥è¯ä¿¡æ¯ |
| | | * |
| | | * @param patMedOuthosp |
| | | * @return |
| | | */ |
| | | public List<PatMedOuthosp> selectPatMedOuthospList(PatMedOuthosp patMedOuthosp); |
| | | |
| | | |
| | | /** |
| | | * /** |
| | | * æ¥è¯¢ç¾ç
å表 |
| | | * |
| | | * @param icd10 ç¾ç
|
| | | * @return ç¾ç
éå |
| | | */ |
| | | public List<Icd10> selectIcd10List(Icd10 icd10); |
| | | |
| | | /** |
| | | * æ ¹æ®æ¡ä»¶å页æ¥è¯¢ç¨æ·å表 |
| | | * |
| | | * @param sysUser ç¨æ·ä¿¡æ¯ |
| | | * @return ç¨æ·ä¿¡æ¯éåä¿¡æ¯ |
| | | */ |
| | | public List<SysUser> selectUserList(SysUser sysUser); |
| | | |
| | | /** |
| | | * æ¥è¯¢é¨é¨ç®¡çæ°æ® |
| | | * |
| | | * @param dept é¨é¨ä¿¡æ¯ |
| | | * @return é¨é¨ä¿¡æ¯éå |
| | | */ |
| | | public List<SysDept> selectDeptList(SysDept dept); |
| | | |
| | | |
| | | } |
| | |
| | | import com.smartor.domain.PatMedReq; |
| | | import com.smartor.domain.PatMedRes; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * æ£è
ä½é¢è®°å½Mapperæ¥å£ |
| | |
| | | */ |
| | | public int insertPatMedInhosp(PatMedInhosp patMedInhosp); |
| | | |
| | | public int insertPatMedInhospBatch(@Param("list") List<PatMedInhosp> list); |
| | | |
| | | /** |
| | | * ä¿®æ¹æ£è
ä½é¢è®°å½ |
| | | * |
| | |
| | | public int insertServiceSubtask(ServiceSubtask ServiceSubtask); |
| | | |
| | | /** |
| | | * éè®¿åæ¶çï¼åºé访æ¶é´<å®é
é访æ¶é´ |
| | | * |
| | | * @param ServiceSubtask |
| | | * @return |
| | | */ |
| | | public Double selectTimelyRate(ServiceSubtask ServiceSubtask); |
| | | |
| | | /** |
| | | * éè®¿åæ¶ç详æ
|
| | | * |
| | | * @param ServiceSubtask |
| | | * @return |
| | | */ |
| | | public List<ServiceSubtask> selectTimelyRateDetail(ServiceSubtask ServiceSubtask); |
| | | |
| | | /** |
| | | * ä¿®æ¹åä¸ä»»å¡ï¼éè®¿ï¼ |
| | | * |
| | | * @return ç»æ |
| | | */ |
| | | public Boolean updateServiceSubtask(ServiceSubtask ServiceSubtask); |
| | | |
| | | public Boolean updateServiceSubtaskByPatId(ServiceSubtask ServiceSubtask); |
| | | |
| | | public Boolean updateServiceSubtaskByCondition(ServiceSubtask ServiceSubtask); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.service; |
| | | |
| | | import com.ruoyi.common.core.domain.entity.SysDept; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.smartor.domain.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æ²³åé鿣è
ä¿¡æ¯æ¥å£ |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-04 |
| | | */ |
| | | public interface IHNGatherPatArchiveService { |
| | | |
| | | /** |
| | | * æ¥è¯¢æ£è
æ¡£æ¡å表 |
| | | * |
| | | * @param patArchive æ£è
æ¡£æ¡ |
| | | * @return æ£è
æ¡£æ¡éå |
| | | */ |
| | | public List<PatArchive> selectPatArchiveList(PatArchive patArchive); |
| | | |
| | | /** |
| | | * åºå
¥é¢ä¿¡æ¯ |
| | | * |
| | | * @param patMedInhosp |
| | | * @return |
| | | */ |
| | | public Integer selectPatMedInhospList(PatMedInhosp patMedInhosp); |
| | | |
| | | /** |
| | | * 鍿¥è¯ä¿¡æ¯ |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public Integer selectPatMedOuthospList(PatMedOuthosp patMedOuthosp); |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢ç¾ç
å表 |
| | | * |
| | | * @param icd10 ç¾ç
|
| | | * @return ç¾ç
éå |
| | | */ |
| | | public Integer selectIcd10List(Icd10 icd10); |
| | | |
| | | /** |
| | | * æ ¹æ®æ¡ä»¶å页æ¥è¯¢ç¨æ·å表 |
| | | * |
| | | * @param sysUser ç¨æ·ä¿¡æ¯ |
| | | * @return ç¨æ·ä¿¡æ¯éåä¿¡æ¯ |
| | | */ |
| | | public Integer selectUserList(SysUser sysUser); |
| | | |
| | | /** |
| | | * æ¥è¯¢é¨é¨ç®¡çæ°æ® |
| | | * |
| | | * @param dept é¨é¨ä¿¡æ¯ |
| | | * @return é¨é¨ä¿¡æ¯éå |
| | | */ |
| | | public Integer selectDeptList(SysDept dept); |
| | | |
| | | } |
| | |
| | | import java.util.Map; |
| | | |
| | | import com.smartor.domain.IvrLibaTemplateScriptVO; |
| | | import com.smartor.domain.ServiceSubtask; |
| | | import com.smartor.domain.ServiceTask; |
| | | import com.smartor.domain.SvyLibTemplateScriptVO; |
| | | |
| | |
| | | public Boolean deleteServiceTaskByTaskid(Long taskid); |
| | | |
| | | /** |
| | | * è·åéè®¿åæ¶ç |
| | | */ |
| | | public Map<String, Object> selectTimelyRate(ServiceSubtask serviceSubtask); |
| | | |
| | | /** |
| | | * @param taskid |
| | | * @param patid |
| | | * @return |
| | |
| | | import com.smartor.domain.*; |
| | | import com.smartor.mapper.ServiceSubtaskMapper; |
| | | import com.smartor.service.CommonTaskService; |
| | | import com.smartor.service.IServiceSubtaskService; |
| | | import com.smartor.service.IServiceTaskService; |
| | | import com.smartor.service.ISvyTaskService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.concurrent.TimeUnit; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.service.impl; |
| | | |
| | | import com.ruoyi.common.core.domain.entity.SysDept; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.DtoConversionUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.mapper.*; |
| | | import com.smartor.service.IHNGatherPatArchiveService; |
| | | import com.smartor.service.IPatArchiveService; |
| | | import com.smartor.service.IPatMedInhospService; |
| | | import com.smartor.service.IPatMedPhysicalService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.apache.poi.hssf.usermodel.HSSFDateUtil; |
| | | import org.apache.poi.ss.usermodel.DataFormatter; |
| | | import org.apache.poi.ss.usermodel.Row; |
| | | import org.apache.poi.ss.usermodel.Sheet; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.apache.poi.xssf.usermodel.XSSFWorkbook; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.FileOutputStream; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.concurrent.ExecutorService; |
| | | import java.util.concurrent.Executors; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * æ£è
æ¡£æ¡Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-04 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class HNGatherPatArchiveServiceImpl implements IHNGatherPatArchiveService { |
| | | @Autowired |
| | | private HNGatherPatArchiveMapper hnGatherPatArchiveMapper; |
| | | |
| | | @Autowired |
| | | private SysUser2Mapper sysUser2Mapper; |
| | | |
| | | @Autowired |
| | | private SysDept2Mapper sysDept2Mapper; |
| | | |
| | | @Autowired |
| | | private Icd10Mapper icd10Mapper; |
| | | |
| | | @Autowired |
| | | private PatMedOuthospMapper patMedOuthospMapper; |
| | | |
| | | @Autowired |
| | | private PatMedInhospMapper patMedInhospMapper; |
| | | |
| | | |
| | | @Override |
| | | public List<PatArchive> selectPatArchiveList(PatArchive patArchive) { |
| | | return hnGatherPatArchiveMapper.selectPatArchiveList(patArchive); |
| | | } |
| | | |
| | | @Override |
| | | public Integer selectPatMedInhospList(PatMedInhosp patMedInhosp) { |
| | | Long count = hnGatherPatArchiveMapper.selectPatMedInhospListCount(null); |
| | | Long aa = (count + 1000 - 1) / 1000; |
| | | //è¿è¡å页æ¥è¯¢ |
| | | for (int i = 0; i <= aa; i++) { |
| | | patMedInhosp.setPs(1000); |
| | | patMedInhosp.setPn(1000 * i); |
| | | List<PatMedInhosp> patMedInhospList = hnGatherPatArchiveMapper.selectPatMedInhospList(patMedInhosp); |
| | | if (patMedInhospList != null && !patMedInhospList.isEmpty()) { |
| | | patMedInhospMapper.insertPatMedInhospBatch(patMedInhospList); |
| | | } |
| | | } |
| | | |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public Integer selectPatMedOuthospList(PatMedOuthosp patMedOuthosp) { |
| | | List<PatMedOuthosp> patMedOuthosps = hnGatherPatArchiveMapper.selectPatMedOuthospList(patMedOuthosp); |
| | | log.info("selectPatMedOuthospListçééå°çæ°é为ï¼{}", patMedOuthosps.size()); |
| | | int i = patMedOuthospMapper.batchPatMedOuthosp(patMedOuthosps); |
| | | |
| | | return i; |
| | | } |
| | | |
| | | @Override |
| | | public Integer selectIcd10List(Icd10 icd10) { |
| | | List<Icd10> icd10s = hnGatherPatArchiveMapper.selectIcd10List(icd10); |
| | | log.info("selectIcd10Listçééå°çæ°é为ï¼{}", icd10s.size()); |
| | | int i = icd10Mapper.batchIcd10(icd10s); |
| | | return i; |
| | | } |
| | | |
| | | @Override |
| | | public Integer selectUserList(SysUser sysUser) { |
| | | List<SysUser> sysUserList = hnGatherPatArchiveMapper.selectUserList(sysUser); |
| | | log.info("sysUserListçééå°çæ°é为ï¼{}", sysUserList.size()); |
| | | int i = sysUser2Mapper.batchUser(sysUserList); |
| | | return i; |
| | | } |
| | | |
| | | @Override |
| | | public Integer selectDeptList(SysDept dept) { |
| | | List<SysDept> sysDepts = hnGatherPatArchiveMapper.selectDeptList(dept); |
| | | log.info("selectDeptListçééå°çæ°é为ï¼{}", sysDepts.size()); |
| | | int i = sysDept2Mapper.batchDept(sysDepts); |
| | | return i; |
| | | } |
| | | } |
| | | |
| | |
| | | @Autowired |
| | | private IvrLibaTemplateScriptMapper ivrLibaTemplateScriptMapper; |
| | | |
| | | @Autowired |
| | | private TemplateDeptMapper tempDetpRelevanceMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢æ¨¡æ¿åº |
| | | * |
| | |
| | | } |
| | | } |
| | | |
| | | //对ç§å®¤è¿è¡å¤ç |
| | | for (TemplateDept tempDetpRelevance : ivrLibaTemplateVO.getTempDetpRelevances()) { |
| | | if (tempDetpRelevance.getId() == null) { |
| | | //æ°å¢ |
| | | tempDetpRelevance.setTempid(ivrLibaTemplate.getId()); |
| | | tempDetpRelevance.setType(2L); |
| | | tempDetpRelevance.setCreateTime(new Date()); |
| | | tempDetpRelevanceMapper.insertTemplateDept(tempDetpRelevance); |
| | | } else { |
| | | tempDetpRelevance.setUpdateTime(new Date()); |
| | | tempDetpRelevanceMapper.updateTemplateDept(tempDetpRelevance); |
| | | } |
| | | } |
| | | |
| | | return i; |
| | | } |
| | | |
| | | private IvrLibaTemplateScript scriptHandle(IvrLibaTemplate ivrLibaTemplate, IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO, Integer isoperation) { |
| | | IvrLibaTemplateScript ivrLibaTemplateScript = DtoConversionUtils.sourceToTarget(ivrLibaTemplateScriptVO, IvrLibaTemplateScript.class); |
| | | ivrLibaTemplateScript.setScriptno(ivrLibaTemplateScript.getSort()); |
| | | if (isoperation == 1) { |
| | | //æ°å¢ |
| | | ivrLibaTemplateScript.setTemplateid(ivrLibaTemplate.getId()); |
| | |
| | | import com.smartor.mapper.IvrTaskTemplateMapper; |
| | | import com.smartor.mapper.IvrTaskTemplateScriptMapper; |
| | | import com.smartor.mapper.IvrTaskTemplateTargetoptionMapper; |
| | | import com.smartor.mapper.TemplateDeptMapper; |
| | | import com.smartor.service.IIvrTaskTemplateService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | |
| | | @Autowired |
| | | private IvrTaskTemplateTargetoptionMapper ivrTaskTemplateTargetoptionMapper; |
| | | |
| | | @Autowired |
| | | private TemplateDeptMapper templateDeptMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢é访任å¡é访模æ¿åº |
| | |
| | | */ |
| | | @Override |
| | | public int deleteIvrTaskTemplateByIDs(Long[] IDs) { |
| | | if (IDs[0] != null) { |
| | | IvrTaskTemplate ivrTaskTemplate = selectIvrTaskTemplateByID(IDs[0]); |
| | | if (StringUtils.isNotEmpty(ivrTaskTemplate.getLongTemp()) && ivrTaskTemplate.getLongTemp().equals("1")) { |
| | | //妿è¿ä¸ªæ¨¡æ¿æ¯é¿æä»»å¡ï¼åéè¦å 餿¨¡æ¿ä¸é¨é¨çå
³è |
| | | TemplateDept templateDept = new TemplateDept(); |
| | | templateDept.setType(21L); |
| | | templateDept.setTempid(IDs[0]); |
| | | templateDeptMapper.deleteTemplateDeptByTemplateId(templateDept); |
| | | } |
| | | } |
| | | return ivrTaskTemplateMapper.deleteIvrTaskTemplateByIDs(IDs); |
| | | } |
| | | |
| | |
| | | //æ°å¢æ£è
åºæ¬ä¿¡æ¯æ°å¢æä¿®æ¹ |
| | | PatArchive patArchive = addPatArchive(externalInHospPatientInfo, externalInHospPatientAddrInfo, externalInHospPatientLiaisonInfo); |
| | | |
| | | |
| | | |
| | | |
| | | PatMedInhosp patMedInhosp = new PatMedInhosp(); |
| | | patMedInhosp.setInhospno(externalInHospPatientInfo.getBingAnHao()); |
| | | patMedInhosp.setSerialnum(externalInHospPatientInfo.getJiuZhenYWID()); |
| | |
| | | |
| | | // 4. æ°å»º(æ¤æ¶åªå©å·è¡¨ï¼PatMedOuthosp没äºï¼éè¦æ°å»ºä¸ä¸ª) |
| | | patMedOuthospMapper.createPatMedOuthosp(newName, oldName); |
| | | //设置æ°è¡¨èªå¢ä¸»é® |
| | | |
| | | //5.设置æ°è¡¨èªå¢ä¸»é® |
| | | patMedOuthospMapper.createPatMedOuthospAutoAdd(oldName); |
| | | // 5. 设置æ°è¡¨èªå¢èµ·å§å¼ |
| | | //6. 设置æ°è¡¨èªå¢èµ·å§å¼ |
| | | patMedOuthospMapper.setAutoIncrement(oldName, maxId + 1); |
| | | |
| | | // 6. æ´æ°/æ°å»ºè§å¾ |
| | | // 7. æ´æ°/æ°å»ºè§å¾ |
| | | // éæ°è·åææè¡¨åï¼å
å«åæ°å»ºçä¸»è¡¨ï¼ |
| | | List<String> allTables = patMedOuthospMapper.getAllOuthospTableNames(); |
| | | StringBuilder sb = new StringBuilder(); |
| | |
| | | } |
| | | } |
| | | } |
| | | Collections.sort(serviceSubtaskDetailSET, Comparator.comparingLong(ServiceSubtaskDetail::getTemplatequestionnum)); |
| | | Collections.sort(serviceSubtaskDetailSET, |
| | | Comparator.comparing(ServiceSubtaskDetail::getTemplatequestionnum, Comparator.nullsLast(Long::compareTo))); |
| | | map1.put("filteredDetails", serviceSubtaskDetailSET); |
| | | |
| | | map1.put("voice", ""); |
| | |
| | | } |
| | | break; |
| | | } |
| | | log.info("æ¯å¦éè¦ææºï¼{}", les); |
| | | if (ObjectUtils.isNotEmpty(les)) { |
| | | //对å¹é
çç»æå¤çä¸ä¸(ççæ¯ä¸æ¯éè¦ææº) |
| | | if (les.getIsEnd() != null && les.getIsEnd() == 1) { |
| | |
| | | if (StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() && StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches() || StringUtils.isEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex()) && StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2()) && matcher2.matches() || StringUtils.isEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex2()) && StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getTargetregex()) && matcher.matches()) { |
| | | //说æå¹é
æ£ç¡®äº |
| | | //è¿éåºè¯¥å
å¤æç±»åï¼å»åä¿®æ¹ï¼è®¾ç½®IsUserOperationæ¯åéé¢çæ¹æ³ |
| | | log.info("å¹é
æ£ç¡®äºå--------------"); |
| | | ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).setIsUserOperation(1); |
| | | serviceTaskScriptTargetoptionMapper.updateIvrTaskTemplateTargetoption(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j)); |
| | | |
| | |
| | | if (script.getSort() == nextQuestion.intValue()) { |
| | | phoneCallBackYQVO.setType("text"); |
| | | phoneCallBackYQVO.setSilent_interval(ivrTaskTemplate.getSilencetime().intValue()); |
| | | String scriptContent = script.getIvrtext(); |
| | | String scriptContent = StringUtils.isNotEmpty(script.getIvrtext()) ? script.getIvrtext() : script.getScriptContent(); |
| | | log.error("ä¸ä¸é¢é®é¢ï¼{}", scriptContent); |
| | | log.error("ä¸ä¸é¢çå任塿¯ï¼{}", serviceSubtask); |
| | | phoneCallBackYQVO.setValue(phoneCallBackYQVO.getCommonValue() + getObject(serviceSubtask, scriptContent)); |
| | | //å°è¯¥æ£è
çRedisä¸çé¢ç®IDï¼è¿è¡ä¿®æ¹ |
| | | redisCache.setCacheObject(phoneCallReqYQVO.getTaskid().trim() + "-" + phoneCallReqYQVO.getPhone().trim(), script.getId().toString(), 120, TimeUnit.MINUTES); |
| | |
| | | |
| | | } |
| | | } else { |
| | | log.info("没æå¹é
ä¸----------------------------"); |
| | | //flag=0,è¯´ææ²¡ å¹é
ä¸ï¼ä¹è¦ææ£è
说çè¯è®°å½ä¸æ¥ |
| | | if (j == ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().size() - 1 && flag == 0) { |
| | | ServiceSubTaskDetailReq serviceSubTaskDetailReq = new ServiceSubTaskDetailReq(); |
| | |
| | | } |
| | | //齿²¡æå¹é
å° |
| | | if (StringUtils.isEmpty(phoneCallBackYQVO.getValue())) { |
| | | log.info("齿²¡æå¹é
å°-------------------------"); |
| | | Integer count = null; |
| | | Object countObj = redisCache.getCacheObject(phoneCallReqYQVO.getTaskid().trim() + "&&" + "mate" + "&&" + phoneCallReqYQVO.getUuid()); |
| | | if (ObjectUtils.isNotEmpty(countObj)) count = (Integer) countObj; |
| | |
| | | //å»redisä¸ï¼æè¯¥åä»»å¡IDå é¤ |
| | | Long id = serviceSubtask.getId(); |
| | | Map<String, String> map = delRedisValue(null, id.toString()); |
| | | redisCache.setCacheObject(map.get("cacheName"), map.get("val")); |
| | | redisCache.deleteObject(serviceSubtask.getId() + "-" + serviceSubtask.getPhone()); |
| | | redisCache.deleteObject(phoneCallReqYQVO.getUuid() + "SCORE"); |
| | | if (ObjectUtils.isNotEmpty(map)) { |
| | | redisCache.setCacheObject(map.get("cacheName"), map.get("val")); |
| | | redisCache.deleteObject(serviceSubtask.getId() + "-" + serviceSubtask.getPhone()); |
| | | redisCache.deleteObject(phoneCallReqYQVO.getUuid() + "SCORE"); |
| | | } |
| | | // return phoneCallBackYQVO; |
| | | } else { |
| | | //æ ¹æ®ivrTaskTemplateScriptVO.getNextScriptno()è·åä¸ä¸é¢è¿è¡æé® |
| | |
| | | if (script.getSort() == ivrTaskTemplateScriptVO.getNextScriptno().intValue()) { |
| | | phoneCallBackYQVO.setType("text"); |
| | | phoneCallBackYQVO.setSilent_interval(ivrTaskTemplate.getSilencetime().intValue()); |
| | | String scriptContent = script.getIvrtext(); |
| | | String scriptContent = StringUtils.isNotEmpty(script.getIvrtext()) ? script.getIvrtext() : script.getScriptContent(); |
| | | phoneCallBackYQVO.setValue(phoneCallBackYQVO.getCommonValue() + getObject(serviceSubtask, scriptContent)); |
| | | //å°è¯¥æ£è
çRedisä¸çé¢ç®IDï¼è¿è¡ä¿®æ¹ |
| | | redisCache.setCacheObject(phoneCallReqYQVO.getTaskid().trim() + "-" + phoneCallReqYQVO.getPhone().trim(), script.getId().toString(), 120, TimeUnit.MINUTES); |
| | |
| | | if (ivrTaskTemplateScriptVO.getNextScriptno().intValue() == ivrTaskTemplateScript1.getSort()) { |
| | | phoneCallBackYQVO.setType("text"); |
| | | phoneCallBackYQVO.setSilent_interval(ivrTaskTemplate.getSilencetime().intValue()); |
| | | String scriptContent = ivrTaskTemplateScript1.getIvrtext(); |
| | | String scriptContent = StringUtils.isNotEmpty(ivrTaskTemplateScript1.getIvrtext()) ? ivrTaskTemplateScript1.getIvrtext() : ivrTaskTemplateScript1.getScriptContent(); |
| | | |
| | | phoneCallBackYQVO.setValue(phoneCallBackYQVO.getCommonValue() + getObject(serviceSubtask, scriptContent)); |
| | | redisCache.deleteObject(phoneCallReqYQVO.getTaskid().trim() + "&&" + "mate" + "&&" + phoneCallReqYQVO.getUuid()); |
| | | redisCache.setCacheObject(serviceSubtask.getId() + "-" + serviceSubtask.getPhone(), ivrTaskTemplateScript1.getId().toString()); |
| | |
| | | for (String key : map.keySet()) { |
| | | scriptContent = scriptContent.replace(key, StringUtils.isNotEmpty(map.get(key)) ? map.get(key) : ""); |
| | | } |
| | | } |
| | | if (StringUtils.isEmpty(scriptContent)) { |
| | | return scriptContent; |
| | | } |
| | | scriptContent = scriptContent.replace("${name}", StringUtils.isNotEmpty(serviceSubtask.getSendname()) ? serviceSubtask.getSendname() : ""); |
| | | scriptContent = scriptContent.replace("${dzz}", StringUtils.isNotEmpty(serviceSubtask.getAddr()) ? serviceSubtask.getAddr() : ""); |
| | |
| | | //å¿
é¡»çache-existå
¨é¨æå®æè½æåä¸ä¸æ¹ï¼ä¸»è¦æ¯æææçæ°æ®é½å å¨çµè¯çç¼åéï¼å¨è§å®çæ¶é´æä¸å®ï¼ |
| | | long existSize = listOps.size("cache-exist"); |
| | | if (existSize > 0) return pullTaskVOList; |
| | | |
| | | int count = 0; |
| | | long size = listOps.size("cache-0"); |
| | | log.error("---------æçµè¯ä¹åç¼åä¸çæ°æ®éï¼{}", size); |
| | | int count = 0; |
| | | if (size > 0) { |
| | | //phoneCount() éè¿ç»åºçæ¯ä¸ªå°æ¶éè¦æåºççµè¯éï¼ç®åºå°æä¸8ç¹ä¸ç¹è½æåºå¤å°ä¸ªçµè¯ï¼è·åå°æ»é |
| | | //妿éè¦ç«å³æ§è¡çæ°æ®é大äºä¸å¤©è¦æ§è¡çä¸éï¼ååªåä¸éçæ°éï¼å
¶å®çåæ¾åredisä¸ |
| | |
| | | cacheList = listOps.range("cache-0", 0, count - 1); |
| | | } |
| | | } |
| | | |
| | | |
| | | log.error("任塿åcache-0ç弿¯å¤å°ï¼{}", cacheList); |
| | | // cache-0为ç«å³åèµ·ç,å
¶å®çå
æ¨è¿ |
| | |
| | | } else { |
| | | for (int i = 1; i < 6; i++) { |
| | | //ååºä»cache-1 å° cache-5ç第ä¸ä¸ªåä»»å¡ä¿¡æ¯ |
| | | Long size1 = listOps.size("cache-" + i); |
| | | if (size1 == null || size1 == 0) continue; |
| | | int count1 = Math.min(phoneCount(), size1.intValue()); |
| | | List<String> value = listOps.range("cache-0" + i, 0, count1 - 1); |
| | | try { |
| | | Long size1 = listOps.size("cache-" + i); |
| | | if (size1 == null || size1 == 0) continue; |
| | | int count1 = Math.min(phoneCount(), size1.intValue()); |
| | | List<String> value = listOps.range("cache-0" + i, 0, count1 - 1); |
| | | |
| | | List<PullTaskVO> pullTaskVOList2 = getPullTaskList(value, "cache-" + i); |
| | | if (CollectionUtils.isNotEmpty(pullTaskVOList2) && pullTaskVOList2.size() > 0) { |
| | | pullTaskVOList.addAll(pullTaskVOList2); |
| | | List<PullTaskVO> pullTaskVOList2 = getPullTaskList(value, "cache-" + i); |
| | | if (CollectionUtils.isNotEmpty(pullTaskVOList2) && pullTaskVOList2.size() > 0) { |
| | | pullTaskVOList.addAll(pullTaskVOList2); |
| | | } |
| | | //å°å¤çè¿çæ°æ®å é¤ |
| | | listOps.trim("cache-0" + i, count1, -1); |
| | | } catch (Exception e) { |
| | | // log.error("ççç¦"); |
| | | } |
| | | //å°å¤çè¿çæ°æ®å é¤ |
| | | listOps.trim("cache-0" + i, count1, -1); |
| | | } |
| | | } |
| | | //existListç¨æ¥è®°å½æ¥ä¸æ¥éè¦æ§è¡çåä»»å¡ID |
| | |
| | | ServiceSubtaskDetail ssd = new ServiceSubtaskDetail(); |
| | | ssd.setSubId(serviceSubtaskDetail.getSubId()); |
| | | ssd.setTaskid(serviceSubtaskDetail.getTaskid()); |
| | | ssd.setTemplatequestionnum(serviceSubtaskDetail.getTemplatequestionnum()); |
| | | ssd.setScriptid(serviceSubtaskDetail.getScriptid()); |
| | | if (serviceSubtaskDetail.getSubId() != null) { |
| | | ServiceSubtask serviceSubtask = serviceSubtaskMapper.selectServiceSubtaskById(serviceSubtaskDetail.getSubId()); |
| | | ssd.setGuid(serviceSubtask.getGuid()); |
| | |
| | | continue; |
| | | } |
| | | ServiceSubtaskStatistic statistic = getStatistic(serviceSubtaskList); |
| | | |
| | | //åæ¶ç |
| | | ServiceSubtask ss = new ServiceSubtask(); |
| | | ss.setOrgid(serviceSubtaskList.get(0).getOrgid()); |
| | | if (CollectionUtils.isNotEmpty(serviceSubtaskCountReq.getLeavehospitaldistrictcodes())) { |
| | | ss.setLeavehospitaldistrictcode(serviceSubtaskList.get(0).getLeavehospitaldistrictcode()); |
| | | } else { |
| | | ss.setDeptcode(serviceSubtaskList.get(0).getDeptcode()); |
| | | } |
| | | ss.setStarttime(serviceSubtaskCountReq.getStartTime()); |
| | | ss.setEndtime(serviceSubtaskCountReq.getEndTime()); |
| | | if (serviceSubtaskCountReq.getEndTime() != null && new Date().before(serviceSubtaskCountReq.getEndTime())) { |
| | | ss.setEndtime(new Date()); |
| | | } |
| | | Double jsRate = serviceSubtaskMapper.selectTimelyRate(ss); |
| | | statistic.setRate(jsRate); |
| | | |
| | | if (ObjectUtils.isNotEmpty(statistic)) { |
| | | serviceSubtaskStatistics.add(statistic); |
| | | } |
| | |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() != 4) { |
| | | serviceSubtaskStatistic.setFollowUpNeeded(serviceSubtaskStatistic.getFollowUpNeeded() + 1L); |
| | | } |
| | | |
| | | //馿¬¡åºé¢é访 |
| | | if (serviceSubtask.getVisitCount() != null && serviceSubtask.getVisitCount() == 1) { |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() != 4) { |
| | |
| | | |
| | | |
| | | } |
| | | /*serviceSubtaskStatistic.setServiceCount(serviceSubtaskList.size()); |
| | | for (ServiceSubtask serviceSubtask : serviceSubtaskList) { |
| | | //ä¸é访æ°é |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() == 4) { |
| | | serviceSubtaskStatistic.setBzxCount(serviceSubtaskStatistic.getBzxCount() + 1L); |
| | | } |
| | | //åºé访æ°é |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() != 4) { |
| | | serviceSubtaskStatistic.setYsfCount(serviceSubtaskStatistic.getYsfCount() + 1L); |
| | | } |
| | | //åé失败æ°é |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() == 5) { |
| | | serviceSubtaskStatistic.setFssbCount(serviceSubtaskStatistic.getFssbCount() + 1L); |
| | | } |
| | | //å¾
åéæ°é |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() == 2) { |
| | | serviceSubtaskStatistic.setDfsCount(serviceSubtaskStatistic.getDfsCount() + 1L); |
| | | } |
| | | //å·²åéæ°é |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() == 3) { |
| | | serviceSubtaskStatistic.setYfsCount(serviceSubtaskStatistic.getYfsCount() + 1L); |
| | | } |
| | | //已宿æ°é |
| | | if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() == 6) { |
| | | //å·²åéï¼å
å«å·²å®æ |
| | | serviceSubtaskStatistic.setYfsCount(serviceSubtaskStatistic.getYfsCount() + 1L); |
| | | serviceSubtaskStatistic.setYwcCount(serviceSubtaskStatistic.getYwcCount() + 1L); |
| | | } |
| | | |
| | | if (StringUtils.isNotEmpty(serviceSubtask.getExcep()) && serviceSubtask.getExcep().equals("1")) { |
| | | //å¼å¸¸æ è¯ |
| | | serviceSubtaskStatistic.setYczs(serviceSubtaskStatistic.getYczs() + 1L); |
| | | } |
| | | } |
| | | //éè®¿å®æç=已宿/åºé访é |
| | | if (serviceSubtaskStatistic.getYwcCount() == 0 || CollectionUtils.isEmpty(serviceSubtaskList)) { |
| | | serviceSubtaskStatistic.setSfwcl("0"); |
| | | } else { |
| | | // BigDecimal multiply = BigDecimal.valueOf(serviceSubtaskStatistic.getYfsCount()).divide(BigDecimal.valueOf(serviceSubtaskList.size()), 2, BigDecimal.ROUND_HALF_UP); |
| | | BigDecimal multiply = new BigDecimal(serviceSubtaskStatistic.getYwcCount().toString()).divide(new BigDecimal(serviceSubtaskStatistic.getYsfCount().toString()), 2, BigDecimal.ROUND_HALF_UP); |
| | | serviceSubtaskStatistic.setSfwcl(multiply.toString()); |
| | | }*/ |
| | | |
| | | |
| | | return serviceSubtaskStatistic; |
| | |
| | | } |
| | | |
| | | private ServiceSubtaskDetail getServiceSubtaskDetail(PhoneCallReqYQVO phoneCallReqYQVO, IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO, ServiceSubtask serviceSubtask, IvrTaskTemplate ivrTaskTemplate) { |
| | | log.info("-----------------phoneCallReqYQVOçå¼ä¸ºï¼{}", phoneCallReqYQVO); |
| | | |
| | | ServiceSubtaskDetail serviceSubtaskDetail = new ServiceSubtaskDetail(); |
| | | serviceSubtaskDetail.setSubId(Long.valueOf(phoneCallReqYQVO.getTaskid())); |
| | | ServiceSubtask serviceSubtask1 = serviceSubtaskMapper.selectServiceSubtaskById(Long.valueOf(phoneCallReqYQVO.getTaskid())); |
| | |
| | | serviceSubtaskDetail.setSentEnd(1L); |
| | | serviceSubtaskDetail.setTemplateid(ivrTaskTemplate.getId().toString()); |
| | | serviceSubtaskDetail.setTemplatequestionnum(ivrTaskTemplateScriptVO.getScriptno()); |
| | | serviceSubtaskDetail.setQuestiontext(ivrTaskTemplateScriptVO.getIvrtext()); |
| | | serviceSubtaskDetail.setQuestiontext(StringUtils.isNotEmpty(ivrTaskTemplateScriptVO.getIvrtext()) ? ivrTaskTemplateScriptVO.getIvrtext() : ivrTaskTemplateScriptVO.getScriptContent()); |
| | | serviceSubtaskDetail.setQuestionvoice(phoneCallReqYQVO.getRecordpath()); |
| | | serviceSubtaskDetail.setCategoryname(ivrTaskTemplateScriptVO.getScriptType()); |
| | | serviceSubtaskDetail.setTargetoptions(ivrTaskTemplateScriptVO.getTargetOptions()); |
| | |
| | | return isSuccess; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è·åéè®¿åæ¶ç |
| | | * |
| | | * @param serviceSubtask |
| | | * @return |
| | | */ |
| | | public Map<String, Object> selectTimelyRate(ServiceSubtask serviceSubtask) { |
| | | if (serviceSubtask.getEndtime() != null && new Date().before(serviceSubtask.getEndtime())) { |
| | | serviceSubtask.setEndtime(new Date()); |
| | | } |
| | | Double dob = serviceSubtaskMapper.selectTimelyRate(serviceSubtask); |
| | | // 1. æ¥è¯¢å
¨é¨æ°æ®ï¼SQLä¸åé¡µï¼ |
| | | List<ServiceSubtask> allList = serviceSubtaskMapper.selectTimelyRateDetail(serviceSubtask); |
| | | // 2. Java代ç å页 |
| | | int pageNum = serviceSubtask.getPn() != null ? serviceSubtask.getPn() : 1; |
| | | int pageSize = serviceSubtask.getPs() != null ? serviceSubtask.getPs() : 10; |
| | | int fromIndex = (pageNum - 1) * pageSize; |
| | | int toIndex = Math.min(fromIndex + pageSize, allList.size()); |
| | | List<ServiceSubtask> pageList = new ArrayList<>(); |
| | | if (fromIndex < allList.size()) { |
| | | pageList = allList.subList(fromIndex, toIndex); |
| | | } |
| | | log.info("代ç å页忰: pageNum={}, pageSize={}, fromIndex={}, toIndex={}, total={}", pageNum, pageSize, fromIndex, toIndex, allList.size()); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("rate", dob); |
| | | map.put("detail", pageList); |
| | | map.put("total", allList.size()); // å¯éï¼è¿åæ»æ° |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Object> getScriptInfoByCondition(Long taskid, Long patid, Boolean isFinish, String patfrom) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | ivrLibaTemplateScriptVO.setIvrLibaScriptTargetoptionList(ivrLibaTemplateTargetoptions); |
| | | } |
| | | } |
| | | Collections.sort(ivrLibaTemplateScriptVOS, Comparator.comparingInt(IvrLibaTemplateScriptVO::getSort)); |
| | | Collections.sort(ivrLibaTemplateScriptVOS, Comparator.comparingLong(IvrLibaTemplateScriptVO::getSort)); |
| | | |
| | | return ivrLibaTemplateScriptVOS; |
| | | } |
| | |
| | | @Autowired |
| | | private SvyLibTemplateTargetoptionMapper svyLibTemplateTargetoptionMapper; |
| | | @Autowired |
| | | private TemplateDeptMapper templateDeptMapper; |
| | | @Autowired |
| | | private SvyLibTemplateTagMapper svyLibTemplateTagMapper; |
| | | @Autowired |
| | | private Icd10AssociationMapper icd10AssociationMapper; |
| | |
| | | } |
| | | //å°é¢ç®æ¾å°é®å·åè¡¨ä¸ |
| | | svyLibTemplateVOS.get(i).setSvyTemplateLibScripts(svyLibTemplateScripts); |
| | | |
| | | //è·åæ¯ä¸ªé®å·å¯¹åºçç§å®¤ |
| | | TemplateDept templateDept = new TemplateDept(); |
| | | templateDept.setTempid(svyLibTemplateVOS.get(i).getSvyid()); |
| | | List<TemplateDept> tempDetpRelevances = templateDeptMapper.selectTemplateDeptList(templateDept); |
| | | svyLibTemplateVOS.get(i).setTempDetpRelevances(CollectionUtils.isNotEmpty(tempDetpRelevances) ? tempDetpRelevances : new ArrayList<>()); |
| | | |
| | | //è·åæ ç¾ |
| | | SvyLibTemplateTag svyLibTemplateTag = new SvyLibTemplateTag(); |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (CollectionUtils.isNotEmpty(svyLibTemplate.getTempDetpRelevances())) { |
| | | for (TemplateDept tempDetpRelevance : svyLibTemplate.getTempDetpRelevances()) { |
| | | tempDetpRelevance.setGuid(svyLibTemplateVO.getGuid()); |
| | | tempDetpRelevance.setOrgid(svyLibTemplateVO.getOrgid()); |
| | | if (tempDetpRelevance.getId() == null) { |
| | | //æ°å¢ |
| | | tempDetpRelevance.setTempid(svyLibTemplate.getSvyid()); |
| | | tempDetpRelevance.setType(1L); |
| | | templateDeptMapper.insertTemplateDept(tempDetpRelevance); |
| | | } else { |
| | | templateDeptMapper.updateTemplateDept(tempDetpRelevance); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | //æ ç¾å¤ç |
| | |
| | | serviceSubtask.setDeptname(serviceTaskVO.getDeptname()); |
| | | serviceSubtask.setDeptcode(serviceTaskVO.getDeptcode()); |
| | | serviceSubtask.setSendstate(6L); |
| | | serviceSubtask.setVisitTime(serviceTaskVO.getVisittime()); |
| | | serviceSubtask.setCreateTime(new Date()); |
| | | serviceSubtask.setLeavehospitaldistrictcode(serviceTaskVO.getDistrictcode()); |
| | | //å
æ¥è¯¢ä¸éï¼è¯¥taskGuidæ¯å¦åå¨ |
| | |
| | | String jsonString = objectMapper.writeValueAsString(serviceQueryInfo); |
| | | log.error("tokençå¼ä¸ºï¼{}", token); |
| | | if (serviceQueryInfo.getXiaoXiTou().getFaSongJGID().equals("47255004333112711A1001")) //æ¯å® |
| | | result = OkHttpExample.sendPostRequest("https://9.0.124.104:13021/mediinfo-grus-fuwuzxwg/api/esb/lyraSyncRun", jsonString, token); |
| | | result = OkHttpExample.sendPostRequest("https://9.0.124.104:13021/mediinfo-grus-fuwuzxwg/api/esb/lyraSyncRun", jsonString, token); |
| | | if (serviceQueryInfo.getXiaoXiTou().getFaSongJGID().equals("47231022633110211A2101")) //ä¸å»é¢ |
| | | result = OkHttpExample.sendPostRequest("https://9.0.124.104:13011/mediinfo-grus-fuwuzxwg/api/esb/lyraSyncRun", jsonString, token); |
| | | result = OkHttpExample.sendPostRequest("https://9.0.124.104:13011/mediinfo-grus-fuwuzxwg/api/esb/lyraSyncRun", jsonString, token); |
| | | map = objectMapper.readValue(result, Map.class); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.HNGatherPatArchiveMapper"> |
| | | |
| | | <resultMap type="com.smartor.domain.PatArchive" id="PatArchiveResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="patientno" column="patientno"/> |
| | | <result property="sourcefrom" column="sourcefrom"/> |
| | | <result property="notrequiredFlag" column="notrequired_flag"/> |
| | | <result property="notrequiredreason" column="notrequiredreason"/> |
| | | <result property="patidHis" column="patid_his"/> |
| | | <result property="sdFlag" column="sd_flag"/> |
| | | <result property="pattype" column="pattype"/> |
| | | <result property="viptype" column="viptype"/> |
| | | <result property="name" column="name"/> |
| | | <result property="sex" column="sex"/> |
| | | <result property="nation" column="nation"/> |
| | | <result property="nativePlace" column="native_place"/> |
| | | <result property="placeOfResidence" column="place_of_residence"/> |
| | | <result property="birthplace" column="birthplace"/> |
| | | <result property="idcardno" column="idcardno"/> |
| | | <result property="birthdate" column="birthdate"/> |
| | | <result property="age" column="age"/> |
| | | <result property="age2" column="age2"/> |
| | | <result property="sourcefrom" column="sourcefrom"/> |
| | | <result property="archivetime" column="archivetime"/> |
| | | <result property="archiveby" column="archiveby"/> |
| | | <result property="telcode" column="telcode"/> |
| | | <result property="relativetelcode" column="relativetelcode"/> |
| | | <result property="idcardtype" column="idcardtype"/> |
| | | <result property="orgid" column="orgid"/> |
| | | <result property="openid" column="openid"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <result property="dept" column="deptname"/> |
| | | <result property="deptcode" column="deptcode"/> |
| | | <result property="drcode" column="drcode"/> |
| | | <result property="drname" column="drname"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="isupload" column="isupload"/> |
| | | <result property="uploadTime" column="upload_time"/> |
| | | <result property="tag" column="tag"/> |
| | | <result property="pattype" column="pattype"/> |
| | | <result property="bedNo" column="bedno"/> |
| | | <result property="inhosptime" column="inhosptime"/> |
| | | <result property="ageUnit" column="age_unit"/> |
| | | <result property="ageUnit2" column="age_unit2"/> |
| | | <result property="leavehospitaldistrictname" column="leavehospitaldistrictname"/> |
| | | <result property="leavehospitaldistrictcode" column="leavehospitaldistrictcode"/> |
| | | <result property="careFacilities" column="care_facilities"/> |
| | | <result property="casePath" column="case_path"/> |
| | | <result property="degreeOfEducation" column="degree_of_education"/> |
| | | <result property="maritalStatus" column="marital_status"/> |
| | | <result property="income" column="income"/> |
| | | <result property="medicareType" column="medicare_type"/> |
| | | <result property="carePerson" column="care_person"/> |
| | | <result property="casePersonAge" column="case_person_age"/> |
| | | <result property="guid" column="guid"/> |
| | | <result property="filterDrname" column="filter_drname"/> |
| | | <result property="filterDrcode" column="filter_drcode"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <resultMap type="com.smartor.domain.PatArchiveOthreInfo" id="PatArchiveOthreInfoResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="notrequiredFlag" column="notrequired_flag"/> |
| | | <result property="notrequiredreason" column="notrequiredreason"/> |
| | | <result property="patientno" column="patientno"/> |
| | | <result property="sourcefrom" column="sourcefrom"/> |
| | | <result property="patidHis" column="patid_his"/> |
| | | <result property="sdFlag" column="sd_flag"/> |
| | | <result property="pattype" column="pattype"/> |
| | | <result property="viptype" column="viptype"/> |
| | | <result property="name" column="name"/> |
| | | <result property="sex" column="sex"/> |
| | | <result property="nation" column="nation"/> |
| | | <result property="nativePlace" column="native_place"/> |
| | | <result property="placeOfResidence" column="place_of_residence"/> |
| | | <result property="birthplace" column="birthplace"/> |
| | | <result property="idcardno" column="idcardno"/> |
| | | <result property="birthdate" column="birthdate"/> |
| | | <result property="age" column="age"/> |
| | | <result property="age2" column="age2"/> |
| | | <result property="sourcefrom" column="sourcefrom"/> |
| | | <result property="archivetime" column="archivetime"/> |
| | | <result property="archiveby" column="archiveby"/> |
| | | <result property="telcode" column="telcode"/> |
| | | <result property="relativetelcode" column="relativetelcode"/> |
| | | <result property="idcardtype" column="idcardtype"/> |
| | | <result property="orgid" column="orgid"/> |
| | | <result property="openid" column="openid"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <result property="dept" column="deptname"/> |
| | | <result property="deptcode" column="deptcode"/> |
| | | <result property="drcode" column="drcode"/> |
| | | <result property="drname" column="drname"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="isupload" column="isupload"/> |
| | | <result property="uploadTime" column="upload_time"/> |
| | | <result property="tag" column="tag"/> |
| | | <result property="pattype" column="pattype"/> |
| | | <result property="bedNo" column="bedno"/> |
| | | <result property="starttime" column="starttime"/> |
| | | <result property="endtime" column="endtime"/> |
| | | <result property="ageUnit" column="age_unit"/> |
| | | <result property="ageUnit2" column="age_unit2"/> |
| | | <result property="inhospno" column="inhospno"/> |
| | | <result property="nurseId" column="nurse_id"/> |
| | | <result property="nurseName" column="nurse_name"/> |
| | | <result property="outWayName" column="out_way_name"/> |
| | | <result property="outWayId" column="out_way_id"/> |
| | | <result property="leavehospitaldistrictname" column="leavehospitaldistrictname"/> |
| | | <result property="leavehospitaldistrictcode" column="leavehospitaldistrictcode"/> |
| | | <result property="guid" column="guid"/> |
| | | <result property="leavediagname" column="leavediagname"/> |
| | | <result property="leaveicd10code" column="leaveicd10code"/> |
| | | <result property="filterDrname" column="filter_drname"/> |
| | | <result property="filterDrcode" column="filter_drcode"/> |
| | | </resultMap> |
| | | |
| | | <resultMap type="com.smartor.domain.PatMedInhosp" id="PatMedInhospResult"> |
| | | <result property="inhospid" column="inhospid"/> |
| | | <result property="inhospno" column="inhospno"/> |
| | | <result property="serialnum" column="serialnum"/> |
| | | <result property="hospitalname" column="hospitalname"/> |
| | | <result property="hospitalcode" column="hospitalcode"/> |
| | | <result property="hospitaldistrictcode" column="hospitaldistrictcode"/> |
| | | <result property="hospitaldistrictname" column="hospitaldistrictname"/> |
| | | <result property="icd10code" column="icd10code"/> |
| | | <result property="diagname" column="diagname"/> |
| | | <result property="starttime" column="starttime"/> |
| | | <result property="endtime" column="endtime"/> |
| | | <result property="deptcode" column="deptcode"/> |
| | | <result property="deptname" column="deptname"/> |
| | | <result property="roomno" column="roomno"/> |
| | | <result property="bedNo" column="bed_no"/> |
| | | <result property="orgid" column="orgid"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="isupload" column="isupload"/> |
| | | <result property="uploadTime" column="upload_time"/> |
| | | <result property="patid" column="patid"/> |
| | | <result property="leavediagname" column="leavediagname"/> |
| | | <result property="leaveicd10code" column="leaveicd10code"/> |
| | | <result property="drcode" column="drcode"/> |
| | | <result property="drname" column="drname"/> |
| | | <result property="schemestatus" column="schemestatus"/> |
| | | <result property="generalschemestatus" column="generalschemestatus"/> |
| | | <result property="leaveldeptcode" column="leaveldeptcode"/> |
| | | <result property="leaveldeptname" column="leaveldeptname"/> |
| | | <result property="hospitaldistrictid" column="hospitaldistrictid"/> |
| | | <result property="leavehospitaldistrictcode" column="leavehospitaldistrictcode"/> |
| | | <result property="leavehospitaldistrictname" column="leavehospitaldistrictname"/> |
| | | <result property="leavehospitaldistrictid" column="leavehospitaldistrictid"/> |
| | | <result property="deptid" column="deptid"/> |
| | | <result property="leaveldeptid" column="leaveldeptid"/> |
| | | <result property="schemetime" column="schemetime"/> |
| | | <result property="patname" column="patname"/> |
| | | <result property="patno" column="patno"/> |
| | | <result property="inhospstate" column="inhospstate"/> |
| | | <result property="deptcheckFlag" column="deptcheck_flag"/> |
| | | <result property="wardcheckFlag" column="wardcheck_flag"/> |
| | | <result property="diagcheckFlag" column="diagcheck_flag"/> |
| | | <result property="age" column="age"/> |
| | | <result property="sex" column="sex"/> |
| | | <result property="telcode" column="telcode"/> |
| | | <result property="longTaskReason" column="long_task_reason"/> |
| | | <result property="nurseId" column="nurse_id"/> |
| | | <result property="nurseName" column="nurse_name"/> |
| | | <result property="outWayId" column="out_way_id"/> |
| | | <result property="outWayName" column="out_way_name"/> |
| | | <result property="guid" column="guid"/> |
| | | <result property="operator" column="operator"/> |
| | | <result property="operatorId" column="operator_id"/> |
| | | <result property="remark" column="remark"/> |
| | | <result property="tagname" column="tagname"/> |
| | | <result property="fuflag" column="fuflag"/> |
| | | <result property="fudate" column="fudate"/> |
| | | <result property="fuperiod" column="fuperiod"/> |
| | | <result property="futypecode" column="futypecode"/> |
| | | <result property="futypedesc" column="futypedesc"/> |
| | | <result property="fuadvice" column="fuadvice"/> |
| | | <result property="fuspecialadvice" column="fuspecialadvice"/> |
| | | </resultMap> |
| | | |
| | | <resultMap type="com.smartor.domain.PatMedOuthosp" id="PatMedOuthospResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="serialnum" column="serialnum"/> |
| | | <result property="patid" column="patid"/> |
| | | <result property="hospitalname" column="hospitalname"/> |
| | | <result property="hospitalcode" column="hospitalcode"/> |
| | | <result property="icd10code" column="icd10code"/> |
| | | <result property="diagname" column="diagname"/> |
| | | <result property="deptcode" column="deptcode"/> |
| | | <result property="deptname" column="deptname"/> |
| | | <result property="drcode" column="drcode"/> |
| | | <result property="drname" column="drname"/> |
| | | <result property="admitdate" column="admitdate"/> |
| | | <result property="orgid" column="orgid"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="isupload" column="isupload"/> |
| | | <result property="uploadTime" column="upload_time"/> |
| | | <result property="schemestatus" column="schemestatus"/> |
| | | <result property="deptid" column="deptid"/> |
| | | <result property="schemetime" column="schemetime"/> |
| | | <result property="hpi" column="hpi"/> |
| | | <result property="mainsuit" column="mainsuit"/> |
| | | <result property="outhospno" column="outhospno"/> |
| | | <result property="patname" column="patname"/> |
| | | <result property="guid" column="guid"/> |
| | | <result property="patno" column="patno"/> |
| | | <result property="diagcheckFlag" column="diagcheck_flag"/> |
| | | <result property="idcardno" column="idcardno"/> |
| | | <result property="remark" column="remark"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <resultMap type="com.smartor.domain.Icd10" id="Icd10Result"> |
| | | <result property="icdid" column="icdid"/> |
| | | <result property="icdcode" column="icdcode"/> |
| | | <result property="icdname" column="icdname"/> |
| | | <result property="icdpym" column="icdpym"/> |
| | | <result property="icdwbm" column="icdwbm"/> |
| | | <result property="orgid" column="orgid"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="pid" column="pid"/> |
| | | <result property="guid" column="guid"/> |
| | | <result property="lastflag" column="lastflag"/> |
| | | <result property="chimedflag" column="chimedflag"/> |
| | | <result property="hisIcdid" column="his_icdid"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <resultMap type="com.ruoyi.common.core.domain.entity.SysDept" id="SysDeptResult"> |
| | | <id property="deptId" column="dept_id"/> |
| | | <id property="hisDeptId" column="his_dept_id"/> |
| | | <result property="parentId" column="parent_id"/> |
| | | <result property="hisParentId" column="his_parent_id"/> |
| | | <result property="ancestors" column="ancestors"/> |
| | | <result property="deptName" column="dept_name"/> |
| | | <result property="orderNum" column="order_num"/> |
| | | <result property="leader" column="leader"/> |
| | | <result property="phone" column="phone"/> |
| | | <result property="email" column="email"/> |
| | | <result property="status" column="status"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <result property="parentName" column="parent_name"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="deptCode" column="dept_code"/> |
| | | <result property="deptType" column="dept_type"/> |
| | | <result property="guid" column="guid"/> |
| | | <result property="orgid" column="orgid"/> |
| | | <result property="type" column="type"/> |
| | | </resultMap> |
| | | |
| | | <resultMap type="com.ruoyi.common.core.domain.entity.SysUser" id="SysUserResult"> |
| | | <id property="userId" column="user_id"/> |
| | | <id property="orgid" column="orgid"/> |
| | | <id property="hisUserId" column="his_user_id"/> |
| | | <result property="deptId" column="dept_id"/> |
| | | <result property="hospInfo" column="hosp_info"/> |
| | | <result property="deptInfo" column="dept_info"/> |
| | | <result property="userName" column="user_name"/> |
| | | <result property="nickName" column="nick_name"/> |
| | | <result property="email" column="email"/> |
| | | <result property="phonenumber" column="phonenumber"/> |
| | | <result property="sex" column="sex"/> |
| | | <result property="avatar" column="avatar"/> |
| | | <result property="password" column="password"/> |
| | | <result property="status" column="status"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <result property="loginIp" column="login_ip"/> |
| | | <result property="loginDate" column="login_date"/> |
| | | <result property="createBy" column="create_by"/> |
| | | <result property="idCard" column="id_card"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateBy" column="update_by"/> |
| | | <result property="title" column="title"/> |
| | | <result property="birthday" column="birthday"/> |
| | | <result property="jobPhone" column="job_phone"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="remark" column="remark"/> |
| | | <result property="userType" column="user_type"/> |
| | | <result property="searchscope" column="searchscope"/> |
| | | <result property="guid" column="guid"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectPatArchiveVo"> |
| | | select id, |
| | | notrequired_flag, |
| | | notrequiredreason, |
| | | patientno, |
| | | filter_drname, |
| | | filter_drcode, |
| | | patid_his, |
| | | age_unit, |
| | | age_unit2, |
| | | sd_flag, |
| | | name, |
| | | sex, |
| | | idcardno, |
| | | birthdate, |
| | | age, |
| | | age2, |
| | | nation, |
| | | native_place, |
| | | place_of_residence, |
| | | birthplace, |
| | | sourcefrom, |
| | | archivetime, |
| | | archiveby, |
| | | telcode, |
| | | relativetelcode, |
| | | idcardtype, |
| | | orgid, |
| | | openid, |
| | | del_flag, |
| | | update_by, |
| | | update_time, |
| | | create_by, |
| | | create_time, |
| | | isupload, |
| | | pattype, |
| | | viptype, |
| | | upload_time, |
| | | care_facilities, |
| | | case_path, |
| | | degree_of_education, |
| | | marital_status, |
| | | income, |
| | | medicare_type, |
| | | care_person, |
| | | guid, |
| | | case_person_age |
| | | from mbsjjk.hzjbxx |
| | | </sql> |
| | | |
| | | <select id="selectPatArchiveList" parameterType="com.smartor.domain.PatArchive" resultMap="PatArchiveResult"> |
| | | <include refid="selectPatArchiveVo"/> |
| | | <where> |
| | | <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="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> |
| | | <if test="isupload != null ">and isupload = #{isupload}</if> |
| | | <if test="uploadTime != null ">and upload_time = #{uploadTime}</if> |
| | | <if test="viptype != null ">and viptype = #{viptype}</if> |
| | | <if test="pattype != null ">and pattype = #{pattype}</if> |
| | | <if test="patientno != null ">and patientno = #{patientno}</if> |
| | | <if test="patidHis != null ">and patid_his = #{patidHis}</if> |
| | | <if test="sdFlag != null ">and sd_flag = #{sdFlag}</if> |
| | | <if test="ageUnit != null ">and age_unit = #{ageUnit}</if> |
| | | <if test="age != null ">and age = #{age}</if> |
| | | <if test="age2 != null ">and age2 = #{age2}</if> |
| | | <if test="ageUnit2 != null ">and age_unit2 = #{ageUnit2}</if> |
| | | <if test="notrequiredFlag != null ">and notrequired_flag = #{notrequiredFlag}</if> |
| | | <if test="notrequiredreason != null ">and notrequiredreason = #{notrequiredreason}</if> |
| | | <if test="careFacilities != null ">and care_facilities = #{careFacilities}</if> |
| | | <if test="casePath != null ">and case_path = #{casePath}</if> |
| | | <if test="degreeOfEducation != null ">and degree_of_education = #{degreeOfEducation}</if> |
| | | <if test="maritalStatus != null ">and marital_status = #{maritalStatus}</if> |
| | | <if test="income != null ">and income = #{income}</if> |
| | | <if test="medicareType != null ">and medicare_type = #{medicareType}</if> |
| | | <if test="carePerson != null ">and care_person = #{carePerson}</if> |
| | | <if test="casePersonAge != null ">and case_person_age = #{casePersonAge}</if> |
| | | <if test="filterDrname != null ">and filter_drname = #{filterDrname}</if> |
| | | <if test="filterDrcode != null ">and filter_drcode = #{filterDrcode}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | <select id="selectPatMedInhospListCount" parameterType="com.smartor.domain.PatMedInhosp" resultType="Long"> |
| | | select count(*) |
| | | FROM cryxx |
| | | </select> |
| | | |
| | | |
| | | <select id="selectPatMedInhospList" parameterType="com.smartor.domain.PatMedInhosp" resultMap="PatMedInhospResult"> |
| | | select |
| | | b.nurse_id, |
| | | b.nurse_name, |
| | | b.patname, |
| | | b.out_way_id, |
| | | b.out_way_name, |
| | | b.inhospstate, |
| | | b.patno, |
| | | b.inhospno, |
| | | b.serialnum, |
| | | b.hospitalname, |
| | | b.hospitalcode, |
| | | b.hospitaldistrictcode, |
| | | b.hospitaldistrictname, |
| | | b.icd10code, |
| | | b.diagname, |
| | | b.starttime, |
| | | b.endtime, |
| | | b.deptcode, |
| | | b.deptname, |
| | | b.roomno, |
| | | b.bed_no, |
| | | b.orgid, |
| | | b.leavediagname, |
| | | b.leaveicd10code, |
| | | b.drcode, |
| | | b.drname, |
| | | b.leaveldeptcode, |
| | | b.leaveldeptname, |
| | | b.hospitaldistrictid, |
| | | b.leavehospitaldistrictcode, |
| | | b.leavehospitaldistrictname, |
| | | b.leavehospitaldistrictid, |
| | | b.deptid, |
| | | b.leaveldeptid, |
| | | b.schemetime, |
| | | b.fuflag, |
| | | b.fudate, |
| | | b.fuperiod, |
| | | b.futypecode, |
| | | b.futypedesc, |
| | | b.fuadvice |
| | | FROM |
| | | cryxx b |
| | | <where> |
| | | <if test="startOutHospTime != null ">and date_format(b.endtime,'%y%m%d') >= |
| | | date_format(#{startOutHospTime},'%y%m%d') |
| | | </if> |
| | | <if test="endOutHospTime != null ">and date_format(b.endtime,'%y%m%d') <= |
| | | date_format(#{endOutHospTime},'%y%m%d') |
| | | </if> |
| | | <if test="startInHospTime != null ">and date_format(b.starttime,'%y%m%d') >= |
| | | date_format(#{startInHospTime},'%y%m%d') |
| | | </if> |
| | | <if test="endInHospTime != null ">and date_format(b.starttime,'%y%m%d') <= |
| | | date_format(#{endInHospTime},'%y%m%d') |
| | | </if> |
| | | <if test="inhospno != null ">and b.inhospno = #{inhospno}</if> |
| | | <if test="fuflag != null ">and b.fuflag = #{fuflag}</if> |
| | | <if test="serialnum != null ">and b.serialnum = #{serialnum}</if> |
| | | <if test="patno != null ">and b.patno = #{patno}</if> |
| | | <if test="nurseId != null ">and b.nurse_id = #{nurseId}</if> |
| | | <if test="nurseName != null and nurseName != ''">and b.nurse_name = #{nurseName}</if> |
| | | <if test="inhospstate != null ">and b.inhospstate = #{inhospstate}</if> |
| | | <if test="outWayId != null ">and b.out_way_id = #{outWayId}</if> |
| | | <if test="outWayName != null ">and b.out_way_name = #{outWayName}</if> |
| | | <if test="orgid != null ">and b.orgid = #{orgid}</if> |
| | | </where> |
| | | limit #{ps} OFFSET #{pn} |
| | | </select> |
| | | |
| | | |
| | | <select id="selectPatMedOuthospList" parameterType="com.smartor.domain.PatMedOuthosp" |
| | | resultMap="PatMedOuthospResult"> |
| | | select |
| | | outhospno, |
| | | patno, |
| | | remark, |
| | | serialnum, |
| | | hospitalname, |
| | | hospitalcode, |
| | | icd10code, |
| | | diagname, |
| | | deptcode, |
| | | deptname, |
| | | drcode, |
| | | drname, |
| | | admitdate, |
| | | orgid, |
| | | update_by, |
| | | update_time, |
| | | create_by, |
| | | create_time, |
| | | isupload, |
| | | upload_time, |
| | | schemestatus, |
| | | deptid, |
| | | schemetime, |
| | | hpi, |
| | | patname, |
| | | mainsuit |
| | | from mzxx |
| | | <where> |
| | | <if test="deptname != null and deptname != ''">and deptname like concat('%', #{deptname}, '%')</if> |
| | | <if test="drname != null and drname != ''">and drname like concat('%', #{drname}, '%')</if> |
| | | <if test="patname != null and patname != ''">and patname like concat('%', #{patname}, '%')</if> |
| | | <if test="beginTime != null ">and date_format( admitdate,'%y%m%d') >= |
| | | date_format(#{beginTime},'%y%m%d') |
| | | </if> |
| | | <if test="endTime != null ">and date_format( admitdate,'%y%m%d') <= |
| | | date_format(#{endTime},'%y%m%d') |
| | | </if> |
| | | <if test="patid != null ">and patid = #{patid}</if> |
| | | <if test="patno != null ">and patno = #{patno}</if> |
| | | <if test="outhospno != null and outhospno != ''">and outhospno = #{outhospno}</if> |
| | | <if test="diagcheckFlag != null and diagcheckFlag != ''">and diagcheck_flag = #{diagcheckFlag}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | <select id="selectIcd10List" parameterType="com.smartor.domain.Icd10" resultMap="Icd10Result"> |
| | | select |
| | | icdcode, |
| | | his_icdid, |
| | | lastflag, |
| | | chimedflag, |
| | | icdname, |
| | | icdpym |
| | | from jbxx |
| | | <where> |
| | | <if test="icdcode != null and icdcode != ''">and icdcode = #{icdcode}</if> |
| | | <if test="lastflag != null and lastflag != ''">and lastflag = #{lastflag}</if> |
| | | <if test="chimedflag != null and chimedflag != ''">and chimedflag = #{chimedflag}</if> |
| | | <if test="icdname != null and icdname != ''">and icdname like concat('%', #{icdname}, '%')</if> |
| | | <if test="icdpym != null and icdpym != ''">and icdpym = #{icdpym}</if> |
| | | <if test="icdwbm != null and icdwbm != ''">and icdwbm = #{icdwbm}</if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="pid != null ">and pid = #{pid}</if> |
| | | <if test="guid != null and guid != ''">and guid = #{guid}</if> |
| | | <if test="hisIcdid != null and hisIcdid != ''">and his_icdid = #{hisIcdid}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | <select id="selectUserList" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserResult"> |
| | | select |
| | | u.title,u.his_user_id, u.searchscope, u.dept_id, u.user_type, |
| | | u.nick_name, u.user_name, u.email,u.id_card, u.avatar, |
| | | u.birthday,u.orgid,u.job_phone,u.phonenumber, u.sex, u.status, |
| | | u.login_ip, u.login_date, u.create_by, u.create_time, u.remark |
| | | from ryxx u |
| | | <where> |
| | | <if test="userId != null and userId != 0"> |
| | | AND u.user_id = #{userId} |
| | | </if> |
| | | <if test="userName != null and userName != ''"> |
| | | AND u.user_name like concat('%', #{userName}, '%') |
| | | </if> |
| | | <if test="nickName != null and nickName != ''"> |
| | | AND u.nick_name like concat('%', #{nickName}, '%') |
| | | </if> |
| | | <if test="status != null and status != ''"> |
| | | AND u.status = #{status} |
| | | </if> |
| | | <if test="idCard != null and idCard != ''"> |
| | | AND u.id_card = #{idCard} |
| | | </if> |
| | | <if test="title != null and title != ''"> |
| | | AND u.title = #{title} |
| | | </if> |
| | | <if test="jobPhone != null and jobPhone != ''"> |
| | | AND u.job_phone = #{jobPhone} |
| | | </if> |
| | | <if test="birthday != null and birthday != ''"> |
| | | AND u.birthday = #{birthday} |
| | | </if> |
| | | <if test="hisUserId != null and hisUserId != ''"> |
| | | AND u.his_user_id = #{hisUserId} |
| | | </if> |
| | | <if test="phonenumber != null and phonenumber != ''"> |
| | | AND u.phonenumber like concat('%', #{phonenumber}, '%') |
| | | </if> |
| | | <if test="params.beginTime != null and params.beginTime != ''"><!-- å¼å§æ¶é´æ£ç´¢ --> |
| | | AND date_format(u.create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') |
| | | </if> |
| | | <if test="params.endTime != null and params.endTime != ''"><!-- ç»ææ¶é´æ£ç´¢ --> |
| | | AND date_format(u.create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectDeptList" parameterType="com.ruoyi.common.core.domain.entity.SysDept" resultMap="SysDeptResult"> |
| | | SELECT d.dept_code, |
| | | d.TYPE, |
| | | d.ancestors, |
| | | d.dept_name, |
| | | d.order_num, |
| | | d.leader, |
| | | d.phone, |
| | | d.dept_type, |
| | | d.email, |
| | | d.status, |
| | | d.create_by, |
| | | d.create_time, |
| | | d.his_dept_id, |
| | | d.his_parent_id |
| | | FROM bmxx d |
| | | |
| | | </select> |
| | | </mapper> |
| | |
| | | #{item.orgid}, |
| | | #{item.delFlag}, |
| | | #{item.createBy}, |
| | | #{item. createTime}, |
| | | #{item.createTime}, |
| | | #{item.updateBy}, |
| | | #{item.updateTime}, |
| | | #{item.pid}, |
| | | #{item.guid}, |
| | | #{item.lastflag}, |
| | | #{item.chimedflag}, |
| | | #{item. hisIcdid,} |
| | | #{item.hisIcdid} |
| | | ) |
| | | </foreach> |
| | | </insert> |
| | |
| | | where inhospid = #{inhospid} |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | <insert id="insertPatMedInhosp" parameterType="com.smartor.domain.PatMedInhosp" useGeneratedKeys="true" |
| | | keyProperty="inhospid"> |
| | | insert into pat_med_inhosp |
| | |
| | | </trim> |
| | | </insert> |
| | | |
| | | |
| | | <insert id="insertPatMedInhospBatch" parameterType="java.util.List"> |
| | | insert into pat_med_inhosp ( |
| | | serialnum, hospitalname, hospitalcode, hospitaldistrictcode, hospitaldistrictname, |
| | | icd10code, diagname, starttime, endtime, deptcode, deptname, roomno, bed_no, |
| | | orgid, del_flag, update_by, update_time, create_by, create_time, isupload, |
| | | upload_time, patid, leavediagname, leaveicd10code, drcode, drname, |
| | | schemestatus, generalschemestatus, leaveldeptcode, leaveldeptname, hospitaldistrictid, |
| | | leavehospitaldistrictcode, leavehospitaldistrictname, leavehospitaldistrictid, |
| | | deptid, leaveldeptid, schemetime, patname, patno, inhospstate, |
| | | deptcheck_flag, wardcheck_flag, diagcheck_flag, long_task_reason, |
| | | nurse_id, nurse_name, out_way_id, out_way_name, guid, |
| | | operator, operator_id, inhospno, remark, |
| | | fuflag, fudate, fuperiod, futypecode, futypedesc, fuadvice, fuspecialadvice |
| | | ) |
| | | values |
| | | <foreach collection="list" item="item" separator=","> |
| | | ( |
| | | #{item.serialnum}, #{item.hospitalname}, #{item.hospitalcode}, #{item.hospitaldistrictcode}, #{item.hospitaldistrictname}, |
| | | #{item.icd10code}, #{item.diagname}, #{item.starttime}, #{item.endtime}, #{item.deptcode}, #{item.deptname}, #{item.roomno}, #{item.bedNo}, |
| | | #{item.orgid}, #{item.delFlag}, #{item.updateBy}, #{item.updateTime}, #{item.createBy}, #{item.createTime}, #{item.isupload}, |
| | | #{item.uploadTime}, #{item.patid}, #{item.leavediagname}, #{item.leaveicd10code}, #{item.drcode}, #{item.drname}, |
| | | #{item.schemestatus}, #{item.generalschemestatus}, #{item.leaveldeptcode}, #{item.leaveldeptname}, #{item.hospitaldistrictid}, |
| | | #{item.leavehospitaldistrictcode}, #{item.leavehospitaldistrictname}, #{item.leavehospitaldistrictid}, |
| | | #{item.deptid}, #{item.leaveldeptid}, #{item.schemetime}, #{item.patname}, #{item.patno}, #{item.inhospstate}, |
| | | #{item.deptcheckFlag}, #{item.wardcheckFlag}, #{item.diagcheckFlag}, #{item.longTaskReason}, |
| | | #{item.nurseId}, #{item.nurseName}, #{item.outWayId}, #{item.outWayName}, #{item.guid}, |
| | | #{item.operator}, #{item.operatorId}, #{item.inhospno}, #{item.remark}, |
| | | #{item.fuflag}, #{item.fudate}, #{item.fuperiod}, #{item.futypecode}, #{item.futypedesc}, #{item.fuadvice}, #{item.fuspecialadvice} |
| | | ) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | |
| | | <update id="updatePatMedInhosp" parameterType="com.smartor.domain.PatMedInhosp"> |
| | | update pat_med_inhosp |
| | | <trim prefix="SET" suffixOverrides=","> |
| | |
| | | leavehospitaldistrictname, |
| | | leavediagname, |
| | | leaveicd10code, |
| | | orgid, |
| | | visit_type |
| | | from service_subtask |
| | | </sql> |
| | |
| | | and b.patid = #{patid} |
| | | </select> |
| | | |
| | | <select id="selectTimelyRate" parameterType="com.smartor.domain.ServiceSubtask" resultType="double"> |
| | | SELECT sum( a.finished )/ sum( 1 ) FROM |
| | | (SELECT id, visit_time, finishtime, |
| | | (CASE WHEN ( DATE_FORMAT( visit_time, '%y%m%d' )< DATE_FORMAT( IF ( ISNULL( finishtime ), NOW(), finishtime |
| | | ), '%y%m%d' ) ) |
| | | THEN 1 ELSE 0 END ) finished,1 AS tasknumber FROM service_subtask |
| | | WHERE del_flag=0 |
| | | <if test="starttime == null and endtime==null"> |
| | | AND visit_time < NOW() |
| | | </if> |
| | | <if test="starttime != null and endtime!=null"> |
| | | AND date_format(visit_time,'%y%m%d') >= date_format(#{starttime},'%y%m%d') |
| | | AND date_format(visit_time,'%y%m%d') <= date_format(#{endtime},'%y%m%d') |
| | | </if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="deptcode != null and deptcode != ''">and deptcode = #{deptcode}</if> |
| | | <if test="deptname != null and deptname != ''">and deptname = #{deptname}</if> |
| | | <if test="leavehospitaldistrictcode != null and leavehospitaldistrictcode != ''">and |
| | | leavehospitaldistrictcode = #{leavehospitaldistrictcode} |
| | | </if> |
| | | <if test="leavehospitaldistrictname != null and leavehospitaldistrictname != ''">and |
| | | leavehospitaldistrictname = #{leavehospitaldistrictname} |
| | | </if> |
| | | ) a |
| | | </select> |
| | | |
| | | <select id="selectTimelyRateDetail" parameterType="com.smartor.domain.ServiceSubtask" |
| | | resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | <where> |
| | | id in ( |
| | | SELECT id FROM |
| | | (SELECT id, visit_time, finishtime, |
| | | (CASE WHEN ( DATE_FORMAT( visit_time, '%y%m%d' ) < DATE_FORMAT( IF ( ISNULL( finishtime ), NOW(), |
| | | finishtime |
| | | ), '%y%m%d' ) ) |
| | | THEN 1 ELSE 0 END ) finished,1 AS tasknumber FROM service_subtask |
| | | WHERE del_flag=0 |
| | | -- AND visit_time < NOW() |
| | | <if test="starttime != null and endtime!=null"> |
| | | AND date_format(visit_time,'%y%m%d') >= date_format(#{starttime},'%y%m%d') |
| | | AND date_format(visit_time,'%y%m%d') <= date_format(#{endtime},'%y%m%d') |
| | | </if> |
| | | <if test="orgid != null and orgid != ''">and orgid = #{orgid}</if> |
| | | <if test="deptcode != null and deptcode != ''">and deptcode = #{deptcode}</if> |
| | | <if test="deptname != null and deptname != ''">and deptname = #{deptname}</if> |
| | | <if test="leavehospitaldistrictcode != null and leavehospitaldistrictcode != ''">and |
| | | leavehospitaldistrictcode = #{leavehospitaldistrictcode} |
| | | </if> |
| | | <if test="leavehospitaldistrictname != null and leavehospitaldistrictname != ''">and |
| | | leavehospitaldistrictname = #{leavehospitaldistrictname} |
| | | </if> |
| | | |
| | | ) a where a.finished =1) |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectServiceSubtaskById" parameterType="Long" resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | where id = #{id} |