Browse Source

代码修改

liubing 3 years ago
parent
commit
fc0ccfea4d

+ 1 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/sign/SignEndpoint.java

@ -178,7 +178,7 @@ public class SignEndpoint extends EnvelopRestEndpoint {
    }
    @GetMapping(value = "servicePackageByTopicType")
    @ApiOperation(value = "根据服务专题获取服务项目")
    @ApiOperation(value = "根据服务专题获取服务项目--存在绑定设备的专题")
    public ObjEnvelop servicePackageByTopicType (
            @ApiParam(name = "patient", value = "patient", required = true)
            @RequestParam(value = "patient") String patient,

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

@ -460,14 +460,14 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
                if (StringUtils.isBlank(doc.getDoctorLat()) || StringUtils.isBlank(doc.getDoctorLon())) {
                    continue;
                }
                double distanceTmp = countDistance.getDistance(Double.parseDouble(orderDO.getServeLat()),Double.parseDouble(orderDO.getServeLon()),Double.parseDouble(doc.getDoctorLat()),Double.parseDouble(doc.getDoctorLon()));
                //double distanceTmp = countDistance.getDistance(Double.parseDouble(orderDO.getServeLat()),Double.parseDouble(orderDO.getServeLon()),Double.parseDouble(doc.getDoctorLat()),Double.parseDouble(doc.getDoctorLon()));
                otherDoctorDistanceObj = new JSONObject();
                otherDoctorDistanceObj.put("doctor",doc.getId());
                otherDoctorDistanceObj.put("doctorName",doc.getName());
                otherDoctorDistanceObj.put("doctorAddress",doc.getDoctorLocateAddress());
                otherDoctorDistanceObj.put("doctorLon",doc.getDoctorLon());
                otherDoctorDistanceObj.put("doctorLat",doc.getDoctorLat());
                otherDoctorDistanceObj.put("distance",distanceTmp);//两点距离
                otherDoctorDistanceObj.put("distance",null);//两点距离
                otherDoctorDistance.add(otherDoctorDistanceObj);
            }
            emergencyOrderVO.setOtherDoctorDistance(otherDoctorDistance.toJSONString());

+ 17 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/sign/ServicePackageService.java

@ -579,6 +579,23 @@ public class ServicePackageService extends BaseJpaService<ServicePackageDO, Serv
                " and pack.del=1 and  item.topic_item='"+topicType+"' and re.sign_id in (\n" +
                "select rd.id from base_service_package_sign_record rd  where rd.patient='"+patient+"' and rd.status=1) GROUP BY item.code; ";
        List<Map<String,Object>> result = jdbcTemplate.queryForList(sql);
        Iterator<Map<String, Object>> iterator = result.iterator();
        while (iterator.hasNext()){
            Map<String, Object> map = iterator.next();
            String item = map.get("serverItem").toString();
            sql = " select count(pd.device_sn) from dm_device dd INNER JOIN wlyy_patient_device " +
                    "pd on dd.category_code = pd.category_code INNER JOIN wlyy_devices wd on dd.model = wd.device_model" +
                    " and pd.device_sn = wd.device_code \n" +
                    "where 1=1 and  pd.del=0  and  pd.`user`='"+patient+"'  and dd.service_topic " +
                    "like '%"+item+"%'   ";
            Integer count = jdbcTemplate.queryForObject(sql,Integer.class);
            if (count>0){
            }else {
                iterator.remove();
            }
        }
        return result;
    }

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

@ -168,7 +168,7 @@ public class YsDeviceService {
                String  url = cloudCareUrl+"/cloudCare/noLogin/security/createOrder";
                Map map = new HashMap<String, String>();
                map = new HashMap();
                String sql ="select DISTINCT item.org_code,item.org_name\n" +
                String sql ="select DISTINCT pack.org_code,pack.org_name\n" +
                        " from base_service_package_sign_record sr,base_service_package_record pr,base_service_package_item item ,base_service_package pack\n" +
                        "where pr.patient = '"+patientDO.getId()+"' and sr.id = pr.sign_id and pr.service_package_id = item.service_package_id \tand  item.`code`='preventFall'  and item.service_package_id = pack.id \n" +
                        "  and pack.del=1";