Browse Source

保存门诊医生

Trick 5 years ago
parent
commit
a5ff7dd4e7

+ 5 - 2
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -1044,6 +1044,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                //更新挂号流水号
                outpatientDO.setConNo(registerDO.getConNo());
                outpatientDO.setRegisterNo(registerDO.getRegisterNo());
                outpatientDO.setAdmDate(registerDO.getCreateTime());
                outpatientDao.save(outpatientDO);
                return res;
@ -1062,6 +1063,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            outpatientDO.setRegisterNo(serialNo);
            String conNo = (String)res.get("@times");
            outpatientDO.setConNo(conNo);
            outpatientDO.setAdmDate(new Date());
            logger.info("挂号流水 @serial_no: " +serialNo+" @times: "+conNo);
            outpatientDao.save(outpatientDO);
@ -2278,7 +2280,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                                                                          String diseaseKey, String doctorNameKey,
                                                                          String jobTitleNameKey, String outpatientType,
                                                                          String keyName, String workingTime, String consultStatus,String consutlSort,Integer page,Integer pagesize) {
    
        if(page >=1){
            page --;
        }
@ -2345,7 +2347,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        sql += " order by a.total "+ consutlSort +" limit "+page * pagesize +","+pagesize;
        
        List<Map<String,Object>> list = jdbcTemplate.queryForList(sql);
    
        logger.info("findDoctorByHospitalAndDiseaseAndDept end:"+DateUtil.dateToStr(new Date(),"yyyy-MM-dd HH:mm:ss:SSS"));
        return list;
    }
    

+ 23 - 2
gateway/ag-basic/src/main/resources/application.yml

@ -27,7 +27,28 @@ spring:
      max-idle: 8 # Max number of "idle" connections in the pool. Use a negative value to indicate an unlimited number of idle connections.
      max-wait: -1 # Maximum amount of time (in milliseconds) a connection allocation should block before throwing an exception when the pool is exhausted. Use a negative value to block indefinitely.
      min-idle: 1 # Target for the minimum number of idle connections to maintain in the pool. This settings only has an effect if it is positive.
#hystrix:
#  command:
#    default:
#      execution:
#        timeout:
#          enabled: true
#        isolation:
#          thread:
#            timeoutInMilliseconds: 4800000
#Ribbon
ribbon:
#  eager-load:
#     enabled: true
#     clients: svr-authentication,svr-internet-hospital,svr-internet-hospital-entrance
  ReadTimeout: 600000
  ConnectTimeout: 600000
  SocketTimeout: 600000
#  MaxAutoRetries: 3
#  MaxAutoRetriesNextServer: 0
#  eureka:
#     enabled: true
#  sleuth:
#    sampler:
#      percentage: 1.0 #采用需要的请求的百分比 默认是0.1 即 10%
@ -45,7 +66,7 @@ zuul:
      serviceId: svr-base
    svr-authentication:
      path: /cityihealth/auth/**
      serviceId: svr-authentication
      serviceId: svr-authentication-lyx
    svr-healthy-house:
      path: /cityihealth/healthyHouse/**
      serviceId: svr-healthy-house
@ -54,7 +75,7 @@ zuul:
      serviceId: svr-patient
    svr-internet-hospital:
      path: /hospital/**
      serviceId: svr-internet-hospital
      serviceId: svr-internet-hospital-lyx
    svr-internet-hospital-entrance:
      path: /hospitalEntrance/**
      serviceId: svr-internet-hospital-entrance

+ 3 - 0
server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyLoginEndpoint.java

@ -17,6 +17,7 @@ import com.yihu.jw.security.oauth2.provider.WlyyTokenGranter;
import com.yihu.jw.security.oauth2.provider.error.WlyyOAuth2ExceptionTranslator;
import com.yihu.jw.security.service.OauthWlyyConfigService;
import com.yihu.jw.security.service.OauthYlzConfigService;
import com.yihu.jw.security.utils.DateUtil;
import com.yihu.jw.security.utils.SerializeUtil;
import com.yihu.utils.security.RSAUtils;
import org.apache.commons.collections.map.HashedMap;
@ -691,11 +692,13 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
     */
    @RequestMapping(value = "/oauth/getOauthQRCode", method = RequestMethod.GET)
    public ObjEnvelop getOauthQRCode(){
        logger.info("/oauth/getOauthQRCode");
        return ObjEnvelop.getSuccess("success", oauthYlzConfigService.getOauthQRCode());
    }
    @RequestMapping(value = "/oauth/getOauthQRCodeImg", method = RequestMethod.GET)
    public ObjEnvelop getOauthQRCodeImg(){
        logger.info("/oauth/getOauthQRCodeImg:"+ DateUtil.dateToStr(new Date(),"yyyy-MM-dd HH:mm:ss:SSS"));
        return ObjEnvelop.getSuccess("success", oauthYlzConfigService.getOauthQRCodeImg());
    }

+ 3 - 3
server/svr-authentication/src/main/java/com/yihu/jw/security/service/OauthYlzConfigService.java

@ -50,7 +50,6 @@ public class OauthYlzConfigService {
    public Map<String,Object> getOauthQRCode(){
        try {
            OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.findOne("ylz_config");
            logger.info("getOauthQRCode:",oauthYlzConfigDO.toString());
            TransRequest e = new TransRequest();
            e.setMethod("ehc.ehealthcard.authurl");
            e.setApp_id(oauthYlzConfigDO.getAppId());
@ -92,8 +91,9 @@ public class OauthYlzConfigService {
    public Map<String,Object> getOauthQRCodeImg(){
        try {
            logger.info("getOauthQRCode dao1:"+DateUtil.dateToStr(new Date(),"yyyy-MM-dd HH:mm:ss:SSS"));
            OauthYlzConfigDO oauthYlzConfigDO = oauthYlzConfigDao.findOne("ylz_config");
            logger.info("getOauthQRCode:",oauthYlzConfigDO.toString());
            logger.info("getOauthQRCode dao2:"+DateUtil.dateToStr(new Date(),"yyyy-MM-dd HH:mm:ss:SSS"));
            TransRequest e = new TransRequest();
            e.setMethod("ehc.ehealthcard.authurl");
            e.setApp_id(oauthYlzConfigDO.getAppId());
@ -111,7 +111,7 @@ public class OauthYlzConfigService {
            TransResponse re = ehcHandler.execute(e);
            String rs = com.alibaba.fastjson.JSONObject.toJSONString(re);
            logger.info("TransResponse:"+rs);
            logger.info("TransResponse:"+DateUtil.dateToStr(new Date(),"yyyy-MM-dd HH:mm:ss:SSS")+" "+rs);
            com.alibaba.fastjson.JSONObject json = (com.alibaba.fastjson.JSONObject) com.alibaba.fastjson.JSONObject.parse(rs);
            com.alibaba.fastjson.JSONObject biz = json.getJSONObject("biz_content");
            InputStream qrcode = QrcodeUtil.createQrcode(biz.getString("ehealth_authurl"),300,"jpg");

+ 3 - 3
server/svr-authentication/src/main/resources/application.yml

@ -5,9 +5,9 @@ server:
spring:
  datasource:
    driver-class-name: com.mysql.jdbc.Driver
    max-active: 20
    max-idle: 8
    min-idle: 8
    max-active: 100
    max-idle: 100
    min-idle: 10
    validation-query: SELECT 1
    test-on-borrow: true
  redis:

+ 7 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/PatientConsultEndpoint.java

@ -21,6 +21,8 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.axis.utils.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -34,7 +36,9 @@ import java.util.*;
@RequestMapping(value = BaseHospitalRequestMapping.PatientIM.PREFIX)
@Api(value = "居民端咨询IM接口", description = "居民端咨询IM接口", tags = {"居民端咨询IM接口"})
public class PatientConsultEndpoint extends EnvelopRestEndpoint {
	
	private static final Logger logger = LoggerFactory.getLogger(PatientConsultEndpoint.class);
	@Autowired
	private ImService imService;
	
@ -217,6 +221,8 @@ public class PatientConsultEndpoint extends EnvelopRestEndpoint {
	                                                 @ApiParam(name = "pagesize", value = "分页大小")
	                                                     @RequestParam(value = "pagesize",required = false) Integer pagesize
	) throws Exception{
		logger.info("findDoctorByHospitalAndDiseaseAndDept start:"+DateUtil.dateToStr(new Date(),"yyyy-MM-dd HH:mm:ss:SSS"));
		return success(prescriptionService.findDoctorByHospitalAndDiseaseAndDept(
				orgCode,dept,
				diseaseKey,doctorNameKey,