zxf 2023-01-08 13:30:00 +08:00
parent 21435fb017
commit 4908f1ab36
8 changed files with 42 additions and 3 deletions

Binary file not shown.

Binary file not shown.

View File

@ -1,3 +1,3 @@
#save ini #save ini
#Sun Dec 04 20:48:37 CST 2022 #Sat Jan 07 21:15:24 CST 2023
deploystamp=1612237236000 deploystamp=1612237236000

View File

@ -17,7 +17,7 @@ import java.util.Map.Entry;
* *
* 20181126 * 20181126
*/ */
@Job("0 21 16 * * ?") //@Job("0 21 16 * * ?")
public class TaskAuthJob extends BaseJob{ public class TaskAuthJob extends BaseJob{

View File

@ -17,7 +17,7 @@ import java.util.Map.Entry;
* *
* 20181126 * 20181126
*/ */
@Job("0 51 08 * * ?") //@Job("0 51 08 * * ?")
public class TaskJob extends BaseJob{ public class TaskJob extends BaseJob{

View File

@ -0,0 +1,39 @@
package rush;
import com.aisino.aosplus.core.dao.DbHelper;
import com.aisino.aosplus.plugin.job.BaseJob;
import com.aisino.aosplus.plugin.job.Job;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;
@Job("0 16 21 * * ?")
public class UpdateCrmEnddate extends BaseJob {
@Override
public void execute() {
//判断下是否需要去更新一些东西
System.out.println("---------------开始------------------");
// List<Map> list=DbHelper.getDbService().queryMapList("select * from dian where end_date is null");
List<Map> list=DbHelper.getDbService().queryMapList("select * from zhao where rush_name is null and customer_id is not null");
for(int i=0;i<list.size();i++){
Map map = DbHelper.getDbService("oracle_crm").queryMap("select CRM_Get_Cust_Max_EndDate(t.org_customer_id) CRM_END_DATE from CUS_ORG_CUSTOMER t"
+ " where t.org_customer_id=? and rownum=1", list.get(i).get("customer_id"));
if(map!=null) {
Date crmEndDate = (Date) map.get("crm_end_date");
DateFormat dateFormat = new SimpleDateFormat("yyyy-mm-dd hh:mm:ss");
if (crmEndDate != null) {
String strDate = dateFormat.format(crmEndDate);
DbHelper.getDbService().commit();
// DbHelper.getDbService().update("update dian set end_date=? where customer_id=?", strDate.substring(0,10), list.get(i).get("customer_id"));
DbHelper.getDbService().update("update zhao set rush_name=? where customer_id=?", strDate.substring(0,10), list.get(i).get("customer_id"));
DbHelper.getDbService().commit();
}
}
}
}
}