IIM delete 연동 수정
This commit is contained in:
+13
-1
@@ -25,12 +25,15 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.transformer.layout.QLayoutEntity;
|
||||
import com.eactive.eai.data.entity.onl.transformer.layout.QLayoutItemEntity;
|
||||
import com.eactive.eai.rms.common.base.OnlBaseService;
|
||||
import com.eactive.eai.rms.common.datasource.DataSourceContextHolder;
|
||||
import com.eactive.eai.rms.common.util.StringUtils;
|
||||
import com.eactive.eai.rms.data.entity.onl.layout.LayoutService;
|
||||
import com.eactive.eai.rms.onl.manage.rule.layout.LayoutDao;
|
||||
import com.eactive.eai.rms.onl.manage.serviceinfo.eaimsg.EaiMsgDao;
|
||||
import com.querydsl.jpa.impl.JPAQueryFactory;
|
||||
|
||||
@Service("layoutSyncService")
|
||||
public class LayoutSyncService extends OnlBaseService {
|
||||
@@ -75,7 +78,16 @@ public class LayoutSyncService extends OnlBaseService {
|
||||
|
||||
public void deleteLayout(HashMap<String,Object> vo)
|
||||
throws Exception {
|
||||
layoutService.findById(Objects.toString(vo.get("loutName"))).ifPresent(layoutService::delete);
|
||||
//등록안된 전문유형을 가진 레이아웃 경우 에러발생하기 때문에 JPA 사용 못함
|
||||
//layoutService.findById(Objects.toString(vo.get("loutName"))).ifPresent(layoutService::delete);
|
||||
|
||||
String loutName = Objects.toString(vo.get("loutName"));
|
||||
JPAQueryFactory qf = layoutService.getJPAQueryFactory();
|
||||
QLayoutItemEntity qItem = QLayoutItemEntity.layoutItemEntity;
|
||||
QLayoutEntity qLayout = QLayoutEntity.layoutEntity;
|
||||
|
||||
qf.delete(qItem).where(qItem.id.loutname.eq(loutName)).execute(); // tseaitr08 먼저
|
||||
qf.delete(qLayout).where(qLayout.loutname.eq(loutName)).execute(); // tseaitr07
|
||||
}
|
||||
|
||||
public List<HashMap<String,Object>> getAllLayouts() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user