Quellcode durchsuchen

lrl -2021-11-22

lirl vor 3 Jahren
Ursprung
Commit
c1a5fc4b23

+ 6 - 0
src/main/java/com/steerinfo/ems/trmactvalue/controller/TRmActValueController.java

@@ -795,4 +795,10 @@ public class TRmActValueController extends BaseRESTfulController {
     	}
         return success();
     }
+
+    @GetMapping("/aaaa")
+    public RESTfulResult aaa(){
+		tRmActValueService.StateTimegranidforDay();
+		return  success();
+	}
 }

+ 5 - 6
src/main/java/com/steerinfo/ems/trmactvalue/service/impl/TRmActValueServiceImpl.java

@@ -105,12 +105,11 @@ public class TRmActValueServiceImpl extends BaseServiceImpl<TRmActValue, HashMap
     @Override
     public void StateTimegranidforDay() {
         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.getYearRmActValue(tRmActItemsDay);
         logger.info("供需实绩粒度为天定时任务结束......");
     }
-
     /**
      * 最小粒度为月的定时任务
      */
@@ -242,10 +241,10 @@ public class TRmActValueServiceImpl extends BaseServiceImpl<TRmActValue, HashMap
      * @param 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) {
             	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("itemid", tRmActItem.getItemid());
         		// 数据是否已存在
@@ -257,10 +256,10 @@ public class TRmActValueServiceImpl extends BaseServiceImpl<TRmActValue, HashMap
     			Short digits = tRmActItem.getDigits() == null ? 2 : tRmActItem.getDigits();
             	TRmActValue MonthtRmActValue = new TRmActValue();
                 MonthtRmActValue.setItemid(tRmActItem.getItemid());
-                MonthtRmActValue.setClock(DateTypeEnum.getMethod("lastMonth").getDate());
+                MonthtRmActValue.setClock("2021-09");
                 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){
 //                    MonthActualvalue=0.0;
 //                    logger.info("id为"+tRmActItem.getItemid()+"计算错误");

+ 5 - 0
src/main/java/com/steerinfo/ems/trmbalancevalue/controller/TRmBalanceValueController.java

@@ -265,4 +265,9 @@ public class TRmBalanceValueController extends BaseRESTfulController {
     	List<Map<String, Object>> item = tRmBalanceValueService.getItem(parmas);
     	return success(item);
     }
+    @GetMapping("/aaaa")
+    public RESTfulResult aaa() {
+        tRmBalanceValueService.state();
+        return success();
+    }
 }

+ 0 - 1
src/main/java/com/steerinfo/ems/trmbalancevalue/mapper/TRmBalanceValueMapper.xml

@@ -632,7 +632,6 @@
         </if>
             and  itemtype='B'
             and  USEFLAG='1'
-
         </where>
         ) ta
         inner JOIN (select * from T_RM_BALANCE_VALUE

+ 0 - 2
src/main/java/com/steerinfo/ems/trmbalancevalue/service/impl/TRmBalanceValueServiceImpl.java

@@ -85,13 +85,11 @@ public class TRmBalanceValueServiceImpl extends BaseServiceImpl<TRmBalanceValue,
  			}
  		}
  		// 每月前3天生成上月数据
-		if(c.get(Calendar.DAY_OF_MONTH) <= 3){
 			for (TRmActItem tRmActItem : bs) {
 				if(TimegranidUtils.getTimegranidList(tRmActItem.getMintimegranid()).contains("MONTH")){
 					this.restatData(tRmActItem.getItemid(), clockm, "MONTH");
 				}
 			}
-		}
 		// 每年前3天生成去年数据
 		if(c.get(Calendar.DAY_OF_YEAR) <= 3){
 			for (TRmActItem tRmActItem : bs) {