Commit c17e1a50 by fuwenlei

修改job

parent 2fa5e3eb
......@@ -54,7 +54,6 @@ public class CreateTableAuFile {
for (int i = 0; i < columnCount; i++) {
String columnName = rs.getMetaData().getColumnName(i + 1);
String columnTypeName = rs.getMetaData().getColumnTypeName(i + 1);
System.out.println("columnName : " + columnName);
if (columnName != null && columnTypeName != null) {
tableDef.addColumn(columnName, typeMap.get(columnTypeName));
}
......@@ -91,7 +90,6 @@ public class CreateTableAuFile {
}
column = column.substring(0, column.length() - 1);
//String sql = "select " + column + " from " + tableName + " where post_code in (" + posIdString + ")";
System.out.println("++" + sql);
// String sql = "select " + column + " from " + tableName;
ps = conn.prepareStatement(sql);
ResultSet resultSet = ps.executeQuery();
......
......@@ -15,7 +15,7 @@ import com.byit.utils.PropertiesUtil;
@Component
public class SchedulerJob {
@Scheduled(cron = "0 0 11 * * ?")
@Scheduled(cron = "0 0 15,16,17 * * ?")
// @Scheduled(cron = "0 0 0/1 * * ?")
public void upLoadReportByPositionIdScheduler() throws Exception {
//long a = System.currentTimeMillis();
......@@ -25,7 +25,9 @@ public class SchedulerJob {
DecompressionFileZipUtl.hyperPath = PropertiesUtil.getValue(null, "hyperPath");
DecompressionFileZipUtl.twbxPath = PropertiesUtil.getValue(null, "twbxPath");
// 获取岗位id的json字符串数组
String postionJson = HttpClient.doGet("http://10.0.103.193:8080/portal/queryserve/queryPositionIdAndUserCode.do");
String url = PropertiesUtil.getValue(null, "postion.url");
System.out.println("url:>>>>>>>"+url);
String postionJson = HttpClient.doGet(url);
// json串转化成list
Map<String,Object> map= JSONObject.parseObject(postionJson);
//获取岗位数据
......
......@@ -242,7 +242,6 @@ public class DecompressionFileZipUtl {
byte[] buffers = new byte[buffer];
while ((byteread = inStream.read(buffers)) != -1) {
bytesum += byteread; // 字节数 文件大小
System.out.println(bytesum);
fs.write(buffers, 0, byteread);
}
inStream.close();
......
......@@ -15,21 +15,21 @@ public class HyperSqlMap {
public HyperSqlMap(){
//key为hyper文件得名字,value为hyper文件得查询sql
hyperSqlMap.put("BI_HOS_SALES_CURR_V_B (BYIT)", "SELECT a1.* from BYIT.bi_hos_sales_curr_v_b a1 inner join "
hyperSqlMap.put("BI_HOS_SALES_CURR_V_B (BYIT)", "SELECT a1.* from BYIT.bi_hos_sales_curr_v a1 inner join "
+"(select distinct subordinate_position_code "
+ "from BYIT.auth_hos_sales_curr "
+" where position_code like '%"+position_code+"%' )a2 "
+"on a1.销售代表岗位代码 = a2.subordinate_position_code inner join "
+"on a1.大区经理岗位代码 = a2.subordinate_position_code inner join "
+"(select distinct brand_name from BYIT.auth_empl_brand "
+"where empl_code like '%"+empl_code+"%' ) a3 "
+"on a1.品牌名称=a3.brand_name");
hyperSqlMap.put("BI_HOS_SALES_HIS_V_B (BYIT)", "SELECT a1.* "
+"from BYIT.bi_hos_sales_curr_v_b a1 inner join ("
+"from BYIT.bi_hos_sales_curr_v a1 inner join ("
+"select distinct subordinate_position_code "
+"from BYIT.auth_hos_sales_curr "
+"where position_code like '%"+position_code+"%' )a2 "
+"on a1.销售代表岗位代码=a2.subordinate_position_code "
+"on a1.大区经理岗位代码=a2.subordinate_position_code "
+"inner join(select distinct brand_name from BYIT.auth_empl_brand "
+"where empl_code like '%"+empl_code+"%' )a3 "
+"on a1.品牌名称=a3.brand_name");
......
#####localPath####
local.path = D:
spring.datasource.url=jdbc:oracle:thin:@10.0.120.166:1521:BYIT
spring.datasource.username=BYIT
spring.datasource.password=byit
spring.datasource.url=jdbc:oracle:thin:@10.131.128.44:1521:orcl
spring.datasource.username=munditemp
spring.datasource.password=Mundipharma2018
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
spring.datasource.driver-class-name=oracle.jdbc.driver.OracleDriver
#template file path###
templatePath=D:\\test
templatePath=C:\\test
#hyper file path###
hyperPath=D:\\
hyperPath=C:\\hyper
#twbx file path###
twbxPath=F:\\test
\ No newline at end of file
twbxPath=C:\\mdtest
#get postion method url
postion.url=http://10.113.1.71:8080/portal/queryserve/queryPositionIdAndUserCode.do
\ No newline at end of file
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