Commit c3fd536b authored by 高宇's avatar 高宇

1.月度信息

parent e2a37723
...@@ -57,7 +57,7 @@ public class Jnsp7xtmServiceImpl extends ServiceImpl<Jnsp7xtmRepository, Jnsp7xt ...@@ -57,7 +57,7 @@ public class Jnsp7xtmServiceImpl extends ServiceImpl<Jnsp7xtmRepository, Jnsp7xt
private Jnsp7xtmStatisticServiceImpl jnsp74tmStatisticService; private Jnsp7xtmStatisticServiceImpl jnsp74tmStatisticService;
// 获取每次写入excel的长度 // 获取每次写入excel的长度
@Value("${export.size}") @Value("${jnsp7xtm.export.pageSize}")
private Integer size; private Integer size;
// 静态锁 // 静态锁
......
...@@ -66,10 +66,10 @@ public class Jnsp7xtmDqsjServiceImpl extends ServiceImpl<Jnsp7xtmDqsjRepository, ...@@ -66,10 +66,10 @@ public class Jnsp7xtmDqsjServiceImpl extends ServiceImpl<Jnsp7xtmDqsjRepository,
// 月度表拉取锁 // 月度表拉取锁
private static Lock monthlyTablePullLock = new ReentrantLock(); private static Lock monthlyTablePullLock = new ReentrantLock();
@Value("${fetchSize}") @Value("${jnsp7xtmDqsj.batchAddPagesize}")
private Integer batchInsertSize; private Integer batchInsertSize;
@Value("${shema}") @Value("${jnsp7xtmDqsj.shema}")
private String shema; private String shema;
/** /**
...@@ -218,6 +218,7 @@ public class Jnsp7xtmDqsjServiceImpl extends ServiceImpl<Jnsp7xtmDqsjRepository, ...@@ -218,6 +218,7 @@ public class Jnsp7xtmDqsjServiceImpl extends ServiceImpl<Jnsp7xtmDqsjRepository,
log.info("查询耗时毫秒" + stopwatch.elapsed(TimeUnit.MILLISECONDS)); log.info("查询耗时毫秒" + stopwatch.elapsed(TimeUnit.MILLISECONDS));
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
throw new CyServiceException(501,"数据同步异常");
} }
finally { finally {
monthlyTablePullLock.unlock(); monthlyTablePullLock.unlock();
......
...@@ -293,13 +293,6 @@ knife4j: ...@@ -293,13 +293,6 @@ knife4j:
username: zhangsan username: zhangsan
password: 123456 password: 123456
export:
size: 20
fetchSize: 10
shema: 'demo.dbo'
login: login:
loginName: "00" loginName: "00"
......
...@@ -121,3 +121,16 @@ syncSchedule: ...@@ -121,3 +121,16 @@ syncSchedule:
message: message:
config: true config: true
jnsp7xtm:
export:
# 每次写入excel的长度
pageSize: 20
jnsp7xtmDqsj:
# 每次添加到数据库的长度
batchAddPagesize: 50
# service 要重置的数据库
shema: 'demo.dbo'
...@@ -368,7 +368,7 @@ ...@@ -368,7 +368,7 @@
FROM FROM
jnsp7xtm_dqsj jnsp7xtm_dqsj
</select> </select>
<select id="streamQuery" resultMap="Jnsp7xtmVoResultMap" fetchSize="10"> <select id="streamQuery" resultMap="Jnsp7xtmVoResultMap" fetchSize="1000">
SELECT SELECT
jnsp.*, jnsp.*,
cust.cust_code, cust.cust_code,
...@@ -396,12 +396,12 @@ ...@@ -396,12 +396,12 @@
bps.pn, bps.pn,
bps.sypn bps.sypn
FROM FROM
jnsp7xtm jnsp left JOIN b_customer cust on jnsp.khdm = cust.cust_code jnsp7xtm jnsp left JOIN b_customer cust on jnsp.khdm = cust.cust_code and cust.del_flag = '0'
left join b_pn_sypn bps on bps.pn = jnsp.pn left join b_pn_sypn bps on bps.pn = jnsp.pn and bps.del_flag = '0'
where where
jnsp.khdm is not null jnsp.khdm is not null
and jnsp.pn is not null and jnsp.pn is not null
and bps.del_flag = '0'
</select> </select>
</mapper> </mapper>
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