feat: 시추공명 입력 및 저장시, "고유번호 (시추공명)"이 함께 나타나도록 변경

main
thkim 2024-07-12 17:31:55 +09:00
parent 181e062ee3
commit 7978ffaed0
6 changed files with 57 additions and 6 deletions

View File

@ -12,6 +12,7 @@ import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.Map; import java.util.Map;
@ -179,7 +180,7 @@ public class RegiController {
model.addAttribute("mCurUrl", mCurUrl); model.addAttribute("mCurUrl", mCurUrl);
ArrayList mArray = new ArrayList(); ArrayList<HashMap<String, Object>> mArray = new ArrayList<HashMap<String, Object>>();
ArrayList mArrayTest = new ArrayList(); ArrayList mArrayTest = new ArrayList();
ArrayList mMenuCount01 = new ArrayList(); ArrayList mMenuCount01 = new ArrayList();
ArrayList mMenuCount02 = new ArrayList(); ArrayList mMenuCount02 = new ArrayList();
@ -196,6 +197,7 @@ public class RegiController {
int mRESISTIVITY_LINES = 0; // 전기비저항 측선수 int mRESISTIVITY_LINES = 0; // 전기비저항 측선수
int mREFRACTION_LINES = 0; // 굴절법탄성파 측선수 int mREFRACTION_LINES = 0; // 굴절법탄성파 측선수
ArrayList<HashMap<String, Object>> arrHoleName = null;
if ("".equals(mPROJECT_CODE) == false) { if ("".equals(mPROJECT_CODE) == false) {
// Array 로 받기 // Array 로 받기
@ -203,13 +205,18 @@ public class RegiController {
// map // map
if (mArray.isEmpty() == false) { if (mArray.isEmpty() == false) {
mMap = (HashMap) mArray.get(0); mMap = (HashMap<?, ?>) mArray.get(0);
mPROJECT_NAME = mUtil.isNullOb(mMap.get("PROJECT_NAME")); mPROJECT_NAME = mUtil.isNullOb(mMap.get("PROJECT_NAME"));
model.addAttribute("mPROJECT_NAME", mPROJECT_NAME); model.addAttribute("mPROJECT_NAME", mPROJECT_NAME);
mSTATE = mUtil.isNullOb(mMap.get("STATE")); mSTATE = mUtil.isNullOb(mMap.get("STATE"));
model.put("mState", mSTATE); model.put("mState", mSTATE);
} }
//시추공 명을 가져온다.
arrHoleName = masterService.getHoleNamesByProjectCode(params);
model.addAttribute("arrHoleName", arrHoleName);
// 시험정보가져오기 // 시험정보가져오기
mArrayTest = masterService.getTestInfo(params); mArrayTest = masterService.getTestInfo(params);
model.addAttribute("mArrayTest", mArrayTest); model.addAttribute("mArrayTest", mArrayTest);
@ -254,6 +261,7 @@ public class RegiController {
if ("CH".equals(mREPORT_TYPE) == true && "".equals(hole) == false) { if ("CH".equals(mREPORT_TYPE) == true && "".equals(hole) == false) {
params.put("PROJECT_CODE", mPROJECT_CODE); params.put("PROJECT_CODE", mPROJECT_CODE);
params.put("HOLE_CODE", mUtil.isNullOb(mMap.get("PROJECT_CODE")) + hole); params.put("HOLE_CODE", mUtil.isNullOb(mMap.get("PROJECT_CODE")) + hole);
// ----------시험정보---------- // ----------시험정보----------
// Array 로 받기 // Array 로 받기

View File

@ -25,7 +25,7 @@ public interface RegiPageMapper {
public int getDisCount() throws Exception; public int getDisCount() throws Exception;
public ArrayList<HashMap<?,?>> getMarray(HashMap<String,Object> params) throws Exception; public ArrayList<HashMap<String, Object>> getMarray(HashMap<String,Object> params) throws Exception;
public ArrayList<HashMap<?,?>> getTestInfo(HashMap<String,Object> params) throws Exception; public ArrayList<HashMap<?,?>> getTestInfo(HashMap<String,Object> params) throws Exception;
@ -190,4 +190,6 @@ public interface RegiPageMapper {
List<EgovMap> getUnconfinedUsual2(Map<String, Object> params) throws Exception; List<EgovMap> getUnconfinedUsual2(Map<String, Object> params) throws Exception;
EgovMap selectModeifyCallReason(HashMap<String, Object> params) throws Exception; EgovMap selectModeifyCallReason(HashMap<String, Object> params) throws Exception;
public ArrayList<HashMap<String, Object>> getHoleNamesByProjectCode(HashMap<String,Object> params) throws Exception;
} }

View File

@ -25,7 +25,7 @@ public interface RegiPageService {
public int getDisCount() throws Exception; public int getDisCount() throws Exception;
public ArrayList<HashMap<?,?>> getMarray(HashMap<String,Object> params) throws Exception; public ArrayList<HashMap<String, Object>> getMarray(HashMap<String,Object> params) throws Exception;
public ArrayList<HashMap<?,?>> getTestInfo(HashMap<String,Object> params) throws Exception; public ArrayList<HashMap<?,?>> getTestInfo(HashMap<String,Object> params) throws Exception;
@ -192,4 +192,5 @@ public interface RegiPageService {
EgovMap selectModeifyCallReason(HashMap<String, Object> params) throws Exception; EgovMap selectModeifyCallReason(HashMap<String, Object> params) throws Exception;
public ArrayList<HashMap<String, Object>> getHoleNamesByProjectCode(HashMap<String,Object> params) throws Exception;
} }

View File

@ -55,7 +55,7 @@ public class RegiPageServiceImpl implements RegiPageService {
} }
@Override @Override
public ArrayList<HashMap<?, ?>> getMarray(HashMap<String, Object> params) throws Exception { public ArrayList<HashMap<String, Object>> getMarray(HashMap<String, Object> params) throws Exception {
return regiPageMapper.getMarray(params); return regiPageMapper.getMarray(params);
} }
@ -476,4 +476,9 @@ public class RegiPageServiceImpl implements RegiPageService {
return regiPageMapper.selectModeifyCallReason(params); return regiPageMapper.selectModeifyCallReason(params);
} }
@Override
public ArrayList<HashMap<String, Object>> getHoleNamesByProjectCode(HashMap<String, Object> params) throws Exception {
return regiPageMapper.getHoleNamesByProjectCode(params);
}
} }

View File

@ -1407,4 +1407,17 @@ INSERT INTO TEMP_SMS_LOG (
]]> ]]>
</select> </select>
<select id="getHoleNamesByProjectCode" parameterType="map" resultType="java.util.HashMap">
<![CDATA[
SELECT
HOLE_NAME,
HOLE_CODE
FROM
TEMP_HEADER
WHERE
PROJECT_CODE = #{PROJECT_CODE}
]]>
</select>
</mapper> </mapper>

View File

@ -76,14 +76,18 @@ ictway.comm.framework.dbcp.*,ictway.comm.framework.property.*"%>
<% <%
String mHOLE_CODE = (String)request.getAttribute("mHOLE_CODE"); String mHOLE_CODE = (String)request.getAttribute("mHOLE_CODE");
ArrayList mArray = (ArrayList)request.getAttribute("mArray"); ArrayList mArray = (ArrayList)request.getAttribute("mArray");
ArrayList<HashMap<String, Object>> arrHoleName =(ArrayList<HashMap<String, Object>>)request.getAttribute("arrHoleName");
System.out.println("LabImgList - " + LabImgList); System.out.println("LabImgList - " + LabImgList);
System.out.println("mArray.size() - " + mArray.size()); System.out.println("mArray.size() - " + mArray.size());
System.out.println("mArray - " + mArray); System.out.println("mArray - " + mArray);
int k=0; int k=0;
for(int i=0; i < mArray.size(); i++ ){ for(int i=0; i < mArray.size(); i++ ){
Lab_img = "x"; Lab_img = "x";
mMap = (HashMap)mArray.get(i); mMap = (HashMap)mArray.get(i);
if("0".equals(mUtil.isNullOb(mMap.get("NUM"))) == false && "".equals(mUtil.isNullOb(mMap.get("NUM")))== false){ if("0".equals(mUtil.isNullOb(mMap.get("NUM"))) == false && "".equals(mUtil.isNullOb(mMap.get("NUM")))== false){
int cnt = Integer.parseInt(mUtil.isNullOb(mMap.get("NUM"))); int cnt = Integer.parseInt(mUtil.isNullOb(mMap.get("NUM")));
for(int j=1; j<=cnt; j++){ for(int j=1; j<=cnt; j++){
@ -95,11 +99,29 @@ ictway.comm.framework.dbcp.*,ictway.comm.framework.property.*"%>
System.out.println("Lab_img - " + Lab_img); System.out.println("Lab_img - " + Lab_img);
mMapCount02 = (HashMap)request.getAttribute("mMapCount02" + hole); mMapCount02 = (HashMap)request.getAttribute("mMapCount02" + hole);
System.out.println("mMapCount02 = " + mMapCount02); System.out.println("mMapCount02 = " + mMapCount02);
//시추공명을 추가로 넣는다.
String holeName = null;
String thisHoleCode = mUtil.isNullOb(mMap.get("PROJECT_CODE")) + hole;
Iterator<HashMap<String, Object>> iterator = arrHoleName.iterator();
int indexArrHoleName = 0;
while (iterator.hasNext()) {
HashMap<String, Object> mapItem = iterator.next();
String holeCode = mUtil.isNullOb(mapItem.get("HOLE_CODE"));
if( holeCode.equals(thisHoleCode)) {
holeName = mUtil.isNullOb(mapItem.get("HOLE_NAME"));
// 검색 속도 향상을 위해 찾은 것은 지운다.
arrHoleName.remove(indexArrHoleName);
break;
}
indexArrHoleName++;
}
%> %>
<li data-target="tree-4-dep2-<%=holeNum %>" <%if((mHOLE_CODE).equals(mUtil.isNullOb(mMap.get("PROJECT_CODE"))+hole) == false){ %> class="closed" <%} %>> <li data-target="tree-4-dep2-<%=holeNum %>" <%if((mHOLE_CODE).equals(mUtil.isNullOb(mMap.get("PROJECT_CODE"))+hole) == false){ %> class="closed" <%} %>>
<div class="icon-floder floder-<%=mUtil.isNullOb(mMapCount02.get("HOLE_INFO"))%>"></div> <div class="icon-floder floder-<%=mUtil.isNullOb(mMapCount02.get("HOLE_INFO"))%>"></div>
<a href="/web/input/header.do?PROJECT_CODE=${mPROJECT_CODE}&REPORT_TYPE=<%=mUtil.isNullOb(mMap.get("REPORT_TYPE"))%>&HOLE_CODE=<%=mUtil.isNullOb(mMap.get("PROJECT_CODE"))+hole %>"><%=mUtil.curPageStyle(mHOLE_CODE, mUtil.isNullOb(mMap.get("PROJECT_CODE"))+hole, "header",mCurUrl, hole) %></a> <a href="/web/input/header.do?PROJECT_CODE=${mPROJECT_CODE}&REPORT_TYPE=<%=mUtil.isNullOb(mMap.get("REPORT_TYPE"))%>&HOLE_CODE=<%=mUtil.isNullOb(mMap.get("PROJECT_CODE"))+hole %>"><%=mUtil.curPageStyle(mHOLE_CODE, mUtil.isNullOb(mMap.get("PROJECT_CODE"))+hole, "header",mCurUrl, hole) %><span>(<%=mUtil.isNullOb(holeName) %>)</span></a>
<!-- 시추공 --> <!-- 시추공 -->
<ul> <ul>