فهرست منبع

Merge branch 'dev' of liubing/wlyy2.0 into dev

liubing 4 سال پیش
والد
کامیت
cf98e69361

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

@ -0,0 +1,118 @@
package com.yihu.jw.care.endpoint.doctor;
import com.yihu.jw.doctor.service.BaseDoctorInfoService;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
 * @author zmk
 * @vsrsion 1.0
 * Created at 2019/12/9
 */
@RestController
@RequestMapping(value = BaseHospitalRequestMapping.DoctorSetting.PREFIX)
@Api(tags = "互联网医院后台医生服务配置", description = "互联网医院后台医生服务配置")
public class DoctorServiceEndPoint extends EnvelopRestEndpoint {
    @Autowired
    private BaseDoctorInfoService baseDoctorService;
    @GetMapping(value = BaseHospitalRequestMapping.DoctorSetting.queryList)
    @ApiOperation(value = "获取分页列表")
    public Envelop queryList(
            @ApiParam(name = "city", value = "市区")
            @RequestParam(value = "city", required = false) String city,
            @ApiParam(name = "hospital", value = "机构")
            @RequestParam(value = "hospital", required = false) String hospital,
            @ApiParam(name = "status", value = "状态")
            @RequestParam(value = "status", required = false) String status,
            @ApiParam(name = "name", value = "科室或医生名称")
            @RequestParam(value = "name", required = false) String name,
            @ApiParam(name = "type", value = "咨询类型")
            @RequestParam(value = "type", required = false) String type,
            @ApiParam(name = "typeCode", value = "分部,无分部不传")
            @RequestParam(value = "typeCode", required = false)String typeCode,
            @ApiParam(name = "dept", value = "部门")
            @RequestParam(value = "dept", required = false)String dept,
            @ApiParam(name = "page", value = "分页大小", required = true, defaultValue = "1")
            @RequestParam(value = "page") int page,
            @ApiParam(name = "pageSize", value = "页码", required = true, defaultValue = "10")
            @RequestParam(value = "pageSize") int pageSize) throws Exception {
        return baseDoctorService.queryList(city,hospital,status,name,type,typeCode,dept,page,pageSize);
    }
    @GetMapping(value = BaseHospitalRequestMapping.DoctorSetting.queryById)
    @ApiOperation(value = "根据医生id查询详情")
    public Envelop queryById(
            @ApiParam(name = "doctorId", value = "医生id")
            @RequestParam(value = "doctorId", required = true) String doctorId,
            @ApiParam(name = "typeCode", value = "分部,无不传")
            @RequestParam(value = "typeCode", required = false)String typeCode)throws Exception{
        Object object = baseDoctorService.queryById(doctorId,typeCode);
        if (null != object){
            return success("查询成功",object);
        }
        return failed("查询失败");
    }
    @PostMapping(value = BaseHospitalRequestMapping.DoctorSetting.update)
    @ApiOperation(value = "修改医生服务配置")
    public Envelop update(
            @ApiParam(name = "baseDoctorVo", value = "JSON数据", required = true)
            @RequestParam(value = "baseDoctorVo") String baseDoctorVo)throws Exception{
        JSONObject jsonObject = JSONObject.fromObject(baseDoctorVo);
        Boolean update = baseDoctorService.update(jsonObject);
        if (!update){
            return failed("保存失败,参数不可为空");
        }
        return success("保存成功");
    }
    @PostMapping(value = BaseHospitalRequestMapping.DoctorSetting.updateList)
    @ApiOperation(value = "批量修改医生服务配置")
    public Envelop updateList(
            @ApiParam(name = "baseDoctorVos", value = "JSON数据", required = true)
            @RequestParam(value = "baseDoctorVos") String baseDoctorVos)throws Exception{
        JSONArray jsonArray = JSONArray.fromObject(baseDoctorVos);
        Boolean update = baseDoctorService.updateList(jsonArray);
        return success("保存成功");
    }
    @GetMapping(value = BaseHospitalRequestMapping.DoctorSetting.updateStatus)
    @ApiOperation(value = "修改医生状态")
    public Envelop updateStatus(
            @ApiParam(name = "doctorId", value = "状态")
            @RequestParam(value = "doctorId", required = true) String doctorId,
            @ApiParam(name = "status", value = "状态")
            @RequestParam(value = "status", required = true) String status)throws Exception{
        baseDoctorService.updateStatus(doctorId,status);
        return success("修改成功");
    }
    @PostMapping(value = BaseHospitalRequestMapping.DoctorSetting.updateDoctorPw)
    @ApiOperation(value = "修改医生账号密码")
    public Envelop updateDoctorPw(@ApiParam(name = "id", value = "医生ID")
                                  @RequestParam(value = "id", required = true)String id,
                                  @ApiParam(name = "pw", value = "密码")
                                  @RequestParam(value = "pw", required = true)String pw,
                                  @ApiParam(name = "orgPw", value = "原密码")
                                  @RequestParam(value = "orgPw", required = true)String orgPw)throws Exception{
        return success(baseDoctorService.updateDoctorPw(id,pw,orgPw));
    }
}

+ 12 - 12
svr/svr-cloud-device/src/main/java/com/yihu/jw/care/endpoint/DeviceController.java

@ -38,7 +38,7 @@ public class DeviceController {
    }
    @ApiOperation("爱牵挂设备sos数据接收")
    @RequestMapping(value = "aqgsos", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = RequestMethod.POST)
    @RequestMapping(value = "aqgsos", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
    public String aqgsos(
            @ApiParam(name="imei",required = false,value="15位设备唯一序号",defaultValue = "")
            @RequestParam(value = "imei",required = false) String imei,
@ -60,7 +60,7 @@ public class DeviceController {
    }
    @ApiOperation("爱牵挂设备开关机数据接收")
    @RequestMapping(value = "aqgSwitch", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = RequestMethod.POST)
    @RequestMapping(value = "aqgSwitch", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
    public String aqgSwitch(
            @ApiParam(name="imei",required = false,value="15位设备唯一序号",defaultValue = "")
            @RequestParam(value = "imei",required = false) String imei,
@ -84,7 +84,7 @@ public class DeviceController {
    }
    @ApiOperation("爱牵挂设备消息通知数据接收")
    @RequestMapping(value = "pushdata", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = RequestMethod.GET)
    @RequestMapping(value = "pushdata", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
    public String pushdata(
            @ApiParam(name="type",required = false,value="根据type来定义给用户推送提示  type=1 SOS,type=5 设备低电, 其他类型非本机型所有",defaultValue = "")
            @RequestParam(value = "type",required = false) int type,
@ -108,7 +108,7 @@ public class DeviceController {
    //
    @ApiOperation("柏颐设备位置接收")
    @RequestMapping(value = "byLocation", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = RequestMethod.POST)
    @RequestMapping(value = "byLocation", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
    public String byLocation(
            @ApiParam(name="imei",required = false,value="15位设备唯一序号",defaultValue = "")
            @RequestParam(value = "imei",required = true) String imei,
@ -143,7 +143,7 @@ public class DeviceController {
    @ApiOperation("柏颐心率数据接收")
    @RequestMapping(value = "byHeartRate", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = RequestMethod.POST)
    @RequestMapping(value = "byHeartRate", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
    public String byHeartRate(
            @ApiParam(name = "imei", value = "15位设备唯一序号")
            @RequestParam(value = "imei",required = true)String imei,
@ -169,7 +169,7 @@ public class DeviceController {
    }
    @ApiOperation("柏颐血压数据接收")
    @RequestMapping(value = "byBloodPressure", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = RequestMethod.POST)
    @RequestMapping(value = "byBloodPressure", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
    public String byBloodPressure(
            @ApiParam(name = "imei", value = "15位设备唯一序号", required = true)
            @RequestParam(value = "imei",required = true)String imei,
@ -197,7 +197,7 @@ public class DeviceController {
    }
    @ApiOperation("柏颐跌倒数据接收")
    @RequestMapping(value = "byFall", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = RequestMethod.POST)
    @RequestMapping(value = "byFall", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
    public String byFall(
            @ApiParam(name = "imei", value = "15位设备唯一序号", required = true)
            @RequestParam(value = "imei",required = true)String imei,
@ -227,7 +227,7 @@ public class DeviceController {
    }
    @ApiOperation("柏颐设备sos数据接收")
    @RequestMapping(value = "bySos", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = RequestMethod.POST)
    @RequestMapping(value = "bySos", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
    public String bySos(
            @ApiParam(name="imei",required = false,value="15位设备唯一序号",defaultValue = "")
            @RequestParam(value = "imei",required = true) String imei,
@ -259,7 +259,7 @@ public class DeviceController {
    }
    @ApiOperation("柏颐设备步数接收")
    @RequestMapping(value = "bySteps", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = RequestMethod.POST)
    @RequestMapping(value = "bySteps", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
    public String bySteps(
            @ApiParam(name="imei",required = false,value="15位设备唯一序号",defaultValue = "")
            @RequestParam(value = "imei",required = true) String imei,
@ -281,7 +281,7 @@ public class DeviceController {
    }
    @ApiOperation("柏颐设备睡眠接收")
    @RequestMapping(value = "bySleep", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = RequestMethod.POST)
    @RequestMapping(value = "bySleep", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
    public String bySleep(
            @ApiParam(name="imei",required = false,value="15位设备唯一序号",defaultValue = "")
            @RequestParam(value = "imei",required = true) String imei,
@ -311,7 +311,7 @@ public class DeviceController {
    }
    @ApiOperation("柏颐设备开关机数据接收")
    @RequestMapping(value = "bySwitch", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = RequestMethod.POST)
    @RequestMapping(value = "bySwitch", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
    public String bySwitch(
            @ApiParam(name="imei",required = false,value="15位设备唯一序号",defaultValue = "")
            @RequestParam(value = "imei",required = true) String imei,
@ -336,7 +336,7 @@ public class DeviceController {
    }
    @ApiOperation("柏颐设备消息通知数据接收")
    @RequestMapping(value = "byPushData", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = RequestMethod.POST)
    @RequestMapping(value = "byPushData", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
    public String byPushData(
            @ApiParam(name="type",required = false,value="type=1 SOS,type=2 fall,type=3 new 新成员加入 ,type=4 电子围栏触发, type=5 设备低电,type=6 环境音 ",defaultValue = "")
            @RequestParam(value = "type",required = false) int type,