Browse Source

长处方

trick9191 7 years ago
parent
commit
cfdb73b7f2

+ 2 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/interceptors/DoctorInterceptor.java

@ -125,6 +125,8 @@ public class DoctorInterceptor extends BaseInterceptor {
                tempMap = SystemData.doctorTokens;
            } else if (platform == 4) {
                tempMap = SystemData.doctorPCTokens;
            }else if(platform ==5){
                tempMap = SystemData.doctorWXTokens;
            }
            token = tempMap.get(uid);
            if (token == null) {

+ 9 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/prescription/PrescriptionInfoService.java

@ -1169,7 +1169,7 @@ public class PrescriptionInfoService extends BaseService {
        return rs;
    }
    public JSONArray getDoctorPrescriptionExpressage(Integer teamCode, String nameKey, String startDate, String endDate, String hospital, String state, String dispensaryType, String AllocationType, Integer page, Integer size) {
    public List<Map<String,Object>> getDoctorPrescriptionExpressage(Integer teamCode, String nameKey, String startDate, String endDate, String hospital, String state, String dispensaryType, String AllocationType, Integer page, Integer size) {
        StringBuffer pre_sql = new StringBuffer("SELECT " +
                " p.`name`, " +
@ -1182,7 +1182,13 @@ public class PrescriptionInfoService extends BaseService {
                " pr.doctor, " +
                " pr.dispensary_type AS dispensaryType," +
                " e.expressage_code AS expressageCode, " +
                " e.expressage_name AS expressageName " +
                " e.expressage_name AS expressageName, " +
                " e.expressage_hospital_address AS expressageHospitalAddress, " +
                " e.expressage_hospital_name AS expressageHospitalName, " +
                " e.expressage_hospital_code AS expressageHospitalCode," +
                " e.patient_hospital_address AS patientHospitalAddress, " +
                " e.patient_hospital_name AS patientHospitalName, " +
                " e.patient_hospital_code AS patientHospitalCode " +
                " FROM " +
                " wlyy_prescription pr " +
                " LEFT JOIN wlyy_patient p ON pr.patient = p.`code` " +
@ -1198,7 +1204,7 @@ public class PrescriptionInfoService extends BaseService {
            map.put("prescriptionInfo", prescriptionDiagnosisService.getPrescriptionInfo(code));
            map.put("prescriptionDt", prescriptionDiagnosisService.getPrescriptionDiagnosis(code));
        }
        return new JSONArray(rs);
        return rs;
    }
    public JSONObject getDoctorPrescriptionExpressageTotal(Integer teamCode, String nameKey, String startDate, String endDate, String hospital, String state, String dispensaryType, String AllocationType) {

+ 2 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/common/account/TokenService.java

@ -62,6 +62,8 @@ public class TokenService extends BaseService {
			SystemData.doctorTokens.put(user, token);
		}else if(platform == 4){
			SystemData.doctorPCTokens.put(user,token);
		}else if(platform == 5){
			SystemData.doctorWXTokens.put(user,token);
		}
		return token;
	}

+ 2 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/util/SystemData.java

@ -13,4 +13,6 @@ public class SystemData {
	public static Map<String, Token> doctorPCTokens = new HashMap<String, Token>(); // 4
	// 患者验证信息
	public static Map<String, Token> patientTokens = new HashMap<String, Token>(); // 3
	// 医生验证信息
	public static Map<String, Token> doctorWXTokens = new HashMap<String, Token>(); // 5
}

+ 2 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/account/LoginController.java

@ -99,7 +99,7 @@ public class LoginController extends BaseController {
     *
     * @param mobile   手机号
     * @param captcha  短信验证码
     * @param platform // 1患者端,2医生端app,3微信公众号wechat,4 IM医生端pc, PC端取药系统
     * @param platform // 1患者端,2医生端app,3微信公众号wechat,4 IM医生端pc, PC端取药系统,5医生助手公众号
     * @param password 密码
     * @return
     */
@ -145,8 +145,7 @@ public class LoginController extends BaseController {
                    Token token = tokenService.findDoctorToken(doctor.getCode());
                    if (token != null && platform == 4 && getIMEI().equals(token.getImei())) {
                        //pc版本要做单点登陆 所以如果platform =4 并且 token存在直接返回之前的token
                    } else {
                    }else {
                        // 用户校验通过,生成token
                        token = tokenService.newToken(doctor.getCode(), getIMEI(), platform);
                    }