Forráskód Böngészése

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

Shi Kejing 3 éve
szülő
commit
2f2e603b28

+ 2 - 0
svr/svr-cloud-care/src/main/java/com/yihu/SvrCloudCareApplication.java

@ -4,6 +4,7 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
/**
@ -11,6 +12,7 @@ import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
 */
@SpringBootApplication
@EnableJpaAuditing
@ComponentScan("com.yihu")
public class SvrCloudCareApplication extends SpringBootServletInitializer {
    public static void main(String[] args)  {

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

@ -133,7 +133,7 @@ public class PatientDeviceService extends BaseJpaService<DevicePatientDevice, Pa
     */
    public JSONObject concentrationMessage(String patient){
        JSONObject result = new JSONObject();
        String sql = "SELECT r.value from wlyy_patient_device pd,base_device_health_index r " +
        String sql = "SELECT CONCAT(r.value,r.unit) value from wlyy_patient_device pd,base_device_health_index r " +
                "WHERE pd.device_sn = r.device_sn and pd.`user` = '"+patient+"' ";
        String sql1 = sql + " and pd.category_code='14' ORDER BY r.create_time desc LIMIT 1";
@ -1197,7 +1197,6 @@ public class PatientDeviceService extends BaseJpaService<DevicePatientDevice, Pa
    public com.alibaba.fastjson.JSONObject getX1Locations(String deviceSn,String time_begin){
        String url =AqgConfig.X1_locations;
        MultiValueMap<String, String> param = new LinkedMultiValueMap<>();
        param.add("device", deviceSn);
        param.add("depth", "1");

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

@ -1353,6 +1353,8 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
                    List<BaseSleepPlanDetail> planDetails = sleepPlanDetailDao.findByPatientAndDay(patient,dayTime);
                    if (planDetails.size()>0){
                        BaseSleepPlanDetail planDetail =  planDetails.get(0);
                        List<BaseSleepNightRecord> sleepNightRecordList = nightRecordDao.findByPatientAndDayOrderByCreateTimeDesc(patient,dayTime);
                        planDetail.setSleepNightRecordList(sleepNightRecordList);
                        String jsonStr = JSON.toJSONStringWithDateFormat(planDetail, "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteMapNullValue);
                        sleepInfo = JSONObject.parseObject(jsonStr);
                        sleepInfo.put("day",dayTime);
@ -1372,11 +1374,13 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
                    sleepInfo.put("online",tmp.getBooleanValue("online"));
                    if(tmp.getBooleanValue("onbed")){
                        sleepInfo.put("bedStatus",1);
                        sleepInfo.put("heartRate",tmp.getString("heartrate"));
                        sleepInfo.put("breath",tmp.getString("breathrate"));
                    }else {
                        sleepInfo.put("bedStatus",0);
                        sleepInfo.put("heartRate",null);
                        sleepInfo.put("breath",null);
                    }
                    sleepInfo.put("heartRate",tmp.getString("heartrate"));
                    sleepInfo.put("breath",tmp.getString("breathrate"));
                    BasePatientOutBed outBed = outBedDao.findByPatientAndDeviceSnAndStatus(patient,deviceDo.getDeviceSn(),0);
                    if (null!=outBed){
                        String outBedTime = "";

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

@ -97,7 +97,7 @@ public class ArchiveService extends BaseJpaService<ArchiveDO, ArchiveDao> {
        }
        if (signStatus!=null&&signStatus==1){//已签约不按建档查询,只要该居民服务医生就在列表中
            filters+=" UNION " +
                    " SELECT a.create_time,p.openid,p.idcard,p.mobile,p.name,p.sex,p.id,p.photo,CAST(a.sign_status AS char) sign_status \n" +
                    " SELECT a.create_time,p.openid,p.pad_imei padImei,p.idcard,p.mobile,p.name,p.sex,p.id,p.photo,CAST(a.sign_status AS char) sign_status \n" +
                    "from wlyy_archive a,base_patient p WHERE  a.patient = p.id and a.sign_status = 1 and EXISTS( " +
                    "SELECT DISTINCT sr.patient from base_service_package_sign_record sr,base_service_package_record r, " +
                    "base_service_package_item i,base_team_member m " +

+ 9 - 7
svr/svr-cloud-device/src/main/java/com/yihu/jw/care/service/DeviceService.java

@ -618,7 +618,7 @@ public class DeviceService {
                            if ("1".equals(bed_status)){//还在床
                                if (null==planDetail.getUpStatus()) {
                                    planDetail.setUpStatus(0);
                                    planDetail.setBedStatus(0);
                                    planDetail.setBedStatus(1);
                                    planDetail.setBreath(breath);
                                    planDetail.setHeartRate(heartrate);
                                    outBedOrder(null, timeDate,devicePatientDeviceDos.get(0), patient, device, "超时未起床", JSON.toJSONStringWithDateFormat(planDetail, "yyyy-MM-dd HH:mm:ss", SerializerFeature.WriteMapNullValue));
@ -652,12 +652,14 @@ public class DeviceService {
                                }
                                else if(1==planDetail.getSiestaStatus()&&null==planDetail.getSiestaTimeEnd()){
                                    timeDiffer = timeDate.getTime() - planDetail.getSiestaTimeBegin().getTime();
                                    if(3600*siestaLongWarn*1000<timeDiffer&&timeDiffer<(3600*siestaLongWarn+600)*1000){//午睡超时未起床
                                        planDetail.setBedStatus(0);
                                        planDetail.setBreath(breath);
                                        planDetail.setHeartRate(heartrate);
                                        outBedOrder(null,timeDate,devicePatientDeviceDos.get(0),patient,device,"午睡超时未起床",JSON.toJSONStringWithDateFormat(planDetail,"yyyy-MM-dd HH:mm:ss",SerializerFeature.WriteMapNullValue));
                                        orderCreate=true;
                                    if(3600*siestaLongWarn*1000<timeDiffer){//午睡超时未起床
                                        if (planDetail.getSiestaStatus()==1){
                                            planDetail.setBedStatus(1);
                                            planDetail.setBreath(breath);
                                            planDetail.setHeartRate(heartrate);
                                            outBedOrder(null,timeDate,devicePatientDeviceDos.get(0),patient,device,"午睡超时未起床",JSON.toJSONStringWithDateFormat(planDetail,"yyyy-MM-dd HH:mm:ss",SerializerFeature.WriteMapNullValue));
                                            orderCreate=true;
                                        }
                                    }
                                }
                            }