|
@@ -105,12 +105,11 @@ public class TRmActValueServiceImpl extends BaseServiceImpl<TRmActValue, HashMap
|
|
@Override
|
|
@Override
|
|
public void StateTimegranidforDay() {
|
|
public void StateTimegranidforDay() {
|
|
List<TRmActItem> tRmActItemsDay = tRmActItemService.getforsj("DAY");
|
|
List<TRmActItem> tRmActItemsDay = tRmActItemService.getforsj("DAY");
|
|
- this.getTRmActValueByFormula(tRmActItemsDay, DateTypeEnum.getMethod("yesterday").getDate(), "DAY");
|
|
|
|
|
|
+ this.getTRmActValueByFormula(tRmActItemsDay, "2021-11-05", "DAY");
|
|
this.getMonthRmActValue(tRmActItemsDay);
|
|
this.getMonthRmActValue(tRmActItemsDay);
|
|
this.getYearRmActValue(tRmActItemsDay);
|
|
this.getYearRmActValue(tRmActItemsDay);
|
|
logger.info("供需实绩粒度为天定时任务结束......");
|
|
logger.info("供需实绩粒度为天定时任务结束......");
|
|
}
|
|
}
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* 最小粒度为月的定时任务
|
|
* 最小粒度为月的定时任务
|
|
*/
|
|
*/
|
|
@@ -242,10 +241,10 @@ public class TRmActValueServiceImpl extends BaseServiceImpl<TRmActValue, HashMap
|
|
* @param tRmActItems 项目
|
|
* @param tRmActItems 项目
|
|
*/
|
|
*/
|
|
public void getMonthRmActValue(List<TRmActItem> tRmActItems) {
|
|
public void getMonthRmActValue(List<TRmActItem> tRmActItems) {
|
|
- if(DateTypeEnum.getMethod("dm").getDate().equals("1")){
|
|
|
|
|
|
+ if(DateTypeEnum.getMethod("dm").getDate().equals("21")){
|
|
for (TRmActItem tRmActItem : tRmActItems) {
|
|
for (TRmActItem tRmActItem : tRmActItems) {
|
|
HashMap<String, Object> id = new HashMap<String, Object>();
|
|
HashMap<String, Object> id = new HashMap<String, Object>();
|
|
- id.put("clock", DateTypeEnum.getMethod("lastMonth").getDate());
|
|
|
|
|
|
+ id.put("clock", "2021-09");
|
|
id.put("timegranid", "MONTH");
|
|
id.put("timegranid", "MONTH");
|
|
id.put("itemid", tRmActItem.getItemid());
|
|
id.put("itemid", tRmActItem.getItemid());
|
|
// 数据是否已存在
|
|
// 数据是否已存在
|
|
@@ -257,10 +256,10 @@ public class TRmActValueServiceImpl extends BaseServiceImpl<TRmActValue, HashMap
|
|
Short digits = tRmActItem.getDigits() == null ? 2 : tRmActItem.getDigits();
|
|
Short digits = tRmActItem.getDigits() == null ? 2 : tRmActItem.getDigits();
|
|
TRmActValue MonthtRmActValue = new TRmActValue();
|
|
TRmActValue MonthtRmActValue = new TRmActValue();
|
|
MonthtRmActValue.setItemid(tRmActItem.getItemid());
|
|
MonthtRmActValue.setItemid(tRmActItem.getItemid());
|
|
- MonthtRmActValue.setClock(DateTypeEnum.getMethod("lastMonth").getDate());
|
|
|
|
|
|
+ MonthtRmActValue.setClock("2021-09");
|
|
MonthtRmActValue.setTimegranid("MONTH");
|
|
MonthtRmActValue.setTimegranid("MONTH");
|
|
//获取计算值(上月数据累加)
|
|
//获取计算值(上月数据累加)
|
|
- Double MonthActualvalue = this.getSumvalue(tRmActItem.getItemid(),DateTypeEnum.getMethod("lastMonth").getDate(),"DAY");
|
|
|
|
|
|
+ Double MonthActualvalue = this.getSumvalue(tRmActItem.getItemid(),"2021-11","DAY");
|
|
// if(MonthActualvalue<0){
|
|
// if(MonthActualvalue<0){
|
|
// MonthActualvalue=0.0;
|
|
// MonthActualvalue=0.0;
|
|
// logger.info("id为"+tRmActItem.getItemid()+"计算错误");
|
|
// logger.info("id为"+tRmActItem.getItemid()+"计算错误");
|