Browse Source

代码修改

LAPTOP-KB9HII50\70708 3 years ago
parent
commit
4c2a470786

+ 15 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/doctor/DoctorEndpoint.java

@ -43,6 +43,21 @@ public class DoctorEndpoint extends EnvelopRestEndpoint {
    @Autowired
    @Autowired
    private DoctorServicePermissionsService doctorServicePermissionsService;
    private DoctorServicePermissionsService doctorServicePermissionsService;
    @GetMapping(value = "updOnline")
    @ApiOperation(value = "更新在线状态")
    public Envelop updOnline(@ApiParam(name = "doctorId", value = "医生id", required = true)
                                 @RequestParam(value = "doctorId",required = true) String doctorId,
                             @ApiParam(name = "online", value = "在线状态 1在线 0离线")
                             @RequestParam(value = "online", required = true)String online){
        try{
            doctorService.updOnline(doctorId,online);
            return success("成功");
        }catch (Exception e){
            return failedException2(e);
        }
    }
    @GetMapping(value = "doctorPage")
    @GetMapping(value = "doctorPage")
    @ApiOperation(value = "获取医生记录分页")
    @ApiOperation(value = "获取医生记录分页")
    public PageEnvelop<List<Map<String,Object>>> doctorPage (
    public PageEnvelop<List<Map<String,Object>>> doctorPage (

+ 1 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/file_upload/FileUploadEndpoint.java

@ -159,7 +159,7 @@ public class FileUploadEndpoint extends EnvelopRestEndpoint {
        files.setObjectType(objectType);
        files.setObjectType(objectType);
        files.setSize(file.getSize());
        files.setSize(file.getSize());
        files.setTaskId(taskId);
        files.setTaskId(taskId);
        String taskid = fileManageService.chunkUploadByMappedByteBuffer(files);
        String taskid = fileManageService.chunkUploadByMappedByteBuffer(files,null);
        if ("unCompelete".equalsIgnoreCase(taskid)){
        if ("unCompelete".equalsIgnoreCase(taskid)){
            System.out.println("第"+files.getChunk());
            System.out.println("第"+files.getChunk());
            return success("未传完",uploadVO);
            return success("未传完",uploadVO);

+ 14 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/patient/PatientEndpoint.java

@ -202,6 +202,20 @@ public class PatientEndpoint extends EnvelopRestEndpoint {
        }
        }
    }
    }
    @PostMapping(value = "updOnline")
    @ApiOperation(value = "更新在线状态")
    public Envelop updOnline(@ApiParam(name = "patientId", value = "居民id")
                                 @RequestParam(value = "patientId", required = true)String patientId,
                             @ApiParam(name = "online", value = "在线状态 1在线 0离线")
                             @RequestParam(value = "online", required = true)String online){
        try{
            patientService.updOnline(patientId,online);
            return success("成功");
        }catch (Exception e){
            return failedException2(e);
        }
    }
    @PostMapping(value = "updPatientLabel")
    @PostMapping(value = "updPatientLabel")

+ 12 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/doctor/CareDoctorService.java

@ -10,6 +10,7 @@ import com.yihu.jw.doctor.dao.BaseDoctorHospitalDao;
import com.yihu.jw.doctor.dao.DoctorSpecialDiseaseDao;
import com.yihu.jw.doctor.dao.DoctorSpecialDiseaseDao;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.care.doorCoach.BaseDoorCoachOrderDO;
import com.yihu.jw.entity.care.doorCoach.BaseDoorCoachOrderDO;
import com.yihu.jw.hospital.dict.WlyyHospitalSysDictDao;
import com.yihu.jw.hospital.dict.WlyyHospitalSysDictDao;
import com.yihu.jw.im.service.ImService;
import com.yihu.jw.im.service.ImService;
@ -63,6 +64,17 @@ public class CareDoctorService extends BaseJpaService<BaseDoctorDO, BaseDoctorDa
    @Autowired
    @Autowired
    private BirthdayWishesService birthdayWishesService;
    private BirthdayWishesService birthdayWishesService;
    /**
     * 更新在线状态
     * @param doctorId
     * @param online
     */
    public void updOnline(String doctorId,String online){
        BaseDoctorDO doctorDO = baseDoctorDao.findById(doctorId);
        doctorDO.setOnline(online);
        baseDoctorDao.save(doctorDO);
    }
    /**
    /**
     * 获取医生简单详情
     * 获取医生简单详情
     * @return
     * @return

+ 15 - 3
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/patient/CarePatientService.java

@ -127,6 +127,17 @@ public class CarePatientService extends BaseJpaService<BasePatientDO, BasePatien
        return res;
        return res;
    }
    }
    /**
     * 更新在线状态
     * @param patientId
     * @param online
     */
    public void updOnline(String patientId,String online){
        BasePatientDO patientDO = patientDao.findById(patientId);
        patientDO.setOnline(online);
        patientDao.save(patientDO);
    }
    /**
    /**
     * 居民id
     * 居民id
     * @param agent 代理人id
     * @param agent 代理人id
@ -522,7 +533,7 @@ public class CarePatientService extends BaseJpaService<BasePatientDO, BasePatien
     */
     */
    public List<Map<String,Object>> findChild(String name,String residentialArea,String limit,String filter1){
    public List<Map<String,Object>> findChild(String name,String residentialArea,String limit,String filter1){
        String sql = "SELECT id,name,photo,idcard,CAST(IFNULL(birthday,'') AS char ) birthday,residential_area residentialArea" +
        String sql = "SELECT id,name,photo,idcard,CAST(IFNULL(birthday,'') AS char ) birthday,residential_area residentialArea" +
                ",sex,IFNULL(on_line,0) online  from base_patient WHERE archive_type = 2 and del = '1' ";
                ",sex,if(openid is null,0,1) online  from base_patient WHERE archive_type = 2 and del = '1' ";
        if(!StringUtil.isBlank(name)){
        if(!StringUtil.isBlank(name)){
            sql+= " and name like '%"+name+"%' ";
            sql+= " and name like '%"+name+"%' ";
        }
        }
@ -570,7 +581,8 @@ public class CarePatientService extends BaseJpaService<BasePatientDO, BasePatien
     */
     */
    public List<Map<String,Object>> findOld(String name,String residentialArea,String limit,JSONObject json,String filter1){
    public List<Map<String,Object>> findOld(String name,String residentialArea,String limit,JSONObject json,String filter1){
        String sql = "SELECT a.id,a.name,a.photo,a.idcard,CAST(IFNULL(a.birthday,'') AS char ) birthday,a.residential_area residentialArea,a.sex " +
        String sql = "SELECT a.id,a.name,a.photo,a.idcard,CAST(IFNULL(a.birthday,'') AS char ) birthday,a.residential_area residentialArea,a.sex " +
                ", GROUP_CONCAT(DISTINCT d.category_code) deviceFlag,IFNULL(on_line,0) online,IFNULL(sign_status,0) signStatus from base_patient a " +
                ", GROUP_CONCAT(DISTINCT d.category_code) deviceFlag,case 1 WHEN openid is not null then 1 " +
                " WHEN a.on_line = '1' then 1 ELSE 0 end as online,IFNULL(sign_status,0) signStatus from base_patient a " +
                " LEFT JOIN wlyy_patient_device d on d.`user`=a.id  WHERE a.archive_type = 1 and a.del = '1' ";
                " LEFT JOIN wlyy_patient_device d on d.`user`=a.id  WHERE a.archive_type = 1 and a.del = '1' ";
        if(!StringUtil.isBlank(name)){
        if(!StringUtil.isBlank(name)){
            sql+= " and name like '%"+name+"%' ";
            sql+= " and name like '%"+name+"%' ";
@ -624,7 +636,7 @@ public class CarePatientService extends BaseJpaService<BasePatientDO, BasePatien
     * @return
     * @return
     */
     */
    public List<Map<String,Object>> findHelper(String name,String limit,String fileter){
    public List<Map<String,Object>> findHelper(String name,String limit,String fileter){
        String sql = "SELECT a.id,a.name,a.photo,a.sex,IFNULL(a.on_line,0) online from base_doctor a,base_doctor_hospital h" +
        String sql = "SELECT a.id,a.name,a.photo,a.sex,if(openid is null,0,1) online from base_doctor a,base_doctor_hospital h" +
                "  WHERE a.id=h.doctor_code and a.doctor_level = 2 and a.del = '1' and h.del = '1' ";
                "  WHERE a.id=h.doctor_code and a.doctor_level = 2 and a.del = '1' and h.del = '1' ";
        if(!StringUtil.isBlank(name)){
        if(!StringUtil.isBlank(name)){
            sql+= " a.and name like '%"+name+"%' ";
            sql+= " a.and name like '%"+name+"%' ";

+ 5 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/sign/CapacityAssessmentRecordService.java

@ -88,8 +88,12 @@ public class CapacityAssessmentRecordService extends BaseJpaService<CapacityAsse
        CapacityAssessmentRecordDO recordDO = capacityAssessmentRecordDao.findByPatient(patient,assessmentTime);
        CapacityAssessmentRecordDO recordDO = capacityAssessmentRecordDao.findByPatient(patient,assessmentTime);
        if(recordDO!=null){
        if(recordDO!=null){
            recordDO.setLevelConclusionName(dictService.fingByNameAndCode(ConstantUtil.DICT_LEVEL_CONCLUSION,String.valueOf(recordDO.getLevelConclusion())));
            recordDO.setLevelConclusionName(dictService.fingByNameAndCode(ConstantUtil.DICT_LEVEL_CONCLUSION,String.valueOf(recordDO.getLevelConclusion())));
            recordDO.setLivingAbilityName(dictService.fingByNameAndCode(ConstantUtil.DICT_LEVEL_CONCLUSION,String.valueOf(recordDO.getLivingAbility())));
            recordDO.setCognitiveAbilityName(dictService.fingByNameAndCode(ConstantUtil.DICT_LEVEL_CONCLUSION,String.valueOf(recordDO.getCognitiveAbility())));
            recordDO.setSocialAbilityName(dictService.fingByNameAndCode(ConstantUtil.DICT_LEVEL_CONCLUSION,String.valueOf(recordDO.getSocialAbility())));
            recordDO.setComprehensiveAbilityName(dictService.fingByNameAndCode(ConstantUtil.DICT_LEVEL_CONCLUSION,String.valueOf(recordDO.getComprehensiveAbility())));
        }
        }
         return recordDO;
        return recordDO;
    }
    }
    /**
    /**

+ 12 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/third/PatientInfoPlatFormService.java

@ -8,9 +8,11 @@ import com.yihu.jw.care.service.device.PatientHealthIndexService;
import com.yihu.jw.care.service.doorCoach.PatientDoorCoachOrderService;
import com.yihu.jw.care.service.doorCoach.PatientDoorCoachOrderService;
import com.yihu.jw.care.service.lifeCare.LifeCareOrderService;
import com.yihu.jw.care.service.lifeCare.LifeCareOrderService;
import com.yihu.jw.care.service.security.SecurityMonitoringOrderService;
import com.yihu.jw.care.service.security.SecurityMonitoringOrderService;
import com.yihu.jw.care.service.sign.CapacityAssessmentRecordService;
import com.yihu.jw.care.service.sign.ServicePackageService;
import com.yihu.jw.care.service.sign.ServicePackageService;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.care.label.WlyyPatientLabelDO;
import com.yihu.jw.entity.care.label.WlyyPatientLabelDO;
import com.yihu.jw.entity.care.sign.CapacityAssessmentRecordDO;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.util.common.IdCardUtil;
import com.yihu.jw.util.common.IdCardUtil;
@ -51,6 +53,8 @@ public class PatientInfoPlatFormService {
    private PatientDoorCoachOrderService patientDoorCoachOrderService;
    private PatientDoorCoachOrderService patientDoorCoachOrderService;
    @Autowired
    @Autowired
    private PatientHealthIndexService healthIndexService;
    private PatientHealthIndexService healthIndexService;
    @Autowired
    private CapacityAssessmentRecordService capacityAssessmentRecordService;
    /**
    /**
@ -95,6 +99,14 @@ public class PatientInfoPlatFormService {
                result.put("entranceOrgList",getEntranceOrgList(patient));//入园机构列表(报名且录取机构)
                result.put("entranceOrgList",getEntranceOrgList(patient));//入园机构列表(报名且录取机构)
                result.put("MonitoringInfo",getMonitoringInfo(patient)); //新生儿入院信息
                result.put("MonitoringInfo",getMonitoringInfo(patient)); //新生儿入院信息
            }
            }
            //能力评估
            try{
                CapacityAssessmentRecordDO recordDO = capacityAssessmentRecordService.findAssessmentByPatientId(patient);
                result.put("capAssRecordDO",recordDO);
            }catch (Exception e){
                e.printStackTrace();
            }
            return result;
            return result;
        }
        }
        return null;
        return null;