ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatMedOuthospController.java
@@ -5,6 +5,7 @@ import javax.servlet.http.HttpServletResponse; import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.utils.PageUtils; import com.smartor.domain.PatMedReq; import com.smartor.domain.PatMedRes; import io.swagger.annotations.Api; @@ -49,7 +50,7 @@ @PostMapping("/selectPatMedOuthospList") @ApiOperation("æ¥è¯¢æ£è é¨è¯è®°å½å表") public TableDataInfo selectPatMedOuthosplist(@RequestBody PatMedOuthosp patMedOuthosp) { startPage(); PageUtils.startPageByPost(patMedOuthosp.getPageNum(), patMedOuthosp.getPageSize()); List<PatMedOuthosp> list = patMedOuthospService.selectPatMedOuthospList(patMedOuthosp); return getDataTable(list); } ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
@@ -4,13 +4,11 @@ import com.ruoyi.common.constant.UserConstants; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.entity.SysDept; import com.ruoyi.common.core.domain.entity.SysRole; import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.entity.SysUserDept; import com.ruoyi.common.core.domain.entity.*; import com.ruoyi.common.core.domain.model.LoginUser; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.exception.base.BaseException; import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.poi.ExcelUtil; @@ -19,7 +17,9 @@ import com.ruoyi.system.service.ISysRoleService; import com.ruoyi.system.service.ISysUserService; import com.smartor.mapper.SysUserDeptMapper; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ObjectUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.security.access.prepost.PreAuthorize; @@ -36,6 +36,7 @@ * * @author ruoyi */ @Slf4j @RestController @RequestMapping("/system/user") public class SysUserController extends BaseController { @@ -226,8 +227,14 @@ */ //@PreAuthorize("@ss.hasPermi('system:user:edit')") @Log(title = "ç¨æ·ç®¡ç", businessType = BusinessType.GRANT) @PostMapping("/authRole") public AjaxResult insertAuthRole(Long userId, Long[] roleIds) { @PostMapping("/authRole/insertAuthRole") public AjaxResult insertAuthRole(@RequestBody AuthRole authRole) { log.error("-----ç¨æ·ææè§è²çå ¥å为ï¼userId={},roleIds={}", authRole.getUserId(), authRole.getRoleIds()); if (ObjectUtils.isEmpty(authRole.getRoleIds())) { throw new BaseException("è§è²ä¸ºç©ºï¼è¯·æ£æ¥ä¹å忬¡å°è¯"); } Long[] roleIds = authRole.getRoleIds().stream().toArray(Long[]::new); Long userId = authRole.getUserId(); userService.checkUserDataScope(userId); userService.insertUserAuth(userId, roleIds, getOrgid()); return success(); ruoyi-admin/src/main/resources/application-druid.yml
@@ -18,10 +18,10 @@ password: Smartor.2023 driverClassName: com.mysql.cj.jdbc.Driver # # æ°å # url: jdbc:mysql://192.168.191.181:3308/smartor?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 # username: smartor # password: Smartor.2023 # driverClassName: com.mysql.cj.jdbc.Driver # url: jdbc:mysql://192.168.191.181:3308/smartor?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 # username: smartor # password: Smartor.2023 # driverClassName: com.mysql.cj.jdbc.Driver # å ¬å¸äº # url: jdbc:mysql://116.62.18.175:6002/smartor_lisui?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 ruoyi-admin/src/main/resources/mybatis/mybatis-config.xml
@@ -12,9 +12,9 @@ <!-- é ç½®é»è®¤çæ§è¡å¨.SIMPLEå°±æ¯æ®éæ§è¡å¨;REUSEæ§è¡å¨ä¼éç¨é¢å¤çè¯å¥(prepared statements);BATCHæ§è¡å¨å°éç¨è¯å¥å¹¶æ§è¡æ¹éæ´æ° --> <setting name="defaultExecutorType" value="SIMPLE" /> <!-- æå® MyBatis æç¨æ¥å¿çå ·ä½å®ç° --> <setting name="logImpl" value="SLF4J" /> <setting name="logImpl" value="STDOUT_LOGGING" /> <!-- 使ç¨é©¼å³°å½åæ³è½¬æ¢å段 --> <!-- <setting name="mapUnderscoreToCamelCase" value="true"/> --> </settings> </configuration> ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/AuthRole.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,28 @@ package com.ruoyi.common.core.domain.entity; import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel.ColumnType; import com.ruoyi.common.core.domain.BaseEntity; import lombok.Data; import java.util.List; /** * è§è²è¡¨ sys_role * * @author ruoyi */ @Data public class AuthRole extends BaseEntity { private static final long serialVersionUID = 1L; /** ç¨æ·ID */ @Excel(name = "ç¨æ·ID", cellType = ColumnType.NUMERIC) private Long userId; /** è§è²IDéå */ @Excel(name = "è§è²IDéå") private List<Long> roleIds; } ruoyi-framework/src/main/java/com/ruoyi/framework/interceptor/HospitalFilterInterceptor.java
@@ -58,7 +58,6 @@ // å°ä¿®æ¹åç SQL åå metaObject.setValue("delegate.boundSql.sql", modifiedSql); System.out.println("ä¿®æ¹åç SQL:" + modifiedSql); // æ§è¡åç»æä½ return invocation.proceed(); smartor/src/main/java/com/smartor/domain/ExternalInDeptPatientInfo.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,64 @@ package com.smartor.domain; import com.fasterxml.jackson.annotation.JsonFormat; import com.ruoyi.common.core.domain.BaseEntity; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.Date; import java.util.List; /** * @author æ¥æ¶ç¬¬ä¸æ¹å ¥ç§æ£è ä¿¡æ¯ * @date 2024-12-13 */ @Data @ApiModel(value = "ExternalInHospPatientInfo", description = "æ¥æ¶ç¬¬ä¸æ¹å ¥ç§æ£è ä¿¡æ¯") public class ExternalInDeptPatientInfo extends BaseEntity { private static final long serialVersionUID = 1L; @ApiModelProperty(value = "æä½äººID") private String CaoZuoRID; @ApiModelProperty(value = "æä½äººå§å") private String CaoZuoRXM; @ApiModelProperty(value = "å ¥ç§æ¶é´") private String RuKeSJ; @ApiModelProperty(value = "å ¥é¢æ¶é´") private Date RuYuanSJ; @ApiModelProperty(value = "å»çç»ID") private String YiLiaoZID; @ApiModelProperty(value = "å»çç»åç§°") private String YiLiaoZMC; @ApiModelProperty(value = "主治å»çID") private String ZhuZhiYSID; @ApiModelProperty(value = "主治å»çå§å") private String ZhuZhiYSXM; @ApiModelProperty(value = "责任æ¤å£«ID") private String ZeRenHSID; @ApiModelProperty(value = "责任æ¤å£«å§å") private String ZeRenHSXM; @ApiModelProperty(value = "æ¤å£«ä¸»ID") private String HuShiZID; @ApiModelProperty(value = "æ¤å£«ä¸»å§å") private String HuShiZXM; @ApiModelProperty(value = "ç»ç®¡å»çID") private String JingGuanYSID; @ApiModelProperty(value = "ç»ç®¡å»çå§å") private String JingGuanYSXM; } smartor/src/main/java/com/smartor/domain/ExternalInHospPatientInfo.java
@@ -166,6 +166,19 @@ @ApiModelProperty(value = "ç°ä½åä¿¡æ¯") private String XianZhuZXX; @ApiModelProperty(value = "责任æ¤å£«ID") private String ZeRenHSID; @ApiModelProperty(value = "责任æ¤å£«å§å") private String ZeRenHSXM; @ApiModelProperty(value = "主治å»çID") private String ZhuZhiYSID; @ApiModelProperty(value = "主治å»çå§å") private String ZhuZhiYSXM; @ApiModelProperty(value = "è系人信æ¯") List<ExternalInHospPatientLiaisonInfo> externalInHospPatientLiaisonInfos; smartor/src/main/java/com/smartor/domain/HeLibraryVO.java
@@ -248,4 +248,7 @@ */ @ApiModelProperty("html坿æ¬") private String htmlRichText; @ApiModelProperty("è§ç次æ°") private Long watchCount; } smartor/src/main/java/com/smartor/domain/PatMedOuthosp.java
@@ -165,4 +165,30 @@ @ApiModelProperty(value = "主述") private String mainsuit; /** * pageNum */ @ApiModelProperty("pageNum") private Integer pageNum; /** * pageSize */ @ApiModelProperty("pageSize") private Integer pageSize; /** * å¹´é¾ */ @ApiModelProperty(value = "å¹´é¾") private String age; /** * ææºå· */ @ApiModelProperty(value = "ææºå·") private String telcode; } smartor/src/main/java/com/smartor/domain/ServiceSubtask.java
@@ -458,6 +458,13 @@ private Long patid; /** * æ£è ID */ @Excel(name = " æ£è ID") @ApiModelProperty(value = "æ£è ID") private String patguid; /** * ç§å®¤åç§° */ @Excel(name = "ç§å®¤åç§°") smartor/src/main/java/com/smartor/domain/ServiceSubtaskVO.java
@@ -36,6 +36,13 @@ private String taskGuid; /** * æ£è ID */ @Excel(name = " æ£è ID") @ApiModelProperty(value = "æ£è ID") private String patguid; /** * åé人 */ @Excel(name = " åé人 ") smartor/src/main/java/com/smartor/domain/ServiceTaskInfo.java
@@ -75,7 +75,7 @@ private String orgguid; @ApiModelProperty(value = "æ£è ID") private long patguid; private String patguid; @ApiModelProperty(value = "å§å") private String patname; smartor/src/main/java/com/smartor/service/IServiceExternalService.java
@@ -58,6 +58,11 @@ public Boolean addInHospInfo(@RequestBody Map dataMap); /** * æ°å¢å ¥ç§ä¿¡æ¯ */ public Boolean addInDeptInfo(Map dataMap); /** * åæ¶å ¥é¢ç»è®°ä¿¡æ¯ */ public Boolean cancelInHospInfo(@RequestBody Map dataMap); smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java
@@ -602,14 +602,26 @@ patArchive1.setTagList(stringList.stream().collect(Collectors.toList())); patArchives.add(patArchive1); } //å°patArchiveséçtagListæ¾å°patArchiveListç对象é for (PatArchiveOthreInfo poi : patArchiveList) { for (PatArchive pa : patArchives) { if (poi.getId() == pa.getId()) { poi.setTagList(pa.getTagList()); } } } List<PatArchive> patArchiveList1 = DtoConversionUtils.sourceToTarget(patArchiveList, PatArchive.class); //ç»æ£è è系人èµå¼ for (PatArchive pa : patArchives) { // for (PatArchive pa : patArchives) { for (PatArchive pa : patArchiveList1) { PatArchivecontact patArchivecontact = new PatArchivecontact(); patArchivecontact.setPatid(pa.getId()); pa.setPatArchivecontactList(patArchivecontactMapper.selectPatArchivecontactList(patArchivecontact)); } return patArchives; return patArchiveList1; } @Override smartor/src/main/java/com/smartor/service/impl/PatMedOuthospServiceImpl.java
@@ -53,7 +53,8 @@ */ @Override public List<PatMedOuthosp> selectPatMedOuthospList(PatMedOuthosp patMedOuthosp) { return patMedOuthospMapper.selectPatMedOuthospList(patMedOuthosp); List<PatMedOuthosp> patMedOuthosps = patMedOuthospMapper.selectPatMedOuthospList(patMedOuthosp); return patMedOuthosps; } /** smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java
@@ -254,6 +254,73 @@ } @Override public Boolean addInDeptInfo(Map dataMap) { log.error("ServiceExternalServiceImpl---addInDeptInfoçæ°å¢çå¼ä¸ºï¼{}", dataMap); Map yeWuXX = (Map) dataMap.get("YeWuXX"); List<HashMap<String, Object>> epai = ObjectUtils.isNotEmpty(yeWuXX) ? (List<HashMap<String, Object>>) yeWuXX.get("DiZhiXXList") : null; List<HashMap<String, Object>> epli = ObjectUtils.isNotEmpty(yeWuXX) ? (List<HashMap<String, Object>>) yeWuXX.get("LianXiRList") : null; List<HashMap<String, Object>> hospPatientDiagnoseInfos = ObjectUtils.isNotEmpty(yeWuXX) ? (List<HashMap<String, Object>>) yeWuXX.get("ZhenDuanList") : null; Map<String, Object> BingRenXX = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("BingRenXX") : null; Map<String, Object> RuKeXX = ObjectUtils.isNotEmpty(yeWuXX) ? (Map<String, Object>) yeWuXX.get("RuKeXX") : null; ExternalInHospPatientInfo externalInHospPatientInfo = BeanUtil.mapToBean(BingRenXX, ExternalInHospPatientInfo.class, true); ExternalInDeptPatientInfo externalInDeptPatientInfo = BeanUtil.mapToBean(RuKeXX, ExternalInDeptPatientInfo.class, true); externalInHospPatientInfo.setZeRenHSID(externalInDeptPatientInfo.getZeRenHSID()); externalInHospPatientInfo.setZeRenHSXM(externalInDeptPatientInfo.getZeRenHSXM()); externalInHospPatientInfo.setZhuZhiYSID(externalInDeptPatientInfo.getZhuZhiYSID()); externalInHospPatientInfo.setZhuZhiYSXM(externalInDeptPatientInfo.getZhuZhiYSXM()); externalInHospPatientInfo.setRuYuanSJ(externalInDeptPatientInfo.getRuYuanSJ()); ExternalInHospPatientAddrInfo externalInHospPatientAddrInfo = null; ExternalInHospPatientLiaisonInfo externalInHospPatientLiaisonInfo = null; ExternalInHospPatientDiagnoseInfo externalInHospPatientDiagnoseInfo = null; List<ExternalInHospPatientAddrInfo> epai2 = epai.stream().map(map -> { ExternalInHospPatientAddrInfo info = new ExternalInHospPatientAddrInfo(); info.setDiZhiLX((String) map.get("DiZhiLX")); // åè®¾åæ®µç±»åæ¯ Integer info.setDiZhiXX((String) map.get("DiZhiXX")); info.setShengFenDM((String) map.get("ShengFenDM")); info.setShengFenMC((String) map.get("ShengFenMC")); info.setShiDiQDM((String) map.get("ShiDiQDM")); info.setShiDiQMC((String) map.get("ShiDiQMC")); info.setXianQuDM((String) map.get("XianQuDM")); info.setXianQuMC((String) map.get("XianQuMC")); info.setXiangZhenDM((String) map.get("XiangZhenDM")); info.setXiangZhenMC((String) map.get("XiangZhenMC")); info.setCunJiDM((String) map.get("CunJiDM")); info.setQiTaXX((String) map.get("QiTaXX")); info.setYouBian((String) map.get("YouBian")); return info; }).collect(Collectors.toList()); List<ExternalInHospPatientLiaisonInfo> epli2 = epli.stream().map(map -> { ExternalInHospPatientLiaisonInfo info = new ExternalInHospPatientLiaisonInfo(); info.setLianXiRXM((String) map.get("LianXiRXM")); info.setLianXiRDH((String) map.get("LianXiRDH")); info.setGuanXiDM((String) map.get("GuanXiDM")); info.setGuanXiMC((String) map.get("GuanXiMC")); return info; }).collect(Collectors.toList()); externalInHospPatientInfo.setExternalInHospPatientLiaisonInfos(epli2); List<ExternalInHospPatientDiagnoseInfo> hospPatientDiagnoseInfos2 = hospPatientDiagnoseInfos.stream().map(map -> { ExternalInHospPatientDiagnoseInfo info = new ExternalInHospPatientDiagnoseInfo(); info.setZhenDuanID((String) map.get("ZhenDuanID")); info.setZhenDuanMC((String) map.get("ZhenDuanMC")); return info; }).collect(Collectors.toList()); if (CollectionUtils.isNotEmpty(epai)) externalInHospPatientAddrInfo = epai2.get(0); if (CollectionUtils.isNotEmpty(epli)) externalInHospPatientLiaisonInfo = epli2.get(0); if (CollectionUtils.isNotEmpty(hospPatientDiagnoseInfos)) externalInHospPatientDiagnoseInfo = hospPatientDiagnoseInfos2.get(0); //æ°å¢æ£è åºæ¬ä¿¡æ¯ PatArchive patArchive = addPatArchive(externalInHospPatientInfo, externalInHospPatientAddrInfo, externalInHospPatientLiaisonInfo); //æ°å¢æ£è å ¥é¢ä¿¡æ¯ Boolean aBoolean = addPadInhospInfo(externalInHospPatientInfo, patArchive, externalInHospPatientDiagnoseInfo); return aBoolean; } @Override public Boolean cancelInHospInfo(Map dataMap) { log.error("ServiceExternalServiceImpl---cancelInHospInfoçæ°å¢çå¼ä¸ºï¼{}", dataMap); Map yeWuXX = (Map) dataMap.get("YeWuXX"); @@ -261,6 +328,7 @@ ExternalInHospPatientInfo externalInHospPatientInfo = BeanUtil.mapToBean(BingRenXX, ExternalInHospPatientInfo.class, true); PatMedInhosp patMedInhosp = new PatMedInhosp(); patMedInhosp.setInhospno(externalInHospPatientInfo.getBingAnHao()); patMedInhosp.setSerialnum(externalInHospPatientInfo.getJiuZhenYWID()); List<PatMedInhosp> patMedInhospList = patMedInhospMapper.selectPatMedInhospList(patMedInhosp); for (PatMedInhosp patMedInhosp1 : patMedInhospList) { String tagname = patMedInhospMapper.getTagnameBypatid(patMedInhosp1.getPatid()); @@ -333,6 +401,7 @@ PatMedInhosp patMedInhosp = new PatMedInhosp(); patMedInhosp.setInhospno(externalInHospPatientInfo.getBingAnHao()); patMedInhosp.setSerialnum(externalInHospPatientInfo.getJiuZhenYWID()); List<PatMedInhosp> patMedInhospList = patMedInhospMapper.selectPatMedInhospList(patMedInhosp); for (PatMedInhosp patMedInhosp1 : patMedInhospList) { String tagname = patMedInhospMapper.getTagnameBypatid(patMedInhosp1.getPatid()); @@ -410,7 +479,7 @@ patMedInhosp1.setOrgid(ObjectUtils.isNotEmpty(BingRenXX.get("ZuZhiJGID")) ? BingRenXX.get("ZuZhiJGID").toString() : null); patMedInhosp1.setPatno(ObjectUtils.isNotEmpty(BingRenXX.get("BingRenID")) ? BingRenXX.get("BingRenID").toString() : null); patMedInhosp1.setInhospno(ObjectUtils.isNotEmpty(BingRenXX.get("BingAnHao")) ? BingRenXX.get("BingAnHao").toString() : null); patMedInhosp1.setSerialnum(ObjectUtils.isNotEmpty(BingRenXX.get("BingAnHao")) ? BingRenXX.get("BingAnHao").toString() : null); patMedInhosp1.setSerialnum(ObjectUtils.isNotEmpty(BingRenXX.get("JiuZhenYWID")) ? BingRenXX.get("JiuZhenYWID").toString() : null); } patMedInhosp1.setPatid(patArchive.getId()); patMedInhosp1.setPatname(patArchive.getName()); @@ -430,6 +499,7 @@ ExternalInHospPatientInfo externalInHospPatientInfo = BeanUtil.mapToBean(BingRenXX, ExternalInHospPatientInfo.class, true); PatMedInhosp patMedInhosp = new PatMedInhosp(); patMedInhosp.setInhospno(externalInHospPatientInfo.getBingAnHao()); patMedInhosp.setSerialnum(externalInHospPatientInfo.getJiuZhenYWID()); List<PatMedInhosp> patMedInhospList = patMedInhospMapper.selectPatMedInhospList(patMedInhosp); for (PatMedInhosp patMedInhosp1 : patMedInhospList) { String tagname = patMedInhospMapper.getTagnameBypatid(patMedInhosp1.getPatid()); @@ -490,7 +560,7 @@ PatMedOuthosp patMedOuthosp = new PatMedOuthosp(); patMedOuthosp.setOuthospno(externalInHospPatientInfo.getBingAnHao()); patMedOuthosp.setSerialnum(externalInHospPatientInfo.getBingAnHao()); patMedOuthosp.setSerialnum(ObjectUtils.isNotEmpty(yeWuXX.get("JiuZhenYWID")) ? yeWuXX.get("JiuZhenYWID").toString() : null); patMedOuthosp.setPatid(patArchive.getId()); patMedOuthosp.setPatname(externalInHospPatientInfo.getXingMing()); patMedOuthosp.setHospitalname(externalInHospPatientInfo.getZuZhiJGMC()); @@ -705,7 +775,7 @@ ExternalOperationDetail info = new ExternalOperationDetail(); info.setShouShuMCID((String) map.get("ShouShuMCID")); info.setShouShuMC((String) map.get("ShouShuMC")); info.setZhuShouSBZ((String) map.get("ZhuShouSBZ")); info.setZhuShouSBZ(ObjectUtils.isNotEmpty(map.get("ZhuShouSBZ")) ? map.get("ZhuShouSBZ").toString() : null); info.setQieKouLBDM((String) map.get("QieKouLBDM")); info.setQieKouLBMC((String) map.get("QieKouLBMC")); info.setShouShuJBDM((String) map.get("ShouShuJBDM")); @@ -760,9 +830,12 @@ } } PatArchive patArchive = new PatArchive(); //妿æ¯ååºççå°å©åï¼æ¯æ²¡æèº«ä»½è¯çï¼æä¹å¤çï¼ï¼ï¼ï¼ï¼ï¼ï¼ï¼ patArchive.setIdcardno(externalInHospPatientInfo.getZhengJianHM()); patArchive.setOrgid(externalInHospPatientInfo.getZuZhiJGID()); List<PatArchive> patArchives = patArchiveMapper.selectPatArchiveList(patArchive); List<PatArchive> patArchives = null; if (ObjectUtils.isNotEmpty(patArchive.getIdcardno())) patArchives = patArchiveMapper.selectPatArchiveList(patArchive); patArchive.setPatientno(externalInHospPatientInfo.getJiuZhenKH()); patArchive.setBirthdate(parse); patArchive.setPatidHis(externalInHospPatientInfo.getBingRenID()); @@ -803,14 +876,13 @@ if (ObjectUtils.isNotEmpty(externalInHospPatientLiaisonInfo)) patArchive.setRelativetelcode(externalInHospPatientLiaisonInfo.getLianXiRDH()); patArchive.setInhospno(externalInHospPatientInfo.getBingAnHao()); patArchive.setIdcardtype(externalInHospPatientInfo.getZhengJianLXMC()); patArchive.setUpdateTime(new Date()); if (CollectionUtils.isNotEmpty(patArchives)) { //妿ä¸ä¸ºç©ºï¼ç´æ¥å°æ¥è¯¢åºæ¥ç对象è¿å PatArchive patArchive1 = patArchives.get(0); String orgid = patArchive1.getOrgid(); if (StringUtils.isNotEmpty(orgid)) { patArchive.setUpdateTime(new Date()); patArchive.setId(patArchive1.getId()); patArchiveMapper.updatePatArchive(patArchive); } @@ -844,10 +916,12 @@ //æ°å¢æ£è å ¥é¢ä¿¡æ¯ private Boolean addPadInhospInfo(ExternalInHospPatientInfo externalInHospPatientInfo, PatArchive patArchive, ExternalInHospPatientDiagnoseInfo externalInHospPatientDiagnoseInfo) { PatMedInhosp patMedInhosp = new PatMedInhosp(); List<PatMedInhosp> patMedInhospList = null; if (ObjectUtils.isNotEmpty(externalInHospPatientInfo)) { //å»é¢é£è¾¹è¯´è¦ç¨ç æ¡å·ï¼ä¸è¦ç¨ä½é¢å· patMedInhosp.setInhospno(externalInHospPatientInfo.getBingAnHao()); patMedInhosp.setSerialnum(externalInHospPatientInfo.getZhuYuanHao()); patMedInhosp.setSerialnum(externalInHospPatientInfo.getJiuZhenYWID()); patMedInhospList = patMedInhospMapper.selectPatMedInhospList(patMedInhosp); patMedInhosp.setHospitalname(externalInHospPatientInfo.getZuZhiJGMC()); patMedInhosp.setHospitalcode(externalInHospPatientInfo.getZuZhiJGID()); patMedInhosp.setStarttime(externalInHospPatientInfo.getRuYuanSJ()); @@ -867,11 +941,18 @@ patMedInhosp.setHospitaldistrictname(externalInHospPatientInfo.getDangQianBQMC()); patMedInhosp.setLeavehospitaldistrictname(externalInHospPatientInfo.getDangQianBQMC()); patMedInhosp.setTelcode(patArchive.getTelcode()); patMedInhosp.setDrname(""); patMedInhosp.setDrname(externalInHospPatientInfo.getZhuZhiYSXM()); patMedInhosp.setDrcode(externalInHospPatientInfo.getZhuZhiYSID()); patMedInhosp.setNurseId(externalInHospPatientInfo.getZeRenHSID()); patMedInhosp.setNurseName(externalInHospPatientInfo.getZeRenHSXM()); } if (ObjectUtils.isNotEmpty(externalInHospPatientDiagnoseInfo)) { patMedInhosp.setIcd10code(StringUtils.isNotEmpty(patMedInhosp.getIcd10code()) ? patMedInhosp.getIcd10code() + "," + externalInHospPatientDiagnoseInfo.getZhenDuanID() : externalInHospPatientDiagnoseInfo.getZhenDuanID()); patMedInhosp.setDiagname(StringUtils.isNotEmpty(patMedInhosp.getDiagname()) ? patMedInhosp.getDiagname() + "," + externalInHospPatientDiagnoseInfo.getZhenDuanMC() : externalInHospPatientDiagnoseInfo.getZhenDuanMC()); // patMedInhosp.setIcd10code(StringUtils.isNotEmpty(patMedInhosp.getIcd10code()) ? patMedInhosp.getIcd10code() + "," + externalInHospPatientDiagnoseInfo.getZhenDuanID() : externalInHospPatientDiagnoseInfo.getZhenDuanID()); // patMedInhosp.setDiagname(StringUtils.isNotEmpty(patMedInhosp.getDiagname()) ? patMedInhosp.getDiagname() + "," + externalInHospPatientDiagnoseInfo.getZhenDuanMC() : externalInHospPatientDiagnoseInfo.getZhenDuanMC()); patMedInhosp.setIcd10code(externalInHospPatientDiagnoseInfo.getZhenDuanID()); patMedInhosp.setDiagname(externalInHospPatientDiagnoseInfo.getZhenDuanMC()); } if (ObjectUtils.isNotEmpty(patArchive)) { @@ -880,9 +961,16 @@ patMedInhosp.setPatname(patArchive.getName()); patMedInhosp.setSchemestatus(1L); patMedInhosp.setCreateTime(new Date()); } int i = patMedInhospMapper.insertPatMedInhosp(patMedInhosp); int i = 1; if (CollectionUtils.isNotEmpty(patMedInhospList)) { patMedInhosp.setUpdateTime(new Date()); i = patMedInhospMapper.updatePatMedInhosp(patMedInhosp); } else { patMedInhosp.setCreateTime(new Date()); i = patMedInhospMapper.insertPatMedInhosp(patMedInhosp); } if (i == 1) return true; return false; } @@ -1011,6 +1099,9 @@ case "JG_ZZ_YiLiaoZYS": log.error("å»çç»å»ç为ï¼{}", type); return addMedicalTeam(dataMap); case "JZ_ZY_RuKe": log.error("å ¥ç§çæ°æ®ä¸ºï¼{}", type); return addMedicalTeam(dataMap); } return true; } smartor/src/main/java/com/smartor/service/impl/SvyTaskSingleServiceImpl.java
@@ -266,7 +266,7 @@ serviceSubtask.setSuggest(serviceTaskVO.getSuggest()); serviceSubtask.setDelFlag(serviceTaskVO.getDelflag()); serviceSubtask.setOrgid(serviceTaskVO.getOrgguid()); serviceSubtask.setPatid(serviceTaskVO.getPatguid()); serviceSubtask.setPatguid(serviceTaskVO.getPatguid()); serviceSubtask.setSendname(serviceTaskVO.getPatname()); if (StringUtils.isNotEmpty(serviceTaskVO.getPatsex()) && serviceTaskVO.getPatsex().equals("ç·")) serviceSubtask.setSex(1L); smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
@@ -432,7 +432,7 @@ resultMap="PatArchiveOthreInfoResult"> SELECT DISTINCT a.id, a.id, a.age_unit, a.age_unit2, a.patid_his, @@ -485,7 +485,6 @@ #{tagId} </foreach> </if> </where> order by a.update_time desc </select> @@ -493,9 +492,8 @@ <select id="selectPatArchiveInfoByInhosp" parameterType="com.smartor.domain.PatArchiveReq" resultMap="PatArchiveOthreInfoResult"> select DISTINCT a.id, a.id, a.age_unit, a.age_unit2, a.inhospno, @@ -629,9 +627,8 @@ <select id="selectPatArchiveInfoByOuthosp" parameterType="com.smartor.domain.PatArchiveReq" resultMap="PatArchiveOthreInfoResult"> select DISTINCT a.id, a.id, a.age_unit, a.age_unit2, a.patid_his, @@ -669,6 +666,7 @@ a.create_time, a.isupload, a.upload_time, t.tagname, a.pattype from pat_med_outhosp d JOIN pat_archive a ON a.id = d.patid LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag GROUP BY patid ) t ON t.patid = @@ -755,6 +753,7 @@ a.create_time, a.isupload, a.upload_time, t.tagname, a.pattype from pat_med_physical d JOIN pat_archive a ON a.id = d.patid LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag GROUP BY patid ) t ON t.patid = @@ -804,7 +803,7 @@ resultMap="PatArchiveOthreInfoResult"> select distinct a.idcardno, a.idcardno, a.id, a.age_unit, a.age_unit2, @@ -891,9 +890,6 @@ <if test="diagname != null and diagname != ''"> AND d.diagname LIKE concat('%',#{diagname}, '%') </if> <if test="deptname != null and deptname != ''"> AND d.deptname LIKE concat('%',#{deptname}, '%') </if> <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size()>0"> AND d.leavehospitaldistrictcode IN <foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="(" separator="," @@ -918,14 +914,13 @@ AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid) </if> </where> order by a.update_time desc </select> <select id="selectPatArchiveInfoByOuthospQC" parameterType="com.smartor.domain.PatArchiveReq" resultMap="PatArchiveOthreInfoResult"> select distinct a.idcardno, a.idcardno, a.id, a.age_unit, a.age_unit2, @@ -963,6 +958,7 @@ a.create_time, a.isupload, a.upload_time, t.tagname, a.pattype from pat_med_outhosp d JOIN pat_archive a ON a.id = d.patid LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag GROUP BY patid ) t ON t.patid = @@ -1011,7 +1007,7 @@ resultMap="PatArchiveOthreInfoResult"> select distinct a.idcardno, a.idcardno, a.id, a.age_unit, a.age_unit2, @@ -1049,6 +1045,7 @@ a.create_time, a.isupload, a.upload_time, t.tagname, a.pattype from pat_med_physical d JOIN pat_archive a ON a.id = d.patid LEFT JOIN ( SELECT patid, GROUP_CONCAT( tagname ) AS tagname FROM pat_archivetag GROUP BY patid ) t ON t.patid = smartor/src/main/resources/mapper/smartor/PatMedInhospMapper.xml
@@ -230,7 +230,7 @@ <if test="endtime != null ">and b.endtime = #{endtime}</if> <if test="patno != null ">and b.patno = #{patno}</if> <if test="nurseId != null ">and b.nurse_id = #{nurseId}</if> <if test="nurseName != null ">and b.nurse_name = #{nurseName}</if> <if test="nurseName != null and nurseName != ''">and b.nurse_name = #{nurseName}</if> <if test="checkFlag != null ">and b.check_flag = #{checkFlag}</if> <if test="cry != null and cry == 0 ">and b.endtime is null</if> <if test="cry != null and cry == 1 ">and b.endtime is not null</if> smartor/src/main/resources/mapper/smartor/PatMedOuthospMapper.xml
@@ -69,18 +69,51 @@ <select id="selectPatMedOuthospList" parameterType="com.smartor.domain.PatMedOuthosp" resultMap="PatMedOuthospResult"> <include refid="selectPatMedOuthospVo"/> select pmo.id, pmo.outhospno, pmo.serialnum, pmo.patid, pmo.hospitalname, pmo.hospitalcode, pmo.icd10code, pmo.diagname, pmo.deptcode, pmo.deptname, pmo.drcode, pmo.drname, pmo.admitdate, pmo.orgid, pmo.del_flag, pmo.guid, pmo.update_by, pmo.update_time, pmo.create_by, pmo.create_time, pmo.isupload, pmo.upload_time, pmo.schemestatus, pmo.deptid, pmo.schemetime, pmo.hpi, pmo.patname, CONCAT(pa.age,pa.age_unit,pa.age2,pa.age_unit2) AS age, pa.telcode, pmo.mainsuit from pat_med_outhosp pmo left join pat_archive pa on pmo.patid = pa.id <where> <if test="hospitalname != null and hospitalname != ''">and hospitalname like concat('%', #{hospitalname}, pmo.del_flag=0 <if test="hospitalname != null and hospitalname != ''">and pmo.hospitalname like concat('%', #{hospitalname}, '%') </if> <if test="deptname != null and deptname != ''">and deptname like concat('%', #{deptname}, '%')</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="outhospno != null and outhospno != ''">and outhospno = #{outhospno}</if> <if test="deptname != null and deptname != ''">and pmo.deptname like concat('%', #{deptname}, '%')</if> <if test="drname != null and drname != ''">and pmo.drname like concat('%', #{drname}, '%')</if> <if test="admitdate != null ">and pmo.admitdate = #{admitdate}</if> <if test="orgid != null and orgid != ''">and pmo.orgid = #{orgid}</if> <if test="outhospno != null and outhospno != ''">and pmo.outhospno = #{outhospno}</if> </where> order by update_time desc order by pmo.update_time desc </select> <select id="selectPatMedOuthospById" parameterType="Long" resultMap="PatMedOuthospResult"> smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
@@ -75,6 +75,7 @@ <result property="sendstate" column="sendstate"/> <result property="inhospid" column="inhospid"/> <result property="patfrom" column="patfrom"/> <result property="patguid" column="patguid"/> </resultMap> <resultMap type="com.smartor.domain.ServiceSubtaskCount" id="ServiceSubtaskResult2"> @@ -90,6 +91,7 @@ task_guid, patfrom, inhospid, patguid, suggest, sendstate, endtime, @@ -174,6 +176,7 @@ </if> <if test="sex != null and sex != ''">and sex = #{sex}</if> <if test="age != null ">and age = #{age}</if> <if test="patguid != null ">and patguid = #{patguid}</if> <if test="subId != null ">and id = #{subId}</if> <if test="inhospid != null ">and inhospid = #{inhospid}</if> <if test="submit != null ">and submit = #{submit}</if> @@ -303,6 +306,7 @@ <if test="createBy != null ">and create_by = #{createBy}</if> <if test="sendname != null ">and sendname = #{sendname}</if> <if test="sfzh != null ">and sfzh = #{sfzh}</if> <if test="patguid != null ">and patguid = #{patguid}</if> </where> </select> @@ -396,6 +400,7 @@ <if test="inhospid != null ">inhospid,</if> <if test="patfrom != null ">patfrom,</if> <if test="taskGuid != null ">task_guid,</if> <if test="patguid != null ">patguid,</if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="sendname != null">#{sendname},</if> @@ -470,6 +475,7 @@ <if test="inhospid != null ">#{inhospid},</if> <if test="patfrom != null ">#{patfrom},</if> <if test="taskGuid != null ">#{taskGuid},</if> <if test="patguid != null ">#{patguid},</if> </trim> </insert> @@ -549,6 +555,7 @@ <if test="inhospid != null ">inhospid=#{inhospid},</if> <if test="patfrom != null ">patfrom=#{patfrom},</if> <if test="taskGuid != null ">task_guid=#{taskGuid},</if> <if test="patguid != null ">patguid=#{patguid},</if> </trim> where id = #{id} </update> @@ -629,6 +636,7 @@ <if test="inhospid != null ">inhospid=#{inhospid},</if> <if test="patfrom != null ">patfrom=#{patfrom},</if> <if test="taskGuid != null ">taskGuid=#{taskGuid},</if> <if test="patguid != null ">patguid=#{patguid},</if> </trim> <where> <if test="patid != null ">and patid = #{patid}</if> @@ -711,6 +719,7 @@ <if test="inhospid != null ">inhospid=#{inhospid},</if> <if test="patfrom != null ">patfrom=#{patfrom},</if> <if test="taskGuid != null ">task_guid=#{taskGuid},</if> <if test="patguid != null ">patguid=#{patguid},</if> </trim> where patid = #{patid} and taskid = #{taskid} </update> @@ -790,6 +799,7 @@ <if test="inhospid != null ">inhospid=#{inhospid},</if> <if test="patfrom != null ">patfrom=#{patfrom},</if> <if test="taskGuid != null ">task_guid=#{taskGuid},</if> <if test="patguid != null ">patguid=#{patguid},</if> </trim> where task_guid = #{taskGuid} and task_name = #{taskName} </update> @@ -904,6 +914,7 @@ patfrom, task_guid, leavediagname, patguid, leaveicd10code FROM service_subtask, JSON_TABLE(send_time_slot, '$[*]' COLUMNS (