Bladeren bron

Merge branch 'dev' of chenweida/patient-co-management into dev

chenweida 7 jaren geleden
bovenliggende
commit
11386304ed

+ 10 - 0
common/common-entity/src/main/java/com/yihu/wlyy/entity/job/QuartzJobConfig.java

@ -27,6 +27,7 @@ public class QuartzJobConfig implements java.io.Serializable {
	private String sqlYear;
	private String cacheKey;//缓存的key
	private String extractType;// 1或者为空:数据库 2ES
	private String timeLevel;//1增量 2到达量 3生成到达量也生成增量
@ -199,4 +200,13 @@ public class QuartzJobConfig implements java.io.Serializable {
	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}
	@Column(name = "time_level", length = 1)
	public String getTimeLevel() {
		return timeLevel;
	}
	public void setTimeLevel(String timeLevel) {
		this.timeLevel = timeLevel;
	}
}

+ 12 - 3
patient-co/patient-co-statistics-es/src/main/java/com/yihu/wlyy/statistics/service/JobService.java

@ -48,7 +48,6 @@ public class JobService {
                if (breakPoint(quartzJobConfig, j)) continue;
                quartzHelper.removeJob(quartzJobConfig.getId() + "-" + j);
                wlyyJobConfigDao.updateStatus(quartzJobConfig.getId(), "0");
                ;
            }
        } else {
            throw new Exception("任务已经停止");
@ -141,14 +140,24 @@ public class JobService {
    }
    private boolean breakPoint(WlyyJobConfigVO wlyyJobConfigVO, int i) {
        if (Integer.valueOf(wlyyJobConfigVO.getId()) > 86 && i == 2) {
        //如果为空或者等3说明纪要生成到达量也要生成增量
        if (StringUtils.isEmpty(wlyyJobConfigVO.getTimeLevel()) || Integer.valueOf(wlyyJobConfigVO.getTimeLevel()) == 3) {
            return true;
        }
        //如果不为空 并且是1或者2 说明只要增量或者只要到达量
        if (!(StringUtils.isEmpty(wlyyJobConfigVO.getTimeLevel())) && Integer.valueOf(wlyyJobConfigVO.getTimeLevel()) == i) {
            return true;
        }
        return false;
    }
    private boolean breakPoint(QuartzJobConfig wlyyJobConfigVO, int i) {
        if (Integer.valueOf(wlyyJobConfigVO.getId()) > 86 && i == 2) {
        //如果为空或者等3说明纪要生成到达量也要生成增量
        if (StringUtils.isEmpty(wlyyJobConfigVO.getTimeLevel()) || Integer.valueOf(wlyyJobConfigVO.getTimeLevel()) == 3) {
            return true;
        }
        //如果不为空 并且是1或者2 说明只要增量或者只要到达量
        if (!(StringUtils.isEmpty(wlyyJobConfigVO.getTimeLevel())) && Integer.valueOf(wlyyJobConfigVO.getTimeLevel()) == i) {
            return true;
        }
        return false;

+ 9 - 0
patient-co/patient-co-statistics-es/src/main/java/com/yihu/wlyy/statistics/vo/WlyyJobConfigVO.java

@ -22,6 +22,7 @@ public class WlyyJobConfigVO implements  Serializable {
    private String sqlDay;//按日统计
    private String sqlYear;//按年统计
    private String cacheKey;//缓存的key
    private String timeLevel;//1增量 2到达量 3生成到达量也生成增量
    public WlyyJobConfigVO() {
@ -154,4 +155,12 @@ public class WlyyJobConfigVO implements  Serializable {
    public void setCacheKey(String cacheKey) {
        this.cacheKey = cacheKey;
    }
    public String getTimeLevel() {
        return timeLevel;
    }
    public void setTimeLevel(String timeLevel) {
        this.timeLevel = timeLevel;
    }
}