jh-module-ecg/jh-module-ecg-biz/pom.xml
@@ -158,6 +158,11 @@ <version>3.5.5</version> </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-bindings-soap</artifactId> <version>3.5.5</version> </dependency> <dependency> <groupId>javax.xml.ws</groupId> <artifactId>jaxws-api</artifactId> <version>2.3.1</version> jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/AppointmentController.java
@@ -125,6 +125,7 @@ @Operation(summary = "è·å¾é¢çº¦å页") @PreAuthorize("@ss.hasPermission('ecg:appointment:query')") public CommonResult<PageResult<AppointmentRespVO>> getAppointmentPage(@Valid AppointmentPageReqVO pageReqVO) { pageReqVO.setStatus("1"); PageResult<AppointmentDO> pageResult = appointmentService.getAppointmentPage(pageReqVO); return success(BeanUtils.toBean(pageResult, AppointmentRespVO.class)); } jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/vo/AppointmentPageReqVO.java
@@ -79,7 +79,10 @@ @Schema(description = "é¢çº¦æ¥æºï¼Xç³»ç»ãæ¤å£«æå¨é¢çº¦") private String bookSrc; @Schema(description = "ç³è¯·åç¶æ") private String status; @Schema(description = "已仿¬¾") private Integer paid; } } jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/appointment/vo/AppointmentSaveReqVO.java
@@ -89,6 +89,6 @@ @Schema(description = "已仿¬¾") private Integer paid; @TableField(exist = false) // @TableField(exist = false) private String status; } jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devrent/DevRentController.java
@@ -79,11 +79,12 @@ @Operation(summary = "设å¤é¢ç¨å®æ") @PreAuthorize("@ss.hasPermission('ecg:doctor:task')") public CommonResult<Long> devReady(@Valid @RequestBody DevRentSaveReqVO createReqVO) { String userHisId = SecurityFrameworkUtils.getLoginUserHisId(); String userNickname = SecurityFrameworkUtils.getLoginUserNickname(); createReqVO.setOperater(userNickname); CommonResult<Long> result = devRentService.readyOperation(createReqVO); try { String userNickname = SecurityFrameworkUtils.getLoginUserNickname(); String userHisId = SecurityFrameworkUtils.getLoginUserHisId(); Long rentId = createReqVO.getId(); devRentService.feeConfirm(rentId, userHisId, userNickname, true); // æ æ 䏿£æ¥è¿åå¼ } catch (Exception e) { jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/devrent/vo/DevRentSaveReqVO.java
@@ -73,4 +73,7 @@ @Schema(description = "æ£è 详æ ") PatDetails patDetails; @Schema(description = "æä½äºº") String operater; } jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/doctor/DoctorController.java
@@ -194,7 +194,7 @@ ).toList(); // è¿æ»¤åº [å®è£ ä¸] çï¼åå¤å«å· 该工ä½åºè¯¥ æå¤åªæä¸ä¸ª [å®è£ ä¸] if (installingQueueDOList.size() > 0) { QueueDO onStageItem = installingQueueDOList.getFirst(); QueueDO onStageItem = installingQueueDOList.get(0); CallSaveReqVO callSaveReqVO = BeanUtils.toBean(onStageItem, CallSaveReqVO.class); callSaveReqVO.setId(null); callSaveReqVO.setCallType(1); // è£ æºå«å· jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/appointment/AppointmentMapper.java
@@ -8,6 +8,7 @@ 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.time.LocalDate; import java.util.List; @@ -39,6 +40,7 @@ .eqIfPresent(AppointmentDO::getBookCheckType, reqVO.getBookCheckType()) .eqIfPresent(AppointmentDO::getBookSrc, reqVO.getBookSrc()) .eqIfPresent(AppointmentDO::getPaid, reqVO.getPaid()) .eqIfPresent(AppointmentDO::getStatus, reqVO.getStatus()) .orderByDesc(AppointmentDO::getId)); } @@ -49,6 +51,9 @@ @Select("select * from lihu.appointment where pat_id = #{patId} and book_check_type = #{checkType} and to_days(book_date) = to_days(Now()) limit 1") AppointmentDO getByPatAndCheckTypeAndBookDate(@Param("patId") String patId, @Param("checkType") Integer checkType); @Update("update lihu.appointment set status = #{status} where apply_no = #{applyNo};") Integer updateStatusByApplyNo(@Param("applyNo") String applyNo, @Param("status") String status); @Select("select * from lihu.appointment where episode_id = #{episodeId} and apply_no = #{applyNo} limit 1") AppointmentDO getByEpisodeIdAndApplyNo(@Param("episodeId") String episodeId, @Param("applyNo") String applyNo); jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/queue/QueueMapper.java
@@ -214,6 +214,11 @@ """) QueueDO getBedFirstQueueItemByStatus(@Param("roomId")Long roomId, @Param("bedNo")String bedNo, @Param("curStatus")Integer curStatus); @Select(""" SELECT * from lihu.queue where apply_no = #{applyNo} and status = #{curStatus} order by seq_num, book_timeslot limit 1 """) QueueDO getBedFirstQueueItemByApplyNo(@Param("applyNo")String applyNo, @Param("curStatus")Integer curStatus); // æä¸ªè¯å®¤èå´å [å·²é¢ç¨] [å·²å¬å-å®è£ ] äººå æ¢å , 伿´æ° [å·¥ä½å·] // 没æé宿£æ¥ç±»åï¼ä¸è¦ä½¿ç¨æ¶é´æ§½ @Select("<script> " + jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/appointment/AppointmentServiceImpl.java
@@ -371,6 +371,7 @@ // å°AppointmentDO转æ¢ä¸ºAppointmentSaveReqVOå¹¶ä¿å AppointmentSaveReqVO saveReqVO = BeanUtils.toBean(appointment, AppointmentSaveReqVO.class); saveReqVO.setStatus("1"); return createAppointment(saveReqVO); } catch (Exception e) { log.error("[handleAppointmentCreate][å¤çé¢çº¦å建失败 dataMap({})]", dataMap, e); @@ -501,7 +502,8 @@ // ä»dataMap䏿åç³è¯·åå· String status = Optional.ofNullable(dataMap.get("controlActProcess")).map(controlActProcess -> (Map<String, Object>) controlActProcess).map(controlActProcess -> (Map<String, Object>) controlActProcess.get("subject")).map(subject -> (Map<String, Object>) subject.get("placerGroup")).map(placerGroup -> (Map<String, Object>) placerGroup.get("component2")).map(component2 -> (Map<String, Object>) component2.get("observationRequest")).map(observationRequest -> (Map<String, Object>) observationRequest.get("component1")).map(component1 -> (Map<String, Object>) component1.get("processStep")).map(processStep -> (Map<String, Object>) processStep.get("code")).map(code -> (Map<String, Object>) code.get("displayName")).map(displayName -> (String) displayName.get("value")).orElseThrow(() -> exception(APPOINTMENT_CREATE_FAIL)); // String status = Optional.ofNullable(dataMap.get("controlActProcess")).map(controlActProcess -> (Map<String, Object>) controlActProcess).map(controlActProcess -> (Map<String, Object>) controlActProcess.get("subject")).map(subject -> (Map<String, Object>) subject.get("placerGroup")).map(placerGroup -> (Map<String, Object>) placerGroup.get("component2")).map(component2 -> (Map<String, Object>) component2.get("observationRequest")).map(observationRequest -> (Map<String, Object>) observationRequest.get("component1")).map(component1 -> (Map<String, Object>) component1.get("processStep")).map(processStep -> (Map<String, Object>) processStep.get("code")).map(code -> (Map<String, Object>) code.get("displayName")).map(displayName -> (String) displayName.get("value")).orElseThrow(() -> exception(APPOINTMENT_CREATE_FAIL)); String status = Optional.ofNullable(dataMap.get("controlActProcess")).map(controlActProcess -> (Map<String, Object>) controlActProcess).map(controlActProcess -> (Map<String, Object>) controlActProcess.get("subject")).map(subject -> (Map<String, Object>) subject.get("placerGroup")).map(placerGroup -> (Map<String, Object>) placerGroup.get("component2")).map(component2 -> (Map<String, Object>) component2.get("observationRequest")).map(observationRequest -> (Map<String, Object>) observationRequest.get("component1")).map(component1 -> (Map<String, Object>) component1.get("processStep")).map(processStep -> (Map<String, Object>) processStep.get("code")).map(code -> (String) code.get("code")).orElseThrow(() -> exception(APPOINTMENT_CREATE_FAIL)); existingAppointment.setStatus(status); // å°AppointmentDO转æ¢ä¸ºAppointmentSaveReqVOå¹¶æ´æ° jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/ApplicationTemplate.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,176 @@ package cn.lihu.jh.module.ecg.service.devrent; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; public class ApplicationTemplate { /** * è¿åçXML太é¿äºï¼ä¸æ³çäºï¼ç´æ¥æ¾ä¸ªæ¨¡æ¿ï¼æéè¦ç弿¾è¿å»ï¼è¿åç»æ^O^ * * @return */ public String getXML(String applyNo, String checkStatue, String checkName, String updater, String patDeptCode, String patDeptName, String patWardCode, String patWardName, String patBedno, String lsh, String booksrc, String patid, String patName) { String xml = "<POOR_IN200902UV ITSVersion=\"XML_1.0\"\n" + " xmlns=\"urn:hl7-org:v3\"\n" + " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:hl7-org:v3 ../multicacheschemas/POOR_IN200902UV.xsd\">\n" + " <id root=\"2.16.156.10011.2.5.1.1\" extension=\"c8c67234-d026-479b-9f56-36127cb93772\"/>\n" + " <creationTime value=\"" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) + "\"/>\n" + " <interactionId root=\"2.16.156.10011.2.5.1.2\" extension=\"\"/>\n" + " <processingCode code=\"P\"/>\n" + " <processingModeCode/>\n" + " <acceptAckCode code=\"AL\"/>\n" + " <receiver typeCode=\"RCV\">\n" + " <device classCode=\"DEV\" determinerCode=\"INSTANCE\">\n" + " <id>\n" + " <item root=\"2.16.156.10011.2.5.1.3\" extension=\"\"/>\n" + " </id>\n" + " </device>\n" + " </receiver>\n" + " <sender typeCode=\"SND\">\n" + " <device classCode=\"DEV\" determinerCode=\"INSTANCE\">\n" + " <id>\n" + " <item root=\"2.16.156.10011.2.5.1.3\" extension=\"\"/>\n" + " </id>\n" + " </device>\n" + " </sender>\n" + " <controlActProcess classCode=\"CACT\" moodCode=\"EVN\">\n" + " <subject typeCode=\"SUBJ\" xsi:nil=\"false\">\n" + " <placerGroup>\n" + " <component2>\n" + " <observationRequest classCode=\"OBS\">\n" + " <id>\n" + " <item extension=\"" + applyNo + "\" root=\"2.16.156.10011.1.24\"/>\n" + " </id>\n" + " <code/>\n" + " <statusCode/>\n" + " <effectiveTime xsi:type=\"IVL_TS\"/>\n" + " <performer typeCode=\"PRF\">\n" + " <time>\n" + " <low value=\"" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) + "\"/>\n" + " </time>\n" + " <assignedEntity classCode=\"ASSIGNED\">\n" + " <id>\n" + " <item extension=\"" + updater + "\" root=\"2.16.156.10011.1.4\"/>\n" + " </id>\n" + " <assignedPerson determinerCode=\"INSTANCE\" classCode=\"PSN\">\n" + " <name xsi:type=\"BAG_EN\">\n" + " <item>\n" + " <part value=\"\"/>\n" + " </item>\n" + " </name>\n" + " </assignedPerson>\n" + " </assignedEntity>\n" + " </performer>\n" + " <location typeCode=\"LOC\" xsi:nil=\"false\">\n" + " <time/>\n" + " <serviceDeliveryLocation classCode=\"SDLOC\">\n" + " <serviceProviderOrganization determinerCode=\"INSTANCE\" classCode=\"ORG\">\n" + " <id>\n" + " <item extension=\"" + patDeptCode + "\" root=\"2.16.156.10011.1.26\"/>\n" + " </id>\n" + " <name xsi:type=\"BAG_EN\">\n" + " <item>\n" + " <part value=\"" + patDeptName + "\"/>\n" + " </item>\n" + " </name>\n" + " </serviceProviderOrganization>\n" + " </serviceDeliveryLocation>\n" + " </location>\n" + " <component1 contextConductionInd=\"true\">\n" + " <processStep classCode=\"PROC\">\n" + " <code code=\"" + checkStatue + "\" codeSystem=\"2.16.156.10011. 2.5.1.12\">\n" + " <displayName value=\"" + checkName + "\"/>\n" + " <originalText value=\"\"/>\n" + " </code>\n" + " </processStep>\n" + " </component1>\n" + " </observationRequest>\n" + " </component2>\n" + " <componentOf1 contextConductionInd=\"false\" xsi:nil=\"false\" typeCode=\"COMP\">\n" + " <encounter classCode=\"ENC\" moodCode=\"EVN\">\n" + " <id>\n" + " <item extension=\"\" root=\"2.16.156.10011.2.5.1.8\"/>\n" + " <item extension=\"" + lsh + "\" root=\"2.16.156.10011.2.5.1.9\"/>\n" + " </id>\n" + " <code codeSystem=\"2.16.156.10011.2.3.1.271\" code=\"" + booksrc + "\">\n" + " <displayName value=\"\"/>\n" + " </code>\n" + " <statusCode code=\"Active\"/>\n" + " <subject typeCode=\"SBJ\">\n" + " <patient classCode=\"PAT\">\n" + " <id>\n" + " <item root=\"2.16.156.10011.2.5.1.5\" extension=\"\"/>\n" + " <item root=\"2.16.156.10011.2.5.1.4\" extension=\"" + patid + "\"/>\n" + " <item root=\"2.16.156.10011.1.11\" extension=\"\"/>\n" + " <item root=\"2.16.156.10011.1.12\" extension=\"\"/>\n" + " </id>\n" + " <patientPerson classCode=\"PSN\" determinerCode=\"INSTANCE\" xsi:nil=\"false\">\n" + " <name xsi:type=\"DSET_EN\">\n" + " <item>\n" + " <part value=\"" + patName + "\"/>\n" + " </item>\n" + " </name>\n" + " </patientPerson>\n" + " </patient>\n" + " </subject>\n" + " <location typeCode=\"LOC\">\n" + " <time/>\n" + " <serviceDeliveryLocation classCode=\"SDLOC\">\n" + " <location classCode=\"PLC\" determinerCode=\"INSTANCE\">\n" + " <id>\n" + " <item extension=\"\"/>\n" + " </id>\n" + " <name xsi:type=\"BAG_EN\">\n" + " <item use=\"IDE\">\n" + " <part value=\"" + patBedno + "\"/>\n" + " </item>\n" + " </name>\n" + " <asLocatedEntityPartOf classCode=\"LOCE\">\n" + " <location classCode=\"PLC\" determinerCode=\"INSTANCE\">\n" + " <id>\n" + " <item extension=\"null\"/>\n" + " </id>\n" + " <name xsi:type=\"BAG_EN\">\n" + " <item use=\"IDE\">\n" + " <part value=\"null\"/>\n" + " </item>\n" + " </name>\n" + " </location>\n" + " </asLocatedEntityPartOf>\n" + " </location>\n" + " <serviceProviderOrganization classCode=\"ORG\" determinerCode=\"INSTANCE\">\n" + " <id>\n" + " <item extension=\"" + patDeptCode + "\"/>\n" + " </id>\n" + " <name xsi:type=\"BAG_EN\">\n" + " <item use=\"IDE\">\n" + " <part value=\"" + patDeptName + "\"/>\n" + " </item>\n" + " </name>\n" + " <asOrganizationPartOf classCode=\"PART\">\n" + " <wholeOrganization classCode=\"ORG\" determinerCode=\"INSTANCE\">\n" + " <id>\n" + " <item extension=\"" + patWardCode + "\"/>\n" + " </id>\n" + " <name xsi:type=\"BAG_EN\">\n" + " <item use=\"IDE\">\n" + " <part value=\"" + patWardName + "\"/>\n" + " </item>\n" + " </name>\n" + " </wholeOrganization>\n" + " </asOrganizationPartOf>\n" + " </serviceProviderOrganization>\n" + " </serviceDeliveryLocation>\n" + " </location>\n" + " </encounter>\n" + " </componentOf1>\n" + " </placerGroup>\n" + " </subject>\n" + " </controlActProcess>\n" + "</POOR_IN200902UV>"; System.out.println("-------------xmlçå¼ä¸º:" + xml); return xml; } } jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentServiceImpl.java
@@ -24,8 +24,10 @@ import cn.lihu.jh.module.ecg.enums.QueueStatusEnum; import cn.lihu.jh.module.ecg.feign.FeeConfirmFeignService; import cn.lihu.jh.module.ecg.service.queue.QueueServiceTxFunctions; import cn.lihu.jh.module.ecg.webservice.client.JHFWWebServiceClient; import cn.lihu.jh.module.ecg.webservice.WebServiceClient; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; @@ -73,8 +75,11 @@ @Resource CheckTypeMapper checkTypeMapper; @Resource private JHFWWebServiceClient jhfwWebServiceClient; @Autowired private WebServiceClient webServiceClient; @Value("${spring.profiles.active}") private String active; @Override @@ -156,6 +161,34 @@ procAffinityWhenRoutineFinish(firstOnStageQueueItem.getPatId(), checkTypeDO.getAffinityCheckTypes()); } //æ£æ¥å®æåï¼æ¤æ¶æ£æ¥ç»è®°åæäºï¼éè¦å°è¿ä¸ªååç»éæå¹³å°(线ä¸ç¯å¢æåå) if (active.equals("prod")) { if (createReqVO.getCheckType() != 100 && createReqVO.getCheckType() != 1000 && createReqVO.getCheckType() != 1100 && createReqVO.getCheckType() != 1400 && createReqVO.getCheckType() != 1500) { AppointmentDO appointmentDO = appointmentMapper.getByApplyNo(createReqVO.getApplyNo()); ApplicationTemplate app = new ApplicationTemplate(); String action = "S0405"; String message = app.getXML(createReqVO.getApplyNo(), "4", "åæ¶æ£æ¥", createReqVO.getOperater(), appointmentDO.getPatDeptCode(), appointmentDO.getPatDeptDesc(), appointmentDO.getPatWardCode(), appointmentDO.getPatWardDesc(), appointmentDO.getPatBedNo(), appointmentDO.getEpisodeId(), "" + appointmentDO.getBookSrc(), appointmentDO.getPatId(), appointmentDO.getPatName()); String s = webServiceClient.callJHFWTYRK(action, "", message); log.info("routineFinishWebServiceClientçè¿åå¼ä¸ºï¼{}", s); if (s.contains("æ´æ°æå")) { //éè¦æ ¹æ®applyNo,å°appiontment表éçstatusæ¹æ3 appointmentMapper.updateStatusByApplyNo(createReqVO.getApplyNo(), "4"); } } else { //æ£æ¥ç±»åæ¯åºè¾¹çæå¸¸è§çï¼éè¦æ ¹æ®applyNo,å°appiontment表éçstatusæ¹æ7 appointmentMapper.updateStatusByApplyNo(createReqVO.getApplyNo(), "7"); } } else { if (createReqVO.getCheckType() != 100 && createReqVO.getCheckType() != 1000 && createReqVO.getCheckType() != 1100 && createReqVO.getCheckType() != 1400 && createReqVO.getCheckType() != 1500) { //éè¦æ ¹æ®applyNo,å°appiontment表éçstatusæ¹æ3 appointmentMapper.updateStatusByApplyNo(createReqVO.getApplyNo(), "4"); } else { //æ£æ¥ç±»åæ¯åºè¾¹çæå¸¸è§çï¼éè¦æ ¹æ®applyNo,å°appiontment表éçstatusæ¹æ7 appointmentMapper.updateStatusByApplyNo(createReqVO.getApplyNo(), "7"); } } return CommonResult.success(rent_id); } @@ -180,14 +213,22 @@ throw exception(DEVICE_NOT_FREE); } // //设å¤é¢å宿åï¼æ¤æ¶æ£æ¥ç»è®°åæäºï¼éè¦å°è¿ä¸ªååç»éæå¹³å° // String action = "S0405"; // String message = ""; //设å¤é¢å宿åï¼æ¤æ¶æ£æ¥ç»è®°åæäºï¼éè¦å°è¿ä¸ªååç»éæå¹³å°(线ä¸ç¯å¢æåå) if (active.equals("prod")) { AppointmentDO appointmentDO = appointmentMapper.getByApplyNo(createReqVO.getApplyNo()); ApplicationTemplate app = new ApplicationTemplate(); String action = "S0405"; String message = app.getXML(createReqVO.getApplyNo(), "3", "æ£æ¥ç»è®°", createReqVO.getOperater(), appointmentDO.getPatDeptCode(), appointmentDO.getPatDeptDesc(), appointmentDO.getPatWardCode(), appointmentDO.getPatWardDesc(), appointmentDO.getPatBedNo(), appointmentDO.getEpisodeId(), "" + appointmentDO.getBookSrc(), appointmentDO.getPatId(), appointmentDO.getPatName()); String s = webServiceClient.callJHFWTYRK(action, "", message); log.info("webserviceçè¿åå¼ä¸ºï¼{}", s); if (s.contains("æ´æ°æå")) { //éè¦æ ¹æ®applyNo,å°appiontment表éçstatusæ¹æ3 appointmentMapper.updateStatusByApplyNo(createReqVO.getApplyNo(), "3"); } } else { appointmentMapper.updateStatusByApplyNo(createReqVO.getApplyNo(), "3"); // jhfwWebServiceClient.callJHFWTYRK(action, message); } List<Integer> jobTypeList = new ArrayList<Integer>(); jobTypeList.add(DevRentStateEnum.RECEIVED.getState()); jobTypeList.add(DevRentStateEnum.RECEIVED_CANCELLED.getState()); @@ -446,6 +487,33 @@ createReqVO.setState(DevRentStateEnum.ROUTINE_CANCELLED.getState()); updateDevRent(createReqVO); if (active.equals("prod")) { if (cancelReqVO.getCheckType() != 100 && cancelReqVO.getCheckType() != 1000 && cancelReqVO.getCheckType() != 1100 && cancelReqVO.getCheckType() != 1400 && cancelReqVO.getCheckType() != 1500) { AppointmentDO appointmentDO = appointmentMapper.getByApplyNo(createReqVO.getApplyNo()); ApplicationTemplate app = new ApplicationTemplate(); String action = "S0405"; String message = app.getXML(createReqVO.getApplyNo(), "4", "åæ¶æ£æ¥", createReqVO.getOperater(), appointmentDO.getPatDeptCode(), appointmentDO.getPatDeptDesc(), appointmentDO.getPatWardCode(), appointmentDO.getPatWardDesc(), appointmentDO.getPatBedNo(), appointmentDO.getEpisodeId(), "" + appointmentDO.getBookSrc(), appointmentDO.getPatId(), appointmentDO.getPatName()); String s = webServiceClient.callJHFWTYRK(action, "", message); log.info("routineFinishWebServiceClientçè¿åå¼ä¸ºï¼{}", s); if (s.contains("æ´æ°æå")) { //éè¦æ ¹æ®applyNo,å°appiontment表éçstatusæ¹æ3 appointmentMapper.updateStatusByApplyNo(createReqVO.getApplyNo(), "4"); } } else { //æ£æ¥ç±»åæ¯åºè¾¹çæå¸¸è§çï¼éè¦æ ¹æ®applyNo,å°appiontment表éçstatusæ¹æ7 appointmentMapper.updateStatusByApplyNo(createReqVO.getApplyNo(), "7"); } } else { if (cancelReqVO.getCheckType() != 100 && cancelReqVO.getCheckType() != 1000 && cancelReqVO.getCheckType() != 1100 && cancelReqVO.getCheckType() != 1400 && cancelReqVO.getCheckType() != 1500) { //éè¦æ ¹æ®applyNo,å°appiontment表éçstatusæ¹æ3 appointmentMapper.updateStatusByApplyNo(createReqVO.getApplyNo(), "4"); } else { //æ£æ¥ç±»åæ¯åºè¾¹çæå¸¸è§çï¼éè¦æ ¹æ®applyNo,å°appiontment表éçstatusæ¹æ7 appointmentMapper.updateStatusByApplyNo(createReqVO.getApplyNo(), "7"); } } JobRecordSaveReqVO jobRecordSaveReqVO = new JobRecordSaveReqVO(); jobRecordSaveReqVO.setRentId(rent_id); jobRecordSaveReqVO.setDevId(null); @@ -472,6 +540,11 @@ jobRecordDO.setUpdateTime(LocalDateTime.now()); jobRecordMapper.updateById(jobRecordDO); } QueueDO firstOnStageQueueItem = queueMapper.getBedFirstQueueItemByApplyNo(createReqVO.getApplyNo(), QueueStatusEnum.ONSTAGE.getStatus()); // QueueStatusEnum.ONSTAGE => QueueStatusEnum.FINISH firstOnStageQueueItem.setStatus(QueueStatusEnum.FINISH.getStatus()); // é»è®¤ç¶æ 设置 firstOnStageQueueItem.setUpdateTime(LocalDateTime.now()); queueMapper.updateById(firstOnStageQueueItem); return CommonResult.success(rent_id); } @@ -505,6 +578,29 @@ createReqVO.setId(rent_id); createReqVO.setState(DevRentStateEnum.RECEIVED_CANCELLED.getState()); updateDevRent(createReqVO); if (active.equals("prod")) { AppointmentDO appointmentDO = appointmentMapper.getByApplyNo(createReqVO.getApplyNo()); ApplicationTemplate app = new ApplicationTemplate(); String action = "S0405"; String message = app.getXML(createReqVO.getApplyNo(), "4", "åæ¶æ£æ¥", createReqVO.getOperater(), appointmentDO.getPatDeptCode(), appointmentDO.getPatDeptDesc(), appointmentDO.getPatWardCode(), appointmentDO.getPatWardDesc(), appointmentDO.getPatBedNo(), appointmentDO.getEpisodeId(), "" + appointmentDO.getBookSrc(), appointmentDO.getPatId(), appointmentDO.getPatName()); String s = webServiceClient.callJHFWTYRK(action, "", message); log.info("routineFinishWebServiceClientçè¿åå¼ä¸ºï¼{}", s); if (s.contains("æ´æ°æå")) { //éè¦æ ¹æ®applyNo,å°appiontment表éçstatusæ¹æ3 appointmentMapper.updateStatusByApplyNo(createReqVO.getApplyNo(), "4"); } } else { if (cancelReqVO.getCheckType() != 100 && cancelReqVO.getCheckType() != 1000 && cancelReqVO.getCheckType() != 1100 && cancelReqVO.getCheckType() != 1400 && cancelReqVO.getCheckType() != 1500) { //éè¦æ ¹æ®applyNo,å°appiontment表éçstatusæ¹æ3 appointmentMapper.updateStatusByApplyNo(createReqVO.getApplyNo(), "4"); } else { //æ£æ¥ç±»åæ¯åºè¾¹çæå¸¸è§çï¼éè¦æ ¹æ®applyNo,å°appiontment表éçstatusæ¹æ7 appointmentMapper.updateStatusByApplyNo(createReqVO.getApplyNo(), "7"); } } JobRecordSaveReqVO jobRecordSaveReqVO = new JobRecordSaveReqVO(); jobRecordSaveReqVO.setRentId(rent_id); @@ -565,6 +661,28 @@ createReqVO.setId(rent_id); createReqVO.setState(DevRentStateEnum.INSTALL_CANCELLED.getState()); updateDevRent(createReqVO); if (active.equals("prod")) { AppointmentDO appointmentDO = appointmentMapper.getByApplyNo(createReqVO.getApplyNo()); ApplicationTemplate app = new ApplicationTemplate(); String action = "S0405"; String message = app.getXML(createReqVO.getApplyNo(), "4", "åæ¶æ£æ¥", createReqVO.getOperater(), appointmentDO.getPatDeptCode(), appointmentDO.getPatDeptDesc(), appointmentDO.getPatWardCode(), appointmentDO.getPatWardDesc(), appointmentDO.getPatBedNo(), appointmentDO.getEpisodeId(), "" + appointmentDO.getBookSrc(), appointmentDO.getPatId(), appointmentDO.getPatName()); String s = webServiceClient.callJHFWTYRK(action, "", message); log.info("routineFinishWebServiceClientçè¿åå¼ä¸ºï¼{}", s); if (s.contains("æ´æ°æå")) { //éè¦æ ¹æ®applyNo,å°appiontment表éçstatusæ¹æ3 appointmentMapper.updateStatusByApplyNo(createReqVO.getApplyNo(), "4"); } } else { if (cancelReqVO.getCheckType() != 100 && cancelReqVO.getCheckType() != 1000 && cancelReqVO.getCheckType() != 1100 && cancelReqVO.getCheckType() != 1400 && cancelReqVO.getCheckType() != 1500) { //éè¦æ ¹æ®applyNo,å°appiontment表éçstatusæ¹æ3 appointmentMapper.updateStatusByApplyNo(createReqVO.getApplyNo(), "4"); } else { //æ£æ¥ç±»åæ¯åºè¾¹çæå¸¸è§çï¼éè¦æ ¹æ®applyNo,å°appiontment表éçstatusæ¹æ7 appointmentMapper.updateStatusByApplyNo(createReqVO.getApplyNo(), "7"); } } JobRecordSaveReqVO jobRecordSaveReqVO = new JobRecordSaveReqVO(); jobRecordSaveReqVO.setRentId(rent_id); @@ -886,6 +1004,5 @@ return "01"; } } jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/webservice/JHFWWebService.java
ÎļþÒÑɾ³ý jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/webservice/WebServiceClient.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,60 @@ package cn.lihu.jh.module.ecg.webservice; import cn.lihu.jh.module.ecg.webservice.ws.JHFWreq; import cn.lihu.jh.module.ecg.webservice.ws._0020SAMPLEBS_0020; import cn.lihu.jh.module.ecg.webservice.ws._0020SAMPLEBS_0020Soap; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; import javax.xml.ws.BindingProvider; import java.net.URL; /** * WebService客æ·ç«¯ */ @Slf4j @Component public class WebServiceClient { private static final String WSDL_URL = "http://10.0.4.36/ZHIP/Service/ZHIP.JHFWTYRK.BS.JHFWTYRK.cls?wsdl"; private static final String ENDPOINT_URL = "http://10.0.4.36/ZHIP/Service/ZHIP.JHFWTYRK.BS.JHFWTYRK.cls"; /** * è°ç¨JHFWTYRKæå¡ * * @param action æä½ç±»å * @param rdn è¯·æ±æ è¯ * @param message æ¶æ¯å 容 * @return ååºç»æ */ public String callJHFWTYRK(String action, String rdn, String message) { try { // å建æå¡å®ä¾ _0020SAMPLEBS_0020 service = new _0020SAMPLEBS_0020(new URL(WSDL_URL)); _0020SAMPLEBS_0020Soap port = service.get_0020SAMPLEBS_0020Soap(); // 设置端ç¹å°å BindingProvider bindingProvider = (BindingProvider) port; bindingProvider.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, ENDPOINT_URL); // è®¾ç½®è¶ æ¶æ¶é´ï¼å¯éï¼ bindingProvider.getRequestContext().put("javax.xml.ws.client.connectionTimeout", "30000"); bindingProvider.getRequestContext().put("javax.xml.ws.client.receiveTimeout", "30000"); // æå»ºè¯·æ±åæ° JHFWreq req = new JHFWreq(); req.setAction(action); req.setRdn(rdn); req.setMessage(message); // è°ç¨æå¡ String response = port.jhfwtyrk(req); log.info("JHFWTYRKè°ç¨æåï¼ååºç»æï¼{}", response); return response; } catch (Exception e) { log.error("JHFWTYRKè°ç¨å¤±è´¥", e); throw new RuntimeException("è°ç¨JHFWTYRKæå¡å¤±è´¥", e); } } } jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/webservice/client/JHFWWebServiceClient.java
ÎļþÒÑɾ³ý jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/webservice/dto/JHFWRequest.java
ÎļþÒÑɾ³ý jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/webservice/dto/JHFWResponse.java
ÎļþÒÑɾ³ý jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/webservice/ws/EnsMessagebody.classBinary files differ
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/webservice/ws/EnsMessagebody.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,18 @@ package cn.lihu.jh.module.ecg.webservice.ws; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Ens_Messagebody") @XmlSeeAlso({ EnsRequest.class }) public class EnsMessagebody { } jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/webservice/ws/EnsRequest.classBinary files differ
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/webservice/ws/EnsRequest.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,20 @@ package cn.lihu.jh.module.ecg.webservice.ws; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Ens_Request") @XmlSeeAlso({ JHFWreq.class }) public class EnsRequest extends EnsMessagebody { } jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/webservice/ws/JHFWTYRK.classBinary files differ
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/webservice/ws/JHFWTYRK.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,29 @@ package cn.lihu.jh.module.ecg.webservice.ws; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "req" }) @XmlRootElement(name = "JHFWTYRK") public class JHFWTYRK { protected JHFWreq req; public JHFWreq getReq() { return req; } public void setReq(JHFWreq value) { this.req = value; } } jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/webservice/ws/JHFWTYRKResponse.classBinary files differ
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/webservice/ws/JHFWTYRKResponse.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,31 @@ package cn.lihu.jh.module.ecg.webservice.ws; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "jhfwtyrkResult" }) @XmlRootElement(name = "JHFWTYRKResponse") public class JHFWTYRKResponse { @XmlElement(name = "JHFWTYRKResult", required = true) protected String jhfwtyrkResult; public String getJHFWTYRKResult() { return jhfwtyrkResult; } public void setJHFWTYRKResult(String value) { this.jhfwtyrkResult = value; } } jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/webservice/ws/JHFWreq.classBinary files differ
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/webservice/ws/JHFWreq.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,95 @@ package cn.lihu.jh.module.ecg.webservice.ws; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "JHFWreq", propOrder = { "action", "rdn", "message" }) public class JHFWreq extends EnsRequest { protected String action; protected String rdn; protected String message; /** * ��ȡaction���Ե�ֵ�� * * @return * possible object is * {@link String } * */ public String getAction() { return action; } /** * ����action���Ե�ֵ�� * * @param value * allowed object is * {@link String } * */ public void setAction(String value) { this.action = value; } /** * ��ȡrdn���Ե�ֵ�� * * @return * possible object is * {@link String } * */ public String getRdn() { return rdn; } /** * ����rdn���Ե�ֵ�� * * @param value * allowed object is * {@link String } * */ public void setRdn(String value) { this.rdn = value; } /** * ��ȡmessage���Ե�ֵ�� * * @return * possible object is * {@link String } * */ public String getMessage() { return message; } /** * ����message���Ե�ֵ�� * * @param value * allowed object is * {@link String } * */ public void setMessage(String value) { this.message = value; } } jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/webservice/ws/ObjectFactory.classBinary files differ
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/webservice/ws/ObjectFactory.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,72 @@ package cn.lihu.jh.module.ecg.webservice.ws; import javax.xml.bind.annotation.XmlRegistry; /** * This object contains factory methods for each * Java content interface and Java element interface * generated in the cn.lihu.jh.module.ecg.webservice.ws package. * <p>An ObjectFactory allows you to programatically * construct new instances of the Java representation * for XML content. The Java representation of XML * content can consist of schema derived interfaces * and classes representing the binding of schema * type definitions, element declarations and model * groups. Factory methods for each of these are * provided in this class. * */ @XmlRegistry public class ObjectFactory { /** * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: cn.lihu.jh.module.ecg.webservice.ws * */ public ObjectFactory() { } /** * Create an instance of {@link JHFWTYRK } * */ public JHFWTYRK createJHFWTYRK() { return new JHFWTYRK(); } /** * Create an instance of {@link JHFWreq } * */ public JHFWreq createJHFWreq() { return new JHFWreq(); } /** * Create an instance of {@link JHFWTYRKResponse } * */ public JHFWTYRKResponse createJHFWTYRKResponse() { return new JHFWTYRKResponse(); } /** * Create an instance of {@link EnsMessagebody } * */ public EnsMessagebody createEnsMessagebody() { return new EnsMessagebody(); } /** * Create an instance of {@link EnsRequest } * */ public EnsRequest createEnsRequest() { return new EnsRequest(); } } jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/webservice/ws/_0020SAMPLEBS_0020.classBinary files differ
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/webservice/ws/_0020SAMPLEBS_0020.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,94 @@ package cn.lihu.jh.module.ecg.webservice.ws; import java.net.MalformedURLException; import java.net.URL; import javax.xml.namespace.QName; import javax.xml.ws.Service; import javax.xml.ws.WebEndpoint; import javax.xml.ws.WebServiceClient; import javax.xml.ws.WebServiceException; import javax.xml.ws.WebServiceFeature; /** * This class was generated by the JAX-WS RI. * JAX-WS RI 2.2.9-b130926.1035 * Generated source version: 2.2 * */ @WebServiceClient(name = " SAMPLEBS ", targetNamespace = "urn:hl7-org:v3", wsdlLocation = "http://10.0.4.36/ZHIP/Service/ZHIP.JHFWTYRK.BS.JHFWTYRK.cls?wsdl") public class _0020SAMPLEBS_0020 extends Service { private final static URL _0020SAMPLEBS_0020_WSDL_LOCATION; private final static WebServiceException _0020SAMPLEBS_0020_EXCEPTION; private final static QName _0020SAMPLEBS_0020_QNAME = new QName("urn:hl7-org:v3", " SAMPLEBS "); static { URL url = null; WebServiceException e = null; try { url = new URL("http://10.0.4.36/ZHIP/Service/ZHIP.JHFWTYRK.BS.JHFWTYRK.cls?wsdl"); } catch (MalformedURLException ex) { e = new WebServiceException(ex); } _0020SAMPLEBS_0020_WSDL_LOCATION = url; _0020SAMPLEBS_0020_EXCEPTION = e; } public _0020SAMPLEBS_0020() { super(__getWsdlLocation(), _0020SAMPLEBS_0020_QNAME); } public _0020SAMPLEBS_0020(WebServiceFeature... features) { super(__getWsdlLocation(), _0020SAMPLEBS_0020_QNAME, features); } public _0020SAMPLEBS_0020(URL wsdlLocation) { super(wsdlLocation, _0020SAMPLEBS_0020_QNAME); } public _0020SAMPLEBS_0020(URL wsdlLocation, WebServiceFeature... features) { super(wsdlLocation, _0020SAMPLEBS_0020_QNAME, features); } public _0020SAMPLEBS_0020(URL wsdlLocation, QName serviceName) { super(wsdlLocation, serviceName); } public _0020SAMPLEBS_0020(URL wsdlLocation, QName serviceName, WebServiceFeature... features) { super(wsdlLocation, serviceName, features); } /** * * @return * returns _0020SAMPLEBS_0020Soap */ @WebEndpoint(name = " SAMPLEBS Soap") public _0020SAMPLEBS_0020Soap get_0020SAMPLEBS_0020Soap() { return super.getPort(new QName("urn:hl7-org:v3", " SAMPLEBS Soap"), _0020SAMPLEBS_0020Soap.class); } /** * * @param features * A list of {@link javax.xml.ws.WebServiceFeature} to configure on the proxy. Supported features not in the <code>features</code> parameter will have their default values. * @return * returns _0020SAMPLEBS_0020Soap */ @WebEndpoint(name = " SAMPLEBS Soap") public _0020SAMPLEBS_0020Soap get_0020SAMPLEBS_0020Soap(WebServiceFeature... features) { return super.getPort(new QName("urn:hl7-org:v3", " SAMPLEBS Soap"), _0020SAMPLEBS_0020Soap.class, features); } private static URL __getWsdlLocation() { if (_0020SAMPLEBS_0020_EXCEPTION!= null) { throw _0020SAMPLEBS_0020_EXCEPTION; } return _0020SAMPLEBS_0020_WSDL_LOCATION; } } jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/webservice/ws/_0020SAMPLEBS_0020Soap.classBinary files differ
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/webservice/ws/_0020SAMPLEBS_0020Soap.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,40 @@ package cn.lihu.jh.module.ecg.webservice.ws; import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebResult; import javax.jws.WebService; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.ws.RequestWrapper; import javax.xml.ws.ResponseWrapper; /** * This class was generated by the JAX-WS RI. * JAX-WS RI 2.2.9-b130926.1035 * Generated source version: 2.2 * */ @WebService(name = " SAMPLEBS Soap", targetNamespace = "urn:hl7-org:v3") @XmlSeeAlso({ ObjectFactory.class }) public interface _0020SAMPLEBS_0020Soap { /** * * @param req * @return * returns java.lang.String */ @WebMethod(operationName = "JHFWTYRK", action = "urn:hl7-org:v3/ZHIP.JHFWTYRK.BS.JHFWTYRK.JHFWTYRK") @WebResult(name = "JHFWTYRKResult", targetNamespace = "urn:hl7-org:v3") @RequestWrapper(localName = "JHFWTYRK", targetNamespace = "urn:hl7-org:v3", className = "cn.lihu.jh.module.ecg.webservice.ws.JHFWTYRK") @ResponseWrapper(localName = "JHFWTYRKResponse", targetNamespace = "urn:hl7-org:v3", className = "cn.lihu.jh.module.ecg.webservice.ws.JHFWTYRKResponse") public String jhfwtyrk( @WebParam(name = "req", targetNamespace = "urn:hl7-org:v3") JHFWreq req); } jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/webservice/ws/package-info.classBinary files differ
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/webservice/ws/package-info.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,2 @@ @javax.xml.bind.annotation.XmlSchema(namespace = "urn:hl7-org:v3", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) package cn.lihu.jh.module.ecg.webservice.ws; jh-module-ecg/jh-module-ecg-biz/src/main/resources/application.yml
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,5 @@ cxf: path: /webservice servlet: init: service-list-path: /services