.idea/jarRepositories.xml
@@ -9,6 +9,11 @@ <remote-repository> <option name="id" value="central" /> <option name="name" value="Central Repository" /> <option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" /> </remote-repository> <remote-repository> <option name="id" value="central" /> <option name="name" value="Central Repository" /> <option name="url" value="https://repo.maven.apache.org/maven2" /> </remote-repository> <remote-repository> @@ -32,14 +37,19 @@ <option name="url" value="https://repo1.maven.org/maven2" /> </remote-repository> <remote-repository> <option name="id" value="aliyun" /> <option name="name" value="aliyun" /> <option name="url" value="https://maven.aliyun.com/repository/public" /> </remote-repository> <remote-repository> <option name="id" value="snapshots" /> <option name="name" value="Snapshot Repositories" /> <option name="url" value="http://211.90.241.109:7008/repository/maven-snapshots/" /> </remote-repository> <remote-repository> <option name="id" value="aliyun" /> <option name="name" value="aliyun" /> <option name="url" value="https://maven.aliyun.com/repository/public" /> <option name="id" value="central" /> <option name="name" value="central" /> <option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" /> </remote-repository> <remote-repository> <option name="id" value="central" /> ruoyi-admin/pom.xml
@@ -180,6 +180,12 @@ <artifactId>postgresql</artifactId> <version>42.6.0</version> <!-- è¯·æ ¹æ®éè¦éæ©ææ°çæ¬ --> </dependency> <!--oracle--> <dependency> <groupId>com.oracle.database.jdbc</groupId> <artifactId>ojdbc8</artifactId> <scope>runtime</scope> </dependency> </dependencies> <build> <plugins> ruoyi-admin/src/main/resources/application.yml
@@ -114,8 +114,8 @@ mapperLocations: classpath*:mapper/**/*Mapper.xml # å è½½å ¨å±çé ç½®æä»¶ configLocation: classpath:mybatis/mybatis-config.xml configuration: log-impl: org.apache.ibatis.logging.stdout.StdOutImpl #configuration: # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # æ²³åSSOé ç½®ï¼ä¸½æ°´ç¨ä¸å°ï¼ ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUserDept.java
@@ -32,6 +32,13 @@ private Long userId; /** * ç¨æ·ç¼å· */ @ApiModelProperty("ç¨æ·ç¼å·") @Excel(name = "ç¨æ·ç¼å·") private String userCode; /** * é¨é¨ç±»å */ @ApiModelProperty("é¨é¨ç±»å") ruoyi-common/src/main/java/com/ruoyi/common/utils/sms/smsUtils.java
@@ -36,7 +36,8 @@ "\"timestamp\": " + timestamp + "," + "\"sign\": \"" + sign + "\"" + "}"; return HttpUtil.postJsonRequest(url, jsonMsg); String sendMsg=HttpUtil.postJsonRequest(url, jsonMsg); return sendMsg; } } ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/CollectHISController.java
@@ -31,9 +31,10 @@ @PostMapping("/collect") @ApiOperation("忥ç 人ç¸å ³æ°æ®") public AjaxResult hnDataGather(@RequestBody HnDataGatherVO hnDataGatherVO) { log.info("å¼å§æå¤©åæ¥ç¨æ·æ°æ®ï¼æ¶é´èå´: {} å° {}", hnDataGatherVO.getStartTime(), hnDataGatherVO.getEndTime()); Boolean aBoolean = ichService.hnDataGather(hnDataGatherVO); return AjaxResult.success(aBoolean); //Boolean aBoolean = ichService.hnDataGather(hnDataGatherVO); Integer count= ichService.sync(); return AjaxResult.success(count); } /** ruoyi-quartz/src/main/java/com/ruoyi/quartz/mapper/CollectHISMapper.java
@@ -12,6 +12,8 @@ import com.smartor.domain.PatMedOuthosp; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Update; import java.util.List; import java.util.Map; @@ -43,7 +45,7 @@ * @param sysUser * @return */ public SysUserDept yhyksxx(SysUser sysUser); public List<SysUserDept> yhyksxx(SysUser sysUser); /** * åºå ¥é¢ä¿¡æ¯ @@ -94,4 +96,28 @@ * @return é¨é¨ä¿¡æ¯éå */ public List<SysDept> selectDeptList(SysDept dept); /** * æ¥è¯¢è¿åstrign sql * @param sql * @return */ @Select({"${sql}"}) String getSqlString(@Param("sql") String sql); /** * æ¥è¯¢sql * @param sql * @return */ @Select({"${sql}"}) List<Map<String, Object>> getList(@Param("sql") String sql); /** * æ¥è¯¢sql * @param sql */ @Update({"${sql}"}) Integer updateSql(@Param("sql") String sql); } ruoyi-quartz/src/main/java/com/ruoyi/quartz/mapper/UtilsMapper.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,28 @@ package com.ruoyi.quartz.mapper; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Update; import java.util.List; import java.util.Map; @Mapper public interface UtilsMapper { /** * æ¥è¯¢sql * @param sql * @return */ @Select({"${sql}"}) List<Map<String, Object>> getList(@Param("sql") String sql); /** * æ´æ°sql * @param sql */ @Update({"${sql}"}) Integer updateSql(@Param("sql") String sql); } ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/ICollectHISService.java
@@ -7,6 +7,15 @@ import java.util.List; public interface ICollectHISService { /** * æ°æ®éé * * @param * @return */ public Integer sync(); /** * æ¥è¯¢æ£è æ¡£æ¡å表 * @@ -24,7 +33,7 @@ public Integer selectPatMedInhospList(PatMedInhosp patMedInhosp); /** * æ²³åæ°æ®éé * æ°æ®éé * * @param patMedInhosp * @return ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/CollectHISServiceImpl.java
@@ -6,6 +6,7 @@ import com.ruoyi.common.core.domain.entity.SysUserRole; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.quartz.mapper.CollectHISMapper; import com.ruoyi.quartz.mapper.UtilsMapper; import com.ruoyi.quartz.service.ICollectHISService; import com.smartor.domain.*; import com.smartor.mapper.*; @@ -20,6 +21,7 @@ import java.time.LocalDateTime; import java.time.ZoneId; import java.util.*; import java.util.stream.Collectors; @Slf4j @Service @@ -57,6 +59,9 @@ @Autowired private ShardingMapper shardingMapper; @Autowired private UtilsMapper utilsMapper; private static final long SHARDING_THRESHOLD = 5_000_000L; private static final String PAT_ARCHIVE_TABLE = "pat_archive"; private static final String PAT_MED_INHOSP_TABLE = "pat_med_inhosp"; @@ -79,6 +84,189 @@ // return 0; // è¿å0表示任å¡å·²æäº¤å°åå°æ§è¡ // } /** * åæ¥ä»»å¡ * @param * @return */ @Override public Integer sync() { Integer count = 0; List<Map<String, Object>> syncList = utilsMapper.getList("SELECT id,syncName,DATE_FORMAT(ADDDATE(startTime, INTERVAL -1 MINUTE), '%Y-%m-%d %H:%i:%s') startTime FROM sys_sync_time where state=0"); if (syncList.size() > 0) { String endTime = chMapper.getSqlString("select sysdate from healthy_inhosp where rownum=1"); //忥æ£è åºæ¬ä¿¡æ¯ // List<Map<String, Object>> syncTemp = syncList.stream().filter(row -> row.get("syncName").equals("pat_archive")).collect(Collectors.toList()); // if (syncTemp.size() > 0) { // count+=syncArchive(syncTemp.get(0).get("startTime") + "", endTime); // utilsMapper.updateSql("update sys_sync_time set startTime='"+endTime+"' where syncName='pat_archive' "); // } //忥ä½é¢ç äººä¿¡æ¯ List<Map<String, Object>> syncTemp = syncList.stream().filter(row -> row.get("syncName").equals("pat_med_inhosp")).collect(Collectors.toList()); if (syncTemp.size() > 0) { count+=syncMedInhosp(syncTemp.get(0).get("startTime") + "", endTime); utilsMapper.updateSql("update sys_sync_time set startTime='"+endTime+"' where syncName='pat_med_inhosp' "); } //忥é¨è¯ä¿¡æ¯ syncTemp = syncList.stream().filter(row -> row.get("syncName").equals("pat_med_outhosp")).collect(Collectors.toList()); if (syncTemp.size() > 0) { count+=syncOuthosp(syncTemp.get(0).get("startTime") + "", endTime); utilsMapper.updateSql("update sys_sync_time set startTime='"+endTime+"' where syncName='pat_med_outhosp' "); } } else { log.info("忥任塿¶é´sys_sync_timeè¡¨ä¸æ²¡æéè¦åæ¥çä»»å¡"); } return count; } /** * 忥æ£è åºæ¬ä¿¡æ¯ * @param * @return */ private Integer syncArchive(String startTime,String endTime) { Integer count = 0; PatArchive pa = new PatArchive(); pa.setLastStartTime(startTime); pa.setLastEndTime(endTime); List<PatArchive> patArchives = chMapper.selectPatArchiveList(pa); log.info("å¯åæ£è åºæ¬ä¿¡æ¯æ°é" + patArchives.size()); for (PatArchive pm : patArchives) { try { PatArchive pa1 = new PatArchive(); pa1.setPatientno(pm.getPatientno()); List<PatArchive> patArchives1 = patArchiveMapper.selectPatArchiveList(pa1); if (CollectionUtils.isNotEmpty(patArchives1)) { pm.setId(patArchives1.get(0).getId()); pm.setUpdateTime(new Date()); count += patArchiveMapper.updatePatArchive(pm); } else { pm.setCreateTime(new Date()); count += patArchiveMapper.insertPatArchiveSingle(pm); } }catch (Exception ex){ log.info("å¯åæ£è åºæ¬ä¿¡æ¯:"+ex.getMessage()); } } return count; } /** * 忥åºå ¥é¢ä¿¡æ¯ * @param * @return */ private Integer syncMedInhosp(String startTime,String endTime) { Integer count = 0; PatMedInhosp patMedInhosp = new PatMedInhosp(); patMedInhosp.setLastStartTime(startTime); patMedInhosp.setLastEndTime(endTime); List<PatMedInhosp> patMedInhospList = chMapper.selectPatMedInhospList(patMedInhosp); log.info("å¯åæ¥åºå ¥é¢æ°é" + patMedInhospList.size()); for (PatMedInhosp pm : patMedInhospList) { try { //æ£è åºæ¬ä¿¡æ¯ PatArchive patArchive = new PatArchive(); patArchive.setPatientno(pm.getPatno()); List<PatArchive> patArchives = chMapper.selectPatArchiveList(patArchive); if (patArchives.size() > 0) { PatArchive pa1 = new PatArchive(); pa1.setPatientno(pm.getPatno()); List<PatArchive> patArchives1 = patArchiveMapper.selectPatArchiveList(pa1); if (CollectionUtils.isNotEmpty(patArchives1)) { patArchives.get(0).setId(patArchives1.get(0).getId()); patArchives.get(0).setUpdateTime(new Date()); count += patArchiveMapper.updatePatArchive(patArchives.get(0)); } else { patArchives.get(0).setCreateTime(new Date()); count += patArchiveMapper.insertPatArchiveSingle(patArchives.get(0)); } } }catch (Exception ex) { log.info("忣è åºæ¬ä¿¡æ¯:" + ex.getMessage()); } try { //忥åºå ¥é¢ PatMedInhosp pmi = new PatMedInhosp(); pmi.setSerialnum(pm.getSerialnum()); List<PatMedInhosp> patMedInhospList1 = patMedInhospMapper.selectPatMedInhospListBySerialnum(pmi); if (patMedInhospList1.size() == 0) { pm.setCreateTime(new Date()); count += patMedInhospMapper.insertPatMedInhosp(pm); } else { pm.setInhospid(patMedInhospList1.get(0).getInhospid()); pm.setUpdateTime(new Date()); count += patMedInhospMapper.updatePatMedInhosp(pm); } } catch (Exception ex) { log.info("忥åºå ¥é¢:" + ex.getMessage()); } } return count; } /** * 忥é¨è¯ä¿¡æ¯ * @param * @return */ private Integer syncOuthosp(String startTime,String endTime) { Integer count = 0; PatMedOuthosp patMedOuthosp = new PatMedOuthosp(); patMedOuthosp.setLastStartTime(startTime); patMedOuthosp.setLastEndTime(endTime); List<PatMedOuthosp> patMedOuthosps = chMapper.selectPatMedOuthospList(patMedOuthosp); log.info("忥é¨è¯ä¿¡æ¯æ°é" + patMedOuthosps.size()); for (PatMedOuthosp patMedOuthosp1 : patMedOuthosps) { try { //æ£è åºæ¬ä¿¡æ¯ PatArchive patArchive = new PatArchive(); patArchive.setPatientno(patMedOuthosp1.getPatno()); List<PatArchive> patArchives = chMapper.selectPatArchiveList(patArchive); if (patArchives.size() > 0) { PatArchive pa1 = new PatArchive(); pa1.setPatientno(patMedOuthosp1.getPatno()); List<PatArchive> patArchives1 = patArchiveMapper.selectPatArchiveList(pa1); if (CollectionUtils.isNotEmpty(patArchives1)) { patArchives.get(0).setId(patArchives1.get(0).getId()); patArchives.get(0).setUpdateTime(new Date()); count += patArchiveMapper.updatePatArchive(patArchives.get(0)); } else { patArchives.get(0).setCreateTime(new Date()); count += patArchiveMapper.insertPatArchiveSingle(patArchives.get(0)); } } }catch (Exception ex) { log.info("忣è åºæ¬ä¿¡æ¯:" + ex.getMessage()); } try { PatMedOuthosp patMedOuthospTemp = new PatMedOuthosp(); patMedOuthospTemp.setSerialnum(patMedOuthosp1.getSerialnum()); List<PatMedOuthosp> patMedOuthospsTemp = chMapper.selectPatMedOuthospList(patMedOuthosp); if (patMedOuthospsTemp.size() > 0) { patMedOuthosp1.setUpdateTime(new Date()); patMedOuthosp1.setId(patMedOuthospsTemp.get(0).getId()); count += patMedOuthospMapper.updatePatMedOuthosp(patMedOuthosp1); } else { patMedOuthosp1.setCreateTime(new Date()); count += patMedOuthospMapper.insertPatMedOuthosp(patMedOuthosp1); } } catch (Exception ex) { log.info("忥åºå ¥é¢:" + ex.getMessage()); } } return count; } @Override public Integer selectPatMedInhospList(PatMedInhosp patMedInhosp) { @@ -221,33 +409,40 @@ public Integer selectUserList(SysUser sysUser) { List<SysUser> sysUserList = chMapper.selectUserList(sysUser); log.info("sysUserListçééå°çæ°é为ï¼{}", sysUserList.size()); int i = sysUser2Mapper.batchUser(sysUserList); int i =0;// sysUser2Mapper.batchUser(sysUserList); for (SysUser sysUser1 : sysUserList) { log.info("sysUser1çID为ï¼{}", sysUser1.getUserId()); log.info("sysUser1çHISUSERID为ï¼{}", sysUser1.getHisUserId()); //æ°å¢ç¨æ·ä¸è§è² SysUserRole yhyjsxx = chMapper.yhyjsxx(sysUser1); if (yhyjsxx == null) continue; yhyjsxx.setUserId(sysUser1.getUserId()); List<SysUserRole> userRoleList = new ArrayList<>(); userRoleList.add(yhyjsxx); sysUserRoleMapper.batchUserRole(userRoleList); // log.info("sysUser1çID为ï¼{}", sysUser1.getUserId()); // log.info("sysUser1çHISUSERID为ï¼{}", sysUser1.getHisUserId()); // //æ°å¢ç¨æ·ä¸è§è² // SysUserRole yhyjsxx = chMapper.yhyjsxx(sysUser1); // if (yhyjsxx != null&&yhyjsxx.getUserId()!=null) { // yhyjsxx.setUserId(sysUser1.getUserId()); // List<SysUserRole> userRoleList = new ArrayList<>(); // userRoleList.add(yhyjsxx); // sysUserRoleMapper.batchUserRole(userRoleList); // } if (StringUtils.isEmpty(sysUser1.getHisUserId())) continue; SysUser suTemp=new SysUser(); suTemp.setHisUserId(sysUser1.getHisUserId()); List<SysUser> usersTemp= sysUser2Mapper.selectUserList(suTemp); if (usersTemp.size()>0) { sysUser1.setUserId(usersTemp.get(0).getUserId()); sysUser2Mapper.updateUser(sysUser1); }else{ sysUser2Mapper.insertUser(sysUser1); usersTemp= sysUser2Mapper.selectUserList(suTemp); } //æ°å¢ç¨æ·ä¸é¨é¨ if (StringUtils.isEmpty(sysUser1.getHisUserId())) continue; SysUserDept sysUserDept = chMapper.yhyksxx(sysUser1); if (Objects.isNull(sysUserDept) || sysUserDept.getDeptId() == null) continue; SysDept dept = new SysDept(); dept.setHisDeptId(sysUserDept.getDeptId().toString()); List<SysDept> sysDepts = sysDept2Mapper.selectDeptList(dept); if (CollectionUtils.isNotEmpty(sysDepts)) { sysUserDept.setDeptId(sysDepts.get(0).getDeptId()); sysUserDept.setDeptCode(sysDepts.get(0).getDeptCode()); List<SysUserDept> sysUserDept = chMapper.yhyksxx(sysUser1); for(SysUserDept sud :sysUserDept) { if (usersTemp.size()>0) { sud.setUserId(usersTemp.get(0).getUserId()); sysUserDeptMapper.insertSysUserDept(sud); } sysUserDept.setUserId(sysUser1.getUserId()); sysUserDeptMapper.insertSysUserDept(sysUserDept); } } return i; } ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
@@ -771,9 +771,8 @@ public void collectHIS() { try { // HISæ°æ®éé HnDataGatherVO hnDataGatherVO = new HnDataGatherVO(); log.info("ãdealHisDataãHISå¼å§ééæ°æ®"); ichService.hnDataGather(hnDataGatherVO); ichService.sync(); log.info("ãdealHisDataãHISç»æééæ°æ®"); } catch (Exception e) { log.error("ãdealHisDataãHISæ°æ®ééå¼å¸¸", e); ruoyi-quartz/src/main/resources/mapper/quartz/CollectHISMapper.xml
@@ -372,8 +372,7 @@ </select> <select id="yhyksxx" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserDeptResult"> select user_id, user_code, dept_type,dept_code as dept_id,dept_name,deptparent,del_flag,orgid select user_id, user_code, dept_type,dept_code as dept_id,dept_code,dept_name,deptparent,del_flag,orgid FROM healthy_user_dept <where> user_id != 'admin' @@ -414,6 +413,12 @@ <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="lastStartTime != null and lastStartTime != ''"> and to_char(last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') >= #{lastStartTime} </if> <if test="lastEndTime != null and lastEndTime != ''"> and to_char(last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') <= #{lastEndTime} </if> </where> </select> @@ -511,6 +516,12 @@ <if test="outWayId != null ">and b.out_way_id = #{outWayId}</if> <if test="outWayName != null ">and b.out_way_name = #{outWayName}</if> <if test="orgid != null ">and b.orgid = #{orgid}</if> <if test="lastStartTime != null and lastStartTime != ''"> and to_char(last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') >= #{lastStartTime} </if> <if test="lastEndTime != null and lastEndTime != ''"> and to_char(last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') <= #{lastEndTime} </if> </where> </select> @@ -546,7 +557,12 @@ <if test="endTime != null "> and to_char(admitdate, 'YYYY-MM-DD HH24:MI:SS') <= to_char(#{endTime}, 'YYYY-MM-DD HH24:MI:SS') </if> <if test="lastStartTime != null and lastStartTime != ''"> and to_char(last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') >= #{lastStartTime} </if> <if test="lastEndTime != null and lastEndTime != ''"> and to_char(last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') <= #{lastEndTime} </if> </where> </select> ruoyi-quartz/src/main/resources/mapper/quartz/UtilsMapper.xml
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,7 @@ <?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.ruoyi.quartz.mapper.UtilsMapper"> </mapper> smartor/src/main/java/com/smartor/domain/PatArchive.java
@@ -416,4 +416,10 @@ @ApiModelProperty("ps") private Integer ps; @ApiModelProperty(value = "æåå¼å§æ¶é´") private String lastStartTime; @ApiModelProperty(value = "æåç»ææ¶é´") private String lastEndTime; } smartor/src/main/java/com/smartor/domain/PatMedInhosp.java
@@ -463,4 +463,10 @@ @ApiModelProperty("ç»ç®¡å»ç") @Excel(name = " ç»ç®¡å»ç ") private String managementDoctorCode; @ApiModelProperty(value = "æåå¼å§æ¶é´") private String lastStartTime; @ApiModelProperty(value = "æåç»ææ¶é´") private String lastEndTime; } smartor/src/main/java/com/smartor/domain/PatMedOuthosp.java
@@ -229,6 +229,10 @@ @ApiModelProperty(value = "æ¯å¦æé访0没æ;>=1æé访 ") private String serverState; @ApiModelProperty(value = "æåå¼å§æ¶é´") private String lastStartTime; @ApiModelProperty(value = "æåç»ææ¶é´") private String lastEndTime; } smartor/src/main/java/com/smartor/mapper/PatMedInhospMapper.java
@@ -35,6 +35,8 @@ */ public List<PatMedInhosp> selectPatMedInhospList(PatMedInhosp patMedInhosp); public List<PatMedInhosp> selectPatMedInhospListBySerialnum(PatMedInhosp patMedInhosp); public List<PatMedInhosp> selectPatMedInhospListByCondition(PatMedInhospVO patMedInhospVO); /** smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskServiceImpl.java
@@ -2312,7 +2312,7 @@ if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() == 2) { serviceSubtaskStatistic.setPendingFollowUp(serviceSubtaskStatistic.getPendingFollowUp() + 1L); } if (serviceSubtask.getSendstate() != null && (serviceSubtask.getSendstate() == 1 || serviceSubtask.getSendstate() == 3 || serviceSubtask.getSendstate() == 6)) { if (serviceSubtask.getSendstate() != null && ( serviceSubtask.getSendstate() == 6)) { serviceSubtaskStatistic.setFollowUpSuccess(serviceSubtaskStatistic.getFollowUpSuccess() + 1L); } if (serviceSubtask.getSendstate() != null && serviceSubtask.getSendstate() == 5) { smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
@@ -300,6 +300,78 @@ order by b.starttime desc </if> </select> <select id="selectPatMedInhospListBySerialnum" parameterType="com.smartor.domain.PatMedInhosp" resultMap="PatMedInhospResult"> select b.inhospid, b.nurse_id, b.nurse_name, b.patname, b.management_doctor, b.management_doctor_code, b.out_way_id, b.out_way_name, b.deptcheck_flag, b.wardcheck_flag, b.diagcheck_flag, b.inhospstate, b.patno, b.inhospno, b.serialnum, b.hospitalname, b.hospitalcode, b.hospitaldistrictcode, b.hospitaldistrictname, b.icd10code, b.diagname, b.starttime, b.endtime, b.deptcode, b.deptname, b.roomno, b.bed_no, b.orgid, b.del_flag, b.update_by, b.update_time, b.create_by, b.create_time, b.isupload, b.upload_time, b.patid, b.leavediagname, b.leaveicd10code, b.drcode, b.drname, b.schemestatus, b.generalschemestatus, b.leaveldeptcode, b.leaveldeptname, b.hospitaldistrictid, b.leavehospitaldistrictcode, b.leavehospitaldistrictname, b.leavehospitaldistrictid, b.deptid, b.leaveldeptid, b.long_task_reason, b.schemetime, b.fuflag, b.fudate, b.fuperiod, b.futypecode, b.futypedesc, b.fuadvice, b.fuspecialadvice FROM pat_med_inhosp b <where> <if test="serialnum != null ">and b.serialnum = #{serialnum}</if> </where> order by b.inhospid desc </select> <select id="selectPatMedInhospListByCondition" parameterType="com.smartor.domain.PatMedInhospVO" resultMap="PatMedInhospResult"> select CONCAT( a.age, a.age_unit ) AS age, @@ -415,6 +487,7 @@ order by b.inhospid desc </select> <select id="getTagnameBypatid" parameterType="Long" resultType="string"> SELECT GROUP_CONCAT(d.tagname, ', ') FROM pat_archivetag d