Commit e936c065 by 李辅翼

v12

parent 5e583e11
......@@ -57,8 +57,7 @@ public class SqlHelp {
}
if(colValue[0] == null){
flag1=true;
} else if (colValue[0] != null && (gxsj.substring(0, 19).compareTo(colValue[1].substring(0, 19)) < 0 ||
gxsj.substring(0, 19).compareTo(colValue[1].substring(0, 19)) == 0)) {
} else if (colValue[0] != null && (gxsj.substring(0, 19).compareTo(colValue[1].substring(0, 19)) < 0 )) {
flag1 = false;
}else {
logger.info(gxsj+"---------------"+colValue[1]);
......@@ -71,7 +70,7 @@ public class SqlHelp {
}
}
public static byte[] blobToByteZp(BLOB zp) {
public synchronized static byte[] blobToByteZp(BLOB zp) {
try {
long length = zp.length();
byte[] bytes = new byte[(int) length];
......
......@@ -144,7 +144,6 @@ public class VehicleImpl implements Vehicle {
while (resultSet.next()) {
saveToHbase(resultSet, fileService);
}
}catch (Exception e) {
e.printStackTrace();
} finally {
......@@ -179,7 +178,7 @@ public class VehicleImpl implements Vehicle {
* @param resultSet
* @param fileService
*/
private void saveToHbase(ResultSet resultSet, FileService fileService) {
private synchronized void saveToHbase(ResultSet resultSet, FileService fileService) {
try {
xh = resultSet.getString("XH");
hphm = resultSet.getString("HPHM");
......
......@@ -47,7 +47,7 @@ public class PicSchedule {
/**
* 每天早上9点同步机动车的增量数据
*/
// @Scheduled(cron = "0 0 9 * * *")
@Scheduled(cron = "0 0 9 * * *")
public void getIncrementVehPic(){
vehicle.getIncrementVehPic();
}
......
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