Browse Source

Merge branch 'dev' of yeshijie/patient-co-management into dev

yeshijie 7 years ago
parent
commit
d63ab5d29d

+ 8 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/consult/ConsultController.java

@ -352,7 +352,10 @@ public class ConsultController extends WeixinBaseController {
            System.out.println("guidance2="+guidance);
            // 保存到数据库
            int res = consultTeamService.addTeamConsult(consult, getRepUID(),getUID());
            int res = 0;
            synchronized (getRepUID().intern()){//新增同步方法。设备保存写在service层但是不生效,写在controller层才生效
                res = consultTeamService.addTeamConsult(consult, getRepUID(),getUID());
            }
            if (res == -1) {
                return error(-1, "家庭签约信息不存在或已过期,无法进行家庭医生咨询!");
            } else if (res == -2) {
@ -989,7 +992,10 @@ public class ConsultController extends WeixinBaseController {
            consult.setAdminTeamId(adminTeamId);
            // 保存到数据库
//            int res = consultTeamService.addPrescriptionConsult(jwCode, "b02f132bfbfc45d287bcde18ad342522","b02f132bfbfc45d287bcde18ad342522",doctor,consult,reason,type);
            int res = consultTeamService.addPrescriptionConsult(jwCode, getRepUID(),getUID(),doctor,consult,reason,type);
            int res = 0;
            synchronized (jwCode.intern()){
                res = consultTeamService.addPrescriptionConsult(jwCode, getRepUID(),getUID(),doctor,consult,reason,type);
            }
            if (res == -1) {
                return error(-1, "该处方存在未审核的续方,无法进行续方咨询!");
            } if (res == -2) {

+ 4 - 3
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/device/PatientDeviceController.java

@ -7,7 +7,6 @@ import com.yihu.wlyy.repository.deviece.PatientHealthTimeDao;
import com.yihu.wlyy.repository.patient.PatientDeviceDao;
import com.yihu.wlyy.service.app.device.PatientDeviceService;
import com.yihu.wlyy.util.HttpClientUtil;
import com.yihu.wlyy.util.SystemConf;
import com.yihu.wlyy.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -161,8 +160,10 @@ public class PatientDeviceController extends BaseController {
            if(!getUID().equals(getRepUID())&&device.getId()==null){
                device.setAgent(getRepUID());
            }
            patientDeviceService.saveDevice(device);
            String sn = device.getDeviceSn();
            synchronized (sn.intern()){
                patientDeviceService.saveDevice(device);
            }
            return success("设备保存成功!");
        } catch (Exception ex) {