| | |
| | | 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.page.TableDataInfo; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.smartor.domain.HeLibrary; |
| | | import com.smartor.domain.HeLibraryVO; |
| | | import com.smartor.domain.SvyLibTemplateReq; |
| | | import com.smartor.domain.SvyLibTemplateVO; |
| | | import com.smartor.service.IHeLibraryService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | //@PreAuthorize("@ss.hasPermi('system:library:list')") |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody HeLibrary heLibrary) { |
| | | startPage(); |
| | | PageUtils.startPageByPost(heLibrary.getPageNum(), heLibrary.getPageSize()); |
| | | List<HeLibrary> list = heLibraryService.selectHeLibraryList(heLibrary); |
| | | return getDataTable(list); |
| | | if (CollectionUtils.isNotEmpty(list)) { |
| | | //获取total |
| | | long total = PageUtils.count(new ISelect() { |
| | | @Override |
| | | public void doSelect() { |
| | | heLibrary.setPageNum(null); |
| | | heLibrary.setPageSize(null); |
| | | heLibraryService.selectHeLibraryList(heLibrary); |
| | | } |
| | | }); |
| | | |
| | | return getDataTable2(total, list); |
| | | } |
| | | return getDataTable2(0, list); |
| | | } |
| | | |
| | | /** |
| | |
| | | @ApiOperation("查询患者列表") |
| | | @PostMapping("/patInfoByContion") |
| | | public TableDataInfo patInfoByCondition(@RequestBody PatArchiveReq patArchive) { |
| | | PageUtils.startPageByPost(patArchive.getPageNum(), patArchive.getPageSize()); |
| | | // PageUtils.startPageByPost(patArchive.getPageNum(), patArchive.getPageSize()); |
| | | if (CollectionUtils.isEmpty(patArchive.getLeavehospitaldistrictcodes()) || patArchive.getLeavehospitaldistrictcodes().size() == 0) { |
| | | patArchive.setLeavehospitaldistrictcodes(null); |
| | | } |
| | |
| | | LoginUser loginUser = getLoginUser(); |
| | | SysUser user = loginUser.getUser(); |
| | | ivrTaskVO.setCreateBy(user.getNickName()); |
| | | ivrTaskVO.setUpdateBy(user.getNickName()); |
| | | ivrTaskVO.setOrgid(user.getOrgid()); |
| | | return success(serviceSubtaskService.insertOrUpdateTask(ivrTaskVO)); |
| | | } |
| | |
| | | # username: smartor |
| | | # password: Smartor.2023 |
| | | # driverClassName: com.mysql.cj.jdbc.Driver |
| | | # # # 新华 |
| | | # # 新华 |
| | | # url: jdbc:mysql://192.168.191.181:3308/smartor?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | # username: smartor |
| | | # password: Smartor.2023 |
| | | # driverClassName: com.mysql.cj.jdbc.Driver |
| | | |
| | | # # # 公司云 |
| | | # 公司云 |
| | | url: jdbc:mysql://116.62.18.175:6002/smartor_lisui?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: hxsoft |
| | | password: Hxerp2000 |
| | |
| | | import java.util.HashSet; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | import com.ruoyi.common.core.domain.entity.SysRole; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | |
| | | |
| | | /** |
| | | * 用户权限处理 |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Component |
| | | public class SysPermissionService |
| | | { |
| | | public class SysPermissionService { |
| | | @Autowired |
| | | private ISysRoleService roleService; |
| | | |
| | | @Autowired |
| | | private ISysMenuService menuService; |
| | | |
| | | @Value("${isAdmin}") |
| | | private List<Long> isAdmin; |
| | | |
| | | /** |
| | | * 获取角色数据权限 |
| | | * |
| | | * |
| | | * @param user 用户信息 |
| | | * @return 角色权限信息 |
| | | */ |
| | | public Set<String> getRolePermission(SysUser user) |
| | | { |
| | | public Set<String> getRolePermission(SysUser user) { |
| | | Set<String> roles = new HashSet<String>(); |
| | | // 管理员拥有所有权限 |
| | | if (user.isAdmin()) |
| | | { |
| | | // if (user.isAdmin()) |
| | | if (user.getUserId() != null && isAdmin.contains(user.getUserId())) { |
| | | roles.add("admin"); |
| | | } |
| | | else |
| | | { |
| | | } else { |
| | | roles.addAll(roleService.selectRolePermissionByUserId(user.getUserId())); |
| | | } |
| | | return roles; |
| | |
| | | |
| | | /** |
| | | * 获取菜单数据权限 |
| | | * |
| | | * |
| | | * @param user 用户信息 |
| | | * @return 菜单权限信息 |
| | | */ |
| | | public Set<String> getMenuPermission(SysUser user) |
| | | { |
| | | public Set<String> getMenuPermission(SysUser user) { |
| | | Set<String> perms = new HashSet<String>(); |
| | | // 管理员拥有所有权限 |
| | | if (user.isAdmin()) |
| | | { |
| | | // if (user.isAdmin()) { |
| | | if (user.getUserId() != null && isAdmin.contains(user.getUserId())) { |
| | | perms.add("*:*:*"); |
| | | } |
| | | else |
| | | { |
| | | } else { |
| | | List<SysRole> roles = user.getRoles(); |
| | | if (!roles.isEmpty() && roles.size() > 1) |
| | | { |
| | | if (!roles.isEmpty() && roles.size() > 1) { |
| | | // 多角色设置permissions属性,以便数据权限匹配权限 |
| | | for (SysRole role : roles) |
| | | { |
| | | for (SysRole role : roles) { |
| | | Set<String> rolePerms = menuService.selectMenuPermsByRoleId(role.getRoleId()); |
| | | role.setPermissions(rolePerms); |
| | | perms.addAll(rolePerms); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | } else { |
| | | perms.addAll(menuService.selectMenuPermsByUserId(user.getUserId())); |
| | | } |
| | | } |
| | |
| | | patArchive.setPlaceOfResidence(StringUtils.isNotEmpty(thiedInhospInfo.getPatiHomeAddr()) ? thiedInhospInfo.getPatiHomeAddr().replace("null", "") : ""); |
| | | try { |
| | | if (StringUtils.isNotEmpty(thiedInhospInfo.getPatiBirthday())) |
| | | patArchive.setBirthdate(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(thiedInhospInfo.getPatiBirthday())); |
| | | patArchive.setBirthdate(new SimpleDateFormat("yyyy-MM-dd").parse(thiedInhospInfo.getPatiBirthday())); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | @Autowired |
| | | private SysRoleMenuMapper roleMenuMapper; |
| | | |
| | | |
| | | @Value("${isAdmin}") |
| | | private List<Long> isAdmin; |
| | | |
| | |
| | | */ |
| | | @ApiModelProperty("html富文本") |
| | | private String htmlRichText; |
| | | |
| | | /** |
| | | * pageNum |
| | | */ |
| | | @ApiModelProperty("pageNum") |
| | | private Integer pageNum; |
| | | |
| | | /** |
| | | * pageSize |
| | | */ |
| | | @ApiModelProperty("pageSize") |
| | | private Integer pageSize; |
| | | } |
| | |
| | | private String futypedesc; |
| | | |
| | | @ApiModelProperty(value = "随访复诊指导") |
| | | private String fuadivce; |
| | | private String fuadvice; |
| | | |
| | | @ApiModelProperty(value = "专病随访建议") |
| | | private String fuspecialadvice; |
| | |
| | | */ |
| | | @ApiModelProperty("出生日期") |
| | | @Excel(name = "出生日期") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private String patiBirthday; |
| | | |
| | | /** |
| | |
| | | serviceSubtask1.setRemark("患者再入院"); |
| | | serviceSubtask1.setResult("error"); |
| | | serviceSubtask1.setFinishtime(new Date()); |
| | | serviceSubtask1.setUpdateBy(serviceTask.getUpdateBy()); |
| | | serviceSubtask1.setUpdateTime(new Date()); |
| | | Boolean aBoolean = serviceSubtaskMapper.updateServiceSubtask(serviceSubtask1); |
| | | if (aBoolean) i = 1; |
| | | } else { |
| | |
| | | serviceSubtask.setFinishtime(new Date()); |
| | | serviceSubtask.setSendstate(4L); |
| | | serviceSubtask.setRemark("当前患者出院时间后有待执行的出院随访长期任务"); |
| | | serviceSubtask.setCreateBy(serviceTask.getCreateBy()); |
| | | serviceSubtask.setCreateTime(new Date()); |
| | | i = serviceSubtaskMapper.insertServiceSubtask(serviceSubtask); |
| | | } |
| | | } |
| | |
| | | serviceSubtask.setResult("error"); |
| | | serviceSubtask.setFinishtime(new Date()); |
| | | } |
| | | serviceSubtask.setCreateBy(serviceTask.getCreateBy()); |
| | | serviceSubtask.setCreateTime(new Date()); |
| | | i = serviceSubtaskMapper.insertServiceSubtask(serviceSubtask); |
| | | } |
| | | } else { |
| | |
| | | serviceSubtask.setSendstate(4L); |
| | | serviceSubtask.setResult("error"); |
| | | serviceSubtask.setFinishtime(new Date()); |
| | | |
| | | } |
| | | serviceSubtask.setCreateBy(serviceTask.getCreateBy()); |
| | | serviceSubtask.setCreateTime(new Date()); |
| | | i = serviceSubtaskMapper.insertServiceSubtask(serviceSubtask); |
| | | } |
| | | if (i == 1) { |
| | |
| | | serviceSubtask.setCreateBy(patMedInhosp1.getNurseName()); |
| | | serviceSubtask.setLeavehospitaldistrictcode(patMedInhosp1.getLeavehospitaldistrictcode()); |
| | | serviceSubtask.setLeavehospitaldistrictname(patMedInhosp1.getLeavehospitaldistrictname()); |
| | | serviceSubtask.setUpdateBy(serviceTask.getUpdateBy()); |
| | | serviceSubtask.setUpdateTime(new Date()); |
| | | //设置发送时间 |
| | | if (serviceTask.getSendDay() == null) serviceTask.setSendDay(1L); |
| | | Date newDate = addDays(patMedInhosp1.getEndtime(), serviceTask.getSendDay().intValue()); |
| | |
| | | patMedInhosp1.setFuperiod(ObjectUtils.isNotEmpty(SuiFangJH.get("SuiFangZQJY")) ? SuiFangJH.get("SuiFangZQJY").toString() : null); |
| | | patMedInhosp1.setFutypecode(ObjectUtils.isNotEmpty(SuiFangJH.get("SuiFangFSDM")) ? SuiFangJH.get("SuiFangFSDM").toString() : null); |
| | | patMedInhosp1.setFutypedesc(ObjectUtils.isNotEmpty(SuiFangJH.get("SuiFangFSMC")) ? SuiFangJH.get("SuiFangFSMC").toString() : null); |
| | | patMedInhosp1.setFuadivce(ObjectUtils.isNotEmpty(SuiFangJH.get("FuZhenZD")) ? SuiFangJH.get("FuZhenZD").toString() : null); |
| | | patMedInhosp1.setFuadvice(ObjectUtils.isNotEmpty(SuiFangJH.get("FuZhenZD")) ? SuiFangJH.get("FuZhenZD").toString() : null); |
| | | patMedInhosp1.setFuspecialadvice(ObjectUtils.isNotEmpty(SuiFangJH.get("QiTaZKJBSF")) ? SuiFangJH.get("QiTaZKJBSF").toString() : null); |
| | | } |
| | | |
| | |
| | | if (StringUtils.isNotEmpty(orgid)) { |
| | | patArchive.setId(patArchive1.getId()); |
| | | patArchiveMapper.updatePatArchive(patArchive); |
| | | return patArchive; |
| | | } |
| | | } else { |
| | | patArchiveMapper.insertPatArchiveSingle(patArchive); |
| | | } |
| | | patArchiveMapper.insertPatArchiveSingle(patArchive); |
| | | //新属信息 |
| | | if (ObjectUtils.isNotEmpty(externalInHospPatientInfo.getExternalInHospPatientLiaisonInfos())) { |
| | | for (ExternalInHospPatientLiaisonInfo external : externalInHospPatientInfo.getExternalInHospPatientLiaisonInfos()) { |
| | |
| | | serviceTask.setLeaveldeptcodes(serviceTaskVO.getLeaveldeptcodes()); |
| | | serviceTask.setLeavehospitaldistrictcode(serviceTask.getLeavehospitaldistrictcode()); |
| | | serviceTask.setSendState(2L); |
| | | serviceTask.setCreateTime(new Date()); |
| | | serviceTask.setUpdateTime(new Date()); |
| | | serviceTaskService.insertServiceTask(serviceTask); |
| | | log.error("----serviceTaskVO.getAppltype()的值为:{}", serviceTaskVO.getAppltype()); |
| | | if (StringUtils.isNotEmpty(serviceTaskVO.getAppltype())) { |
| | |
| | | serviceTask.setLibtemplateid(serviceTaskVO.getLibtemplateid().toString()); |
| | | serviceTask.setTemplateid(serviceTaskVO.getTemplateid()); |
| | | serviceTask.setLongTask(serviceTaskVO.getLongTask()); |
| | | serviceTask.setUpdateTime(new Date()); |
| | | serviceTaskService.updateServiceTask(serviceTask); |
| | | if (serviceTaskVO.getAppltype().equals("1") || serviceTaskVO.getAppltype().equals("2")) { |
| | | |
| | |
| | | serviceSubtask.setTextParam(new Gson().toJson(serviceTaskVO.getTextParam())); |
| | | if (patTaskRelevance.getIsoperation() != null) { |
| | | if (patTaskRelevance.getIsoperation() == 2) |
| | | serviceSubtaskMapper.updateServiceSubtaskByCondition(serviceSubtask); |
| | | serviceSubtask.setUpdateBy(serviceTask.getUpdateBy()); |
| | | serviceSubtaskMapper.updateServiceSubtaskByCondition(serviceSubtask); |
| | | if (patTaskRelevance.getIsoperation() == 1) { |
| | | serviceSubtask.setSendstate(1L); |
| | | serviceSubtask.setUpdateBy(serviceTask.getUpdateBy()); |
| | | serviceSubtask.setCreateBy(serviceTask.getUpdateBy()); |
| | | serviceSubtaskMapper.insertServiceSubtask(serviceSubtask); |
| | | } |
| | | if (patTaskRelevance.getIsoperation() == 3) |
| | |
| | | serviceSubtask.setSendstate(6L); |
| | | serviceSubtask.setFinishtime(new Date()); |
| | | serviceSubtaskMapper.updateServiceSubtask(serviceSubtask); |
| | | 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); |
| | | // 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()); |
| | | redisCache.deleteObject(phoneCallRecordVO.getTaskid() + "recordAccept-hungup"); |
| | |
| | | resultMap="PatArchiveOthreInfoResult"> |
| | | |
| | | SELECT |
| | | a.id, |
| | | DISTINCT a.id, |
| | | a.age_unit, |
| | | a.age_unit2, |
| | | a.patid_his, |
| | |
| | | resultMap="PatArchiveOthreInfoResult"> |
| | | |
| | | select |
| | | a.id, |
| | | DISTINCT a.id, |
| | | a.age_unit, |
| | | a.age_unit2, |
| | | a.inhospno, |
| | |
| | | d.endtime, |
| | | d.nurse_name, |
| | | d.nurse_id, |
| | | d.endtime, |
| | | d.out_way_id, |
| | | d.leavehospitaldistrictname AS leavehospitaldistrictname, |
| | | d.leavehospitaldistrictcode AS leavehospitaldistrictcode, |
| | |
| | | resultMap="PatArchiveOthreInfoResult"> |
| | | |
| | | select |
| | | a.id, |
| | | DISTINCT a.id, |
| | | a.age_unit, |
| | | a.age_unit2, |
| | | a.patid_his, |
| | |
| | | <result property="fuperiod" column="fuperiod"/> |
| | | <result property="futypecode" column="futypecode"/> |
| | | <result property="futypedesc" column="futypedesc"/> |
| | | <result property="fuadivce" column="fuadivce"/> |
| | | <result property="fuadvice" column="fuadvice"/> |
| | | <result property="fuspecialadvice" column="fuspecialadvice"/> |
| | | </resultMap> |
| | | |
| | |
| | | fuperiod, |
| | | futypecode, |
| | | futypedesc, |
| | | fuadivce, |
| | | fuadvice, |
| | | fuspecialadvice, |
| | | remark, |
| | | guid, |
| | |
| | | b.fuperiod, |
| | | b.futypecode, |
| | | b.futypedesc, |
| | | b.fuadivce, |
| | | b.fuadvice, |
| | | b.fuspecialadvice |
| | | FROM |
| | | pat_med_inhosp b |
| | |
| | | b.fuperiod, |
| | | b.futypecode, |
| | | b.futypedesc, |
| | | b.fuadivce, |
| | | b.fuadvice, |
| | | b.fuspecialadvice |
| | | b.schemetime |
| | | FROM |
| | |
| | | <if test="fuperiod != null ">fuperiod,</if> |
| | | <if test="futypecode != null ">futypecode,</if> |
| | | <if test="futypedesc != null ">futypedesc,</if> |
| | | <if test="fuadivce != null ">fuadivce,</if> |
| | | <if test="fuadvice != null ">fuadvice,</if> |
| | | <if test="fuspecialadvice != null ">fuspecialadvice,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | |
| | | <if test="fuperiod != null ">#{fuperiod},</if> |
| | | <if test="futypecode != null ">#{futypecode},</if> |
| | | <if test="futypedesc != null ">#{futypedesc},</if> |
| | | <if test="fuadivce != null ">#{fuadivce},</if> |
| | | <if test="fuadvice != null ">#{fuadvice},</if> |
| | | <if test="fuspecialadvice != null ">#{fuspecialadvice},</if> |
| | | </trim> |
| | | </insert> |
| | |
| | | <if test="fuperiod != null ">fuperiod = #{fuperiod},</if> |
| | | <if test="futypecode != null ">futypecode = #{futypecode},</if> |
| | | <if test="futypedesc != null ">futypedesc = #{futypedesc},</if> |
| | | <if test="fuadivce != null ">fuadivce = #{fuadivce},</if> |
| | | <if test="fuadvice != null ">fuadvice = #{fuadvice},</if> |
| | | <if test="fuspecialadvice != null ">fuspecialadvice = #{fuspecialadvice},</if> |
| | | </trim> |
| | | where inhospid = #{inhospid} |