Merge pull request 'V2025111703' (#70) from V2025111703 into main
Reviewed-on: #70
This commit was merged in pull request #70.
This commit is contained in:
@@ -562,6 +562,7 @@ public class AdminController extends BaseService {
|
||||
return "/ajax/ajaxResult";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 고객사 목록을 가져온다.
|
||||
* @param request
|
||||
@@ -1044,6 +1045,14 @@ public class AdminController extends BaseService {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@ResponseBody
|
||||
@@ -1350,6 +1359,287 @@ public class AdminController extends BaseService {
|
||||
return "/ajax/ajaxResult";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 창고 관리 조회 (JSP 페이지 로딩) 11월 18일 이희진
|
||||
*
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/admin/warehouseList.do")
|
||||
public String getwarehouseList(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
||||
return "/admin/warehouseList/warehouseMngList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 창고 관리 조회 (Tabulator Grid용 JSON) 11월 20일 이희진
|
||||
*
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value="/admin/warehouseListPagingGridList.do", produces="application/json")
|
||||
@ResponseBody
|
||||
public Map getwarehouseListPagingGrid(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
||||
commonService.selectListPagingNew("admin.getWarehouseList", request, paramMap);
|
||||
return paramMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 창고관리 저장 시 중복 여부를 확인한다. 11월 18일 이희진
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/admin/checkDuplicateWarehouseList.do")
|
||||
public String checkDuplicateWarehouseList(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
||||
ArrayList<HashMap<String,Object>> existList = new ArrayList();
|
||||
try{
|
||||
existList = adminService.getDuplicateWarehouseListInfo(request, paramMap);
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
request.setAttribute("RESULT", CommonUtils.getJsonArray(CommonUtils.toUpperCaseMapKey(existList)));
|
||||
|
||||
return "/ajax/ajaxResult";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 창고 관리 등록 팝업 11월 19일 이희진
|
||||
*
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/admin/warehouseListFormPopUp.do")
|
||||
public String warehouseListFormPopUp(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
||||
HashMap<String,Object> info = new HashMap();
|
||||
try{
|
||||
if(!"".equals(CommonUtils.checkNull(request.getParameter("objid")))){
|
||||
info = (HashMap)adminService.getWarehouseListInfo(request, paramMap);
|
||||
info = CommonUtils.toUpperCaseMapKey(info);
|
||||
}
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
request.setAttribute("info", info);
|
||||
request.setAttribute("OBJID", CommonUtils.checkNull(request.getParameter("objid")));
|
||||
return "/admin/warehouseList/warehouseListFormPopUp";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 창고 관리 변경이력 11월 18일 이희진
|
||||
*
|
||||
*/
|
||||
// @RequestMapping("/admin/warehouseHistoryList.do")
|
||||
// public String warehouseHistoryList(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
||||
// List<Map<String,Object>> list = new ArrayList();
|
||||
// try{
|
||||
// list = adminService.warehouseHistoryList(request, paramMap);
|
||||
// }catch(Exception e){
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// request.setAttribute("LIST", CommonUtils.toUpperCaseMapKey(list));
|
||||
// return "/admin/warehouseList/warehouseHistoryList";
|
||||
// }
|
||||
|
||||
/**
|
||||
* 창고 관리 데이터를 저장한다. 11월 19일 이희진
|
||||
*
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/admin/saveWarehouseListInfo.do")
|
||||
public String saveWarehouseListInfo(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
||||
HashMap resultMap = new HashMap();
|
||||
try{
|
||||
|
||||
ArrayList existList = adminService.getDuplicateWarehouseListInfo(request, paramMap);
|
||||
if(null != existList && 0 < existList.size()){
|
||||
resultMap = CommonUtils.setReqAttrResultMsg(request, "중복된 창고명이 존재 합니다.", "false", null,null);
|
||||
}else{
|
||||
adminService.saveWarehouseListInfo(request, paramMap);
|
||||
resultMap = CommonUtils.setReqAttrResultMsg(request, "저장하였습니다.", "true", null,null);
|
||||
}
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
resultMap = CommonUtils.setReqAttrResultMsg(request, "오류가 발생하였습니다.", "false", e,null);
|
||||
}
|
||||
request.setAttribute("RESULT", CommonUtils.getJsonMap(resultMap));
|
||||
|
||||
return "/ajax/ajaxResult";
|
||||
}
|
||||
|
||||
/**
|
||||
* 창고 관리 삭제 11월 19일 이희진
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/admin/deleteWarehouse.do")
|
||||
public String deleteWarehouse(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
||||
HashMap resultMap = new HashMap();
|
||||
try{
|
||||
adminService.deleteWarehouse(request, paramMap);
|
||||
resultMap.put("result", true);
|
||||
resultMap.put("msg", "삭제되었습니다.");
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
resultMap.put("result", false);
|
||||
resultMap.put("msg", "삭제 중 오류가 발생했습니다.");
|
||||
}
|
||||
request.setAttribute("RESULT", CommonUtils.getJsonMap(resultMap));
|
||||
return "/ajax/ajaxResult";
|
||||
}
|
||||
|
||||
// 일반거래처 11월 20일 이희진
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 일반거래처 관리 조회 (JSP 페이지 로딩) 11월 20일 이희진
|
||||
*
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/admin/clientMngList.do")
|
||||
public String getclientMngList(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
||||
return "/admin/clientMng/clientMngList";
|
||||
}
|
||||
|
||||
/**
|
||||
* 일반거래처 관리 조회 (Tabulator Grid용 JSON) 11월 20일 이희진
|
||||
*
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value="/admin/clientMngListPagingGridList.do", produces="application/json")
|
||||
@ResponseBody
|
||||
public Map getclientMngListPagingGrid(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
||||
commonService.selectListPagingNew("admin.getClientMngList", request, paramMap);
|
||||
return paramMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 일반거래처 관리 저장 시 중복 여부를 확인한다. 11월 20일 이희진
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/admin/checkDuplicateClientMngList.do")
|
||||
public String checkDuplicateClientMngList(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
||||
ArrayList<HashMap<String,Object>> existList = new ArrayList();
|
||||
try{
|
||||
existList = adminService.getDuplicateClientMngListInfo(request, paramMap);
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
request.setAttribute("RESULT", CommonUtils.getJsonArray(CommonUtils.toUpperCaseMapKey(existList)));
|
||||
|
||||
return "/ajax/ajaxResult";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 일반거래처 관리 등록 팝업 11월 20일 이희진
|
||||
*
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/admin/clientMngListFormPopUp.do")
|
||||
public String clientMngListFormPopUp(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
||||
HashMap<String,Object> info = new HashMap();
|
||||
try{
|
||||
// 임시 주석 - DB 테이블 생성 후 활성화
|
||||
//if(!"".equals(CommonUtils.checkNull(request.getParameter("objid")))){
|
||||
// info = (HashMap)adminService.getClientMngListInfo(request, paramMap);
|
||||
// info = CommonUtils.toUpperCaseMapKey(info);
|
||||
//}
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
request.setAttribute("info", info);
|
||||
request.setAttribute("OBJID", CommonUtils.checkNull(request.getParameter("objid")));
|
||||
return "/admin/clientMng/clientMngListFormPopUp";
|
||||
}
|
||||
/**
|
||||
* 일반거래처 관리 데이터를 저장한다. 11월 20일 이희진
|
||||
*
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/admin/saveClientMngInfo.do")
|
||||
public String saveClientMngInfo(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
||||
HashMap resultMap = new HashMap();
|
||||
try{
|
||||
|
||||
ArrayList existList = adminService.getDuplicateClientMngListInfo(request, paramMap);
|
||||
if(null != existList && 0 < existList.size()){
|
||||
resultMap = CommonUtils.setReqAttrResultMsg(request, "중복된 일반거래처명이 존재 합니다.", "false", null,null);
|
||||
}else{
|
||||
adminService.saveClientMngInfo(request, paramMap);
|
||||
resultMap = CommonUtils.setReqAttrResultMsg(request, "저장하였습니다.", "true", null,null);
|
||||
}
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
resultMap = CommonUtils.setReqAttrResultMsg(request, "오류가 발생하였습니다.", "false", e,null);
|
||||
}
|
||||
request.setAttribute("RESULT", CommonUtils.getJsonMap(resultMap));
|
||||
|
||||
return "/ajax/ajaxResult";
|
||||
}
|
||||
|
||||
/**
|
||||
* 일반거래처 관리 삭제 11월 20일 이희진
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/admin/deleteClient.do")
|
||||
public String deleteClient(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
||||
HashMap resultMap = new HashMap();
|
||||
try{
|
||||
adminService.deleteClient(request, paramMap);
|
||||
resultMap.put("result", true);
|
||||
resultMap.put("msg", "삭제되었습니다.");
|
||||
}catch(Exception e){
|
||||
e.printStackTrace();
|
||||
resultMap.put("result", false);
|
||||
resultMap.put("msg", "삭제 중 오류가 발생했습니다.");
|
||||
}
|
||||
request.setAttribute("RESULT", CommonUtils.getJsonMap(resultMap));
|
||||
return "/ajax/ajaxResult";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 일반거래처 11월 20일 이희진
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 카테고리의 목록을 가져온다.
|
||||
* @return
|
||||
|
||||
@@ -8525,4 +8525,251 @@ FROM (
|
||||
ORDER BY V.PATH
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 11월 19일 추가한 창고관리 매퍼 -->
|
||||
|
||||
|
||||
<select id="getWarehouseList" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
ROW_NUMBER() OVER (ORDER BY LOCATION_CODE) AS RNUM,
|
||||
OBJID,
|
||||
LOCATION_CODE,
|
||||
LOCATION_NAME,
|
||||
LOCATION_DESCRIPTION,
|
||||
OUT_CODE,
|
||||
OUT_CO_NAME,
|
||||
FIT_STATUS,
|
||||
AVAILABLE_STATUS,
|
||||
USE_STATUS,
|
||||
BASE_LOC_CD,
|
||||
CO_CD,
|
||||
LOC_NMK,
|
||||
INSERT_ID,
|
||||
INSERT_IP,
|
||||
TO_CHAR(INSERT_DT, 'YYYY-MM-DD HH24:MI:SS') AS INSERT_DT,
|
||||
MODIFY_ID,
|
||||
MODIFY_IP,
|
||||
TO_CHAR(MODIFY_DT, 'YYYY-MM-DD HH24:MI:SS') AS MODIFY_DT,
|
||||
ATTR_NMK,
|
||||
WRITER,
|
||||
TO_CHAR(REGDATE, 'YYYY-MM-DD') AS REGDATE,
|
||||
STATUS
|
||||
FROM
|
||||
WAREHOUSE_LOCATION
|
||||
WHERE 1=1
|
||||
<if test="searchLocationCode != null and searchLocationCode != ''">
|
||||
AND UPPER(LOCATION_CODE) LIKE UPPER('%${searchLocationCode}%')
|
||||
</if>
|
||||
<if test="searchLocationName != null and searchLocationName != ''">
|
||||
AND UPPER(LOCATION_NAME) LIKE UPPER('%${searchLocationName}%')
|
||||
</if>
|
||||
ORDER BY LOCATION_CODE
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="getWarehouseListInfo" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
OBJID,
|
||||
LOCATION_CODE,
|
||||
LOCATION_NAME,
|
||||
LOCATION_DESCRIPTION,
|
||||
OUT_CODE,
|
||||
OUT_CO_NAME,
|
||||
FIT_STATUS,
|
||||
AVAILABLE_STATUS,
|
||||
USE_STATUS,
|
||||
BASE_LOC_CD,
|
||||
CO_CD,
|
||||
LOC_NMK,
|
||||
INSERT_ID,
|
||||
INSERT_IP,
|
||||
TO_CHAR(INSERT_DT, 'YYYY-MM-DD HH24:MI:SS') AS INSERT_DT,
|
||||
MODIFY_ID,
|
||||
MODIFY_IP,
|
||||
TO_CHAR(MODIFY_DT, 'YYYY-MM-DD HH24:MI:SS') AS MODIFY_DT,
|
||||
ATTR_NMK,
|
||||
WRITER,
|
||||
TO_CHAR(REGDATE, 'YYYY-MM-DD') AS REGDATE,
|
||||
STATUS
|
||||
FROM
|
||||
WAREHOUSE_LOCATION
|
||||
WHERE
|
||||
OBJID = #{OBJID}::numeric
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="getDuplicateWarehouseListInfo" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
WAREHOUSE_LOCATION T
|
||||
WHERE 1=1
|
||||
<if test="objid != null and objid != ''">
|
||||
AND OBJID != #{objid}::numeric
|
||||
</if>
|
||||
<if test="location_code != null and location_code != ''">
|
||||
AND TRIM(UPPER(LOCATION_CODE)) = TRIM(UPPER(#{location_code}))
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<update id="mergewarehouseListInfo" parameterType="map">
|
||||
INSERT INTO WAREHOUSE_LOCATION
|
||||
(
|
||||
OBJID,
|
||||
LOCATION_CODE,
|
||||
LOCATION_NAME,
|
||||
LOCATION_DESCRIPTION,
|
||||
OUT_CODE,
|
||||
OUT_CO_NAME,
|
||||
FIT_STATUS,
|
||||
AVAILABLE_STATUS,
|
||||
USE_STATUS,
|
||||
BASE_LOC_CD,
|
||||
CO_CD,
|
||||
LOC_NMK,
|
||||
INSERT_ID,
|
||||
INSERT_IP,
|
||||
INSERT_DT,
|
||||
MODIFY_ID,
|
||||
MODIFY_IP,
|
||||
MODIFY_DT,
|
||||
ATTR_NMK,
|
||||
WRITER,
|
||||
REGDATE,
|
||||
STATUS
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
#{objid}::numeric,
|
||||
#{location_code},
|
||||
#{location_name},
|
||||
#{location_description},
|
||||
#{out_code},
|
||||
#{out_co_name},
|
||||
#{fit_status},
|
||||
#{available_status},
|
||||
COALESCE(#{use_status}, 'Y'),
|
||||
#{base_loc_cd},
|
||||
#{co_cd},
|
||||
#{loc_nmk},
|
||||
#{insert_id},
|
||||
#{insert_ip},
|
||||
CASE WHEN #{insert_dt} = '' THEN NOW() ELSE COALESCE(#{insert_dt}::timestamp, NOW()) END,
|
||||
#{modify_id},
|
||||
#{modify_ip},
|
||||
CASE WHEN #{modify_dt} = '' THEN NULL ELSE #{modify_dt}::timestamp END,
|
||||
#{attr_nmk},
|
||||
#{writer},
|
||||
NOW(),
|
||||
COALESCE(#{status}, 'ACTIVE')
|
||||
)
|
||||
ON CONFLICT (OBJID) DO UPDATE
|
||||
SET
|
||||
LOCATION_CODE = #{location_code},
|
||||
LOCATION_NAME = #{location_name},
|
||||
LOCATION_DESCRIPTION = #{location_description},
|
||||
OUT_CODE = #{out_code},
|
||||
OUT_CO_NAME = #{out_co_name},
|
||||
FIT_STATUS = #{fit_status},
|
||||
AVAILABLE_STATUS = #{available_status},
|
||||
USE_STATUS = #{use_status},
|
||||
BASE_LOC_CD = #{base_loc_cd},
|
||||
CO_CD = #{co_cd},
|
||||
LOC_NMK = #{loc_nmk},
|
||||
MODIFY_ID = #{modify_id},
|
||||
MODIFY_IP = #{modify_ip},
|
||||
MODIFY_DT = CASE WHEN #{modify_dt} = '' THEN NOW() ELSE COALESCE(#{modify_dt}::timestamp, NOW()) END,
|
||||
ATTR_NMK = #{attr_nmk},
|
||||
STATUS = #{status}
|
||||
</update>
|
||||
|
||||
|
||||
<insert id="insertwarehouseListHistory" parameterType="map">
|
||||
INSERT INTO WAREHOUSE_LOCATION_HISTORY
|
||||
SELECT
|
||||
#{objid}::numeric,
|
||||
#{targetObjid}::numeric,
|
||||
LOCATION_CODE,
|
||||
LOCATION_NAME,
|
||||
LOCATION_DESCRIPTION,
|
||||
OUT_CODE,
|
||||
OUT_CO_NAME,
|
||||
FIT_STATUS,
|
||||
AVAILABLE_STATUS,
|
||||
USE_STATUS,
|
||||
BASE_LOC_CD,
|
||||
CO_CD,
|
||||
LOC_NMK,
|
||||
INSERT_ID,
|
||||
INSERT_IP,
|
||||
INSERT_DT,
|
||||
MODIFY_ID,
|
||||
MODIFY_IP,
|
||||
MODIFY_DT,
|
||||
ATTR_NMK,
|
||||
#{writer},
|
||||
NOW(),
|
||||
STATUS
|
||||
FROM
|
||||
WAREHOUSE_LOCATION
|
||||
WHERE
|
||||
OBJID = #{targetObjid}::numeric
|
||||
</insert>
|
||||
|
||||
|
||||
<select id="warehouseHistoryList" parameterType="map" resultType="map">
|
||||
SELECT
|
||||
A.*
|
||||
FROM (
|
||||
SELECT
|
||||
A.*,
|
||||
ROW_NUMBER() OVER (ORDER BY RM DESC) AS RNUM
|
||||
FROM (
|
||||
SELECT
|
||||
T.*,
|
||||
ROW_NUMBER() OVER (ORDER BY REGDATE) AS RM,
|
||||
(SELECT USER_NAME FROM USER_INFO UI WHERE T.WRITER = UI.USER_ID) AS WRITER_NAME,
|
||||
TO_CHAR(T.REGDATE, 'YYYY-MM-DD HH24:MI:SS') AS REGDATE_TITLE
|
||||
FROM
|
||||
WAREHOUSE_LOCATION_HISTORY T
|
||||
WHERE
|
||||
TARGET_OBJID = #{objId}::numeric
|
||||
) A
|
||||
WHERE 1=1
|
||||
) A
|
||||
WHERE 1=1
|
||||
AND <![CDATA[ A.RNUM::integer <= #{PAGE_END}::integer ]]>
|
||||
AND <![CDATA[ A.RNUM::integer >= #{PAGE_START}::integer ]]>
|
||||
</select>
|
||||
|
||||
|
||||
<delete id="deleteWarehouse" parameterType="map">
|
||||
DELETE FROM
|
||||
WAREHOUSE_LOCATION
|
||||
WHERE
|
||||
OBJID = #{OBJID}::numeric
|
||||
</delete>
|
||||
|
||||
<!-- 11월 19일 추가한 창고관리 매퍼 -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -2354,6 +2354,303 @@ public class AdminService extends BaseService {
|
||||
return CommonUtils.toUpperCaseMapKey(resultList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------11월 19일 이희진-------------
|
||||
|
||||
/**
|
||||
* 창고관리 데이터를 저장한다.
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
public String saveWarehouseListInfo(HttpServletRequest request,Map paramMap){
|
||||
SqlSession sqlSession = SqlMapConfig.getInstance().getSqlSession();
|
||||
String objid = "";
|
||||
try{
|
||||
HttpSession session = request.getSession();
|
||||
PersonBean person = (PersonBean)session.getAttribute(Constants.PERSON_BEAN);
|
||||
String writer = CommonUtils.checkNull(person.getUserId());
|
||||
paramMap.put("writer", writer);
|
||||
|
||||
objid = CommonUtils.checkNull(request.getParameter("objid"));
|
||||
if("".equals(objid)){
|
||||
objid = CommonUtils.createObjId();
|
||||
paramMap.put("objid", objid);
|
||||
}
|
||||
|
||||
if(!"".equals(objid)){
|
||||
sqlSession.update("admin.mergewarehouseListInfo",paramMap);
|
||||
|
||||
//이력
|
||||
paramMap.put("objid", CommonUtils.createObjId());
|
||||
paramMap.put("targetObjid", objid);
|
||||
|
||||
sqlSession.insert("admin.insertwarehouseListHistory",paramMap);
|
||||
}
|
||||
}catch(Exception e){
|
||||
throw e;
|
||||
}finally{
|
||||
sqlSession.close();
|
||||
}
|
||||
return objid;
|
||||
}
|
||||
|
||||
/**
|
||||
* 창고관리 중복확인 시 사용
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
public ArrayList<HashMap<String,Object>> getDuplicateWarehouseListInfo(HttpServletRequest request,Map paramMap){
|
||||
ArrayList<HashMap<String,Object>> resultList = new ArrayList();
|
||||
SqlSession sqlSession = SqlMapConfig.getInstance().getSqlSession();
|
||||
try{
|
||||
resultList = (ArrayList)sqlSession.selectList("admin.getDuplicateWarehouseListInfo",paramMap);
|
||||
}catch(Exception e){
|
||||
throw e;
|
||||
}finally{
|
||||
sqlSession.close();
|
||||
}
|
||||
return CommonUtils.toUpperCaseMapKey(resultList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 창고데이터를 가져온다 (단건)
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
public HashMap<String,Object> getWarehouseListInfo(HttpServletRequest request,Map<String,Object> paramMap){
|
||||
HashMap<String,Object> warehouseMap = new HashMap();
|
||||
SqlSession sqlSession = SqlMapConfig.getInstance().getSqlSession();
|
||||
try{
|
||||
String objid = CommonUtils.checkNull(request.getParameter("objid"));
|
||||
|
||||
if("".equals(objid)){
|
||||
objid = CommonUtils.checkNull(request.getAttribute("objid"));
|
||||
}
|
||||
paramMap.put("OBJID", objid);
|
||||
warehouseMap = sqlSession.selectOne("admin.getWarehouseListInfo",paramMap);
|
||||
|
||||
}catch(Exception e){
|
||||
throw e;
|
||||
}finally{
|
||||
sqlSession.close();
|
||||
}
|
||||
return warehouseMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 창고관리 이력 목록을 가져온다.
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String,Object>> warehouseHistoryList(HttpServletRequest request, Map paramMap){
|
||||
List<Map<String,Object>> resultList = new ArrayList();
|
||||
SqlSession sqlSession = SqlMapConfig.getInstance().getSqlSession();
|
||||
try{
|
||||
resultList = sqlSession.selectList("admin.warehouseHistoryList", paramMap);
|
||||
}catch(Exception e){
|
||||
throw e;
|
||||
}finally{
|
||||
sqlSession.close();
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 창고관리 목록을 조회한다
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
public ArrayList<HashMap<String,Object>> getWarehouseList(HttpServletRequest request, Map<String,Object> paramMap){
|
||||
ArrayList<HashMap<String,Object>> resultList = new ArrayList();
|
||||
SqlSession sqlSession = SqlMapConfig.getInstance().getSqlSession();
|
||||
try{
|
||||
resultList = (ArrayList)sqlSession.selectList("admin.getWarehouseList", paramMap);
|
||||
}catch(Exception e){
|
||||
throw e;
|
||||
}finally{
|
||||
sqlSession.close();
|
||||
}
|
||||
return CommonUtils.toUpperCaseMapKey(resultList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 창고관리 데이터를 삭제한다.
|
||||
* @param request
|
||||
* @param paramMap
|
||||
*/
|
||||
public void deleteWarehouse(HttpServletRequest request,Map paramMap){
|
||||
SqlSession sqlSession = SqlMapConfig.getInstance().getSqlSession();
|
||||
try{
|
||||
// paramMap에 이미 OBJID가 들어있음 (AJAX에서 보낸 값)
|
||||
sqlSession.delete("admin.deleteWarehouse",paramMap);
|
||||
}catch(Exception e){
|
||||
throw e;
|
||||
}finally{
|
||||
sqlSession.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-------------11월 19일 이희진-------------
|
||||
|
||||
|
||||
/**
|
||||
* 일반거래처 관리 데이터를 저장한다.
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
public String saveClientMngInfo(HttpServletRequest request,Map paramMap){
|
||||
SqlSession sqlSession = SqlMapConfig.getInstance().getSqlSession();
|
||||
String objid = "";
|
||||
try{
|
||||
HttpSession session = request.getSession();
|
||||
PersonBean person = (PersonBean)session.getAttribute(Constants.PERSON_BEAN);
|
||||
String writer = CommonUtils.checkNull(person.getUserId());
|
||||
paramMap.put("writer", writer);
|
||||
|
||||
objid = CommonUtils.checkNull(request.getParameter("objid"));
|
||||
if("".equals(objid)){
|
||||
objid = CommonUtils.createObjId();
|
||||
paramMap.put("objid", objid);
|
||||
}
|
||||
|
||||
if(!"".equals(objid)){
|
||||
sqlSession.update("admin.mergeClientMngInfo",paramMap);
|
||||
|
||||
//이력
|
||||
paramMap.put("objid", CommonUtils.createObjId());
|
||||
paramMap.put("targetObjid", objid);
|
||||
|
||||
sqlSession.insert("admin.insertClientMngHistory",paramMap);
|
||||
}
|
||||
}catch(Exception e){
|
||||
throw e;
|
||||
}finally{
|
||||
sqlSession.close();
|
||||
}
|
||||
return objid;
|
||||
}
|
||||
|
||||
/**
|
||||
* 일반거래처 관리 중복확인 시 사용
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
public ArrayList<HashMap<String,Object>> getDuplicateClientMngListInfo(HttpServletRequest request,Map paramMap){
|
||||
ArrayList<HashMap<String,Object>> resultList = new ArrayList();
|
||||
SqlSession sqlSession = SqlMapConfig.getInstance().getSqlSession();
|
||||
try{
|
||||
resultList = (ArrayList)sqlSession.selectList("admin.getDuplicateClientMngListInfo",paramMap);
|
||||
}catch(Exception e){
|
||||
throw e;
|
||||
}finally{
|
||||
sqlSession.close();
|
||||
}
|
||||
return CommonUtils.toUpperCaseMapKey(resultList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 일반거래처 관리 데이터를 가져온다 (단건)
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
public HashMap<String,Object> getClientMngListInfo(HttpServletRequest request,Map<String,Object> paramMap){
|
||||
HashMap<String,Object> clientMngMap = new HashMap();
|
||||
SqlSession sqlSession = SqlMapConfig.getInstance().getSqlSession();
|
||||
try{
|
||||
String objid = CommonUtils.checkNull(request.getParameter("objid"));
|
||||
|
||||
if("".equals(objid)){
|
||||
objid = CommonUtils.checkNull(request.getAttribute("objid"));
|
||||
}
|
||||
paramMap.put("OBJID", objid);
|
||||
clientMngMap = sqlSession.selectOne("admin.getClientMngListInfo",paramMap);
|
||||
|
||||
}catch(Exception e){
|
||||
throw e;
|
||||
}finally{
|
||||
sqlSession.close();
|
||||
}
|
||||
return clientMngMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 일반거래처 관리 이력 목록을 가져온다.
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
public List<Map<String,Object>> clientMngHistoryList(HttpServletRequest request, Map paramMap){
|
||||
List<Map<String,Object>> resultList = new ArrayList();
|
||||
SqlSession sqlSession = SqlMapConfig.getInstance().getSqlSession();
|
||||
try{
|
||||
resultList = sqlSession.selectList("admin.clientMngHistoryList", paramMap);
|
||||
}catch(Exception e){
|
||||
throw e;
|
||||
}finally{
|
||||
sqlSession.close();
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 일반거래처 관리 목록을 조회한다
|
||||
* @param request
|
||||
* @param paramMap
|
||||
* @return
|
||||
*/
|
||||
public ArrayList<HashMap<String,Object>> getClientMngList(HttpServletRequest request, Map<String,Object> paramMap){
|
||||
ArrayList<HashMap<String,Object>> resultList = new ArrayList();
|
||||
SqlSession sqlSession = SqlMapConfig.getInstance().getSqlSession();
|
||||
try{
|
||||
resultList = (ArrayList)sqlSession.selectList("admin.getClientMngList", paramMap);
|
||||
}catch(Exception e){
|
||||
throw e;
|
||||
}finally{
|
||||
sqlSession.close();
|
||||
}
|
||||
return CommonUtils.toUpperCaseMapKey(resultList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 일반거래처 관리 데이터를 삭제한다.
|
||||
* @param request
|
||||
* @param paramMap
|
||||
*/
|
||||
public void deleteClient(HttpServletRequest request,Map paramMap){
|
||||
SqlSession sqlSession = SqlMapConfig.getInstance().getSqlSession();
|
||||
try{
|
||||
// paramMap에 이미 OBJID가 들어있음 (AJAX에서 보낸 값)
|
||||
sqlSession.delete("admin.deleteClient",paramMap);
|
||||
}catch(Exception e){
|
||||
throw e;
|
||||
}finally{
|
||||
sqlSession.close();
|
||||
}
|
||||
}
|
||||
|
||||
//-------------11월 20일 이희진-------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 기술자료 카레고리 데이터를 삭제한다.
|
||||
* @param request
|
||||
|
||||
Reference in New Issue
Block a user