|
|
@ -8,6 +8,7 @@ import javax.annotation.Resource;
|
|
|
|
import javax.sql.DataSource;
|
|
|
|
import javax.sql.DataSource;
|
|
|
|
|
|
|
|
|
|
|
|
import org.apache.ibatis.mapping.VendorDatabaseIdProvider;
|
|
|
|
import org.apache.ibatis.mapping.VendorDatabaseIdProvider;
|
|
|
|
|
|
|
|
import org.egovframe.rte.fdl.string.EgovStringUtil;
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
@ -50,36 +51,47 @@ public class RentInterfaceController extends ApplicationController {
|
|
|
|
public ModelAndView regist(@RequestBody JSONObject apiSpec) {
|
|
|
|
public ModelAndView regist(@RequestBody JSONObject apiSpec) {
|
|
|
|
ModelAndView mav = new ModelAndView("jsonView");
|
|
|
|
ModelAndView mav = new ModelAndView("jsonView");
|
|
|
|
|
|
|
|
|
|
|
|
List<MsgEntity> msgEntityList = new ArrayList<MsgEntity>();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String reqSys = (String) apiSpec.get("reqSys"); //요청시스템(이노,진우,엑스아이티)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String msgPrps = (String) apiSpec.get("msgPrps"); //목적(고장신고,사전알림,주차신고민원,기타민원)
|
|
|
|
|
|
|
|
String msgDtlPrps = (String) apiSpec.get("msgDtlPrps"); //상세목적
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String sggCd = (String) apiSpec.get("sggCd"); //시군구코드
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//누리2모듈 아이디 찾기
|
|
|
|
//누리2모듈 아이디 찾기
|
|
|
|
MsgQuery msgQuery = new MsgQuery();
|
|
|
|
MsgQuery msgQuery = new MsgQuery();
|
|
|
|
msgQuery.setStngInfoType("01");
|
|
|
|
msgQuery.setStngInfoType("01");
|
|
|
|
msgQuery.setSggCd(System.getProperty("sgg"));
|
|
|
|
msgQuery.setSggCd(System.getProperty("sgg"));
|
|
|
|
String nuri2Id = msgMapper.selectStng(msgQuery).string("MODULE_ID");
|
|
|
|
String nuri2Id = msgMapper.selectStng(msgQuery).string("MODULE_ID");
|
|
|
|
if(ifEmpty(nuri2Id, ()->"").equals("")) {
|
|
|
|
if(ifEmpty(nuri2Id, ()->"").equals("")) {
|
|
|
|
|
|
|
|
mav.addObject("failRsn", "문자발송모듈아이디 찾기 실패");
|
|
|
|
|
|
|
|
mav.addObject("saved", false);
|
|
|
|
|
|
|
|
return mav;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String reqSys = (String) apiSpec.get("reqSys"); //요청시스템(이노,진우,엑스아이티)
|
|
|
|
|
|
|
|
if(EgovStringUtil.null2void(reqSys).equals("")) {
|
|
|
|
|
|
|
|
mav.addObject("failRsn", "요청시스템이 없습니다.");
|
|
|
|
mav.addObject("saved", false);
|
|
|
|
mav.addObject("saved", false);
|
|
|
|
|
|
|
|
return mav;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String msgPrps = (String) apiSpec.get("msgPrps"); //목적(고장신고,사전알림,주차신고민원,기타민원)
|
|
|
|
|
|
|
|
if(EgovStringUtil.null2void(msgPrps).equals("")) {
|
|
|
|
|
|
|
|
mav.addObject("failRsn", "메시지 발송 목적이 없습니다.");
|
|
|
|
|
|
|
|
mav.addObject("saved", false);
|
|
|
|
|
|
|
|
return mav;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String msgDtlPrps = (String) apiSpec.get("msgDtlPrps"); //상세목적
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String sggCd = (String) apiSpec.get("sggCd"); //시군구코드
|
|
|
|
|
|
|
|
|
|
|
|
String databaseId = databaseIdProvider.getDatabaseId(dataSource);
|
|
|
|
String databaseId = databaseIdProvider.getDatabaseId(dataSource);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<MsgEntity> msgEntityList = new ArrayList<MsgEntity>();
|
|
|
|
List<Map> reqs = (List<Map>) apiSpec.get("reqs");
|
|
|
|
List<Map> reqs = (List<Map>) apiSpec.get("reqs");
|
|
|
|
for(Map req : reqs) {
|
|
|
|
for(Map req : reqs) {
|
|
|
|
MsgEntity msgEntity = new MsgEntity();
|
|
|
|
MsgEntity msgEntity = new MsgEntity();
|
|
|
|
msgEntity.setMsgSubId(nuri2Id);
|
|
|
|
msgEntity.setSubId(nuri2Id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String trnsmisNo = (String) req.get("trnsmisNo");
|
|
|
|
String trnsmisNo = (String) req.get("trnsmisNo");
|
|
|
|
String recptnNo = (String) req.get("recptnNo");
|
|
|
|
String recptnNo = (String) req.get("recptnNo");
|
|
|
|
String mssageCn = (String) req.get("mssageCn");
|
|
|
|
String mssageCn = (String) req.get("mssageCn");
|
|
|
|
|
|
|
|
String resDate = (String) req.get("resDate");
|
|
|
|
|
|
|
|
|
|
|
|
msgEntity.setCallback(trnsmisNo);
|
|
|
|
msgEntity.setCallback(trnsmisNo);
|
|
|
|
msgEntity.setPhone(recptnNo);
|
|
|
|
msgEntity.setPhone(recptnNo);
|
|
|
@ -90,6 +102,10 @@ public class RentInterfaceController extends ApplicationController {
|
|
|
|
mssageCn = this.replaceLineChangeForNuri2Oracle(mssageCn);
|
|
|
|
mssageCn = this.replaceLineChangeForNuri2Oracle(mssageCn);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(!EgovStringUtil.null2void(resDate).equals("")) {
|
|
|
|
|
|
|
|
msgEntity.setResDate(resDate);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
boolean able_kko = false; //알림톡 가능 여부
|
|
|
|
boolean able_kko = false; //알림톡 가능 여부
|
|
|
|
boolean able_rcs = false; //RCS 가능 여부
|
|
|
|
boolean able_rcs = false; //RCS 가능 여부
|
|
|
|
|
|
|
|
|
|
|
|