建模工具方法提交
parent
f2c3c58303
commit
a047818ae1
|
@ -0,0 +1,54 @@
|
||||||
|
package aiyh.utils.ecologyutil.modelutil;
|
||||||
|
|
||||||
|
import aiyh.utils.Util;
|
||||||
|
import aiyh.utils.httpUtil.cushttpclasses.CusHttpSession;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.api.taojw.common.CommonSqlUtil;
|
||||||
|
import com.api.taojw.common.DaoUtil;
|
||||||
|
import com.api.taojw.common.TjwHttpSession;
|
||||||
|
import com.api.taojw.common.logging.MyLogger;
|
||||||
|
import com.engine.common.util.ServiceUtil;
|
||||||
|
import com.engine.cube.service.ModeAppService;
|
||||||
|
import com.engine.cube.service.impl.ModeAppServiceImpl;
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
|
import weaver.conn.RecordSet;
|
||||||
|
import weaver.formmode.data.ModeDataIdUpdate;
|
||||||
|
import weaver.formmode.setup.ModeRightInfo;
|
||||||
|
import weaver.general.TimeUtil;
|
||||||
|
import weaver.hrm.User;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 建模相关工具方法
|
||||||
|
*/
|
||||||
|
public class CusModelUtil {
|
||||||
|
|
||||||
|
private static Logger logger = Util.getLogger();
|
||||||
|
public static ModeAppService modeAppService = ServiceUtil.getService(ModeAppServiceImpl.class, new User(1));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 建模数据全部权限重构
|
||||||
|
* @param modeId
|
||||||
|
*/
|
||||||
|
public static void rebuildRight(String modeId) {
|
||||||
|
try{
|
||||||
|
Map<String, Object> param = new HashMap<>();
|
||||||
|
param.put("rebulidFlag", "1");
|
||||||
|
param.put("righttype", "1");
|
||||||
|
param.put("modeid", modeId);
|
||||||
|
param.put("rebulidFlag", "1");
|
||||||
|
param.put("showProgress", "0");
|
||||||
|
param.put("operation", "resetAllRight");
|
||||||
|
param.put("session", new CusHttpSession());
|
||||||
|
Map<String, Object> stringObjectMap = modeAppService.saveModeRightList(param, new User(1));
|
||||||
|
logger.info("CusModelUtil.rebuildRight end;result:"+new JSONObject(stringObjectMap).toJSONString() + ";param:" + modeId);
|
||||||
|
}catch(Throwable e){
|
||||||
|
logger.error("CusModelUtil.rebuildRight error;message:" + e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -5,6 +5,7 @@ import aiyh.utils.httpUtil.cushttpclasses.CusHttpServletRequest;
|
||||||
import aiyh.utils.httpUtil.cushttpclasses.CusHttpSession;
|
import aiyh.utils.httpUtil.cushttpclasses.CusHttpSession;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.engine.hrm.cmd.permissiontoadjust.ProcessDataCmd;
|
import com.engine.hrm.cmd.permissiontoadjust.ProcessDataCmd;
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
import weaver.hrm.User;
|
import weaver.hrm.User;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpSession;
|
import javax.servlet.http.HttpSession;
|
||||||
|
@ -18,15 +19,21 @@ import java.util.Map;
|
||||||
*/
|
*/
|
||||||
public class RightMoveUtil {
|
public class RightMoveUtil {
|
||||||
|
|
||||||
|
private static Logger logger = Util.getLogger();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 触发标准权限转移 转移待办已办等信息
|
* 触发标准权限转移 转移待办已办等信息
|
||||||
* @param param
|
* @param param 入参按需填写如下等参数
|
||||||
|
* fromid
|
||||||
|
* toid
|
||||||
|
* T133All
|
||||||
|
* T133AllNum
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static JSONObject moveRight(JSONObject param){
|
public static JSONObject moveRight(JSONObject param){
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
try{
|
try{
|
||||||
Util.logStr("RightMoveUtil moveRight begin;param:[{}]", param.toJSONString());
|
logger.info("RightMoveUtil moveRight begin;param:" + param.toJSONString());
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
for(Object key : param.keySet()){
|
for(Object key : param.keySet()){
|
||||||
params.put(key.toString(),param.get(key));
|
params.put(key.toString(),param.get(key));
|
||||||
|
@ -50,10 +57,10 @@ public class RightMoveUtil {
|
||||||
ProcessDataCmd cmd = new ProcessDataCmd(params,request,new User(1));
|
ProcessDataCmd cmd = new ProcessDataCmd(params,request,new User(1));
|
||||||
Map<String, Object> execute = cmd.execute(null);
|
Map<String, Object> execute = cmd.execute(null);
|
||||||
result = new JSONObject(execute);
|
result = new JSONObject(execute);
|
||||||
Util.logStr("RightMoveUtil moveRight end;result:[{}]", execute.toString());
|
logger.info("RightMoveUtil moveRight end;result:" + execute.toString());
|
||||||
return result;
|
return result;
|
||||||
}catch (Throwable e){
|
}catch (Throwable e){
|
||||||
Util.logStr("RightMoveUtil moveRight error;message:[{}]", e.getMessage());
|
logger.error("RightMoveUtil moveRight error;message:" + e.getMessage());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue