Kaynağa Gözat

【华信科】【调试】

wub 1 yıl önce
ebeveyn
işleme
392dfa0dd0

+ 4 - 3
src/main/java/com/uas/eis/task/SaleMonthDataTask.java

@@ -2,7 +2,6 @@ package com.uas.eis.task;
 
 import com.uas.eis.beans.result.BaseResult;
 import com.uas.eis.beans.result.CrmAddResult;
-import com.uas.eis.beans.result.Product;
 import com.uas.eis.dao.BaseDao;
 import com.uas.eis.dao.SqlRowList;
 import com.uas.eis.manager.CommonManager;
@@ -87,9 +86,11 @@ public class SaleMonthDataTask {
         }
     }
 
-    @Scheduled(cron = "0 0 1 * * ?")
+    //@Scheduled(cron = "0 0 1 * * ?")
+    @Scheduled(cron = "0 0/20 0 * * ?")
     public void syncUpdateSaleMonthData() {
-        SqlRowList rs = baseDao.queryForRowSet("select * from saleMonthData left join customer on SM_CUSTCODE=CU_CODE where nvl(cu_fxxkid,' ')<>' ' and nvl(SM_ISUPDATE,0)=-1 and (SM_YEARMONTH=case when to_char(sysdate,'dd')='01' then to_char(add_months(sysdate,-1),'yyyymm') else to_char(add_months(sysdate,0),'yyyymm') end) order by sm_id");
+       // SqlRowList rs = baseDao.queryForRowSet("select * from saleMonthData left join customer on SM_CUSTCODE=CU_CODE where nvl(cu_fxxkid,' ')<>' ' and nvl(SM_ISUPDATE,0)=-1 and (SM_YEARMONTH=case when to_char(sysdate,'dd')='01' then to_char(add_months(sysdate,-1),'yyyymm') else to_char(add_months(sysdate,0),'yyyymm') end) order by sm_id");
+        SqlRowList rs = baseDao.queryForRowSet("select * from saleMonthData left join customer on SM_CUSTCODE=CU_CODE where nvl(cu_fxxkid,' ')<>' ' and nvl(SM_ISUPDATE,0)=-1 and SM_YEARMONTH  in ('202401','202402') order by sm_id");
         //SqlRowList rs = baseDao.queryForRowSet("select * from saleMonthData left join customer on SM_CUSTCODE=CU_CODE where nvl(cu_fxxkid,' ')<>' ' and nvl(SM_ISUPDATE,0)=-1 and (SM_YEARMONTH=case when to_char(to_date('20220501','yyyymmdd'),'dd')='01' then to_char(add_months(to_date('20220501','yyyymmdd'),-1),'yyyymm') else to_char(add_months(to_date('20220501','yyyymmdd'),0),'yyyymm') end) order by sm_id");
         //SqlRowList rs = baseDao.queryForRowSet("select * from saleMonthData left join customer on SM_CUSTCODE=CU_CODE where nvl(cu_fxxkid,' ')<>' ' and sm_id=654 order by sm_id");
         while (rs.next()) {