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