Commit d8c8d581 by Java-任明波

添加注释

parent c25c78c8
......@@ -21,7 +21,10 @@ import com.foc.conf.GConstants;
public class AnkeDateMiIdMain {
/**
*
* 获取大于某个时间的最小ID值
* java -jar jd-anke-minid-2.16.jar "2017-09-08 01:00:00"
* 文件目录: /mnt/foc/project/task/dbsounds
* 导出文件名称: jd-anke-minid-2.16.jar
* @author renmb
* @time 2017年9月8日
* @param args
......
......@@ -22,6 +22,10 @@ import com.foc.util.DateUtil;
/**
* 每天定时同步昨天和今天的数据
* 只同步航班动态数据
* # 每分钟同步一次航班动态数据
* *#1 4-23 * * * root bash /mnt/foc/project/task/rundyntask.sh
* *#1 0-2 * * * root bash /mnt/foc/project/task/rundyntask.sh
* 导出文件名称:jd-task-dynamics-2.0.jar
*
* @team IT Team
* @author renmb
......
......@@ -23,7 +23,9 @@ import com.foc.util.IdWorker;
import com.foc.version.VersionService;
/**
*
* # 同步飞行计划书数据
* *#3 4-23 * * * root bash /mnt/foc/project/task/runassigment.sh
* 导出文件名称:jd-task-assigment-2.0.jar
* @team IT Team
* @author renmb
* @version 1.0
......
......@@ -12,6 +12,9 @@ import com.foc.hrm.service.HRMUpdatePreMobileService;
import com.foc.util.DateUtil;
/**
* # 格式化手机号和座机号
* 1 2 * * * root bash /mnt/foc/project/task/runupdatehrmtask.sh
* 导出文件名称: jd-task-hrm-update-2.0.jar
*
* @team IT Team
* @author renmb
......
......@@ -21,6 +21,8 @@ import com.foc.util.DateUtil;
/**
* 每天定时同步昨天和今天的数据
* 只同步ODS数据
* *#1 * * * * root bash /mnt/foc/project/task/runodschangetask.sh
* 导出文件名称: jd-task-odschange-2.0.jar
*
* @team IT Team
* @author renmb
......
......@@ -21,6 +21,11 @@ import com.foc.util.DateUtil;
/**
* 每天定时同步昨天和今天的数据
* 只同步ODS数据
* # 每分钟同步一次ODS数据
* *#1 4-23 * * * root bash /mnt/foc/project/task/runodstask.sh
* *#1 0-2 * * * root bash /mnt/foc/project/task/runodstask.sh
* *#1 * * * * root bash /mnt/foc/project/task/runodschangetask.sh
* 导出文件名称:jd-task-ods-2.0.jar
*
* @team IT Team
* @author renmb
......
......@@ -13,6 +13,9 @@ import com.foc.plan.push.service.PlanPushService;
import com.foc.util.DateUtil;
/**
* # 签到推送
* *#1 5-23 * * * root bash /mnt/foc/project/task/runpushtask.sh
* 导出文件名称: jd-task-push-2.6.jar
*
* @team BBDTEK IT Team
* @author renmb
......
......@@ -23,7 +23,9 @@ import com.foc.util.DBHelper;
import com.foc.util.DateUtil;
/**
*
* # 每分钟同步一次安科录音记录(直接读取安科数据库)
* *#1 * * * * root bash /mnt/foc/project/task/rundbsounds.sh
* 导出文件名称: jd-task-db-sound-2.20.jar
* @team BBDTEK IT Team
* @author renmb
* @version 1.0
......
......@@ -29,7 +29,13 @@ import com.foc.util.DateUtil;
import com.foc.util.MapCounter;
/**
* 注:已经弃用
*
* # 每5分钟同步一次录音数据
* *#2 1-23 * * * root bash /mnt/foc/project/task/runsounds.sh
* # 每天1点同步一次最近一天的数据
* 10 0 * * * root bash /mnt/foc/project/task/runsoundsdaily.sh
* 导出文件名称: jd-task-sounds-2.7.jar
* @team IT Team
* @author zhanglg
* @version 1.0
......
/**
*
*/
package com.foc.task;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.foc.sound.entity.SoundRecordingEntity;
import com.foc.util.DBHelper;
/**
*
* @team BBDTEK IT Team
* @author renmb
* @version 1.0
* @time 2017年9月3日
*/
public class TestSoundCopyTaskMain {
/**
* 测试类
*
* @author renmb
* @time 2017年9月3日
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
List<Map<String, Object>> sounds = new ArrayList<>();//.fetch("sound", "select * from dbo.cdr where id BETWEEN " + 10000 + " AND "+30000+" order by id ASC");
String driver = "com.microsoft.jdbc.sqlserver.SQLServerDriver";
String url = "jdbc:microsoft:sqlserver://10.72.23.187:1433;DatabaseName=edison200";
Connection conn = null;
ResultSet rs = null;
PreparedStatement pstmt = null;
int count = 0;
try {
// System.out.println("[SoundTaskMain]统计ID段[" + minId + " ]TO[" + maxId + " ]");
Class.forName(driver);
conn = DriverManager.getConnection(url, "foctest", "123@abc");
pstmt = conn
.prepareStatement("select * from dbo.cdr where id BETWEEN " + 10000 + " AND "+30000+" order by id ASC");
rs = pstmt.executeQuery();
List<SoundRecordingEntity> recordingEntities = new ArrayList<SoundRecordingEntity>();
Long newMaxId = 0L;
System.out.printf("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n","id","caller","callee","stm","edm","elapsed","recfile","filesize","callresult");
while (rs.next()) {
SoundRecordingEntity recordingEntity = new SoundRecordingEntity();
recordingEntity.setId(String.valueOf(rs.getInt("id")));
recordingEntity.setCallNo(rs.getString("caller"));
recordingEntity.setAcceptNo(rs.getString("callee"));
recordingEntity.setBeginTime(rs.getDate("stm"));
recordingEntity.setEndTime(rs.getDate("edm"));
recordingEntity.setDuration(rs.getInt("elapsed"));
recordingEntity.setDownloadUrl(rs.getString("recfile"));
recordingEntity.setDownloadSize(rs.getLong("filesize"));
recordingEntity.setResult(rs.getString("callresult"));
recordingEntities.add(recordingEntity);
System.out.printf("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n",rs.getObject("id"),rs.getObject("caller"), rs.getObject("callee"), rs.getObject("stm"), rs.getObject("edm"), rs.getObject("elapsed"), rs.getObject("recfile"), rs.getObject("filesize"), rs.getObject("callresult"));
Map<String, Object> row = new HashMap<>();
row.put("id", rs.getObject("id"));
row.put("caller", rs.getObject("caller"));
row.put("callee", rs.getObject("callee"));
row.put("stm", rs.getObject("stm"));
row.put("edm", rs.getObject("edm"));
row.put("elapsed", rs.getObject("elapsed"));
row.put("recfile", rs.getObject("recfile"));
row.put("filesize", rs.getObject("filesize"));
row.put("direct", rs.getObject("direct"));
row.put("callresult", rs.getObject("callresult"));
sounds.add(row);
}
// service.updateSoundmaxId(newMaxId);
// return count;
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (SQLException e) {
e.printStackTrace();
} finally {
try {
rs.close();
} catch (Exception e2) {}
try {
pstmt.close();
} catch (Exception e2) {}
try {
conn.close();
} catch (Exception e2) {}
}
DBHelper.insert("foc", "dbo.cdr", sounds);
}
}
......@@ -14,6 +14,9 @@ import com.uc.service.UCImGroupService;
import com.uc.service.UCUserService;
/**
* # 每小时同步一次华为的群信息
* 0 *#1 * * * root bash /mnt/foc/project/task/runucgroup.sh
* 导出文件名称: jd-task-group-2.6.jar
*
* @team BBDTEK IT Team
* @author renmb
......
......@@ -13,6 +13,9 @@ import com.uc.entity.UserProfileEntity;
import com.uc.service.UCUserService;
/**
* # 每天凌晨1点同步用户数据
* 1 * * * root bash /mnt/foc/project/task/runhrmtask.sh
* 导出文件名称: jd-task-hrm-2.6.jar
*
* @team IT Team
* @author renmb
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment