Commit 49b9aebe authored by 姬鋆屾's avatar 姬鋆屾
parents d28346d0 4e7dd63a
...@@ -48,30 +48,40 @@ ...@@ -48,30 +48,40 @@
<div class="content_top"> <div class="content_top">
<p class="content_text"> <p class="content_text">
<span class="txt">初始扣分</span <span class="txt">初始扣分</span
><span class="txt_num">9856241</span> ><span class="txt_num">{{
yearRecordAll.initScore || "--"
}}</span>
</p> </p>
<p class="content_text"> <p class="content_text">
<span class="txt">核查扣分</span <span class="txt">核查扣分</span
><span class="txt_num">9856241</span> ><span class="txt_num">{{
<span class="txt_small">占比:87.21%</span> yearRecordAll.checkScore || "--"
}}</span>
<span class="txt_small"
>占比:{{ yearRecordAll.checkPercent || "--" }}</span
>
</p> </p>
<p class="content_text"> <p class="content_text">
<span class="txt">申诉分值</span <span class="txt">申诉分值</span
><span class="txt_num">9856241</span> ><span class="txt_num">{{
<span class="txt_small">占比:87.21%</span> yearRecordAll.appealScore || "--"
}}</span>
<span class="txt_small"
>占比:{{ yearRecordAll.appealPercent || "--" }}</span
>
</p> </p>
<p class="content_text"> <p class="content_text">
<span class="txt">累计扣分</span <span class="txt">累计扣分</span
><span class="txt_num">9856241</span> ><span class="txt_num">{{ yearRecordAll.total || "--" }}</span>
</p> </p>
</div> </div>
<div class="content_down"> <div class="content_down">
<div class="down_left"> <div class="down_left">
<div class="num">+65.32%</div> <div class="num">{{ yearRecordAll.huanbi || "暂无环比" }}</div>
<p class="down_text">环比增长率</p> <p class="down_text">环比增长率</p>
</div> </div>
<div class="down_right"> <div class="down_right">
<div class="num">+65.32%</div> <div class="num">{{ yearRecordAll.tongbi || "暂无同比" }}</div>
<p class="down_text">同比增长率</p> <p class="down_text">同比增长率</p>
</div> </div>
</div> </div>
...@@ -83,30 +93,40 @@ ...@@ -83,30 +93,40 @@
<div class="content_top"> <div class="content_top">
<p class="content_text"> <p class="content_text">
<span class="txt">初始扣分</span <span class="txt">初始扣分</span
><span class="txt_num">9856241</span> ><span class="txt_num">{{
monthRecordAll.initScore || "--"
}}</span>
</p> </p>
<p class="content_text"> <p class="content_text">
<span class="txt">核查扣分</span <span class="txt">核查扣分</span
><span class="txt_num">9856241</span> ><span class="txt_num">{{
<span class="txt_small">占比:87.21%</span> monthRecordAll.checkScore || "--"
}}</span>
<span class="txt_small"
>占比:{{ monthRecordAll.checkPercent || "--" }}</span
>
</p> </p>
<p class="content_text"> <p class="content_text">
<span class="txt">申诉分值</span <span class="txt">申诉分值</span
><span class="txt_num">9856241</span> ><span class="txt_num">{{
<span class="txt_small">占比:87.21%</span> monthRecordAll.appealScore || "--"
}}</span>
<span class="txt_small"
>占比:{{ monthRecordAll.appealPercent || "--" }}</span
>
</p> </p>
<p class="content_text"> <p class="content_text">
<span class="txt">累计扣分</span <span class="txt">累计扣分</span
><span class="txt_num">9856241</span> ><span class="txt_num">{{ monthRecordAll.total || "--" }}</span>
</p> </p>
</div> </div>
<div class="content_down"> <div class="content_down">
<div class="down_left"> <div class="down_left">
<div class="num">+65.32%</div> <div class="num">{{ monthRecordAll.huanbi || "暂无环比" }}</div>
<p class="down_text">环比增长率</p> <p class="down_text">环比增长率</p>
</div> </div>
<div class="down_right"> <div class="down_right">
<div class="num">+65.32%</div> <div class="num">{{ monthRecordAll.tongbi || "暂无同比" }}</div>
<p class="down_text">同比增长率</p> <p class="down_text">同比增长率</p>
</div> </div>
</div> </div>
...@@ -118,30 +138,40 @@ ...@@ -118,30 +138,40 @@
<div class="content_top"> <div class="content_top">
<p class="content_text"> <p class="content_text">
<span class="txt">初始扣分</span <span class="txt">初始扣分</span
><span class="txt_num">9856241</span> ><span class="txt_num">{{
dayRecordAll.initScore || "--"
}}</span>
</p> </p>
<p class="content_text"> <p class="content_text">
<span class="txt">核查扣分</span <span class="txt">核查扣分</span
><span class="txt_num">9856241</span> ><span class="txt_num">{{
<span class="txt_small">占比:87.21%</span> dayRecordAll.checkScore || "--"
}}</span>
<span class="txt_small"
>占比:{{ dayRecordAll.checkPercent || "--" }}</span
>
</p> </p>
<p class="content_text"> <p class="content_text">
<span class="txt">申诉分值</span <span class="txt">申诉分值</span
><span class="txt_num">9856241</span> ><span class="txt_num">{{
<span class="txt_small">占比:87.21%</span> dayRecordAll.appealScore || "--"
}}</span>
<span class="txt_small"
>占比:{{ dayRecordAll.appealPercent || "--" }}</span
>
</p> </p>
<p class="content_text"> <p class="content_text">
<span class="txt">累计扣分</span <span class="txt">累计扣分</span
><span class="txt_num">9856241</span> ><span class="txt_num">{{ dayRecordAll.total || "--" }}</span>
</p> </p>
</div> </div>
<div class="content_down"> <div class="content_down">
<div class="down_left"> <div class="down_left">
<div class="num">+65.32%</div> <div class="num">{{ dayRecordAll.huanbi || "暂无环比" }}</div>
<p class="down_text">环比增长率</p> <p class="down_text">环比增长率</p>
</div> </div>
<div class="down_right"> <div class="down_right">
<div class="num">+65.32%</div> <div class="num">{{ dayRecordAll.tongbi || "暂无同比" }}</div>
<p class="down_text">同比增长率</p> <p class="down_text">同比增长率</p>
</div> </div>
</div> </div>
...@@ -152,31 +182,27 @@ ...@@ -152,31 +182,27 @@
<div class="down_content"> <div class="down_content">
<img class="content_title" src="../../../assets/images/title.png" /> <img class="content_title" src="../../../assets/images/title.png" />
<div style="margin: 20px 0"> <div style="margin: 20px 0">
<el-radio-group v-model="type" border> <el-radio-group v-model="form.type" border>
<el-radio-button label="1">部门评估</el-radio-button> <el-radio-button :label="1">部门评估</el-radio-button>
<el-radio-button label="2">个人评估</el-radio-button> <el-radio-button :label="2">个人评估</el-radio-button>
</el-radio-group> </el-radio-group>
</div> </div>
<div class="form"> <div class="form">
<el-form ref="form" :model="form" label-width="100px"> <el-form ref="form" :model="form" label-width="100px">
<el-form-item label="请选择部门:"> <el-form-item label="请选择部门:">
<el-select <el-select
v-model="form.region" v-model="form.dept"
placeholder="请选择部门" placeholder="请选择部门"
style="width: 100%" style="width: 100%"
> >
<el-option label="区域一" value="shanghai"></el-option> <el-option
<el-option label="区域二" value="beijing"></el-option> v-for="v in deptList"
:key="v.id"
:label="v.deptName"
:value="v.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="请选择时间:">
<el-date-picker
type="date"
placeholder="选择日期"
v-model="form.date1"
style="width: 100%"
></el-date-picker>
</el-form-item>
<el-form-item label="请选择类型:" style="text-align: left"> <el-form-item label="请选择类型:" style="text-align: left">
<el-radio-group v-model="form.resource"> <el-radio-group v-model="form.resource">
<el-radio :label="1">按年</el-radio> <el-radio :label="1">按年</el-radio>
...@@ -184,6 +210,36 @@ ...@@ -184,6 +210,36 @@
<el-radio :label="3">按天</el-radio> <el-radio :label="3">按天</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="请选择时间:">
<el-date-picker
v-if="form.resource == 1"
type="year"
value-format="yyyy"
placeholder="选择日期"
v-model="form.year"
style="width: 100%"
></el-date-picker>
<el-date-picker
v-else-if="form.resource == 2"
type="month"
value-format="MM"
placeholder="选择日期"
v-model="form.month"
style="width: 100%"
></el-date-picker>
<el-date-picker
v-else
v-model="form.day"
value-format="yyyy-MM-DD"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 100%"
>
</el-date-picker>
</el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button
type="primary" type="primary"
...@@ -262,39 +318,45 @@ export default { ...@@ -262,39 +318,45 @@ export default {
personageAttTopDate: 2, // 个人绩效排名top搜索 personageAttTopDate: 2, // 个人绩效排名top搜索
appealDate: 2, // 申诉分值分布搜索 appealDate: 2, // 申诉分值分布搜索
form: { form: {
date1: "", type: 1,
type: [], dept: "",
resource: "", resource: 1,
year: "",
month: "",
day: [],
}, },
config: {}, //部门绩效总分top10 config: {}, //部门绩效总分top10
personConfig: {}, //个人绩效总分top10 personConfig: {}, //个人绩效总分top10
// 个人绩效总分排名
staffQuery: {
page: 1,
size: 10,
},
// 部门 // 部门
depQuery: { depQuery: {
page: 1, page: 1,
size: 10, size: -1,
}, },
deptList: [], // 部门列表
leidaEchart: null, // 异常分值分布情况echart实例 leidaEchart: null, // 异常分值分布情况echart实例
rulePie: null, // 绩效规则分布echart实例 rulePie: null, // 绩效规则分布echart实例
shensuPie: null, // 申诉分值分布情况echart实例 shensuPie: null, // 申诉分值分布情况echart实例
recordPie: null, // 反馈记录整体情况echart实例 recordPie: null, // 反馈记录整体情况echart实例
timer: null, timer: null,
yearRecordAll: {}, // 今年分值
monthRecordAll: {}, // 本月分值
dayRecordAll: {}, // 今日分值
}; };
}, },
created() {
this.getDeptList();
this.getYearRecordAll();
this.getMonthRecordAll();
},
mounted() { mounted() {
this.staffStatList(); this.staffStatList();
this.getException(); this.getException();
this.depStatList(); this.depStatList();
this.getAttendanceRules(); this.getAttendanceRules();
this.getFeedback(); this.getFeedback();
this.autoUpdata();
this.getAppealTotal(); this.getAppealTotal();
// 定时器刷新数据
this.autoUpdata();
}, },
methods: { methods: {
...@@ -305,6 +367,40 @@ export default { ...@@ -305,6 +367,40 @@ export default {
this.shensuPie && this.shensuPie.resize(); this.shensuPie && this.shensuPie.resize();
this.recordPie && this.recordPie.resize(); this.recordPie && this.recordPie.resize();
}, },
// 获取部门列表
getDeptList() {
this.$post("/dept/list", this.depQuery).then((res) => {
const { code, data } = res;
if (code == 1) {
this.deptList = data.data;
}
});
},
// 获取今年分值
async getYearRecordAll() {
this.yearRecordAll = await this.getRecordAll(1);
},
// 获取本月分值
async getMonthRecordAll() {
this.monthRecordAll = await this.getRecordAll(2);
},
// 获取今日分值
async getDayRecordAll() {
this.dayRecordAll = await this.getRecordAll(3);
},
// 获取分值情况
async getRecordAll(summaryType) {
let obj = {};
await this.$post("/check/all/record/score/summary", {
summaryType,
}).then((res) => {
const { code, data } = res;
if (code == 1) {
obj = data;
}
});
return obj;
},
// 个人绩效总分排名 // 个人绩效总分排名
staffStatList() { staffStatList() {
this.$post("/staff/perform/stat/summary/top", { this.$post("/staff/perform/stat/summary/top", {
...@@ -332,9 +428,7 @@ export default { ...@@ -332,9 +428,7 @@ export default {
let names = data.map((v) => v.name); let names = data.map((v) => v.name);
let add = data.map((v) => v.add); let add = data.map((v) => v.add);
let sub = data.map((v) => v.sub); let sub = data.map((v) => v.sub);
this.$nextTick(() => { this.drawLeiDa(names, add, sub);
this.drawLeiDa(names, add, sub);
});
} }
}); });
}, },
...@@ -369,9 +463,7 @@ export default { ...@@ -369,9 +463,7 @@ export default {
value: v.score, value: v.score,
}; };
}); });
this.$nextTick(() => { this.drawRulePie(arr, totalScore);
this.drawRulePie(arr, totalScore);
});
} }
}); });
}, },
...@@ -383,9 +475,7 @@ export default { ...@@ -383,9 +475,7 @@ export default {
let { notStart, total, ended, progress } = data; let { notStart, total, ended, progress } = data;
let names = ["未开始", "进行中", "已完结", "全部问卷"]; let names = ["未开始", "进行中", "已完结", "全部问卷"];
let values = [notStart, progress, ended, total]; let values = [notStart, progress, ended, total];
this.$nextTick(() => { this.drawRecordPie(names, values);
this.drawRecordPie(names, values);
});
} }
}); });
}, },
...@@ -394,12 +484,16 @@ export default { ...@@ -394,12 +484,16 @@ export default {
this.$post("/perform/attend/appeal/perform/summary", { this.$post("/perform/attend/appeal/perform/summary", {
summaryType: this.appealDate, summaryType: this.appealDate,
}).then((res) => { }).then((res) => {
const { code, data } = res; if (res.code == 1) {
if (code == 1) { const { dict, data } = res;
console.log(res); let { performType } = dict;
let params = data.data.map((v) => {
// this.$nextTick(() => { return {
// }); name: this.filterDict(v.performType, performType),
value: v.score,
};
});
this.drawCorePie(params);
} }
}); });
}, },
...@@ -574,7 +668,7 @@ export default { ...@@ -574,7 +668,7 @@ export default {
window.addEventListener("resize", this.adapterEcharts); window.addEventListener("resize", this.adapterEcharts);
}, },
// 申诉分值分布情况echarts // 申诉分值分布情况echarts
drawCorePie() { drawCorePie(data = []) {
let chartDom = document.getElementById("shensuPie"); let chartDom = document.getElementById("shensuPie");
// 避免刷新数据时重新初始化图表 // 避免刷新数据时重新初始化图表
this.shensuPie = this.$echarts.getInstanceByDom(chartDom); this.shensuPie = this.$echarts.getInstanceByDom(chartDom);
...@@ -617,15 +711,15 @@ export default { ...@@ -617,15 +711,15 @@ export default {
}, },
formatter: (name) => { formatter: (name) => {
// formatter格式化函数动态呈现数据 // formatter格式化函数动态呈现数据
var total = 0; // 用于计算总数 let total = 0; // 用于计算总数
var target; // 遍历拿到数据 let target; // 遍历拿到数据
for (var i = 0; i < this.cricleData.length; i++) { for (let i = 0; i < data.length; i++) {
total += this.cricleData[i].value; total += data[i].value;
if (this.cricleData[i].name == name) { if (data[i].name == name) {
target = this.cricleData[i].value; target = data[i].value;
} }
} }
var v = ((target / total) * 100).toFixed(2); // let v = ((target / total) * 100).toFixed(2);
return `{oneone|${name}}`; return `{oneone|${name}}`;
// 富文本第一列样式应用 富文本第二列样式应用 富文本第三列样式应用 // 富文本第一列样式应用 富文本第二列样式应用 富文本第三列样式应用
}, },
...@@ -667,7 +761,7 @@ export default { ...@@ -667,7 +761,7 @@ export default {
labelLine: { labelLine: {
show: true, show: true,
}, },
data: this.cricleData, data,
}, },
], ],
}); });
...@@ -759,10 +853,14 @@ export default { ...@@ -759,10 +853,14 @@ export default {
break; break;
case "appealDate": case "appealDate":
this.appealDate = date; this.appealDate = date;
this.getAppealTotal();
break; break;
} }
}, },
// 创建报告
onSubmit() {
console.log(this.form);
},
// 获取年 // 获取年
getYear() { getYear() {
return new Date().getFullYear(); return new Date().getFullYear();
...@@ -775,6 +873,16 @@ export default { ...@@ -775,6 +873,16 @@ export default {
getDay() { getDay() {
return new Date().getDate(); return new Date().getDate();
}, },
// 过滤字典
filterDict(key, dict = {}) {
let str = "";
Object.keys(dict).forEach((keys) => {
if (key == keys) {
str = dict[keys];
}
});
return str;
},
// 1分值自动刷新数据 // 1分值自动刷新数据
autoUpdata() { autoUpdata() {
this.timer = setInterval(() => { this.timer = setInterval(() => {
...@@ -783,6 +891,7 @@ export default { ...@@ -783,6 +891,7 @@ export default {
this.depStatList(); this.depStatList();
this.getAttendanceRules(); this.getAttendanceRules();
this.getFeedback(); this.getFeedback();
this.getAppealTotal();
}, 1000 * 60); }, 1000 * 60);
}, },
}, },
......
...@@ -152,6 +152,10 @@ public class TestController { ...@@ -152,6 +152,10 @@ public class TestController {
} }
} }
} }
if(!ObjectUtils.isEmpty(updateList)){
staffService.update(updateList);
}
return "更新数量:" + updateList.size(); return "更新数量:" + updateList.size();
} }
......
...@@ -82,9 +82,9 @@ public class AppealApiController extends AbstractBaseController<PerformReq> { ...@@ -82,9 +82,9 @@ public class AppealApiController extends AbstractBaseController<PerformReq> {
try { try {
//todo 查询当前登录人的绩效分数 //todo 查询当前登录人的绩效分数
AppealStatInfo appealStatInfo = new AppealStatInfo(); AppealStatInfo appealStatInfo = new AppealStatInfo();
appealStatInfo.setTotalScore(new BigDecimal("10.52")); appealStatInfo.setTotalScore(new BigDecimal("10.52").setScale(1,BigDecimal.ROUND_HALF_UP));
appealStatInfo.setTotalTimes(12); appealStatInfo.setTotalTimes(12);
appealStatInfo.setTodayScore(new BigDecimal("2.5")); appealStatInfo.setTodayScore(new BigDecimal("2.5").setScale(1,BigDecimal.ROUND_HALF_UP));
appealStatInfo.setTodayTimes(3); appealStatInfo.setTodayTimes(3);
rest.setData(appealStatInfo); rest.setData(appealStatInfo);
recordSysLog(request, busiDesc + " 【成功】"); recordSysLog(request, busiDesc + " 【成功】");
...@@ -114,7 +114,7 @@ public class AppealApiController extends AbstractBaseController<PerformReq> { ...@@ -114,7 +114,7 @@ public class AppealApiController extends AbstractBaseController<PerformReq> {
//未设置时间的情况,默认为当月 //未设置时间的情况,默认为当月
appealReq.setApperalStartDate(DateUtil.beginOfMonth(new Date()).toDateStr()); appealReq.setApperalStartDate(DateUtil.beginOfMonth(new Date()).toDateStr());
appealReq.setAppealEndDate(DateUtil.today()); appealReq.setAppealEndDate(DateUtil.today());
}else{ } else {
//格式化到指定日期的当月 //格式化到指定日期的当月
appealReq.setApperalStartDate(DateUtil.beginOfMonth(DateUtil.parse(appealReq.getApperalStartDate()).toJdkDate()).toDateStr()); appealReq.setApperalStartDate(DateUtil.beginOfMonth(DateUtil.parse(appealReq.getApperalStartDate()).toJdkDate()).toDateStr());
appealReq.setAppealEndDate(DateUtil.endOfMonth(DateUtil.parse(appealReq.getApperalStartDate()).toJdkDate()).toDateStr()); appealReq.setAppealEndDate(DateUtil.endOfMonth(DateUtil.parse(appealReq.getApperalStartDate()).toJdkDate()).toDateStr());
...@@ -224,6 +224,7 @@ public class AppealApiController extends AbstractBaseController<PerformReq> { ...@@ -224,6 +224,7 @@ public class AppealApiController extends AbstractBaseController<PerformReq> {
entity.setStaffId(context.getUser().getCustomerId()); entity.setStaffId(context.getUser().getCustomerId());
entity.setCreateUserId(context.getUser().getId()); entity.setCreateUserId(context.getUser().getId());
entity.setCheckRecordId(req.getId()); entity.setCheckRecordId(req.getId());
entity.setAppealTime(new Date());
PerformAttendAppealEntity saveEntity = appealService.save(entity, context); PerformAttendAppealEntity saveEntity = appealService.save(entity, context);
rest.setData(saveEntity); rest.setData(saveEntity);
...@@ -261,7 +262,7 @@ public class AppealApiController extends AbstractBaseController<PerformReq> { ...@@ -261,7 +262,7 @@ public class AppealApiController extends AbstractBaseController<PerformReq> {
public static void main(String[] args) { public static void main(String[] args) {
System.out.println(new BigDecimal(15.52).setScale(1,BigDecimal.ROUND_HALF_UP).toString());
} }
} }
...@@ -101,8 +101,10 @@ public class DingTalkLoginController extends BaseCRUDJsonBodyMappingController<U ...@@ -101,8 +101,10 @@ public class DingTalkLoginController extends BaseCRUDJsonBodyMappingController<U
//根据code 查询钉钉用户id //根据code 查询钉钉用户id
Rest<String> personRest = dingPersonService.getPersonByCode(req.getCode()); Rest<String> personRest = dingPersonService.getPersonByCode(req.getCode());
if (personRest.getCode() != YesNoEnum.YES.getValue()) { if (personRest.getCode() != YesNoEnum.YES.getValue()) {
throw new AppException(String.format("获取钉钉用户异常,{}", personRest.getMsg())); throw new AppException(String.format("获取钉钉用户异常,%s", personRest.getMsg()));
} }
if(ObjectUtils.isEmpty(personRest.getData())) throw new AppException(REGISTER_AUTH_FAIL, "不存在当前匹配的钉钉关联用户!");
//根据钉钉的用户查询系统绑定的用户,获取 //根据钉钉的用户查询系统绑定的用户,获取
UserQuery userQuery = new UserQuery(); UserQuery userQuery = new UserQuery();
userQuery.setDingUserId(personRest.getData()); userQuery.setDingUserId(personRest.getData());
......
...@@ -287,6 +287,9 @@ public class InspectApiController extends AbstractBaseController<PerformReq> { ...@@ -287,6 +287,9 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
// recordEntity.setStaffId(staffEntity.getId()); // recordEntity.setStaffId(staffEntity.getId());
recordEntity.setStaffName(staffEntity.getName()); recordEntity.setStaffName(staffEntity.getName());
recordEntity.setDeductTime(new Date());
recordEntity.setDeductPerson(staffEntity.getName());
recordEntity.setDeptId(staffEntity.getDeptId()); recordEntity.setDeptId(staffEntity.getDeptId());
recordEntity.setDeptName(staffEntity.getDeptName()); recordEntity.setDeptName(staffEntity.getDeptName());
recordEntity.setSubAddType(rule.getSubAddType()); recordEntity.setSubAddType(rule.getSubAddType());
...@@ -318,6 +321,9 @@ public class InspectApiController extends AbstractBaseController<PerformReq> { ...@@ -318,6 +321,9 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
recordEntity.setDeptId(staffEntity.getDeptId()); recordEntity.setDeptId(staffEntity.getDeptId());
recordEntity.setDeptName(staffEntity.getDeptName()); recordEntity.setDeptName(staffEntity.getDeptName());
recordEntity.setDeductTime(new Date());
recordEntity.setDeductPerson(staffEntity.getName());
recordEntity.setSubAddType(rule.getSubAddType()); recordEntity.setSubAddType(rule.getSubAddType());
recordEntity.setScore(rule.getScore()); recordEntity.setScore(rule.getScore());
recordEntity.setRuleId(rule.getId()); recordEntity.setRuleId(rule.getId());
...@@ -346,6 +352,9 @@ public class InspectApiController extends AbstractBaseController<PerformReq> { ...@@ -346,6 +352,9 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
// recordEntity.setStaffId(staffEntity.getId()); // recordEntity.setStaffId(staffEntity.getId());
recordEntity.setStaffName(staffEntity.getName()); recordEntity.setStaffName(staffEntity.getName());
recordEntity.setDeductTime(new Date());
recordEntity.setDeductPerson(staffEntity.getName());
recordEntity.setDeptId(staffEntity.getDeptId()); recordEntity.setDeptId(staffEntity.getDeptId());
recordEntity.setDeptName(staffEntity.getDeptName()); recordEntity.setDeptName(staffEntity.getDeptName());
recordEntity.setSubAddType(rule.getSubAddType()); recordEntity.setSubAddType(rule.getSubAddType());
...@@ -374,6 +383,10 @@ public class InspectApiController extends AbstractBaseController<PerformReq> { ...@@ -374,6 +383,10 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
//recordEntity.setStaffId(staffEntity.getId()); //recordEntity.setStaffId(staffEntity.getId());
recordEntity.setStaffName(staffEntity.getName()); recordEntity.setStaffName(staffEntity.getName());
recordEntity.setDeductTime(new Date());
recordEntity.setDeductPerson(staffEntity.getName());
recordEntity.setDeptId(staffEntity.getDeptId()); recordEntity.setDeptId(staffEntity.getDeptId());
recordEntity.setDeptName(staffEntity.getDeptName()); recordEntity.setDeptName(staffEntity.getDeptName());
recordEntity.setSubAddType(rule.getSubAddType()); recordEntity.setSubAddType(rule.getSubAddType());
...@@ -402,6 +415,9 @@ public class InspectApiController extends AbstractBaseController<PerformReq> { ...@@ -402,6 +415,9 @@ public class InspectApiController extends AbstractBaseController<PerformReq> {
//recordEntity.setStaffId(staffEntity.getId()); //recordEntity.setStaffId(staffEntity.getId());
recordEntity.setStaffName(staffEntity.getName()); recordEntity.setStaffName(staffEntity.getName());
recordEntity.setDeductTime(new Date());
recordEntity.setDeductPerson(staffEntity.getName());
recordEntity.setDeptId(staffEntity.getDeptId()); recordEntity.setDeptId(staffEntity.getDeptId());
recordEntity.setDeptName(staffEntity.getDeptName()); recordEntity.setDeptName(staffEntity.getDeptName());
recordEntity.setSubAddType(rule.getSubAddType()); recordEntity.setSubAddType(rule.getSubAddType());
......
...@@ -4,6 +4,7 @@ import java.math.BigDecimal; ...@@ -4,6 +4,7 @@ import java.math.BigDecimal;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.RandomUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
...@@ -88,10 +89,10 @@ public class PerformApiController extends AbstractBaseController<PerformReq> { ...@@ -88,10 +89,10 @@ public class PerformApiController extends AbstractBaseController<PerformReq> {
try { try {
//todo //todo
PerformStatInfo performStatInfo = new PerformStatInfo(); PerformStatInfo performStatInfo = new PerformStatInfo();
performStatInfo.setTotalScore(new BigDecimal("15.9")); performStatInfo.setTotalScore(RandomUtil.randomBigDecimal(new BigDecimal("15"),new BigDecimal("45")).setScale(1,BigDecimal.ROUND_HALF_UP));
performStatInfo.setTotalTimes(12); performStatInfo.setTotalTimes(RandomUtil.randomInt(10,40));
performStatInfo.setTodayScore(new BigDecimal("12.6")); performStatInfo.setTodayScore(RandomUtil.randomBigDecimal(new BigDecimal("2"),new BigDecimal("10")).setScale(1,BigDecimal.ROUND_HALF_UP));
performStatInfo.setTodayTimes(4); performStatInfo.setTodayTimes(RandomUtil.randomInt(10));
rest.setData(performStatInfo); rest.setData(performStatInfo);
recordSysLog(request, busiDesc + " 【成功】"); recordSysLog(request, busiDesc + " 【成功】");
} catch (Exception e) { } catch (Exception e) {
......
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