瀏覽代碼

根据身份证获取年龄

wangjun 4 年之前
父節點
當前提交
be116b40c1

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

@ -7874,11 +7874,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            JSONObject data = new JSONObject();
            Integer age = 0;
            String gender = "";
            if (StringUtils.isNoneBlank(prescriptionDO.getIdcard())) {
                age = IdCardUtil.getAgeForIdcard(prescriptionDO.getIdcard());
            BasePatientDO patientDO = basePatientDao.findById(prescriptionDO.getPatientCode());
            if (null!=patientDO&&StringUtils.isNotBlank(patientDO.getIdcard())) {
                age = IdCardUtil.getAgeForIdcard(patientDO.getIdcard());
                gender = IdCardUtil.getSexForIdcard(prescriptionDO.getIdcard());
            }
            BasePatientDO patientDO = basePatientDao.findById(prescriptionDO.getPatientCode());
            data.put("name", prescriptionDO.getPatientName());
            data.put("age", age);
            data.put("gender", gender);

+ 2 - 2
business/base-service/src/main/java/com/yihu/jw/patient/service/BasePatientService.java

@ -244,10 +244,10 @@ public class BasePatientService<T, R extends CrudRepository> extends BaseJpaServ
    public Boolean updatePatientPw(String id,String pw,String orgPw){
        BasePatientDO patientDO = basePatientDao.findOne(id);
      /*  String orgPwMd5 = MD5.md5Hex(orgPw + "{" + patientDO.getSalt() + "}");
        String orgPwMd5 = MD5.md5Hex(orgPw + "{" + patientDO.getSalt() + "}");
        if(!orgPwMd5.equals(patientDO.getPassword())){
            return false;
        }*/
        }
        //认证信息设置
        if ("xm_ykyy_wx".equalsIgnoreCase(wxId)){
            String response =ykyyService.updatePatientPassword(patientDO.getMobile(),pw,"");