#E10人事自助门户
parent
319f8149f0
commit
36be5055c0
@ -0,0 +1,346 @@
|
||||
package com.weaver.seconddev.jcldoor.cmd;
|
||||
|
||||
import com.weaver.seconddev.jcldoor.util.DatabaseUtils;
|
||||
import com.weaver.teams.domain.user.SimpleEmployee;
|
||||
import com.weaver.teams.security.context.UserContext;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.time.LocalDate;
|
||||
import java.time.Month;
|
||||
import java.time.YearMonth;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 类的详细说明
|
||||
*
|
||||
* @author wangj
|
||||
* @version 1.00版本
|
||||
* @Date 2024/3/8
|
||||
*/
|
||||
@Component
|
||||
public class PortalPerformanceInfoCmd {
|
||||
//日志
|
||||
private final static Logger log = LoggerFactory.getLogger(UserInfoCmd.class);
|
||||
|
||||
@Autowired
|
||||
private DatabaseUtils databaseUtils;
|
||||
|
||||
public String tenant_key = "t7akvdnf84" ;
|
||||
|
||||
|
||||
/**
|
||||
* 获取生日祝福信息
|
||||
* @param simpleEmployee
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> getInfo(HttpServletRequest request, SimpleEmployee simpleEmployee) {
|
||||
Map<String,Object> dataMap = new HashMap<String,Object>(100);
|
||||
try {
|
||||
|
||||
String employeeId = request.getParameter("employeeId");
|
||||
LocalDate currentDate = LocalDate.now();
|
||||
LocalDate lastMonthDate = currentDate.minusMonths(1);
|
||||
int lastMonth = lastMonthDate.getMonthValue();
|
||||
|
||||
if(StringUtils.isBlank(employeeId)){
|
||||
employeeId = String.valueOf(UserContext.getCurrentEmployeeId());
|
||||
}
|
||||
|
||||
String groupId = "weaver-ebuilder-form-service";
|
||||
String sourceType = "LOGIC";
|
||||
|
||||
Map<String, Object> scoreMap = getLastMonthKpi2(employeeId,groupId,sourceType);
|
||||
|
||||
List<Map<String, String>> yearList = getWholeYearKpi2(employeeId,groupId,sourceType);
|
||||
|
||||
dataMap.put("scoreMap",scoreMap);
|
||||
dataMap.put("yearList",yearList);
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error("PortalPerformanceInfoCmd :"+e);
|
||||
dataMap.put("count","-1");
|
||||
}
|
||||
|
||||
return dataMap;
|
||||
}
|
||||
|
||||
public Map<String, Object> getLastMonthKpi2(String employeeId, String groupId, String sourceType){
|
||||
|
||||
log.error("PortalPerformanceInfoCmd getLastMonthKpi2");
|
||||
|
||||
Map<String, Object> dataMap = new HashMap<String,Object>();
|
||||
|
||||
List<Map<String,Object>> indicatorList = new ArrayList<Map<String,Object>>();
|
||||
|
||||
if(StringUtils.isNotBlank(employeeId)){
|
||||
String sql =" select left(k.real_period,10) as real_period,left(k.real_period,7) as period_month,k.kpi_scheme,k.score\n" +
|
||||
" from (select real_period,kpi_scheme,score\n" +
|
||||
" from hr_kpi_flow \n" +
|
||||
" where kpi_user='"+employeeId+"' \n" +
|
||||
" and module = 'kpiFlow' \n" +
|
||||
" and date_type = 'month' \n" +
|
||||
" and delete_type = '0' " +
|
||||
" and tenant_key='"+tenant_key+"'\n" +
|
||||
" and FLOW_STATUS in('noApprove','approve','finished')\n" +
|
||||
" order by real_period desc\n" +
|
||||
") k limit 1 ";
|
||||
|
||||
log.error("sql20-1:"+sql);
|
||||
Map<String, Object> result = databaseUtils.execute(sourceType, groupId, sql);
|
||||
List<Map<String,Object>> recordList = databaseUtils.getDataSourceList(result);
|
||||
if(CollectionUtils.isNotEmpty(recordList)){
|
||||
Map<String,Object> recordMap = recordList.get(0);
|
||||
if(!recordMap.isEmpty()){
|
||||
String score = String.valueOf(recordMap.get("score"));
|
||||
String kpi_scheme = String.valueOf(recordMap.get("kpi_scheme"));
|
||||
String real_period = String.valueOf(recordMap.get("real_period"));
|
||||
String period_month = String.valueOf(recordMap.get("period_month"));
|
||||
|
||||
dataMap.put("score",score);
|
||||
dataMap.put("yearmonth",period_month);
|
||||
dataMap.put("kpi_scheme",kpi_scheme);
|
||||
dataMap.put("real_period",real_period);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!dataMap.isEmpty()){
|
||||
String kpi_scheme = String.valueOf(dataMap.get("kpi_scheme"));
|
||||
|
||||
log.error("kpi_scheme:"+kpi_scheme);
|
||||
|
||||
if(StringUtils.isNotBlank(kpi_scheme)){
|
||||
String sql =" select indicator_type,indicator_description,weight \n" +
|
||||
" from hr_kpi_scheme_indicator " +
|
||||
" where scheme_id='"+kpi_scheme+"' " +
|
||||
" and indicator_mode='quantify'\n" +
|
||||
" and status='on' " +
|
||||
" and delete_type = '0'" +
|
||||
" and tenant_key = '"+tenant_key+"'" ;
|
||||
|
||||
log.error("sql2:"+sql);
|
||||
Map<String, Object> result = databaseUtils.execute(sourceType, groupId, sql);
|
||||
List<Map<String,Object>> recordList = databaseUtils.getDataSourceList(result);
|
||||
|
||||
log.error("recordList:"+recordList.size());
|
||||
|
||||
if(recordList.size()>=2){
|
||||
for(int i=0;i<2;i++){
|
||||
indicatorList.add(recordList.get(i));
|
||||
}
|
||||
}else if(recordList.size() == 1){
|
||||
indicatorList.add(recordList.get(0));
|
||||
|
||||
Map<String, Object> indicatorMap = new HashMap<String, Object>();
|
||||
sql = " select name,data_row,property\n" +
|
||||
" from hr_kpi_details_link\n" +
|
||||
" where kpi_details in( " +
|
||||
" select id\n" +
|
||||
" from hr_kpi_details " +
|
||||
" where KPI_SCHEME='"+kpi_scheme+"'\n" +
|
||||
" and MODULE='kpiSchemeSetting'\n" +
|
||||
" and TENANT_KEY='"+tenant_key+"'\n" +
|
||||
" and DELETE_TYPE = 0" +
|
||||
" )\n" +
|
||||
" and module = 'kpiSchemeSetting'\n" +
|
||||
" and tenant_key = '"+tenant_key+"'\n" +
|
||||
" and delete_type = '0'\n" +
|
||||
" and property in('weight', 'describe', 'type')\n" +
|
||||
" and data_row in ( \n" +
|
||||
" select p.data_row from (\n" +
|
||||
" select w.data_row from (\n" +
|
||||
" select data_row \n" +
|
||||
" from hr_kpi_details_link\n" +
|
||||
" where kpi_details in ( " +
|
||||
" select id\n" +
|
||||
" from hr_kpi_details " +
|
||||
" where KPI_SCHEME='"+kpi_scheme+"'\n" +
|
||||
" and MODULE='kpiSchemeSetting'\n" +
|
||||
" and TENANT_KEY='"+tenant_key+"'\n" +
|
||||
" and DELETE_TYPE = 0" +
|
||||
" )\n" +
|
||||
" and PROPERTY = 'weight'\n" +
|
||||
" and MODULE = 'kpiSchemeSetting'\n" +
|
||||
" and TENANT_KEY = '"+tenant_key+"'\n" +
|
||||
" and DELETE_TYPE = '0'\n" +
|
||||
" order by name desc\n" +
|
||||
" ) w limit 1 \n" +
|
||||
" ) p\n" +
|
||||
" )";
|
||||
log.error("sql3:"+sql);
|
||||
Map<String, Object> result2 = databaseUtils.execute(sourceType, groupId, sql);
|
||||
List<Map<String,Object>> recordList2 = databaseUtils.getDataSourceList(result2);
|
||||
log.error("recordList2:"+recordList2.size());
|
||||
for(int i=0;i<recordList2.size();i++){
|
||||
Map<String,Object> recordMap = recordList2.get(i);
|
||||
String name = String.valueOf(recordMap.get("name"));
|
||||
String property = String.valueOf(recordMap.get("property"));
|
||||
|
||||
log.error("name:"+name);
|
||||
log.error("property:"+property);
|
||||
|
||||
if("weight".equalsIgnoreCase(property)){
|
||||
indicatorMap.put("weight",name);
|
||||
}
|
||||
if("describe".equalsIgnoreCase(property)){
|
||||
indicatorMap.put("indicator_description",name);
|
||||
}
|
||||
if("type".equalsIgnoreCase(property)){
|
||||
indicatorMap.put("indicator_type",name);
|
||||
}
|
||||
}
|
||||
|
||||
if(!indicatorMap.isEmpty()){
|
||||
indicatorList.add(indicatorMap);
|
||||
}
|
||||
|
||||
}else{
|
||||
|
||||
sql = " select w.data_row from (\n" +
|
||||
" select data_row\n" +
|
||||
" from hr_kpi_details_link\n" +
|
||||
" where kpi_details in( " +
|
||||
" select id\n" +
|
||||
" from hr_kpi_details " +
|
||||
" where KPI_SCHEME='"+kpi_scheme+"'\n" +
|
||||
" and MODULE='kpiSchemeSetting'\n" +
|
||||
" and TENANT_KEY='"+tenant_key+"'\n" +
|
||||
" and DELETE_TYPE = 0" +
|
||||
" )\n" +
|
||||
" and PROPERTY = 'weight'\n" +
|
||||
" and MODULE = 'kpiSchemeSetting'\n" +
|
||||
" and TENANT_KEY = '"+tenant_key+"'\n" +
|
||||
" and DELETE_TYPE = '0'\n" +
|
||||
" order by name desc\n" +
|
||||
") w limit 2" ;
|
||||
log.error("sql4:"+sql);
|
||||
Map<String, Object> result3 = databaseUtils.execute(sourceType, groupId, sql);
|
||||
List<Map<String,Object>> recordList3 = databaseUtils.getDataSourceList(result3);
|
||||
for(int k=0;k<recordList3.size();k++){
|
||||
Map<String,Object> recordMap3 = recordList3.get(k);
|
||||
|
||||
String data_row = String.valueOf(recordMap3.get("data_row"));
|
||||
|
||||
Map<String, Object> indicatorMap = new HashMap<String, Object>();
|
||||
|
||||
sql = " select name,data_row,property\n" +
|
||||
" from hr_kpi_details_link\n" +
|
||||
" where kpi_details in( " +
|
||||
" select id\n" +
|
||||
" from hr_kpi_details " +
|
||||
" where KPI_SCHEME='"+kpi_scheme+"'\n" +
|
||||
" and MODULE='kpiSchemeSetting'\n" +
|
||||
" and TENANT_KEY='"+tenant_key+"'\n" +
|
||||
" and DELETE_TYPE = 0" +
|
||||
" )\n" +
|
||||
" and MODULE = 'kpiSchemeSetting'\n" +
|
||||
" and TENANT_KEY = '"+tenant_key+"'\n" +
|
||||
" and DELETE_TYPE = '0'\n" +
|
||||
" and property in('weight', 'describe', 'type')\n" +
|
||||
" and data_row in("+data_row+")" ;
|
||||
|
||||
log.error("sql5:"+sql);
|
||||
|
||||
Map<String, Object> result2 = databaseUtils.execute(sourceType, groupId, sql);
|
||||
List<Map<String,Object>> recordList2 = databaseUtils.getDataSourceList(result2);
|
||||
|
||||
for(int i=0;i<recordList2.size();i++){
|
||||
|
||||
Map<String,Object> recordMap = recordList2.get(i);
|
||||
|
||||
String name = String.valueOf(recordMap.get("name"));
|
||||
String property = String.valueOf(recordMap.get("property"));
|
||||
if("weight".equalsIgnoreCase(property)){
|
||||
indicatorMap.put("weight",name);
|
||||
}
|
||||
if("describe".equalsIgnoreCase(property)){
|
||||
indicatorMap.put("indicator_description",name);
|
||||
}
|
||||
if("type".equalsIgnoreCase(property)){
|
||||
indicatorMap.put("indicator_type",name);
|
||||
}
|
||||
}
|
||||
|
||||
indicatorList.add(indicatorMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
dataMap.put("indicator",indicatorList);
|
||||
}
|
||||
return dataMap ;
|
||||
}
|
||||
|
||||
|
||||
public List<Map<String, String>> getWholeYearKpi2(String employeeId,String groupId,String sourceType){
|
||||
|
||||
List<Map<String, String>> dateList = new ArrayList<Map<String, String>>();
|
||||
|
||||
Map<String, String> dataMap = null;
|
||||
LocalDate localDate = LocalDate.now();
|
||||
int year = localDate.getYear() ;
|
||||
int dayOfYear = 1 ;
|
||||
String[] monthzw = new String[]{"一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"};
|
||||
|
||||
for(int i=1;i<=12;i++){
|
||||
Month month = Month.of(i);
|
||||
LocalDate startDay = YearMonth.of(year, month).atDay(dayOfYear); // 计算当前月份的首日
|
||||
LocalDate endDay = YearMonth.of(year, month).atEndOfMonth(); // 计算当前月份的最后一天
|
||||
|
||||
log.error("getWholeYearKpi2-startDay:"+startDay);
|
||||
log.error("getWholeYearKpi2-endDay:"+endDay);
|
||||
|
||||
String yearMonth = "";
|
||||
if(monthzw.length==12){
|
||||
yearMonth = monthzw[i-1];
|
||||
}
|
||||
|
||||
String sql =" select score from hr_kpi_flow " +
|
||||
" where kpi_user='"+employeeId+"' " +
|
||||
" and left(real_period,10) >= '" +startDay+"'" +
|
||||
" and left(real_period,10) <='" + endDay +"'" +
|
||||
" and module = 'kpiFlow'" +
|
||||
" and date_type = 'month'" +
|
||||
" and flow_status in('noApprove','approve','finished') \n" +
|
||||
" and delete_type = '0'" +
|
||||
" and tenant_key='"+tenant_key+"' " ;
|
||||
|
||||
log.error("getWholeYearKpi2-sql:"+sql);
|
||||
|
||||
dataMap = new HashMap<String,String>();
|
||||
|
||||
Map<String, Object> result = databaseUtils.execute(sourceType, groupId, sql);
|
||||
List<Map<String,Object>> recordList = databaseUtils.getDataSourceList(result);
|
||||
if(CollectionUtils.isNotEmpty(recordList)){
|
||||
Map<String,Object> recordMap = recordList.get(0);
|
||||
if(!recordMap.isEmpty()){
|
||||
String score = String.valueOf(recordMap.get("score"));
|
||||
if(StringUtils.isNotBlank(score)){
|
||||
dataMap.put(yearMonth,score);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
dataMap.put(yearMonth,"0");
|
||||
}
|
||||
|
||||
dateList.add(dataMap);
|
||||
}
|
||||
return dateList ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static String null2String(String s,String def) {
|
||||
return s == null ?(def==null?"":def) : s;
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,131 @@
|
||||
package com.weaver.seconddev.jcldoor.cmd;
|
||||
|
||||
import com.weaver.seconddev.jcldoor.util.DatabaseUtils;
|
||||
import com.weaver.teams.domain.user.SimpleEmployee;
|
||||
import com.weaver.teams.security.context.UserContext;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.time.LocalDate;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 风险信息
|
||||
*
|
||||
* @author wangj
|
||||
* @version 1.00版本
|
||||
* @Date 2024/3/8
|
||||
*/
|
||||
@Component
|
||||
public class PortalRiskInfoCmd {
|
||||
//日志
|
||||
private final static Logger log = LoggerFactory.getLogger(UserInfoCmd.class);
|
||||
|
||||
@Autowired
|
||||
private DatabaseUtils databaseUtils;
|
||||
|
||||
public String tenant_key = "t7akvdnf84" ;
|
||||
|
||||
|
||||
/**
|
||||
* 获取风险信息
|
||||
* @param simpleEmployee
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> getInfo(HttpServletRequest request, SimpleEmployee simpleEmployee) {
|
||||
Map<String,Object> recordMap = new HashMap<String,Object>();
|
||||
try {
|
||||
|
||||
String day = null2String(request.getParameter("day"),"30");
|
||||
SimpleEmployee employee = UserContext.getCurrentUser();
|
||||
|
||||
String startDay = "";
|
||||
log.error("testSapi17 day:"+startDay);
|
||||
if(StringUtils.isNotBlank(day)){
|
||||
int day_ = Integer.parseInt(day);
|
||||
LocalDate today = LocalDate.now(); // 获取当前日期
|
||||
LocalDate tenDaysBefore = today.minusDays(day_); // 当前日期前10天
|
||||
startDay = tenDaysBefore.toString();
|
||||
}else{
|
||||
LocalDate today = LocalDate.now(); // 获取当前日期
|
||||
LocalDate tenDaysBefore = today.minusDays(30); // 当前日期前10天
|
||||
startDay = tenDaysBefore.toString();
|
||||
}
|
||||
|
||||
log.error("testSapi17 startDay:"+startDay);
|
||||
|
||||
long employeeId = UserContext.getCurrentEmployeeId();
|
||||
|
||||
|
||||
String groupId = "weaver-portrait-service";
|
||||
String sourceType = "LOGIC";
|
||||
|
||||
String sql =" SELECT \n" +
|
||||
" t1.id typeid,\n" +
|
||||
" t1.name typename,\n" +
|
||||
" t2.id riskid,\n" +
|
||||
" t2.name riskname,\n" +
|
||||
" t.risk_value,\n" +
|
||||
" e.username,\n" +
|
||||
" t.tenant_key,\n" +
|
||||
" t.userid,\n" +
|
||||
" times \n" +
|
||||
" FROM ( \n" +
|
||||
" SELECT k.riskid,k.risk_value,k.tenant_key,k.userid,COUNT(k.riskid) times \n" +
|
||||
" FROM (\n" +
|
||||
" SELECT t.riskid,t.risk_value,t.tenant_key,t.userid\n" +
|
||||
" FROM pr_indrisk_data t \n" +
|
||||
" WHERE t.delete_type = 0 \n" +
|
||||
" AND t.tenant_key = '"+tenant_key+"'\n" +
|
||||
" AND t.risk_date >= '"+startDay+"'\n" +
|
||||
" AND t.userid = '"+employeeId+"'\n" +
|
||||
" union all\n" +
|
||||
" SELECT t.riskid,t.risk_value,t.tenant_key,t.userid \n" +
|
||||
" FROM pr_indrisk_data t \n" +
|
||||
" WHERE t.delete_type = 0 \n" +
|
||||
" AND t.tenant_key = '"+tenant_key+"' \n" +
|
||||
" AND t.risk_date >= '"+startDay+"' \n" +
|
||||
" AND t.userid IN (select cid from eteams.emp_link where pid= '"+employeeId+"' and relation = 'senior') \n" +
|
||||
" ) k \n" +
|
||||
" GROUP BY k.riskid,\n" +
|
||||
" k.risk_value,\n" +
|
||||
" k.tenant_key,\n" +
|
||||
" k.userid\n" +
|
||||
" ) t,\n" +
|
||||
" pr_indrisk_type t1,\n" +
|
||||
" pr_indrisk_info t2 ,\n" +
|
||||
" eteams.employee e\n" +
|
||||
" WHERE t.riskid = t2.id \n" +
|
||||
" AND t2.risk_type = t1.id \n" +
|
||||
" AND t.userid = e.id\n" +
|
||||
" AND e.STATUS != 'unavailable' AND e.PERMANENTLY_DELETE = '0'\n" +
|
||||
" AND t1.delete_type = 0 \n" +
|
||||
" AND t2.delete_type = 0" ;
|
||||
|
||||
log.error("PortalRiskInfoCmd:"+sql);
|
||||
|
||||
Map<String, Object> result = databaseUtils.execute(sourceType, groupId, sql);
|
||||
List<Map<String,Object>> recordList = databaseUtils.getDataSourceList(result);
|
||||
for(int i=0;i<recordList.size();i++){
|
||||
Map<String,Object> recordMap2 = recordList.get(i);
|
||||
recordMap2.put("pid",i+"");
|
||||
}
|
||||
recordMap.put("datas",recordList);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error("PortalRiskInfoCmd E:"+e);
|
||||
}
|
||||
return recordMap;
|
||||
}
|
||||
|
||||
public static String null2String(String s,String def) {
|
||||
return s == null ?(def==null?"":def) : s;
|
||||
}
|
||||
}
|
@ -0,0 +1,204 @@
|
||||
package com.weaver.seconddev.jcldoor.cmd;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.weaver.seconddev.jcldoor.util.DatabaseUtils;
|
||||
import com.weaver.teams.domain.user.SimpleEmployee;
|
||||
import okhttp3.*;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 人员工作成就
|
||||
*
|
||||
* @author wangj
|
||||
* @version 1.00版本
|
||||
* @Date 2024/3/4
|
||||
*/
|
||||
@Component
|
||||
public class PortalWorkAchievementCmd {
|
||||
//日志
|
||||
private final static Logger log = LoggerFactory.getLogger(UserInfoCmd.class);
|
||||
|
||||
@Autowired
|
||||
private DatabaseUtils databaseUtils;
|
||||
|
||||
/**
|
||||
* 获取工作成就信息
|
||||
* @param simpleEmployee
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> getInfo(HttpServletRequest request, SimpleEmployee simpleEmployee) {
|
||||
Map<String, Object> result = getSaleInfo(request,simpleEmployee);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public Map<String,Object> getSaleInfo(HttpServletRequest request, SimpleEmployee simpleEmployee){
|
||||
Map<String,Object> map = new HashMap<>(10);
|
||||
String headcookie = request.getHeader("Cookie");
|
||||
//有效合同金额
|
||||
JSONObject yxhtjeObj = new JSONObject();
|
||||
try {
|
||||
JSONObject params = new JSONObject();
|
||||
params.put("compId","e12a1c232bbe4238859da5963f5e9407");
|
||||
params.put("pageId","880065951867256872");
|
||||
params.put("filter","[{\"value\":\"f26759ae44ef4e2f866b8dc3359b8c8a\",\"conditionComId\":\"d84ed5ccd4204ef595885cad8dde1822\",\"funcType\":\"\",\"filterFields\":[],\"dataType\":\"classification\",\"conditionType\":\"and\"}]");
|
||||
params.put("pageFilter","[{\"dataset\":{\"id\":\"10\",\"text\":\"业绩达成表\",\"type\":\"LOGIC\",\"groupId\":\"weaver-ebuilder-contract-servicecmdatauFJXHS\",\"isPhysical\":false}}]");
|
||||
params.put("cusMenuId","838181366272991264");
|
||||
params.put("urlPageTitle","5ZCI5ZCM6Zeo5oi3");
|
||||
|
||||
OkHttpClient client = new OkHttpClient().newBuilder().build();
|
||||
MediaType mediaType = MediaType.parse("application/json");
|
||||
RequestBody body = RequestBody.create(mediaType, params.toJSONString());
|
||||
Request requestPost = new Request.Builder()
|
||||
.url("http://10.12.253.23:20600/api/ebuilder/coms/digitalpanel/getData")
|
||||
.method("POST", body)
|
||||
.addHeader("Cookie", headcookie)
|
||||
.addHeader("Content-Type", "application/json")
|
||||
.build();
|
||||
Response response = client.newCall(requestPost).execute();
|
||||
|
||||
int code = response.code();
|
||||
log.error("getSaleInfo yxhtjeObj:"+code);
|
||||
String data = response.body().string();
|
||||
|
||||
log.error("getSaleInfo yxhtjeObj:"+data);
|
||||
|
||||
if(StringUtils.isNotBlank(data)){
|
||||
yxhtjeObj = JSONObject.parseObject(data);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
log.error("getSaleInfo yxhtjeObj:"+e);
|
||||
}
|
||||
map.put("yxhtjeObj",yxhtjeObj);
|
||||
|
||||
|
||||
//新客户销售合同金额
|
||||
JSONObject xkhxshtjeObj = new JSONObject();
|
||||
try {
|
||||
JSONObject params = new JSONObject();
|
||||
params.put("compId","c0a6f30332a04612b17487f894a9bdb2");
|
||||
params.put("pageId","880065951867256872");
|
||||
params.put("filter","[{\"value\":\"f26759ae44ef4e2f866b8dc3359b8c8a\",\"conditionComId\":\"d84ed5ccd4204ef595885cad8dde1822\",\"funcType\":\"\",\"filterFields\":[],\"dataType\":\"classification\",\"conditionType\":\"and\"}]");
|
||||
params.put("pageFilter","[{\"dataset\":{\"id\":\"40\",\"text\":\"类型分布表\",\"type\":\"LOGIC\",\"groupId\":\"weaver-ebuilder-contract-servicecmdatauFJXHS\",\"isPhysical\":false}}]");
|
||||
params.put("cusMenuId","838181366272991264");
|
||||
params.put("urlPageTitle","5ZCI5ZCM6Zeo5oi3");
|
||||
|
||||
OkHttpClient client = new OkHttpClient().newBuilder().build();
|
||||
MediaType mediaType = MediaType.parse("application/json");
|
||||
RequestBody body = RequestBody.create(mediaType, params.toJSONString());
|
||||
Request requestPost = new Request.Builder()
|
||||
.url("http://10.12.253.23:20600/api/ebuilder/coms/digitalpanel/getData")
|
||||
.method("POST", body)
|
||||
.addHeader("Cookie", headcookie)
|
||||
.addHeader("Content-Type", "application/json")
|
||||
.build();
|
||||
Response response = client.newCall(requestPost).execute();
|
||||
|
||||
int code = response.code();
|
||||
log.error("getSaleInfo xkhxshtjeObj:"+code);
|
||||
String data = response.body().string();
|
||||
|
||||
log.error("getSaleInfo xkhxshtjeObj:"+data);
|
||||
|
||||
if(StringUtils.isNotBlank(data)){
|
||||
xkhxshtjeObj = JSONObject.parseObject(data);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
log.error("getSaleInfo xkhxshtjeObj:"+e);
|
||||
}
|
||||
map.put("xkhxshtjeObj",xkhxshtjeObj);
|
||||
|
||||
|
||||
//老客户销售合同金额
|
||||
JSONObject lkhxshtjeObj = new JSONObject();
|
||||
try {
|
||||
JSONObject params = new JSONObject();
|
||||
params.put("compId","eed91abb469f49928ef2a7a89ab02c93");
|
||||
params.put("pageId","880065951867256872");
|
||||
params.put("filter","[{\"value\":\"f26759ae44ef4e2f866b8dc3359b8c8a\",\"conditionComId\":\"d84ed5ccd4204ef595885cad8dde1822\",\"funcType\":\"\",\"filterFields\":[],\"dataType\":\"classification\",\"conditionType\":\"and\"}]");
|
||||
params.put("pageFilter","[{\"dataset\":{\"id\":\"40\",\"text\":\"类型分布表\",\"type\":\"LOGIC\",\"groupId\":\"weaver-ebuilder-contract-servicecmdatauFJXHS\",\"isPhysical\":false}}]");
|
||||
params.put("cusMenuId","838181366272991264");
|
||||
params.put("urlPageTitle","5ZCI5ZCM6Zeo5oi3");
|
||||
|
||||
OkHttpClient client = new OkHttpClient().newBuilder().build();
|
||||
MediaType mediaType = MediaType.parse("application/json");
|
||||
RequestBody body = RequestBody.create(mediaType, params.toJSONString());
|
||||
Request requestPost = new Request.Builder()
|
||||
.url("http://10.12.253.23:20600/api/ebuilder/coms/digitalpanel/getData")
|
||||
.method("POST", body)
|
||||
.addHeader("Cookie", headcookie)
|
||||
.addHeader("Content-Type", "application/json")
|
||||
.build();
|
||||
Response response = client.newCall(requestPost).execute();
|
||||
|
||||
int code = response.code();
|
||||
log.error("getSaleInfo lkhxshtjeObj:"+code);
|
||||
String data = response.body().string();
|
||||
|
||||
log.error("getSaleInfo lkhxshtjeObj:"+data);
|
||||
|
||||
if(StringUtils.isNotBlank(data)){
|
||||
lkhxshtjeObj = JSONObject.parseObject(data);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
log.error("getSaleInfo lkhxshtjeObj:"+e);
|
||||
}
|
||||
map.put("lkhxshtjeObj",lkhxshtjeObj);
|
||||
|
||||
|
||||
//已收款合同金额
|
||||
JSONObject yskhtjeObj = new JSONObject();
|
||||
try {
|
||||
JSONObject params = new JSONObject();
|
||||
params.put("compId","f03ca1dcaecd456ebb573a23dbe5075b");
|
||||
params.put("pageId","880065951867256872");
|
||||
params.put("filter","[{\"value\":\"f26759ae44ef4e2f866b8dc3359b8c8a\",\"conditionComId\":\"d84ed5ccd4204ef595885cad8dde1822\",\"funcType\":\"\",\"filterFields\":[],\"dataType\":\"classification\",\"conditionType\":\"and\"}]");
|
||||
params.put("pageFilter","[{\"dataset\":{\"id\":\"30\",\"text\":\"合同收款表\",\"type\":\"LOGIC\",\"groupId\":\"weaver-ebuilder-contract-servicecmdatauFJXHS\",\"isPhysical\":false}}]");
|
||||
params.put("cusMenuId","838181366272991264");
|
||||
params.put("urlPageTitle","5ZCI5ZCM6Zeo5oi3");
|
||||
|
||||
OkHttpClient client = new OkHttpClient().newBuilder().build();
|
||||
MediaType mediaType = MediaType.parse("application/json");
|
||||
RequestBody body = RequestBody.create(mediaType, params.toJSONString());
|
||||
Request requestPost = new Request.Builder()
|
||||
.url("http://10.12.253.23:20600/api/ebuilder/coms/digitalpanel/getData")
|
||||
.method("POST", body)
|
||||
.addHeader("Cookie", headcookie)
|
||||
.addHeader("Content-Type", "application/json")
|
||||
.build();
|
||||
Response response = client.newCall(requestPost).execute();
|
||||
|
||||
int code = response.code();
|
||||
log.error("getSaleInfo yskhtjeObj:"+code);
|
||||
String data = response.body().string();
|
||||
log.error("getSaleInfo yskhtjeObj:"+data);
|
||||
if(StringUtils.isNotBlank(data)){
|
||||
yskhtjeObj = JSONObject.parseObject(data);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
log.error("getSaleInfo yskhtjeObj:"+e);
|
||||
}
|
||||
map.put("yskhtjeObj",yskhtjeObj);
|
||||
|
||||
|
||||
map.put("yxht","0");
|
||||
map.put("xkh","0");;
|
||||
map.put("lkh","0");
|
||||
map.put("yskhtje","0");
|
||||
return map;
|
||||
}
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,152 @@
|
||||
package com.weaver.seconddev.jcldoor.domain;
|
||||
|
||||
public class JucailinUserInfo {
|
||||
|
||||
protected Long userid;
|
||||
protected Long lastname;
|
||||
protected Long userinfourl;
|
||||
protected Long userimageurl;
|
||||
|
||||
protected Long jobtitlename;
|
||||
|
||||
protected Long doccreate;
|
||||
protected Long doccreateurl;
|
||||
protected Long wfcreate;
|
||||
protected Long wfcreateurl;
|
||||
protected Long wfdeal;
|
||||
protected Long wfdealurl;
|
||||
|
||||
protected Long rzts;
|
||||
protected Long rznf;
|
||||
protected Long rzsyts;
|
||||
protected Long cyqlsl;
|
||||
protected Long mtgtrs;
|
||||
|
||||
public Long getUserid() {
|
||||
return userid;
|
||||
}
|
||||
|
||||
public void setUserid(Long userid) {
|
||||
this.userid = userid;
|
||||
}
|
||||
|
||||
public Long getLastname() {
|
||||
return lastname;
|
||||
}
|
||||
|
||||
public void setLastname(Long lastname) {
|
||||
this.lastname = lastname;
|
||||
}
|
||||
|
||||
public Long getUserinfourl() {
|
||||
return userinfourl;
|
||||
}
|
||||
|
||||
public void setUserinfourl(Long userinfourl) {
|
||||
this.userinfourl = userinfourl;
|
||||
}
|
||||
|
||||
public Long getUserimageurl() {
|
||||
return userimageurl;
|
||||
}
|
||||
|
||||
public void setUserimageurl(Long userimageurl) {
|
||||
this.userimageurl = userimageurl;
|
||||
}
|
||||
|
||||
public Long getJobtitlename() {
|
||||
return jobtitlename;
|
||||
}
|
||||
|
||||
public void setJobtitlename(Long jobtitlename) {
|
||||
this.jobtitlename = jobtitlename;
|
||||
}
|
||||
|
||||
public Long getDoccreate() {
|
||||
return doccreate;
|
||||
}
|
||||
|
||||
public void setDoccreate(Long doccreate) {
|
||||
this.doccreate = doccreate;
|
||||
}
|
||||
|
||||
public Long getDoccreateurl() {
|
||||
return doccreateurl;
|
||||
}
|
||||
|
||||
public void setDoccreateurl(Long doccreateurl) {
|
||||
this.doccreateurl = doccreateurl;
|
||||
}
|
||||
|
||||
public Long getWfcreate() {
|
||||
return wfcreate;
|
||||
}
|
||||
|
||||
public void setWfcreate(Long wfcreate) {
|
||||
this.wfcreate = wfcreate;
|
||||
}
|
||||
|
||||
public Long getWfcreateurl() {
|
||||
return wfcreateurl;
|
||||
}
|
||||
|
||||
public void setWfcreateurl(Long wfcreateurl) {
|
||||
this.wfcreateurl = wfcreateurl;
|
||||
}
|
||||
|
||||
public Long getWfdeal() {
|
||||
return wfdeal;
|
||||
}
|
||||
|
||||
public void setWfdeal(Long wfdeal) {
|
||||
this.wfdeal = wfdeal;
|
||||
}
|
||||
|
||||
public Long getWfdealurl() {
|
||||
return wfdealurl;
|
||||
}
|
||||
|
||||
public void setWfdealurl(Long wfdealurl) {
|
||||
this.wfdealurl = wfdealurl;
|
||||
}
|
||||
|
||||
public Long getRzts() {
|
||||
return rzts;
|
||||
}
|
||||
|
||||
public void setRzts(Long rzts) {
|
||||
this.rzts = rzts;
|
||||
}
|
||||
|
||||
public Long getRznf() {
|
||||
return rznf;
|
||||
}
|
||||
|
||||
public void setRznf(Long rznf) {
|
||||
this.rznf = rznf;
|
||||
}
|
||||
|
||||
public Long getRzsyts() {
|
||||
return rzsyts;
|
||||
}
|
||||
|
||||
public void setRzsyts(Long rzsyts) {
|
||||
this.rzsyts = rzsyts;
|
||||
}
|
||||
|
||||
public Long getCyqlsl() {
|
||||
return cyqlsl;
|
||||
}
|
||||
|
||||
public void setCyqlsl(Long cyqlsl) {
|
||||
this.cyqlsl = cyqlsl;
|
||||
}
|
||||
|
||||
public Long getMtgtrs() {
|
||||
return mtgtrs;
|
||||
}
|
||||
|
||||
public void setMtgtrs(Long mtgtrs) {
|
||||
this.mtgtrs = mtgtrs;
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package com.weaver.seconddev.jcldoor.service;
|
||||
|
||||
import com.weaver.common.base.entity.result.WeaResult;
|
||||
import com.weaver.teams.domain.user.SimpleEmployee;
|
||||
import com.weaver.workflow.common.entity.list.api.publicapi.RequestListInfoPAEntity;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface JucailinPortalService {
|
||||
|
||||
public Map<String, Object> getPortalUserData(SimpleEmployee simpleEmployee);
|
||||
|
||||
public Map<String, Object> getPortalAttendanceData(SimpleEmployee simpleEmployee);
|
||||
|
||||
public Map<String, Object> getPortalPerformanceData(SimpleEmployee simpleEmployee);
|
||||
|
||||
public Map<String, Object> getPortalWorkAchievement(HttpServletRequest request,SimpleEmployee simpleEmployee);
|
||||
|
||||
public Map<String, Object> getPortalBirthdayWishes(HttpServletRequest request,SimpleEmployee simpleEmployee);
|
||||
|
||||
public Map<String, Object> getPortalRiskInfo(HttpServletRequest request,SimpleEmployee simpleEmployee);
|
||||
|
||||
public Map<String, Object> getPortalPerformanceInfo(HttpServletRequest request,SimpleEmployee simpleEmployee);
|
||||
|
||||
}
|
Loading…
Reference in New Issue