Browse Source

心脏修改

wangjun 3 years ago
parent
commit
6b43d9978b
16 changed files with 392 additions and 50 deletions
  1. 8 0
      business/base-service/src/main/java/com/yihu/jw/doctor/service/BaseDoctorInfoService.java
  2. 5 4
      business/base-service/src/main/java/com/yihu/jw/hospital/dict/WlyyChargeDictDao.java
  3. 9 0
      business/base-service/src/main/java/com/yihu/jw/hospital/httplog/dao/BaseOperateLogDao.java
  4. 126 0
      business/base-service/src/main/java/com/yihu/jw/hospital/httplog/service/BaseOperateLogService.java
  5. 24 6
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/PrescriptionService.java
  6. 16 9
      business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/XzzxEntranceService.java
  7. 10 1
      business/base-service/src/main/java/com/yihu/jw/wlyy/service/WlyyBusinessService.java
  8. 8 0
      common/common-entity/src/main/java/com/yihu/jw/entity/hospital/dict/WlyyChargeDictDO.java
  9. 106 0
      common/common-entity/src/main/java/com/yihu/jw/entity/hospital/httplog/BaseOperateLogDO.java
  10. 26 22
      gateway/ag-basic/src/main/java/com/yihu/jw/gateway/filter/PostFilter.java
  11. 4 2
      svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/XzzxCotroller.java
  12. 11 1
      svr/svr-internet-hospital-entrance/src/main/resources/application.yml
  13. 9 2
      svr/svr-internet-hospital-job/src/main/resources/application.yml
  14. 15 0
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/patient/PatientNoLoginEndPoint.java
  15. 5 3
      svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java
  16. 10 0
      svr/svr-internet-hospital/src/main/resources/application.yml

+ 8 - 0
business/base-service/src/main/java/com/yihu/jw/doctor/service/BaseDoctorInfoService.java

@ -599,4 +599,12 @@ public class BaseDoctorInfoService extends BaseJpaService<BaseDoctorDO, BaseDoct
        List<WlyyChargeDictDO> wlyyChargeDictDOS =  wlyyChargeDictDao.findByDeptTypeCode("6");
        return wlyyChargeDictDOS;
    }
    public void deleteChargeDict(String id,String del){
        WlyyChargeDictDO wlyyChargeDictDO =  wlyyChargeDictDao.findOne(id);
        if (wlyyChargeDictDO!=null){
            wlyyChargeDictDO.setIsDel(del);
            wlyyChargeDictDao.save(wlyyChargeDictDO);
        }
    }
}

+ 5 - 4
business/base-service/src/main/java/com/yihu/jw/hospital/dict/WlyyChargeDictDao.java

@ -13,14 +13,15 @@ import java.util.List;
 */
@Transactional
public interface WlyyChargeDictDao extends PagingAndSortingRepository<WlyyChargeDictDO, String>, JpaSpecificationExecutor<WlyyChargeDictDO> {
    @Query("from WlyyChargeDictDO t where t.deptTypeCode=?1 and t.isDel='1'")
    List<WlyyChargeDictDO>  findByDeptTypeCode(String deptTypeCode);
    @Query("from WlyyChargeDictDO d where 1=1 ")
    @Query("from WlyyChargeDictDO d where 1=1 and d.isDel='1'")
    List<WlyyChargeDictDO>  findAllDict();
    @Query("from WlyyChargeDictDO t where t.chargeType=?1 and t.deptTypeCode=?2 and t.isDel='1'")
    WlyyChargeDictDO  findByChargeTypeAndDeptTypeCode(String chargeType,String deptTypeCode);
    @Query("from WlyyChargeDictDO t where t.chargeType=?1  and t.isDel='1'")
    WlyyChargeDictDO  findByChargeType(String chargeType);
    @Query("from WlyyChargeDictDO d where d.reqFee = ?1 ")
    @Query("from WlyyChargeDictDO d where d.reqFee = ?1 and d.isDel='1' ")
    WlyyChargeDictDO  findByReqFee(Double reqFee);
}

+ 9 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/httplog/dao/BaseOperateLogDao.java

@ -0,0 +1,9 @@
package com.yihu.jw.hospital.httplog.dao;
import com.yihu.jw.entity.hospital.httplog.BaseOperateLogDO;
import com.yihu.jw.entity.hospital.httplog.WlyyHttpLogDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
public interface BaseOperateLogDao extends PagingAndSortingRepository<BaseOperateLogDO, String>, JpaSpecificationExecutor<BaseOperateLogDO> {
}

+ 126 - 0
business/base-service/src/main/java/com/yihu/jw/hospital/httplog/service/BaseOperateLogService.java

@ -0,0 +1,126 @@
package com.yihu.jw.hospital.httplog.service;
import com.yihu.jw.doctor.dao.BaseDoctorDao;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.hospital.httplog.BaseOperateLogDO;
import com.yihu.jw.entity.hospital.httplog.WlyyHttpLogDO;
import com.yihu.jw.hospital.httplog.dao.BaseOperateLogDao;
import com.yihu.jw.hospital.httplog.dao.WlyyHttpLogDao;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.utils.hibernate.HibenateUtils;
import com.yihu.mysql.query.BaseJpaService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
import java.util.Map;
@Service
public class BaseOperateLogService extends BaseJpaService<BaseOperateLogDO, BaseOperateLogDao> {
    @Autowired
    private BaseOperateLogDao baseOperateLogDao;
    @Autowired
    private BasePatientDao basePatientDao;
    @Autowired
    private BaseDoctorDao baseDoctorDao;
    @Autowired
    private HibenateUtils hibenateUtils;
    @Value("${wechat.id}")
    private String wxId;
    @Value("${wechat.flag}")
    private boolean flag;
    public void saveOperateLog(String operator,String patient,String code,String name,String relationType,String relationCode){
        BaseOperateLogDO baseOperateLogDO=new BaseOperateLogDO();
        BaseDoctorDO baseDoctorDO=baseDoctorDao.findById(operator);
        baseOperateLogDO.setOperator(operator);
        baseOperateLogDO.setPatientName(patient);
        baseOperateLogDO.setCode(code);
        baseOperateLogDO.setName(name);
        baseOperateLogDO.setRelationType(relationType);
        baseOperateLogDO.setCreateTime(new Date());
        baseOperateLogDO.setIsDel("1");
        if (baseDoctorDO!=null){
            baseOperateLogDO.setOperatorName(baseDoctorDO.getName());
        }
        BasePatientDO basePatientDO=basePatientDao.findById(patient);
        if (basePatientDO!=null){
            baseOperateLogDO.setPatientName(basePatientDO.getName());
        }
        baseOperateLogDao.save(baseOperateLogDO);
    }
    public MixEnvelop  findOperateLogList(String code,String name,String patientName,String doctorName,String startTime,String endTime,Integer page,Integer pageSize){
        MixEnvelop mixEnvelop = new MixEnvelop();
        String sql ="select t.id as \"id\"," +
                " t.code as \"code\"," +
                " t.name as \"name\"," +
                " t.operator as \"operator\"," +
                " t.operator_name as \"operator_name\"," +
                " t.patient as \"patient\"," +
                " t.patient_name as \"patient_name\"," ;
        if("xm_ykyy_wx".equals(wxId)){
            if (flag){
                sql+="date_format(t.create_time, '%Y-%m-%d %H:%i:%s')  as \"createTime\",";
            }else {
                sql+="  to_char(t.create_time,'yyyy-MM-dd HH24:mi:ss') as \"createTime\",";
            }
        }else{
            sql+="date_format(t.create_time, '%Y-%m-%d %H:%i:%s')  as \"createTime\",";
        }
        sql+= " t.relation_type as \"relation_type\"," +
                " t.relation_code as \"relation_code\"" +
                " from base_operate_log t where t.is_del='1'";
        if (StringUtils.isNoneBlank(code)){
            sql+=" and t.code='"+code+"'";
        }
        if (StringUtils.isNoneBlank(name)){
            sql+=" and t.name like '%"+name+"&'";
        }
        if (StringUtils.isNoneBlank(patientName)){
            sql+=" and t.patient_name like '%"+patientName+"&'";
        }
        if (StringUtils.isNoneBlank(doctorName)){
            sql+=" and t.operator_name like '%"+doctorName+"&'";
        }
        if (StringUtils.isNotBlank(startTime)){
            if("xm_ykyy_wx".equals(wxId)){
                if (flag){
                    sql+=" and t.create_time > '"+startTime+"'";
                }else {
                    sql+=" and t.create_time > to_date('" + startTime + "', 'yyyy-mm-dd hh24:mi:ss') ";
                }
            }else{
                sql+=" and t.create_time > '"+startTime+"'";
            }
        }
        if (StringUtils.isNotBlank(endTime)){
            if("xm_ykyy_wx".equals(wxId)){
                if (flag){
                    sql+="  and t.create_time<='" + endTime + "'";
                }else {
                    sql+="  and t.create_time<= to_date('" + endTime + "','yyyy-mm-dd hh24:mi:ss')";
                }
            }else{
                sql+="  and t.create_time<='" + endTime + "'";
            }
        }
        sql+=" order by t.create_time desc ";
        List<Map<String,Object>> list = hibenateUtils.createSQLQuery(sql,page,pageSize);
        String sqlcount = "SELECT COUNT(1) AS \"total\" FROM ("+sql+") q";
        Long count = 0L;
        List<Map<String,Object>> total = hibenateUtils.createSQLQuery(sqlcount);
        if(total!=null){
            //mysql 与 Oracle 聚合函数返回类型不一致,需要判断装换
            count = hibenateUtils.objTransformLong(total.get(0).get("total"));
        }
        mixEnvelop.setTotalCount(count.intValue());
        mixEnvelop.setDetailModelList(list);
        mixEnvelop.setPageSize(pageSize);
        mixEnvelop.setCurrPage(page);
        return mixEnvelop;
    }
}

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

@ -60,6 +60,7 @@ import com.yihu.jw.hospital.doctor.dao.PatientRegisterTimeDao;
import com.yihu.jw.hospital.doctor.dao.WlyyDoctorOnlineTimeDao;
import com.yihu.jw.hospital.drugstore.dao.BaseDrugStoreDao;
import com.yihu.jw.hospital.httplog.dao.WlyyHttpLogDao;
import com.yihu.jw.hospital.httplog.service.BaseOperateLogService;
import com.yihu.jw.hospital.mapping.dao.DoctorMappingDao;
import com.yihu.jw.hospital.mapping.dao.PatientMappingDao;
import com.yihu.jw.hospital.mapping.service.DoctorMappingService;
@ -309,10 +310,12 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    private TnyyEntranceService tnyyEntranceService;
    @Autowired
    private BaseJpushTemplateDao baseJpushTemplateDao;
    @Autowired
    HikariDataSource dataSource;
    /*@Autowired
    HikariDataSource dataSource;*/
    @Autowired
    private BaseSensitiveDao baseSensitiveDao;
    @Autowired
    private BaseOperateLogService baseOperateLogService;
    @Value("${demo.flag}")
    private boolean demoFlag;
@ -4393,6 +4396,15 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                contentMsg = "您发起的视频咨询已被"+outpatientDO.getDoctorName()+"接诊,请留意医生发送的消息。";
                first = outpatientDO.getConsumerName() + ",您好!您发起的视频咨询,医生已接诊";
            }
            if ("12".equals(type)) {
                contentMsg = "您发起的专科协同已被"+outpatientDO.getDoctorName()+"接诊,请留意医生发送的消息。";
                first = outpatientDO.getConsumerName() + ",您好!您发起的专科协同,医生已接诊";
                return;
            }
            if ("15".equals(type)) {
                contentMsg = "您发起的家医咨询已被"+outpatientDO.getDoctorName()+"接诊,请留意医生发送的消息。";
                first = outpatientDO.getConsumerName() + ",您好!您发起的家医咨询,医生已接诊";
            }
            logger.info("doctorPick诊查费支付成功推送模板消息:outpatientId="+outpatientId);
            msgUrl="/ims-wx/index.html#/returnVisit/record?outpatientId="+outpatientId;
        } else if("doctorRefund".equalsIgnoreCase(titelType)) {
@ -5702,7 +5714,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        if (pagesize <= 0) {
            pagesize = 10;
        }*/
        testHikar();
        //testHikar();
        long statr = new Date().getTime();
        String sql = "SELECT " +
                " d.id AS \"id\", " +
@ -9547,7 +9559,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
     * @return
     * @throws Exception
     */
    public net.sf.json.JSON outpatient(String patient) throws Exception {
    public net.sf.json.JSON outpatient(String patient,String doctorId) throws Exception {
        PatientMappingDO mappingDO = patientMappingDao.findByPatient(patient);
        String url = "";
        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = hospitalSysDictDao.findById("HAI_TAI_OUTPATIENT_URL");
@ -9571,6 +9583,12 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
        XMLSerializer xmlSerializer = new XMLSerializer();
        net.sf.json.JSON json = xmlSerializer.read(returnValue);
        logger.info("返回json" + json);
        try {
            baseOperateLogService.saveOperateLog(doctorId,patient,"EMR","查询电子病历","","");
        }catch (Exception e){
            e.printStackTrace();
        }
        return json;
    }
@ -12627,7 +12645,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
    }
    public void testHikar(){
    /*public void testHikar(){
        try{
            MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();
            ObjectName poolName = new ObjectName("com.zaxxer.hikari:type=Pool (" + dataSource.getPoolName() + ")");
@ -12645,7 +12663,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
            e.printStackTrace();
        }
    }
    }*/
    public String findDomainUrlInDict(){
        try {
            WlyyHospitalSysDictDO wlyyHospitalSysDictDO = wlyyHospitalSysDictDao.findById("domainUrl");

+ 16 - 9
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/XzzxEntranceService.java

@ -132,7 +132,8 @@ public class XzzxEntranceService{
    private static String key="bvvsf3JA0mUXMU+mVnMaOQ==";
    //发送微信模板消息
    public static String sendMessageUrl ="http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage";
    /*@Value("${wechat.url}")*/
    private String sendMessageUrl="http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage";
    public static String entranceUrl = "http://172.16.100.240:10023/xzzx/";
    public static String entranceUrlLocal = "http://localhost:10023/xzzx/";
@ -1162,7 +1163,7 @@ public class XzzxEntranceService{
     * @return
     * @throws Exception
     */
    public String GetDrugDict(String spellCode)throws Exception{
    public String GetDrugDict(String spellCode,String drugNo)throws Exception{
        String api = "GetDrugDict";
        String msgHeader ="<?xml version=\"1.0\" encoding=\"utf-8\"?> " +
                "<root> " +
@ -1172,9 +1173,12 @@ public class XzzxEntranceService{
                "   <certificate>"+key+"</certificate> " +
                "</root>";
        String condition ="";
        if (!StringUtils.isEmpty(spellCode)){
        if (!StringUtils.isEmpty(spellCode)&&!"null".equalsIgnoreCase(spellCode)){
            condition += "<spell_code>"+spellCode+"</spell_code>";
        }
        if (!StringUtils.isEmpty(drugNo)&&!"null".equalsIgnoreCase(drugNo)){
            condition += "<physic_code>"+drugNo+"</physic_code>";
        }
        String msgBody ="<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
                "<root>"+condition+"</root>";
@ -3057,9 +3061,9 @@ public class XzzxEntranceService{
     * @param spellCode 拼音码
     * @return
     */
    public JSONArray selectDrugDict(String spellCode) throws Exception {
    public JSONArray selectDrugDict(String spellCode,String drugNo) throws Exception {
        String response="";
        String url = entranceUrl+"getDrugDict?spellCode="+spellCode;
        String url = entranceUrl+"getDrugDict?spellCode="+spellCode+"&drugNo="+drugNo;
        response = httpClientUtil.get(url,"GBK");
        JSONObject object = JSONObject.parseObject(response);
        JSONArray jsonArray = new JSONArray();
@ -3080,7 +3084,7 @@ public class XzzxEntranceService{
                object1.put("pack_size",jsonObject.getString("PACK_SPEC"));
                object1.put("retprice",jsonObject.getString("RETAIL_PRICE"));
                object1.put("specification",jsonObject.getString("PHYSIC_SPEC"));
                object1.put("pack_retprice",jsonObject.getString(" "));
                object1.put("pack_retprice",jsonObject.getString("RETAIL_PRICE"));
                object1.put("stock_amount",jsonObject.getString("QUANTITY"));
                object1.put("visible_flag",jsonObject.getString("VALID_FLAG"));
                object1.put("drug_flag",jsonObject.getString("OTC_FLAG"));
@ -3091,9 +3095,12 @@ public class XzzxEntranceService{
                object1.put("vol_unit","");
                object1.put("mini_unit_name",jsonObject.getString("PHYSIC_UNIT"));
                DecimalFormat df =new DecimalFormat("0.00");
                Double packSize=Double.parseDouble(jsonObject.get("PACK_SPEC")==null?"1":jsonObject.getString("PACK_SPEC"));
                Double retprice=Double.parseDouble(jsonObject.get("RETAIL_PRICE")==null?"0":jsonObject.getString("RETAIL_PRICE"));
                Double miniUnitPrice=retprice/packSize;
                Double packSize=Double.parseDouble(jsonObject.get("PACK_SPEC").toString().equals("[]")?"1":jsonObject.getString("PACK_SPEC"));
                Double retprice=Double.parseDouble(jsonObject.get("RETAIL_PRICE").toString().equals("[]")?"0":jsonObject.getString("RETAIL_PRICE"));
                Double miniUnitPrice=0.00;
                if (0.00!=packSize){
                    miniUnitPrice=retprice/packSize;
                }
                object1.put("mini_unit_price",df.format(miniUnitPrice));
                object1.put("pack_unit_name",jsonObject.getString("PRICE_UNIT"));
                object1.put("weigh_unit_name",jsonObject.getString("DOSE_UNIT"));

+ 10 - 1
business/base-service/src/main/java/com/yihu/jw/wlyy/service/WlyyBusinessService.java

@ -17,6 +17,8 @@ import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.base.patient.PatientMedicareCardDO;
import com.yihu.jw.entity.hospital.mapping.DoctorMappingDO;
import com.yihu.jw.entity.hospital.prescription.WlyyOutpatientDO;
import com.yihu.jw.hospital.httplog.dao.BaseOperateLogDao;
import com.yihu.jw.hospital.httplog.service.BaseOperateLogService;
import com.yihu.jw.hospital.mapping.dao.DoctorMappingDao;
import com.yihu.jw.hospital.prescription.dao.OutpatientDao;
import com.yihu.jw.hospital.prescription.service.PrescriptionService;
@ -86,6 +88,8 @@ public class WlyyBusinessService {
    private BasePatientMedicareCardDao patientMedicareCardDao;
    @Autowired
    private XzzxEntranceService xzzxEntranceService;
    @Autowired
    private BaseOperateLogService baseOperateLogService;
    /**
@ -275,7 +279,7 @@ public class WlyyBusinessService {
     * @return
     * @throws Exception
     */
    public String wlyyGetPatientAccetokenByIdcard(String patientId,String wxId) throws Exception {
    public String wlyyGetPatientAccetokenByIdcard(String patientId,String wxId,String doctorId) throws Exception {
        
        String idcard = "";
        String result = "";
@ -396,6 +400,11 @@ public class WlyyBusinessService {
                    throw new Exception("请求i健康接口失败");
                }
            }
            try {
                baseOperateLogService.saveOperateLog(doctorId,patientId,"JKDA","查询健康档案","","");
            }catch (Exception e){
                e.printStackTrace();
            }
        }else {
            throw new Exception("该居民不存在");
        }

+ 8 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/dict/WlyyChargeDictDO.java

@ -22,7 +22,15 @@ public class WlyyChargeDictDO extends UuidIdentityEntity {
    private Date createTime;
    /**6总部7金榜8夏禾*/
    private String deptTypeCode;
    private String isDel;
    public String getIsDel() {
        return isDel;
    }
    public void setIsDel(String isDel) {
        this.isDel = isDel;
    }
    public String getChargeType() {
        return chargeType;

+ 106 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/hospital/httplog/BaseOperateLogDO.java

@ -0,0 +1,106 @@
package com.yihu.jw.entity.hospital.httplog;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
@Entity
@Table(name = "wlyy_http_log")
public class BaseOperateLogDO extends UuidIdentityEntity {
    private String code;
    private String name;
    private String operator;
    private String operatorName;
    private String patient;
    private String patientName;
    private Date createTime;
    private String relationType;
    private String relationCode;
    private String isDel;
    @Column(name = "code")
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    @Column(name = "name")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    @Column(name = "operator")
    public String getOperator() {
        return operator;
    }
    public void setOperator(String operator) {
        this.operator = operator;
    }
    @Column(name = "operator_name")
    public String getOperatorName() {
        return operatorName;
    }
    public void setOperatorName(String operatorName) {
        this.operatorName = operatorName;
    }
    @Column(name = "patient")
    public String getPatient() {
        return patient;
    }
    public void setPatient(String patient) {
        this.patient = patient;
    }
    @Column(name = "patient_name")
    public String getPatientName() {
        return patientName;
    }
    public void setPatientName(String patientName) {
        this.patientName = patientName;
    }
    @Column(name = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    @Column(name = "relation_type")
    public String getRelationType() {
        return relationType;
    }
    public void setRelationType(String relationType) {
        this.relationType = relationType;
    }
    @Column(name = "relation_code")
    public String getRelationCode() {
        return relationCode;
    }
    public void setRelationCode(String relationCode) {
        this.relationCode = relationCode;
    }
    @Column(name = "is_del")
    public String getIsDel() {
        return isDel;
    }
    public void setIsDel(String isDel) {
        this.isDel = isDel;
    }
}

+ 26 - 22
gateway/ag-basic/src/main/java/com/yihu/jw/gateway/filter/PostFilter.java

@ -83,31 +83,35 @@ public class PostFilter extends ZuulFilter {
                break;
            }
        }
        net.sf.json.JSONObject jsonObject = net.sf.json.JSONObject.fromObject(body);
        String status =jsonObject.getString("status");
        if (!"200".equalsIgnoreCase(status)){
            jsonObject.put("status",serviceId+status);
            BaseExceptionLogDO baseExceptionLogDO = new BaseExceptionLogDO();
            baseExceptionLogDO.setCreateTime(new Date());
            List<Map<String,Object>> list = baseExceptionService.findExceptionDict("",status,"","1");
            if (list!=null&&list.size()>0){
                responseCode=serviceId+list.get(0).get("code").toString();
                exceptionType = list.get(0).get("exceptionType").toString();
                baseExceptionLogDO.setExceptionType(exceptionType);
                baseExceptionLogDO.setServiceCode(serviceId);
                baseExceptionLogDO.setExceptionCode(responseCode);
                try {
                    String  in = ctx.getRequest().getParameter("object");
                    String jsonobject = AesEncryptUtils.decrypt(in);
                    baseExceptionLogDO.setRequest(jsonobject);
                    baseExceptionLogDO.setResponse(jsonObject.toString());
                    baseExceptionLogDao.save(baseExceptionLogDO);
                }catch (Exception s){
                    s.printStackTrace();
        try {
            net.sf.json.JSONObject jsonObject = net.sf.json.JSONObject.fromObject(body);
            String status =jsonObject.getString("status");
            if (!"200".equalsIgnoreCase(status)){
                jsonObject.put("status",serviceId+status);
                BaseExceptionLogDO baseExceptionLogDO = new BaseExceptionLogDO();
                baseExceptionLogDO.setCreateTime(new Date());
                List<Map<String,Object>> list = baseExceptionService.findExceptionDict("",status,"","1");
                if (list!=null&&list.size()>0){
                    responseCode=serviceId+list.get(0).get("code").toString();
                    exceptionType = list.get(0).get("exceptionType").toString();
                    baseExceptionLogDO.setExceptionType(exceptionType);
                    baseExceptionLogDO.setServiceCode(serviceId);
                    baseExceptionLogDO.setExceptionCode(responseCode);
                    try {
                        String  in = ctx.getRequest().getParameter("object");
                        String jsonobject = AesEncryptUtils.decrypt(in);
                        baseExceptionLogDO.setRequest(jsonobject);
                        baseExceptionLogDO.setResponse(jsonObject.toString());
                        baseExceptionLogDao.save(baseExceptionLogDO);
                    }catch (Exception s){
                        s.printStackTrace();
                    }
                }
            }
        }catch (Exception e){
            e.printStackTrace();
        }
        JSONObject object = new JSONObject();
        object.put("status","200");
        object.put("data", AesEncryptUtils.encrypt(body));

+ 4 - 2
svr/svr-internet-hospital-entrance/src/main/java/com/yihu/jw/entrance/controller/XzzxCotroller.java

@ -337,8 +337,10 @@ public class XzzxCotroller extends EnvelopRestEndpoint {
    @GetMapping(value = "/getDrugDict")
    @ApiOperation(value = "获取药品字典", notes = "获取药品字典")
    public ObjEnvelop getDrugDict(@ApiParam(name = "spellCode", value = "拼音码", required = false)
                                   @RequestParam(value = "spellCode",required = false)String spellCode)throws Exception{
        return ObjEnvelop.getSuccess("ok",xzzxEntranceService.GetDrugDict(spellCode));
                                   @RequestParam(value = "spellCode",required = false)String spellCode,
                                  @ApiParam(name = "drugNo", value = "药品编码", required = false)
                                  @RequestParam(value = "drugNo",required = false)String drugNo)throws Exception{
        return ObjEnvelop.getSuccess("ok",xzzxEntranceService.GetDrugDict(spellCode,drugNo));
    }

+ 11 - 1
svr/svr-internet-hospital-entrance/src/main/resources/application.yml

@ -34,7 +34,8 @@ spring:
      max-wait: -1  # 连接池最大阻塞等待时间(使用负值表示没有限制)
      max-idle: 20  # 连接池中的最大空闲连接
      min-idle: 5  # 连接池中的最小空闲连接
  application:
    name: svr-internet-hospital-entrance
fast-dfs:
#  tracker-server: 172.26.0.110:22122 #服务器地址
  connect-timeout: 2 #链接超时时间
@ -140,6 +141,7 @@ wlyy:
wechat:
  id: d24d1367-7f4f-43af-910e-a0a43799e040  # base库中,wx_wechat 的id字段  # todo 待配置
  flag: false #演示环境  true走Mysql数据库  false走Oracle
  url: http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
@ -179,6 +181,7 @@ wlyy:
wechat:
  id: xm_zsyy_wx  # base库中,wx_wechat 的id字段
  flag: false #演示环境  true走Mysql数据库  false走Oracle
  url: http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage
express:
  sf_url: https://mrds-admin.sf-express.com:443
  sf_code: WH000102
@ -228,6 +231,7 @@ wlyy:
wechat:
  id: d24d1367-7f4f-43af-910e-a0a43799e040  # base库中,wx_wechat 的id字段  # todo 待配置
  flag: false #演示环境  true走Mysql数据库  false走Oracle
  url: http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
@ -277,6 +281,7 @@ wlyy:
wechat:
  id: xm_ykyy_wx  # base库中,wx_wechat 的id字段
  flag: false #演示环境  true走Mysql数据库  false走Oracle
  url: http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: WH000091
@ -326,6 +331,7 @@ wlyy:
wechat:
  id: xm_ykyy_wx  # base库中,wx_wechat 的id字段
  flag: false #演示环境  true走Mysql数据库  false走Oracle
  url: http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: WH000091
@ -368,6 +374,7 @@ wlyy:
wechat:
  id: xm_xzzx_wx  # base库中,wx_wechat 的id字段
  flag: false #演示环境  true走Mysql数据库  false走Oracle
  url: http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: WH000061
@ -412,6 +419,7 @@ wlyy:
wechat:
  id: xm_ykyy_wx  # base库中,wx_wechat 的id字段  # todo 待配置
  flag: false #演示环境  true走Mysql数据库  false走Oracle
  url: http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
@ -463,6 +471,7 @@ wlyy:
wechat:
  id: xm_ykyy_wx  # base库中,wx_wechat 的id字段
  flag: false #演示环境  true走Mysql数据库  false走Oracle
  url: http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: WH000091
@ -512,6 +521,7 @@ wlyy:
wechat:
  id: xm_ykyy_wx  # base库中,wx_wechat 的id字段
  flag: false #演示环境  true走Mysql数据库  false走Oracle
  url: http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: WH000091

+ 9 - 2
svr/svr-internet-hospital-job/src/main/resources/application.yml

@ -7,7 +7,7 @@ spring:
    driver-class-name: com.mysql.jdbc.Driver
    max-active: 50
    max-idle: 50 #最大空闲连接
    min-idle: 10 #最小空闲连接
    min-idle: 10 #最小空闲连接p
    validation-query-timeout: 20
    log-validation-errors: true
    validation-interval: 60000 #避免过度验证,保证验证不超过这个频率——以毫秒为单位。如果一个连接应该被验证,但上次验证未达到指定间隔,将不再次验证。
@ -20,7 +20,8 @@ spring:
    test-while-idle: true #指明连接是否被空闲连接回收器(如果有)进行检验,如果检测失败,则连接将被从池中去除
    min-evictable-idle-time-millis: 3600000 #连接池中连接,在时间段内一直空闲,被逐出连接池的时间(1000*60*60),以毫秒为单位
    time-between-eviction-runs-millis: 300000 #在空闲连接回收器线程运行期间休眠的时间值,以毫秒为单位,一般比minEvictableIdleTimeMillis小
  application:
    name: svr-internet-hospital-job
fast-dfs:
  tracker-server: 172.26.0.110:22122 #服务器地址
  connect-timeout: 2 #链接超时时间
@ -88,6 +89,7 @@ fastDFS:
wechat:
  id: d24d1367-7f4f-43af-910e-a0a43799e040  # base库中,wx_wechat 的id字段
  flag: false #演示环境  true走Mysql数据库  false走Oracle
  url: http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
@ -126,6 +128,7 @@ wechat:
  id: xm_ykyy_wx  # base库中,wx_wechat 的id字段
  flag: false #演示环境  true走Mysql数据库  false走Oracle
  ids: xm_zsyy_wx
  url: http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
@ -216,6 +219,7 @@ wechat:
  id: xm_ykyy_wx  # base库中,wx_wechat 的id字段
  ids: xm_ykyy_wx
  flag: false #演示环境  true走Mysql数据库  false走Oracle
  url: http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: JKZL
@ -296,6 +300,7 @@ wechat:
  id: d24d1367-7f4f-43af-910e-a0a43799e040  # base库中,wx_wechat 的id字段
  flag: false #演示环境  true走Mysql数据库  false走Oracle
  ids: xm_xzzx_wx
  url: http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code:
@ -336,6 +341,7 @@ wechat:
  id: d24d1367-7f4f-43af-910e-a0a43799e040  # base库中,wx_wechat 的id字段
  flag: false #演示环境  true走Mysql数据库  false走Oracle
  ids: xm_xzzx_wx
  url: http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code:
@ -375,6 +381,7 @@ wechat:
  id: d24d1367-7f4f-43af-910e-a0a43799e040  # base库中,wx_wechat 的id字段
  flag: false #演示环境  true走Mysql数据库  false走Oracle
  ids: sd_tnzyy_wx
  url: http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage
express:
  sf_url: http://bsp-oisp.sf-express.com/bsp-oisp/sfexpressService
  sf_code: WH000091

+ 15 - 0
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/patient/PatientNoLoginEndPoint.java

@ -1509,6 +1509,21 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
            return failedListEnvelopException(e);
        }
    }
    @GetMapping("/deleteChargeDict")
    @ApiOperation(value = "删除基础号别字典", notes = "删除基础号别字典")
    public Envelop deleteChargeDict(@ApiParam(name = "id", value = "id")
                                            @RequestParam(value = "id", required = true)String id,
                                        @ApiParam(name = "del", value = "1正常0删除")
                                            @RequestParam(value = "del", required = false)String del) throws Exception{
        try {
            baseDoctorService.deleteChargeDict(id,del);
            return success("操作成功");
        } catch (Exception e) {
            return failedException(e);
        }
    }
    @GetMapping(value = BaseHospitalRequestMapping.PatientNoLogin.findWorkDoctorCount)
    @ApiOperation(value = "查询医生排版数量", notes = "查询医生排版数量")
    public ObjEnvelop<JSONObject> findWorkDoctorCount(

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

@ -572,7 +572,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
        if (wxId.equalsIgnoreCase("xm_zsyy_wx")){
            return success(prescriptionService.getDrugDictionary(drugNo,pyKey,winNo,groupNo));
        }else if (wxId.equalsIgnoreCase("xm_xzzx_wx")){
            return success(xzzxEntranceService.selectDrugDict(pyKey));
            return success(xzzxEntranceService.selectDrugDict(pyKey,drugNo));
        }else if (wxId.equalsIgnoreCase("sd_tnzyy_wx")){
            return success(tnPrescriptionService.getDrugDictionary(drugNo,pyKey,null,groupNo,null));
        }else {
@ -1551,7 +1551,8 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
        if (StringUtils.isNoneBlank(wxid)){
            wxId = wxid;
        }
        return success(wlyyBusinessService.wlyyGetPatientAccetokenByIdcard(patientCode,wxId));
        String doctorId=getUID();
        return success(wlyyBusinessService.wlyyGetPatientAccetokenByIdcard(patientCode,wxId,doctorId));
    }
    
    @GetMapping(value = BaseHospitalRequestMapping.Prescription.findWlyyPatient)
@ -2306,10 +2307,11 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
            @ApiParam(name = "patient", value = "patient", required = true)
            @RequestParam(required = true)String patient) throws Exception {
        try {
            String doctorId=getUID();
            if (wxId.equalsIgnoreCase("xm_xzzx_wx")){
                return ObjEnvelop.getSuccess("ok",xzzxEntranceService.selectHistoryEmrFromEntrance(patient,null));
            }else {
                return ObjEnvelop.getSuccess("ok",prescriptionService.outpatient(patient));
                return ObjEnvelop.getSuccess("ok",prescriptionService.outpatient(patient,doctorId));
            }
        } catch (Exception e) {

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

@ -113,6 +113,7 @@ myFamily:
wechat:
  id: xm_zsyy_wx  # base库中,wx_wechat 的id字段
  flag: false #演示环境  true走Mysql数据库  false走Oracle
  url: http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage
# 短信验证码发送的客户端标识,居民端
sms:
  clientId: EwC0iRSrcP
@ -189,6 +190,7 @@ fast-dfs:
wechat:
  id: xm_ykyy_wx  # base库中,wx_wechat 的id字段
  flag: false #演示环境  true走Mysql数据库  false走Oracle
  url: http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage
# 短信验证码发送的客户端标识,居民端
sms:
  clientId: EwC0iRSrcP
@ -275,6 +277,7 @@ fast-dfs:
wechat:
  id: xm_zsyy_wx  # base库中,wx_wechat 的id字段  # todo 待配置
  flag: false #演示环境  true走Mysql数据库  false走Oracle
  url: http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage
# 短信验证码发送的客户端标识,居民端
sms:
  clientId: EwC0iRSrcP #todo 待配置
@ -370,6 +373,7 @@ fast-dfs:
wechat:
  id: xm_ykyy_wx  # base库中,wx_wechat 的id字段
  flag: false #演示环境  true走Mysql数据库  false走Oracle
  url: http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage
# 短信验证码发送的客户端标识,居民端
sms:
  clientId: EwC0iRSrcP
@ -461,6 +465,7 @@ fast-dfs:
wechat:
  id: xm_ykyy_wx  # base库中,wx_wechat 的id字段
  flag: false #演示环境  true走Mysql数据库  false走Oracle
  url: http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage
# 短信验证码发送的客户端标识,居民端
sms:
  clientId: EwC0iRSrcP
@ -548,6 +553,7 @@ fast-dfs:
wechat:
  id: d24d1367-7f4f-43af-910e-a0a43799e040  # base库中,wx_wechat 的id字段  # todo 待配置
  flag: false #演示环境  true走Mysql数据库  false走Oracle
  url: http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage
# 短信验证码发送的客户端标识,居民端
sms:
  clientId: EwC0iRSrcP #todo 待配置
@ -632,6 +638,7 @@ fast-dfs:
wechat:
  id: xm_xzzx_wx  # base库中,wx_wechat 的id字段  # todo 待配置
  flag: false #演示环境  true走Mysql数据库  false走Oracle
  url: http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage
# 短信验证码发送的客户端标识,居民端
sms:
  clientId: EwC0iRSrcP #todo 待配置
@ -720,6 +727,7 @@ fast-dfs:
wechat:
  id: d24d1367-7f4f-43af-910e-a0a43799e040  # base库中,wx_wechat 的id字段  # todo 待配置
  flag: false #演示环境  true走Mysql数据库  false走Oracle
  url: http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage
# 短信验证码发送的客户端标识,居民端
sms:
  clientId: EwC0iRSrcP #todo 待配置
@ -807,6 +815,7 @@ fast-dfs:
wechat:
  id: xm_ykyy_wx  # base库中,wx_wechat 的id字段
  flag: true #演示环境  true走Mysql数据库  false走Oracle
  url: http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage
# 短信验证码发送的客户端标识,居民端
sms:
  clientId: EwC0iRSrcP
@ -895,6 +904,7 @@ fast-dfs:
wechat:
  id: sd_tnzyy_wx  # base库中,wx_wechat 的id字段  # todo 待配置
  flag: true #演示环境  true走Mysql数据库  false走Oracle
  url: http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage
# 短信验证码发送的客户端标识,居民端
sms:
  clientId: EwC0iRSrcP #todo 待配置