Commit 5bfabe11 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents 72ab25d9 75fa2ab3
...@@ -168,18 +168,22 @@ export default { ...@@ -168,18 +168,22 @@ export default {
let index = arr.findIndex((item) => item.createTime == currentTime); let index = arr.findIndex((item) => item.createTime == currentTime);
if (index > -1) { if (index > -1) {
return arr[index].attendanceSummary ? ( return arr[index].attendanceSummary ? (
<el-tooltip arr[index].remark ? (
class="item" <el-tooltip
effect="dark" class="item"
content={ effect="light"
arr[index].createTime + " " + arr[index].attendanceSummary content={arr[index].content}
} placement="top-start"
placement="top-start" >
> <el-tag type={"danger"} size="mini">
{arr[index].attendanceSummary}
</el-tag>
</el-tooltip>
) : (
<el-tag type={"danger"} size="mini"> <el-tag type={"danger"} size="mini">
{arr[index].attendanceSummary} {arr[index].attendanceSummary}
</el-tag> </el-tag>
</el-tooltip> )
) : ( ) : (
"-" "-"
); );
...@@ -229,6 +233,48 @@ export default { ...@@ -229,6 +233,48 @@ export default {
) { ) {
element.attendanceStaffStatEntities.forEach((item1) => { element.attendanceStaffStatEntities.forEach((item1) => {
item1.createTime = timestampToTime(item1.createTime, 3); item1.createTime = timestampToTime(item1.createTime, 3);
let Arr = [];
item1.remark && item1.remark.length > 0
? (Arr = JSON.parse(item1.remark))
: "";
Arr && Arr.length > 0
? (item1.content = Arr.map((v) => {
return (
<p>
{v.goWorkResult == 1 ? (
<span style="marginRight:10px">
打卡时间:
{(v.goWorkDate = timestampToTime(v.goWorkDate, 6))}
{" "} 打卡结果:
{this.tableData.dict.goWorkResult[v.goWorkResult]}
</span>
) : (
<span style="color:red;marginRight:10px">
打卡时间:
{(v.goWorkDate = timestampToTime(v.goWorkDate, 6))}
{" "} 打卡结果:
{this.tableData.dict.goWorkResult[v.goWorkResult]}
</span>
)}
{v.offWorkResult == 1 ? (
<span>
打卡时间:
{(v.offWorkDate = timestampToTime(v.offWorkDate, 6))}
{" "} 打卡结果:
{this.tableData.dict.offWorkResult[v.offWorkResult]}
</span>
) : (
<span style="color:red">
打卡时间:
{(v.offWorkDate = timestampToTime(v.offWorkDate, 6))}
{" "} 打卡结果:
{this.tableData.dict.offWorkResult[v.offWorkResult]}
</span>
)}
</p>
);
}))
: "";
}); });
} }
}); });
......
...@@ -308,7 +308,6 @@ export default { ...@@ -308,7 +308,6 @@ export default {
}, },
// 导出花名册 // 导出花名册
lookDetailHis() { lookDetailHis() {
console.log("1111");
this.drawerhistory = true; this.drawerhistory = true;
}, },
/** 提交上传文件 */ /** 提交上传文件 */
......
...@@ -17,6 +17,7 @@ import com.mortals.framework.utils.ReflectUtils; ...@@ -17,6 +17,7 @@ import com.mortals.framework.utils.ReflectUtils;
import com.mortals.framework.utils.poi.ExcelUtil; import com.mortals.framework.utils.poi.ExcelUtil;
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.GoWorkResultEnum;
import com.mortals.xhx.common.utils.DynamicColExcelUtil; import com.mortals.xhx.common.utils.DynamicColExcelUtil;
import com.mortals.xhx.module.attendance.model.AttendanceClassQuery; import com.mortals.xhx.module.attendance.model.AttendanceClassQuery;
import com.mortals.xhx.module.attendance.model.AttendanceGroupQuery; import com.mortals.xhx.module.attendance.model.AttendanceGroupQuery;
...@@ -96,6 +97,8 @@ public class AttendanceStatController extends BaseCRUDJsonBodyMappingController< ...@@ -96,6 +97,8 @@ public class AttendanceStatController extends BaseCRUDJsonBodyMappingController<
this.addDict(model, "deptId", deptService.find(new DeptQuery()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getDeptName()))); this.addDict(model, "deptId", deptService.find(new DeptQuery()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getDeptName())));
this.addDict(model, "groupId", attendanceGroupService.find(new AttendanceGroupQuery()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getGroupName()))); this.addDict(model, "groupId", attendanceGroupService.find(new AttendanceGroupQuery()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getGroupName())));
this.addDict(model, "classId", attendanceClassService.find(new AttendanceClassQuery()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getClassName()))); 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", GoWorkResultEnum.getEnumMap());
super.init(model, context); super.init(model, context);
} }
......
...@@ -159,7 +159,8 @@ public class DeptServiceImpl extends AbstractCRUDServiceImpl<DeptDao, DeptEntity ...@@ -159,7 +159,8 @@ public class DeptServiceImpl extends AbstractCRUDServiceImpl<DeptDao, DeptEntity
m -> { m -> {
m.setChildren(getChildren(m, list)); m.setChildren(getChildren(m, list));
StaffEntity query = new StaffQuery(); StaffQuery query = new StaffQuery();
query.setStatusNotList(Arrays.asList(StaffSatusEnum.离职.getValue()));
query.setDeptIdList(getChildrenId(m, list)); query.setDeptIdList(getChildrenId(m, list));
int count = staffService.count(query,null); int count = staffService.count(query,null);
m.setPersonNum(count); m.setPersonNum(count);
...@@ -220,7 +221,9 @@ public class DeptServiceImpl extends AbstractCRUDServiceImpl<DeptDao, DeptEntity ...@@ -220,7 +221,9 @@ public class DeptServiceImpl extends AbstractCRUDServiceImpl<DeptDao, DeptEntity
@Override @Override
public Rest<Void> updateDeptNum(Context context) { public Rest<Void> updateDeptNum(Context context) {
log.info("更新部门用户数量"); log.info("更新部门用户数量");
Map<Long, Long> collect = staffService.find(new StaffQuery()).stream().collect(Collectors.groupingBy(x -> x.getDeptId(), Collectors.counting())); StaffQuery query = new StaffQuery();
query.setStatusNotList(Arrays.asList(StaffSatusEnum.离职.getValue()));
Map<Long, Long> collect = staffService.find(query).stream().collect(Collectors.groupingBy(x -> x.getDeptId(), Collectors.counting()));
DeptEntity deptEntity1 = new DeptEntity(); DeptEntity deptEntity1 = new DeptEntity();
deptEntity1.setPersonNum(0); deptEntity1.setPersonNum(0);
this.getDao().update(deptEntity1, new HashMap<>()); this.getDao().update(deptEntity1, new HashMap<>());
......
...@@ -34,4 +34,6 @@ public class StaffVo extends BaseEntityLong { ...@@ -34,4 +34,6 @@ public class StaffVo extends BaseEntityLong {
private List <Long> deptIdList; private List <Long> deptIdList;
/** 员工状态(1.正式,2.试用,3.离职)列表 */
private List <Integer> statusList;
} }
\ No newline at end of file
...@@ -359,6 +359,9 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta ...@@ -359,6 +359,9 @@ public class StaffServiceImpl extends AbstractCRUDCacheServiceImpl<StaffDao, Sta
params.setDeptIdList(deptIdList); params.setDeptIdList(deptIdList);
} }
} }
if(params.getStatus()==null && CollectionUtils.isEmpty(params.getStatusList())){
params.setStatusList(Arrays.asList(StaffSatusEnum.正式.getValue(), StaffSatusEnum.试用.getValue()));
}
return params; return params;
} }
......
...@@ -96,7 +96,7 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ ...@@ -96,7 +96,7 @@ public class StaffController extends BaseCRUDJsonBodyMappingController<StaffServ
@Override @Override
protected int doListAfter(StaffEntity query, Map<String, Object> model, Context context) throws AppException { protected int doListAfter(StaffEntity query, Map<String, Object> model, Context context) throws AppException {
//todo 员工信息统计--员工关系统计 //todo 员工信息统计--员工关系统计
StaffInfoVo staffInfoVo = this.service.queryAll(context); StaffInfoVo staffInfoVo = new StaffInfoVo();
staffInfoVo.setRefreshDate(new Date()); staffInfoVo.setRefreshDate(new Date());
model.put("staff", staffInfoVo); model.put("staff", staffInfoVo);
return super.doListAfter(query, model, context); return super.doListAfter(query, model, context);
......
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