wangjun vor 4 Jahren
Ursprung
Commit
ec6483f1e8

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

@ -3038,13 +3038,23 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        String sql = "SELECT  ";
        if ("xm_ykyy_wx".equals(wxId)) {
            if (flag){
                sql = sql + "date_format(e.create_time,'YYYY-MM-DD hh24:mi:ss')  AS \"createTime\",";
                sql = sql + "date_format(e.create_time,'YYYY-MM-DD hh24:mi:ss')  AS \"expressCreateTime\",";
            }else {
                sql = sql + "to_char(e.create_time,'YYYY-MM-DD hh24:mi:ss')  AS \"createTime\",";
                sql = sql + "to_char(e.create_time,'YYYY-MM-DD hh24:mi:ss')  AS \"expressCreateTime\",";
            }
        } else {
            sql = sql + "date_format(e.create_time,'%Y-%m-%d %H:%i:%S' )  AS \"createTime\",";
            sql = sql + "date_format(e.create_time,'%Y-%m-%d %H:%i:%S' )  AS \"expressCreateTime\",";
        }
        if ("xm_ykyy_wx".equals(wxId)) {
            if (flag){
                sql = sql + "date_format(p.create_time,'YYYY-MM-DD hh24:mi:ss')  AS \"createTime\",";
            }else {
                sql = sql + "to_char(p.create_time,'YYYY-MM-DD hh24:mi:ss')  AS \"createTime\",";
            }
        } else {
            sql = sql + "date_format(p.create_time,'%Y-%m-%d %H:%i:%S' )  AS \"createTime\",";
        }
        if ("xm_ykyy_wx".equals(wxId)) {
            if (flag){

+ 6 - 3
business/base-service/src/main/java/com/yihu/jw/internet/service/InternetCommonService.java

@ -1543,8 +1543,9 @@ public class InternetCommonService extends BaseJpaService<InternetUpErrorLogDO,
                " base_evaluate_score a " +
                " JOIN base_evaluate e ON a.id = e.relation_code " +
                " JOIN base_doctor d ON d.id = a.doctor " +
                " WHERE " +
                " e.score_type = '4'";
                " JOIN wlyy_consult m ON m.id = a.relation_code  " +
                "WHERE " +
                " e.score_type = '4' and m.id != '' and m.id is not null ";
        if(StringUtils.isNotBlank(startDate)){
            yypjSql =  yypjSql + "  and a.create_time >=:startDate ";
@ -1595,7 +1596,9 @@ public class InternetCommonService extends BaseJpaService<InternetUpErrorLogDO,
                "      join base_doctor b on b.id = a.doctor" +
                "      join base_patient c on c.id = a.patient" +
                " where a.register_no is NOT NULL and a.dept is not null " +
                " and a.register_date is not null " ;
                " and a.register_date is not null " +
                " and a.doctor not in ('402803816babc778016babd0dee21112')" +
                " and a.patient not in ('2c9081aa6c2f1892016c6a26a8c102ca','39686349deff487d8f3372fc253b8417') " ;
        if(StringUtils.isNotBlank(startDate)){
            wlzlSql =  wlzlSql + "  and a.create_time >=:startDate ";
        }

+ 13 - 0
business/es-service/src/main/java/com/yihu/jw/es/service/StatisticsEsService.java

@ -4511,8 +4511,11 @@ public class StatisticsEsService {
            //开具处方数量
            Double preNum = 0.0;
            Double outNum = 0.0;
            Double isPayNum = 0.0;//已支付的处方数量
            String prescriptionRate ="";
            String prescriptionPayRate = "";
            List<SaveModel> precriptionList = elasticsearchUtil.findDateQuotaLevel1(startDate, endDate, area, level, indexes[1], SaveModel.timeLevel_ZL,"","",level2_type);
            List<SaveModel> precriptionIsPayList = elasticsearchUtil.findDateQuotaLevel1(startDate, endDate, area, level, indexes[2], SaveModel.timeLevel_ZL,"1","",level2_type);
            if(SaveModel.OrgLevel.equals(level2_type)){
                for(SaveModel saveModel:precriptionList){
@ -4531,6 +4534,16 @@ public class StatisticsEsService {
                            break;
                        }
                    }
                    for (SaveModel saveModel2:precriptionIsPayList){
                        String isPay=saveModel2.getHospital()==null?"":saveModel2.getHospital();
                        String pre=saveModel.getHospital()==null?"":saveModel.getHospital();
                        if(isPay.equalsIgnoreCase(pre)){
                            isPayNum = saveModel2.getResult1();
                            prescriptionPayRate = getRange(isPayNum.intValue(),preNum.intValue(),0);
                            jsonObject.put("prescriptionPayRate",prescriptionPayRate);
                            break;
                        }
                    }
                    if(null==saveModel.getHospital()){
                        resultArray =new JSONArray();
                    }else {

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

@ -609,6 +609,13 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
    @RequestMapping(value = "/oauth/sendCaptcha", method = RequestMethod.GET)
    public ResponseEntity<Oauth2Envelop<Captcha>> sendCaptcha(@RequestParam Map<String, String> parameters) throws Exception {
        String wxId = parameters.get("wxId");
        String key = parameters.get("key");
        String text = parameters.get("text");
        if(org.apache.commons.lang3.StringUtils.isNotBlank(key)&& org.apache.commons.lang3.StringUtils.isNotBlank(text)){
            if(!verifyCaptcha(key,text)){
                throw new ImgCaptchaException("img_captcha error");
            }
        }
        if("xm_ykyy_wx".equals(wxId)){
           return sendYKCaptcha(parameters);
        }else if("xm_zsyy_wx".equals(wxId)){

+ 8 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/doctor/BaseDoctorService.java

@ -562,6 +562,14 @@ public class BaseDoctorService extends BaseJpaService<BaseDoctorDO, BaseDoctorDa
        try {
            baseDoctorDO = objectMapper.readValue(doctor.toJSONString(),BaseDoctorDO.class);
            BaseDoctorDO oldDoctor = baseDoctorDao.findOne(baseDoctorDO.getId());
            if (oldDoctor!=null&&!oldDoctor.getIdcard().equalsIgnoreCase(baseDoctorDO.getIdcard())){
              List<BaseDoctorDO> isExist =  baseDoctorDao.findByIdcard(baseDoctorDO.getIdcard());
              if (isExist!=null&&isExist.size()>0){
                  result.put("msg","当前身份证号已存在,请检查身份证号是否正确");
                  result.put("response", ConstantUtils.FAIL);
                  return result.toJSONString();
              }
            }
            baseDoctorDO.setPassword(oldDoctor.getPassword());
            baseDoctorDO.setEnabled(baseDoctorDO.getDel().equalsIgnoreCase("1")?1:0);
        } catch (IOException e) {

+ 18 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/hospital/WlyyFamilyMemberController.java

@ -91,6 +91,15 @@ public class WlyyFamilyMemberController extends EnvelopRestEndpoint {
        String medicareType = obj.getString("medicareType");
        String medicare = obj.getString("medicare");
        String clinicId = obj.getString("clinicId");
        /*String key = obj.getString("key");
        String text = obj.getString("text");
        if(org.apache.commons.lang3.StringUtils.isNotBlank(key)&& org.apache.commons.lang3.StringUtils.isNotBlank(text)){
            if(!verifyCaptcha(key,text)){
                mixEnvelop.setStatus(408);
                mixEnvelop.setMessage("图形验证码输入错误");
                return mixEnvelop;
            }
        }*/
        net.sf.json.JSONArray jsonArray = new JSONArray();
        if("xm_ykyy_wx".equalsIgnoreCase(wxId)){
            jsonArray = ykyyEntranceService.findHisPatientBymMedicare(medicare,clinicId,false);
@ -375,4 +384,13 @@ public class WlyyFamilyMemberController extends EnvelopRestEndpoint {
                                    @RequestParam(value = "id", required = false) String id) throws ParseException {
        return success(wlyyFamilyMemberService.findMemberById(id));
    }
    public boolean verifyCaptcha(String key,String text){
        boolean pass = false;
        String captcha = redisTemplate.opsForValue().get(key).toString();
        if (org.apache.commons.lang3.StringUtils.isNotBlank(captcha)&& captcha.equals(text.toLowerCase())){
            pass = true;
            redisTemplate.delete(key);
        }
        return pass;
    }
}