Commit a19d1bd5 authored by 王启林's avatar 王启林
parents 9c8b210b d62a02f4
...@@ -226,7 +226,9 @@ export default { ...@@ -226,7 +226,9 @@ export default {
type: this.activeName, type: this.activeName,
page: this.query.page, page: this.query.page,
orderColList: this.typeArr, orderColList: this.typeArr,
name: `%${this.searchValue}%`, andConditionList: [
{ content: `%${this.searchValue}%`, name: `%${this.searchValue}%` },
],
}).then((res) => { }).then((res) => {
if (res.code == 1) { if (res.code == 1) {
this.tableData = res.data; this.tableData = res.data;
......
...@@ -92,7 +92,7 @@ export default { ...@@ -92,7 +92,7 @@ export default {
{ label: "姓名", prop: "staffName" }, { label: "姓名", prop: "staffName" },
{ label: "工号", prop: "workNum" }, { label: "工号", prop: "workNum" },
{ label: "手机号", prop: "phoneNumber" }, { label: "手机号", prop: "phoneNumber" },
{ label: "所属部门", prop: "deptName" }, { label: "所属部门", prop: "deptName" },
...@@ -103,15 +103,16 @@ export default { ...@@ -103,15 +103,16 @@ export default {
}, },
}, },
{ label: "考勤绩效", prop: "attendScore", formatter: this.formatter }, { label: "考勤绩效指标分数", prop: "attendScore", formatter: this.formatter },
{ label: "评价绩效", prop: "assessScore", formatter: this.formatter }, { label: "评价绩效指标分数", prop: "reviewScore", formatter: this.formatter },
{ label: "投诉绩效指标分数", prop: "reviewScore", formatter: this.formatter },
{ label: "办件绩效", prop: "workScore", formatter: this.formatter }, { label: "办件绩效分数", prop: "workScore", formatter: this.formatter },
{ label: "效能绩效", prop: "effectScore", formatter: this.formatter }, { label: "效能绩效分数", prop: "effectScore", formatter: this.formatter },
{ label: "其它绩效", prop: "otherScore", formatter: this.formatter }, { label: "其它绩效分数", prop: "otherScore", formatter: this.formatter },
{ {
label: "累计异常分数", label: "累计异常分数",
......
package com.mortals.xhx.daemon.task; package com.mortals.xhx.daemon.task;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.PageUtil; import cn.hutool.core.util.PageUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
...@@ -66,7 +67,10 @@ public class SyncDoorsEventTaskImpl implements ITaskExcuteService { ...@@ -66,7 +67,10 @@ public class SyncDoorsEventTaskImpl implements ITaskExcuteService {
userEntity.setCreateTime(new Date()); userEntity.setCreateTime(new Date());
context.setUser(userEntity); context.setUser(userEntity);
AttendanceRecordHikQuery recordHikEntity = new AttendanceRecordHikQuery(); AttendanceRecordHikQuery recordHikEntity = new AttendanceRecordHikQuery();
recordHikEntity.setAttendanceDateStart(DateUtils.getCurrStrDate());
// Date todayStart = DateUtil.offsetHour(new Date(), -5).toJdkDate();
// recordHikEntity.setAttendanceDateStart(DateUtils.getCurrStrDate());
recordHikEntity.setAttendanceDateStart(DateUtil.offsetHour(new Date(), -5).toString());
recordHikEntity.setAttendanceDateEnd(DateUtils.getCurrStrDate()); recordHikEntity.setAttendanceDateEnd(DateUtils.getCurrStrDate());
try { try {
recordHikService.addAttendanceRecord(recordHikEntity, context); recordHikService.addAttendanceRecord(recordHikEntity, context);
...@@ -87,7 +91,8 @@ public class SyncDoorsEventTaskImpl implements ITaskExcuteService { ...@@ -87,7 +91,8 @@ public class SyncDoorsEventTaskImpl implements ITaskExcuteService {
eventTypes.add(196891); eventTypes.add(196891);
doorEventReq.setEventTypes(eventTypes); doorEventReq.setEventTypes(eventTypes);
// 获取当天的开始时间 // 获取当天的开始时间
Date todayStart = DateUtil.beginOfDay(new Date()); Date todayStart = DateUtil.offsetHour(new Date(), -5).toJdkDate();
// Date todayStart = DateUtil.beginOfDay(new Date());
// 获取当天的结束时间 // 获取当天的结束时间
Date todayEnd = DateUtil.endOfDay(new Date()); Date todayEnd = DateUtil.endOfDay(new Date());
doorEventReq.setStartTime(todayStart); doorEventReq.setStartTime(todayStart);
......
...@@ -74,7 +74,7 @@ public class SyncUserTaskImpl implements ITaskExcuteService { ...@@ -74,7 +74,7 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
for (PersonInfo personInfo : personInfoList) { for (PersonInfo personInfo : personInfoList) {
StaffEntity staffEntity = staffService.getExtCache(StrUtil.padPre(personInfo.getJobNo(), 8, "0")); StaffEntity staffEntity = staffService.getExtCache(StrUtil.padPre(personInfo.getJobNo(), 8, "0"));
DeptEntity deptEntity = deptService.selectOne(new DeptQuery().deptCode(personInfo.getOrgIndexCode())); DeptEntity deptEntity = deptService.selectOne(new DeptQuery().deptCode(personInfo.getOrgIndexCode()));
// AttendanceVacationBalanceEntity balanceEntity = balanceService.selectOne(new AttendanceVacationBalanceQuery().staffId(staffEntity.getId())); // AttendanceVacationBalanceEntity balanceEntity = balanceService.selectOne(new AttendanceVacationBalanceQuery().staffId(staffEntity.getId()));
// AttendanceStatEntity statEntity = attendanceStatService.selectOne(new AttendanceStatQuery().staffId(staffEntity.getId())); // AttendanceStatEntity statEntity = attendanceStatService.selectOne(new AttendanceStatQuery().staffId(staffEntity.getId()));
//判断本地数据是否为空 //判断本地数据是否为空
if (ObjectUtils.isEmpty(staffEntity)) { if (ObjectUtils.isEmpty(staffEntity)) {
...@@ -106,7 +106,7 @@ public class SyncUserTaskImpl implements ITaskExcuteService { ...@@ -106,7 +106,7 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
balanceEntity.setCreateUserId(1L); balanceEntity.setCreateUserId(1L);
balanceEntity.setCreateTime(new Date()); balanceEntity.setCreateTime(new Date());
balanceService.save(balanceEntity); balanceService.save(balanceEntity);
//AttendanceVacationBalanceEntity balanceEntity = balanceService.selectOne(new AttendanceVacationBalanceQuery().staffId(staffEntity.getId())); //AttendanceVacationBalanceEntity balanceEntity = balanceService.selectOne(new AttendanceVacationBalanceQuery().staffId(staffEntity.getId()));
AttendanceStatEntity attendanceStatEntity = new AttendanceStatEntity(); AttendanceStatEntity attendanceStatEntity = new AttendanceStatEntity();
attendanceStatEntity.initAttrValue(); attendanceStatEntity.initAttrValue();
...@@ -140,13 +140,18 @@ public class SyncUserTaskImpl implements ITaskExcuteService { ...@@ -140,13 +140,18 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
attendanceStatEntity.setPersonalLeave(balanceEntity.getPersonalLeaveDays()); attendanceStatEntity.setPersonalLeave(balanceEntity.getPersonalLeaveDays());
attendanceStatService.save(attendanceStatEntity); attendanceStatService.save(attendanceStatEntity);
//统计各级部门员工数量 todo 优化统计 //统计各级部门员工数量 todo 优化统计
String ancestor = deptEntity.getAncestors().split(",", 2)[1]; if (!ObjectUtils.isEmpty(deptEntity.getAncestors())) {
String[] ancestors = ancestor.split(","); String[] split = deptEntity.getAncestors().split(",", 2);
for (String newAncestor : ancestors) { if (split.length > 1) {
DeptEntity deptEntity2 = deptService.get(Long.valueOf(newAncestor)); String ancestor = split[1];
if (Objects.nonNull(deptEntity2)) { String[] ancestors = ancestor.split(",");
deptEntity2.setPersonNum(deptEntity2.getPersonNum() + 1); for (String newAncestor : ancestors) {
deptService.update(deptEntity2); DeptEntity deptEntity2 = deptService.get(Long.valueOf(newAncestor));
if (Objects.nonNull(deptEntity2)) {
deptEntity2.setPersonNum(deptEntity2.getPersonNum() + 1);
deptService.update(deptEntity2);
}
}
} }
} }
} else { } else {
...@@ -166,13 +171,18 @@ public class SyncUserTaskImpl implements ITaskExcuteService { ...@@ -166,13 +171,18 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
staffEntity.setUpdateTime(new Date()); staffEntity.setUpdateTime(new Date());
staffService.update(staffEntity); staffService.update(staffEntity);
//统计各级部门员工数量 //统计各级部门员工数量
String ancestor = deptEntity.getAncestors().split(",", 2)[1]; if (!ObjectUtils.isEmpty(deptEntity.getAncestors())) {
String[] ancestors = ancestor.split(","); String[] split = deptEntity.getAncestors().split(",", 2);
for (String newAncestor : ancestors) { if(split.length>1){
DeptEntity deptEntity2 = deptService.get(Long.valueOf(newAncestor)); String ancestor = split[1];
if (Objects.nonNull(deptEntity2)) { String[] ancestors = ancestor.split(",");
deptEntity2.setPersonNum(deptEntity2.getPersonNum() + 1); for (String newAncestor : ancestors) {
deptService.update(deptEntity2); DeptEntity deptEntity2 = deptService.get(Long.valueOf(newAncestor));
if (Objects.nonNull(deptEntity2)) {
deptEntity2.setPersonNum(deptEntity2.getPersonNum() + 1);
deptService.update(deptEntity2);
}
}
} }
} }
} }
...@@ -220,6 +230,7 @@ public class SyncUserTaskImpl implements ITaskExcuteService { ...@@ -220,6 +230,7 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
} }
} }
} }
@Override @Override
public void stopTask(ITask task) throws AppException { public void stopTask(ITask task) throws AppException {
......
...@@ -22,6 +22,8 @@ import org.apache.poi.ss.formula.functions.T; ...@@ -22,6 +22,8 @@ import org.apache.poi.ss.formula.functions.T;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import java.util.HashMap;
@Service("dingPersonService") @Service("dingPersonService")
@Slf4j @Slf4j
...@@ -120,7 +122,7 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID ...@@ -120,7 +122,7 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
com.aliyun.teaopenapi.models.Config config = new com.aliyun.teaopenapi.models.Config(); com.aliyun.teaopenapi.models.Config config = new com.aliyun.teaopenapi.models.Config();
config.protocol = "https"; config.protocol = "https";
config.regionId = "central"; config.regionId = "central";
config.endpoint = domain.replace("http://",""); // config.endpoint = domain.replace("http://", "");
return new com.aliyun.dingtalkworkflow_1_0.Client(config); return new com.aliyun.dingtalkworkflow_1_0.Client(config);
} }
...@@ -130,20 +132,19 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID ...@@ -130,20 +132,19 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
com.aliyun.dingtalkworkflow_1_0.Client client = createClient(); com.aliyun.dingtalkworkflow_1_0.Client client = createClient();
com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceHeaders getProcessInstanceHeaders = new com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceHeaders(); com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceHeaders getProcessInstanceHeaders = new com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceHeaders();
getProcessInstanceHeaders.xAcsDingtalkAccessToken = getToken(); getProcessInstanceHeaders.xAcsDingtalkAccessToken = getToken();
/* HashMap<String, String> map = new HashMap<>();
getProcessInstanceHeaders.getCommonHeaders().put("host","172.15.28.113"); getProcessInstanceHeaders.setCommonHeaders(map);
getProcessInstanceHeaders.getCommonHeaders().put("port","8918"); getProcessInstanceHeaders.getCommonHeaders().put("host", "172.15.28.113");
getProcessInstanceHeaders.getCommonHeaders().put("protocol","http"); getProcessInstanceHeaders.getCommonHeaders().put("port", "8918");
getProcessInstanceHeaders.getCommonHeaders().put("protocol", "http");*/
com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceRequest getProcessInstanceRequest = new com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceRequest() com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceRequest getProcessInstanceRequest = new com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceRequest()
.setProcessInstanceId(processInstanceId); .setProcessInstanceId(processInstanceId);
log.info("processInstanceId:{}", processInstanceId);
GetProcessInstanceResponse rsp = client.getProcessInstanceWithOptions(getProcessInstanceRequest, getProcessInstanceHeaders, new com.aliyun.teautil.models.RuntimeOptions()); GetProcessInstanceResponse rsp = client.getProcessInstanceWithOptions(getProcessInstanceRequest, getProcessInstanceHeaders, new com.aliyun.teautil.models.RuntimeOptions());
return Rest.ok("成功", rsp.getBody().getResult()); return Rest.ok("成功", rsp.getBody().getResult());
} catch (Exception e) { } catch (Exception e) {
log.info("根据用户查询审批详情失败", e); log.error("根据用户查询审批详情失败", e);
return Rest.fail(e.getMessage()); return Rest.fail(e.getMessage());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment