Merge remote-tracking branch 'origin/jenkins_with_weblogic' of C:/eactive/bundle/bundles/20260102/eapim-admin_incremental_2025-12-01.bundle into jenkins_with_weblogic
This commit is contained in:
@@ -1,19 +1,33 @@
|
||||
package com.eactive.eai.rms.data.entity.onl.inflow;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.inflow.InflowControlLog;
|
||||
import com.eactive.eai.data.entity.onl.inflow.InflowControlLogId;
|
||||
import com.eactive.eai.data.entity.onl.inflow.QInflowControlGroup;
|
||||
import com.eactive.eai.data.entity.onl.inflow.QInflowControlLog;
|
||||
import com.eactive.eai.data.jpa.AbstractDataService;
|
||||
import com.eactive.eai.rms.onl.manage.inflow.history.InflowControlHistoryManMapper;
|
||||
import com.eactive.eai.rms.onl.manage.inflow.history.InflowControlHistoryManUI;
|
||||
import com.eactive.eai.rms.onl.manage.inflow.history.InflowControlHistoryManUISearch;
|
||||
import com.querydsl.core.BooleanBuilder;
|
||||
import com.querydsl.core.Tuple;
|
||||
|
||||
@Service
|
||||
public class InflowControlLogService
|
||||
extends AbstractDataService<InflowControlLog, InflowControlLogId, InflowControlLogRepository> {
|
||||
|
||||
private final InflowControlService inflowControlService;
|
||||
private final InflowControlHistoryManMapper inflowControlHistoryManMapper;
|
||||
|
||||
@Autowired
|
||||
public InflowControlLogService(InflowControlService inflowControlService, InflowControlHistoryManMapper inflowControlHistoryManMapper) {
|
||||
this.inflowControlService = inflowControlService;
|
||||
this.inflowControlHistoryManMapper = inflowControlHistoryManMapper;
|
||||
}
|
||||
|
||||
public Page<InflowControlLog> findAll(Pageable pageable, InflowControlHistoryManUISearch uiSearch) {
|
||||
QInflowControlLog qInflowConfrolLog = QInflowControlLog.inflowControlLog;
|
||||
@@ -25,6 +39,28 @@ public class InflowControlLogService
|
||||
return super.repository.findAll(booleanBuilder, pageable);
|
||||
}
|
||||
|
||||
public Page<InflowControlHistoryManUI> selectList(Pageable pageable, InflowControlHistoryManUISearch uiSearch) {
|
||||
|
||||
Page<Tuple> tuples = inflowControlService.selectLogList(pageable, uiSearch);
|
||||
|
||||
return tuples.map(tuple -> {
|
||||
InflowControlLog inflowControlLog = tuple.get(QInflowControlLog.inflowControlLog);
|
||||
|
||||
String groupName = tuple.get(QInflowControlGroup.inflowControlGroup.groupName);
|
||||
|
||||
InflowControlHistoryManUI inflowControlHistoryManUI;
|
||||
|
||||
inflowControlHistoryManUI = inflowControlHistoryManMapper.toVo(inflowControlLog);
|
||||
|
||||
inflowControlHistoryManUI.setGroupname(groupName);
|
||||
|
||||
return inflowControlHistoryManUI;
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
public Iterable<InflowControlLog> findAll(InflowControlHistoryManUISearch uiSearch) {
|
||||
QInflowControlLog qInflowConfrolLog = QInflowControlLog.inflowControlLog;
|
||||
BooleanBuilder booleanBuilder = new BooleanBuilder();
|
||||
|
||||
@@ -17,11 +17,16 @@ import com.eactive.eai.data.entity.onl.adapter.QAdapterGroup;
|
||||
import com.eactive.eai.data.entity.onl.inflow.InflowControl;
|
||||
import com.eactive.eai.data.entity.onl.inflow.InflowControlId;
|
||||
import com.eactive.eai.data.entity.onl.inflow.QInflowControl;
|
||||
import com.eactive.eai.data.entity.onl.inflow.QInflowControlGroup;
|
||||
import com.eactive.eai.data.entity.onl.inflow.QInflowControlLog;
|
||||
import com.eactive.eai.data.entity.onl.message.QEAIMessageEntity;
|
||||
import com.eactive.eai.data.jpa.AbstractDataService;
|
||||
import com.eactive.eai.rms.onl.manage.inflow.history.InflowControlHistoryManUISearch;
|
||||
import com.eactive.eai.rms.onl.manage.inflow.inflow.InflowControlManMapper;
|
||||
import com.querydsl.core.BooleanBuilder;
|
||||
import com.querydsl.core.Tuple;
|
||||
import com.querydsl.core.types.OrderSpecifier;
|
||||
import com.querydsl.jpa.impl.JPAQuery;
|
||||
import com.querydsl.jpa.impl.JPAQueryFactory;
|
||||
|
||||
@Service
|
||||
@@ -168,5 +173,45 @@ public class InflowControlService extends AbstractDataService<InflowControl, Inf
|
||||
|
||||
return toDto(qEAIMessageEntity, qInflowControl, tuple);
|
||||
}
|
||||
|
||||
public Page<Tuple> selectLogList(Pageable pageable, InflowControlHistoryManUISearch uiSearch) {
|
||||
QInflowControlLog qlog = QInflowControlLog.inflowControlLog;
|
||||
QInflowControlGroup qgroup = QInflowControlGroup.inflowControlGroup;
|
||||
|
||||
JPAQuery<Tuple> jpaQuery = createBaseQuery(uiSearch);
|
||||
|
||||
long totalCount = jpaQuery.select(QInflowControlLog.inflowControlLog.count()).fetchOne();
|
||||
|
||||
List<Tuple> inflowControlLog = jpaQuery
|
||||
.select(qlog, qgroup.groupName)
|
||||
.limit(pageable.getPageSize())
|
||||
.offset(pageable.getOffset())
|
||||
.orderBy(qlog.id.msgdpstyms.desc())
|
||||
.fetch();
|
||||
|
||||
return new PageImpl<>(inflowControlLog, pageable, totalCount);
|
||||
}
|
||||
|
||||
private JPAQuery<Tuple> createBaseQuery(InflowControlHistoryManUISearch uiSearch) {
|
||||
QInflowControlLog qInflowConfrolLog = QInflowControlLog.inflowControlLog;
|
||||
QInflowControlGroup qinflowControlGroup = QInflowControlGroup.inflowControlGroup;
|
||||
|
||||
BooleanBuilder predicate = new BooleanBuilder();
|
||||
predicate
|
||||
.and(qInflowConfrolLog.id.msgdpstyms
|
||||
.between(uiSearch.getSearchStartDate() + "000000000",
|
||||
uiSearch.getSearchEndDate() + "235959999"));
|
||||
|
||||
return getJPAQueryFactory()
|
||||
.select(
|
||||
qInflowConfrolLog,
|
||||
qinflowControlGroup.groupName
|
||||
)
|
||||
.from(qInflowConfrolLog)
|
||||
.leftJoin(qinflowControlGroup)
|
||||
.on(qInflowConfrolLog.adptrbzwkgroupname.eq(qinflowControlGroup.groupId))
|
||||
.where(predicate);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+7
@@ -31,6 +31,13 @@ public class InflowControlHistoryManController extends OnlBaseAnnotationControll
|
||||
return "/onl/admin/inflow/inflowControlHistoryMan";
|
||||
}
|
||||
|
||||
// @RequestMapping(value = "/onl/admin/inflow/inflowControlHistoryMan.json", params = "cmd=LIST")
|
||||
// public ResponseEntity<GridResponse<InflowControlHistoryManUI>> selectList(HttpServletRequest request,
|
||||
// Pageable pageable, InflowControlHistoryManUISearch uiSearch) {
|
||||
// Page<InflowControlHistoryManUI> uiPage = service.selectList(pageable, uiSearch);
|
||||
// return ResponseEntity.ok(new GridResponse<>(uiPage));
|
||||
// }
|
||||
|
||||
@RequestMapping(value = "/onl/admin/inflow/inflowControlHistoryMan.json", params = "cmd=LIST")
|
||||
public ResponseEntity<GridResponse<InflowControlHistoryManUI>> selectList(HttpServletRequest request,
|
||||
Pageable pageable, InflowControlHistoryManUISearch uiSearch) {
|
||||
|
||||
+6
-1
@@ -23,8 +23,13 @@ public class InflowControlHistoryManService extends BaseService {
|
||||
@Autowired
|
||||
InflowControlHistoryManMapper mapper;
|
||||
|
||||
// public Page<InflowControlHistoryManUI> selectList(Pageable pageable, InflowControlHistoryManUISearch uiSearch) {
|
||||
// return service.findAll(pageable, uiSearch).map(mapper::toVo);
|
||||
// }
|
||||
|
||||
|
||||
public Page<InflowControlHistoryManUI> selectList(Pageable pageable, InflowControlHistoryManUISearch uiSearch) {
|
||||
return service.findAll(pageable, uiSearch).map(mapper::toVo);
|
||||
return service.selectList(pageable, uiSearch);
|
||||
}
|
||||
|
||||
public List<HashMap<String, Object>> selectListToExcel(InflowControlHistoryManUISearch uiSearch) {
|
||||
|
||||
+6
@@ -66,6 +66,12 @@ public class InflowControlHistoryManUI {
|
||||
*/
|
||||
@JsonProperty("THRESHOLDTIMEUNIT")
|
||||
private String thresholdtimeunit;
|
||||
|
||||
/**
|
||||
* 그룹명
|
||||
*/
|
||||
@JsonProperty("GROUPNAME")
|
||||
private String groupname;
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user