Commit baad04c0 authored by nie'hong's avatar nie'hong

完善工时统计

parent bbb3d606
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<select id="getListByManagerId" resultType="cn.wisenergy.model.app.WorkTypeManager"> <select id="getListByManagerId" resultType="cn.wisenergy.model.app.WorkTypeManager">
select id, name,dept_id,manager_id,type select id,dept_id,manager_id,type
from work_type_manager from work_type_manager
where manager_id = #{userId} where manager_id = #{userId}
</select> </select>
......
...@@ -41,13 +41,13 @@ public class MonthlyWorkingHoursStatistics implements Serializable ,Comparable{ ...@@ -41,13 +41,13 @@ public class MonthlyWorkingHoursStatistics implements Serializable ,Comparable{
* 填报次数 * 填报次数
*/ */
@ApiModelProperty(name = "count", value = "填报次数") @ApiModelProperty(name = "count", value = "填报次数")
private int count; private Integer count;
/** /**
* 填报工时 * 填报工时
*/ */
@ApiModelProperty(name = "workTime", value = "合计填报工时") @ApiModelProperty(name = "workTime", value = "合计填报工时")
private int workTime; private Integer workTime;
@Override @Override
public int compareTo(Object o) { public int compareTo(Object o) {
......
...@@ -183,15 +183,17 @@ public class StatisticsServiceImpl implements StatisticsService { ...@@ -183,15 +183,17 @@ public class StatisticsServiceImpl implements StatisticsService {
Integer notCompletedCount1 = workTimeOrderMapper.getCountByCondition(map); Integer notCompletedCount1 = workTimeOrderMapper.getCountByCondition(map);
// 查询用户负责审批的除项目合商机的其余类型 // 查询用户负责审批的除项目合商机的其余类型
Integer notCompletedCount2 = 0;
List<WorkTypeManager> workTypeManagers = workTypeManagerMapper.getListByManagerId(userId); List<WorkTypeManager> workTypeManagers = workTypeManagerMapper.getListByManagerId(userId);
if (CollectionUtil.isNotEmpty(workTypeManagers)) { if (CollectionUtil.isNotEmpty(workTypeManagers)) {
map.remove("projectIdList"); map.remove("projectIdList");
List<Integer> type = workTypeManagers.stream().map(WorkTypeManager::getType).collect(Collectors.toList()); List<Integer> type = workTypeManagers.stream().map(WorkTypeManager::getType).collect(Collectors.toList());
map.put("typeList", type); map.put("typeList", type);
map.put("deptId", user.getDeptId()); map.put("deptId", user.getDeptId());
}
// 其余类型为审批的条数 // 其余类型为审批的条数
Integer notCompletedCount2 = workTimeOrderMapper.getCountByCondition(map); notCompletedCount2 = workTimeOrderMapper.getCountByCondition(map);
}
//所有查询结果封装进对象 //所有查询结果封装进对象
ApprovalStatistics approvalStatistics = new ApprovalStatistics(); ApprovalStatistics approvalStatistics = new ApprovalStatistics();
......
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