Merge pull request 'PART 조회 화면 Excel 다운로드 수정' (#213) from V20260210 into main
Reviewed-on: #213
This commit was merged in pull request #213.
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
<%@ page buffer="256kb" %>
|
||||
<%@ page autoFlush = "true" %>
|
||||
<%@ page contentType="application/vnd.ms-excel;charset=UTF-8" %>
|
||||
<%@ page import="com.pms.common.utils.*"%>
|
||||
<%@ page import="java.util.*" %>
|
||||
<%@ page import="com.pms.common.utils.*"%>
|
||||
<%@ page import="java.util.*" %>
|
||||
<%
|
||||
java.text.SimpleDateFormat frm= new java.text.SimpleDateFormat ("yyyy_MM_dd_HH_mm");
|
||||
Calendar cal = Calendar.getInstance();
|
||||
@@ -17,22 +17,19 @@ response.setHeader("Content-Disposition", "attachment;filename="+fileName+"");
|
||||
response.setHeader("Content-Description", "JSP Generated Data");
|
||||
|
||||
ArrayList list = (ArrayList)request.getAttribute("LIST");
|
||||
if(list == null) list = new ArrayList();
|
||||
%>
|
||||
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">
|
||||
<head>
|
||||
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">
|
||||
<head>
|
||||
<meta http-equiv=Content-Type content="text/html; charset=UTF-8">
|
||||
<meta name=ProgId content=Excel.Sheet>
|
||||
<meta name=Generator content="Microsoft Excel 11">
|
||||
<title><%=Constants.SYSTEM_NAME%></title>
|
||||
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
|
||||
<script>
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body class="backcolor">
|
||||
<form name="form1" action="" method="post">
|
||||
</head>
|
||||
<body class="backcolor">
|
||||
<form name="form1" action="" method="post">
|
||||
<section class="min_part_search">
|
||||
<div class="pdm_menu_name">
|
||||
<div class="pdm_menu_name">
|
||||
<h2>
|
||||
<span>설계관리_Part 조회</span>
|
||||
</h2>
|
||||
@@ -40,72 +37,88 @@ ArrayList list = (ArrayList)request.getAttribute("LIST");
|
||||
<div class="contents_page_basic_margin">
|
||||
<div class="pdm_table_wrap">
|
||||
<table class="pdm_table_noImg" style="text-align:center;" border="1">
|
||||
<tr class="pdm_thead" align="center" style="background:yellow; font-weight:bold;">
|
||||
<td>순 </td>
|
||||
<td>품명</td>
|
||||
<td>품번 </td>
|
||||
<td>수량</td>
|
||||
<td>재질</td>
|
||||
<td>사양(규격)</td>
|
||||
<td>MAKER</td>
|
||||
<td>Revision</td>
|
||||
<td>EO No</td>
|
||||
<td>EO Date</td>
|
||||
<td>부품 유형</td>
|
||||
<tr class="pdm_thead" align="center" style="background:yellow; font-weight:bold;">
|
||||
<td>품번</td>
|
||||
<td>품명</td>
|
||||
<td>재료</td>
|
||||
<td>열처리경도</td>
|
||||
<td>열처리방법</td>
|
||||
<td>표면처리</td>
|
||||
<td>메이커</td>
|
||||
<td>범주 이름</td>
|
||||
<td>규격</td>
|
||||
<td>계정구분</td>
|
||||
<td>조달구분</td>
|
||||
<td>재고단위</td>
|
||||
<td>관리단위</td>
|
||||
<td>환산수량</td>
|
||||
<td>LOT구분</td>
|
||||
<td>사용여부</td>
|
||||
<td>검사여부</td>
|
||||
<td>SET품여부</td>
|
||||
<td>의뢰여부</td>
|
||||
<td>개당길이</td>
|
||||
<td>개당소요량</td>
|
||||
<td>비고</td>
|
||||
</tr>
|
||||
<%
|
||||
for(int i = 0 ; i < list.size() ; i++){
|
||||
HashMap map = (HashMap)list.get(i);
|
||||
|
||||
String rnum = CommonUtils.checkNull(map.get("RNUM"));
|
||||
|
||||
String partNo = CommonUtils.checkNull(map.get("PART_NO"));
|
||||
String partName = CommonUtils.checkNull(map.get("PART_NAME"));
|
||||
String eoNo = CommonUtils.checkNull(map.get("EO_NO"));
|
||||
String eoDate = CommonUtils.checkNull(map.get("EO_DATE"));
|
||||
String revision = CommonUtils.checkNull(map.get("REVISION"));
|
||||
String qty = CommonUtils.checkNull(map.get("QTY"));
|
||||
String material = CommonUtils.checkNull(map.get("MATERIAL"));
|
||||
String weight = CommonUtils.checkNull(map.get("WEIGHT"));
|
||||
String size = CommonUtils.checkNull(map.get("SIZE"));
|
||||
String surfaceTreatment = CommonUtils.checkNull(map.get("SURFACE_TREATMENT"));
|
||||
String specNo = CommonUtils.checkNull(map.get("SPEC"));
|
||||
String moldDev = CommonUtils.checkNull(map.get("MOLD_DEV"));
|
||||
String REVISION = CommonUtils.checkNull(map.get("REVISION"));
|
||||
String MAKER = CommonUtils.checkNull(map.get("MAKER"));
|
||||
String PART_TYPE_TITLE = CommonUtils.checkNull(map.get("PART_TYPE_TITLE"));
|
||||
|
||||
|
||||
|
||||
|
||||
String moldDevNew = "";
|
||||
String moldDevCarryOver = "";
|
||||
if("new".equals(moldDev)){
|
||||
moldDevNew = "O";
|
||||
}
|
||||
if("carryOver".equals(moldDev)){
|
||||
moldDevCarryOver = "O";
|
||||
}
|
||||
String hardness = CommonUtils.checkNull(map.get("HEAT_TREATMENT_HARDNESS"));
|
||||
String method = CommonUtils.checkNull(map.get("HEAT_TREATMENT_METHOD"));
|
||||
String surface = CommonUtils.checkNull(map.get("SURFACE_TREATMENT"));
|
||||
String maker = CommonUtils.checkNull(map.get("MAKER"));
|
||||
String partTypeTitle = CommonUtils.checkNull(map.get("PART_TYPE_TITLE"));
|
||||
String spec = CommonUtils.checkNull(map.get("SPEC"));
|
||||
String acctfgNm = CommonUtils.checkNull(map.get("ACCTFG_NM"));
|
||||
String odrfgNm = CommonUtils.checkNull(map.get("ODRFG_NM"));
|
||||
String unitDcNm = CommonUtils.checkNull(map.get("UNIT_DC_NM"));
|
||||
String unitMangDcNm = CommonUtils.checkNull(map.get("UNITMANG_DC_NM"));
|
||||
String unitChngNb = CommonUtils.checkNull(map.get("UNITCHNG_NB"));
|
||||
String lotFgNm = CommonUtils.checkNull(map.get("LOT_FG_NM"));
|
||||
String useYnNm = CommonUtils.checkNull(map.get("USE_YN_NM"));
|
||||
String qcFgNm = CommonUtils.checkNull(map.get("QC_FG_NM"));
|
||||
String setItemFgNm = CommonUtils.checkNull(map.get("SETITEM_FG_NM"));
|
||||
String reqFgNm = CommonUtils.checkNull(map.get("REQ_FG_NM"));
|
||||
String unitLength = CommonUtils.checkNull(map.get("UNIT_LENGTH"));
|
||||
String unitQty = CommonUtils.checkNull(map.get("UNIT_QTY"));
|
||||
String remark = CommonUtils.checkNull(map.get("REMARK"));
|
||||
%>
|
||||
<tr>
|
||||
<td align="center"><%=rnum%></td>
|
||||
<td align="center"><%=partName%></td>
|
||||
<td align="center"><%=partNo%></td>
|
||||
<td align="center"><%=qty%></td>
|
||||
<td align="center"><%=material%></td>
|
||||
<td align="center"><%=specNo%></td>
|
||||
<td align="center"><%=MAKER%></td>
|
||||
<td align="center"><%=REVISION%></td>
|
||||
<td align="center"><%=eoNo%></td>
|
||||
<td align="center"><%=eoDate%></td>
|
||||
<td align="center"><%=PART_TYPE_TITLE%></td>
|
||||
<td align="center" style="mso-number-format:'\@';"><%=partNo%></td>
|
||||
<td align="left"><%=partName%></td>
|
||||
<td align="left"><%=material%></td>
|
||||
<td align="left"><%=hardness%></td>
|
||||
<td align="left"><%=method%></td>
|
||||
<td align="left"><%=surface%></td>
|
||||
<td align="left"><%=maker%></td>
|
||||
<td align="center"><%=partTypeTitle%></td>
|
||||
<td align="left"><%=spec%></td>
|
||||
<td align="center"><%=acctfgNm%></td>
|
||||
<td align="center"><%=odrfgNm%></td>
|
||||
<td align="center"><%=unitDcNm%></td>
|
||||
<td align="center"><%=unitMangDcNm%></td>
|
||||
<td align="center"><%=unitChngNb%></td>
|
||||
<td align="center"><%=lotFgNm%></td>
|
||||
<td align="center"><%=useYnNm%></td>
|
||||
<td align="center"><%=qcFgNm%></td>
|
||||
<td align="center"><%=setItemFgNm%></td>
|
||||
<td align="center"><%=reqFgNm%></td>
|
||||
<td align="center"><%=unitLength%></td>
|
||||
<td align="center"><%=unitQty%></td>
|
||||
<td align="left"><%=remark%></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -134,29 +134,29 @@ public class PartMngController {
|
||||
String actionType = CommonUtils.checkNull(paramMap.get("actionType"));
|
||||
String search = CommonUtils.checkNull(paramMap.get("search"));
|
||||
try {
|
||||
|
||||
|
||||
if("0".equals(searchRevision)){
|
||||
paramMap.put("IS_LAST","");
|
||||
}else if("1".equals(searchRevision)){
|
||||
paramMap.put("IS_LAST",searchRevision);
|
||||
}
|
||||
|
||||
|
||||
code_map.put("product_code",commonService.bizMakeOptionList("", (String)paramMap.get("product_code"),"common.getProductCodeselect"));
|
||||
//고객사
|
||||
code_map.put("customer_cd",commonService.bizMakeOptionList("", CommonUtils.nullToEmpty((String)paramMap.get("customer_cd")),"common.getmatersupplyselect"));
|
||||
|
||||
if("Y".equals(search)){
|
||||
//list = CommonUtils.keyChangeUpperList(partMngService.getPartMngList(request,paramMap));
|
||||
|
||||
if("excel".equals(actionType)){
|
||||
list = partMngService.getPartMngGridListAll(paramMap);
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
request.setAttribute("code_map",code_map);
|
||||
request.setAttribute("LIST", list);
|
||||
|
||||
|
||||
if("excel".equals(actionType)){
|
||||
page ="/partMng/partMngListExcel";
|
||||
}
|
||||
|
||||
@@ -142,6 +142,23 @@ public class PartMngService extends BaseService {
|
||||
return CommonUtils.toUpperCaseMapKey(resultList);
|
||||
}
|
||||
|
||||
/**
|
||||
* PART 조회 - 엑셀 다운로드용 전체 목록(페이징 없음). 화면 그리드와 동일한 partMngGridList 사용.
|
||||
*/
|
||||
public List getPartMngGridListAll(Map paramMap){
|
||||
List<Map<String,Object>> resultList = new ArrayList();
|
||||
SqlSession sqlSession = null;
|
||||
try{
|
||||
sqlSession = SqlMapConfig.getInstance().getSqlSession();
|
||||
resultList = (ArrayList)sqlSession.selectList("partMng.partMngGridList", paramMap);
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
}finally{
|
||||
if(sqlSession != null) sqlSession.close();
|
||||
}
|
||||
return CommonUtils.toUpperCaseMapKey(resultList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 부서정보 조회
|
||||
* @param paramMap
|
||||
|
||||
Reference in New Issue
Block a user