ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java
@@ -16,6 +16,7 @@ import com.ruoyi.common.utils.http.HttpUtils; import com.smartor.common.LSHospTokenUtil; import com.smartor.domain.*; import com.smartor.mapper.HeLibraryMapper; import com.smartor.mapper.PatArchiveMapper; import com.smartor.mapper.ServiceSubtaskMapper; import com.smartor.mapper.ServiceTaskMapper; @@ -62,6 +63,9 @@ @Autowired private ServiceSubtaskMapper ivrTaskcallMapper; @Autowired private HeLibraryMapper heLibraryMapper; @Autowired private ServiceTaskMapper ivrTaskMapper; @@ -275,16 +279,13 @@ subIds.clear(); subIds.addAll(lssubIds); lssubIds.clear(); } else if (descByCode.equals("多媒体")) { } else if (descByCode.equals("多媒体")) { //多媒体 continue; } else if (descByCode.equals("纸质")) { } else if (descByCode.equals("纸质")) { //纸质 continue; } else if (descByCode.equals("短信")) { } else if (descByCode.equals("短信")) { //短信 //对url中两个参数加密 RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample(); @@ -354,7 +355,6 @@ serviceOutPath.setParam1(taskId); serviceOutPath.setParam2(patid); serviceOutPath.setParam6(subId); // serviceOutPath.setParam3(URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString())); serviceOutPath.setParam3(ivrTask1.getTaskName()); serviceOutPath.setCreateTime(new Date()); iServiceOutPathService.insertServiceOutPath(serviceOutPath); @@ -362,7 +362,9 @@ serviceOutPath.setRadix(format); serviceOutPath.setUpdateTime(new Date()); iServiceOutPathService.updateServiceOutPath(serviceOutPath); // sendMagParam.setUrl(ip + ":" + req_path + "/outsideChainxj?param1=" + taskId + "¶m2=" + patid + "¶m3=" + URLEncoder.encode(ivrTask1.getTaskName(), StandardCharsets.UTF_8.toString()) + "¶m5=false"); //需要通过模板ID去判断要发的内容是宣教还是通知 HeLibrary heLibrary = heLibraryMapper.selectHeLibraryById(serviceSubtask.getLibtemplateid()); if (heLibrary.getHetype().equals("1")) { sendMagParam.setPhone(serviceSubtask.getPhone()); sendMagParam.setUrl(ip + ":" + req_path + "/xj?p=" + format); if (serviceSubtask.getOrgid().equals("47255004333112711A1001")) { @@ -371,6 +373,11 @@ sendMagParam.setContent("【丽水中医院】您好,邀请您填写出院宣教调查表,请点击" + sendMagParam.getUrl() + "查看。感谢您配合!"); } else sendMagParam.setContent("【新华医院】您好,邀请您填写出院宣教调查表,请点击" + sendMagParam.getUrl() + "查看。感谢您配合!"); } else { //通知 sendMagParam.setPhone(serviceSubtask.getPhone()); sendMagParam.setContent(heLibrary.getPreachcontent()); } } //短信还需要模板 String s = null; @@ -409,7 +416,6 @@ } if (s.equals("true")) { //在子任务表里记录一下 log.error("serviceSubtask保存成功了吗?:{}", s); String uuid = UUID.randomUUID().toString(); serviceSubtask.setResult("success"); serviceSubtask.setRemark("短信发送成功"); @@ -457,8 +463,7 @@ subIds.clear(); subIds.addAll(lssubIds); lssubIds.clear(); } else if (descByCode.equals("公众号")) { } else if (descByCode.equals("公众号")) { //公众号 RSAPublicKeyExample rsaPublicKeyExample = new RSAPublicKeyExample(); String taskId = rsaPublicKeyExample.encryptedData(ivrTask1.getTaskid().toString(), pub_key); ruoyi-admin/src/main/resources/application-ls.yml
@@ -239,3 +239,4 @@ #随访医院:1新华 2丽水 visitHosp: 2 ruoyi-admin/src/main/resources/application-xh.yml
@@ -166,7 +166,7 @@ #新华医院外链请求IP和端口号 req_path: 8093 localIP: https://wx.lihusmart.com localIP: https://zzdey.health-y.cn #获取患者信息URL(华卓提供) ruoyi-admin/src/main/resources/application.yml
@@ -74,7 +74,7 @@ # 国际化资源文件路径 basename: i18n/messages profiles: active: hn active: druid # 文件上传 servlet: multipart: @@ -128,3 +128,6 @@ excludes: /system/notice # 匹配链接 urlPatterns: /system/*,/monitor/*,/tool/* #不需要进行长期任务的机构 noLongTask: 47231022633110211A2101, ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
@@ -3,16 +3,12 @@ import com.alibaba.fastjson2.JSONObject; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.reflect.TypeToken; import com.google.gson.Gson; import com.google.gson.JsonArray; import com.google.gson.JsonObject; import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.enums.MsgLSEnum; import com.ruoyi.common.enums.ServiceFromEnum; import com.ruoyi.common.enums.VisitSendStateEnum; import com.ruoyi.common.enums.WxGZHEnum; import com.ruoyi.common.exception.base.BaseException; import com.ruoyi.common.utils.HttpUtil; import com.ruoyi.common.utils.OkHttpExample; import com.ruoyi.common.utils.RSAPublicKeyExample; @@ -20,6 +16,7 @@ import com.ruoyi.common.utils.http.HttpUtils; import com.smartor.common.LSHospTokenUtil; import com.smartor.domain.*; import com.smartor.mapper.HeLibraryMapper; import com.smartor.mapper.ServiceSubtaskMapper; import com.smartor.mapper.ServiceTaskMapper; import com.smartor.mapper.SysUserImportMapper; @@ -30,20 +27,13 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.annotation.Transactional; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.lang.reflect.Type; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Paths; import java.security.MessageDigest; import java.text.ParseException; import java.text.SimpleDateFormat; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; @@ -91,6 +81,9 @@ @Autowired private SysUserImportMapper sysUserImportMapper; @Autowired private HeLibraryMapper heLibraryMapper; @Value("${localIP}") private String localIP; @@ -478,7 +471,6 @@ serviceSubtask.setResult("error"); serviceSubtask.setRemark(patArchive.getNotrequiredreason()); serviceSubtask.setSendstate(4L); // serviceSubtask.setFinishtime(new Date()); iServiceSubtaskService.insertServiceSubtask(serviceSubtask); continue; } @@ -497,9 +489,18 @@ serviceOutPath.setRadix(format); serviceOutPath.setUpdateTime(new Date()); iServiceOutPathService.updateServiceOutPath(serviceOutPath); //先判断一下发的是不是宣教 if (!"3".equals(serviceSubtask.getType())) { sendMagParam.setPhone(serviceSubtask.getPhone()); sendMagParam.setUrl(ip + ":" + req_path + "/wt?p=" + format); sendMagParam.setContent("【新华医院】您好,邀请您填写出院调查表,请点击" + sendMagParam.getUrl() + "填写。感谢您配合!"); } else { HeLibrary heLibrary = heLibraryMapper.selectHeLibraryById(serviceSubtask.getLibtemplateid()); if ("2".equals(heLibrary.getHetype())) { sendMagParam.setPhone(serviceSubtask.getPhone()); sendMagParam.setContent(heLibrary.getPreachcontent()); } } String isSuccess = null; if (visitHosp == 1) { Map<String, String> req = new HashMap<>(); smartor/src/main/java/com/smartor/domain/ExternalJZInfo.java
@@ -37,4 +37,7 @@ @ApiModelProperty(value = "患者去向名称") private String HuanZheQXMC; @ApiModelProperty(value = "随访日期") private Date sfrq; } smartor/src/main/java/com/smartor/domain/PatArchiveReq.java
@@ -136,6 +136,12 @@ @ApiModelProperty(value = "医生") private String drname; /** * 医院编码 */ @ApiModelProperty(value = "医院编码") private String drcode; /** * 医院名称 smartor/src/main/java/com/smartor/domain/PatMedOuthosp.java
@@ -32,6 +32,9 @@ @ApiModelProperty(value = "门诊编号") private String outhospno; @ApiModelProperty(value = "长期任务随访标识:0不需要,1需要") private String fuflag; /** * 流水号 */ @@ -212,6 +215,10 @@ @ApiModelProperty(value = "结束就诊时间") private Date endTime; @ApiModelProperty(value = "指定的随访日期") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date fudate; /** * 证件号码 */ smartor/src/main/java/com/smartor/domain/ServiceSubtask.java
@@ -152,7 +152,7 @@ * 任务类型(门诊,住院,复诊…) */ @Excel(name = "任务类型:1,机器人语音(随访) 2,问卷;3,通知(宣教)") @ApiModelProperty(value = "任务类型:1,机器人语音(随访) 2,问卷;3,通知(宣教);)") @ApiModelProperty(value = "任务类型:1,机器人语音(随访) 2,问卷;3,宣教; 4.通知)") private String type; /** smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java
@@ -765,20 +765,20 @@ List<PatArchiveOthreInfo> patArchiveList = new ArrayList<>(); if (patArchiveReq.getAllhosp() != null && patArchiveReq.getAllhosp() == 1) { // 查看住院 1 查看门诊 2 查看体检 3 // 查看住院 1 查看门诊 2 查看体检 3 查看出院 4 patArchiveReq.setCry(0); List<PatArchiveOthreInfo> patArchives1 = patArchiveMapper.selectPatArchiveInfoByInhospQC(patArchiveReq); if (CollectionUtils.isNotEmpty(patArchives1)) { patArchiveList.addAll(patArchives1); } } else if (patArchiveReq.getAllhosp() != null && patArchiveReq.getAllhosp() == 2) { // 查看住院 1 查看门诊 2 查看体检 3 // 查看住院 1 查看门诊 2 查看体检 3 查看出院 4 List<PatArchiveOthreInfo> patArchives2 = patArchiveMapper.selectPatArchiveInfoByOuthospQC(patArchiveReq); if (CollectionUtils.isNotEmpty(patArchives2)) { patArchiveList.addAll(patArchives2); } } else if (patArchiveReq.getAllhosp() != null && patArchiveReq.getAllhosp() == 3) { // 查看住院 1 查看门诊 2 查看体检 3 // 查看住院 1 查看门诊 2 查看体检 3 查看出院 4 List<PatArchiveOthreInfo> patArchives3 = patArchiveMapper.selectPatArchiveInfoByPhysicalQC(patArchiveReq); if (CollectionUtils.isNotEmpty(patArchives3)) { patArchiveList.addAll(patArchives3); smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java
@@ -14,6 +14,8 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import java.time.Instant; import java.time.temporal.ChronoUnit; import java.util.*; import java.util.stream.Collectors; @@ -697,19 +699,41 @@ Date newDate = addDays(patMedInhosp1.getEndtime(), serviceTask.getSendDay().intValue()); serviceSubtask.setLongSendTime(newDate); serviceSubtask.setVisitTime(newDate); //如果是通知的话,需要提前几天将通过短信发出去(具体几天,这个可以配置在sys_conf表中) if ("3".equals(serviceTask.getType())) { serviceSubtask.setVisitTime(minusDay(newDate, 2)); } //患者发送时间 if (StringUtils.isNotEmpty(patArchive.getNotrequiredFlag()) && patArchive.getNotrequiredFlag().equals("1")) { // log.error("serviceSubtask99999999的值为:{}",serviceSubtask); String remark = patArchive.getNotrequiredreason(); serviceSubtask.setRemark(remark); serviceSubtask.setResult("error"); // serviceSubtask.setFinishtime(new Date()); //不执行 serviceSubtask.setSendstate(4L); } return serviceSubtask; } /** * 减去相应天数 * * @param originalDate * @param day * @return */ public Date minusDay(Date originalDate, Integer day) { // 1. 将 Date 转换为 Instant Instant instant = originalDate.toInstant(); // 2. 在 Instant 上减去2天 Instant twoDaysAgoInstant = instant.minus(2, ChronoUnit.DAYS); // 3. 将计算后的 Instant 转回 Date return Date.from(twoDaysAgoInstant); } //处理入院信息 private void dealInHospInfo(List<PatMedInhosp> patMedInhospList) { for (PatMedInhosp patMedInhosp1 : patMedInhospList) { smartor/src/main/java/com/smartor/service/impl/PatMedOuthospServiceImpl.java
@@ -149,12 +149,31 @@ patMedOuthosp.setDiagcheckFlag("0"); List<PatMedOuthosp> patMedOuthosps = selectPatMedOuthospList(patMedOuthosp); for (PatMedOuthosp patMedOuthosp1 : patMedOuthosps) { PatArchive patArchive = patArchiveMapper.selectPatArchiveByPatid(patMedOuthosp1.getPatid()); //该患者有可能提前来复诊了,那他后面的本科室的通知就可以不用再发短信了 ServiceSubtaskVO serviceSubtaskVO = new ServiceSubtaskVO(); if (StringUtils.isNotEmpty(patMedOuthosp1.getDeptcode())) { serviceSubtaskVO.setDeptcode(patMedOuthosp1.getDeptcode()); serviceSubtaskVO.setSfzh(patArchive.getIdcardno()); serviceSubtaskVO.setType("3"); serviceSubtaskVO.setSendstate(2L); serviceSubtaskVO.setPreachform("4"); List<ServiceSubtask> serviceSubtaskList = serviceSubtaskMapper.selectServiceSubtaskList(serviceSubtaskVO); if (!CollectionUtils.isEmpty(serviceSubtaskList)) { for (ServiceSubtask serviceSubtask : serviceSubtaskList) { serviceSubtask.setSendstate(6L); serviceSubtask.setRemark("已回来复诊,无需再进行短信通知"); serviceSubtaskMapper.updateServiceSubtask(serviceSubtask); } } } // 根据患者的疾病,获取该疾病的长期任务 ServiceTaskdiag serviceTaskdiag = new ServiceTaskdiag(); serviceTaskdiag.setLongtask(1L); serviceTaskdiag.setIcd10code(patMedOuthosp1.getIcd10code()); List<ServiceTaskdiag> serviceTaskdiags = serviceTaskdiagMapper.selectServiceTaskdiagList(serviceTaskdiag); PatArchive patArchive = patArchiveMapper.selectPatArchiveByPatid(patMedOuthosp1.getPatid()); //如果部门模板为空(将deptIsNull设置为true) if (org.apache.commons.collections4.CollectionUtils.isEmpty(serviceTaskdiags) || serviceTaskdiags.size() == 0) { patMedOuthosp1.setDiagcheckFlag("2"); @@ -290,6 +309,10 @@ //设置发送时间 if (serviceTask.getSendDay() == null) serviceTask.setSendDay(1L); Date newDate = addDays(patMedOuthosp.getAdmitdate(), serviceTask.getSendDay().intValue()); if (patMedOuthosp.getFudate() != null) { //如果门诊表有指定随访时间,那就用指定的 newDate = patMedOuthosp.getFudate(); } serviceSubtask.setLongSendTime(newDate); serviceSubtask.setVisitTime(newDate); //患者发送时间 smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java
@@ -71,6 +71,9 @@ @Value("${defaultPwd}") private String defaultPwd; @Value("${noLongTask}") private List<String> noLongTask; public Boolean generalInterface(Map dataMap) { Map XiaoXiTou = (Map) dataMap.get("XiaoXiTou"); String xiaoXiLX = XiaoXiTou.get("XiaoXiLX").toString(); @@ -468,6 +471,10 @@ if (CollectionUtils.isNotEmpty(patMedInhospList)) { patMedInhosp1.setUpdateTime(new Date()); patMedInhosp1.setOrgid(ObjectUtils.isNotEmpty(BingRenXX) && ObjectUtils.isNotEmpty(BingRenXX.get("ZuZhiJGID")) ? BingRenXX.get("ZuZhiJGID").toString() : null); if (CollectionUtils.isNotEmpty(noLongTask) && noLongTask.contains(patMedInhosp1.getOrgid())) { //不需要长期任务随访 patMedInhosp1.setFuflag("1"); } int i = patMedInhospMapper.updatePatMedInhosp(patMedInhosp1); if (i != 1) return false; } else { @@ -485,6 +492,11 @@ patMedInhosp1.setPatname(patArchive.getName()); patMedInhosp1.setCreateTime(new Date()); if (CollectionUtils.isNotEmpty(noLongTask) && noLongTask.contains(patMedInhosp1.getOrgid())) { //不需要长期任务随访 patMedInhosp1.setFuflag("1"); } int i = patMedInhospMapper.insertPatMedInhosp(patMedInhosp1); if (i != 1) return false; } @@ -601,6 +613,10 @@ if (CollectionUtils.isNotEmpty(patMedInhospList)) { patMedInhosp1.setUpdateTime(new Date()); patMedInhosp1.setOrgid(ObjectUtils.isNotEmpty(BingRenXX) && ObjectUtils.isNotEmpty(BingRenXX.get("ZuZhiJGID")) ? BingRenXX.get("ZuZhiJGID").toString() : null); if (CollectionUtils.isNotEmpty(noLongTask) && noLongTask.contains(patMedInhosp1.getOrgid())) { //不需要长期任务随访 patMedInhosp1.setFuflag("1"); } int i = patMedInhospMapper.updatePatMedInhosp(patMedInhosp1); if (i != 1) return false; } else { @@ -618,6 +634,10 @@ patMedInhosp1.setPatname(patArchive.getName()); patMedInhosp1.setCreateTime(new Date()); if (CollectionUtils.isNotEmpty(noLongTask) && noLongTask.contains(patMedInhosp1.getOrgid())) { //不需要长期任务随访 patMedInhosp1.setFuflag("1"); } int i = patMedInhospMapper.insertPatMedInhosp(patMedInhosp1); if (i != 1) return false; } @@ -883,12 +903,16 @@ patMedOuthosp.setOrgid(FaSongJGID); patMedOuthosp.setHospitalname(FaSongJGMC); //这个需要等HIS那边告诉取哪个字段,现在还是不对的 patMedOuthosp.setFudate(externalJZInfo.getSfrq()); for (ExternalDiagnosisInfo externalDiagnosisInfo : externalDiagnosisInfoList) { if (externalDiagnosisInfo.getZhenDuanLBMC().equals("主诊断")) { patMedOuthosp.setDiagname(externalDiagnosisInfo.getZhenDuanMC()); patMedOuthosp.setDrcode(externalDiagnosisInfo.getZhenDuanYSID()); patMedOuthosp.setDrname(externalDiagnosisInfo.getZhenDuanYSXM()); patMedOuthosp.setIcd10code(externalDiagnosisInfo.getIcd10()); patMedOuthosp.setFuflag("0"); } } for (ExternalWZInfo externalWZInfo : ExternalWZInfoList) { @@ -903,12 +927,37 @@ if (CollectionUtils.isNotEmpty(patMedOuthosps)) { patMedOuthosp.setId(patMedOuthosps.get(0).getId()); patMedOuthosp.setUpdateTime(new Date()); if (CollectionUtils.isNotEmpty(noLongTask) && noLongTask.contains(patMedOuthosp.getOrgid())) { //不需要长期任务随访,由医生自己去随访(丽水中医院首次提出) patMedOuthosp.setFuflag("1"); } i = patMedOuthospMapper.updatePatMedOuthosp(patMedOuthosp); } else { patMedOuthosp.setCreateTime(new Date()); patMedOuthosp.setUpdateTime(new Date()); if (CollectionUtils.isNotEmpty(noLongTask) && noLongTask.contains(patMedOuthosp.getOrgid())) { //不需要长期任务随访 patMedOuthosp.setFuflag("1"); } i = patMedOuthospMapper.insertPatMedOuthosp(patMedOuthosp); } //先通过身份证和科室查询该患者是否有需要随访的(景宁提出来的) if (patMedOuthosp.getOrgid().equals("47255004333112711A1001")) { ServiceSubtaskVO serviceSubtaskVO = new ServiceSubtaskVO(); serviceSubtaskVO.setSfzh(patMedOuthosp.getIdcardno()); serviceSubtaskVO.setDeptcode(patMedOuthosp.getDeptcode()); serviceSubtaskVO.setSendstate(2L); List<ServiceSubtask> serviceSubtaskList = serviceSubtaskMapper.selectServiceSubtaskList(serviceSubtaskVO); if (CollectionUtils.isNotEmpty(serviceSubtaskList)) { for (ServiceSubtask serviceSubtask : serviceSubtaskList) { serviceSubtask.setSendstate(6L); serviceSubtask.setRemark("患者已经回来复诊"); serviceSubtaskMapper.updateServiceSubtask(serviceSubtask); } } } if (i > 0) { return true; } @@ -1662,7 +1711,7 @@ log.info("药品产地价格入参类型为:{}", type); return true; case "JZ_MZ_WanChengJZ": log.info("完成接诊入参类型为:{}", type); log.info("(门急诊)完成接诊入参类型为:{}", type); return addFinshJZInfo(dataMap); case "JZ_ZY_RuYuanDJ": log.info("入院登记入参类型为:{}", type); smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
@@ -928,6 +928,12 @@ <if test="endtime != null"> AND d.endtime = #{endtime} </if> <if test="drname != null and drname != ''"> AND d.drname LIKE concat('%',#{drname}, '%') </if> <if test="drcode != null"> AND d.drcode = #{drcode} </if> <if test="cry != null and cry == 0 ">and d.endtime is null</if> <if test="cry != null and cry == 1 ">and d.endtime is not null</if> <if test="visitno != null and visitno != ''"> @@ -1059,6 +1065,9 @@ <if test="drname != null and drname != ''"> AND d.drname LIKE concat('%',#{drname}, '%') </if> <if test="drcode != null"> AND d.drcode = #{drcode} </if> <if test="pids != null"> AND a.id NOT IN <foreach collection="pids" item="pid" open="(" separator="," close=")"> smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml
@@ -7,6 +7,7 @@ <resultMap type="com.smartor.domain.PatMedOuthosp" id="PatMedOuthospResult"> <result property="id" column="id"/> <result property="serialnum" column="serialnum"/> <result property="fuflag" column="fuflag"/> <result property="patid" column="patid"/> <result property="hospitalname" column="hospitalname"/> <result property="hospitalcode" column="hospitalcode"/> @@ -37,6 +38,7 @@ <result property="diagcheckFlag" column="diagcheck_flag"/> <result property="idcardno" column="idcardno"/> <result property="remark" column="remark"/> <result property="fudate" column="fudate"/> </resultMap> <sql id="selectPatMedOuthospVo"> @@ -45,6 +47,8 @@ diagcheck_flag, patno, remark, fudate, fuflag, serialnum, patid, hospitalname, @@ -79,6 +83,7 @@ select pmo.id, pmo.remark, pmo.fudate, pmo.outhospno, pmo.diagcheck_flag, pmo.patno, @@ -106,6 +111,7 @@ pmo.deptid, pmo.schemetime, pmo.hpi, pmo.fuflag, pmo.patname, CONCAT(pa.age,pa.age_unit,pa.age2,pa.age_unit2) AS age, pa.telcode, @@ -129,6 +135,7 @@ date_format(#{endTime},'%y%m%d') </if> <if test="patid != null ">and pmo.patid = #{patid}</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> <if test="diagcheckFlag != null and diagcheckFlag != ''">and pmo.diagcheck_flag = #{diagcheckFlag}</if> @@ -175,6 +182,8 @@ <if test="patno != null">patno,</if> <if test="diagcheckFlag != null">diagcheck_flag,</if> <if test="remark != null">remark,</if> <if test="fuflag != null">fuflag,</if> <if test="fudate != null">fudate,</if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="serialnum != null">#{serialnum},</if> @@ -207,6 +216,8 @@ <if test="patno != null">#{patno},</if> <if test="diagcheckFlag != null">#{diagcheckFlag},</if> <if test="remark != null">#{remark},</if> <if test="fuflag != null">#{fuflag},</if> <if test="fudate != null">#{fudate},</if> </trim> </insert> @@ -242,6 +253,8 @@ guid, patno, diagcheck_flag, fuflag, fudate, remark) values <foreach collection="list" item="item" separator=","> @@ -269,13 +282,14 @@ #{item.deptid}, #{item.schemetime}, #{item.hpi}, #{item.hpi}, #{item.mainsuit}, #{item.outhospno}, #{item.patname}, #{item.guid}, #{item.patno}, #{item.diagcheckFlag}, #{item.fuflag}, #{item.fudate}, #{item.remark} ) </foreach> @@ -315,6 +329,8 @@ <if test="patno != null">patno = #{patno},</if> <if test="diagcheckFlag != null">diagcheck_flag = #{diagcheckFlag},</if> <if test="remark != null">remark = #{remark},</if> <if test="fuflag != null">fuflag = #{fuflag},</if> <if test="fudate != null">fudate = #{fudate},</if> </trim> where id = #{id} </update> @@ -371,11 +387,16 @@ <!-- PatMedOuthospMapper.xml --> <select id="countPatMedOuthosp" resultType="int"> SELECT COUNT(*) FROM pat_med_outhosp SELECT COUNT(*) FROM pat_med_outhosp </select> <update id="renameTable"> RENAME TABLE ${oldName} TO ${newName} RENAME TABLE ${oldName} TO ${newName} </update> <update id="createPatMedOuthosp"> @@ -391,12 +412,15 @@ </update> <select id="getAllOuthospTableNames" resultType="String"> SELECT table_name FROM information_schema.tables WHERE table_schema = DATABASE() AND table_name LIKE 'pat_med_outhosp%' SELECT table_name FROM information_schema.tables WHERE table_schema = DATABASE() AND table_name LIKE 'pat_med_outhosp%' </select> <select id="getMaxIdFromTable" resultType="Long"> SELECT IFNULL(MAX(id), 0) FROM ${tableName} SELECT IFNULL(MAX(id), 0) FROM ${tableName} </select> <update id="createOrReplaceView">