Commit c3fd536b authored by 高宇's avatar 高宇

1.月度信息

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