Browse Source

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

LAPTOP-KB9HII50\70708 4 months ago
parent
commit
ca05988cf2
16 changed files with 439 additions and 91 deletions
  1. 30 0
      business/base-service/pom.xml
  2. 1 0
      business/base-service/src/main/java/com/yihu/jw/hospital/disease/service/BaseDiseaseHospitalService.java
  3. 61 11
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/DsyyPrescriptionService.java
  4. 38 3
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java
  5. 120 20
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/DsyyEntranceService.java
  6. 38 20
      business/base-service/src/main/java/com/yihu/jw/patient/service/BasePatientService.java
  7. 45 0
      business/base-service/src/main/java/com/yihu/jw/utils/assistantUtil/AliyunApi.java
  8. 1 1
      business/es-service/src/main/java/com/yihu/jw/es/service/StatisticsEsService.java
  9. 10 3
      business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java
  10. 9 0
      common/common-entity/src/main/java/com/yihu/jw/entity/hospital/article/KnowledgeArticleDictDO.java
  11. 14 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/DictHospitalDeptVO.java
  12. 21 5
      svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/DsyyController.java
  13. 11 0
      svr/svr-internet-hospital/pom.xml
  14. 1 0
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/article/ArticleDictEndpoint.java
  15. 2 0
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/consult/DoctorConsultEndpoint.java
  16. 37 28
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

+ 30 - 0
business/base-service/pom.xml

@ -15,6 +15,24 @@
    <version>${project.parent.version}</version>
    <dependencies>
        <!-- https://mvnrepository.com/artifact/com.alibaba/dashscope-sdk-java -->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>dashscope-sdk-java</artifactId>
            <version>2.8.2</version>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.8.9</version> <!-- 请使用最新的稳定版本 -->
        </dependency>
        <!--okhttp3 依赖-->
        <dependency>
            <groupId>com.squareup.okhttp3</groupId>
            <artifactId>okhttp</artifactId>
            <version>4.9.3</version>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
@ -181,6 +199,12 @@
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${version.lombok}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.google.code.gson</groupId>
                    <artifactId>gson</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
@ -219,6 +243,12 @@
            <groupId>cn.jpush.api</groupId>
            <artifactId>jpush-client</artifactId>
            <version>${version.jpush-client}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.google.code.gson</groupId>
                    <artifactId>gson</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>

+ 1 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/disease/service/BaseDiseaseHospitalService.java

@ -257,6 +257,7 @@ public class BaseDiseaseHospitalService extends BaseJpaService<BaseDiseaseHospit
            filter += " and ssr.czrq<='"+endDate+" 23:59:59' ";
        }
        String orderBy = " order by id desc limit "+(page-1)*size+","+size;
        System.out.println(sql+filter+orderBy);
        List<Map<String, Object>> list = jdbcTemplate.queryForList(sql+filter+orderBy);
        for (Map<String, Object> vo : list) {
            String idcard = vo.get("idcard")+"";

+ 61 - 11
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/DsyyPrescriptionService.java

@ -11,6 +11,7 @@ import com.yihu.jw.entity.base.patient.PatientMedicareCardDO;
import com.yihu.jw.entity.hospital.healthCare.YlzMedicalIcdDO;
import com.yihu.jw.entity.hospital.healthCare.YlzMedicalMxDO;
import com.yihu.jw.entity.hospital.healthCare.YlzMedicalRelationDO;
import com.yihu.jw.entity.hospital.healthCare.YlzMedicalRelationInvoiceDO;
import com.yihu.jw.entity.hospital.httplog.WlyyHttpLogDO;
import com.yihu.jw.entity.hospital.mapping.DoctorMappingDO;
import com.yihu.jw.entity.hospital.mapping.PatientMappingDO;
@ -19,6 +20,7 @@ import com.yihu.jw.entity.order.BusinessOrderDO;
import com.yihu.jw.hospital.healthCare.YlzMedicailIcdDao;
import com.yihu.jw.hospital.healthCare.YlzMedicailMxDao;
import com.yihu.jw.hospital.healthCare.YlzMedicailRelationDao;
import com.yihu.jw.hospital.healthCare.YlzMedicailRelationInvoiceDao;
import com.yihu.jw.hospital.httplog.dao.WlyyHttpLogDao;
import com.yihu.jw.hospital.mapping.dao.DoctorMappingDao;
import com.yihu.jw.hospital.mapping.dao.PatientMappingDao;
@ -76,14 +78,6 @@ public class DsyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
    private PatientRegisterDao patientRegisterDao;
    @Autowired
    private WlyyHttpLogDao wlyyHttpLogDao;
    @Autowired
    private PrescriptionEmrDao prescriptionEmrDao;
    @Autowired
    private BaseDoctorDao doctorDao;
    @Autowired
    private PrescriptionDiagnosisDao prescriptionDiagnosisDao;
    @Autowired
    private PrescriptionInfoDao prescriptionInfoDao;
    //请求内网服务
    public static String entranceUrl = "http://192.168.101.2:10024/dsyy/";
@ -106,6 +100,8 @@ public class DsyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
    private BusinessOrderDao businessOrderDao;
    @Autowired
    private PrescriptionLogDao prescriptionLogDao;
    @Autowired
    private YlzMedicailRelationInvoiceDao invoiceDao;
    //=============查询视图========================
    /**
@ -1269,6 +1265,61 @@ public class DsyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
        return object;
    }
    /**
     * 电票下载
     *
     * @return
     */
    public JSONObject queryDzfp(String settleNo) throws Exception {
        YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findByLog_no(settleNo);
        YlzMedicalRelationInvoiceDO invoiceDO = invoiceDao.findByMedicalId(ylzMedicalRelationDO.getId());
        JSONObject object = new JSONObject();
        if (invoiceDO==null){
            JSONArray array = dsyyEntranceService.findInvoiceInfo(settleNo);
            for (int i=0;i<array.size();i++){
                invoiceDO = new YlzMedicalRelationInvoiceDO();
                invoiceDO.setMedicalId(ylzMedicalRelationDO.getId());
                invoiceDO.setStatus(1);
                invoiceDO.setInvoiceNo(array.getJSONObject(i).getString("randomnumber"));
                invoiceDO.setInvoiceSerialNum(array.getJSONObject(i).getString("einvoicenumber"));
                invoiceDO.setInvoiceCode(array.getJSONObject(i).getString("einvoicecode"));
                invoiceDO.setCreateTime(new Date());
                invoiceDO = invoiceDao.save(invoiceDO);
                String url = entranceUrl +"queryDzfp";
                Map<String,Object> params = new HashedMap();
                params.put("id",ylzMedicalRelationDO.getId());
                params.put("invoiceNo",invoiceDO.getInvoiceNo());
                params.put("invoiceCode",invoiceDO.getInvoiceCode());
                params.put("invoiceSerialNum",invoiceDO.getInvoiceSerialNum());
                HttpResponse response = HttpUtils.doGet(url,params);
                String content = response.getContent();
                logger.info("response:"+content);
                JSONObject rs = JSON.parseObject(content);
                Integer status = rs.getInteger("status");
                if (status==200){
                    object = rs.getJSONObject("message");
                }
            }
        }else {
            String url = entranceUrl +"queryDzfp";
            Map<String,Object> params = new HashedMap();
            params.put("id",ylzMedicalRelationDO.getId());
            params.put("invoiceNo",invoiceDO.getInvoiceNo());
            params.put("invoiceCode",invoiceDO.getInvoiceCode());
            params.put("invoiceSerialNum",invoiceDO.getInvoiceSerialNum());
            HttpResponse response = HttpUtils.doGet(url,params);
            String content = response.getContent();
            logger.info("response:"+content);
            JSONObject rs = JSON.parseObject(content);
            Integer status = rs.getInteger("status");
            if (status==200){
                object = rs.getJSONObject("message");
            }
        }
        return object;
    }
    //=====================合理用药内网调用接口=======================
@ -1849,7 +1900,6 @@ public class DsyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
                                    medicalMxDO.setItemCode(dobject.getString("MED_LIST_CODG"));
                                    medicalMxDO.setPrescriptionCode(dobject.getString(""));
                                    medicalMxDO.setChargeUnit(dobject.getString("PRCUNT"));
                                    medicalMxDO.setSpecificationType(dobject.getString(""));
                                    medicalMxDO.setAmount(dobject.getString("CNT"));
                                    medicalMxDO.setPrice(dobject.getString("PRIC"));
                                    medicalMxDO.setPrescriptionCode(dobject.getString("RXNO"));
@ -2077,7 +2127,7 @@ public class DsyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
            String operatorId = "HLWYY";
            String operatorName = "互联网医院";
            String termNo = "DSYYHLWYY";
            JSONObject rsObj = confirmPayGjybToHospital(ylzMedicalRelationDO.getCardNo(),ylzMedicalRelationDO.getLogNo(),depositAmount,outChargeNo, operatorId,operatorName,termNo);
            JSONObject rsObj = confirmPayGjybToHospital(ylzMedicalRelationDO.getCardNo(),ylzMedicalRelationDO.getLogNo(),depositAmount,ylzMedicalRelationDO.getId(), operatorId,operatorName,termNo);
            logger.info("rsObj");
            boolean flag = true;
            if (rsObj!=null){
@ -2124,7 +2174,7 @@ public class DsyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
                }
                try {
                    logger.info("=================电子发票开具开始=================");
                   /* hcyyEntranceService.OutpatientInvoicing(ylzMedicalRelationDO.getHisBillSerial(),"lb");*/
//                  hcyyEntranceService.OutpatientInvoicing(ylzMedicalRelationDO.getHisBillSerial(),"lb");
                    logger.info("=================电子发票开具结束=================");
                }catch (Exception e){
                    e.printStackTrace();

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

@ -13,6 +13,9 @@ import cn.jpush.api.push.model.audience.AudienceTarget;
import cn.jpush.api.push.model.notification.AndroidNotification;
import cn.jpush.api.push.model.notification.IosNotification;
import cn.jpush.api.push.model.notification.Notification;
import com.alibaba.dashscope.aigc.generation.GenerationResult;
import com.alibaba.dashscope.exception.InputRequiredException;
import com.alibaba.dashscope.exception.NoApiKeyException;
import com.alibaba.fastjson.JSON;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yihu.jw.dict.dao.*;
@ -53,6 +56,7 @@ import com.yihu.jw.entity.hospital.message.SystemMessageDO;
import com.yihu.jw.entity.hospital.prescription.*;
import com.yihu.jw.entity.order.BusinessOrderDO;
import com.yihu.jw.entity.third.ylzinfo.OauthYlzConfigDO;
import com.yihu.jw.exception.ApiException;
import com.yihu.jw.file_upload.FileUploadService;
import com.yihu.jw.healthCare.service.HealthCareNewService;
import com.yihu.jw.healthCare.service.HealthCareService;
@ -109,6 +113,7 @@ import com.yihu.jw.util.wechat.WeixinMessagePushUtils;
import com.yihu.jw.utils.*;
import com.yihu.jw.utils.Pkis.PKIService_PortType;
import com.yihu.jw.utils.Pkis.PKIService_ServiceLocator;
import com.yihu.jw.utils.assistantUtil.AliyunApi;
import com.yihu.jw.utils.hibernate.HibenateUtils;
import com.yihu.jw.utils.sfutils.HttpClientUtils;
import com.yihu.jw.wechat.dao.BasePatientWechatDao;
@ -124,6 +129,7 @@ import com.ylzinfo.ehc.EhcHandler;
import com.ylzinfo.ehc.common.utils.DateUtils;
import com.ylzinfo.ehc.trans.TransRequest;
import com.ylzinfo.ehc.trans.TransResponse;
import io.reactivex.Flowable;
import jxl.format.VerticalAlignment;
import jxl.write.*;
import net.sf.json.JSONArray;
@ -4653,7 +4659,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                        rs.put("is_prescribe",0);
                    }
                }else {
                    String isPrescribe =healthCareService.doctorAuthentication(doctorDO.getId());
                    String isPrescribe =healthCareNewService.doctorAuthentication(doctorDO.getId());
                    if (StringUtils.isNoneBlank(isPrescribe)){
                        rs.put("is_prescribe", isPrescribe);//is_prescribe	是否具备处方权	1-有处方权,0无处方权
                    }else {
@ -5131,8 +5137,10 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    }else {
                        rs.put("is_prescribe",0);
                    }
                }else {
                }else if (wechatId.equalsIgnoreCase("xm_zsyy_wx")){
                    rs.put("is_prescribe", healthCareService.doctorAuthentication(doctorDO.getId()));//is_prescribe	是否具备处方权	1-有处方权,0无处方权
                }else {
                    rs.put("is_prescribe", healthCareNewService.doctorAuthentication(doctorDO.getId()));//is_prescribe	是否具备处方权	1-有处方权,0无处方权
                }
            }else{
                rs.put("is_prescribe", 0);//is_prescribe	是否具备处方权	1-有处方权,0无处方权
@ -7447,6 +7455,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        if ("1".equals(isNurse)) {
            sql += " AND jt.saas_id = 'hlys' ";
        }else  if ("0".equals(isNurse)){
            sql += " AND jt.saas_id != 'hlys' ";
        }
        if (StringUtils.isNotBlank(jobTitleNameKey)) {
@ -7955,7 +7965,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                        basePatientDO.setMedicalState(state);
                        basePatientDO = basePatientDao.save(basePatientDO);
                    }
                }else {
                }else if (wechatId.equalsIgnoreCase("xm_zsyy_wx")){
                    String result = healthCareService.authorized(basePatientDO.getId());
                    com.alibaba.fastjson.JSONObject object = com.alibaba.fastjson.JSONObject.parseObject(result);
                    if (object.getString("flag").equalsIgnoreCase("1")){
@ -7965,6 +7975,16 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                        basePatientDO.setMedicalState(state);
                        basePatientDO = basePatientDao.save(basePatientDO);
                    }
                }else {
                    String result = healthCareNewService.authorized(basePatientDO.getId());
                    com.alibaba.fastjson.JSONObject object = com.alibaba.fastjson.JSONObject.parseObject(result);
                    if (object.getString("flag").equalsIgnoreCase("1")){
                        com.alibaba.fastjson.JSONObject encryptData = object.getJSONObject("encrypt_data");
                        String state = encryptData.getString("state");
                        String auth_date = encryptData.getString("auth_date");
                        basePatientDO.setMedicalState(state);
                        basePatientDO = basePatientDao.save(basePatientDO);
                    }
                }
            }catch (Exception e){
                e.printStackTrace();
@ -16003,4 +16023,19 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        return addressInfoDOS;
    }
    //通义千问api对接
    public com.alibaba.fastjson.JSONObject aIassistant(String content) throws Exception {
        com.alibaba.fastjson.JSONObject object = new com.alibaba.fastjson.JSONObject();
        try{
            GenerationResult result = AliyunApi.callWithMessage(content);
            object.put("result",result);
        }catch (ApiException | NoApiKeyException | InputRequiredException e) {
            // 使用日志框架记录异常信息
            System.err.println("An error occurred while calling the generation service: " + e.getMessage());
        }
        return object;
    }
}

+ 120 - 20
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/DsyyEntranceService.java

@ -425,6 +425,7 @@ public class DsyyEntranceService {
                            String pw = idcard.substring(idcard.length() - 6);
                            doctor.setPassword(MD5.md5Hex(pw + "{" + salt + "}"));
                            doctor.setSalt(salt);
                            doctor.setAtddrNo(doctorJson.getString("countryCode"));
                            doctor.setJobTitleCode(doctorJson.getString("jobtitlecode"));
                            doctor.setJobTitleName(doctorJson.getString("jobTitleName"));
@ -493,6 +494,7 @@ public class DsyyEntranceService {
                            doctor.setDel("1");
                            doctor.setEnabled(1);
                            doctor.setLocked(0);
                            doctor.setAtddrNo(doctorJson.getString("countryCode"));
                            doctor.setCreateTime(new Date());
                            doctor.setJobTitleCode(doctorJson.getString("jobtitlecode"));
@ -1486,6 +1488,28 @@ public class DsyyEntranceService {
        return buffer.toString();
    }
    /**
     * 根据结算号获取his开票信息
     *
     * @throws Exception
     */
    public JSONArray findInvoiceInfo(String settleNo) throws Exception {
        String sql = "select einvoicecode as \"einvoicecode\",einvoicenumber as \"einvoicenumber\",randomnumber as \"randomnumber\",sick_id from v_hlwyydp where settle_no='"+settleNo+"' ";
        JSONArray array = new JSONArray();
        Map<String,Object> params = new HashedMap();
        params.put("sql",sql);
        logger.info("hlwyydp:"+sql);
        HttpResponse response = HttpUtils.doGet(url,params);
        String content = response.getContent();
        logger.info("response:"+content);
        JSONObject rs = JSON.parseObject(content);
        Integer status = rs.getInteger("status");
        if (status==200){
            array = rs.getJSONArray("detailModelList");
        }
        return array;
    }
    //=============his webservice 调用开始 =============================
    /**
@ -2002,6 +2026,51 @@ public class DsyyEntranceService {
    }
    /**
     * 16结算结果查询
     * @param cardNo
     * @param outChargeNo
     * @return
     * @throws Exception
     */
    public String queryMedicalPay(String cardNo,String outChargeNo) throws  Exception{
        String api = "query_medical_pay";
        String msgHeader ="<?xml version=\"1.0\" encoding=\"utf-8\"?> " +
                "<root> " +
                "   <serverName>"+api+"</serverName>  " +
                "   <format>xml</format>" +
                "   <callOperator>"+operate+"</callOperator> " +
                "   <certificate>"+key+"</certificate> " +
                "   <orgCode>01</orgCode> " +
                "</root>";
        String condition ="";
        JSONObject object = new JSONObject();
        if (StringUtils.isNoneBlank(cardNo)){
            object.put("cardNo",cardNo);
        }
        if (StringUtils.isNoneBlank(outChargeNo)){
            object.put("outChargeNo",outChargeNo);
        }
        condition = object.toJSONString();
        String msgBody =condition;
        Map<String,String> params = new HashedMap();
        params.put("msgHeader",msgHeader);
        params.put("msgBody",msgBody);
        logger.info("query_medical_pay params:"+params.toString());
        String xml = getDsyyWebServiceInfo("CallInterface",params,getOperateUrl());
        WlyyHttpLogDO wlyyHttpLogDO = new WlyyHttpLogDO();
        wlyyHttpLogDO.setRequest(params.toString());
        wlyyHttpLogDO.setCode("query_medical_pay");
        wlyyHttpLogDO.setName("3.16结算结果查询");
        wlyyHttpLogDO.setResponse(xml);
        wlyyHttpLogDO.setCreateTime(new Date());
        wlyyHttpLogDao.save(wlyyHttpLogDO);
        logger.info(" query_medical_pay json:"+xml);
        return xml;
    }
    /**
     * 查询院内卡列表
     *
@ -3838,13 +3907,17 @@ public class DsyyEntranceService {
    //============================电子发票开始====================================
    String dsfp = "http://10.95.8.94:20017/service/invoice/perform";
    String dsfp = "http://10.95.8.48:20017/service/invoice/perform";
    String appId ="862e18c18c5e4d72";
    String appKey ="d756d7778c43e3c5b8bbcb301c48fe25";
    String msgNo ="8901";
    String organ = "401039";
    String organ = "5676";
    String user = "hisbizadmin";
    String org= "123502124266188956";
    public String getAccessToken() throws Exception {
        long timestamp = new Date().getTime() * 1000000;
        String accessToken = "";
        String msg = "<Voucher>\n" +
                "<AppId>"+appId+"</AppId>\n" +
                "<AppKey>"+appKey+"</AppKey>\n" +
@ -3853,14 +3926,14 @@ public class DsyyEntranceService {
        String params ="<?xml version='1.0' encoding='UTF-8'?>\n" +
                "<Invoice>\n" +
                "<Head>\n" +
                "<MsgNo>"+msgNo+"</MsgNo>\n" +
                "<MsgNo>8901</MsgNo>\n" +
                "<Organ>"+organ+"</Organ>\n" +
                "<User>"+user+"</User>\n" +
                "<Version>1.0</Version>\n" +
                "<AppId>"+appId+"</AppId>\n" +
                "<MsgId>5676"+randomStr+"</MsgId>\n" +
                "<MsgRef>5676"+randomStr+"</MsgRef>\n" +
                "<DateTime>"+new Date().getTime()+"</DateTime>\n" +
                "<DateTime>"+timestamp+"</DateTime>\n" +
                "<Reserve></Reserve>\n" +
                "</Head>\n" +
                "<Msg>"+ Base64.encodeBase64String(msg.getBytes("utf-8"))+"</Msg>\n" +
@ -3868,7 +3941,20 @@ public class DsyyEntranceService {
        logger.info("请求前入参:"+params);
        String result = httpClientUtil.sendPost(dsfp,params);
        logger.info("请求结果:"+result);
        return result;
        XMLSerializer xmlSerializer = new XMLSerializer();
        String json = xmlSerializer.read(result).toString();
        logger.info("请求后出参:"+json);
        JSONObject resObj = JSONObject.parseObject(json);
        String msgResult = resObj.getString("Msg");
        if (StringUtils.isNoneBlank(msgResult)){
            byte[] msgBase64 = Base64.decodeBase64(msgResult);
            String msgText = new String(msgBase64, "utf-8");
            System.out.println("msgText"+msgText);
            String msgTexts = xmlSerializer.read(msgText).toString();
            JSONObject msgObj = JSONObject.parseObject(msgTexts);
            accessToken = msgObj.getString("AccessToken");
        }
        return accessToken;
    }
@ -3985,7 +4071,7 @@ public class DsyyEntranceService {
        String params ="<?xml version='1.0' encoding='UTF-8'?>\n" +
                "<Invoice>\n" +
                "<Head>\n" +
                "<MsgNo>"+msgNo+"</MsgNo>\n" +
                "<MsgNo>8213</MsgNo>\n" +
                "<Organ>"+organ+"</Organ>\n" +
                "<User>"+user+"</User>\n" +
                "<Version>1.0</Version>\n" +
@ -4012,37 +4098,51 @@ public class DsyyEntranceService {
     * @return
     * @throws Exception
     */
    public String queryDzfp(String medicalId) throws Exception {
        YlzMedicalRelationInvoiceDO invoiceDO = invoiceDao.findByMedicalId(medicalId);
    public String queryDzfp(String medicalId,String invoiceNo,String invoiceCode,String invoiceSerialNum) throws Exception {
        String resultResponse = "";
        long timestamp = new Date().getTime() * 1000000;
        String msg = "<Voucher>\n" +
                "<AgencyCode>401039</AgencyCode>\n" +
                "<AgencyCode>"+org+"</AgencyCode>\n" +
                "<AgencyName>厦门市第三医院</AgencyName>\n" +
                "<EInvoiceCode>"+invoiceDO.getInvoiceCode()+"</EInvoiceCode>\n" +
                "<EInvoiceNumber>"+invoiceDO.getInvoiceSerialNum()+"</EInvoiceNumber>\n" +
                "<RandomNumber>"+invoiceDO.getInvoiceNo()+"</RandomNumber>\n" +
                "<EInvoiceCode>"+invoiceCode+"</EInvoiceCode>\n" +
                "<EInvoiceNumber>"+invoiceSerialNum+"</EInvoiceNumber>\n" +
                "<RandomNumber>"+invoiceNo+"</RandomNumber>\n" +
                "</Voucher>\n";
        logger.info("发票下载入参未加密:"+msg);
        String randomStr = System.currentTimeMillis()+(int)(Math.random()*900)+100+"";
        String params ="<?xml version='1.0' encoding='UTF-8'?>\n" +
                "<Invoice>\n" +
                "<Head>\n" +
                "<MsgNo>"+msgNo+"</MsgNo>\n" +
                "<MsgNo>8213</MsgNo>\n" +
                "<Organ>"+organ+"</Organ>\n" +
                "<User>"+user+"</User>\n" +
                "<Version>1.0</Version>\n" +
                "<AppId>"+appId+"</AppId>\n" +
                "<AccessToken>aaaabbbbb11111333333</AccessToken>"+
                "<AppId>862e18c18c5e4d72</AppId>\n" +
                "<AccessToken>"+getAccessToken()+"</AccessToken>"+
                "<MsgId>5676"+randomStr+"</MsgId>\n" +
                "<MsgRef>5676"+randomStr+"</MsgRef>\n" +
                "<DateTime>"+new Date().getTime()+"</DateTime>\n" +
                "<DateTime>"+timestamp+"</DateTime>\n" +
                "<Reserve></Reserve>\n" +
                "</Head>\n" +
                "<Msg>"+ Base64.encodeBase64String(msg.getBytes("utf-8"))+"</Msg>\n" +
                "</Invoice>";
        logger.info("开具电子发票入参:"+params);
        logger.info("发票下载入参:"+params);
        String result = httpClientUtil.sendPost(dsfp,params);
        logger.info("开具电子发票请求结果:"+result);
        return result;
        logger.info("发票下载请求结果:"+result);
        XMLSerializer xmlSerializer = new XMLSerializer();
        String json = xmlSerializer.read(result).toString();
        logger.info("请求后出参:"+json);
        JSONObject resObj = JSONObject.parseObject(json);
        String msgResult = resObj.getString("Msg");
        if (StringUtils.isNoneBlank(msgResult)){
            byte[] msgBase64 = Base64.decodeBase64(msgResult);
            String msgText = new String(msgBase64, "utf-8");
            System.out.println("msgText"+msgText);
            String msgTexts = xmlSerializer.read(msgText).toString();
            JSONObject msgObj = JSONObject.parseObject(msgTexts);
            resultResponse = msgObj.toJSONString();
        }
        return resultResponse;
    }

+ 38 - 20
business/base-service/src/main/java/com/yihu/jw/patient/service/BasePatientService.java

@ -8,6 +8,7 @@ import com.yihu.jw.entity.base.patient.PatientMedicareCardDO;
import com.yihu.jw.entity.hospital.prescription.WlyyInspectionDO;
import com.yihu.jw.entity.hospital.prescription.WlyyOutpatientDO;
import com.yihu.jw.entity.hospital.prescription.WlyyPrescriptionInfoDO;
import com.yihu.jw.healthCare.service.HealthCareNewService;
import com.yihu.jw.healthCare.service.HealthCareService;
import com.yihu.jw.hospital.jw.JwArchiveRecordBaseService;
import com.yihu.jw.hospital.prescription.dao.OutpatientDao;
@ -80,6 +81,8 @@ public class BasePatientService<T, R extends CrudRepository> extends BaseJpaServ
    @Autowired
    private HealthCareService healthCareService;
    @Autowired
    private HealthCareNewService healthCareNewService;
    @Autowired
    private BasePatientDao patientDao;
    @Autowired
    private PrescriptionDao prescriptionDao;
@ -413,29 +416,44 @@ public class BasePatientService<T, R extends CrudRepository> extends BaseJpaServ
            throw new Exception("用户不存在");
        }
        Boolean flag = healthCareService.isHospitalFlag();
        if (flag) {
            if (wxId.equalsIgnoreCase("xm_xzzx_wx")) {
                String result = healthCareService.authorizedToEntrace(basePatientDO.getId());
                JSONObject object = JSONObject.parseObject(result);
                if (object.getString("flag").equalsIgnoreCase("1")) {
                    JSONObject encryptData = object.getJSONObject("encrypt_data");
                    String state = encryptData.getString("state");
                    String auth_date = encryptData.getString("auth_date");
                    basePatientDO.setMedicalState(state);
                    basePatientDO = basePatientDao.save(basePatientDO);
                }
            } else {
                String result = healthCareService.authorized(basePatientDO.getId());
                JSONObject object = JSONObject.parseObject(result);
                if (object.getString("flag").equalsIgnoreCase("1")) {
                    JSONObject encryptData = object.getJSONObject("encrypt_data");
                    String state = encryptData.getString("state");
                    String auth_date = encryptData.getString("auth_date");
                    basePatientDO.setMedicalState(state);
                    basePatientDO = basePatientDao.save(basePatientDO);
        try {
            if (flag) {
                if (wxId.equalsIgnoreCase("xm_xzzx_wx")) {
                    String result = healthCareService.authorizedToEntrace(basePatientDO.getId());
                    JSONObject object = JSONObject.parseObject(result);
                    if (object.getString("flag").equalsIgnoreCase("1")) {
                        JSONObject encryptData = object.getJSONObject("encrypt_data");
                        String state = encryptData.getString("state");
                        String auth_date = encryptData.getString("auth_date");
                        basePatientDO.setMedicalState(state);
                        basePatientDO = basePatientDao.save(basePatientDO);
                    }
                } else if (wxId.equalsIgnoreCase("xm_zsyy_wx")){
                    String result = healthCareService.authorized(basePatientDO.getId());
                    JSONObject object = JSONObject.parseObject(result);
                    if (object.getString("flag").equalsIgnoreCase("1")) {
                        JSONObject encryptData = object.getJSONObject("encrypt_data");
                        String state = encryptData.getString("state");
                        String auth_date = encryptData.getString("auth_date");
                        basePatientDO.setMedicalState(state);
                        basePatientDO = basePatientDao.save(basePatientDO);
                    }
                }else {
                    String result = healthCareNewService.authorized(basePatientDO.getId());
                    JSONObject object = JSONObject.parseObject(result);
                    if (object.getString("flag").equalsIgnoreCase("1")) {
                        JSONObject encryptData = object.getJSONObject("encrypt_data");
                        String state = encryptData.getString("state");
                        String auth_date = encryptData.getString("auth_date");
                        basePatientDO.setMedicalState(state);
                        basePatientDO = basePatientDao.save(basePatientDO);
                    }
                }
            }
        }catch (Exception e){
            e.printStackTrace();
        }
        return basePatientDO;
    }

+ 45 - 0
business/base-service/src/main/java/com/yihu/jw/utils/assistantUtil/AliyunApi.java

@ -0,0 +1,45 @@
package com.yihu.jw.utils.assistantUtil;
import com.alibaba.dashscope.aigc.generation.Generation;
import com.alibaba.dashscope.aigc.generation.GenerationResult;
import com.alibaba.dashscope.aigc.generation.models.QwenParam;
import com.alibaba.dashscope.common.Message;
import com.alibaba.dashscope.common.MessageManager;
import com.alibaba.dashscope.common.Role;
import com.alibaba.dashscope.exception.InputRequiredException;
import com.alibaba.dashscope.exception.NoApiKeyException;
import com.alibaba.dashscope.utils.Constants;
import com.yihu.jw.exception.ApiException;
public class AliyunApi {
    public static GenerationResult callWithMessage(String content)
      throws NoApiKeyException, ApiException, InputRequiredException {
        Generation gen = new Generation();
        Constants.apiKey = "sk-145c771b72714ce58b7e5ef347c35e1d";//这里填写自己申请的APIKEY
        MessageManager msgManager = new MessageManager(10);
        Message systemMsg =
                Message.builder().role(Role.SYSTEM.getValue()).content("You are a helpful assistant.").build();
        Message userMsg = Message.builder().role(Role.USER.getValue()).content(content).build();//这里填写对话内容
        msgManager.add(systemMsg);
        msgManager.add(userMsg);
        QwenParam param =
                QwenParam.builder().model(Generation.Models.QWEN_TURBO).messages(msgManager.get())
                        .resultFormat(QwenParam.ResultFormat.MESSAGE)
                        .topP(0.8)
                        .enableSearch(true)
                        .build();
        GenerationResult result = gen.call(param);
        System.out.println(result);
        return result;
    }
    public static void main(String[] args){
        try {
            callWithMessage("如何做西红柿鸡蛋?");
        } catch (ApiException | NoApiKeyException | InputRequiredException e) {
            System.out.println(e.getMessage());
        }
        System.exit(0);
    }
}

+ 1 - 1
business/es-service/src/main/java/com/yihu/jw/es/service/StatisticsEsService.java

@ -8319,7 +8319,7 @@ public class StatisticsEsService {
                "	wlyy_outpatient \n" +
                "WHERE 1=1\n" +
                "	AND pay_status IN ( '1', '2' ) \n" +
                "	AND outpatient_type='3' AND type IN('1','2')\n" +
                "	AND outpatient_type='1' AND type IN('1','2')\n" +
                "	AND icd10_name IS NOT NULL \n" +
                "GROUP BY\n" +
                "	icd10,icd10_name \n" +

+ 10 - 3
business/im-service/src/main/java/com/yihu/jw/im/service/ImService.java

@ -3986,7 +3986,7 @@ public class ImService {
			}else {
				sql +=" AND  op.register_date >= '"+DateUtil.dateToStrShort(new Date())+" 00:00:00' ";
			}*/
            sql = sql + " AND op.type in ('1','2') AND op.outpatient_type = 3 ";
            sql = sql + " AND op.type in ('1','2') AND op.outpatient_type in(3,4,5) ";
            sql = sql + " ORDER BY op.create_time DESC";
        }
@ -4487,6 +4487,7 @@ public class ImService {
                "FROM wlyy_outpatient op LEFT JOIN wlyy_consult a  ON a.relation_code = op.id \n" +
                " LEFT join wlyy_consult_team b on a.id = b.consult" +
                " LEFT JOIN base_patient d on op.patient = d.id " +
                " LEFT JOIN wlyy_outpatient_hospitalization oh on op.id= oh.outpatient_id " +
                " WHERE 1=1 ";
        if (status == 1) {
            sql += " and op.status = 0";
@ -4546,7 +4547,13 @@ public class ImService {
                sql += " AND op.type =2 and op.outpatient_type = 3";
            } else if (type.equalsIgnoreCase("12")) {
                sql += " AND op.outpatient_type = 2";
            } else {
            } else if (type.equalsIgnoreCase("28")) {
                sql += " AND op.outpatient_type = 4"; //康复咨询
            } else if (type.equalsIgnoreCase("29")) {
                sql += " AND op.outpatient_type = 1 and  oh.id is not null "; //住院申请咨询
            } else if (type.equalsIgnoreCase("30")) {
                sql += " AND op.outpatient_type = 5";//护理咨询
            }  else {
                sql += " AND op.type in (1,2,3) ";
            }
        }
@ -4791,7 +4798,7 @@ public class ImService {
////                    sql += " AND  op.register_date >= '" + DateUtil.dateToStrShort(new Date()) + " 00:00:00' ";//不加今日待办
//                }
//            }
            sql = sql + " AND op.type in ('1','2') AND op.outpatient_type = 3 ";
            sql = sql + " AND op.type in ('1','2') AND op.outpatient_type in(3,4,5) ";
            sql = sql + " ORDER BY op.create_time DESC";
        }

+ 9 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/article/KnowledgeArticleDictDO.java

@ -85,6 +85,15 @@ public class KnowledgeArticleDictDO extends UuidIdentityEntity {
	private Date releaseTime;
	private Integer flag;//1文章2健康教育
	public Integer getFlag() {
		return flag;
	}
	public void setFlag(Integer flag) {
		this.flag = flag;
	}
	@Transient
	private String sendDoctorCode;

+ 14 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/DictHospitalDeptVO.java

@ -55,6 +55,20 @@ public class DictHospitalDeptVO extends IntegerIdentityVO{
    private String deptTypeCode;
    /**
     * 科室logo
     */
    @ApiModelProperty(value = "科室logo", example = "科室logo")
    private String deptLogo;
    public String getDeptLogo() {
        return deptLogo;
    }
    public void setDeptLogo(String deptLogo) {
        this.deptLogo = deptLogo;
    }
    public String getOrgCode() {
        return orgCode;
    }

+ 21 - 5
svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/DsyyController.java

@ -227,6 +227,16 @@ public class DsyyController extends EnvelopRestEndpoint {
    }
    @PostMapping(value = "/queryMedicalPay")
    @ApiOperation(value = "结算结果查询")
    public ObjEnvelop queryMedicalPay(@ApiParam(name = "cardNo", value = "卡号", required = false)
                                     @RequestParam(value = "cardNo",required = false)String cardNo,
                                     @ApiParam(name = "outChargeNo", value = "平台结算流水号", required = false)
                                     @RequestParam(value = "outChargeNo",required = false)String outChargeNo) throws Exception {
        return success("请求成功",dsyyEntranceService.queryMedicalPay(cardNo,outChargeNo));
    }
    @PostMapping(value = "/queryCardList")
    @ApiOperation(value = "查询院内卡列表")
    public ObjEnvelop queryCardList(@ApiParam(name = "userName", value = "姓名", required = false)
@ -558,7 +568,7 @@ public class DsyyController extends EnvelopRestEndpoint {
        }catch (Exception e){
            e.printStackTrace();
        }
        return Envelop.getError("发送失败");
        return Envelop.getError("获取token");
    }
    @GetMapping(value = "/dsfpkj")
@ -570,7 +580,7 @@ public class DsyyController extends EnvelopRestEndpoint {
        }catch (Exception e){
            e.printStackTrace();
        }
        return Envelop.getError("发送失败");
        return Envelop.getError("电子票据开具");
    }
    @PostMapping(value = "/dzblSave")
@ -688,13 +698,19 @@ public class DsyyController extends EnvelopRestEndpoint {
    @GetMapping(value = "/queryDzfp")
    @ApiOperation(value = "电子发票查询")
    public Envelop queryDzfp(@ApiParam(name = "id", value = "结算id", required = false)
                                      @RequestParam(value = "id",required = false)String id) throws Exception {
                                      @RequestParam(value = "id",required = false)String id,
                             @ApiParam(name = "invoiceNo", value = "发票号码", required = false)
                             @RequestParam(value = "invoiceNo",required = false)String invoiceNo,
                             @ApiParam(name = "invoiceCode", value = "发票代码", required = false)
                                 @RequestParam(value = "invoiceCode",required = false)String invoiceCode,
                             @ApiParam(name = "invoiceSerialNum", value = "校验码", required = false)
                                 @RequestParam(value = "invoiceSerialNum",required = false)String invoiceSerialNum) throws Exception {
        try {
            return success(dsyyEntranceService.queryDzfp(id));
            return success(dsyyEntranceService.queryDzfp(id,invoiceNo,invoiceCode,invoiceSerialNum));
        }catch (Exception e){
            e.printStackTrace();
        }
        return Envelop.getError("发送失败");
        return Envelop.getError("电子发票下载");
    }
    @GetMapping(value = "/callServiceHC")

+ 11 - 0
svr/svr-internet-hospital/pom.xml

@ -50,9 +50,15 @@
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-redis</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.8.9</version> <!-- 请使用最新的稳定版本 -->
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
        </dependency>
        <!--注释掉就不会读取git的配置,只会读取yml中的配置-->
        <dependency>
@ -216,6 +222,10 @@
                    <groupId>xalan</groupId>
                    <artifactId>xalan</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.google.code.gson</groupId>
                    <artifactId>gson</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!--<dependency>-->
@ -260,6 +270,7 @@
            <groupId>com.yihu.jw</groupId>
            <artifactId>es-service</artifactId>
            <version>${version.wlyy-common}</version>
        </dependency>

+ 1 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/article/ArticleDictEndpoint.java

@ -88,6 +88,7 @@ public class ArticleDictEndpoint extends EnvelopRestEndpoint {
            filters += ";type=2";
            List<KnowledgeArticleDictDO> list = knowledgeArticleDictService.search(fields, filters, sorts, page, pageSize);
            for (KnowledgeArticleDictDO articleDictDO : list) {
                JSONObject object = menuManageService.findArticleStaticsByArticleId(articleDictDO.getId());
                if (object != null) {
                    articleDictDO.setCollection(Integer.parseInt(object.getString("collectTotal")));

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

@ -1076,6 +1076,8 @@ public class DoctorConsultEndpoint extends EnvelopRestEndpoint {
			result.put("imgConsultCount",prescriptionService.getWaitVideoCount(doctor,"1","3",wxId));//图文咨询数量
			result.put("videoConsultCount",prescriptionService.getWaitVideoCount(doctor,"2","3",wxId));//视频咨询数量
			result.put("homeConsultCount",prescriptionService.getWaitVideoCount(doctor,"3","3",wxId));//家医咨询数量
			result.put("nursingConsultCount",prescriptionService.getWaitVideoCount(doctor,"1","5",wxId));//护理咨询
			result.put("recoveryConsultCount",prescriptionService.getWaitVideoCount(doctor,"1","4",wxId));//护理咨询
			if ("sd_tnzyy_wx".equalsIgnoreCase(wxId)){
				result.put("doorServiceCount",prescriptionService.waitUpdoorCount(doctor));//上门服务数量
			}

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

@ -615,7 +615,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
    try {
            WlyyOutpatientDO wlyyOutpatientDO = prescriptionService.appointmentRevisit(outpatientJson, expressageJson, registerJson, chargeType);
            if (wlyyOutpatientDO != null && null == wlyyOutpatientDO.getId() && !wlyyOutpatientDO.getOutpatientType().equalsIgnoreCase("3")
                    && !wlyyOutpatientDO.getOutpatientType().equalsIgnoreCase("4")) {
                    && !wlyyOutpatientDO.getOutpatientType().equalsIgnoreCase("4") && !wlyyOutpatientDO.getOutpatientType().equalsIgnoreCase("5")) {
                ObjEnvelop objEnvelop = new ObjEnvelop();
                String msg = "";
                if (1 == wlyyOutpatientDO.getRemindCount()) {
@ -792,34 +792,26 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                                    @ApiParam(name = "orderId", value = "上门服务订单号")
                                    @RequestParam(value = "orderId", required = false) String orderId) throws Exception {
        Map<String, Object> result = prescriptionService.makeDiagnosis(outPatientId, prescriptionId, advice, type, infoJsons, diagnosisJson, inspectionJson, emrJson, hisId);
        try {
            com.alibaba.fastjson.JSONObject msgObj = new com.alibaba.fastjson.JSONObject();
            List<WlyyPrescriptionDiagnosisDO> diagnosisDOs = (List<WlyyPrescriptionDiagnosisDO>) com.alibaba.fastjson.JSONArray.parseArray(diagnosisJson, WlyyPrescriptionDiagnosisDO.class);
            String zd_str = "";
            String jl_str = advice;
            for (WlyyPrescriptionDiagnosisDO diagnosisDO : diagnosisDOs) {
                if ("1".equals(diagnosisDO.getType())) {
                    zd_str += diagnosisDO.getName() + "," + zd_str;
                } else {
                    zd_str += diagnosisDO.getName() + ",";
                }
            }
            zd_str = zd_str.substring(0, zd_str.length() - 1);
            msgObj.put("zd", zd_str);
            msgObj.put("jl", jl_str);
            msgObj.put("outpatientid", outPatientId);
            WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(outPatientId).orElse(null);
            String immsg = imService.pushHuiZhenMsg(msgObj, wlyyOutpatientDO.getDoctor(), wlyyOutpatientDO.getDoctorName(), outPatientId, wlyyOutpatientDO.getPatient(), wlyyOutpatientDO.getOutpatientType());
            System.out.println("发送诊断消息成功:" + immsg);
            if (result.get("prescriptionId") != null && StringUtils.isNoneBlank(orderId)) {
                prescriptionService.savePrescriptionToDoorService(orderId, result.get("prescriptionId").toString());
        com.alibaba.fastjson.JSONObject msgObj = new com.alibaba.fastjson.JSONObject();
        List<WlyyPrescriptionDiagnosisDO> diagnosisDOs = (List<WlyyPrescriptionDiagnosisDO>) com.alibaba.fastjson.JSONArray.parseArray(diagnosisJson, WlyyPrescriptionDiagnosisDO.class);
        String zd_str = "";
        String jl_str = advice;
        for (WlyyPrescriptionDiagnosisDO diagnosisDO : diagnosisDOs) {
            if ("1".equals(diagnosisDO.getType())) {
                zd_str += diagnosisDO.getName() + "," + zd_str;
            } else {
                zd_str += diagnosisDO.getName() + ",";
            }
        } catch (Exception e) {
            System.out.println("发送诊断消息失败:" + e.getMessage());
//            e.printStackTrace();
        }
        zd_str = zd_str.substring(0, zd_str.length() - 1);
        msgObj.put("zd", zd_str);
        msgObj.put("jl", jl_str);
        msgObj.put("outpatientid", outPatientId);
        WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(outPatientId).orElse(null);
        String immsg = imService.pushHuiZhenMsg(msgObj, wlyyOutpatientDO.getDoctor(), wlyyOutpatientDO.getDoctorName(), outPatientId, wlyyOutpatientDO.getPatient(), wlyyOutpatientDO.getOutpatientType());
        System.out.println("发送诊断消息成功:" + immsg);
        if (result.get("prescriptionId") != null && StringUtils.isNoneBlank(orderId)) {
            prescriptionService.savePrescriptionToDoorService(orderId, result.get("prescriptionId").toString());
        }
        return success(result);
    }
@ -3956,5 +3948,22 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
                                      @RequestParam(value = "size",required = false)Integer size) throws Exception {
        return success("请求成功",dsyyPrescriptionService.selectInspectReportList(idcard,cardNo,startTime,endTime,reportId,page,size));
    }
    @PostMapping(value = "/queryDzfp")
    @ApiOperation(value = "下载电子发票")
    public ObjEnvelop queryDzfp(@ApiParam(name = "settleNo", value = "结算号", required = false)
                                              @RequestParam(value = "settleNo",required = false)String settleNo) throws Exception {
        return success("请求成功",dsyyPrescriptionService.queryDzfp(settleNo));
    }
    @GetMapping("/aIassistant")
    @ApiOperation(value = "ai助手", notes = "ai助手")
    public Envelop aIassistant(
            @ApiParam(name = "content", value = "输入文本", required = false)
            @RequestParam(value = "content",required = false)String  content) throws Exception {
            return success("操作成功", prescriptionService.aIassistant(content));
    }
}