Commit 237a75b5bac383cb0d3ee1acced727ead201a318
1 parent
cba212cc
提交
Showing
16 changed files
with
948 additions
and
19 deletions
src/main/java/com/zteits/oa/api/dto/asradaily/AsraDailyOpNumForCurrentDayDTO.java
0 → 100644
| 1 | +package com.zteits.oa.api.dto.asradaily; | ||
| 2 | + | ||
| 3 | +import com.zteits.oa.api.base.bean.BaiscDTO; | ||
| 4 | +/** | ||
| 5 | + * 当天人数统计.<br/> | ||
| 6 | + * | ||
| 7 | + * Copyright: Copyright (c) 2017 ZTE-ITS | ||
| 8 | + * | ||
| 9 | + * @ClassName: AmountUtils.java | ||
| 10 | + * @Description: | ||
| 11 | + * @version: v1.0.0 | ||
| 12 | + * @author: wangfs | ||
| 13 | + * @date: 2018年8月1日 | ||
| 14 | + * Modification History: | ||
| 15 | + * Date Author Version Description | ||
| 16 | + *---------------------------------------------------------* | ||
| 17 | + * 2018年8月1日 wangfs v1.0.0 创建 | ||
| 18 | + */ | ||
| 19 | +public class AsraDailyOpNumForCurrentDayDTO extends BaiscDTO{ | ||
| 20 | + | ||
| 21 | + /** | ||
| 22 | + * | ||
| 23 | + */ | ||
| 24 | + private static final long serialVersionUID = 3092998255275614601L; | ||
| 25 | + | ||
| 26 | + /**领导下员工总数.*/ | ||
| 27 | + private Integer employeeTotal; | ||
| 28 | + | ||
| 29 | + /**当天提交人数.*/ | ||
| 30 | + private Integer currentDayCommitEmployeeNum; | ||
| 31 | + | ||
| 32 | + /**当天日报未提交人数.*/ | ||
| 33 | + private Integer currentDayNotCommitEmployeeNum; | ||
| 34 | + | ||
| 35 | + public Integer getEmployeeTotal() { | ||
| 36 | + return employeeTotal; | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + public void setEmployeeTotal(Integer employeeTotal) { | ||
| 40 | + this.employeeTotal = employeeTotal; | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | + public Integer getCurrentDayCommitEmployeeNum() { | ||
| 44 | + return currentDayCommitEmployeeNum; | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + public void setCurrentDayCommitEmployeeNum(Integer currentDayCommitEmployeeNum) { | ||
| 48 | + this.currentDayCommitEmployeeNum = currentDayCommitEmployeeNum; | ||
| 49 | + } | ||
| 50 | + | ||
| 51 | + public Integer getCurrentDayNotCommitEmployeeNum() { | ||
| 52 | + return currentDayNotCommitEmployeeNum; | ||
| 53 | + } | ||
| 54 | + | ||
| 55 | + public void setCurrentDayNotCommitEmployeeNum(Integer currentDayNotCommitEmployeeNum) { | ||
| 56 | + this.currentDayNotCommitEmployeeNum = currentDayNotCommitEmployeeNum; | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + @Override | ||
| 60 | + public String toString() { | ||
| 61 | + return "AsraDailyOpNumForCurrentDayDTO [employeeTotal=" + employeeTotal + ", currentDayCommitEmployeeNum=" | ||
| 62 | + + currentDayCommitEmployeeNum + ", currentDayNotCommitEmployeeNum=" + currentDayNotCommitEmployeeNum | ||
| 63 | + + "]"; | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + | ||
| 67 | +} |
src/main/java/com/zteits/oa/api/dto/asradaily/AsraProjectAndPersonNumDTO.java
0 → 100644
| 1 | +package com.zteits.oa.api.dto.asradaily; | ||
| 2 | + | ||
| 3 | +import java.util.List; | ||
| 4 | + | ||
| 5 | +import com.zteits.oa.api.base.bean.BaiscDTO; | ||
| 6 | + | ||
| 7 | +public class AsraProjectAndPersonNumDTO extends BaiscDTO{ | ||
| 8 | + | ||
| 9 | + /** | ||
| 10 | + * | ||
| 11 | + */ | ||
| 12 | + private static final long serialVersionUID = 1L; | ||
| 13 | + /**所属项目ID*/ | ||
| 14 | + private Long projectId; | ||
| 15 | + /**所属项目名称.*/ | ||
| 16 | + private String projectName; | ||
| 17 | + /**提交人数.*/ | ||
| 18 | + private Integer commitPersonNum; | ||
| 19 | + | ||
| 20 | + private List<QueryAsraDailyAllDetailForListReqDTO> listDetail; | ||
| 21 | + | ||
| 22 | + | ||
| 23 | + | ||
| 24 | + public List<QueryAsraDailyAllDetailForListReqDTO> getListDetail() { | ||
| 25 | + return listDetail; | ||
| 26 | + } | ||
| 27 | + public void setListDetail(List<QueryAsraDailyAllDetailForListReqDTO> listDetail) { | ||
| 28 | + this.listDetail = listDetail; | ||
| 29 | + } | ||
| 30 | + public Long getProjectId() { | ||
| 31 | + return projectId; | ||
| 32 | + } | ||
| 33 | + public void setProjectId(Long projectId) { | ||
| 34 | + this.projectId = projectId; | ||
| 35 | + } | ||
| 36 | + public String getProjectName() { | ||
| 37 | + return projectName; | ||
| 38 | + } | ||
| 39 | + public void setProjectName(String projectName) { | ||
| 40 | + this.projectName = projectName; | ||
| 41 | + } | ||
| 42 | + public Integer getCommitPersonNum() { | ||
| 43 | + return commitPersonNum; | ||
| 44 | + } | ||
| 45 | + public void setCommitPersonNum(Integer commitPersonNum) { | ||
| 46 | + this.commitPersonNum = commitPersonNum; | ||
| 47 | + } | ||
| 48 | + @Override | ||
| 49 | + public String toString() { | ||
| 50 | + return "AsraProjectAndPersonNumDTO [projectId=" + projectId + ", projectName=" + projectName | ||
| 51 | + + ", commitPersonNum=" + commitPersonNum + "]"; | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | +} | ||
| 0 | \ No newline at end of file | 55 | \ No newline at end of file |
src/main/java/com/zteits/oa/api/dto/asradaily/QueryAsraDailyAllDetailForListReqDTO.java
0 → 100644
| 1 | +package com.zteits.oa.api.dto.asradaily; | ||
| 2 | + | ||
| 3 | +import com.zteits.oa.api.base.bean.BaiscDTO; | ||
| 4 | + | ||
| 5 | +public class QueryAsraDailyAllDetailForListReqDTO extends BaiscDTO{ | ||
| 6 | + /** | ||
| 7 | + * | ||
| 8 | + */ | ||
| 9 | + private static final long serialVersionUID = -9074662527074617653L; | ||
| 10 | + | ||
| 11 | + /**所属项目ID*/ | ||
| 12 | + private Long projectId; | ||
| 13 | + | ||
| 14 | + /**所属员工ID*/ | ||
| 15 | + private Long asarOpId; | ||
| 16 | + | ||
| 17 | + /**操作员姓名*/ | ||
| 18 | + private String asarOpName; | ||
| 19 | + | ||
| 20 | + /**工时填写日期*/ | ||
| 21 | + private String dailyDate; | ||
| 22 | + | ||
| 23 | + /**工时小时数.*/ | ||
| 24 | + private Long asraHours; | ||
| 25 | + | ||
| 26 | + /**工时内容*/ | ||
| 27 | + private String dailyContent; | ||
| 28 | + | ||
| 29 | + public Long getProjectId() { | ||
| 30 | + return projectId; | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | + public void setProjectId(Long projectId) { | ||
| 34 | + this.projectId = projectId; | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | + public Long getAsarOpId() { | ||
| 38 | + return asarOpId; | ||
| 39 | + } | ||
| 40 | + | ||
| 41 | + public void setAsarOpId(Long asarOpId) { | ||
| 42 | + this.asarOpId = asarOpId; | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + public String getAsarOpName() { | ||
| 46 | + return asarOpName; | ||
| 47 | + } | ||
| 48 | + | ||
| 49 | + public void setAsarOpName(String asarOpName) { | ||
| 50 | + this.asarOpName = asarOpName; | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + public String getDailyDate() { | ||
| 54 | + return dailyDate; | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + public void setDailyDate(String dailyDate) { | ||
| 58 | + this.dailyDate = dailyDate; | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + public Long getAsraHours() { | ||
| 62 | + return asraHours; | ||
| 63 | + } | ||
| 64 | + | ||
| 65 | + public void setAsraHours(Long asraHours) { | ||
| 66 | + this.asraHours = asraHours; | ||
| 67 | + } | ||
| 68 | + | ||
| 69 | + public String getDailyContent() { | ||
| 70 | + return dailyContent; | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | + public void setDailyContent(String dailyContent) { | ||
| 74 | + this.dailyContent = dailyContent; | ||
| 75 | + } | ||
| 76 | + | ||
| 77 | + @Override | ||
| 78 | + public String toString() { | ||
| 79 | + return "QueryAsraDailyAllDetailForListReqDTO [projectId=" + projectId + ", asarOpId=" + asarOpId | ||
| 80 | + + ", asarOpName=" + asarOpName + ", dailyDate=" + dailyDate + ", asraHours=" + asraHours | ||
| 81 | + + ", dailyContent=" + dailyContent + "]"; | ||
| 82 | + } | ||
| 83 | + | ||
| 84 | + | ||
| 85 | +} |
src/main/java/com/zteits/oa/api/dto/asradaily/QueryAsraDailyAllForListReqDTO.java
0 → 100644
| 1 | +package com.zteits.oa.api.dto.asradaily; | ||
| 2 | + | ||
| 3 | +import java.util.List; | ||
| 4 | + | ||
| 5 | +import com.zteits.oa.api.base.bean.BaiscDTO; | ||
| 6 | + | ||
| 7 | +public class QueryAsraDailyAllForListReqDTO extends BaiscDTO{ | ||
| 8 | + | ||
| 9 | + /** | ||
| 10 | + * | ||
| 11 | + */ | ||
| 12 | + private static final long serialVersionUID = 4429315565616847323L; | ||
| 13 | + | ||
| 14 | + private List<AsraProjectAndPersonNumDTO> list; | ||
| 15 | + | ||
| 16 | + public List<AsraProjectAndPersonNumDTO> getList() { | ||
| 17 | + return list; | ||
| 18 | + } | ||
| 19 | + | ||
| 20 | + public void setList(List<AsraProjectAndPersonNumDTO> list) { | ||
| 21 | + this.list = list; | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + | ||
| 25 | +} | ||
| 26 | + |
src/main/java/com/zteits/oa/api/dto/asradaily/param/AsraDailyForTotalNumAndDetailReq.java
0 → 100644
| 1 | +package com.zteits.oa.api.dto.asradaily.param; | ||
| 2 | + | ||
| 3 | +import com.zteits.oa.api.base.bean.BaseRequest; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * 工时查询.<b> | ||
| 7 | + * | ||
| 8 | + * Copyright: Cor/pyright (c) 2017 ZTE-ITS | ||
| 9 | + * | ||
| 10 | + * @ClassName: AmountUtils.java | ||
| 11 | + * @Description: | ||
| 12 | + * @version: v1.0.0 | ||
| 13 | + * @author: wangfs | ||
| 14 | + * @date: 2018年8月1日 | ||
| 15 | + * Modification History: | ||
| 16 | + * Date Author Version Description | ||
| 17 | + *---------------------------------------------------------* | ||
| 18 | + * 2018年8月1日 wangfs v1.0.0 创建 | ||
| 19 | + */ | ||
| 20 | +public class AsraDailyForTotalNumAndDetailReq extends BaseRequest{ | ||
| 21 | + | ||
| 22 | + /**登陆员工ID.*/ | ||
| 23 | + private Long opId; | ||
| 24 | + | ||
| 25 | + /**开始时间.*/ | ||
| 26 | + private String beginTime; | ||
| 27 | + | ||
| 28 | + /**结束时间.*/ | ||
| 29 | + private String endTime; | ||
| 30 | + | ||
| 31 | + /**项目名称.*/ | ||
| 32 | + private Long projectId; | ||
| 33 | + | ||
| 34 | + /**员工名称.*/ | ||
| 35 | + private String opName; | ||
| 36 | + | ||
| 37 | + | ||
| 38 | + public String getBeginTime() { | ||
| 39 | + return beginTime; | ||
| 40 | + } | ||
| 41 | + | ||
| 42 | + public void setBeginTime(String beginTime) { | ||
| 43 | + this.beginTime = beginTime; | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | + public String getEndTime() { | ||
| 47 | + return endTime; | ||
| 48 | + } | ||
| 49 | + | ||
| 50 | + public void setEndTime(String endTime) { | ||
| 51 | + this.endTime = endTime; | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + public Long getProjectId() { | ||
| 55 | + return projectId; | ||
| 56 | + } | ||
| 57 | + | ||
| 58 | + public void setProjectId(Long projectId) { | ||
| 59 | + this.projectId = projectId; | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + public String getOpName() { | ||
| 63 | + return opName; | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + public void setOpName(String opName) { | ||
| 67 | + this.opName = opName; | ||
| 68 | + } | ||
| 69 | + | ||
| 70 | + | ||
| 71 | + public Long getOpId() { | ||
| 72 | + return opId; | ||
| 73 | + } | ||
| 74 | + | ||
| 75 | + public void setOpId(Long opId) { | ||
| 76 | + this.opId = opId; | ||
| 77 | + } | ||
| 78 | + | ||
| 79 | + @Override | ||
| 80 | + public String toString() { | ||
| 81 | + return "AsraDailyForTotalNumAndDetailReq [beginTime=" + beginTime + ", endTime=" + endTime + ", projectId=" | ||
| 82 | + + projectId + ", opName=" + opName + "]"; | ||
| 83 | + } | ||
| 84 | + | ||
| 85 | + | ||
| 86 | +} |
src/main/java/com/zteits/oa/api/service/report/query/AsraDailyQueryService.java
| 1 | package com.zteits.oa.api.service.report.query; | 1 | package com.zteits.oa.api.service.report.query; |
| 2 | 2 | ||
| 3 | +import java.util.List; | ||
| 4 | + | ||
| 3 | import com.zteits.oa.api.base.bean.BizResult; | 5 | import com.zteits.oa.api.base.bean.BizResult; |
| 4 | -import com.zteits.oa.api.base.bean.PageBean; | ||
| 5 | import com.zteits.oa.api.dto.asradaily.AsraDailyDTO; | 6 | import com.zteits.oa.api.dto.asradaily.AsraDailyDTO; |
| 7 | +import com.zteits.oa.api.dto.asradaily.AsraDailyOpNumForCurrentDayDTO; | ||
| 8 | +import com.zteits.oa.api.dto.asradaily.QueryAsraDailyAllForListReqDTO; | ||
| 9 | +import com.zteits.oa.api.dto.asradaily.param.AsraDailyForTotalNumAndDetailReq; | ||
| 6 | import com.zteits.oa.api.dto.asradaily.param.AsraDailyQueryReq; | 10 | import com.zteits.oa.api.dto.asradaily.param.AsraDailyQueryReq; |
| 7 | -import com.zteits.oa.api.dto.asraop.AsraOpDTO; | ||
| 8 | -import com.zteits.oa.api.dto.asraop.param.AsraOpQueryReq; | ||
| 9 | - | ||
| 10 | -import java.util.List; | ||
| 11 | 11 | ||
| 12 | /** | 12 | /** |
| 13 | * 查询日报 | 13 | * 查询日报 |
| @@ -26,7 +26,7 @@ public interface AsraDailyQueryService { | @@ -26,7 +26,7 @@ public interface AsraDailyQueryService { | ||
| 26 | 26 | ||
| 27 | 27 | ||
| 28 | /** | 28 | /** |
| 29 | - * 根据登录工号和查询时间查询日报 | 29 | + * 根据登录工号和查询时间查询日报(工时填报) |
| 30 | * @param | 30 | * @param |
| 31 | * @return | 31 | * @return |
| 32 | * @Author: xiejianpeng | 32 | * @Author: xiejianpeng |
| @@ -34,4 +34,21 @@ public interface AsraDailyQueryService { | @@ -34,4 +34,21 @@ public interface AsraDailyQueryService { | ||
| 34 | * | 34 | * |
| 35 | */ | 35 | */ |
| 36 | BizResult<List<AsraDailyDTO>> queryAsraDailyList(AsraDailyQueryReq asraDailyQueryReq); | 36 | BizResult<List<AsraDailyDTO>> queryAsraDailyList(AsraDailyQueryReq asraDailyQueryReq); |
| 37 | + /** | ||
| 38 | + * 工时查询-当天提交及未提交人数汇总.<br/> | ||
| 39 | + * @param request | ||
| 40 | + * @return | ||
| 41 | + * 2018年8月1日 wangfs.<br/> | ||
| 42 | + */ | ||
| 43 | + BizResult<AsraDailyOpNumForCurrentDayDTO> queryAsraDailyOpNumForCurrentDay(AsraDailyForTotalNumAndDetailReq request); | ||
| 44 | + | ||
| 45 | + /** | ||
| 46 | + * 工时查询-所有员工及自己或者自己日报.<br/> | ||
| 47 | + * @param request | ||
| 48 | + * @return | ||
| 49 | + * 2018年8月1日 wangfs.<br/> | ||
| 50 | + */ | ||
| 51 | + BizResult<QueryAsraDailyAllForListReqDTO> queryAsraDailyAllForList(AsraDailyForTotalNumAndDetailReq request); | ||
| 52 | + | ||
| 53 | + | ||
| 37 | } | 54 | } |
src/main/java/com/zteits/oa/report/biz/AsraDailyQueryServiceImpl.java
| 1 | package com.zteits.oa.report.biz; | 1 | package com.zteits.oa.report.biz; |
| 2 | 2 | ||
| 3 | +import java.util.ArrayList; | ||
| 4 | +import java.util.Iterator; | ||
| 5 | +import java.util.List; | ||
| 6 | + | ||
| 7 | +import org.springframework.beans.BeanUtils; | ||
| 8 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 9 | +import org.springframework.stereotype.Service; | ||
| 10 | + | ||
| 11 | +import com.xiaoleilu.hutool.date.DateUtil; | ||
| 3 | import com.xiaoleilu.hutool.util.CollectionUtil; | 12 | import com.xiaoleilu.hutool.util.CollectionUtil; |
| 4 | import com.zteits.oa.api.base.bean.BizResult; | 13 | import com.zteits.oa.api.base.bean.BizResult; |
| 5 | import com.zteits.oa.api.dto.asradaily.AsraDailyDTO; | 14 | import com.zteits.oa.api.dto.asradaily.AsraDailyDTO; |
| 15 | +import com.zteits.oa.api.dto.asradaily.AsraDailyOpNumForCurrentDayDTO; | ||
| 16 | +import com.zteits.oa.api.dto.asradaily.AsraProjectAndPersonNumDTO; | ||
| 17 | +import com.zteits.oa.api.dto.asradaily.QueryAsraDailyAllDetailForListReqDTO; | ||
| 18 | +import com.zteits.oa.api.dto.asradaily.QueryAsraDailyAllForListReqDTO; | ||
| 19 | +import com.zteits.oa.api.dto.asradaily.param.AsraDailyForTotalNumAndDetailReq; | ||
| 6 | import com.zteits.oa.api.dto.asradaily.param.AsraDailyQueryReq; | 20 | import com.zteits.oa.api.dto.asradaily.param.AsraDailyQueryReq; |
| 7 | import com.zteits.oa.api.service.report.query.AsraDailyQueryService; | 21 | import com.zteits.oa.api.service.report.query.AsraDailyQueryService; |
| 8 | import com.zteits.oa.report.dao.AsraDailyDao; | 22 | import com.zteits.oa.report.dao.AsraDailyDao; |
| 9 | import com.zteits.oa.report.domain.AsraDaily; | 23 | import com.zteits.oa.report.domain.AsraDaily; |
| 10 | -import org.springframework.beans.BeanUtils; | ||
| 11 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 12 | -import org.springframework.stereotype.Service; | ||
| 13 | - | ||
| 14 | -import java.util.ArrayList; | ||
| 15 | -import java.util.List; | 24 | +import com.zteits.oa.report.domain.sdo.AsraDailyDO; |
| 25 | +import com.zteits.oa.report.domain.sdo.AsraDailyOpNumForCurrentDayDO; | ||
| 16 | 26 | ||
| 17 | /** | 27 | /** |
| 18 | * Copyright: Copyright (c) 2018 zteits | 28 | * Copyright: Copyright (c) 2018 zteits |
| @@ -41,4 +51,76 @@ public class AsraDailyQueryServiceImpl implements AsraDailyQueryService { | @@ -41,4 +51,76 @@ public class AsraDailyQueryServiceImpl implements AsraDailyQueryService { | ||
| 41 | } | 51 | } |
| 42 | return new BizResult<>(asraDailyDTOs); | 52 | return new BizResult<>(asraDailyDTOs); |
| 43 | } | 53 | } |
| 54 | + | ||
| 55 | + /** | ||
| 56 | + * 工时查询-当天提交及未提交人数汇总.<br/> | ||
| 57 | + * @param request | ||
| 58 | + * @return | ||
| 59 | + * 2018年8月1日 wangfs.<br/> | ||
| 60 | + */ | ||
| 61 | + @Override | ||
| 62 | + public BizResult<AsraDailyOpNumForCurrentDayDTO> queryAsraDailyOpNumForCurrentDay( | ||
| 63 | + AsraDailyForTotalNumAndDetailReq request) { | ||
| 64 | + AsraDailyOpNumForCurrentDayDTO asraDailyOpNumForCurrentDayDTO = new AsraDailyOpNumForCurrentDayDTO(); | ||
| 65 | + AsraDailyOpNumForCurrentDayDO asraDailyOpNumForCurrentDayDO = asraDailyDao.queryAsraDailyOpNumForCurrentDay(request); | ||
| 66 | + BeanUtils.copyProperties(asraDailyOpNumForCurrentDayDO, asraDailyOpNumForCurrentDayDTO); | ||
| 67 | + return new BizResult<AsraDailyOpNumForCurrentDayDTO>(asraDailyOpNumForCurrentDayDTO); | ||
| 68 | + } | ||
| 69 | + | ||
| 70 | + /** | ||
| 71 | + * 工时查询-所有员工及自己或者自己日报.<br/> | ||
| 72 | + * @param request | ||
| 73 | + * @return | ||
| 74 | + * 2018年8月1日 wangfs.<br/> | ||
| 75 | + */ | ||
| 76 | + @Override | ||
| 77 | + public BizResult<QueryAsraDailyAllForListReqDTO> queryAsraDailyAllForList( | ||
| 78 | + AsraDailyForTotalNumAndDetailReq request) { | ||
| 79 | + QueryAsraDailyAllForListReqDTO queryAsraDailyAllForListReqDTO = new QueryAsraDailyAllForListReqDTO(); | ||
| 80 | + List<AsraProjectAndPersonNumDTO> personNumDTOList = new ArrayList<>(); | ||
| 81 | + | ||
| 82 | + | ||
| 83 | + List<AsraDailyDO> list = asraDailyDao.queryAsraDailyAllForList(request); | ||
| 84 | + //添加项目 | ||
| 85 | + if(CollectionUtil.isNotEmpty(list)){ | ||
| 86 | + for(AsraDailyDO asraDailyDO:list){ | ||
| 87 | + if(asraDailyDO == null){ | ||
| 88 | + continue; | ||
| 89 | + } | ||
| 90 | + AsraProjectAndPersonNumDTO asraProjectAndPersonNumDTO = new AsraProjectAndPersonNumDTO(); | ||
| 91 | + BeanUtils.copyProperties(asraDailyDO, asraProjectAndPersonNumDTO); | ||
| 92 | + if(!personNumDTOList.contains(asraProjectAndPersonNumDTO)){ | ||
| 93 | + personNumDTOList.add(asraProjectAndPersonNumDTO); | ||
| 94 | + } | ||
| 95 | + } | ||
| 96 | + //2.添加明细 | ||
| 97 | + for(AsraProjectAndPersonNumDTO asraProjectAndPersonNumDTO:personNumDTOList){ | ||
| 98 | + List<QueryAsraDailyAllDetailForListReqDTO> listDetail = new ArrayList<>(); | ||
| 99 | + if(asraProjectAndPersonNumDTO == null){ | ||
| 100 | + continue; | ||
| 101 | + } | ||
| 102 | + for(AsraDailyDO asraDailyDO:list){ | ||
| 103 | + if(asraDailyDO == null){ | ||
| 104 | + continue; | ||
| 105 | + } | ||
| 106 | + if(asraProjectAndPersonNumDTO.getProjectId().equals(asraDailyDO.getProjectId())){ | ||
| 107 | + QueryAsraDailyAllDetailForListReqDTO dto = new QueryAsraDailyAllDetailForListReqDTO(); | ||
| 108 | + BeanUtils.copyProperties(asraDailyDO, dto); | ||
| 109 | + if(asraDailyDO.getDailyDate()!=null){ | ||
| 110 | + String dailyDate = DateUtil.format(asraDailyDO.getDailyDate(),"yyyy-MM-dd"); | ||
| 111 | + dto.setDailyDate(dailyDate.substring(0,4)+"年"+dailyDate.substring(5,7)+"月"+dailyDate.substring(8)+"日"); | ||
| 112 | + } | ||
| 113 | + listDetail.add(dto); | ||
| 114 | + | ||
| 115 | + } | ||
| 116 | + } | ||
| 117 | + asraProjectAndPersonNumDTO.setListDetail(listDetail); | ||
| 118 | + } | ||
| 119 | + } | ||
| 120 | + queryAsraDailyAllForListReqDTO.setList(personNumDTOList); | ||
| 121 | + | ||
| 122 | + return new BizResult<QueryAsraDailyAllForListReqDTO>(queryAsraDailyAllForListReqDTO); | ||
| 123 | + } | ||
| 124 | + | ||
| 125 | + | ||
| 44 | } | 126 | } |
src/main/java/com/zteits/oa/report/dao/AsraDailyDao.java
| 1 | package com.zteits.oa.report.dao; | 1 | package com.zteits.oa.report.dao; |
| 2 | 2 | ||
| 3 | +import java.util.List; | ||
| 4 | + | ||
| 5 | +import com.zteits.oa.api.dto.asradaily.param.AsraDailyForTotalNumAndDetailReq; | ||
| 3 | import com.zteits.oa.api.dto.asradaily.param.AsraDailyQueryReq; | 6 | import com.zteits.oa.api.dto.asradaily.param.AsraDailyQueryReq; |
| 4 | import com.zteits.oa.report.domain.AsraDaily; | 7 | import com.zteits.oa.report.domain.AsraDaily; |
| 5 | - | ||
| 6 | -import java.util.List; | 8 | +import com.zteits.oa.report.domain.sdo.AsraDailyDO; |
| 9 | +import com.zteits.oa.report.domain.sdo.AsraDailyOpNumForCurrentDayDO; | ||
| 7 | 10 | ||
| 8 | /** | 11 | /** |
| 9 | * Copyright: Copyright (c) 2018 zteits | 12 | * Copyright: Copyright (c) 2018 zteits |
| @@ -28,4 +31,19 @@ public interface AsraDailyDao { | @@ -28,4 +31,19 @@ public interface AsraDailyDao { | ||
| 28 | * | 31 | * |
| 29 | */ | 32 | */ |
| 30 | List<AsraDaily> queryAsraDailyList(AsraDailyQueryReq asraDailyQueryReq); | 33 | List<AsraDaily> queryAsraDailyList(AsraDailyQueryReq asraDailyQueryReq); |
| 34 | + /** | ||
| 35 | + * 工时查询-当天提交及未提交人数汇总.<br/> | ||
| 36 | + * @param request | ||
| 37 | + * @return | ||
| 38 | + * 2018年8月1日 wangfs.<br/> | ||
| 39 | + */ | ||
| 40 | + AsraDailyOpNumForCurrentDayDO queryAsraDailyOpNumForCurrentDay(AsraDailyForTotalNumAndDetailReq request); | ||
| 41 | + | ||
| 42 | + /** | ||
| 43 | + * 工时查询-所有员工及自己或者自己日报.<br/> | ||
| 44 | + * @param request | ||
| 45 | + * @return | ||
| 46 | + * 2018年8月1日 wangfs.<br/> | ||
| 47 | + */ | ||
| 48 | + List<AsraDailyDO> queryAsraDailyAllForList(AsraDailyForTotalNumAndDetailReq request); | ||
| 31 | } | 49 | } |
src/main/java/com/zteits/oa/report/dao/impl/AsraDailyDaoImpl.java
| 1 | package com.zteits.oa.report.dao.impl; | 1 | package com.zteits.oa.report.dao.impl; |
| 2 | 2 | ||
| 3 | +import java.util.ArrayList; | ||
| 4 | +import java.util.Date; | ||
| 5 | +import java.util.List; | ||
| 6 | + | ||
| 7 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 8 | +import org.springframework.stereotype.Component; | ||
| 9 | + | ||
| 10 | +import com.xiaoleilu.hutool.date.DateUtil; | ||
| 11 | +import com.xiaoleilu.hutool.util.CollectionUtil; | ||
| 12 | +import com.zteits.oa.api.dto.asradaily.param.AsraDailyForTotalNumAndDetailReq; | ||
| 3 | import com.zteits.oa.api.dto.asradaily.param.AsraDailyQueryReq; | 13 | import com.zteits.oa.api.dto.asradaily.param.AsraDailyQueryReq; |
| 4 | import com.zteits.oa.report.dao.AsraDailyDao; | 14 | import com.zteits.oa.report.dao.AsraDailyDao; |
| 5 | import com.zteits.oa.report.domain.AsraDaily; | 15 | import com.zteits.oa.report.domain.AsraDaily; |
| 6 | import com.zteits.oa.report.domain.AsraDailyExample; | 16 | import com.zteits.oa.report.domain.AsraDailyExample; |
| 17 | +import com.zteits.oa.report.domain.AsraOpRelations; | ||
| 18 | +import com.zteits.oa.report.domain.AsraOpRelationsExample; | ||
| 19 | +import com.zteits.oa.report.domain.sdo.AsraDailyDO; | ||
| 20 | +import com.zteits.oa.report.domain.sdo.AsraDailyOpNumForCurrentDayDO; | ||
| 7 | import com.zteits.oa.report.mapper.AsraDailyMapper; | 21 | import com.zteits.oa.report.mapper.AsraDailyMapper; |
| 8 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 9 | -import org.springframework.stereotype.Component; | ||
| 10 | - | ||
| 11 | -import java.util.List; | 22 | +import com.zteits.oa.report.mapper.AsraOpRelationsMapper; |
| 23 | +import com.zteits.oa.report.mapper.smapper.AsraDailySmapper; | ||
| 12 | 24 | ||
| 13 | /** | 25 | /** |
| 14 | * Copyright: Copyright (c) 2018 zteits | 26 | * Copyright: Copyright (c) 2018 zteits |
| @@ -27,7 +39,10 @@ public class AsraDailyDaoImpl implements AsraDailyDao{ | @@ -27,7 +39,10 @@ public class AsraDailyDaoImpl implements AsraDailyDao{ | ||
| 27 | 39 | ||
| 28 | @Autowired | 40 | @Autowired |
| 29 | private AsraDailyMapper asraDailyMapper; | 41 | private AsraDailyMapper asraDailyMapper; |
| 30 | - | 42 | + @Autowired |
| 43 | + private AsraOpRelationsMapper asraOpRelationsMapper; | ||
| 44 | + @Autowired | ||
| 45 | + private AsraDailySmapper asraDailySmapper; | ||
| 31 | 46 | ||
| 32 | @Override | 47 | @Override |
| 33 | public List<AsraDaily> queryAsraDailyList(AsraDailyQueryReq asraDailyQueryReq) { | 48 | public List<AsraDaily> queryAsraDailyList(AsraDailyQueryReq asraDailyQueryReq) { |
| @@ -37,4 +52,53 @@ public class AsraDailyDaoImpl implements AsraDailyDao{ | @@ -37,4 +52,53 @@ public class AsraDailyDaoImpl implements AsraDailyDao{ | ||
| 37 | .andWeeksEqualTo(asraDailyQueryReq.getWeeks()); | 52 | .andWeeksEqualTo(asraDailyQueryReq.getWeeks()); |
| 38 | return asraDailyMapper.selectByExample(example); | 53 | return asraDailyMapper.selectByExample(example); |
| 39 | } | 54 | } |
| 55 | + | ||
| 56 | + /** | ||
| 57 | + * 工时查询-当天提交及未提交人数汇总.<br/> | ||
| 58 | + * @param request | ||
| 59 | + * @return | ||
| 60 | + * 2018年8月1日 wangfs.<br/> | ||
| 61 | + */ | ||
| 62 | + @Override | ||
| 63 | + public AsraDailyOpNumForCurrentDayDO queryAsraDailyOpNumForCurrentDay(AsraDailyForTotalNumAndDetailReq request) { | ||
| 64 | + AsraDailyOpNumForCurrentDayDO asraDailyOpNumForCurrentDayDO = new AsraDailyOpNumForCurrentDayDO(); | ||
| 65 | + List<Long> opList = new ArrayList<>(); | ||
| 66 | + //1.总人数获取 | ||
| 67 | + AsraOpRelationsExample example = new AsraOpRelationsExample(); | ||
| 68 | + example.createCriteria().andParentIdEqualTo(request.getOpId()); | ||
| 69 | + List<AsraOpRelations> selectByExample = asraOpRelationsMapper.selectByExample(example); | ||
| 70 | + int employeeTotal = (CollectionUtil.isNotEmpty(selectByExample) ? selectByExample.size() +1 : 1); | ||
| 71 | + asraDailyOpNumForCurrentDayDO.setEmployeeTotal(employeeTotal); | ||
| 72 | + //获取员工人数 | ||
| 73 | + if(CollectionUtil.isNotEmpty(selectByExample)){ | ||
| 74 | + for(AsraOpRelations op:selectByExample){ | ||
| 75 | + if(op == null){ | ||
| 76 | + continue; | ||
| 77 | + } | ||
| 78 | + opList.add(op.getOpId()); | ||
| 79 | + } | ||
| 80 | + } | ||
| 81 | + opList.add(request.getOpId());//查询自己id | ||
| 82 | + //2.查询今日日报填写人数 | ||
| 83 | + AsraDailyExample exampleTwo = new AsraDailyExample(); | ||
| 84 | + exampleTwo.createCriteria().andAsarOpIdIn(opList) | ||
| 85 | + .andDailyDateEqualTo(DateUtil.parse(DateUtil.format(new Date(),DateUtil.NORM_DATE_PATTERN),DateUtil.NORM_DATE_PATTERN)) | ||
| 86 | + .andDataStateEqualTo(1); | ||
| 87 | + int countByExample = (int)asraDailyMapper.countByExample(exampleTwo); | ||
| 88 | + asraDailyOpNumForCurrentDayDO.setCurrentDayCommitEmployeeNum(countByExample); | ||
| 89 | + asraDailyOpNumForCurrentDayDO.setCurrentDayNotCommitEmployeeNum(employeeTotal - countByExample); | ||
| 90 | + return asraDailyOpNumForCurrentDayDO; | ||
| 91 | + } | ||
| 92 | + | ||
| 93 | + /** | ||
| 94 | + * 工时查询-所有员工及自己或者自己日报.<br/> | ||
| 95 | + * @param request | ||
| 96 | + * @return | ||
| 97 | + * 2018年8月1日 wangfs.<br/> | ||
| 98 | + */ | ||
| 99 | + @Override | ||
| 100 | + public List<AsraDailyDO> queryAsraDailyAllForList(AsraDailyForTotalNumAndDetailReq request) { | ||
| 101 | + // TODO Auto-generated method stub | ||
| 102 | + return asraDailySmapper.queryAsraDailyAllForList(request); | ||
| 103 | + } | ||
| 40 | } | 104 | } |
src/main/java/com/zteits/oa/report/dao/impl/AsraOpDaoImpl.java
| @@ -60,6 +60,7 @@ public class AsraOpDaoImpl implements AsraOpDao { | @@ -60,6 +60,7 @@ public class AsraOpDaoImpl implements AsraOpDao { | ||
| 60 | if(asraOpQueryRe.getId() != null){ | 60 | if(asraOpQueryRe.getId() != null){ |
| 61 | criteria.andIdEqualTo(asraOpQueryRe.getId()); | 61 | criteria.andIdEqualTo(asraOpQueryRe.getId()); |
| 62 | } | 62 | } |
| 63 | + criteria.andDataStateEqualTo(1); | ||
| 63 | List<AsraOp> list = asraOpMapper.selectByExample(example); | 64 | List<AsraOp> list = asraOpMapper.selectByExample(example); |
| 64 | return CollectionUtils.isEmpty(list) ? new AsraOp() : list.get(0); | 65 | return CollectionUtils.isEmpty(list) ? new AsraOp() : list.get(0); |
| 65 | } | 66 | } |
src/main/java/com/zteits/oa/report/dao/impl/AsraProjectDaoImpl.java
| @@ -29,6 +29,7 @@ public class AsraProjectDaoImpl implements AsraProjectDao{ | @@ -29,6 +29,7 @@ public class AsraProjectDaoImpl implements AsraProjectDao{ | ||
| 29 | if(asraProjecQueryReq.getId() != null){ | 29 | if(asraProjecQueryReq.getId() != null){ |
| 30 | createCriteria.andIdEqualTo(asraProjecQueryReq.getId()); | 30 | createCriteria.andIdEqualTo(asraProjecQueryReq.getId()); |
| 31 | } | 31 | } |
| 32 | + createCriteria.andDataStateEqualTo(1); | ||
| 32 | example.setOrderByClause(" sort_num asc"); | 33 | example.setOrderByClause(" sort_num asc"); |
| 33 | List<AsraProject> list = asraProjectMapper.selectByExample(example); | 34 | List<AsraProject> list = asraProjectMapper.selectByExample(example); |
| 34 | return list; | 35 | return list; |
src/main/java/com/zteits/oa/report/domain/sdo/AsraDailyDO.java
0 → 100644
| 1 | +package com.zteits.oa.report.domain.sdo; | ||
| 2 | + | ||
| 3 | +import java.util.Date; | ||
| 4 | + | ||
| 5 | +public class AsraDailyDO { | ||
| 6 | + | ||
| 7 | + /**主键*/ | ||
| 8 | + private Long id; | ||
| 9 | + | ||
| 10 | + /**所属项目ID*/ | ||
| 11 | + private Long projectId; | ||
| 12 | + | ||
| 13 | + /**所属员工ID*/ | ||
| 14 | + private Long asarOpId; | ||
| 15 | + | ||
| 16 | + /**操作员姓名*/ | ||
| 17 | + private String asarOpName; | ||
| 18 | + | ||
| 19 | + /**年:2018*/ | ||
| 20 | + private Integer years; | ||
| 21 | + | ||
| 22 | + /**周:1-54周*/ | ||
| 23 | + private Integer weeks; | ||
| 24 | + | ||
| 25 | + /**星期:1-7*/ | ||
| 26 | + private Integer weeksNum; | ||
| 27 | + | ||
| 28 | + /**工时填写日期*/ | ||
| 29 | + private Date dailyDate; | ||
| 30 | + | ||
| 31 | + /**数据状态:1有效,0无效,2:锁定*/ | ||
| 32 | + private Integer dataState; | ||
| 33 | + | ||
| 34 | + /**创建人ID*/ | ||
| 35 | + private String createEmpid; | ||
| 36 | + | ||
| 37 | + /**创建人*/ | ||
| 38 | + private String createEmpName; | ||
| 39 | + | ||
| 40 | + /**创建时间*/ | ||
| 41 | + private Date createDate; | ||
| 42 | + | ||
| 43 | + /**修改人*/ | ||
| 44 | + private String modfiyEmpid; | ||
| 45 | + | ||
| 46 | + /**修改人*/ | ||
| 47 | + private String modfiyEmpName; | ||
| 48 | + | ||
| 49 | + /**修改时间*/ | ||
| 50 | + private Date modfiyDate; | ||
| 51 | + | ||
| 52 | + /**工时内容*/ | ||
| 53 | + private String dailyContent; | ||
| 54 | + | ||
| 55 | + /**所属项目名称.*/ | ||
| 56 | + private String projectName; | ||
| 57 | + /**提交人数.*/ | ||
| 58 | + private Integer commitPersonNum; | ||
| 59 | + | ||
| 60 | + /**工时小时数.*/ | ||
| 61 | + private Long asraHours; | ||
| 62 | + | ||
| 63 | + | ||
| 64 | + | ||
| 65 | + public String getProjectName() { | ||
| 66 | + return projectName; | ||
| 67 | + } | ||
| 68 | + | ||
| 69 | + public void setProjectName(String projectName) { | ||
| 70 | + this.projectName = projectName; | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | + public Integer getCommitPersonNum() { | ||
| 74 | + return commitPersonNum; | ||
| 75 | + } | ||
| 76 | + | ||
| 77 | + public void setCommitPersonNum(Integer commitPersonNum) { | ||
| 78 | + this.commitPersonNum = commitPersonNum; | ||
| 79 | + } | ||
| 80 | + | ||
| 81 | + public Long getAsraHours() { | ||
| 82 | + return asraHours; | ||
| 83 | + } | ||
| 84 | + | ||
| 85 | + public void setAsraHours(Long asraHours) { | ||
| 86 | + this.asraHours = asraHours; | ||
| 87 | + } | ||
| 88 | + | ||
| 89 | + /**获取主键*/ | ||
| 90 | + public Long getId() { | ||
| 91 | + return id; | ||
| 92 | + } | ||
| 93 | + | ||
| 94 | + /**设置主键*/ | ||
| 95 | + public void setId(Long id) { | ||
| 96 | + this.id = id; | ||
| 97 | + } | ||
| 98 | + | ||
| 99 | + /**获取所属项目ID*/ | ||
| 100 | + public Long getProjectId() { | ||
| 101 | + return projectId; | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + /**设置所属项目ID*/ | ||
| 105 | + public void setProjectId(Long projectId) { | ||
| 106 | + this.projectId = projectId; | ||
| 107 | + } | ||
| 108 | + | ||
| 109 | + /**获取所属员工ID*/ | ||
| 110 | + public Long getAsarOpId() { | ||
| 111 | + return asarOpId; | ||
| 112 | + } | ||
| 113 | + | ||
| 114 | + /**设置所属员工ID*/ | ||
| 115 | + public void setAsarOpId(Long asarOpId) { | ||
| 116 | + this.asarOpId = asarOpId; | ||
| 117 | + } | ||
| 118 | + | ||
| 119 | + /**获取操作员姓名*/ | ||
| 120 | + public String getAsarOpName() { | ||
| 121 | + return asarOpName; | ||
| 122 | + } | ||
| 123 | + | ||
| 124 | + /**设置操作员姓名*/ | ||
| 125 | + public void setAsarOpName(String asarOpName) { | ||
| 126 | + this.asarOpName = asarOpName == null ? null : asarOpName.trim(); | ||
| 127 | + } | ||
| 128 | + | ||
| 129 | + /**获取年:2018*/ | ||
| 130 | + public Integer getYears() { | ||
| 131 | + return years; | ||
| 132 | + } | ||
| 133 | + | ||
| 134 | + /**设置年:2018*/ | ||
| 135 | + public void setYears(Integer years) { | ||
| 136 | + this.years = years; | ||
| 137 | + } | ||
| 138 | + | ||
| 139 | + /**获取周:1-54周*/ | ||
| 140 | + public Integer getWeeks() { | ||
| 141 | + return weeks; | ||
| 142 | + } | ||
| 143 | + | ||
| 144 | + /**设置周:1-54周*/ | ||
| 145 | + public void setWeeks(Integer weeks) { | ||
| 146 | + this.weeks = weeks; | ||
| 147 | + } | ||
| 148 | + | ||
| 149 | + /**获取星期:1-7*/ | ||
| 150 | + public Integer getWeeksNum() { | ||
| 151 | + return weeksNum; | ||
| 152 | + } | ||
| 153 | + | ||
| 154 | + /**设置星期:1-7*/ | ||
| 155 | + public void setWeeksNum(Integer weeksNum) { | ||
| 156 | + this.weeksNum = weeksNum; | ||
| 157 | + } | ||
| 158 | + | ||
| 159 | + /**获取工时填写日期*/ | ||
| 160 | + public Date getDailyDate() { | ||
| 161 | + return dailyDate; | ||
| 162 | + } | ||
| 163 | + | ||
| 164 | + /**设置工时填写日期*/ | ||
| 165 | + public void setDailyDate(Date dailyDate) { | ||
| 166 | + this.dailyDate = dailyDate; | ||
| 167 | + } | ||
| 168 | + | ||
| 169 | + /**获取数据状态:1有效,0无效,2:锁定*/ | ||
| 170 | + public Integer getDataState() { | ||
| 171 | + return dataState; | ||
| 172 | + } | ||
| 173 | + | ||
| 174 | + /**设置数据状态:1有效,0无效,2:锁定*/ | ||
| 175 | + public void setDataState(Integer dataState) { | ||
| 176 | + this.dataState = dataState; | ||
| 177 | + } | ||
| 178 | + | ||
| 179 | + /**获取创建人ID*/ | ||
| 180 | + public String getCreateEmpid() { | ||
| 181 | + return createEmpid; | ||
| 182 | + } | ||
| 183 | + | ||
| 184 | + /**设置创建人ID*/ | ||
| 185 | + public void setCreateEmpid(String createEmpid) { | ||
| 186 | + this.createEmpid = createEmpid == null ? null : createEmpid.trim(); | ||
| 187 | + } | ||
| 188 | + | ||
| 189 | + /**获取创建人*/ | ||
| 190 | + public String getCreateEmpName() { | ||
| 191 | + return createEmpName; | ||
| 192 | + } | ||
| 193 | + | ||
| 194 | + /**设置创建人*/ | ||
| 195 | + public void setCreateEmpName(String createEmpName) { | ||
| 196 | + this.createEmpName = createEmpName == null ? null : createEmpName.trim(); | ||
| 197 | + } | ||
| 198 | + | ||
| 199 | + /**获取创建时间*/ | ||
| 200 | + public Date getCreateDate() { | ||
| 201 | + return createDate; | ||
| 202 | + } | ||
| 203 | + | ||
| 204 | + /**设置创建时间*/ | ||
| 205 | + public void setCreateDate(Date createDate) { | ||
| 206 | + this.createDate = createDate; | ||
| 207 | + } | ||
| 208 | + | ||
| 209 | + /**获取修改人*/ | ||
| 210 | + public String getModfiyEmpid() { | ||
| 211 | + return modfiyEmpid; | ||
| 212 | + } | ||
| 213 | + | ||
| 214 | + /**设置修改人*/ | ||
| 215 | + public void setModfiyEmpid(String modfiyEmpid) { | ||
| 216 | + this.modfiyEmpid = modfiyEmpid == null ? null : modfiyEmpid.trim(); | ||
| 217 | + } | ||
| 218 | + | ||
| 219 | + /**获取修改人*/ | ||
| 220 | + public String getModfiyEmpName() { | ||
| 221 | + return modfiyEmpName; | ||
| 222 | + } | ||
| 223 | + | ||
| 224 | + /**设置修改人*/ | ||
| 225 | + public void setModfiyEmpName(String modfiyEmpName) { | ||
| 226 | + this.modfiyEmpName = modfiyEmpName == null ? null : modfiyEmpName.trim(); | ||
| 227 | + } | ||
| 228 | + | ||
| 229 | + /**获取修改时间*/ | ||
| 230 | + public Date getModfiyDate() { | ||
| 231 | + return modfiyDate; | ||
| 232 | + } | ||
| 233 | + | ||
| 234 | + /**设置修改时间*/ | ||
| 235 | + public void setModfiyDate(Date modfiyDate) { | ||
| 236 | + this.modfiyDate = modfiyDate; | ||
| 237 | + } | ||
| 238 | + | ||
| 239 | + /**获取工时内容*/ | ||
| 240 | + public String getDailyContent() { | ||
| 241 | + return dailyContent; | ||
| 242 | + } | ||
| 243 | + | ||
| 244 | + /**设置工时内容*/ | ||
| 245 | + public void setDailyContent(String dailyContent) { | ||
| 246 | + this.dailyContent = dailyContent == null ? null : dailyContent.trim(); | ||
| 247 | + } | ||
| 248 | +} |
src/main/java/com/zteits/oa/report/domain/sdo/AsraDailyOpNumForCurrentDayDO.java
0 → 100644
| 1 | +package com.zteits.oa.report.domain.sdo; | ||
| 2 | + | ||
| 3 | +public class AsraDailyOpNumForCurrentDayDO { | ||
| 4 | + | ||
| 5 | + /**领导下员工总数.*/ | ||
| 6 | + private Integer employeeTotal; | ||
| 7 | + | ||
| 8 | + /**当天提交人数.*/ | ||
| 9 | + private Integer currentDayCommitEmployeeNum; | ||
| 10 | + | ||
| 11 | + /**当天日报未提交人数.*/ | ||
| 12 | + private Integer currentDayNotCommitEmployeeNum; | ||
| 13 | + | ||
| 14 | + public Integer getEmployeeTotal() { | ||
| 15 | + return employeeTotal; | ||
| 16 | + } | ||
| 17 | + | ||
| 18 | + public void setEmployeeTotal(Integer employeeTotal) { | ||
| 19 | + this.employeeTotal = employeeTotal; | ||
| 20 | + } | ||
| 21 | + | ||
| 22 | + public Integer getCurrentDayCommitEmployeeNum() { | ||
| 23 | + return currentDayCommitEmployeeNum; | ||
| 24 | + } | ||
| 25 | + | ||
| 26 | + public void setCurrentDayCommitEmployeeNum(Integer currentDayCommitEmployeeNum) { | ||
| 27 | + this.currentDayCommitEmployeeNum = currentDayCommitEmployeeNum; | ||
| 28 | + } | ||
| 29 | + | ||
| 30 | + public Integer getCurrentDayNotCommitEmployeeNum() { | ||
| 31 | + return currentDayNotCommitEmployeeNum; | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | + public void setCurrentDayNotCommitEmployeeNum(Integer currentDayNotCommitEmployeeNum) { | ||
| 35 | + this.currentDayNotCommitEmployeeNum = currentDayNotCommitEmployeeNum; | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + @Override | ||
| 39 | + public String toString() { | ||
| 40 | + return "AsraDailyOpNumForCurrentDayDO [employeeTotal=" + employeeTotal + ", currentDayCommitEmployeeNum=" | ||
| 41 | + + currentDayCommitEmployeeNum + ", currentDayNotCommitEmployeeNum=" + currentDayNotCommitEmployeeNum | ||
| 42 | + + "]"; | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | +} |
src/main/java/com/zteits/oa/report/mapper/smapper/AsraDailySmapper.java
0 → 100644
| 1 | +package com.zteits.oa.report.mapper.smapper; | ||
| 2 | + | ||
| 3 | +import com.zteits.oa.api.dto.asradaily.param.AsraDailyForTotalNumAndDetailReq; | ||
| 4 | +import com.zteits.oa.report.domain.sdo.AsraDailyDO; | ||
| 5 | + | ||
| 6 | +import java.util.List; | ||
| 7 | + | ||
| 8 | +public interface AsraDailySmapper { | ||
| 9 | + /** | ||
| 10 | + * 工时查询-所有员工及自己或者自己日报.<br/> | ||
| 11 | + * @param request | ||
| 12 | + * @return | ||
| 13 | + * 2018年8月1日 wangfs.<br/> | ||
| 14 | + */ | ||
| 15 | + List<AsraDailyDO> queryAsraDailyAllForList(AsraDailyForTotalNumAndDetailReq request); | ||
| 16 | +} | ||
| 0 | \ No newline at end of file | 17 | \ No newline at end of file |
src/main/java/com/zteits/oa/report/web/AsraDailyController.java
| @@ -5,8 +5,13 @@ import com.xiaoleilu.hutool.date.DateUtil; | @@ -5,8 +5,13 @@ import com.xiaoleilu.hutool.date.DateUtil; | ||
| 5 | import com.xiaoleilu.hutool.util.CollectionUtil; | 5 | import com.xiaoleilu.hutool.util.CollectionUtil; |
| 6 | import com.zteits.oa.api.base.bean.BizResult; | 6 | import com.zteits.oa.api.base.bean.BizResult; |
| 7 | import com.zteits.oa.api.base.bean.PageBean; | 7 | import com.zteits.oa.api.base.bean.PageBean; |
| 8 | +import com.zteits.oa.api.base.constants.ErrorType; | ||
| 8 | import com.zteits.oa.api.base.constants.SessionEnum; | 9 | import com.zteits.oa.api.base.constants.SessionEnum; |
| 10 | +import com.zteits.oa.api.base.exception.BizException; | ||
| 9 | import com.zteits.oa.api.dto.asradaily.AsraDailyDTO; | 11 | import com.zteits.oa.api.dto.asradaily.AsraDailyDTO; |
| 12 | +import com.zteits.oa.api.dto.asradaily.AsraDailyOpNumForCurrentDayDTO; | ||
| 13 | +import com.zteits.oa.api.dto.asradaily.QueryAsraDailyAllForListReqDTO; | ||
| 14 | +import com.zteits.oa.api.dto.asradaily.param.AsraDailyForTotalNumAndDetailReq; | ||
| 10 | import com.zteits.oa.api.dto.asradaily.param.AsraDailyQueryReq; | 15 | import com.zteits.oa.api.dto.asradaily.param.AsraDailyQueryReq; |
| 11 | import com.zteits.oa.api.dto.asraop.AsraOpDTO; | 16 | import com.zteits.oa.api.dto.asraop.AsraOpDTO; |
| 12 | import com.zteits.oa.api.dto.asraop.param.AsraOpQueryReq; | 17 | import com.zteits.oa.api.dto.asraop.param.AsraOpQueryReq; |
| @@ -17,6 +22,8 @@ import com.zteits.oa.api.service.report.query.AsraOpQueryService; | @@ -17,6 +22,8 @@ import com.zteits.oa.api.service.report.query.AsraOpQueryService; | ||
| 17 | import com.zteits.oa.api.service.report.query.AsraOpRelationsQueryService; | 22 | import com.zteits.oa.api.service.report.query.AsraOpRelationsQueryService; |
| 18 | import com.zteits.oa.report.domain.AsraDaily; | 23 | import com.zteits.oa.report.domain.AsraDaily; |
| 19 | import io.swagger.annotations.Api; | 24 | import io.swagger.annotations.Api; |
| 25 | +import io.swagger.annotations.ApiOperation; | ||
| 26 | + | ||
| 20 | import org.slf4j.Logger; | 27 | import org.slf4j.Logger; |
| 21 | import org.slf4j.LoggerFactory; | 28 | import org.slf4j.LoggerFactory; |
| 22 | import org.springframework.beans.factory.annotation.Autowired; | 29 | import org.springframework.beans.factory.annotation.Autowired; |
| @@ -62,5 +69,47 @@ public class AsraDailyController { | @@ -62,5 +69,47 @@ public class AsraDailyController { | ||
| 62 | logger.info("日报系统-日报管理-根据登录人分页查询员工信息结束"); | 69 | logger.info("日报系统-日报管理-根据登录人分页查询员工信息结束"); |
| 63 | return result; | 70 | return result; |
| 64 | } | 71 | } |
| 72 | + | ||
| 73 | + /** | ||
| 74 | + * 工时查询-当天提交及未提交人数汇总.<br/> | ||
| 75 | + * @param request | ||
| 76 | + * @return | ||
| 77 | + * 2018年8月1日 wangfs.<br/> | ||
| 78 | + */ | ||
| 79 | + @RequestMapping("/queryAsraDailyOpNumForCurrentDay") | ||
| 80 | + @ApiOperation("工时查询-当天填报人数统计(汇总)") | ||
| 81 | + public BizResult<AsraDailyOpNumForCurrentDayDTO> queryAsraDailyOpNumForCurrentDay(@RequestBody AsraDailyForTotalNumAndDetailReq request,HttpServletRequest servletRequest){ | ||
| 82 | + logger.info("--begin工时查询-当天填报人数统计(汇总),入参={}",JSONObject.toJSON(request)); | ||
| 83 | + AsraOpDTO asraOpDTO = (AsraOpDTO)servletRequest.getSession().getAttribute(SessionEnum.USER_INFO.key()); | ||
| 84 | + if(asraOpDTO == null ){ | ||
| 85 | + throw new BizException(ErrorType.PARAMM_NULL,"获取session为空"); | ||
| 86 | + } | ||
| 87 | + request.setOpId(asraOpDTO.getId()); | ||
| 88 | + BizResult<AsraDailyOpNumForCurrentDayDTO> result = asraDailyQueryService.queryAsraDailyOpNumForCurrentDay(request); | ||
| 89 | + logger.info("--end工时查询-当天填报人数统计(汇总),结果={}",JSONObject.toJSON(result)); | ||
| 90 | + return result; | ||
| 91 | + } | ||
| 92 | + | ||
| 93 | + | ||
| 94 | + /** | ||
| 95 | + * 工时查询-所有员工及自己或者自己日报.<br/> | ||
| 96 | + * @param request | ||
| 97 | + * @return | ||
| 98 | + * 2018年8月1日 wangfs.<br/> | ||
| 99 | + */ | ||
| 100 | + @RequestMapping("/queryAsraDailyAllForList") | ||
| 101 | + @ApiOperation("工时查询-所有员工及自己或者自己日报") | ||
| 102 | + public BizResult<QueryAsraDailyAllForListReqDTO> queryAsraDailyAllForList(@RequestBody AsraDailyForTotalNumAndDetailReq request,HttpServletRequest servletRequest){ | ||
| 103 | + logger.info("--begin工时查询-所有员工及自己或者自己日报,入参={}",JSONObject.toJSON(request)); | ||
| 104 | + AsraOpDTO asraOpDTO = (AsraOpDTO)servletRequest.getSession().getAttribute(SessionEnum.USER_INFO.key()); | ||
| 105 | + if(asraOpDTO == null ){ | ||
| 106 | + throw new BizException(ErrorType.PARAMM_NULL,"获取session为空"); | ||
| 107 | + } | ||
| 108 | + request.setOpId(asraOpDTO.getId()); | ||
| 109 | + BizResult<QueryAsraDailyAllForListReqDTO> result = asraDailyQueryService.queryAsraDailyAllForList(request); | ||
| 110 | + logger.info("--end工时查询-所有员工及自己或者自己日报,结果={}",JSONObject.toJSON(result)); | ||
| 111 | + return result; | ||
| 112 | + } | ||
| 113 | + | ||
| 65 | 114 | ||
| 66 | } | 115 | } |
src/main/resources/mybatis/smapper/AsraDailySmapper.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
| 3 | +<mapper namespace="com.zteits.oa.report.mapper.smapper.AsraDailySmapper"> | ||
| 4 | + <resultMap id="BaseResultMap" type="com.zteits.oa.report.domain.AsraDaily"> | ||
| 5 | + <id column="id" jdbcType="BIGINT" property="id" /> | ||
| 6 | + <result column="project_id" jdbcType="BIGINT" property="projectId" /> | ||
| 7 | + <result column="asar_op_id" jdbcType="BIGINT" property="asarOpId" /> | ||
| 8 | + <result column="asar_op_name" jdbcType="VARCHAR" property="asarOpName" /> | ||
| 9 | + <result column="years" jdbcType="INTEGER" property="years" /> | ||
| 10 | + <result column="weeks" jdbcType="INTEGER" property="weeks" /> | ||
| 11 | + <result column="weeks_num" jdbcType="INTEGER" property="weeksNum" /> | ||
| 12 | + <result column="daily_date" jdbcType="DATE" property="dailyDate" /> | ||
| 13 | + <result column="data_state" jdbcType="INTEGER" property="dataState" /> | ||
| 14 | + <result column="create_empid" jdbcType="VARCHAR" property="createEmpid" /> | ||
| 15 | + <result column="create_emp_name" jdbcType="VARCHAR" property="createEmpName" /> | ||
| 16 | + <result column="create_date" jdbcType="TIMESTAMP" property="createDate" /> | ||
| 17 | + <result column="modfiy_empid" jdbcType="VARCHAR" property="modfiyEmpid" /> | ||
| 18 | + <result column="modfiy_emp_name" jdbcType="VARCHAR" property="modfiyEmpName" /> | ||
| 19 | + <result column="modfiy_date" jdbcType="TIMESTAMP" property="modfiyDate" /> | ||
| 20 | + </resultMap> | ||
| 21 | + | ||
| 22 | + | ||
| 23 | + <sql id="Base_Column_List"> | ||
| 24 | + id, project_id, asar_op_id, asar_op_name, years, weeks, weeks_num, daily_date, data_state, | ||
| 25 | + create_empid, create_emp_name, create_date, modfiy_empid, modfiy_emp_name, modfiy_date | ||
| 26 | + </sql> | ||
| 27 | + <sql id="Blob_Column_List"> | ||
| 28 | + daily_content | ||
| 29 | + </sql> | ||
| 30 | + | ||
| 31 | + <!--工时查询-所有员工及自己或者自己日报--> | ||
| 32 | + <select id="queryAsraDailyAllForList" parameterType="com.zteits.oa.api.dto.asradaily.param.AsraDailyForTotalNumAndDetailReq" | ||
| 33 | + resultType="com.zteits.oa.report.domain.sdo.AsraDailyDO"> | ||
| 34 | + SELECT | ||
| 35 | + a.id as id, | ||
| 36 | + a.project_id as projectId, | ||
| 37 | + c.projec_name as projectName, | ||
| 38 | + a.asar_op_id as asarOpId, | ||
| 39 | + a.asar_op_name as asarOpName, | ||
| 40 | + a.daily_date as dailyDate, | ||
| 41 | + max(a.daily_content) as dailyContent, | ||
| 42 | + '8' as asraHours, | ||
| 43 | + count(a.asar_op_id) as commitPersonNum | ||
| 44 | + FROM | ||
| 45 | + asra_project c, | ||
| 46 | + asra_daily a | ||
| 47 | + LEFT JOIN asra_op_relations b ON a.asar_op_id = b.op_id | ||
| 48 | + AND (b.parent_id = #{opId} OR b.op_id = #{opId}) | ||
| 49 | + WHERE | ||
| 50 | + 1 = 1 | ||
| 51 | + AND a.project_id = c.id | ||
| 52 | + <![CDATA[AND a.daily_date >= #{beginTime} ]]> | ||
| 53 | + <![CDATA[AND a.daily_date <= #{endTime}]]> | ||
| 54 | + <if test="projectId != null and projectId !=''"> | ||
| 55 | + and a.project_id=#{projectId} | ||
| 56 | + </if> | ||
| 57 | + <if test="opName != null and opName !=''"> | ||
| 58 | + and a.asar_op_name=#{opName} | ||
| 59 | + </if> | ||
| 60 | + GROUP BY | ||
| 61 | + a.project_id, | ||
| 62 | + c.projec_name, | ||
| 63 | + a.asar_op_id, | ||
| 64 | + a.asar_op_name, | ||
| 65 | + a.daily_date, | ||
| 66 | + a.id | ||
| 67 | + order by a.project_id asc,asar_op_id asc,a.daily_date desc | ||
| 68 | + </select> | ||
| 69 | + | ||
| 70 | +</mapper> | ||
| 0 | \ No newline at end of file | 71 | \ No newline at end of file |