liubing 3 vuotta sitten
vanhempi
commit
ac2ea68699

+ 1 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/care/lifeCare/LifeCareOrderDO.java

@ -25,7 +25,7 @@ public class LifeCareOrderDO extends UuidIdentityEntityWithOperator {
        cancel(-1, "已取消"),
        cancel(-1, "已取消"),
        waitForPay(0, "待支付"),
        waitForPay(0, "待支付"),
        waitForAccept(1, "待(医生)接单"),//待服务
        waitForAccept(1, "待(医生)接单"),//待服务
        signIn(3, "已签到"),//即登记服务小结
        signIn(3, "已签到"),//conclusionTime有值 即登记服务小结
        complete(2,"已完成");
        complete(2,"已完成");
        private Integer type;
        private Integer type;

+ 4 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/team/BaseTeamMemberDao.java

@ -53,4 +53,8 @@ public interface BaseTeamMemberDao extends PagingAndSortingRepository<BaseTeamMe
    @Query("SELECT d FROM BaseTeamMemberDO m, BaseTeamDO t, BaseDoctorDO d WHERE t.id = :teamCode AND t.id = m.teamCode " +
    @Query("SELECT d FROM BaseTeamMemberDO m, BaseTeamDO t, BaseDoctorDO d WHERE t.id = :teamCode AND t.id = m.teamCode " +
            "AND m.doctorCode = d.id AND t.del = '1' AND m.del = '1' ")
            "AND m.doctorCode = d.id AND t.del = '1' AND m.del = '1' ")
    List<BaseDoctorDO> findAllMembers(@Param(value = "teamCode") String teamCode);
    List<BaseDoctorDO> findAllMembers(@Param(value = "teamCode") String teamCode);
    @Query("SELECT count(1) FROM BaseTeamMemberDO m, BaseTeamDO t, BaseDoctorDO d WHERE t.id = :teamCode AND t.id = m.teamCode " +
            "AND m.doctorCode = d.id AND t.del = '1' AND m.del = '1' ")
    Integer findMemCount(@Param(value = "teamCode") String teamCode);
}
}

+ 1 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/security/SecurityMonitoringOrderEndpoint.java

@ -324,7 +324,7 @@ public class SecurityMonitoringOrderEndpoint extends EnvelopRestEndpoint {
    public ObjEnvelop patientMonitoringInfo(@ApiParam(name = "patient", value = "patient")
    public ObjEnvelop patientMonitoringInfo(@ApiParam(name = "patient", value = "patient")
                                @RequestParam(value = "patient") String patient,
                                @RequestParam(value = "patient") String patient,
                                @ApiParam(name = "topicItem", value = "专题code,关联security_topic_dict字典", required = false)
                                @ApiParam(name = "topicItem", value = "专题code,关联security_topic_dict字典", required = false)
                                @RequestParam(value = "topicItem",required = false) String topicItem) {
                                @RequestParam(value = "topicItem",required = false,defaultValue = "preventLost") String topicItem) {
        try {
        try {
            return ObjEnvelop.getSuccess( "查询成功", securityMonitoringOrderService.patientMonitoringInfo(patient,topicItem));
            return ObjEnvelop.getSuccess( "查询成功", securityMonitoringOrderService.patientMonitoringInfo(patient,topicItem));
        } catch (Exception e) {
        } catch (Exception e) {

+ 5 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/team/TeamEndpoint.java

@ -109,6 +109,8 @@ public class TeamEndpoint extends EnvelopRestEndpoint {
            for (String doctorCode : doctorCodes) {
            for (String doctorCode : doctorCodes) {
                teamService.addMember(team, doctorCode);
                teamService.addMember(team, doctorCode);
            }
            }
            team.setTeamNum( teamService.findMemCount(teamCode)+"");
            teamDao.save(team);
            return success("添加成功");
            return success("添加成功");
        } catch (Exception e) {
        } catch (Exception e) {
            return failedException2(e);
            return failedException2(e);
@ -135,7 +137,9 @@ public class TeamEndpoint extends EnvelopRestEndpoint {
                               @PathVariable("doctorCode") String doctorCode) {
                               @PathVariable("doctorCode") String doctorCode) {
        try {
        try {
            teamService.removeMember(teamCode, doctorCode);
            teamService.removeMember(teamCode, doctorCode);
            BaseTeamDO team = teamDao.findOne(teamCode);
            team.setTeamNum( teamService.findMemCount(teamCode)+"");
            teamDao.save(team);
            return success("移除成功");
            return success("移除成功");
        } catch (Exception e) {
        } catch (Exception e) {
            return failedException2(e);
            return failedException2(e);

+ 1 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/device/PatientDeviceService.java

@ -1115,7 +1115,7 @@ public class PatientDeviceService extends BaseJpaService<DevicePatientDevice, Pa
        if (null!=check_time_end){
        if (null!=check_time_end){
            param.add("check_time_end", check_time_end+"");
            param.add("check_time_end", check_time_end+"");
        }
        }
        HttpEntity<com.alibaba.fastjson.JSONObject> response = httpClientUtil.aqgCookieHttp(url, param, HttpMethod.GET, getCookie());
        HttpEntity<com.alibaba.fastjson.JSONObject> response = httpClientUtil.aqgCookieHttp(url, param, HttpMethod.POST, getCookie());
        return response.getBody();
        return response.getBody();
    }
    }

+ 11 - 11
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/security/SecurityMonitoringOrderService.java

@ -1166,7 +1166,7 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
            return new ArrayList<>();
            return new ArrayList<>();
        }else {
        }else {
            for (String team:teams){
            for (String team:teams){
                sql = "select DISTINCT doc.id doctor,CONCAT(doc.`name`,\n" +
                sql = "select DISTINCT doc.id doctor,doc.name as doctorName,CONCAT(doc.`name`,\n" +
                        "CASE WHEN doc.doctor_level=1 THEN '(社区医生)' ELSE '(助老员)' END) as name,doc.photo,doc.mobile from base_team_member mem " +
                        "CASE WHEN doc.doctor_level=1 THEN '(社区医生)' ELSE '(助老员)' END) as name,doc.photo,doc.mobile from base_team_member mem " +
                        "INNER JOIN base_doctor doc on mem.doctor_code = doc.id and mem.del=1 and mem.team_code='"+team+"'";
                        "INNER JOIN base_doctor doc on mem.doctor_code = doc.id and mem.del=1 and mem.team_code='"+team+"'";
                List<Map<String,Object>>tmp = jdbcTemplate.queryForList(sql);
                List<Map<String,Object>>tmp = jdbcTemplate.queryForList(sql);
@ -1185,7 +1185,15 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
        result.put("fall",null);
        result.put("fall",null);
        result.put("deviceSn",null);
        result.put("deviceSn",null);
        result.put("monitorInfo",null);
        result.put("monitorInfo",null);
        if ((StringUtils.isNotBlank(topicItem)&&"preventLost".equals(topicItem))||StringUtils.isBlank(topicItem)){
        String sql = " select count(id) from base_security_monitoring_order where patient='"+patient+"' and topic_item='preventFall' and status="+SecurityMonitoringOrderDO.Status.apply.getType();
        Integer count = jdbcTemplate.queryForObject(sql,Integer.class);
        if (count>0){
            result.put("fall",true);
        }
        else {
            result.put("fall",false);
        }
        if ((StringUtils.isNotBlank(topicItem)&&"preventLost".equals(topicItem))){
            List<DevicePatientDevice> devicePatientDeviceDos = patientDeviceDao.findByUserAndCategoryCode(patient,"4");
            List<DevicePatientDevice> devicePatientDeviceDos = patientDeviceDao.findByUserAndCategoryCode(patient,"4");
            if (devicePatientDeviceDos.size()==0){
            if (devicePatientDeviceDos.size()==0){
            }
            }
@ -1240,20 +1248,12 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
                }
                }
            }
            }
        }
        }
        if ((StringUtils.isNotBlank(topicItem)&&"preventFall".equals(topicItem))||StringUtils.isBlank(topicItem)){
        if ((StringUtils.isNotBlank(topicItem)&&"preventFall".equals(topicItem))){
            List<DevicePatientDevice> devicePatientDeviceDos = patientDeviceDao.findByUserAndCategoryCode(patient,"12");
            List<DevicePatientDevice> devicePatientDeviceDos = patientDeviceDao.findByUserAndCategoryCode(patient,"12");
            if (devicePatientDeviceDos.size()==0){
            if (devicePatientDeviceDos.size()==0){
            }
            }
            else{
            else{
                String sql = " select count(id) from base_security_monitoring_order where patient='"+patient+"' and topic_item='preventFall' and status="+SecurityMonitoringOrderDO.Status.apply.getType();
                Integer count = jdbcTemplate.queryForObject(sql,Integer.class);
                if (count>0){
                    result.put("fall",true);
                }
                else {
                    result.put("fall",false);
                }
                try {
                try {
                    JSONObject monitorUrl = ysDeviceServicel.getDeviceLiveAddress(patient,devicePatientDeviceDos.get(0).getDeviceSn(),1,null);
                    JSONObject monitorUrl = ysDeviceServicel.getDeviceLiveAddress(patient,devicePatientDeviceDos.get(0).getDeviceSn(),1,null);
                    result.put("monitorInfoStatus",monitorUrl.getIntValue(ResponseContant.resultFlag));
                    result.put("monitorInfoStatus",monitorUrl.getIntValue(ResponseContant.resultFlag));

+ 4 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/team/BaseTeamService.java

@ -80,6 +80,10 @@ public class BaseTeamService extends BaseJpaService<BaseTeamDO, BaseTeamDao> {
        }
        }
    }
    }
    public Integer findMemCount(String teamCode){
        return memberDao.findMemCount(teamCode);
    }
    /**
    /**
     * 删除团队
     * 删除团队
     * @param teamCode
     * @param teamCode

+ 1 - 1
svr/svr-cloud-job/src/main/resources/application.yml

@ -4,7 +4,7 @@ server:
spring:
spring:
  application:
  application:
      name:  svr-cloud-job
      name:  svr-cloud-job-lb
  datasource:
  datasource:
    driver-class-name: com.mysql.jdbc.Driver
    driver-class-name: com.mysql.jdbc.Driver
    max-active: 50
    max-active: 50