|
@@ -28,10 +28,7 @@ import org.springframework.data.domain.Sort;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.math.RoundingMode;
|
|
|
-import java.sql.Connection;
|
|
|
-import java.sql.ResultSet;
|
|
|
-import java.sql.SQLException;
|
|
|
-import java.sql.Statement;
|
|
|
+import java.sql.*;
|
|
|
import java.text.NumberFormat;
|
|
|
import java.util.*;
|
|
|
|
|
@@ -1569,9 +1566,9 @@ public class KnowledgeServiceImpl implements KnowledgeService {
|
|
|
ResultSet rs = null;
|
|
|
try {
|
|
|
String tongName, type, isConcept,stand;
|
|
|
- String sql = "SELECT name, type_id,is_concept,IF(is_concept=1,a.name,(select lib_name from kl_concept b where b.id = a.concept_id) ) lib_name \n" +
|
|
|
- "from kl_library_info a where a.is_deleted = 'N'\n" +
|
|
|
- "and type_id in (1,5,12,13,14,16,17,18,35,70)";
|
|
|
+ String sql = "SELECT a.name,a.type_id,a.is_concept, b.lib_name from kl_library_info a, kl_concept b\n" +
|
|
|
+ " where a.is_deleted = 'N' and b.is_deleted = 'N' and a.concept_id = b.id\n" +
|
|
|
+ " and a.type_id in (1,5,12,13,14,16,17,18,35,70)";
|
|
|
st = connection.createStatement();
|
|
|
rs = st.executeQuery(sql);
|
|
|
Map<String,String> detail =null;
|
|
@@ -2124,7 +2121,7 @@ public class KnowledgeServiceImpl implements KnowledgeService {
|
|
|
if(disList != null && disList.size()>0){
|
|
|
for (Long disId:disList) {
|
|
|
respDTO = this.updateNeo(respDTO, disId, connect, ciKu);
|
|
|
-
|
|
|
+ this.updateDate(connect,disId);
|
|
|
}
|
|
|
}
|
|
|
connect.close();
|
|
@@ -2134,8 +2131,16 @@ public class KnowledgeServiceImpl implements KnowledgeService {
|
|
|
|
|
|
return respDTO;
|
|
|
}
|
|
|
- public void updateDate(Connection connection,Long disId){
|
|
|
- String sql = "UPDATE `kl_diagnose` set neo_update='1970-01-01 12:00:00' where id="+disId+";";
|
|
|
+ public void updateDate(Connection connection,Long disId) {
|
|
|
+ String sql = "UPDATE `kl_diagnose` set neo_update='1970-01-01 12:00:00' where id=?";
|
|
|
+ try {
|
|
|
+ PreparedStatement preparedStatement = connection.prepareStatement(sql);
|
|
|
+ preparedStatement.setLong(1,disId);
|
|
|
+ int i = preparedStatement.executeUpdate();
|
|
|
+ preparedStatement.close();
|
|
|
+ } catch (SQLException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
}
|
|
|
public List<Long> getDisList(Connection connection){
|
|
|
List<Long> disIds = new ArrayList<>();
|