|
@@ -19,12 +19,12 @@ import java.util.List;
|
|
|
|
|
|
@Slf4j
|
|
|
@Repository
|
|
|
-public class PrltCtlrDao extends BatchDaoService {
|
|
|
+public class PrkPlceDao extends BatchDaoService {
|
|
|
|
|
|
- public PrltCtlrDao(SqlSessionFactory sqlSessionFactory) {
|
|
|
+ public PrkPlceDao(SqlSessionFactory sqlSessionFactory) {
|
|
|
super(sqlSessionFactory);
|
|
|
- this.serviceName = "PrltCtlrDao";
|
|
|
- this.mapperName = "";//"/com.its.pis.dao.mapper.PrltCtlrMapper.";
|
|
|
+ this.serviceName = "PrkPlceDao";
|
|
|
+ this.mapperName = "";//""com.its.pis.mapper.batchPrkPlceMapper.";
|
|
|
}
|
|
|
|
|
|
public List<HashMap<String, Object>> getSttsList(List<TbPrkPlceStts> req) {
|
|
@@ -39,51 +39,55 @@ public class PrltCtlrDao extends BatchDaoService {
|
|
|
return lists;
|
|
|
}
|
|
|
|
|
|
- public int updateStts(List<TbPrkPlceStts> req, boolean isHistory) {
|
|
|
- log.info("{}.updateStts: START. {} EA. History {}", this.serviceName, req.size(), isHistory);
|
|
|
+ public int updatePrkPlceStts(List<TbPrkPlceStts> req, boolean isHistory) {
|
|
|
+ //log.info("{}.updatePrkPlceStts: START. {} EA. History {}", this.serviceName, req.size(), isHistory);
|
|
|
Elapsed elapsed = new Elapsed();
|
|
|
int total = 0;
|
|
|
SqlSession sqlSession = null;
|
|
|
try {
|
|
|
sqlSession = this.sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
|
|
|
|
|
- this.mapper = this.mapperName + "batchUpdatePrltCtlrStts";
|
|
|
+ this.mapper = this.mapperName + "batchUpdatePrkPlceStts";
|
|
|
total += updateBatch(this.mapper, getSttsList(req));
|
|
|
|
|
|
sqlSession.commit();
|
|
|
} catch(Exception e) {
|
|
|
- log.error("updateStts: Exception, {}, {}", req, e.getMessage());
|
|
|
+ log.error("updatePrkPlceStts: Exception, {}, {}", req, e.getMessage());
|
|
|
}
|
|
|
finally {
|
|
|
if (sqlSession != null) {
|
|
|
sqlSession.close();
|
|
|
}
|
|
|
}
|
|
|
- log.info("{}.updateStts: ..END. {} EA. {} ms.", this.serviceName, total, elapsed.milliSeconds());
|
|
|
+ if (elapsed.milliSeconds() > 1000) {
|
|
|
+ log.info("{}.updatePrkPlceStts: ..END. {} EA. {} ms.", this.serviceName, total, elapsed.milliSeconds());
|
|
|
+ }
|
|
|
return total;
|
|
|
}
|
|
|
|
|
|
- public int insertStts(List<TbPrkPlceStts> req) {
|
|
|
- log.info("{}.insertStts: START. {} EA.", this.serviceName, req.size());
|
|
|
+ public int insertPrkPlceSttsHs(List<TbPrkPlceStts> req) {
|
|
|
+ //log.info("{}.insertPrkPlceSttsHs: START. {} EA.", this.serviceName, req.size());
|
|
|
Elapsed elapsed = new Elapsed();
|
|
|
int total = 0;
|
|
|
SqlSession sqlSession = null;
|
|
|
try {
|
|
|
sqlSession = this.sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
|
|
|
|
|
- this.mapper = this.mapperName + "batchInsertPrltCtlrSttsHs";
|
|
|
+ this.mapper = this.mapperName + "batchInsertPrkPlceSttsHs";
|
|
|
total += insertBatch(this.mapper, getSttsList(req));
|
|
|
|
|
|
sqlSession.commit();
|
|
|
} catch(Exception e) {
|
|
|
- log.error("insertStts: Exception, {}, {}", req, e.getMessage());
|
|
|
+ log.error("insertPrkPlceSttsHs: Exception, {}, {}", req, e.getMessage());
|
|
|
}
|
|
|
finally {
|
|
|
if (sqlSession != null) {
|
|
|
sqlSession.close();
|
|
|
}
|
|
|
}
|
|
|
- log.info("{}.insertStts: ..END. {} EA. {} ms.", this.serviceName, total, elapsed.milliSeconds());
|
|
|
+ if (elapsed.milliSeconds() > 1000) {
|
|
|
+ log.info("{}.insertPrkPlceSttsHs: ..END. {} EA. {} ms.", this.serviceName, total, elapsed.milliSeconds());
|
|
|
+ }
|
|
|
return total;
|
|
|
}
|
|
|
|
|
@@ -92,7 +96,7 @@ public class PrltCtlrDao extends BatchDaoService {
|
|
|
log.info("{}.updateRlTimeFlr: Data Not Exist.", this.serviceName);
|
|
|
return 0;
|
|
|
}
|
|
|
- log.info("{}.updateRlTimeFlr: START. {} EA.", this.serviceName, reqList.size());
|
|
|
+ //log.info("{}.updateRlTimeFlr: START. {} EA.", this.serviceName, reqList.size());
|
|
|
Elapsed elapsed = new Elapsed();
|
|
|
int total = 0;
|
|
|
SqlSession sqlSession = null;
|
|
@@ -122,7 +126,9 @@ public class PrltCtlrDao extends BatchDaoService {
|
|
|
sqlSession.close();
|
|
|
}
|
|
|
}
|
|
|
- log.info("{}.updateRlTimeFlr: ..END. {} EA. {} ms.", this.serviceName, total, elapsed.milliSeconds());
|
|
|
+ if (elapsed.milliSeconds() > 1000) {
|
|
|
+ log.info("{}.updateRlTimeFlr: ..END. {} EA. {} ms.", this.serviceName, total, elapsed.milliSeconds());
|
|
|
+ }
|
|
|
return total;
|
|
|
}
|
|
|
|
|
@@ -131,7 +137,7 @@ public class PrltCtlrDao extends BatchDaoService {
|
|
|
log.info("{}.updateRlTimeAr: Data Not Exist.", this.serviceName);
|
|
|
return 0;
|
|
|
}
|
|
|
- log.info("{}.updateRlTimeAr: START. {} EA.", this.serviceName, reqList.size());
|
|
|
+ //log.info("{}.updateRlTimeAr: START. {} EA.", this.serviceName, reqList.size());
|
|
|
Elapsed elapsed = new Elapsed();
|
|
|
int total = 0;
|
|
|
SqlSession sqlSession = null;
|
|
@@ -161,7 +167,9 @@ public class PrltCtlrDao extends BatchDaoService {
|
|
|
sqlSession.close();
|
|
|
}
|
|
|
}
|
|
|
- log.info("{}.updateRlTimeAr: ..END. {} EA. {} ms.", this.serviceName, total, elapsed.milliSeconds());
|
|
|
+ if (elapsed.milliSeconds() > 1000) {
|
|
|
+ log.info("{}.updateRlTimeAr: ..END. {} EA. {} ms.", this.serviceName, total, elapsed.milliSeconds());
|
|
|
+ }
|
|
|
return total;
|
|
|
}
|
|
|
|
|
@@ -170,7 +178,7 @@ public class PrltCtlrDao extends BatchDaoService {
|
|
|
log.info("{}.updateRlTimePrv: Data Not Exist.", this.serviceName);
|
|
|
return 0;
|
|
|
}
|
|
|
- log.info("{}.updateRlTimePrv: START. {} EA.", this.serviceName, reqList.size());
|
|
|
+ //log.info("{}.updateRlTimePrv: START. {} EA.", this.serviceName, reqList.size());
|
|
|
Elapsed elapsed = new Elapsed();
|
|
|
int total = 0;
|
|
|
SqlSession sqlSession = null;
|
|
@@ -199,7 +207,9 @@ public class PrltCtlrDao extends BatchDaoService {
|
|
|
sqlSession.close();
|
|
|
}
|
|
|
}
|
|
|
- log.info("{}.updateRlTimePrv: ..END. {} EA. {} ms.", this.serviceName, total, elapsed.milliSeconds());
|
|
|
+ if (elapsed.milliSeconds() > 1000) {
|
|
|
+ log.info("{}.updateRlTimePrv: ..END. {} EA. {} ms.", this.serviceName, total, elapsed.milliSeconds());
|
|
|
+ }
|
|
|
return total;
|
|
|
}
|
|
|
|
|
@@ -208,7 +218,7 @@ public class PrltCtlrDao extends BatchDaoService {
|
|
|
log.info("{}.updateRlTimeDev: Data Not Exist.", this.serviceName);
|
|
|
return 0;
|
|
|
}
|
|
|
- log.info("{}.updateRlTimeDev: START. {} EA.", this.serviceName, reqList.size());
|
|
|
+ //log.info("{}.updateRlTimeDev: START. {} EA.", this.serviceName, reqList.size());
|
|
|
Elapsed elapsed = new Elapsed();
|
|
|
int total = 0;
|
|
|
SqlSession sqlSession = null;
|
|
@@ -240,7 +250,9 @@ public class PrltCtlrDao extends BatchDaoService {
|
|
|
sqlSession.close();
|
|
|
}
|
|
|
}
|
|
|
- log.info("{}.updateRlTimePrv: ..END. {} EA. {} ms.", this.serviceName, total, elapsed.milliSeconds());
|
|
|
+ if (elapsed.milliSeconds() > 1000) {
|
|
|
+ log.info("{}.updateRlTimePrv: ..END. {} EA. {} ms.", this.serviceName, total, elapsed.milliSeconds());
|
|
|
+ }
|
|
|
return total;
|
|
|
}
|
|
|
|