Browse Source

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

# Conflicts:
#	svr/svr-internet-hospital-entrance/pom.xml
huangwenjie 5 years ago
parent
commit
d08e9f2b04

+ 8 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/dao/WlyyDoctorClinicRoomDao.java

@ -0,0 +1,8 @@
package com.yihu.jw.hospital.prescription.dao;
/**
 * @author huangwenjie
 * @date 2019/6/27 09:50
 */
public interface WlyyDoctorClinicRoomDao {
}

+ 26 - 2
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/EntranceService.java

@ -350,6 +350,8 @@ public class EntranceService {
                                wlyyPrescriptionInfoVO.setSupplyName(null != jsonObjectBody.get("YPYF00") ? jsonObjectBody.get("YPYF00").toString() : "");
                                wlyyPrescriptionInfoVO.setDays(null != jsonObjectBody.get("days") ? jsonObjectBody.get("days").toString() : "");
                                wlyyPrescriptionInfoVO.setFrequency(null != jsonObjectBody.get("frequency") ? jsonObjectBody.get("frequency").toString() : "");
                                //规格
                                wlyyPrescriptionInfoVO.setSpecification(null != jsonObjectBody.get("DRUG_SPEC") ? jsonObjectBody.get("DRUG_SPEC").toString() : "");
                                wlyyPrescriptionInfoVO.setDel(1);
                                wlyyPrescriptionInfoVOS.add(wlyyPrescriptionInfoVO);
                            }
@ -1500,12 +1502,34 @@ public class EntranceService {
        jsonObject.put("userName",userName);
        jsonObject.put("idCard", idCard);
        jsonObject.put("phone", phone);
        jsonObject.put("title ", title);
        jsonObject.put("title", title);
        jsonObject.put("url", url);
        jsonObject.put("content", content);
        jsonObject.put("contentString",contentString);
        String responseMsg =httpClientUtil.sendPost(serverUrl+"/interface/ehospitalNoticePush.htm",jsonObject.toString());
        System.out.println(responseMsg);
        return responseMsg;
    }
    /**
     *
     * @param openId openId
     * @return
     */
    public String getUserInfoByOpenid(String openId){
        JSONObject  jsonObject=new JSONObject ();
        jsonObject.put("openId",openId);
        String responseMsg =httpClientUtil.sendPost(serverUrl+"/interface/getUserInfoByOpenId.htm",jsonObject.toString());
        return responseMsg;
    }
    /**
     *
     * @param interfaceid 校验码,默认:100033
     * @return
     */
    public String getAccessToken(String interfaceid){
        JSONObject  jsonObject=new JSONObject ();
        jsonObject.put("interfaceid",interfaceid);
        String responseMsg =httpClientUtil.sendPost(serverUrl+"/interface/getAccessToken.htm",jsonObject.toString());
        return responseMsg;
    }

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

@ -153,6 +153,11 @@
            <artifactId>mqSdk</artifactId>
            <version>1.0</version>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
        </dependency>
        <dependency>
            <groupId>io.github.swagger2markup</groupId>
            <artifactId>swagger2markup</artifactId>

+ 29 - 1
svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/MqSdkController.java

@ -3,7 +3,6 @@ package com.yihu.jw.entrance.controller;
import com.yihu.jw.entity.base.dict.DictHospitalDeptDO;
import com.yihu.jw.entity.hospital.dict.WlyyChargeDictDO;
import com.yihu.jw.entity.hospital.mapping.HospitalDeptMappingDO;
import com.yihu.jw.hospital.prescription.service.entrance.EntranceService;
import com.yihu.jw.restmodel.hospital.prescription.WlyyOutpatientVO;
import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionVO;
@ -358,5 +357,34 @@ public class MqSdkController extends EnvelopRestEndpoint {
            return ObjEnvelop.getError(object1.get("respMsg").toString());
        }
    }
    @GetMapping(value = "/getUserInfoByOpenid")
    @ApiOperation(value = "获取用户信息")
    public ObjEnvelop getUserInfoByOpenid(
            @ApiParam(name = "openId", value = "用户openId")
            @RequestParam(value = "openId", required = true) String openId) throws Exception {
        String responseMsg = entranceService.getUserInfoByOpenid(openId);
        JSONObject object1 = JSONObject.fromObject(responseMsg);
        if (null != object1&&null!=object1.get("status") && "200".equals(object1.get("status").toString())) {
            return success(object1.get("userinfo"));
        } else {
            return ObjEnvelop.getError(null!=object1.get("message")?object1.get("message").toString():"无效openId");
        }
    }
    @GetMapping(value = "/getAccessToken")
    @ApiOperation(value = "获取accessToken")
    public ObjEnvelop getAccessToken(
            @ApiParam(name = "interfaceid", value = "校验码,默认:100033")
            @RequestParam(value = "interfaceid", required = true,defaultValue = "100033") String interfaceid) throws Exception {
        String responseMsg = entranceService.getAccessToken(interfaceid);
        JSONObject object1 = JSONObject.fromObject(responseMsg);
        if (null != object1&&null!=object1.get("respCode") && "00".equals(object1.get("respCode"))) {
            return success(object1.get("respEntity"));
        } else {
            return ObjEnvelop.getError(object1.get("respMsg").toString());
        }
    }
}