Commit 8303f38f authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents 44ce0025 36b438c9
......@@ -280,7 +280,15 @@ export default {
changedate(val) {
if (this.form.startTime && this.form.endTime) {
if (this.form.endTime.valueOf() > this.form.startTime.valueOf()) {
this.form.duration = getSec(this.form.startTime, this.form.endTime);
// this.form.duration = getSec(this.form.startTime, this.form.endTime);
this.$post("/attendance/getTimeCount", {
startTime: this.form.startTime,
endTime: this.form.endTime,
}).then((res) => {
if (res.code == 1) {
this.form.duration = res.data * 3600;
}
});
} else {
this.$message.closeAll();
this.$message.error("结束日期需大于请假日期");
......
......@@ -147,7 +147,7 @@ export default {
return (
(row.sourceDingTime ? row.sourceDingTime : "--") +
(row.duration
? "" + (row.duration / 60 / 60 / 9).toFixed(2) + "" + ""
? "" + (row.duration / 60 / 60 / 8).toFixed(2) + "" + ""
: "(--)")
);
},
......
......@@ -18,9 +18,7 @@
</div>
<div>
出勤率
<span class="num">{{
attendStatInfo.attPercentage
}}</span>
<span class="num">{{ attendStatInfo.attPercentage }}</span>
</div>
</div>
......@@ -34,7 +32,7 @@
</div>
<div>
缺卡
<span class="num">{{attendStatInfo.lackOfCards }}</span>
<span class="num">{{ attendStatInfo.lackOfCards }}</span>
</div>
</div>
</div>
......@@ -129,13 +127,14 @@
<el-checkbox
v-for="(item, index) in setcolum"
:key="index"
:label="item.label"
:label="item.prop"
>
{{ item.label }}
</el-checkbox>
</el-checkbox-group>
<div class="mt20" style="text-align:right">
<el-button>取消</el-button>
<el-button type="primary">确定</el-button>
<el-button @click="handleCancel">取消</el-button>
<el-button type="primary" @click="handleSubmit">确定</el-button>
</div>
</el-dialog>
<!-- 上传 -->
......@@ -207,17 +206,25 @@ export default {
},
},
created() {
this.$post("/attendance/record/stat", {}).then((res) => {
if (res.code === 1) {
this.attendStatInfo = res.data;
}
});
this.initalArr = this.config.columns;
},
methods: {
// 表格设置弹窗取消操作
handleCancel() {
this.checkList = [];
this.isdialog = false;
},
// 表格设置提交操作
handleSubmit() {
this.doExport();
this.isdialog = false;
},
// 表格接收数据后
afterRender(data) {
let addobjArr = [];
......@@ -335,7 +342,9 @@ export default {
if (this.selection.length > 0) {
params["idList"] = this.selection;
}
if (this.checkList.length > 0) {
params["properties"] = this.checkList;
}
this.$download(
"/attendance/record/exportExcel",
{
......@@ -343,7 +352,10 @@ export default {
},
{ type: "excel" }
)
.then(() => (this.isExport = false))
.then(() => {
this.isExport = false;
this.checkList = [];
})
.catch((error) => {
this.isExport = false;
this.$message.error(error.message);
......@@ -354,6 +366,7 @@ export default {
this.setcolum = this.config.columns.filter(
(item) => item.label && item.prop
);
console.log(this.setcolum);
},
renderTable(tableData) {
return (
......@@ -498,10 +511,10 @@ export default {
{ label: "员工工号", prop: "workNum" },
{
label: "考勤组",
prop: "attendanceGroupName"
prop: "attendanceGroupName",
},
{ label: "部门", prop: "deptName" },
{ label: "职位", prop: "positionName"},
{ label: "职位", prop: "positionName" },
{ label: "班次", prop: "classId", formatter: this.formatter },
{
label: "签到结果",
......@@ -521,9 +534,6 @@ export default {
width: 120,
prop: "subColumns",
formatter: (row) => {
let widthsize = this.columnSet.reduce((pre, cur) => {
return pre + Number(cur.width);
}, 50);
......@@ -556,7 +566,7 @@ export default {
exportList: [], //导出记录
baseUrl: process.env.VUE_APP_API_BASE_URL + "/",
initalArr: [],
attendStatInfo:{}
attendStatInfo: {},
};
},
};
......
package com.mortals.xhx.busiz.dingtalk.req;
/**
* @author ZYW
* @date 2023-07-13 20:11
*/
public class TimeReq {
String startTime;
String endTime;
public String getStartTime() {
return startTime;
}
public void setStartTime(String startTime) {
this.startTime = startTime;
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
}
......@@ -170,7 +170,7 @@ public class DingMessageController {
switch (jsonArray.get(3).toString()){
case "halfDay":
case "day":
leaveRecordEntity.setDuration((int) (Float.parseFloat(jsonArray.get(2).toString())*60*60*9)); //天转换成秒 一天工作时间9小时
leaveRecordEntity.setDuration((int) (Float.parseFloat(jsonArray.get(2).toString())*60*60*8)); //天转换成秒 一天工作时间9小时
leaveRecordEntity.setSourceDingTime(jsonArray.get(2).toString()+"天");
break;
default: //除了按天和半天计算的假期 其余都是按小时返回
......@@ -638,7 +638,7 @@ public class DingMessageController {
* @return
*/
private float converMillsToDays(long milliseconds){
float days = ((float) milliseconds) / (60*60*9);
float days = ((float) milliseconds) / (60*60*8);
return days;
}
......
......@@ -202,7 +202,7 @@ public class AttendanceStatServiceImpl extends AbstractCRUDServiceImpl<Attendanc
//汇总当前日期请假情况
List<LeaveSummaryVo> leaveSummaryVoList = attendanceSummaryDao.getLeaveSummary(query);
if (CollectionUtils.isNotEmpty(leaveSummaryVoList)) {
BigDecimal day = new BigDecimal(3600 * 9); //一天按9小时折算
BigDecimal day = new BigDecimal(3600 * 8); //一天按8小时折算
BigDecimal oneDay = new BigDecimal(1);
for (LeaveSummaryVo item : leaveSummaryVoList) {
String attendanceSummary = "";
......
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