feat: 자료실 파일명이 긴 경우 다운로드 안 되는 버그 수정

main
thkim 2025-09-24 09:57:31 +09:00
parent 0ed51bee5b
commit c76c288ad3
11 changed files with 105 additions and 47 deletions

View File

@ -316,7 +316,6 @@ public class DrillingInquiryServiceImpl implements DrillingInquiryService {
}
String projectMasterCompanyCode = loginMapper.findProjectMasterCompanyCodeByUserid(userId);
if( projectMasterCompanyCode == null || projectMasterCompanyCode.trim().isEmpty() ) {

View File

@ -164,7 +164,8 @@ public class ManageExcelUploadProc03Controller {
* @throws Exception
*/
@SuppressWarnings({ "unchecked"})
@RequestMapping(value = "/stepSave03.do", method = RequestMethod.POST)
//@RequestMapping(value = "/stepSave03.do", method = RequestMethod.POST)
@RequestMapping(value = "/stepSave03.do", method = RequestMethod.POST, produces = "application/json;charset=UTF-8")
public @ResponseBody String stepSave03(@RequestParam HashMap<String,Object> params, ModelMap model ,HttpServletRequest request, HttpServletResponse response) throws Exception{
WebUtil wUtil = new WebUtil();
strUtil sUtil = new strUtil();

View File

@ -40,6 +40,7 @@ import geoinfo.map.mapControl.service.MapControlService;
import geoinfo.regi.selectClassInfo.service.SelectClassService;
import geoinfo.regi.status.service.RegiPageService;
import geoinfo.regi.util.exportGeotechnicalPointShp2;
import geoinfo.util.MyUtil;
import ictway.comm.util.parseData;
import ictway.comm.util.strUtil;
import ictway.comm.web.WebUtil;
@ -113,13 +114,34 @@ public class RegiController {
// String srchReportType = sUtil.checkNull(parseData.parseData(String.valueOf(params.get("searchReportType"))));
String userId = String.valueOf(request.getSession().getAttribute("USERID"));
// 첫 페이지 로딩일 경우 최근 3개월 데이터로 조회
params.put("userId", userId);
// 첫 페이지에서
// 사용자가 등록한 프로젝트를 조회한다. 등록된 프로젝트가 없다면 최근 3개월 데이터로 조회 한다.
if ("search".equals(srchMode) == false) {
String minDatetime = null;
String maxDatetime = null;
List<EgovMap> inputdateRangeByUserid = masterService.getInputdateRangeByUserid(params);
if( 0 < inputdateRangeByUserid.size() ) {
EgovMap inputdateRangeByUseridItem = inputdateRangeByUserid.get(0);
if( inputdateRangeByUseridItem != null ) {
minDatetime = MyUtil.getStringFromObject( inputdateRangeByUseridItem.get("minDatetime") );
maxDatetime = MyUtil.getStringFromObject( inputdateRangeByUseridItem.get("maxDatetime") );
}
}
if( minDatetime != null && maxDatetime != null ) {
srchStartDate = minDatetime;
} else {
srchStartDate = wUtil.getMonthDay(-3);
}
srchEndDate = wUtil.getToday();
}
params.put("userId", userId);
params.put("projectName", srchProjectName);
params.put("startDate", srchStartDate);
params.put("endDate", srchEndDate);

View File

@ -192,4 +192,6 @@ public interface RegiPageMapper {
EgovMap selectModeifyCallReason(HashMap<String, Object> params) throws Exception;
public ArrayList<HashMap<String, Object>> getHoleNamesByProjectCode(HashMap<String,Object> params) throws Exception;
List<EgovMap> getInputdateRangeByUserid(Map<String, Object> params) throws Exception;
}

View File

@ -197,4 +197,6 @@ public interface RegiPageService {
public int deleteOldDatas(HashMap<String, Object> params) throws Exception;
List<EgovMap> getInputdateRangeByUserid(Map<String, Object> params) throws Exception;
}

View File

@ -492,4 +492,11 @@ public class RegiPageServiceImpl implements RegiPageService {
return 0;
}
/**
* .
*/
@Override
public List<EgovMap> getInputdateRangeByUserid(Map<String, Object> params) throws Exception {
return regiPageMapper.getInputdateRangeByUserid(params);
}
}

View File

@ -308,7 +308,6 @@
</select>
<select id="selectWebCartInfoItems" parameterType="map" resultType="egovMap">
SELECT
RNK,HOLE_CODE,
REPLACE(REPLACE(PROJECT_NAME, CHR(13), ''), CHR(10), '') as PROJECT_NAME,
@ -332,11 +331,19 @@
WHERE NVL(A.USE_YN,' ') <> 'N' AND NVL(B.USE_YN,' ') <> 'N' AND A.PROJECT_CODE = B.PROJECT_CODE
]]>
<if test="sCode != 'No'">
AND A.HOLE_CODE IN
<foreach collection="sCode" item="sCode" index="index" open="(" close=")" separator=",">
#{sCode}
AND (
<foreach collection="sCode" item="item" index="index" separator="OR">
<if test="index % 1000 == 0">
A.HOLE_CODE IN
<foreach collection="sCode" item="sCodeItem" index="innerIndex" open="(" close=")" separator=",">
<if test="innerIndex >= index and innerIndex &lt; index + 1000">
#{sCodeItem}
</if>
</foreach>
</if>
</foreach>
)
</if>
<if test="sCode == 'No'">
AND ROWNUM = 0
</if>

View File

@ -1422,4 +1422,16 @@ INSERT INTO TEMP_SMS_LOG (
]]>
</select>
<select id="getInputdateRangeByUserid" parameterType="map" resultType="egovMap">
SELECT
MIN(TO_CHAR(tmi.DATETIME, 'YYYYMMDD')) AS "MIN_DATETIME",
MAX(TO_CHAR(tmi.DATETIME, 'YYYYMMDD')) AS "MAX_DATETIME"
FROM
GEOINFO.TEMP_META_INFO tmi
WHERE
tmi.USERID = #{userId}
AND tmi.REPORT_TYPE = 'CH'
</select>
</mapper>

View File

@ -61,17 +61,17 @@
<td class="t-left" colspan="5">
<c:if test="${!empty result.fileName1 }">
<p class="attachments-row">
<a href=javascript:fileDownload('${result.fileName1 }','${result.saveName1 }');>${result.fileName1 }</a>
<a href="javascript:fileDownload('${result.fileName1 }','${result.saveName1 }');">${result.fileName1 }</a>
</p>
</c:if>
<c:if test="${!empty result.fileName2 }">
<p class="attachments-row">
<a href=javascript:fileDownload('${result.fileName2 }','${result.saveName2 }');>${result.fileName2 }</a>
<a href="javascript:fileDownload('${result.fileName2 }','${result.saveName2 }');">${result.fileName2 }</a>
</p>
</c:if>
<c:if test="${!empty result.fileName3 }">
<p class="attachments-row">
<a href=javascript:fileDownload('${result.fileName3 }','${result.saveName3 }');>${result.fileName3 }</a>
<a href="javascript:fileDownload('${result.fileName3 }','${result.saveName3 }');">${result.fileName3 }</a>
</p>
</c:if>
</td>

View File

@ -124,6 +124,9 @@ function fnSaveStep2() {
var jsonObj = null;
if( type === 'object' ) {
jsonObj = data.resultData;
if( typeof jsonObj === 'undefined' ) {
jsonObj = data.response;
}
} else {
jsonObj = JSON.parse(data).resultData;
}
@ -138,6 +141,9 @@ function fnSaveStep2() {
var jsonObj = null;
if( type === 'object' ) {
jsonObj = data.responseJSON.resultData;
if( typeof jsonObj === 'undefined' ) {
jsonObj = data.response;
}
} else {
jsonObj = JSON.parse(data.response).resultData;
}