LAPTOP-KB9HII50\70708 před 1 rokem
rodič
revize
500156c0ac

+ 6 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/doctor/BaseDoctorService.java

@ -517,8 +517,14 @@ public class BaseDoctorService extends BaseJpaService<BaseDoctorDO, BaseDoctorDa
                mems.setCreateTime(new Date());
                baseTeamMemberDao.save(mems);
            }
        }
        //生成医生二维码
        if("xm_dsyy_wx".equals(wxId)){
            String url = "http://127.0.0.1:10022/open/noLogin/setXcxQrCode";
            String response = httpClientUtil.get(url,"UTF-8");
        }
        result.put("response", ConstantUtils.SUCCESS);
        result.put("msg", baseDoctorDO);
        return result.toJSONString();

+ 2 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/service/consult/KnowledgeArticleService.java

@ -301,6 +301,8 @@ public class KnowledgeArticleService extends BaseJpaService<KnowledgeArticleDO,
					if (null!=wlyySurveyTemplateDO){
						object.put("title",wlyySurveyTemplateDO.getTitle());
						object.put("content",wlyySurveyTemplateDO.getTemplateComment());
						object.put("doctor",patientBusinessDO.getDoctor());
						object.put("doctorName",patientBusinessDO.getDoctorName());
						object.put("id",wlyySurveyTemplateDO.getId());
					}
					imUtil.sendImMsg(patientBusinessDO.getDoctor(), patientBusinessDO.getDoctorName(), patientBusinessDO.getSessionId(), "17", object.toJSONString(),"1",null);

+ 1 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/service/consult/QrcodeService.java

@ -174,7 +174,7 @@ public class QrcodeService {
    /**
     * 生成某个医生的小程序二维码
     *
     * 小程序page的页面需要上线
     * @param doctor
     * @return
     * @throws Exception

+ 5 - 3
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/health/controller/DoctorDeviceController.java

@ -88,7 +88,9 @@ public class DoctorDeviceController extends BaseController {
	@ApiOperation("设备保存接口--医生端")
	@RequestMapping(value = "SavePatientDevice",method = RequestMethod.POST)
	public String saveDevice(@ApiParam(name="data",value="设备数据json",defaultValue = "{\"user\":\"915cca0a-5b1d-11e6-8344-fa163e8aee56\",\"deviceId\": \"3\",\"deviceName\": \"血压计-优瑞恩\",\"deviceSn\": \"16C000337\",\"categoryCode\": \"1\",\"userType\": \"-1\"}")
							  @RequestParam(value="data",required = true) String data) {
							  @RequestParam(value="data",required = true) String data,
							 @ApiParam(name="isScan",value="是否扫一扫 1是0否,默认否",required = false)
							 @RequestParam(value="isScan",required = false) String isScan) {
		try {
			DevicePatientDevice device = objectMapper.readValue(data,DevicePatientDevice.class);
			if(StringUtils.isBlank(device.getDeviceSn())){
@ -104,7 +106,7 @@ public class DoctorDeviceController extends BaseController {
			Map<String,Object> checkMap = patientDeviceService.checkBindingFirstAndType(device);
			boolean flag = (Boolean)checkMap.get("flag");
			//绑定
			patientDeviceService.saveDevice(device);
			patientDeviceService.saveDevice(device,isScan);
			patientDeviceLogService.savePatientDeviceLog(device,device.getDeviceSn(),1,1);
			//修改设备表中{"1":"0", "2":"0"}绑定次数 和其他绑定信息,
@ -141,7 +143,7 @@ public class DoctorDeviceController extends BaseController {
			boolean flag = (Boolean)checkMap.get("flag");
			//绑定
			patientDeviceService.saveDevice(device);
			patientDeviceService.saveDevice(device,null);
			patientDeviceLogService.savePatientDeviceLog(device,device.getDeviceSn(),1,1);
			//修改设备表中{"1":"0", "2":"0"}绑定次数 和其他绑定信息,

+ 4 - 2
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/health/controller/PatientDeviceController.java

@ -173,7 +173,9 @@ public class PatientDeviceController extends BaseController {
    @ApiOperation("设备保存接口")
    @RequestMapping(value = "SavePatientDevice", method = RequestMethod.POST)
    public String saveDevice(@ApiParam(name = "json", value = "设备数据json", defaultValue = "{\"deviceId\": \"3\",\"deviceName\": \"血压计-优瑞恩\",\"deviceSn\": \"06B52305030267\",\"categoryCode\": \"1\",\"userType\": \"-1\"}")
                             @RequestParam(value = "json", required = true) String json) {
                             @RequestParam(value = "json", required = true) String json,
                             @ApiParam(name="isScan",value="是否扫一扫 1是0否,默认否",required = false)
                             @RequestParam(value="isScan",required = false) String isScan) {
        try {
            DevicePatientDevice device = objectMapper.readValue(json, DevicePatientDevice.class);
            if(StringUtils.isBlank(device.getDeviceSn())){
@ -197,7 +199,7 @@ public class PatientDeviceController extends BaseController {
            }
            String sn = device.getDeviceSn();
            synchronized (sn.intern()){
                patientDeviceService.saveDevice(device);
                patientDeviceService.saveDevice(device,isScan);
                patientDeviceLogService.savePatientDeviceLog(device,device.getDeviceSn(),2,1);
            }
            //修改设备表中{"1":"0", "2":"0"}的绑定次数 和其他绑定信息

+ 2 - 8
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/health/service/PatientDeviceService.java

@ -81,7 +81,7 @@ public class PatientDeviceService  {
    /**
     * 保存患者设备
     */
    public boolean saveDevice(DevicePatientDevice patientDevice) throws Exception {
    public boolean saveDevice(DevicePatientDevice patientDevice,String isScan) throws Exception {
        //判断sn码是否被使用
        String sn = patientDevice.getDeviceSn();
        String type = patientDevice.getCategoryCode();
@ -108,7 +108,7 @@ public class PatientDeviceService  {
        //校验sn码是否被使用
        if (needVerify) {
            DevicePatientDevice device = patientDeviceDao.findByDeviceSnAndUserType(sn, userType);
            if (device != null && !device.getId().equals(patientDevice.getId())) {
            if (!"1".equals(isScan)&&device != null && !device.getId().equals(patientDevice.getId())) {
                throw new ServiceException("sn码" + sn + "已被使用!");
            }
            deviceDetailService.registerToWlyy(patientDevice);
@ -120,12 +120,6 @@ public class PatientDeviceService  {
        patientDevice.setUserIdcard(patient.getIdcard());
        savePatientDevice(patientDevice);
//        if(checkDeviceSn(sn)){
//            savePatientDevice(patientDevice);
//        }else {
//            String message = "设备不存在";
//            throw new ServiceException(message);
//        }
        return true;
    }