|
|
@@ -63,7 +63,7 @@ public class ElecInvoiceTask {
|
|
|
* {"status":"0000","message":"调用成功","data":[{"sellerTaxNo":"339901999999199","orderNo":"1134068619401396224","rushRedState":"0","invoiceType":1,"invoiceState":1,"invoiceLine":"b","exceptionMessage":"ukey版签章无下载码","sid":"23072713481601034933"}]}
|
|
|
* //7:无需开票,此状态可以不用管
|
|
|
* */
|
|
|
- @Scheduled(cron = "0 0/30 * * * ?")
|
|
|
+ @Scheduled(cron = "0 0/5 * * * ?")
|
|
|
public void elecInvoiceDownLoad(){
|
|
|
List<Object[]> obsList=baseDao.getFieldsDatasByCondition("YITOA_DATACENTER.dock_invoice_config",new String[]{"appKey","appSecret","token","taxnum","username"},"1=1");
|
|
|
if(!CollectionUtil.isEmpty(obsList)){
|
|
|
@@ -88,8 +88,8 @@ public class ElecInvoiceTask {
|
|
|
}
|
|
|
logger.info("ElecInvoice-DownLoad: master: {} Begin ",master);
|
|
|
SpObserver.putSp(master);
|
|
|
- SqlRowList ioList = baseDao.queryForRowSet("select io_id,io_code from "+master+".invoiceOrder left join "+master+".customer on io_cucode=cu_code " +
|
|
|
- " where io_status = '已审核' and nvl(IO_DOCKSTATUS,' ') = '对接成功' and (IO_INVOICESTATUS = 6 or (IO_INVOICESTATUS = 2 and io_refno is null))");
|
|
|
+ SqlRowList ioList = baseDao.queryForRowSet("select io_id,io_code from(select io_id,io_code from "+master+".invoiceOrder left join "+master+".customer on io_cucode=cu_code " +
|
|
|
+ " where io_status = '已审核' and nvl(IO_DOCKSTATUS,' ') = '对接成功' and (IO_INVOICESTATUS = 6 or (IO_INVOICESTATUS = 2 and io_refno is null)) order by io_id desc) where rownum <= 100");
|
|
|
logger.info("ElecInvoice-DownLoad: master: {} size: {} ",master,ioList.getResultList().size());
|
|
|
while (ioList.next()){
|
|
|
erpService.getElecInvoices(appKey,appSecret,token,taxnum,ioList.getGeneralInt("io_id"),ioList.getGeneralString("io_code"));
|