台账模块调整
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,7 @@
|
||||
package com.njcn.executor.handler;
|
||||
|
||||
|
||||
import com.njcn.common.pojo.constant.BizParamConstant;
|
||||
import com.njcn.executor.utils.CommonExecutorUtils;
|
||||
import com.njcn.prepare.harmonic.api.line.CoustmReportFeignClient;
|
||||
import com.njcn.prepare.harmonic.api.line.DistortionRateFeignClient;
|
||||
@@ -27,11 +28,9 @@ public class HarmAberrationRateJob {
|
||||
@XxlJob("harmAberrationRateHandler")
|
||||
public void harmAberrationRateHandler(){
|
||||
|
||||
String command = XxlJobHelper.getJobParam();
|
||||
LineParam lineParam = new LineParam();
|
||||
lineParam.setType(Integer.valueOf(command));
|
||||
|
||||
String date = CommonExecutorUtils.prepareTimeDeal(command);
|
||||
lineParam.setType(Integer.valueOf(BizParamConstant.STAT_BIZ_DAY));
|
||||
String date = CommonExecutorUtils.prepareTimeDeal(BizParamConstant.STAT_BIZ_DAY);
|
||||
//date = "2022-10-26";
|
||||
lineParam.setDataDate(date);
|
||||
lineParam.setDataSource(1);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -25,36 +25,9 @@ public class CommonExecutorUtils {
|
||||
}
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
String date = null;
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
|
||||
switch (command){
|
||||
case BizParamConstant.STAT_BIZ_YEAR :
|
||||
calendar.add(Calendar.YEAR,-1);
|
||||
date = sdf.format(DateUtil.beginOfYear(calendar.getTime()));
|
||||
break;
|
||||
case BizParamConstant.STAT_BIZ_MONTH:
|
||||
//月
|
||||
calendar.add(Calendar.DAY_OF_MONTH,-1);
|
||||
date = sdf.format(DateUtil.beginOfDay(calendar.getTime()));
|
||||
break;
|
||||
case BizParamConstant.STAT_BIZ_QUARTER:
|
||||
//季度
|
||||
calendar.add(Calendar.MONTH,-3);
|
||||
date = sdf.format(DateUtil.beginOfQuarter(calendar.getTime()));
|
||||
break;
|
||||
case BizParamConstant.STAT_BIZ_WEEK:
|
||||
calendar.add(Calendar.WEEK_OF_MONTH,-1);
|
||||
date = sdf.format(DateUtil.beginOfWeek(calendar.getTime()));
|
||||
break;
|
||||
case BizParamConstant.STAT_BIZ_DAY:
|
||||
calendar.add(Calendar.DAY_OF_MONTH,-1);
|
||||
date = sdf.format(DateUtil.beginOfDay(calendar.getTime()));
|
||||
break;
|
||||
default:
|
||||
throw new IllegalStateException("Unexpected value: " + command);
|
||||
}
|
||||
return date;
|
||||
calendar.add(Calendar.DAY_OF_MONTH,-1);
|
||||
log.info("job调度时间:"+sdf.format(calendar.getTime()));
|
||||
return sdf.format(calendar.getTime());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user