|
|
|
@ -71,11 +71,12 @@ public class UserInfoCmd {
|
|
|
|
|
|
|
|
|
|
Map<String, Object> map = new HashMap<>(100);
|
|
|
|
|
Long employeeId = simpleEmployee.getEmployeeId();
|
|
|
|
|
String username = String.valueOf(simpleEmployee.getName());
|
|
|
|
|
String username = simpleEmployee.getName();
|
|
|
|
|
|
|
|
|
|
String userimageurl = "/profile/" + employeeId + "/personal";
|
|
|
|
|
String department = "";
|
|
|
|
|
String position = "";
|
|
|
|
|
String department = simpleEmployee.getDepartment().getName();
|
|
|
|
|
String position = simpleEmployee.getPosition().getName();
|
|
|
|
|
|
|
|
|
|
String days = "";
|
|
|
|
|
String doccreate = "0";
|
|
|
|
|
String wfcreate = "0";
|
|
|
|
@ -83,53 +84,48 @@ public class UserInfoCmd {
|
|
|
|
|
String cyqlsl = "0";
|
|
|
|
|
String mtgtrs = "0";
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
Map<String, Object> recordMap = new HashMap<String, Object>();
|
|
|
|
|
|
|
|
|
|
try{
|
|
|
|
|
if (StringUtils.isNotBlank(employeeId+"")) {
|
|
|
|
|
String dataSql =" select " +
|
|
|
|
|
" a.id, " +
|
|
|
|
|
" a.username, " +
|
|
|
|
|
" a.hiredate, " +
|
|
|
|
|
" b.name as department, " +
|
|
|
|
|
" c.name as position " +
|
|
|
|
|
" from " +
|
|
|
|
|
" eteams.employee a " +
|
|
|
|
|
" left join eteams.department b on a.department = b.id " +
|
|
|
|
|
" left join eteams.position c on c.id = a.position " +
|
|
|
|
|
" where " +
|
|
|
|
|
" a.id = ? " +
|
|
|
|
|
" and a.tenant_key = ? " +
|
|
|
|
|
" and a.status = 'normal' " +
|
|
|
|
|
" and a.type = 'inside'";
|
|
|
|
|
|
|
|
|
|
log.error("getuserIfo--dataSql:" + dataSql);
|
|
|
|
|
String dataSql =" select a.hiredate " +
|
|
|
|
|
" from eteams.employee a " +
|
|
|
|
|
" where a.id = ? " +
|
|
|
|
|
" and a.tenant_key = ? " +
|
|
|
|
|
" and a.status = 'normal' " +
|
|
|
|
|
" and a.type = 'inside'";
|
|
|
|
|
|
|
|
|
|
log.error("getuserIfo--dataSql:" + dataSql);
|
|
|
|
|
List<String> strlist = new ArrayList<>(100);
|
|
|
|
|
strlist.add(employeeId+"");
|
|
|
|
|
strlist.add(employeeId + "");
|
|
|
|
|
strlist.add(tenant_key);
|
|
|
|
|
List<SqlParamEntity> sqlparam = databaseUtils.getSqlParamEntity(strlist);
|
|
|
|
|
Map<String, Object> result = databaseUtils.executeForQuery(sourceType, groupId, dataSql, sqlparam);
|
|
|
|
|
List<Map<String, Object>> recordList = databaseUtils.getDataSourceList(result);
|
|
|
|
|
if (CollectionUtils.isNotEmpty(recordList)) {
|
|
|
|
|
recordMap = recordList.get(0);
|
|
|
|
|
Map<String, Object> recordMap = recordList.get(0);
|
|
|
|
|
|
|
|
|
|
String hiredate = CommonUtils.null2String(recordMap.get("hiredate"));
|
|
|
|
|
if (StringUtils.isNotBlank(hiredate)) {
|
|
|
|
|
try {
|
|
|
|
|
days = calculateMinute2(hiredate);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
log.error("calculateMinute2-e:" + e);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isBlank(days)) {
|
|
|
|
|
days = String.valueOf(calculateMinute(hiredate));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}catch (Exception e){
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
log.error("getUserInfo--hiredate:" + e);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
username = CommonUtils.null2String(recordMap.get("username"));
|
|
|
|
|
department = CommonUtils.null2String(recordMap.get("department"));
|
|
|
|
|
position = CommonUtils.null2String(recordMap.get("position"));
|
|
|
|
|
String hiredate = CommonUtils.null2String(recordMap.get("hiredate"));
|
|
|
|
|
if (StringUtils.isNotBlank(hiredate)) {
|
|
|
|
|
try {
|
|
|
|
|
days = calculateMinute2(hiredate);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
log.error("calculateMinute2-e:" + e);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isBlank(days)) {
|
|
|
|
|
days = String.valueOf(calculateMinute(hiredate));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
if (StringUtils.isNotBlank(employeeId+"")) {
|
|
|
|
|
//文档创建
|
|
|
|
|
doccreate = getDocCreateNum(employeeId);
|
|
|
|
|
//流程创建
|
|
|
|
@ -143,7 +139,8 @@ public class UserInfoCmd {
|
|
|
|
|
mtgtrs = getPjMtgtcsNew(employeeId);
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
log.error("getUserInfo--Exception:" + e.getMessage());
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
log.error("getUserInfo--Exception:" + e);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
map.put("userid", employeeId+"");
|
|
|
|
|