/**
* 2010(c) Copyright Oceansoft Information System Co.,LTD. All rights reserved.
* <p/>
* Compile: JDK 1.6+
* <p/>
* 版权所有(C):江苏欧索软件有限公司
* <p/>
* 公司名称:江苏欧索软件有限公司
* <p/>
* 公司地址:中国苏州科技城青山路1号
* <p/>
* 网址: http://www.oceansoft.com.cn
* <p/>
* 版本: 苏州公安统一用户管理平台1.0
* <p/>
* 作者: 090922(陈伟)
* <p/>
* 文件名:DeptManagerController.java
* <p/>
* 类产生时间: 2012-5-29 上午12:53:18
* <p/>
* 负责人: 090922(陈伟)
* <p/>
* Email:javacspring@gmail.com
* <p/>
* 所在组 : 苏州公安统一用户管理平台
* <p/>
* 所在部门: 电信/国土——技术二部
* <p/>
* <p/>
*/
package com.oceansoft.core.jxkh.controller;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.hui.platform.system.exception.HuiException;
import com.hui.platform.system.utility.StringUtil;
import com.oceansoft.core.common.constant.Constant;
import com.oceansoft.core.common.util.CommonUtilCache;
import com.oceansoft.core.common.util.DatetimeUtil;
import com.oceansoft.core.common.util.Pagination;
import com.oceansoft.core.controller.util.ApiResult;
import com.oceansoft.core.domain.Message;
import com.oceansoft.core.domain.SysDept;
import com.oceansoft.core.domain.SysUser;
import com.oceansoft.core.jxkh.dao.IFinalMarkDao;
import com.oceansoft.core.jxkh.domain.*;
import com.oceansoft.core.jxkh.service.*;
import com.oceansoft.core.service.ISysDeptService;
import com.oceansoft.core.service.ISysUserService;
import com.oceansoft.core.service.IUUMSRoleService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.HandlerAdapter;
import javax.annotation.Resource;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;
/**
* 部门管理控制器
*
* @author acer
*/
@Controller
@RequestMapping("/evaluation")
public class EvaluationController {
@Resource
private ISysDeptService sysDeptService;
@Resource
private IUUMSRoleService roleService;
@Resource
private ISysUserService userService;
@Resource
private IEvaluationService evaluationService;
@Resource
private IKhyService khyService;
@Resource
private IWorkLogService workLogService;
@Resource
private IKhmcService khmcService;
@Resource
private IPersonnelService personnelService;
@Resource
private IKhlxService khlxService;
@Resource
private ITaskService taskService;
@Resource
private IFzhzService fzhzService;
@Resource
private IJcsjService jcsjService;
@Resource
private IFinalMarkDao finalMarkDao;
@RequestMapping(value = "echartsData.json")
public void statistics(HttpServletRequest request, ModelMap modelMap) {
String deptId = request.getParameter("deptId");
String name = request.getParameter("name");
SysUser user = (SysUser) request.getSession().getAttribute(Constant.LOGIN_USER);
// 读取角色
Map<String, Object> roles = roleService.findRoleByUser(user.getPoliceNum());
List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
if (StringUtil.isNullOrBlank(deptId)) {
deptId = user.getDeptId();
if ((roles.containsKey("10")) || roles.containsKey("11") || roles.containsKey("2")) {//指挥长 统计部门的数据
deptId = deptId.substring(0, 6);
try {
list = evaluationService.getStatisticsDept(deptId);
} catch (HuiException e) {
e.printStackTrace();
}
}
} else {
//先获取当前点击的部门
SysDept dept = sysDeptService.findByParentAndName(deptId, name);
deptId = dept.getDeptId();
//查询当前传回的deptid是否还有下级部门
int count = sysDeptService.finddeptcount(deptId);
if (count > 0) {
deptId = deptId.substring(0, 8);
try {
list = evaluationService.getStatisticsDept(deptId);
} catch (HuiException e) {
e.printStackTrace();
}
} else {
try {
list = evaluationService.getStatisticsUser(deptId);
} catch (HuiException e) {
e.printStackTrace();
}
}
}
JSONObject jsonObject = new JSONObject();
JSONArray array1 = new JSONArray();
JSONArray array2 = new JSONArray();
for (Map<String, Object> map : list) {
array1.add(map.get("DEPTNAME"));
// int count =Integer.parseInt(map.get("USERCOUNT").toString().replaceAll(" ",""));
int max = 99;
int min = 70;
Random random = new Random();
int s = random.nextInt(max) % (max - min + 1) + min;
array2.add(s);
}
jsonObject.put("name", array1);
jsonObject.put("data", array2);
modelMap.addAttribute("data", jsonObject);
modelMap.addAttribute("deptId", deptId);
}
@RequestMapping(value = "wdzp.html")
public String wdzp(HttpServletRequest request, ModelMap modelMap) {
String checkyear = request.getParameter("checkyear");
if (StringUtil.isNullOrBlank(checkyear)) {
Calendar date = Calendar.getInstance();
checkyear = String.valueOf(date.get(Calendar.YEAR));
}
SysUser sysUser = (SysUser) request.getSession().getAttribute(Constant.LOGIN_USER);
Map<String, Object> roles = (Map<String, Object>) request.getSession().getAttribute(Constant.SESSION_ROLOES);
boolean zhz_roleid = roles.containsKey((String) ((ServletContext) CommonUtilCache.getItem("ctx")).getAttribute("zhz_roleid"));
if (zhz_roleid) {
modelMap.addAttribute("type", 1);
} else {
modelMap.addAttribute("type", 0);
}
modelMap.addAttribute("checkyear", checkyear);
return "evaluation/khcp_zp_list1";
}
/**
* 我的月度自评/季度自评列表
*
* @param request
* @return
*/
@RequestMapping(value = "myEvaluationList.json")
public void myEvaluationList(HttpServletRequest request, ModelMap modelMap) {
String offset = request.getParameter("offset");
String limit = request.getParameter("limit");
String order = request.getParameter("order");
String year = request.getParameter("year");
SysUser user = (SysUser) request.getSession().getAttribute(Constant.LOGIN_USER);
HashMap<Object, Object> paramap = new HashMap<>();
paramap.put("offset", offset);
paramap.put("limit", limit);
paramap.put("order", order);
paramap.put("userId", user.getDbid());
paramap.put("year", year);
/*Map<String,Object> roles = (Map<String,Object>) request.getSession().getAttribute(
Constant.SESSION_ROLOES);
String type = "0";
if(roles.containsKey("2")){
type="0";
} else
if(roles.containsKey("10")){//指挥长 统计部门的数据
type="1";
} else
if(roles.containsKey("11")){//处级干部 统计部门的数据
type="0";
}*/
//HashMap<String,String> map = new HashMap<>();
//map.put("policeNum",user.getPoliceNum());
Pagination<MyMark> page = null;
try {
page = evaluationService.myEvaluation(paramap);
} catch (HuiException e) {
e.printStackTrace();
}
//modelMap.addAttribute("type",type);
modelMap.addAttribute("rows", page.getList());
modelMap.addAttribute("total", page.getTotalRows());
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
本系统是一款基于Java及HTML/CSS/JavaScript开发的省厅绩效考核系统源码,包含2255个文件,其中包括565个PNG图片、359个Java源文件、301个CSS样式文件、246个JavaScript脚本文件、210个JSP页面文件、87个JAR包文件、56个JPG图片文件、28个HTML文件和21个XML配置文件。该系统专注于省厅绩效考核管理,旨在提升绩效评估效率。
资源推荐
资源详情
资源评论
收起资源包目录
基于Java及HTML/CSS/JavaScript的省厅绩效考核系统设计源码 (2000个子文件)
org.eclipse.wst.common.component 523B
org.eclipse.wst.jsdt.ui.superType.container 49B
bootstrap.css 129KB
bootstrap.min.css 107KB
main.css 99KB
easyui.css 47KB
easyui.css 46KB
easyui.css 46KB
easyui.css 46KB
easyui.css 43KB
ueditor.css 43KB
ueditor.min.css 34KB
easyui.css 32KB
easyui.css 32KB
easyui.css 32KB
easyui.css 32KB
video-js.css 21KB
jedate1.css 19KB
image.css 18KB
video.css 15KB
attachment.css 14KB
layer.css 14KB
fullcalendar.css 13KB
video-js.min.css 11KB
common.css 10KB
iconfont.css 9KB
DeclareView.css 8KB
tabs.css 8KB
tabs.css 8KB
tabs.css 8KB
tabs.css 8KB
laydate.css 8KB
green.css 8KB
black.css 8KB
blue.css 8KB
default.css 8KB
bootstrap-table.css 7KB
shCoreDefault.css 7KB
opera.css 7KB
aero.css 7KB
red.css 7KB
gray.css 7KB
idialog.css 7KB
red.css 7KB
green.css 7KB
jedate.css 7KB
chrome.css 6KB
zTreeStyle.css 6KB
zTreeStyle.css 6KB
tabs.css 6KB
twitter.css 6KB
simple.css 6KB
bootstrap-table.min.css 6KB
datagrid.css 5KB
datagrid.css 5KB
datagrid.css 5KB
datagrid.css 5KB
datagrid.css 5KB
datagrid.css 5KB
datagrid.css 5KB
datagrid.css 5KB
datagrid.css 5KB
khcp.css 4KB
tabs.css 4KB
tabs.css 4KB
scrawl.css 4KB
linkbutton.css 4KB
linkbutton.css 4KB
linkbutton.css 4KB
tabs.css 4KB
tabs.css 4KB
datepicker.css 4KB
calendar.css 4KB
calendar.css 4KB
calendar.css 4KB
calendar.css 4KB
calendar.css 4KB
tree.css 4KB
tree.css 4KB
tree.css 3KB
tree.css 3KB
profiles_index.css 3KB
datepicker.css 3KB
tree.css 3KB
tree.css 3KB
tree.css 3KB
tree.css 3KB
tree.css 3KB
calendar.css 3KB
calendar.css 3KB
calendar.css 3KB
calendar.css 3KB
codemirror.css 3KB
admin_common.css 3KB
login.css 3KB
validationEngine.jquery.css 3KB
panel.css 3KB
panel.css 3KB
panel.css 3KB
panel.css 3KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
xyq2024
- 粉丝: 2469
- 资源: 5463
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功