liusheng
2025-11-05 1dc040a15692730e3e2a32992e48d3950fb61444
代码提交
已修改35个文件
已添加6个文件
1609 ■■■■■ 文件已修改
ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java 15 ●●●● 补丁 | 查看 | 原始文档 | 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/PatMedOuthospProvisionalController.java 113 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/resources/application-druid.yml 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/resources/application-hn.yml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/resources/application-ls.yml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/resources/application-sltd.yml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/resources/application-xh.yml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUserDept.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/src/main/java/com/ruoyi/common/dx/MessageSend.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java 155 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/PatArchive.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/PatArchiveOthreInfo.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/PatArchiveReq.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/PatArchiveVO.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/PatMedInhosp.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/PatMedInhospVO.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/PatMedOuthosp.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/PatMedOuthospProvisional.java 258 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/ServiceSLTDInhospReqVO.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/domain/ServiceSLTDInhospResDTO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/mapper/PatMedOuthospProvisionalMapper.java 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/mapper/SysUserRole2Mapper.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/IPatMedOuthospProvisionalService.java 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/PatMedOuthospProvisionalServiceImpl.java 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/ServiceSLTDHealthcareRecordServiceImpl.java 79 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskAnswerServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/PatMedOuthospProvisionalMapper.xml 456 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/SysDeptMapper.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/SysUserDeptMapper.xml 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/SysUserMapper.xml 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
smartor/src/main/resources/mapper/smartor/SysUserRole2Mapper.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java
@@ -265,6 +265,7 @@
                serviceSubtaskRecordService.insertServiceSubtaskRecord(serviceSubtaskRecord);
            } else if (descByCode.equals("短信")) {
                log.info("----active的值为:{}", active);
                //短信
                //对url中两个参数加密
                RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample();
@@ -352,7 +353,7 @@
                            } else if (active.equals("xh")) {
                                sendMagParam.setContent("【新华医院】您好,邀请您填写出院宣教调查表,请点击" + sendMagParam.getUrl() + "查看。感谢您配合!");
                            }
                        } else {
                        } else if (heLibrary.getHetype().equals("2")) {
                            //通知
                            sendMagParam.setPhone(serviceSubtask.getPhone());
                            sendMagParam.setContent(heLibrary.getPreachcontent());
@@ -396,10 +397,10 @@
                            throw new BaseException("短信发送失败");
                        }
                    } else if (active.equals("sltd")) {
                        log.info("-------进来了不??");
                        //省立同德的短信发送方式
                        JSONObject data = MessageSend.sendMsg(sendMagParam.getContent(), "2", sendMagParam.getPhone(), LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")));
                        String code = data.get("code").toString();
                        if (StringUtils.isNotEmpty(code) && code.equals("00000")) {
                        String data = MessageSend.sendMsg(sendMagParam.getContent(), "2", sendMagParam.getPhone(), LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")));
                        if (StringUtils.isNotEmpty(data) && data.contains("result=0")) {
                            s = "true";
                        } else {
                            setFailPreachForm(serviceSubtask, sendPreachform, "短信发送失败", "5");
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
@@ -64,6 +64,15 @@
    @Value("${uploadSwitch}")
    private Integer uploadSwitch;
    @Value("${fileUpload}")
    private String fileUpload;
    @Value("${profile}")
    private String profile;
    @Value("${spring.profiles.active}")
    private String active;
    /**
     * é€šç”¨ä¸‹è½½è¯·æ±‚
     *
@@ -112,8 +121,8 @@
            // ä¸Šä¼ å¹¶è¿”回新文件名称
            String fileName = FileUploadUtils.uploadSort(filePath, file);
            String url = null;
            //新华医院特殊,这个视频的访问得转
            String xhPath = "http://218.108.11.22:8093/profile-api";
            String xhPath = fileUpload + profile;
            if (uploadSwitch == 1) {
                String fn = fileName.replaceAll("/profile", "");
                url = xhPath + fn;
@@ -276,7 +285,7 @@
            e.printStackTrace();
        }
        String url = null;
        String xhPath = "http://218.108.11.22:8093/profile-api";
        String xhPath = fileUpload + profile;
        if (uploadSwitch == 1) {
            url = xhPath + "/upload/show/" + fileName.split("\\.", 2)[0] + "/" + fileName;
        } else {
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java
@@ -249,7 +249,7 @@
        patArchiveReq.setPageNum(null);
        patArchiveReq.setPageSize(null);
        List<PatArchiveOthreInfo> count = patArchiveService.getPatientInfo(patArchiveReq);
        map.put("total", count);
        map.put("total", count.size());
        return map;
    }
ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedOuthospProvisionalController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,113 @@
package com.ruoyi.web.controller.smartor;
import java.util.List;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
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.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.smartor.domain.PatMedOuthospProvisional;
import com.smartor.service.IPatMedOuthospProvisionalService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
 * æ‚£è€…门诊记录(过渡)Controller
 *
 * @author ls
 * @date 2025-11-04
 */
@Api("患者门诊记录(过渡)")
@RestController
@RequestMapping("/smartor/provisional")
public class PatMedOuthospProvisionalController extends BaseController
{
    @Autowired
    private IPatMedOuthospProvisionalService patMedOuthospProvisionalService;
    /**
     * æŸ¥è¯¢æ‚£è€…门诊记录(过渡)列表
     */
    @ApiOperation("查询患者门诊记录(过渡)列表")
    //@PreAuthorize("@ss.hasPermi('smartor:provisional:list')")
    @PostMapping("/list")
    public TableDataInfo list(@RequestBody PatMedOuthospProvisional patMedOuthospProvisional)
    {
        startPage();
        List<PatMedOuthospProvisional> list = patMedOuthospProvisionalService.selectPatMedOuthospProvisionalList(patMedOuthospProvisional);
        return getDataTable(list);
    }
    /**
     * å¯¼å‡ºæ‚£è€…门诊记录(过渡)列表
     */
    @ApiOperation("导出患者门诊记录(过渡)列表")
    //@PreAuthorize("@ss.hasPermi('smartor:provisional:export')")
    @Log(title = "患者门诊记录(过渡)", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, PatMedOuthospProvisional patMedOuthospProvisional)
    {
        List<PatMedOuthospProvisional> list = patMedOuthospProvisionalService.selectPatMedOuthospProvisionalList(patMedOuthospProvisional);
        ExcelUtil<PatMedOuthospProvisional> util = new ExcelUtil<PatMedOuthospProvisional>(PatMedOuthospProvisional.class);
        util.exportExcel(response, list, "患者门诊记录(过渡)数据");
    }
    /**
     * èŽ·å–æ‚£è€…é—¨è¯Šè®°å½•ï¼ˆè¿‡æ¸¡ï¼‰è¯¦ç»†ä¿¡æ¯
     */
    @ApiOperation("获取患者门诊记录(过渡)详细信息")
    //@PreAuthorize("@ss.hasPermi('smartor:provisional:query')")
    @GetMapping(value = "/getInfo/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return success(patMedOuthospProvisionalService.selectPatMedOuthospProvisionalById(id));
    }
    /**
     * æ–°å¢žæ‚£è€…门诊记录(过渡)
     */
    @ApiOperation("新增患者门诊记录(过渡)")
    //@PreAuthorize("@ss.hasPermi('smartor:provisional:add')")
    @Log(title = "患者门诊记录(过渡)", businessType = BusinessType.INSERT)
    @PostMapping("/add")
    public AjaxResult add(@RequestBody PatMedOuthospProvisional patMedOuthospProvisional)
    {
        return toAjax(patMedOuthospProvisionalService.insertPatMedOuthospProvisional(patMedOuthospProvisional));
    }
    /**
     * ä¿®æ”¹æ‚£è€…门诊记录(过渡)
     */
    @ApiOperation("修改患者门诊记录(过渡)")
    //@PreAuthorize("@ss.hasPermi('smartor:provisional:edit')")
    @Log(title = "患者门诊记录(过渡)", businessType = BusinessType.UPDATE)
    @PostMapping("/edit")
    public AjaxResult edit(@RequestBody PatMedOuthospProvisional patMedOuthospProvisional)
    {
        return toAjax(patMedOuthospProvisionalService.updatePatMedOuthospProvisional(patMedOuthospProvisional));
    }
    /**
     * åˆ é™¤æ‚£è€…门诊记录(过渡)
     */
    @ApiOperation("删除患者门诊记录(过渡)")
    //@PreAuthorize("@ss.hasPermi('smartor:provisional:remove')")
    @Log(title = "患者门诊记录(过渡)", businessType = BusinessType.DELETE)
    @GetMapping("/remove/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
        return toAjax(patMedOuthospProvisionalService.deletePatMedOuthospProvisionalByIds(ids));
    }
}
ruoyi-admin/src/main/resources/application-druid.yml
@@ -29,12 +29,12 @@
        #        driverClassName: com.mysql.cj.jdbc.Driver
        #  å…¬å¸äº‘
#        url: jdbc:mysql://116.62.18.175:6002/smartor_xinhua?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
#        username: hxsoft
#        password: Hxerp2000
#        driverClassName: com.mysql.cj.jdbc.Driver
        #        url: jdbc:mysql://116.62.18.175:6002/smartor_xinhua?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
        #        username: hxsoft
        #        password: Hxerp2000
        #        driverClassName: com.mysql.cj.jdbc.Driver
        #  å…¬å¸æœ¬åœ°
        url: jdbc:mysql://haiershi.a1.luyouxia.net:23844/smartor_lishui?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
        url: jdbc:mysql://haiershi.a1.luyouxia.net:23844/smartor_sltd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
        username: smartor
        password: Smartor.2023
        driverClassName: com.mysql.cj.jdbc.Driver
@@ -58,11 +58,11 @@
      #        password: Smartor.2023
      #        driverClassName: com.mysql.cj.jdbc.Driver
      # ä»Žæ•°æ®æºå¼€å…³/默认关闭(公司)
#       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://116.62.18.175:6001;DatabaseName=iv-ywey;encrypt=false;SelectMethod=cursor
      #       username: sa
      #       password: Hxerp2000
      #       driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
      # ä»Žæ•°æ®æºå¼€å…³/默认关闭(义乌二院)
      # enabled: true
@@ -113,7 +113,7 @@
            multi-statement-allow: true
  # redis é…ç½®
  redis:
    host: 192.168.100.10
    host: 127.0.0.1
    port: 6020
    database: 0
    password: Smartor
@@ -270,3 +270,7 @@
isEncryp:
dealDeptCode:
#文件上传地址
fileUpload:
profile:
ruoyi-admin/src/main/resources/application-hn.yml
@@ -259,3 +259,7 @@
#是否加密  0不加   1加密
isEncryp: 0
#文件上传地址
fileUpload:
profile:
ruoyi-admin/src/main/resources/application-ls.yml
@@ -248,3 +248,7 @@
#是否加密  0不加   1加密
isEncryp: 0
#文件上传地址
fileUpload:
profile:
ruoyi-admin/src/main/resources/application-sltd.yml
@@ -241,4 +241,6 @@
#是否加密  0不加   1加密
isEncryp: 0
#文件上传地址
fileUpload: http://192.88.117.236:8090
profile: /prod-api/profile
ruoyi-admin/src/main/resources/application-xh.yml
@@ -235,3 +235,7 @@
#是否加密  0不加   1加密
isEncryp: 0
#文件上传地址
fileUpload: http://218.108.11.22:8093
profile: /profile-api
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java
@@ -1,5 +1,6 @@
package com.ruoyi.common.core.domain.entity;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -124,5 +125,11 @@
    @ApiModelProperty("部门编码")
    private String type;
    /**
     * æœºæž„ID
     */
    @ApiModelProperty("院区")
    @Excel(name = " é™¢åŒº ")
    private String campusid;
}
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java
@@ -256,6 +256,22 @@
    private List<Map<String, Object>> belongDepts = new ArrayList();
    public String getCampusid() {
        return campusid;
    }
    public void setCampusid(String campusid) {
        this.campusid = campusid;
    }
    /**
     * æœºæž„ID
     */
    @ApiModelProperty("院区")
    @Excel(name = " é™¢åŒº ")
    private String campusid;
    public SysUser() {
    }
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUserDept.java
@@ -74,5 +74,12 @@
    private Long delFlag;
    /**
     * æœºæž„ID
     */
    @ApiModelProperty("院区")
    @Excel(name = " é™¢åŒº ")
    private String campusid;
}
ruoyi-common/src/main/java/com/ruoyi/common/dx/MessageSend.java
@@ -20,11 +20,12 @@
     * @param sScheduleTime é¢„约发送时间
     * @return
     */
    public static JSONObject sendMsg(String sMessageContent, String sMessageType, String sUserNumber, String sScheduleTime) {
    public static String sendMsg(String sMessageContent, String sMessageType, String sUserNumber, String sScheduleTime) {
        log.info("--sMessageContent的值为:{}   ,--sMessageType的值为:{},   --sUserNumber的值为:{},   --sScheduleTime的值为:{}", sMessageContent, sMessageType, sUserNumber, sScheduleTime);
        com.ruoyi.common.dx.SmsService service = new SmsService();
        SmsServiceSoap soap = service.getSmsServiceSoap();
        String result = soap.i5GSend("202508291634227086", "T202508291635259440", UUID.randomUUID().toString(), sMessageContent, sMessageType, sUserNumber, sScheduleTime);
        return JSONObject.parseObject(result);
        log.info("----短信返回的数据为:{}", result);
        return result;
    }
}
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
@@ -16,6 +16,7 @@
import com.ruoyi.common.utils.http.HttpUtils;
import com.ruoyi.common.utils.sms.smsUtils;
import com.ruoyi.quartz.service.ICollectHISService;
import com.ruoyi.system.domain.SysConfig;
import com.ruoyi.system.service.ISysConfigService;
import com.smartor.common.LSHospTokenUtil;
import com.smartor.domain.*;
@@ -34,12 +35,14 @@
import java.nio.file.Files;
import java.nio.file.Paths;
import java.security.MessageDigest;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.stream.Collectors;
import static cn.hutool.core.convert.Convert.toHex;
@@ -262,45 +265,96 @@
            }
        } else if (active.trim().equals("sltd")) {
            try {
                //获取是否需要采集用户、部门信息
                SysConfig config = new SysConfig();
                config.setConfigKey("sltd.gather.sysuser");
                config.setOrgid("20001001");
                List<SysConfig> sysConfigs = configService.selectConfigList(config);
                //获取省立同德要采集的院区
                SysConfig cf = new SysConfig();
                cf.setConfigKey("sltd.gather.campusid");
                cf.setOrgid("20001001");
                List<SysConfig> sysConfigcampusids = configService.selectConfigList(cf);
                List<Long> campusidList = new ArrayList<>();
                if (CollectionUtils.isNotEmpty(sysConfigcampusids)) {
                    String[] split = sysConfigcampusids.get(0).getConfigValue().split(",");
                    campusidList = Arrays.stream(split).map(Long::valueOf).collect(Collectors.toList());
                } else {
                    log.error("SysConfig中的院区ID为空!");
                    return;
                }
                //configValue = 1 ä¸éœ€è¦é‡‡é›†       configValue = 2需要采集
                if (CollectionUtils.isNotEmpty(sysConfigs) && sysConfigs.get(0).getConfigValue().equals("2")) {
                    log.info("【dealHisData】省立同德“部门信息”开始采集数据");
                    ServiceSLTDDeptReqVO serviceSLTDDeptReqVO = new ServiceSLTDDeptReqVO();
                    serviceSLTDDeptReqVO.setOrgId("20001001");
                    serviceSLTDDeptReqVO.setCampusIds(campusidList);
                    Boolean aBoolean1 = serviceSLTDHealthcareRecordService.queryDeptWardAreaInfoList(serviceSLTDDeptReqVO);
                    log.info("【dealHisData】省立同德“部门信息”结束采集数据:{}", aBoolean1);
                    Boolean aBoolean = false;
                    for (Long cid : campusidList) {
                        log.info("【dealHisData】省立同德“用户信息”开始采集数据,院区:{}", cid);
                        ServiceSLTDInhospReqVO reqVO = new ServiceSLTDInhospReqVO();
                        reqVO.setOrgId("20001001");
                        reqVO.setCampusId(cid);
                        ArrayList<String> statusList = new ArrayList<>();
                        statusList.add("1");
                        reqVO.setStatusList(statusList);
                        aBoolean = serviceSLTDHealthcareRecordService.queryHospUserInfoList(reqVO);
                    }
                    log.info("【dealHisData】省立同德“用户信息”结束采集数据:{}", aBoolean);
                }
                // çœç«‹åŒå¾·æ•°æ®é‡‡é›†
                log.info("【dealHisData】省立同德“入院”开始采集数据");
                String yesterday = LocalDate.now().minusDays(1).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
                ServiceSLTDInhospReqVO serviceSLTDInhospReqVO = new ServiceSLTDInhospReqVO();
                serviceSLTDInhospReqVO.setOrgId("20001001");
                serviceSLTDInhospReqVO.setCampusId(30001002L);
                serviceSLTDInhospReqVO.setStartHeadTime(yesterday);
                serviceSLTDInhospReqVO.setStartTailTime(yesterday);
                List<String> list = new ArrayList<>();
                list.add("FH0108.02");
                serviceSLTDInhospReqVO.setHealthcareRecordTypeList(list);
                serviceSLTDHealthcareRecordService.queryHealthcareRecordList(serviceSLTDInhospReqVO);
                log.info("【dealHisData】省立同德“入院”結束采集数据");
                for (Long cid : campusidList) {
                    log.info("【dealHisData】省立同德“入院”开始采集数据,院区:{}", cid);
                    String nowTime = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
                    ServiceSLTDInhospReqVO serviceSLTDInhospReqVO = new ServiceSLTDInhospReqVO();
                    serviceSLTDInhospReqVO.setOrgId("20001001");
                    serviceSLTDInhospReqVO.setCampusId(cid);
                    serviceSLTDInhospReqVO.setStartHeadTime(nowTime);
                    serviceSLTDInhospReqVO.setStartTailTime(nowTime);
                    List<String> list = new ArrayList<>();
                    list.add("FH0108.02");
                    serviceSLTDInhospReqVO.setHealthcareRecordTypeList(list);
                    log.info("【dealHisData】省立同德“入院”采集数据入参:{}", serviceSLTDInhospReqVO);
                    serviceSLTDHealthcareRecordService.queryHealthcareRecordList(serviceSLTDInhospReqVO);
                    log.info("【dealHisData】省立同德“入院”結束采集数据,院区:{}", cid);
                log.info("【dealHisData】省立同德“门急诊”开始采集数据");
                serviceSLTDInhospReqVO.setStartHeadTime(null);
                serviceSLTDInhospReqVO.setStartTailTime(null);
                serviceSLTDInhospReqVO.setEncounterTimeStart(yesterday);
                serviceSLTDInhospReqVO.setEncounterTimeEnd(yesterday);
                List<String> list1 = new ArrayList<>();
                list1.add("FH0108.01");
                list1.add("FH0108.03");
                serviceSLTDInhospReqVO.setHealthcareRecordTypeList(list1);
                serviceSLTDHealthcareRecordService.queryHealthcareRecordList(serviceSLTDInhospReqVO);
                log.info("【dealHisData】河南结“门急诊”束采集数据");
                    log.info("【dealHisData】省立同德“门急诊”开始采集数据,院区:{}", cid);
                    serviceSLTDInhospReqVO.setStartHeadTime(null);
                    serviceSLTDInhospReqVO.setStartTailTime(null);
                    serviceSLTDInhospReqVO.setEncounterTimeStart(nowTime);
                    serviceSLTDInhospReqVO.setEncounterTimeEnd(nowTime);
                    List<String> list1 = new ArrayList<>();
                    list1.add("FH0108.01");
                    list1.add("FH0108.03");
                    serviceSLTDInhospReqVO.setHealthcareRecordTypeList(list1);
                    log.info("【dealHisData】省立同德“门急诊”采集数据入参:{}", serviceSLTDInhospReqVO);
                    serviceSLTDHealthcareRecordService.queryHealthcareRecordList(serviceSLTDInhospReqVO);
                    log.info("【dealHisData】省立同德“门急诊”束采集数据,院区:{}", cid);
                log.info("【dealHisData】省立同德“出院”开始采集数据");
                serviceSLTDInhospReqVO.setStartHeadTime(null);
                serviceSLTDInhospReqVO.setStartTailTime(null);
                serviceSLTDInhospReqVO.setEncounterTimeStart(null);
                serviceSLTDInhospReqVO.setEncounterTimeEnd(null);
                serviceSLTDInhospReqVO.setPreOutHospitalHeadDate(yesterday);
                serviceSLTDInhospReqVO.setPreOutHospitalTailDate(yesterday);
                List<String> list2 = new ArrayList<>();
                list2.add("FH0108.02");
                serviceSLTDInhospReqVO.setHealthcareRecordTypeList(list2);
                serviceSLTDHealthcareRecordService.queryHealthcareRecordList(serviceSLTDInhospReqVO);
                log.info("【dealHisData】河南结“出院”束采集数据");
                    log.info("【dealHisData】省立同德“出院”开始采集数据,院区:{}", cid);
                    serviceSLTDInhospReqVO.setStartHeadTime(null);
                    serviceSLTDInhospReqVO.setStartTailTime(null);
                    serviceSLTDInhospReqVO.setEncounterTimeStart(null);
                    serviceSLTDInhospReqVO.setEncounterTimeEnd(null);
                    serviceSLTDInhospReqVO.setPreOutHospitalHeadDate(nowTime);
                    serviceSLTDInhospReqVO.setPreOutHospitalTailDate(nowTime);
                    List<String> list2 = new ArrayList<>();
                    list2.add("FH0108.02");
                    serviceSLTDInhospReqVO.setHealthcareRecordTypeList(list2);
                    log.info("【dealHisData】省立同德“出院”采集数据入参:{}", serviceSLTDInhospReqVO);
                    serviceSLTDHealthcareRecordService.queryHealthcareRecordList(serviceSLTDInhospReqVO);
                    log.info("【dealHisData】省立同德“出院”束采集数据,院区:{}", cid);
                }
//                SysConfig sysConfig = sysConfigs.get(0);
//                sysConfig.setConfigValue(nowTime);
//                configService.updateConfig(sysConfig);
            } catch (Exception e) {
                log.error("【dealHisData】省立同德数据采集异常", e);
            }
@@ -579,12 +633,23 @@
                        sendMagParam.setContent("您好,邀请您填写出院调查表,请点击" + sendMagParam.getUrl() + "填写。感谢您配合!");
                    } else {
                        HeLibrary heLibrary = heLibraryMapper.selectHeLibraryById(serviceSubtask.getLibtemplateid());
                        if ("2".equals(heLibrary.getHetype())) {
                        if (heLibrary.getHetype().equals("1")) {
                            sendMagParam.setPhone(serviceSubtask.getPhone());
                            sendMagParam.setUrl(localIP + ":" + req_path + "/xj?p=" + format);
                            if (active.equals("ls") || active.equals("sltd")) {
                                sendMagParam.setContent("您好,邀请您填写出院宣教调查表,请点击" + sendMagParam.getUrl() + "查看。感谢您配合!");
                            } else if (active.equals("xh")) {
                                sendMagParam.setContent("【新华医院】您好,邀请您填写出院宣教调查表,请点击" + sendMagParam.getUrl() + "查看。感谢您配合!");
                            }
                        } else if (heLibrary.getHetype().equals("2")) {
                            //通知
                            sendMagParam.setPhone(serviceSubtask.getPhone());
                            sendMagParam.setContent(heLibrary.getPreachcontent());
                        }
                    }
                    String isSuccess = null;
                    log.info("active的值为:{}", active);
                    if (active.equals("xh")) {
                        Map<String, String> req = new HashMap<>();
                        req.put("phone", sendMagParam.getPhone());
@@ -609,10 +674,10 @@
                            isSuccess = "true";
                        }
                    } else if (active.equals("sltd")) {
                        log.info("sltd进来了吗?{}   ,---sendMagParam.getContent()的参数为:{}", active, sendMagParam.getContent());
                        //省立同德的短信发送方式
                        JSONObject data = MessageSend.sendMsg(sendMagParam.getContent(), "2", sendMagParam.getPhone(), LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")));
                        String code = data.get("code").toString();
                        if (StringUtils.isNotEmpty(code) && code.equals("00000")) {
                        String data = MessageSend.sendMsg(sendMagParam.getContent(), "2", sendMagParam.getPhone(), LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")));
                        if (StringUtils.isNotEmpty(data) && data.contains("result=0")) {
                            isSuccess = "true";
                        }
                    } else if (active.equals("hzszlyy")) {//市一医院
@@ -908,6 +973,10 @@
        if (CollectionUtils.isNotEmpty(serviceSubtaskPreachforms)) {
            ServiceSubtaskPreachform serviceSubtaskPreachform1 = serviceSubtaskPreachforms.get(0);
            serviceSubtaskPreachform1.setSendstate(failSendstate);
            if (serviceSubtask.getType().equals("3") || serviceSubtask.getType().equals("4")) {
                //如果是宣教或通知,并且发送成功,直接将发送状态改成9
                if (failSendstate.equals("2")) serviceSubtaskPreachform1.setSendstate("9");
            }
            serviceSubtaskPreachform1.setRemark(remark);
            serviceSubtaskPreachformMapper.updateServiceSubtaskPreachform(serviceSubtaskPreachform1);
@@ -928,6 +997,12 @@
        serviceSubtask.setVisitTime(getNextVisitTime(serviceSubtask.getId(), serviceSubtask.getTaskid(), serviceSubtask.getVisitTime()));
        serviceSubtask.setCurrentPreachform(preachform);
        serviceSubtask.setSendstate(3L);
        if (serviceSubtask.getType().equals("3") || serviceSubtask.getType().equals("4")) {
            //如果是宣教或通知,并且发送成功,则直接将serviceSubtask状态改成6L(这个患者是没有题做的,不会再触发接口进行状态修改)
            if (failSendstate.equals("2")) {
                serviceSubtask.setSendstate(6L);
            }
        }
        serviceSubtaskMapper.updateServiceSubtask(serviceSubtask);
        return true;
    }
ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -26,11 +26,13 @@
        <result property="deptType" column="dept_type"/>
        <result property="guid" column="guid"/>
        <result property="orgid" column="orgid"/>
        <result property="campusid" column="campusid"/>
    </resultMap>
    <sql id="selectDeptVo">
        select d.dept_id,
               d.dept_code,
               d.campusid,
               d.parent_id,
               d.ancestors,
               d.dept_name,
@@ -71,13 +73,16 @@
        <if test="deptType != null and deptType != ''">
            AND dept_type = #{deptType}
        </if>
        <if test="campusid != null and campusid != ''">
            AND campusid = #{campusid}
        </if>
        <if test="hisDeptId != null and hisDeptId != ''">
            AND his_dept_id = #{hisDeptId}
        </if>
        <if test="hisParentId != null and hisParentId != ''">
            AND his_parent_id = #{hisParentId}
        </if>
            <if test="orgid != null and orgid != ''">
        <if test="orgid != null and orgid != ''">
            AND orgid = #{orgid}
        </if>
        <!-- æ•°æ®èŒƒå›´è¿‡æ»¤ -->
@@ -108,6 +113,7 @@
               d.leader,
               d.phone,
               d.email,
               d.campusid,
               d.status,
               d.his_dept_id,
               d.his_parent_id,
@@ -119,6 +125,7 @@
    <select id="selectDeptByCode" parameterType="string" resultMap="SysDeptResult">
        select d.dept_id,
               d.parent_id,
               d.campusid,
               d.dept_code,
               d.dept_type,
               d.ancestors,
@@ -185,6 +192,7 @@
        <if test="hisDeptId != null and hisDeptId != ''">his_dept_id,</if>
        <if test="hisParentId != null and hisParentId != ''">his_parent_id,</if>
        <if test="orgid != null and orgid != ''">orgid,</if>
        <if test="campusid != null and campusid != ''">campusid,</if>
        create_time
        )values(
        <if test="deptId != null and deptId != 0">#{deptId},</if>
@@ -202,6 +210,7 @@
        <if test="hisDeptId != null and hisDeptId != ''">#{hisDeptId},</if>
        <if test="hisParentId != null and hisParentId != ''">#{hisParentId},</if>
        <if test="orgid != null and orgid != ''">#{orgid},</if>
        <if test="campusid != null and campusid != ''">#{campusid},</if>
        sysdate()
        )
    </insert>
@@ -223,6 +232,7 @@
            <if test="hisParentId != null and hisParentId != ''">his_parent_id = #{hisParentId},</if>
            <if test="hisDeptId != null and hisDeptId != ''">his_dept_id = #{hisDeptId},</if>
            <if test="orgid != null and orgid != ''">orgid = #{orgid},</if>
            <if test="campusid != null and campusid != ''">campusid = #{campusid},</if>
            update_time = sysdate()
        </set>
        where dept_id = #{deptId}
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
@@ -36,6 +36,7 @@
        <result property="searchscope" column="searchscope"/>
        <result property="guid" column="guid"/>
        <result property="orgid" column="orgid"/>
        <result property="campusid" column="campusid"/>
        <association property="dept" column="dept_id" javaType="com.ruoyi.common.core.domain.entity.SysDept"
                     resultMap="deptResult"/>
        <collection property="roles" javaType="java.util.List" resultMap="RoleResult"/>
@@ -49,6 +50,7 @@
        <result property="orderNum" column="order_num"/>
        <result property="leader" column="leader"/>
        <result property="status" column="dept_status"/>
        <result property="campusid" column="campusid"/>
    </resultMap>
    <resultMap id="RoleResult" type="com.ruoyi.common.core.domain.entity.SysRole">
@@ -65,6 +67,7 @@
               u.dept_id,
               u.id_card,
               u.hosp_info,
               u.campusid,
               u.dept_info,
               u.searchscope,
               u.user_name,
@@ -114,6 +117,7 @@
        u.nick_name, u.user_name,
        u.email,u.id_card,
        u.avatar,
        u.campusid,
        u.dept_name,
        u.dept_code,
        u.birthday,
@@ -137,6 +141,9 @@
        </if>
        <if test="status != null and status != ''">
            AND u.status = #{status}
        </if>
        <if test="campusid != null and campusid != ''">
            AND u.campusid = #{campusid}
        </if>
        <if test="idCard != null and idCard != ''">
            AND u.id_card = #{idCard}
@@ -177,7 +184,7 @@
    </select>
    <select id="getUserList" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserResult">
        select u.user_id,u.title,u.his_user_id,u.hosp_info,u.dept_info, u.searchscope, u.dept_id, u.user_type,
        u.nick_name, u.user_name,
        u.nick_name, u.user_name,u.campusid,
        u.email,u.id_card,
        u.avatar,
        u.dept_name,
@@ -192,6 +199,9 @@
        </if>
        <if test="orgid != null and orgid != ''">
            AND u.orgid = #{orgid}
        </if>
        <if test="campusid != null and campusid != ''">
            AND u.campusid = #{campusid}
        </if>
        <if test="userName != null and userName != ''">
            AND u.user_name like concat('%', #{userName}, '%')
@@ -247,6 +257,7 @@
        u.email,
        u.dept_code,
        u.dept_name,
        u.campusid,
        u.birthday,
        u.job_phone,
        u.phonenumber, u.status,u.id_card,
@@ -276,6 +287,7 @@
            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,
        u.campusid,
        u.email,
        u.his_user_id,
        u.title,
@@ -377,6 +389,7 @@
        <if test="orgid != null and orgid != ''">orgid,</if>
        <if test="deptCode != null and deptCode != ''">dept_code,</if>
        <if test="deptName != null and deptName != ''">dept_name,</if>
        <if test="campusid != null and campusid != ''">campusid,</if>
        create_time
        )values(
        <if test="userId != null and userId != ''">#{userId},</if>
@@ -403,6 +416,7 @@
        <if test="orgid != null and orgid != ''">#{orgid},</if>
        <if test="deptCode != null and deptCode != ''">#{deptCode},</if>
        <if test="deptName != null and deptName != ''">#{deptName},</if>
        <if test="campusid != null and campusid != ''">#{campusid},</if>
        sysdate()
        )
    </insert>
@@ -439,6 +453,7 @@
            </if>
            <if test="deptCode != null and deptCode != ''">dept_code=#{deptCode},</if>
            <if test="deptName != null and deptName != ''">dept_name=#{deptName},</if>
            <if test="campusid != null and campusid != ''">campusid=#{campusid},</if>
            update_time = sysdate()
        </set>
        where user_id = #{userId}
smartor/src/main/java/com/smartor/domain/PatArchive.java
@@ -227,6 +227,13 @@
    private String orgid;
    /**
     * æœºæž„ID
     */
    @ApiModelProperty("院区")
    @Excel(name = " é™¢åŒº ")
    private String campusid;
    /**
     * å¾®ä¿¡openid
     */
    @ApiModelProperty("微信openid")
smartor/src/main/java/com/smartor/domain/PatArchiveOthreInfo.java
@@ -96,6 +96,12 @@
    private String guid;
    /**
     * é™¢åŒº
     */
    @ApiModelProperty("院区")
    private String campusid;
    /**
     * GUID
     */
    @ApiModelProperty("出院诊断")
smartor/src/main/java/com/smartor/domain/PatArchiveReq.java
@@ -225,4 +225,11 @@
     */
    @ApiModelProperty("出入院标识:0入院  1出院  ")
    private Integer cry;
    /**
     * æœºæž„ID
     */
    @ApiModelProperty("院区")
    @Excel(name = " é™¢åŒº ")
    private String campusid;
}
smartor/src/main/java/com/smartor/domain/PatArchiveVO.java
@@ -317,4 +317,10 @@
    @Excel(name = "主要照护人年龄")
    private String casePersonAge;
    /**
     * æœºæž„ID
     */
    @ApiModelProperty("院区")
    @Excel(name = " é™¢åŒº ")
    private String campusid;
}
smartor/src/main/java/com/smartor/domain/PatMedInhosp.java
@@ -469,4 +469,11 @@
    @ApiModelProperty(value = "最后结束时间")
    private String lastEndTime;
    /**
     * æœºæž„ID
     */
    @ApiModelProperty("院区")
    @Excel(name = " é™¢åŒº ")
    private String campusid;
}
smartor/src/main/java/com/smartor/domain/PatMedInhospVO.java
@@ -377,5 +377,12 @@
    @ApiModelProperty("经管医生")
    @Excel(name = " ç»ç®¡åŒ»ç”Ÿ ")
    private String managementDoctorCode;
    /**
     * æœºæž„ID
     */
    @ApiModelProperty("院区")
    @Excel(name = " é™¢åŒº ")
    private String campusid;
}
smartor/src/main/java/com/smartor/domain/PatMedOuthosp.java
@@ -242,4 +242,11 @@
    @ApiModelProperty(value = "最后结束时间")
    private String lastEndTime;
    /**
     * æœºæž„ID
     */
    @ApiModelProperty("院区")
    @Excel(name = " é™¢åŒº ")
    private String campusid;
}
smartor/src/main/java/com/smartor/domain/PatMedOuthospProvisional.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,258 @@
package com.smartor.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
 * æ‚£è€…门诊记录(过渡)对象 pat_med_outhosp_provisional
 *
 * @author ls
 * @date 2025-11-04
 */
@Data
@ApiModel("患者门诊记录(过渡)")
public class PatMedOuthospProvisional extends BaseEntity {
    private static final long serialVersionUID = 1L;
    /**
     * è‡ªå¢žID
     */
    @ApiModelProperty("自增ID")
    //数据库自增改成@TableId(type = IdType.AUTO)
    private Long id;
    /**
     * é—¨è¯Šç¼–号
     */
    @ApiModelProperty("门诊编号")
    @Excel(name = "门诊编号")
    private String outhospno;
    /**
     * æµæ°´å·
     */
    @ApiModelProperty("流水号")
    @Excel(name = "流水号")
    private String serialnum;
    /**
     * æ‚£è€…档案ID
     */
    @ApiModelProperty("患者档案ID")
    @Excel(name = "患者档案ID")
    private Long patid;
    /**
     * ç—…人姓名
     */
    @ApiModelProperty("病人姓名")
    @Excel(name = "病人姓名")
    private String patname;
    /**
     * æ‚£è€…档案编号
     */
    @ApiModelProperty("患者档案编号")
    @Excel(name = "患者档案编号")
    private String patno;
    /**
     * åŒ»é™¢åç§°
     */
    @ApiModelProperty("医院名称")
    @Excel(name = "医院名称")
    private String hospitalname;
    /**
     * åŒ»é™¢ç¼–号
     */
    @ApiModelProperty("医院编号")
    @Excel(name = "医院编号")
    private String hospitalcode;
    /**
     * è¯Šæ–­ICD值
     */
    @ApiModelProperty("诊断ICD值")
    @Excel(name = "诊断ICD值")
    private String icd10code;
    /**
     * è¯Šæ–­åç§°
     */
    @ApiModelProperty("诊断名称")
    @Excel(name = "诊断名称")
    private String diagname;
    /**
     * ç§‘室ID
     */
    @ApiModelProperty("科室ID")
    @Excel(name = "科室ID")
    private Long deptid;
    /**
     * ç§‘室代码
     */
    @ApiModelProperty("科室代码")
    @Excel(name = "科室代码")
    private String deptcode;
    /**
     * ç§‘室名称
     */
    @ApiModelProperty("科室名称")
    @Excel(name = "科室名称")
    private String deptname;
    /**
     * åŒ»ç”Ÿå·¥å·
     */
    @ApiModelProperty("医生工号")
    @Excel(name = "医生工号")
    private String drcode;
    /**
     * åŒ»ç”Ÿåç§°
     */
    @ApiModelProperty("医生名称")
    @Excel(name = "医生名称")
    private String drname;
    /**
     * å°±è¯Šæ—¥æœŸ
     */
    @ApiModelProperty("就诊日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "就诊日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date admitdate;
    /**
     * åŒ»é™¢æœºæž„ID
     */
    @ApiModelProperty("医院机构ID")
    @Excel(name = "医院机构ID")
    private String orgid;
    /**
     * åˆ é™¤æ ‡å¿—(0:未删除 1:已删除)
     */
    @ApiModelProperty("删除标志(0:未删除 1:已删除)")
    private String delFlag;
    /**
     * ä¸Šä¼ æ ‡å¿—(0:未上传 1:已上传)
     */
    @ApiModelProperty("上传标志(0:未上传 1:已上传)")
    @Excel(name = "上传标志", readConverterExp = "0=:未上传,1=:已上传")
    private Long isupload;
    /**
     * ä¸Šä¼ æ—¶é—´
     */
    @ApiModelProperty("上传时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "上传时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date uploadTime;
    /**
     * æ˜¯å¦ç”Ÿæˆæ–¹æ¡ˆçŠ¶æ€;0未生成 1生成就诊 9无匹配方案
     */
    @ApiModelProperty("是否生成方案状态;0未生成 1生成就诊 9无匹配方案")
    @Excel(name = "是否生成方案状态;0未生成 1生成就诊 9无匹配方案")
    private Long schemestatus;
    /**
     * æ–¹æ¡ˆçŠ¶æ€æ“ä½œæ—¶é—´
     */
    @ApiModelProperty("方案状态操作时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "方案状态操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date schemetime;
    /**
     * çŽ°ç—…å²
     */
    @ApiModelProperty("现病史")
    @Excel(name = "现病史")
    private String hpi;
    /**
     * ä¸»è¿°
     */
    @ApiModelProperty("主述")
    @Excel(name = "主述")
    private String mainsuit;
    /**
     * çˆ¶ID
     */
    @ApiModelProperty("父ID")
    @Excel(name = "父ID")
    private Long pid;
    /**
     * GUID
     */
    @ApiModelProperty("GUID")
    @Excel(name = "GUID")
    private String guid;
    /**
     * çˆ¶GUID
     */
    @ApiModelProperty("父GUID")
    @Excel(name = "父GUID")
    private String pguid;
    /**
     * é™¢åŒºç¼–号
     */
    @ApiModelProperty("院区编号")
    @Excel(name = "院区编号")
    private String hospitaldistrictcode;
    /**
     * é™¢åŒºåç§°
     */
    @ApiModelProperty("院区名称")
    @Excel(name = "院区名称")
    private String hospitaldistrictname;
    /**
     * ç–¾ç—…长期任务,是否处理:0未处理   1处理成功    2处理失败
     */
    @ApiModelProperty("疾病长期任务,是否处理:0未处理   1处理成功    2处理失败")
    @Excel(name = "疾病长期任务,是否处理:0未处理   1处理成功    2处理失败")
    private String diagcheckFlag;
    /**
     * éšè®¿æ—¥æœŸ
     */
    @ApiModelProperty("随访日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "随访日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date fudate;
    /**
     * éšè®¿æ ‡è¯†
     */
    @ApiModelProperty("随访标识")
    @Excel(name = "随访标识")
    private String fuflag;
    /**
     * é™¢åŒº
     */
    @ApiModelProperty("院区")
    @Excel(name = "院区")
    private String campusid;
}
smartor/src/main/java/com/smartor/domain/ServiceSLTDInhospReqVO.java
@@ -1,5 +1,6 @@
package com.smartor.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
smartor/src/main/java/com/smartor/domain/ServiceSLTDInhospResDTO.java
@@ -12,6 +12,9 @@
    @ApiModelProperty(value = "机构ID æœºæž„唯一编号")
    private String orgId;
    @ApiModelProperty(value = "机构ID æœºæž„唯一编号")
    private String campusId;
    @ApiModelProperty(value = "诊疗记录id  æ‚£è€…每次就诊都不相同")
    private Long healthcareRecordId;
smartor/src/main/java/com/smartor/mapper/PatMedOuthospProvisionalMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,64 @@
package com.smartor.mapper;
import com.smartor.domain.PatMedOuthospProvisional;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
 * æ‚£è€…门诊记录(过渡)Mapper接口
 *
 * @author ls
 * @date 2025-11-04
 */
@Mapper
public interface PatMedOuthospProvisionalMapper
{
    /**
     * æŸ¥è¯¢æ‚£è€…门诊记录(过渡)
     *
     * @param id æ‚£è€…门诊记录(过渡)主键
     * @return æ‚£è€…门诊记录(过渡)
     */
    public PatMedOuthospProvisional selectPatMedOuthospProvisionalById(Long id);
    /**
     * æŸ¥è¯¢æ‚£è€…门诊记录(过渡)列表
     *
     * @param patMedOuthospProvisional æ‚£è€…门诊记录(过渡)
     * @return æ‚£è€…门诊记录(过渡)集合
     */
    public List<PatMedOuthospProvisional> selectPatMedOuthospProvisionalList(PatMedOuthospProvisional patMedOuthospProvisional);
    /**
     * æ–°å¢žæ‚£è€…门诊记录(过渡)
     *
     * @param patMedOuthospProvisional æ‚£è€…门诊记录(过渡)
     * @return ç»“æžœ
     */
    public int insertPatMedOuthospProvisional(PatMedOuthospProvisional patMedOuthospProvisional);
    /**
     * ä¿®æ”¹æ‚£è€…门诊记录(过渡)
     *
     * @param patMedOuthospProvisional æ‚£è€…门诊记录(过渡)
     * @return ç»“æžœ
     */
    public int updatePatMedOuthospProvisional(PatMedOuthospProvisional patMedOuthospProvisional);
    /**
     * åˆ é™¤æ‚£è€…门诊记录(过渡)
     *
     * @param id æ‚£è€…门诊记录(过渡)主键
     * @return ç»“æžœ
     */
    public int deletePatMedOuthospProvisionalById(Long id);
    /**
     * æ‰¹é‡åˆ é™¤æ‚£è€…门诊记录(过渡)
     *
     * @param ids éœ€è¦åˆ é™¤çš„æ•°æ®ä¸»é”®é›†åˆ
     * @return ç»“æžœ
     */
    public int deletePatMedOuthospProvisionalByIds(Long[] ids);
}
smartor/src/main/java/com/smartor/mapper/SysUserRole2Mapper.java
@@ -12,8 +12,7 @@
 * @author ruoyi
 */
@Mapper
public interface SysUserRole2Mapper
{
public interface SysUserRole2Mapper {
    /**
     * é€šè¿‡ç”¨æˆ·ID删除用户和角色关联
     *
@@ -38,6 +37,8 @@
     */
    public int countUserRoleByRoleId(Long roleId);
    public SysUserRole selectUserRoleByRoleIdAndUserId(@Param("roleId") Long roleId, @Param("userId") Long userId);
    /**
     * æ‰¹é‡æ–°å¢žç”¨æˆ·è§’色信息
     *
@@ -57,7 +58,7 @@
    /**
     * æ‰¹é‡å–消授权用户角色
     *
     * @param roleId è§’色ID
     * @param roleId  è§’色ID
     * @param userIds éœ€è¦åˆ é™¤çš„用户数据ID
     * @return ç»“æžœ
     */
smartor/src/main/java/com/smartor/service/IPatMedOuthospProvisionalService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,62 @@
package com.smartor.service;
import com.smartor.domain.PatMedOuthospProvisional;
import java.util.List;
/**
 * æ‚£è€…门诊记录(过渡)Service接口
 *
 * @author ls
 * @date 2025-11-04
 */
public interface IPatMedOuthospProvisionalService
{
    /**
     * æŸ¥è¯¢æ‚£è€…门诊记录(过渡)
     *
     * @param id æ‚£è€…门诊记录(过渡)主键
     * @return æ‚£è€…门诊记录(过渡)
     */
    public PatMedOuthospProvisional selectPatMedOuthospProvisionalById(Long id);
    /**
     * æŸ¥è¯¢æ‚£è€…门诊记录(过渡)列表
     *
     * @param patMedOuthospProvisional æ‚£è€…门诊记录(过渡)
     * @return æ‚£è€…门诊记录(过渡)集合
     */
    public List<PatMedOuthospProvisional> selectPatMedOuthospProvisionalList(PatMedOuthospProvisional patMedOuthospProvisional);
    /**
     * æ–°å¢žæ‚£è€…门诊记录(过渡)
     *
     * @param patMedOuthospProvisional æ‚£è€…门诊记录(过渡)
     * @return ç»“æžœ
     */
    public int insertPatMedOuthospProvisional(PatMedOuthospProvisional patMedOuthospProvisional);
    /**
     * ä¿®æ”¹æ‚£è€…门诊记录(过渡)
     *
     * @param patMedOuthospProvisional æ‚£è€…门诊记录(过渡)
     * @return ç»“æžœ
     */
    public int updatePatMedOuthospProvisional(PatMedOuthospProvisional patMedOuthospProvisional);
    /**
     * æ‰¹é‡åˆ é™¤æ‚£è€…门诊记录(过渡)
     *
     * @param ids éœ€è¦åˆ é™¤çš„æ‚£è€…门诊记录(过渡)主键集合
     * @return ç»“æžœ
     */
    public int deletePatMedOuthospProvisionalByIds(Long[] ids);
    /**
     * åˆ é™¤æ‚£è€…门诊记录(过渡)信息
     *
     * @param id æ‚£è€…门诊记录(过渡)主键
     * @return ç»“æžœ
     */
    public int deletePatMedOuthospProvisionalById(Long id);
}
smartor/src/main/java/com/smartor/service/impl/PatMedOuthospProvisionalServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,96 @@
package com.smartor.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.smartor.mapper.PatMedOuthospProvisionalMapper;
import com.smartor.domain.PatMedOuthospProvisional;
import com.smartor.service.IPatMedOuthospProvisionalService;
/**
 * æ‚£è€…门诊记录(过渡)Service业务层处理
 *
 * @author ls
 * @date 2025-11-04
 */
@Service
public class PatMedOuthospProvisionalServiceImpl implements IPatMedOuthospProvisionalService
{
    @Autowired
    private PatMedOuthospProvisionalMapper patMedOuthospProvisionalMapper;
    /**
     * æŸ¥è¯¢æ‚£è€…门诊记录(过渡)
     *
     * @param id æ‚£è€…门诊记录(过渡)主键
     * @return æ‚£è€…门诊记录(过渡)
     */
    @Override
    public PatMedOuthospProvisional selectPatMedOuthospProvisionalById(Long id)
    {
        return patMedOuthospProvisionalMapper.selectPatMedOuthospProvisionalById(id);
    }
    /**
     * æŸ¥è¯¢æ‚£è€…门诊记录(过渡)列表
     *
     * @param patMedOuthospProvisional æ‚£è€…门诊记录(过渡)
     * @return æ‚£è€…门诊记录(过渡)
     */
    @Override
    public List<PatMedOuthospProvisional> selectPatMedOuthospProvisionalList(PatMedOuthospProvisional patMedOuthospProvisional)
    {
        return patMedOuthospProvisionalMapper.selectPatMedOuthospProvisionalList(patMedOuthospProvisional);
    }
    /**
     * æ–°å¢žæ‚£è€…门诊记录(过渡)
     *
     * @param patMedOuthospProvisional æ‚£è€…门诊记录(过渡)
     * @return ç»“æžœ
     */
    @Override
    public int insertPatMedOuthospProvisional(PatMedOuthospProvisional patMedOuthospProvisional)
    {
        patMedOuthospProvisional.setCreateTime(DateUtils.getNowDate());
        return patMedOuthospProvisionalMapper.insertPatMedOuthospProvisional(patMedOuthospProvisional);
    }
    /**
     * ä¿®æ”¹æ‚£è€…门诊记录(过渡)
     *
     * @param patMedOuthospProvisional æ‚£è€…门诊记录(过渡)
     * @return ç»“æžœ
     */
    @Override
    public int updatePatMedOuthospProvisional(PatMedOuthospProvisional patMedOuthospProvisional)
    {
        patMedOuthospProvisional.setUpdateTime(DateUtils.getNowDate());
        return patMedOuthospProvisionalMapper.updatePatMedOuthospProvisional(patMedOuthospProvisional);
    }
    /**
     * æ‰¹é‡åˆ é™¤æ‚£è€…门诊记录(过渡)
     *
     * @param ids éœ€è¦åˆ é™¤çš„æ‚£è€…门诊记录(过渡)主键
     * @return ç»“æžœ
     */
    @Override
    public int deletePatMedOuthospProvisionalByIds(Long[] ids)
    {
        return patMedOuthospProvisionalMapper.deletePatMedOuthospProvisionalByIds(ids);
    }
    /**
     * åˆ é™¤æ‚£è€…门诊记录(过渡)信息
     *
     * @param id æ‚£è€…门诊记录(过渡)主键
     * @return ç»“æžœ
     */
    @Override
    public int deletePatMedOuthospProvisionalById(Long id)
    {
        return patMedOuthospProvisionalMapper.deletePatMedOuthospProvisionalById(id);
    }
}
smartor/src/main/java/com/smartor/service/impl/ServiceSLTDHealthcareRecordServiceImpl.java
@@ -6,6 +6,7 @@
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.utils.DtoConversionUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.http.HttpUtils;
import com.smartor.domain.*;
@@ -16,6 +17,7 @@
import com.sun.org.apache.bcel.internal.generic.NEW;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
@@ -123,7 +125,8 @@
            log.info("-----------dataList接口响应结果:{}", dataList.size());
            for (Map<String, Object> dataItem : dataList) {
                SysDept sysDept = new SysDept();
                sysDept.setOrgid("" + serviceSLTDDeptReqVO.getCampusIds().get(0));
                sysDept.setOrgid("" + getLongValue(dataItem, "orgId"));
                sysDept.setCampusid("" + getLongValue(dataItem, "campusId"));
                sysDept.setHisDeptId("" + getLongValue(dataItem, "deptId"));
                sysDept.setHisParentId(getStringValue(dataItem, "parentDeptId"));
                //通过his的父科室ID去找到科室ID,填充parentId
@@ -222,27 +225,38 @@
            sysUser.setUpdateBy("admin");
            sysUser.setCreateBy("admin");
            sysUser.setCreateBy("admin");
            sysUser.setOrgid(reqVO.getCampusId().toString());
            sysUser.setOrgid("" + getLongValue(dataItem, "orgId"));
//            sysUser.setCampusid("" + getLongValue(dataItem, "cmpusId"));
            BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder();
            sysUser.setPassword(passwordEncoder.encode(userPwd));
            sysUser2Mapper.insertUser(sysUser);
            SysUser sysUser1 = sysUser2Mapper.selectUserByUserName(sysUser.getUserName());
            if (ObjectUtils.isNotEmpty(sysUser1)) {
                sysUser.setUserId(sysUser1.getUserId());
                sysUser2Mapper.updateUser(sysUser);
            } else {
                sysUser2Mapper.insertUser(sysUser);
            }
            // å¤„理用户与部门的关系
            List personnelDepts = (List<?>) dataItem.get("personnelDepts");
            if (CollectionUtils.isEmpty(personnelDepts)) {
            List businessDepts = (List<?>) dataItem.get("businessDepts");
            if (CollectionUtils.isEmpty(businessDepts)) {
                continue;
            }
            List<List<String>> deptInfoList = new ArrayList<>();
            List<List<String>> hospInfoList = new ArrayList<>();
            for (Object personnelDept : personnelDepts) {
                if (personnelDept instanceof Map) {
                    Map<String, Object> personnelDeptMap = (Map<String, Object>) personnelDept;
            log.info("------businessDepts是否有值:{}", businessDepts.size());
            for (Object businessDept : businessDepts) {
                if (businessDept instanceof Map) {
                    Map<String, Object> businessDeptMap = (Map<String, Object>) businessDept;
                    log.info("------businessDeptMap是否有值:{}", businessDeptMap);
//                    Long hisDeptId = (Long) personnelDeptMap.get("deptId");
                    String hisDeptId = getStringValue(personnelDeptMap, "deptId");
                    String hisDeptId = getStringValue(businessDeptMap, "deptId");
                    log.info("------hisDeptId是否有值:{}, reqVO.getOrgId()的值为:{}", hisDeptId, reqVO.getCampusId());
                    //在这里,hisDeptId就是deptCode
                    SysDept sysDept = sysDeptMapper.selectDeptByCode(hisDeptId, reqVO.getCampusId().toString());
                    SysDept sysDept = sysDeptMapper.selectDeptByCode(hisDeptId, reqVO.getOrgId());
                    log.info("------hisDeptId是否有值:{}, reqVO.getCampusId()的值为:{}", hisDeptId, reqVO.getCampusId());
                    if (Objects.isNull(sysDept)) continue;
                    SysUserDept sysUserDept = new SysUserDept();
                    sysUserDept.setUserId(sysUser.getUserId());
@@ -253,7 +267,21 @@
                    sysUserDept.setOrgid(sysDept.getOrgid());
                    sysUserDept.setCreateTime(new Date());
                    sysUserDept.setDelFlag(0L);
                    sysUserDeptMapper.insertSysUserDept(sysUserDept);
                    //判断一下是不是已经存在了
                    if (ObjectUtils.isNotEmpty(sysUser1) && ObjectUtils.isNotEmpty(sysDept)) {
                        SysUserDept sud = new SysUserDept();
                        sud.setUserId(sysUser1.getUserId());
                        sud.setDeptId(sysDept.getDeptId());
                        List<SysUserDept> sysUserDepts = sysUserDeptMapper.selectSysUserDeptList(sud);
                        if (CollectionUtils.isNotEmpty(sysUserDepts)) {
                            sysUserDept.setId(sysUserDepts.get(0).getId());
                            sysUserDeptMapper.updateSysUserDept(sysUserDept);
                        }
                    } else {
                        //不存在,则新增
                        sysUserDeptMapper.insertSysUserDept(sysUserDept);
                    }
                    if (StringUtils.isNotEmpty(sysDept.getDeptType()) && sysDept.getDeptType().equals("1")) {
                        hospInfoList.add(Arrays.asList(sysDept.getDeptCode()));
                    } else if (StringUtils.isNotEmpty(sysDept.getDeptType()) && sysDept.getDeptType().equals("2")) {
@@ -273,9 +301,13 @@
            sur.setUserId(sysUser.getUserId());
            sur.setRoleId(3L);
            sur.setOrgid(sysUser.getOrgid());
            //先查询一下,是否存在
            SysUserRole sysUserRole = sysUserRoleMapper.selectUserRoleByRoleIdAndUserId(sysUser.getUserId(), 3L);
            if (ObjectUtils.isNotEmpty(sysUserRole)) continue;
            userRoleList.add(sur);
            sysUserRoleMapper.batchUserRole(userRoleList);
        }
        return true;
@@ -409,6 +441,10 @@
            if (Objects.isNull(dto)) continue;
            PatArchive patArchive = processPatientArchive(dto, orgid);
            PatMedOuthosp patMedOuthosp = buildPatMedOuthosp(dto, patArchive, orgid);
            //查询当前新增的门急诊数据,是否在过渡表中是否存在,如果存在,就不往门急诊表里新增了
            PatMedOuthospProvisional pmop = DtoConversionUtils.sourceToTarget(patMedOuthosp, PatMedOuthospProvisional.class);
            patMedOuthospMapper.insertPatMedOuthosp(patMedOuthosp);
        }
        return true;
@@ -432,7 +468,8 @@
        patMedOuthosp.setMainsuit(dto.getDiagnosisName());
        patMedOuthosp.setHpi(null);
        patMedOuthosp.setCreateTime(new Date());
        patMedOuthosp.setOrgid("" + orgid);
        patMedOuthosp.setOrgid(dto.getOrgId());
        patMedOuthosp.setCampusid(dto.getCampusId());
        return patMedOuthosp;
    }
@@ -462,9 +499,16 @@
        PatMedInhosp queryInhosp = new PatMedInhosp();
        queryInhosp.setPatno(patArchive.getPatientno());
        queryInhosp.setSerialnum(patMedInhosp.getSerialnum());
        queryInhosp.setOrgid("" + orgid);
        queryInhosp.setOrgid(dto.getOrgId());
        queryInhosp.setCampusid(dto.getCampusId());
        queryInhosp.setInhospstate(cry);
        log.info("----------------这里的入参为:{}", queryInhosp);
        List<PatMedInhosp> existingInhosps = patMedInhospService.selectPatMedInhospList(queryInhosp);
        if (cry.equals("0") && CollectionUtils.isNotEmpty(existingInhosps)) {
            //新增过的入院数据,不再处理
            return;
        }
        log.info("----------------这里的返参为:{}", existingInhosps);
        if (CollectionUtils.isNotEmpty(existingInhosps)) {
@@ -504,7 +548,8 @@
        patMedInhosp.setDrcode("" + dto.getDoctorId());
        patMedInhosp.setSchemestatus("0".equals(cry) ? 1L : 2L);
        patMedInhosp.setDelFlag("0");
        patMedInhosp.setOrgid("" + orgid);
        patMedInhosp.setOrgid(dto.getOrgId());
        patMedInhosp.setCampusid(dto.getCampusId());
        return patMedInhosp;
    }
@@ -569,13 +614,15 @@
        patArchive.setDelFlag("0");
        patArchive.setCreateTime(new Date());
        patArchive.setUpdateTime(new Date());
        patArchive.setOrgid("" + orgid);
        patArchive.setOrgid("" + dto.getOrgId());
        patArchive.setCampusid(dto.getCampusId());
        return patArchive;
    }
    private ServiceSLTDInhospResDTO convertToDTO(Map<String, Object> dataItem) {
        ServiceSLTDInhospResDTO dto = new ServiceSLTDInhospResDTO();
        dto.setOrgId(getStringValue(dataItem, "orgId"));
        dto.setCampusId(getStringValue(dataItem, "campusId"));
        dto.setHealthcareRecordId(getLongValue(dataItem, "healthcareRecordId"));
        dto.setHealthcareRecordNo(getStringValue(dataItem, "healthcareRecordNo"));
        dto.setPatientId(getLongValue(dataItem, "patientId"));
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskAnswerServiceImpl.java
@@ -134,7 +134,6 @@
        return serviceSubtaskAnswerMapper.deleteServiceSubtaskAnswerById(id);
    }
    @Override
    public Integer saveQuestionAnswer(ServiceSubTaskAnswerReq serviceSubTaskAnswerReq, Long flag) {
        Long tid = null;
smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
@@ -572,6 +572,8 @@
            serviceSubtask.setTaskid(serviceTask.getTaskid().longValue());
            serviceSubtask.setTemplatename(tempName);
            serviceSubtask.setTemplateid(tempid);
            serviceSubtask.setLibtemplateid(ObjectUtils.isEmpty(serviceTaskVO.getLibtemplateid()) ? null : Long.valueOf(serviceTaskVO.getLibtemplateid()));
            serviceSubtask.setLibtemplatename(serviceTaskVO.getLibtemplatename());
            //新增
            if (CollectionUtils.isNotEmpty(serviceTaskVO.getPatTaskRelevances())) {
                for (PatTaskRelevance patTaskRelevance : serviceTaskVO.getPatTaskRelevances()) {
@@ -647,6 +649,18 @@
                if (CollectionUtils.isNotEmpty(serviceSubtaskList1)) serviceSubtaskList.addAll(serviceSubtaskList1);
            } else {
                if (CollectionUtils.isNotEmpty(serviceSubtaskList1)) serviceSubtaskList = serviceSubtaskList1;
            }
            if (CollectionUtils.isNotEmpty(serviceSubtaskList)) {
                for (ServiceSubtask serviceSubtask : serviceSubtaskList) {
                    log.error("sfSend需要移除的subId为:{}", serviceSubtask.getId().toString());
                    serviceSubtaskMapper.deleteServiceSubtaskById(serviceSubtask.getId());
                    redisCache.removeElementFromList("cache-exist", serviceSubtask.getId().toString());
                    redisCache.removeElementFromList("cache-0", serviceSubtask.getId().toString());
                    redisCache.removeElementFromList("cache-1", serviceSubtask.getId().toString());
                    redisCache.removeElementFromList("cache-2", serviceSubtask.getId().toString());
                    redisCache.removeElementFromList("cache-3", serviceSubtask.getId().toString());
                    redisCache.removeElementFromList("cache-4", serviceSubtask.getId().toString());
                }
            }
            if (serviceTaskVO.getLibtemplateid() != null)
@@ -786,6 +800,8 @@
            if (CollectionUtils.isNotEmpty(serviceTaskVO.getPatTaskRelevances())) {
                for (PatTaskRelevance patTaskRelevance : serviceTaskVO.getPatTaskRelevances()) {
                    ServiceSubtask serviceSubtask = DtoConversionUtils.sourceToTarget(serviceTaskVO, ServiceSubtask.class);
                    serviceSubtask.setLibtemplateid(ObjectUtils.isEmpty(serviceTaskVO.getLibtemplateid()) ? null : Long.valueOf(serviceTaskVO.getLibtemplateid()));
                    serviceSubtask.setLibtemplatename(serviceTaskVO.getLibtemplatename());
                    serviceSubtask.setSendname(patTaskRelevance.getName());
                    serviceSubtask.setAge(patTaskRelevance.getAge());
                    serviceSubtask.setSfzh(patTaskRelevance.getSfzh());
@@ -2097,12 +2113,11 @@
                stringBuilder.append(patArchiveSrmVO.getName() + ",您好!主管医生已为您安排住院前检查,请当天空腹并于");
            }
            stringBuilder.append(timestamp + ",之前携带医保卡或电子医保卡身份证凭此条短信到1号楼3楼南入院准备中心入院登记窗口,办理正式住院手续,完成各项检查后再到相应病区护士站报到。");
            stringBuilder.append(timestamp + "之前携带医保卡或电子医保卡身份证凭此条短信到1号楼3楼南入院准备中心入院登记窗口,办理正式住院手续,完成各项检查后再到相应病区护士站报到。");
            stringBuilder.append("入院准备中心电话:89975977。入院办理须知:https://mp.weixin.qq.com/s/OCkotuRyQ8Ld2owFF0YErw");
            JSONObject data = MessageSend.sendMsg(stringBuilder.toString(), "2", patArchiveSrmVO.getPhone(), LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")));
            String code = data.get("code").toString();
            if (StringUtils.isNotEmpty(code) && !code.equals("00000")) {
            String data = MessageSend.sendMsg(stringBuilder.toString(), "2", patArchiveSrmVO.getPhone(), LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")));
            if (StringUtils.isNotEmpty(data) && data.contains("result=0")) {
                sendError.add(patArchiveSrmVO);
            }
        }
smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
@@ -62,6 +62,7 @@
        <result property="guid" column="guid"/>
        <result property="filterDrname" column="filter_drname"/>
        <result property="filterDrcode" column="filter_drcode"/>
        <result property="campusid" column="campusid"/>
    </resultMap>
@@ -123,6 +124,7 @@
        <result property="leaveicd10code" column="leaveicd10code"/>
        <result property="filterDrname" column="filter_drname"/>
        <result property="filterDrcode" column="filter_drcode"/>
        <result property="campusid" column="campusid"/>
    </resultMap>
    <sql id="selectPatArchiveVo">
@@ -130,6 +132,7 @@
               notrequired_flag,
               notrequiredreason,
               patientno,
               campusid,
               filter_drname,
               filter_drcode,
               patid_his,
@@ -208,6 +211,7 @@
            <if test="casePersonAge != null ">and case_person_age = #{casePersonAge}</if>
            <if test="filterDrname != null ">and filter_drname = #{filterDrname}</if>
            <if test="filterDrcode != null ">and filter_drcode = #{filterDrcode}</if>
            <if test="campusid != null ">and campusid = #{campusid}</if>
        </where>
    </select>
@@ -218,6 +222,7 @@
        a.age_unit,
        a.age_unit2,
        a.notrequired_flag,
        a.campusid,
        a.notrequiredreason,
        a.patientno,
        a.patid_his,
@@ -253,6 +258,7 @@
            <if test="name != null  and name != ''">and a.name like concat('%', #{name}, '%')</if>
            <if test="idcardno != null  and idcardno != ''">and idcardno = #{idcardno}</if>
            <if test="telcode != null  and telcode != ''">and telcode = #{telcode}</if>
            <if test="campusid != null  and campusid != ''">and campusid = #{campusid}</if>
            <if test="tagIds != null  and tagIds != ''">and c.tagid in
                <foreach collection="tagIds" item="tagId" open="(" separator="," close=")">
                    #{tagId}
@@ -326,6 +332,7 @@
            <if test="casePersonAge != null ">case_person_age,</if>
            <if test="filterDrname != null ">filter_drname,</if>
            <if test="filterDrcode != null ">filter_drcode,</if>
            <if test="campusid != null ">campusid,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="patientno != null">#{patientno},</if>
@@ -375,6 +382,7 @@
            <if test="casePersonAge != null ">#{casePersonAge},</if>
            <if test="filterDrname != null ">#{filterDrname},</if>
            <if test="filterDrcode != null ">#{filterDrcode},</if>
            <if test="campusid != null ">#{campusid},</if>
        </trim>
    </insert>
@@ -382,14 +390,14 @@
        insert into
        pat_archive(name,viptype,sex,idcardno,birthdate,place_of_residence,age,age2,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,age_unit2,notrequired_flag,notrequiredreason,care_facilities,case_path,
        degree_of_education,marital_status,income,medicare_type,care_person,case_person_age,filter_drname,filter_drcode)
        degree_of_education,marital_status,income,medicare_type,care_person,case_person_age,filter_drname,filter_drcode,campusid)
        values
        <foreach item="item" index="index" collection="list" separator=",">
            (#{item.name},#{item.viptype},#{item.sex},#{item.idcardno},#{item.birthdate},#{item.placeOfResidence},#{item.age},#{item.age2},#{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.ageUnit2},#{item.notrequiredFlag},#{item.notrequiredreason}
            ,#{item.careFacilities},#{item.casePath},#{item.degreeOfEducation},#{item.maritalStatus},#{item.income},#{item.medicareType},#{item.carePerson},#{item.casePersonAge},#{item.filterDrname},#{item.filterDrcode})
            ,#{item.careFacilities},#{item.casePath},#{item.degreeOfEducation},#{item.maritalStatus},#{item.income},#{item.medicareType},#{item.carePerson},#{item.casePersonAge},#{item.filterDrname},#{item.filterDrcode},#{item.campusid})
        </foreach>
    </insert>
@@ -438,6 +446,7 @@
            <if test="guid != null ">guid = #{guid},</if>
            <if test="filterDrname != null ">filter_drname = #{filterDrname},</if>
            <if test="filterDrcode != null ">filter_drcode = #{filterDrcode},</if>
            <if test="campusid != null ">campusid = #{campusid},</if>
        </trim>
        where id = #{id}
    </update>
@@ -498,6 +507,7 @@
        a.pattype,
        a.filter_drname,
        a.filter_drcode,
        a.campusid,
        b.tagname AS tag,
        b.tagid AS tagid
        FROM
@@ -511,6 +521,7 @@
            <if test="notrequiredFlag != null  and notrequiredFlag != ''">and a.notrequired_flag = #{notrequiredFlag}
            </if>
            <if test="pid != null  and pid != ''">and a.id = #{pid}</if>
            <if test="campusid != null  and campusid != ''">and a.campusid = #{campusid}</if>
            <if test="telcode != null  and telcode != ''">and a.telcode = #{telcode}</if>
            <if test="tagIds != null  and tagIds != ''">and b.tagid in
                <foreach collection="tagIds" item="tagId" open="(" separator="," close=")">
@@ -530,6 +541,7 @@
        a.id,
        a.age_unit,
        a.age_unit2,
        a.campusid,
        a.inhospno,
        a.notrequired_flag,
        a.notrequiredreason,
@@ -591,6 +603,7 @@
            <if test="name != null  and name != ''">and a.name like concat('%', #{name}, '%')</if>
            <if test="idcardno != null  and idcardno != ''">and a.idcardno = #{idcardno}</if>
            <if test="pid != null  and pid != ''">and a.id = #{id}</if>
            <if test="campusid != null  and campusid != ''">and a.campusid = #{campusid}</if>
            <if test="telcode != null  and telcode != ''">and a.telcode = #{telcode}</if>
            <if test="notrequiredFlag != null  and notrequiredFlag != ''">and a.notrequired_flag = #{notrequiredFlag}
            </if>
@@ -672,6 +685,7 @@
        a.age_unit,
        a.age_unit2,
        a.patid_his,
        a.campusid,
        a.sd_flag,
        a.patientno,
        a.notrequired_flag,
@@ -719,6 +733,7 @@
            AND a.del_flag != 1
            and d.orgid = #{orgid}
            <if test="pid != null  and pid != ''">and a.id = #{pid}</if>
            <if test="campusid != null  and campusid != ''">and a.campusid = #{campusid}</if>
            <if test="name != null  and name != ''">and a.name like concat('%', #{name}, '%')</if>
            <if test="idcardno != null  and idcardno != ''">and a.idcardno = #{idcardno}</if>
            <if test="telcode != null  and telcode != ''">and a.telcode = #{telcode}</if>
@@ -768,6 +783,7 @@
        a.notrequiredreason,
        a.patid_his,
        a.sd_flag,
        a.campusid,
        a.patientno,
        a.sex,
        d.deptname,
@@ -811,6 +827,7 @@
            AND a.del_flag != 1
            and d.orgid = #{orgid}
            <if test="pid != null  and pid != ''">and a.id = #{pid}</if>
            <if test="campusid != null  and campusid != ''">and a.campusid = #{campusid}</if>
            <if test="name != null  and name != ''">and a.name like concat('%', #{name}, '%')</if>
            <if test="idcardno != null  and idcardno != ''">and a.idcardno = #{idcardno}</if>
            <if test="telcode != null  and telcode != ''">and a.telcode = #{telcode}</if>
@@ -858,6 +875,7 @@
        a.age_unit,
        a.age_unit2,
        a.inhospno,
        a.campusid,
        a.notrequired_flag,
        a.notrequiredreason,
        a.patid_his,
@@ -940,6 +958,9 @@
            <if test="drcode != null">
                AND d.drcode = #{drcode}
            </if>
            <if test="campusid != null">
                AND d.campusid = #{campusid}
            </if>
            <if test="allhosp != null and allhosp == 1 ">and d.endtime is null</if>
            <if test="allhosp != null and allhosp == 4 ">and d.endtime is not null</if>
            <if test="visitno != null and visitno != ''">
@@ -1004,6 +1025,7 @@
        a.age_unit2,
        a.patid_his,
        a.sd_flag,
        a.campusid,
        a.patientno,
        a.notrequired_flag,
        a.notrequiredreason,
@@ -1049,6 +1071,7 @@
            AND a.del_flag != 1
            and d.orgid = #{orgid}
            <if test="pid != null  and pid != ''">and a.id = #{pid}</if>
            <if test="campusid != null  and campusid != ''">and a.campusid = #{campusid}</if>
            <if test="name != null  and name != ''">and a.name like concat('%', #{name}, '%')</if>
            <if test="idcardno != null  and idcardno != ''">and a.idcardno = #{idcardno}</if>
            <if test="telcode != null  and telcode != ''">and a.telcode = #{telcode}</if>
@@ -1094,6 +1117,7 @@
        select
        a.idcardno,
        a.id,
        a.campusid,
        a.age_unit,
        a.age_unit2,
        a.name,
@@ -1143,6 +1167,7 @@
            AND a.del_flag != 1
            and d.orgid = #{orgid}
            <if test="pid != null  and pid != ''">and a.id = #{pid}</if>
            <if test="campusid != null  and campusid != ''">and a.campusid = #{campusid}</if>
            <if test="name != null  and name != ''">and a.name like concat('%', #{name}, '%')</if>
            <if test="idcardno != null  and idcardno != ''">and a.idcardno = #{idcardno}</if>
            <if test="telcode != null  and telcode != ''">and a.telcode = #{telcode}</if>
smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
@@ -72,11 +72,13 @@
        <result property="fuspecialadvice" column="fuspecialadvice"/>
        <result property="managementDoctor" column="management_doctor"/>
        <result property="managementDoctorCode" column="management_doctor_code"/>
        <result property="campusid" column="campusid"/>
    </resultMap>
    <sql id="selectPatMedInhospVo">
        select inhospid,
               patname,
               campusid,
               fuflag,
               management_doctor,
               management_doctor_code,
@@ -169,6 +171,7 @@
        b.starttime,
        b.endtime,
        b.deptcode,
        b.campusid,
        b.deptname,
        b.roomno,
        b.bed_no,
@@ -251,6 +254,7 @@
            <if test="cry != null and cry == 0 ">and b.endtime is null</if>
            <if test="cry != null and cry == 1 ">and b.inhospstate=1</if>
            <if test="inhospstate != null ">and b.inhospstate = #{inhospstate}</if>
            <if test="campusid != null ">and b.campusid = #{campusid}</if>
            <if test="schemestatus != null ">and b.schemestatus = #{schemestatus}</if>
            <if test="outWayId != null ">and b.out_way_id = #{outWayId}</if>
            <if test="outWayName != null ">and b.out_way_name = #{outWayName}</if>
@@ -310,6 +314,7 @@
        b.management_doctor,
        b.management_doctor_code,
        b.out_way_id,
        b.campusid,
        b.out_way_name,
        b.deptcheck_flag,
        b.wardcheck_flag,
@@ -382,6 +387,7 @@
        b.patname,
        b.operator_id,
        b.operator,
        b.campusid,
        b.remark,
        b.out_way_id,
        b.out_way_name,
@@ -461,6 +467,7 @@
            <if test="nurseId != null ">and b.nurse_id = #{nurseId}</if>
            <if test="nurseName != null ">and b.nurse_name = #{nurseName}</if>
            <if test="patno != null ">and b.patno = #{patno}</if>
            <if test="campusid != null ">and b.campusid = #{campusid}</if>
            <if test="diagcheckFlag != null ">and b.diagcheck_flag = #{diagcheckFlag}</if>
            <if test="deptcheckFlag != null ">and b.deptcheck_flag = #{deptcheckFlag}</if>
            <if test="wardcheckFlag != null ">and b.wardcheck_flag = #{wardcheckFlag}</if>
@@ -569,6 +576,7 @@
            <if test="fuspecialadvice != null ">fuspecialadvice,</if>
            <if test="managementDoctor != null ">management_doctor,</if>
            <if test="managementDoctorCode != null ">management_doctor_code,</if>
            <if test="campusid != null ">campusid,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="serialnum != null">#{serialnum},</if>
@@ -633,6 +641,7 @@
            <if test="fuspecialadvice != null ">#{fuspecialadvice},</if>
            <if test="managementDoctor != null ">#{managementDoctor},</if>
            <if test="managementDoctorCode != null ">#{managementDoctorCode},</if>
            <if test="campusid != null ">#{campusid},</if>
        </trim>
    </insert>
@@ -651,7 +660,7 @@
        nurse_id, nurse_name, out_way_id, out_way_name, guid,
        operator, operator_id, inhospno, remark,
        fuflag, fudate, fuperiod, futypecode, futypedesc, fuadvice, fuspecialadvice, management_doctor,
        management_doctor_doctor
        management_doctor_doctor,campusid
        )
        values
        <foreach collection="list" item="item" separator=",">
@@ -673,7 +682,7 @@
            #{item.nurseId}, #{item.nurseName}, #{item.outWayId}, #{item.outWayName}, #{item.guid},
            #{item.operator}, #{item.operatorId}, #{item.inhospno}, #{item.remark},
            #{item.fuflag}, #{item.fudate}, #{item.fuperiod}, #{item.futypecode}, #{item.futypedesc}, #{item.fuadvice},
            #{item.fuspecialadvice}, #{item.managementDoctor}, #{item.managementDoctorCode}
            #{item.fuspecialadvice}, #{item.managementDoctor}, #{item.managementDoctorCode}, #{item.campusid}
            )
        </foreach>
    </insert>
@@ -743,6 +752,7 @@
            <if test="fuspecialadvice != null ">fuspecialadvice = #{fuspecialadvice},</if>
            <if test="managementDoctor != null ">management_doctor = #{managementDoctor},</if>
            <if test="managementDoctorCode != null ">management_doctor_code = #{managementDoctorCode}</if>
            <if test="campusid != null ">campusid = #{campusid}</if>
        </trim>
        where inhospid = #{inhospid}
smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml
@@ -39,11 +39,13 @@
        <result property="idcardno" column="idcardno"/>
        <result property="remark" column="remark"/>
        <result property="fudate" column="fudate"/>
        <result property="campusid" column="campusid"/>
    </resultMap>
    <sql id="selectPatMedOuthospVo">
        select id,
               outhospno,
               campusid,
               diagcheck_flag,
               patno,
               remark,
@@ -82,6 +84,7 @@
            resultMap="PatMedOuthospResult">
        select
        pmo.id,
        pmo.campusid,
        pmo.remark,
        pmo.fudate,
        pmo.outhospno,
@@ -141,6 +144,7 @@
                date_format(#{endTime},'%y%m%d')
            </if>
            <if test="patid != null ">and pmo.patid = #{patid}</if>
            <if test="campusid != null ">and pmo.campusid = #{campusid}</if>
            <if test="fuflag != null ">and pmo.fuflag = #{fuflag}</if>
            <if test="patno != null ">and pmo.patno = #{patno}</if>
            <if test="outhospno != null  and outhospno != ''">and pmo.outhospno = #{outhospno}</if>
@@ -191,6 +195,7 @@
            <if test="remark != null">remark,</if>
            <if test="fuflag != null">fuflag,</if>
            <if test="fudate != null">fudate,</if>
            <if test="campusid != null">campusid,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="serialnum != null">#{serialnum},</if>
@@ -225,6 +230,7 @@
            <if test="remark != null">#{remark},</if>
            <if test="fuflag != null">#{fuflag},</if>
            <if test="fudate != null">#{fudate},</if>
            <if test="campusid != null">#{campusid},</if>
        </trim>
    </insert>
@@ -262,6 +268,7 @@
        diagcheck_flag,
        fuflag,
        fudate,
        campusid,
        remark)
        values
        <foreach collection="list" item="item" separator=",">
@@ -297,6 +304,7 @@
            #{item.diagcheckFlag},
            #{item.fuflag},
            #{item.fudate},
            #{item.campusid},
            #{item.remark}
            )
        </foreach>
@@ -338,6 +346,7 @@
            <if test="remark != null">remark = #{remark},</if>
            <if test="fuflag != null">fuflag = #{fuflag},</if>
            <if test="fudate != null">fudate = #{fudate},</if>
            <if test="campusid != null">campusid = #{campusid},</if>
        </trim>
        where id = #{id}
    </update>
smartor/src/main/resources/mapper/smartor/PatMedOuthospProvisionalMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,456 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.smartor.mapper.PatMedOuthospProvisionalMapper">
    <resultMap type="com.smartor.domain.PatMedOuthospProvisional" id="PatMedOuthospProvisionalResult">
            <result property="id" column="id"/>
            <result property="outhospno" column="outhospno"/>
            <result property="serialnum" column="serialnum"/>
            <result property="patid" column="patid"/>
            <result property="patname" column="patname"/>
            <result property="patno" column="patno"/>
            <result property="hospitalname" column="hospitalname"/>
            <result property="hospitalcode" column="hospitalcode"/>
            <result property="icd10code" column="icd10code"/>
            <result property="diagname" column="diagname"/>
            <result property="deptid" column="deptid"/>
            <result property="deptcode" column="deptcode"/>
            <result property="deptname" column="deptname"/>
            <result property="drcode" column="drcode"/>
            <result property="drname" column="drname"/>
            <result property="admitdate" column="admitdate"/>
            <result property="orgid" column="orgid"/>
            <result property="delFlag" column="del_flag"/>
            <result property="updateBy" column="update_by"/>
            <result property="updateTime" column="update_time"/>
            <result property="createBy" column="create_by"/>
            <result property="createTime" column="create_time"/>
            <result property="isupload" column="isupload"/>
            <result property="uploadTime" column="upload_time"/>
            <result property="schemestatus" column="schemestatus"/>
            <result property="schemetime" column="schemetime"/>
            <result property="hpi" column="hpi"/>
            <result property="mainsuit" column="mainsuit"/>
            <result property="pid" column="pid"/>
            <result property="guid" column="guid"/>
            <result property="pguid" column="pguid"/>
            <result property="hospitaldistrictcode" column="hospitaldistrictcode"/>
            <result property="hospitaldistrictname" column="hospitaldistrictname"/>
            <result property="diagcheckFlag" column="diagcheck_flag"/>
            <result property="remark" column="remark"/>
            <result property="fudate" column="fudate"/>
            <result property="fuflag" column="fuflag"/>
            <result property="campusid" column="campusid"/>
    </resultMap>
    <sql id="selectPatMedOuthospProvisionalVo">
        select id, outhospno, serialnum, patid, patname, patno, hospitalname, hospitalcode, icd10code, diagname, deptid, deptcode, deptname, drcode, drname, admitdate, orgid, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time, schemestatus, schemetime, hpi, mainsuit, pid, guid, pguid, hospitaldistrictcode, hospitaldistrictname, diagcheck_flag, remark, fudate, fuflag, campusid
        from pat_med_outhosp_provisional
    </sql>
    <select id="selectPatMedOuthospProvisionalList" parameterType="com.smartor.domain.PatMedOuthospProvisional"
            resultMap="PatMedOuthospProvisionalResult">
        <include refid="selectPatMedOuthospProvisionalVo"/>
        <where>
            del_flag=0
                        <if test="outhospno != null  and outhospno != ''">
                            and outhospno = #{outhospno}
                        </if>
                        <if test="serialnum != null  and serialnum != ''">
                            and serialnum = #{serialnum}
                        </if>
                        <if test="patid != null ">
                            and patid = #{patid}
                        </if>
                        <if test="patname != null  and patname != ''">
                            and patname like concat('%', #{patname}, '%')
                        </if>
                        <if test="patno != null  and patno != ''">
                            and patno = #{patno}
                        </if>
                        <if test="hospitalname != null  and hospitalname != ''">
                            and hospitalname like concat('%', #{hospitalname}, '%')
                        </if>
                        <if test="hospitalcode != null  and hospitalcode != ''">
                            and hospitalcode = #{hospitalcode}
                        </if>
                        <if test="icd10code != null  and icd10code != ''">
                            and icd10code = #{icd10code}
                        </if>
                        <if test="diagname != null  and diagname != ''">
                            and diagname like concat('%', #{diagname}, '%')
                        </if>
                        <if test="deptid != null ">
                            and deptid = #{deptid}
                        </if>
                        <if test="deptcode != null  and deptcode != ''">
                            and deptcode = #{deptcode}
                        </if>
                        <if test="deptname != null  and deptname != ''">
                            and deptname like concat('%', #{deptname}, '%')
                        </if>
                        <if test="drcode != null  and drcode != ''">
                            and drcode = #{drcode}
                        </if>
                        <if test="drname != null  and drname != ''">
                            and drname like concat('%', #{drname}, '%')
                        </if>
                        <if test="admitdate != null ">
                            and admitdate = #{admitdate}
                        </if>
                        <if test="orgid != null  and orgid != ''">
                            and orgid = #{orgid}
                        </if>
                        <if test="isupload != null ">
                            and isupload = #{isupload}
                        </if>
                        <if test="uploadTime != null ">
                            and upload_time = #{uploadTime}
                        </if>
                        <if test="schemestatus != null ">
                            and schemestatus = #{schemestatus}
                        </if>
                        <if test="schemetime != null ">
                            and schemetime = #{schemetime}
                        </if>
                        <if test="hpi != null  and hpi != ''">
                            and hpi = #{hpi}
                        </if>
                        <if test="mainsuit != null  and mainsuit != ''">
                            and mainsuit = #{mainsuit}
                        </if>
                        <if test="pid != null ">
                            and pid = #{pid}
                        </if>
                        <if test="guid != null  and guid != ''">
                            and guid = #{guid}
                        </if>
                        <if test="pguid != null  and pguid != ''">
                            and pguid = #{pguid}
                        </if>
                        <if test="hospitaldistrictcode != null  and hospitaldistrictcode != ''">
                            and hospitaldistrictcode = #{hospitaldistrictcode}
                        </if>
                        <if test="hospitaldistrictname != null  and hospitaldistrictname != ''">
                            and hospitaldistrictname like concat('%', #{hospitaldistrictname}, '%')
                        </if>
                        <if test="diagcheckFlag != null  and diagcheckFlag != ''">
                            and diagcheck_flag = #{diagcheckFlag}
                        </if>
                        <if test="fudate != null ">
                            and fudate = #{fudate}
                        </if>
                        <if test="fuflag != null  and fuflag != ''">
                            and fuflag = #{fuflag}
                        </if>
                        <if test="campusid != null  and campusid != ''">
                            and campusid = #{campusid}
                        </if>
        </where>
    </select>
    <select id="selectPatMedOuthospProvisionalById" parameterType="Long"
            resultMap="PatMedOuthospProvisionalResult">
            <include refid="selectPatMedOuthospProvisionalVo"/>
            where id = #{id}
    </select>
    <insert id="insertPatMedOuthospProvisional" parameterType="com.smartor.domain.PatMedOuthospProvisional"            useGeneratedKeys="true" keyProperty="id">
        insert into pat_med_outhosp_provisional
        <trim prefix="(" suffix=")" suffixOverrides=",">
                    <if test="outhospno != null">outhospno,
                    </if>
                    <if test="serialnum != null">serialnum,
                    </if>
                    <if test="patid != null">patid,
                    </if>
                    <if test="patname != null">patname,
                    </if>
                    <if test="patno != null">patno,
                    </if>
                    <if test="hospitalname != null">hospitalname,
                    </if>
                    <if test="hospitalcode != null">hospitalcode,
                    </if>
                    <if test="icd10code != null">icd10code,
                    </if>
                    <if test="diagname != null">diagname,
                    </if>
                    <if test="deptid != null">deptid,
                    </if>
                    <if test="deptcode != null">deptcode,
                    </if>
                    <if test="deptname != null">deptname,
                    </if>
                    <if test="drcode != null">drcode,
                    </if>
                    <if test="drname != null">drname,
                    </if>
                    <if test="admitdate != null">admitdate,
                    </if>
                    <if test="orgid != null">orgid,
                    </if>
                    <if test="delFlag != null">del_flag,
                    </if>
                    <if test="updateBy != null">update_by,
                    </if>
                    <if test="updateTime != null">update_time,
                    </if>
                    <if test="createBy != null">create_by,
                    </if>
                    <if test="createTime != null">create_time,
                    </if>
                    <if test="isupload != null">isupload,
                    </if>
                    <if test="uploadTime != null">upload_time,
                    </if>
                    <if test="schemestatus != null">schemestatus,
                    </if>
                    <if test="schemetime != null">schemetime,
                    </if>
                    <if test="hpi != null">hpi,
                    </if>
                    <if test="mainsuit != null">mainsuit,
                    </if>
                    <if test="pid != null">pid,
                    </if>
                    <if test="guid != null">guid,
                    </if>
                    <if test="pguid != null">pguid,
                    </if>
                    <if test="hospitaldistrictcode != null">hospitaldistrictcode,
                    </if>
                    <if test="hospitaldistrictname != null">hospitaldistrictname,
                    </if>
                    <if test="diagcheckFlag != null">diagcheck_flag,
                    </if>
                    <if test="remark != null">remark,
                    </if>
                    <if test="fudate != null">fudate,
                    </if>
                    <if test="fuflag != null">fuflag,
                    </if>
                    <if test="campusid != null">campusid,
                    </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                    <if test="outhospno != null">#{outhospno},
                    </if>
                    <if test="serialnum != null">#{serialnum},
                    </if>
                    <if test="patid != null">#{patid},
                    </if>
                    <if test="patname != null">#{patname},
                    </if>
                    <if test="patno != null">#{patno},
                    </if>
                    <if test="hospitalname != null">#{hospitalname},
                    </if>
                    <if test="hospitalcode != null">#{hospitalcode},
                    </if>
                    <if test="icd10code != null">#{icd10code},
                    </if>
                    <if test="diagname != null">#{diagname},
                    </if>
                    <if test="deptid != null">#{deptid},
                    </if>
                    <if test="deptcode != null">#{deptcode},
                    </if>
                    <if test="deptname != null">#{deptname},
                    </if>
                    <if test="drcode != null">#{drcode},
                    </if>
                    <if test="drname != null">#{drname},
                    </if>
                    <if test="admitdate != null">#{admitdate},
                    </if>
                    <if test="orgid != null">#{orgid},
                    </if>
                    <if test="delFlag != null">#{delFlag},
                    </if>
                    <if test="updateBy != null">#{updateBy},
                    </if>
                    <if test="updateTime != null">#{updateTime},
                    </if>
                    <if test="createBy != null">#{createBy},
                    </if>
                    <if test="createTime != null">#{createTime},
                    </if>
                    <if test="isupload != null">#{isupload},
                    </if>
                    <if test="uploadTime != null">#{uploadTime},
                    </if>
                    <if test="schemestatus != null">#{schemestatus},
                    </if>
                    <if test="schemetime != null">#{schemetime},
                    </if>
                    <if test="hpi != null">#{hpi},
                    </if>
                    <if test="mainsuit != null">#{mainsuit},
                    </if>
                    <if test="pid != null">#{pid},
                    </if>
                    <if test="guid != null">#{guid},
                    </if>
                    <if test="pguid != null">#{pguid},
                    </if>
                    <if test="hospitaldistrictcode != null">#{hospitaldistrictcode},
                    </if>
                    <if test="hospitaldistrictname != null">#{hospitaldistrictname},
                    </if>
                    <if test="diagcheckFlag != null">#{diagcheckFlag},
                    </if>
                    <if test="remark != null">#{remark},
                    </if>
                    <if test="fudate != null">#{fudate},
                    </if>
                    <if test="fuflag != null">#{fuflag},
                    </if>
                    <if test="campusid != null">#{campusid},
                    </if>
        </trim>
    </insert>
    <update id="updatePatMedOuthospProvisional" parameterType="com.smartor.domain.PatMedOuthospProvisional">
        update pat_med_outhosp_provisional
        <trim prefix="SET" suffixOverrides=",">
                    <if test="outhospno != null">outhospno =
                        #{outhospno},
                    </if>
                    <if test="serialnum != null">serialnum =
                        #{serialnum},
                    </if>
                    <if test="patid != null">patid =
                        #{patid},
                    </if>
                    <if test="patname != null">patname =
                        #{patname},
                    </if>
                    <if test="patno != null">patno =
                        #{patno},
                    </if>
                    <if test="hospitalname != null">hospitalname =
                        #{hospitalname},
                    </if>
                    <if test="hospitalcode != null">hospitalcode =
                        #{hospitalcode},
                    </if>
                    <if test="icd10code != null">icd10code =
                        #{icd10code},
                    </if>
                    <if test="diagname != null">diagname =
                        #{diagname},
                    </if>
                    <if test="deptid != null">deptid =
                        #{deptid},
                    </if>
                    <if test="deptcode != null">deptcode =
                        #{deptcode},
                    </if>
                    <if test="deptname != null">deptname =
                        #{deptname},
                    </if>
                    <if test="drcode != null">drcode =
                        #{drcode},
                    </if>
                    <if test="drname != null">drname =
                        #{drname},
                    </if>
                    <if test="admitdate != null">admitdate =
                        #{admitdate},
                    </if>
                    <if test="orgid != null">orgid =
                        #{orgid},
                    </if>
                    <if test="delFlag != null">del_flag =
                        #{delFlag},
                    </if>
                    <if test="updateBy != null">update_by =
                        #{updateBy},
                    </if>
                    <if test="updateTime != null">update_time =
                        #{updateTime},
                    </if>
                    <if test="createBy != null">create_by =
                        #{createBy},
                    </if>
                    <if test="createTime != null">create_time =
                        #{createTime},
                    </if>
                    <if test="isupload != null">isupload =
                        #{isupload},
                    </if>
                    <if test="uploadTime != null">upload_time =
                        #{uploadTime},
                    </if>
                    <if test="schemestatus != null">schemestatus =
                        #{schemestatus},
                    </if>
                    <if test="schemetime != null">schemetime =
                        #{schemetime},
                    </if>
                    <if test="hpi != null">hpi =
                        #{hpi},
                    </if>
                    <if test="mainsuit != null">mainsuit =
                        #{mainsuit},
                    </if>
                    <if test="pid != null">pid =
                        #{pid},
                    </if>
                    <if test="guid != null">guid =
                        #{guid},
                    </if>
                    <if test="pguid != null">pguid =
                        #{pguid},
                    </if>
                    <if test="hospitaldistrictcode != null">hospitaldistrictcode =
                        #{hospitaldistrictcode},
                    </if>
                    <if test="hospitaldistrictname != null">hospitaldistrictname =
                        #{hospitaldistrictname},
                    </if>
                    <if test="diagcheckFlag != null">diagcheck_flag =
                        #{diagcheckFlag},
                    </if>
                    <if test="remark != null">remark =
                        #{remark},
                    </if>
                    <if test="fudate != null">fudate =
                        #{fudate},
                    </if>
                    <if test="fuflag != null">fuflag =
                        #{fuflag},
                    </if>
                    <if test="campusid != null">campusid =
                        #{campusid},
                    </if>
        </trim>
        where id = #{id}
    </update>
                <update id="deletePatMedOuthospProvisionalById" parameterType="Long">
        update pat_med_outhosp_provisional
        <trim prefix="SET" suffixOverrides=",">
            del_flag =1
        </trim>
        where  id = #{id}
    </update>
                            <update id="deletePatMedOuthospProvisionalByIds" parameterType="String">
        update  pat_med_outhosp_provisional
        <trim prefix="SET" suffixOverrides=",">
            del_flag =1
        </trim>
        where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </update>
</mapper>
smartor/src/main/resources/mapper/smartor/SysDeptMapper.xml
@@ -27,6 +27,7 @@
        <result property="guid" column="guid"/>
        <result property="orgid" column="orgid"/>
        <result property="type" column="type"/>
        <result property="campusid" column="campusid"/>
    </resultMap>
    <sql id="selectDeptVo">
@@ -34,6 +35,7 @@
               d.dept_code,
               d.type,
               d.orgid,
               d.campusid,
               d.parent_id,
               d.ancestors,
               d.dept_name,
@@ -82,6 +84,9 @@
        <if test="hisParentId != null and hisParentId != ''">
            AND his_parent_id = #{hisParentId}
        </if>
        <if test="campusid != null and campusid != ''">
            AND campusid = #{campusid}
        </if>
        order by d.parent_id, d.order_num
    </select>
@@ -100,6 +105,7 @@
    <select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult">
        select d.dept_id,
               d.parent_id,
               d.campusid,
               d.dept_code,
               d.type,
               d.dept_type,
@@ -122,6 +128,7 @@
        select d.dept_id,
        d.parent_id,
        d.type,
        d.campusid,
        d.dept_code,
        d.dept_type,
        d.ancestors,
@@ -197,6 +204,7 @@
        type,
        guid,
        orgid,
        campusid,
        create_time
        ) values
        <foreach collection="list" item="item" separator=",">
@@ -218,6 +226,7 @@
            #{item.type},
            #{item.guid},
            #{item.orgid},
            #{item.campusid},
            now()
            )
        </foreach>
@@ -243,6 +252,7 @@
        <if test="type != null and type != ''">type,</if>
        <if test="guid != null and guid != ''">guid,</if>
        <if test="orgid != null and orgid != ''">orgid,</if>
        <if test="campusid != null and campusid != ''">campusid,</if>
        create_time
        )values(
        <if test="deptId != null and deptId != 0">#{deptId},</if>
@@ -262,6 +272,7 @@
        <if test="type != null and type != ''">#{type},</if>
        <if test="guid != null and guid != ''">#{guid},</if>
        <if test="orgid != null and orgid != ''">#{orgid},</if>
        <if test="campusid != null and campusid != ''">#{campusid},</if>
        sysdate()
        )
    </insert>
@@ -284,6 +295,7 @@
            <if test="hisParentId != null and hisParentId != ''">his_parent_id = #{hisParentId},</if>
            <if test="hisDeptId != null and hisDeptId != ''">his_dept_id = #{hisDeptId},</if>
            <if test="type != null and type != ''">type = #{type},</if>
            <if test="campusid != null and campusid != ''">campusid = #{campusid},</if>
            update_time = sysdate()
        </set>
        where dept_id = #{deptId}
smartor/src/main/resources/mapper/smartor/SysUserDeptMapper.xml
@@ -15,6 +15,7 @@
        <result property="deptType" column="dept_type"/>
        <result property="createTime" column="create_time"/>
        <result property="updateTime" column="update_time"/>
        <result property="campusid" column="campusid"/>
    </resultMap>
    <resultMap id="deptResult" type="com.ruoyi.common.core.domain.entity.SysDept">
@@ -25,6 +26,7 @@
        <result property="orderNum" column="order_num"/>
        <result property="leader" column="leader"/>
        <result property="status" column="dept_status"/>
        <result property="campusid" column="campusid"/>
    </resultMap>
    <sql id="selectSysUserDeptVo">
@@ -32,6 +34,7 @@
               user_id,
               dept_id,
               del_flag,
               campusid,
               orgid,
               create_time,
               update_time,
@@ -67,6 +70,9 @@
            </if>
            <if test="deptCode != null ">
                and dept_code = #{deptCode}
            </if>
            <if test="campusid != null ">
                and campusid = #{campusid}
            </if>
        </where>
    </select>
@@ -109,6 +115,9 @@
            <if test="userCode != null ">
                user_code,
            </if>
            <if test="campusid != null ">
                campusid,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="userId != null">#{userId},
@@ -138,6 +147,9 @@
            </if>
            <if test="userCode != null ">
                #{userCode},
            </if>
            <if test="campusid != null ">
                #{campusid},
            </if>
        </trim>
    </insert>
@@ -172,6 +184,9 @@
            <if test="orgid != null ">
                orgid = #{orgid},
            </if>
            <if test="campusid != null ">
                campusid = #{campusid},
            </if>
        </trim>
        where id = #{id}
    </update>
@@ -191,6 +206,7 @@
               d.ancestors,
               d.dept_name,
               d.order_num,
               d.campusid,
               d.leader,
               d.orgid,
               d.status as dept_status
smartor/src/main/resources/mapper/smartor/SysUserMapper.xml
@@ -35,6 +35,7 @@
        <result property="userType" column="user_type"/>
        <result property="searchscope" column="searchscope"/>
        <result property="guid" column="guid"/>
        <result property="campusid" column="campusid"/>
        <association property="dept" column="dept_id" javaType="com.ruoyi.common.core.domain.entity.SysDept"
                     resultMap="deptResult"/>
        <collection property="roles" javaType="java.util.List" resultMap="RoleResult"/>
@@ -48,6 +49,7 @@
        <result property="orderNum" column="order_num"/>
        <result property="leader" column="leader"/>
        <result property="status" column="dept_status"/>
        <result property="campusid" column="campusid"/>
    </resultMap>
    <resultMap id="RoleResult" type="com.ruoyi.common.core.domain.entity.SysRole">
@@ -66,6 +68,7 @@
               u.id_card,
               u.hosp_info,
               u.dept_info,
               u.campusid,
               u.searchscope,
               u.user_name,
               u.user_type,
@@ -110,6 +113,7 @@
    <select id="selectUserList" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserResult">
        select u.user_code,u.user_id,u.title,u.his_user_id,u.hosp_info,u.dept_info, u.searchscope, u.dept_id,
        u.user_type,
        u.campusid,
        u.nick_name, u.user_name,
        u.email,u.id_card,
        u.avatar,
@@ -127,7 +131,7 @@
        <if test="userName != null and userName != ''">
            AND u.user_name = #{userName}
        </if>
          <if test="orgid != null and orgid != ''">
        <if test="orgid != null and orgid != ''">
            AND u.orgid = #{orgid}
        </if>
        <if test="nickName != null and nickName != ''">
@@ -144,6 +148,9 @@
        </if>
        <if test="jobPhone != null and jobPhone != ''">
            AND u.job_phone = #{jobPhone}
        </if>
        <if test="campusid != null and campusid != ''">
            AND u.campusid = #{campusid}
        </if>
        <if test="birthday != null and birthday != ''">
            AND u.birthday = #{birthday}
@@ -177,6 +184,7 @@
        u.birthday,
        u.job_phone,
        u.orgid,
        u.campusid,
        u.phonenumber, u.status,u.id_card,
        u.create_time
        from sys_user u
@@ -196,6 +204,9 @@
        <if test="hisUserId != null and hisUserId != ''">
            AND u.his_user_id = #{hisUserId}
        </if>
        <if test="campusid != null and campusid != ''">
            AND u.campusid = #{campusid}
        </if>
        <!-- æ•°æ®èŒƒå›´è¿‡æ»¤ -->
        ${params.dataScope}
    </select>
@@ -206,6 +217,7 @@
        u.nick_name,
        u.user_code,
        u.email,
        u.campusid,
        u.his_user_id,
        u.title,
        u.orgid,
@@ -290,6 +302,7 @@
        <if test="deptCode != null and deptCode != ''">dept_code,</if>
        <if test="deptName != null and deptName != ''">dept_name,</if>
        <if test="userCode != null and userCode != ''">user_code,</if>
        <if test="campusid != null and campusid != ''">campusid,</if>
        create_time
        )values(
        <if test="userId != null and userId != ''">#{userId},</if>
@@ -318,6 +331,7 @@
        <if test="deptCode != null and deptCode != ''">#{deptCode},</if>
        <if test="deptName != null and deptName != ''">#{deptName},</if>
        <if test="userCode != null and userCode != ''">#{userCode},</if>
        <if test="campusid != null and campusid != ''">#{campusid},</if>
        sysdate()
        )
    </insert>
@@ -327,7 +341,7 @@
        insert into sys_user(
        user_id, dept_id, user_name, nick_name, email, avatar, phonenumber, sex, password, status, create_by, remark,
        user_type, dept_info, hosp_info, searchscope, id_card, title, job_phone, birthday, his_user_id, guid,
        orgid,user_code,
        orgid,user_code,campusid,
        create_time
        ) values
        <foreach collection="list" item="item" separator=",">
@@ -356,6 +370,7 @@
            #{item.guid},
            #{item.orgid},
            #{item.userCode},
            #{item.campusid},
            now()
            )
        </foreach>
@@ -386,6 +401,7 @@
            <if test="birthday != null ">birthday=#{birthday},</if>
            <if test="orgid != null ">orgid=#{orgid},</if>
            <if test="userCode != null ">user_code=#{userCode},</if>
            <if test="campusid != null ">campusid=#{campusid},</if>
            <if test="title != null and title != ''">
                title = #{title},
            </if>
smartor/src/main/resources/mapper/smartor/SysUserRole2Mapper.xml
@@ -4,7 +4,7 @@
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.smartor.mapper.SysUserRole2Mapper">
    <resultMap type="SysUserRole" id="SysUserRoleResult">
    <resultMap type="com.ruoyi.common.core.domain.entity.SysUserRole" id="SysUserRoleResult">
        <result property="userId" column="user_id"/>
        <result property="roleId" column="role_id"/>
        <result property="guid" column="guid"/>
@@ -23,6 +23,16 @@
        where role_id = #{roleId}
    </select>
    <select id="selectUserRoleByRoleIdAndUserId" resultMap="SysUserRoleResult">
        select user_id,role_id,guid,orgid
        from sys_user_role
        <where>
            <if test="roleId != null ">and role_id = #{roleId}</if>
            <if test="userId != null ">and user_id = #{userId}</if>
        </where>
    </select>
    <delete id="deleteUserRole" parameterType="Long">
        delete from sys_user_role where user_id in
        <foreach collection="array" item="userId" open="(" separator="," close=")">