Browse Source

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

liubing 2 years ago
parent
commit
0e8c64d216

+ 0 - 1
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/admin/AdminDoorCoachOrderController.java

@ -34,7 +34,6 @@ import java.util.Map;
 * @Auther: shi kejing
 * @Date: 2021/8/31 14:38
 */
//@RequestMapping(value = "/admin/doorCoach/serviceOrder", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@RestController
@RequestMapping(value = "/open/noLogin", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@Api(description = "管理员调度大屏")

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

@ -295,6 +295,7 @@ public class PatientDeviceController extends BaseController {
    @ApiOperation("修改删除 爱牵挂亲情号码--未使用")
    @RequestMapping(value = "updAqgDeviceSosInfo",method = RequestMethod.POST)
    @ObserverRequired
    @Deprecated
    public String updAqgDeviceSosInfo(@ApiParam(name = "deviceSn",value = "设备id")
                                   @RequestParam(value = "deviceSn",required = true)String deviceSn,
                                   @ApiParam(name = "seqid",value = "亲情号码id")
@ -308,11 +309,6 @@ public class PatientDeviceController extends BaseController {
                                   @ApiParam(name = "clear",value = "删除标志,删除传1",required = false)
                                   @RequestParam(value = "clear",required = false)String clear){
        try {
//            com.alibaba.fastjson.JSONObject json = patientDeviceService.updAqgDeviceSosInfo(deviceSn, seqid, name, num, dial_flag, clear);
//            if(json.getBoolean("success")){
//                return success("操作成功");
//            }
//            return error(-1,json.getString("error_desc"));
            return error(-1,"接口无效");
        }catch (Exception e){
            return errorResult(e);

+ 0 - 81
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/device/YsDeviceController.java

@ -248,87 +248,6 @@ public class YsDeviceController extends BaseController {
    }
//    @ApiOperation("获取上传录像授权信息")
//    @RequestMapping(value = "getVideoKey", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
//    public String getVideoKey(
//            HttpServletRequest request){
//        try {
//
//
//            return write(200,"查询成功","data",ysDeviceService.getVideoKey(request));
//        }catch (Exception e){
//            return error(-1,"error",e);
//        }
//    }
//
//    @ApiOperation("查询录像列表(无法区分用户)")
//    @RequestMapping(value = "videoList", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
//    public String videoList(
//            @ApiParam(name="name",required = false,value="录像名称,支持模糊搜索")
//            @RequestParam(value = "name",required = false) String name,
//            @ApiParam(name="type",required = false,value="视频类型 默认查询全部视频/录像,type=playback,表示查询直播暂存(录像);type=vod,表示查询上传、剪辑、合并视频。")
//            @RequestParam(value = "type",required = false) String type,
//            @ApiParam(name="page",required = false,value="page")
//            @RequestParam(value = "page",required = false,defaultValue = "1") int page,
//            @ApiParam(name="count",required = false,value=",默认为 20")
//            @RequestParam(value = "count",required = false,defaultValue = "20") int count,
//            HttpServletRequest request){
//        try {
//
//
//            return write(200,"查询成功","data",ysDeviceService.videoList(name,type,page,count));
//        }catch (Exception e){
//            return error(-1,"error",e);
//        }
//    }
//
//    @ApiOperation("批量获取录像详情")
//    @RequestMapping(value = "videoDetailList", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
//    public String videoDetailList(
//            @ApiParam(name = "vod_ids",value="录像id",required = true)
//            @RequestParam(value="vod_ids")String[] vod_ids,
//            HttpServletRequest request){
//        try {
//
//
//            return write(200,"查询成功","data",ysDeviceService.videoDetailList(vod_ids));
//        }catch (Exception e){
//            return error(-1,"error",e);
//        }
//    }
//
//    @ApiOperation("查询录像详情")
//    @RequestMapping(value = "videoDetail", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
//    public String videoDetail(
//            @ApiParam(name = "vod_id",value="录像id",required = true)
//            @RequestParam(value="vod_id")String vod_id,
//            HttpServletRequest request){
//        try {
//
//
//            return write(200,"查询成功","data",ysDeviceService.videoDetail(vod_id));
//        }catch (Exception e){
//            return error(-1,"error",e);
//        }
//    }
//
//    @ApiOperation("上传录像")
//    @RequestMapping(value = "videoUpload", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
//    public String videoUpload(
//            HttpServletRequest request,
//            @ApiParam(value = "文件", required = true)
//            @RequestParam(value = "file", required = true) MultipartFile file){
//        try {
//
//            String originalFilename = file.getOriginalFilename();
//            InputStream inputStream = file.getInputStream();
//
//            return write(200,"查询成功","data",ysDeviceService.videoUpload(request));
//        }catch (Exception e){
//            return error(-1,"error",e);
//        }
//    }
//
    @ApiOperation("获取视频地址信息(录像获取,直播地址另一个接口)")
    @RequestMapping(value = "videoList2", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
    public String videoUpload(

+ 1 - 2
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/patient/PatientContactsEndpoint.java

@ -60,11 +60,10 @@ public class PatientContactsEndpoint extends EnvelopRestEndpoint {
    @RequestMapping(value = "setPatientContacts", method = RequestMethod.POST)
    @ApiOperation(value = "设置一键联系人--未使用")
    @ObserverRequired
    @Deprecated
    public Envelop setPatientContacts(@RequestParam(required = true) String patient,
                                      @RequestParam(required = true) String fid) {
        try {
//            contactsService.setContacts(fid,patient);
//            return ObjEnvelop.getSuccess("设置成功");
            return Envelop.getError("接口无效");
        } catch (Exception e) {
            return failedException2(e);

+ 0 - 87
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/role/RoleService.java

@ -7,15 +7,10 @@ package com.yihu.jw.care.service.role;
import com.yihu.jw.care.dao.role.DoctorRoleDao;
import com.yihu.jw.care.dao.role.DoctorRoleRealmDao;
import com.yihu.jw.care.service.doctor.CareDoctorService;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.entity.care.role.DoctorRole;
import com.yihu.jw.entity.care.role.DoctorRoleRealm;
import com.yihu.mysql.query.BaseJpaService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springside.modules.utils.Clock;
@ -36,18 +31,8 @@ public class RoleService extends BaseJpaService<DoctorRole, DoctorRoleDao> {
    @Autowired
    private DoctorRoleDao doctorRoleDao;
    @Autowired
    private DoctorRoleRealmDao doctorRoleRealmDao;
    private Clock clock = Clock.DEFAULT;
    @Autowired
    private BaseDoctorDao doctorDao;
    @Autowired
    private CareDoctorService doctorInfoService;
    @Autowired
    private JdbcTemplate jdbcTemplate;
    /**
     * 获取用户角色列表
@ -56,27 +41,6 @@ public class RoleService extends BaseJpaService<DoctorRole, DoctorRoleDao> {
        return doctorRoleDao.findUserRole(user);
    }
    /**
     * 区域去末尾零
     */
    private String getShortArea(String area) {
        char strs[] = area.toCharArray();// 将字符串转化成字符数组
        String last = "";
        for (int i = area.length() - 1; i >= 0; i--) {
            if ('0' == strs[i]) {
                last += "0";
            } else {
                break;
            }
        }
        if (last.length() > 0) {
            return area.substring(0, area.lastIndexOf(last));
        } else {
            return area;
        }
    }
    /**
     * 获取角色区域
     */
@ -111,57 +75,6 @@ public class RoleService extends BaseJpaService<DoctorRole, DoctorRoleDao> {
        return re;
    }
//    /**
//     * 角色code转成角色级别
//     * @param roleCode 角色code
//     * @return 1、省级,2、市级,3、区级,4、机构
//     */
//    public Integer roleConverse(String roleCode){
//
//        if(roleCode.length()==6){
//            if("0".equals(roleCode.substring(3,4))){
//                return 1;
//            }else if("00".equals(roleCode.substring(4))){
//                return 2;
//            }else{
//                return 3;
//            }
//        }else{
//            return 4;
//        }
//    }
    public Map<String,Object> findManageUserRole(String doctor){
        String sql ="SELECT " +
                " r.id, " +
                " r.`code`, " +
                " r.`name`, " +
                " r.description " +
                " FROM " +
                " manage_role_user m " +
                " JOIN manage_roles r ON m.role_id = r.id " +
                " WHERE " +
                " m.user_code = '"+doctor+"' and r.`code` ='dispatcher' ";
        List<Map<String,Object>> rs = jdbcTemplate.queryForList(sql);
        if(rs!=null&&rs.size()>0){
            return rs.get(0);
        }
        return null;
    }
    public List<Map<String,Object>> queryDispatcherInfoByHospital(String hospital){
        String sql ="SELECT " +
                " d.`code`, " +
                " d.`name`, " +
                " d.`hospital_name` as hospitalName " +
                " FROM " +
                " manage_role_user m " +
                " JOIN manage_roles r ON m.role_id = r.id " +
                " JOIN (select code,name,hospital_name from wlyy_doctor where hospital = '"+ hospital +"') as d ON m.user_code = d.code" +
                " WHERE " +
                " r.code = 'dispatcher'";
        return jdbcTemplate.queryForList(sql);
    }
    /**
     * 获取管理员权限与老人数据相关sql

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

@ -231,18 +231,6 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
            return result;
        }
        //已取消的订单也可以申请
//        boolean bool = securityMonitoringOrderDao.existsByPatientAndStatusIn(orderDO.getPatient(),
//                new Integer[]{SecurityMonitoringOrderDO.Status.apply.getType()
//                });
//        if(bool){
//            String failMsg = "当前服务对象存在未完成的服务,请先完成该服务!";
//            result.put("resultFlag", 0);
//            result.put("resultMsg", failMsg);
//            logger.error(failMsg);
//            return result;
//        }
        Map<String, Object> mapTmp = items.get(0);
        List<BaseDoctorDO> doctorDOS = baseTeamMemberDao.findAllMembersByLevel(mapTmp.get("team_code").toString(), 2);
        if (doctorDOS.size() == 0) {

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

@ -776,7 +776,9 @@ public class PatientInfoPlatFormService {
                    Map steps = !detailInfo.get("steps").equals(0)?(Map)detailInfo.get("steps"):new HashMap(){{put("steps",0);}};
                    if (!heartRate.get("value1_status").equals("正常")) oldIndex+=1;
                    oldCheckInfoMap.put("heartStatus",heartRate.get("value1_status"));
                    if(!heartRate.get("value1_status").equals("暂无数据?")){
                        oldCheckInfoMap.put("heartStatus",heartRate.get("value1_status"));
                    }
                    oldCheckInfoMap.put("heart",heartRate.get("value1"));
                    oldCheckInfoMap.put("leaveHome",detailInfo.get("homeRange"));
                    oldCheckInfoMap.put("address",location.get("address"));
@ -806,9 +808,11 @@ public class PatientInfoPlatFormService {
                    deviceOnLineMap.put("deviceName",device_name);
                    deviceOnLineMap.put("deviceStatus",online);
                    if (!detailInfo.get("breath_status").equals("正常"))oldIndex+=1;
                    oldCheckInfoMap.put("breathStatus",detailInfo.get("breath_status"));
                    oldCheckInfoMap.put("breath",detailInfo.get("breath"));
                    oldCheckInfoMap.put("bedStatus",detailInfo.get("bedStatus"));
                    if(!detailInfo.get("breath_status").equals("暂无数据?")){
                        oldCheckInfoMap.put("breathStatus",detailInfo.get("breath_status"));
                    }
                    break;
                case 14:
                    deviceOnLineMap.put("deviceName",device_name);
@ -1043,13 +1047,13 @@ public class PatientInfoPlatFormService {
                if (sqlResult.size()>0){
                    Integer xl = Integer.parseInt(sqlResult.get(0).get("value1").toString());
                    Integer xlValue1 = Integer.parseInt(dict(dictList,"xlValue1"));
                    Integer xlValue2 = Integer.parseInt(dict(dictList,"xlValue1"));
                    Integer xlValue2 = Integer.parseInt(dict(dictList,"xlValue2"));
                    if (xl>=xlValue1&&xl<=xlValue2) {
                        dictCode= "zc1";
                    }else if (xl<xlValue1){
                        dictCode="xl2";
                    }else if (xl>xlValue2){
                        dictCode="xl3";
                    }else if (xl>xlValue2){
                        dictCode="xl2";
                    }
                    sqlResult.get(0).put("value1_status",dict(dictList,dictCode));
                    detailInfo.put("heartRate",sqlResult.get(0));
@ -1190,11 +1194,11 @@ public class PatientInfoPlatFormService {
                                Integer xlValue1 = Integer.parseInt(dict(dictList,"xlValue1"));
                                Integer xlValue2 = Integer.parseInt(dict(dictList,"xlValue1"));
                                dictCode = "";
                                if (heartRate > 100) {
                                if (heartRate < xlValue1) {
                                    dictCode = "xl3";
                                } else if (heartRate < 50) {
                                } else if (heartRate > xlValue2) {
                                    dictCode = "xl2";
                                } else if (heartRate >= 50 && heartRate <= 100) {
                                } else if (heartRate >= xlValue1 && heartRate <= xlValue2) {
                                    dictCode = "zc1";
                                }
@ -1410,17 +1414,6 @@ public class PatientInfoPlatFormService {
                }
                break;
            case "21"://todo 天然气
                /*sql = " select o.id,p.id patient,p.name,p.idcard,p.residential_area,'22' OrderType,'1' type,o.serve_address,o.serve_desc,  " +
                        " o.status,DATE_FORMAT(o.create_time,'%Y-%m-%d %H:%i:%S') create_time from base_security_monitoring_order o " +
                        " INNER JOIN base_patient p on p.id = o.patient where device_sn='"+deviceSn+"' and o.status=1  ";
                pageSql = bl?" and o.create_time >= '"+beforeTime+"' and o.create_time <= '"+afterTime+"' ORDER BY create_time desc  limit 1 ":" ORDER BY create_time desc limit 1 ";
                sqlResult = jdbcTemplate.queryForList(sql+pageSql);
                if (sqlResult.size()>0){
                    detailInfo.put("warnStatus",true);
                    detailInfo.put("orderInfo",sqlResult.get(0));
                }else {
                    detailInfo.put("warnStatus",false);
                }*/
                sql = " SELECT g.syndyqzl,g.syndfy,g.lszyql,CAST(DATE_FORMAT(g.tong_time,'%Y-%m-%d %H:%i:%S') as char) as createTime from hz.gsq_hzrqjmyhglxtrqgrxx g " +
                        " inner join base.base_patient p on g.yhsfzh = p.idcard " +
                        " where p.id = '"+patient+"' ";