Commit c4793102 authored by Quxl's avatar Quxl

x

parent b8ca9ddd
......@@ -2,6 +2,7 @@ package com.egolm.sso.config;
import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.jdbc.DataSourceBuilder;
import org.springframework.context.annotation.Bean;
......@@ -37,4 +38,19 @@ public class DataSourceConfig {
return jdbcTemplate;
}
@Bean
@Qualifier("dataSource2")
@ConfigurationProperties(prefix = "spring.datasource")
public DataSource getDataSource2() {
return DataSourceBuilder.create().type(DruidDataSource.class).build();
}
@Bean
@Qualifier("jdbcTemplate2")
public JdbcTemplate getJdbcTemplate2(@Qualifier("dataSource2")DataSource dataSource) {
JdbcTemplate jdbcTemplate = new JdbcTemplate();
jdbcTemplate.setDataSource(dataSource);
return jdbcTemplate;
}
}
\ No newline at end of file
......@@ -4,6 +4,7 @@ import java.text.MessageFormat;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
......@@ -14,6 +15,7 @@ import com.egolm.sso.config.XRException;
public class CommonService {
@Autowired
@Qualifier("jdbcTemplate2")
private JdbcTemplate jdbcTemplate;
public Long getNextval(String sName) {
......
......@@ -41,6 +41,11 @@ public class ConfirmQuotationServiceImpl implements ConfirmQuotationService {
@Value("${xmlRoot}")
private String xmlRoot;
public static void main(String[] args) {
String dateString = DateUtil.formatDate(new Date(), DateUtil.FMT_DATE);
System.out.println(dateString);
}
@Override
@Transactional
public void execute(Z_MT_SD_008_SO_CONFIRM_QUOTATION Z_MT_SD_008_SO_CONFIRM_QUOTATION) {
......
......@@ -45,8 +45,8 @@ public class DNDeletionServiceImpl implements DNDeletionService {
Map<String, Object> map = new HashMap<String, Object>();
map.put("MSGID", DELETED_DOCUMENTS.getMSGID());
map.put("TARGET_SYSTEM", DELETED_DOCUMENTS.getTARGET_SYSTEM());
map.put("DOCTYPE", DELETED_DOCUMENTS.getDOCTYPE());
map.put("DOCNUMBER", DELETED_DOCUMENTS.getDOCNUMBER());
map.put("DOCUMENT_TYPE", DELETED_DOCUMENTS.getDOCTYPE());
map.put("DOCUMENT_NUMBER", DELETED_DOCUMENTS.getDOCNUMBER());
map.put("SALES_ORG", DELETED_DOCUMENTS.getSALES_ORG());
map.put("DELETED_BY", DELETED_DOCUMENTS.getDELETED_BY());
map.put("SOLD_TO", DELETED_DOCUMENTS.getSOLD_TO());
......
......@@ -109,7 +109,7 @@ public class PrformaInvoiceServiceImpl implements PrformaInvoiceService {
headMap.put("SUMMARY_WAERQ" + (i + 1), SUMMARY_GENERAL.getWAERQ());
}
}
headMap.put("BATCH", dateString + "-" + common.getNextval("T_PERFORM_INVOICE_HEADER_BATCH_" + dateString));
headMap.put("BATCH", dateString + common.getNextval("T_PERFORM_INVOICE_HEADER_BATCH_" + dateString));
headMap.put("SEND_STATUS", 'N');
headMap.put("SEND_TIME", now);
headMap.put("TRACE_NO", "sapproformainvoice" + DateUtil.formatDate(now, DateUtil.FMT_DATETIME));
......
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