Commit c849dbc7c9b55fb1558286e58fcd1a42eca68ba2
1 parent
d365b3fa
提交
Showing
8 changed files
with
373 additions
and
2 deletions
src/main/java/com/zteits/oa/api/dto/asraproject/AsraProjectDTO.java
0 → 100644
1 | +package com.zteits.oa.api.dto.asraproject; | |
2 | + | |
3 | +import java.util.Date; | |
4 | + | |
5 | +import com.zteits.oa.api.base.bean.BaiscDTO; | |
6 | + | |
7 | +public class AsraProjectDTO extends BaiscDTO{ | |
8 | + | |
9 | + /** | |
10 | + * | |
11 | + */ | |
12 | + private static final long serialVersionUID = 3152174907885812120L; | |
13 | + | |
14 | + /**主键*/ | |
15 | + private Long id; | |
16 | + | |
17 | + /**项目名称*/ | |
18 | + private String projecName; | |
19 | + | |
20 | + /**省份ID*/ | |
21 | + private Long provId; | |
22 | + | |
23 | + /**省份名称*/ | |
24 | + private String provName; | |
25 | + | |
26 | + /**地市ID*/ | |
27 | + private Long cityId; | |
28 | + | |
29 | + /**地市名称*/ | |
30 | + private String cityName; | |
31 | + | |
32 | + /**排序*/ | |
33 | + private Integer sortNum; | |
34 | + | |
35 | + /**数据状态:1有效,0无效,2:锁定*/ | |
36 | + private Integer dataState; | |
37 | + | |
38 | + /**创建人ID*/ | |
39 | + private String createEmpid; | |
40 | + | |
41 | + /**创建人*/ | |
42 | + private String createEmpName; | |
43 | + | |
44 | + /**创建时间*/ | |
45 | + private Date createDate; | |
46 | + | |
47 | + /**修改人*/ | |
48 | + private String modfiyEmpid; | |
49 | + | |
50 | + /**修改人*/ | |
51 | + private String modfiyEmpName; | |
52 | + | |
53 | + /**修改时间*/ | |
54 | + private Date modfiyDate; | |
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 | + /**获取项目名称*/ | |
67 | + public String getProjecName() { | |
68 | + return projecName; | |
69 | + } | |
70 | + | |
71 | + /**设置项目名称*/ | |
72 | + public void setProjecName(String projecName) { | |
73 | + this.projecName = projecName == null ? null : projecName.trim(); | |
74 | + } | |
75 | + | |
76 | + /**获取省份ID*/ | |
77 | + public Long getProvId() { | |
78 | + return provId; | |
79 | + } | |
80 | + | |
81 | + /**设置省份ID*/ | |
82 | + public void setProvId(Long provId) { | |
83 | + this.provId = provId; | |
84 | + } | |
85 | + | |
86 | + /**获取省份名称*/ | |
87 | + public String getProvName() { | |
88 | + return provName; | |
89 | + } | |
90 | + | |
91 | + /**设置省份名称*/ | |
92 | + public void setProvName(String provName) { | |
93 | + this.provName = provName == null ? null : provName.trim(); | |
94 | + } | |
95 | + | |
96 | + /**获取地市ID*/ | |
97 | + public Long getCityId() { | |
98 | + return cityId; | |
99 | + } | |
100 | + | |
101 | + /**设置地市ID*/ | |
102 | + public void setCityId(Long cityId) { | |
103 | + this.cityId = cityId; | |
104 | + } | |
105 | + | |
106 | + /**获取地市名称*/ | |
107 | + public String getCityName() { | |
108 | + return cityName; | |
109 | + } | |
110 | + | |
111 | + /**设置地市名称*/ | |
112 | + public void setCityName(String cityName) { | |
113 | + this.cityName = cityName == null ? null : cityName.trim(); | |
114 | + } | |
115 | + | |
116 | + /**获取排序*/ | |
117 | + public Integer getSortNum() { | |
118 | + return sortNum; | |
119 | + } | |
120 | + | |
121 | + /**设置排序*/ | |
122 | + public void setSortNum(Integer sortNum) { | |
123 | + this.sortNum = sortNum; | |
124 | + } | |
125 | + | |
126 | + /**获取数据状态:1有效,0无效,2:锁定*/ | |
127 | + public Integer getDataState() { | |
128 | + return dataState; | |
129 | + } | |
130 | + | |
131 | + /**设置数据状态:1有效,0无效,2:锁定*/ | |
132 | + public void setDataState(Integer dataState) { | |
133 | + this.dataState = dataState; | |
134 | + } | |
135 | + | |
136 | + /**获取创建人ID*/ | |
137 | + public String getCreateEmpid() { | |
138 | + return createEmpid; | |
139 | + } | |
140 | + | |
141 | + /**设置创建人ID*/ | |
142 | + public void setCreateEmpid(String createEmpid) { | |
143 | + this.createEmpid = createEmpid == null ? null : createEmpid.trim(); | |
144 | + } | |
145 | + | |
146 | + /**获取创建人*/ | |
147 | + public String getCreateEmpName() { | |
148 | + return createEmpName; | |
149 | + } | |
150 | + | |
151 | + /**设置创建人*/ | |
152 | + public void setCreateEmpName(String createEmpName) { | |
153 | + this.createEmpName = createEmpName == null ? null : createEmpName.trim(); | |
154 | + } | |
155 | + | |
156 | + /**获取创建时间*/ | |
157 | + public Date getCreateDate() { | |
158 | + return createDate; | |
159 | + } | |
160 | + | |
161 | + /**设置创建时间*/ | |
162 | + public void setCreateDate(Date createDate) { | |
163 | + this.createDate = createDate; | |
164 | + } | |
165 | + | |
166 | + /**获取修改人*/ | |
167 | + public String getModfiyEmpid() { | |
168 | + return modfiyEmpid; | |
169 | + } | |
170 | + | |
171 | + /**设置修改人*/ | |
172 | + public void setModfiyEmpid(String modfiyEmpid) { | |
173 | + this.modfiyEmpid = modfiyEmpid == null ? null : modfiyEmpid.trim(); | |
174 | + } | |
175 | + | |
176 | + /**获取修改人*/ | |
177 | + public String getModfiyEmpName() { | |
178 | + return modfiyEmpName; | |
179 | + } | |
180 | + | |
181 | + /**设置修改人*/ | |
182 | + public void setModfiyEmpName(String modfiyEmpName) { | |
183 | + this.modfiyEmpName = modfiyEmpName == null ? null : modfiyEmpName.trim(); | |
184 | + } | |
185 | + | |
186 | + /**获取修改时间*/ | |
187 | + public Date getModfiyDate() { | |
188 | + return modfiyDate; | |
189 | + } | |
190 | + | |
191 | + /**设置修改时间*/ | |
192 | + public void setModfiyDate(Date modfiyDate) { | |
193 | + this.modfiyDate = modfiyDate; | |
194 | + } | |
195 | +} | ... | ... |
src/main/java/com/zteits/oa/api/dto/param/AsraProjecQueryReq.java
0 → 100644
1 | +package com.zteits.oa.api.dto.param; | |
2 | + | |
3 | +import java.io.Serializable; | |
4 | + | |
5 | +public class AsraProjecQueryReq implements Serializable{ | |
6 | + | |
7 | + /** | |
8 | + * | |
9 | + */ | |
10 | + private static final long serialVersionUID = -1027953868018050888L; | |
11 | + /**主键*/ | |
12 | + private Long id; | |
13 | + | |
14 | + public Long getId() { | |
15 | + return id; | |
16 | + } | |
17 | + | |
18 | + public void setId(Long id) { | |
19 | + this.id = id; | |
20 | + } | |
21 | + | |
22 | +} | ... | ... |
src/main/java/com/zteits/oa/api/service/report/query/AsraProjectService.java
0 → 100644
1 | +package com.zteits.oa.api.service.report.query; | |
2 | + | |
3 | +import java.util.List; | |
4 | + | |
5 | +import com.zteits.oa.api.base.bean.BizResult; | |
6 | +import com.zteits.oa.api.dto.asraproject.AsraProjectDTO; | |
7 | +import com.zteits.oa.api.dto.param.AsraProjecQueryReq; | |
8 | + | |
9 | +public interface AsraProjectService { | |
10 | + | |
11 | + | |
12 | + /** | |
13 | + * 项目信息查询.<br/> | |
14 | + * @param asraOpQueryReq | |
15 | + * @return | |
16 | + * 2018年7月30日 wangfs.<br/> | |
17 | + */ | |
18 | + BizResult<List<AsraProjectDTO>> queryAsraProjectForList(AsraProjecQueryReq asraProjecQueryReq); | |
19 | +} | ... | ... |
src/main/java/com/zteits/oa/report/biz/AsraProjectServiceImpl.java
0 → 100644
1 | +package com.zteits.oa.report.biz; | |
2 | + | |
3 | +import java.util.ArrayList; | |
4 | +import java.util.List; | |
5 | + | |
6 | +import org.slf4j.Logger; | |
7 | +import org.slf4j.LoggerFactory; | |
8 | +import org.springframework.beans.factory.annotation.Autowired; | |
9 | +import org.springframework.stereotype.Service; | |
10 | + | |
11 | +import com.alibaba.fastjson.JSONObject; | |
12 | +import com.zteits.oa.api.base.bean.BizResult; | |
13 | +import com.zteits.oa.api.dto.asraproject.AsraProjectDTO; | |
14 | +import com.zteits.oa.api.dto.param.AsraProjecQueryReq; | |
15 | +import com.zteits.oa.api.service.report.query.AsraProjectService; | |
16 | +import com.zteits.oa.report.dao.AsraProjectDao; | |
17 | +import com.zteits.oa.report.domain.AsraProject; | |
18 | +import com.zteits.oa.util.ListCopyUtil; | |
19 | +@Service("com.zteits.oa.report.biz.AsraProjectServiceImpl") | |
20 | +public class AsraProjectServiceImpl implements AsraProjectService { | |
21 | + | |
22 | + private static final Logger logger = LoggerFactory.getLogger(AsraProjectServiceImpl.class); | |
23 | + | |
24 | + @Autowired | |
25 | + private AsraProjectDao asraProjectDao; | |
26 | + /** | |
27 | + * 项目信息查询.<br/> | |
28 | + * @param asraOpQueryReq | |
29 | + * @return | |
30 | + * 2018年7月30日 wangfs.<br/> | |
31 | + */ | |
32 | + @Override | |
33 | + public BizResult<List<AsraProjectDTO>> queryAsraProjectForList(AsraProjecQueryReq asraProjecQueryReq) { | |
34 | + logger.info("---begin查询项目信息list,入参={}",JSONObject.toJSON(asraProjecQueryReq)); | |
35 | + List<AsraProjectDTO> listDTO = new ArrayList<>(); | |
36 | + List<AsraProject> list = asraProjectDao.queryAsraProjectForList(asraProjecQueryReq); | |
37 | + ListCopyUtil.listCopyProperties(list, listDTO, AsraProjectDTO.class); | |
38 | + logger.info("---begin查询项目信息list"); | |
39 | + return new BizResult<List<AsraProjectDTO>>(listDTO); | |
40 | + } | |
41 | + | |
42 | +} | ... | ... |
src/main/java/com/zteits/oa/report/dao/AsraProjectDao.java
0 → 100644
1 | +package com.zteits.oa.report.dao; | |
2 | + | |
3 | +import java.util.List; | |
4 | + | |
5 | +import com.zteits.oa.api.dto.param.AsraProjecQueryReq; | |
6 | +import com.zteits.oa.report.domain.AsraProject; | |
7 | + | |
8 | +public interface AsraProjectDao { | |
9 | + | |
10 | + /** | |
11 | + * 项目信息查询.<br/> | |
12 | + * @param asraOpQueryReq | |
13 | + * @return | |
14 | + * 2018年7月30日 wangfs.<br/> | |
15 | + */ | |
16 | + public List<AsraProject> queryAsraProjectForList(AsraProjecQueryReq asraProjecQueryReq); | |
17 | +} | ... | ... |
src/main/java/com/zteits/oa/report/dao/impl/AsraProjectDaoImpl.java
0 → 100644
1 | +package com.zteits.oa.report.dao.impl; | |
2 | + | |
3 | +import java.util.List; | |
4 | + | |
5 | +import org.springframework.beans.factory.annotation.Autowired; | |
6 | +import org.springframework.stereotype.Component; | |
7 | + | |
8 | +import com.zteits.oa.api.dto.param.AsraProjecQueryReq; | |
9 | +import com.zteits.oa.report.dao.AsraProjectDao; | |
10 | +import com.zteits.oa.report.domain.AsraProject; | |
11 | +import com.zteits.oa.report.domain.AsraProjectExample; | |
12 | +import com.zteits.oa.report.domain.AsraProjectExample.Criteria; | |
13 | +import com.zteits.oa.report.mapper.AsraProjectMapper; | |
14 | +@Component | |
15 | +public class AsraProjectDaoImpl implements AsraProjectDao{ | |
16 | + | |
17 | + @Autowired | |
18 | + private AsraProjectMapper asraProjectMapper; | |
19 | + /** | |
20 | + * 项目信息查询.<br/> | |
21 | + * @param asraOpQueryReq | |
22 | + * @return | |
23 | + * 2018年7月30日 wangfs.<br/> | |
24 | + */ | |
25 | + @Override | |
26 | + public List<AsraProject> queryAsraProjectForList(AsraProjecQueryReq asraProjecQueryReq) { | |
27 | + AsraProjectExample example = new AsraProjectExample(); | |
28 | + Criteria createCriteria = example.createCriteria(); | |
29 | + if(asraProjecQueryReq.getId() != null){ | |
30 | + createCriteria.andIdEqualTo(asraProjecQueryReq.getId()); | |
31 | + } | |
32 | + example.setOrderByClause(" sort_num asc"); | |
33 | + List<AsraProject> list = asraProjectMapper.selectByExample(example); | |
34 | + return list; | |
35 | + } | |
36 | + | |
37 | +} | ... | ... |
src/main/java/com/zteits/oa/report/web/AsraProjectController.java
0 → 100644
1 | +package com.zteits.oa.report.web; | |
2 | + | |
3 | +import java.util.List; | |
4 | + | |
5 | +import javax.servlet.http.HttpServletRequest; | |
6 | + | |
7 | +import org.slf4j.Logger; | |
8 | +import org.slf4j.LoggerFactory; | |
9 | +import org.springframework.beans.factory.annotation.Autowired; | |
10 | +import org.springframework.web.bind.annotation.RequestBody; | |
11 | +import org.springframework.web.bind.annotation.RequestMapping; | |
12 | +import org.springframework.web.bind.annotation.RestController; | |
13 | + | |
14 | +import com.alibaba.fastjson.JSONObject; | |
15 | +import com.zteits.oa.api.base.bean.BizResult; | |
16 | +import com.zteits.oa.api.dto.asraproject.AsraProjectDTO; | |
17 | +import com.zteits.oa.api.dto.param.AsraProjecQueryReq; | |
18 | +import com.zteits.oa.api.service.report.query.AsraProjectService; | |
19 | + | |
20 | +import io.swagger.annotations.Api; | |
21 | +import io.swagger.annotations.ApiOperation; | |
22 | + | |
23 | +@Api(value = "日报系统-项目管理", description = "日报系统-项目管理") | |
24 | +@RestController | |
25 | +@RequestMapping("/asraProject") | |
26 | +public class AsraProjectController { | |
27 | + private Logger logger = LoggerFactory.getLogger(AsraProjectController.class); | |
28 | + | |
29 | + @Autowired | |
30 | + private AsraProjectService asraProjectService; | |
31 | + | |
32 | + @RequestMapping("/queryAsraProjectForList") | |
33 | + @ApiOperation("查询项目信息list") | |
34 | + public BizResult<List<AsraProjectDTO>> queryAsraProjectForList(@RequestBody AsraProjecQueryReq asraProjecQueryReq,HttpServletRequest request){ | |
35 | + logger.info("---begin调用项目信息service,入参={}",JSONObject.toJSON(asraProjecQueryReq)); | |
36 | + BizResult<List<AsraProjectDTO>> result = asraProjectService.queryAsraProjectForList(asraProjecQueryReq); | |
37 | + logger.info("---begin调用项目信息service..."); | |
38 | + | |
39 | + return result; | |
40 | + } | |
41 | +} | ... | ... |
src/main/java/com/zteits/oa/report/web/OAuthController.java
... | ... | @@ -11,10 +11,8 @@ import org.springframework.util.StringUtils; |
11 | 11 | import org.springframework.web.bind.annotation.PostMapping; |
12 | 12 | import org.springframework.web.bind.annotation.RequestBody; |
13 | 13 | import org.springframework.web.bind.annotation.RequestMapping; |
14 | -import org.springframework.web.bind.annotation.RequestMethod; | |
15 | 14 | import org.springframework.web.bind.annotation.RestController; |
16 | 15 | |
17 | -import com.alibaba.fastjson.JSONObject; | |
18 | 16 | import com.zteits.oa.api.base.bean.BizResult; |
19 | 17 | import com.zteits.oa.api.base.constants.ErrorType; |
20 | 18 | import com.zteits.oa.api.base.constants.SessionEnum; | ... | ... |