Merge branch 'develop' of https://gitee.com/jmlcl/weaver-hrm-organization into feature/dxf
commit
9992e807b4
@ -0,0 +1,51 @@
|
|||||||
|
//package com.api.organization.listener;
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//import com.sun.jersey.api.model.AbstractResourceModelContext;
|
||||||
|
//import com.sun.jersey.api.model.AbstractResourceModelListener;
|
||||||
|
//import com.weaver.upgrade.FunctionUpgradeUtil;
|
||||||
|
//import org.apache.commons.lang3.StringUtils;
|
||||||
|
//import weaver.conn.RecordSet;
|
||||||
|
//import weaver.general.BaseBean;
|
||||||
|
//import weaver.system.License;
|
||||||
|
//
|
||||||
|
//import javax.ws.rs.ext.Provider;
|
||||||
|
//
|
||||||
|
//@Provider
|
||||||
|
//public class InitListener implements AbstractResourceModelListener {
|
||||||
|
// @Override
|
||||||
|
// public void onLoaded(AbstractResourceModelContext abstractResourceModelContext) {
|
||||||
|
// int menuid = 100139;
|
||||||
|
// BaseBean bb = new BaseBean();
|
||||||
|
// String cId = new License().getCId();
|
||||||
|
// String defaultCloseNonStandard149 = bb.getPropValue("hrmOrganization", "defaultCloseNonStandard149");
|
||||||
|
// if(StringUtils.isNotBlank(cId) && "true".equals(defaultCloseNonStandard149)) {
|
||||||
|
// int cid = Integer.parseInt(cId);
|
||||||
|
// if(!hasMenuInfo(cid, "left", menuid)) {
|
||||||
|
// bb.writeLog("149新薪酬管理 添加默认菜单控制");
|
||||||
|
// insertMenuInfo(cid, "left", menuid);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// private void insertMenuInfo(int cid,String type,int id){
|
||||||
|
// RecordSet rs = new RecordSet();
|
||||||
|
// BaseBean bb = new BaseBean();
|
||||||
|
// bb.writeLog("FunctionUpgradeUtil.getMenuId(cid,id):" + FunctionUpgradeUtil.getMenuId(cid,id));
|
||||||
|
// String sql ="INSERT INTO menucontrollist (type,menuid,isopen) VALUES('"+type+"','"+FunctionUpgradeUtil.getMenuId(cid,id)+"','"+FunctionUpgradeUtil.getMenuStatus(id,-1,cid)+"')";
|
||||||
|
// rs.execute(sql);
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// private boolean hasMenuInfo(int cid, String type, int id) {
|
||||||
|
// RecordSet rs = new RecordSet();
|
||||||
|
// String sql = "select count(1) as count from menucontrollist where type = ? and menuid = ?";
|
||||||
|
// rs.executeQuery(sql,type, FunctionUpgradeUtil.getMenuId(cid,id));
|
||||||
|
// if(rs.next()) {
|
||||||
|
// int count = rs.getInt("count");
|
||||||
|
// if(count > 0) {
|
||||||
|
// return true;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// return false;
|
||||||
|
// }
|
||||||
|
//}
|
Loading…
Reference in New Issue