10大优享服务
62项会员特权

java后端开发实例

发布时间:2021-12-01 14:09:50     阅读次数:9616次     评论数:0次

  @RequestMapping("changeDateForHdsItemList")

  @ResponseBody

  public MapchangeDateForHdsItemList(HttpServletRequest request) {

  Map param = this.rebuildParam(request);

  try {

  Map result = new HashMap<>();

  String businessType = (String) param.get("businessType");

  if("leader".equals(businessType)){

  param.put("dept_id", "");

  param.put("dept", "");

  param.put("leader_id", param.get("_loginUserId"));

  }else{

  Map deptInfo = dailyMattersService.getDeptListByUserId(param);

  param.put("dept_id", deptInfo.get("ORG_ID"));

  param.put("dept", deptInfo.get("ORG_TYPE"));

  String deptId = String.valueOf(deptInfo.get("ORG_ID"));

  boolean controlFlag = DataControlUtil.checkDept(deptId);

  if(controlFlag){

  param.put("controlFlag", "true");

  }

  }

  param.put("page_flag", "true");

  param.put("date_type", request.getParameter("date_type"));

  param.put("jump_url", "/dailyMatters/dailyMattersShowDetail");

  param.put("deptLeaderRelOpen", "yes");

  List> nearlyWorkList = homeService.qryHdsItemList(param);

  //request.setAttribute("nearlyWorkList", nearlyWorkList);//近期工作提醒

  result.put("data", nearlyWorkList);

  return result;

  } catch (Exception e) {

  log.error(e.getMessage());

  throw new ServiceException("查询列表失败");

  }

  }

  @RequestMapping("/changeStateForDbList")

  @ResponseBody

  public MapchangeStateForDbList(HttpServletRequest request) {

  Map param = this.rebuildParam(request);

  try {

  Map result = new HashMap<>();

  String stateFlag = (String)param.get("state_flag");

  Map DBMap = new HashMap<>();

  Map searchData = new HashMap<>();

  searchData.put("userId", ShiroUtils.getUser().getUserId());//用户ID

  searchData.put("itemName", ObjectUtils.toString(param.get("item_name")));//标题、事项名称

  searchData.put("itemType", ObjectUtils.toString(param.get("item_type")));//事项类型

  searchData.put("leaderId", ObjectUtils.toString(param.get("leader_id")));//牵头领导查询

  searchData.put("leaderOrgId", ObjectUtils.toString(param.get("leader_dept_id")));//牵头承办单位查询

  searchData.put("responsibleParty", ObjectUtils.toString(param.get("service_dept_id")));//协调业务处室查询

  Map deptInfo = dailyMattersService.getDeptListByUserId(param);

  String deptId = String.valueOf(deptInfo.get("ORG_ID"));

  boolean controlFlag = DataControlUtil.checkDept(deptId);

  if(controlFlag){

  searchData.put("controlFlag", "true");

  param.put("controlFlag", "true");

  }

  if("YB".equals(stateFlag)){

  DBMap = flowCommonService.queryYBList(searchData,"OA",true,0,5);

  }else if("ZB".equals(stateFlag)){

  DBMap = flowCommonService.queryZBList(searchData,"OA",true,0,5);

  }else{

  DBMap = flowCommonService.queryDBList(param.get("_loginUserId")+"","OA",null,null,true,0,5);

  }

  result.put("recordsTotal", DBMap.get("recordsTotal"));

  result.put("data", DBMap.get("data"));

  return result;

  } catch (Exception e) {

  log.error(e.getMessage());

  throw new ServiceException("查询列表失败");

  }

  }

  今天小编就为大家分享到这里啦,如果觉得自己还想了解更多,欢迎大家上我们一品威客的网站,里面有更多丰富的相关内容等着大家去挖掘哦!如果你需要app开发网络推广设计,文案写作,营销策划等服务,欢迎到一品威客网发布法律服务相关任务,让广大的服务商为您解决难题

本文地址:
来源:一品威客,转载须经版权人书面授权并注明来源

留言(0

↓展开留言

该攻略尚无留言记录