فهرست منبع

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

wangzhinan 2 سال پیش
والد
کامیت
0d4b9012ce
22فایلهای تغییر یافته به همراه371 افزوده شده و 541 حذف شده
  1. 40 79
      common/common-entity/src/main/java/com/yihu/jw/entity/ehr/quota/TjDataSource.java
  2. 122 98
      common/common-entity/src/main/java/com/yihu/jw/entity/ehr/quota/TjQuota.java
  3. 23 41
      common/common-entity/src/main/java/com/yihu/jw/entity/ehr/quota/TjQuotaDataSource.java
  4. 30 33
      common/common-entity/src/main/java/com/yihu/jw/entity/ehr/quota/TjQuotaDimensionMain.java
  5. 50 43
      common/common-entity/src/main/java/com/yihu/jw/entity/ehr/quota/TjQuotaLog.java
  6. 4 6
      svr/svr-basic/src/main/java/com/yihu/jw/basic/agadmin/controller/app/AppController.java
  7. 3 20
      svr/svr-basic/src/main/java/com/yihu/jw/basic/agadmin/controller/common/SystemDictController.java
  8. 5 27
      svr/svr-basic/src/main/java/com/yihu/jw/basic/agadmin/controller/quota/TjDataSaveController.java
  9. 5 20
      svr/svr-basic/src/main/java/com/yihu/jw/basic/agadmin/controller/quota/TjDataSourceController.java
  10. 7 27
      svr/svr-basic/src/main/java/com/yihu/jw/basic/agadmin/controller/quota/TjDimensionMainController.java
  11. 10 34
      svr/svr-basic/src/main/java/com/yihu/jw/basic/agadmin/controller/quota/TjDimensionSlaveController.java
  12. 27 53
      svr/svr-basic/src/main/java/com/yihu/jw/basic/agadmin/controller/quota/TjQuotaController.java
  13. 10 12
      svr/svr-basic/src/main/java/com/yihu/jw/basic/agadmin/controller/report/ReportController.java
  14. 15 28
      svr/svr-basic/src/main/java/com/yihu/jw/basic/agadmin/controller/resource/ResourceBrowseController.java
  15. 3 3
      svr/svr-quota/src/main/java/com/yihu/jw/quota/controller/JobController.java
  16. 2 2
      svr/svr-quota/src/main/java/com/yihu/jw/quota/controller/QuotaController.java
  17. 4 4
      svr/svr-quota/src/main/java/com/yihu/jw/quota/controller/QuotaReportController.java
  18. 1 1
      svr/svr-quota/src/main/java/com/yihu/jw/quota/dao/jpa/TjQuotaDao.java
  19. 3 3
      svr/svr-quota/src/main/java/com/yihu/jw/quota/etl/Contant.java
  20. 1 1
      svr/svr-quota/src/main/java/com/yihu/jw/quota/job/EsQuotaJob.java
  21. 2 2
      svr/svr-quota/src/main/java/com/yihu/jw/quota/service/job/JobService.java
  22. 4 4
      svr/svr-quota/src/main/java/com/yihu/jw/quota/service/quota/QuotaService.java

+ 40 - 79
common/common-entity/src/main/java/com/yihu/jw/entity/ehr/quota/TjDataSource.java

@ -1,24 +1,26 @@
package com.yihu.jw.entity.ehr.quota;
package com.yihu.jw.entity.ehr.quota;
import java.util.Date;
import javax.persistence.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.IdEntity;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
/**
/**
 * TjDataSource entity. @author MyEclipse Persistence Tools
 * Created by Administrator on 2017/6/8.
 */
 */
@Entity
@Entity
@Table(name = "tj_data_source")
@Table(name = "tj_data_source")
public class TjDataSource implements java.io.Serializable {
@Access(value = AccessType.PROPERTY)
public class TjDataSource extends IdEntity {
    public static String type_es ="1";
    public static String type_es ="1";
    public static String type_solr ="2";
    public static String type_solr ="2";
    public static String type_mysql ="3";
    public static String type_mysql ="3";
    // Fields
    private Integer id;
    private String code;
    private String code;
    private String type;// 1:mysql数据库 2:redis 3 接口
    private String type;
    private String name;
    private String name;
    private Date createTime;
    private Date createTime;
    private String createUser;
    private String createUser;
@ -26,148 +28,107 @@ public class TjDataSource implements java.io.Serializable {
    private Date updateTime;
    private Date updateTime;
    private String updateUser;
    private String updateUser;
    private String updateUserName;
    private String updateUserName;
    private String status;//1: 正常 0:不可用  -1删除
    private Integer status;
    private String remark;
    private String remark;
    // Constructors
    /** default constructor */
    public TjDataSource() {
    }
    /** minimal constructor */
    public TjDataSource(Date createTime, Date updateTime) {
        this.createTime = createTime;
        this.updateTime = updateTime;
    }
    /** full constructor */
    public TjDataSource(String code, String type, String name,
                        Date createTime, String createUser, String createUserName,
                        Date updateTime, String updateUser, String updateUserName,
                        String status, String remark) {
        this.code = code;
        this.type = type;
        this.name = name;
        this.createTime = createTime;
        this.createUser = createUser;
        this.createUserName = createUserName;
        this.updateTime = updateTime;
        this.updateUser = updateUser;
        this.updateUserName = updateUserName;
        this.status = status;
        this.remark = remark;
    }
    // Property accessors
    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    public Integer getId() {
        return this.id;
    }
    public void setId(Integer id) {
        this.id = id;
    }
    @Column(name = "code", length = 100)
    @Column(name = "code", nullable = true)
    public String getCode() {
    public String getCode() {
        return this.code;
        return code;
    }
    }
    public void setCode(String code) {
    public void setCode(String code) {
        this.code = code;
        this.code = code;
    }
    }
    @Column(name = "type", length = 2)
    @Column(name = "type", nullable = true)
    public String getType() {
    public String getType() {
        return this.type;
        return type;
    }
    }
    public void setType(String type) {
    public void setType(String type) {
        this.type = type;
        this.type = type;
    }
    }
    @Column(name = "name", length = 200)
    @Column(name = "name", nullable = true)
    public String getName() {
    public String getName() {
        return this.name;
        return name;
    }
    }
    public void setName(String name) {
    public void setName(String name) {
        this.name = name;
        this.name = name;
    }
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "create_time", nullable = false, length = 0)
    @Column(name = "create_time", nullable = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    public Date getCreateTime() {
    public Date getCreateTime() {
        return this.createTime;
        return createTime;
    }
    }
    public void setCreateTime(Date createTime) {
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
        this.createTime = createTime;
    }
    }
    @Column(name = "create_user", length = 100)
    @Column(name = "create_user", nullable = true)
    public String getCreateUser() {
    public String getCreateUser() {
        return this.createUser;
        return createUser;
    }
    }
    public void setCreateUser(String createUser) {
    public void setCreateUser(String createUser) {
        this.createUser = createUser;
        this.createUser = createUser;
    }
    }
    @Column(name = "create_user_name", length = 50)
    @Column(name = "create_user_name", nullable = true)
    public String getCreateUserName() {
    public String getCreateUserName() {
        return this.createUserName;
        return createUserName;
    }
    }
    public void setCreateUserName(String createUserName) {
    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
        this.createUserName = createUserName;
    }
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "update_time", nullable = false, length = 0)
    @Column(name = "update_time", nullable = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    public Date getUpdateTime() {
    public Date getUpdateTime() {
        return this.updateTime;
        return updateTime;
    }
    }
    public void setUpdateTime(Date updateTime) {
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
        this.updateTime = updateTime;
    }
    }
    @Column(name = "update_user", length = 100)
    @Column(name = "update_user", nullable = true)
    public String getUpdateUser() {
    public String getUpdateUser() {
        return this.updateUser;
        return updateUser;
    }
    }
    public void setUpdateUser(String updateUser) {
    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
        this.updateUser = updateUser;
    }
    }
    @Column(name = "update_user_name", length = 50)
    @Column(name = "update_user_name", nullable = true)
    public String getUpdateUserName() {
    public String getUpdateUserName() {
        return this.updateUserName;
        return updateUserName;
    }
    }
    public void setUpdateUserName(String updateUserName) {
    public void setUpdateUserName(String updateUserName) {
        this.updateUserName = updateUserName;
        this.updateUserName = updateUserName;
    }
    }
    @Column(name = "status", length = 1)
    public String getStatus() {
        return this.status;
    @Column(name = "status", nullable = true)
    public Integer getStatus() {
        return status;
    }
    }
    public void setStatus(String status) {
    public void setStatus(Integer status) {
        this.status = status;
        this.status = status;
    }
    }
    @Column(name = "remark", length = 1500)
    @Column(name = "remark", nullable = true)
    public String getRemark() {
    public String getRemark() {
        return this.remark;
        return remark;
    }
    }
    public void setRemark(String remark) {
    public void setRemark(String remark) {
        this.remark = remark;
        this.remark = remark;
    }
    }
}
}

+ 122 - 98
common/common-entity/src/main/java/com/yihu/jw/entity/ehr/quota/TjQuota.java

@ -1,216 +1,213 @@
package com.yihu.jw.entity.ehr.quota;
package com.yihu.jw.entity.ehr.quota;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.IdEntity;
import javax.persistence.*;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import java.util.Date;
import static javax.persistence.GenerationType.IDENTITY;
import java.util.List;
/**
/**
 * TjQuota entity. @author MyEclipse Persistence Tools
 * Created by Administrator on 2017/6/9.
 */
 */
@Entity
@Entity
@Table(name = "tj_quota")
public class TjQuota implements java.io.Serializable {
    // Fields
@Table(name = "tj_quota", schema = "", catalog = "healtharchive")
public class TjQuota extends IdEntity {
    private Integer id;
    private String code;
    private String code;
    private String name;
    private String name;
    private String cron;//quartz时间表达式
    private String cron;
    private String execType;
    private String execType;
    private String jobClazz; //类class
    private String dataLevel;//1 全量  2增量
    private Date execTime;
    private String jobClazz;
    private Date createTime;
    private Date createTime;
    private String createUser;
    private String createUser;
    private String createUserName;
    private String createUserName;
    private Date updateTime;
    private Date updateTime;
    private String updateUser;
    private String updateUser;
    private String updateUserName;
    private String updateUserName;
    private String status;//1: 正常 0:不可用  -1删除
    private Integer status;
    private Integer dataLevel;
    private String remark;
    private String remark;
    private Integer quotaType;
    private String metadataCode;
    private String isInitExec; // 是否初始执行过,0:否,1:是。
    private String resultGetType; // 指标结果获取方式 1:直接库中获取,2:二次统计获取。
    private String resultGetType; // 指标结果获取方式 1:直接库中获取,2:二次统计获取。
    //周期指标执行状态:0未开启,1执行中
    //周期指标执行状态:0未开启,1执行中
    private String jobStatus;
    private String jobStatus;
    // Constructors
    /** default constructor */
    public TjQuota() {
    }
    private TjQuotaDataSource tjQuotaDataSourceModel;
    private TjQuotaDataSave tjQuotaDataSaveModel;
    /** minimal constructor */
    public TjQuota(Date createTime, Date updateTime) {
        this.createTime = createTime;
        this.updateTime = updateTime;
    private List<TjQuota> children;
    @Column(name = "code")
    public String getCode() {
        return code;
    }
    }
    /** full constructor */
    public TjQuota(String code, String name, String jobClazz,
                   Date createTime, String createUser, String createUserName,
                   Date updateTime, String updateUser, String updateUserName,
                   String status, String remark,String dataLevel ,String cron ,String execType, String jobStatus) {
    public void setCode(String code) {
        this.code = code;
        this.code = code;
    }
    @Column(name = "name")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
        this.name = name;
        this.jobClazz = jobClazz;
        this.createTime = createTime;
        this.createUser = createUser;
        this.createUserName = createUserName;
        this.updateTime = updateTime;
        this.updateUser = updateUser;
        this.updateUserName = updateUserName;
        this.status = status;
        this.jobStatus = jobStatus;
        this.remark = remark;
        this.dataLevel = dataLevel;
        this.cron = cron;
        this.execType = execType;
    }
    }
    // Property accessors
    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    public Integer getId() {
        return this.id;
    @Column(name = "cron")
    public String getCron() {
        return cron;
    }
    }
    public void setId(Integer id) {
        this.id = id;
    public void setCron(String cron) {
        this.cron = cron;
    }
    }
    @Column(name = "code", length = 100)
    public String getCode() {
        return this.code;
    @Column(name = "exec_type")
    public String getExecType() {
        return execType;
    }
    }
    public void setCode(String code) {
        this.code = code;
    public void setExecType(String execType) {
        this.execType = execType;
    }
    }
    @Column(name = "name", length = 200)
    public String getName() {
        return this.name;
    @Column(name = "exec_time", nullable = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    public Date getExecTime() {
        return execTime;
    }
    }
    public void setName(String name) {
        this.name = name;
    public void setExecTime(Date execTime) {
        this.execTime = execTime;
    }
    }
    @Column(name = "job_clazz", length = 500)
    @Column(name = "job_clazz")
    public String getJobClazz() {
    public String getJobClazz() {
        return this.jobClazz;
        return jobClazz;
    }
    }
    public void setJobClazz(String jobClazz) {
    public void setJobClazz(String jobClazz) {
        this.jobClazz = jobClazz;
        this.jobClazz = jobClazz;
    }
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "create_time", nullable = false, length = 0)
    @Column(name = "create_time", nullable = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    public Date getCreateTime() {
    public Date getCreateTime() {
        return this.createTime;
        return createTime;
    }
    }
    public void setCreateTime(Date createTime) {
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
        this.createTime = createTime;
    }
    }
    @Column(name = "create_user", length = 100)
    @Column(name = "create_user")
    public String getCreateUser() {
    public String getCreateUser() {
        return this.createUser;
        return createUser;
    }
    }
    public void setCreateUser(String createUser) {
    public void setCreateUser(String createUser) {
        this.createUser = createUser;
        this.createUser = createUser;
    }
    }
    @Column(name = "create_user_name", length = 50)
    @Column(name = "create_user_name")
    public String getCreateUserName() {
    public String getCreateUserName() {
        return this.createUserName;
        return createUserName;
    }
    }
    public void setCreateUserName(String createUserName) {
    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
        this.createUserName = createUserName;
    }
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "update_time", nullable = false, length = 0)
    @Column(name = "update_time", nullable = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    public Date getUpdateTime() {
    public Date getUpdateTime() {
        return this.updateTime;
        return updateTime;
    }
    }
    public void setUpdateTime(Date updateTime) {
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
        this.updateTime = updateTime;
    }
    }
    @Column(name = "update_user", length = 100)
    @Column(name = "update_user")
    public String getUpdateUser() {
    public String getUpdateUser() {
        return this.updateUser;
        return updateUser;
    }
    }
    public void setUpdateUser(String updateUser) {
    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
        this.updateUser = updateUser;
    }
    }
    @Column(name = "update_user_name", length = 50)
    @Column(name = "update_user_name")
    public String getUpdateUserName() {
    public String getUpdateUserName() {
        return this.updateUserName;
        return updateUserName;
    }
    }
    public void setUpdateUserName(String updateUserName) {
    public void setUpdateUserName(String updateUserName) {
        this.updateUserName = updateUserName;
        this.updateUserName = updateUserName;
    }
    }
    @Column(name = "status", length = 1)
    public String getStatus() {
        return this.status;
    @Column(name = "status")
    public Integer getStatus() {
        return status;
    }
    }
    public void setStatus(String status) {
    public void setStatus(Integer status) {
        this.status = status;
        this.status = status;
    }
    }
    @Column(name = "remark", length = 1500)
    public String getRemark() {
        return this.remark;
    @Column(name = "data_level")
    public Integer getDataLevel() {
        return dataLevel;
    }
    }
    public void setRemark(String remark) {
        this.remark = remark;
    public void setDataLevel(Integer dataLevel) {
        this.dataLevel = dataLevel;
    }
    }
    @Column(name = "cron", length = 100)
    public String getCron() {
        return cron;
    @Column(name = "quota_type")
    public Integer getQuotaType() {
        return quotaType;
    }
    }
    public void setCron(String cron) {
        this.cron = cron;
    public void setQuotaType(Integer quotaType) {
        this.quotaType = quotaType;
    }
    }
    @Column(name = "data_level", length = 2)
    public String getDataLevel() {
        return dataLevel;
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }
    }
    public void setDataLevel(String dataLevel) {
        this.dataLevel = dataLevel;
    public void setRemark(String remark) {
        this.remark = remark;
    }
    }
    @Column(name = "exec_type", length = 1)
    public String getExecType() {
        return execType;
    @Column(name = "metadata_code")
    public String getMetadataCode() {
        return metadataCode;
    }
    }
    public void setExecType(String execType) {
        this.execType = execType;
    public void setMetadataCode(String metadataCode) {
        this.metadataCode = metadataCode;
    }
    @Column(name = "is_init_exec", nullable = false)
    public String getIsInitExec() {
        return isInitExec;
    }
    }
    @Column(name = "result_get_type", length = 2)
    public void setIsInitExec(String isInitExec) {
        this.isInitExec = isInitExec;
    }
    @Column(name = "result_get_type")
    public String getResultGetType() {
    public String getResultGetType() {
        return resultGetType;
        return resultGetType;
    }
    }
@ -218,6 +215,15 @@ public class TjQuota implements java.io.Serializable {
    public void setResultGetType(String resultGetType) {
    public void setResultGetType(String resultGetType) {
        this.resultGetType = resultGetType;
        this.resultGetType = resultGetType;
    }
    }
    @Transient
    public List<TjQuota> getChildren() {
        return children;
    }
    public void setChildren(List<TjQuota> children) {
        this.children = children;
    }
    @Column(name = "job_status", length = 1)
    @Column(name = "job_status", length = 1)
    public String getJobStatus() {
    public String getJobStatus() {
        return jobStatus;
        return jobStatus;
@ -226,4 +232,22 @@ public class TjQuota implements java.io.Serializable {
    public void setJobStatus(String jobStatus) {
    public void setJobStatus(String jobStatus) {
        this.jobStatus = jobStatus;
        this.jobStatus = jobStatus;
    }
    }
}
    @Transient
    public TjQuotaDataSource getTjQuotaDataSourceModel() {
        return tjQuotaDataSourceModel;
    }
    public void setTjQuotaDataSourceModel(TjQuotaDataSource tjQuotaDataSourceModel) {
        this.tjQuotaDataSourceModel = tjQuotaDataSourceModel;
    }
    @Transient
    public TjQuotaDataSave getTjQuotaDataSaveModel() {
        return tjQuotaDataSaveModel;
    }
    public void setTjQuotaDataSaveModel(TjQuotaDataSave tjQuotaDataSaveModel) {
        this.tjQuotaDataSaveModel = tjQuotaDataSaveModel;
    }
}

+ 23 - 41
common/common-entity/src/main/java/com/yihu/jw/entity/ehr/quota/TjQuotaDataSource.java

@ -1,77 +1,59 @@
package com.yihu.jw.entity.ehr.quota;
package com.yihu.jw.entity.ehr.quota;
import javax.persistence.*;
import com.yihu.jw.entity.IdEntity;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.*;
import java.io.Serializable;
/**
/**
 * TjQuotaDataSource entity. @author MyEclipse Persistence Tools
 * Created by Administrator on 2017/6/9.
 */
 */
@Entity
@Entity
@Table(name = "tj_quota_data_source")
public class TjQuotaDataSource implements java.io.Serializable {
    // Fields
@Table(name = "tj_quota_data_source", schema = "", catalog = "healtharchive")
public class TjQuotaDataSource extends IdEntity {
    private Integer id;
    private String quotaCode;
    private String quotaCode;
    private String sourceCode;
    private String sourceCode;
    private String configJson;
    private String configJson;
    private String name;
    private String code;
    private String code;
    // Constructors
    /** default constructor */
    public TjQuotaDataSource() {
    }
    /** full constructor */
    public TjQuotaDataSource(String quotaCode, String sourceCode,
                             String configJson) {
        this.quotaCode = quotaCode;
        this.sourceCode = sourceCode;
        this.configJson = configJson;
    }
    // Property accessors
    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    public Integer getId() {
        return this.id;
    }
    public void setId(Integer id) {
        this.id = id;
    }
    @Column(name = "quota_code", length = 100)
    @Column(name = "quota_code")
    public String getQuotaCode() {
    public String getQuotaCode() {
        return this.quotaCode;
        return quotaCode;
    }
    }
    public void setQuotaCode(String quotaCode) {
    public void setQuotaCode(String quotaCode) {
        this.quotaCode = quotaCode;
        this.quotaCode = quotaCode;
    }
    }
    @Column(name = "source_code", length = 100)
    @Column(name = "source_code")
    public String getSourceCode() {
    public String getSourceCode() {
        return this.sourceCode;
        return sourceCode;
    }
    }
    public void setSourceCode(String sourceCode) {
    public void setSourceCode(String sourceCode) {
        this.sourceCode = sourceCode;
        this.sourceCode = sourceCode;
    }
    }
    @Column(name = "config_json", length = 2000)
    @Column(name = "config_json")
    public String getConfigJson() {
    public String getConfigJson() {
        return this.configJson;
        return configJson;
    }
    }
    public void setConfigJson(String configJson) {
    public void setConfigJson(String configJson) {
        this.configJson = configJson;
        this.configJson = configJson;
    }
    }
    @Transient
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    @Transient
    @Transient
    public String getCode() {
    public String getCode() {
        return code;
        return code;
@ -80,4 +62,4 @@ public class TjQuotaDataSource implements java.io.Serializable {
    public void setCode(String code) {
    public void setCode(String code) {
        this.code = code;
        this.code = code;
    }
    }
}
}

+ 30 - 33
common/common-entity/src/main/java/com/yihu/jw/entity/ehr/quota/TjQuotaDimensionMain.java

@ -1,62 +1,50 @@
package com.yihu.jw.entity.ehr.quota;
package com.yihu.jw.entity.ehr.quota;
import javax.persistence.*;
import com.yihu.jw.entity.IdEntity;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.*;
import java.io.Serializable;
/**
/**
 * TjQuotaDimensionMain entity. @author MyEclipse Persistence Tools
 * 统计主纬度关联表
 *
 * @author janseny
 * @version 1.0
 * @updated 2017年6月8日
 */
 */
@Entity
@Entity
@Table(name = "tj_quota_dimension_main")
@Table(name = "tj_quota_dimension_main")
public class TjQuotaDimensionMain implements java.io.Serializable {
@Access(value = AccessType.PROPERTY)
public class TjQuotaDimensionMain extends IdEntity {
    // Fields
    private String quotaCode;  //关联 tj_quota code
    private String mainCode; //关联 jt_dimension_main
    private String dictSql;//
    private String keyVal;//
    private Integer id;
    private String quotaCode;
    private String mainCode;
    private String dictSql;
    private String keyVal;
    private String name;
    private String type;
    private String type;
    // Constructors
    /** default constructor */
    public TjQuotaDimensionMain() {
    }
    // Property accessors
    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    public Integer getId() {
        return this.id;
    }
    public void setId(Integer id) {
        this.id = id;
    }
    @Column(name = "quota_code", length = 100)
    @Column(name = "quota_code",  nullable = true)
    public String getQuotaCode() {
    public String getQuotaCode() {
        return this.quotaCode;
        return quotaCode;
    }
    }
    public void setQuotaCode(String quotaCode) {
    public void setQuotaCode(String quotaCode) {
        this.quotaCode = quotaCode;
        this.quotaCode = quotaCode;
    }
    }
    @Column(name = "main_code", length = 100)
    @Column(name = "main_code",  nullable = true)
    public String getMainCode() {
    public String getMainCode() {
        return this.mainCode;
        return mainCode;
    }
    }
    public void setMainCode(String mainCode) {
    public void setMainCode(String mainCode) {
        this.mainCode = mainCode;
        this.mainCode = mainCode;
    }
    }
    @Column(name = "dict_sql",  nullable = true)
    public String getDictSql() {
    public String getDictSql() {
        return dictSql;
        return dictSql;
    }
    }
@ -65,7 +53,7 @@ public class TjQuotaDimensionMain implements java.io.Serializable {
        this.dictSql = dictSql;
        this.dictSql = dictSql;
    }
    }
    @Column(name = "key_val", length = 100)
    @Column(name = "key_val",  nullable = true)
    public String getKeyVal() {
    public String getKeyVal() {
        return keyVal;
        return keyVal;
    }
    }
@ -74,6 +62,15 @@ public class TjQuotaDimensionMain implements java.io.Serializable {
        this.keyVal = keyVal;
        this.keyVal = keyVal;
    }
    }
    @Transient
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    @Transient
    @Transient
    public String getType() {
    public String getType() {
        return type;
        return type;

+ 50 - 43
common/common-entity/src/main/java/com/yihu/jw/entity/ehr/quota/TjQuotaLog.java

@ -1,41 +1,34 @@
package com.yihu.jw.entity.ehr.quota;
package com.yihu.jw.entity.ehr.quota;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.IdEntity;
import javax.persistence.*;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import java.util.Date;
import static javax.persistence.GenerationType.IDENTITY;
/**
/**
 * Created by chenweida on 2017/6/2.
 * 统计指标日志
 *
 * @author janseny
 * @version 1.0
 * @updated 2017年6月9日
 */
 */
@Entity
@Entity
@Table(name = "tj_quota_log")
@Table(name = "tj_quota_log")
public class TjQuotaLog {
    private Integer id;
    private String saasId;
    private String quotaCode;
    private Date startTime;
    private Date endTime;
    private String content;
    /**
     * 1成功 0失败,2执行中
     */
    private String status;
    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    public Integer getId() {
        return id;
    }
@Access(value = AccessType.PROPERTY)
public class TjQuotaLog extends IdEntity {
    public void setId(Integer id) {
        this.id = id;
    }
    private String quotaCode;  //
    private String saasId; //
    private Integer status;//1成功 0失败
    private String content;//内容
    private Date startTime;//任务开始执行时间
    private Date endTime;//任务结束执行时间
    private String statusName;
    @Column(name = "quota_code",  nullable = true)
    public String getQuotaCode() {
    public String getQuotaCode() {
        return quotaCode;
        return quotaCode;
    }
    }
@ -44,24 +37,25 @@ public class TjQuotaLog {
        this.quotaCode = quotaCode;
        this.quotaCode = quotaCode;
    }
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    public Date getStartTime() {
        return startTime;
    @Column(name = "saas_id",  nullable = true)
    public String getSaasId() {
        return saasId;
    }
    }
    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    public Date getEndTime() {
        return endTime;
    @Column(name = "status",  nullable = true)
    public Integer getStatus() {
        return status;
    }
    }
    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    public void setStatus(Integer status) {
        this.status = status;
    }
    }
    @Column(name = "content",  nullable = true)
    public String getContent() {
    public String getContent() {
        return content;
        return content;
    }
    }
@ -70,19 +64,32 @@ public class TjQuotaLog {
        this.content = content;
        this.content = content;
    }
    }
    public String getStatus() {
        return status;
    @Column(name = "start_time",  nullable = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    public Date getStartTime() {
        return startTime;
    }
    }
    public void setStatus(String status) {
        this.status = status;
    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }
    }
    public String getSaasId() {
        return saasId;
    @Column(name = "end_time",  nullable = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    public Date getEndTime() {
        return endTime;
    }
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }
    @Transient
    public String getStatusName() {
        return statusName;
    }
    public void setStatusName(String statusName) {
        this.statusName = statusName;
    }
    }
}
}

+ 4 - 6
svr/svr-basic/src/main/java/com/yihu/jw/basic/agadmin/controller/app/AppController.java

@ -9,10 +9,10 @@ import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import io.swagger.annotations.Api;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequest;
import java.util.*;
import java.util.*;
@ -24,9 +24,9 @@ import java.util.*;
@Api( tags = {"网关-应用"})
@Api( tags = {"网关-应用"})
public class AppController extends EnvelopRestEndpoint {
public class AppController extends EnvelopRestEndpoint {
    @Autowired
    @Resource
    private GetInfoService getInfoService;
    private GetInfoService getInfoService;
    @Autowired
    @Resource
    private AppService appService;
    private AppService appService;
//    @RequestMapping("template/appInfo")
//    @RequestMapping("template/appInfo")
@ -62,7 +62,7 @@ public class AppController extends EnvelopRestEndpoint {
     * 应用列表及特定查询
     * 应用列表及特定查询
     */
     */
    @GetMapping("/searchApps")
    @GetMapping("/searchApps")
    public Envelop getAppList(String sourceType, String searchNm, String org, String catalog, String status, int page, int rows, HttpServletRequest request) {
    public Envelop getAppList(String sourceType, String searchNm, String org, String catalog, String status, int page, int rows) {
        StringBuilder filters = new StringBuilder();
        StringBuilder filters = new StringBuilder();
        if (!StringUtils.isEmpty(sourceType)) {
        if (!StringUtils.isEmpty(sourceType)) {
            filters.append("sourceType=" + sourceType+";");
            filters.append("sourceType=" + sourceType+";");
@ -83,7 +83,6 @@ public class AppController extends EnvelopRestEndpoint {
        }
        }
        String url = "/apps";
        String url = "/apps";
        String resultStr = "";
        try {
        try {
            List<App> appList = appService.search(null, filters.toString(), "-createTime", page, rows);
            List<App> appList = appService.search(null, filters.toString(), "-createTime", page, rows);
            return PageEnvelop.getSuccessListWithPage("查询成功",appList,page,rows,appService.getCount(filters.toString()));
            return PageEnvelop.getSuccessListWithPage("查询成功",appList,page,rows,appService.getCount(filters.toString()));
@ -95,7 +94,6 @@ public class AppController extends EnvelopRestEndpoint {
    }
    }
//    @RequestMapping("/deleteApp")
//    @RequestMapping("/deleteApp")
//    @ResponseBody
//    public Object deleteApp(String appId) {
//    public Object deleteApp(String appId) {
//        Envelop result = new Envelop();
//        Envelop result = new Envelop();
//        String resultStr = "";
//        String resultStr = "";

+ 3 - 20
svr/svr-basic/src/main/java/com/yihu/jw/basic/agadmin/controller/common/SystemDictController.java

@ -8,15 +8,13 @@ import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import io.swagger.annotations.Api;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Page;
import org.springframework.util.StringUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RestController;
import java.net.URLEncoder;
import java.util.ArrayList;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.HashMap;
import java.util.List;
import java.util.List;
import java.util.Map;
import java.util.Map;
@ -29,9 +27,9 @@ import java.util.Map;
@Api( tags = {"网关-字典"})
@Api( tags = {"网关-字典"})
public class SystemDictController extends EnvelopRestEndpoint {
public class SystemDictController extends EnvelopRestEndpoint {
    @Autowired
    @Resource
    private SystemDictService dictService;
    private SystemDictService dictService;
    @Autowired
    @Resource
    private SystemDictEntryService systemDictEntryService;
    private SystemDictEntryService systemDictEntryService;
//
//
//    @RequestMapping("/createDict")
//    @RequestMapping("/createDict")
@ -108,8 +106,6 @@ public class SystemDictController extends EnvelopRestEndpoint {
    @GetMapping("searchSysDicts")
    @GetMapping("searchSysDicts")
    public Envelop searchSysDicts(String searchNm, Integer page, Integer rows) {
    public Envelop searchSysDicts(String searchNm, Integer page, Integer rows) {
        String resultStr = "";
        Envelop result = new Envelop();
        Map<String, Object> params = new HashMap<>();
        Map<String, Object> params = new HashMap<>();
        StringBuffer stringBuffer = new StringBuffer();
        StringBuffer stringBuffer = new StringBuffer();
@ -328,29 +324,17 @@ public class SystemDictController extends EnvelopRestEndpoint {
    @GetMapping("searchDictEntryList")
    @GetMapping("searchDictEntryList")
    public Envelop searchDictEntryListForDDL(Long dictId, Integer page, Integer rows) {
    public Envelop searchDictEntryListForDDL(Long dictId, Integer page, Integer rows) {
        String resultStr = "";
        Envelop result = new Envelop();
        Map<String, Object> params = new HashMap<>();
        StringBuffer stringBuffer = new StringBuffer();
        StringBuffer stringBuffer = new StringBuffer();
        if (!StringUtils.isEmpty(dictId)) {
        if (!StringUtils.isEmpty(dictId)) {
            stringBuffer.append("dictId=" + dictId);
            stringBuffer.append("dictId=" + dictId);
        }
        }
        String filters = stringBuffer.toString();
        String filters = stringBuffer.toString();
        params.put("filters", "");
        if (!StringUtils.isEmpty(filters)) {
            params.put("filters", filters);
        }
        if(StringUtils.isEmpty(page) || page == 0){
        if(StringUtils.isEmpty(page) || page == 0){
            page = 1;
            page = 1;
        }
        }
        if(StringUtils.isEmpty(rows) || rows == 0){
        if(StringUtils.isEmpty(rows) || rows == 0){
            rows = 50;
            rows = 50;
        }
        }
        params.put("page", page);
        params.put("size", rows);
        try {
        try {
            String url ="/dictionaries/entries";
            String url ="/dictionaries/entries";
            List<SystemDictEntry> systemDictEntryList = systemDictEntryService.search(null,filters,null,page,rows);
            List<SystemDictEntry> systemDictEntryList = systemDictEntryService.search(null,filters,null,page,rows);
@ -363,7 +347,6 @@ public class SystemDictController extends EnvelopRestEndpoint {
//    @RequestMapping("searchDictForSelect")
//    @RequestMapping("searchDictForSelect")
//    @ResponseBody
//    public Object searchDictForSelect(Long dictId, String searchParm, Integer page, Integer rows) {
//    public Object searchDictForSelect(Long dictId, String searchParm, Integer page, Integer rows) {
//
//
//        String resultStr = "";
//        String resultStr = "";

+ 5 - 27
svr/svr-basic/src/main/java/com/yihu/jw/basic/agadmin/controller/quota/TjDataSaveController.java

@ -7,17 +7,14 @@ import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import io.swagger.annotations.Api;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.annotation.Resource;
import java.io.IOException;
import java.io.IOException;
import java.net.URLDecoder;
import java.net.URLDecoder;
import java.util.Date;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.List;
import java.util.Map;
/**
/**
 * Created by llh on 2017/5/9.
 * Created by llh on 2017/5/9.
@ -27,16 +24,13 @@ import java.util.Map;
@Api( tags = {"网关-统计数据存储"})
@Api( tags = {"网关-统计数据存储"})
public class TjDataSaveController extends EnvelopRestEndpoint {
public class TjDataSaveController extends EnvelopRestEndpoint {
    @Autowired
    @Resource
    TjDataSaveService tjDataSaveService;
    TjDataSaveService tjDataSaveService;
    //查询统计主维度
    //查询统计主维度
    @GetMapping("/getTjDataSave")
    @GetMapping("/getTjDataSave")
    public Envelop searchTjDataSave(String name, String searchParm,int page, int rows){
    public Envelop searchTjDataSave(String name, String searchParm,int page, int rows){
        String url = "/tj/getTjDataSaveList";
        String url = "/tj/getTjDataSaveList";
        String resultStr = "";
        Envelop envelop = new Envelop();
        Map<String, Object> params = new HashMap<>();
        StringBuffer stringBuffer = new StringBuffer();
        StringBuffer stringBuffer = new StringBuffer();
        if (!StringUtils.isEmpty(name)) {
        if (!StringUtils.isEmpty(name)) {
            stringBuffer.append("name?" + name );
            stringBuffer.append("name?" + name );
@ -70,18 +64,10 @@ public class TjDataSaveController extends EnvelopRestEndpoint {
    /**
    /**
     * 新增修改
     * 新增修改
     * @param tjDataSaveModelJsonData
     * @param request
     * @return
     * @throws IOException
     */
     */
    @RequestMapping(value = "updateTjDataSave")
    @RequestMapping(value = "updateTjDataSave")
    public Envelop updateTjDataSave(String tjDataSaveModelJsonData, HttpServletRequest request) throws IOException {
    public Envelop updateTjDataSave(String tjDataSaveModelJsonData) throws IOException {
        String url = "/tj/addTjDataSave";
        String url = "/tj/addTjDataSave";
        String resultStr = "";
        System.out.println();
        Envelop result = new Envelop();
        String[] strings = URLDecoder.decode(tjDataSaveModelJsonData, "UTF-8").split(";");
        String[] strings = URLDecoder.decode(tjDataSaveModelJsonData, "UTF-8").split(";");
        try {
        try {
            TjDataSave detailModel = objectMapper.readValue(strings[0], TjDataSave.class);
            TjDataSave detailModel = objectMapper.readValue(strings[0], TjDataSave.class);
@ -115,8 +101,6 @@ public class TjDataSaveController extends EnvelopRestEndpoint {
    /**
    /**
     * 删除消息
     * 删除消息
     * @param tjDataSaveId
     * @return
     */
     */
    @RequestMapping("deleteTjDataSave")
    @RequestMapping("deleteTjDataSave")
    public Envelop deleteTjDataSave(Long tjDataSaveId) {
    public Envelop deleteTjDataSave(Long tjDataSaveId) {
@ -134,8 +118,6 @@ public class TjDataSaveController extends EnvelopRestEndpoint {
    /**
    /**
     * 根据id获取消息
     * 根据id获取消息
     * @param id
     * @return
     */
     */
    @GetMapping("getTjDataSaveById")
    @GetMapping("getTjDataSaveById")
    public Envelop getTjQuotaById(Long id ) {
    public Envelop getTjQuotaById(Long id ) {
@ -152,8 +134,6 @@ public class TjDataSaveController extends EnvelopRestEndpoint {
    /**
    /**
     * 校验name是否唯一,true已存在
     * 校验name是否唯一,true已存在
     * @param name
     * @return
     */
     */
    @GetMapping("hasExistsName")
    @GetMapping("hasExistsName")
    public Envelop hasExistsName(String name) {
    public Envelop hasExistsName(String name) {
@ -163,15 +143,13 @@ public class TjDataSaveController extends EnvelopRestEndpoint {
            List<TjDataSave> list = tjDataSaveService.search(filter);
            List<TjDataSave> list = tjDataSaveService.search(filter);
            return ObjEnvelop.getSuccess("查询成功",list.size() > 0);
            return ObjEnvelop.getSuccess("查询成功",list.size() > 0);
        } catch (Exception e) {
        } catch (Exception e) {
            e.getMessage();
            e.printStackTrace();
        }
        }
        return failed("查询失败");
        return failed("查询失败");
    }
    }
    /**
    /**
     * 校验code是否唯一
     * 校验code是否唯一
     * @param code
     * @return
     */
     */
    @GetMapping("hasExistsCode")
    @GetMapping("hasExistsCode")
    public Envelop hasExistsCode(String code) {
    public Envelop hasExistsCode(String code) {
@ -181,7 +159,7 @@ public class TjDataSaveController extends EnvelopRestEndpoint {
            List<TjDataSave> list = tjDataSaveService.search(filter);
            List<TjDataSave> list = tjDataSaveService.search(filter);
            return ObjEnvelop.getSuccess("查询成功",list.size() > 0);
            return ObjEnvelop.getSuccess("查询成功",list.size() > 0);
        } catch (Exception e) {
        } catch (Exception e) {
            e.getMessage();
            e.printStackTrace();
        }
        }
        return  failed("查询失败");
        return  failed("查询失败");
    }
    }

+ 5 - 20
svr/svr-basic/src/main/java/com/yihu/jw/basic/agadmin/controller/quota/TjDataSourceController.java

@ -7,20 +7,17 @@ import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import io.swagger.annotations.Api;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import javax.annotation.Resource;
import java.io.IOException;
import java.io.IOException;
import java.net.URLDecoder;
import java.net.URLDecoder;
import java.util.Date;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.List;
import java.util.Map;
/**
/**
 * Created by llh on 2017/5/9.
 * Created by llh on 2017/5/9.
@ -30,7 +27,7 @@ import java.util.Map;
@Api( tags = {"网关-统计数据源"})
@Api( tags = {"网关-统计数据源"})
public class TjDataSourceController extends EnvelopRestEndpoint {
public class TjDataSourceController extends EnvelopRestEndpoint {
    @Autowired
    @Resource
    TjDataSourceService tjDataSourceService;
    TjDataSourceService tjDataSourceService;
    //查询
    //查询
@ -70,13 +67,9 @@ public class TjDataSourceController extends EnvelopRestEndpoint {
    /**
    /**
     * 新增修改
     * 新增修改
     * @param tjDataSourceModelJsonData
     * @param request
     * @return
     * @throws IOException
     */
     */
    @PostMapping(value = "updateTjDataSource")
    @PostMapping(value = "updateTjDataSource")
    public Envelop updateTjDataSource(String tjDataSourceModelJsonData, HttpServletRequest request) throws IOException {
    public Envelop updateTjDataSource(String tjDataSourceModelJsonData) throws IOException {
        String url = "/tj/addTjDataSource";
        String url = "/tj/addTjDataSource";
        String[] strings = URLDecoder.decode(tjDataSourceModelJsonData, "UTF-8").split(";");
        String[] strings = URLDecoder.decode(tjDataSourceModelJsonData, "UTF-8").split(";");
        TjDataSource detailModel = objectMapper.readValue(strings[0],TjDataSource.class);
        TjDataSource detailModel = objectMapper.readValue(strings[0],TjDataSource.class);
@ -109,8 +102,6 @@ public class TjDataSourceController extends EnvelopRestEndpoint {
    /**
    /**
     * 删除消息
     * 删除消息
     * @param tjDataSourceId
     * @return
     */
     */
    @PostMapping("deleteTjDataSource")
    @PostMapping("deleteTjDataSource")
    public Envelop deleteTjDataSource(Long tjDataSourceId) {
    public Envelop deleteTjDataSource(Long tjDataSourceId) {
@ -128,8 +119,6 @@ public class TjDataSourceController extends EnvelopRestEndpoint {
    /**
    /**
     * 根据id获取消息
     * 根据id获取消息
     * @param id
     * @return
     */
     */
    @GetMapping("getTjDataSourceById")
    @GetMapping("getTjDataSourceById")
    public Envelop getTjQuotaById(Long id ) {
    public Envelop getTjQuotaById(Long id ) {
@ -145,8 +134,6 @@ public class TjDataSourceController extends EnvelopRestEndpoint {
    /**
    /**
     * 校验name是否唯一,true已存在
     * 校验name是否唯一,true已存在
     * @param name
     * @return
     */
     */
    @GetMapping("hasExistsName")
    @GetMapping("hasExistsName")
    public Envelop hasExistsName(String name) {
    public Envelop hasExistsName(String name) {
@ -156,15 +143,13 @@ public class TjDataSourceController extends EnvelopRestEndpoint {
            List<TjDataSource> list = tjDataSourceService.search(filter);
            List<TjDataSource> list = tjDataSourceService.search(filter);
            return ObjEnvelop.getSuccess("查询成功",list.size() > 0);
            return ObjEnvelop.getSuccess("查询成功",list.size() > 0);
        } catch (Exception e) {
        } catch (Exception e) {
            e.getMessage();
            e.printStackTrace();
        }
        }
        return  failed("查询失败");
        return  failed("查询失败");
    }
    }
    /**
    /**
     * 校验code是否唯一
     * 校验code是否唯一
     * @param code
     * @return
     */
     */
    @GetMapping("hasExistsCode")
    @GetMapping("hasExistsCode")
    public Envelop hasExistsCode(String code) {
    public Envelop hasExistsCode(String code) {
@ -174,7 +159,7 @@ public class TjDataSourceController extends EnvelopRestEndpoint {
            List<TjDataSource> list = tjDataSourceService.search(filter);
            List<TjDataSource> list = tjDataSourceService.search(filter);
            return ObjEnvelop.getSuccess("查询成功",list.size() > 0);
            return ObjEnvelop.getSuccess("查询成功",list.size() > 0);
        } catch (Exception e) {
        } catch (Exception e) {
            e.getMessage();
            e.printStackTrace();
        }
        }
        return  failed("查询失败");
        return  failed("查询失败");
    }
    }

+ 7 - 27
svr/svr-basic/src/main/java/com/yihu/jw/basic/agadmin/controller/quota/TjDimensionMainController.java

@ -18,7 +18,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.io.IOException;
import java.net.URLDecoder;
import java.net.URLDecoder;
import java.util.*;
import java.util.*;
@ -40,7 +39,6 @@ public class TjDimensionMainController extends EnvelopRestEndpoint {
    @GetMapping("/getTjDimensionMain")
    @GetMapping("/getTjDimensionMain")
    public Object searchTjDimensionMain(String name, int page, int rows){
    public Object searchTjDimensionMain(String name, int page, int rows){
        String url = "/tj/getTjDimensionMainList";
        String url = "/tj/getTjDimensionMainList";
        String resultStr = "";
        StringBuffer stringBuffer = new StringBuffer();
        StringBuffer stringBuffer = new StringBuffer();
        if (!StringUtils.isEmpty(name)) {
        if (!StringUtils.isEmpty(name)) {
            stringBuffer.append("name?" + name );
            stringBuffer.append("name?" + name );
@ -71,16 +69,11 @@ public class TjDimensionMainController extends EnvelopRestEndpoint {
    /**
    /**
     * 新增修改
     * 新增修改
     * @param tjDimensionMainModelJsonData
     * @param request
     * @return
     * @throws IOException
     */
     */
    @PostMapping(value = "updateTjDimensionMain")
    @PostMapping(value = "updateTjDimensionMain")
    public Object updateTjDimensionMain(String tjDimensionMainModelJsonData, HttpServletRequest request) throws IOException {
    public Object updateTjDimensionMain(String tjDimensionMainModelJsonData) throws IOException {
        String url = "/tj/tjDimensionMain";
        String url = "/tj/tjDimensionMain";
        String resultStr = "";
        System.out.println();
        System.out.println();
        String[] strings = URLDecoder.decode(tjDimensionMainModelJsonData, "UTF-8").split(";");
        String[] strings = URLDecoder.decode(tjDimensionMainModelJsonData, "UTF-8").split(";");
        TjDimensionMain detailModel = objectMapper.readValue(strings[0], TjDimensionMain.class);
        TjDimensionMain detailModel = objectMapper.readValue(strings[0], TjDimensionMain.class);
@ -113,8 +106,6 @@ public class TjDimensionMainController extends EnvelopRestEndpoint {
    /**
    /**
     * 删除消息
     * 删除消息
     * @param tjDimensionMainId
     * @return
     */
     */
    @PostMapping("deleteTjDimensionMain")
    @PostMapping("deleteTjDimensionMain")
    public Object deleteTjDimensionMain(Long tjDimensionMainId) {
    public Object deleteTjDimensionMain(Long tjDimensionMainId) {
@ -134,8 +125,6 @@ public class TjDimensionMainController extends EnvelopRestEndpoint {
    /**
    /**
     * 根据id获取消息
     * 根据id获取消息
     * @param id
     * @return
     */
     */
    @GetMapping("getTjDimensionMainByID")
    @GetMapping("getTjDimensionMainByID")
    public Envelop getTjDimensionMainByID(Long id ) {
    public Envelop getTjDimensionMainByID(Long id ) {
@ -153,8 +142,6 @@ public class TjDimensionMainController extends EnvelopRestEndpoint {
    /**
    /**
     * 校验名称是否唯一
     * 校验名称是否唯一
     * @param name
     * @return
     */
     */
    @GetMapping("isNameExists")
    @GetMapping("isNameExists")
    public Envelop isNameExists(String name) {
    public Envelop isNameExists(String name) {
@ -164,15 +151,13 @@ public class TjDimensionMainController extends EnvelopRestEndpoint {
            List<TjDimensionMain> tjDimensionMains = tjDimensionMainService.search(filter);
            List<TjDimensionMain> tjDimensionMains = tjDimensionMainService.search(filter);
            return ObjEnvelop.getSuccess("",tjDimensionMains.size() >0);
            return ObjEnvelop.getSuccess("",tjDimensionMains.size() >0);
        } catch (Exception e) {
        } catch (Exception e) {
            e.getMessage();
            e.printStackTrace();
        }
        }
        return  failed("查询失败");
        return  failed("查询失败");
    }
    }
    /**
    /**
     * 校验code是否唯一
     * 校验code是否唯一
     * @param code
     * @return
     */
     */
    @GetMapping("isCodeExists")
    @GetMapping("isCodeExists")
    public Envelop isCodeExists(String code) {
    public Envelop isCodeExists(String code) {
@ -182,7 +167,7 @@ public class TjDimensionMainController extends EnvelopRestEndpoint {
            List<TjDimensionMain> tjDimensionMains = tjDimensionMainService.search(filter);
            List<TjDimensionMain> tjDimensionMains = tjDimensionMainService.search(filter);
            return ObjEnvelop.getSuccess("",tjDimensionMains.size() >0);
            return ObjEnvelop.getSuccess("",tjDimensionMains.size() >0);
        } catch (Exception e) {
        } catch (Exception e) {
            e.getMessage();
            e.printStackTrace();
        }
        }
        return  failed("查询失败");
        return  failed("查询失败");
    }
    }
@ -190,7 +175,6 @@ public class TjDimensionMainController extends EnvelopRestEndpoint {
    @GetMapping("/getTjDimensionMainInfo")
    @GetMapping("/getTjDimensionMainInfo")
    public Envelop getTjDimensionMainInfo(String quotaCode, String name, int page, int rows){
    public Envelop getTjDimensionMainInfo(String quotaCode, String name, int page, int rows){
        String url = "/tj/getTjDimensionMainInfoList";
        String url = "/tj/getTjDimensionMainInfoList";
        String resultStr = "";
        StringBuffer mainFilter = new StringBuffer("status=1");
        StringBuffer mainFilter = new StringBuffer("status=1");
        if (!StringUtils.isEmpty(name)) {
        if (!StringUtils.isEmpty(name)) {
            mainFilter.append("name?" + name + " g1;code?" + name + " g1;");
            mainFilter.append("name?" + name + " g1;code?" + name + " g1;");
@ -210,12 +194,8 @@ public class TjDimensionMainController extends EnvelopRestEndpoint {
                    }
                    }
                }
                }
                List<String> list = getTjQuotaDimensionMainOfMainCode(filter, null);
                List<String> list = getTjQuotaDimensionMainOfMainCode(filter, null);
                for (int i=0; i<mainModelList.size(); i++) {
                    if (list.contains(mainModelList.get(i).getCode())) {
                        mainModelList.get(i).setChecked(true);
                    } else {
                        mainModelList.get(i).setChecked(false);
                    }
                for (TjDimensionMain tjDimensionMain : mainModelList) {
                    tjDimensionMain.setChecked(list.contains(tjDimensionMain.getCode()));
                }
                }
                return MixEnvelop.getSuccess("查询成功",mainModelList2,mainModelList,page,rows,tjDimensionMainService.getCount(filters));
                return MixEnvelop.getSuccess("查询成功",mainModelList2,mainModelList,page,rows,tjDimensionMainService.getCount(filters));
            }else{
            }else{
@ -231,8 +211,8 @@ public class TjDimensionMainController extends EnvelopRestEndpoint {
        List<TjQuotaDimensionMain> mainModelList = tjQuotaDimensionMainService.search(filters, sorts);
        List<TjQuotaDimensionMain> mainModelList = tjQuotaDimensionMainService.search(filters, sorts);
        List<String> list = new ArrayList<>();
        List<String> list = new ArrayList<>();
        if(mainModelList.size() > 0){
        if(mainModelList.size() > 0){
            for (int i=0; i<mainModelList.size(); i++) {
                list.add(mainModelList.get(i).getMainCode());
            for (TjQuotaDimensionMain tjQuotaDimensionMain : mainModelList) {
                list.add(tjQuotaDimensionMain.getMainCode());
            }
            }
        }
        }
        return list;
        return list;

+ 10 - 34
svr/svr-basic/src/main/java/com/yihu/jw/basic/agadmin/controller/quota/TjDimensionSlaveController.java

@ -10,14 +10,13 @@ import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import io.swagger.annotations.Api;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import javax.annotation.Resource;
import java.io.IOException;
import java.io.IOException;
import java.net.URLDecoder;
import java.net.URLDecoder;
import java.util.*;
import java.util.*;
@ -30,18 +29,15 @@ import java.util.*;
@Api( tags = {"网关-统计从维度"})
@Api( tags = {"网关-统计从维度"})
public class TjDimensionSlaveController extends EnvelopRestEndpoint {
public class TjDimensionSlaveController extends EnvelopRestEndpoint {
    @Autowired
    @Resource
    TjDimensionSlaveService tjDimensionSlaveService;
    TjDimensionSlaveService tjDimensionSlaveService;
    @Autowired
    @Resource
    TjQuotaDimensionSlaveService tjQuotaDimensionSlaveService;
    TjQuotaDimensionSlaveService tjQuotaDimensionSlaveService;
    //查询
    //查询
    @GetMapping("/getTjDimensionSlave")
    @GetMapping("/getTjDimensionSlave")
    public Envelop searchTjDimensionSlave(String name, int page, int rows){
    public Envelop searchTjDimensionSlave(String name, int page, int rows){
        String url = "/tj/getTjDimensionSlaveList";
        String url = "/tj/getTjDimensionSlaveList";
        String resultStr = "";
        Envelop envelop = new Envelop();
        Map<String, Object> params = new HashMap<>();
        StringBuffer stringBuffer = new StringBuffer();
        StringBuffer stringBuffer = new StringBuffer();
        if (!StringUtils.isEmpty(name)) {
        if (!StringUtils.isEmpty(name)) {
            stringBuffer.append("name?" + name );
            stringBuffer.append("name?" + name );
@ -72,13 +68,9 @@ public class TjDimensionSlaveController extends EnvelopRestEndpoint {
    /**
    /**
     * 新增修改
     * 新增修改
     * @param tjDimensionSlaveModelJsonData
     * @param request
     * @return
     * @throws IOException
     */
     */
    @PostMapping(value = "updateTjDimensionSlave")
    @PostMapping(value = "updateTjDimensionSlave")
    public Envelop updateTjDimensionSlave(String tjDimensionSlaveModelJsonData, HttpServletRequest request) throws IOException {
    public Envelop updateTjDimensionSlave(String tjDimensionSlaveModelJsonData) throws IOException {
        String url = "/tj/tjDimensionSlave";
        String url = "/tj/tjDimensionSlave";
        String[] strings = URLDecoder.decode(tjDimensionSlaveModelJsonData, "UTF-8").split(";");
        String[] strings = URLDecoder.decode(tjDimensionSlaveModelJsonData, "UTF-8").split(";");
@ -112,8 +104,6 @@ public class TjDimensionSlaveController extends EnvelopRestEndpoint {
    /**
    /**
     * 删除消息
     * 删除消息
     * @param tjDimensionSlaveId
     * @return
     */
     */
    @PostMapping("deleteTjDimensionSlave")
    @PostMapping("deleteTjDimensionSlave")
    public Envelop deleteTjDimensionSlave(Long tjDimensionSlaveId) {
    public Envelop deleteTjDimensionSlave(Long tjDimensionSlaveId) {
@ -132,8 +122,6 @@ public class TjDimensionSlaveController extends EnvelopRestEndpoint {
    /**
    /**
     * 根据id获取消息
     * 根据id获取消息
     * @param id
     * @return
     */
     */
    @GetMapping("getTjDimensionSlaveById")
    @GetMapping("getTjDimensionSlaveById")
    public Envelop getTjDimensionSlaveById( Long id ) {
    public Envelop getTjDimensionSlaveById( Long id ) {
@ -149,8 +137,6 @@ public class TjDimensionSlaveController extends EnvelopRestEndpoint {
    /**
    /**
     * 校验名称是否唯一
     * 校验名称是否唯一
     * @param name
     * @return
     */
     */
    @GetMapping("isNameExists")
    @GetMapping("isNameExists")
    public Envelop isNameExists(String name) {
    public Envelop isNameExists(String name) {
@ -160,15 +146,13 @@ public class TjDimensionSlaveController extends EnvelopRestEndpoint {
            List<TjDimensionSlave> list = tjDimensionSlaveService.search(filter);
            List<TjDimensionSlave> list = tjDimensionSlaveService.search(filter);
            return ObjEnvelop.getSuccess("查询成功",list.size() > 0);
            return ObjEnvelop.getSuccess("查询成功",list.size() > 0);
        } catch (Exception e) {
        } catch (Exception e) {
            e.getMessage();
            e.printStackTrace();
        }
        }
        return failed("查询失败");
        return failed("查询失败");
    }
    }
    /**
    /**
     * 校验code是否唯一
     * 校验code是否唯一
     * @param code
     * @return
     */
     */
    @GetMapping("isCodeExists")
    @GetMapping("isCodeExists")
    public Envelop isCodeExists(String code) {
    public Envelop isCodeExists(String code) {
@ -178,7 +162,7 @@ public class TjDimensionSlaveController extends EnvelopRestEndpoint {
            List<TjDimensionSlave> list = tjDimensionSlaveService.search(filter);
            List<TjDimensionSlave> list = tjDimensionSlaveService.search(filter);
            return ObjEnvelop.getSuccess("查询成功",list.size() > 0);
            return ObjEnvelop.getSuccess("查询成功",list.size() > 0);
        } catch (Exception e) {
        } catch (Exception e) {
            e.getMessage();
            e.printStackTrace();
        }
        }
        return failed("查询失败");
        return failed("查询失败");
    }
    }
@ -208,12 +192,8 @@ public class TjDimensionSlaveController extends EnvelopRestEndpoint {
                    }
                    }
                }
                }
                List<String> list = getTjQuotaDimensionMainOfSlaveCode(filter, null);
                List<String> list = getTjQuotaDimensionMainOfSlaveCode(filter, null);
                for (int i = 0; i < mainModelList.size(); i++) {
                    if (list.contains(mainModelList.get(i).getCode())) {
                        mainModelList.get(i).setChecked(true);
                    } else {
                        mainModelList.get(i).setChecked(false);
                    }
                for (TjDimensionSlave tjDimensionSlave : mainModelList) {
                    tjDimensionSlave.setChecked(list.contains(tjDimensionSlave.getCode()));
                }
                }
                return MixEnvelop.getSuccess("",qtjQuotaDimensionSlaveList,mainModelList,page,rows,tjDimensionSlaveService.getCount(filters));
                return MixEnvelop.getSuccess("",qtjQuotaDimensionSlaveList,mainModelList,page,rows,tjDimensionSlaveService.getCount(filters));
            } else {
            } else {
@ -228,13 +208,9 @@ public class TjDimensionSlaveController extends EnvelopRestEndpoint {
    public List<String> getTjQuotaDimensionMainOfSlaveCode(String filters, String sorts) throws Exception {
    public List<String> getTjQuotaDimensionMainOfSlaveCode(String filters, String sorts) throws Exception {
        List<String> list = new ArrayList<>();
        List<String> list = new ArrayList<>();
        List<TjQuotaDimensionSlave> qtjQuotaDimensionSlaveList = tjQuotaDimensionSlaveService.search(filters, sorts);
        List<TjQuotaDimensionSlave> qtjQuotaDimensionSlaveList = tjQuotaDimensionSlaveService.search(filters, sorts);
        List<TjQuotaDimensionSlave>  tjQuotaDimensionSlaveModelList = new ArrayList<>();
        if (qtjQuotaDimensionSlaveList.size()>0) {
        if (qtjQuotaDimensionSlaveList.size()>0) {
            for (TjQuotaDimensionSlave tjQuotaQuotaDimensionSlaveModel : qtjQuotaDimensionSlaveList) {
                tjQuotaDimensionSlaveModelList.add(tjQuotaQuotaDimensionSlaveModel);
            }
            for (int i=0; i<tjQuotaDimensionSlaveModelList.size(); i++) {
                list.add(tjQuotaDimensionSlaveModelList.get(i).getSlaveCode());
            for (TjQuotaDimensionSlave tjQuotaDimensionSlave : qtjQuotaDimensionSlaveList) {
                list.add(tjQuotaDimensionSlave.getSlaveCode());
            }
            }
        }
        }
        return list;
        return list;

+ 27 - 53
svr/svr-basic/src/main/java/com/yihu/jw/basic/agadmin/controller/quota/TjQuotaController.java

@ -26,6 +26,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestClientException;
import org.springframework.web.client.RestClientException;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.io.*;
@ -41,37 +42,37 @@ import java.util.stream.Collectors;
@Api( tags = {"网关-统计"})
@Api( tags = {"网关-统计"})
public class TjQuotaController extends EnvelopRestEndpoint {
public class TjQuotaController extends EnvelopRestEndpoint {
    @Autowired
    @Resource
    private JobController jobController;
    private JobController jobController;
    @Autowired
    @Resource
    private SystemDictEntryService dictEntryService;
    private SystemDictEntryService dictEntryService;
    @Autowired
    @Resource
    TjQuotaService tjQuotaService;
    TjQuotaService tjQuotaService;
    @Autowired
    @Resource
    private RsResourceQuotaService resourceQuotaService;
    private RsResourceQuotaService resourceQuotaService;
    @Autowired
    @Resource
    TjQuotaDataSaveService tjQuotaDataSaveService;
    TjQuotaDataSaveService tjQuotaDataSaveService;
    @Autowired
    @Resource
    TjQuotaDataSourceService tjQuotaDataSourceService;
    TjQuotaDataSourceService tjQuotaDataSourceService;
    @Autowired
    @Resource
    TjDataSaveService tjDataSaveService;
    TjDataSaveService tjDataSaveService;
    @Autowired
    @Resource
    TjDataSourceService tjDataSourceService;
    TjDataSourceService tjDataSourceService;
    @Autowired
    @Resource
    TjQuotaChartService tjQuotaChartService;
    TjQuotaChartService tjQuotaChartService;
    @Autowired
    @Resource
    TjDimensionMainService tjDimensionMainService;
    TjDimensionMainService tjDimensionMainService;
    @Autowired
    @Resource
    TjDimensionSlaveService tjDimensionSlaveService;
    TjDimensionSlaveService tjDimensionSlaveService;
    @Autowired
    @Resource
    private TjQuotaCategoryService quotaCategoryService;
    private TjQuotaCategoryService quotaCategoryService;
    @Autowired
    @Resource
    TjQuotaDimensionSlaveService tjQuotaDimensionSlaveService;
    TjQuotaDimensionSlaveService tjQuotaDimensionSlaveService;
    @Autowired
    @Resource
    TjQuotaDimensionMainService tjQuotaDimensionMainService;
    TjQuotaDimensionMainService tjQuotaDimensionMainService;
    @Autowired
    @Resource
    private QuotaService quotaService;
    private QuotaService quotaService;
    @Autowired
    @Resource
    TjQuotaLogService tjQuotaLogService;
    TjQuotaLogService tjQuotaLogService;
    @GetMapping("/getTjQuota")
    @GetMapping("/getTjQuota")
@ -255,7 +256,7 @@ public class TjQuotaController extends EnvelopRestEndpoint {
            List<TjQuota> list = tjQuotaService.search(filter);
            List<TjQuota> list = tjQuotaService.search(filter);
            return ObjEnvelop.getSuccess("查询成功",list.size() >0);
            return ObjEnvelop.getSuccess("查询成功",list.size() >0);
        } catch (Exception e) {
        } catch (Exception e) {
            e.getMessage();
            e.printStackTrace();
        }
        }
        return  failed("查询失败");
        return  failed("查询失败");
    }
    }
@ -281,15 +282,6 @@ public class TjQuotaController extends EnvelopRestEndpoint {
     */
     */
    @PostMapping("execuQuota")
    @PostMapping("execuQuota")
    public Envelop execuQuota(Long tjQuotaId, String startDate, String endDate) {
    public Envelop execuQuota(Long tjQuotaId, String startDate, String endDate) {
        Envelop envelop = new Envelop();
        Map<String, Object> params = new HashMap<>();
        params.put("id", tjQuotaId);
        if (!StringUtils.isEmpty(startDate)) {
            params.put("startDate", startDate);
        }
        if (!StringUtils.isEmpty(endDate)) {
            params.put("endDate", endDate);
        }
        try {
        try {
            String url = "/job/execuJob";
            String url = "/job/execuJob";
            return jobController.executeQuota(tjQuotaId,startDate,endDate);
            return jobController.executeQuota(tjQuotaId,startDate,endDate);
@ -331,7 +323,7 @@ public class TjQuotaController extends EnvelopRestEndpoint {
    @GetMapping("selectQuotaResult")
    @GetMapping("selectQuotaResult")
    public Envelop selectQuotaResult(Long tjQuotaId, int page, int rows,
    public Envelop selectQuotaResult(Long tjQuotaId, int page, int rows,
                                    String startTime, String endTime, String orgName,
                                    String startTime, String endTime, String orgName,
                                    String province, String city, String district,String res, HttpServletRequest request) {
                                    String province, String city, String district,String res) {
        String url = "/tj/tjGetQuotaResult";
        String url = "/tj/tjGetQuotaResult";
        try {
        try {
            Map<String, Object> filters = new HashMap<>();
            Map<String, Object> filters = new HashMap<>();
@ -387,17 +379,6 @@ public class TjQuotaController extends EnvelopRestEndpoint {
    @GetMapping("queryQuotaLog")
    @GetMapping("queryQuotaLog")
    public Envelop queryQuotaLog(String quotaCode, String startTime, String endTime, int page, int rows) throws Exception {
    public Envelop queryQuotaLog(String quotaCode, String startTime, String endTime, int page, int rows) throws Exception {
        String url = "/tj/getTjQuotaLogList";
        String url = "/tj/getTjQuotaLogList";
        String resultStr = "";
        Envelop envelop = new Envelop();
        Map<String, Object> params = new HashMap<>();
        params.put("startTime", startTime);
        params.put("endTime", endTime);
        params.put("quotaCode", quotaCode);
        params.put("fields", "");
        params.put("sorts", "");
        params.put("page", page);
        params.put("size", rows);
        try {
        try {
            Map<String, Object> conditionMap = new HashMap<>();
            Map<String, Object> conditionMap = new HashMap<>();
            conditionMap.put("quotaCode", quotaCode);
            conditionMap.put("quotaCode", quotaCode);
@ -444,7 +425,7 @@ public class TjQuotaController extends EnvelopRestEndpoint {
            List<TjQuotaDimensionMain> list = tjQuotaDimensionMainService.search(filters);
            List<TjQuotaDimensionMain> list = tjQuotaDimensionMainService.search(filters);
            return ObjEnvelop.getSuccess("",list.size()>0);
            return ObjEnvelop.getSuccess("",list.size()>0);
        } catch (Exception e) {
        } catch (Exception e) {
            e.getMessage();
            e.printStackTrace();
        }
        }
        return failed("查询失败");
        return failed("查询失败");
    }
    }
@ -521,12 +502,8 @@ public class TjQuotaController extends EnvelopRestEndpoint {
                    }
                    }
                }
                }
                List<String> list = getAllCheckedTjQuotaChart(filters);
                List<String> list = getAllCheckedTjQuotaChart(filters);
                for (int i = 0; i < mainModelList.size(); i++) {
                    if (list.contains(mainModelList.get(i).getCode())) {
                        mainModelList.get(i).setChecked(true);
                    } else {
                        mainModelList.get(i).setChecked(false);
                    }
                for (SystemDictEntry systemDictEntry : mainModelList) {
                    systemDictEntry.setChecked(list.contains(systemDictEntry.getCode()));
                }
                }
                return MixEnvelop.getSuccess("",checkedConventionalDicts,mainModelList,page,rows,dictEntryService.getCount(filter));
                return MixEnvelop.getSuccess("",checkedConventionalDicts,mainModelList,page,rows,dictEntryService.getCount(filter));
            } else {
            } else {
@ -562,8 +539,8 @@ public class TjQuotaController extends EnvelopRestEndpoint {
            if (list != null && list.size() > 0) {
            if (list != null && list.size() > 0) {
                tjQuotaChartService.deleteByQuotaCode(list.get(0).getQuotaCode());
                tjQuotaChartService.deleteByQuotaCode(list.get(0).getQuotaCode());
            }
            }
            for (int i=0; i<list.size(); i++) {
                tjQuotaChartService.save(list.get(i));
            for (TjQuotaChart tjQuotaChart : list) {
                tjQuotaChartService.save(tjQuotaChart);
            }
            }
            return ObjEnvelop.getSuccess("指标图表信息更新成功!", list);
            return ObjEnvelop.getSuccess("指标图表信息更新成功!", list);
        } catch (RestClientException e) {
        } catch (RestClientException e) {
@ -801,8 +778,6 @@ public class TjQuotaController extends EnvelopRestEndpoint {
     *
     *
     * @param name  检索字段名称
     * @param name  检索字段名称
     * @param codes 检索列表
     * @param codes 检索列表
     * @return
     * @throws Exception
     */
     */
    private List<String> findExistCodeOrName(String name, Set<String> codes) throws Exception {
    private List<String> findExistCodeOrName(String name, Set<String> codes) throws Exception {
@ -834,9 +809,9 @@ public class TjQuotaController extends EnvelopRestEndpoint {
    private Map<String, String> findExistQuotaType(Set<String> names) throws Exception {
    private Map<String, String> findExistQuotaType(Set<String> names) throws Exception {
        Map<String, String> map = new HashMap<>();
        Map<String, String> map = new HashMap<>();
        List<Object> list = (List<Object>)quotaCategoryService.getQuotaCategoryByName(toEntity(toJson(names), String[].class));
        List<Object> list = (List<Object>)quotaCategoryService.getQuotaCategoryByName(toEntity(toJson(names), String[].class));
        for(int i = 0 ;i < list.size() ; i++){
            Object[] objectList=(Object[])list.get(i);
            if(null!=objectList[0]&&null!=objectList[1]){
        for (Object o : list) {
            Object[] objectList = (Object[]) o;
            if (null != objectList[0] && null != objectList[1]) {
                map.put(objectList[0].toString(), objectList[1].toString());
                map.put(objectList[0].toString(), objectList[1].toString());
            }
            }
        }
        }
@ -913,7 +888,6 @@ public class TjQuotaController extends EnvelopRestEndpoint {
     */
     */
    @PostMapping("removeQuota")
    @PostMapping("removeQuota")
    public Object removeQuota(Long tjQuotaId) {
    public Object removeQuota(Long tjQuotaId) {
        Envelop envelop = new Envelop();
        try {
        try {
            return jobController.removeQuota(tjQuotaId);
            return jobController.removeQuota(tjQuotaId);
        } catch (Exception e) {
        } catch (Exception e) {

+ 10 - 12
svr/svr-basic/src/main/java/com/yihu/jw/basic/agadmin/controller/report/ReportController.java

@ -15,7 +15,6 @@ import jxl.Workbook;
import jxl.format.CellFormat;
import jxl.format.CellFormat;
import jxl.write.*;
import jxl.write.*;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RestController;
@ -51,7 +50,7 @@ public class ReportController extends EnvelopRestEndpoint {
        calendar.setTime(endDate);
        calendar.setTime(endDate);
        calendar.add(calendar.DATE, 1);//把日期往后增加一天.整数往后推,负数往前移动
        calendar.add(calendar.DATE, 1);//把日期往后增加一天.整数往后推,负数往前移动
        endDate = calendar.getTime();   //日期往后推一天
        endDate = calendar.getTime();   //日期往后推一天
        QcQuotaResult qc = null;
        QcQuotaResult qc;
        //按区域查询统计结果集
        //按区域查询统计结果集
        quotaList = qcQuotaResultService.getQuotaListByLocation(location, startDate, endDate);
        quotaList = qcQuotaResultService.getQuotaListByLocation(location, startDate, endDate);
        if(null!=quotaList&&quotaList.size() > 0){
        if(null!=quotaList&&quotaList.size() > 0){
@ -355,7 +354,6 @@ public class ReportController extends EnvelopRestEndpoint {
        Map<String, MQcDailyReportResultDetail> detailMap = new TreeMap();
        Map<String, MQcDailyReportResultDetail> detailMap = new TreeMap();
        Map<String, MQcDailyReportResultDetail> detailAnMap = new TreeMap();
        Map<String, MQcDailyReportResultDetail> detailAnMap = new TreeMap();
        Map<String, MQcDailyReportResultDetail> detailMonMap = new TreeMap();
        Map<String, MQcDailyReportResultDetail> detailMonMap = new TreeMap();
        MQcDailyReportResultDetail qrd = null;
        if(null!=detailQuotaList&&detailQuotaList.size() > 0){
        if(null!=detailQuotaList&&detailQuotaList.size() > 0){
            for (int i = 0; i < detailQuotaList.size(); i++) {
            for (int i = 0; i < detailQuotaList.size(); i++) {
                Object[] obj = (Object[]) detailQuotaList.get(i);
                Object[] obj = (Object[]) detailQuotaList.get(i);
@ -434,16 +432,16 @@ public class ReportController extends EnvelopRestEndpoint {
                    String value="";
                    String value="";
                    if(obj[4] != null && obj[5] != null && obj[6] != null && obj[7] != null){
                    if(obj[4] != null && obj[5] != null && obj[6] != null && obj[7] != null){
                        //实收数 (数据元的实收为 应收 - 错误数(标识为空的错误code))
                        //实收数 (数据元的实收为 应收 - 错误数(标识为空的错误code))
                        totalNum = Integer.valueOf(obj[4].toString());
                        totalNum = Integer.parseInt(obj[4].toString());
                        qc.setTotalNum(totalNum);
                        qc.setTotalNum(totalNum);
                        //应收数
                        //应收数
                        realNum = Integer.valueOf(obj[5].toString());
                        realNum = Integer.parseInt(obj[5].toString());
                        qc.setRealNum(realNum);
                        qc.setRealNum(realNum);
                        //错误数量(该字段只针对数据元的准确性统计)
                        //错误数量(该字段只针对数据元的准确性统计)
                        errorNum = Integer.valueOf(obj[6].toString());
                        errorNum = Integer.parseInt(obj[6].toString());
                        qc.setErrorNum(errorNum);
                        qc.setErrorNum(errorNum);
                        //及时采集的档案数量
                        //及时采集的档案数量
                        timelyNum = Integer.valueOf(obj[7].toString());
                        timelyNum = Integer.parseInt(obj[7].toString());
                        qc.setTimelyNum(timelyNum);
                        qc.setTimelyNum(timelyNum);
                        value=calculatePointUtil.calculatePoint(quotaIdstr, realNum, totalNum , errorNum , timelyNum);
                        value=calculatePointUtil.calculatePoint(quotaIdstr, realNum, totalNum , errorNum , timelyNum);
                    }
                    }
@ -485,8 +483,8 @@ public class ReportController extends EnvelopRestEndpoint {
            params.put("startTime",startTime);
            params.put("startTime",startTime);
            params.put("endTime",endTime);
            params.put("endTime",endTime);
            List<Object> quotaList = new ArrayList<Object>();
            List<Object> detailQuotaList = new ArrayList<Object>();
            List<Object> quotaList;
            List<Object> detailQuotaList;
//        int firstDate=(page-1)*size;
//        int firstDate=(page-1)*size;
            Date startDate = DateUtil.formatYMDToYMDHMS(startTime);
            Date startDate = DateUtil.formatYMDToYMDHMS(startTime);
@ -499,13 +497,13 @@ public class ReportController extends EnvelopRestEndpoint {
            //获取区域名称和事件时间
            //获取区域名称和事件时间
            quotaList = qcQuotaResultService.getfindQcListByLocationAndTime(location, startDate, endDate);
            quotaList = qcQuotaResultService.getfindQcListByLocationAndTime(location, startDate, endDate);
            if (null!=quotaList&&quotaList.size() > 0) {
            if (null!=quotaList&&quotaList.size() > 0) {
                for (int i = 0; i < quotaList.size(); i++) {
                    Object[] obj = (Object[]) quotaList.get(i);
                for (Object o : quotaList) {
                    Object[] obj = (Object[]) o;
                    String eventTime = obj[2].toString();
                    String eventTime = obj[2].toString();
                    String newEventTime = "";
                    String newEventTime = "";
                    if (null != eventTime && !"".equals(eventTime)) {
                    if (null != eventTime && !"".equals(eventTime)) {
                        //事件时间
                        //事件时间
                        newEventTime = eventTime.substring(0,4)+"年"+eventTime.substring(5,7)+"月"+eventTime.substring(8,10)+"日";
                        newEventTime = eventTime.substring(0, 4) + "年" + eventTime.substring(5, 7) + "月" + eventTime.substring(8, 10) + "日";
                    }
                    }
                    String qcKey = obj[2].toString().substring(0, 10) + obj[3].toString();
                    String qcKey = obj[2].toString().substring(0, 10) + obj[3].toString();
                    QcQuotaResultAnalyseMap.put(qcKey, newEventTime);
                    QcQuotaResultAnalyseMap.put(qcKey, newEventTime);

+ 15 - 28
svr/svr-basic/src/main/java/com/yihu/jw/basic/agadmin/controller/resource/ResourceBrowseController.java

@ -4,33 +4,22 @@ package com.yihu.jw.basic.agadmin.controller.resource;
import com.yihu.jw.basic.agadmin.service.ResourceBrowseControllerService;
import com.yihu.jw.basic.agadmin.service.ResourceBrowseControllerService;
import com.yihu.jw.basic.resource.service.ResourceBrowseService;
import com.yihu.jw.basic.resource.service.ResourceBrowseService;
import com.yihu.jw.basic.resource.service.RsResourceService;
import com.yihu.jw.basic.resource.service.RsResourceService;
import com.yihu.jw.entity.ehr.resource.RsResource;
import com.yihu.jw.restmodel.ehr.resource.MRsColumnsModel;
import com.yihu.jw.restmodel.ehr.resource.MRsColumnsModel;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.util.http.HttpClientUtil;
import com.yihu.jw.util.network.HttpResponse;
import com.yihu.jw.util.network.HttpUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.Api;
import jxl.Cell;
import jxl.Workbook;
import jxl.write.Label;
import jxl.write.WritableSheet;
import jxl.write.WritableWorkbook;
import org.slf4j.Logger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequest;
import java.io.OutputStream;
import java.util.*;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.regex.Pattern;
@ -89,7 +78,6 @@ public class ResourceBrowseController extends EnvelopRestEndpoint {
    /**
    /**
     * 动态获取GRID的列名
     * 动态获取GRID的列名
     * @param dictId 资源编码
     * @param dictId 资源编码
     * @return
     */
     */
    @GetMapping("/getGridCloumnNames")
    @GetMapping("/getGridCloumnNames")
    public Envelop getGridColumnNames(String dictId) throws Exception {
    public Envelop getGridColumnNames(String dictId) throws Exception {
@ -121,12 +109,6 @@ public class ResourceBrowseController extends EnvelopRestEndpoint {
    /**
    /**
     * 档案资源浏览
     * 档案资源浏览
     * @param resourcesCode
     * @param searchParams
     * @param page
     * @param rows
     * @param request
     * @return
     */
     */
    @GetMapping("/searchResourceData")
    @GetMapping("/searchResourceData")
    public Envelop searchResourceData(String resourcesCode, String searchParams, int page, int rows, HttpServletRequest request) throws Exception {
    public Envelop searchResourceData(String resourcesCode, String searchParams, int page, int rows, HttpServletRequest request) throws Exception {
@ -154,19 +136,24 @@ public class ResourceBrowseController extends EnvelopRestEndpoint {
            List<Map<String, Object>> envelopList = listEnvelop.getDetailModelList();
            List<Map<String, Object>> envelopList = listEnvelop.getDetailModelList();
            List<Map<String, Object>> middleList = new ArrayList<>();
            List<Map<String, Object>> middleList = new ArrayList<>();
            for (Map<String, Object> envelopMap : envelopList) {
            for (Map<String, Object> envelopMap : envelopList) {
                Map<String, Object> resultMap = new HashMap<String, Object>();
                Map<String, Object> resultMap = new HashMap<>();
                for (String key : envelopMap.keySet()) {
                for (String key : envelopMap.keySet()) {
                    String value = envelopMap.get(key) == null? "" : String.valueOf(envelopMap.get(key));
                    String value = envelopMap.get(key) == null? "" : String.valueOf(envelopMap.get(key));
                    if (key.equals("event_type")) {
                    if (key.equals("event_type")) {
                        String eventType = envelopMap.get(key).toString();
                        String eventType = envelopMap.get(key).toString();
                        if (eventType.equals("0")) {
                            resultMap.put(key, "门诊");
                        } else if (eventType.equals("1")) {
                            resultMap.put(key, "住院");
                        } else if (eventType.equals("2")) {
                            resultMap.put(key, "体检");
                        } else {
                            resultMap.put(key, "未知");
                        switch (eventType) {
                            case "0":
                                resultMap.put(key, "门诊");
                                break;
                            case "1":
                                resultMap.put(key, "住院");
                                break;
                            case "2":
                                resultMap.put(key, "体检");
                                break;
                            default:
                                resultMap.put(key, "未知");
                                break;
                        }
                        }
                    } else if (value.contains("T") && value.contains("Z")) {
                    } else if (value.contains("T") && value.contains("Z")) {
                        String newDateStr = value.replace("T", " ").replace("Z", "");
                        String newDateStr = value.replace("T", " ").replace("Z", "");

+ 3 - 3
svr/svr-quota/src/main/java/com/yihu/jw/quota/controller/JobController.java

@ -34,7 +34,7 @@ public class JobController extends BaseController {
    @Transactional
    @Transactional
    public boolean firstExecuteQuota(
    public boolean firstExecuteQuota(
            @ApiParam(name = "id", value = "指标ID", required = true)
            @ApiParam(name = "id", value = "指标ID", required = true)
            @RequestParam(value = "id", required = true) Integer id) {
            @RequestParam(value = "id", required = true) Long id) {
        try {
        try {
            jobService.executeJob(id, "1", null, null);
            jobService.executeJob(id, "1", null, null);
            return true;
            return true;
@ -52,7 +52,7 @@ public class JobController extends BaseController {
    @RequestMapping(value = ServiceApi.TJ.TjQuotaExecute, method = RequestMethod.POST)
    @RequestMapping(value = ServiceApi.TJ.TjQuotaExecute, method = RequestMethod.POST)
    public boolean executeQuota(
    public boolean executeQuota(
            @ApiParam(name = "id", value = "指标ID", required = true)
            @ApiParam(name = "id", value = "指标ID", required = true)
            @RequestParam(value = "id", required = true) Integer id,
            @RequestParam(value = "id", required = true) Long id,
            @ApiParam(name = "startDate", value = "起始日期")
            @ApiParam(name = "startDate", value = "起始日期")
            @RequestParam(value = "startDate", required = false) String startDate,
            @RequestParam(value = "startDate", required = false) String startDate,
            @ApiParam(name = "endDate", value = "截止日期")
            @ApiParam(name = "endDate", value = "截止日期")
@ -71,7 +71,7 @@ public class JobController extends BaseController {
    @RequestMapping(value = ServiceApi.TJ.TjQuotaRemove, method = RequestMethod.POST)
    @RequestMapping(value = ServiceApi.TJ.TjQuotaRemove, method = RequestMethod.POST)
    public boolean removeQuota(
    public boolean removeQuota(
            @ApiParam(name = "id", value = "指标ID", required = true)
            @ApiParam(name = "id", value = "指标ID", required = true)
            @RequestParam(value = "id", required = true) Integer id) {
            @RequestParam(value = "id", required = true) Long id) {
        try {
        try {
            jobService.removeJob(id);
            jobService.removeJob(id);
            return true;
            return true;

+ 2 - 2
svr/svr-quota/src/main/java/com/yihu/jw/quota/controller/QuotaController.java

@ -65,7 +65,7 @@ public class QuotaController extends BaseController {
    @RequestMapping(value = ServiceApi.TJ.TjGetQuotaResult, method = RequestMethod.GET)
    @RequestMapping(value = ServiceApi.TJ.TjGetQuotaResult, method = RequestMethod.GET)
    public MixEnvelop getQuotaResult(
    public MixEnvelop getQuotaResult(
            @ApiParam(name = "id", value = "指标任务ID", required = true)
            @ApiParam(name = "id", value = "指标任务ID", required = true)
            @RequestParam(value = "id" , required = true) int id,
            @RequestParam(value = "id" , required = true) Long id,
            @ApiParam(name = "filters", value = "检索条件", defaultValue = "")
            @ApiParam(name = "filters", value = "检索条件", defaultValue = "")
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "pageNo", value = "页码", defaultValue = "0")
            @ApiParam(name = "pageNo", value = "页码", defaultValue = "0")
@ -113,7 +113,7 @@ public class QuotaController extends BaseController {
    @RequestMapping(value = ServiceApi.TJ.GetQuotaTotalCount, method = RequestMethod.GET)
    @RequestMapping(value = ServiceApi.TJ.GetQuotaTotalCount, method = RequestMethod.GET)
    public MixEnvelop getQuotaTotalCount(
    public MixEnvelop getQuotaTotalCount(
            @ApiParam(name = "id", value = "指标任务ID", required = true)
            @ApiParam(name = "id", value = "指标任务ID", required = true)
            @RequestParam(value = "id" , required = true) int id,
            @RequestParam(value = "id" , required = true) Long id,
            @ApiParam(name = "filters", value = "检索条件", defaultValue = "")
            @ApiParam(name = "filters", value = "检索条件", defaultValue = "")
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "dimension", value = "需要统计不同维度字段多个维度用;隔开", defaultValue = "quotaDate")
            @ApiParam(name = "dimension", value = "需要统计不同维度字段多个维度用;隔开", defaultValue = "quotaDate")

+ 4 - 4
svr/svr-quota/src/main/java/com/yihu/jw/quota/controller/QuotaReportController.java

@ -330,7 +330,7 @@ public class QuotaReportController extends BaseController {
            for (String quotaId : quotaIds) {
            for (String quotaId : quotaIds) {
                Map<String, Object> dataMap = new LinkedHashMap<>();
                Map<String, Object> dataMap = new LinkedHashMap<>();
                TjQuota tjQuota = quotaService.findOne(Integer.valueOf(quotaId));
                TjQuota tjQuota = quotaService.findOne(Long.valueOf(quotaId));
                if (tjQuota != null) {
                if (tjQuota != null) {
                    List<Map<String, Object>> resultListMap = baseStatistsService.getSimpleQuotaReport(tjQuota.getCode(), filter, dimension,true, top);
                    List<Map<String, Object>> resultListMap = baseStatistsService.getSimpleQuotaReport(tjQuota.getCode(), filter, dimension,true, top);
                    if (resultListMap != null && resultListMap.size() > 0) {
                    if (resultListMap != null && resultListMap.size() > 0) {
@ -594,7 +594,7 @@ public class QuotaReportController extends BaseController {
    @RequestMapping(value = ServiceApi.TJ.GetQuotaGroupBy, method = RequestMethod.GET)
    @RequestMapping(value = ServiceApi.TJ.GetQuotaGroupBy, method = RequestMethod.GET)
    public MixEnvelop getQuotaGroupBy(
    public MixEnvelop getQuotaGroupBy(
            @ApiParam(name = "id", value = "指标任务ID", required = true)
            @ApiParam(name = "id", value = "指标任务ID", required = true)
            @RequestParam(value = "id", required = true) int id,
            @RequestParam(value = "id", required = true) Long id,
            @ApiParam(name = "filters", value = "检索条件", defaultValue = "")
            @ApiParam(name = "filters", value = "检索条件", defaultValue = "")
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "dimension", value = "维度字段", defaultValue = "quotaDate")
            @ApiParam(name = "dimension", value = "维度字段", defaultValue = "quotaDate")
@ -663,7 +663,7 @@ public class QuotaReportController extends BaseController {
            Map<String, String> xAxisMap = new HashMap<>();
            Map<String, String> xAxisMap = new HashMap<>();
            for (String quotaId : quotaIds) {
            for (String quotaId : quotaIds) {
                Map<String, Object> dataMap = new HashMap<>();
                Map<String, Object> dataMap = new HashMap<>();
                TjQuota tjQuota = quotaService.findOne(Integer.valueOf(quotaId));
                TjQuota tjQuota = quotaService.findOne(Long.valueOf(quotaId));
                if (null != tjQuota) {
                if (null != tjQuota) {
                    String dictSql = getQuotaDimensionDictSql(tjQuota.getCode(), dimension);
                    String dictSql = getQuotaDimensionDictSql(tjQuota.getCode(), dimension);
                    Map<String, String> dimensionDicMap = new HashMap<>();
                    Map<String, String> dimensionDicMap = new HashMap<>();
@ -878,7 +878,7 @@ public class QuotaReportController extends BaseController {
            for (String quotaId : quotaIds) {
            for (String quotaId : quotaIds) {
                Map<String, Object> dataMap = new LinkedHashMap<>();
                Map<String, Object> dataMap = new LinkedHashMap<>();
                TjQuota tjQuota = quotaService.findOne(Integer.valueOf(quotaId));
                TjQuota tjQuota = quotaService.findOne(Long.valueOf(quotaId));
                if (tjQuota != null) {
                if (tjQuota != null) {
                    List<Map<String, Object>> resultListMap = baseStatistsService.getSimpleQuotaReport(tjQuota.getCode(), filter, dimension,true, top);
                    List<Map<String, Object>> resultListMap = baseStatistsService.getSimpleQuotaReport(tjQuota.getCode(), filter, dimension,true, top);
                    if (resultListMap != null && resultListMap.size() > 0) {
                    if (resultListMap != null && resultListMap.size() > 0) {

+ 1 - 1
svr/svr-quota/src/main/java/com/yihu/jw/quota/dao/jpa/TjQuotaDao.java

@ -7,7 +7,7 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
/**
/**
 * Created by chenweida on 2017/6/1.
 * Created by chenweida on 2017/6/1.
 */
 */
public interface TjQuotaDao extends JpaRepository<TjQuota, Integer>, JpaSpecificationExecutor<TjQuota> {
public interface TjQuotaDao extends JpaRepository<TjQuota, Long>, JpaSpecificationExecutor<TjQuota> {
    TjQuota findByCode(String code);
    TjQuota findByCode(String code);
}
}

+ 3 - 3
svr/svr-quota/src/main/java/com/yihu/jw/quota/etl/Contant.java

@ -217,9 +217,9 @@ public class Contant {
    public static class save_status {
    public static class save_status {
        public static final String success = "1";
        public static final String fail = "0";
        public static final String executing = "2";
        public static final Integer success = 1;
        public static final Integer fail = 0;
        public static final Integer executing = 2;
    }
    }

+ 1 - 1
svr/svr-quota/src/main/java/com/yihu/jw/quota/job/EsQuotaJob.java

@ -169,7 +169,7 @@ public class EsQuotaJob implements Job {
     */
     */
    public void quota(TjQuotaLog tjQuotaLog,QuotaVo quotaVo) {
    public void quota(TjQuotaLog tjQuotaLog,QuotaVo quotaVo) {
        String time = "时间:" + startTime + "到"+ endTime +" , ";
        String time = "时间:" + startTime + "到"+ endTime +" , ";
        String status = "";
        Integer status = 0;
        String content = "";
        String content = "";
        try {
        try {
            //抽取数据
            //抽取数据

+ 2 - 2
svr/svr-quota/src/main/java/com/yihu/jw/quota/service/job/JobService.java

@ -36,7 +36,7 @@ public class JobService {
     * @param endDate     抽取数据截止日期。初始执行时无NULL;立即执行时需要传值;周期执行时也为NULL,如果是基础指标周期执行,后续默认赋值昨天截止。
     * @param endDate     抽取数据截止日期。初始执行时无NULL;立即执行时需要传值;周期执行时也为NULL,如果是基础指标周期执行,后续默认赋值昨天截止。
     * @throws Exception
     * @throws Exception
     */
     */
    public void executeJob(Integer id, String executeFlag, String startDate, String endDate) throws Exception {
    public void executeJob(Long id, String executeFlag, String startDate, String endDate) throws Exception {
        TjQuota tjQuota = quotaDao.getOne(id);
        TjQuota tjQuota = quotaDao.getOne(id);
        if (tjQuota != null) {
        if (tjQuota != null) {
            QuotaVo quotaVo = new QuotaVo();
            QuotaVo quotaVo = new QuotaVo();
@ -81,7 +81,7 @@ public class JobService {
     * @param id 指标ID
     * @param id 指标ID
     * @throws Exception
     * @throws Exception
     */
     */
    public void removeJob(Integer id) throws Exception {
    public void removeJob(Long id) throws Exception {
        TjQuota tjQuota = quotaDao.getOne(id);
        TjQuota tjQuota = quotaDao.getOne(id);
        if (tjQuota != null) {
        if (tjQuota != null) {
            QuotaVo quotaVo = new QuotaVo();
            QuotaVo quotaVo = new QuotaVo();

+ 4 - 4
svr/svr-quota/src/main/java/com/yihu/jw/quota/service/quota/QuotaService.java

@ -21,7 +21,7 @@ public class QuotaService {
    @Autowired
    @Autowired
    private EsResultExtract esResultExtract;
    private EsResultExtract esResultExtract;
    public TjQuota findOne(int id){
    public TjQuota findOne(Long id){
        return quotaDao.getOne(id);
        return quotaDao.getOne(id);
    }
    }
@ -29,7 +29,7 @@ public class QuotaService {
        return quotaDao.findByCode(code);
        return quotaDao.findByCode(code);
    }
    }
    public List<Map<String, Object>> queryResultPage(Integer id,String filters ,int pageNo,int pageSize) throws Exception {
    public List<Map<String, Object>> queryResultPage(Long id,String filters ,int pageNo,int pageSize) throws Exception {
        TjQuota tjQuota= quotaDao.getOne(id);
        TjQuota tjQuota= quotaDao.getOne(id);
        return  esResultExtract.queryResultPage(tjQuota, filters, pageNo, pageSize);
        return  esResultExtract.queryResultPage(tjQuota, filters, pageNo, pageSize);
    }
    }
@ -39,7 +39,7 @@ public class QuotaService {
        return  esResultExtract.queryResultPage(tjQuota, filters, pageNo, pageSize);
        return  esResultExtract.queryResultPage(tjQuota, filters, pageNo, pageSize);
    }
    }
    public long getQuotaTotalCount(Integer id,String filters) throws Exception {
    public long getQuotaTotalCount(Long id,String filters) throws Exception {
        TjQuota tjQuota= quotaDao.getOne(id);
        TjQuota tjQuota= quotaDao.getOne(id);
        long count = esResultExtract.getQuotaTotalCount(tjQuota,filters);
        long count = esResultExtract.getQuotaTotalCount(tjQuota,filters);
        return count;
        return count;
@ -57,7 +57,7 @@ public class QuotaService {
    //多维度数据的总和 返回数据结果集
    //多维度数据的总和 返回数据结果集
    //返回结果 :key为共同维度的组合值,value为数据结果集
    //返回结果 :key为共同维度的组合值,value为数据结果集
    public Map<String,Map<String, Object>> getQuotaResult(Integer id, String filters,String dimension) throws Exception {
    public Map<String,Map<String, Object>> getQuotaResult(Long id, String filters,String dimension) throws Exception {
        String[] dimensions = null;
        String[] dimensions = null;
        if(StringUtils.isNotEmpty(dimension)){
        if(StringUtils.isNotEmpty(dimension)){