사용자계정 조회시 파라미터 대문자 변경

main
이범준 4 months ago
parent 2fe15adae5
commit 44fae4480a

@ -32,6 +32,16 @@ public class LoggingController extends cokr.xit.base.syslog.web.LoggingControlle
@Override @Override
public ModelAndView getLogs(LogQuery req) { public ModelAndView getLogs(LogQuery req) {
if(req.getUserAccounts() != null && req.getUserAccounts().length > 0
&& req.getUserAccounts()[0] != null) {
String[] userAccounts = req.getUserAccounts();
for(int i=0; i < userAccounts.length ; i++) {
userAccounts[i] = userAccounts[i].toUpperCase();
}
req.setUserAccounts(userAccounts);
}
boolean download = !isEmpty(req.getDownload()); boolean download = !isEmpty(req.getDownload());
if (!download) if (!download)
setFetchSize(req); setFetchSize(req);

@ -16,6 +16,7 @@ import cokr.xit.base.code.service.CodeService;
import cokr.xit.base.code.service.bean.CodeBean; import cokr.xit.base.code.service.bean.CodeBean;
import cokr.xit.base.security.SecuredUserInfo; import cokr.xit.base.security.SecuredUserInfo;
import cokr.xit.base.security.access.service.AuthorityService; import cokr.xit.base.security.access.service.AuthorityService;
import cokr.xit.base.user.UserQuery;
import cokr.xit.base.user.service.UserService; import cokr.xit.base.user.service.UserService;
import cokr.xit.fims.base.FimsUser; import cokr.xit.fims.base.FimsUser;
import cokr.xit.fims.base.service.bean.OgdpBean; import cokr.xit.fims.base.service.bean.OgdpBean;
@ -89,6 +90,14 @@ public class UserController extends cokr.xit.base.user.web.UserController<FimsUs
return super.isDuplicate(account, institute); return super.isDuplicate(account, institute);
} }
@Override
public ModelAndView getUserList(UserQuery req) {
if(req.getBy() != null && req.getTerm() != null && req.getBy().equals("userAccount")) {
req.setTerm(req.getTerm().toUpperCase());
}
return super.getUserList(req);
}
@RequestMapping(name="내 정보 조회",value="/myInfo.do") @RequestMapping(name="내 정보 조회",value="/myInfo.do")
public ModelAndView myInfo() { public ModelAndView myInfo() {
ModelAndView mav = new ModelAndView("jsonView"); ModelAndView mav = new ModelAndView("jsonView");

@ -80,7 +80,16 @@ SELECT A.USER_ID
<include refid="cokr.xit.base.user.dao.DepartmentMapper.adminSggDept" /> <include refid="cokr.xit.base.user.dao.DepartmentMapper.adminSggDept" />
) B ON A.NSTT_CD = B.INST_CD AND A.DEPT_CD = B.DEPT_CD ) B ON A.NSTT_CD = B.INST_CD AND A.DEPT_CD = B.DEPT_CD
<where> <where>
<if test="by != null and term != null">AND ${by} LIKE CONCAT('%', #{term}, '%')</if> <if test="by != null and term != null">
<choose>
<when test="by == 'userAccount'">
AND ${by} LIKE CONCAT('%', UPPER(#{term}), '%')
</when>
<otherwise>
AND ${by} LIKE CONCAT('%', #{term}, '%')
</otherwise>
</choose>
</if>
<if test="userIDs != null">USER_ID IN (<foreach collection="userIDs" item="userID" separator=",">#{userID}</foreach>)</if> <if test="userIDs != null">USER_ID IN (<foreach collection="userIDs" item="userID" separator=",">#{userID}</foreach>)</if>
<if test="status == null and userIDs == null">AND STTS != 'D'</if> <if test="status == null and userIDs == null">AND STTS != 'D'</if>
<if test="status != null">AND STTS = #{status}</if> <if test="status != null">AND STTS = #{status}</if>

@ -98,7 +98,7 @@ function search${infoPrefix}s() {
if (terms) { if (terms) {
switch ($("#${infoPrefix}-query [name='by']").val()) { switch ($("#${infoPrefix}-query [name='by']").val()) {
case "userName": params.userName = terms; break; case "userName": params.userName = terms; break;
case "userAccount": params.userAccounts = [terms]; break; case "userAccount": params.userAccounts = [terms.toUpperCase()]; break;
case "userID": params.userIDs = [terms]; break; case "userID": params.userIDs = [terms]; break;
default: break; default: break;
} }

@ -74,6 +74,11 @@ function search${infoPrefix}s() {
by: $("#${infoPrefix}-query [name='by']").val(), by: $("#${infoPrefix}-query [name='by']").val(),
term: $("#${infoPrefix}-query [name='term']").val() term: $("#${infoPrefix}-query [name='term']").val()
}; };
if(${infoPrefix}Control.query.by == "userAccount"){
${infoPrefix}Control.query.term = ${infoPrefix}Control.query.term.toUpperCase();
}
${infoPrefix}Control.load(1); ${infoPrefix}Control.load(1);
} }

@ -236,6 +236,10 @@
$P.fnSearchList = () => { $P.fnSearchList = () => {
// 검색조건 // 검색조건
$P.control.query = $P.formFields.get(); // 검색 조건 $P.control.query = $P.formFields.get(); // 검색 조건
if($P.control.query.by == "userAccount"){
$P.control.query.term = $P.control.query.term.toUpperCase();
}
$P.control.query.fetchSize = $P.control.defaultFetchSize; // 한번에 조회되는 자료 건수 $P.control.query.fetchSize = $P.control.defaultFetchSize; // 한번에 조회되는 자료 건수
$P.control.query.useYn = "Y"; // 사용 여부 $P.control.query.useYn = "Y"; // 사용 여부

Loading…
Cancel
Save