Prechádzať zdrojové kódy

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

yeshijie 6 rokov pred
rodič
commit
efd93abe85

+ 10 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/saas/SaasDO.java

@ -36,6 +36,7 @@ public class SaasDO extends UuidIdentityEntityWithOperator {
	private String remark; //备注
	private String logo; //远程fastDFS文件地址
    private String type; //类型
    private String typeName; //租户类型名称
	private String manager; //管理员 - 关联user表id字段
	private String email; //管理员邮箱
	private String mobile; //管理员手机号码
@ -238,4 +239,13 @@ public class SaasDO extends UuidIdentityEntityWithOperator {
    public void setAppSecret(String appSecret) {
        this.appSecret = appSecret;
    }
    @Transient
    public String getTypeName() {
        return typeName;
    }
    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }
}

+ 1 - 1
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/saas/SaasVO.java

@ -19,7 +19,7 @@ public class SaasVO extends UuidIdentityVOWithOperator {
	@ApiModelProperty(value = "机构编码", example = "495323X")
	private String orgCode;
	@ApiModelProperty(value = "系统名称", example = "厦门医疗服务")
	@ApiModelProperty(value = "租户名称", example = "厦门医疗服务")
	private String name;
	@ApiModelProperty(value = "状态", example = "auditPassed")
	private SaasDO.Status status;

+ 10 - 6
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/saas/SaasEndpoint.java

@ -95,9 +95,9 @@ public class SaasEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = BaseRequestMapping.Saas.SYSTEM_CONFIGURATION)
    @ApiOperation(value = "创建-系统配置")
    public Envelop createSystemConfig (
            @ApiParam(name = "saasDO", value = "Json数据", required = true)
            @RequestParam(value = "saasDO") SaasDO saasDO) throws Exception {
            @ApiParam(name = "jsonSaas", value = "租户数据", required = true)
            @RequestParam String jsonSaas) throws Exception {
        SaasDO saasDO = toEntity(jsonSaas, SaasDO.class);
        saasService.saveSystemConfig(saasDO);
        return success("创建成功",saasDO);
    }
@ -105,9 +105,9 @@ public class SaasEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = BaseRequestMapping.Saas.THEME_STYLE)
    @ApiOperation(value = "创建-主题风格")
    public Envelop createThemeConfig (
            @ApiParam(name = "saasDO", value = "Json数据", required = true)
            @RequestParam(value = "saasDO") SaasDO saasDO) throws Exception {
            @ApiParam(name = "jsonSaas", value = "租户数据", required = true)
            @RequestParam String jsonSaas) throws Exception {
        SaasDO saasDO = toEntity(jsonSaas, SaasDO.class);
        saasService.createThemeConfig(saasDO);
        return success("创建成功");
    }
@ -184,6 +184,10 @@ public class SaasEndpoint extends EnvelopRestEndpoint {
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
            @RequestParam(value = "size") int size) throws Exception {
        List<SaasDO> saasDOS = saasService.search(fields, filters, sorts, page, size);
        saasDOS.forEach(saas->{
            SaasTypeDictDO saasTypeDictDO = saasTypeDictService.findById(saas.getType());
            saas.setTypeName(saasTypeDictDO.getName());
        });
        int count = (int)saasService.getCount(filters);
        return success(saasDOS, count, page, size, SaasVO.class);
    }

+ 3 - 1
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/system/SystemDictEndpoint.java

@ -101,6 +101,8 @@ public class SystemDictEndpoint extends EnvelopRestEndpoint {
    public ListEnvelop queryDictBySaasId(
            @ApiParam(name = "saasId", value = "saasId")
            @RequestParam(value = "saasId", required = true) String saasId,
            @ApiParam(name = "name", value = "字典名称")
            @RequestParam(value = "name", required = false) String name,
            @ApiParam(name = "type", value = "字典类型")
            @RequestParam(value = "type", required = true) String type,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
@ -110,7 +112,7 @@ public class SystemDictEndpoint extends EnvelopRestEndpoint {
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
            @RequestParam(value = "size") int size
    ) throws Exception {
        JSONArray list = systemDictService.getDistListBySaasId(type,saasId,sorts,page,size);
        JSONArray list = systemDictService.getDistListBySaasId(type,saasId,name,sorts,page,size);
        return success(list);
    }

+ 7 - 1
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/system/SystemDictEntryEndpoint.java

@ -12,6 +12,7 @@ import com.yihu.jw.rm.base.BaseRequestMapping;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
@ -65,8 +66,10 @@ public class SystemDictEntryEndpoint extends EnvelopRestEndpoint {
    @GetMapping(value = BaseRequestMapping.SystemDictEntry.PAGE_SAASID)
    @ApiOperation(value = "获取分页")
    public PageEnvelop<SystemDictEntryVO> pageSaasId (
            @ApiParam(name = "saasId", value = "true")
            @ApiParam(name = "saasId", value = "saasId")
            @RequestParam(value = "saasId", required = true) String saasId,
            @ApiParam(name = "value", value = "请输入字典代码或值查询")
            @RequestParam(value = "value", required = false) String value,
            @ApiParam(name = "dictCode", value = "字典code")
            @RequestParam(value = "dictCode", required = true) String dictCode,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
@ -78,6 +81,9 @@ public class SystemDictEntryEndpoint extends EnvelopRestEndpoint {
        StringBuilder filters = new StringBuilder();
        filters.append("saasId=").append(saasId).append(";")
                .append("dictCode=").append(dictCode).append(";");
        if(StringUtils.isNotBlank(value)){
            filters.append("code?").append(value).append(" g1;").append("value?").append(value).append(" g1;");
        }
        List<SystemDictEntryDO> systemDictEntryDOS = systemDictEntryService.search(null, filters.toString(), sorts, page, size);
        int count = (int)systemDictEntryService.getCount(filters.toString());
        return success(systemDictEntryDOS, count, page, size, SystemDictEntryVO.class);

+ 6 - 13
svr/svr-base/src/main/java/com/yihu/jw/base/service/org/BaseOrgService.java

@ -1,34 +1,27 @@
package com.yihu.jw.base.service.org;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SimplePropertyPreFilter;
import com.google.gson.JsonObject;
import com.yihu.jw.base.dao.org.BaseOrgDao;
import com.yihu.jw.base.dao.org.OrgTreeDao;
import com.yihu.jw.base.dao.user.UserDao;
import com.yihu.jw.base.dao.user.UserRoleDao;
import com.yihu.jw.base.service.org.tree.SimpleTree;
import com.yihu.jw.base.service.org.tree.SimpleTreeNode;
import com.yihu.jw.base.service.org.tree.Tree;
import com.yihu.jw.base.service.org.tree.TreeNode;
import com.yihu.jw.base.service.user.UserRoleService;
import com.yihu.jw.base.service.user.UserService;
import com.yihu.jw.base.util.ConstantUtils;
import com.yihu.jw.entity.base.org.BaseOrgDO;
import com.yihu.jw.entity.base.user.UserDO;
import com.yihu.jw.entity.base.user.UserRoleDO;
import com.yihu.jw.rm.base.BaseRequestMapping;
import com.yihu.mysql.query.BaseJpaService;
import com.yihu.utils.security.MD5;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import com.yihu.jw.entity.base.org.BaseOrgDO;
import org.springframework.util.StringUtils;
import java.util.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
 * 
@ -173,7 +166,7 @@ public class BaseOrgService extends BaseJpaService<BaseOrgDO, BaseOrgDao> {
        SimplePropertyPreFilter filter = new SimplePropertyPreFilter();
        filter.getExcludes().add("parent");
        filter.getExcludes().add("allChildren");
        filter.getExcludes().add("parentNodeId");
//        filter.getExcludes().add("parentNodeId");
        filter.getExcludes().add("orderNum");
        filter.getExcludes().add("level");
@ -192,7 +185,7 @@ public class BaseOrgService extends BaseJpaService<BaseOrgDO, BaseOrgDao> {
        SimplePropertyPreFilter filter = new SimplePropertyPreFilter();
        filter.getExcludes().add("parent");
        filter.getExcludes().add("allChildren");
        filter.getExcludes().add("parentNodeId");
//        filter.getExcludes().add("parentNodeId");
        filter.getExcludes().add("orderNum");
        filter.getExcludes().add("level");

+ 1 - 1
svr/svr-base/src/main/java/com/yihu/jw/base/service/system/SystemDictService.java

@ -60,7 +60,7 @@ public class SystemDictService extends BaseJpaService<SystemDictDO, SystemDictDa
     * @param saasId
     * @return
     */
    public JSONArray getDistListBySaasId(String type, String saasId, String sorts, int page, int size) throws Exception {
    public JSONArray getDistListBySaasId(String type, String saasId,String name, String sorts, int page, int size) throws Exception {
        JSONArray jsonArray = new JSONArray();
        JSONObject jsonObject = new JSONObject();
        if (SystemDictEnum.Icd10Dict == SystemDictEnum.valueOf(type)) {