시군구코드 하드코딩 제거

main
이범준 11 months ago
parent d78652c24e
commit afcb25c753

@ -9,8 +9,10 @@ import org.springframework.web.servlet.ModelAndView;
import cokr.xit.base.code.CommonCode; import cokr.xit.base.code.CommonCode;
import cokr.xit.base.user.ManagedUser; import cokr.xit.base.user.ManagedUser;
import cokr.xit.base.user.dao.UserMapper;
import cokr.xit.base.web.ApplicationController; import cokr.xit.base.web.ApplicationController;
import cokr.xit.fims.cmmn.service.bean.StngBean; import cokr.xit.fims.cmmn.service.bean.StngBean;
import cokr.xit.fims.crdn.dao.GlobalStngMapper;
import cokr.xit.fims.levy.LevyQuery; import cokr.xit.fims.levy.LevyQuery;
import cokr.xit.fims.levy.Rduct; import cokr.xit.fims.levy.Rduct;
import cokr.xit.fims.levy.service.RductService; import cokr.xit.fims.levy.service.RductService;
@ -49,6 +51,12 @@ public class Levy02Controller extends ApplicationController {
@Resource(name = "stngBean") @Resource(name = "stngBean")
private StngBean stngBean; private StngBean stngBean;
@Resource(name="userMapper")
protected UserMapper userMapper;
@Resource(name="globalStngMapper")
protected GlobalStngMapper globalStngMapper;
/** (levy/levy02010-main) . /** (levy/levy02010-main) .
* {@link #getRductList(RductQuery) } . * {@link #getRductList(RductQuery) } .
* @return /rduct/rduct-main * @return /rduct/rduct-main
@ -97,6 +105,10 @@ public class Levy02Controller extends ApplicationController {
* }</code></pre> * }</code></pre>
*/ */
public ModelAndView getRductList(LevyQuery req) { public ModelAndView getRductList(LevyQuery req) {
ManagedUser currentUser = userMapper.getUser(currentUser().getAccount(), currentUser().getInstitute());
String curDeptCode = currentUser.getDeptCode();
String sggCd = globalStngMapper.selectSggCd(curDeptCode);
req.setSggCd(sggCd);
List<?> result = rductService.getRductList(setFetchSize(req)); List<?> result = rductService.getRductList(setFetchSize(req));
return setCollectionInfo(new ModelAndView("jsonView"), result, ""); return setCollectionInfo(new ModelAndView("jsonView"), result, "");

@ -312,7 +312,7 @@ $(document).ready(function(){
var formFields = new FimsFormFields("#frmSearch--${pageName}"); var formFields = new FimsFormFields("#frmSearch--${pageName}");
var data = formFields.get(); var data = formFields.get();
data.fetchSize = $P.rductControl.defaultFetchSize; data.fetchSize = $P.rductControl.defaultFetchSize;
data.sggCd = "41480";
return data; return data;
} }

Loading…
Cancel
Save