Quellcode durchsuchen

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

LAPTOP-KB9HII50\70708 vor 1 Jahr
Ursprung
Commit
8bd3f70740

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

@ -15,12 +15,20 @@ import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorRoleDO;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.hospital.consult.WlyyHospitalSysDictDO;
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;
import com.yihu.jw.entity.hospital.prescription.*;
import com.yihu.jw.hospital.dict.WlyyChargeDictDao;
import com.yihu.jw.hospital.dict.WlyyHospitalSysDictDao;
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;
@ -42,6 +50,7 @@ import com.yihu.jw.utils.dsyyUtil.ZoesoftHipServiceLocator;
import com.yihu.jw.utils.hibernate.HibenateUtils;
import com.yihu.jw.wechat.dao.BasePatientWechatDao;
import net.sf.json.xml.XMLSerializer;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
@ -57,6 +66,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
@ -128,6 +138,14 @@ public class DsyyEntranceService {
    private HibenateUtils hibenateUtils;
    @Autowired
    private OauthCaConfigDao oauthCaConfigDao;
    @Autowired
    private YlzMedicailIcdDao ylzMedicailIcdDao;
    @Autowired
    private YlzMedicailMxDao ylzMedicailMxDao;
    @Autowired
    private YlzMedicailRelationInvoiceDao invoiceDao;
    @Autowired
    private YlzMedicailRelationDao ylzMedicailRelationDao;
    private static String key="bvvsf3JA0mUXMU+mVnMaOQ==";
@ -2638,4 +2656,215 @@ public class DsyyEntranceService {
    //===========================CA签名==================================
    //============================电子发票开始====================================
    String dsfp = "http://10.95.8.94:20017/service/invoice/perform";
    String appId ="862e18c18c5e4d72";
    String appKey ="d756d7778c43e3c5b8bbcb301c48fe25";
    String msgNo ="8901";
    String organ = "401039";
    String user = "hisbizadmin";
    public String getAccessToken() throws Exception {
        String msg = "<Voucher>\n" +
                "<AppId>"+appId+"</AppId>\n" +
                "<AppKey>"+appKey+"</AppKey>\n" +
                "</Voucher>";
        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" +
                "<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" +
                "<Reserve></Reserve>\n" +
                "</Head>\n" +
                "<Msg>"+ Base64.encodeBase64String(msg.getBytes("utf-8"))+"</Msg>\n" +
                "</Invoice>";
        logger.info("请求前入参:"+params);
        String result = httpClientUtil.sendPost(dsfp,params);
        logger.info("请求结果:"+result);
        return result;
    }
    /**
     * 电子票据开具
     * @param ylzMedicalRelationDO
     * @return
     * @throws Exception
     */
    public String dsfpkj(String id) throws Exception {
        YlzMedicalRelationDO ylzMedicalRelationDO = ylzMedicailRelationDao.findById(id).get();
        WlyyOutpatientDO outpatientDO = outpatientDao.findById(ylzMedicalRelationDO.getRelationCode()).get();
        BasePatientDO patientDO = basePatientDao.findById(outpatientDO.getPatient()).get();
        PatientMappingDO patientMappingDO = patientMappingDao.findByPatient(patientDO.getId());
        String diseases = " <DiseaseDetails>";
        List<YlzMedicalIcdDO> icdDOS = ylzMedicailIcdDao.findByMedicalId(ylzMedicalRelationDO.getId());
        for (int i=0;i<icdDOS.size();i++){
            YlzMedicalIcdDO icdDO = icdDOS.get(0);
            diseases +="<DiseaseItem>" +
                    "<DiseaseCode>"+icdDO.getDiseaseCodeIcd10()+"</DiseaseCode>" +
                    "<DiseaseName>"+icdDO.getDiseaseNameIcd10()+"</DiseaseName>" +
                    "<DiseaseFlag>"+(i+1)+"</DiseaseFlag>" +
                    "</DiseaseItem>" ;
        }
        diseases+="</DiseaseDetails>";
        String mxInfos = "<Details>";
        List<YlzMedicalMxDO> mxDOList = ylzMedicailMxDao.findByMedicalId(ylzMedicalRelationDO.getId());
        for (YlzMedicalMxDO mxDO:mxDOList){
            mxInfos +="<Item>\n" +
                    "<ItemCode>"+mxDO.getItemCode()+"</ItemCode>\n" +
                    "<ItemName>"+mxDO.getItemName()+"</ItemName>\n" +
                    "<ItemAmount>"+mxDO.getTotalMoney()+"</ItemAmount>\n" +
                    "<ItemQuantity>"+mxDO.getAmount()+"</ItemQuantity>\n" +
                    "<ItemStd>1.00</ItemStd>\n" +
                    "<InsuranceItemCode>"+mxDO.getHisItemCode()+"</InsuranceItemCode>\n" +
                    "</Item>\n" ;
        }
        mxInfos += "</Details>";
        String msg = "<Voucher>\n" +
                "<Main>\n" +
                "<RandomNumber>123456</RandomNumber>\n" +
                "<TotalAmount>"+ylzMedicalRelationDO.getTotalAmount()+"</TotalAmount>\n" +
                "<IssueDate>"+DateUtil.dateToStrFormatShort(ylzMedicalRelationDO.getSettleDate())+"</IssueDate>\n" +
                "<IssueTime>"+DateUtil.getTimeShort(ylzMedicalRelationDO.getSettleDate())+"</IssueTime>\n" +
                "<InvoicingParty>\n" +
                "<InvoicingPartyCode>401039</InvoicingPartyCode>\n" +
                "<InvoicingPartyName>厦门市第三医院</InvoicingPartyName>\n" +
                "</InvoicingParty>\n" +
                "<PayerPartyType>1</PayerPartyType>\n" +
                "<PayMode></PayMode>\n" +
                "<BizCode>2020071922123</BizCode>\n" +
                "<HandlingPerson>陈少娟</HandlingPerson>\n" +
                "<MainExt>\n" +
                "<MedicalType>门诊</MedicalType>\n" +
                "<PatientNumber>"+ylzMedicalRelationDO.getHisSerial()+"</PatientNumber>\n" +
                "<OrgType>三级乙等</OrgType>\n" +
                "<MedicalInsuranceType>医保类型</MedicalInsuranceType>\n" +
                "<MedicalInsuranceID>"+ylzMedicalRelationDO.getInsuranceSerial()+"</MedicalInsuranceID>\n" +
                "<FundPayAmount>"+ylzMedicalRelationDO.getFundPrice()+"</FundPayAmount>\n" +
                "<OtherPayAmount>"+ylzMedicalRelationDO.getOtherPay()+"</OtherPayAmount>\n" +
                "<AccountPayAmount>"+ylzMedicalRelationDO.getPersonAccount()+"</AccountPayAmount>\n" +
                "<OwnPayAmount>"+ylzMedicalRelationDO.getPersonCash()+"</OwnPayAmount>\n" +
                "<SelfpaymentAmount>"+ylzMedicalRelationDO.getPersonCash()+"</SelfpaymentAmount>\n" +
                "<CaseNumber>无</CaseNumber>\n" +
                "<PrepaidAmount>"+ylzMedicalRelationDO.getBalance()+"</PrepaidAmount>\n" +
                "<RechargeAmount>8</RechargeAmount>\n" +
                "<RefundAmount>0</RefundAmount>\n" +
                "<Age>"+patientDO.getAge()+"</Age>\n" +
                "<InsuranceSettleNo>"+ylzMedicalRelationDO.getInsuranceSerial()+"</InsuranceSettleNo>\n" +
                "<VisitDeptName>"+ylzMedicalRelationDO.getDeptName()+"</VisitDeptName>\n" +
                "<VisitDeptCode>"+ylzMedicalRelationDO.getDeptCode()+"</VisitDeptCode>\n" +
                "<MedicalAccountPayment>"+ylzMedicalRelationDO.getPersonAccount()+"</MedicalAccountPayment>\n" +
                "<HealthAccountPay>"+ylzMedicalRelationDO.getPersonAccount()+"</HealthAccountPay>\n" +
                "<MasonicAccountPay>"+ylzMedicalRelationDO.getJtgjPay()+"</MasonicAccountPay>\n" +
                "<MedicalAccountBalance>"+ylzMedicalRelationDO.getAccountBalance()+"</MedicalAccountBalance>\n" +
                "<HealthAccountBalance>0</HealthAccountBalance>\n" +
                "<MedicalAssistance>"+ylzMedicalRelationDO.getYljzPay()+"</MedicalAssistance>\n" +
                "<IllnessInsure>0</IllnessInsure>\n" +
                "<HealthCareFund>"+ylzMedicalRelationDO.getOtherPay()+"</HealthCareFund>\n" +
                "<CivilServantSubsidy>"+ylzMedicalRelationDO.getGwyPay()+"</CivilServantSubsidy>\n" +
                "<HospitalRelief>0</HospitalRelief>\n" +
                "<RefundableAmount>0</RefundableAmount>\n" +
                "<OverCapPay>0</OverCapPay>\n" +
                "<PrepaidBalance>"+ylzMedicalRelationDO.getBalance()+"</PrepaidBalance>\n" +
                "<TimesOfMonth>0</TimesOfMonth>\n" +
                "<MedicalDate>"+DateUtil.dateToStrFormatShort(ylzMedicalRelationDO.getDate())+"</MedicalDate>\n" +
                "<FamilyMasonicAccountBalance>0</FamilyMasonicAccountBalance> " +
                "<PreSelfPay>0</PreSelfPay>\n" +
                "<SelfpaymentCost>"+ylzMedicalRelationDO.getPersonCash()+"</SelfpaymentCost>\n" +
                "<UploadSource>2</UploadSource>\n" +
                "<VisitType>1</VisitType>\n" +
                "<SettlementNo>"+ylzMedicalRelationDO.getHisSettleNo()+"</SettlementNo>\n" +
                "<SickName>"+ylzMedicalRelationDO.getName()+"</SickName>\n" +
                "<WorkInjuredPay>0</WorkInjuredPay>\n" +
                diseases+
                "<SickId>"+patientMappingDO.getMappingCode()+"</SickId>" +
                "<CardInfos>\n" +
                "<CardInfo>\n" +
                "<CardType>4</CardType>\n" +
                "</CardInfo>\n" +
                "</CardInfos>\n" +
                "</PayerPartyExt>\n" +
                "<AccountBalanceInfo>"+ylzMedicalRelationDO.getAccountBalance()+"</AccountBalanceInfo>\n" +
                "<CardNum>"+outpatientDO.getCardNo()+"</CardNum>\n" +
                "<MedicareDist></MedicareDist>\n" +
                "</MainExt>\n" +
                "</Main>\n" +
                mxInfos+
                "</Voucher>";
        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" +
                "<Organ>"+organ+"</Organ>\n" +
                "<User>"+user+"</User>\n" +
                "<Version>1.0</Version>\n" +
                "<AppId>"+appId+"</AppId>\n" +
                "<AccessToken>aaaabbbbb11111333333</AccessToken>"+
                "<AppId>862e18c18c5e4d72</AppId>\n" +
                "<MsgId>5676"+randomStr+"</MsgId>\n" +
                "<MsgRef>5676"+randomStr+"</MsgRef>\n" +
                "<DateTime>"+new Date().getTime()+"</DateTime>\n" +
                "<Reserve></Reserve>\n" +
                "</Head>\n" +
                "<Msg>"+ Base64.encodeBase64String(msg.getBytes("utf-8"))+"</Msg>\n" +
                "</Invoice>";
        logger.info("开具电子发票入参:"+params);
        String result = httpClientUtil.sendPost(dsfp,params);
        logger.info("开具电子发票请求结果:"+result);
        return result;
    }
    /**
     * 下载电子发票
     * @param medicalId
     * @return
     * @throws Exception
     */
    public String queryDzfp(String medicalId) throws Exception {
        YlzMedicalRelationInvoiceDO invoiceDO = invoiceDao.findByMedicalId(medicalId);
        String msg = "<Voucher>\n" +
                "<AgencyCode>401039</AgencyCode>\n" +
                "<AgencyName>厦门市第三医院</AgencyName>\n" +
                "<EInvoiceCode>"+invoiceDO.getInvoiceCode()+"</EInvoiceCode>\n" +
                "<EInvoiceNumber>"+invoiceDO.getInvoiceSerialNum()+"</EInvoiceNumber>\n" +
                "<RandomNumber>"+invoiceDO.getInvoiceNo()+"</RandomNumber>\n" +
                "</Voucher>\n";
        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" +
                "<Organ>"+organ+"</Organ>\n" +
                "<User>"+user+"</User>\n" +
                "<Version>1.0</Version>\n" +
                "<AppId>"+appId+"</AppId>\n" +
                "<AccessToken>aaaabbbbb11111333333</AccessToken>"+
                "<AppId>862e18c18c5e4d72</AppId>\n" +
                "<MsgId>5676"+randomStr+"</MsgId>\n" +
                "<MsgRef>5676"+randomStr+"</MsgRef>\n" +
                "<DateTime>"+new Date().getTime()+"</DateTime>\n" +
                "<Reserve></Reserve>\n" +
                "</Head>\n" +
                "<Msg>"+ Base64.encodeBase64String(msg.getBytes("utf-8"))+"</Msg>\n" +
                "</Invoice>";
        logger.info("开具电子发票入参:"+params);
        String result = httpClientUtil.sendPost(dsfp,params);
        logger.info("开具电子发票请求结果:"+result);
        return result;
    }
    //=============================电子发票结束===================================
}

Datei-Diff unterdrückt, da er zu groß ist
+ 73 - 35
business/es-service/src/main/java/com/yihu/jw/es/service/StatisticsEsService.java


+ 1 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/healthCare/YlzMedicalRelationDO.java

@ -412,7 +412,7 @@ public class YlzMedicalRelationDO extends UuidIdentityEntity {
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    @Column(name="date")
    @Column(name="reality_date")
    public Date getDate() {
        return date;
    }

+ 7 - 0
common/common-util/src/main/java/com/yihu/jw/util/date/DateUtil.java

@ -307,6 +307,13 @@ public class DateUtil {
        return dateToStringLong(currentTime,HH_MM_SS);
    }
    /**
     * 获取时间 小时:分;秒 HH:mm:ss
     */
    public static String getTimeShort(Date date) {
        return dateToStringLong(date,HH_MM_SS);
    }
    /**
     * 将长时间格式字符串转换为时间 yyyy-MM-dd HH:mm:ss
     */

+ 55 - 0
common/common-util/src/main/java/com/yihu/jw/util/http/HttpClientUtil.java

@ -358,6 +358,61 @@ public class HttpClientUtil {
        }
        return buffer.toString();
    }
    /**
     * 向指定 URL 发送POST方法的请求
     *
     * @param url
     *            发送请求的 URL带上参数
     * @param param
     *            POST参数。
     * @return 所代表远程资源的响应结果
     */
    public static  String sendPostXml(String url, String param) {
        StringBuffer buffer = new StringBuffer();
        PrintWriter out = null;
        BufferedReader in = null;
        HttpURLConnection conn = null;
        try {
            URL realUrl = new URL(url);
            // 打开和URL之间的连接
            conn = (HttpURLConnection) realUrl.openConnection();
            conn.setRequestMethod("POST");
            conn.setDoOutput(true);
            conn.setDoInput(true);
            conn.setUseCaches(false);
            conn.setRequestProperty("Content-Type", "application/xml");
            conn.setRequestProperty("accept", "*/*");
            conn.setRequestProperty("connection", "Keep-Alive");
            conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
            OutputStreamWriter osw = new OutputStreamWriter(conn.getOutputStream(), "UTF-8");
            osw.write(param.toString());
            osw.flush();
            // 读取返回内容
            BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8"));
            String temp;
            while ((temp = br.readLine()) != null) {
                buffer.append(temp);
                buffer.append("\n");
            }
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            try {
                if (out != null) {
                    out.close();
                }
                if (in != null) {
                    in.close();
                }
            } catch (IOException ex) {
                ex.printStackTrace();
            }
        }
        return buffer.toString();
    }
    
    public  String postBody(String url, com.alibaba.fastjson.JSONObject params) {
        RestTemplate restTemplate = new RestTemplate();

+ 4 - 1
gateway/ag-basic/src/main/resources/application.yml

@ -30,7 +30,10 @@ spring:
      max-idle: 8 # Max number of "idle" connections in the pool. Use a negative value to indicate an unlimited number of idle connections.
      max-wait: -1 # Maximum amount of time (in milliseconds) a connection allocation should block before throwing an exception when the pool is exhausted. Use a negative value to block indefinitely.
      min-idle: 1 # Target for the minimum number of idle connections to maintain in the pool. This settings only has an effect if it is positive.
  servlet:
    multipart:
      max-file-size: 60MB
      max-request-size: 60MB
hystrix:
  command:
    default:

+ 2 - 2
starter/elasticsearch-starter/src/main/java/com/yihu/jw/elasticsearch/ElasticSearch7Pool.java

@ -93,8 +93,8 @@ public class ElasticSearch7Pool {
    public ResultSet restHighLevelClientStream(String sql) throws Exception {
//        Connection connection = DriverManager.getConnection("jdbc:es://http://172.26.0.55:9200","elastic","elastic");
        Connection connection = DriverManager.getConnection("jdbc:es://http://172.26.0.168:9200/","elastic","elastic");
//        Connection connection = DriverManager.getConnection("jdbc:es://" + hosts, userName, password);
//        Connection connection = DriverManager.getConnection("jdbc:es://http://172.26.0.168:9200/","elastic","elastic");
        Connection connection = DriverManager.getConnection("jdbc:es://" + hosts, userName, password);
        Statement statement = connection.createStatement();
        ResultSet resultSet = statement.executeQuery(sql);
//        connection.close();

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

@ -245,4 +245,40 @@ public class DsyyController extends EnvelopRestEndpoint {
        }
        return Envelop.getError("发送失败");
    }
    @GetMapping(value = "/getAccessToken")
    @ApiOperation(value = "电子发票获取授权")
    public Envelop getAccessToken() throws Exception {
        try {
            return success(dsyyEntranceService.getAccessToken());
        }catch (Exception e){
            e.printStackTrace();
        }
        return Envelop.getError("发送失败");
    }
    @GetMapping(value = "/dsfpkj")
    @ApiOperation(value = "电子发票开具")
    public Envelop dsfpkj(@ApiParam(name = "id", value = "结算id", required = false)
                                      @RequestParam(value = "id",required = false)String id) throws Exception {
        try {
            return success(dsyyEntranceService.dsfpkj(id));
        }catch (Exception e){
            e.printStackTrace();
        }
        return Envelop.getError("发送失败");
    }
    @GetMapping(value = "/queryDzfp")
    @ApiOperation(value = "电子发票查询")
    public Envelop queryDzfp(@ApiParam(name = "id", value = "结算id", required = false)
                                      @RequestParam(value = "id",required = false)String id) throws Exception {
        try {
            return success(dsyyEntranceService.queryDzfp(id));
        }catch (Exception e){
            e.printStackTrace();
        }
        return Envelop.getError("发送失败");
    }
}

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

@ -154,7 +154,7 @@ public class HealthCareEndPoint extends EnvelopRestEndpoint {
    @ApiOperation(value = "2.5.1医保挂号(N20.17.04.01)", notes = "2.5.1医保挂号(N20.17.04.01)")
    public ObjEnvelop register(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
                               @RequestParam(value = "outpatientId", required = true)String outpatientId)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.register(outpatientId));
        return ObjEnvelop.getSuccess("ok",healthCareService.register(outpatientId,null));
    }
    @GetMapping(value = "/registerBack")
@ -168,7 +168,7 @@ public class HealthCareEndPoint extends EnvelopRestEndpoint {
    @ApiOperation(value = " 2.5.3医保费用明细上传(N20.17.04.03)", notes = " 2.5.3医保费用明细上传(N20.17.04.03)")
    public ObjEnvelop feeDetailUpload(@ApiParam(name = "outpatientId", value = "挂号号", required = true)
                                      @RequestParam(value = "outpatientId", required = true)String outpatientId)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.feeDetailUpload(outpatientId));
        return ObjEnvelop.getSuccess("ok",healthCareService.feeDetailUpload(outpatientId,null));
    }
    @GetMapping(value = "/feeDetailRefund")
@ -184,7 +184,7 @@ public class HealthCareEndPoint extends EnvelopRestEndpoint {
    @ApiOperation(value = " 2.5.5医保预结算服务(N20.17.04.05)", notes = " 2.5.5医保预结算服务(N20.17.04.05)")
    public ObjEnvelop preSettlement(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
                                    @RequestParam(value = "outpatientId", required = false)String outpatientId)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.preSettlement(outpatientId));
        return ObjEnvelop.getSuccess("ok",healthCareService.preSettlement(outpatientId,null));
    }
    @GetMapping(value = "/preSettlementRefund")
@ -198,14 +198,14 @@ public class HealthCareEndPoint extends EnvelopRestEndpoint {
    @ApiOperation(value = " 2.5.7获取医保结算页面地址(N20.17.04.07)", notes = " 2.5.7获取医保结算页面地址(N20.17.04.07)")
    public ObjEnvelop getSettlementResultUrl(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
                                             @RequestParam(value = "outpatientId", required = false)String outpatientId)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.getSettlementResultUrl(outpatientId));
        return ObjEnvelop.getSuccess("ok",healthCareService.getSettlementResultUrl(outpatientId,null));
    }
    @GetMapping(value = "/getSettlementResultUrlBase64")
    @ApiOperation(value = " 2.5.7获取医保结算页面地址(N20.17.04.08)", notes = " 2.5.7获取医保结算页面地址(N20.17.04.08)")
    public ObjEnvelop getSettlementResultUrlBase64(@ApiParam(name = "outpatientId", value = "门诊id", required = true)
                                             @RequestParam(value = "outpatientId", required = false)String outpatientId)throws Exception{
        return ObjEnvelop.getSuccess("ok",healthCareService.getSettlementResultUrlBase64(outpatientId));
        return ObjEnvelop.getSuccess("ok",healthCareService.getSettlementResultUrlBase64(outpatientId,null));
    }
    @GetMapping(value = "/getSettlementResult")

+ 4 - 0
svr/svr-internet-hospital-entrance/src/main/resources/application.yml

@ -24,6 +24,10 @@ spring:
    time-between-eviction-runs-millis: 300000 #在空闲连接回收器线程运行期间休眠的时间值,以毫秒为单位,一般比minEvictableIdleTimeMillis小
  main:
    allow-bean-definition-overriding: true
  servlet:
    multipart:
      max-file-size: 60MB
      max-request-size: 60MB
  redis:
    database: 0 # Database index used by the connection factory.
    password: # Login password of the redis server.

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

@ -242,9 +242,10 @@ public class ArticleEndpoint extends EnvelopRestEndpoint {
			if (flag) {
				return success("操作成功");
			}else{
				return failed("操作失败");
				return failed("存在一级或二级分类,删除失败");
			}
		}catch (Exception e){
			e.printStackTrace();
			return failedException2(e);
		}
		

+ 75 - 4
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/statistics/EsStatisticsEndpoint.java

@ -3,7 +3,12 @@ package com.yihu.jw.hospital.endpoint.statistics;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.doctor.dao.BaseDoctorHospitalDao;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO;
import com.yihu.jw.es.service.StatisticsEsService;
import com.yihu.jw.im.service.ImService;
import com.yihu.jw.restmodel.hospital.statistics.ScreenQvo;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
@ -13,6 +18,7 @@ import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -39,6 +45,12 @@ public class EsStatisticsEndpoint extends EnvelopRestEndpoint {
    @Autowired
    private StatisticsEsService statisticsEsService;
    @Autowired
    private ImService imService;
    @Autowired
    private BaseDoctorDao baseDoctorDao;
    @Autowired
    private BaseDoctorHospitalDao baseDoctorHospitalDao;
    /**
@ -1264,8 +1276,8 @@ public class EsStatisticsEndpoint extends EnvelopRestEndpoint {
    /**
     * 获取【科室、医生】的接诊量接诊率排名
     * 参数:
     * 科室参数:strJson={"startDate":"2023-07-01","endDate":"2023-07-20","area":"350211A1002","level":4,"deptCode":"1190000","flag":"1"}
     * 医生参数:strJson={"startDate":"2023-07-17","endDate":"2023-07-20","area":"","level":5,"flag":"1"}
     * 科室参数:strJson={"startDate":"2020-07-01","endDate":"2023-07-20","area":"350211A1002","level":4,"deptCode":"1190000","flag":"1"}
     * 医生参数:strJson={"startDate":"2020-07-17","endDate":"2023-07-20","area":"","level":5,"flag":"1"}
     */
    @GetMapping(value = BaseHospitalRequestMapping.Statistics.getDeptOrDoctorVolumeList)
    @ApiOperation(value = " 获取【科室、医生】的接诊量接诊率排名")
@ -1619,7 +1631,7 @@ public class EsStatisticsEndpoint extends EnvelopRestEndpoint {
    public Envelop getDoctorSeverScopeDetail(@RequestParam(required = true) String strJson) {
        try {
            ScreenQvo qvo = JSON.parseObject(strJson, ScreenQvo.class);
            List<Map<String, Object>> result = statisticsEsService.getDoctorSeverScopeDetail(qvo);
            Map<String, Object> result = statisticsEsService.getDoctorSeverScopeDetail(qvo);
            return success(result);
        } catch (Exception e) {
            e.printStackTrace();
@ -1637,7 +1649,7 @@ public class EsStatisticsEndpoint extends EnvelopRestEndpoint {
    public Envelop getDoctorFreeDetail(@RequestParam(required = true) String strJson) {
        try {
            ScreenQvo qvo = JSON.parseObject(strJson, ScreenQvo.class);
            List<Map<String, Object>> result = statisticsEsService.getDoctorFreeDetail(qvo);
            Map<String, Object>  result = statisticsEsService.getDoctorFreeDetail(qvo);
            return success(result);
        } catch (Exception e) {
            e.printStackTrace();
@ -1731,4 +1743,63 @@ public class EsStatisticsEndpoint extends EnvelopRestEndpoint {
    }
    @GetMapping(value = BaseHospitalRequestMapping.DodtorIM.records2)
    @ApiOperation(value = "医生咨询记录查询")
    public Envelop records2(
            @ApiParam(name = "doctor", value = "医生id")
            @RequestParam(value = "doctor",required = false) String doctor,
            @ApiParam(name = "title", value = "咨询标题关键字")
            @RequestParam(value = "title",required = false) String title,
            @ApiParam(name = "patient", value = "患者id")
            @RequestParam(value = "patient",required = false) String patient,
            @ApiParam(name = "id", value = "咨询ID")
            @RequestParam(value = "id",required = false) String id,
            @ApiParam(name = "type", value = "咨询类型")
            @RequestParam(value = "type",required = true) String type,
            @ApiParam(name = "status", value = "咨询状态:0全部,1候诊中,2就诊中,3结束")
            @RequestParam(value = "status",required = true) Integer status,
            @ApiParam(name = "start_time", value = "开始时间 YYYY-MM-DD HH:MM:SS")
            @RequestParam(value = "start_time",required = false) String start_time,
            @ApiParam(name = "end_time", value = "结束时间 YYYY-MM-DD HH:MM:SS")
            @RequestParam(value = "end_time",required = false) String end_time,
            @ApiParam(name = "page", value = "第几页")
            @RequestParam(value = "page",required = false) int page,
            @ApiParam(name = "pagesize", value = "分页大小")
            @RequestParam(value = "pagesize",required = false) int pagesize
    )throws Exception{
        try {
            List<Map<String,Object>>  data = imService.findConsultRecordByDoctorNew(doctor, id,type,status, page,pagesize, title,start_time,end_time,patient);
            if (data != null) {
                for(Map<String,Object> consult :data){
                    //如果是协同门诊,多返回全科医生的详细信息
                    if(12 == Integer.parseInt(consult.get("type").toString()) && StringUtils.isNoneBlank((String)consult.get("generalDoctor"))){
                        BaseDoctorDO baseDoctorDO = baseDoctorDao.findByIdAndDel((String)consult.get("generalDoctor"));
                        List<BaseDoctorHospitalDO> baseDoctorHospitalDOList = baseDoctorHospitalDao.findByDoctorCode((String)consult.get("generalDoctor"));
                        if(baseDoctorDO!=null){
                            consult.put("generalDoctorName", baseDoctorDO.getName());
                        }
                        if (baseDoctorHospitalDOList!=null&&baseDoctorHospitalDOList.size()!=0){
                            BaseDoctorHospitalDO baseDoctorHospitalDO = baseDoctorHospitalDOList.get(0);
                            consult.put("generalOrgName",baseDoctorHospitalDO.getOrgName());
                            consult.put("generalDeptName",baseDoctorHospitalDO.getDeptName());
                        }
                    }
                }
            }
            Long total = imService.countConsultRecordByDoctor2(doctor, id,type,status,title,start_time,end_time);
            JSONObject result = new JSONObject();
            result.put("total",total);
            result.put("list",data);
            return success(result);
        } catch (Exception e){
            return failedException(e);
        }
    }
}

+ 10 - 5
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/service/consult/KnowledgeCategoryService.java

@ -53,12 +53,17 @@ public class KnowledgeCategoryService extends BaseJpaService<KnowledgeCategoryDO
	
	@Transactional
	public Boolean updateDel(String code) {
		List<KnowledgeArticleDO> byCategory = articleDao.findByCategory(code);
		if (null != byCategory && byCategory.size() > 0) {
			return false;
		try {
			List<KnowledgeArticleDO> byCategory = articleDao.findByCategory(code);
			if (null != byCategory && byCategory.size() > 0) {
				return false;
			}
			knowledgeCategoryDao.updateDel(code);
			return true;
		} catch (Exception e) {
			e.printStackTrace();
		}
		knowledgeCategoryDao.updateDel(code);
		return true;
		return false;
	}
	public MixEnvelop findAllGroup(){
		String sqlPid = "select id as \"id\",name as \"name\",pid as \"pid\" from wlyy_knowledge_category  where pid = '0' and del = 1";

+ 8 - 5
svr/svr-internet-hospital/src/main/resources/application.yml

@ -25,7 +25,10 @@ spring:
    allow-bean-definition-overriding: true
  #      location: D:/work/soft_dev/IdeaWorkSpace/wlyy2.0/svr/svr-patient/temp_file/
  #      resolve-lazily: true
  servlet:
    multipart:
      max-file-size: 60MB
      max-request-size: 60MB
  redis:
    database: 0 # Database index used by the connection factory.
    password: # Login password of the redis server.
@ -1527,12 +1530,12 @@ es:
    Statistics: hlw_quota_test
#  host:  http://172.26.0.55:9000
#  tHost: 172.26.0.55:9300
  host: http://172.26.0.112:9200
  tHost: http://172.26.0.112:9200
  host: http://172.26.0.168:9200
  tHost: http://172.26.0.168:9200
  clusterName: jkzl
  securityUser: lion:jkzlehr
  user: lion
  password: jkzlehr
  user: elastic
  password: elastic
# 上传文件临时路径配置
FileTempPath: