Commit 734880fa authored by 赵啸非's avatar 赵啸非

修改考勤汇总

parent cf9709bf
......@@ -403,10 +403,12 @@ export default {
{ prop: "shiftsId", label: "班次ID", width: 100 },
{ prop: "shiftsName", label: "班次名称", width: 100 },
{ prop: "goWorkDate", label: "上班打卡时间", width: 100 , formatter: this.formatterDate},
{ prop: "goWorkResult", label: "上班打卡结果", width: 100, formatter: this.formatter },
{ prop: "goWorkResult", label: "上班打卡结果", width: 100, formatter: this.formatterString },
{ prop: "offWorkDate", label: "下班打卡时间", width: 100 , formatter: this.formatterDate},
{ prop: "offWorkResult", label: "下班打卡结果", width: 100 , formatter: this.formatter},
{ prop: "offWorkResult", label: "下班打卡结果", width: 100 , formatter: this.formatterString},
{ prop: "remark", label: "备注", width: 100 },
],
config: {
search: [
......
......@@ -5,6 +5,7 @@ import com.mortals.framework.model.OrderCol;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.GoWorkResultEnum;
import com.mortals.xhx.common.code.NormalEnum;
import com.mortals.xhx.common.code.OffWorkResultEnum;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.module.attendance.model.*;
......@@ -57,9 +58,9 @@ public class AttendanceRecordController extends BaseCRUDJsonBodyMappingControlle
this.addDict(model, "classId", attendanceClassService.find(new AttendanceClassQuery()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getClassName())));
this.addDict(model, "goWorkResult", GoWorkResultEnum.getEnumMap());
this.addDict(model, "offWorkResult", OffWorkResultEnum.getEnumMap());
this.addDict(model, "signInResult", YesNoEnum.getEnumMap());
this.addDict(model, "signOutResult", YesNoEnum.getEnumMap());
this.addDict(model, "punchResult", YesNoEnum.getEnumMap());
this.addDict(model, "signInResult", NormalEnum.getEnumMap());
this.addDict(model, "signOutResult", NormalEnum.getEnumMap());
this.addDict(model, "punchResult", NormalEnum.getEnumMap());
//设置
......@@ -96,7 +97,6 @@ public class AttendanceRecordController extends BaseCRUDJsonBodyMappingControlle
.sorted(Comparator.comparingInt(AttendanceRecordDetailEntity::getOrderNum))
.collect(Collectors.toList());
List<AttDsyncColumn> dsyncColumns = new ArrayList<>();
List<AttDsyncColumn> resultDsyncColumns = new ArrayList<>();
collect.forEach(item -> {
AttDsyncColumn attDsyncColumn = new AttDsyncColumn();
attDsyncColumn.setName(String.format("上班%s打卡时间", item.getOrderNum()));
......
package com.mortals.xhx.common.code;
import com.mortals.framework.common.IBaseEnum;
import java.util.LinkedHashMap;
import java.util.Map;
public enum NormalEnum implements IBaseEnum{
正常(0, "正常"),
异常(1, "异常");
private int value;
private String desc;
NormalEnum(int value, String desc) {
this.value = value;
this.desc = desc;
}
@Override
public int getValue() {
return this.value;
}
public String getDesc() {
return desc;
}
public static NormalEnum getByValue(int value) {
for (NormalEnum YesNoEnum : NormalEnum.values()) {
if (YesNoEnum.getValue() == value) {
return YesNoEnum;
}
}
return null;
}
/**
* 获取Map集合
* @param eItem 不包含项
* @return
*/
public static Map<String,String> getEnumMap(int... eItem) {
Map<String,String> resultMap= new LinkedHashMap<String,String>();
for (NormalEnum item : NormalEnum.values()) {
try{
boolean hasE = false;
for (int e : eItem){
if(item.getValue()==e){
hasE = true;
break;
}
}
if(!hasE){
resultMap.put(item.getValue()+"", item.getDesc());
}
}catch(Exception ex){
}
}
return resultMap;
}
}
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