Trick 5 år sedan
förälder
incheckning
e1e05a4224

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

@ -47,6 +47,7 @@ import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
import com.yihu.jw.util.common.IdCardUtil;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.wlyy.wlyyhttp.WlyyHttpService;
import com.yihu.mysql.query.BaseJpaService;
import com.yihu.utils.security.MD5;
import com.ylzinfo.ehc.EhcHandler;
@ -145,6 +146,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    private WlyyInspectionDao wlyyInspectionDao;
    @Autowired
    private StringRedisTemplate redisTemplate;
    @Autowired
    private WlyyHttpService wlyyHttpService;
    
    @Value("${demo.flag}")
@ -617,7 +620,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        waitingRoom.setHospitalName(outpatientDO.getHospitalName());
        //是否是有协同门诊医生
        if(StringUtils.isNotBlank(outpatientDO.getDoctor())){
        if(StringUtils.isNotBlank(outpatientDO.getGeneralDoctor())){
            waitingRoom.setGeneralDoctor(outpatientDO.getGeneralDoctor());
            waitingRoom.setGeneralDoctorName(outpatientDO.getGeneralDoctorName());
        }
@ -3547,7 +3550,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                        String salt = UUID.randomUUID().toString().substring(0,5);
                        String mobile = biz.getString("mobile_phone");
                        String pw = idcard.substring(mobile.length()-6);
                        String pw = mobile.substring(mobile.length()-6);
                        patient.setIdcard(idcard);
                        patient.setName(biz.getString("user_name"));

+ 57 - 0
business/base-service/src/main/java/com/yihu/jw/wlyy/service/WlyyBusinessService.java

@ -248,4 +248,61 @@ public class WlyyBusinessService {
        }
        return result;
    }
    /**
     * 查询I健康接口获取居民信息
     */
    public Map<String,Object> findWlyyPatient(String idcard)throws Exception{
        JSONObject param = new JSONObject();
        param.put("idcard",idcard);
        JSONObject re = wlyyHttpService.sendWlyyMes("wlyyGetSignFamily",param,null);
        if(re!=null){
            JSONObject p = re.getJSONObject("data");
            BasePatientDO patientDO =  basePatientDao.findByIdcardAndDel(idcard,"1");
            if(patientDO == null){
                BasePatientDO patient = new BasePatientDO();
                String salt = UUID.randomUUID().toString().substring(0,5);
                String mobile = p.getString("mobile");
                String pw = mobile.substring(mobile.length()-6);
                patient.setIdcard(idcard);
                patient.setName(p.getString("name"));
                patient.setPassword(MD5.md5Hex(pw + "{" + salt + "}"));
                patient.setSalt(salt);
                patient.setMobile(mobile);
                patient.setDel("1");
                patient.setEnabled(1);
                patient.setLocked(0);
                patient.setCreateTime(new Date());
                patient.setUpdateTime(new Date());
                patient.setBirthday(IdCardUtil.getBirthdayForIdcard(idcard));
                BasePatientDO temp = basePatientDao.save(patient);
                return getPatientInfoMap(temp);
            }
            return getPatientInfoMap(patientDO);
        }
        return null;
    }
    public Map<String,Object> getPatientInfoMap(BasePatientDO basePatientDO){
        Map<String,Object> rs = new HashedMap();
        rs.put("id",basePatientDO.getId());
        rs.put("name",basePatientDO.getName());
        rs.put("sex",basePatientDO.getSex());
        rs.put("provinceCode",basePatientDO.getProvinceCode());
        rs.put("provinceName",basePatientDO.getProvinceName());
        rs.put("cityCode",basePatientDO.getCityCode());
        rs.put("cityName",basePatientDO.getCityName());
        rs.put("townCode",basePatientDO.getTownCode());
        rs.put("townName",basePatientDO.getTownName());
        rs.put("idcard",basePatientDO.getIdcard());
        rs.put("age",IdCardUtil.getAgeForIdcard(basePatientDO.getIdcard()));
        rs.put("mobile",basePatientDO.getMobile());
        return rs;
    }
}

+ 4 - 1
common/common-request-mapping/src/main/java/com/yihu/jw/rm/hospital/BaseHospitalRequestMapping.java

@ -265,7 +265,10 @@ public class BaseHospitalRequestMapping {
         */
        public static final String readWlyyOutpatientMes = "/readWlyyOutpatientMes";
        /**
         * 厦门I健康签约信息接口
         */
        public static final String findWlyyPatient = "/findWlyyPatient";
        //=================end=======================================
        /**

+ 5 - 0
gateway/ag-basic/pom.xml

@ -113,6 +113,11 @@
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-rest-model</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
            <version>1.3.1</version>
        </dependency>
    </dependencies>
    <build>

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 98 - 4
gateway/ag-basic/src/main/java/com/yihu/jw/gateway/filter/BasicZuulFilter.java


+ 8 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

@ -758,4 +758,12 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                                       @RequestParam(value = "patientCode",required = true) String patientCode)throws Exception{
        return success(wlyyBusinessService.wlyyGetPatientAccetokenByIdcard(patientCode));
    }
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findWlyyPatient)
    @ApiOperation(value = "获取居民信息")
    public Envelop findWlyyPatient(@ApiParam(name = "idcard", value = "idcard")
                                               @RequestParam(value = "idcard",required = true) String idcard)throws Exception{
        return success(wlyyBusinessService.findWlyyPatient(idcard));
    }
}

+ 1 - 1
svr/svr-internet-hospital/src/main/resources/bootstrap.yml

@ -1,6 +1,6 @@
spring:
  application:
    name: svr-internet-hospital-kk
    name: svr-internet-hospital
  cloud:
    config:
      failFast: true