Commit 7deb21f3ea36195647d676f3990d6d326870a646
1 parent
c849dbc7
员工管理
Showing
9 changed files
with
494 additions
and
3 deletions
src/main/java/com/zteits/oa/api/dto/asradaily/AsraDailyDTO.java
0 → 100644
| 1 | +package com.zteits.oa.api.dto.asradaily; | |
| 2 | + | |
| 3 | +import com.zteits.oa.api.base.bean.BaiscDTO; | |
| 4 | + | |
| 5 | +import java.util.Date; | |
| 6 | + | |
| 7 | +public class AsraDailyDTO extends BaiscDTO{ | |
| 8 | + /**主键*/ | |
| 9 | + private Long id; | |
| 10 | + | |
| 11 | + /**所属项目ID*/ | |
| 12 | + private Long projectId; | |
| 13 | + | |
| 14 | + /**所属员工ID*/ | |
| 15 | + private Long asarOpId; | |
| 16 | + | |
| 17 | + /**操作员姓名*/ | |
| 18 | + private String asarOpName; | |
| 19 | + | |
| 20 | + /**年:2018*/ | |
| 21 | + private Integer years; | |
| 22 | + | |
| 23 | + /**周:1-54周*/ | |
| 24 | + private Integer weeks; | |
| 25 | + | |
| 26 | + /**星期:1-7*/ | |
| 27 | + private Integer weeksNum; | |
| 28 | + | |
| 29 | + /**工时填写日期*/ | |
| 30 | + private Date dailyDate; | |
| 31 | + | |
| 32 | + /**数据状态:1有效,0无效,2:锁定*/ | |
| 33 | + private Integer dataState; | |
| 34 | + | |
| 35 | + /**创建人ID*/ | |
| 36 | + private String createEmpid; | |
| 37 | + | |
| 38 | + /**创建人*/ | |
| 39 | + private String createEmpName; | |
| 40 | + | |
| 41 | + /**创建时间*/ | |
| 42 | + private Date createDate; | |
| 43 | + | |
| 44 | + /**修改人*/ | |
| 45 | + private String modfiyEmpid; | |
| 46 | + | |
| 47 | + /**修改人*/ | |
| 48 | + private String modfiyEmpName; | |
| 49 | + | |
| 50 | + /**修改时间*/ | |
| 51 | + private Date modfiyDate; | |
| 52 | + | |
| 53 | + /**工时内容*/ | |
| 54 | + private String dailyContent; | |
| 55 | + | |
| 56 | + /**获取主键*/ | |
| 57 | + public Long getId() { | |
| 58 | + return id; | |
| 59 | + } | |
| 60 | + | |
| 61 | + /**设置主键*/ | |
| 62 | + public void setId(Long id) { | |
| 63 | + this.id = id; | |
| 64 | + } | |
| 65 | + | |
| 66 | + /**获取所属项目ID*/ | |
| 67 | + public Long getProjectId() { | |
| 68 | + return projectId; | |
| 69 | + } | |
| 70 | + | |
| 71 | + /**设置所属项目ID*/ | |
| 72 | + public void setProjectId(Long projectId) { | |
| 73 | + this.projectId = projectId; | |
| 74 | + } | |
| 75 | + | |
| 76 | + /**获取所属员工ID*/ | |
| 77 | + public Long getAsarOpId() { | |
| 78 | + return asarOpId; | |
| 79 | + } | |
| 80 | + | |
| 81 | + /**设置所属员工ID*/ | |
| 82 | + public void setAsarOpId(Long asarOpId) { | |
| 83 | + this.asarOpId = asarOpId; | |
| 84 | + } | |
| 85 | + | |
| 86 | + /**获取操作员姓名*/ | |
| 87 | + public String getAsarOpName() { | |
| 88 | + return asarOpName; | |
| 89 | + } | |
| 90 | + | |
| 91 | + /**设置操作员姓名*/ | |
| 92 | + public void setAsarOpName(String asarOpName) { | |
| 93 | + this.asarOpName = asarOpName == null ? null : asarOpName.trim(); | |
| 94 | + } | |
| 95 | + | |
| 96 | + /**获取年:2018*/ | |
| 97 | + public Integer getYears() { | |
| 98 | + return years; | |
| 99 | + } | |
| 100 | + | |
| 101 | + /**设置年:2018*/ | |
| 102 | + public void setYears(Integer years) { | |
| 103 | + this.years = years; | |
| 104 | + } | |
| 105 | + | |
| 106 | + /**获取周:1-54周*/ | |
| 107 | + public Integer getWeeks() { | |
| 108 | + return weeks; | |
| 109 | + } | |
| 110 | + | |
| 111 | + /**设置周:1-54周*/ | |
| 112 | + public void setWeeks(Integer weeks) { | |
| 113 | + this.weeks = weeks; | |
| 114 | + } | |
| 115 | + | |
| 116 | + /**获取星期:1-7*/ | |
| 117 | + public Integer getWeeksNum() { | |
| 118 | + return weeksNum; | |
| 119 | + } | |
| 120 | + | |
| 121 | + /**设置星期:1-7*/ | |
| 122 | + public void setWeeksNum(Integer weeksNum) { | |
| 123 | + this.weeksNum = weeksNum; | |
| 124 | + } | |
| 125 | + | |
| 126 | + /**获取工时填写日期*/ | |
| 127 | + public Date getDailyDate() { | |
| 128 | + return dailyDate; | |
| 129 | + } | |
| 130 | + | |
| 131 | + /**设置工时填写日期*/ | |
| 132 | + public void setDailyDate(Date dailyDate) { | |
| 133 | + this.dailyDate = dailyDate; | |
| 134 | + } | |
| 135 | + | |
| 136 | + /**获取数据状态:1有效,0无效,2:锁定*/ | |
| 137 | + public Integer getDataState() { | |
| 138 | + return dataState; | |
| 139 | + } | |
| 140 | + | |
| 141 | + /**设置数据状态:1有效,0无效,2:锁定*/ | |
| 142 | + public void setDataState(Integer dataState) { | |
| 143 | + this.dataState = dataState; | |
| 144 | + } | |
| 145 | + | |
| 146 | + /**获取创建人ID*/ | |
| 147 | + public String getCreateEmpid() { | |
| 148 | + return createEmpid; | |
| 149 | + } | |
| 150 | + | |
| 151 | + /**设置创建人ID*/ | |
| 152 | + public void setCreateEmpid(String createEmpid) { | |
| 153 | + this.createEmpid = createEmpid == null ? null : createEmpid.trim(); | |
| 154 | + } | |
| 155 | + | |
| 156 | + /**获取创建人*/ | |
| 157 | + public String getCreateEmpName() { | |
| 158 | + return createEmpName; | |
| 159 | + } | |
| 160 | + | |
| 161 | + /**设置创建人*/ | |
| 162 | + public void setCreateEmpName(String createEmpName) { | |
| 163 | + this.createEmpName = createEmpName == null ? null : createEmpName.trim(); | |
| 164 | + } | |
| 165 | + | |
| 166 | + /**获取创建时间*/ | |
| 167 | + public Date getCreateDate() { | |
| 168 | + return createDate; | |
| 169 | + } | |
| 170 | + | |
| 171 | + /**设置创建时间*/ | |
| 172 | + public void setCreateDate(Date createDate) { | |
| 173 | + this.createDate = createDate; | |
| 174 | + } | |
| 175 | + | |
| 176 | + /**获取修改人*/ | |
| 177 | + public String getModfiyEmpid() { | |
| 178 | + return modfiyEmpid; | |
| 179 | + } | |
| 180 | + | |
| 181 | + /**设置修改人*/ | |
| 182 | + public void setModfiyEmpid(String modfiyEmpid) { | |
| 183 | + this.modfiyEmpid = modfiyEmpid == null ? null : modfiyEmpid.trim(); | |
| 184 | + } | |
| 185 | + | |
| 186 | + /**获取修改人*/ | |
| 187 | + public String getModfiyEmpName() { | |
| 188 | + return modfiyEmpName; | |
| 189 | + } | |
| 190 | + | |
| 191 | + /**设置修改人*/ | |
| 192 | + public void setModfiyEmpName(String modfiyEmpName) { | |
| 193 | + this.modfiyEmpName = modfiyEmpName == null ? null : modfiyEmpName.trim(); | |
| 194 | + } | |
| 195 | + | |
| 196 | + /**获取修改时间*/ | |
| 197 | + public Date getModfiyDate() { | |
| 198 | + return modfiyDate; | |
| 199 | + } | |
| 200 | + | |
| 201 | + /**设置修改时间*/ | |
| 202 | + public void setModfiyDate(Date modfiyDate) { | |
| 203 | + this.modfiyDate = modfiyDate; | |
| 204 | + } | |
| 205 | + | |
| 206 | + /**获取工时内容*/ | |
| 207 | + public String getDailyContent() { | |
| 208 | + return dailyContent; | |
| 209 | + } | |
| 210 | + | |
| 211 | + /**设置工时内容*/ | |
| 212 | + public void setDailyContent(String dailyContent) { | |
| 213 | + this.dailyContent = dailyContent == null ? null : dailyContent.trim(); | |
| 214 | + } | |
| 215 | +} | |
| 0 | 216 | \ No newline at end of file | ... | ... |
src/main/java/com/zteits/oa/api/dto/asradaily/param/AsraDailyQueryReq.java
0 → 100644
| 1 | +package com.zteits.oa.api.dto.asradaily.param; | |
| 2 | + | |
| 3 | +import com.zteits.oa.api.base.bean.BaseRequest; | |
| 4 | + | |
| 5 | +import java.util.Date; | |
| 6 | + | |
| 7 | +public class AsraDailyQueryReq extends BaseRequest{ | |
| 8 | + | |
| 9 | + | |
| 10 | + /**所属员工ID*/ | |
| 11 | + private Long asarOpId; | |
| 12 | + | |
| 13 | + /**工时填写日期*/ | |
| 14 | + private Date dailyDate; | |
| 15 | + | |
| 16 | + /**年:2018*/ | |
| 17 | + private Integer years; | |
| 18 | + | |
| 19 | + /**周:1-54周*/ | |
| 20 | + private Integer weeks; | |
| 21 | + | |
| 22 | + public Long getAsarOpId() { | |
| 23 | + return asarOpId; | |
| 24 | + } | |
| 25 | + | |
| 26 | + public void setAsarOpId(Long asarOpId) { | |
| 27 | + this.asarOpId = asarOpId; | |
| 28 | + } | |
| 29 | + | |
| 30 | + public Date getDailyDate() { | |
| 31 | + return dailyDate; | |
| 32 | + } | |
| 33 | + | |
| 34 | + public void setDailyDate(Date dailyDate) { | |
| 35 | + this.dailyDate = dailyDate; | |
| 36 | + } | |
| 37 | + | |
| 38 | + public Integer getYears() { | |
| 39 | + return years; | |
| 40 | + } | |
| 41 | + | |
| 42 | + public void setYears(Integer years) { | |
| 43 | + this.years = years; | |
| 44 | + } | |
| 45 | + | |
| 46 | + public Integer getWeeks() { | |
| 47 | + return weeks; | |
| 48 | + } | |
| 49 | + | |
| 50 | + public void setWeeks(Integer weeks) { | |
| 51 | + this.weeks = weeks; | |
| 52 | + } | |
| 53 | +} | |
| 0 | 54 | \ No newline at end of file | ... | ... |
src/main/java/com/zteits/oa/api/service/report/query/AsraDailyQueryService.java
0 → 100644
| 1 | +package com.zteits.oa.api.service.report.query; | |
| 2 | + | |
| 3 | +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.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 | + | |
| 12 | +/** | |
| 13 | + * 查询日报 | |
| 14 | + * Copyright: Copyright (c) 2018 zteits | |
| 15 | + * | |
| 16 | + * @Description: | |
| 17 | + * @version: v1.0.0 | |
| 18 | + * @author: xiejianpeng | |
| 19 | + * @date: 2018/7/31 14:53 | |
| 20 | + * Modification History: | |
| 21 | + * Date Author Version Description | |
| 22 | + *---------------------------------------------------------* | |
| 23 | + * 2018/7/31 xiejianpeng v1.0.0 创建 | |
| 24 | + */ | |
| 25 | +public interface AsraDailyQueryService { | |
| 26 | + | |
| 27 | + | |
| 28 | + /** | |
| 29 | + * 根据登录工号和查询时间查询日报 | |
| 30 | + * @param | |
| 31 | + * @return | |
| 32 | + * @Author: xiejianpeng | |
| 33 | + * @Date: 2018/7/31 10:33 | |
| 34 | + * | |
| 35 | + */ | |
| 36 | + BizResult<List<AsraDailyDTO>> queryAsraDailyList(AsraDailyQueryReq asraDailyQueryReq); | |
| 37 | +} | ... | ... |
src/main/java/com/zteits/oa/report/biz/AsraDailyQueryServiceImpl.java
0 → 100644
| 1 | +package com.zteits.oa.report.biz; | |
| 2 | + | |
| 3 | +import com.xiaoleilu.hutool.util.CollectionUtil; | |
| 4 | +import com.zteits.oa.api.base.bean.BizResult; | |
| 5 | +import com.zteits.oa.api.dto.asradaily.AsraDailyDTO; | |
| 6 | +import com.zteits.oa.api.dto.asradaily.param.AsraDailyQueryReq; | |
| 7 | +import com.zteits.oa.api.service.report.query.AsraDailyQueryService; | |
| 8 | +import com.zteits.oa.report.dao.AsraDailyDao; | |
| 9 | +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; | |
| 16 | + | |
| 17 | +/** | |
| 18 | + * Copyright: Copyright (c) 2018 zteits | |
| 19 | + * | |
| 20 | + * @Description: | |
| 21 | + * @version: v1.0.0 | |
| 22 | + * @author: xiejianpeng | |
| 23 | + * @date: 2018/7/31 15 | |
| 24 | + * Modification History: | |
| 25 | + * Date Author Version Description | |
| 26 | + * ---------------------------------------------------------* | |
| 27 | + * 2018/7/31 xiejianpeng v1.0.0 创建 | |
| 28 | + */ | |
| 29 | +@Service | |
| 30 | +public class AsraDailyQueryServiceImpl implements AsraDailyQueryService { | |
| 31 | + | |
| 32 | + @Autowired | |
| 33 | + private AsraDailyDao asraDailyDao; | |
| 34 | + | |
| 35 | + @Override | |
| 36 | + public BizResult<List<AsraDailyDTO>> queryAsraDailyList(AsraDailyQueryReq asraDailyQueryReq) { | |
| 37 | + List<AsraDailyDTO> asraDailyDTOs = new ArrayList<>(); | |
| 38 | + List<AsraDaily> asraDailies = asraDailyDao.queryAsraDailyList(asraDailyQueryReq); | |
| 39 | + if(CollectionUtil.isNotEmpty(asraDailies)){ | |
| 40 | + BeanUtils.copyProperties(asraDailies,asraDailyDTOs,AsraDailyDTO.class); | |
| 41 | + } | |
| 42 | + return new BizResult<>(asraDailyDTOs); | |
| 43 | + } | |
| 44 | +} | ... | ... |
src/main/java/com/zteits/oa/report/biz/AsraOpRelationsQueryServiceImpl.java
| 1 | 1 | package com.zteits.oa.report.biz; |
| 2 | 2 | |
| 3 | +import com.xiaoleilu.hutool.util.CollectionUtil; | |
| 3 | 4 | import com.zteits.oa.api.base.bean.BizResult; |
| 4 | 5 | import com.zteits.oa.api.dto.asraoprelations.AsraOpRelationsDTO; |
| 5 | 6 | import com.zteits.oa.api.dto.asraoprelations.param.AsraOpRelationsQueryReq; |
| ... | ... | @@ -36,7 +37,9 @@ public class AsraOpRelationsQueryServiceImpl implements AsraOpRelationsQueryServ |
| 36 | 37 | |
| 37 | 38 | List<AsraOpRelationsDTO> asraOpRelationsDTOs = new ArrayList<>(); |
| 38 | 39 | List<AsraOpRelations> asraOpRelationsList = asraOpRelationsDao.queryAsraOpRelations(asraOpRelationsQueryReq.getParentId()); |
| 39 | - BeanUtils.copyProperties(asraOpRelationsList,asraOpRelationsDTOs,AsraOpRelationsDTO.class); | |
| 40 | + if(CollectionUtil.isNotEmpty(asraOpRelationsList)) { | |
| 41 | + BeanUtils.copyProperties(asraOpRelationsList, asraOpRelationsDTOs, AsraOpRelationsDTO.class); | |
| 42 | + } | |
| 40 | 43 | return new BizResult<>(asraOpRelationsDTOs); |
| 41 | 44 | } |
| 42 | 45 | } | ... | ... |
src/main/java/com/zteits/oa/report/dao/AsraDailyDao.java
0 → 100644
| 1 | +package com.zteits.oa.report.dao; | |
| 2 | + | |
| 3 | +import com.zteits.oa.api.dto.asradaily.param.AsraDailyQueryReq; | |
| 4 | +import com.zteits.oa.report.domain.AsraDaily; | |
| 5 | + | |
| 6 | +import java.util.List; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * Copyright: Copyright (c) 2018 zteits | |
| 10 | + * | |
| 11 | + * @Description: | |
| 12 | + * @version: v1.0.0 | |
| 13 | + * @author: xiejianpeng | |
| 14 | + * @date: 2018/7/31 15 | |
| 15 | + * Modification History: | |
| 16 | + * Date Author Version Description | |
| 17 | + * ---------------------------------------------------------* | |
| 18 | + * 2018/7/31 xiejianpeng v1.0.0 创建 | |
| 19 | + */ | |
| 20 | +public interface AsraDailyDao { | |
| 21 | + | |
| 22 | + /** | |
| 23 | + * 根据登录工号和查询时间查询日报 | |
| 24 | + * @param | |
| 25 | + * @return | |
| 26 | + * @Author: xiejianpeng | |
| 27 | + * @Date: 2018/7/31 15:22 | |
| 28 | + * | |
| 29 | + */ | |
| 30 | + List<AsraDaily> queryAsraDailyList(AsraDailyQueryReq asraDailyQueryReq); | |
| 31 | +} | ... | ... |
src/main/java/com/zteits/oa/report/dao/impl/AsraDailyDaoImpl.java
0 → 100644
| 1 | +package com.zteits.oa.report.dao.impl; | |
| 2 | + | |
| 3 | +import com.zteits.oa.api.dto.asradaily.param.AsraDailyQueryReq; | |
| 4 | +import com.zteits.oa.report.dao.AsraDailyDao; | |
| 5 | +import com.zteits.oa.report.domain.AsraDaily; | |
| 6 | +import com.zteits.oa.report.domain.AsraDailyExample; | |
| 7 | +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; | |
| 12 | + | |
| 13 | +/** | |
| 14 | + * Copyright: Copyright (c) 2018 zteits | |
| 15 | + * | |
| 16 | + * @Description: | |
| 17 | + * @version: v1.0.0 | |
| 18 | + * @author: xiejianpeng | |
| 19 | + * @date: 2018/7/31 15 | |
| 20 | + * Modification History: | |
| 21 | + * Date Author Version Description | |
| 22 | + * ---------------------------------------------------------* | |
| 23 | + * 2018/7/31 xiejianpeng v1.0.0 创建 | |
| 24 | + */ | |
| 25 | +@Component | |
| 26 | +public class AsraDailyDaoImpl implements AsraDailyDao{ | |
| 27 | + | |
| 28 | + @Autowired | |
| 29 | + private AsraDailyMapper asraDailyMapper; | |
| 30 | + | |
| 31 | + | |
| 32 | + @Override | |
| 33 | + public List<AsraDaily> queryAsraDailyList(AsraDailyQueryReq asraDailyQueryReq) { | |
| 34 | + AsraDailyExample example = new AsraDailyExample(); | |
| 35 | + example.createCriteria().andAsarOpIdEqualTo(asraDailyQueryReq.getAsarOpId()) | |
| 36 | + .andYearsEqualTo(asraDailyQueryReq.getYears()) | |
| 37 | + .andWeeksEqualTo(asraDailyQueryReq.getWeeks()); | |
| 38 | + return asraDailyMapper.selectByExample(example); | |
| 39 | + } | |
| 40 | +} | ... | ... |
src/main/java/com/zteits/oa/report/web/AsraDailyController.java
0 → 100644
| 1 | +package com.zteits.oa.report.web; | |
| 2 | + | |
| 3 | +import com.alibaba.fastjson.JSONObject; | |
| 4 | +import com.xiaoleilu.hutool.date.DateUtil; | |
| 5 | +import com.xiaoleilu.hutool.util.CollectionUtil; | |
| 6 | +import com.zteits.oa.api.base.bean.BizResult; | |
| 7 | +import com.zteits.oa.api.base.bean.PageBean; | |
| 8 | +import com.zteits.oa.api.base.constants.SessionEnum; | |
| 9 | +import com.zteits.oa.api.dto.asradaily.AsraDailyDTO; | |
| 10 | +import com.zteits.oa.api.dto.asradaily.param.AsraDailyQueryReq; | |
| 11 | +import com.zteits.oa.api.dto.asraop.AsraOpDTO; | |
| 12 | +import com.zteits.oa.api.dto.asraop.param.AsraOpQueryReq; | |
| 13 | +import com.zteits.oa.api.dto.asraoprelations.AsraOpRelationsDTO; | |
| 14 | +import com.zteits.oa.api.dto.asraoprelations.param.AsraOpRelationsQueryReq; | |
| 15 | +import com.zteits.oa.api.service.report.query.AsraDailyQueryService; | |
| 16 | +import com.zteits.oa.api.service.report.query.AsraOpQueryService; | |
| 17 | +import com.zteits.oa.api.service.report.query.AsraOpRelationsQueryService; | |
| 18 | +import com.zteits.oa.report.domain.AsraDaily; | |
| 19 | +import io.swagger.annotations.Api; | |
| 20 | +import org.slf4j.Logger; | |
| 21 | +import org.slf4j.LoggerFactory; | |
| 22 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 23 | +import org.springframework.web.bind.annotation.RequestBody; | |
| 24 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 25 | +import org.springframework.web.bind.annotation.RequestMethod; | |
| 26 | +import org.springframework.web.bind.annotation.RestController; | |
| 27 | + | |
| 28 | +import javax.servlet.http.HttpServletRequest; | |
| 29 | +import javax.servlet.http.HttpSession; | |
| 30 | +import java.util.ArrayList; | |
| 31 | +import java.util.Date; | |
| 32 | +import java.util.List; | |
| 33 | + | |
| 34 | +@Api(value = "日报系统-日报管理", description = "日报系统-日报管理") | |
| 35 | +@RestController | |
| 36 | +@RequestMapping("/asraDaily") | |
| 37 | +public class AsraDailyController { | |
| 38 | + | |
| 39 | + private static final Logger logger = LoggerFactory.getLogger(AsraDailyController.class); | |
| 40 | + | |
| 41 | + @Autowired | |
| 42 | + private AsraOpQueryService asraOpQueryService; | |
| 43 | + | |
| 44 | + @Autowired | |
| 45 | + private AsraDailyQueryService asraDailyQueryService; | |
| 46 | + | |
| 47 | + | |
| 48 | + @RequestMapping(value="/queryAsraDailyList",method = RequestMethod.POST) | |
| 49 | + public BizResult<List<AsraDailyDTO>> queryAsraDailyList(@RequestBody AsraDailyQueryReq asraDailyQueryReq, HttpServletRequest request){ | |
| 50 | + logger.info("日报系统-日报管理-根据登录人分页查询员工信息入参:{}", JSONObject.toJSON(asraDailyQueryReq)); | |
| 51 | + /**1.根据当前登录人查询登录人下面管理的员工-缓存中获取*/ | |
| 52 | + AsraOpDTO asraOpDTO = (AsraOpDTO)request.getSession().getAttribute(SessionEnum.USER_INFO.key()); | |
| 53 | + | |
| 54 | + /**2.判断登录人和时间查询日报*/ | |
| 55 | + Date dailyDate = asraDailyQueryReq.getDailyDate(); | |
| 56 | + Integer week = DateUtil.weekOfYear(dailyDate);//第N周 | |
| 57 | + Integer year = DateUtil.year(dailyDate);//第N周 | |
| 58 | + asraDailyQueryReq.setAsarOpId(asraOpDTO.getId()); | |
| 59 | + asraDailyQueryReq.setWeeks(week); | |
| 60 | + asraDailyQueryReq.setYears(year); | |
| 61 | + BizResult<List<AsraDailyDTO>> result = asraDailyQueryService.queryAsraDailyList(asraDailyQueryReq); | |
| 62 | + logger.info("日报系统-日报管理-根据登录人分页查询员工信息结束"); | |
| 63 | + return result; | |
| 64 | + } | |
| 65 | + | |
| 66 | +} | ... | ... |
src/main/java/com/zteits/oa/report/web/AsraOpController.java
| ... | ... | @@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject; |
| 4 | 4 | import com.xiaoleilu.hutool.util.CollectionUtil; |
| 5 | 5 | import com.zteits.oa.api.base.bean.BizResult; |
| 6 | 6 | import com.zteits.oa.api.base.bean.PageBean; |
| 7 | +import com.zteits.oa.api.base.constants.SessionEnum; | |
| 7 | 8 | import com.zteits.oa.api.dto.asraop.AsraOpDTO; |
| 8 | 9 | import com.zteits.oa.api.dto.asraop.param.AsraOpQueryReq; |
| 9 | 10 | import com.zteits.oa.api.dto.asraoprelations.AsraOpRelationsDTO; |
| ... | ... | @@ -21,6 +22,7 @@ import org.springframework.web.bind.annotation.RequestMethod; |
| 21 | 22 | import org.springframework.web.bind.annotation.RestController; |
| 22 | 23 | |
| 23 | 24 | import javax.servlet.http.HttpServletRequest; |
| 25 | +import javax.servlet.http.HttpSession; | |
| 24 | 26 | import java.util.ArrayList; |
| 25 | 27 | import java.util.List; |
| 26 | 28 | |
| ... | ... | @@ -45,8 +47,7 @@ public class AsraOpController { |
| 45 | 47 | public BizResult<PageBean<AsraOpDTO>> queryAsraOpPage(@RequestBody AsraOpQueryReq asraOpQueryReq, HttpServletRequest request){ |
| 46 | 48 | logger.info("日报系统-员工管理-根据登录人分页查询员工信息入参:{}", JSONObject.toJSON(asraOpQueryReq)); |
| 47 | 49 | /**1.根据当前登录人查询登录人下面管理的员工-缓存中获取*/ |
| 48 | - | |
| 49 | - AsraOpDTO asraOpDTO = null; | |
| 50 | + AsraOpDTO asraOpDTO = (AsraOpDTO)request.getSession().getAttribute(SessionEnum.USER_INFO.key()); | |
| 50 | 51 | |
| 51 | 52 | /**2.判断登录人是领导还是员工 ,2:员工,1:领导*/ |
| 52 | 53 | List<Long> opIdLists = new ArrayList<>(); |
| ... | ... | @@ -62,6 +63,7 @@ public class AsraOpController { |
| 62 | 63 | } |
| 63 | 64 | } |
| 64 | 65 | } |
| 66 | + asraOpQueryReq.setOpIdLists(opIdLists); | |
| 65 | 67 | BizResult<PageBean<AsraOpDTO>> result = asraOpQueryService.queryAsraOpForPage(asraOpQueryReq); |
| 66 | 68 | logger.info("日报系统-员工管理-根据登录人分页查询员工信息结果:{}", JSONObject.toJSON(result)); |
| 67 | 69 | return result; | ... | ... |