浏览代码

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

LAPTOP-KB9HII50\70708 2 年之前
父节点
当前提交
fb22e30b4e
共有 15 个文件被更改,包括 339 次插入63 次删除
  1. 4 8
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java
  2. 2 2
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/EntranceService.java
  3. 1 1
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/HcyyEntranceService.java
  4. 3 4
      business/base-service/src/main/java/com/yihu/jw/patient/service/BasePatientService.java
  5. 1 1
      svr/svr-cloud-care/pom.xml
  6. 7 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/device/BaseMqttCallbackRecordDao.java
  7. 49 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/device/YsDeviceController.java
  8. 21 10
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/device/PatientDeviceService.java
  9. 158 0
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/device/YsDeviceService.java
  10. 22 7
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/security/SecurityMonitoringOrderService.java
  11. 26 13
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/third/PatientInfoPlatFormService.java
  12. 27 2
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/util/MQTTKXClientUtil.java
  13. 14 11
      svr/svr-cloud-care/src/main/java/com/yihu/jw/care/util/PostConstructUtil.java
  14. 1 1
      svr/svr-cloud-care/src/main/resources/application.yml
  15. 3 3
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

+ 4 - 8
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java

@ -2192,7 +2192,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        net.sf.json.JSONObject object1 = entranceService.qutpatientBalance(outpatientDO.getCardNo(), demoFlag);
        net.sf.json.JSONObject object1 = entranceService.qutpatientBalance(outpatientDO.getCardNo(), demoFlag);
        BaseDoctorDO doctorDO = baseDoctorDao.findById(doctor);
        BaseDoctorDO doctorDO = baseDoctorDao.findById(doctor);
        if (doctorDO == null) {
        if (doctorDO == null) {
            throw new RuntimeException("未找到医生信息");
            throw new RuntimeException("未找到患者信息");
        }
        }
        logger.info("下载银医通");
        logger.info("下载银医通");
        String chargeType = "";
        String chargeType = "";
@ -15823,13 +15823,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    public WlyyOutpatientDO updateOutpatient(String outpatientId,String diseaseCode,String diseaseName,String medicalState,String isDisease){
    public WlyyOutpatientDO updateOutpatient(String outpatientId,String diseaseCode,String diseaseName,String medicalState,String isDisease){
            WlyyOutpatientDO outpatientDO = outpatientDao.findById(outpatientId);
            WlyyOutpatientDO outpatientDO = outpatientDao.findById(outpatientId);
            outpatientDO.setIsDisease(isDisease);
            outpatientDO.setIsDisease(isDisease);
            if (StringUtils.isNoneBlank(diseaseCode)){
                outpatientDO.setDiseaseCode(diseaseCode);
                outpatientDO.setDiseaseName(diseaseName);
            }
            if (StringUtils.isNoneBlank(medicalState)){
                outpatientDO.setMedicalState(medicalState);
            }
            outpatientDO.setDiseaseCode(diseaseCode);
            outpatientDO.setDiseaseName(diseaseName);
            outpatientDO.setMedicalState(medicalState);
            return outpatientDao.save(outpatientDO);
            return outpatientDao.save(outpatientDO);
    }
    }

+ 2 - 2
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/EntranceService.java

@ -424,7 +424,7 @@ public class EntranceService {
                                wlyyPrescriptionInfoVO.setDosage(null != jsonObjectBody.get("YPYL00") ? jsonObjectBody.get("YPYL00").toString() : "");
                                wlyyPrescriptionInfoVO.setDosage(null != jsonObjectBody.get("YPYL00") ? jsonObjectBody.get("YPYL00").toString() : "");
                                wlyyPrescriptionInfoVO.setUnitName(null != jsonObjectBody.get("DCYYDW") ? jsonObjectBody.get("DCYYDW").toString() : "");
                                wlyyPrescriptionInfoVO.setUnitName(null != jsonObjectBody.get("DCYYDW") ? jsonObjectBody.get("DCYYDW").toString() : "");
                                wlyyPrescriptionInfoVO.setQuantity(null != jsonObjectBody.get("DRUG_QTY") ? jsonObjectBody.get("DRUG_QTY").toString() : "");
                                wlyyPrescriptionInfoVO.setQuantity(null != jsonObjectBody.get("DRUG_QTY") ? jsonObjectBody.get("DRUG_QTY").toString() : "");
                                wlyyPrescriptionInfoVO.setUnit(null != jsonObjectBody.get("UNIT") ? jsonObjectBody.get("UNIT").toString() : "");
                                wlyyPrescriptionInfoVO.setUnit(null != jsonObjectBody.get("DCYYCODE") ? jsonObjectBody.get("DCYYCODE").toString() : "");
                                wlyyPrescriptionInfoVO.setUsageName(null != jsonObjectBody.get("YPPL00") ? jsonObjectBody.get("YPPL00").toString() : "");
                                wlyyPrescriptionInfoVO.setUsageName(null != jsonObjectBody.get("YPPL00") ? jsonObjectBody.get("YPPL00").toString() : "");
                                wlyyPrescriptionInfoVO.setSupplyName(null != jsonObjectBody.get("YPYF00") ? jsonObjectBody.get("YPYF00").toString() : "");
                                wlyyPrescriptionInfoVO.setSupplyName(null != jsonObjectBody.get("YPYF00") ? jsonObjectBody.get("YPYF00").toString() : "");
                                wlyyPrescriptionInfoVO.setUsageCode(null != jsonObjectBody.get("YPPLCODE") ? jsonObjectBody.get("YPPLCODE").toString() : "");
                                wlyyPrescriptionInfoVO.setUsageCode(null != jsonObjectBody.get("YPPLCODE") ? jsonObjectBody.get("YPPLCODE").toString() : "");
@ -2783,7 +2783,7 @@ public class EntranceService {
                                        baseDoctorDO.setAtddrNo(atddrNo);
                                        baseDoctorDO.setAtddrNo(atddrNo);
                                    }
                                    }
                                    //互联网医院:1停用,0使用  转 i健康:1正常,0作废
                                    //互联网医院:1停用,0使用  转 i健康:1正常,0作废
                                    baseDoctorDO.setDel("1".equals(disableFlag) ? "0" : "1");
                                    baseDoctorDO.setDel("0".equals(disableFlag) ? "1" : "0");
                                    baseDoctorDO.setMobile("0");
                                    baseDoctorDO.setMobile("0");
                                    baseDoctorDO.setIsFamous(0);
                                    baseDoctorDO.setIsFamous(0);
                                    baseDoctorDO.setCreateTime(new Date());
                                    baseDoctorDO.setCreateTime(new Date());

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/HcyyEntranceService.java

@ -1241,7 +1241,7 @@ public class HcyyEntranceService {
        String condition ="";
        String condition ="";
        logger.info("spellCode"+spellCode+drugNo+"spellCode");
        logger.info("spellCode"+spellCode+drugNo+"spellCode");
        if (!StringUtils.isEmpty(spellCode)){
        if (!StringUtils.isEmpty(spellCode)){
            condition += "<spell_code>"+spellCode+"</spell_code>";
            condition += "<spell_code>"+spellCode.toUpperCase()+"</spell_code>";
        }
        }
        if (!StringUtils.isEmpty(drugNo)){
        if (!StringUtils.isEmpty(drugNo)){
            condition += "<physic_code>"+drugNo+"</physic_code>";
            condition += "<physic_code>"+drugNo+"</physic_code>";

+ 3 - 4
business/base-service/src/main/java/com/yihu/jw/patient/service/BasePatientService.java

@ -168,7 +168,6 @@ public class BasePatientService<T, R extends CrudRepository> extends BaseJpaServ
     */
     */
    public MixEnvelop queryPatientBaseInfo(String nameOrIdcard, int page, int size, String sorts)throws Exception{
    public MixEnvelop queryPatientBaseInfo(String nameOrIdcard, int page, int size, String sorts)throws Exception{
        List<Map<String, Object>> result = new ArrayList<>();
        List<Map<String, Object>> result = new ArrayList<>();
        String param = null == nameOrIdcard ? "": nameOrIdcard;
        String sql = "SELECT\n" +
        String sql = "SELECT\n" +
                "\tID AS \"id\",\n" +
                "\tID AS \"id\",\n" +
                "\tidcard AS \"idcard\",\n" +
                "\tidcard AS \"idcard\",\n" +
@ -196,8 +195,9 @@ public class BasePatientService<T, R extends CrudRepository> extends BaseJpaServ
                    "\tNAME LIKE '%"+nameOrIdcard+"%'\n" +
                    "\tNAME LIKE '%"+nameOrIdcard+"%'\n" +
                    "OR idcard LIKE '%"+nameOrIdcard+"%'\n";
                    "OR idcard LIKE '%"+nameOrIdcard+"%'\n";
        }
        }
        sql+="ORDER BY\n" +
                "\tcreate_time DESC";
        /*sql+="ORDER BY\n" +
                "\tcreate_time DESC"*/;
        result = hibenateUtils.createSQLQuery(sql,page,size);
        String countSql = "select count(id) from base_patient where 1=1 " ;
        String countSql = "select count(id) from base_patient where 1=1 " ;
        if (StringUtils.isNoneBlank(nameOrIdcard)){
        if (StringUtils.isNoneBlank(nameOrIdcard)){
            countSql+= " and name like '%" + nameOrIdcard + "%' or idcard like '%" + nameOrIdcard + "%' ";
            countSql+= " and name like '%" + nameOrIdcard + "%' or idcard like '%" + nameOrIdcard + "%' ";
@ -208,7 +208,6 @@ public class BasePatientService<T, R extends CrudRepository> extends BaseJpaServ
            return null;
            return null;
        }
        }
        MixEnvelop envelop = new MixEnvelop();
        MixEnvelop envelop = new MixEnvelop();
        result = hibenateUtils.createSQLQuery(sql,page,size);
        envelop.setDetailModelList(result);
        envelop.setDetailModelList(result);
        envelop.setTotalCount(count.intValue());
        envelop.setTotalCount(count.intValue());
        envelop.setCurrPage(page);
        envelop.setCurrPage(page);

+ 1 - 1
svr/svr-cloud-care/pom.xml

@ -294,7 +294,7 @@
    </dependencies>
    </dependencies>
    <build>
    <build>
        <finalName>svr-cloud-care-test</finalName>
        <finalName>svr-cloud-care</finalName>
        <plugins>
        <plugins>
            <plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <groupId>org.apache.maven.plugins</groupId>

+ 7 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/dao/device/BaseMqttCallbackRecordDao.java

@ -1,8 +1,12 @@
package com.yihu.jw.care.dao.device;
package com.yihu.jw.care.dao.device;
import com.yihu.jw.entity.care.activity.ChildActivityRegistrationDO;
import com.yihu.jw.entity.care.device.BaseMqttCallbackRecordDO;
import com.yihu.jw.entity.care.device.BaseMqttCallbackRecordDO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import java.util.List;
/**
/**
 * Created by yeshijie on 2023/1/13.
 * Created by yeshijie on 2023/1/13.
@ -10,5 +14,8 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
public interface BaseMqttCallbackRecordDao extends JpaRepository<BaseMqttCallbackRecordDO,String>,
public interface BaseMqttCallbackRecordDao extends JpaRepository<BaseMqttCallbackRecordDO,String>,
        JpaSpecificationExecutor<BaseMqttCallbackRecordDO> {
        JpaSpecificationExecutor<BaseMqttCallbackRecordDO> {
    @Query("select a from BaseMqttCallbackRecordDO a where a.deviceId = ?1 and a.topic = ?2 order by a.createTime desc")
    List<BaseMqttCallbackRecordDO> findByDeviceIdAndAndTopic(String deviceId,String topic);
}
}

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

@ -63,6 +63,55 @@ public class YsDeviceController extends BaseController {
        }
        }
    }
    }
    @ApiOperation("海马视频-视频操作指令")
    @RequestMapping(value = "kaixuanSpOperate", method = {RequestMethod.POST,RequestMethod.GET})
    public String kaixuanSpOperate(
            @ApiParam(name="deviceSerial",required = true,value="设备序列号")
            @RequestParam(value = "deviceSerial",required = true) String deviceSerial,
            @ApiParam(name="operate",required = false,value="ipcam_video_start 开启视频\n" +
                    " ipcam_video_start1 关闭视频推流\n" +
                    "ipcam_audio_start 开启音频推流\n" +
                    "ipcam_audio_start1 关闭音频推流\n" +
                    "ipcam_jpeg_snapshot 视频画面截图保存\n" +
                    "ipcam_motor_reset  控制云台复位(校准)\n" +
                    " ipcam_motor_left 控制云台左移\n" +
                    " ipcam_motor_right 控制云台右移\n" +
                    " ipcam_motor_up 控制云台上移\n" +
                    " ipcam_motor_down 控制云台下移")
            @RequestParam(value = "operate",required = false) String operate,
            HttpServletRequest request){
        try {
            return write(200,"查询成功","data",ysDeviceService.kaixuanSpOperate(deviceSerial,operate));
        }catch (Exception e){
            return errorResult(e);
        }
    }
    @ApiOperation("海马视频-由于是异步,所以定时查询视频操作执行相应")
    @RequestMapping(value = "selectKxSpOperate", method = {RequestMethod.POST,RequestMethod.GET})
    public String selectKxSpOperate(
            @ApiParam(name="deviceSerial",required = true,value="设备序列号")
            @RequestParam(value = "deviceSerial",required = true) String deviceSerial,
            @ApiParam(name="operate",required = false,value="ipcam_video_start 开启视频\n" +
                    " ipcam_video_start1 关闭视频推流\n" +
                    "ipcam_audio_start 开启音频推流\n" +
                    "ipcam_audio_start1 关闭音频推流\n" +
                    "ipcam_jpeg_snapshot 视频画面截图保存\n" +
                    "ipcam_motor_reset  控制云台复位(校准)\n" +
                    " ipcam_motor_left 控制云台左移\n" +
                    " ipcam_motor_right 控制云台右移\n" +
                    " ipcam_motor_up 控制云台上移\n" +
                    " ipcam_motor_down 控制云台下移")
            @RequestParam(value = "operate",required = false) String operate,
            HttpServletRequest request){
        try {
            return write(200,"查询成功","data",ysDeviceService.selectKxSpOperate(deviceSerial,operate));
        }catch (Exception e){
            return errorResult(e);
        }
    }
    @ApiOperation("视频加解密")
    @ApiOperation("视频加解密")
    @RequestMapping(value = "deviceEncrypt", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
    @RequestMapping(value = "deviceEncrypt", produces = "application/x-www-form-urlencoded;charset=UTF-8", method = {RequestMethod.POST,RequestMethod.GET})
    public String deviceEncrypt(
    public String deviceEncrypt(

+ 21 - 10
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/device/PatientDeviceService.java

@ -131,7 +131,8 @@ public class PatientDeviceService extends BaseJpaService<DevicePatientDevice, Pa
    private PatientSafeAreaConfirmDao patientSafeAreaConfirmDao;
    private PatientSafeAreaConfirmDao patientSafeAreaConfirmDao;
    @Autowired
    @Autowired
    private HzInterfaceService hzInterfaceService;
    private HzInterfaceService hzInterfaceService;
    @Value("${wechat.id}")
    private String wxId;
    /**
    /**
     * 获取烟雾 燃气浓度
     * 获取烟雾 燃气浓度
     * @param patient
     * @param patient
@ -1074,16 +1075,26 @@ public class PatientDeviceService extends BaseJpaService<DevicePatientDevice, Pa
                    break;
                    break;
                case "12"://监控 视频地址
                case "12"://监控 视频地址
                    com.alibaba.fastjson.JSONObject tmp = null;
                    com.alibaba.fastjson.JSONObject tmp = null;
                    if("ys".equals(videoType)){
                        tmp = ysDeviceService.getDeviceLiveAddress2(deviceSn,1,null);
                    if (wxId.equalsIgnoreCase("hz_kx_wx")) {
                        tmp = ysDeviceService.getKxDeviceLiveAddress(patient, deviceSn, 1, null);
                        devInfoObj.put("monitorInfoStatus", tmp.getIntValue(ResponseContant.resultFlag));
                        if (tmp.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
                            devInfoObj.put("monitorInfo", tmp.getString(ResponseContant.resultMsg));
                        } else {
                            devInfoObj.put("monitorInfo", tmp.getJSONObject(ResponseContant.resultMsg));
                        }
                    }else {
                    }else {
                        tmp = ysDeviceService.getDeviceLiveAddress(patient, deviceSn, 1, null);
                    }
                    devInfoObj.put("monitorInfoStatus", tmp.getIntValue(ResponseContant.resultFlag));
                    if (tmp.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
                        devInfoObj.put("monitorInfo", tmp.getString(ResponseContant.resultMsg));
                    } else {
                        devInfoObj.put("monitorInfo", tmp.getJSONObject(ResponseContant.resultMsg));
                        if("ys".equals(videoType)){
                            tmp = ysDeviceService.getDeviceLiveAddress2(deviceSn,1,null);
                        }else {
                            tmp = ysDeviceService.getDeviceLiveAddress(patient, deviceSn, 1, null);
                        }
                        devInfoObj.put("monitorInfoStatus", tmp.getIntValue(ResponseContant.resultFlag));
                        if (tmp.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
                            devInfoObj.put("monitorInfo", tmp.getString(ResponseContant.resultMsg));
                        } else {
                            devInfoObj.put("monitorInfo", tmp.getJSONObject(ResponseContant.resultMsg));
                        }
                    }
                    }
                    content +="防跌倒视频监测";
                    content +="防跌倒视频监测";
                    break;
                    break;

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

@ -3,10 +3,14 @@ package com.yihu.jw.care.service.device;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.care.config.YsConfig;
import com.yihu.jw.care.config.YsConfig;
import com.yihu.jw.care.dao.device.BaseMqttCallbackRecordDao;
import com.yihu.jw.care.dao.device.PatientDeviceDao;
import com.yihu.jw.care.dao.device.PatientDeviceDao;
import com.yihu.jw.care.dao.device.YsConfigDao;
import com.yihu.jw.care.dao.device.YsConfigDao;
import com.yihu.jw.care.util.DeviceUtil;
import com.yihu.jw.care.util.DeviceUtil;
import com.yihu.jw.care.util.HttpClientUtilCare;
import com.yihu.jw.care.util.HttpClientUtilCare;
import com.yihu.jw.care.util.MQTTKXClientUtil;
import com.yihu.jw.entity.base.message.MqMessageSubscriberDO;
import com.yihu.jw.entity.care.device.BaseMqttCallbackRecordDO;
import com.yihu.jw.entity.care.device.DevicePatientDevice;
import com.yihu.jw.entity.care.device.DevicePatientDevice;
import com.yihu.jw.entity.care.device.YsConfigDo;
import com.yihu.jw.entity.care.device.YsConfigDo;
import com.yihu.jw.restmodel.ResponseContant;
import com.yihu.jw.restmodel.ResponseContant;
@ -33,6 +37,8 @@ import java.text.MessageFormat;
import java.util.*;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeUnit;
import static java.lang.Thread.sleep;
/**
/**
 * Created by Bing on 2021/6/1.
 * Created by Bing on 2021/6/1.
 */
 */
@ -55,6 +61,10 @@ public class YsDeviceService {
    private YsConfigDao ysConfigDao;
    private YsConfigDao ysConfigDao;
    @Autowired
    @Autowired
    private JdbcTemplate jdbcTemplate;
    private JdbcTemplate jdbcTemplate;
    @Autowired
    private BaseMqttCallbackRecordDao mqttCallbackRecordDao;
    @Autowired
    private MQTTKXClientUtil mqttkxClientUtil;
    /**
    /**
     * 获取萤石设备assesToken
     * 获取萤石设备assesToken
@ -334,6 +344,154 @@ public class YsDeviceService {
         */
         */
    }
    }
    /**
     * 获取凯旋街道视频地址
     */
    public JSONObject getKxDeviceLiveAddress(String patient,String deviceSerial,Integer channelNo,HttpServletRequest request) throws Exception {
        JSONObject result = new JSONObject();
        if (StringUtils.isBlank(deviceSerial)){
            if (StringUtils.isNotBlank(patient)){
                List<DevicePatientDevice> devices = patientDeviceDao.findByUserAndCategoryCode(patient,"12");
                if (devices.size()>0){
                    deviceSerial = devices.get(0).getDeviceSn();
                }
            }
        }
        MultiValueMap<String, String> param = new LinkedMultiValueMap<>();
        param.add("deviceSerial",deviceSerial);
        param.add("channelNo",channelNo+"");
        BaseMqttCallbackRecordDO baseMqttCallbackRecordDO=kaixuanSpOperate(deviceSerial,"ipcam_video_start");
        if (baseMqttCallbackRecordDO!=null){
            //{"ipcam_video_start":"1","sourceURL":"http://121.40.135.79/live/18183412724e5573_1679361245235/hls.m3u8","retCode":"0","message":"success."}
            JSONObject payloadJson = new JSONObject();
            if (StringUtils.isNoneBlank(baseMqttCallbackRecordDO.getPayload())){
                payloadJson = JSONObject.parseObject(baseMqttCallbackRecordDO.getPayload());
                payloadJson.put("deviceSerial",deviceSerial);
            }
            result.put(ResponseContant.resultFlag,ResponseContant.success);
            result.put(ResponseContant.resultMsg,payloadJson);
        }
        return result;
        //https://open.ys7.com/doc/zh/book/index/address.html#address-api2
        /**
         * {
         *     "msg":"操作成功!",
         *     "code":"200",
         *     "data":{
         *         "deviceSerial":"F56826706",
         *         "channelNo":1,
         *         "deviceName":"C6Wi(F56826706)",
         *         "liveAddress":"http://hls01open.ys7.com/openlive/99c146f11ab042849fd4b49f7b0d86cf.m3u8",  HLS流畅直播地址
         *         "hdAddress":"http://hls01open.ys7.com/openlive/99c146f11ab042849fd4b49f7b0d86cf.hd.m3u8",  HLS高清直播地址
         *         "rtmp":"rtmp://rtmp01open.ys7.com/openlive/99c146f11ab042849fd4b49f7b0d86cf",               RTMP流畅直播地址
         *         "rtmpHd":"rtmp://rtmp01open.ys7.com/openlive/99c146f11ab042849fd4b49f7b0d86cf.hd",           RTMP高清直播地址
         *         "flvAddress":"https://flvopen.ys7.com:9188/openlive/99c146f11ab042849fd4b49f7b0d86cf.flv",    FLV流畅直播地址
         *         "hdFlvAddress":"https://flvopen.ys7.com:9188/openlive/99c146f11ab042849fd4b49f7b0d86cf.hd.flv", FLV高清直播地址
         *         "status":1,
         *         "exception":0,0-正常,1-设备不在线,2-设备开启视频加密,3-设备删除,4-失效,5-未绑定,6-账户下流量已超出,7-设备接入限制,0/1/2/6状态返回地址,其他不返回
         *         "beginTime":1622615659000,
         *         "endTime":1622615659000
         *     }
         * }
         */
    }
    public BaseMqttCallbackRecordDO selectKxSpOperate(String deviceSn,String operate){
        if (operate.equalsIgnoreCase("ipcam_video_start1")){
            operate="ipcam_video_start";
        }else if (operate.equalsIgnoreCase("ipcam_audio_start1")){
            operate="ipcam_audio_start";
        }
        String topic = mqttkxClientUtil.commandMapRes.get(operate).replace("{deviceId}",deviceSn);
        BaseMqttCallbackRecordDO mqttCallbackRecordDO = new BaseMqttCallbackRecordDO();
        List<BaseMqttCallbackRecordDO> mqttCallbackRecordDOS = mqttCallbackRecordDao.findByDeviceIdAndAndTopic(deviceSn,topic);
        if (mqttCallbackRecordDOS!=null&&mqttCallbackRecordDOS.size()!=0){
            mqttCallbackRecordDO = mqttCallbackRecordDOS.get(0);
        }
        return mqttCallbackRecordDO;
    }
    /**
     * ipcam_video_start 开启视频
     * ipcam_video_start1 关闭视频推流
     * ipcam_audio_start 开启音频推流
     * ipcam_audio_start1 关闭音频推流
     * ipcam_jpeg_snapshot 视频画面截图保存
     * ipcam_motor_reset  控制云台复位(校准)
     * ipcam_motor_left 控制云台左移
     * ipcam_motor_right 控制云台右移
     * ipcam_motor_up 控制云台上移
     * ipcam_motor_down 控制云台下移
     * @param deviceId
     * @param operate
     * @return
     * @throws Exception
     */
    public BaseMqttCallbackRecordDO kaixuanSpOperate(String deviceId,String operate) throws Exception {
        // 心跳
        mqttkxClientUtil.heart(deviceId);
        //订阅消息
        mqttkxClientUtil.subscribe(deviceId);
        Scanner scanner = new Scanner(System.in);
        switch (operate){
            case "ipcam_video_start":
                logger.info("开启视频推流");
                mqttkxClientUtil.common("1",deviceId,operate);
                break;
            case "ipcam_video_start1":
                logger.info("关闭视频推流");
                operate = operate.substring(0,operate.length()-1);
                mqttkxClientUtil.common("0",deviceId,operate);
                break;
            case "ipcam_audio_start":
                logger.info("开启音频推流");
                mqttkxClientUtil.common("1",deviceId,operate);
                break;
            case "ipcam_audio_start1":
                logger.info("关闭音频推流");
                operate = operate.substring(0,operate.length()-1);
                mqttkxClientUtil.common("0",deviceId,operate);
                break;
            case "ipcam_jpeg_snapshot":
                logger.info("视频画面截图保存");
                mqttkxClientUtil.common("1",deviceId,operate);
                break;
            case "ipcam_motor_reset":
                logger.info("控制云台复位(校准)");
                mqttkxClientUtil.common("0",deviceId,operate);
                break;
            case "ipcam_motor_left":
                logger.info("控制云台左移");
                mqttkxClientUtil.common("0",deviceId,operate);
                break;
            case "ipcam_motor_right":
                logger.info("控制云台右移");
                mqttkxClientUtil.common("0",deviceId,operate);
                break;
            case "ipcam_motor_up":
                logger.info("控制云台上移");
                mqttkxClientUtil.common("0",deviceId,operate);
                break;
            case "ipcam_motor_down":
                logger.info("控制云台下移");
                mqttkxClientUtil.common("0",deviceId,operate);
                break;
            default:
                System.out.println("结束");
                break;
        }
        String topic = mqttkxClientUtil.commandMapRes.get(operate).replace("{deviceId}",deviceId);
        sleep(5000);
        BaseMqttCallbackRecordDO mqttCallbackRecordDO = new BaseMqttCallbackRecordDO();
        List<BaseMqttCallbackRecordDO> mqttCallbackRecordDOS = mqttCallbackRecordDao.findByDeviceIdAndAndTopic(deviceId,topic);
        if (mqttCallbackRecordDOS!=null&&mqttCallbackRecordDOS.size()!=0){
            mqttCallbackRecordDO = mqttCallbackRecordDOS.get(0);
        }
        return mqttCallbackRecordDO;
    }
    public JSONObject deviceFailConfig(String deviceSerial,Integer type,HttpServletRequest request) throws Exception {
    public JSONObject deviceFailConfig(String deviceSerial,Integer type,HttpServletRequest request) throws Exception {
        JSONObject result = new JSONObject();
        JSONObject result = new JSONObject();
        JSONObject responseBody = new JSONObject();
        JSONObject responseBody = new JSONObject();

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

@ -56,6 +56,7 @@ import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.PageRequest;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.JdbcTemplate;
@ -154,6 +155,9 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
    private BaseServiceNewsService baseServiceNewsService;
    private BaseServiceNewsService baseServiceNewsService;
    @Autowired
    @Autowired
    private DeviceDataPushLogUtil deviceDataPushLogUtil;
    private DeviceDataPushLogUtil deviceDataPushLogUtil;
    @Value("${wechat.id}")
    private String wxId;
    private Logger logger = LoggerFactory.getLogger(SecurityMonitoringOrderService.class);
    private Logger logger = LoggerFactory.getLogger(SecurityMonitoringOrderService.class);
@ -2573,13 +2577,24 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
            JSONArray jsonArray = new JSONArray();
            JSONArray jsonArray = new JSONArray();
            for (DevicePatientDevice deviceDo : devicePatientDeviceDos) {
            for (DevicePatientDevice deviceDo : devicePatientDeviceDos) {
                JSONObject jsonObject = new JSONObject();
                JSONObject jsonObject = new JSONObject();
                JSONObject monitorUrl = ysDeviceServicel.getDeviceLiveAddress(patient, deviceDo.getDeviceSn(), 1, null);
                jsonObject.put("monitorInfoStatus",monitorUrl.getIntValue(ResponseContant.resultFlag));
                jsonObject.put("patientAddress",deviceDo.getSosAddress());
                if (monitorUrl.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
                    jsonObject.put("monitorInfo", monitorUrl.getString(ResponseContant.resultMsg));
                } else {
                    jsonObject.put("monitorInfo", monitorUrl.getJSONObject(ResponseContant.resultMsg));
                JSONObject monitorUrl = new JSONObject();
                if (wxId.equalsIgnoreCase("hz_kx_wx")) {
                    monitorUrl = ysDeviceServicel.getKxDeviceLiveAddress(patient, deviceDo.getDeviceSn(), 1, null);
                    jsonObject.put("monitorInfoStatus", monitorUrl.getIntValue(ResponseContant.resultFlag));
                    if (monitorUrl.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
                        jsonObject.put("monitorInfo", monitorUrl.getString(ResponseContant.resultMsg));
                    } else {
                        jsonObject.put("monitorInfo", monitorUrl.getJSONObject(ResponseContant.resultMsg));
                    }
                }else {
                    monitorUrl = ysDeviceServicel.getDeviceLiveAddress(patient, deviceDo.getDeviceSn(), 1, null);
                    jsonObject.put("monitorInfoStatus",monitorUrl.getIntValue(ResponseContant.resultFlag));
                    jsonObject.put("patientAddress",deviceDo.getSosAddress());
                    if (monitorUrl.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
                        jsonObject.put("monitorInfo", monitorUrl.getString(ResponseContant.resultMsg));
                    } else {
                        jsonObject.put("monitorInfo", monitorUrl.getJSONObject(ResponseContant.resultMsg));
                    }
                }
                }
                if (deviceDo.getDeviceSn().equals(result.get("ordDeviceSN"))) {
                if (deviceDo.getDeviceSn().equals(result.get("ordDeviceSN"))) {
                    jsonObject.put("fall",result.get("fall"));
                    jsonObject.put("fall",result.get("fall"));

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

@ -101,6 +101,8 @@ public class PatientInfoPlatFormService {
    private DeviceDao deviceDao;
    private DeviceDao deviceDao;
    @Value("${spring.profiles.active}")
    @Value("${spring.profiles.active}")
    private String profiles;
    private String profiles;
    @Value("${wechat.id}")
    private String wxId;
    /**
    /**
@ -720,7 +722,7 @@ public class PatientInfoPlatFormService {
    /**
    /**
     *获取设备详情
     *获取设备详情
     */
     */
    public List<Map<String,Object>> getPatientDeviceInfoWithDetail(String patient,String deviceSn,String warnTime,Integer isShow){
    public List<Map<String,Object>> getPatientDeviceInfoWithDetail(String patient,String deviceSn,String warnTime,Integer isShow) throws Exception {
        //已绑定设备
        //已绑定设备
        List<Map<String,Object>>  list = new ArrayList<>();
        List<Map<String,Object>>  list = new ArrayList<>();
        String sql = "select dd.photo,pd.device_sn,dd.brands,dd.category_code,dd.model,pd.device_name,date_format(pd.czrq,'%Y-%m-%d %H:%i:%S' ) deviceTime,dd.device_type as deviceType " +
        String sql = "select dd.photo,pd.device_sn,dd.brands,dd.category_code,dd.model,pd.device_name,date_format(pd.czrq,'%Y-%m-%d %H:%i:%S' ) deviceTime,dd.device_type as deviceType " +
@ -749,9 +751,9 @@ public class PatientInfoPlatFormService {
            list.add(resultMap);
            list.add(resultMap);
        }
        }
        //查找所有设备
       /* //查找所有设备
        if("hzkxtest".equals(profiles)){
        if("hzkxtest".equals(profiles)){
            List<Device> deviceList = deviceDao.findAll();
            *//*List<Device> deviceList = deviceDao.findAll();
            Map<String,List<Device>>  deviceMap = deviceList.stream().collect(Collectors.groupingBy(Device::getName));
            Map<String,List<Device>>  deviceMap = deviceList.stream().collect(Collectors.groupingBy(Device::getName));
            for (String deviceName:deviceMap.keySet()){
            for (String deviceName:deviceMap.keySet()){
                if(map.get(deviceName)==null){
                if(map.get(deviceName)==null){
@ -760,11 +762,11 @@ public class PatientInfoPlatFormService {
                    devicetmp.put("category_code",deviceMap.get(deviceName).get(0).getCategoryCode());
                    devicetmp.put("category_code",deviceMap.get(deviceName).get(0).getCategoryCode());
                    devicetmp.put("deviceType",deviceMap.get(deviceName).get(0).getDeviceType());
                    devicetmp.put("deviceType",deviceMap.get(deviceName).get(0).getDeviceType());
                    devicetmp.put("device_name",deviceName);
                    devicetmp.put("device_name",deviceName);
                    devicetmp.put("detailInfo",new JSONObject());
                    devicetmp.put("detailInfo",getDeviceIndexAndOrder(deviceMap.get(deviceName).get(0).getCategoryCode(),deviceMap.get(deviceName).get(0).get,patient,warnTime););
                    list.add(devicetmp);
                    list.add(devicetmp);
                }
                }
            }
        }
            }*//*
        }*/
        return list;
        return list;
    }
    }
@ -935,7 +937,7 @@ public class PatientInfoPlatFormService {
     * 血压2:最近一次收缩压,舒张压、在线状态
     * 血压2:最近一次收缩压,舒张压、在线状态
     * 血糖1:最近一次血糖、在线状态
     * 血糖1:最近一次血糖、在线状态
     */
     */
    public Map<String,Object> getDeviceIndexAndOrder(String category_code,String deviceSn,String patient,String filterTime){
    public Map<String,Object> getDeviceIndexAndOrder(String category_code,String deviceSn,String patient,String filterTime) throws Exception {
        String dictSql = "SELECT * from base_yujing_dict where del =1";
        String dictSql = "SELECT * from base_yujing_dict where del =1";
        List<BaseYujingDict> dictList = jdbcTemplate.query(dictSql, new BeanPropertyRowMapper<>(BaseYujingDict.class));
        List<BaseYujingDict> dictList = jdbcTemplate.query(dictSql, new BeanPropertyRowMapper<>(BaseYujingDict.class));
@ -1188,13 +1190,24 @@ public class PatientInfoPlatFormService {
                        detailInfo.put("monitorInfo", "未获取到当天录像信息");
                        detailInfo.put("monitorInfo", "未获取到当天录像信息");
                    }
                    }
                }else {
                }else {
                    com.alibaba.fastjson.JSONObject tmp = ysDeviceService.getDeviceLiveAddress(patient, deviceSn, 1, null);
                    detailInfo.put("monitorInfoStatus", tmp.getIntValue(ResponseContant.resultFlag));
                    if (tmp.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
                        detailInfo.put("monitorInfo", tmp.getString(ResponseContant.resultMsg));
                    } else {
                        detailInfo.put("monitorInfo", tmp.getJSONObject(ResponseContant.resultMsg));
                    if (wxId.equalsIgnoreCase("hz_kx_wx")) {
                        com.alibaba.fastjson.JSONObject tmp = ysDeviceService.getKxDeviceLiveAddress(patient, deviceSn, 1, null);
                        detailInfo.put("monitorInfoStatus", tmp.getIntValue(ResponseContant.resultFlag));
                        if (tmp.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
                            detailInfo.put("monitorInfo", tmp.getString(ResponseContant.resultMsg));
                        } else {
                            detailInfo.put("monitorInfo", tmp.getJSONObject(ResponseContant.resultMsg));
                        }
                    }else {
                        com.alibaba.fastjson.JSONObject tmp = ysDeviceService.getDeviceLiveAddress(patient, deviceSn, 1, null);
                        detailInfo.put("monitorInfoStatus", tmp.getIntValue(ResponseContant.resultFlag));
                        if (tmp.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
                            detailInfo.put("monitorInfo", tmp.getString(ResponseContant.resultMsg));
                        } else {
                            detailInfo.put("monitorInfo", tmp.getJSONObject(ResponseContant.resultMsg));
                        }
                    }
                    }
                }
                }
                break;
                break;

+ 27 - 2
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/util/MQTTKXClientUtil.java

@ -2,7 +2,7 @@ package com.yihu.jw.care.util;
import com.yihu.jw.care.dao.device.BaseMqttCallbackRecordDao;
import com.yihu.jw.care.dao.device.BaseMqttCallbackRecordDao;
import com.yihu.jw.entity.care.device.BaseMqttCallbackRecordDO;
import com.yihu.jw.entity.care.device.BaseMqttCallbackRecordDO;
import org.apache.commons.lang3.StringUtils;
import io.micrometer.common.util.StringUtils;
import org.eclipse.paho.client.mqttv3.*;
import org.eclipse.paho.client.mqttv3.*;
import org.eclipse.paho.client.mqttv3.persist.MemoryPersistence;
import org.eclipse.paho.client.mqttv3.persist.MemoryPersistence;
import org.slf4j.Logger;
import org.slf4j.Logger;
@ -84,7 +84,20 @@ public class MQTTKXClientUtil {
    public static final String ipcam_motor_right = "device/{deviceId}/cmd/ipcam_motor_right";
    public static final String ipcam_motor_right = "device/{deviceId}/cmd/ipcam_motor_right";
    public static final String ipcam_motor_up = "device/{deviceId}/cmd/ipcam_motor_up";
    public static final String ipcam_motor_up = "device/{deviceId}/cmd/ipcam_motor_up";
    public static final String ipcam_motor_down = "device/{deviceId}/cmd/ipcam_motor_down";
    public static final String ipcam_motor_down = "device/{deviceId}/cmd/ipcam_motor_down";
    public static final String ipcam_keep_alive_res = "device/{deviceId}/response/ipcam_keep_alive";
    public static final String ipcam_video_start_res = "device/{deviceId}/response/ipcam_video_start";
    public static final String ipcam_audio_start_res = "device/{deviceId}/response/ipcam_audio_start";
    public static final String ipcam_upgrade_firmware_res = "device/{deviceId}/response/ipcam_upgrade_firmware";
    public static final String ipcam_jpeg_snapshot_res = "device/{deviceId}/response/ipcam_jpeg_snapshot";
    public static final String ipcam_motor_reset_res = "device/{deviceId}/response/ipcam_motor_reset";
    public static final String ipcam_motor_left_res = "device/{deviceId}/response/ipcam_motor_left";
    public static final String ipcam_motor_right_res = "device/{deviceId}/response/ipcam_motor_right";
    public static final String ipcam_motor_up_res = "device/{deviceId}/response/ipcam_motor_up";
    public static final String ipcam_motor_down_res = "device/{deviceId}/response/ipcam_motor_down";
    public static Map<String,String> commandMap = new HashMap<>();
    public static Map<String,String> commandMap = new HashMap<>();
    public static Map<String,String> commandMapRes = new HashMap<>();
    static {
    static {
        commandMap.put("ipcam_keep_alive",ipcam_keep_alive);
        commandMap.put("ipcam_keep_alive",ipcam_keep_alive);
@ -99,6 +112,18 @@ public class MQTTKXClientUtil {
        commandMap.put("ipcam_motor_up",ipcam_motor_up);
        commandMap.put("ipcam_motor_up",ipcam_motor_up);
        commandMap.put("ipcam_motor_down",ipcam_motor_down);
        commandMap.put("ipcam_motor_down",ipcam_motor_down);
    }
    }
    static {
        commandMapRes.put("ipcam_keep_alive",ipcam_keep_alive_res);
        commandMapRes.put("ipcam_video_start",ipcam_video_start_res);
        commandMapRes.put("ipcam_audio_start",ipcam_audio_start_res);
        commandMapRes.put("ipcam_upgrade_firmware",ipcam_upgrade_firmware_res);
        commandMapRes.put("ipcam_jpeg_snapshot",ipcam_jpeg_snapshot_res);
        commandMapRes.put("ipcam_motor_reset",ipcam_motor_reset_res);
        commandMapRes.put("ipcam_motor_left",ipcam_motor_left_res);
        commandMapRes.put("ipcam_motor_right",ipcam_motor_right_res);
        commandMapRes.put("ipcam_motor_up",ipcam_motor_up_res);
        commandMapRes.put("ipcam_motor_down",ipcam_motor_down_res);
    }
    private static final String clientid = String.valueOf(System.currentTimeMillis());;
    private static final String clientid = String.valueOf(System.currentTimeMillis());;
@ -143,7 +168,7 @@ public class MQTTKXClientUtil {
                    // subscribe后得到的消息会执行到这里面
                    // subscribe后得到的消息会执行到这里面
                    BaseMqttCallbackRecordDO mqttCallbackRecordDO = new BaseMqttCallbackRecordDO();
                    BaseMqttCallbackRecordDO mqttCallbackRecordDO = new BaseMqttCallbackRecordDO();
                    if(StringUtils.isNotBlank(topic)){
                    if(StringUtils.isNotBlank(topic)){
                        String[] deviceId = topic.split("//");
                        String[] deviceId = topic.split("/");
                        if(deviceId.length>1){
                        if(deviceId.length>1){
                            mqttCallbackRecordDO.setDeviceId(deviceId[1]);
                            mqttCallbackRecordDO.setDeviceId(deviceId[1]);
                        }
                        }

+ 14 - 11
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/util/PostConstructUtil.java

@ -1,10 +1,14 @@
package com.yihu.jw.care.util;
package com.yihu.jw.care.util;
import org.eclipse.paho.client.mqttv3.MqttClient;
import org.slf4j.Logger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
/**
/**
 * 项目启动就执行的类
 * 项目启动就执行的类
 * Created by yeshijie on 2022/5/7.
 * Created by yeshijie on 2022/5/7.
@ -18,15 +22,14 @@ public class PostConstructUtil {
    @Value("${spring.profiles.active}")
    @Value("${spring.profiles.active}")
    private String profiles;
    private String profiles;
//    @Autowired
//    private MQTTKXClientUtil mqttkxClientUtil;
//
//
//    @PostConstruct
//    public void init(){
//
//        logger.info("启动凯旋的设备的mqtt订阅====");
//        mqttkxClientUtil.start();
//
//    }
    @Autowired
    private MQTTKXClientUtil mqttkxClientUtil;
    @PostConstruct
    public void init(){
        logger.info("启动凯旋的设备的mqtt订阅====");
        mqttkxClientUtil.start();
    }
}
}

+ 1 - 1
svr/svr-cloud-care/src/main/resources/application.yml

@ -569,7 +569,7 @@ wechat:
  wechat_token: 27eb3bb24f149a7760cf1bb154b08040
  wechat_token: 27eb3bb24f149a7760cf1bb154b08040
  wechat_base_url: http%3a%2f%2fweixin.xmtyw.cn%2fwlyy-dev
  wechat_base_url: http%3a%2f%2fweixin.xmtyw.cn%2fwlyy-dev
  accId: gh_382eac531b79
  accId: gh_382eac531b79
  id: hz_yyyzh_wx  # base库中,wx_wechat 的id字段
  id: hz_kx_wx  # base库中,wx_wechat 的id字段
  flag: false #演示环境  true走Mysql数据库  false走Oracle
  flag: false #演示环境  true走Mysql数据库  false走Oracle
im:
im:

+ 3 - 3
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

@ -3780,8 +3780,8 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    public Envelop updateOupatient(
    public Envelop updateOupatient(
            @ApiParam(name = "outpatientId", value = "门诊id")
            @ApiParam(name = "outpatientId", value = "门诊id")
            @RequestParam(value = "outpatientId", required = false) String outpatientId,
            @RequestParam(value = "outpatientId", required = false) String outpatientId,
            @ApiParam(name = "idDisease", value = "是否是特殊病种1是0否")
            @RequestParam(value = "idDisease", required = false) String idDisease,
            @ApiParam(name = "isDisease", value = "是否是特殊病种1是0否")
            @RequestParam(value = "isDisease", required = false) String isDisease,
            @ApiParam(name = "diseaseCode", value = "特殊病种code")
            @ApiParam(name = "diseaseCode", value = "特殊病种code")
            @RequestParam(value = "diseaseCode", required = false) String diseaseCode,
            @RequestParam(value = "diseaseCode", required = false) String diseaseCode,
            @ApiParam(name = "diseaseName", value = "特殊病种名称")
            @ApiParam(name = "diseaseName", value = "特殊病种名称")
@ -3789,7 +3789,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
            @ApiParam(name = "medicalState", value = "是否医保01")
            @ApiParam(name = "medicalState", value = "是否医保01")
            @RequestParam(value = "medicalState", required = false) String medicalState) {
            @RequestParam(value = "medicalState", required = false) String medicalState) {
        try {
        try {
            return success("操作成功", prescriptionService.updateOutpatient(outpatientId,diseaseCode,diseaseName,medicalState,idDisease));
            return success("操作成功", prescriptionService.updateOutpatient(outpatientId,diseaseCode,diseaseName,medicalState,isDisease));
        } catch (Exception e) {
        } catch (Exception e) {
            return Envelop.getError(e.getMessage());
            return Envelop.getError(e.getMessage());
        }
        }