feat: 건설현장 연계기능 구현 완료

main
thkim 2025-05-22 10:57:13 +09:00
parent 5c18871ab9
commit 476fa66d7b
7 changed files with 100 additions and 5 deletions

View File

@ -32,3 +32,6 @@ src\main\java\geoinfo\drilling\input\service\DrillingInputService.java
src\main\java\geoinfo\drilling\input\service\impl\DrillingInputServiceImpl.java
src\main\java\geoinfo\drilling\input\service\DrillingInputMapper.java
src\main\resources\egovframework\sqlmap\mapper\drilling\input\DrillingInputMapper.xml
src\main\java\geoinfo\regi\info\InfoController.java
src\main\webapp\WEB-INF\views\web\input\projectInfo.jsp

View File

@ -15,6 +15,8 @@ public interface DrillingInquiryMapper {
public String spGetConstCompanyName(Long constCompanyCode) throws SQLException;
public String spGetProjectMbr(HashMap<String, Object> params) throws SQLException;
public List<EgovMap> drillingInquiryAutocompleteList(HashMap<String, Object> params) throws SQLException;
public EgovMap getItemByProjectCode(HashMap<String, Object> params) throws SQLException;
}

View File

@ -15,5 +15,6 @@ public interface DrillingInquiryService {
JSONObject drillingInquiryList(HttpServletRequest request, HashMap<String, Object> params) throws Exception;
HashMap<String, Object> spGetProjectMbr(HttpServletRequest request, HashMap<String, Object> params, String userId) throws Exception;
List<EgovMap> drillingInquiryAutocompleteList(HttpServletRequest request, HashMap<String, Object> params) throws Exception;
EgovMap getItemByProjectCode(HttpServletRequest request, HashMap<String, Object> params) throws Exception;
}

View File

@ -305,7 +305,6 @@ public class DrillingInquiryServiceImpl implements DrillingInquiryService {
try {
try {
List<EgovMap> list = drillingInquiryMapper.drillingInquiryAutocompleteList(params);
return list;
@ -329,5 +328,31 @@ public class DrillingInquiryServiceImpl implements DrillingInquiryService {
}
}
@Override
public EgovMap getItemByProjectCode(HttpServletRequest request, HashMap<String, Object> params) throws Exception {
String userId = MyUtil.getStringFromObject( request.getSession().getAttribute("USERID") );
if( userId == null){
throw new Exception( "로그인이 필요한 서비스입니다." );
}
try {
EgovMap item = drillingInquiryMapper.getItemByProjectCode(params);
return item;
} catch (SQLException e) {
String strTxt =
"---------- BUG REPORTING START ----------" + "\n" +
"에러 문구:[" + request.getRequestURI() + " " + "]" + "\n" +
"params:[\n" + params.toString() + "\n]\n" +
"e.getMessage():[\n" + e.getMessage() + "\n]\n" + "\n" +
"new Date().toString():[" + new Date().toString() + "]\n" + "\n" +
"---------- BUG REPORTING END ----------" + "\n" +
"";
System.out.println(strTxt);
throw new Exception( "오류가 발생하였습니다." + "\n" + "SQLException" );
}
}
}

View File

@ -4,6 +4,7 @@ import egovframework.com.cmm.service.EgovProperties;
import egovframework.rte.psl.dataaccess.util.EgovMap;
import geoinfo.com.GeoinfoCommon;
import geoinfo.com.file.FileCmmn;
import geoinfo.drilling.inquiry.service.DrillingInquiryService;
import geoinfo.regi.info.service.InfoService;
import ictway.comm.web.GlobalsWeb;
import ictway.comm.web.WebUtil;
@ -53,6 +54,9 @@ public class InfoController {
@Resource(name = "infoService")
private InfoService infoService;
@Autowired
DrillingInquiryService drillingInquiryService;
/* 20231223
* @Autowired
private PlatformTransactionManager transactionManager;
@ -88,6 +92,36 @@ public class InfoController {
List<EgovMap> dis = infoService.getDisList(params);
jsonObj.put("dis", dis);
//발주기관에서 등록한 프로젝트와 맵핑되는 프로젝트를 검색한다.
EgovMap tempConstructSiteInfo = drillingInquiryService.getItemByProjectCode(request, params);
if( tempConstructSiteInfo != null && tempConstructSiteInfo.get("projectCode") != null ) {
JSONObject jsonTempConstructSiteInfo = new JSONObject();
jsonTempConstructSiteInfo.put("cid", tempConstructSiteInfo.get("cid"));
jsonTempConstructSiteInfo.put("constName", tempConstructSiteInfo.get("constName"));
jsonTempConstructSiteInfo.put("constStartDate", tempConstructSiteInfo.get("constStartDate"));
jsonTempConstructSiteInfo.put("constEndDate", tempConstructSiteInfo.get("constEndDate"));
jsonTempConstructSiteInfo.put("constStateCode", tempConstructSiteInfo.get("constStateCode"));
jsonTempConstructSiteInfo.put("masterCompanyOCode", tempConstructSiteInfo.get("masterCompanyOCode"));
jsonTempConstructSiteInfo.put("masterCompanyTwCode", tempConstructSiteInfo.get("masterCompanyTwCode"));
jsonTempConstructSiteInfo.put("masterCompanyThCode", tempConstructSiteInfo.get("masterCompanyThCode"));
jsonTempConstructSiteInfo.put("masterCompanyName", tempConstructSiteInfo.get("masterCompanyName"));
jsonTempConstructSiteInfo.put("masterCompanyDept", tempConstructSiteInfo.get("masterCompanyDept"));
jsonTempConstructSiteInfo.put("masterCompanyAdmin", tempConstructSiteInfo.get("masterCompanyAdmin"));
jsonTempConstructSiteInfo.put("masterCompanyTel", tempConstructSiteInfo.get("masterCompanyTel"));
jsonTempConstructSiteInfo.put("constCompanyCode", tempConstructSiteInfo.get("constCompanyCode"));
jsonTempConstructSiteInfo.put("constCompanyAdmin", tempConstructSiteInfo.get("constCompanyAdmin"));
jsonTempConstructSiteInfo.put("constCompanyTel", tempConstructSiteInfo.get("constCompanyTel"));
jsonTempConstructSiteInfo.put("projectStateCode", tempConstructSiteInfo.get("projectStateCode"));
jsonTempConstructSiteInfo.put("projectHoleNumber", tempConstructSiteInfo.get("projectHoleNumber"));
jsonTempConstructSiteInfo.put("constTag", tempConstructSiteInfo.get("constTag"));
jsonTempConstructSiteInfo.put("projectCode", tempConstructSiteInfo.get("projectCode"));
jsonObj.put("tempConstructSiteInfo", jsonTempConstructSiteInfo);
}
// 수정모드
if ("".equals(oProjectCode) == false) {
params.put("projectCode", oProjectCode);

View File

@ -95,4 +95,12 @@
</select>
<select id="getItemByProjectCode" parameterType="map" resultType="egovMap">
<![CDATA[
SELECT * FROM TEMP_CONSTRUCT_SITE_INFO WHERE TRIM(PROJECT_CODE) = #{PROJECT_CODE}
]]>
</select>
</mapper>

View File

@ -634,6 +634,28 @@
fn_SelectedData(masFrm03, project.projectMasterCompanyThCode, 'GL_DISGM_DISGF_DIS', 'multi', 'GDis', masFrm04, project.projectMasterCompanyFCode, 'GF_DIS', '4');
}
//발주기관에 의해 입력된 발주처 정보 자동완성
var tempConstructSiteInfoString = '${result.tempConstructSiteInfo}';
if( tempConstructSiteInfoString ) {
var tempConstructSiteInfo = JSON.parse(tempConstructSiteInfoString);
if(tempConstructSiteInfo) {
var masFrm01 = document.getElementById("PROJECT_MASTER_COMPANY_O_CODE");
var masFrm02 = document.getElementById("PROJECT_MASTER_COMPANY_TW_CODE");
var masFrm03 = document.getElementById("PROJECT_MASTER_COMPANY_TH_CODE");
var masFrm04 = document.getElementById("PROJECT_MASTER_COMPANY_F_CODE");
masFrm01.value = tempConstructSiteInfo.masterCompanyOCode;
fn_SelectedData(masFrm01, tempConstructSiteInfo.masterCompanyOCode, 'GL_DIS', 'multi', 'GDis', masFrm02, tempConstructSiteInfo.masterCompanyTwCode, 'GM_DIS');
masFrm02.value = tempConstructSiteInfo.masterCompanyTwCode;
fn_SelectedData(masFrm02, tempConstructSiteInfo.masterCompanyTwCode, 'GL_DISGM_DIS', 'multi', 'GDis', masFrm03, tempConstructSiteInfo.masterCompanyTwCode, 'GS_DIS', '3');
masFrm03.value = tempConstructSiteInfo.masterCompanyThCode;
fn_SelectedData(masFrm03, tempConstructSiteInfo.masterCompanyThCode, 'GL_DISGM_DISGF_DIS', 'multi', 'GDis', masFrm04, null, 'GF_DIS', '4');
}
}
if (document.getElementById("PROJECT_MASTER_COMPANY_O_CODE").selectedIndex == 0) {
document.getElementById("PROJECT_MASTER_COMPANY_NAME").disabled = true; //신규등록 발주처 선택시 입력창 비활성화
} else if (document.getElementById("PROJECT_MASTER_COMPANY_O_CODE").selectedIndex == 4) { //직접입력