liusheng
2025-04-02 ae086bc3ad6f785e6368b84e57a7e199c675779b
代码提交
已修改15个文件
145 ■■■■■ 文件已修改
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/HeLibraryController.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/resources/application-druid.yml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysPermissionService.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/HeLibrary.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/PatMedInhosp.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/ThiedInhospInfo.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/HeLibraryController.java
@@ -1,5 +1,6 @@
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;
@@ -7,12 +8,16 @@
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;
@@ -41,9 +46,22 @@
    //@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);
    }
    /**
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java
@@ -173,7 +173,7 @@
    @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);
        }
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java
@@ -149,6 +149,7 @@
        LoginUser loginUser = getLoginUser();
        SysUser user = loginUser.getUser();
        ivrTaskVO.setCreateBy(user.getNickName());
        ivrTaskVO.setUpdateBy(user.getNickName());
        ivrTaskVO.setOrgid(user.getOrgid());
        return success(serviceSubtaskService.insertOrUpdateTask(ivrTaskVO));
    }
ruoyi-admin/src/main/resources/application-druid.yml
@@ -17,13 +17,13 @@
#        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
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysPermissionService.java
@@ -3,7 +3,9 @@
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;
@@ -12,34 +14,33 @@
/**
 * 用户权限处理
 *
 *
 * @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;
@@ -47,33 +48,26 @@
    /**
     * 获取菜单数据权限
     *
     *
     * @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()));
            }
        }
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
@@ -653,7 +653,7 @@
                    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();
                    }
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java
@@ -48,7 +48,6 @@
    @Autowired
    private SysRoleMenuMapper roleMenuMapper;
    @Value("${isAdmin}")
    private List<Long> isAdmin;
smartor/src/main/java/com/smartor/domain/HeLibrary.java
@@ -237,4 +237,16 @@
     */
    @ApiModelProperty("html富文本")
    private String htmlRichText;
    /**
     * pageNum
     */
    @ApiModelProperty("pageNum")
    private Integer pageNum;
    /**
     * pageSize
     */
    @ApiModelProperty("pageSize")
    private Integer pageSize;
}
smartor/src/main/java/com/smartor/domain/PatMedInhosp.java
@@ -408,7 +408,7 @@
    private String futypedesc;
    @ApiModelProperty(value = "随访复诊指导")
    private String fuadivce;
    private String fuadvice;
    @ApiModelProperty(value = "专病随访建议")
    private String fuspecialadvice;
smartor/src/main/java/com/smartor/domain/ThiedInhospInfo.java
@@ -412,7 +412,6 @@
     */
    @ApiModelProperty("出生日期")
    @Excel(name = "出生日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String patiBirthday;
    /**
smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java
@@ -408,6 +408,8 @@
                        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 {
@@ -416,6 +418,8 @@
                        serviceSubtask.setFinishtime(new Date());
                        serviceSubtask.setSendstate(4L);
                        serviceSubtask.setRemark("当前患者出院时间后有待执行的出院随访长期任务");
                        serviceSubtask.setCreateBy(serviceTask.getCreateBy());
                        serviceSubtask.setCreateTime(new Date());
                        i = serviceSubtaskMapper.insertServiceSubtask(serviceSubtask);
                    }
                }
@@ -426,6 +430,8 @@
                    serviceSubtask.setResult("error");
                    serviceSubtask.setFinishtime(new Date());
                }
                serviceSubtask.setCreateBy(serviceTask.getCreateBy());
                serviceSubtask.setCreateTime(new Date());
                i = serviceSubtaskMapper.insertServiceSubtask(serviceSubtask);
            }
        } else {
@@ -434,7 +440,10 @@
                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) {
@@ -487,6 +496,8 @@
        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());
smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java
@@ -378,7 +378,7 @@
            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);
        }
@@ -805,10 +805,10 @@
            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()) {
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
@@ -385,6 +385,8 @@
            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())) {
@@ -538,6 +540,7 @@
                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")) {
@@ -701,9 +704,12 @@
                    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)
@@ -2051,9 +2057,9 @@
            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");
smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
@@ -432,7 +432,7 @@
            resultMap="PatArchiveOthreInfoResult">
        SELECT
        a.id,
        DISTINCT a.id,
        a.age_unit,
        a.age_unit2,
        a.patid_his,
@@ -495,7 +495,7 @@
            resultMap="PatArchiveOthreInfoResult">
        select
        a.id,
        DISTINCT a.id,
        a.age_unit,
        a.age_unit2,
        a.inhospno,
@@ -540,7 +540,6 @@
        d.endtime,
        d.nurse_name,
        d.nurse_id,
        d.endtime,
        d.out_way_id,
        d.leavehospitaldistrictname AS leavehospitaldistrictname,
        d.leavehospitaldistrictcode AS leavehospitaldistrictcode,
@@ -632,7 +631,7 @@
            resultMap="PatArchiveOthreInfoResult">
        select
        a.id,
        DISTINCT a.id,
        a.age_unit,
        a.age_unit2,
        a.patid_his,
smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
@@ -66,7 +66,7 @@
        <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>
@@ -78,7 +78,7 @@
               fuperiod,
               futypecode,
               futypedesc,
               fuadivce,
               fuadvice,
               fuspecialadvice,
               remark,
               guid,
@@ -190,7 +190,7 @@
        b.fuperiod,
        b.futypecode,
        b.futypedesc,
        b.fuadivce,
        b.fuadvice,
        b.fuspecialadvice
        FROM
        pat_med_inhosp b
@@ -334,7 +334,7 @@
        b.fuperiod,
        b.futypecode,
        b.futypedesc,
        b.fuadivce,
        b.fuadvice,
        b.fuspecialadvice
        b.schemetime
        FROM
@@ -455,7 +455,7 @@
            <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=",">
@@ -515,7 +515,7 @@
            <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>
@@ -578,7 +578,7 @@
            <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}