Index: web-module/pom.xml
===================================================================
diff -u -r55ebb4fdbc0bd1d3413b8b0e9c695020c457873c -r625887d83ad3d17f16ce0f0e99c2bfa5b8dba063
--- web-module/pom.xml (.../pom.xml) (revision 55ebb4fdbc0bd1d3413b8b0e9c695020c457873c)
+++ web-module/pom.xml (.../pom.xml) (revision 625887d83ad3d17f16ce0f0e99c2bfa5b8dba063)
@@ -17,7 +17,7 @@
Web Project by 313 DEV GRP
- 23.02.03
+ 23.02.06
Index: web-module/src/main/java/egovframework/api/arms/module_armsscheduler/component/ArmsSchedulerUtil.java
===================================================================
diff -u -rb7429348b97fd89d41aaa97521e08ca41cf0c2f6 -r625887d83ad3d17f16ce0f0e99c2bfa5b8dba063
--- web-module/src/main/java/egovframework/api/arms/module_armsscheduler/component/ArmsSchedulerUtil.java (.../ArmsSchedulerUtil.java) (revision b7429348b97fd89d41aaa97521e08ca41cf0c2f6)
+++ web-module/src/main/java/egovframework/api/arms/module_armsscheduler/component/ArmsSchedulerUtil.java (.../ArmsSchedulerUtil.java) (revision 625887d83ad3d17f16ce0f0e99c2bfa5b8dba063)
@@ -16,21 +16,26 @@
import com.atlassian.jira.rest.client.internal.async.AsynchronousJiraRestClientFactory;
import com.atlassian.util.concurrent.Promise;
import egovframework.api.arms.module_pdservice.model.PdServiceDTO;
+import egovframework.api.arms.module_pdservice.service.PdService;
import egovframework.api.arms.module_pdservicejira.model.PdServiceJiraDTO;
import egovframework.api.arms.module_pdservicejira.service.PdServiceJira;
import egovframework.api.arms.util.PropertiesReader;
import egovframework.com.cmm.service.EgovProperties;
import egovframework.com.ext.jstree.springHibernate.core.service.JsTreeHibernateServiceImpl;
import egovframework.com.ext.jstree.support.util.StringUtils;
+import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Order;
+import org.hibernate.criterion.Restrictions;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
+import org.springframework.http.ResponseEntity;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
+import org.springframework.web.client.RestTemplate;
import java.io.IOException;
import java.net.URI;
@@ -100,5 +105,56 @@
final JiraRestClient restClient = ArmsSchedulerUtil.getJiraRestClient();
}
+ @Autowired
+ @Qualifier("pdService")
+ private PdService pdService;
+ @Scheduled(initialDelay = 1 * 60 * 1000, fixedDelay = 5 * 60 * 1000) //10m 딜레이, 5m 단위
+ public void callback_toMid_test() throws Exception {
+ PropertiesReader propertiesReader = new PropertiesReader("egovframework/egovProps/globals.properties");
+ String armsUrl = "http://127.0.0.1:13131";
+
+ PdServiceDTO pdServiceDTO = new PdServiceDTO();
+ pdServiceDTO.setOrder(Order.asc("c_id"));
+ Criterion criterion = Restrictions.not(
+ Restrictions.in("c_id", new Object[] {1L, 2L})
+ );
+ pdServiceDTO.getCriterions().add(criterion);
+ List list = pdService.getChildNode(pdServiceDTO);
+
+ for ( PdServiceDTO dto: list ) {
+ String reqTableName = "T_ARMS_REQSTATUS_" + dto.getC_id();
+ String targetUrl = "/callback/api/arms/reqStatus/" + reqTableName + "/updateStatusNode.do";
+
+ RestTemplate restTemplate = new RestTemplate();
+ ResponseEntity response = restTemplate.getForEntity(armsUrl + targetUrl, String.class);
+ logger.info("response = " + response);
+ }
+
+ }
+
+ @Scheduled(initialDelay = 1 * 60 * 1000, fixedDelay = 5 * 60 * 1000) //10m 딜레이, 5m 단위
+ public void callback_toMid_ReqIssueDisable() throws Exception {
+ PropertiesReader propertiesReader = new PropertiesReader("egovframework/egovProps/globals.properties");
+ String armsUrl = "http://127.0.0.1:13131";
+
+ PdServiceDTO pdServiceDTO = new PdServiceDTO();
+ pdServiceDTO.setOrder(Order.asc("c_id"));
+ Criterion criterion = Restrictions.not(
+ Restrictions.in("c_id", new Object[] {1L, 2L})
+ );
+ pdServiceDTO.getCriterions().add(criterion);
+ List list = pdService.getChildNode(pdServiceDTO);
+
+ for ( PdServiceDTO dto: list ) {
+ String reqTableName = "T_ARMS_REQSTATUS_" + dto.getC_id();
+ String targetUrl = "/callback/api/arms/reqStatus/" + reqTableName + "/reqIssueDisable/updateStatusNode.do";
+
+ RestTemplate restTemplate = new RestTemplate();
+ ResponseEntity response = restTemplate.getForEntity(armsUrl + targetUrl, String.class);
+ logger.info("response = " + response);
+ }
+
+ }
+
}
\ No newline at end of file
Index: web-module/src/main/java/egovframework/api/arms/module_reqadd/controller/UserReqAddController.java
===================================================================
diff -u -r2a7685dcd381b2969d7137d35f5ba056544bc71b -r625887d83ad3d17f16ce0f0e99c2bfa5b8dba063
--- web-module/src/main/java/egovframework/api/arms/module_reqadd/controller/UserReqAddController.java (.../UserReqAddController.java) (revision 2a7685dcd381b2969d7137d35f5ba056544bc71b)
+++ web-module/src/main/java/egovframework/api/arms/module_reqadd/controller/UserReqAddController.java (.../UserReqAddController.java) (revision 625887d83ad3d17f16ce0f0e99c2bfa5b8dba063)
@@ -607,7 +607,7 @@
if(jiraVerInfoArr == null || jiraVerInfoArr.length == 0) {
//버전 정보도 없고, 지라 버전 정보도 없이 업데이트를 치는 경우
//이슈가 있으면 전부 disable 처리 할 것.
- if(issueInfoArr.length == 0){
+ if(issueInfoArr == null || issueInfoArr.length == 0){
//버전 정보도 없고, 지라 버전 정보도 없이 업데이트를 치는 경우
//근데 이슈도 없어. - 할게 없네
}else{
@@ -625,7 +625,7 @@
}else{
//버전 정보가 없는데, 지라 버전 정보는 있다는 건. 개별 처리를 한다는 거고
//이슈가 없으니까, 지라 버전만큼 이슈를 생성하자.
- if(issueInfoArr.length == 0){
+ if(issueInfoArr ==null || issueInfoArr.length == 0){
for ( String jiraVerID : jiraVerInfoArr ) {
PdServiceJiraVerDTO pdServiceJiraVerDTO = new PdServiceJiraVerDTO();
@@ -790,6 +790,17 @@
SessionUtil.removeAttribute("updateNode");
+ String reqTableName = StringUtility.replace(changeReqTableName,
+ "T_ARMS_REQADD_", "T_ARMS_REQSTATUS_");
+
+ PropertiesReader propertiesReader = new PropertiesReader("egovframework/egovProps/globals.properties");
+ String armsUrl = "http://127.0.0.1:13131";
+ String targetUrl = "/callback/api/arms/reqStatus/" + reqTableName + "/updateStatusNode.do";
+
+ RestTemplate restTemplate = new RestTemplate();
+ ResponseEntity response = restTemplate.getForEntity(armsUrl + targetUrl, String.class);
+ logger.info("response = " + response);
+
ModelAndView modelAndView = new ModelAndView("jsonView");
modelAndView.addObject("result", "god");