已添加1个文件
已修改15个文件
已重命名2个文件
253 ■■■■ 文件已修改
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTemplateController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/resources/application-ls.yml 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/resources/application.yml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/CollectHISController.java 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/ICollectHISService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/CollectHISServiceImpl.java 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/PatArchiveReq.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/SvyLibTemplateReq.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/ServiceSubtaskDetailMapper.xml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/SvyLibScriptOptionMapper.xml 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/SvyLibTemplateMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java
@@ -78,16 +78,16 @@
        return success(patArchiveService.selectPatArchiveByPatid(patid));
    }
//    /**
//     * æ–°å¢žæ‚£è€…档案
//     */
//    @ApiOperation("新增患者档案")
//    //@PreAuthorize("@ss.hasPermi('smartor:patarchive:add')")
//    @Log(title = "患者档案", businessType = BusinessType.INSERT)
//    @PostMapping("/add")
//    public AjaxResult add(@RequestBody PatArchive patArchive) {
//        return toAjax(patArchiveService.insertPatArchive(patArchive));
//    }
    /**
     * æ–°å¢žæ‚£è€…档案
     */
    @ApiOperation("新增患者档案")
    //@PreAuthorize("@ss.hasPermi('smartor:patarchive:add')")
    @Log(title = "患者档案", businessType = BusinessType.INSERT)
    @PostMapping("/add")
    public AjaxResult add(@RequestBody PatArchive patArchive) {
        return toAjax(patArchiveService.insertPatArchive(patArchive));
    }
    /**
     * æ–°å¢žæ‚£è€…档案
@@ -189,8 +189,8 @@
        long count = PageUtils.count(new ISelect() {
            @Override
            public void doSelect() {
                patArchive.setPageNum(null);
                patArchive.setPageSize(null);
                patArchive.setPn(null);
                patArchive.setPs(null);
                patArchiveService.patInfoByContion(patArchive);
            }
        });
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/SvyLibTemplateController.java
@@ -44,6 +44,8 @@
    @GetMapping("/list")
    public TableDataInfo selectSvyLibTemplatelist(SvyLibTemplate svyLibTemplate) {
        startPage();
        SysUser user = getLoginUser().getUser();
        svyLibTemplate.setOrgid(user.getOrgid());
        List<SvyLibTemplate> sviLibTemplate = svyLibTemplateService.getSviLibTemplate(svyLibTemplate);
        return getDataTable(sviLibTemplate);
    }
@@ -55,6 +57,9 @@
    @PostMapping("/selectSvyLibTemplatelist")
    public TableDataInfo selectSvyLibTemplatelist(@RequestBody SvyLibTemplateReq svyLibTemplateReq) {
        PageUtils.startPageByPost(svyLibTemplateReq.getPageNum(), svyLibTemplateReq.getPageSize());
        SysUser user = getLoginUser().getUser();
        svyLibTemplateReq.setOrgid(user.getOrgid());
        List<SvyLibTemplateVO> list = svyLibTemplateService.selectSvyLibTemplateList(svyLibTemplateReq);
        if (CollectionUtils.isNotEmpty(list)) {
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java
@@ -2,6 +2,7 @@
import java.util.List;
import com.ruoyi.common.core.domain.entity.SysUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.ArrayUtils;
@@ -46,6 +47,8 @@
    @GetMapping("/list")
    public AjaxResult list(SysDept dept)
    {
        SysUser user = getLoginUser().getUser();
        dept.setOrgid(user.getOrgid());
        List<SysDept> depts = deptService.selectDeptList(dept);
        return success(depts);
    }
ruoyi-admin/src/main/resources/application-ls.yml
@@ -7,9 +7,13 @@
      # ä¸»åº“数据源
      master:
        #   ä¸½æ°´
        url: jdbc:mysql://127.0.0.1:3308/smartor-lisui?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
        username: smartor
        password: Smartor.2023
        #        url: jdbc:mysql://127.0.0.1:3308/smartor-lisui?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
        #        username: smartor
        #        password: Smartor.2023
        #        driverClassName: com.mysql.cj.jdbc.Driver
        url: jdbc:mysql://9.208.7.13:2883/smartor-lisui?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
        username: root@sfxx#other_cluster
        password: Y5oapyS8
        driverClassName: com.mysql.cj.jdbc.Driver
      #        # é«˜æ–¯æ•°æ®åº“配置
@@ -107,7 +111,7 @@
pagehelper:
  helperDialect: mysql
  supportMethodsArguments: true
  params: count=countSql
#  params: countSql;pageSizeZero=true
magic-api:
  web: /magic/web
@@ -242,3 +246,5 @@
#随访医院:1新华   2丽水
visitHosp: 2
#处理投诉建议的部门编码
dealDeptCode:
ruoyi-admin/src/main/resources/application.yml
@@ -74,7 +74,7 @@
    # å›½é™…化资源文件路径
    basename: i18n/messages
  profiles:
    active: druid
    active: ls
  # æ–‡ä»¶ä¸Šä¼ 
  servlet:
    multipart:
@@ -148,7 +148,7 @@
  urlPatterns: /system/*,/monitor/*,/tool/*
#不需要进行长期任务的机构
noLongTask: 47231022633110211A2101,
noLongTask:
#省立同德取数据公共接口
sltd_pub_path: "http://open-tdyy.cfuture.shop/kapi/gw-api/"
ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/CollectHISController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,69 @@
package com.ruoyi.quartz.controller;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.quartz.service.ICollectHISService;
import com.smartor.domain.HnDataGatherVO;
import com.smartor.domain.Icd10;
import com.smartor.service.IHNGatherPatArchiveService;
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.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Slf4j
@RestController
@RequestMapping("/monitor/his")
@Api(description = "采集患者信息接口")
public class CollectHISController extends BaseController {
    @Autowired
    private ICollectHISService ichService;
    /**
     * æ²³å—数据采集
     */
    @PostMapping("/collect")
    @ApiOperation("同步病人相关数据")
    public AjaxResult hnDataGather(@RequestBody HnDataGatherVO hnDataGatherVO) {
        log.info("开始按天同步用户数据,时间范围: {} åˆ° {}", hnDataGatherVO.getStartTime(), hnDataGatherVO.getEndTime());
        Boolean aBoolean = ichService.hnDataGather(hnDataGatherVO);
        return AjaxResult.success(aBoolean);
    }
    /**
     * æŸ¥è¯¢ç–¾ç—…列表数据采集
     */
    @PostMapping("/collectIcd10")
    @ApiOperation("同步标准诊断")
    public AjaxResult selectIcd10List(@RequestBody Icd10 icd10) {
        Integer integer = ichService.selectIcd10List(icd10);
        return AjaxResult.success(integer);
    }
    /**
     * ç”¨æˆ·ä¿¡æ¯é›†åˆä¿¡æ¯æ•°æ®é‡‡é›†
     */
    @PostMapping("/collectUser")
    @ApiOperation("同步用户信息")
    public AjaxResult selectUserList(@RequestBody SysUser sysUser) {
        Integer integer = ichService.selectUserList(sysUser);
        return AjaxResult.success(integer);
    }
    /**
     * éƒ¨é—¨ä¿¡æ¯é›†åˆä¿¡æ¯æ•°æ®é‡‡é›†
     */
    @PostMapping("/collectDept")
    @ApiOperation("同步科室信息")
    public AjaxResult selectDeptList(@RequestBody SysDept sysDept) {
        Integer integer = ichService.selectDeptList(sysDept);
        return AjaxResult.success(integer);
    }
}
ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/ICollectHISService.java
ÎļþÃû´Ó ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/ICollectHISMapperService.java ÐÞ¸Ä
@@ -6,7 +6,7 @@
import java.util.List;
public interface ICollectHISMapperService {
public interface ICollectHISService {
    /**
     * æŸ¥è¯¢æ‚£è€…档案列表
     *
ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/CollectHISServiceImpl.java
ÎļþÃû´Ó ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/CollectHISMapperServiceImpl.java ÐÞ¸Ä
@@ -1,21 +1,16 @@
package com.ruoyi.quartz.service.impl;
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.domain.entity.SysUserDept;
import com.ruoyi.common.core.domain.entity.SysUserRole;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.quartz.mapper.CollectHISMapper;
import com.ruoyi.quartz.service.ICollectHISMapperService;
import com.ruoyi.quartz.service.ICollectHISService;
import com.smartor.domain.*;
import com.smartor.mapper.*;
import com.smartor.service.impl.PatArchiveServiceImpl;
import com.smartor.service.impl.PatMedInhospServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.stereotype.Service;
@@ -27,9 +22,9 @@
@Slf4j
@Service
public class CollectHISMapperServiceImpl implements ICollectHISMapperService {
public class CollectHISServiceImpl implements ICollectHISService {
    @Autowired
    private HNGatherPatArchiveMapper hnGatherPatArchiveMapper;
    private CollectHISMapper chMapper;
    @Autowired
    private SysUser2Mapper sysUser2Mapper;
@@ -68,7 +63,7 @@
    @Override
    public List<PatArchive> selectPatArchiveList(PatArchive patArchive) {
        return hnGatherPatArchiveMapper.selectPatArchiveList(patArchive);
        return chMapper.selectPatArchiveList(patArchive);
    }
//    @Override
@@ -86,11 +81,11 @@
    @Override
    public Integer selectPatMedInhospList(PatMedInhosp patMedInhosp) {
        List<PatMedInhosp> patMedInhospList = hnGatherPatArchiveMapper.selectPatMedInhospList(patMedInhosp);
        List<PatMedInhosp> patMedInhospList = chMapper.selectPatMedInhospList(patMedInhosp);
        for (PatMedInhosp pm : patMedInhospList) {
            PatArchive patArchive = new PatArchive();
            patArchive.setPatientno(pm.getPatno());
            List<PatArchive> patArchives = hnGatherPatArchiveMapper.selectPatArchiveList(patArchive);
            List<PatArchive> patArchives = chMapper.selectPatArchiveList(patArchive);
            if (CollectionUtils.isEmpty(patArchives)) {
                //空了直接丢掉
                continue;
@@ -104,7 +99,27 @@
                patArchiveMapper.insertPatArchiveSingle(patArchives.get(0));
                pm.setPatid(patArchives.get(0).getId());
            }
            patMedInhospMapper.insertPatMedInhosp(pm);
            if (!Objects.isNull(patMedInhosp.getStartInHospTime()) && !Objects.isNull(patMedInhosp.getEndInHospTime())) {
                //入院
                pm.setInhospstate("0");
                pm.setCreateTime(new Date());
                patMedInhospMapper.insertPatMedInhosp(pm);
            } else if (!Objects.isNull(patMedInhosp.getStartOutHospTime()) && !Objects.isNull(patMedInhosp.getEndOutHospTime())) {
                //出院
                pm.setInhospstate("1");
                pm.setUpdateTime(new Date());
                PatMedInhosp pmi = new PatMedInhosp();
                pmi.setSerialnum(pm.getSerialnum());
                List<PatMedInhosp> patMedInhospList1 = patMedInhospMapper.selectPatMedInhospList(pmi);
                if (CollectionUtils.isEmpty(patMedInhospList1)) {
                    pm.setCreateTime(new Date());
                    patMedInhospMapper.insertPatMedInhosp(pm);
                } else {
                    pm.setInhospid(patMedInhospList1.get(0).getInhospid());
                    patMedInhospMapper.updatePatMedInhosp(pm);
                }
            }
        }
        return 0;
    }
@@ -119,16 +134,25 @@
        // å¾ªçŽ¯å¤„ç†æ¯ä¸€å¤©
        for (LocalDate currentDate = startDate; !currentDate.isAfter(endDate); currentDate = currentDate.plusDays(1)) {
            PatMedInhosp dailyCondition = new PatMedInhosp();
            //处理入院
            LocalDateTime dayStart = currentDate.atStartOfDay();
            LocalDateTime dayEnd = currentDate.atTime(23, 59, 59);
            dailyCondition.setStartInHospTime(Date.from(dayStart.atZone(ZoneId.systemDefault()).toInstant()));
            dailyCondition.setEndInHospTime(Date.from(dayEnd.atZone(ZoneId.systemDefault()).toInstant()));
            selectPatMedInhospList(dailyCondition);
            //处理出院
            dailyCondition.setStartInHospTime(null);
            dailyCondition.setEndInHospTime(null);
            dailyCondition.setStartOutHospTime(Date.from(dayStart.atZone(ZoneId.systemDefault()).toInstant()));
            dailyCondition.setEndOutHospTime(Date.from(dayEnd.atZone(ZoneId.systemDefault()).toInstant()));
            Integer pi = selectPatMedInhospList(dailyCondition);
            selectPatMedInhospList(dailyCondition);
            //处理门诊
            PatMedOuthosp patMedOuthosp = new PatMedOuthosp();
            patMedOuthosp.setBeginTime(Date.from(dayStart.atZone(ZoneId.systemDefault()).toInstant()));
            patMedOuthosp.setEndTime(Date.from(dayEnd.atZone(ZoneId.systemDefault()).toInstant()));
            po = selectPatMedOuthospList(patMedOuthosp);
            selectPatMedOuthospList(patMedOuthosp);
        }
        return true;
    }
@@ -136,14 +160,14 @@
    @Override
    public Integer selectPatMedOuthospList(PatMedOuthosp patMedOuthosp) {
        List<PatMedOuthosp> patMedOuthosps = hnGatherPatArchiveMapper.selectPatMedOuthospList(patMedOuthosp);
        List<PatMedOuthosp> patMedOuthosps = chMapper.selectPatMedOuthospList(patMedOuthosp);
        log.info("selectPatMedOuthospList的采集到的数量为:{}", patMedOuthosps.size());
        Integer i = null;
        for (PatMedOuthosp patMedOuthosp1 : patMedOuthosps) {
            //获取患者基本信息
            PatArchive patArchive = new PatArchive();
            patArchive.setPatientno(patMedOuthosp1.getPatno());
            List<PatArchive> patArchives = hnGatherPatArchiveMapper.selectPatArchiveList(patArchive);
            List<PatArchive> patArchives = chMapper.selectPatArchiveList(patArchive);
            //根据patno判断本地患者基本信息是否存在
            PatArchive pa = new PatArchive();
@@ -166,7 +190,7 @@
    @Override
    public Integer selectIcd10List(Icd10 icd10) {
        List<Icd10> icd10s = hnGatherPatArchiveMapper.selectIcd10List(icd10);
        List<Icd10> icd10s = chMapper.selectIcd10List(icd10);
        log.info("selectIcd10List的采集到的数量为:{}", icd10s.size());
        int i = icd10Mapper.batchIcd10(icd10s);
        return i;
@@ -174,14 +198,14 @@
    @Override
    public Integer selectUserList(SysUser sysUser) {
        List<SysUser> sysUserList = hnGatherPatArchiveMapper.selectUserList(sysUser);
        List<SysUser> sysUserList = chMapper.selectUserList(sysUser);
        log.info("sysUserList的采集到的数量为:{}", sysUserList.size());
        int i = sysUser2Mapper.batchUser(sysUserList);
        for (SysUser sysUser1 : sysUserList) {
            log.info("sysUser1的ID为:{}", sysUser1.getUserId());
            log.info("sysUser1的HISUSERID为:{}", sysUser1.getHisUserId());
            //新增用户与角色
            SysUserRole yhyjsxx = hnGatherPatArchiveMapper.yhyjsxx(sysUser1);
            SysUserRole yhyjsxx = chMapper.yhyjsxx(sysUser1);
            if (yhyjsxx == null) continue;
            yhyjsxx.setUserId(sysUser1.getUserId());
            List<SysUserRole> userRoleList = new ArrayList<>();
@@ -190,7 +214,7 @@
            //新增用户与部门
            if (StringUtils.isEmpty(sysUser1.getHisUserId())) continue;
            SysUserDept sysUserDept = hnGatherPatArchiveMapper.yhyksxx(sysUser1);
            SysUserDept sysUserDept = chMapper.yhyksxx(sysUser1);
            if (Objects.isNull(sysUserDept) || sysUserDept.getDeptId() == null) continue;
            SysDept dept = new SysDept();
            dept.setHisDeptId(sysUserDept.getDeptId().toString());
@@ -209,7 +233,7 @@
    @Override
    public Integer selectDeptList(SysDept dept) {
        List<SysDept> sysDepts = hnGatherPatArchiveMapper.selectDeptList(dept);
        List<SysDept> sysDepts = chMapper.selectDeptList(dept);
        log.info("selectDeptList的采集到的数量为:{}", sysDepts.size());
        int i = sysDept2Mapper.batchDept(sysDepts);
        return i;
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
@@ -14,8 +14,7 @@
import com.ruoyi.common.utils.RSAPublicKeyExample;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.http.HttpUtils;
import com.ruoyi.quartz.service.ICollectHISMapperService;
import com.ruoyi.quartz.service.impl.CollectHISMapperServiceImpl;
import com.ruoyi.quartz.service.ICollectHISService;
import com.smartor.common.LSHospTokenUtil;
import com.smartor.domain.*;
import com.smartor.mapper.HeLibraryMapper;
@@ -87,6 +86,10 @@
    @Autowired
    private HeLibraryMapper heLibraryMapper;
    @Autowired
    private ICollectHISService ichService;
    @Value("${localIP}")
    private String localIP;
@@ -134,7 +137,7 @@
    IXHGatherPatArchiveService ixhGatherPatArchiveService;
    @Autowired
    ICollectHISMapperService icollectHis;
    ICollectHISService icollectHis;
    @Value("${appid}")
@@ -770,7 +773,7 @@
            // HIS数据采集
            HnDataGatherVO hnDataGatherVO = new HnDataGatherVO();
            log.info("【dealHisData】HIS开始采集数据");
            ihnGatherPatArchiveService.hnDataGather(hnDataGatherVO);
            ichService.hnDataGather(hnDataGatherVO);
            log.info("【dealHisData】HIS结束采集数据");
        } catch (Exception e) {
            log.error("【dealHisData】HIS数据采集异常", e);
smartor/src/main/java/com/smartor/domain/PatArchiveReq.java
@@ -164,16 +164,16 @@
    /**
     * pageNum
     */
    @ApiModelProperty(value = "pageNum")
    @Excel(name = "pageNum")
    private Integer pageNum;
    @ApiModelProperty(value = "pn")
    @Excel(name = "pn")
    private Integer pn;
    /**
     * pageSize
     */
    @ApiModelProperty(value = "pageSize")
    @Excel(name = "pageSize")
    private Integer pageSize;
    @ApiModelProperty(value = "ps")
    @Excel(name = "ps")
    private Integer ps;
    /**
smartor/src/main/java/com/smartor/domain/SvyLibTemplateReq.java
@@ -51,6 +51,12 @@
    private String description;
    /**
     * æœºæž„ID
     */
    @ApiModelProperty(value = "机构ID")
    private String orgid;
    /**
     * pageNum
     */
    @ApiModelProperty("pageNum")
smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java
@@ -565,8 +565,11 @@
    @Override
    public List<PatArchive> patInfoByContion(PatArchiveReq patArchive) {
        List<PatArchive> patArchives = new ArrayList<>();
        if(ObjectUtils.isNotEmpty(patArchive.getPageNum())){
            patArchive.setPageNum(patArchive.getPageNum()*patArchive.getPageSize()-patArchive.getPageNum());
        if (ObjectUtils.isNotEmpty(patArchive.getPageNum()) && ObjectUtils.isNotEmpty(patArchive.getPageSize())) {
            patArchive.setPn((patArchive.getPageNum() - 1) * patArchive.getPageSize());
            patArchive.setPs(patArchive.getPageSize());
            patArchive.setPageNum(null);
            patArchive.setPageSize(null);
        }
        //根据条件获取患者信息
//        List<PatArchive> patArchiveList = patArchiveMapper.patInfoByContion(patArchive);
smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateServiceImpl.java
@@ -55,15 +55,18 @@
        svyLibTemplateReq.setCategoryid(svyLibTemplate.getCategoryid());
        svyLibTemplateReq.setDescription(svyLibTemplate.getDescription());
        svyLibTemplateReq.setSvyname(svyLibTemplate.getSvyname());
        svyLibTemplateReq.setOrgid(svyLibTemplate.getOrgid());
        List<SvyLibTemplate> svyLibTemplates = svyLibTemplateMapper.selectSvyLibTemplateList(svyLibTemplateReq);
        for (SvyLibTemplate svyLibTemplate1 : svyLibTemplates) {
            SvyLibTemplateScript svyLibTemplateScript = new SvyLibTemplateScript();
            svyLibTemplateScript.setSvyid(svyLibTemplate1.getSvyid());
            svyLibTemplateScript.setOrgid(svyLibTemplate1.getOrgid());
            List<SvyLibTemplateScript> svyLibTemplateScripts = svyLibTemplateScriptMapper.selectSvyLibTemplateScriptList(svyLibTemplateScript);
            for (SvyLibTemplateScript svyLibTemplateScript1 : svyLibTemplateScripts) {
                if (svyLibTemplateScript1.getScriptType().equals("1") || svyLibTemplateScript1.getScriptType().equals("2")) {
                    SvyLibTemplateTargetoption svyLibTemplateTargetoption = new SvyLibTemplateTargetoption();
                    svyLibTemplateTargetoption.setScriptid(svyLibTemplateScript1.getId());
                    svyLibTemplateTargetoption.setOrgid(svyLibTemplateScript1.getOrgid());
                    List<SvyLibTemplateTargetoption> svyLibTemplateTargetoptions = svyLibTemplateTargetoptionMapper.selectSvyLibTemplateTargetoptionList(svyLibTemplateTargetoption);
                    svyLibTemplateScript1.setSvyLibTemplateTargetoptions(svyLibTemplateTargetoptions);
                }
@@ -88,6 +91,7 @@
        for (int i = 0; i < svyLibTemplateVOS.size(); i++) {
            SvyLibTemplateScript svyLibTemplateScript = new SvyLibTemplateScript();
            svyLibTemplateScript.setSvyid(svyLibTemplateVOS.get(i).getSvyid());
            svyLibTemplateScript.setOrgid(svyLibTemplateVOS.get(i).getOrgid());
            List<SvyLibTemplateScript> svyLibTemplateScripts = svyLibTemplateScriptMapper.selectSvyLibTemplateScriptList(svyLibTemplateScript);
            //获取题目选项
            a:
@@ -99,6 +103,7 @@
                } else {
                    SvyLibTemplateTargetoption svyLibTopicoption = new SvyLibTemplateTargetoption();
                    svyLibTopicoption.setScriptid(svyLibTemplateScripts.get(j).getId());
                    svyLibTopicoption.setOrgid(svyLibTemplateVOS.get(i).getOrgid());
                    List<SvyLibTemplateTargetoption> svyLibTemplateTargetoptions = svyLibTemplateTargetoptionMapper.selectSvyLibTemplateTargetoptionList(svyLibTopicoption);
                    //将查询出的选项目放到题目中
                    svyLibTemplateScripts.get(j).setSvyLibTemplateTargetoptions(svyLibTemplateTargetoptions);
smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
@@ -519,7 +519,7 @@
            </if>
        </where>
        order by a.update_time desc
        <if test="pageSize != null  and pageSize != ''"> limit ${pageNum},${pageSize} </if>
        <if test="pn != null  and ps != null"> limit ${pn},${ps} </if>
    </select>
@@ -661,6 +661,7 @@
            </if>
        </where>
        order by a.update_time desc
        <if test="pn != null  and ps != null"> limit ${pn},${ps} </if>
    </select>
    <select id="selectPatArchiveInfoByOuthosp" parameterType="com.smartor.domain.PatArchiveReq"
@@ -751,6 +752,7 @@
            </if>
        </where>
        order by a.update_time desc
        <if test="pn != null  and ps != null"> limit ${pn},${ps} </if>
    </select>
    <select id="selectPatArchiveInfoByPhysical" parameterType="com.smartor.domain.PatArchiveReq"
@@ -843,6 +845,7 @@
            </if>
        </where>
        order by a.update_time desc
        <if test="pn != null  and ps != null"> limit ${pn},${ps} </if>
    </select>
    <select id="selectPatArchiveInfoByInhospQC" parameterType="com.smartor.domain.PatArchiveReq"
@@ -987,6 +990,7 @@
            </if>
        </where>
        order by a.id,a.update_time desc ) as tmp order by endtime desc
        <if test="pn != null  and ps != null"> limit ${pn},${ps} </if>
    </select>
    <select id="selectPatArchiveInfoByOuthospQC" parameterType="com.smartor.domain.PatArchiveReq"
smartor/src/main/resources/mapper/smartor/ServiceSubtaskDetailMapper.xml
@@ -54,6 +54,7 @@
        <result property="patid" column="patid"/>
        <result property="guid" column="guid"/>
        <result property="extemplateText" column="extemplate_text"/>
        <result property="answerps" column="answerps"/>
    </resultMap>
    <resultMap type="com.smartor.domain.ServiceSubtaskDetailTarget" id="ServiceSubtaskDetailTargetResult">
        <result property="targetid" column="targetid"/>
@@ -111,7 +112,8 @@
               update_by,
               update_time,
               value_type,
               create_by
               create_by,
               answerps
        from service_subtask_detail
    </sql>
smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
@@ -175,7 +175,9 @@
               leavediagname,
               leaveicd10code,
               orgid,
               visit_type
               visit_type,
               management_doctor,
               management_doctor_code
        from service_subtask
    </sql>
smartor/src/main/resources/mapper/smartor/SvyLibScriptOptionMapper.xml
@@ -78,7 +78,7 @@
               update_time,
               isupload,
               upload_time
        from svy_lib_ScriptOption
        from svy_lib_scriptoption
    </sql>
    <select id="selectSvyLibScriptOptionList" parameterType="com.smartor.domain.SvyLibScriptOption"
@@ -124,7 +124,7 @@
    <insert id="insertSvyLibScriptOption" parameterType="com.smartor.domain.SvyLibScriptOption" useGeneratedKeys="true"
            keyProperty="id">
        insert into svy_lib_ScriptOption
        insert into svy_lib_scriptoption
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="topicid != null">topicid,</if>
            <if test="svyid != null">svyid,</if>
@@ -200,7 +200,7 @@
    </insert>
    <update id="updateSvyLibScriptOption" parameterType="com.smartor.domain.SvyLibScriptOption">
        update svy_lib_ScriptOption
        update svy_lib_scriptoption
        <trim prefix="SET" suffixOverrides=",">
            <if test="topicid != null">topicid = #{topicid},</if>
            <if test="svyid != null">svyid = #{svyid},</if>
@@ -240,7 +240,7 @@
    </update>
    <update id="deleteSvyLibScriptOptionByOptionid" parameterType="Long">
        update svy_lib_ScriptOption
        update svy_lib_scriptoption
        <trim prefix="SET" suffixOverrides=",">
            del_flag = 1
        </trim>
@@ -248,7 +248,7 @@
    </update>
    <delete id="deleteSvyLibScriptOptionByOptionids" parameterType="String">
        delete from svy_lib_ScriptOption where id in
        delete from svy_lib_scriptoption where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
smartor/src/main/resources/mapper/smartor/SvyLibTemplateMapper.xml
@@ -128,6 +128,7 @@
            <if test="categoryid != null ">and a.categoryid = #{categoryid}</if>
            <if test="svyid != null ">and a.svyid = #{svyid}</if>
            <if test="longTemp != null ">and a.long_temp = #{longTemp}</if>
            <if test="orgid != null ">and a.orgid = #{orgid}</if>
            <if test="svyname != null  and svyname != ''">and a.svyname like concat('%', #{svyname}, '%')</if>
            <if test="description != null  and description != ''">and b.icd10name like concat('%', #{description}, '%')
            </if>