wangjun %!s(int64=3) %!d(string=hai) anos
pai
achega
929102c27d

+ 8 - 0
business/base-service/src/main/java/com/yihu/jw/dict/dao/BaseExceptionDictDao.java

@ -0,0 +1,8 @@
package com.yihu.jw.dict.dao;
import com.yihu.jw.entity.base.dict.BaseExceptionDictDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
public interface BaseExceptionDictDao  extends PagingAndSortingRepository<BaseExceptionDictDO, String>, JpaSpecificationExecutor<BaseExceptionDictDO> {
}

+ 9 - 0
business/base-service/src/main/java/com/yihu/jw/dict/dao/BaseExceptionLogDao.java

@ -0,0 +1,9 @@
package com.yihu.jw.dict.dao;
import com.yihu.jw.entity.base.dict.BaseExceptionDictDO;
import com.yihu.jw.entity.base.dict.BaseExceptionLogDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
public interface BaseExceptionLogDao extends PagingAndSortingRepository<BaseExceptionLogDO, String>, JpaSpecificationExecutor<BaseExceptionLogDO> {
}

+ 11 - 0
business/base-service/src/main/java/com/yihu/jw/dict/dao/BaseExceptionServerDictDao.java

@ -0,0 +1,11 @@
package com.yihu.jw.dict.dao;
import com.yihu.jw.entity.base.dict.BaseExceptionServerDictDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
public interface BaseExceptionServerDictDao extends PagingAndSortingRepository<BaseExceptionServerDictDO, String>, JpaSpecificationExecutor<BaseExceptionServerDictDO> {
    @Query("from BaseExceptionServerDictDO t where t.isDel='1' and t.path=?1")
    BaseExceptionServerDictDO findServiceByPath(String path);
}

+ 82 - 0
business/base-service/src/main/java/com/yihu/jw/dict/service/BaseExceptionService.java

@ -0,0 +1,82 @@
package com.yihu.jw.dict.service;
import com.yihu.jw.dict.dao.BaseExceptionDictDao;
import com.yihu.jw.dict.dao.BaseExceptionLogDao;
import com.yihu.jw.dict.dao.BaseExceptionServerDictDao;
import com.yihu.jw.entity.base.dict.BaseExceptionServerDictDO;
import com.yihu.jw.utils.hibernate.HibenateUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
@Service
public class BaseExceptionService {
    @Autowired
    private BaseExceptionDictDao baseExceptionDictDao;
    @Autowired
    private BaseExceptionLogDao baseExceptionLogDao;
    @Autowired
    private BaseExceptionServerDictDao baseExceptionServerDictDao;
    @Autowired
    private HibenateUtils hibenateUtils;
    public String findServiceByPath(String path){
        BaseExceptionServerDictDO baseExceptionServerDictDO = baseExceptionServerDictDao.findServiceByPath(path);
        String id ="";
        if (baseExceptionServerDictDO !=null){
            id = baseExceptionServerDictDO.getId();
        }
        return id;
    }
    public List<Map<String,Object>> findExceptionDict(String id,String code,String exceptionType,String isDel){
        String sql = "select t.id as \"id\"," +
                " t.code as \"code\"," +
                " t.exception_message as \"exceptionMessage\"," +
                " t.create_time as \"createTime\"," +
                " t.is_del \"isDel\"," +
                " t.model_name as \"modelName\"," +
                " t.exception_type as \"exceptionType\"," +
                " t.exception_type_name as \"exceptionTypeName\"," +
                " t.remind_content as \"remindContent\"" +
                " from base_exception_dict t ";
        if (StringUtils.isNoneBlank(id)){
            sql+=" t.id ='"+id+"'";
        }
        if (StringUtils.isNoneBlank(code)){
            sql+=" t.code ='"+code+"'";
        }
        if (StringUtils.isNoneBlank(exceptionType)){
            sql+=" t.exception_type ='"+exceptionType+"'";
        }
        if (StringUtils.isNoneBlank(isDel)){
            sql+=" t.is_del ='"+isDel+"'";
        }
        List<Map<String,Object>> list = hibenateUtils.createSQLQuery(sql);
        return list;
    }
    public List<Map<String,Object>> findExceptionService(String id,String name,String isDel,String pathUrl){
        String sql = "select t.id as \"id\"," +
                " t.name as \"name\"," +
                " t.create_time as \"createTime\"," +
                " t.update_time as \"updateTime\"," +
                " t.is_del as \"isDel\"," +
                " t.path_url as \"pathUrl\"" +
                " from base_exception_server_dict t ";
        if (StringUtils.isNoneBlank(id)){
            sql+=" and t.id ='"+id+"'";
        }
        if (StringUtils.isNoneBlank(name)){
            sql+=" and t.name ='"+name+"'";
        }
        if (StringUtils.isNoneBlank(isDel)){
            sql+=" and t.is_del ='"+isDel+"'";
        }
        if (StringUtils.isNoneBlank(pathUrl)){
            sql+=" and t.path_url ='"+pathUrl+"'";
        }
        List<Map<String,Object>> list = hibenateUtils.createSQLQuery(sql);
        return  list;
    }
}

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

@ -3792,6 +3792,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
                    " LEFT JOIN wlyy_charge_dict g ON t.jyzx_charge_type = g.charge_type\n" +
                    "WHERE t.id = '"+doctorDO.getId()+"' ";
            chargeDictDOLists =  hibenateUtils.createSQLQuery(sqlCharge);
            //System.out.println(chargeDictDOLists.get(1));
            rs.put("chargeTypeList",chargeDictDOLists);
            //机构科室信息
            List<BaseDoctorHospitalDO> hospitalDOs = baseDoctorHospitalDao.findByDoctorCode(doctorDO.getId());

+ 95 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/dict/BaseExceptionDictDO.java

@ -0,0 +1,95 @@
package com.yihu.jw.entity.base.dict;
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 = "base_exception_dict")
public class BaseExceptionDictDO extends UuidIdentityEntity {
    private String code;
    private String exceptionMessage;
    private Date createTime;
    private String isDel;
    private String modelName;
    private String exceptionType;
    private String exceptionTypeName;
    private String remindContent;
    @Column(name = "remind_content")
    public String getRemindContent() {
        return remindContent;
    }
    public void setRemindContent(String remindContent) {
        this.remindContent = remindContent;
    }
    @Column(name = "code")
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    @Column(name = "exception_message")
    public String getExceptionMessage() {
        return exceptionMessage;
    }
    public void setExceptionMessage(String exceptionMessage) {
        this.exceptionMessage = exceptionMessage;
    }
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    @Column(name = "is_del")
    public String getIsDel() {
        return isDel;
    }
    public void setIsDel(String isDel) {
        this.isDel = isDel;
    }
    @Column(name = "model_name")
    public String getModelName() {
        return modelName;
    }
    public void setModelName(String modelName) {
        this.modelName = modelName;
    }
    @Column(name = "exception_type")
    public String getExceptionType() {
        return exceptionType;
    }
    public void setExceptionType(String exceptionType) {
        this.exceptionType = exceptionType;
    }
    @Column(name = "exception_type_name")
    public String getExceptionTypeName() {
        return exceptionTypeName;
    }
    public void setExceptionTypeName(String exceptionTypeName) {
        this.exceptionTypeName = exceptionTypeName;
    }
}

+ 76 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/dict/BaseExceptionLogDO.java

@ -0,0 +1,76 @@
package com.yihu.jw.entity.base.dict;
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 = "base_exception_log")
public class BaseExceptionLogDO extends UuidIdentityEntity {
    private String serviceCode;
    private String exceptionVode;
    private String exceptionType;
    private Date createTime;
    private String request;
    private String response;
    @Column(name = "service_code")
    public String getServiceCode() {
        return serviceCode;
    }
    public void setServiceCode(String serviceCode) {
        this.serviceCode = serviceCode;
    }
    @Column(name = "exception_code")
    public String getExceptionVode() {
        return exceptionVode;
    }
    public void setExceptionVode(String exceptionVode) {
        this.exceptionVode = exceptionVode;
    }
    @Column(name = "exception_type")
    public String getExceptionType() {
        return exceptionType;
    }
    public void setExceptionType(String exceptionType) {
        this.exceptionType = exceptionType;
    }
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    @Column(name = "request")
    public String getRequest() {
        return request;
    }
    public void setRequest(String request) {
        this.request = request;
    }
    @Column(name = "response")
    public String getResponse() {
        return response;
    }
    public void setResponse(String response) {
        this.response = response;
    }
}

+ 60 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/dict/BaseExceptionServerDictDO.java

@ -0,0 +1,60 @@
package com.yihu.jw.entity.base.dict;
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 = "base_exception_server_dict")
public class BaseExceptionServerDictDO extends UuidIdentityEntity {
    private String name;
    private Date createTime;
    private Date updateTime;
    private String isDel;
    private String path;
    @Column(name = "name")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    @Column(name = "update_time")
    public Date getUpdateTime() {
        return updateTime;
    }
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
    @Column(name = "is_del")
    public String getIsDel() {
        return isDel;
    }
    public void setIsDel(String isDel) {
        this.isDel = isDel;
    }
    @Column(name = "path_url")
    public String getPath() {
        return path;
    }
    public void setPath(String path) {
        this.path = path;
    }
}