| | |
| | | |
| | | try { |
| | | String patid = rsaPublicKeyExample.encryptedData(serviceSubtask.getPatid().toString(), pub_key); |
| | | String subId = rsaPublicKeyExample.encryptedData(serviceSubtask.getId().toString(), pub_key); |
| | | SendMagParam sendMagParam = new SendMagParam(); |
| | | sendMagParam.setType("4"); |
| | | if (type == 1) { |
| | |
| | | ServiceOutPath serviceOutPath = new ServiceOutPath(); |
| | | serviceOutPath.setParam1(taskId); |
| | | serviceOutPath.setParam2(patid); |
| | | serviceOutPath.setParam6(subId); |
| | | serviceOutPath.setCreateTime(new Date()); |
| | | iServiceOutPathService.insertServiceOutPath(serviceOutPath); |
| | | // sendMagParam.setUrl(ip + ":" + req_path + "/followvisit/particty?param1=" + taskId + "¶m2=" + patid + "¶m5=false"); |
| | |
| | | ServiceOutPath serviceOutPath = new ServiceOutPath(); |
| | | serviceOutPath.setParam1(taskId); |
| | | serviceOutPath.setParam2(patid); |
| | | serviceOutPath.setParam6(subId); |
| | | // serviceOutPath.setParam3(URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString())); |
| | | serviceOutPath.setParam3(ivrTask1.getTaskName()); |
| | | serviceOutPath.setCreateTime(new Date()); |
| | |
| | | ServiceOutPath serviceOutPath = new ServiceOutPath(); |
| | | serviceOutPath.setParam1(taskId); |
| | | serviceOutPath.setParam2(patid); |
| | | serviceOutPath.setParam6(subId); |
| | | // serviceOutPath.setParam3(URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString())); |
| | | serviceOutPath.setParam3(ivrTask1.getTaskName()); |
| | | serviceOutPath.setCreateTime(new Date()); |
| | |
| | | return getDataTable(patMedInhospService.getDocAndPat(patMedInhosp)); |
| | | } |
| | | |
| | | // /** |
| | | // * 廿¤ä¸æ£è
å
³èå
³ç³» |
| | | // * |
| | | // * @return |
| | | // */ |
| | | // @ApiOperation("廿¤ä¸æ£è
å
³èå
³ç³»") |
| | | // @GetMapping("/test") |
| | | // public void test() { |
| | | // patMedInhospService.dealOutHospInfo(); |
| | | // } |
| | | |
| | | } |
| | |
| | | @ApiOperation("æ£è
é®é¢ç»æè®°å½(å¤é¾)") |
| | | @PostMapping("/saveQuestionAnswer") |
| | | public AjaxResult saveQuestionAnswer(@RequestBody ServiceSubTaskAnswerReq serviceSubTaskAnswerReq) { |
| | | log.error("-----saveQuestionAnsweræ¹æ³çå
¥å为ï¼{}", serviceSubTaskAnswerReq); |
| | | return toAjax(serviceSubtaskAnswerService.saveQuestionAnswer(serviceSubTaskAnswerReq, 0L)); |
| | | } |
| | | |
| | |
| | | @ApiOperation("æ£è
é®é¢ç»æè®°å½(å°ç¨å
å¤é¾)") |
| | | @PostMapping("/saveQuestionAnswerXCH") |
| | | public AjaxResult saveQuestionAnswerXCH(@RequestBody ServiceSubTaskAnswerReq serviceSubTaskAnswerReq) { |
| | | log.error("-------saveQuestionAnswerXCHçå
¥åçå¼ä¸ºï¼{}", serviceSubTaskAnswerReq); |
| | | return toAjax(serviceSubtaskAnswerService.saveQuestionAnswer(serviceSubTaskAnswerReq, 1L)); |
| | | } |
| | | |
| | |
| | | |
| | | if (CollectionUtils.isNotEmpty(serviceTaskVOS)) { |
| | | for (ServiceTaskVO ServiceTaskVO : serviceTaskVOS) { |
| | | if (serviceTask.getAppltype().equals("1") || serviceTask.getAppltype().equals("2")) { |
| | | ServiceSubtaskVO serviceSubtaskVO = new ServiceSubtaskVO(); |
| | | serviceSubtaskVO.setTaskid(ServiceTaskVO.getTaskid()); |
| | | serviceSubtaskVO.setStartOutHospTime(serviceTask.getStartOutHospTime()); |
| | |
| | | ServiceTaskVO.setYfs(yfs); |
| | | ServiceTaskVO.setWfs(wfs); |
| | | } |
| | | } else if (serviceTask.getAppltype().equals("3") || serviceTask.getAppltype().equals("4")) { |
| | | ServiceSubtaskVO serviceSubtaskVO = new ServiceSubtaskVO(); |
| | | serviceSubtaskVO.setTaskid(ServiceTaskVO.getTaskid()); |
| | | List<ServiceSubtask> ServiceTaskcalls = iServiceTaskCallService.selectServiceSubtaskList(serviceSubtaskVO); |
| | | if (CollectionUtils.isNotEmpty(ServiceTaskcalls)) { |
| | | //å·²åé |
| | | long yfs = ServiceTaskcalls.stream().filter(serviceTaskcall1 -> serviceTaskcall1.getSendstate() != null && serviceTaskcall1.getSendstate() == 3L).collect(Collectors.toList()).stream().count(); |
| | | //æªåé |
| | | long wfs = ServiceTaskcalls.stream().filter(serviceTaskcall1 -> serviceTaskcall1.getSendstate() != null && serviceTaskcall1.getSendstate() == 2L).collect(Collectors.toList()).stream().count(); |
| | | ServiceTaskVO.setYfs(yfs); |
| | | ServiceTaskVO.setWfs(wfs); |
| | | } |
| | | } |
| | | |
| | | } |
| | | //è·åtotal |
| | | long total = PageUtils.count(new ISelect() { |
| | |
| | | public void doSelect() { |
| | | serviceTask.setPageNum(null); |
| | | serviceTask.setPageSize(null); |
| | | serviceTaskService.selectServiceTaskList(serviceTask); |
| | | serviceTaskService.selectServiceTaskAndtaskDeptList(serviceTask); |
| | | } |
| | | }); |
| | | |
| | |
| | | */ |
| | | @ApiOperation("æ¥è¯¢æ¨¡æ¿ç§å®¤å
³èå表") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:taskdiag:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ServiceTaskdiag serviceTaskdiag) |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody ServiceTaskdiag serviceTaskdiag) |
| | | { |
| | | startPage(); |
| | | List<ServiceTaskdiag> list = serviceTaskdiagService.selectServiceTaskdiagList(serviceTaskdiag); |
| | |
| | | @ApiOperation("å 餿¨¡æ¿ç§å®¤å
³è") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:taskdiag:remove')") |
| | | @Log(title = "模æ¿ç§å®¤å
³è", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | @GetMapping("/remove/{id}") |
| | | public AjaxResult remove(@PathVariable Long id) |
| | | { |
| | | return toAjax(serviceTaskdiagService.deleteServiceTaskdiagByIds(ids)); |
| | | return toAjax(serviceTaskdiagService.deleteServiceTaskdiagById(id)); |
| | | } |
| | | } |
| | |
| | | */ |
| | | @ApiOperation("æ¥è¯¢æ¨¡æ¿ç§å®¤å
³èå表") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:taskoper:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ServiceTaskoper serviceTaskoper) |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody ServiceTaskoper serviceTaskoper) |
| | | { |
| | | startPage(); |
| | | List<ServiceTaskoper> list = serviceTaskoperService.selectServiceTaskoperList(serviceTaskoper); |
| | |
| | | @ApiOperation("å 餿¨¡æ¿ç§å®¤å
³è") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:taskoper:remove')") |
| | | @Log(title = "模æ¿ç§å®¤å
³è", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | @GetMapping("/remove/{id}") |
| | | public AjaxResult remove(@PathVariable Long id) |
| | | { |
| | | return toAjax(serviceTaskoperService.deleteServiceTaskoperByIds(ids)); |
| | | return toAjax(serviceTaskoperService.deleteServiceTaskoperById(id)); |
| | | } |
| | | } |
| | |
| | | # å
¬å¸ |
| | | # 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://192.168.191.181:3308/smartor?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | # username: smartor |
| | | # password: Smartor.2023 |
| | | # driverClassName: com.mysql.cj.jdbc.Driver |
| | | |
| | | # å
¬å¸äº |
| | | url: jdbc:mysql://116.62.18.175:6002/smartor_lisui?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: hxsoft |
| | | password: Hxerp2000 |
| | | # 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://192.168.191.181:3308/smartor?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: smartor |
| | | password: Smartor.2023 |
| | | driverClassName: com.mysql.cj.jdbc.Driver |
| | | |
| | | # # å
¬å¸äº |
| | | # url: jdbc:mysql://116.62.18.175:6002/smartor_lisui?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | # username: hxsoft |
| | | # password: Hxerp2000 |
| | | # driverClassName: com.mysql.cj.jdbc.Driver |
| | | |
| | | |
| | | # ä»åºæ°æ®æº |
| | | slave: |
| | | # 仿°æ®æºå¼å
³/é»è®¤å
³é(å
¬å¸) |
| | |
| | | * @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("update sys_menu") |
| | | || originalSql.contains("information_schema.tables") |
| | | || originalSql.contains("information_schema.columns") |
| | | || originalSql.contains("gen_table")) { |
| | | if (originalSql.contains("insert into") || originalSql.contains("INSERT INTO") || originalSql.contains("from sys_menu") || originalSql.contains("update sys_menu") || originalSql.contains("information_schema.tables") || originalSql.contains("information_schema.columns") || originalSql.contains("gen_table")) { |
| | | return originalSql; |
| | | } |
| | | // æå orgid ç WHERE åå¥ |
| | |
| | | // ä¿®æ¹ SQL |
| | | if (originalSql.toUpperCase().contains("WHERE")) { |
| | | // å¨å·²æ WHERE åæ·»å orgid æ¡ä»¶ |
| | | if (originalSql.toUpperCase().contains("(SELECT")) { |
| | | int i = originalSql.toUpperCase().lastIndexOf("WHERE"); |
| | | if (i != -1) { // ç¡®ä¿æ¾å°äºå¹é
项 |
| | | // åå²å符串 |
| | | String before = originalSql.substring(0, i); |
| | | String after = originalSql.substring(i + "WHERE".length()); |
| | | // éæ°ç»åå符串 |
| | | String newString = before + "WHERE " + whereClause + " AND " + after; |
| | | return newString; |
| | | } |
| | | |
| | | } |
| | | return originalSql.replaceFirst("(?i)WHERE", "WHERE " + whereClause + " AND "); |
| | | } else { |
| | | // å¦ææ²¡æ WHEREï¼æ£æ¥æ¯å¦æ ORDER BY æ LIMIT |
| | |
| | | package com.ruoyi.framework.web.service; |
| | | |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.security.core.Authentication; |
| | |
| | | |
| | | /** |
| | | * ç»å½å¯ç æ¹æ³ |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Component |
| | | public class SysPasswordService |
| | | { |
| | | public class SysPasswordService { |
| | | @Autowired |
| | | private RedisCache redisCache; |
| | | |
| | |
| | | |
| | | /** |
| | | * ç»å½è´¦æ·å¯ç é误次æ°ç¼åé®å |
| | | * |
| | | * |
| | | * @param username ç¨æ·å |
| | | * @return ç¼åé®key |
| | | */ |
| | | private String getCacheKey(String username) |
| | | { |
| | | private String getCacheKey(String username) { |
| | | return CacheConstants.PWD_ERR_CNT_KEY + username; |
| | | } |
| | | |
| | | public void validate(SysUser user) |
| | | { |
| | | public void validate(SysUser user) { |
| | | Authentication usernamePasswordAuthenticationToken = AuthenticationContextHolder.getContext(); |
| | | String username = usernamePasswordAuthenticationToken.getName(); |
| | | String password = usernamePasswordAuthenticationToken.getCredentials().toString(); |
| | | |
| | | Integer retryCount = redisCache.getCacheObject(getCacheKey(username)); |
| | | |
| | | if (retryCount == null) |
| | | { |
| | | if (retryCount == null) { |
| | | retryCount = 0; |
| | | } |
| | | |
| | | if (retryCount >= Integer.valueOf(maxRetryCount).intValue()) |
| | | { |
| | | AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, |
| | | MessageUtils.message("user.password.retry.limit.exceed", maxRetryCount, lockTime))); |
| | | if (retryCount >= Integer.valueOf(maxRetryCount).intValue()) { |
| | | AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.password.retry.limit.exceed", maxRetryCount, lockTime))); |
| | | throw new UserPasswordRetryLimitExceedException(maxRetryCount, lockTime); |
| | | } |
| | | |
| | | if (!matches(user, password)) |
| | | { |
| | | if (!matches(user, password)) { |
| | | retryCount = retryCount + 1; |
| | | AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, |
| | | MessageUtils.message("user.password.retry.limit.count", retryCount))); |
| | | AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.password.retry.limit.count", retryCount))); |
| | | redisCache.setCacheObject(getCacheKey(username), retryCount, lockTime, TimeUnit.MINUTES); |
| | | throw new UserPasswordNotMatchException(); |
| | | } |
| | | else |
| | | { |
| | | } else { |
| | | clearLoginRecordCache(username); |
| | | } |
| | | } |
| | | |
| | | public boolean matches(SysUser user, String rawPassword) |
| | | { |
| | | public boolean matches(SysUser user, String rawPassword) { |
| | | return SecurityUtils.matchesPassword(rawPassword, user.getPassword()); |
| | | } |
| | | |
| | | public void clearLoginRecordCache(String loginName) |
| | | { |
| | | if (redisCache.hasKey(getCacheKey(loginName))) |
| | | { |
| | | public void clearLoginRecordCache(String loginName) { |
| | | if (redisCache.hasKey(getCacheKey(loginName))) { |
| | | redisCache.deleteObject(getCacheKey(loginName)); |
| | | } |
| | | } |
| | |
| | | public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException |
| | | { |
| | | String[] split = username.split("&"); |
| | | SysUser user = userService.selectUserByUserName(split[0]); |
| | | SysUser user = userService.selectUserByUserName2(username); |
| | | if (StringUtils.isNull(user)) |
| | | { |
| | | log.info("ç»å½ç¨æ·ï¼{} ä¸åå¨.", username); |
| | |
| | | <orderEntry type="library" name="Maven: xpp3:xpp3_min:1.1.4c" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.36" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.9" level="project" /> |
| | | <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.15" level="project" /> |
| | | <orderEntry type="library" name="Maven: commons-io:commons-io:2.11.0" level="project" /> |
| | | <orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.4" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:4.1.2" level="project" /> |
| | |
| | | <orderEntry type="library" name="Maven: org.springframework:spring-websocket:5.3.20" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.15" level="project" /> |
| | | <orderEntry type="library" name="Maven: commons-httpclient:commons-httpclient:3.1" level="project" /> |
| | | <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.15" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpmime:4.5.13" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.13" level="project" /> |
| | | <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.41" level="project" /> |
| | | <orderEntry type="library" name="Maven: org.springframework:spring-test:5.3.20" level="project" /> |
| | | </component> |
| | | </module> |
| | | </module> |
| | |
| | | */ |
| | | @ApiOperation("æ¥è¯¢${functionName}å表") |
| | | //@PreAuthorize("@ss.hasPermi('${permissionPrefix}:list')") |
| | | @GetMapping("/list") |
| | | @PostMapping("/list") |
| | | #if($table.crud || $table.sub) |
| | | public TableDataInfo list(${ClassName} ${className}) |
| | | public TableDataInfo list(@RequestBody ${ClassName} ${className}) |
| | | { |
| | | startPage(); |
| | | List<${ClassName}> list = ${className}Service.select${ClassName}List(${className}); |
| | |
| | | resultMap="${ClassName}Result"> |
| | | <include refid="select${ClassName}Vo"/> |
| | | <where> |
| | | del_flag=0 |
| | | #foreach($column in $columns) |
| | | #set($queryType=$column.queryType) |
| | | #set($javaField=$column.javaField) |
| | |
| | | import com.smartor.mapper.ServiceTaskMapper; |
| | | import com.smartor.mapper.SysUserImportMapper; |
| | | import com.smartor.service.*; |
| | | import com.sun.org.apache.bcel.internal.generic.NEW; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | |
| | | |
| | | @Autowired |
| | | private IPatMedInhospService iPatMedInhospService; |
| | | |
| | | @Autowired |
| | | private IPatMedOperationService iPatMedOperationService; |
| | | |
| | | @Autowired |
| | | private IServiceSubtaskService iServiceSubtaskService; |
| | |
| | | * å¤çææ¯ä¿¡æ¯ï¼è¿å
¥åä»»å¡è¡¨ |
| | | */ |
| | | public void dealOperationInfo() { |
| | | iPatMedInhospService.dealOutHospInfo(); |
| | | iPatMedOperationService.dealOperationInfo(); |
| | | } |
| | | |
| | | /** |
| | |
| | | //纸质 |
| | | } else if (descByCode.equals("微信å°ç¨åº")) { |
| | | //微信å°ç¨åº |
| | | if (ivrTask1.getPatCycle() == 1) { |
| | | log.error("ivrTask1çå¼ä¸ºï¼{}", ivrTask1); |
| | | if (ObjectUtils.isNotEmpty(ivrTask1) && ivrTask1.getPatCycle() == 1) { |
| | | //说æè¯¥ä»»å¡çæ£è
æ¯å¾ªç¯æ§è¡ç |
| | | ServiceSubtaskVO serviceSubtaskVO = new ServiceSubtaskVO(); |
| | | serviceSubtaskVO.setTaskid(ivrTask1.getTaskid()); |
| | |
| | | //å°åä»»å¡IDå é¤ ãsendstateæ¹æ3 |
| | | serviceSubtask.setSendstate(3L); |
| | | serviceSubtask.setId(null); |
| | | serviceSubtask.setFinishtime(null); |
| | | serviceSubtask.setCreateTime(new Date()); |
| | | serviceSubtask.setUpdateTime(new Date()); |
| | | serviceSubtaskMapper.insertServiceSubtask(serviceSubtask); |
| | | //å¤çé夿°å¢é®é¢ï¼å
æ¥ä¸ä¸ä»å¤©æ¯ä¸æ¯ææ°å¢è¿ï¼æ°å¢è¿å°±ä¸æ°å¢äº |
| | | ServiceSubtaskVO ssvo = new ServiceSubtaskVO(); |
| | | LocalDate today = LocalDate.now(); |
| | | LocalTime startOfDay = LocalTime.of(0, 0, 0); |
| | | LocalTime endOfDay = LocalTime.of(23, 59, 59); |
| | | Date startOfDayDate = Date.from(today.atTime(startOfDay).atZone(ZoneId.systemDefault()).toInstant()); |
| | | Date endOfDayDate = Date.from(today.atTime(endOfDay).atZone(ZoneId.systemDefault()).toInstant()); |
| | | ssvo.setCreateStartTime(startOfDayDate); |
| | | ssvo.setCreateEndTime(endOfDayDate); |
| | | ssvo.setCreateBy(serviceSubtask.getCreateBy()); |
| | | List<ServiceSubtask> serviceSubtaskListByCreateTime = serviceSubtaskMapper.selectServiceSubtaskListByCreateTime(ssvo); |
| | | if (CollectionUtils.isEmpty(serviceSubtaskListByCreateTime)) |
| | | serviceSubtaskMapper.insertServiceSubtask(serviceSubtask); |
| | | } |
| | | } |
| | | } else if (descByCode.equals("çä¿¡")) { |
| | |
| | | continue; |
| | | } |
| | | String patid = rsaPublicKeyExample.encryptedData(serviceSubtask.getPatid().toString(), pub_key); |
| | | String subId = rsaPublicKeyExample.encryptedData(serviceSubtask.getId().toString(), pub_key); |
| | | SendMagParam sendMagParam = new SendMagParam(); |
| | | sendMagParam.setType("4"); |
| | | ServiceOutPath serviceOutPath = new ServiceOutPath(); |
| | | serviceOutPath.setParam1(taskId); |
| | | serviceOutPath.setParam2(patid); |
| | | serviceOutPath.setParam3(ivrTask1.getTaskName()); |
| | | serviceOutPath.setParam6(subId); |
| | | serviceOutPath.setCreateTime(new Date()); |
| | | iServiceOutPathService.insertServiceOutPath(serviceOutPath); |
| | | String format = String.format("%03X", serviceOutPath.getId()); |
| | |
| | | patArchive.setSex(thiedInhospInfo.getPatiRecordGender().equals("ç·") ? 1L : 2L); |
| | | patArchive.setNation(thiedInhospInfo.getPatiNation()); |
| | | patArchive.setNativePlace(thiedInhospInfo.getPatiNationality()); |
| | | patArchive.setPlaceOfResidence(thiedInhospInfo.getPatiHomeAddr()); |
| | | patArchive.setPlaceOfResidence(StringUtils.isNotEmpty(thiedInhospInfo.getPatiHomeAddr()) ? thiedInhospInfo.getPatiHomeAddr().replace("null", "") : ""); |
| | | try { |
| | | if (StringUtils.isNotEmpty(thiedInhospInfo.getPatiBirthday())) |
| | | patArchive.setBirthdate(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(thiedInhospInfo.getPatiBirthday())); |
| | |
| | | patMedInhosp.setLeavehospitaldistrictcode(thiedInhospInfo.getCurrWardId()); |
| | | patMedInhosp.setLeavehospitaldistrictname(thiedInhospInfo.getCurrWardName()); |
| | | patMedInhosp.setLeaveldeptid(thiedInhospInfo.getCurrDeptCode()); |
| | | patMedInhosp.setOrgid("1"); |
| | | //妿æ¯åºé¢ï¼å
éè¿æ£è
ç¼å·åæµæ°´å·å»æ¥ä¸ä¸ï¼æ£è
æ¯å¦åå¨ï¼å¦æåå¨ï¼åè¿è¡ä¿®æ¹ |
| | | PatMedInhosp inhosp = new PatMedInhosp(); |
| | | inhosp.setPatno(patArchive.getPatientno()); |
| | |
| | | * @return ç¨æ·å¯¹è±¡ä¿¡æ¯ |
| | | */ |
| | | public SysUser selectUserByUserName(String userName); |
| | | /** |
| | | * éè¿ç¨æ·åæ¥è¯¢ç¨æ· |
| | | * |
| | | * @param userName ç¨æ·å |
| | | * @return ç¨æ·å¯¹è±¡ä¿¡æ¯ |
| | | */ |
| | | public SysUser selectUserByUserNameByCondition(@Param("userName") String userName, @Param("orgid") String orgid); |
| | | |
| | | /** |
| | | * éè¿ç¨æ·IDæ¥è¯¢ç¨æ· |
| | |
| | | * @return ç¨æ·å¯¹è±¡ä¿¡æ¯ |
| | | */ |
| | | public SysUser selectUserByUserName(String userName); |
| | | /** |
| | | * éè¿ç¨æ·åæ¥è¯¢ç¨æ· |
| | | * |
| | | * @param userName ç¨æ·å |
| | | * @return ç¨æ·å¯¹è±¡ä¿¡æ¯ |
| | | */ |
| | | public SysUser selectUserByUserName2(String userName); |
| | | |
| | | /** |
| | | * éè¿ç¨æ·IDæ¥è¯¢ç¨æ· |
| | |
| | | return sysUser; |
| | | } |
| | | |
| | | @Override |
| | | public SysUser selectUserByUserName2(String userName) { |
| | | String[] split = userName.split("&"); |
| | | SysUser sysUser = userMapper.selectUserByUserNameByCondition(split[0], split[1]); |
| | | List<SysDept> sysDepts = null; |
| | | if (StringUtils.isNotEmpty(split[0]) && split[0].equals("admin")) { |
| | | SysDept dept = new SysDept(); |
| | | dept.setOrgid(split[1]); |
| | | sysDepts = sysDeptMapper.selectDeptList(dept); |
| | | } else { |
| | | sysDepts = sysUserDeptMapper.selectDeptListByUserId(sysUser.getUserId()); |
| | | } |
| | | List<Long> deptIds = new ArrayList<>(); |
| | | for (SysDept sysDept : sysDepts) { |
| | | deptIds.add(sysDept.getDeptId()); |
| | | } |
| | | SysUserDept sysUserDept = new SysUserDept(); |
| | | sysUserDept.setUserId(sysUser.getUserId()); |
| | | sysUserDept.setDeptType(sysUser.getSearchscope()); |
| | | List<SysUserDept> sysUserDeptKSs = null; |
| | | List<SysUserDept> sysUserDeptBQs = null; |
| | | if (StringUtils.isNotEmpty(sysUser.getSearchscope()) && sysUser.getSearchscope().equals("0")) { |
| | | if (StringUtils.isNotEmpty(split[0]) && split[0].equals("admin")) { |
| | | sysUserDept.setUserId(null); |
| | | } |
| | | sysUserDept.setDeptType("1"); |
| | | sysUserDeptKSs = sysUserDeptMapper.selectSysUserDeptList(sysUserDept); |
| | | sysUserDept.setDeptType("2"); |
| | | sysUserDeptBQs = sysUserDeptMapper.selectSysUserDeptList(sysUserDept); |
| | | //妿æ¯adminï¼éè¦å¯¹sysUserDeptBQsï¼sysUserDeptBQså»é |
| | | if (StringUtils.isNotEmpty(split[0]) && split[0].equals("admin")) { |
| | | List<SysUserDept> distinctUserDepts = new ArrayList<>(); |
| | | Set<String> uniqueDeptCodes = new HashSet<>(); |
| | | for (SysUserDept userDept : sysUserDeptKSs) { |
| | | String deptCode = userDept.getDeptCode(); |
| | | if (!uniqueDeptCodes.contains(deptCode)) { |
| | | distinctUserDepts.add(userDept); |
| | | uniqueDeptCodes.add(deptCode); |
| | | } |
| | | } |
| | | |
| | | List<SysUserDept> distinctUserBQs = new ArrayList<>(); |
| | | Set<String> uniqueBQCodes = new HashSet<>(); |
| | | for (SysUserDept userDept : sysUserDeptBQs) { |
| | | String deptCode = userDept.getDeptCode(); |
| | | if (!uniqueBQCodes.contains(deptCode)) { |
| | | distinctUserBQs.add(userDept); |
| | | uniqueBQCodes.add(deptCode); |
| | | } |
| | | } |
| | | sysUserDeptKSs = distinctUserDepts; |
| | | sysUserDeptBQs = distinctUserBQs; |
| | | } |
| | | |
| | | } else if (StringUtils.isNotEmpty(sysUser.getSearchscope()) && sysUser.getSearchscope().equals("1")) { |
| | | sysUserDept.setDeptType("1"); |
| | | sysUserDeptKSs = sysUserDeptMapper.selectSysUserDeptList(sysUserDept); |
| | | } else if (StringUtils.isNotEmpty(sysUser.getSearchscope()) && sysUser.getSearchscope().equals("2")) { |
| | | sysUserDept.setDeptType("2"); |
| | | sysUserDeptBQs = sysUserDeptMapper.selectSysUserDeptList(sysUserDept); |
| | | } |
| | | |
| | | sysUser.setDepts(deptIds); |
| | | if (!CollectionUtils.isEmpty(sysUserDeptBQs)) { |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | for (SysUserDept sud : sysUserDeptBQs) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("districtCode", ""); |
| | | if (StringUtils.isNotEmpty(sud.getDeptCode())) map.put("districtCode", sud.getDeptCode()); |
| | | map.put("districtName", ""); |
| | | if (StringUtils.isNotEmpty(sud.getDeptName())) map.put("districtName", sud.getDeptName()); |
| | | list.add(map); |
| | | } |
| | | sysUser.setBelongWards(list); |
| | | } |
| | | if (!CollectionUtils.isEmpty(sysUserDeptKSs)) { |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | for (SysUserDept sud : sysUserDeptKSs) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("deptCode", ""); |
| | | if (StringUtils.isNotEmpty(sud.getDeptCode())) map.put("deptCode", sud.getDeptCode()); |
| | | map.put("deptName", ""); |
| | | if (StringUtils.isNotEmpty(sud.getDeptName())) map.put("deptName", sud.getDeptName()); |
| | | list.add(map); |
| | | } |
| | | sysUser.setBelongDepts(list); |
| | | } |
| | | return sysUser; |
| | | } |
| | | |
| | | /** |
| | | * éè¿ç¨æ·IDæ¥è¯¢ç¨æ· |
| | | * |
| | |
| | | d.email, |
| | | d.status, |
| | | d.his_dept_id, |
| | | d.his_parent_id |
| | | d.his_parent_id, |
| | | (select dept_name from sys_dept where dept_id = d.parent_id) parent_name |
| | | from sys_dept d |
| | | where d.dept_id = #{deptId} |
| | |
| | | where u.user_name = #{userName} and u.del_flag = '0' |
| | | </select> |
| | | |
| | | <select id="selectUserByUserNameByCondition" parameterType="String" resultMap="SysUserResult"> |
| | | <include refid="selectUserVo"/> |
| | | <where> |
| | | u.del_flag = '0' |
| | | <if test="userName != null and userName != ''"> |
| | | AND u.user_name = #{userName} |
| | | </if> |
| | | <if test="orgid != null and orgid != ''"> |
| | | AND u.orgid = #{orgid} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectUserById" parameterType="Long" resultMap="SysUserResult"> |
| | | <include refid="selectUserVo"/> |
| | | where u.user_id = #{userId} |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.domain; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author æ¥æ¶ç¬¬ä¸æ¹æ£è
è¯æä¿¡æ¯ |
| | | * @date 2024-12-13 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "ExternalInHospPatientInfo", description = "æ¥æ¶ç¬¬ä¸æ¹æ£è
è¯æä¿¡æ¯") |
| | | public class ExternalDiagnosisInfo extends BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "è¯æç±»å«ä»£ç ") |
| | | private String ZhenDuanLBDM; |
| | | |
| | | @ApiModelProperty(value = "è¯æç±»å«åç§°") |
| | | private String ZhenDuanLBMC; |
| | | |
| | | @ApiModelProperty(value = "ä¸å»è¯ææ å¿") |
| | | private String ZhongYiZDBZ; |
| | | |
| | | @ApiModelProperty(value = "ä¸å»ç侯 ID") |
| | | private String ZhongYiZHID; |
| | | |
| | | @ApiModelProperty(value = "ä¸å»ç侯åç§°") |
| | | private String ZhongYiZHMC; |
| | | |
| | | @ApiModelProperty(value = "è¯æå»ç ID") |
| | | private String ZhenDuanYSID; |
| | | |
| | | @ApiModelProperty(value = "è¯æå»çå§å") |
| | | private String ZhenDuanYSXM; |
| | | |
| | | @ApiModelProperty(value = "è¯ææ¶é´") |
| | | private Date ZhenDuanSJ; |
| | | |
| | | @ApiModelProperty(value = "åç
æ¥æ") |
| | | private Date FaBingRQ; |
| | | |
| | | @ApiModelProperty(value = "è¯æ ID") |
| | | private String ZhenDuanID; |
| | | |
| | | @ApiModelProperty(value = "è¯æåç§°") |
| | | private String ZhenDuanMC; |
| | | } |
| | |
| | | private String FUJIBMC; |
| | | |
| | | @ApiModelProperty(value = "ICD9") |
| | | private String ICD9; |
| | | private String IcD9; |
| | | |
| | | @ApiModelProperty(value = "ICD9") |
| | | private String ICD10; |
| | | @ApiModelProperty(value = "IcD10") |
| | | private String IcD10; |
| | | |
| | | @ApiModelProperty(value = "ç¾ç
å类代ç ") |
| | | private String JiBingFLDM; |
| | |
| | | @ApiModelProperty(value = "èç³»çµè¯") |
| | | private String LianXiDH; |
| | | |
| | | @ApiModelProperty(value = "è系人çµè¯") |
| | | private String LianXiRDH; |
| | | |
| | | @ApiModelProperty(value = "åä½çµè¯") |
| | | private String DanWeiDH; |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.domain; |
| | | |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author æ¥æ¶ç¬¬ä¸æ¹æ£è
å°±è¯ä¿¡æ¯ |
| | | * @date 2024-12-13 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "ExternalInHospPatientInfo", description = "æ¥æ¶ç¬¬ä¸æ¹æ£è
è¯æä¿¡æ¯") |
| | | public class ExternalJZInfo extends BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "å°±è¯ç§å®¤ ID") |
| | | private String JiuZhenKSID; |
| | | |
| | | @ApiModelProperty(value = "å°±è¯ç§å®¤åç§°") |
| | | private String JiuZhenKSMC; |
| | | |
| | | @ApiModelProperty(value = "å°±è¯å»ç ID") |
| | | private String JiuZhenYSID; |
| | | |
| | | @ApiModelProperty(value = "å°±è¯å»çåç§°") |
| | | private String JiuZhenYSMC; |
| | | |
| | | @ApiModelProperty(value = "å°±è¯æ¥æ") |
| | | private Date JiuZhenRQ; |
| | | |
| | | @ApiModelProperty(value = "æ£è
å»å代ç ") |
| | | private String HuanZheQXDM; |
| | | |
| | | @ApiModelProperty(value = "æ£è
å»ååç§°") |
| | | private String HuanZheQXMC; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.domain; |
| | | |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author æ¥æ¶ç¬¬ä¸æ¹æ£è
é®è¯ä¿¡æ¯ |
| | | * @date 2024-12-13 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "ExternalWZInfo", description = "æ¥æ¶ç¬¬ä¸æ¹æ£è
é®è¯ä¿¡æ¯") |
| | | public class ExternalWZInfo extends BaseEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "é®è¯ç±»å代ç ") |
| | | private String WenZhenLXDM; |
| | | |
| | | @ApiModelProperty(value = "é®è¯ç±»ååç§°") |
| | | private String WenZhenLXMC; |
| | | |
| | | @ApiModelProperty(value = "å
容") |
| | | private String NeiRong; |
| | | |
| | | @ApiModelProperty(value = "é®è¯æ¶é´") |
| | | private Date WenZhenSJ; |
| | | |
| | | @ApiModelProperty(value = "é®è¯å»çID") |
| | | private Date WenZhenYSID; |
| | | |
| | | @ApiModelProperty(value = "é®è¯å»çå§å") |
| | | private String WenZhenYSXM; |
| | | |
| | | @ApiModelProperty(value = "é®è¯ç§å®¤ID") |
| | | private String WenZhenKSID; |
| | | |
| | | @ApiModelProperty(value = "é®è¯ç§å®¤åç§°") |
| | | private String WenZhenKSMC; |
| | | |
| | | } |
| | |
| | | private String icdcode; |
| | | |
| | | /** |
| | | * HISçicd10id |
| | | */ |
| | | @ApiModelProperty("HISçicd10id") |
| | | @Excel(name = "HISçicd10id") |
| | | private String hisIcdid; |
| | | |
| | | /** |
| | | * icd10åç§° |
| | | */ |
| | | @ApiModelProperty("icd10åç§°") |
| | |
| | | private String param2; |
| | | |
| | | /** |
| | | * åä»»å¡ID |
| | | */ |
| | | @ApiModelProperty("åä»»å¡ID") |
| | | private String param6; |
| | | |
| | | |
| | | /** |
| | | * task_name |
| | | */ |
| | | @ApiModelProperty("task_name") |
| | |
| | | @ApiModelProperty(value = "ç»æåºé¢æ¥æ") |
| | | private Date endOutHospTime; |
| | | |
| | | /** |
| | | * ç§å®¤ä¸ç
åºçæ¥è¯¢æ¯orè¿æ¯and: 1:and(é»è®¤) 2:or |
| | | */ |
| | | @ApiModelProperty(value = "ç§å®¤ä¸ç
åºçæ¥è¯¢æ¯orè¿æ¯and: 1:and(é»è®¤) 2:or ") |
| | | private String deptOrDistrict = "1"; |
| | | |
| | | /** |
| | | * å建å¼å§æ¶é´ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createStartTime; |
| | | |
| | | /** |
| | | * åå»ºç»ææ¶é´ |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createEndTime; |
| | | |
| | | } |
| | |
| | | private Long taskid; |
| | | |
| | | /** |
| | | * åéå¤©æ° |
| | | */ |
| | | @Excel(name = "åé天æ°") |
| | | @ApiModelProperty(value = "åé天æ°") |
| | | private Long sendDay; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | @Excel(name = " ") |
| | |
| | | @ApiModelProperty("èç³»çµè¯") |
| | | @Excel(name = "èç³»çµè¯") |
| | | private String companyTelNum; |
| | | |
| | | /** |
| | | * æ°æ®ç±»å |
| | | */ |
| | | @ApiModelProperty("åºçæ¥æ") |
| | | @Excel(name = "åºçæ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private String patiBirthday; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public List<ServiceSubtask> selectServiceSubtaskList(ServiceSubtaskVO serviceSubtaskVO); |
| | | |
| | | public List<ServiceSubtask> selectServiceSubtaskListByCreateTime(ServiceSubtaskVO serviceSubtaskVO); |
| | | |
| | | /** |
| | | * æ°å¢åä¸ä»»å¡ï¼éè®¿ï¼ |
| | | * |
| | |
| | | List<ServiceCheck> serviceChecks = serviceCheckMapper.selectServiceCheckList(serviceCheck); |
| | | //è·åæ£è
ä¿¡æ¯ |
| | | PatArchive patArchive = patArchiveMapper.selectPatArchiveByPatid(patMedInhosp1.getPatid()); |
| | | if (Objects.isNull(patArchive)) { |
| | | patMedInhosp1.setCheckFlag("2"); |
| | | patMedInhosp1.setLongTaskReason("æ£è
åºæ¬ä¿¡æ¯ä¸ºç©º"); |
| | | patMedInhospMapper.updatePatMedInhosp(patMedInhosp1); |
| | | continue; |
| | | } |
| | | try { |
| | | if (CollectionUtils.isEmpty(serviceChecks) || serviceChecks != null && serviceChecks.get(0).getCheckVisitFlag() == 1 || serviceChecks != null && serviceChecks.get(0).getCheckVisitFlag() == 3) { |
| | | //æ ¹æ®æ£è
æå¨ç§å®¤ï¼è·å该ç§å®¤çé¿æä»»å¡ |
| | |
| | | i = serviceSubtaskMapper.insertServiceSubtask(serviceSubtask); |
| | | } |
| | | } |
| | | } else { |
| | | i = serviceSubtaskMapper.insertServiceSubtask(serviceSubtask); |
| | | } |
| | | } else { |
| | | i = serviceSubtaskMapper.insertServiceSubtask(serviceSubtask); |
| | |
| | | private PatMedOperationItemMapper patMedOperationItemMapper; |
| | | @Autowired |
| | | private Icd10Mapper icd10Mapper; |
| | | @Autowired |
| | | private PatMedOuthospMapper patMedOuthospMapper; |
| | | |
| | | @Value("${defaultPwd}") |
| | | private String defaultPwd; |
| | |
| | | log.error("ServiceExternalServiceImpl---addOutHospInfoçæ°å¢çå¼ä¸ºï¼{}", dataMap); |
| | | Map yeWuXX = (Map) dataMap.get("YeWuXX"); |
| | | Map<String, Object> BingRenXX = (Map<String, Object>) yeWuXX.get("BingRenXX"); |
| | | List<HashMap<String, Object>> epai = (List<HashMap<String, Object>>) yeWuXX.get("DiZhiXXList"); |
| | | List<HashMap<String, Object>> epli = (List<HashMap<String, Object>>) yeWuXX.get("LianXiRList"); |
| | | ExternalInHospPatientInfo externalInHospPatientInfo = BeanUtil.mapToBean(BingRenXX, ExternalInHospPatientInfo.class, true); |
| | | ExternalInHospPatientAddrInfo externalInHospPatientAddrInfo = null; |
| | | ExternalInHospPatientLiaisonInfo externalInHospPatientLiaisonInfo = null; |
| | | List<ExternalInHospPatientAddrInfo> epai2 = epai.stream().map(map -> { |
| | | ExternalInHospPatientAddrInfo info = new ExternalInHospPatientAddrInfo(); |
| | | info.setDiZhiLX((String) map.get("DiZhiLX")); // åè®¾åæ®µç±»åæ¯ Integer |
| | | info.setDiZhiXX((String) map.get("DiZhiXX")); |
| | | info.setShengFenDM((String) map.get("ShengFenDM")); |
| | | info.setShengFenMC((String) map.get("ShengFenMC")); |
| | | info.setShiDiQDM((String) map.get("ShiDiQDM")); |
| | | info.setShiDiQMC((String) map.get("ShiDiQMC")); |
| | | info.setXianQuDM((String) map.get("XianQuDM")); |
| | | info.setXianQuMC((String) map.get("XianQuMC")); |
| | | info.setXiangZhenDM((String) map.get("XiangZhenDM")); |
| | | info.setXiangZhenMC((String) map.get("XiangZhenMC")); |
| | | info.setCunJiDM((String) map.get("CunJiDM")); |
| | | info.setQiTaXX((String) map.get("QiTaXX")); |
| | | info.setYouBian((String) map.get("YouBian")); |
| | | return info; |
| | | }).collect(Collectors.toList()); |
| | | |
| | | List<ExternalInHospPatientLiaisonInfo> epli2 = epli.stream().map(map -> { |
| | | ExternalInHospPatientLiaisonInfo info = new ExternalInHospPatientLiaisonInfo(); |
| | | info.setLianXiRXM((String) map.get("LianXiRXM")); |
| | | info.setLianXiRDH((String) map.get("LianXiRDH")); |
| | | info.setGuanXiDM((String) map.get("GuanXiDM")); |
| | | info.setGuanXiMC((String) map.get("GuanXiMC")); |
| | | return info; |
| | | }).collect(Collectors.toList()); |
| | | if (CollectionUtils.isNotEmpty(epai)) externalInHospPatientAddrInfo = epai2.get(0); |
| | | if (CollectionUtils.isNotEmpty(epli)) externalInHospPatientLiaisonInfo = epli2.get(0); |
| | | //æ°å¢æ£è
åºæ¬ä¿¡æ¯æ°å¢æä¿®æ¹ |
| | | addPatArchive(externalInHospPatientInfo, externalInHospPatientAddrInfo, externalInHospPatientLiaisonInfo); |
| | | |
| | | PatMedInhosp patMedInhosp = new PatMedInhosp(); |
| | | patMedInhosp.setInhospno(externalInHospPatientInfo.getZhuYuanHao()); |
| | |
| | | }).collect(Collectors.toList()); |
| | | patMedInhosp1.setLeaveicd10code(StringUtils.isNotEmpty(patMedInhosp1.getLeaveicd10code()) ? patMedInhosp1.getLeaveicd10code() + "," + hospPatientDiagnoseInfos2.get(0).getZhenDuanID() : hospPatientDiagnoseInfos2.get(0).getZhenDuanID()); |
| | | patMedInhosp1.setLeavediagname(StringUtils.isNotEmpty(patMedInhosp1.getLeavediagname()) ? patMedInhosp1.getLeavediagname() + "," + hospPatientDiagnoseInfos2.get(0).getZhenDuanMC() : hospPatientDiagnoseInfos2.get(0).getZhenDuanMC()); |
| | | |
| | | patMedInhosp1.setInhospstate("1"); |
| | | int i = patMedInhospMapper.updatePatMedInhosp(patMedInhosp1); |
| | | if (i != 1) return false; |
| | | } |
| | |
| | | |
| | | @Override |
| | | public Boolean addFinshJZInfo(Map dataMap) { |
| | | //è¿ä¸ªå
çç |
| | | log.error("ServiceExternalServiceImpl---addFinshJZInfoçæ°å¢çå¼ä¸ºï¼{}", dataMap); |
| | | Map yeWuXX = (Map) dataMap.get("YeWuXX"); |
| | | Map<String, Object> BingRenXX = (Map<String, Object>) yeWuXX.get("BingRenXX"); |
| | | Map<String, Object> JiuZhenXX = (Map<String, Object>) yeWuXX.get("JiuZhenXX"); |
| | | List<HashMap<String, Object>> ZhenDuanList = (List<HashMap<String, Object>>) yeWuXX.get("ZhenDuanList"); |
| | | List<HashMap<String, Object>> externalWZInfos = (List<HashMap<String, Object>>) yeWuXX.get("WenZhenList"); |
| | | ExternalInHospPatientInfo externalInHospPatientInfo = BeanUtil.mapToBean(BingRenXX, ExternalInHospPatientInfo.class, true); |
| | | ExternalJZInfo externalJZInfo = BeanUtil.mapToBean(JiuZhenXX, ExternalJZInfo.class, true); |
| | | List<ExternalDiagnosisInfo> externalDiagnosisInfoList = ZhenDuanList.stream().map(map -> { |
| | | ExternalDiagnosisInfo info = new ExternalDiagnosisInfo(); |
| | | info.setZhenDuanYSID((String) map.get("ZhenDuanYSID")); |
| | | info.setZhenDuanYSXM((String) map.get("ZhenDuanYSXM")); |
| | | info.setZhenDuanID((String) map.get("ZhenDuanID")); |
| | | info.setZhenDuanMC((String) map.get("ZhenDuanMC")); |
| | | info.setZhenDuanLBDM((String) map.get("ZhenDuanLBDM")); |
| | | info.setZhenDuanLBMC((String) map.get("ZhenDuanLBMC")); |
| | | return info; |
| | | }).collect(Collectors.toList()); |
| | | |
| | | return null; |
| | | List<ExternalWZInfo> ExternalWZInfoList = externalWZInfos.stream().map(map -> { |
| | | ExternalWZInfo info = new ExternalWZInfo(); |
| | | info.setWenZhenLXMC((String) map.get("WenZhenLXMC")); |
| | | info.setNeiRong((String) map.get("NeiRong")); |
| | | return info; |
| | | }).collect(Collectors.toList()); |
| | | |
| | | PatArchive patArchive = addPatArchive(externalInHospPatientInfo, null, null); |
| | | |
| | | PatMedOuthosp patMedOuthosp = new PatMedOuthosp(); |
| | | patMedOuthosp.setOuthospno(externalInHospPatientInfo.getBingAnHao()); |
| | | patMedOuthosp.setSerialnum(externalInHospPatientInfo.getBingAnHao()); |
| | | patMedOuthosp.setPatid(patArchive.getId()); |
| | | patMedOuthosp.setPatname(externalInHospPatientInfo.getXingMing()); |
| | | patMedOuthosp.setHospitalname(externalInHospPatientInfo.getZuZhiJGMC()); |
| | | patMedOuthosp.setHospitalcode(externalInHospPatientInfo.getZuZhiJGID()); |
| | | patMedOuthosp.setDeptname(externalJZInfo.getJiuZhenKSMC()); |
| | | patMedOuthosp.setDeptcode(externalJZInfo.getJiuZhenKSID()); |
| | | patMedOuthosp.setAdmitdate(externalJZInfo.getJiuZhenRQ()); |
| | | |
| | | Map XiaoXiTou = (Map) dataMap.get("XiaoXiTou"); |
| | | String FaSongJGID = XiaoXiTou.get("FaSongJGID").toString(); |
| | | patMedOuthosp.setOrgid(FaSongJGID); |
| | | |
| | | for (ExternalDiagnosisInfo externalDiagnosisInfo : externalDiagnosisInfoList) { |
| | | if (externalDiagnosisInfo.getZhenDuanLBMC().equals("ä¸»è¯æ")) { |
| | | patMedOuthosp.setDiagname(externalDiagnosisInfo.getZhenDuanMC()); |
| | | patMedOuthosp.setIcd10code(externalDiagnosisInfo.getZhenDuanID()); |
| | | patMedOuthosp.setDrcode(externalDiagnosisInfo.getZhenDuanYSID()); |
| | | patMedOuthosp.setDrname(externalDiagnosisInfo.getZhenDuanYSXM()); |
| | | } |
| | | } |
| | | for (ExternalWZInfo externalWZInfo : ExternalWZInfoList) { |
| | | if (externalWZInfo.getWenZhenLXMC().equals("ç°ç
å²")) { |
| | | patMedOuthosp.setHpi(externalWZInfo.getNeiRong()); |
| | | } |
| | | if (externalWZInfo.getWenZhenLXMC().equals("主è¯")) { |
| | | patMedOuthosp.setMainsuit(externalWZInfo.getNeiRong()); |
| | | } |
| | | } |
| | | int i = patMedOuthospMapper.insertPatMedOuthosp(patMedOuthosp); |
| | | if (i > 0) { |
| | | return true; |
| | | } |
| | | |
| | | return false; |
| | | } |
| | | |
| | | @Override |
| | | public Boolean addDiseaseInfo(Map dataMap) { |
| | | log.error("ServiceExternalServiceImpl---addDiseaseInfoçæ°å¢çå¼ä¸ºï¼{}", dataMap); |
| | | Map yeWuXX = (Map) dataMap.get("YeWuXX"); |
| | | Map<String, Object> JiBing = (Map<String, Object>) yeWuXX.get("JiBing"); |
| | | Map<String, Object> JiBing = (Map<String, Object>) yeWuXX.get("JiBingMLXX"); |
| | | ExternalDiseaseInfo externalDiseaseInfo = BeanUtil.mapToBean(JiBing, ExternalDiseaseInfo.class, true); |
| | | Map XiaoXiTou = (Map) dataMap.get("XiaoXiTou"); |
| | | String FaSongJGID = XiaoXiTou.get("FaSongJGID").toString(); |
| | | Icd10 icd10 = new Icd10(); |
| | | icd10.setIcdcode(externalDiseaseInfo.getJiBingID()); |
| | | icd10.setIcdcode(externalDiseaseInfo.getIcD10()); |
| | | icd10.setHisIcdid(externalDiseaseInfo.getJiBingID()); |
| | | icd10.setIcdname(externalDiseaseInfo.getJiBingMC()); |
| | | icd10.setGuid(externalDiseaseInfo.getZuZhiJGID()); |
| | | icd10.setOrgid(externalDiseaseInfo.getZuZhiJGID()); |
| | | icd10.setLastflag(externalDiseaseInfo.getMOJIBZ()); |
| | | icd10.setChimedflag("" + externalDiseaseInfo.getZhongYiZDBZ()); |
| | | icd10.setOrgid(FaSongJGID); |
| | | // icd10Association.setIcd10AssortName(externalDiseaseInfo.getJiBingFLMC()); |
| | | // icd10Association.setChineseMedicineDiagnoseSign(externalDiseaseInfo.getZhongYiZDBZ()); |
| | | // icd10Association.setChineseMedicineDiagnoseAssortCode(externalDiseaseInfo.getZhongYiZDFLDM()); |
| | |
| | | private PatArchive addPatArchive(ExternalInHospPatientInfo externalInHospPatientInfo, ExternalInHospPatientAddrInfo externalInHospPatientAddrInfo, ExternalInHospPatientLiaisonInfo externalInHospPatientLiaisonInfo) { |
| | | PatArchive patArchive = new PatArchive(); |
| | | patArchive.setIdcardno(externalInHospPatientInfo.getZhengJianHM()); |
| | | patArchive.setOrgid(externalInHospPatientInfo.getZuZhiJGID()); |
| | | List<PatArchive> patArchives = patArchiveMapper.selectPatArchiveList(patArchive); |
| | | patArchive.setPatientno(externalInHospPatientInfo.getJiuZhenKH()); |
| | | patArchive.setBirthdate(externalInHospPatientInfo.getChuShengRQ()); |
| | | patArchive.setPatidHis(externalInHospPatientInfo.getBingRenID()); |
| | | patArchive.setSourcefrom(1); |
| | | patArchive.setPattype("2"); |
| | |
| | | patArchive.setNation(externalInHospPatientInfo.getMinZuMC()); |
| | | patArchive.setNativePlace(externalInHospPatientInfo.getGuoJiMC()); |
| | | if (ObjectUtils.isNotEmpty(externalInHospPatientAddrInfo)) { |
| | | patArchive.setPlaceOfResidence(externalInHospPatientAddrInfo.getShengFenMC() + externalInHospPatientAddrInfo.getShiDiQMC() + externalInHospPatientAddrInfo.getXianQuMC() + externalInHospPatientAddrInfo.getXiangZhenMC() + externalInHospPatientAddrInfo.getCunJiMC() + externalInHospPatientAddrInfo.getQiTaXX()); |
| | | patArchive.setBirthplace(externalInHospPatientAddrInfo.getShengFenMC() + externalInHospPatientAddrInfo.getShiDiQMC() + externalInHospPatientAddrInfo.getXianQuMC() + externalInHospPatientAddrInfo.getXiangZhenMC() + externalInHospPatientAddrInfo.getCunJiMC() + externalInHospPatientAddrInfo.getQiTaXX()); |
| | | String por = null; |
| | | if (StringUtils.isNotEmpty(externalInHospPatientAddrInfo.getDiZhiXX())) { |
| | | por = externalInHospPatientAddrInfo.getDiZhiXX(); |
| | | } else { |
| | | por = externalInHospPatientAddrInfo.getShengFenMC() + externalInHospPatientAddrInfo.getShiDiQMC() + externalInHospPatientAddrInfo.getXianQuMC() + externalInHospPatientAddrInfo.getXiangZhenMC() + externalInHospPatientAddrInfo.getCunJiMC() + externalInHospPatientAddrInfo.getQiTaXX(); |
| | | } |
| | | patArchive.setPlaceOfResidence(por.replace("null", "")); |
| | | patArchive.setBirthplace(por.replace("null", "")); |
| | | } |
| | | patArchive.setBirthdate(externalInHospPatientInfo.getChuShengRQ()); |
| | | patArchive.setAge(externalInHospPatientInfo.getNianLing()); |
| | | patArchive.setAgeUnit(externalInHospPatientInfo.getNianLingDW()); |
| | | patArchive.setTelcode(externalInHospPatientInfo.getLianXiDH()); |
| | | if (StringUtils.isEmpty(externalInHospPatientInfo.getLianXiDH())) |
| | | patArchive.setTelcode(externalInHospPatientInfo.getLianXiRDH()); |
| | | patArchive.setRelativetelcode(externalInHospPatientInfo.getLianXiRDH()); |
| | | patArchive.setGuid(externalInHospPatientInfo.getZuZhiJGID()); |
| | | patArchive.setOrgid(externalInHospPatientInfo.getZuZhiJGID()); |
| | | if (ObjectUtils.isNotEmpty(externalInHospPatientLiaisonInfo)) |
| | | patArchive.setRelativetelcode(externalInHospPatientLiaisonInfo.getLianXiRDH()); |
| | | patArchive.setInhospno(externalInHospPatientInfo.getZhuYuanHao()); |
| | | patArchive.setCreateTime(new Date()); |
| | | patArchive.setIdcardtype(externalInHospPatientInfo.getZhengJianLXMC()); |
| | | if (CollectionUtils.isNotEmpty(patArchives)) { |
| | | //妿ä¸ä¸ºç©ºï¼ç´æ¥å°æ¥è¯¢åºæ¥ç对象è¿å |
| | | PatArchive patArchive1 = patArchives.get(0); |
| | | String orgid = patArchive1.getOrgid(); |
| | | if (StringUtils.isNotEmpty(orgid)) { |
| | | orgid = orgid + "," + externalInHospPatientInfo.getZuZhiJGID(); |
| | | patArchive.setOrgid(orgid); |
| | | // orgid = orgid + "," + externalInHospPatientInfo.getZuZhiJGID(); |
| | | // patArchive.setOrgid(orgid); |
| | | patArchive.setId(patArchive1.getId()); |
| | | patArchiveMapper.updatePatArchive(patArchive); |
| | | return patArchive; |
| | |
| | | patMedInhosp.setLeavehospitaldistrictcode(externalInHospPatientInfo.getDangQianBQID()); |
| | | patMedInhosp.setHospitaldistrictname(externalInHospPatientInfo.getDangQianBQMC()); |
| | | patMedInhosp.setLeavehospitaldistrictname(externalInHospPatientInfo.getDangQianBQMC()); |
| | | patMedInhosp.setTelcode(patArchive.getTelcode()); |
| | | patMedInhosp.setDrname(""); |
| | | } |
| | | if (ObjectUtils.isNotEmpty(externalInHospPatientDiagnoseInfo)) { |
| | | patMedInhosp.setIcd10code(StringUtils.isNotEmpty(patMedInhosp.getIcd10code()) ? patMedInhosp.getIcd10code() + "," + externalInHospPatientDiagnoseInfo.getZhenDuanID() : externalInHospPatientDiagnoseInfo.getZhenDuanID()); |
| | |
| | | patMedInhosp.setPatid(patArchive.getId()); |
| | | patMedInhosp.setPatno(patArchive.getPatientno()); |
| | | patMedInhosp.setPatname(patArchive.getName()); |
| | | patMedInhosp.setDrname(""); |
| | | |
| | | patMedInhosp.setSchemestatus(1L); |
| | | patMedInhosp.setCreateTime(new Date()); |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | continue; |
| | | } |
| | | //å°è¯¥keyåvalueä»redisä¸ï¼å é¤ |
| | | redisCache.deleteObject(key); |
| | |
| | | serviceSubtask.setSendstate(6L); |
| | | serviceSubtask.setExcep(serviceSubTaskAnswerReq.getExcep()); |
| | | serviceSubtask.setFinishtime(new Date()); |
| | | serviceSubtask.setUpdateTime(new Date()); |
| | | log.error("å°è¯¥keyåvalueä»redisä¸,serviceSubtaskçå¼ä¸º--------ï¼{}", serviceSubtask); |
| | | if (score != null) serviceSubtask.setScore(BigDecimal.valueOf(score)); |
| | | serviceSubtaskMapper.updateServiceSubtaskByCondition(serviceSubtask); |
| | | } |
| | |
| | | if (flag == 0L) { |
| | | tid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskCacheReq.getParam1(), pri_key)); |
| | | pid = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskCacheReq.getParam2(), pri_key)); |
| | | subId = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskCacheReq.getParam6(), pri_key)); |
| | | //è¿ä¸ªæ¯æé®é¢çï¼å
è¿æ ·ï¼å并代ç çæ¶åæ²¡ææparam6åè¿æ¥ |
| | | if (StringUtils.isNotEmpty(serviceSubTaskCacheReq.getParam6())) { |
| | | subId = Long.valueOf(rsaPublicKeyExample.decryptedData(serviceSubTaskCacheReq.getParam6(), pri_key)); |
| | | } |
| | | } else if (flag == 1L) { |
| | | tid = Long.valueOf(serviceSubTaskCacheReq.getParam1()); |
| | | pid = Long.valueOf(serviceSubTaskCacheReq.getParam2()); |
| | |
| | | |
| | | Map<String, Object> scriptInfoByCondition = serviceTaskService.getScriptInfoByCondition(serviceSubTaskQueryReq.getTaskid(), serviceSubTaskQueryReq.getPatid(), serviceSubTaskQueryReq.getIsFinish(), serviceSubTaskQueryReq.getPatfrom()); |
| | | if (ObjectUtils.isNotEmpty(scriptInfoByCondition) && ObjectUtils.isNotEmpty(scriptInfoByCondition.get("script"))) { |
| | | log.error("-----------scriptInfoByConditionçå¼ä¸ºï¼{}",scriptInfoByCondition); |
| | | log.error("-----------scriptInfoByConditionçå¼ä¸ºï¼{}", scriptInfoByCondition); |
| | | if (scriptInfoByCondition.get("type").equals("1")) { |
| | | List<IvrLibaTemplateScriptVO> ivrLibaTemplateScriptVOList = (List) scriptInfoByCondition.get("script"); |
| | | for (IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO : ivrLibaTemplateScriptVOList) { |
| | |
| | | for (SvyLibTemplateScriptVO svyLibTemplateScriptVO : svyLibTemplateScriptVOList) { |
| | | Map<String, String> scriptResult = getScriptResult(serviceSubTaskQueryReq.getSubId(), serviceSubTaskQueryReq.getPatid(), svyLibTemplateScriptVO.getId()); |
| | | if (ObjectUtils.isNotEmpty(scriptResult)) { |
| | | svyLibTemplateScriptVO.setScriptResult(scriptResult.get("asrtext")); |
| | | if (StringUtils.isNotEmpty(scriptResult.get("asrtext"))) |
| | | svyLibTemplateScriptVO.setScriptResult(StringUtils.isNotEmpty(scriptResult.get("asrtext")) ? scriptResult.get("asrtext").replaceAll("^(\"|')(.*)\\1$", "$2") : ""); |
| | | svyLibTemplateScriptVO.setScriptResultId(scriptResult.get("asrtextId")); |
| | | } |
| | | } |
| | |
| | | serviceTaskdiag.setOrgid(serviceTask.getOrgid()); |
| | | serviceTaskdiag.setCreateTime(new Date()); |
| | | log.error("----serviceTaskdiagçå¼ä¸ºï¼{}", serviceTaskdiag); |
| | | serviceTaskdiagService.insertServiceTaskdiag(serviceTaskdiag); |
| | | if (StringUtils.isNotEmpty(serviceTaskVO.getIcd10code())) { |
| | | String[] Icd10codes = serviceTaskVO.getIcd10code().split(","); |
| | | for (String icd10code : Icd10codes) { |
| | | serviceTaskdiag.setIcd10code(icd10code); |
| | | serviceTaskdiagService.insertServiceTaskdiag(serviceTaskdiag); |
| | | } |
| | | } |
| | | } else if (serviceTaskVO.getAppltype().equals("4")) { |
| | | ServiceTaskoper serviceTaskoper = new ServiceTaskoper(); |
| | | serviceTaskoper.setOpcode(serviceTaskVO.getOpcode()); |
| | |
| | | serviceTaskoper.setTaskId(serviceTask.getTaskid()); |
| | | serviceTaskoper.setTaskName(serviceTask.getTaskName()); |
| | | serviceTaskoper.setLongtask(0L); |
| | | if (serviceTaskVO.getLongTask() == 1) serviceTaskoper.setLongtask(1L); |
| | | serviceTaskoper.setGuid(serviceTask.getGuid()); |
| | | serviceTaskoper.setOrgid(serviceTask.getOrgid()); |
| | | serviceTaskoper.setCreateTime(new Date()); |
| | | log.error("----serviceTaskoperçå¼ä¸ºï¼{}", serviceTaskoper); |
| | | serviceTaskoperService.insertServiceTaskoper(serviceTaskoper); |
| | | if (serviceTaskVO.getLongTask() == 1) serviceTaskoper.setLongtask(1L); |
| | | if (StringUtils.isNotEmpty(serviceTaskVO.getOpcode())) { |
| | | String[] opcodes = serviceTaskVO.getOpcode().split(","); |
| | | for (String opcode : opcodes) { |
| | | serviceTaskoper.setOpcode(opcode); |
| | | log.error("----serviceTaskoperçå¼ä¸ºï¼{}", serviceTaskoper); |
| | | serviceTaskoperService.insertServiceTaskoper(serviceTaskoper); |
| | | } |
| | | } |
| | | |
| | | } else { |
| | | ServiceTaskdept serviceTaskdept = new ServiceTaskdept(); |
| | | serviceTaskdept.setTaskId(serviceTask.getTaskid()); |
| | |
| | | serviceTaskdept.setTaskId(serviceTask.getTaskid()); |
| | | serviceTaskdept.setTaskName(serviceTask.getTaskName()); |
| | | serviceTaskdept.setLongtask(0L); |
| | | serviceTaskdept.setOrgid(serviceTaskVO.getOrgid()); |
| | | if (serviceTaskVO.getLongTask() == 1) serviceTaskdept.setLongtask(1L); |
| | | if (StringUtils.isNotEmpty(serviceTaskVO.getDeptcode())) { |
| | | String[] deptcodes = serviceTaskVO.getDeptcode().split(","); |
| | |
| | | if (StringUtils.isEmpty(serviceTaskVO.getIcd10code())) { |
| | | throw new BaseException("ç¾ç
ç¼ç 为空"); |
| | | } |
| | | serviceTaskdiag.setIcd10code(serviceTaskVO.getIcd10code()); |
| | | List<ServiceTaskdiag> serviceTaskdiags = serviceTaskdiagService.selectServiceTaskdiagList(serviceTaskdiag); |
| | | // serviceTaskdiag.setIcd10code(serviceTaskVO.getIcd10code()); |
| | | |
| | | serviceTaskdiag.setLongtask(1L); |
| | | serviceTaskdiag.setIcd10name(serviceTaskVO.getIcd10name()); |
| | | serviceTaskdiag.setGuid(serviceTask.getGuid()); |
| | | serviceTaskdiag.setOrgid(serviceTask.getOrgid()); |
| | | serviceTaskdiag.setUpdateTime(new Date()); |
| | | log.error("----serviceTaskdiagæ´æ°çå¼ä¸ºï¼{}", serviceTaskdiag); |
| | | if (CollectionUtils.isNotEmpty(serviceTaskdiags)) { |
| | | serviceTaskdiag.setId(serviceTaskdiags.get(0).getId()); |
| | | serviceTaskdiagService.updateServiceTaskdiag(serviceTaskdiag); |
| | | } else { |
| | | serviceTaskdiagService.insertServiceTaskdiag(serviceTaskdiag); |
| | | if (StringUtils.isNotEmpty(serviceTaskVO.getIcd10code())) { |
| | | String[] icd10codes = serviceTaskVO.getIcd10code().split(","); |
| | | for (String icdcode : icd10codes) { |
| | | //å
æ¥è¯¢ä¸ä¸æ¯å¦åå¨ |
| | | ServiceTaskdiag serviceTaskdiag2 = new ServiceTaskdiag(); |
| | | serviceTaskdiag2.setTaskId(serviceTaskVO.getTaskid()); |
| | | serviceTaskdiag2.setIcd10code(icdcode); |
| | | List<ServiceTaskdiag> serviceTaskdiags = serviceTaskdiagService.selectServiceTaskdiagList(serviceTaskdiag2); |
| | | serviceTaskdiag.setIcd10code(icdcode); |
| | | log.error("----serviceTaskdiagæ´æ°çå¼ä¸ºï¼{}", serviceTaskdiag); |
| | | if (CollectionUtils.isNotEmpty(serviceTaskdiags)) { |
| | | serviceTaskdiag.setId(serviceTaskdiags.get(0).getId()); |
| | | serviceTaskdiagService.updateServiceTaskdiag(serviceTaskdiag); |
| | | } else { |
| | | serviceTaskdiagService.insertServiceTaskdiag(serviceTaskdiag); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } else if (serviceTaskVO.getAppltype().equals("4")) { |
| | | ServiceTaskoper serviceTaskoper = new ServiceTaskoper(); |
| | | if (StringUtils.isEmpty(serviceTaskVO.getOpcode())) { |
| | | throw new BaseException("ææ¯ç¼ç 为空"); |
| | | } |
| | | serviceTaskoper.setOpcode(serviceTaskVO.getOpcode()); |
| | | // serviceTaskoper.setOpcode(serviceTaskVO.getOpcode()); |
| | | serviceTaskoper.setOpdesc(serviceTaskVO.getOpdesc()); |
| | | serviceTaskoper.setTaskId(serviceTask.getTaskid()); |
| | | List<ServiceTaskoper> serviceTaskopers = serviceTaskoperService.selectServiceTaskoperList(serviceTaskoper); |
| | | serviceTaskoper.setTaskName(serviceTask.getTaskName()); |
| | | serviceTaskoper.setLongtask(1L); |
| | | serviceTaskoper.setGuid(serviceTask.getGuid()); |
| | | serviceTaskoper.setOrgid(serviceTask.getOrgid()); |
| | | serviceTaskoper.setCreateTime(new Date()); |
| | | log.error("----serviceTaskoperçå¼ä¸ºï¼{}", serviceTaskoper); |
| | | if (CollectionUtils.isNotEmpty(serviceTaskopers)) { |
| | | serviceTaskoper.setId(serviceTaskopers.get(0).getId()); |
| | | serviceTaskoperService.updateServiceTaskoper(serviceTaskoper); |
| | | } else { |
| | | serviceTaskoperService.insertServiceTaskoper(serviceTaskoper); |
| | | if (StringUtils.isNotEmpty(serviceTaskVO.getOpcode())) { |
| | | String[] opcodes = serviceTaskVO.getOpcode().split(","); |
| | | for (String opcode : opcodes) { |
| | | //å
æ¥è¯¢ä¸ä¸æ¯å¦åå¨ |
| | | ServiceTaskoper serviceTaskoper2 = new ServiceTaskoper(); |
| | | serviceTaskoper2.setTaskId(serviceTaskVO.getTaskid()); |
| | | serviceTaskoper2.setOpcode(serviceTaskVO.getOpcode()); |
| | | List<ServiceTaskoper> serviceTaskopers = serviceTaskoperService.selectServiceTaskoperList(serviceTaskoper2); |
| | | |
| | | serviceTaskoper.setOpcode(opcode); |
| | | log.error("----serviceTaskoperçå¼ä¸ºï¼{}", serviceTaskoper); |
| | | if (CollectionUtils.isNotEmpty(serviceTaskopers)) { |
| | | serviceTaskoper.setId(serviceTaskopers.get(0).getId()); |
| | | serviceTaskoperService.updateServiceTaskoper(serviceTaskoper); |
| | | } else { |
| | | serviceTaskoperService.insertServiceTaskoper(serviceTaskoper); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | if (ObjectUtils.isNotEmpty(serviceTaskVO.getIvrTaskTemplateVO())) { |
| | | IvrTaskTemplate ivrTaskTemplate = new IvrTaskTemplate(); |
| | |
| | | double score = redisCache.getCacheObject(phoneCallReqYQVO.getUuid() + "SCORE"); |
| | | serviceSubtask.setScore(BigDecimal.valueOf(score)); |
| | | serviceSubtask.setFinishtime(new Date()); |
| | | serviceSubtask.setUpdateTime(new Date()); |
| | | log.error("å
æ´æ°ä¸ä¸åæ°,çµè¯çserviceSubtaskçå¼ä¸ºï¼{}", serviceSubtask); |
| | | serviceSubtaskMapper.updateServiceSubtask(serviceSubtask); |
| | | Map<String, String> map = delRedisValue(null, id.toString()); |
| | | if (ObjectUtils.isNotEmpty(map)) redisCache.setCacheObject(map.get("cacheName"), map.get("val")); |
| | |
| | | } |
| | | } |
| | | if (existList.size() != 0) redisCache.setCacheListRight("cache-exist", existList); |
| | | log.error("-----------å®é
æåççµè¯æ°æ®éï¼{}", pullTaskVOList.size()); |
| | | log.error("-----------å®é
æåççµè¯æ°æ®éï¼{}", CollectionUtils.isNotEmpty(pullTaskVOList) ? pullTaskVOList.size() : null); |
| | | return pullTaskVOList; |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | //妿ivrTaskTemplateScript为空ï¼ä¹å°±æ²¡æå¾ä¸æ§è¡çå¿
è¦äº |
| | | if (ObjectUtils.isEmpty(ivrTaskTemplateScript)) return null; |
| | | if (ObjectUtils.isEmpty(ivrTaskTemplateScript)) { |
| | | log.error("---------è¿ä¸ªivrTaskTemplate.getId()çé®é¢ä¸ºç©ºï¼{}", ivrTaskTemplate.getId()); |
| | | continue; |
| | | } |
| | | //è·åéé
符å¹é
è¿åçé®é¢ |
| | | String scrContent = getObject(serviceSubtask, ivrTaskTemplateScript.getIvrtext()); |
| | | String kcb = serviceTask.getKcb() + "," + scrContent; |
| | |
| | | serviceSubtask.setSendstate(6L); |
| | | serviceSubtask.setId(Long.valueOf(phoneCallRecordVO.getTaskid())); |
| | | serviceSubtask.setFinishtime(new Date()); |
| | | serviceSubtask.setUpdateTime(new Date()); |
| | | log.error("çµè¯æ¨æå·²å®æserviceSubtaskçå¼ä¸º:{}", serviceSubtask); |
| | | serviceSubtaskMapper.updateServiceSubtask(serviceSubtask); |
| | | //ä¸è½½æä»¶ |
| | | ftpService.downloadFolder("/" + LocalDate.now().toString(), profile + "/upload/vadio/voice/" + LocalDate.now().toString()); |
| | |
| | | serviceSubtaskStatistic.setYczs(serviceSubtaskStatistic.getYczs() + 1L); |
| | | } |
| | | } |
| | | //éè®¿å®æç=å·²åé/éè®¿æ° |
| | | if (serviceSubtaskStatistic.getYfsCount() == 0 || CollectionUtils.isEmpty(serviceSubtaskList)) { |
| | | //éè®¿å®æç=已宿/åºé访é |
| | | 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.getYfsCount().toString()).divide(new BigDecimal(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()); |
| | | } |
| | | |
| | |
| | | RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample(); |
| | | String taskId = rsaPublicKeyExample.encryptedData(serviceSubtask.getTaskid().toString(), pub_key); |
| | | String patid = rsaPublicKeyExample.encryptedData(serviceSubtask.getPatid().toString(), pub_key); |
| | | String subId = rsaPublicKeyExample.encryptedData(serviceSubtask.getId().toString(), pub_key); |
| | | ServiceOutPath serviceOutPath = new ServiceOutPath(); |
| | | serviceOutPath.setParam1(taskId); |
| | | serviceOutPath.setParam2(patid); |
| | | serviceOutPath.setCreateTime(new Date()); |
| | | serviceOutPath.setParam6(subId); |
| | | iServiceOutPathService.insertServiceOutPath(serviceOutPath); |
| | | //转æ16è¿å¶ |
| | | String format = String.format("%03X", serviceOutPath.getId()); |
| | |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.DtoConversionUtils; |
| | | import com.ruoyi.common.utils.http.HttpUtils; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.mapper.*; |
| | |
| | | } |
| | | //æ¿æ¢æ£è
ä¸ªäººä¿¡æ¯æ°æ® |
| | | log.error("é®é¢idï¼{}, é®é¢å
容ï¼{}", svyLibTemplateScriptVO.getId(), svyLibTemplateScriptVO.getScriptContent()); |
| | | if (StringUtils.isNotEmpty(svyLibTemplateScriptVO.getScriptContent())) { |
| | | if (StringUtils.isNotEmpty(svyLibTemplateScriptVO.getScriptContent()) && ObjectUtils.isNotEmpty(patArchive)) { |
| | | svyLibTemplateScriptVO.setScriptContent(svyLibTemplateScriptVO.getScriptContent().replace("${name}", StringUtils.isNotEmpty(patArchive.getName()) ? patArchive.getName() : "")); |
| | | svyLibTemplateScriptVO.setScriptContent(svyLibTemplateScriptVO.getScriptContent().replace("${dzz}", StringUtils.isNotEmpty(patArchive.getPlaceOfResidence()) ? patArchive.getPlaceOfResidence() : "")); |
| | | svyLibTemplateScriptVO.setScriptContent(svyLibTemplateScriptVO.getScriptContent().replace("${dhh}", StringUtils.isNotEmpty(patArchive.getTelcode()) ? patArchive.getTelcode() : "")); |
| | |
| | | serviceSubtask.setPatid(patid); |
| | | serviceSubtask.setResult("宿"); |
| | | serviceSubtask.setFinishtime(new Date()); |
| | | serviceSubtask.setUpdateTime(new Date()); |
| | | log.error("serviceSubtask---xjInfo-çä¿®æ¹æ°æ®ï¼{}", serviceSubtask); |
| | | serviceSubtaskMapper.updateServiceSubtaskByCondition(serviceSubtask); |
| | | } |
| | | HeLibrary heLibrary = heLibraryMapper.selectHeLibraryById(Long.valueOf(templateId)); |
| | |
| | | <result property="guid" column="guid"/> |
| | | <result property="lastflag" column="lastflag"/> |
| | | <result property="chimedflag" column="chimedflag"/> |
| | | <result property="hisIcdid" column="his_icdid"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectIcd10Vo"> |
| | | select icdid, |
| | | icdcode, |
| | | his_icdid, |
| | | lastflag, |
| | | chimedflag, |
| | | icdname, |
| | |
| | | <select id="selectIcd10List" parameterType="com.smartor.domain.Icd10" resultMap="Icd10Result"> |
| | | <include refid="selectIcd10Vo"/> |
| | | <where> |
| | | del_flag=0 |
| | | <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="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> |
| | | |
| | |
| | | <if test="guid != null">guid,</if> |
| | | <if test="lastflag != null and lastflag != ''">lastflag,</if> |
| | | <if test="chimedflag != null and chimedflag != ''">chimedflag,</if> |
| | | <if test="hisIcdid != null and hisIcdid != ''">his_icdid,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="icdcode != null">#{icdcode},</if> |
| | |
| | | <if test="guid != null">#{guid},</if> |
| | | <if test="lastflag != null and lastflag != ''">#{lastflag},</if> |
| | | <if test="chimedflag != null and chimedflag != ''">#{chimedflag},</if> |
| | | <if test="hisIcdid != null and hisIcdid != ''">#{hisIcdid},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="guid != null">guid = #{guid},</if> |
| | | <if test="lastflag != null and lastflag != ''">lastflag = #{lastflag},</if> |
| | | <if test="chimedflag != null and chimedflag != ''">chimedflag = #{chimedflag},</if> |
| | | <if test="hisIcdid != null and hisIcdid != ''">his_icdid = #{hisIcdid},</if> |
| | | </trim> |
| | | where icdid = #{icdid} |
| | | </update> |
| | |
| | | <result property="guid" column="guid"/> |
| | | <result property="operator" column="operator"/> |
| | | <result property="operatorId" column="operator_id"/> |
| | | <result property="remark" column="remark"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectPatMedInhospVo"> |
| | | select inhospid, |
| | | patname, |
| | | remark, |
| | | guid, |
| | | operator, |
| | | operator_id, |
| | |
| | | a.sex, |
| | | b.guid, |
| | | b.operator, |
| | | b.remark, |
| | | b.operator_id, |
| | | b.inhospid, |
| | | b.nurse_id, |
| | |
| | | b.patname, |
| | | b.operator_id, |
| | | b.operator, |
| | | b.remark, |
| | | b.out_way_id, |
| | | b.out_way_name, |
| | | b.nurse_id, |
| | |
| | | <if test="operator != null ">operator,</if> |
| | | <if test="operatorId != null ">operator_id,</if> |
| | | <if test="inhospno != null ">inhospno,</if> |
| | | <if test="remark != null ">remark,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="serialnum != null">#{serialnum},</if> |
| | |
| | | <if test="operator != null ">#{operator},</if> |
| | | <if test="operatorId != null ">#{operatorId},</if> |
| | | <if test="inhospno != null ">#{inhospno},</if> |
| | | <if test="remark != null ">#{remark},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="guid != null ">guid = #{guid},</if> |
| | | <if test="operator != null ">operator = #{operator},</if> |
| | | <if test="operatorId != null ">operator_id = #{operatorId},</if> |
| | | <if test="remark != null ">remark = #{remark},</if> |
| | | </trim> |
| | | where inhospid = #{inhospid} |
| | | </update> |
| | |
| | | </if> |
| | | <if test="param5 != null">param5, |
| | | </if> |
| | | <if test="param6 != null">param6, |
| | | </if> |
| | | <if test="radix != null">radix, |
| | | </if> |
| | | <if test="createTime != null">create_time, |
| | | </if> |
| | | <if test="guid != null">guid, |
| | | </if> |
| | | <if test="orgid != null">orgid, |
| | | </if> |
| | | |
| | | </trim> |
| | |
| | | </if> |
| | | <if test="param5 != null">#{param5}, |
| | | </if> |
| | | <if test="param6 != null">#{param6}, |
| | | </if> |
| | | <if test="radix != null">#{radix}, |
| | | </if> |
| | | <if test="createTime != null">#{createTime}, |
| | | </if> |
| | | <if test="guid != null">#{guid}, |
| | | </if> |
| | | <if test="orgid != null">#{orgid}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | |
| | | <if test="longSendTime != null"> |
| | | AND date_format(long_send_time,'%y%m%d') <= date_format(#{longSendTime},'%y%m%d') |
| | | </if> |
| | | <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0"> |
| | | AND leavehospitaldistrictcode IN |
| | | <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator="," |
| | | close=")"> |
| | | #{leavehospitaldistrictcode} |
| | | </foreach> |
| | | <if test="deptOrDistrict==1"> |
| | | <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0"> |
| | | AND leavehospitaldistrictcode IN |
| | | <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" |
| | | separator="," |
| | | close=")"> |
| | | #{leavehospitaldistrictcode} |
| | | </foreach> |
| | | </if> |
| | | <if test=" leaveldeptcodes != null and leaveldeptcodes.size()>0"> |
| | | AND deptcode IN |
| | | <foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator="," |
| | | close=")"> |
| | | #{leaveldeptcode} |
| | | </foreach> |
| | | </if> |
| | | </if> |
| | | <if test=" leaveldeptcodes != null and leaveldeptcodes.size()>0"> |
| | | AND deptcode IN |
| | | <foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator="," |
| | | close=")"> |
| | | #{leaveldeptcode} |
| | | </foreach> |
| | | <if test="deptOrDistrict==2"> |
| | | <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0"> |
| | | AND leavehospitaldistrictcode IN |
| | | <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" |
| | | separator="," |
| | | close=")"> |
| | | #{leavehospitaldistrictcode} |
| | | </foreach> |
| | | </if> |
| | | <if test=" leaveldeptcodes != null and leaveldeptcodes.size()>0"> |
| | | OR deptcode IN |
| | | <foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator="," |
| | | close=")"> |
| | | #{leaveldeptcode} |
| | | </foreach> |
| | | </if> |
| | | </if> |
| | | |
| | | <if test="senddate != null ">and senddate = #{senddate}</if> |
| | |
| | | <if test="serviceType != null and serviceType != ''and serviceType == '2'">order by endtime desc</if> |
| | | <if test="serviceType != null and serviceType != ''and serviceType == '3'">order by admindate desc</if> |
| | | <!-- order by update_time desc,id desc --> |
| | | </select> |
| | | |
| | | <select id="selectServiceSubtaskListByCreateTime" parameterType="com.smartor.domain.ServiceSubtaskVO" |
| | | resultMap="ServiceSubtaskResult"> |
| | | <include refid="selectServiceSubtaskVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | <if test="createStartTime != null and createEndTime != null">create_time BETWEEN #{createStartTime} AND #{createEndTime}</if> |
| | | <if test="createBy != null ">and create_by = #{createBy}</if> |
| | | </where> |
| | | |
| | | </select> |
| | | |
| | | <select id="selectServiceSubtaskById" parameterType="Long" resultMap="ServiceSubtaskResult"> |
| | |
| | | <if test="patfrom != null ">patfrom=#{patfrom},</if> |
| | | <if test="taskGuid != null ">taskGuid=#{taskGuid},</if> |
| | | </trim> |
| | | <if test="patid != null ">and patid = #{patid}</if> |
| | | <if test="taskid != null ">and taskid = #{taskid}</if> |
| | | <where> |
| | | <if test="patid != null ">and patid = #{patid}</if> |
| | | <if test="taskid != null ">and taskid = #{taskid}</if> |
| | | </where> |
| | | </update> |
| | | |
| | | <update id="updateServiceSubtaskByCondition" parameterType="com.smartor.domain.ServiceSubtask"> |
| | |
| | | <result property="nexttaskid" column="nexttaskid"/> |
| | | <result property="nexttaskname" column="nexttaskname"/> |
| | | <result property="appltype" column="appltype"/> |
| | | <result property="patCycle" column="pat_cycle"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectServiceTaskVo"> |
| | | select taskid, |
| | | task_name, |
| | | pat_cycle, |
| | | appltype, |
| | | send_day, |
| | | long_task, |
| | |
| | | service_task.orgid from service_task |
| | | <where> |
| | | service_task.del_flag=0 |
| | | and taskid in ( |
| | | select task_id from service_taskdept |
| | | <where> |
| | | <if test="leaveldeptcodes != null and leaveldeptcodes.size()>0"> |
| | | dept_code in |
| | | <foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator="," |
| | | close=")"> |
| | | #{leaveldeptcode} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | ) |
| | | <!-- and taskid in (--> |
| | | <!-- select task_id from service_taskdept--> |
| | | <!-- <where>--> |
| | | <!-- <if test="leaveldeptcodes != null and leaveldeptcodes.size()>0">--> |
| | | <!-- dept_code in--> |
| | | <!-- <foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator=","--> |
| | | <!-- close=")">--> |
| | | <!-- #{leaveldeptcode}--> |
| | | <!-- </foreach>--> |
| | | <!-- </if>--> |
| | | <!-- </where>--> |
| | | <!-- )--> |
| | | <if test="taskName != null and taskName != ''">and service_task.task_name like concat('%', #{taskName}, |
| | | '%') |
| | | </if> |
| | |
| | | <if test="compensateDate != null and compensateDate != ''">compensate_date,</if> |
| | | <if test="sendDay != null ">send_day,</if> |
| | | <if test="appltype != null ">appltype,</if> |
| | | <if test="patCycle != null ">pat_cycle,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="taskName != null">#{taskName},</if> |
| | |
| | | <if test="compensateDate != null and compensateDate != ''">#{compensateDate}</if> |
| | | <if test="sendDay != null ">#{sendDay},</if> |
| | | <if test="appltype != null ">#{appltype},</if> |
| | | <if test="patCycle != null ">#{patCycle},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | </if> |
| | | <if test="leavehospitaldistrictcode != null ">leavehospitaldistrictcode = #{leavehospitaldistrictcode}, |
| | | </if> |
| | | <if test="compensateDate != null and compensateDate != ''">compensate_date = #{compensateDate}</if> |
| | | <if test="sendDay != null ">send_day = #{sendDay}</if> |
| | | <if test="appltype != null ">appltype = #{appltype}</if> |
| | | <if test="compensateDate != null and compensateDate != ''">compensate_date = #{compensateDate},</if> |
| | | <if test="sendDay != null ">send_day = #{sendDay},</if> |
| | | <if test="appltype != null ">appltype = #{appltype},</if> |
| | | <if test="patCycle != null ">pat_cycle = #{patCycle},</if> |
| | | </trim> |
| | | where taskid = #{taskid} |
| | | </update> |
| | |
| | | resultMap="ServiceTaskdiagResult"> |
| | | <include refid="selectServiceTaskdiagVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | <if test="taskId != null "> |
| | | and task_id = #{taskId} |
| | | </if> |
| | |
| | | <mapper namespace="com.smartor.mapper.ServiceTaskoperMapper"> |
| | | |
| | | <resultMap type="com.smartor.domain.ServiceTaskoper" id="ServiceTaskoperResult"> |
| | | <result property="id" column="id"/> |
| | | <result property="taskId" column="task_id"/> |
| | | <result property="longtask" column="longtask"/> |
| | | <result property="taskName" column="task_name"/> |
| | | <result property="serviceType" column="service_type"/> |
| | | <result property="opid" column="opid"/> |
| | | <result property="opcode" column="opcode"/> |
| | | <result property="opdesc" column="opdesc"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="orgid" column="orgid"/> |
| | | <result property="guid" column="guid"/> |
| | | <result property="pguid" column="pguid"/> |
| | | <result property="pid" column="pid"/> |
| | | <result property="id" column="id"/> |
| | | <result property="taskId" column="task_id"/> |
| | | <result property="longtask" column="longtask"/> |
| | | <result property="taskName" column="task_name"/> |
| | | <result property="serviceType" column="service_type"/> |
| | | <result property="opid" column="opid"/> |
| | | <result property="opcode" column="opcode"/> |
| | | <result property="opdesc" column="opdesc"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="orgid" column="orgid"/> |
| | | <result property="guid" column="guid"/> |
| | | <result property="pguid" column="pguid"/> |
| | | <result property="pid" column="pid"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectServiceTaskoperVo"> |
| | | select id, task_id, longtask, task_name, service_type, opid, opcode, opdesc, del_flag, create_time, update_time, orgid, guid, pguid, pid |
| | | select id, |
| | | task_id, |
| | | longtask, |
| | | task_name, |
| | | service_type, |
| | | opid, |
| | | opcode, |
| | | opdesc, |
| | | del_flag, |
| | | create_time, |
| | | update_time, |
| | | orgid, |
| | | guid, |
| | | pguid, |
| | | pid |
| | | from service_taskoper |
| | | </sql> |
| | | |
| | |
| | | resultMap="ServiceTaskoperResult"> |
| | | <include refid="selectServiceTaskoperVo"/> |
| | | <where> |
| | | <if test="taskId != null "> |
| | | and task_id = #{taskId} |
| | | </if> |
| | | <if test="longtask != null "> |
| | | and longtask = #{longtask} |
| | | </if> |
| | | <if test="taskName != null and taskName != ''"> |
| | | and task_name like concat('%', #{taskName}, '%') |
| | | </if> |
| | | <if test="serviceType != null and serviceType != ''"> |
| | | and service_type = #{serviceType} |
| | | </if> |
| | | <if test="opid != null "> |
| | | and opid = #{opid} |
| | | </if> |
| | | <if test="opcode != null and opcode != ''"> |
| | | and opcode = #{opcode} |
| | | </if> |
| | | <if test="opdesc != null and opdesc != ''"> |
| | | and opdesc = #{opdesc} |
| | | </if> |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="guid != null and guid != ''"> |
| | | and guid = #{guid} |
| | | </if> |
| | | <if test="pguid != null and pguid != ''"> |
| | | and pguid = #{pguid} |
| | | </if> |
| | | <if test="pid != null "> |
| | | and pid = #{pid} |
| | | </if> |
| | | del_flag=0 |
| | | <if test="taskId != null "> |
| | | and task_id = #{taskId} |
| | | </if> |
| | | <if test="longtask != null "> |
| | | and longtask = #{longtask} |
| | | </if> |
| | | <if test="taskName != null and taskName != ''"> |
| | | and task_name like concat('%', #{taskName}, '%') |
| | | </if> |
| | | <if test="serviceType != null and serviceType != ''"> |
| | | and service_type = #{serviceType} |
| | | </if> |
| | | <if test="opid != null "> |
| | | and opid = #{opid} |
| | | </if> |
| | | <if test="opcode != null and opcode != ''"> |
| | | and opcode = #{opcode} |
| | | </if> |
| | | <if test="opdesc != null and opdesc != ''"> |
| | | and opdesc = #{opdesc} |
| | | </if> |
| | | <if test="orgid != null and orgid != ''"> |
| | | and orgid = #{orgid} |
| | | </if> |
| | | <if test="guid != null and guid != ''"> |
| | | and guid = #{guid} |
| | | </if> |
| | | <if test="pguid != null and pguid != ''"> |
| | | and pguid = #{pguid} |
| | | </if> |
| | | <if test="pid != null "> |
| | | and pid = #{pid} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectServiceTaskoperById" parameterType="Long" |
| | | resultMap="ServiceTaskoperResult"> |
| | | <include refid="selectServiceTaskoperVo"/> |
| | | where id = #{id} |
| | | <include refid="selectServiceTaskoperVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertServiceTaskoper" parameterType="com.smartor.domain.ServiceTaskoper" useGeneratedKeys="true" keyProperty="id"> |
| | | <insert id="insertServiceTaskoper" parameterType="com.smartor.domain.ServiceTaskoper" useGeneratedKeys="true" |
| | | keyProperty="id"> |
| | | insert into service_taskoper |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="taskId != null">task_id, |
| | | </if> |
| | | <if test="longtask != null">longtask, |
| | | </if> |
| | | <if test="taskName != null">task_name, |
| | | </if> |
| | | <if test="serviceType != null">service_type, |
| | | </if> |
| | | <if test="opid != null">opid, |
| | | </if> |
| | | <if test="opcode != null">opcode, |
| | | </if> |
| | | <if test="opdesc != null">opdesc, |
| | | </if> |
| | | <if test="delFlag != null">del_flag, |
| | | </if> |
| | | <if test="createTime != null">create_time, |
| | | </if> |
| | | <if test="updateTime != null">update_time, |
| | | </if> |
| | | <if test="orgid != null">orgid, |
| | | </if> |
| | | <if test="guid != null">guid, |
| | | </if> |
| | | <if test="pguid != null">pguid, |
| | | </if> |
| | | <if test="pid != null">pid, |
| | | </if> |
| | | <if test="taskId != null">task_id, |
| | | </if> |
| | | <if test="longtask != null">longtask, |
| | | </if> |
| | | <if test="taskName != null">task_name, |
| | | </if> |
| | | <if test="serviceType != null">service_type, |
| | | </if> |
| | | <if test="opid != null">opid, |
| | | </if> |
| | | <if test="opcode != null">opcode, |
| | | </if> |
| | | <if test="opdesc != null">opdesc, |
| | | </if> |
| | | <if test="delFlag != null">del_flag, |
| | | </if> |
| | | <if test="createTime != null">create_time, |
| | | </if> |
| | | <if test="updateTime != null">update_time, |
| | | </if> |
| | | <if test="orgid != null">orgid, |
| | | </if> |
| | | <if test="guid != null">guid, |
| | | </if> |
| | | <if test="pguid != null">pguid, |
| | | </if> |
| | | <if test="pid != null">pid, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="taskId != null">#{taskId}, |
| | | </if> |
| | | <if test="longtask != null">#{longtask}, |
| | | </if> |
| | | <if test="taskName != null">#{taskName}, |
| | | </if> |
| | | <if test="serviceType != null">#{serviceType}, |
| | | </if> |
| | | <if test="opid != null">#{opid}, |
| | | </if> |
| | | <if test="opcode != null">#{opcode}, |
| | | </if> |
| | | <if test="opdesc != null">#{opdesc}, |
| | | </if> |
| | | <if test="delFlag != null">#{delFlag}, |
| | | </if> |
| | | <if test="createTime != null">#{createTime}, |
| | | </if> |
| | | <if test="updateTime != null">#{updateTime}, |
| | | </if> |
| | | <if test="orgid != null">#{orgid}, |
| | | </if> |
| | | <if test="guid != null">#{guid}, |
| | | </if> |
| | | <if test="pguid != null">#{pguid}, |
| | | </if> |
| | | <if test="pid != null">#{pid}, |
| | | </if> |
| | | <if test="taskId != null">#{taskId}, |
| | | </if> |
| | | <if test="longtask != null">#{longtask}, |
| | | </if> |
| | | <if test="taskName != null">#{taskName}, |
| | | </if> |
| | | <if test="serviceType != null">#{serviceType}, |
| | | </if> |
| | | <if test="opid != null">#{opid}, |
| | | </if> |
| | | <if test="opcode != null">#{opcode}, |
| | | </if> |
| | | <if test="opdesc != null">#{opdesc}, |
| | | </if> |
| | | <if test="delFlag != null">#{delFlag}, |
| | | </if> |
| | | <if test="createTime != null">#{createTime}, |
| | | </if> |
| | | <if test="updateTime != null">#{updateTime}, |
| | | </if> |
| | | <if test="orgid != null">#{orgid}, |
| | | </if> |
| | | <if test="guid != null">#{guid}, |
| | | </if> |
| | | <if test="pguid != null">#{pguid}, |
| | | </if> |
| | | <if test="pid != null">#{pid}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateServiceTaskoper" parameterType="com.smartor.domain.ServiceTaskoper"> |
| | | update service_taskoper |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="taskId != null">task_id = |
| | | #{taskId}, |
| | | </if> |
| | | <if test="longtask != null">longtask = |
| | | #{longtask}, |
| | | </if> |
| | | <if test="taskName != null">task_name = |
| | | #{taskName}, |
| | | </if> |
| | | <if test="serviceType != null">service_type = |
| | | #{serviceType}, |
| | | </if> |
| | | <if test="opid != null">opid = |
| | | #{opid}, |
| | | </if> |
| | | <if test="opcode != null">opcode = |
| | | #{opcode}, |
| | | </if> |
| | | <if test="opdesc != null">opdesc = |
| | | #{opdesc}, |
| | | </if> |
| | | <if test="delFlag != null">del_flag = |
| | | #{delFlag}, |
| | | </if> |
| | | <if test="createTime != null">create_time = |
| | | #{createTime}, |
| | | </if> |
| | | <if test="updateTime != null">update_time = |
| | | #{updateTime}, |
| | | </if> |
| | | <if test="orgid != null">orgid = |
| | | #{orgid}, |
| | | </if> |
| | | <if test="guid != null">guid = |
| | | #{guid}, |
| | | </if> |
| | | <if test="pguid != null">pguid = |
| | | #{pguid}, |
| | | </if> |
| | | <if test="pid != null">pid = |
| | | #{pid}, |
| | | </if> |
| | | <if test="taskId != null">task_id = |
| | | #{taskId}, |
| | | </if> |
| | | <if test="longtask != null">longtask = |
| | | #{longtask}, |
| | | </if> |
| | | <if test="taskName != null">task_name = |
| | | #{taskName}, |
| | | </if> |
| | | <if test="serviceType != null">service_type = |
| | | #{serviceType}, |
| | | </if> |
| | | <if test="opid != null">opid = |
| | | #{opid}, |
| | | </if> |
| | | <if test="opcode != null">opcode = |
| | | #{opcode}, |
| | | </if> |
| | | <if test="opdesc != null">opdesc = |
| | | #{opdesc}, |
| | | </if> |
| | | <if test="delFlag != null">del_flag = |
| | | #{delFlag}, |
| | | </if> |
| | | <if test="createTime != null">create_time = |
| | | #{createTime}, |
| | | </if> |
| | | <if test="updateTime != null">update_time = |
| | | #{updateTime}, |
| | | </if> |
| | | <if test="orgid != null">orgid = |
| | | #{orgid}, |
| | | </if> |
| | | <if test="guid != null">guid = |
| | | #{guid}, |
| | | </if> |
| | | <if test="pguid != null">pguid = |
| | | #{pguid}, |
| | | </if> |
| | | <if test="pid != null">pid = |
| | | #{pid}, |
| | | </if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deleteServiceTaskoperById" parameterType="Long"> |
| | | <update id="deleteServiceTaskoperById" parameterType="Long"> |
| | | update service_taskoper |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | del_flag =1 |
| | | </trim> |
| | | where id = #{id} |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deleteServiceTaskoperByIds" parameterType="String"> |
| | | update service_taskoper |
| | | <update id="deleteServiceTaskoperByIds" parameterType="String"> |
| | | update service_taskoper |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | del_flag =1 |
| | | </trim> |
| | |
| | | #{id} |
| | | </foreach> |
| | | </update> |
| | | |
| | | |
| | | |
| | | |
| | | </mapper> |