|
@@ -12,6 +12,8 @@ import com.rongwei.bsentity.dto.sqlServer.ZhcxPmqManagementSource;
|
|
|
import com.rongwei.rwcommon.utils.SecurityUtil;
|
|
|
import com.rongwei.rwcommon.utils.StringUtils;
|
|
|
import org.apache.commons.lang.time.DateFormatUtils;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
@@ -25,6 +27,7 @@ import java.util.stream.Collectors;
|
|
|
@Service
|
|
|
public class ZhcxPMQMServiceImpl implements ZhcxPMQMService {
|
|
|
|
|
|
+ private static final Logger log = LoggerFactory.getLogger(ZhcxPMQMServiceImpl.class);
|
|
|
@Value("${nxsystem.url:#{null}}")
|
|
|
private String nxurl;
|
|
|
@Value("${nxsystem.dbname:#{null}}")
|
|
@@ -211,9 +214,11 @@ public class ZhcxPMQMServiceImpl implements ZhcxPMQMService {
|
|
|
}
|
|
|
List<ZhcxPmqManagementSourceDo> list = new ArrayList<>();
|
|
|
String url ="jdbc:sqlserver://"+nxurl+":1433;databaseName="+nxdbname+";"+nxurlfix+"";
|
|
|
+ log.info("三单连接字符串" + url);
|
|
|
try(Connection connection = DriverManager.getConnection(url,nxdbuser,nxdbpw);
|
|
|
Statement statement = connection.createStatement()) {
|
|
|
String sqlStr = "SELECT TOP (300) * FROM JUV1841 WHERE 下发日期 > '"+maxTime+"'";
|
|
|
+ log.info("三单连接SQL" + sqlStr);
|
|
|
try(ResultSet resultSet = statement.executeQuery(sqlStr)) {
|
|
|
while (resultSet.next()) {
|
|
|
ZhcxPmqManagementSourceDo entity = new ZhcxPmqManagementSourceDo();
|