Sfoglia il codice sorgente

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

Trick 5 anni fa
parent
commit
e3b24c179b

+ 52 - 14
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -14,11 +14,16 @@ import com.yihu.jw.entity.base.score.BaseEvaluateDO;
import com.yihu.jw.entity.base.score.BaseEvaluateScoreDO;
import com.yihu.jw.entity.hospital.consult.WlyyHospitalSysDictDO;
import com.yihu.jw.entity.hospital.consult.WlyyHospitalWaitingRoomDO;
import com.yihu.jw.entity.hospital.httplog.WlyyHttpLogDO;
import com.yihu.jw.entity.hospital.mapping.DoctorMappingDO;
import com.yihu.jw.entity.hospital.prescription.WlyyOutpatientDO;
import com.yihu.jw.evaluate.score.dao.BaseEvaluateDao;
import com.yihu.jw.evaluate.score.dao.BaseEvaluateScoreDao;
import com.yihu.jw.hospital.consult.dao.HospitalWaitingRoomDao;
import com.yihu.jw.hospital.httplog.dao.WlyyHttpLogDao;
import com.yihu.jw.hospital.mapping.service.DoctorMappingService;
import com.yihu.jw.hospital.prescription.dao.OutpatientDao;
import com.yihu.jw.hospital.prescription.service.entrance.EntranceService;
import com.yihu.jw.im.dao.ConsultDao;
import com.yihu.jw.im.dao.ConsultTeamDao;
import com.yihu.jw.im.dao.ConsultTeamDoctorDao;
@ -121,6 +126,9 @@ public class ImService {
	@Value("${fastDFS.fastdfs_file_url}")
	private String fastdfs_file_url;
	
	@Value("${demo.flag}")
	private boolean demoFlag;
	
	@Autowired
	private JdbcTemplate jdbcTemplate;
	
@ -130,6 +138,13 @@ public class ImService {
	@Autowired
	private OutpatientDao outpatientDao;
	
	@Autowired
	private EntranceService entranceService;
	@Autowired
	private DoctorMappingService doctorMappingService;
	@Autowired
	private WlyyHttpLogDao wlyyHttpLogDao;
	
	
	
	/**
@ -877,13 +892,45 @@ public class ImService {
	public JSONObject addPrescriptionConsult(String outpatientCode, String patient,String doctorCode, ConsultTeamDo ct, String reason, Integer type) throws Exception {
		
		synchronized (outpatientCode.intern()) {
			
			//1、获取his就诊记录详情(保存续方表、药品续方信息表、续方疾病类型表)
			WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findOne(outpatientCode);
			
			//2. 调用HIS挂号接口---START  移到CONTROLER层,直接调用挂号接口
//			DoctorMappingDO doctorMappingDO = doctorMappingService.findMappingCode(doctorCode,wlyyOutpatientDO.getHospital());
//			if(doctorMappingDO==null){
//				throw new RuntimeException("未找到医生映射信息");
//			}
//
//			net.sf.json.JSONObject rs = entranceService.BS10111(wlyyOutpatientDO.getCardNo(),doctorMappingDO.getMappingCode(),wlyyOutpatientDO.getDept(),null,wlyyOutpatientDO.getWinNo(),demoFlag);
//			String rsCode = (String)rs.get("@RESULT");
//			if("0".equals(rsCode)){
//				//存储挂号号
//				String serialNo = (String)rs.get("serial_no");
//				wlyyOutpatientDO.setRegisterNo(serialNo);
//				String conNo = (String)rs.get("@times");
//				wlyyOutpatientDO.setConNo(conNo);
//			}
//
//			//保存日志
//			WlyyHttpLogDO log = new WlyyHttpLogDO();
//			log.setCode("registerOutPatient");
//			log.setName("挂号");
//			log.setPatient(wlyyOutpatientDO.getPatient());
//			log.setDoctor(doctorCode);
//			log.setResponse(rs.toString());
//			log.setRequest("outPatientId="+outpatientCode+"&doctor="+doctorCode);
//			log.setStatus(rsCode);
//			log.setCreateTime(new Date());
//			wlyyHttpLogDao.save(log);
			
			// 调用HIS挂号接口---END
			
			
			/**
			 * toto 判断是否存在未审核的复诊
			 */
//			String check = prescriptionInfoService.presCheckState(jwCode);
//			if ("0".equals(check)) {//存在未审核的续方
//				return -1;
//			}
			
			
			BaseDoctorDO doctor = baseDoctorDao.findById(doctorCode);
@ -891,8 +938,7 @@ public class ImService {
			// 查询患者信息
			BasePatientDO p = basePatientDao.findById(patient);
			
			//1、获取his就诊记录详情(保存续方表、药品续方信息表、续方疾病类型表)
			WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findOne(outpatientCode);
			
			
			if(!"0".equals(wlyyOutpatientDO.getStatus())){
				throw new RuntimeException("该就诊记录已被取消,无法接单!");
@ -920,14 +966,6 @@ public class ImService {
			// 设置患者信息
			ct.setPatient(patient);
			ct.setSymptoms(wlyyOutpatientDO.getDescription());
//			if (1 == type) {
//				ct.setSymptoms("高血压");
//			} else if (2 == type) {
//				ct.setSymptoms("糖尿病");
//			} else if (3 == type) {
//				ct.setSymptoms("高血压,糖尿病");
//			} else {
//			}
			
			// 设置患者姓名
			ct.setName(p.getName());

+ 5 - 0
svr/svr-internet-hospital-entrance/pom.xml

@ -100,6 +100,11 @@
            <artifactId>base-service</artifactId>
            <version>${parent.version}</version>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>im-service</artifactId>
            <version>2.0.0</version>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-web</artifactId>

+ 17 - 2
svr/svr-internet-hospital-entrance/src/main/resources/application.yml

@ -43,12 +43,18 @@ express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
  sf_check_word: QkeIfIvQdheqIv2cVSgAUnBU29lfNbVk
# 上传文件临时路径配置
FileTempPath:
  upload_temp_path : /var/local/temp
  image_path : /var/local/upload/images
  voice_path : /var/local/upload/voice
  chat_file_path : /var/local/upload/chat
---
spring:
  profiles: jwdev
  datasource:
    url: jdbc:mysql://172.26.0.114/base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true
    url: jdbc:mysql://172.26.0.104/base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true
    username: ssgg
    password: ssgg@jkzl2019
@ -61,6 +67,9 @@ hospital:
  mqPwd: 123456
  SourceSysCode: S60
  TargetSysCode: S01
im:
  im_list_get: http://172.26.0.105:3000/
  data_base_name: im_internet_hospital
---
spring:
  profiles: jwtest
@ -78,6 +87,9 @@ hospital:
  mqPwd: 123456
  SourceSysCode: S60
  TargetSysCode: S01
im:
  im_list_get: http://172.26.0.105:3000/
  data_base_name: im_internet_hospital
---
spring:
  profiles: jwprod
@ -94,4 +106,7 @@ hospital:
  mqUser: JKZL
  mqPwd: 123456
  SourceSysCode: S60
  TargetSysCode: S01
  TargetSysCode: S01
im:
  im_list_get: http://172.16.1.42:3000/
  data_base_name: im

+ 5 - 0
svr/svr-internet-hospital-job/pom.xml

@ -80,6 +80,11 @@
            <artifactId>base-service</artifactId>
            <version>${parent.version}</version>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>im-service</artifactId>
            <version>2.0.0</version>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-exception</artifactId>

+ 20 - 4
svr/svr-internet-hospital-job/src/main/java/com/yihu/jw/service/channel/PrescriptionStatusUpdateService.java

@ -7,13 +7,13 @@ import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionDiagnosisDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionInfoDO;
import com.yihu.jw.hospital.prescription.dao.*;
import com.yihu.jw.im.service.ImService;
import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionDiagnosisVO;
import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionInfoVO;
import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionVO;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.status.EnvelopStatus;
import com.yihu.jw.util.http.HttpUtils;
import io.swagger.annotations.ApiParam;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -21,9 +21,6 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestParam;
import java.text.SimpleDateFormat;
import java.util.*;
/**
@ -51,6 +48,8 @@ public class PrescriptionStatusUpdateService {
    private PrescriptionInfoDao prescriptionInfoDao;
    @Autowired
    private OutpatientDao outpatientDao;
    @Autowired
    private ImService imService;
    public void autoPush() throws Exception{
        //获取所有就诊中已挂号、已下临时处方、并且未结束的处方
@ -98,6 +97,23 @@ public class PrescriptionStatusUpdateService {
                //如果状态为100,门诊记录需要变更为结束
//               wlyyPrescriptionVOS.get(0);
                wlyyPrescriptionDO.setStatus(wlyyPrescriptionVO.getStatus());
                //调用im发送模板消息
                /**
                 * 续方取消:-3 支付过期取消,-2 患者自己取消 ,-1 医生取消
                 * 候诊中:0 候诊中
                 * 就诊中:10 诊断中,11 药师审核失败 / 调整中,12  药师审核完成,13  开方失败/调整中
                 * 待支付:20 诊断完成/开方成功/待支付,21 支付失败/待支付中
                 * 待取药:30 支付成功/等待配药,31 配药成功/等待取药,32 配送中
                 * 已完成:100 已完成/未评价 ,101 已完成已经评价
                 */
                try {
                    if(13<wlyyPrescriptionVO.getStatus()){
                        imService.pushPrescriptionImMessage(wlyyPrescriptionVO);
                    }
                } catch (Exception e) {
                    logger.error("im异常:"+e.getMessage());
                    e.printStackTrace();
                }
                //用处方号获取不到处方时,重新更新处方到本地
                if(!preExistFlag){
                    //删除原有药品信息

+ 15 - 2
svr/svr-internet-hospital-job/src/main/resources/application.yml

@ -45,6 +45,12 @@ express:
quartz:
  name: schedulerFactoryBean
# 上传文件临时路径配置
FileTempPath:
  upload_temp_path : /var/local/temp
  image_path : /var/local/upload/images
  voice_path : /var/local/upload/voice
  chat_file_path : /var/local/upload/chat
---
spring:
@ -65,7 +71,9 @@ hospital:
  mqPwd: 123456
  SourceSysCode: S60
  TargetSysCode: S01
im:
  im_list_get: http://172.26.0.105:3000/
  data_base_name: im_internet_hospital
---
spring:
@ -86,7 +94,9 @@ hospital:
  mqPwd: 123456
  SourceSysCode: S60
  TargetSysCode: S01
im:
  im_list_get: http://172.26.0.105:3000/
  data_base_name: im_internet_hospital
---
spring:
  profiles: jwprod
@ -106,3 +116,6 @@ hospital:
  mqPwd: 123456
  SourceSysCode: S60
  TargetSysCode: S01
im:
  im_list_get: http://172.16.1.42:3000/
  data_base_name: im

+ 9 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/DoctorConsultEndpoint.java

@ -103,6 +103,15 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
		
			JSONObject result = new JSONObject();
			synchronized (outpatientCode.intern()){
				
//				//1.调用挂号接口
//				net.sf.json.JSONObject rs = prescriptionService.registerOutPatient(outpatientCode,doctorCode);
//				String rsCode = (String)rs.get("@RESULT");
//				if(!"0".equals(rsCode)){
//					return failed("挂号失败,无法发起咨询");
//				}
				
				//2.
				result = imService.addPrescriptionConsult(outpatientCode, patientCode,doctorCode,consult,reason,type);
			}
//			if (res == -1) {