已添加2个文件
已修改50个文件
已重命名1个文件
| | |
| | | String value = redisCache.getCacheObject("cache-0"); |
| | | ServiceSubtaskVO serviceSubtask1 = new ServiceSubtaskVO(); |
| | | serviceSubtask1.setTaskid(commonTaskcallMQ.getTaskid()); |
| | | log.error("ç¼åä¸serviceSubtask1çå¼ä¸ºï¼{}", serviceSubtask1); |
| | | List<ServiceSubtask> selectServiceSubtaskList1 = ivrTaskcallMapper.selectServiceSubtaskList(serviceSubtask1); |
| | | for (ServiceSubtask serviceSubtask2 : selectServiceSubtaskList1) { |
| | | if (StringUtils.isEmpty(value)) { |
| | |
| | | value = value + "," + serviceSubtask2.getId().toString() + ","; |
| | | } |
| | | } |
| | | log.error("ç¼åä¸cache-0çå¼ä¸ºï¼{}", value); |
| | | redisCache.setCacheObject("cache-0", value); |
| | | } else { |
| | | //éç«å³åé |
| | |
| | | serviceSubtask.setResult("success"); |
| | | serviceSubtask.setRemark("çµè¯åéæå"); |
| | | serviceSubtask.setGuid(uuid); |
| | | serviceSubtask.setSendstate(6L); |
| | | serviceSubtask.setSendstate(3L); |
| | | serviceSubtask.setFinishtime(new Date()); |
| | | serviceSubtaskMapper.updateServiceSubtask(serviceSubtask); |
| | | |
| | |
| | | for (ServiceSubtask serviceSubtask : selectServiceSubtaskList) { |
| | | String patid = rsaPublicKeyExample.encryptedData(serviceSubtask.getPatid().toString(), pub_key); |
| | | try { |
| | | SendMagParam sendMagParam = new SendMagParam(); |
| | | sendMagParam.setType("5"); |
| | | sendMagParam.setUrl(ip + ":" + req_path + "/outsideChain?param1=" + taskId + "¶m2=" + patid + "¶m3=" + ivrTask1.getTaskName() + "¶m5=false"); |
| | | log.info("龿¥å®æ´è·¯å¾ï¼{}", ip + ":" + req_path + "/outsideChain?param1=" + taskId + "¶m2=" + patid + "¶m3=" + ivrTask1.getTaskName() + "¶m5=false"); |
| | | //è¿ä¸ªæ¨¡æ¿IDå
åæ»ï¼åé¢åæå¯é |
| | | sendMagParam.setTmpCode("oG3pJHPVWpE81DmZsua_2tKwgJ97r0qz37z56ns7NB4"); |
| | | Map map = new HashMap(); |
| | | map.put("first", ivrTask1.getTaskName()); |
| | | sendMagParam.setContent(JSON.toJSONString(map)); |
| | | sendMagParam.setOpenid(serviceSubtask.getOpenid()); |
| | | Boolean aBoolean = sendService.sendMsg(sendMagParam); |
| | | String url = null; |
| | | SendMagParam sendMagParam = new SendMagParam(); |
| | | sendMagParam.setType("5"); |
| | | sendMagParam.setUrl(ip + ":" + req_path + "/outsideChain?param1=" + taskId + "¶m2=" + patid + "¶m3=" + ivrTask1.getTaskName() + "¶m5=false"); |
| | | log.info("龿¥å®æ´è·¯å¾ï¼{}", ip + ":" + req_path + "/outsideChain?param1=" + taskId + "¶m2=" + patid + "¶m3=" + ivrTask1.getTaskName() + "¶m5=false"); |
| | | //è¿ä¸ªæ¨¡æ¿IDå
åæ»ï¼åé¢åæå¯é |
| | | sendMagParam.setTmpCode("oG3pJHPVWpE81DmZsua_2tKwgJ97r0qz37z56ns7NB4"); |
| | | Map map = new HashMap(); |
| | | map.put("first", ivrTask1.getTaskName()); |
| | | sendMagParam.setContent(JSON.toJSONString(map)); |
| | | sendMagParam.setOpenid(serviceSubtask.getOpenid()); |
| | | Boolean aBoolean = sendService.sendMsg(sendMagParam); |
| | | String url = null; |
| | | |
| | | //// if (type == 1) { |
| | | //// url = ip + ":" + req_path + "/outsideChain?param1=" + taskId + "¶m2=" + patid + "¶m3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "¶m5=false"; |
| | |
| | | // String wxCode = getWXCode(serviceSubtask.getSfzh(), url, serviceSubtask.getTaskName(), serviceSubtask.getTaskDesc(), "æ "); |
| | | // Map<String, Object> map = JSONObject.parseObject(wxCode, Map.class); |
| | | // if (!map.isEmpty()) { |
| | | serviceSubtask.setResult("success"); |
| | | serviceSubtask.setSendstate(3L); |
| | | if (aBoolean == false) { |
| | | ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord(); |
| | | serviceSubtaskRecord.setTaskid(serviceSubtask.getTaskid().toString()); |
| | | serviceSubtaskRecord.setSubtaskId(serviceSubtask.getId()); |
| | | serviceSubtaskRecord.setUuid(UUID.randomUUID().toString()); |
| | | serviceSubtaskRecord.setTasktype(serviceSubtask.getType()); |
| | | serviceSubtaskRecord.setPreachform("5"); |
| | | serviceSubtaskRecord.setStartTime(System.currentTimeMillis()); |
| | | serviceSubtaskRecord.setRemark(map.get("msg").toString()); |
| | | lssubIds.add(serviceSubtask.getId()); |
| | | serviceSubtaskRecordService.insertServiceSubtaskRecord(serviceSubtaskRecord); |
| | | continue; |
| | | } |
| | | serviceSubtask.setResult("success"); |
| | | serviceSubtask.setSendstate(3L); |
| | | if (aBoolean == false) { |
| | | ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord(); |
| | | serviceSubtaskRecord.setTaskid(serviceSubtask.getTaskid().toString()); |
| | | serviceSubtaskRecord.setSubtaskId(serviceSubtask.getId()); |
| | | serviceSubtaskRecord.setUuid(UUID.randomUUID().toString()); |
| | | serviceSubtaskRecord.setTasktype(serviceSubtask.getType()); |
| | | serviceSubtaskRecord.setPreachform("5"); |
| | | serviceSubtaskRecord.setStartTime(System.currentTimeMillis()); |
| | | serviceSubtaskRecord.setRemark(map.get("msg").toString()); |
| | | lssubIds.add(serviceSubtask.getId()); |
| | | serviceSubtaskRecordService.insertServiceSubtaskRecord(serviceSubtaskRecord); |
| | | continue; |
| | | } |
| | | // } |
| | | } catch (Exception e) { |
| | | ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord(); |
| | |
| | | package com.ruoyi.web.controller.smartor; |
| | | |
| | | import com.github.pagehelper.ISelect; |
| | | 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.SysUser; |
| | | import com.ruoyi.common.core.domain.model.LoginUser; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.file.FileUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.smartor.domain.PatArchiveImport; |
| | |
| | | * æ¥è¯¢Excel导å
¥æ£è
æ¡£æ¡å表 |
| | | */ |
| | | @ApiOperation("æ¥è¯¢Excel导å
¥æ£è
æ¡£æ¡å表") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:import:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(PatArchiveImport patArchiveImport) { |
| | | startPage(); |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody PatArchiveImport patArchiveImport) { |
| | | PageUtils.startPageByPost(patArchiveImport.getPageNum(), patArchiveImport.getPageSize()); |
| | | List<PatArchiveImport> list = patArchiveImportService.selectPatArchiveImportList(patArchiveImport); |
| | | return getDataTable(list); |
| | | //è·åtotal |
| | | long total = PageUtils.count(new ISelect() { |
| | | @Override |
| | | public void doSelect() { |
| | | patArchiveImport.setPageNum(null); |
| | | patArchiveImport.setPageSize(null); |
| | | patArchiveImportService.selectPatArchiveImportList(patArchiveImport); |
| | | } |
| | | }); |
| | | return getDataTable2(total, list); |
| | | } |
| | | |
| | | /** |
| | |
| | | //@PreAuthorize("@ss.hasPermi('smartor:import:list')") |
| | | @PostMapping("/importPatInfo") |
| | | public TableDataInfo importPatInfo(MultipartFile file) { |
| | | return getDataTable(patArchiveImportService.importPatInfo(file)); |
| | | LoginUser loginUser = getLoginUser(); |
| | | SysUser user = loginUser.getUser(); |
| | | return getDataTable(patArchiveImportService.importPatInfo(file, user)); |
| | | } |
| | | } |
| | |
| | | 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.page.TableDataInfo; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.smartor.domain.PatArchiveOut; |
| | | import com.smartor.service.IPatArchiveOutService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | 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.SysUser; |
| | | import com.ruoyi.common.core.domain.model.LoginUser; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.smartor.domain.PatMedInhosp; |
| | | import com.smartor.domain.PatMedInhospVO; |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * æ£è
ä½é¢è®°å½Controller |
| | |
| | | */ |
| | | @ApiOperation("è·åæ£è
ä½é¢è®°å½è¯¦ç»ä¿¡æ¯") |
| | | //@PreAuthorize("@ss.hasPermi('smartor:patinhosp:query')") |
| | | @GetMapping(value = "/{inhospid}") |
| | | @GetMapping(value = "/getInfo/{inhospid}") |
| | | public AjaxResult getInfo(@PathVariable("inhospid") Long inhospid) { |
| | | return success(patMedInhospService.selectPatMedInhospByInhospid(inhospid)); |
| | | } |
| | |
| | | return getDataTable(patMedInhospService.getDeptRanking(patMedReq)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 廿¤ä¸æ£è
å
³èå
³ç³» |
| | | * |
| | | * @return |
| | | */ |
| | | @ApiOperation("廿¤ä¸æ£è
å
³èå
³ç³»") |
| | | @PostMapping("/getDocAndPat") |
| | | public TableDataInfo getDocAndPat(@RequestBody PatMedInhosp patMedInhosp) { |
| | | return getDataTable(patMedInhospService.getDocAndPat(patMedInhosp)); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.smartor.domain.*; |
| | | import com.smartor.service.IServiceSubtaskRecordService; |
| | | import com.smartor.service.IServiceSubtaskService; |
| | | import com.sun.org.apache.bcel.internal.generic.NEW; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.time.LocalTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | public AjaxResult recordAccept(@RequestBody PhoneCallRecordVO phoneCallRecordVO) { |
| | | log.error("éè¯è®°å½åè°(é¨ç»®):{}", phoneCallRecordVO); |
| | | // return toAjax(serviceSubtaskService.saveQuestionAnswerPhone(serviceSubTaskDetailReq)); |
| | | serviceSubtaskService.recordAccept(phoneCallRecordVO); |
| | | return success(); |
| | | } |
| | | |
| | |
| | | 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.page.TableDataInfo; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.smartor.domain.ServiceSubtaskDetail; |
| | | import com.smartor.service.IServiceSubtaskDetailService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * è¯é³ä»»å¡ç»ææç»Controller |
| | |
| | | * @author smartor |
| | | * @date 2023-03-24 |
| | | */ |
| | | @Api(description = "è¯é³ä»»å¡ç»ææç»") |
| | | @RestController |
| | | @RequestMapping("/smartor/serviceSubtaskDetail") |
| | | public class ServiceSubtaskDetailController extends BaseController { |
| | |
| | | private IServiceSubtaskDetailService ServiceSubtaskDetailService; |
| | | |
| | | /** |
| | | * æ¥è¯¢è¯é³ä»»å¡å¼å«æç»å表 |
| | | * æ¥è¯¢å个人çè¯é³ä¿¡æ¯ |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:ServiceSubtaskDetail:list')") |
| | | @ApiOperation("æ¥è¯¢ä»»å¡ç»ææç»å表") |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody ServiceSubtaskDetail serviceSubtaskDetail) { |
| | | startPage(); |
| | | List<ServiceSubtaskDetail> list = ServiceSubtaskDetailService.selectServiceSubtaskDetailList(serviceSubtaskDetail); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºè¯é³ä»»å¡å¼å«æç»å表 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:ServiceSubtaskDetail:export')") |
| | | @Log(title = "è¯é³ä»»å¡å¼å«æç»", businessType = BusinessType.EXPORT) |
| | | @ApiOperation("导åºä»»å¡ç»ææç»å表") |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, ServiceSubtaskDetail serviceSubtaskDetail) { |
| | | List<ServiceSubtaskDetail> list = ServiceSubtaskDetailService.selectServiceSubtaskDetailList(serviceSubtaskDetail); |
| | | ExcelUtil<ServiceSubtaskDetail> util = new ExcelUtil<ServiceSubtaskDetail>(ServiceSubtaskDetail.class); |
| | | util.exportExcel(response, list, "è¯é³ä»»å¡å¼å«æç»æ°æ®"); |
| | | @ApiOperation("æ¥è¯¢å个人çè¯é³ä¿¡æ¯éè¿åä»»å¡ID") |
| | | @PostMapping("/getPersonVoice") |
| | | public Map<String, Object> getPersonVoice(@RequestBody ServiceSubtaskDetail serviceSubtaskDetail) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if (serviceSubtaskDetail.getSubId() == null) { |
| | | map.put("code", 500); |
| | | map.put("msg", "æ¥è¯¢å¤±è´¥,è¯·æ¥æ£å
¥å"); |
| | | } else map = ServiceSubtaskDetailService.selectServiceSubtaskDetailList(serviceSubtaskDetail); |
| | | return map; |
| | | } |
| | | |
| | | /** |
| | |
| | | return toAjax(ServiceSubtaskDetailService.updateServiceSubtaskDetail(serviceSubtaskDetail)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * ä¿®æ¹è¯é³ä»»å¡å¼å«æç» |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:ServiceSubtaskDetail:edit')") |
| | | @Log(title = "è¯é³ä»»å¡å¼å«æç»", businessType = BusinessType.UPDATE) |
| | | @ApiOperation("ä¿®æ¹ä»»å¡ç»ææç»") |
| | | @PostMapping("/batchEdit") |
| | | public AjaxResult edit(@RequestBody List<ServiceSubtaskDetail> serviceSubtaskDetails) { |
| | | for (ServiceSubtaskDetail serviceSubtaskDetail : serviceSubtaskDetails) { |
| | | ServiceSubtaskDetailService.updateServiceSubtaskDetail(serviceSubtaskDetail); |
| | | } |
| | | return toAjax(1); |
| | | } |
| | | |
| | | @ApiOperation("ä¿®æ¹ä»»å¡ç»ææç»éè¿æ¡ä»¶") |
| | | @PostMapping("/editByCondition") |
| | | public AjaxResult updateSSDByCondition(@RequestBody ServiceSubtaskDetail serviceSubtaskDetail) { |
| | | return toAjax(ServiceSubtaskDetailService.updateSSDByCondition(serviceSubtaskDetail)); |
| | | return toAjax(ServiceSubtaskDetailService.updateSSDByCondition(serviceSubtaskDetail)); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.ruoyi.common.core.domain.entity.SysUserRole; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.web.service.SysPermissionService; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.domain.SysUserRole; |
| | | import com.ruoyi.system.service.ISysDeptService; |
| | | import com.ruoyi.system.service.ISysRoleService; |
| | | import com.ruoyi.system.service.ISysUserService; |
| | |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.utils.file.FileUploadUtils; |
| | | import com.ruoyi.common.utils.file.FileUtils; |
| | | import com.smartor.domain.ServiceSubtaskDetail; |
| | | import com.smartor.domain.ThiedInhospInfo; |
| | | import io.swagger.models.auth.In; |
| | | import org.junit.Test; |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.concurrent.CompletableFuture; |
| | | import java.util.regex.Matcher; |
| | | import java.util.regex.Pattern; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static org.eclipse.jetty.http.HttpGenerator.CHUNK_SIZE; |
| | | |
| | |
| | | |
| | | @Test |
| | | public void bb() { |
| | | // int number = 99999; // ç¤ºä¾æ°æ® |
| | | // String format = String.format("%03X", number); |
| | | // System.out.println(format); |
| | | // for (int j = 0; j < 5; j++) { |
| | | // if(j==5-1){ |
| | | // System.out.println("11111111111111111111"); |
| | | // } |
| | | // } |
| | | |
| | | } |
| | | |
| | | public void aa(MultipartFile file) throws IOException { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | # æ°æ®æºé
ç½® |
| | | spring: |
| | | datasource: |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | # driverClassName: com.mysql.cj.jdbc.Driver |
| | | druid: |
| | | # ä¸»åºæ°æ®æº |
| | | master: |
| | | # ä¹ä¹äºé¢ |
| | | # url: jdbc:mysql://127.0.0.1:3306/smartor?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | # username: root |
| | | # password: 123456 |
| | | # å
¬å¸ |
| | | # url: jdbc:mysql://192.168.2.9:3308/smartor?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | # æ°å |
| | | # url: jdbc:mysql://192.168.191.181:3308/smartor?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | # username: smartor |
| | | # password: Smartor.2023 |
| | | # driverClassName: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://rm-ns02o037qh57kj7qu.mysql.rds.ops.zj.zjhealthcloud.cn:3306/smartor?characterEncoding=utf8&useSSL=false&serverTimezone=UTC&rewriteBatchedStatements=true |
| | | username: ywgl |
| | | password: health@123 |
| | | 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:sqlserver://127.0.0.1:1433;DatabaseName=IntelligentVoice;encrypt=false;SelectMethod=cursor |
| | | username: sa |
| | | password: sfxt#2023 |
| | | driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | # åå§è¿æ¥æ° |
| | | initialSize: 5 |
| | | # æå°è¿æ¥æ± æ°é |
| | | minIdle: 10 |
| | | # æå¤§è¿æ¥æ± æ°é |
| | | maxActive: 20 |
| | | # é
ç½®è·åè¿æ¥çå¾
è¶
æ¶çæ¶é´ |
| | | maxWait: 60000 |
| | | # é
ç½®é´éå¤ä¹
æè¿è¡ä¸æ¬¡æ£æµï¼æ£æµéè¦å
³éç空é²è¿æ¥ï¼å使¯æ¯«ç§ |
| | | timeBetweenEvictionRunsMillis: 60000 |
| | | # é
ç½®ä¸ä¸ªè¿æ¥å¨æ± 䏿å°çåçæ¶é´ï¼å使¯æ¯«ç§ |
| | | minEvictableIdleTimeMillis: 300000 |
| | | # é
ç½®ä¸ä¸ªè¿æ¥å¨æ± 䏿大çåçæ¶é´ï¼å使¯æ¯«ç§ |
| | | maxEvictableIdleTimeMillis: 900000 |
| | | # é
ç½®æ£æµè¿æ¥æ¯å¦ææ |
| | | # validationQuery: SELECT 1 FROM DUAL |
| | | validationQuery: SELECT 1 |
| | | testWhileIdle: true |
| | | testOnBorrow: false |
| | | testOnReturn: false |
| | | webStatFilter: |
| | | enabled: true |
| | | statViewServlet: |
| | | enabled: false |
| | | # 设置ç½ååï¼ä¸å¡«åå
许ææè®¿é® |
| | | allow: |
| | | url-pattern: /druid/* |
| | | # æ§å¶å°ç®¡çç¨æ·ååå¯ç |
| | | login-username: lihu |
| | | login-password: Lihu@1363419#$ |
| | | filter: |
| | | stat: |
| | | enabled: true |
| | | # æ
¢SQLè®°å½ |
| | | log-slow-sql: true |
| | | slow-sql-millis: 1000 |
| | | merge-sql: true |
| | | wall: |
| | | config: |
| | | multi-statement-allow: true |
| | | |
| | | magic-api: |
| | | web: /magic/web |
| | | resource: |
| | | type: database # é
ç½®åå¨å¨æ°æ®åºä¸ |
| | | tableName: magic_config # æ°æ®åºä¸ç表å |
| | | prefix: /api |
| | | readonly: false |
| | | sql-column-case: camel |
| | | show-sql: true #é
ç½®æå°SQL |
| | | page-config: |
| | | size: size |
| | | page: page |
| | | default-page: 1 |
| | | default-size: 10 |
| | | |
| | | #微信å
¬ä¼å·çå¯é¥ |
| | | appid: wx1c5243d2337753f4 |
| | | appSecret: 84a2186a0d175e88345267c716516cd3 |
| | | #ç¬¬ä¸æ¹å¾®ä¿¡å
¬ä¼å·åéå°åï¼æ°åå»é¢ï¼ |
| | | thirdWXUrl: http://192.16.4.220:8103/api |
| | | |
| | | #ééçå¯é¥ |
| | | dingAppid: dingn8iip5ubj7clrrsv |
| | | dingAppSecret: qlEK8D3oOVwGPOTiBQIBYTqQVlAfy9S_qQizEQFjJdSScwemWFryg4gbneu-NqWD |
| | | |
| | | # websocketè¶
æ¶æ¶é´ |
| | | server: |
| | | websocket: |
| | | timeout=60000: |
| | | |
| | | |
| | | accessKeyId: LTAI5tPfc1VJzz7VuhzcBwug |
| | | accessKeySecret: gG1srKxPFDBNWe2oHfqmK1qsSQkf1e |
| | | signName: æå·å©æ¹ç§æ |
| | | |
| | | #æºè½å¼å«(䏿µ·) |
| | | phoneIP: http://124.220.50.51 |
| | | phonePort: 8001 |
| | | #æå· |
| | | hzphoneIP: http://121.43.112.160 |
| | | hzphonePort: 8088 |
| | | #çµè¯çº¿è·¯ï¼1 䏿µ·ï¼2 æå·ï¼ |
| | | phonePath: 2 |
| | | #èªå·±ççµè¯å·ç |
| | | phoneMySelf: 83234089 |
| | | ##ææ id(æå·) |
| | | #app_id: hzgs |
| | | ##ææ key(å·²å å¯è¿ç key)(æå·) |
| | | #app_key: 605453540c4a0a692fe07e1cae1162f3 |
| | | #ææ id(æå·) |
| | | app_id: hz_ali |
| | | #ææ key(å·²å å¯è¿ç key)(æå·) |
| | | app_key: a2f3b5799d635216aa280362fafd8c35 |
| | | |
| | | |
| | | pub_key: MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALQzqW1EIXBKGMu+2oEYSB5gM7Ox/ihyYTeeoE0yPX1qtt4++5yNOeTBVd6EEM4iKzVEzWj6REIWVwaSNPn/SvUCAwEAAQ== |
| | | #è¿ä¸ªæ¯å端çç§é¥ï¼ç¨ä¸å° |
| | | pri_key: MIIBUwIBADANBgkqhkiG9w0BAQEFAASCAT0wggE5AgEAAkEAtDOpbUQhcEoYy77agRhIHmAzs7H+KHJhN56gTTI9fWq23j77nI055MFV3oQQziIrNUTNaPpEQhZXBpI0+f9K9QIDAQABAkB3n0fcWfrcoMN/FU3VnrnZOEF6CzFNxkgU9P8y36QECWKZ9JhYQkNpKrMC9oXlN3VSaRigV7B+L/I/a0Rs1W+tAiEA4jx7xcXJ4y4BNwAmVHt6NNiEkzIwWnwC/0qsEu8NsOsCIQDL6MMn1D2uznC6OuOWpxDCkBh1JL1NzZTZeH2G+hj7nwIgKGAC9tjFnvWm4dn0/T7MIIJDpsFeP8fCAS2iZ/6hwuECIAS/eLvWr1EAsZNEh8QcQ8GkBU3E+ztyjAK8UX/xFt/VAiBf79/1tDErX4/DChecM8w3c3DhbBcjuE3fHZn7p6/UKg== |
| | | #å端ç§é¥ï¼ç¨ä¸å°äºï¼ |
| | | #pri_key: MIIBVQIBADANBgkqhkiG9w0BAQEFAASCAT8wggE7AgEAAkEApHTIe/StslZAT5Jzv8XClbrqox32pfaTrP5IOCRJ3FaH/UZsGgA/tsNBBEXq9eagqwPbJrjYfpdEtINcChrK4wIDAQABAkEAilDujdKshGGmlUZHs/NQRT6AOdDpsYxBiC4V76IVvQpw0IW6c4HGEvH4T+xRufika7/48L0eu0f06H+YtL5lgQIhANUd0a6oSsVxWifAjtKwMZcXD3OaIxQIQSCN4NT4VFY3AiEAxYxYrIhkIyg+UVw3WOSvBpXKxM4/WL9HRzkxDLvp2rUCIQCK23P8tgCJ5xJT5l3onw6goFDcBKkoazxsBqVgfjENPwIgWbuTd+OIYPPhwsE5ntZZrosSDO2GlsBkFzUiU59z7VUCIA0LL+9IFb+FWCl3DGTwIQ9SZYbv61T83LKjebUcSOfe |
| | | |
| | | #äºç»´ç è·¯å¾ |
| | | qrpath: D:\qrcode |
| | | |
| | | #å
¬å¸å
å¤é¾è¯·æ±IPå端å£å· |
| | | #req_path: 8095 |
| | | #localIP: 192.168.2.10 |
| | | |
| | | #æ°åå»é¢å¤é¾è¯·æ±IPå端å£å· |
| | | req_path: 8093 |
| | | localIP: 218.108.11.22 |
| | | |
| | | #è·åæ£è
ä¿¡æ¯URL(ååæä¾) |
| | | hosp_info_url: http://esb-core-rest.wowjoy.cn/esb/exchange |
| | | |
| | | # 0代表走é»è®¤çä¸ä¼ 1 代ç èµ°æ°åå»é¢çä¸ä¼ |
| | | uploadSwitch: 1 |
| | | |
| | | # æå®asråè°çurlè·¯å¾ |
| | | ASRCallBackPath: http://192.168.2.10:8095/smartor/serviceSubtask/phoneCallBackYQ |
| | | #ææIP |
| | | hangup: http://192.168.2.10:8091/hangup |
| | | |
| | | |
| | | #æ°åç信请æ±å°å(è¿ä¸ªæå¡æ¯æä»¬èªå·±åç) |
| | | xhsmsPath: http://192.16.4.220:8092/sendSms |
| | | #å¸å· |
| | | xhsmsAccount: 911124 |
| | | #æ¥å£å¯ç |
| | | xhsmsPwd: zW5eXe |
| | | #èææ¥å
¥ç |
| | | xhsmsjrm: 1069055 |
| | |
| | | # username: root |
| | | # password: 123456 |
| | | # å
¬å¸ |
| | | url: jdbc:mysql://192.168.2.9:3308/smartor?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | # url: jdbc:mysql://192.168.2.9:3308/smartor?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | # æ°å |
| | | # url: jdbc:mysql://192.168.191.181:3308/smartor?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | 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?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | # username: hxsoft |
| | | # password: Hxerp2000 |
| | | # driverClassName: com.mysql.cj.jdbc.Driver |
| | | # ä»åºæ°æ®æº |
| | | slave: |
| | | # 仿°æ®æºå¼å
³/é»è®¤å
³é(å
¬å¸) |
| | |
| | | # 0代表走é»è®¤çä¸ä¼ 1 代ç èµ°æ°åå»é¢çä¸ä¼ |
| | | uploadSwitch: 1 |
| | | |
| | | # æå®asråè°çurlè·¯å¾ |
| | | ASRCallBackPath: http://192.168.2.10:8095/smartor/serviceSubtask/phoneCallBackYQ |
| | | #ææIP |
| | | hangup: http://192.168.2.10:8091/hangup |
| | | ## æå®asråè°çurlè·¯å¾(æ¬å°) |
| | | #ASRCallBackPath: http://192.168.2.13:8095/smartor/serviceSubtask/phoneCallBackYQ |
| | | ##ææIP(æ¬å°) |
| | | #hangup: http://192.168.2.13:8091/hangup |
| | | ##fsæä½¿ç¨çé¿éçapp_key(æ¬å°) |
| | | #app_key_yq: ZurNHpaQLq6P55YS |
| | | |
| | | # æå®asråè°çurlè·¯å¾(æ°å) |
| | | ASRCallBackPath: http://192.168.101.135:8095/smartor/serviceSubtask/phoneCallBackYQ |
| | | #ææIP(æ°å) |
| | | hangup: http://192.16.4.220:8091/hangup |
| | | #fsæä½¿ç¨çé¿éçapp_key(æ°å) |
| | | app_key_yq: ZurNHpaQLq6P55YS |
| | | |
| | | |
| | | #æ°åç信请æ±å°å(è¿ä¸ªæå¡æ¯æä»¬èªå·±åç) |
| | |
| | | xhsmsPwd: zW5eXe |
| | | #èææ¥å
¥ç |
| | | xhsmsjrm: 1069055 |
| | | |
| | | #æ°åFTPè¿æ¥ |
| | | FTP_SERVER: "192.16.4.220" |
| | | FTP_USERNAME: voice |
| | | FTP_PASSWORD: xh@2023 |
| | | |
| | | #è¯é³å°å访é®åç¼(æ°å) |
| | | voicePathPrefix: http://192.168.191.181:8095/profile/upload/vadio/ |
| | | #è¯é³å°å访é®åç¼(å
¬å¸) |
| | | #voicePathPrefix: http://192.168.2.13:8095/profile/upload/vadio/ |
| | |
| | | # redis é
ç½® |
| | | redis: |
| | | # # å°åï¼ä¹ä¹äºé¢ï¼ |
| | | host: 192.168.2.10 |
| | | host: 127.0.0.1 |
| | | port: 6020 |
| | | |
| | | # å°åï¼å
¬å¸ï¼ |
| | |
| | | private String phonenumber; |
| | | |
| | | /** |
| | | * 身份è¯å· |
| | | */ |
| | | @ApiModelProperty(value = "身份è¯å·") |
| | | @Excel(name = "身份è¯å·") |
| | | private String idCard; |
| | | |
| | | /** |
| | | * ç¨æ·æ§å« |
| | | */ |
| | | @ApiModelProperty(value = "ç¨æ·æ§å«") |
| | |
| | | this.depts = depts; |
| | | } |
| | | |
| | | public String getIdCard() { |
| | | return idCard; |
| | | } |
| | | |
| | | public void setIdCard(String idCard) { |
| | | this.idCard = idCard; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("userId", getUserId()).append("deptId", getDeptId()).append("userName", getUserName()).append("nickName", getNickName()).append("email", getEmail()).append("phonenumber", getPhonenumber()).append("sex", getSex()).append("avatar", getAvatar()).append("password", getPassword()).append("status", getStatus()).append("delFlag", getDelFlag()).append("loginIp", getLoginIp()).append("loginDate", getLoginDate()).append("createBy", getCreateBy()).append("createTime", getCreateTime()).append("updateBy", getUpdateBy()).append("updateTime", getUpdateTime()).append("remark", getRemark()).append("dept", getDept()).toString(); |
ÎļþÃû´Ó ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUserRole.java ÐÞ¸Ä |
| | |
| | | package com.ruoyi.system.domain; |
| | | package com.ruoyi.common.core.domain.entity; |
| | | |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | |
| | | /** |
| | | * ç¨æ·åè§è²å
³è sys_user_role |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public class SysUserRole |
| | | { |
| | | /** ç¨æ·ID */ |
| | | private Long userId; |
| | | |
| | | |
| | | /** è§è²ID */ |
| | | private Long roleId; |
| | | |
| | |
| | | <result property="remark" column="remark" /> |
| | | <collection property="columns" javaType="java.util.List" resultMap="GenTableColumnResult" /> |
| | | </resultMap> |
| | | |
| | | |
| | | <resultMap type="GenTableColumn" id="GenTableColumnResult"> |
| | | <id property="columnId" column="column_id" /> |
| | | <result property="tableId" column="table_id" /> |
| | |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | </resultMap> |
| | | |
| | | |
| | | <sql id="selectGenTableVo"> |
| | | select table_id, table_name, table_comment, sub_table_name, sub_table_fk_name, class_name, tpl_category, package_name, module_name, business_name, function_name, function_author, gen_type, gen_path, options, create_by, create_time, update_by, update_time, remark from gen_table |
| | | </sql> |
| | | |
| | | |
| | | <select id="selectGenTableList" parameterType="GenTable" resultMap="GenTableResult"> |
| | | <include refid="selectGenTableVo"/> |
| | | <where> |
| | | del_flag= 0 |
| | | <if test="tableName != null and tableName != ''"> |
| | | AND lower(table_name) like lower(concat('%', #{tableName}, '%')) |
| | | </if> |
| | |
| | | </if> |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | |
| | | <select id="selectDbTableListByNames" resultMap="GenTableResult"> |
| | | select table_name, table_comment, create_time, update_time from information_schema.tables |
| | | where table_name NOT LIKE 'qrtz_%' and table_name NOT LIKE 'gen_%' and table_schema = (select database()) |
| | | and table_name in |
| | | <foreach collection="array" item="name" open="(" separator="," close=")"> |
| | | #{name} |
| | | </foreach> |
| | | </foreach> |
| | | </select> |
| | | |
| | | |
| | | <select id="selectTableByName" parameterType="String" resultMap="GenTableResult"> |
| | | select table_name, table_comment, create_time, update_time from information_schema.tables |
| | | where table_comment <![CDATA[ <> ]]> '' and table_schema = (select database()) |
| | | and table_name = #{tableName} |
| | | </select> |
| | | |
| | | |
| | | <select id="selectGenTableById" parameterType="Long" resultMap="GenTableResult"> |
| | | SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.gen_type, t.gen_path, t.options, t.remark, |
| | | c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort |
| | | FROM gen_table t |
| | | LEFT JOIN gen_table_column c ON t.table_id = c.table_id |
| | | where t.table_id = #{tableId} order by c.sort |
| | | where del_flag= 0 and t.table_id = #{tableId} order by c.sort |
| | | </select> |
| | | |
| | | |
| | | <select id="selectGenTableByName" parameterType="String" resultMap="GenTableResult"> |
| | | SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.gen_type, t.gen_path, t.options, t.remark, |
| | | c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort |
| | |
| | | LEFT JOIN gen_table_column c ON t.table_id = c.table_id |
| | | where t.table_name = #{tableName} order by c.sort |
| | | </select> |
| | | |
| | | |
| | | <select id="selectGenTableAll" parameterType="String" resultMap="GenTableResult"> |
| | | SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.options, t.remark, |
| | | c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort |
| | |
| | | LEFT JOIN gen_table_column c ON t.table_id = c.table_id |
| | | order by c.sort |
| | | </select> |
| | | |
| | | |
| | | <insert id="insertGenTable" parameterType="GenTable" useGeneratedKeys="true" keyProperty="tableId"> |
| | | insert into gen_table ( |
| | | <if test="tableName != null">table_name,</if> |
| | |
| | | sysdate() |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | <update id="updateGenTable" parameterType="GenTable"> |
| | | update gen_table |
| | | <set> |
| | |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | update_time = sysdate() |
| | | </set> |
| | | where table_id = #{tableId} |
| | | where table_id = #{tableId} and del_flag= 0 |
| | | </update> |
| | | |
| | | |
| | | <delete id="deleteGenTableByIds" parameterType="Long"> |
| | | delete from gen_table where table_id in |
| | | delete from gen_table where table_id in |
| | | <foreach collection="array" item="tableId" open="(" separator="," close=")"> |
| | | #{tableId} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | </mapper> |
| | | </mapper> |
| | |
| | | import com.ruoyi.common.utils.http.HttpUtils; |
| | | import com.smartor.common.SendService; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.mapper.ServiceSubtaskMapper; |
| | | import com.smartor.mapper.ServiceTaskMapper; |
| | | import com.smartor.mapper.SysUserImportMapper; |
| | | import com.smartor.service.*; |
| | |
| | | private ServiceTaskMapper serviceTaskMapper; |
| | | |
| | | @Autowired |
| | | private SendService sendService; |
| | | private ServiceSubtaskMapper serviceSubtaskMapper; |
| | | |
| | | @Autowired |
| | | private RedisCache redisCache; |
| | |
| | | ivrTaskcall.setSendstate(2L); |
| | | List<ServiceSubtask> selectServiceSubtaskList = iServiceSubtaskService.selectServiceSubtaskList(ivrTaskcall); |
| | | if (descByCode.equals("çµè¯")) { |
| | | String value = ""; |
| | | for (ServiceSubtask serviceSubtask : selectServiceSubtaskList) { |
| | | ServiceTask ivrTask = serviceTaskMapper.selectServiceTaskByTaskid(serviceSubtask.getTaskid()); |
| | | if (ivrTask.getSendState() != null && ivrTask.getSendState() == 3 || ivrTask.getSendState() != null && ivrTask.getSendState() == 4) { |
| | | //å¦ä½ä»»å¡è¢«âæåâæâç»æ¢â |
| | | break; |
| | | } |
| | | //è·åå°value弿å°çkey |
| | | String key = getKey(); |
| | | if (commonTaskcallMQ.getSendType().equals("2")) { |
| | | //è¯´ææ¯ç«å³åé |
| | | String value = redisCache.getCacheObject("cache-0"); |
| | | ServiceSubtaskVO serviceSubtask1 = new ServiceSubtaskVO(); |
| | | serviceSubtask1.setTaskid(commonTaskcallMQ.getTaskid()); |
| | | List<ServiceSubtask> selectServiceSubtaskList1 = iServiceSubtaskService.selectServiceSubtaskList(serviceSubtask1); |
| | | for (ServiceSubtask serviceSubtask2 : selectServiceSubtaskList1) { |
| | | if (StringUtils.isEmpty(value)) { |
| | | value = "," + serviceSubtask2.getId().toString() + ","; |
| | | } else { |
| | | value = value + "," + serviceSubtask2.getId().toString() + ","; |
| | | boolean dateToday = isDateToday(serviceSubtask.getLongSendTime()); |
| | | //è¯´ææ¯ç«å³åé(å
ææ¶æ¯æ¾å°cache-0ä¸ï¼ displayNoä¸ç¥éæä¹é
ç½®) |
| | | if (dateToday) { |
| | | try { |
| | | ServiceSubtaskVO serviceSubtask1 = new ServiceSubtaskVO(); |
| | | serviceSubtask1.setTaskid(ivrTask.getTaskid()); |
| | | List<ServiceSubtask> selectServiceSubtaskList1 = iServiceSubtaskService.selectServiceSubtaskList(serviceSubtask1); |
| | | for (ServiceSubtask serviceSubtask2 : selectServiceSubtaskList1) { |
| | | if (StringUtils.isEmpty(value)) { |
| | | value = "," + serviceSubtask2.getId().toString() + ","; |
| | | } else { |
| | | if (!value.contains("," + serviceSubtask2.getId().toString())) |
| | | value = value + "," + serviceSubtask2.getId().toString() + ","; |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | String guid = UUID.randomUUID().toString(); |
| | | log.error("é¿æä»»å¡ï¼çµè¯åé失败åå ï¼{},{}", e.getMessage(), guid); |
| | | serviceSubtask.setResult("error"); |
| | | serviceSubtask.setRemark("ç³»ç»é误"); |
| | | serviceSubtask.setSendstate(3L); |
| | | serviceSubtask.setFinishtime(new Date()); |
| | | serviceSubtask.setGuid(guid); |
| | | iServiceSubtaskService.updateServiceSubtask(serviceSubtask); |
| | | } |
| | | redisCache.setCacheObject("cache-0", value); |
| | | } else { |
| | | //éç«å³åé |
| | | String value = redisCache.getCacheObject(key); |
| | | ServiceSubtaskVO serviceSubtask1 = new ServiceSubtaskVO(); |
| | | serviceSubtask1.setTaskid(commonTaskcallMQ.getTaskid()); |
| | | List<ServiceSubtask> selectServiceSubtaskList1 = iServiceSubtaskService.selectServiceSubtaskList(serviceSubtask1); |
| | | for (ServiceSubtask serviceSubtask2 : selectServiceSubtaskList1) { |
| | | if (StringUtils.isEmpty(value)) { |
| | | value = "," + serviceSubtask2.getId().toString() + ","; |
| | | } else { |
| | | value = value + "," + serviceSubtask2.getId().toString() + ","; |
| | | } |
| | | } |
| | | redisCache.setCacheObject(key, value); |
| | | |
| | | //å¨åä»»å¡è¡¨éè®°å½ä¸ä¸ |
| | | String uuid = UUID.randomUUID().toString(); |
| | | serviceSubtask.setResult("success"); |
| | | serviceSubtask.setRemark("çµè¯åéæå"); |
| | | serviceSubtask.setGuid(uuid); |
| | | serviceSubtask.setSendstate(3L); |
| | | serviceSubtask.setFinishtime(new Date()); |
| | | serviceSubtaskMapper.updateServiceSubtask(serviceSubtask); |
| | | |
| | | //ä»»å¡åéè®°å½ |
| | | ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord(); |
| | | serviceSubtaskRecord.setTaskid(serviceSubtask.getTaskid().toString()); |
| | | serviceSubtaskRecord.setSubtaskId(serviceSubtask.getId()); |
| | | serviceSubtaskRecord.setUuid(uuid); |
| | | serviceSubtaskRecord.setTasktype(serviceSubtask.getType()); |
| | | serviceSubtaskRecord.setPreachform("3"); |
| | | serviceSubtaskRecord.setStartTime(System.currentTimeMillis()); |
| | | serviceSubtaskRecord.setRemark("çµè¯åéæå"); |
| | | serviceSubtaskRecordService.insertServiceSubtaskRecord(serviceSubtaskRecord); |
| | | |
| | | } |
| | | |
| | | //ä»»å¡åéè®°å½ï¼è¿ä¸ªä»£ç åºè¯¥åå¨phoneTaskä¸ï¼å
åå¨è¿ï¼åé¢åæ¹ï¼ |
| | | ServiceSubtaskRecord serviceSubtaskRecord = new ServiceSubtaskRecord(); |
| | | serviceSubtaskRecord.setTaskid(serviceSubtask.getTaskid().toString()); |
| | | serviceSubtaskRecord.setUuid(UUID.randomUUID().toString()); |
| | | serviceSubtaskRecord.setTasktype(serviceSubtask.getType()); |
| | | serviceSubtaskRecord.setPreachform("3"); |
| | | serviceSubtaskRecord.setStartTime(System.currentTimeMillis()); |
| | | serviceSubtaskRecordService.insertServiceSubtaskRecord(serviceSubtaskRecord); |
| | | |
| | | // //éè¿å¤çº¿ç¨çæ¹å¼å»æçµè¯ |
| | | // //éè¿å¤çº¿ç¨çæ¹å¼å»æçµè¯ï¼è¿ä¸ªæ¯ä¸æµ·çæ¹æ³ï¼ |
| | | // executorService.submit(new PhoneTask(serviceSubtask, ivrTaskTemplateVO1, redisCache, sendService, phonePath, robotPhoneUtils)); |
| | | } |
| | | //å°è¦æ§è¡çæ¾å°ç¼åä¸ |
| | | String cache0 = redisCache.getCacheObject("cache-0"); |
| | | if (StringUtils.isNotEmpty(cache0)) { |
| | | redisCache.setCacheObject("cache-0", cache0 + value); |
| | | } else if (StringUtils.isEmpty(cache0) && StringUtils.isNotEmpty(value)) { |
| | | redisCache.setCacheObject("cache-0", value); |
| | | } |
| | | } else if (descByCode.equals("å¤åªä½")) { |
| | | //å¤åªä½ |
| | |
| | | iServiceSubtaskService.updateServiceSubtask(serviceSubtask); |
| | | } catch (Exception e) { |
| | | String guid = UUID.randomUUID().toString(); |
| | | log.error("é¿æä»»å¡ï¼åé失败åå ï¼{},{}", e.getMessage(), guid); |
| | | log.error("é¿æä»»å¡ï¼çä¿¡åé失败åå ï¼{},{}", e.getMessage(), guid); |
| | | serviceSubtask.setResult("error"); |
| | | serviceSubtask.setRemark("ç³»ç»é误"); |
| | | serviceSubtask.setSendstate(5L); |
| | |
| | | iServiceSubtaskService.updateServiceSubtask(serviceSubtask); |
| | | } catch (Exception e) { |
| | | String guid = UUID.randomUUID().toString(); |
| | | log.error("é¿æä»»å¡ï¼åé失败åå ï¼{},{}", e.getMessage(), guid); |
| | | log.error("é¿æä»»å¡ï¼å
¬ä¼å·åé失败åå ï¼{},{}", e.getMessage(), guid); |
| | | serviceSubtask.setResult("error"); |
| | | serviceSubtask.setRemark("ç³»ç»é误"); |
| | | serviceSubtask.setSendstate(5L); |
| | |
| | | * @author ruoyi |
| | | */ |
| | | @Mapper |
| | | public interface SysUserMapper |
| | | { |
| | | public interface SysUserMapper { |
| | | /** |
| | | * æ ¹æ®æ¡ä»¶å页æ¥è¯¢ç¨æ·å表 |
| | | * |
| | |
| | | * ä¿®æ¹ç¨æ·å¤´å |
| | | * |
| | | * @param userName ç¨æ·å |
| | | * @param avatar 头åå°å |
| | | * @param avatar 头åå°å |
| | | * @return ç»æ |
| | | */ |
| | | public int updateUserAvatar(@Param("userName") String userName, @Param("avatar") String avatar); |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.common.core.domain.entity.SysUserRole; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import com.ruoyi.system.domain.SysUserRole; |
| | | |
| | | /** |
| | | * ç¨æ·ä¸è§è²å
³è表 æ°æ®å± |
| | |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | import com.ruoyi.common.core.domain.entity.SysRole; |
| | | import com.ruoyi.system.domain.SysUserRole; |
| | | import com.ruoyi.common.core.domain.entity.SysUserRole; |
| | | |
| | | /** |
| | | * è§è²ä¸å¡å± |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface ISysRoleService |
| | | { |
| | | /** |
| | | * æ ¹æ®æ¡ä»¶å页æ¥è¯¢è§è²æ°æ® |
| | | * |
| | | * |
| | | * @param role è§è²ä¿¡æ¯ |
| | | * @return è§è²æ°æ®éåä¿¡æ¯ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·IDæ¥è¯¢è§è²å表 |
| | | * |
| | | * |
| | | * @param userId ç¨æ·ID |
| | | * @return è§è²å表 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·IDæ¥è¯¢è§è²æé |
| | | * |
| | | * |
| | | * @param userId ç¨æ·ID |
| | | * @return æéå表 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¥è¯¢ææè§è² |
| | | * |
| | | * |
| | | * @return è§è²å表 |
| | | */ |
| | | public List<SysRole> selectRoleAll(); |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·IDè·åè§è²éæ©æ¡å表 |
| | | * |
| | | * |
| | | * @param userId ç¨æ·ID |
| | | * @return éä¸è§è²IDå表 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * éè¿è§è²IDæ¥è¯¢è§è² |
| | | * |
| | | * |
| | | * @param roleId è§è²ID |
| | | * @return è§è²å¯¹è±¡ä¿¡æ¯ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¡éªè§è²åç§°æ¯å¦å¯ä¸ |
| | | * |
| | | * |
| | | * @param role è§è²ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¡éªè§è²æéæ¯å¦å¯ä¸ |
| | | * |
| | | * |
| | | * @param role è§è²ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¡éªè§è²æ¯å¦å
许æä½ |
| | | * |
| | | * |
| | | * @param role è§è²ä¿¡æ¯ |
| | | */ |
| | | public void checkRoleAllowed(SysRole role); |
| | | |
| | | /** |
| | | * æ ¡éªè§è²æ¯å¦ææ°æ®æé |
| | | * |
| | | * |
| | | * @param roleId è§è²id |
| | | */ |
| | | public void checkRoleDataScope(Long roleId); |
| | | |
| | | /** |
| | | * éè¿è§è²IDæ¥è¯¢è§è²ä½¿ç¨æ°é |
| | | * |
| | | * |
| | | * @param roleId è§è²ID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ°å¢ä¿åè§è²ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param role è§è²ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¿®æ¹ä¿åè§è²ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param role è§è²ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¿®æ¹è§è²ç¶æ |
| | | * |
| | | * |
| | | * @param role è§è²ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¿®æ¹æ°æ®æéä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param role è§è²ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * éè¿è§è²IDå é¤è§è² |
| | | * |
| | | * |
| | | * @param roleId è§è²ID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éå é¤è§è²ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param roleIds éè¦å é¤çè§è²ID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * åæ¶ææç¨æ·è§è² |
| | | * |
| | | * |
| | | * @param userRole ç¨æ·åè§è²å
³èä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éåæ¶ææç¨æ·è§è² |
| | | * |
| | | * |
| | | * @param roleId è§è²ID |
| | | * @param userIds éè¦åæ¶ææçç¨æ·æ°æ®ID |
| | | * @return ç»æ |
| | |
| | | |
| | | /** |
| | | * æ¹ééæ©ææç¨æ·è§è² |
| | | * |
| | | * |
| | | * @param roleId è§è²ID |
| | | * @param userIds éè¦å é¤çç¨æ·æ°æ®ID |
| | | * @return ç»æ |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.HashSet; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import com.ruoyi.common.annotation.DataScope; |
| | | import com.ruoyi.common.constant.UserConstants; |
| | | import com.ruoyi.common.core.domain.entity.SysRole; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.domain.entity.SysUserRole; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.spring.SpringUtils; |
| | | import com.ruoyi.system.domain.SysRoleDept; |
| | | import com.ruoyi.system.domain.SysRoleMenu; |
| | | import com.ruoyi.system.domain.SysUserRole; |
| | | import com.ruoyi.system.mapper.SysRoleDeptMapper; |
| | | import com.ruoyi.system.mapper.SysRoleMapper; |
| | | import com.ruoyi.system.mapper.SysRoleMenuMapper; |
| | | import com.ruoyi.system.mapper.SysUserRoleMapper; |
| | | import com.ruoyi.system.service.ISysRoleService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * è§è² ä¸å¡å±å¤ç |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Service |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®æ¡ä»¶å页æ¥è¯¢è§è²æ°æ® |
| | | * |
| | | * |
| | | * @param role è§è²ä¿¡æ¯ |
| | | * @return è§è²æ°æ®éåä¿¡æ¯ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·IDæ¥è¯¢è§è² |
| | | * |
| | | * |
| | | * @param userId ç¨æ·ID |
| | | * @return è§è²å表 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·IDæ¥è¯¢æé |
| | | * |
| | | * |
| | | * @param userId ç¨æ·ID |
| | | * @return æéå表 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¥è¯¢ææè§è² |
| | | * |
| | | * |
| | | * @return è§è²å表 |
| | | */ |
| | | @Override |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®ç¨æ·IDè·åè§è²éæ©æ¡å表 |
| | | * |
| | | * |
| | | * @param userId ç¨æ·ID |
| | | * @return éä¸è§è²IDå表 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * éè¿è§è²IDæ¥è¯¢è§è² |
| | | * |
| | | * |
| | | * @param roleId è§è²ID |
| | | * @return è§è²å¯¹è±¡ä¿¡æ¯ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¡éªè§è²åç§°æ¯å¦å¯ä¸ |
| | | * |
| | | * |
| | | * @param role è§è²ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¡éªè§è²æéæ¯å¦å¯ä¸ |
| | | * |
| | | * |
| | | * @param role è§è²ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ ¡éªè§è²æ¯å¦å
许æä½ |
| | | * |
| | | * |
| | | * @param role è§è²ä¿¡æ¯ |
| | | */ |
| | | @Override |
| | |
| | | |
| | | /** |
| | | * æ ¡éªè§è²æ¯å¦ææ°æ®æé |
| | | * |
| | | * |
| | | * @param roleId è§è²id |
| | | */ |
| | | @Override |
| | |
| | | |
| | | /** |
| | | * éè¿è§è²IDæ¥è¯¢è§è²ä½¿ç¨æ°é |
| | | * |
| | | * |
| | | * @param roleId è§è²ID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ°å¢ä¿åè§è²ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param role è§è²ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¿®æ¹ä¿åè§è²ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param role è§è²ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¿®æ¹è§è²ç¶æ |
| | | * |
| | | * |
| | | * @param role è§è²ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * ä¿®æ¹æ°æ®æéä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param role è§è²ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ°å¢è§è²èåä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param role è§è²å¯¹è±¡ |
| | | */ |
| | | public int insertRoleMenu(SysRole role) |
| | |
| | | |
| | | /** |
| | | * éè¿è§è²IDå é¤è§è² |
| | | * |
| | | * |
| | | * @param roleId è§è²ID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éå é¤è§è²ä¿¡æ¯ |
| | | * |
| | | * |
| | | * @param roleIds éè¦å é¤çè§è²ID |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * åæ¶ææç¨æ·è§è² |
| | | * |
| | | * |
| | | * @param userRole ç¨æ·åè§è²å
³èä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | |
| | | |
| | | /** |
| | | * æ¹éåæ¶ææç¨æ·è§è² |
| | | * |
| | | * |
| | | * @param roleId è§è²ID |
| | | * @param userIds éè¦åæ¶ææçç¨æ·æ°æ®ID |
| | | * @return ç»æ |
| | |
| | | |
| | | /** |
| | | * æ¹ééæ©ææç¨æ·è§è² |
| | | * |
| | | * |
| | | * @param roleId è§è²ID |
| | | * @param userIds éè¦ææçç¨æ·æ°æ®ID |
| | | * @return ç»æ |
| | |
| | | |
| | | import com.ruoyi.common.annotation.DataScope; |
| | | import com.ruoyi.common.constant.UserConstants; |
| | | import com.ruoyi.common.core.domain.entity.SysDept; |
| | | import com.ruoyi.common.core.domain.entity.SysRole; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.domain.entity.SysUserDept; |
| | | import com.ruoyi.common.core.domain.entity.*; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | |
| | | import com.ruoyi.common.utils.spring.SpringUtils; |
| | | import com.ruoyi.system.domain.SysPost; |
| | | import com.ruoyi.system.domain.SysUserPost; |
| | | import com.ruoyi.system.domain.SysUserRole; |
| | | import com.ruoyi.system.mapper.*; |
| | | import com.ruoyi.system.service.ISysConfigService; |
| | | import com.ruoyi.system.service.ISysUserService; |
| | |
| | | <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="updateTime" column="update_time"/> |
| | |
| | | <sql id="selectUserVo"> |
| | | select u.user_id, |
| | | u.dept_id, |
| | | u.id_card, |
| | | u.hosp_info, |
| | | u.dept_info, |
| | | u.searchscope, |
| | |
| | | </sql> |
| | | |
| | | <select id="selectUserList" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserResult"> |
| | | select u.user_id,u.hosp_info,u.dept_info, u.searchscope, u.dept_id, u.user_type, u.nick_name, u.user_name, u.email, |
| | | select u.user_id,u.hosp_info,u.dept_info, u.searchscope, u.dept_id, u.user_type, u.nick_name, u.user_name, |
| | | u.email,u.id_card, |
| | | u.avatar, |
| | | u.phonenumber, u.sex, u.status, |
| | | u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user |
| | |
| | | </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="phonenumber != null and phonenumber != ''"> |
| | | AND u.phonenumber like concat('%', #{phonenumber}, '%') |
| | |
| | | |
| | | <select id="selectAllocatedList" parameterType="com.ruoyi.common.core.domain.entity.SysUser" |
| | | resultMap="SysUserResult"> |
| | | select distinct u.user_id,u.hosp_info,u.dept_info, u.searchscope, u.dept_id, u.user_name, u.user_type, u.nick_name, |
| | | select distinct u.user_id,u.hosp_info,u.dept_info, u.searchscope, u.dept_id, u.user_name, u.user_type, |
| | | u.nick_name, |
| | | u.email, |
| | | u.phonenumber, u.status, |
| | | u.phonenumber, u.status,u.id_card, |
| | | u.create_time |
| | | from sys_user u |
| | | left join sys_dept d on u.dept_id = d.dept_id |
| | |
| | | |
| | | <select id="selectUnallocatedList" parameterType="com.ruoyi.common.core.domain.entity.SysUser" |
| | | resultMap="SysUserResult"> |
| | | select distinct u.user_id, u.dept_id, u.hosp_info, u.dept_info,u.searchscope, u.user_name, u.user_type, u.nick_name, |
| | | select distinct u.user_id, u.dept_id, u.hosp_info, u.dept_info,u.searchscope, u.user_name, u.user_type, |
| | | u.nick_name, |
| | | u.email, |
| | | u.phonenumber, u.status, |
| | | u.phonenumber, u.status,u.id_card, |
| | | u.create_time |
| | | from sys_user u |
| | | left join sys_dept d on u.dept_id = d.dept_id |
| | |
| | | <if test="deptInfo != null and deptInfo != ''">dept_info,</if> |
| | | <if test="hospInfo != null and hospInfo != ''">hosp_info,</if> |
| | | <if test="searchscope != null and searchscope != ''">searchscope,</if> |
| | | <if test="idCard != null and idCard != ''">id_card,</if> |
| | | create_time |
| | | )values( |
| | | <if test="userId != null and userId != ''">#{userId},</if> |
| | |
| | | <if test="deptInfo != null and deptInfo != ''">#{deptInfo},</if> |
| | | <if test="hospInfo != null and hospInfo != ''">#{hospInfo},</if> |
| | | <if test="searchscope != null and searchscope != ''">#{searchscope},</if> |
| | | <if test="idCard != null and idCard != ''">#{idCard},</if> |
| | | sysdate() |
| | | ) |
| | | </insert> |
| | |
| | | <if test="searchscope != null">searchscope = #{searchscope},</if> |
| | | <if test="deptInfo != null and deptInfo != ''">dept_info=#{deptInfo},</if> |
| | | <if test="hospInfo != null and hospInfo != ''">hosp_info=#{hospInfo},</if> |
| | | <if test="idCard != null and idCard != ''">id_card=#{idCard},</if> |
| | | update_time = sysdate() |
| | | </set> |
| | | where user_id = #{userId} |
| | |
| | | <artifactId>axis-jaxrpc</artifactId> |
| | | <version>1.4</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.jcraft</groupId> |
| | | <artifactId>jsch</artifactId> |
| | | <version>0.1.54</version> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.smartor.common; |
| | | |
| | | import com.jcraft.jsch.ChannelSftp; |
| | | import com.jcraft.jsch.JSch; |
| | | import com.jcraft.jsch.Session; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.junit.Test; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.io.File; |
| | | import java.io.FileOutputStream; |
| | | import java.util.Vector; |
| | | |
| | | @Slf4j |
| | | @Component |
| | | public class FtpService { |
| | | |
| | | @Value("${FTP_SERVER}") |
| | | private String FTP_SERVER; |
| | | |
| | | @Value("${FTP_USERNAME}") |
| | | private String FTP_USERNAME; |
| | | |
| | | @Value("${FTP_PASSWORD}") |
| | | private String FTP_PASSWORD; |
| | | |
| | | |
| | | public void downloadFolder(String remoteDir, String localDir) { |
| | | Session session = null; |
| | | ChannelSftp channelSftp = null; |
| | | |
| | | try { |
| | | // 1. å建 JSch å®ä¾å¹¶è®¾ç½®ä¼è¯ |
| | | JSch jsch = new JSch(); |
| | | session = jsch.getSession(FTP_USERNAME, FTP_SERVER, 8094); |
| | | session.setPassword(FTP_PASSWORD); |
| | | |
| | | // è·³è¿ä¸»æºå¯é¥æ£æ¥ |
| | | session.setConfig("StrictHostKeyChecking", "no"); |
| | | |
| | | // 2. è¿æ¥å° SFTP æå¡å¨ |
| | | session.connect(); |
| | | channelSftp = (ChannelSftp) session.openChannel("sftp"); |
| | | channelSftp.connect(); |
| | | |
| | | // 3. å¼å§éå½ä¸è½½ |
| | | downloadDirectory(channelSftp, remoteDir, localDir); |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } finally { |
| | | // 4. å
³éè¿æ¥ |
| | | if (channelSftp != null) { |
| | | channelSftp.disconnect(); |
| | | } |
| | | if (session != null) { |
| | | session.disconnect(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * éå½ä¸è½½è¿ç¨ç®å½å°æ¬å° |
| | | * |
| | | * @param channelSftp SFTP éé |
| | | * @param remoteDir è¿ç¨ç®å½è·¯å¾ |
| | | * @param localDir æ¬å°ç®å½è·¯å¾ |
| | | * @throws Exception å¼å¸¸ |
| | | */ |
| | | private static void downloadDirectory(ChannelSftp channelSftp, String remoteDir, String localDir) throws Exception { |
| | | // ç¡®ä¿æ¬å°ç®å½åå¨ |
| | | File localDirectory = new File(localDir); |
| | | if (!localDirectory.exists()) { |
| | | localDirectory.mkdirs(); |
| | | } |
| | | |
| | | // ååºè¿ç¨ç®å½ä¸çæææä»¶åæä»¶å¤¹ |
| | | Vector<ChannelSftp.LsEntry> entries = channelSftp.ls(remoteDir); |
| | | |
| | | for (ChannelSftp.LsEntry entry : entries) { |
| | | String fileName = entry.getFilename(); |
| | | |
| | | // è·³è¿ "." å ".." |
| | | if (".".equals(fileName) || "..".equals(fileName)) { |
| | | continue; |
| | | } |
| | | |
| | | String remoteFilePath = remoteDir + "/" + fileName; |
| | | String localFilePath = localDir + File.separator + fileName; |
| | | |
| | | if (entry.getAttrs().isDir()) { |
| | | // å¦ææ¯æä»¶å¤¹ï¼éå½ä¸è½½ |
| | | downloadDirectory(channelSftp, remoteFilePath, localFilePath); |
| | | } else { |
| | | // å¦ææ¯æä»¶ï¼è¦çä¸è½½ |
| | | File localFile = new File(localFilePath); |
| | | |
| | | // 妿æ¬å°æä»¶å·²åå¨ï¼å
å é¤ |
| | | if (localFile.exists()) { |
| | | localFile.delete(); |
| | | } |
| | | |
| | | try (FileOutputStream fos = new FileOutputStream(localFile)) { |
| | | channelSftp.get(remoteFilePath, fos); |
| | | log.error("æä»¶ä¸è½½æåï¼{}", remoteFilePath); |
| | | } catch (Exception e) { |
| | | System.err.println("æä»¶ä¸è½½å¤±è´¥: " + remoteFilePath); |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // |
| | | // @Test |
| | | // public void aa() { |
| | | // downloadFolder("/", "D:\\ruoyi\\uploadPath\\upload\\vadio\\voice"); |
| | | // } |
| | | } |
| | |
| | | package com.smartor.common; |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.aliyun.dysmsapi20170525.models.SendSmsResponseBody; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.core.type.TypeReference; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.google.gson.Gson; |
| | | import com.ruoyi.common.utils.http.HttpUtils; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.mapper.PatWildcardMapper; |
| | |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.lang.reflect.Field; |
| | | import java.net.URLEncoder; |
| | | import java.time.LocalDateTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.UUID; |
| | | |
| | | /** |
| | | * åéæå¡å·¥å
·ç±» |
| | |
| | | private Date addTime; |
| | | |
| | | /** |
| | | * æ¯å¦æ¯é¿ææ¨¡æ¿ï¼ 0ï¼ä¸æ¯ 1ï¼æ¯ |
| | | */ |
| | | @ApiModelProperty(value = "æ¯å¦æ¯é¿ææ¨¡æ¿ï¼ 0ï¼ä¸æ¯ 1ï¼æ¯") |
| | | private String longTemp; |
| | | |
| | | /** |
| | | * ä¿®æ¹ç¨æ·ID |
| | | */ |
| | | @Excel(name = "ä¿®æ¹ç¨æ·ID") |
| | |
| | | */ |
| | | @ApiModelProperty(value = "é¨é¨ç¼ç ") |
| | | private String deptCode; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @ApiModelProperty(value = "é¨é¨ç¼ç ") |
| | | private String deptCode; |
| | | |
| | | /** |
| | | * æ¯å¦æ¯é¿ææ¨¡æ¿ï¼ 0ï¼ä¸æ¯ 1ï¼æ¯ |
| | | */ |
| | | @ApiModelProperty(value = "æ¯å¦æ¯é¿ææ¨¡æ¿ï¼ 0ï¼ä¸æ¯ 1ï¼æ¯") |
| | | private String longTemp; |
| | | |
| | | |
| | | /** |
| | | * å
è®¸éæ¨æ¬¡æ° |
| | |
| | | @Excel(name = " åºé¢æ¹å¼åç§° ") |
| | | private String outWayName; |
| | | |
| | | @ApiModelProperty("ç
§æ¤åºæï¼1å®¶åº 2å
»èæºæ") |
| | | @Excel(name = " ç
§æ¤åºæï¼1å®¶åº 2å
»èæºæ ") |
| | | private String careFacilities; |
| | | |
| | | @ApiModelProperty("ç
§æ¤åºæï¼1å®¶åº 2å
»èæºæ") |
| | | @Excel(name = " ç
§æ¤åºæï¼1å®¶åº 2å
»èæºæ ") |
| | | private String casePath; |
| | | |
| | | @ApiModelProperty("åæè²ç¨åº¦") |
| | | @Excel(name = "åæè²ç¨åº¦") |
| | | private String degreeOfEducation; |
| | | |
| | | @ApiModelProperty("å©å§»ç¶åµ") |
| | | @Excel(name = "å©å§»ç¶åµ") |
| | | private String maritalStatus; |
| | | |
| | | @ApiModelProperty("å®¶åºäººåæ¶å
¥") |
| | | @Excel(name = "å®¶åºäººåæ¶å
¥") |
| | | private String income; |
| | | |
| | | @ApiModelProperty("å»ä¿ç±»å") |
| | | @Excel(name = "å»ä¿ç±»å") |
| | | private String medicareType; |
| | | |
| | | @ApiModelProperty("主è¦ç
§æ¤äºº") |
| | | @Excel(name = "主è¦ç
§æ¤äºº") |
| | | private String carePerson; |
| | | |
| | | @ApiModelProperty("主è¦ç
§æ¤äººå¹´é¾") |
| | | @Excel(name = "主è¦ç
§æ¤äººå¹´é¾") |
| | | private String casePersonAge; |
| | | |
| | | } |
| | |
| | | * è¯ä»¶å·ç |
| | | */ |
| | | @ApiModelProperty("è¯ä»¶å·ç ") |
| | | @Excel(name = "è¯ä»¶å·ç (å¿
å¡«)",cellType = Excel.ColumnType.STRING) |
| | | @Excel(name = "è¯ä»¶å·ç (å¿
å¡«)", cellType = Excel.ColumnType.STRING) |
| | | private String idcardno; |
| | | |
| | | /** |
| | | * ææºå·ç |
| | | */ |
| | | @ApiModelProperty("ææºå·ç ") |
| | | @Excel(name = "ææºå·ç (å¿
å¡«)",cellType = Excel.ColumnType.STRING) |
| | | @Excel(name = "ææºå·ç (å¿
å¡«)", cellType = Excel.ColumnType.STRING) |
| | | private String telcode; |
| | | |
| | | /** |
| | | * æ¹æ¬¡åç§° |
| | | */ |
| | | @ApiModelProperty("æ¹æ¬¡åç§°") |
| | | @Excel(name = "æ¹æ¬¡åç§°",cellType = Excel.ColumnType.STRING) |
| | | @Excel(name = "æ¹æ¬¡åç§°", cellType = Excel.ColumnType.STRING) |
| | | private String batchName; |
| | | |
| | | |
| | |
| | | * æ£è
ç¼å· |
| | | */ |
| | | @ApiModelProperty("æ£è
ç¼å·") |
| | | @Excel(name = "æ£è
ç¼å·",cellType = Excel.ColumnType.STRING) |
| | | @Excel(name = "æ£è
ç¼å·", cellType = Excel.ColumnType.STRING) |
| | | private String patientno; |
| | | |
| | | /** |
| | |
| | | @Excel(name = "å¹´é¾") |
| | | private Long age; |
| | | |
| | | /** |
| | | * æ¯å¦å建å¸å· |
| | | */ |
| | | @ApiModelProperty("æ¯å¦å建å¸å·") |
| | | @Excel(name = "æ¯å¦å建å¸å·ï¼1 å建ï¼é»è®¤ï¼ 2ä¸å建") |
| | | private Long account = 1L; |
| | | |
| | | |
| | | /** |
| | | * 微信openid |
| | |
| | | @ApiModelProperty("æ¹æ¬¡å·") |
| | | private String batchNo; |
| | | |
| | | /** |
| | | * pageNum |
| | | */ |
| | | @ApiModelProperty("pageNum") |
| | | private Integer pageNum; |
| | | |
| | | /** |
| | | * pageSize |
| | | */ |
| | | @ApiModelProperty("pageSize") |
| | | private Integer pageSize; |
| | | |
| | | } |
| | | |
| | |
| | | * @author smartor |
| | | * @date 2023-03-04 |
| | | */ |
| | | @ApiModel(value = "PatArchiveVO" , description = "æ£è
æ¡£æ¡å¯¹è±¡") |
| | | @ApiModel(value = "PatArchiveVO", description = "æ£è
æ¡£æ¡å¯¹è±¡") |
| | | @Data |
| | | public class PatArchiveVO extends BaseEntity { |
| | | |
| | |
| | | */ |
| | | @ApiModelProperty("çæ¥") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = " çæ¥ " , width = 30, dateFormat = "yyyy-MM-dd") |
| | | @Excel(name = " çæ¥ ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private Date birthdate; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @ApiModelProperty("å
¥é¢æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @Excel(name = " çæ¥ " , width = 30, dateFormat = "yyyy-MM-dd") |
| | | @Excel(name = " çæ¥ ", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private Date inhosptime; |
| | | |
| | | /** |
| | |
| | | * æ ç¾ |
| | | */ |
| | | @ApiModelProperty("æ ç¾") |
| | | @Excel(name = " æ ç¾ " , cellType = Excel.ColumnType.STRING) |
| | | @Excel(name = " æ ç¾ ", cellType = Excel.ColumnType.STRING) |
| | | private String tag; |
| | | |
| | | /** |
| | | * æ ç¾ |
| | | */ |
| | | @ApiModelProperty("æ ç¾id") |
| | | @Excel(name = " æ ç¾id " , cellType = Excel.ColumnType.STRING) |
| | | @Excel(name = " æ ç¾id ", cellType = Excel.ColumnType.STRING) |
| | | private Long tagid; |
| | | |
| | | @ApiModelProperty("æ ç¾éå") |
| | |
| | | * æ ç¾ |
| | | */ |
| | | @ApiModelProperty("æ£è
ç±»å") |
| | | @Excel(name = " æ£è
ç±»å " , cellType = Excel.ColumnType.STRING) |
| | | @Excel(name = " æ£è
ç±»å ", cellType = Excel.ColumnType.STRING) |
| | | private String pattype; |
| | | |
| | | /** |
| | |
| | | @ApiModelProperty("åºé¢ç
åºç¼å·") |
| | | private String leavehospitaldistrictcode; |
| | | |
| | | |
| | | /** |
| | | * åºé¢æ¹å¼åºå· |
| | | */ |
| | |
| | | @ApiModelProperty("åºé¢æ¹å¼åç§°") |
| | | @Excel(name = " åºé¢æ¹å¼åç§° ") |
| | | private String outWayName; |
| | | @ApiModelProperty("ç
§æ¤åºæï¼1å®¶åº 2å
»èæºæ") |
| | | @Excel(name = " ç
§æ¤åºæï¼1å®¶åº 2å
»èæºæ ") |
| | | private String careFacilities; |
| | | |
| | | @ApiModelProperty("ç
§æ¤åºæï¼1å®¶åº 2å
»èæºæ") |
| | | @Excel(name = " ç
§æ¤åºæï¼1å®¶åº 2å
»èæºæ ") |
| | | private String casePath; |
| | | |
| | | @ApiModelProperty("åæè²ç¨åº¦") |
| | | @Excel(name = "åæè²ç¨åº¦") |
| | | private String degreeOfEducation; |
| | | |
| | | @ApiModelProperty("å©å§»ç¶åµ") |
| | | @Excel(name = "å©å§»ç¶åµ") |
| | | private String maritalStatus; |
| | | |
| | | @ApiModelProperty("å®¶åºäººåæ¶å
¥") |
| | | @Excel(name = "å®¶åºäººåæ¶å
¥") |
| | | private String income; |
| | | |
| | | @ApiModelProperty("å»ä¿ç±»å") |
| | | @Excel(name = "å»ä¿ç±»å") |
| | | private String medicareType; |
| | | |
| | | @ApiModelProperty("主è¦ç
§æ¤äºº") |
| | | @Excel(name = "主è¦ç
§æ¤äºº") |
| | | private String carePerson; |
| | | |
| | | @ApiModelProperty("主è¦ç
§æ¤äººå¹´é¾") |
| | | @Excel(name = "主è¦ç
§æ¤äººå¹´é¾") |
| | | private String casePersonAge; |
| | | |
| | | } |
| | |
| | | */ |
| | | @ApiModelProperty(value = "ç»æå
¥é¢æ¥æ") |
| | | private Date endInHospTime; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å¤é¨å¯¼å
¥ï¼0䏿¯ 1æ¯") |
| | | private Integer outImport = 0; |
| | | |
| | | |
| | | @ApiModelProperty(value = "æ¥è¯¢ç±»åï¼1å
¨é¨ 2åºé¢ 3å
¥é¢ 4é¨è¯ 5å¤é¨æ£è
") |
| | | private Integer queryType = 1; |
| | | } |
| | |
| | | @ApiModelProperty(value = "宿æ¶é´") |
| | | private Date finishtime; |
| | | |
| | | /** |
| | | * é¿æä»»å¡ï¼ç»æ£è
åéçæ¶é´ |
| | | */ |
| | | @Excel(name = " é¿æä»»å¡ï¼ç»æ£è
åéçæ¶é´") |
| | | @ApiModelProperty(value = "é¿æä»»å¡ï¼ç»æ£è
åéçæ¶é´") |
| | | private Date longSendTime; |
| | | } |
| | |
| | | * å¯ä»¥å¯¹å½åééçé³éè¿è¡éå½è°æ´,åå¼èå´ã-4,4ã |
| | | */ |
| | | @ApiModelProperty(value = "å¯ä»¥å¯¹å½åééçé³éè¿è¡éå½è°æ´,åå¼èå´ã-4,4ã") |
| | | private Integer volume = 0; |
| | | private Integer volume; |
| | | |
| | | /** |
| | | * å¯ä»¥è°æ´å½åéè¯çéé»åè°é´éæ¶é´ï¼åä½ä¸ºæ¯«ç§ï¼é»è®¤ä¸º3000 |
| | |
| | | @ApiModelProperty(value = "è¡¥å¿æ¶é´ï¼æªé¢å ï¼åèµ·è¡¥å¿ï¼ä»ä»»å¡åéæåå¼å§ï¼compensate_dateåéåï¼æ£è
仿ªé¢åï¼åä½ï¼åé ") |
| | | @Excel(name = " è¡¥å¿æ¶é´ï¼æªé¢å ï¼åèµ·è¡¥å¿ï¼ä»ä»»å¡åéæåå¼å§ï¼compensate_dateåéåï¼æ£è
仿ªé¢åï¼åä½ï¼åé ") |
| | | private String compensateDate; |
| | | |
| | | } |
| | |
| | | * @return ç»æ |
| | | */ |
| | | public int updateIvrLibaScriptTargetoption(IvrLibaScriptTargetoption ivrLibaScriptTargetoption); |
| | | public int updateDynam(IvrLibaScriptTargetoption ivrLibaScriptTargetoption); |
| | | |
| | | /** |
| | | * å é¤é®é¢è¯æ¯ææ éé¡¹åº |
| | |
| | | */ |
| | | public int updateIvrLibaTemplateTargetoption(IvrLibaTemplateTargetoption ivrLibaTemplateTargetoption); |
| | | |
| | | public int updateDynamiccruxs(IvrLibaTemplateTargetoption ivrLibaTemplateTargetoption); |
| | | |
| | | /** |
| | | * å 餿¨¡æ¿ææ éé¡¹åº |
| | | * |
| | |
| | | package com.smartor.mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.domain.entity.SysUserRole; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import com.smartor.domain.PatArchiveImport; |
| | | |
| | |
| | | * @date 2024-09-05 |
| | | */ |
| | | @Mapper |
| | | public interface PatArchiveImportMapper |
| | | { |
| | | public interface PatArchiveImportMapper { |
| | | /** |
| | | * æ¥è¯¢Excel导å
¥æ£è
æ¡£æ¡ |
| | | * |
| | |
| | | * @return ç»æ |
| | | */ |
| | | public int deletePatArchiveImportByIds(Long[] ids); |
| | | |
| | | /** |
| | | * æ ¡éªç¨æ·åç§°æ¯å¦å¯ä¸ |
| | | * |
| | | * @param idCard ç¨æ·åç§° |
| | | * @return ç»æ |
| | | */ |
| | | public SysUser checkUserExist(String idCard); |
| | | |
| | | |
| | | /** |
| | | * æ°å¢ç¨æ·ä¿¡æ¯ |
| | | * |
| | | * @param user ç¨æ·ä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertUser(SysUser user); |
| | | |
| | | /** |
| | | * è§è²æ°å¢ |
| | | * @param sysUserRole |
| | | * @return |
| | | */ |
| | | public int insertUserRole(SysUserRole sysUserRole); |
| | | } |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.smartor.domain.PatArchiveImport; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | |
| | | */ |
| | | public int deletePatArchiveImportById(Long id); |
| | | |
| | | public List<PatArchiveImport> importPatInfo(MultipartFile multipartFile); |
| | | public List<PatArchiveImport> importPatInfo(MultipartFile multipartFile,SysUser user); |
| | | } |
| | |
| | | package com.smartor.service; |
| | | |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.smartor.domain.PatMedInhosp; |
| | | import com.smartor.domain.PatMedInhospVO; |
| | | import com.smartor.domain.PatMedReq; |
| | | import com.smartor.domain.PatMedRes; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | * @return |
| | | */ |
| | | public List<PatMedRes> getDeptRanking(PatMedReq patMedReq); |
| | | |
| | | /** |
| | | * 廿¤ä¸æ£è
å
³èå
³ç³» |
| | | * @param patMedInhosp |
| | | * @return |
| | | */ |
| | | public List<PatMedInhosp> getDocAndPat(PatMedInhosp patMedInhosp); |
| | | } |
| | |
| | | import com.smartor.domain.ServiceSubtaskDetail; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * è¯é³ä»»å¡å¼å«æç»Serviceæ¥å£ |
| | |
| | | * @param serviceSubtaskDetail è¯é³ä»»å¡å¼å«æç» |
| | | * @return è¯é³ä»»å¡å¼å«æç»éå |
| | | */ |
| | | public List<ServiceSubtaskDetail> selectServiceSubtaskDetailList( ServiceSubtaskDetail serviceSubtaskDetail); |
| | | public Map<String, Object> selectServiceSubtaskDetailList(ServiceSubtaskDetail serviceSubtaskDetail); |
| | | |
| | | /** |
| | | * æ°å¢è¯é³ä»»å¡å¼å«æç» |
| | |
| | | package com.smartor.service; |
| | | |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.domain.ServiceSubtask; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | |
| | | public Integer saveQuestionAnswerPhone(ServiceSubTaskDetailReq serviceSubTaskDetailReq); |
| | | |
| | | public Integer recordAccept(PhoneCallRecordVO phoneCallRecordVO); |
| | | |
| | | /** |
| | | * è·åé访ãå¤è¯é |
| | | * |
| | |
| | | //ä¿®æ¹ |
| | | ivrLibaScriptTargetoption.setScriptid(ivrLibaScript.getId()); |
| | | ivrLibaScriptTargetoptionMapper.updateIvrLibaScriptTargetoption(ivrLibaScriptTargetoption); |
| | | //妿è¦ç»æ£å置空ï¼åéè¦åç¬è°ä¿®æ¹æ¹æ³ |
| | | if (CollectionUtils.isEmpty(ivrLibaScriptTargetoption.getNodynamiccruxs())) { |
| | | ivrLibaScriptTargetoption.setNodynamiccruxsJson(null); |
| | | ivrLibaScriptTargetoptionMapper.updateDynam(ivrLibaScriptTargetoption); |
| | | } |
| | | if (CollectionUtils.isEmpty(ivrLibaScriptTargetoption.getDynamiccruxs())) { |
| | | ivrLibaScriptTargetoption.setDynamiccruxsJson(null); |
| | | ivrLibaScriptTargetoptionMapper.updateDynam(ivrLibaScriptTargetoption); |
| | | } |
| | | |
| | | } |
| | | if (ivrLibaScriptTargetoption.getIsoperation() != null && ivrLibaScriptTargetoption.getIsoperation() == 3) { |
| | | //å é¤ |
| | |
| | | ivrLibaTemplateMapper.updateIvrLibaTemplate(ivrLibaTemplate); |
| | | i = ivrLibaTemplate.getId().intValue(); |
| | | } |
| | | log.info("æ°å¢æä¿®æ¹æ¨¡æ¿è¯¦æ
çid为ï¼{}" , ivrLibaTemplate.getId()); |
| | | log.info("æ°å¢æä¿®æ¹æ¨¡æ¿è¯¦æ
çid为ï¼{}", ivrLibaTemplate.getId()); |
| | | |
| | | //å¯¹æ¨¡æ¿æ ç¾è¿è¡å¤ç |
| | | if (CollectionUtils.isNotEmpty(ivrLibaTemplateVO.getIvrLibaTemplateTagList())) { |
| | |
| | | * @param tmpID |
| | | */ |
| | | private void dealOption(List<IvrLibaTemplateTargetoption> ivrLibaTemplateTargetoptionList, IvrLibaTemplateScript ivrLibaTemplateScript, Long tmpID, Integer isoperation) { |
| | | log.info("ivrLibaTemplateScriptçå¼ä¸ºï¼{}" , ivrLibaTemplateScript); |
| | | log.info("ivrLibaTemplateScriptçå¼ä¸ºï¼{}", ivrLibaTemplateScript); |
| | | //å¯¹æ¨¡æ¿ææ é项è¿è¡å¤ç |
| | | Integer lsIsoperation = isoperation; |
| | | if (CollectionUtils.isNotEmpty(ivrLibaTemplateTargetoptionList)) { |
| | |
| | | if (CollectionUtils.isNotEmpty(ivrLibaTemplateTargetoption.getNodynamiccruxs())) |
| | | ivrLibaTemplateTargetoption.setNodynamiccruxsJson(JSON.toJSONString(ivrLibaTemplateTargetoption.getNodynamiccruxs())); |
| | | ivrLibaTemplateTargetOptionMapper.updateIvrLibaTemplateTargetoption(ivrLibaTemplateTargetoption); |
| | | |
| | | |
| | | if (CollectionUtils.isEmpty(ivrLibaTemplateTargetoption.getDynamiccruxs())) { |
| | | ivrLibaTemplateTargetoption.setDynamiccruxsJson(null); |
| | | ivrLibaTemplateTargetOptionMapper.updateDynamiccruxs(ivrLibaTemplateTargetoption); |
| | | } |
| | | if (CollectionUtils.isEmpty(ivrLibaTemplateTargetoption.getNodynamiccruxs())) { |
| | | ivrLibaTemplateTargetoption.setNodynamiccruxsJson(null); |
| | | ivrLibaTemplateTargetOptionMapper.updateDynamiccruxs(ivrLibaTemplateTargetoption); |
| | | } |
| | | } else if (isoperation == 3) { |
| | | //å é¤ |
| | | if (ivrLibaTemplateTargetoption.getId() == null) { |
| | |
| | | */ |
| | | @Override |
| | | public IvrLibaTemplateVO selectInfoByCondition(IvrLibaTemplateVO ivrLibaTemplateVO) { |
| | | log.info("æ¥è¯¢æ¨¡æ¿è¯¦æ
æ ¹æ®æ¡ä»¶çå
¥å为 : {}" , ivrLibaTemplateVO); |
| | | log.info("æ¥è¯¢æ¨¡æ¿è¯¦æ
æ ¹æ®æ¡ä»¶çå
¥å为 : {}", ivrLibaTemplateVO); |
| | | //å
æ ¹æ®æ¡ä»¶æ¥è¯¢é®é¢è¡¨ä¿¡æ¯ |
| | | IvrLibaTemplate ivrLibaTemplate = DtoConversionUtils.sourceToTarget(ivrLibaTemplateVO, IvrLibaTemplate.class); |
| | | List<IvrLibaTemplate> ivrLibaTemplates = selectIvrLibaTemplateList(ivrLibaTemplate); |
| | | if (CollectionUtils.isEmpty(ivrLibaTemplates)) { |
| | | log.info("æä¾çæ¡ä»¶,æ¥è¯¢æ¨¡æ¿è¯¦æ
æ°æ®ä¸ºç©ºï¼{}" , ivrLibaTemplates); |
| | | log.info("æä¾çæ¡ä»¶,æ¥è¯¢æ¨¡æ¿è¯¦æ
æ°æ®ä¸ºç©ºï¼{}", ivrLibaTemplates); |
| | | throw new BaseException("æä¾çæ¡ä»¶,æ¥è¯¢æ¨¡æ¿è¯¦æ
æ°æ®ä¸ºç©º"); |
| | | } |
| | | //å®ä¹IvrLibaTemplateVO ç¨äºè¿å |
| | |
| | | |
| | | //éè¿è¯æ¯IDè·åé项 |
| | | for (IvrLibaTemplateScriptVO ivrLibaTemplateScriptVO : ivrLibaTemplateScriptVOS) { |
| | | log.error("ivrLibaTemplateScriptVOç主é®id为ï¼{}" , ivrLibaTemplateScriptVO.getId()); |
| | | log.error("ivrLibaTemplateScriptVOç主é®id为ï¼{}", ivrLibaTemplateScriptVO.getId()); |
| | | IvrLibaTemplateTargetoption ivrLibaTemplateTargetoption = new IvrLibaTemplateTargetoption(); |
| | | ivrLibaTemplateTargetoption.setScriptid(ivrLibaTemplateScriptVO.getId()); |
| | | List<IvrLibaTemplateTargetoption> ivrLibaTemplateTargetoptions = ivrLibaTemplateTargetOptionMapper.selectIvrLibaTemplateTargetoptionList(ivrLibaTemplateTargetoption); |
| | |
| | | public int saveOrUpdateTempScript(IvrTaskTemplateVO ivrTaskTemplateVO) { |
| | | Integer i = null; |
| | | IvrTaskTemplate ivrTaskTemplate = DtoConversionUtils.sourceToTarget(ivrTaskTemplateVO, IvrTaskTemplate.class); |
| | | //ä¼ è¿æ¥çé黿¶é´æ¯ç§ï¼éè¦æ¹ææ¯«ç§ |
| | | if (ivrTaskTemplate.getSilencetime() != null) |
| | | ivrTaskTemplate.setSilencetime(ivrTaskTemplate.getSilencetime() * 1000); |
| | | |
| | | if (ivrTaskTemplateVO.getIsoperation() != null && ivrTaskTemplateVO.getIsoperation() == 1) { |
| | | //ä¼ è¿æ¥çé黿¶é´æ¯ç§ï¼éè¦æ¹ææ¯«ç§ |
| | | if (ivrTaskTemplate.getSilencetime() != null) |
| | | ivrTaskTemplate.setSilencetime(ivrTaskTemplate.getSilencetime() * 1000); |
| | | |
| | | //æ°å¢ |
| | | ivrTaskTemplate.setCreateTime(new Date()); |
| | | insertIvrTaskTemplate(ivrTaskTemplate); |
| | |
| | | updateIvrTaskTemplate(ivrTaskTemplate); |
| | | i = ivrTaskTemplate.getId().intValue(); |
| | | } |
| | | log.info("æ°å¢é访任å¡é访模æ¿çid为ï¼{}" , ivrTaskTemplate.getId()); |
| | | log.info("æ°å¢é访任å¡é访模æ¿çid为ï¼{}", ivrTaskTemplate.getId()); |
| | | |
| | | //对模æ¿è¯æ¯åé项è¿è¡å¤çï¼è¯æ¯è¡¨ä¸ææ 表è¿è¡åå¹¶äºï¼ï¼ |
| | | if (CollectionUtils.isNotEmpty(ivrTaskTemplateVO.getIvrTaskTemplateScriptVOList())) { |
| | | log.error("ivrTaskTemplateVO.getIvrTaskTemplateScriptVOList()æ¯å¦ææ°æ®åï¼{}" , ivrTaskTemplateVO.getIvrTaskTemplateScriptVOList()); |
| | | log.error("ivrTaskTemplateVO.getIvrTaskTemplateScriptVOList()æ¯å¦ææ°æ®åï¼{}", ivrTaskTemplateVO.getIvrTaskTemplateScriptVOList()); |
| | | for (IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO : ivrTaskTemplateVO.getIvrTaskTemplateScriptVOList()) { |
| | | if (ivrTaskTemplateScriptVO.getIsoperation() != null) { |
| | | IvrTaskTemplateScript ivrTaskTemplateScript = scriptHandle(ivrTaskTemplate, ivrTaskTemplateScriptVO, ivrTaskTemplateScriptVO.getIsoperation()); |
| | |
| | | */ |
| | | @Override |
| | | public IvrTaskTemplateVO selectInfoByCondition(IvrTaskTemplateVO ivrTaskTemplateVO) { |
| | | log.info("æ¥è¯¢æ¨¡æ¿è¯¦æ
æ ¹æ®æ¡ä»¶çå
¥å为 : {}" , ivrTaskTemplateVO); |
| | | log.info("æ¥è¯¢æ¨¡æ¿è¯¦æ
æ ¹æ®æ¡ä»¶çå
¥å为 : {}", ivrTaskTemplateVO); |
| | | //å
æ ¹æ®æ¡ä»¶æ¥è¯¢é®é¢è¡¨ä¿¡æ¯ |
| | | IvrTaskTemplate ivrTaskTemplate = DtoConversionUtils.sourceToTarget(ivrTaskTemplateVO, IvrTaskTemplate.class); |
| | | List<IvrTaskTemplate> ivrTaskTemplates = selectIvrTaskTemplateList(ivrTaskTemplate); |
| | | if (CollectionUtils.isEmpty(ivrTaskTemplates)) { |
| | | log.info("æä¾çæ¡ä»¶,æ¥è¯¢æ¨¡æ¿è¯¦æ
æ°æ®ä¸ºç©ºï¼{}" , ivrTaskTemplates); |
| | | log.info("æä¾çæ¡ä»¶,æ¥è¯¢æ¨¡æ¿è¯¦æ
æ°æ®ä¸ºç©ºï¼{}", ivrTaskTemplates); |
| | | throw new BaseException("æä¾çæ¡ä»¶,æ¥è¯¢æ¨¡æ¿è¯¦æ
æ°æ®ä¸ºç©º"); |
| | | } |
| | | |
| | | log.info("ivrLibaTemplatesçæ¥è¯¢ç»æä¸º:{},æ°é为 : {}" , ivrTaskTemplates.get(0), ivrTaskTemplates.size()); |
| | | log.info("ivrLibaTemplatesçæ¥è¯¢ç»æä¸º:{},æ°é为 : {}", ivrTaskTemplates.get(0), ivrTaskTemplates.size()); |
| | | //å®ä¹IvrLibaTemplateVO ç¨äºè¿å |
| | | IvrTaskTemplateVO templateVO = DtoConversionUtils.sourceToTarget(ivrTaskTemplates.get(0), IvrTaskTemplateVO.class); |
| | | // |
| | |
| | | |
| | | //éè¿è¯æ¯IDè·åé项 |
| | | for (IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO : ivrTaskTemplateScriptVOS) { |
| | | log.info("ivrLibaTemplateScriptVOç主é®id为ï¼{}" , ivrTaskTemplateScriptVO.getId()); |
| | | log.info("ivrLibaTemplateScriptVOç主é®id为ï¼{}", ivrTaskTemplateScriptVO.getId()); |
| | | IvrTaskTemplateTargetoption ivrTaskTemplateTargetoption = new IvrTaskTemplateTargetoption(); |
| | | ivrTaskTemplateTargetoption.setScriptid(ivrTaskTemplateScriptVO.getId()); |
| | | List<IvrTaskTemplateTargetoption> ivrTaskTemplateTargetoptions = ivrTaskTemplateTargetoptionMapper.selectIvrTaskTemplateTargetoptionList(ivrTaskTemplateTargetoption); |
| | |
| | | } |
| | | |
| | | private void dealOption(List<IvrTaskTemplateTargetoption> ivrTaskTemplateTargetoptionList, IvrTaskTemplateScript ivrTaskTemplateScript, Long tmpID, Integer isoperation) { |
| | | log.info("ivrLibaTemplateScriptçå¼ä¸ºï¼{}" , ivrTaskTemplateScript); |
| | | log.info("ivrLibaTemplateScriptçå¼ä¸ºï¼{}", ivrTaskTemplateScript); |
| | | Integer lsisoperation = isoperation; |
| | | //å¯¹æ¨¡æ¿ææ é项è¿è¡å¤ç |
| | | if (CollectionUtils.isNotEmpty(ivrTaskTemplateTargetoptionList)) { |
| | |
| | | package com.smartor.service.impl; |
| | | |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.core.domain.entity.SysUserRole; |
| | | import com.smartor.domain.PatArchiveImport; |
| | | import com.smartor.mapper.PatArchiveImportMapper; |
| | | import com.smartor.service.IPatArchiveImportService; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.apache.poi.ss.usermodel.*; |
| | | import org.apache.poi.ss.usermodel.Cell; |
| | | 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.text.DecimalFormat; |
| | |
| | | public class PatArchiveImportServiceImpl implements IPatArchiveImportService { |
| | | @Autowired |
| | | private PatArchiveImportMapper patArchiveImportMapper; |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢Excel导å
¥æ£è
æ¡£æ¡ |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<PatArchiveImport> importPatInfo(MultipartFile multipartFile) { |
| | | public List<PatArchiveImport> importPatInfo(MultipartFile multipartFile, SysUser user) { |
| | | //ç¨äºè¿å |
| | | List<PatArchiveImport> patArchiveImports = new ArrayList<>(); |
| | | |
| | |
| | | } |
| | | |
| | | boolean contains = qc.contains(row.getCell(1).toString()); |
| | | if (contains) continue; |
| | | PatArchiveImport pt = new PatArchiveImport(); |
| | | pt.setIdcardno(patArchiveImport.getIdcardno()); |
| | | pt.setDelFlag("0"); |
| | | List<PatArchiveImport> patArchiveImports1 = patArchiveImportMapper.selectPatArchiveImportList(pt); |
| | | if (contains || CollectionUtils.isNotEmpty(patArchiveImports1)) continue; |
| | | } |
| | | |
| | | if (ObjectUtils.isNotEmpty(row.getCell(2)) && StringUtils.isNotEmpty(row.getCell(2) + "")) { |
| | |
| | | patArchiveImport.setAge(Long.valueOf(row.getCell(7).toString())); |
| | | } |
| | | |
| | | |
| | | patArchiveImport.setCreateTime(new Date()); |
| | | patArchiveImport.setUpdateTime(new Date()); |
| | | //æ¹éå·ï¼å½åæ¶é´ï¼ |
| | | patArchiveImport.setBatchNo(new SimpleDateFormat("yyyyMMddHHmmss").format(new Date())); |
| | | patArchiveImport.setCreateBy(user.getNickName()); |
| | | insertPatArchiveImport(patArchiveImport); |
| | | //ç»å½å导å
¥æ£è
ï¼æ³¨åå¸å· sys_user sys_user_role |
| | | if (patArchiveImport.getAccount() == 1) { |
| | | //æ¥è¯¢ä¸ä¸ï¼è¯¥æ£è
æ¯å¦å·²ç»å¨è¡¨éå建äºå¸å· |
| | | SysUser sysUser = patArchiveImportMapper.checkUserExist(patArchiveImport.getIdcardno()); |
| | | if (ObjectUtils.isEmpty(sysUser)) { |
| | | sysUser = new SysUser(); |
| | | //å¦æä¸ºç©ºï¼åè¿è¡æ°å¢sys_user sys_role |
| | | sysUser.setIdCard(patArchiveImport.getIdcardno()); |
| | | int start = patArchiveImport.getIdcardno().length() - 6; |
| | | String lastSixDigits = patArchiveImport.getIdcardno().substring(start, start + 6); |
| | | sysUser.setUserName(lastSixDigits); |
| | | //å¯ç ï¼xh@123456 |
| | | sysUser.setPassword("$2a$10$zja67LEWTESHutljd8bqEeRy.VgWb./8iJPpFR6VjTUa7ZYNfRRrO"); |
| | | sysUser.setPhonenumber(patArchiveImport.getTelcode()); |
| | | sysUser.setUserType("æ£è
"); |
| | | sysUser.setDeptId(395L); |
| | | sysUser.setNickName(patArchiveImport.getName()); |
| | | sysUser.setCreateTime(new Date()); |
| | | sysUser.setCreateBy(user.getNickName()); |
| | | sysUser.setUpdateTime(new Date()); |
| | | sysUser.setUpdateBy(user.getNickName()); |
| | | patArchiveImportMapper.insertUser(sysUser); |
| | | //å°æ£è
ä¸è§è²ç»å® |
| | | SysUserRole sysUserRole = new SysUserRole(); |
| | | sysUserRole.setUserId(sysUser.getUserId()); |
| | | sysUserRole.setRoleId(6L); |
| | | patArchiveImportMapper.insertUserRole(sysUserRole); |
| | | } |
| | | } |
| | | |
| | | patArchiveImports.add(patArchiveImport); |
| | | } |
| | |
| | | private TemplateDeptMapper templateDeptMapper; |
| | | |
| | | @Autowired |
| | | private IvrTaskTemplateMapper ivrTaskTemplateMapper; |
| | | private PatArchiveImportMapper patArchiveImportMapper; |
| | | |
| | | @Autowired |
| | | private Icd10AssociationMapper icd10AssociationMapper; |
| | | |
| | | @Autowired |
| | | private SvyTaskTemplateMapper svyTaskTemplateMapper; |
| | | @Autowired |
| | | private IvrTaskTemplateMapper ivrTaskTemplateMappte; |
| | | |
| | | @Autowired |
| | | private ServiceTaskMapper serviceTaskMapper; |
| | |
| | | TemplateDept templateDept = new TemplateDept(); |
| | | templateDept.setDeptCode(patMedInhosp1.getLeaveldeptcode()); |
| | | templateDept.setLongTemp(1); |
| | | templateDept.setType(11L); |
| | | templateDept.setType(21L); |
| | | List<TemplateDept> templateDepts = templateDeptMapper.selectTemplateDeptList(templateDept); |
| | | //æ ¹æ®è·åçé¿æä»»å¡æ¨¡æ¿IDï¼è·å任塿¨¡æ¿è¯¦æ
|
| | | List<SvyTaskTemplate> svyTaskTemplates = new ArrayList<>(); |
| | | List<IvrTaskTemplate> ivrTaskTemplates = new ArrayList<>(); |
| | | if (CollectionUtils.isNotEmpty(templateDepts)) { |
| | | for (TemplateDept templateDept1 : templateDepts) { |
| | | SvyTaskTemplate svyTaskTemplate = svyTaskTemplateMapper.selectSvyTaskTemplateBySvyid(templateDept1.getTempid()); |
| | | if (ObjectUtils.isNotEmpty(svyTaskTemplate)) svyTaskTemplates.add(svyTaskTemplate); |
| | | IvrTaskTemplate ivrTaskTemplate = ivrTaskTemplateMappte.selectIvrTaskTemplateByID(templateDept1.getTempid()); |
| | | if (ObjectUtils.isNotEmpty(ivrTaskTemplate)) ivrTaskTemplates.add(ivrTaskTemplate); |
| | | } |
| | | } |
| | | //妿é¨é¨æ¨¡æ¿ä¸ºç©ºï¼æå®ï¼å°åºå
¥é¢è¡¨çcheck_flag设置为2 ï¼long_task_reason è®°å½åå ï¼ |
| | | if (CollectionUtils.isEmpty(svyTaskTemplates) || svyTaskTemplates.size() == 0) { |
| | | if (CollectionUtils.isEmpty(ivrTaskTemplates) || ivrTaskTemplates.size() == 0) { |
| | | patMedInhosp1.setCheckFlag("2"); |
| | | patMedInhosp1.setLongTaskReason("该æ£è
æå¨ç§å®¤ï¼æªé
ç½®ä»»å¡æ¨¡æ¿"); |
| | | patMedInhospMapper.updatePatMedInhosp(patMedInhosp1); |
| | |
| | | //ç»ä¸ªremark(ç¨æ¥åæ¯å¦è¦ç»åéæ¶é´æ è¯) |
| | | String remark = null; |
| | | //å®ä¹ä¸ä¸ªæ¨¡æ¿åéï¼ç¨ä¸ä¸´æ¶ä¿åä¸ä¸æ¾åºæ¥çæ¨¡æ¿ |
| | | SvyTaskTemplate stt = null; |
| | | if (CollectionUtils.isNotEmpty(svyTaskTemplates) && svyTaskTemplates.size() == 1) { |
| | | stt = svyTaskTemplates.get(0); |
| | | taskid = svyTaskTemplates.get(0).getTaskid(); |
| | | IvrTaskTemplate stt = null; |
| | | if (CollectionUtils.isNotEmpty(ivrTaskTemplates) && ivrTaskTemplates.size() == 1) { |
| | | stt = ivrTaskTemplates.get(0); |
| | | taskid = ivrTaskTemplates.get(0).getTaskid(); |
| | | |
| | | } else if (CollectionUtils.isNotEmpty(svyTaskTemplates) && svyTaskTemplates.size() > 1) { |
| | | } else if (CollectionUtils.isNotEmpty(ivrTaskTemplates) && ivrTaskTemplates.size() > 1) { |
| | | //éè¿æ£è
çç¾ç
廿¾æ¨¡æ¿ |
| | | if (StringUtils.isNotEmpty(patMedInhosp1.getIcd10code())) { |
| | | aa: |
| | | for (SvyTaskTemplate svyTaskTemplate1 : svyTaskTemplates) { |
| | | for (IvrTaskTemplate ivrTaskTemplate1 : ivrTaskTemplates) { |
| | | //éè¿åºç¡æ¨¡æ¿IDè·åå
³èçç¾ç
code |
| | | Icd10Association icd10Association = new Icd10Association(); |
| | | icd10Association.setType(5L); |
| | | icd10Association.setOutid(svyTaskTemplate1.getTemplateid()); |
| | | icd10Association.setOutid(ivrTaskTemplate1.getId()); |
| | | List<Icd10Association> icd10Associations = icd10AssociationMapper.selectIcd10AssociationList(icd10Association); |
| | | if (CollectionUtils.isEmpty(icd10Associations)) { |
| | | //å¦è½æ¨¡æ¿çç¾ç
为空ï¼åæ¯æ¬ç§å®¤çéç¨é»è®¤æ¨¡æ¿ |
| | | stt = svyTaskTemplate1; |
| | | stt = ivrTaskTemplate1; |
| | | taskid = stt.getTaskid(); |
| | | continue; |
| | | } else { |
| | | //å¦è½æ¨¡æ¿çç¾ç
ä¸ä¸ºç©ºï¼åæ¯ç¨å¹é
å°ç¾ç
çæ¨¡æ¿ï¼å¦æå¹é
åºæ¥å¤ä¸ªæ¨¡æ¿ï¼åªç¨ç¬¬ä¸ä¸ªï¼ |
| | | for (Icd10Association icd10Association1 : icd10Associations) { |
| | | if (patMedInhosp1.getIcd10code().equals(icd10Association1.getIcd10code())) { |
| | | stt = svyTaskTemplate1; |
| | | stt = ivrTaskTemplate1; |
| | | taskid = stt.getTaskid(); |
| | | break aa; |
| | | } |
| | |
| | | } |
| | | } else { |
| | | //为空çè¯ï¼ç´æ¥ç¨ç§å®¤çéç¨æ¨¡æ¿çä»»å¡IDï¼è¯¥æ£è
ç´æ¥å¾åä»»å¡è¡¨éæå
¥ï¼ä½ä¸è¦æ§è¡ï¼éè¦äººå·¥å¹²ï¼å°ä¸è½æ§è¡çåå 夿³¨å¥½ï¼ |
| | | for (SvyTaskTemplate svyTaskTemplate1 : svyTaskTemplates) { |
| | | for (IvrTaskTemplate ivrTaskTemplate1 : ivrTaskTemplates) { |
| | | //éè¿åºç¡æ¨¡æ¿IDè·åå
³èçç¾ç
code |
| | | Icd10Association icd10Association = new Icd10Association(); |
| | | icd10Association.setType(5L); |
| | | icd10Association.setOutid(svyTaskTemplate1.getTemplateid()); |
| | | icd10Association.setOutid(ivrTaskTemplate1.getId()); |
| | | //æ¾åºè¯¥ç§å®¤çéç¨æ¨¡æ¿ |
| | | List<Icd10Association> icd10Associations = icd10AssociationMapper.selectIcd10AssociationList(icd10Association); |
| | | if (CollectionUtils.isEmpty(icd10Associations)) { |
| | | stt = svyTaskTemplate1; |
| | | stt = ivrTaskTemplate1; |
| | | //ä¸é
ç½®åéæ¶é´ |
| | | remark = "æ£è
å
¥é¢ç¾ç
为空"; |
| | | //å¨åºå
¥é¢è¡¨è®°å½ä¸ä¸è¯¥æ£è
ç¶æï¼è¯¥ç§å®¤æ¯æç¾ç
ä¸ºç©ºçæ¨¡æ¿ï¼æä»¥å¯ä»¥å¨åä»»å¡éçæä»»å¡ï¼æä»¥ä»»å¡æ¯æåçï¼chect_flag=1ï¼ |
| | |
| | | ServiceTask serviceTask = serviceTaskMapper.selectServiceTaskByTaskid(taskid); |
| | | ServiceSubtask serviceSubtask = DtoConversionUtils.sourceToTarget(serviceTask, ServiceSubtask.class); |
| | | serviceSubtask.setTaskid(serviceTask.getTaskid()); |
| | | serviceSubtask.setLibtemplateid(stt.getTemplateid()); |
| | | if (StringUtils.isNotEmpty(stt.getLibtemplateid())) |
| | | serviceSubtask.setLibtemplateid(Long.valueOf(stt.getLibtemplateid())); |
| | | serviceSubtask.setNurseId(patMedInhosp1.getNurseId()); |
| | | serviceSubtask.setNurseName(patMedInhosp1.getNurseName()); |
| | | serviceSubtask.setDrcode(patMedInhosp1.getDrcode()); |
| | | serviceSubtask.setDrname(patMedInhosp1.getDrname()); |
| | | serviceSubtask.setDeptname(patMedInhosp1.getLeaveldeptname()); |
| | | serviceSubtask.setTemplateid(stt.getId()); |
| | | serviceSubtask.setTemplatename(stt.getSvyname()); |
| | | serviceSubtask.setTemplatename(stt.getTemplateName()); |
| | | serviceSubtask.setPatid(patArchive.getId()); |
| | | serviceSubtask.setSendname(patArchive.getName()); |
| | | serviceSubtask.setSfzh(patArchive.getIdcardno()); |
| | |
| | | |
| | | return 1; |
| | | } |
| | | //é®å· |
| | | // @Override |
| | | // public int dealOutHospInfo() { |
| | | // PatMedInhosp patMedInhosp = new PatMedInhosp(); |
| | | // //è·åæªå¤ççæ°æ® |
| | | // patMedInhosp.setCheckFlag("0"); |
| | | // patMedInhosp.setInhospstate("1"); |
| | | // List<PatMedInhosp> patMedInhosps = patMedInhospMapper.selectPatMedInhospList(patMedInhosp); |
| | | // |
| | | // for (PatMedInhosp patMedInhosp1 : patMedInhosps) { |
| | | // //æ ¹æ®æ£è
æå¨ç§å®¤ï¼è·å该ç§å®¤çé¿æä»»å¡æ¨¡æ¿ |
| | | // Long taskid = null; |
| | | // //éè¿deptCodeè·åå
³èçé¿æä»»å¡æ¨¡æ¿ |
| | | // TemplateDept templateDept = new TemplateDept(); |
| | | // templateDept.setDeptCode(patMedInhosp1.getLeaveldeptcode()); |
| | | // templateDept.setLongTemp(1); |
| | | // templateDept.setType(11L); |
| | | // List<TemplateDept> templateDepts = templateDeptMapper.selectTemplateDeptList(templateDept); |
| | | // //æ ¹æ®è·åçé¿æä»»å¡æ¨¡æ¿IDï¼è·å任塿¨¡æ¿è¯¦æ
|
| | | // List<SvyTaskTemplate> svyTaskTemplates = new ArrayList<>(); |
| | | // if (CollectionUtils.isNotEmpty(templateDepts)) { |
| | | // for (TemplateDept templateDept1 : templateDepts) { |
| | | // SvyTaskTemplate svyTaskTemplate = svyTaskTemplateMapper.selectSvyTaskTemplateBySvyid(templateDept1.getTempid()); |
| | | // if (ObjectUtils.isNotEmpty(svyTaskTemplate)) svyTaskTemplates.add(svyTaskTemplate); |
| | | // } |
| | | // } |
| | | // //妿é¨é¨æ¨¡æ¿ä¸ºç©ºï¼æå®ï¼å°åºå
¥é¢è¡¨çcheck_flag设置为2 ï¼long_task_reason è®°å½åå ï¼ |
| | | // if (CollectionUtils.isEmpty(svyTaskTemplates) || svyTaskTemplates.size() == 0) { |
| | | // patMedInhosp1.setCheckFlag("2"); |
| | | // patMedInhosp1.setLongTaskReason("该æ£è
æå¨ç§å®¤ï¼æªé
ç½®ä»»å¡æ¨¡æ¿"); |
| | | // patMedInhospMapper.updatePatMedInhosp(patMedInhosp1); |
| | | // continue; |
| | | // } |
| | | // |
| | | // //è·åæ£è
ä¿¡æ¯ |
| | | // PatArchive patArchive = patArchiveMapper.selectPatArchiveByPatid(patMedInhosp1.getPatid()); |
| | | // //ç»ä¸ªremark(ç¨æ¥åæ¯å¦è¦ç»åéæ¶é´æ è¯) |
| | | // String remark = null; |
| | | // //å®ä¹ä¸ä¸ªæ¨¡æ¿åéï¼ç¨ä¸ä¸´æ¶ä¿åä¸ä¸æ¾åºæ¥çæ¨¡æ¿ |
| | | // SvyTaskTemplate stt = null; |
| | | // if (CollectionUtils.isNotEmpty(svyTaskTemplates) && svyTaskTemplates.size() == 1) { |
| | | // stt = svyTaskTemplates.get(0); |
| | | // taskid = svyTaskTemplates.get(0).getTaskid(); |
| | | // |
| | | // } else if (CollectionUtils.isNotEmpty(svyTaskTemplates) && svyTaskTemplates.size() > 1) { |
| | | // //éè¿æ£è
çç¾ç
廿¾æ¨¡æ¿ |
| | | // if (StringUtils.isNotEmpty(patMedInhosp1.getIcd10code())) { |
| | | // aa: |
| | | // for (SvyTaskTemplate svyTaskTemplate1 : svyTaskTemplates) { |
| | | // //éè¿åºç¡æ¨¡æ¿IDè·åå
³èçç¾ç
code |
| | | // Icd10Association icd10Association = new Icd10Association(); |
| | | // icd10Association.setType(5L); |
| | | // icd10Association.setOutid(svyTaskTemplate1.getTemplateid()); |
| | | // List<Icd10Association> icd10Associations = icd10AssociationMapper.selectIcd10AssociationList(icd10Association); |
| | | // if (CollectionUtils.isEmpty(icd10Associations)) { |
| | | // //å¦è½æ¨¡æ¿çç¾ç
为空ï¼åæ¯æ¬ç§å®¤çéç¨é»è®¤æ¨¡æ¿ |
| | | // stt = svyTaskTemplate1; |
| | | // taskid = stt.getTaskid(); |
| | | // continue; |
| | | // } else { |
| | | // //å¦è½æ¨¡æ¿çç¾ç
ä¸ä¸ºç©ºï¼åæ¯ç¨å¹é
å°ç¾ç
çæ¨¡æ¿ï¼å¦æå¹é
åºæ¥å¤ä¸ªæ¨¡æ¿ï¼åªç¨ç¬¬ä¸ä¸ªï¼ |
| | | // for (Icd10Association icd10Association1 : icd10Associations) { |
| | | // if (patMedInhosp1.getIcd10code().equals(icd10Association1.getIcd10code())) { |
| | | // stt = svyTaskTemplate1; |
| | | // taskid = stt.getTaskid(); |
| | | // break aa; |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | // //å¦æå¾ªç¯å®ï¼sttè¿æ¯ä¸ºç©ºï¼å该ç§å®¤æ²¡æé»è®¤æ¨¡æ¿ |
| | | // if (Objects.isNull(stt)) { |
| | | // //å¨åºå
¥é¢è¡¨è®°å½ä¸ä¸è¯¥æ£è
ç¶æï¼è¯¥ç§å®¤æ²¡ææ¨¡æ¿ï¼æä»¥æ æ³å¨åä»»å¡éçæä»»å¡ï¼æä»¥ä»»å¡æ¯å¤±è´¥æ¯çï¼chect_flag=2ï¼ |
| | | // patMedInhosp1.setCheckFlag("2"); |
| | | // patMedInhosp1.setLongTaskReason("æ æ³å¹é
å°è¯¥ç§å®¤æ¨¡æ¿ï¼è¯¥ç§å®¤ä¹æ é»è®¤æ¨¡æ¿"); |
| | | // patMedInhospMapper.updatePatMedInhosp(patMedInhosp1); |
| | | // continue; |
| | | // } |
| | | // } else { |
| | | // //为空çè¯ï¼ç´æ¥ç¨ç§å®¤çéç¨æ¨¡æ¿çä»»å¡IDï¼è¯¥æ£è
ç´æ¥å¾åä»»å¡è¡¨éæå
¥ï¼ä½ä¸è¦æ§è¡ï¼éè¦äººå·¥å¹²ï¼å°ä¸è½æ§è¡çåå 夿³¨å¥½ï¼ |
| | | // for (SvyTaskTemplate svyTaskTemplate1 : svyTaskTemplates) { |
| | | // //éè¿åºç¡æ¨¡æ¿IDè·åå
³èçç¾ç
code |
| | | // Icd10Association icd10Association = new Icd10Association(); |
| | | // icd10Association.setType(5L); |
| | | // icd10Association.setOutid(svyTaskTemplate1.getTemplateid()); |
| | | // //æ¾åºè¯¥ç§å®¤çéç¨æ¨¡æ¿ |
| | | // List<Icd10Association> icd10Associations = icd10AssociationMapper.selectIcd10AssociationList(icd10Association); |
| | | // if (CollectionUtils.isEmpty(icd10Associations)) { |
| | | // stt = svyTaskTemplate1; |
| | | // //ä¸é
ç½®åéæ¶é´ |
| | | // remark = "æ£è
å
¥é¢ç¾ç
为空"; |
| | | // //å¨åºå
¥é¢è¡¨è®°å½ä¸ä¸è¯¥æ£è
ç¶æï¼è¯¥ç§å®¤æ¯æç¾ç
ä¸ºç©ºçæ¨¡æ¿ï¼æä»¥å¯ä»¥å¨åä»»å¡éçæä»»å¡ï¼æä»¥ä»»å¡æ¯æåçï¼chect_flag=1ï¼ |
| | | // patMedInhosp1.setCheckFlag("1"); |
| | | // patMedInhosp1.setLongTaskReason("æ£è
å
¥é¢ç¾ç
为空ï¼å·²æ¾å°ç§å®¤æ¨¡æ¿"); |
| | | // patMedInhospMapper.updatePatMedInhosp(patMedInhosp1); |
| | | // continue; |
| | | // } |
| | | // } |
| | | // if (Objects.isNull(stt)) { |
| | | // //å¨åºå
¥é¢è¡¨è®°å½ä¸ä¸è¯¥æ£è
ç¶æï¼è¯¥ç§å®¤æ²¡ææ¨¡æ¿ï¼æä»¥æ æ³å¨åä»»å¡éçæä»»å¡ï¼æä»¥ä»»å¡æ¯å¤±è´¥æ¯çï¼chect_flag=2ï¼ |
| | | // patMedInhosp1.setCheckFlag("2"); |
| | | // patMedInhosp1.setLongTaskReason("æ£è
å
¥é¢ç¾ç
ä¸ºç©ºï¼æªæ¾å°ç§å®¤æ¨¡æ¿"); |
| | | // patMedInhospMapper.updatePatMedInhosp(patMedInhosp1); |
| | | // continue; |
| | | // } |
| | | // } |
| | | // } |
| | | // |
| | | // ServiceTask serviceTask = serviceTaskMapper.selectServiceTaskByTaskid(taskid); |
| | | // ServiceSubtask serviceSubtask = DtoConversionUtils.sourceToTarget(serviceTask, ServiceSubtask.class); |
| | | // serviceSubtask.setTaskid(serviceTask.getTaskid()); |
| | | // serviceSubtask.setLibtemplateid(stt.getTemplateid()); |
| | | // serviceSubtask.setNurseId(patMedInhosp1.getNurseId()); |
| | | // serviceSubtask.setNurseName(patMedInhosp1.getNurseName()); |
| | | // serviceSubtask.setDrcode(patMedInhosp1.getDrcode()); |
| | | // serviceSubtask.setDrname(patMedInhosp1.getDrname()); |
| | | // serviceSubtask.setDeptname(patMedInhosp1.getLeaveldeptname()); |
| | | // serviceSubtask.setTemplateid(stt.getId()); |
| | | // serviceSubtask.setTemplatename(stt.getSvyname()); |
| | | // serviceSubtask.setPatid(patArchive.getId()); |
| | | // serviceSubtask.setSendname(patArchive.getName()); |
| | | // serviceSubtask.setSfzh(patArchive.getIdcardno()); |
| | | // serviceSubtask.setPhone(patArchive.getTelcode()); |
| | | // serviceSubtask.setSex(patArchive.getSex()); |
| | | // serviceSubtask.setAge(patArchive.getAge()); |
| | | // serviceSubtask.setSendstate(2L); |
| | | // serviceSubtask.setStarttime(patMedInhosp1.getStarttime()); |
| | | // serviceSubtask.setEndtime(patMedInhosp1.getEndtime()); |
| | | // serviceSubtask.setServiceType("2"); |
| | | // serviceSubtask.setPreachform(serviceTask.getPreachform()); |
| | | // serviceSubtask.setHospType("2"); |
| | | // serviceSubtask.setCreateTime(new Date()); |
| | | // serviceSubtask.setUpdateTime(new Date()); |
| | | // serviceSubtask.setCreateBy(patMedInhosp1.getNurseName()); |
| | | // serviceSubtask.setLeavehospitaldistrictcode(patMedInhosp1.getLeavehospitaldistrictcode()); |
| | | // serviceSubtask.setLeavehospitaldistrictname(patMedInhosp1.getLeavehospitaldistrictname()); |
| | | // //设置åéæ¶é´ |
| | | // Date newDate = addDays(patMedInhosp1.getEndtime(), stt.getSendDay()); |
| | | // serviceSubtask.setLongSendTime(newDate); |
| | | // //æ£è
åéæ¶é´ |
| | | // if (StringUtils.isNotEmpty(patArchive.getNotrequiredFlag()) && patArchive.getNotrequiredFlag().equals("1")) { |
| | | // remark = patArchive.getNotrequiredreason(); |
| | | // serviceSubtask.setRemark(remark); |
| | | // serviceSubtask.setResult("error"); |
| | | // serviceSubtask.setFinishtime(new Date()); |
| | | // //䏿§è¡ |
| | | // serviceSubtask.setSendstate(4L); |
| | | // } |
| | | // |
| | | // //卿°å¢ä¹åï¼å
éè¿æ£è
IDï¼sendstate=2æ¥è¯¢ä¸ä¸ï¼å¨ææé¿æä»»å¡ä¸ï¼æ¯ä¸æ¯è¿æè¯¥æ£è
å¾
æ§è¡çä»»å¡ï¼æçè¯,æ¯è¾ä¹åçendtimeæ¯å¦å°äºå½åçendtaime,妿ä¹åçå°äºç°å¨çï¼åç´æ¥å°ä¹åçåæï¼åå åå
¥é¢ï¼ |
| | | // ServiceSubtaskVO subtask = new ServiceSubtaskVO(); |
| | | // subtask.setPatid(patArchive.getId()); |
| | | // subtask.setSendstate(2L); |
| | | // List<ServiceSubtask> selectServiceSubtaskList = serviceSubtaskMapper.selectServiceSubtaskList(subtask); |
| | | // log.error("该æ£è
å¾
æ§è¡çä»»å¡:{}", selectServiceSubtaskList); |
| | | // if (CollectionUtils.isNotEmpty(selectServiceSubtaskList) && selectServiceSubtaskList.size() > 0) { |
| | | // for (ServiceSubtask serviceSubtask1 : selectServiceSubtaskList) { |
| | | // if (Objects.isNull(serviceSubtask1.getLongSendTime())) { |
| | | // //䏿¯é¿æä»»å¡ï¼ä¸å¤ç |
| | | // continue; |
| | | // } |
| | | // if (serviceSubtask1.getEndtime().before(serviceSubtask.getEndtime())) { |
| | | // //妿å½å循ç¯çåä»»å¡çåºé¢æ¶é´å¨âå夿°å¢çåä»»å¡âçåºé¢æ¶é´ä¹åï¼åå°å¾ªç¯çåä»»å¡åæ |
| | | // serviceSubtask1.setSendstate(4L); |
| | | // serviceSubtask1.setRemark("æ£è
åå
¥é¢"); |
| | | // serviceSubtask1.setResult("error"); |
| | | // serviceSubtask1.setFinishtime(new Date()); |
| | | // serviceSubtaskMapper.updateServiceSubtask(serviceSubtask1); |
| | | // } else { |
| | | // //ç¸å,åå°å½æçæ°æ®åæ |
| | | // serviceSubtask.setResult("error"); |
| | | // serviceSubtask.setFinishtime(new Date()); |
| | | // serviceSubtask.setSendstate(4L); |
| | | // serviceSubtask.setRemark("æ£è
åå
¥é¢"); |
| | | // } |
| | | // } |
| | | // } |
| | | // |
| | | // serviceSubtaskMapper.insertServiceSubtask(serviceSubtask); |
| | | // //å°check_flagæ¹æ1ï¼å·²å¤çï¼ |
| | | // PatMedInhosp patMedInhosp2 = new PatMedInhosp(); |
| | | // patMedInhosp2.setInhospid(patMedInhosp1.getInhospid()); |
| | | // patMedInhosp2.setCheckFlag("1"); |
| | | // patMedInhospMapper.updatePatMedInhosp(patMedInhosp2); |
| | | // } |
| | | // |
| | | // //è·åæªå¤çå¨é¢çæ°æ®(妿åååºé¢çæ£è
æ°æ®çåºé¢æ¶é´,å¨ä¸é¢æ¥è¯¢åºçå
¥é¢æ¶é´ä¹å,é£ä¹åçåºé¢æ£è
çæ°æ®,ä¹å¾åæ,å 为åå
¥é¢äº) |
| | | // patMedInhosp.setCheckFlag("0"); |
| | | // patMedInhosp.setInhospstate("0"); |
| | | // List<PatMedInhosp> patMedInhospList = patMedInhospMapper.selectPatMedInhospList(patMedInhosp); |
| | | // if (CollectionUtils.isNotEmpty(patMedInhospList) && patMedInhospList.size() > 0) { |
| | | // for (PatMedInhosp patMedInhosp1 : patMedInhospList) { |
| | | // //è·åå½åå
¥é¢æ£è
çå¾
æ§è¡çåºé¢åä»»å¡éè®¿ä¿¡æ¯ |
| | | // ServiceSubtaskVO subtask = new ServiceSubtaskVO(); |
| | | // subtask.setPatid(patMedInhosp1.getPatid()); |
| | | // subtask.setSendstate(2L); |
| | | // List<ServiceSubtask> selectServiceSubtaskList = serviceSubtaskMapper.selectServiceSubtaskList(subtask); |
| | | // log.error("å
¥é¢çæ£è
å¾
æ§è¡çä»»å¡:{}", selectServiceSubtaskList); |
| | | // if (CollectionUtils.isNotEmpty(selectServiceSubtaskList) && selectServiceSubtaskList.size() > 0) { |
| | | // for (ServiceSubtask serviceSubtask1 : selectServiceSubtaskList) { |
| | | // if (Objects.isNull(serviceSubtask1.getLongSendTime())) { |
| | | // //䏿¯é¿æä»»å¡ï¼ä¸å¤ç |
| | | // continue; |
| | | // } |
| | | // if (serviceSubtask1.getEndtime().before(patMedInhosp1.getStarttime())) { |
| | | // //妿å½å循ç¯çåä»»å¡çåºé¢æ¶é´å¨âå夿°å¢çåä»»å¡âçåºé¢æ¶é´ä¹åï¼åå°å¾ªç¯çåä»»å¡åæ |
| | | // serviceSubtask1.setSendstate(4L); |
| | | // serviceSubtask1.setRemark("æ£è
åå
¥é¢"); |
| | | // serviceSubtask1.setResult("error"); |
| | | // serviceSubtask1.setFinishtime(new Date()); |
| | | // serviceSubtaskMapper.updateServiceSubtask(serviceSubtask1); |
| | | // } |
| | | // } |
| | | // } |
| | | // //å°æ£å
¥çå
¥é¢æ°æ®è®¾ç½®ä¸ºå·²å¤ç |
| | | // patMedInhosp1.setCheckFlag("1"); |
| | | // patMedInhospMapper.updatePatMedInhosp(patMedInhosp1); |
| | | // } |
| | | // } |
| | | // |
| | | // return 1; |
| | | // } |
| | | |
| | | /** |
| | | * è·ååºé¢ï¼ä½é¢ï¼é¨è¯æå¡äººæ¬¡ |
| | |
| | | return patMedInhospMapper.getDeptRanking(patMedReq); |
| | | } |
| | | |
| | | @Override |
| | | public List<PatMedInhosp> getDocAndPat(PatMedInhosp patMedInhosp) { |
| | | List<PatMedInhosp> patMedInhospList = patMedInhospMapper.selectPatMedInhospList(patMedInhosp); |
| | | if (StringUtils.isNotEmpty(patMedInhosp.getPatname()) || StringUtils.isNotEmpty(patMedInhosp.getNurseName()) || StringUtils.isNotEmpty(patMedInhosp.getDrname())) { |
| | | //è·åå¤é¨å¯¼å
¥ä¿¡æ¯,å¹¶å°å¤é¨æ£è
æ¾å°patMedInhospListä¸ |
| | | PatArchiveImport patArchiveImport = new PatArchiveImport(); |
| | | if (StringUtils.isNotEmpty(patMedInhosp.getPatname())) { |
| | | patArchiveImport.setName(patMedInhosp.getPatname()); |
| | | } |
| | | if (StringUtils.isNotEmpty(patMedInhosp.getNurseName())) |
| | | patArchiveImport.setCreateBy(patMedInhosp.getNurseName()); |
| | | if (StringUtils.isNotEmpty(patMedInhosp.getDrname())) |
| | | patArchiveImport.setCreateBy(patMedInhosp.getDrname()); |
| | | List<PatArchiveImport> patArchiveImports = patArchiveImportMapper.selectPatArchiveImportList(patArchiveImport); |
| | | if (CollectionUtils.isNotEmpty(patArchiveImports)) { |
| | | for (PatArchiveImport patArchiveImport1 : patArchiveImports) { |
| | | PatMedInhosp patMedInhosp1 = new PatMedInhosp(); |
| | | patMedInhosp1.setPatname(patArchiveImport1.getName()); |
| | | patMedInhosp1.setSex(patArchiveImport1.getSex()); |
| | | patMedInhosp1.setNurseName(patArchiveImport1.getCreateBy()); |
| | | patMedInhosp1.setOutImport(1); |
| | | patMedInhosp1.setTelcode(patArchiveImport1.getTelcode()); |
| | | patMedInhospList.add(patMedInhosp1); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return patMedInhospList; |
| | | } |
| | | |
| | | private Date addDays(Date date, Integer days) { |
| | | if (days == null) { |
| | | days = 1; |
| | |
| | | package com.smartor.service.impl; |
| | | |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.smartor.domain.ServiceSubtask; |
| | | import com.smartor.domain.ServiceSubtaskDetail; |
| | | import com.smartor.domain.ServiceSubtaskDetail; |
| | | import com.smartor.domain.ServiceTask; |
| | | import com.smartor.mapper.ServiceSubtaskDetailMapper; |
| | | import com.smartor.mapper.ServiceSubtaskMapper; |
| | | import com.smartor.service.IServiceSubtaskDetailService; |
| | | import com.smartor.service.IServiceTaskService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * è¯é³ä»»å¡å¼å«æç»Serviceä¸å¡å±å¤ç |
| | |
| | | private ServiceSubtaskDetailMapper ServiceSubtaskDetailMapper; |
| | | |
| | | @Autowired |
| | | private ServiceSubtaskMapper ivrTaskSingleMapper; |
| | | private ServiceSubtaskMapper serviceSubtaskMapper; |
| | | |
| | | @Autowired |
| | | private IServiceTaskService serviceTaskService; |
| | | |
| | | |
| | | /** |
| | |
| | | * @return è¯é³ä»»å¡å¼å«æç» |
| | | */ |
| | | @Override |
| | | public List<ServiceSubtaskDetail> selectServiceSubtaskDetailList(ServiceSubtaskDetail serviceSubtaskDetail) { |
| | | return ServiceSubtaskDetailMapper.selectServiceSubtaskDetailList(serviceSubtaskDetail); |
| | | public Map<String, Object> selectServiceSubtaskDetailList(ServiceSubtaskDetail serviceSubtaskDetail) { |
| | | List<ServiceSubtaskDetail> serviceSubtaskDetails = ServiceSubtaskDetailMapper.selectServiceSubtaskDetailList(serviceSubtaskDetail); |
| | | if (CollectionUtils.isNotEmpty(serviceSubtaskDetails)) { |
| | | //å¤çä¸ä¸éé
符 |
| | | for (ServiceSubtaskDetail serviceSubtaskDetail1 : serviceSubtaskDetails) { |
| | | ServiceSubtask serviceSubtask = serviceSubtaskMapper.selectServiceSubtaskById(serviceSubtaskDetail1.getSubId()); |
| | | serviceSubtaskDetail1.setQuestiontext(getObject(serviceSubtask, serviceSubtaskDetail1.getQuestiontext())); |
| | | } |
| | | } |
| | | //è·åæåçæ»å½é³å°å |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("code", 200); |
| | | map.put("msg", "æ¥è¯¢æå"); |
| | | Map<String, Object> map1 = new HashMap<>(); |
| | | map1.put("serviceSubtaskDetails", serviceSubtaskDetails); |
| | | map1.put("filteredDetails", null); |
| | | //ç¨äºåå¨å»éçæ°æ® |
| | | List<ServiceSubtaskDetail> serviceSubtaskDetailSET = new ArrayList<>(); |
| | | Boolean flag = false; |
| | | if (CollectionUtils.isNotEmpty(serviceSubtaskDetails)) { |
| | | for (ServiceSubtaskDetail serviceSubtaskDetail1 : serviceSubtaskDetails) { |
| | | if (serviceSubtaskDetailSET.size() == 0) { |
| | | serviceSubtaskDetailSET.add(serviceSubtaskDetail1); |
| | | } else { |
| | | // for (ServiceSubtaskDetail subtaskDetail : serviceSubtaskDetailSET) |
| | | for (int i = 0; i < serviceSubtaskDetailSET.size(); i++) { |
| | | ServiceSubtaskDetail subtaskDetail = serviceSubtaskDetailSET.get(i); |
| | | if (subtaskDetail.getPatid().equals(serviceSubtaskDetail1.getPatid()) && subtaskDetail.getSubId().equals(serviceSubtaskDetail1.getSubId()) && subtaskDetail.getTaskid().equals(serviceSubtaskDetail1.getTaskid()) && subtaskDetail.getQuestiontext().equals(serviceSubtaskDetail1.getQuestiontext())) { |
| | | if (StringUtils.isNotEmpty(serviceSubtaskDetail1.getMatchedtext())) { |
| | | serviceSubtaskDetailSET.set(i, serviceSubtaskDetail1); |
| | | } |
| | | //å¹é
å°è¿ä¸ªæ°æ®,å°flagæ¹æfalse |
| | | if (flag == true) flag = false; |
| | | } else if ((subtaskDetail.getPatid().equals(serviceSubtaskDetail1.getPatid()) && subtaskDetail.getSubId().equals(serviceSubtaskDetail1.getSubId()) && subtaskDetail.getTaskid().equals(serviceSubtaskDetail1.getTaskid()) && !subtaskDetail.getQuestiontext().equals(serviceSubtaskDetail1.getQuestiontext()))) { |
| | | //æ è¯ä¸ä¸ï¼ææ¶æ²¡æå¹é
å°è¿ä¸ªæ°æ® |
| | | flag = true; |
| | | } else if ((subtaskDetail.getPatid() == serviceSubtaskDetail1.getPatid() && subtaskDetail.getSubId() != serviceSubtaskDetail1.getSubId() && subtaskDetail.getTaskid() == serviceSubtaskDetail1.getTaskid())) { |
| | | //æ è¯ä¸ä¸ï¼ææ¶æ²¡æå¹é
å°è¿ä¸ªæ°æ® |
| | | flag = true; |
| | | } |
| | | } |
| | | if (flag == true) { |
| | | //妿å»é循ç¯é½ç»æäºï¼è¿æ²¡æå¹é
å°è¿ä¸ªæ°æ®ï¼åå¾å»éå¯¹è±¡éæ°å¢ä¸ä¸ª |
| | | serviceSubtaskDetailSET.add(serviceSubtaskDetail1); |
| | | flag = false; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | Collections.sort(serviceSubtaskDetailSET, Comparator.comparingLong(ServiceSubtaskDetail::getTemplatequestionnum)); |
| | | map1.put("filteredDetails", serviceSubtaskDetailSET); |
| | | |
| | | map1.put("voice", ""); |
| | | if (CollectionUtils.isNotEmpty(serviceSubtaskDetails) && StringUtils.isNotEmpty(serviceSubtaskDetails.get(0).getQuestionvoice())) { |
| | | //è·å宿´è¯é³ |
| | | String filePath = serviceSubtaskDetails.get(0).getQuestionvoice(); |
| | | int lastIndex = filePath.lastIndexOf('.'); |
| | | if (lastIndex != -1) { |
| | | int secondLastIndex = filePath.lastIndexOf('.', lastIndex - 1); |
| | | if (secondLastIndex != -1) { |
| | | String voicePath = filePath.substring(0, secondLastIndex) + filePath.substring(lastIndex); |
| | | map1.put("voice", voicePath); |
| | | } |
| | | } |
| | | } |
| | | map.put("data", map1); |
| | | return map; |
| | | } |
| | | |
| | | /** |
| | |
| | | return ServiceSubtaskDetailMapper.deleteServiceSubtaskDetailByCalldetailid(calldetailid); |
| | | } |
| | | |
| | | private String getObject(ServiceSubtask serviceSubtask, String scriptContent) { |
| | | Map<String, Map<String, String>> param = getParam(serviceSubtask.getTaskid()); |
| | | for (Map<String, String> map : param.values()) { |
| | | for (String key : map.keySet()) { |
| | | scriptContent = scriptContent.replace(key, org.apache.commons.lang3.StringUtils.isNotEmpty(map.get(key)) ? map.get(key) : ""); |
| | | } |
| | | } |
| | | scriptContent = scriptContent.replace("${name}", org.apache.commons.lang3.StringUtils.isNotEmpty(serviceSubtask.getSendname()) ? serviceSubtask.getSendname() : ""); |
| | | scriptContent = scriptContent.replace("${dzz}", org.apache.commons.lang3.StringUtils.isNotEmpty(serviceSubtask.getAddr()) ? serviceSubtask.getAddr() : ""); |
| | | scriptContent = scriptContent.replace("${phone}", org.apache.commons.lang3.StringUtils.isNotEmpty(serviceSubtask.getTelcode()) ? serviceSubtask.getTelcode() : ""); |
| | | |
| | | return scriptContent; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è·åä»»å¡éçéé
符 |
| | | * |
| | | * @param taskId |
| | | * @return |
| | | */ |
| | | private Map<String, Map<String, String>> getParam(Long taskId) { |
| | | ServiceTask serviceTask = serviceTaskService.selectServiceTaskByTaskid(taskId); |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | Map<String, Map<String, String>> serviceTaskMap = null; |
| | | try { |
| | | serviceTaskMap = objectMapper.readValue(serviceTask.getTextParam(), Map.class); |
| | | } catch (JsonProcessingException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return serviceTaskMap; |
| | | } |
| | | |
| | | } |
| | |
| | | package com.smartor.service.impl; |
| | | |
| | | import afu.org.checkerframework.checker.oigj.qual.O; |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.*; |
| | | import com.ruoyi.common.utils.http.HttpUtils; |
| | | import com.smartor.common.FtpService; |
| | | import com.smartor.config.PhoneUtils; |
| | | import com.smartor.domain.*; |
| | | import com.smartor.mapper.*; |
| | | import com.smartor.service.IIvrTaskTemplateScriptService; |
| | | import com.smartor.service.IIvrTaskTemplateService; |
| | | import com.smartor.service.IServiceSubtaskService; |
| | | import com.smartor.service.IServiceTaskService; |
| | | import com.smartor.service.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.sql.Time; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalTime; |
| | |
| | | |
| | | @Autowired |
| | | private IIvrTaskTemplateService ivrTaskTemplateService; |
| | | |
| | | @Autowired |
| | | private ISvyTaskTemplateService svyTaskTemplateService; |
| | | |
| | | @Autowired |
| | | private IIvrTaskTemplateScriptService iIvrTaskTemplateScriptService; |
| | | |
| | | @Autowired |
| | | private FtpService ftpService; |
| | | |
| | | @Value("${pri_key}") |
| | | private String pri_key; |
| | |
| | | |
| | | @Value("${hangup}") |
| | | private String hangup; |
| | | |
| | | @Value("${app_key_yq}") |
| | | private String app_key_yq; |
| | | |
| | | @Value("${ruoyi.profile}") |
| | | private String profile; |
| | | |
| | | @Value("${voicePathPrefix}") |
| | | private String voicePathPrefix; |
| | | |
| | | |
| | | /** |
| | |
| | | serviceTask.setLeavehospitaldistrictcode(serviceTask.getLeavehospitaldistrictcode()); |
| | | serviceTaskService.insertServiceTask(serviceTask); |
| | | if (serviceTaskVO.getLongTask() != null && serviceTaskVO.getLongTask() == 1) { |
| | | //è¿ééè¦å°ä»»å¡idä¸ä»»å¡æ¨¡æ¿IDï¼å¨ä»»å¡æ¨¡æ¿ä¸ç»å® |
| | | Map<String, Integer> map = new HashMap<>(); |
| | | if (StringUtils.isNotEmpty(serviceTaskVO.getType()) && serviceTaskVO.getType().equals("1")) { |
| | | IvrTaskTemplate ivrTaskTemplate = new IvrTaskTemplate(); |
| | | ivrTaskTemplate.setTaskid(serviceTask.getTaskid()); |
| | | ivrTaskTemplate.setId(serviceTaskVO.getTemplateid()); |
| | | ivrTaskTemplateService.updateIvrTaskTemplate(ivrTaskTemplate); |
| | | } else if (StringUtils.isNotEmpty(serviceTaskVO.getType()) && serviceTaskVO.getType().equals("2")) { |
| | | SvyTaskTemplate svyTaskTemplate = new SvyTaskTemplate(); |
| | | svyTaskTemplate.setTaskid(serviceTask.getTaskid()); |
| | | svyTaskTemplate.setId(serviceTaskVO.getTemplateid()); |
| | | svyTaskTemplateService.updateSvyTaskTemplate(svyTaskTemplate); |
| | | } |
| | | map.put("subTaskId", null); |
| | | map.put("taskId", serviceTask.getTaskid().intValue()); |
| | | return map; |
| | |
| | | serviceSubtask.setPatid(patTaskRelevance.getPatid()); |
| | | serviceSubtask.setCreateTime(DateUtils.getNowDate()); |
| | | serviceSubtask.setSendstate(1L); |
| | | if (serviceTaskVO.getLongTask() == 1) serviceSubtask.setSendstate(2L); |
| | | serviceSubtask.setDeptcode(patTaskRelevance.getDeptCode()); |
| | | serviceSubtask.setDeptname(patTaskRelevance.getDeptName()); |
| | | serviceSubtask.setLeavehospitaldistrictcode(patTaskRelevance.getLeavehospitaldistrictcode()); |
| | |
| | | serviceSubtask.setEndtime(patTaskRelevance.getEndtime()); |
| | | serviceSubtask.setNurseId(patTaskRelevance.getNurseId()); |
| | | serviceSubtask.setNurseName(patTaskRelevance.getNurseName()); |
| | | if (serviceTaskVO.getLongTask() == 1) |
| | | serviceSubtask.setLongSendTime(patTaskRelevance.getLongSendTime()); |
| | | serviceSubtaskMapper.insertServiceSubtask(serviceSubtask); |
| | | integer = serviceSubtask.getId().intValue(); |
| | | } |
| | |
| | | if (serviceTaskVO.getLibtemplateid() != null) |
| | | serviceTask.setLibtemplateid(serviceTaskVO.getLibtemplateid().toString()); |
| | | serviceTask.setTemplateid(serviceTaskVO.getTemplateid()); |
| | | serviceTask.setLongTask(serviceTaskVO.getLongTask()); |
| | | serviceTaskService.updateServiceTask(serviceTask); |
| | | if (serviceTaskVO.getLongTask() != null && serviceTaskVO.getLongTask() == 1) { |
| | | //è¿ééè¦å°ä»»å¡idä¸ä»»å¡æ¨¡æ¿IDï¼å¨ä»»å¡æ¨¡æ¿ä¸ç»å® |
| | | Map<String, Integer> map = new HashMap<>(); |
| | | if (StringUtils.isNotEmpty(serviceTaskVO.getType()) && serviceTaskVO.getType().equals("1")) { |
| | | IvrTaskTemplate ivrTaskTemplate = new IvrTaskTemplate(); |
| | | ivrTaskTemplate.setTaskid(serviceTask.getTaskid()); |
| | | ivrTaskTemplate.setId(serviceTaskVO.getTemplateid()); |
| | | ivrTaskTemplateService.updateIvrTaskTemplate(ivrTaskTemplate); |
| | | } else if (StringUtils.isNotEmpty(serviceTaskVO.getType()) && serviceTaskVO.getType().equals("2")) { |
| | | SvyTaskTemplate svyTaskTemplate = new SvyTaskTemplate(); |
| | | svyTaskTemplate.setTaskid(serviceTask.getTaskid()); |
| | | svyTaskTemplate.setId(serviceTaskVO.getTemplateid()); |
| | | svyTaskTemplateService.updateSvyTaskTemplate(svyTaskTemplate); |
| | | } |
| | | map.put("subTaskId", null); |
| | | map.put("taskId", serviceTask.getTaskid().intValue()); |
| | | return map; |
| | | } |
| | | if (CollectionUtils.isNotEmpty(serviceTaskVO.getPatTaskRelevances())) { |
| | | for (PatTaskRelevance patTaskRelevance : serviceTaskVO.getPatTaskRelevances()) { |
| | | ServiceSubtask serviceSubtask = DtoConversionUtils.sourceToTarget(serviceTaskVO, ServiceSubtask.class); |
| | |
| | | ServiceSubTaskDetailReq serviceSubTaskDetailReq = new ServiceSubTaskDetailReq(); |
| | | List<ServiceSubtaskDetail> serviceSubtaskDetailList = new ArrayList<>(); |
| | | ivrTaskTemplateScriptVO.setQuestionResult(ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().get(j).getOptiondesc()); |
| | | serviceSubtaskDetailList.add(getServiceSubtaskDetail(phoneCallReqYQVO, ivrTaskTemplateScriptVO, serviceSubtask, ivrTaskTemplate)); |
| | | ServiceSubtaskDetail serviceSubtaskDetail = getServiceSubtaskDetail(phoneCallReqYQVO, ivrTaskTemplateScriptVO, serviceSubtask, ivrTaskTemplate); |
| | | //ä¿®æ¹ä¸ä¸è¯é³è·¯å¾ï¼æ¹æå端å¯ä»¥è®¿é®çï¼åå°æ°æ®åºä¸ï¼ |
| | | if (StringUtils.isNotEmpty(serviceSubtaskDetail.getQuestionvoice())) { |
| | | String questionvoice = serviceSubtaskDetail.getQuestionvoice(); |
| | | String[] split = questionvoice.split("\\\\"); |
| | | if (split.length > 0) { |
| | | String lastPart = split[split.length - 1]; |
| | | serviceSubtaskDetail.setQuestionvoice(voicePathPrefix + lastPart); |
| | | } |
| | | } |
| | | serviceSubtaskDetailList.add(serviceSubtaskDetail); |
| | | serviceSubTaskDetailReq.setServiceSubtaskDetailList(serviceSubtaskDetailList); |
| | | saveQuestionAnswerPhone(serviceSubTaskDetailReq); |
| | | //夿ä¸ä¸ï¼è¿ä¸ªéé¡¹ç»ææ¯ä¸æ¯è¿æç»§ç»é®ä¸å»çå¿
è¦ï¼ä¾å¦éé¡¹ç»ææ¯å«äººä¸æ³ç»§ç»åçé®é¢ï¼å°±è¦ç»ææ |
| | |
| | | if (j == ivrTaskTemplateScriptVO.getIvrTaskScriptTargetoptionList().size() - 1 && flag == 0) { |
| | | ServiceSubTaskDetailReq serviceSubTaskDetailReq = new ServiceSubTaskDetailReq(); |
| | | List<ServiceSubtaskDetail> serviceSubtaskDetailList = new ArrayList<>(); |
| | | serviceSubtaskDetailList.add(getServiceSubtaskDetail(phoneCallReqYQVO, ivrTaskTemplateScriptVO, serviceSubtask, ivrTaskTemplate)); |
| | | ServiceSubtaskDetail serviceSubtaskDetail = getServiceSubtaskDetail(phoneCallReqYQVO, ivrTaskTemplateScriptVO, serviceSubtask, ivrTaskTemplate); |
| | | //ä¿®æ¹ä¸ä¸è¯é³è·¯å¾ï¼æ¹æå端å¯ä»¥è®¿é®çï¼åå°æ°æ®åºä¸ï¼ |
| | | if (StringUtils.isNotEmpty(serviceSubtaskDetail.getQuestionvoice())) { |
| | | String questionvoice = serviceSubtaskDetail.getQuestionvoice(); |
| | | String[] split = questionvoice.split("\\\\"); |
| | | if (split.length > 0) { |
| | | String lastPart = split[split.length - 1]; |
| | | serviceSubtaskDetail.setQuestionvoice(voicePathPrefix + lastPart); |
| | | } |
| | | } |
| | | serviceSubtaskDetailList.add(serviceSubtaskDetail); |
| | | //å¦ææ²¡æ å¹é
ä¸ï¼è¿ä¸ªå¿
须为null |
| | | serviceSubtaskDetailList.get(0).setMatchedtext(""); |
| | | serviceSubTaskDetailReq.setServiceSubtaskDetailList(serviceSubtaskDetailList); |
| | | saveQuestionAnswerPhone(serviceSubTaskDetailReq); |
| | | continue; |
| | | } |
| | | continue; |
| | | } |
| | | } |
| | | //齿²¡æå¹é
å° |
| | |
| | | //䏿¯éæ©é¢,ç´æ¥è®°å½çæ¡ï¼å°ç»æåå°detailä¸ |
| | | ServiceSubTaskDetailReq serviceSubTaskDetailReq = new ServiceSubTaskDetailReq(); |
| | | List<ServiceSubtaskDetail> serviceSubtaskDetailList = new ArrayList<>(); |
| | | serviceSubtaskDetailList.add(getServiceSubtaskDetail(phoneCallReqYQVO, ivrTaskTemplateScriptVO, serviceSubtask, ivrTaskTemplate)); |
| | | ServiceSubtaskDetail serviceSubtaskDetail = getServiceSubtaskDetail(phoneCallReqYQVO, ivrTaskTemplateScriptVO, serviceSubtask, ivrTaskTemplate); |
| | | //ä¿®æ¹ä¸ä¸è¯é³è·¯å¾ï¼æ¹æå端å¯ä»¥è®¿é®çï¼åå°æ°æ®åºä¸ï¼ |
| | | if (StringUtils.isNotEmpty(serviceSubtaskDetail.getQuestionvoice())) { |
| | | String questionvoice = serviceSubtaskDetail.getQuestionvoice(); |
| | | String[] split = questionvoice.split("\\\\"); |
| | | if (split.length > 0) { |
| | | String lastPart = split[split.length - 1]; |
| | | serviceSubtaskDetail.setQuestionvoice(voicePathPrefix + lastPart); |
| | | } |
| | | } |
| | | serviceSubtaskDetailList.add(serviceSubtaskDetail); |
| | | serviceSubTaskDetailReq.setServiceSubtaskDetailList(serviceSubtaskDetailList); |
| | | saveQuestionAnswerPhone(serviceSubTaskDetailReq); |
| | | // String xh = idSort.split("-")[1]; |
| | |
| | | //pullTaskVOListç¨äºæ°æ®è¿å |
| | | List<PullTaskVO> pullTaskVOList = new ArrayList<>(); |
| | | String value0 = redisCache.getCacheObject("cache-0"); |
| | | log.error("任塿åvalue0ç弿¯å¤å°ï¼{}", value0); |
| | | // cache-0为ç«å³åèµ·ç,å
¶å®çå
æ¨è¿ |
| | | if (!StringUtils.isEmpty(value0)) { |
| | | pullTaskVOList = getPullTaskList(value0, "cache-0"); |
| | |
| | | |
| | | |
| | | private List<PullTaskVO> getPullTaskList(String subIds, String cacheName) { |
| | | log.error("任塿åsubIdsç弿¯å¤å°ï¼{}", subIds); |
| | | //pullTaskVOListç¨äºæ°æ®è¿å |
| | | List<PullTaskVO> pullTaskVOList = new ArrayList<>(); |
| | | //newValue0ç¨äºä¿å没æå¤ççå ä»»å¡ |
| | |
| | | if (cacheName.equals("cache-0") && i < 5 || !cacheName.equals("cache-0") && i < 1) { |
| | | PullTaskVO pullTaskVO = new PullTaskVO(); |
| | | String subId = split[i].trim().replace(",", ""); |
| | | |
| | | ServiceSubtask serviceSubtask = serviceSubtaskMapper.selectServiceSubtaskById(Long.valueOf(subId)); |
| | | ServiceTask serviceTask = serviceTaskService.selectServiceTaskByTaskid(serviceSubtask.getTaskid()); |
| | | IvrTaskTemplate ivrTaskTemplate = ivrTaskTemplateService.selectIvrTaskTemplateByID(serviceSubtask.getTemplateid()); |
| | |
| | | //å°è£
è¿åæ°æ® |
| | | //taskId = åä»»å¡ID + é®é¢ID +é®é¢åºå· |
| | | pullTaskVO.setTaskid(subId); |
| | | pullTaskVO.setAppkey("ZurNHpaQLq6P55YS"); |
| | | pullTaskVO.setAppkey(app_key_yq); |
| | | pullTaskVO.setSections(LocalTime.now().format(DateTimeFormatter.ofPattern("hh:mm")) + "-" + LocalTime.now().plusMinutes(1).format(DateTimeFormatter.ofPattern("hh:mm"))); |
| | | pullTaskVO.setPhones(serviceSubtask.getPhone()); |
| | | pullTaskVO.setPrologue(kcb); |
| | | if (cacheName.equals("cache-0")) pullTaskVO.setDisplayNo("2"); |
| | | else pullTaskVO.setDisplayNo("2"); |
| | | pullTaskVOList.add(pullTaskVO); |
| | | redisCache.setCacheObject(subId.trim() + "-" + serviceSubtask.getPhone().trim(), ivrTaskTemplateScript.getId().toString()); |
| | | redisCache.setCacheObject(subId.trim() + "-" + serviceSubtask.getPhone().trim(), ivrTaskTemplateScript.getId().toString(), 120, TimeUnit.MINUTES); |
| | | // redisCache.setCacheObject(subId.trim() + "-" + serviceSubtask.getPhone().trim() + "-firstSort", 1, 120, TimeUnit.MINUTES); |
| | | } else { |
| | | if (StringUtils.isEmpty(newValue0)) { |
| | |
| | | } else { |
| | | for (ServiceSubtaskDetail serviceSubtaskDetail : serviceSubTaskDetailReq.getServiceSubtaskDetailList()) { |
| | | serviceSubtaskDetail.setCreateTime(new Date()); |
| | | i = serviceSubtaskDetailMapper.insertServiceSubtaskDetail(serviceSubtaskDetail); |
| | | //å
æ ¹æ®åä»»å¡id,ä»»å¡IDåé®é¢åºå·æ¥è¯¢ä¸ä¸ï¼è¯¥é®é¢æ¯å¦å·²ç»æå¼ï¼å¦ææå¼ï¼ç´æ¥ä¿®æ¹ï¼å¦æä¸ºç©ºï¼ç´æ¥æå
¥ |
| | | ServiceSubtaskDetail ssd = new ServiceSubtaskDetail(); |
| | | ssd.setSubId(serviceSubtaskDetail.getSubId()); |
| | | ssd.setTaskid(serviceSubtaskDetail.getTaskid()); |
| | | ssd.setTemplatequestionnum(serviceSubtaskDetail.getTemplatequestionnum()); |
| | | List<ServiceSubtaskDetail> serviceSubtaskDetails = serviceSubtaskDetailMapper.selectServiceSubtaskDetailList(ssd); |
| | | if (CollectionUtils.isNotEmpty(serviceSubtaskDetails) && StringUtils.isNotEmpty(serviceSubtaskDetails.get(0).getMatchedtext())) { |
| | | serviceSubtaskDetail.setId(serviceSubtaskDetails.get(0).getId()); |
| | | serviceSubtaskDetailMapper.updateServiceSubtaskDetail(serviceSubtaskDetail); |
| | | } else { |
| | | i = serviceSubtaskDetailMapper.insertServiceSubtaskDetail(serviceSubtaskDetail); |
| | | } |
| | | } |
| | | } |
| | | return i; |
| | | } |
| | | |
| | | @Override |
| | | public Integer recordAccept(PhoneCallRecordVO phoneCallRecordVO) { |
| | | if (phoneCallRecordVO.getAnswered() != null && phoneCallRecordVO.getAnswered() == true) { |
| | | log.error("æäººæ¥çµè¯äºï¼å¹¶ä¸å®äº"); |
| | | //说ææäººæ¥äº |
| | | int startIndex = phoneCallRecordVO.getRecord_path().indexOf("voice") + "voice".length() + 1; // å 1æ¯è·³è¿/ç¬¦å· |
| | | int endIndex = phoneCallRecordVO.getRecord_path().lastIndexOf("/"); |
| | | String result = phoneCallRecordVO.getRecord_path().substring(startIndex, endIndex); |
| | | //ä¸è½½æä»¶ |
| | | ftpService.downloadFolder("/" + LocalDate.now().toString(), profile + "/upload/vadio/voice/" + LocalDate.now().toString()); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | @Override |
| | |
| | | private ServiceSubtaskDetail getServiceSubtaskDetail(PhoneCallReqYQVO phoneCallReqYQVO, IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO, ServiceSubtask serviceSubtask, IvrTaskTemplate ivrTaskTemplate) { |
| | | ServiceSubtaskDetail serviceSubtaskDetail = new ServiceSubtaskDetail(); |
| | | serviceSubtaskDetail.setSubId(Long.valueOf(phoneCallReqYQVO.getTaskid())); |
| | | ServiceSubtask serviceSubtask1 = serviceSubtaskMapper.selectServiceSubtaskById(Long.valueOf(phoneCallReqYQVO.getTaskid())); |
| | | if (serviceSubtask1 != null) { |
| | | serviceSubtaskDetail.setTaskid(serviceSubtask1.getTaskid()); |
| | | serviceSubtaskDetail.setPatid(serviceSubtask1.getPatid()); |
| | | } |
| | | serviceSubtaskDetail.setUuid(phoneCallReqYQVO.getUuid()); |
| | | serviceSubtaskDetail.setPhone(phoneCallReqYQVO.getPhone()); |
| | | serviceSubtaskDetail.setOperate(serviceSubtask.getCreateBy()); |
| | |
| | | if (ivrTaskTemplateTargetoption.getIsUserOperation() == 1) { |
| | | serviceSubtaskDetail.setMatchedtext(ivrTaskTemplateTargetoption.getTargetvalue()); |
| | | } |
| | | serviceSubtaskDetail.setTargetvalue(StringUtils.isEmpty(serviceSubtaskDetail.getTargetvalue()) ? i + ivrTaskTemplateTargetoption.getTargetvalue() : serviceSubtaskDetail.getTargetvalue() + " " + (i + 1) + ivrTaskTemplateTargetoption.getTargetvalue()); |
| | | serviceSubtaskDetail.setTargetvalue(StringUtils.isEmpty(serviceSubtaskDetail.getTargetvalue()) ? ivrTaskTemplateTargetoption.getTargetvalue() : serviceSubtaskDetail.getTargetvalue() + "&" + ivrTaskTemplateTargetoption.getTargetvalue()); |
| | | } |
| | | |
| | | serviceSubtaskDetail.setAddtime(new Date()); |
| | |
| | | /** |
| | | * æ°å¢æ¨¡æ¿ç§å®¤å
³è |
| | | * |
| | | * @param templateDept 模æ¿ç§å®¤å
³è |
| | | * @param templateDepts 模æ¿ç§å®¤å
³è |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="updateDynam" parameterType="com.smartor.domain.IvrLibaScriptTargetoption"> |
| | | update ivr_liba_script_targetoption |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="nodynamiccruxsJson == null ">nodynamiccruxs = "",</if> |
| | | <if test="dynamiccruxsJson == null ">dynamiccruxs = "",</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteIvrLibaScriptTargetoptionByTargetoptionid" parameterType="Long"> |
| | | update ivr_liba_script_targetoption |
| | | <trim prefix="SET" suffixOverrides=","> |
| | |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="updateDynamiccruxs" parameterType="com.smartor.domain.IvrLibaTemplateTargetoption"> |
| | | update ivr_liba_template_targetoption |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | |
| | | <if test="nodynamiccruxsJson == null ">nodynamiccruxs = #{nodynamiccruxsJson},</if> |
| | | <if test="dynamiccruxsJson == null ">dynamiccruxs = #{dynamiccruxsJson},</if> |
| | | |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deleteIvrLibaTemplateTargetoptionById" parameterType="Long"> |
| | | update ivr_liba_template_targetoption |
| | | <trim prefix="SET" suffixOverrides=","> |
| | |
| | | <result property="instruction" column="instruction"/> |
| | | <result property="sendDay" column="send_day"/> |
| | | <result property="deptCode" column="dept_code"/> |
| | | <result property="longTemp" column="long_temp"/> |
| | | |
| | | </resultMap> |
| | | |
| | | <sql id="selectIvrTaskTemplateVo"> |
| | | select id, |
| | | taskid, |
| | | long_temp, |
| | | send_day, |
| | | recallcount, |
| | | instruction, |
| | |
| | | resultMap="IvrTaskTemplateResult"> |
| | | <include refid="selectIvrTaskTemplateVo"/> |
| | | <where> |
| | | del_flat=0 |
| | | <if test="taskid != null ">and taskid = #{taskid}</if> |
| | | <if test="sendDay != null ">and send_day = #{sendDay}</if> |
| | | <if test="id != null ">and id = #{id}</if> |
| | |
| | | <if test="noVoiceNum != null ">and no_voice_num = #{noVoiceNum}</if> |
| | | <if test="recallcount != null">and recallcount = #{prologrecallcountue}</if> |
| | | <if test="deptCode != null">and dept_code = #{deptCode}</if> |
| | | <if test="longTemp != null">and long_temp = #{longTemp}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectIvrTaskTemplateByID" parameterType="Long" resultMap="IvrTaskTemplateResult"> |
| | | <include refid="selectIvrTaskTemplateVo"/> |
| | | where id = #{id} |
| | | where id = #{id} and del_flag=0 |
| | | </select> |
| | | |
| | | <insert id="insertIvrTaskTemplate" parameterType="com.smartor.domain.IvrTaskTemplate" useGeneratedKeys="true" |
| | |
| | | <if test="instruction != null ">instruction,</if> |
| | | <if test="sendDay != null ">send_day,</if> |
| | | <if test="deptCode != null">dept_code,</if> |
| | | <if test="longTemp != null">long_temp,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="taskid != null">#{taskid},</if> |
| | |
| | | <if test="instruction != null ">#{instruction},</if> |
| | | <if test="sendDay != null ">#{sendDay},</if> |
| | | <if test="deptCode != null">#{deptCode},</if> |
| | | <if test="longTemp != null">#{longTemp},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="instruction != null ">instruction = #{instruction},</if> |
| | | <if test="sendDay != null ">send_day = #{sendDay},</if> |
| | | <if test="deptCode != null">dept_code = #{deptCode},</if> |
| | | <if test="longTemp != null">long_temp = #{longTemp},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteIvrTaskTemplateByID" parameterType="Long"> |
| | | delete |
| | | from ivr_task_template |
| | | <update id="deleteIvrTaskTemplateByID" parameterType="Long"> |
| | | update ivr_task_template |
| | | set del_flag=1 |
| | | where id = #{id} |
| | | </delete> |
| | | </update> |
| | | |
| | | <delete id="deleteIvrTaskTemplateByIDs" parameterType="String"> |
| | | delete from ivr_task_template where id in |
| | | <update id="deleteIvrTaskTemplateByIDs" parameterType="String"> |
| | | update ivr_task_template |
| | | set del_flag=1 where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </update> |
| | | </mapper> |
| | |
| | | <result property="batchName" column="batch_name"/> |
| | | <result property="batchNo" column="batch_no"/> |
| | | </resultMap> |
| | | <resultMap type="com.ruoyi.common.core.domain.entity.SysUser" id="SysUserResult"> |
| | | <id property="userId" column="user_id"/> |
| | | <result property="userName" column="user_name"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectPatArchiveImportVo"> |
| | | select id, |
| | |
| | | resultMap="PatArchiveImportResult"> |
| | | <include refid="selectPatArchiveImportVo"/> |
| | | <where> |
| | | del_flag=0 |
| | | <if test="patientno != null and patientno != ''"> |
| | | and patientno = #{patientno} |
| | | </if> |
| | |
| | | and batch_no = #{batchNo} |
| | | </if> |
| | | </where> |
| | | ORDER BY create_time desc |
| | | </select> |
| | | |
| | | <select id="selectPatArchiveImportById" parameterType="Long" |
| | |
| | | </foreach> |
| | | </update> |
| | | |
| | | <select id="checkUserExist" parameterType="String" resultMap="SysUserResult"> |
| | | select user_id, user_name |
| | | from sys_user |
| | | where id_card = #{idCard} |
| | | and del_flag = '0' |
| | | </select> |
| | | |
| | | <insert id="insertUser" parameterType="com.ruoyi.common.core.domain.entity.SysUser" useGeneratedKeys="true" |
| | | keyProperty="userId"> |
| | | insert into sys_user( |
| | | <if test="userId != null and userId != 0">user_id,</if> |
| | | <if test="deptId != null and deptId != 0">dept_id,</if> |
| | | <if test="userName != null and userName != ''">user_name,</if> |
| | | <if test="nickName != null and nickName != ''">nick_name,</if> |
| | | <if test="email != null and email != ''">email,</if> |
| | | <if test="avatar != null and avatar != ''">avatar,</if> |
| | | <if test="phonenumber != null and phonenumber != ''">phonenumber,</if> |
| | | <if test="sex != null and sex != ''">sex,</if> |
| | | <if test="password != null and password != ''">password,</if> |
| | | <if test="status != null and status != ''">status,</if> |
| | | <if test="createBy != null and createBy != ''">create_by,</if> |
| | | <if test="remark != null and remark != ''">remark,</if> |
| | | <if test="userType != null and userType != ''">user_type,</if> |
| | | <if test="deptInfo != null and deptInfo != ''">dept_info,</if> |
| | | <if test="hospInfo != null and hospInfo != ''">hosp_info,</if> |
| | | <if test="searchscope != null and searchscope != ''">searchscope,</if> |
| | | <if test="idCard != null and idCard != ''">id_card,</if> |
| | | create_time |
| | | )values( |
| | | <if test="userId != null and userId != ''">#{userId},</if> |
| | | <if test="deptId != null and deptId != ''">#{deptId},</if> |
| | | <if test="userName != null and userName != ''">#{userName},</if> |
| | | <if test="nickName != null and nickName != ''">#{nickName},</if> |
| | | <if test="email != null and email != ''">#{email},</if> |
| | | <if test="avatar != null and avatar != ''">#{avatar},</if> |
| | | <if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if> |
| | | <if test="sex != null and sex != ''">#{sex},</if> |
| | | <if test="password != null and password != ''">#{password},</if> |
| | | <if test="status != null and status != ''">#{status},</if> |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="userType != null and userType != ''">#{userType},</if> |
| | | <if test="deptInfo != null and deptInfo != ''">#{deptInfo},</if> |
| | | <if test="hospInfo != null and hospInfo != ''">#{hospInfo},</if> |
| | | <if test="searchscope != null and searchscope != ''">#{searchscope},</if> |
| | | <if test="idCard != null and idCard != ''">#{idCard},</if> |
| | | sysdate() |
| | | ) |
| | | </insert> |
| | | |
| | | <insert id="insertUserRole" parameterType="com.ruoyi.common.core.domain.entity.SysUserRole"> |
| | | insert into sys_user_role( |
| | | <if test="roleId != null ">role_id,</if> |
| | | <if test="userId != null ">user_id</if> |
| | | )values( |
| | | <if test="roleId != null ">#{roleId},</if> |
| | | <if test="userId != null">#{userId}</if> |
| | | ) |
| | | </insert> |
| | | |
| | | </mapper> |
| | |
| | | <result property="ageUnit" column="age_unit"/> |
| | | <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"/> |
| | | </resultMap> |
| | | |
| | | |
| | |
| | | isupload, |
| | | pattype, |
| | | viptype, |
| | | upload_time |
| | | upload_time, |
| | | care_facilities, |
| | | case_path, |
| | | degree_of_education, |
| | | marital_status, |
| | | income, |
| | | medicare_type, |
| | | care_person, |
| | | case_person_age |
| | | from pat_archive |
| | | </sql> |
| | | |
| | |
| | | <if test="ageUnit != null ">and age_unit = #{ageUnit}</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> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | a.create_time, |
| | | a.update_time, |
| | | a.viptype, |
| | | a.birthdate |
| | | a.birthdate, |
| | | a.care_facilities, |
| | | a.case_path, |
| | | a.degree_of_education, |
| | | a.marital_status, |
| | | a.income, |
| | | a.medicare_type, |
| | | a.care_person, |
| | | a.case_person_age |
| | | from pat_archive a,pat_archivetag b ,base_tag c |
| | | <where> |
| | | a.del_flag=0 and |
| | |
| | | <if test="ageUnit != null">age_unit,</if> |
| | | <if test="notrequiredFlag != null ">notrequired_flag,</if> |
| | | <if test="notrequiredreason != null ">notrequiredreason,</if> |
| | | <if test="careFacilities != null ">care_facilities,</if> |
| | | <if test="casePath != null ">case_path,</if> |
| | | <if test="degreeOfEducation != null ">degree_of_education,</if> |
| | | <if test="maritalStatus != null ">marital_status,</if> |
| | | <if test="income != null ">income,</if> |
| | | <if test="medicareType != null ">medicare_type,</if> |
| | | <if test="carePerson != null ">care_person,</if> |
| | | <if test="casePersonAge != null ">case_person_age,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="patientno != null">#{patientno},</if> |
| | |
| | | <if test="ageUnit != null">#{ageUnit},</if> |
| | | <if test="notrequiredFlag != null ">#{notrequiredFlag},</if> |
| | | <if test="notrequiredreason != null ">#{notrequiredreason},</if> |
| | | <if test="careFacilities != null ">#{careFacilities},</if> |
| | | <if test="casePath != null ">#{casePath},</if> |
| | | <if test="degreeOfEducation != null ">#{degreeOfEducation},</if> |
| | | <if test="maritalStatus != null ">#{maritalStatus},</if> |
| | | <if test="income != null ">#{income},</if> |
| | | <if test="medicareType != null ">#{medicareType},</if> |
| | | <if test="carePerson != null ">#{carePerson},</if> |
| | | <if test="casePersonAge != null ">#{casePersonAge},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <insert id="insertPatArchive"> |
| | | insert into |
| | | pat_archive(name,viptype,sex,idcardno,birthdate,place_of_residence,age,sourcefrom,archivetime,archiveby,telcode,relativetelcode,idcardtype,orgid,openid,dduserid,update_by,update_time |
| | | ,create_by,create_time,isupload,upload_time,pattype,nation,birthplace,native_place,patientno,patid_his,sd_flag,age_unit,notrequired_flag,notrequiredreason) |
| | | ,create_by,create_time,isupload,upload_time,pattype,nation,birthplace,native_place,patientno,patid_his,sd_flag,age_unit,notrequired_flag,notrequiredreason,care_facilities,case_path, |
| | | degree_of_education,marital_status,income,medicare_type,care_person,case_person_age) |
| | | values |
| | | <foreach item="item" index="index" collection="list" separator=","> |
| | | (#{item.name},#{item.viptype},#{item.sex},#{item.idcardno},#{item.birthdate},#{item.placeOfResidence},#{item.age},#{item.sourcefrom},#{item.archivetime},#{item.archiveby} |
| | | ,#{item.telcode},#{item.archiveby},#{item.idcardtype},#{item.orgid},#{item.openid},#{item.dduserid},#{item.updateBy}, |
| | | #{item.updateTime},#{item.createBy},#{item.createTime},#{item.isupload},#{item.uploadTime},#{item.pattype},#{item.nation},#{item.birthplace},#{item.nativePlace},#{item.patientno},#{item.patidHis},#{item.sdFlag},#{item.ageUnit},#{item.notrequiredFlag},#{item.notrequiredreason} |
| | | #{item.updateTime},#{item.createBy},#{item.createTime},#{item.isupload},#{item.uploadTime},#{item.pattype},#{item.nation},#{item.birthplace},#{item.nativePlace},#{item.patientno}, |
| | | #{item.patidHis},#{item.sdFlag},#{item.ageUnit},#{item.notrequiredFlag},#{item.notrequiredreason} |
| | | ,#{item.careFacilities},#{item.casePath},#{item.degreeOfEducation},#{item.maritalStatus},#{item.income},#{item.medicareType},#{item.carePerson},#{item.casePersonAge}) |
| | | </foreach> |
| | | </insert> |
| | | |
| | |
| | | <if test="ageUnit != null">age_unit = #{ageUnit},</if> |
| | | <if test="notrequiredFlag != null ">notrequired_flag = #{notrequiredFlag},</if> |
| | | <if test="notrequiredreason != null ">notrequiredreason = #{notrequiredreason},</if> |
| | | <if test="careFacilities != null ">care_facilities = #{careFacilities},</if> |
| | | <if test="casePath != null ">case_path = #{casePath},</if> |
| | | <if test="degreeOfEducation != null ">degree_of_education = #{degreeOfEducation},</if> |
| | | <if test="maritalStatus != null ">marital_status = #{maritalStatus},</if> |
| | | <if test="income != null ">income = #{income},</if> |
| | | <if test="medicareType != null ">medicare_type = #{medicareType},</if> |
| | | <if test="carePerson != null ">care_person = #{carePerson},</if> |
| | | <if test="casePersonAge != null ">case_person_age = #{casePersonAge},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |