Commit 1b5509dc authored by 姬鋆屾's avatar 姬鋆屾
parents 2e5b98ec 2958e1ef
......@@ -192,7 +192,7 @@
<el-form ref="form" :model="deptForm" label-width="100px">
<el-form-item label="请选择部门">
<el-select
v-model="deptForm.dept"
v-model="deptForm.deptId"
placeholder="请选择部门"
style="width: 100%"
clearable
......@@ -336,7 +336,7 @@
<div class="title">个人绩效总分排名TOP10</div>
<dv-scroll-ranking-board
:config="personConfig"
style="width: 100%; height:200px"
style="width: 100%; height: 200px"
/>
</div>
<div class="right_mid">
......@@ -457,7 +457,7 @@ export default {
reportType: 1, // 生成报告类型
// 部门报告表单
deptForm: {
dept: "",
deptId: "",
resource: 1,
year: "",
month: "",
......@@ -738,7 +738,7 @@ export default {
areaStyle: { color: "#56A3F1" }, //雷达覆盖区域背景颜色
label: {
show: false,
formatter: function(params) {
formatter: function (params) {
return params.value;
},
},
......@@ -993,7 +993,7 @@ export default {
itemStyle: {
normal: {
// 定制显示(按顺序)
color: function(params) {
color: function (params) {
return colorList[params.dataIndex];
},
},
......@@ -1074,11 +1074,26 @@ export default {
delete this.deptForm.year;
delete this.deptForm.month;
}
this.dataSection(this.getDeptPerformList, this.deptForm, (data) => {
if (!data.length) return;
// this.dataSection(this.getDeptPerformList, this.deptForm, (data) => {
// if (!data.length) {
// this.$message.warning("暂无该评估");
// return;
// }
// exportExcel(
// this.deptExcelHeader,
// this.deptFilterVal,
// data,
// "部门评估报告" + this.$moment().format("YYYYMMDDHHmmss")
// );
// });
this.dataSection(this.getPersonPerformList, this.deptForm, (data) => {
if (!data.length) {
this.$message.warning("暂无该评估");
return;
}
exportExcel(
this.deptExcelHeader,
this.deptFilterVal,
this.personExcelHeader,
this.personFilterVal,
data,
"部门评估报告" + this.$moment().format("YYYYMMDDHHmmss")
);
......@@ -1097,7 +1112,10 @@ export default {
delete this.personForm.month;
}
this.dataSection(this.getPersonPerformList, this.personForm, (data) => {
if (!data.length) return;
if (!data.length) {
this.$message.warning("暂无该评估");
return;
}
exportExcel(
this.personExcelHeader,
this.personFilterVal,
......@@ -1107,25 +1125,25 @@ export default {
});
},
// 获取部门报告列表
async getDeptPerformList(page, size, searchForm) {
let list = [];
let listTotal = 0;
await this.$post("/dept/perform/stat/list", {
page: page || 1,
size: size || 100,
...searchForm,
}).then((res) => {
if (res.code == 1) {
let { data, total } = res.data;
list = data;
listTotal = total;
}
});
return {
data: list,
total: listTotal,
};
},
// async getDeptPerformList(page, size, searchForm) {
// let list = [];
// let listTotal = 0;
// await this.$post("/dept/perform/stat/list", {
// page: page || 1,
// size: size || 100,
// ...searchForm,
// }).then((res) => {
// if (res.code == 1) {
// let { data, total } = res.data;
// list = data;
// listTotal = total;
// }
// });
// return {
// data: list,
// total: listTotal,
// };
// },
// 获取个人报告列表
async getPersonPerformList(page, size, searchForm) {
let list = [];
......
......@@ -2,6 +2,8 @@ package com.mortals.xhx.module.attendance.web;
import com.mortals.framework.model.Context;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.AppealResultEnum;
import com.mortals.xhx.common.code.ProcessStatusEnum;
import com.mortals.xhx.module.attendance.model.AttendanceLeaveRecordEntity;
import com.mortals.xhx.module.attendance.service.AttendanceLeaveRecordService;
import com.mortals.xhx.module.dept.model.DeptQuery;
......@@ -42,6 +44,11 @@ public class AttendanceLeaveRecordController extends BaseCRUDJsonBodyMappingCont
this.addDict(model, "deptId", deptService.find(new DeptQuery()).stream().collect(Collectors.toMap(x->x.getId().toString(), y->y.getDeptName(),(o, n)->n)));
this.addDict(model, "approverId", workmanService.find(new WorkmanQuery()).stream().collect(Collectors.toMap(x->x.getId().toString(), y->y.getName(),(o, n)->n)));
this.addDict(model, "leaveType", paramService.getParamBySecondOrganize("AttendanceLeaveRecord","leaveType"));
this.addDict(model, "auditResult", AppealResultEnum.getEnumMap());
this.addDict(model, "processStatus", ProcessStatusEnum.getEnumMap());
super.init(model, context);
}
......
package com.mortals.xhx.module.dingding.personal.service;
import com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceResponseBody;
import com.mortals.framework.common.Rest;
import com.mortals.xhx.module.dingding.IDingTalkService;
import com.mortals.xhx.module.dingding.personal.model.req.workmsg.WorkMsgReq;
......@@ -8,6 +9,7 @@ import com.mortals.xhx.module.hik.person.model.req.org.OrgListReq;
import com.mortals.xhx.module.hik.person.model.req.person.PersonReq;
import com.mortals.xhx.module.hik.person.model.rsp.org.OrgDataInfo;
import com.mortals.xhx.module.hik.person.model.rsp.person.PersonDataInfo;
import org.apache.poi.ss.formula.functions.T;
/**
* 钉钉人事相关服务类
......@@ -46,7 +48,7 @@ public interface IDingPersonService extends IDingTalkService {
* @param processInstanceId 审批实例ID。
* @return
*/
Rest<String> getOaRecordsById(String processInstanceId);
Rest<GetProcessInstanceResponseBody.GetProcessInstanceResponseBodyResult> getOaRecordsById(String processInstanceId);
}
......@@ -2,6 +2,7 @@ package com.mortals.xhx.module.dingding.personal.service.impl;
import com.alibaba.fastjson.JSON;
import com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceResponse;
import com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceResponseBody;
import com.aliyun.tea.TeaException;
import com.dingtalk.api.DingTalkClient;
import com.dingtalk.api.request.OapiMessageCorpconversationAsyncsendV2Request;
......@@ -17,6 +18,7 @@ import com.mortals.xhx.module.dingding.personal.service.IDingPersonService;
import com.taobao.api.ApiException;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.logging.Log;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
......@@ -114,15 +116,16 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
* @return Client
* @throws Exception
*/
public static com.aliyun.dingtalkworkflow_1_0.Client createClient() throws Exception {
public com.aliyun.dingtalkworkflow_1_0.Client createClient() throws Exception {
com.aliyun.teaopenapi.models.Config config = new com.aliyun.teaopenapi.models.Config();
config.protocol = "https";
config.regionId = "central";
config.endpoint = domain;
return new com.aliyun.dingtalkworkflow_1_0.Client(config);
}
@Override
public Rest<String> getOaRecordsById(String processInstanceId) {
public Rest<GetProcessInstanceResponseBody.GetProcessInstanceResponseBodyResult> getOaRecordsById(String processInstanceId) {
try {
com.aliyun.dingtalkworkflow_1_0.Client client = createClient();
com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceHeaders getProcessInstanceHeaders = new com.aliyun.dingtalkworkflow_1_0.models.GetProcessInstanceHeaders();
......@@ -131,8 +134,7 @@ public class DingPersonServiceImpl extends AbstractDingTalkService implements ID
.setProcessInstanceId(processInstanceId);
GetProcessInstanceResponse rsp = client.getProcessInstanceWithOptions(getProcessInstanceRequest, getProcessInstanceHeaders, new com.aliyun.teautil.models.RuntimeOptions());
log.info("根据id查询审批详情:", rsp.getBody().getResult().toString());
return Rest.ok("成功", rsp.getBody().getResult().toString());
return Rest.ok("成功", rsp.getBody().getResult());
} catch (Exception e) {
log.info("根据用户查询审批详情失败", e);
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