trick9191 7 éve
szülő
commit
b177dd74ea

+ 2 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionDao.java

@ -38,4 +38,6 @@ public interface PrescriptionDao extends PagingAndSortingRepository<Prescription
    @Modifying
    @Query("update Prescription p set p.jwPayStatus=1 where p.code=?1")
    void updatejwPayStatus(String prescriptionCode);
    List<Prescription> findByPatient(String patient);
}

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

@ -559,14 +559,19 @@ public class PrescriptionInfoService extends BaseService {
            pp.put("mobile", p.getMobile());
            rs.put("patient", pp);
            SignFamily signFamily = signFamilyDao.findByIdcard(p.getIdcard());
            Map<String, Object> sf = new HashedMap();
            sf.put("doctor", signFamily.getDoctor());
            sf.put("hospital", signFamily.getHospital());
            sf.put("doctorName", signFamily.getDoctorName());
            sf.put("hospitalName", signFamily.getHospitalName());
            SignFamily signFamily = signFamilyDao.findByIdcard(p.getIdcard());
            if(signFamily!=null){
                sf.put("doctor", signFamily.getDoctor());
                sf.put("hospital", signFamily.getHospital());
                sf.put("doctorName", signFamily.getDoctorName());
                sf.put("hospitalName", signFamily.getHospitalName());
            }else{
                sf.put("doctor", prescription.getDoctor());
                sf.put("hospital", prescription.getHospital());
                sf.put("doctorName", prescription.getDoctorName());
                sf.put("hospitalName", prescription.getHospitalName());
            }
            rs.put("signFamily", sf);
        } else {
            rs.put("patient", "");
@ -1953,4 +1958,13 @@ public class PrescriptionInfoService extends BaseService {
			logger.info("续方取消,随访记录同步取消失败:"+e.getMessage());
		}
	}
    public Boolean checkPatientWithPrescription(String patient){
        List<Prescription> list =  prescriptionDao.findByPatient(patient);
        if(list!=null&&list.size()>0){
            return true;
        }else{
            return false;
        }
    }
}

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/specialist/SpecialistService.java

@ -315,7 +315,7 @@ public class SpecialistService extends BaseService {
        param.put("nameKey",nameKey);
        param.put("page",page);
        param.put("size",size);
        HttpResponse response = HttpUtils.doGet(specialistUrl+"getDoctorPatientByName",param);
        HttpResponse response = HttpUtils.doGet(specialistUrl+"svr-specialist/getDoctorPatientByName",param);
        JSONObject  rs = new JSONObject(response.getContent());
        if("succes".equals(rs.getString("message"))){
            return rs.getJSONArray("obj");

+ 1 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/specialist/SpecialistController.java

@ -175,7 +175,7 @@ public class SpecialistController extends BaseController {
    @RequestMapping(value = "getDoctorPatientByName", method = RequestMethod.GET)
    @ApiOperation("搜索专科医生下的居民")
    public String getDoctorPatientByName(@ApiParam(name = "doctor", value = "医生code") @RequestParam(required = true)String doctor,
                                         @ApiParam(name = "name", value = "居民姓名模糊") @RequestParam(required = false)String nameKey,
                                         @ApiParam(name = "nameKey", value = "居民姓名模糊") @RequestParam(required = false)String nameKey,
                                         @ApiParam(name = "page", value = "第几页,1开始") @RequestParam(required = true)Integer page,
                                         @ApiParam(name = "size", value = "每页大小") @RequestParam(required = true)Integer size) {
        try {

+ 13 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/prescription/PatientPrescriptionInfoController.java

@ -157,5 +157,18 @@ public class PatientPrescriptionInfoController extends BaseController {
            return error(-1, e.getMessage());
        }
    }
    @ApiOperation("判断患者是否有续方记录")
    @ResponseBody
    @RequestMapping(value = "checkPatientWithPrescription", method = RequestMethod.GET)
    public String checkPatientWithPrescription(){
        try {
            return write(200, "获取信息成功!", "data",prescriptionInfoService.checkPatientWithPrescription(getUID()));
        }catch (Exception e) {
            error(e);
            return error(-1, e.getMessage());
        }
    }
}