|
|
@ -11,6 +11,8 @@ import java.sql.Connection;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.Date;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import org.apache.log4j.Logger;
|
|
|
|
|
|
|
|
|
|
|
|
import com.base.CustomException;
|
|
|
|
import com.base.CustomException;
|
|
|
|
import com.platform.dao.DataInfoDao;
|
|
|
|
import com.platform.dao.DataInfoDao;
|
|
|
|
import com.platform.entities.CheckoutEntity;
|
|
|
|
import com.platform.entities.CheckoutEntity;
|
|
|
@ -31,6 +33,8 @@ import com.platform.utils.FileOperateHelper;
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public class ThreadExtractStandardSqlServer extends Thread{
|
|
|
|
public class ThreadExtractStandardSqlServer extends Thread{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public final static Logger log = Configs.CONSOLE_LOGGER.getLogger(ThreadExtractStandardSqlServer.class);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 抽取
|
|
|
|
* 抽取
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -73,9 +77,10 @@ public class ThreadExtractStandardSqlServer extends Thread{
|
|
|
|
+ DateForm
|
|
|
|
+ DateForm
|
|
|
|
.date2StringBysecond(new Date())
|
|
|
|
.date2StringBysecond(new Date())
|
|
|
|
+ "\r\n");
|
|
|
|
+ "\r\n");
|
|
|
|
|
|
|
|
// 查询最新的 数据记录
|
|
|
|
|
|
|
|
this.getDataByCk(element);
|
|
|
|
//如果校验成功的 才 进行 抽取----支付标准表
|
|
|
|
//如果校验成功的 才 进行 抽取----支付标准表
|
|
|
|
if (Constant.CHECKOUT_STATUS_FIVE.equals(element.getPayResultLast())
|
|
|
|
if (Constant.CHECKOUT_STATUS_FIVE.equals(element.getPayResultLast())) {
|
|
|
|
|| Constant.CHECKOUT_STATUS_SIX.equals(element.getPayResultLast())) {
|
|
|
|
|
|
|
|
String payFilePath = FileOperateHelper.addLastSeparator(element.getPath())+Constant.standard_pay
|
|
|
|
String payFilePath = FileOperateHelper.addLastSeparator(element.getPath())+Constant.standard_pay
|
|
|
|
+ element.getAreaCode().toLowerCase()+"_" + element.getSysCode()+".sql";
|
|
|
|
+ element.getAreaCode().toLowerCase()+"_" + element.getSysCode()+".sql";
|
|
|
|
DataInfoEntity data = new DataInfoEntity();
|
|
|
|
DataInfoEntity data = new DataInfoEntity();
|
|
|
@ -134,9 +139,10 @@ public class ThreadExtractStandardSqlServer extends Thread{
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 查询最新的 数据记录
|
|
|
|
|
|
|
|
this.getDataByCk(element);
|
|
|
|
//如果校验成功的 才 进行 抽取----执行标准表
|
|
|
|
//如果校验成功的 才 进行 抽取----执行标准表
|
|
|
|
if (Constant.CHECKOUT_STATUS_FIVE.equals(element.getExecResultLast())
|
|
|
|
if (Constant.CHECKOUT_STATUS_FIVE.equals(element.getExecResultLast())){
|
|
|
|
|| Constant.CHECKOUT_STATUS_SIX.equals(element.getExecResultLast())){
|
|
|
|
|
|
|
|
String execFilePath = FileOperateHelper.addLastSeparator(element.getPath())+Constant.standard_indicate
|
|
|
|
String execFilePath = FileOperateHelper.addLastSeparator(element.getPath())+Constant.standard_indicate
|
|
|
|
+ element.getAreaCode().toLowerCase() +"_" + element.getSysCode()+".sql";
|
|
|
|
+ element.getAreaCode().toLowerCase() +"_" + element.getSysCode()+".sql";
|
|
|
|
DataInfoEntity data = new DataInfoEntity();
|
|
|
|
DataInfoEntity data = new DataInfoEntity();
|
|
|
@ -238,4 +244,16 @@ public class ThreadExtractStandardSqlServer extends Thread{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void getDataByCk(CheckoutEntity element) {
|
|
|
|
|
|
|
|
DataInfoEntity data = null;
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
data = dataInfoDao.findById(element.getDataId());
|
|
|
|
|
|
|
|
if (data != null) {
|
|
|
|
|
|
|
|
element.setPayResultLast(data.getPayResultLast());
|
|
|
|
|
|
|
|
element.setExecResultLast(data.getExecResultLast());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
|
|
log.error(e);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|