149 lines
5.0 KiB
Plaintext
149 lines
5.0 KiB
Plaintext
package kr.co.i4way.cmn.dao;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
import org.springframework.stereotype.Repository;
|
|
|
|
import kr.co.i4way.common.dao.AbstractDAO_FW;
|
|
import kr.co.i4way.cmn.model.CmnCodeVo;
|
|
import kr.co.i4way.cmn.model.CmnHdayInfoVo;
|
|
import kr.co.i4way.cmn.model.CmnMenuInfoVo;
|
|
import kr.co.i4way.cmn.model.CmnQuickLinkVo;
|
|
import kr.co.i4way.cmn.model.CmnTreeInfoVo;
|
|
import kr.co.i4way.cmn.model.CmnUserInfoVo;
|
|
|
|
@Repository("cmnDAO")
|
|
public class CmnDAO extends AbstractDAO_FW{
|
|
|
|
@SuppressWarnings("unchecked")
|
|
public Map<String, Object> getLoginInfo(CmnUserInfoVo vo) throws Exception{
|
|
return (Map<String, Object>) selectOne("cmn.getLoginInfo", vo);
|
|
}
|
|
|
|
@SuppressWarnings("unchecked")
|
|
public List<Map<String,Object>> getTreeInfo(String userGrade) throws Exception{
|
|
CmnUserInfoVo vo = new CmnUserInfoVo();
|
|
vo.setGrade(userGrade);
|
|
return (List<Map<String,Object>>) selectList("cmn.getTreeInfo", vo);
|
|
}
|
|
|
|
@SuppressWarnings("unchecked")
|
|
public List<Map<String,Object>> getTreeInfo_grid(String userGrade) throws Exception{
|
|
CmnUserInfoVo vo = new CmnUserInfoVo();
|
|
return (List<Map<String,Object>>) selectList("cmn.getTreeInfo_grid", vo);
|
|
}
|
|
|
|
@SuppressWarnings("unchecked")
|
|
public List<Map<String,Object>> getTreeInfo_quickLink(String userGrade) throws Exception{
|
|
CmnUserInfoVo vo = new CmnUserInfoVo();
|
|
vo.setGrade(userGrade);
|
|
return (List<Map<String,Object>>) selectList("cmn.getTreeInfo_quickLink", vo);
|
|
}
|
|
|
|
@SuppressWarnings("unchecked")
|
|
public ArrayList getQuickLinkList(String userId) throws Exception{
|
|
CmnUserInfoVo vo = new CmnUserInfoVo();
|
|
vo.setUser_Id(userId);
|
|
return (ArrayList) selectList("cmn.getQuickLinkList", vo);
|
|
}
|
|
|
|
@SuppressWarnings("unchecked")
|
|
public ArrayList getComCodeList(String userId) throws Exception{
|
|
CmnUserInfoVo vo = new CmnUserInfoVo();
|
|
vo.setUser_Id(userId);
|
|
return (ArrayList) selectList("cmn.getComCodeList", vo);
|
|
}
|
|
@SuppressWarnings("unchecked")
|
|
public ArrayList selectUserList() throws Exception{
|
|
CmnUserInfoVo vo = new CmnUserInfoVo();
|
|
return (ArrayList) selectList("cmn.getUserList", vo);
|
|
}
|
|
|
|
@SuppressWarnings("unchecked")
|
|
public ArrayList selectAgentList() throws Exception{
|
|
CmnUserInfoVo vo = new CmnUserInfoVo();
|
|
return (ArrayList) selectList("cmn.getAgentList", vo);
|
|
}
|
|
|
|
@SuppressWarnings("unchecked")
|
|
public ArrayList selectCodeList(String div_cd, String prnt_cd) throws Exception{
|
|
CmnCodeVo vo = new CmnCodeVo();
|
|
vo.setI_div_cd(div_cd);
|
|
vo.setI_prnt_cd(prnt_cd);
|
|
return (ArrayList) selectList("cmn.getCodeList", vo);
|
|
}
|
|
|
|
public void insertUserList(CmnUserInfoVo cmnuserinfovo) {
|
|
insert("insertUserList", cmnuserinfovo);
|
|
// TODO Auto-generated method stub
|
|
}
|
|
public void updateUserList(CmnUserInfoVo cmnuserinfovo) {
|
|
update("updateUserList", cmnuserinfovo);
|
|
// TODO Auto-generated method stub
|
|
}
|
|
public void deleteUserList(CmnUserInfoVo cmnuserinfovo) {
|
|
update("deleteUserList", cmnuserinfovo);
|
|
// TODO Auto-generated method stub
|
|
}
|
|
|
|
@SuppressWarnings("unchecked")
|
|
public ArrayList selectHdayList() throws Exception{
|
|
CmnHdayInfoVo vo = new CmnHdayInfoVo();
|
|
return (ArrayList) selectList("cmn.getHdayList", vo);
|
|
}
|
|
|
|
public void insertHdayList(CmnHdayInfoVo cmnhdayinfovo) {
|
|
insert("insertHdayList", cmnhdayinfovo);
|
|
// TODO Auto-generated method stub
|
|
}
|
|
public void updateHdayList(CmnHdayInfoVo cmnhdayinfovo) {
|
|
update("updateHdayList", cmnhdayinfovo);
|
|
// TODO Auto-generated method stub
|
|
}
|
|
public void deleteHdayList(CmnHdayInfoVo cmnhdayinfovo) {
|
|
update("deleteHdayList", cmnhdayinfovo);
|
|
// TODO Auto-generated method stub
|
|
}
|
|
|
|
public void updateTreeData(CmnTreeInfoVo cmntreeinfovo) {
|
|
update("updateTreeData", cmntreeinfovo);
|
|
// TODO Auto-generated method stub
|
|
}
|
|
|
|
@SuppressWarnings("unchecked")
|
|
public Map getAgentStatus(String agentid) throws Exception {
|
|
Map param = new HashMap();
|
|
try{
|
|
param.put("i_agent_id", agentid);
|
|
//프로시저 호출
|
|
selectOne("cmn.getAgentStatusPackage", param);
|
|
}catch(Exception ex){
|
|
System.out.println(ex.getMessage());
|
|
}
|
|
return param;
|
|
}
|
|
|
|
public void updateQuickLink(CmnQuickLinkVo cmnquicklinkvo) {
|
|
String[] tmpInsertStr, tmpInsertStr2;
|
|
update("deleteQuickLink", cmnquicklinkvo);
|
|
if(cmnquicklinkvo.getInsert_data().length() > 0){
|
|
System.out.println("cmnquicklinkvo.getInsert_data()==> " + cmnquicklinkvo.getInsert_data());
|
|
tmpInsertStr = cmnquicklinkvo.getInsert_data().split(",");
|
|
for(int i=0; i<tmpInsertStr.length; i++){
|
|
System.out.println("tmpInsertStr["+i+"]==> " + tmpInsertStr[i]);
|
|
cmnquicklinkvo = new CmnQuickLinkVo();
|
|
tmpInsertStr2 = tmpInsertStr[i].split("/");
|
|
System.out.println("tmpInsertStr2[0]==> " + tmpInsertStr2[0] + ", tmpInsertStr2[1]==> " + tmpInsertStr2[1] + ", tmpInsertStr2[2]==> " + tmpInsertStr2[2]);
|
|
cmnquicklinkvo.setUser_id(tmpInsertStr2[1]);
|
|
cmnquicklinkvo.setScr_id(tmpInsertStr2[0]);
|
|
cmnquicklinkvo.setOrder_no(Integer.parseInt(tmpInsertStr2[2]));
|
|
insert("insertQuickLink", cmnquicklinkvo);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|