%@ page contentType="text/html; charset=UTF-8" %>
<%@ page import="com.alibaba.fastjson.JSONObject" %>
<%@ page import="weaver.general.Util" %>
<%@ page import="weaver.hrm.*" %>
<%@ page import="com.cloudstore.dev.api.bean.MessageType" %>
<%@ page import="com.cloudstore.dev.api.bean.MessageBean" %>
<%@ page import="com.cloudstore.dev.api.util.Util_Message" %>
<%@ page import="java.util.*" %>
<%@ page import="weaver.general.TimeUtil" %>
<%@ page import="com.alibaba.fastjson.JSON" %>
<%@ page import="com.engine.kq.service.KQReportService" %>
<%@ page import="com.engine.common.util.ServiceUtil" %>
<%@ page import="com.engine.kq.service.impl.KQReportServiceImpl" %>
<%@ page import="com.alibaba.fastjson.JSONArray" %>
<%@ page import="java.time.format.DateTimeFormatter" %>
<%@ page import="java.time.LocalDate" %>
<%@ page import="java.time.format.DateTimeParseException" %>
<%@ page import="weaver.formmode.setup.ModeRightInfo" %>
<%
int kqbbsdtxjlb_formmodeid = Util.getIntValue(rs.getPropValue("wuyuan_hrminfo","kqbbsdtxjlb_formmodeid"));
JSONObject data = new JSONObject();
User user = HrmUserVarify.getUser(request, response);
int userid = user.getUID();
//发起审批按钮
boolean flag = false;
String parmm = Util.null2String(request.getParameter("parmm"));
rs.writeLog("=============== kqConfirmMessage.jsp parmm ==================="+ parmm);
JSONObject jsonObject = JSONObject.parseObject(parmm);
rs.writeLog("=============== kqConfirmMessage.jsp jsonObject ==================="+ jsonObject);
Map params = jsonObject.toJavaObject(Map.class);
rs.writeLog("=============== kqConfirmMessage.jsp params ==================="+ params);
JSONObject jsonObj = JSON.parseObject(Util.null2String(params.get("data")));
String fromDate = Util.null2String(jsonObj.get("fromDate"));
String toDate = Util.null2String(jsonObj.get("toDate"));
String typeselect =Util.null2String(jsonObj.get("typeselect"));
String subCompanyId = Util.null2String(jsonObj.get("subCompanyId"));
String departmentId = Util.null2String(jsonObj.get("departmentId"));
String resourceId = Util.null2String(jsonObj.get("resourceId"));
if(typeselect.length()==0)typeselect = "3";
if(!typeselect.equals("") && !typeselect.equals("0")&& !typeselect.equals("6")){
if(typeselect.equals("1")){
fromDate = TimeUtil.getCurrentDateString();
toDate = TimeUtil.getCurrentDateString();
}else{
fromDate = TimeUtil.getDateByOption(typeselect,"0");
toDate = TimeUtil.getDateByOption(typeselect,"1");
}
}
Map apidatas = new HashMap();
apidatas = getService(user).getKQReport(params, user);
rs.writeLog("apidatas:" + JSONObject.toJSONString(apidatas));
JSONArray jsonArray = JSON.parseArray(Util.null2String(JSONObject.toJSONString(apidatas.get("datas"))));
rs.writeLog("jsonArray:" + JSONObject.toJSONString(jsonArray));
Set deptList = new HashSet<>();
for (Iterator