Commit b0c576edeab6f8e9ffc0f32d8973c5d9336ff345
Merge branch 'branch0730' of
http://192.168.1.195:9998/ZTEITS-Developers/zteits-oa.git into branch0730 Conflicts: src/main/java/com/zteits/oa/report/web/OAuthController.java
Showing
15 changed files
with
449 additions
and
15 deletions
.idea/uiDesigner.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<project version="4"> | ||
3 | + <component name="Palette2"> | ||
4 | + <group name="Swing"> | ||
5 | + <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false"> | ||
6 | + <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" /> | ||
7 | + </item> | ||
8 | + <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false"> | ||
9 | + <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" /> | ||
10 | + </item> | ||
11 | + <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false"> | ||
12 | + <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" /> | ||
13 | + </item> | ||
14 | + <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true"> | ||
15 | + <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" /> | ||
16 | + </item> | ||
17 | + <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false"> | ||
18 | + <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" /> | ||
19 | + <initial-values> | ||
20 | + <property name="text" value="Button" /> | ||
21 | + </initial-values> | ||
22 | + </item> | ||
23 | + <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false"> | ||
24 | + <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" /> | ||
25 | + <initial-values> | ||
26 | + <property name="text" value="RadioButton" /> | ||
27 | + </initial-values> | ||
28 | + </item> | ||
29 | + <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false"> | ||
30 | + <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" /> | ||
31 | + <initial-values> | ||
32 | + <property name="text" value="CheckBox" /> | ||
33 | + </initial-values> | ||
34 | + </item> | ||
35 | + <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false"> | ||
36 | + <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" /> | ||
37 | + <initial-values> | ||
38 | + <property name="text" value="Label" /> | ||
39 | + </initial-values> | ||
40 | + </item> | ||
41 | + <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true"> | ||
42 | + <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> | ||
43 | + <preferred-size width="150" height="-1" /> | ||
44 | + </default-constraints> | ||
45 | + </item> | ||
46 | + <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true"> | ||
47 | + <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> | ||
48 | + <preferred-size width="150" height="-1" /> | ||
49 | + </default-constraints> | ||
50 | + </item> | ||
51 | + <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true"> | ||
52 | + <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> | ||
53 | + <preferred-size width="150" height="-1" /> | ||
54 | + </default-constraints> | ||
55 | + </item> | ||
56 | + <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true"> | ||
57 | + <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> | ||
58 | + <preferred-size width="150" height="50" /> | ||
59 | + </default-constraints> | ||
60 | + </item> | ||
61 | + <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true"> | ||
62 | + <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> | ||
63 | + <preferred-size width="150" height="50" /> | ||
64 | + </default-constraints> | ||
65 | + </item> | ||
66 | + <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true"> | ||
67 | + <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> | ||
68 | + <preferred-size width="150" height="50" /> | ||
69 | + </default-constraints> | ||
70 | + </item> | ||
71 | + <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true"> | ||
72 | + <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" /> | ||
73 | + </item> | ||
74 | + <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false"> | ||
75 | + <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> | ||
76 | + <preferred-size width="150" height="50" /> | ||
77 | + </default-constraints> | ||
78 | + </item> | ||
79 | + <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false"> | ||
80 | + <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3"> | ||
81 | + <preferred-size width="150" height="50" /> | ||
82 | + </default-constraints> | ||
83 | + </item> | ||
84 | + <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false"> | ||
85 | + <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> | ||
86 | + <preferred-size width="150" height="50" /> | ||
87 | + </default-constraints> | ||
88 | + </item> | ||
89 | + <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false"> | ||
90 | + <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3"> | ||
91 | + <preferred-size width="200" height="200" /> | ||
92 | + </default-constraints> | ||
93 | + </item> | ||
94 | + <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false"> | ||
95 | + <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3"> | ||
96 | + <preferred-size width="200" height="200" /> | ||
97 | + </default-constraints> | ||
98 | + </item> | ||
99 | + <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true"> | ||
100 | + <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" /> | ||
101 | + </item> | ||
102 | + <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false"> | ||
103 | + <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" /> | ||
104 | + </item> | ||
105 | + <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false"> | ||
106 | + <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" /> | ||
107 | + </item> | ||
108 | + <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false"> | ||
109 | + <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" /> | ||
110 | + </item> | ||
111 | + <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false"> | ||
112 | + <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1"> | ||
113 | + <preferred-size width="-1" height="20" /> | ||
114 | + </default-constraints> | ||
115 | + </item> | ||
116 | + <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false"> | ||
117 | + <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" /> | ||
118 | + </item> | ||
119 | + <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false"> | ||
120 | + <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" /> | ||
121 | + </item> | ||
122 | + </group> | ||
123 | + </component> | ||
124 | +</project> | ||
0 | \ No newline at end of file | 125 | \ No newline at end of file |
src/main/java/com/zteits/oa/api/dto/asraop/param/AsraOpQueryReq.java
@@ -2,6 +2,8 @@ package com.zteits.oa.api.dto.asraop.param; | @@ -2,6 +2,8 @@ package com.zteits.oa.api.dto.asraop.param; | ||
2 | 2 | ||
3 | import com.zteits.oa.api.base.bean.BaseRequest; | 3 | import com.zteits.oa.api.base.bean.BaseRequest; |
4 | 4 | ||
5 | +import java.util.List; | ||
6 | + | ||
5 | public class AsraOpQueryReq extends BaseRequest{ | 7 | public class AsraOpQueryReq extends BaseRequest{ |
6 | 8 | ||
7 | /** | 9 | /** |
@@ -12,7 +14,7 @@ public class AsraOpQueryReq extends BaseRequest{ | @@ -12,7 +14,7 @@ public class AsraOpQueryReq extends BaseRequest{ | ||
12 | /**主键*/ | 14 | /**主键*/ |
13 | private Long id; | 15 | private Long id; |
14 | 16 | ||
15 | - /**登录工号*/ | 17 | + /**当前登录人的登录工号*/ |
16 | private String loginCode; | 18 | private String loginCode; |
17 | 19 | ||
18 | /**登录密码*/ | 20 | /**登录密码*/ |
@@ -25,6 +27,18 @@ public class AsraOpQueryReq extends BaseRequest{ | @@ -25,6 +27,18 @@ public class AsraOpQueryReq extends BaseRequest{ | ||
25 | private String email; | 27 | private String email; |
26 | 28 | ||
27 | 29 | ||
30 | + /**员工idlist*/ | ||
31 | + private List<Long> opIdLists; | ||
32 | + | ||
33 | + | ||
34 | + public List<Long> getOpIdLists() { | ||
35 | + return opIdLists; | ||
36 | + } | ||
37 | + | ||
38 | + public void setOpIdLists(List<Long> opIdLists) { | ||
39 | + this.opIdLists = opIdLists; | ||
40 | + } | ||
41 | + | ||
28 | public String getLoginCode() { | 42 | public String getLoginCode() { |
29 | return loginCode; | 43 | return loginCode; |
30 | } | 44 | } |
src/main/java/com/zteits/oa/api/dto/asraoprelations/AsraOpRelationsDTO.java
0 → 100644
1 | +package com.zteits.oa.api.dto.asraoprelations; | ||
2 | + | ||
3 | +import com.zteits.oa.api.base.bean.BaiscDTO; | ||
4 | + | ||
5 | +public class AsraOpRelationsDTO extends BaiscDTO { | ||
6 | + | ||
7 | + /**父级ID*/ | ||
8 | + private Long parentId; | ||
9 | + | ||
10 | + /**员工ID*/ | ||
11 | + private Long opId; | ||
12 | + | ||
13 | + /**数据状态:1有效,0无效,2:锁定*/ | ||
14 | + private Integer dataState; | ||
15 | + | ||
16 | + /**获取父级ID*/ | ||
17 | + public Long getParentId() { | ||
18 | + return parentId; | ||
19 | + } | ||
20 | + | ||
21 | + /**设置父级ID*/ | ||
22 | + public void setParentId(Long parentId) { | ||
23 | + this.parentId = parentId; | ||
24 | + } | ||
25 | + | ||
26 | + /**获取员工ID*/ | ||
27 | + public Long getOpId() { | ||
28 | + return opId; | ||
29 | + } | ||
30 | + | ||
31 | + /**设置员工ID*/ | ||
32 | + public void setOpId(Long opId) { | ||
33 | + this.opId = opId; | ||
34 | + } | ||
35 | + | ||
36 | + /**获取数据状态:1有效,0无效,2:锁定*/ | ||
37 | + public Integer getDataState() { | ||
38 | + return dataState; | ||
39 | + } | ||
40 | + | ||
41 | + /**设置数据状态:1有效,0无效,2:锁定*/ | ||
42 | + public void setDataState(Integer dataState) { | ||
43 | + this.dataState = dataState; | ||
44 | + } | ||
45 | +} | ||
0 | \ No newline at end of file | 46 | \ No newline at end of file |
src/main/java/com/zteits/oa/api/dto/asraoprelations/param/AsraOpRelationsQueryReq.java
0 → 100644
1 | +package com.zteits.oa.api.dto.asraoprelations.param; | ||
2 | + | ||
3 | +import com.zteits.oa.api.base.bean.BaseRequest; | ||
4 | + | ||
5 | +public class AsraOpRelationsQueryReq extends BaseRequest { | ||
6 | + | ||
7 | + /**父级ID*/ | ||
8 | + private Long parentId; | ||
9 | + | ||
10 | + /**获取父级ID*/ | ||
11 | + public Long getParentId() { | ||
12 | + return parentId; | ||
13 | + } | ||
14 | + | ||
15 | + /**设置父级ID*/ | ||
16 | + public void setParentId(Long parentId) { | ||
17 | + this.parentId = parentId; | ||
18 | + } | ||
19 | + | ||
20 | +} | ||
0 | \ No newline at end of file | 21 | \ No newline at end of file |
src/main/java/com/zteits/oa/api/service/report/query/AsraOpRueryService.java renamed to src/main/java/com/zteits/oa/api/service/report/query/AsraOpQueryService.java
@@ -23,7 +23,7 @@ import com.zteits.oa.api.dto.asraop.param.AsraOpQueryReq; | @@ -23,7 +23,7 @@ import com.zteits.oa.api.dto.asraop.param.AsraOpQueryReq; | ||
23 | 23 | ||
24 | 24 | ||
25 | 25 | ||
26 | -public interface AsraOpRueryService { | 26 | +public interface AsraOpQueryService { |
27 | 27 | ||
28 | /** | 28 | /** |
29 | * 分页查询工时系统员工信息.<br/> | 29 | * 分页查询工时系统员工信息.<br/> |
@@ -40,4 +40,14 @@ public interface AsraOpRueryService { | @@ -40,4 +40,14 @@ public interface AsraOpRueryService { | ||
40 | */ | 40 | */ |
41 | BizResult<AsraOpDTO> queryAsraOp(AsraOpQueryReq asraOpQueryRe); | 41 | BizResult<AsraOpDTO> queryAsraOp(AsraOpQueryReq asraOpQueryRe); |
42 | 42 | ||
43 | + | ||
44 | + /** | ||
45 | + * 根据登录工号查询员工信息 | ||
46 | + * @param | ||
47 | + * @return | ||
48 | + * @Author: xiejianpeng | ||
49 | + * @Date: 2018/7/31 10:33 | ||
50 | + * | ||
51 | + */ | ||
52 | + BizResult<AsraOpDTO> queryAsraOpByLoginCode(AsraOpQueryReq asraOpQueryReq); | ||
43 | } | 53 | } |
src/main/java/com/zteits/oa/api/service/report/query/AsraOpRelationsQueryService.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.asraop.AsraOpDTO; | ||
6 | +import com.zteits.oa.api.dto.asraop.param.AsraOpQueryReq; | ||
7 | +import com.zteits.oa.api.dto.asraoprelations.AsraOpRelationsDTO; | ||
8 | +import com.zteits.oa.api.dto.asraoprelations.param.AsraOpRelationsQueryReq; | ||
9 | + | ||
10 | +import java.util.List; | ||
11 | + | ||
12 | +/** | ||
13 | + * 员工关系表查询service.<br/> | ||
14 | + * | ||
15 | + * Copyright: Copyright (c) 2017 ZTE-ITS | ||
16 | + * | ||
17 | + * @ClassName: AmountUtils.java | ||
18 | + * @Description: | ||
19 | + * @version: v1.0.0 | ||
20 | + * @author: wangfs | ||
21 | + * @date: 2018年7月30日 | ||
22 | + * Modification History: | ||
23 | + * Date Author Version Description | ||
24 | + *---------------------------------------------------------* | ||
25 | + * 2018年7月30日 xiejp v1.0.0 创建 | ||
26 | + */ | ||
27 | +public interface AsraOpRelationsQueryService { | ||
28 | + | ||
29 | + /** | ||
30 | + * 根据登录工号查询管理的员工信息 | ||
31 | + * @param | ||
32 | + * @return | ||
33 | + * @Author: xiejianpeng | ||
34 | + * @Date: 2018/7/31 10:33 | ||
35 | + * | ||
36 | + */ | ||
37 | + BizResult<List<AsraOpRelationsDTO>> queryAsraOpRelations(AsraOpRelationsQueryReq asraOpRelationsQueryReq); | ||
38 | +} |
src/main/java/com/zteits/oa/report/biz/AsraOpRueryServiceImpl.java renamed to src/main/java/com/zteits/oa/report/biz/AsraOpQueryServiceImpl.java
@@ -12,7 +12,7 @@ import com.zteits.oa.api.base.bean.BizResult; | @@ -12,7 +12,7 @@ import com.zteits.oa.api.base.bean.BizResult; | ||
12 | import com.zteits.oa.api.base.bean.PageBean; | 12 | import com.zteits.oa.api.base.bean.PageBean; |
13 | import com.zteits.oa.api.dto.asraop.AsraOpDTO; | 13 | import com.zteits.oa.api.dto.asraop.AsraOpDTO; |
14 | import com.zteits.oa.api.dto.asraop.param.AsraOpQueryReq; | 14 | import com.zteits.oa.api.dto.asraop.param.AsraOpQueryReq; |
15 | -import com.zteits.oa.api.service.report.query.AsraOpRueryService; | 15 | +import com.zteits.oa.api.service.report.query.AsraOpQueryService; |
16 | import com.zteits.oa.report.dao.AsraOpDao; | 16 | import com.zteits.oa.report.dao.AsraOpDao; |
17 | import com.zteits.oa.report.domain.AsraOp; | 17 | import com.zteits.oa.report.domain.AsraOp; |
18 | import com.zteits.oa.util.pagepaper.PageBeanUtil; | 18 | import com.zteits.oa.util.pagepaper.PageBeanUtil; |
@@ -32,9 +32,9 @@ import com.zteits.oa.util.pagepaper.PageBeanUtil; | @@ -32,9 +32,9 @@ import com.zteits.oa.util.pagepaper.PageBeanUtil; | ||
32 | * 2018年7月30日 wangfs v1.0.0 创建 | 32 | * 2018年7月30日 wangfs v1.0.0 创建 |
33 | */ | 33 | */ |
34 | @Service("") | 34 | @Service("") |
35 | -public class AsraOpRueryServiceImpl implements AsraOpRueryService { | 35 | +public class AsraOpQueryServiceImpl implements AsraOpQueryService { |
36 | 36 | ||
37 | - private static final Logger logger = LoggerFactory.getLogger(AsraOpRueryServiceImpl.class); | 37 | + private static final Logger logger = LoggerFactory.getLogger(AsraOpQueryServiceImpl.class); |
38 | @Autowired | 38 | @Autowired |
39 | private AsraOpDao asraOpDao; | 39 | private AsraOpDao asraOpDao; |
40 | /** | 40 | /** |
@@ -68,4 +68,13 @@ public class AsraOpRueryServiceImpl implements AsraOpRueryService { | @@ -68,4 +68,13 @@ public class AsraOpRueryServiceImpl implements AsraOpRueryService { | ||
68 | return new BizResult<AsraOpDTO>(asraOpDTO); | 68 | return new BizResult<AsraOpDTO>(asraOpDTO); |
69 | } | 69 | } |
70 | 70 | ||
71 | + | ||
72 | + @Override | ||
73 | + public BizResult<AsraOpDTO> queryAsraOpByLoginCode(AsraOpQueryReq asraOpQueryReq) { | ||
74 | + AsraOpDTO asraOpDTO = new AsraOpDTO(); | ||
75 | + AsraOp asraOp = asraOpDao.queryAsraOpByLoginCode(asraOpQueryReq.getLoginCode()); | ||
76 | + BeanUtils.copyProperties(asraOp,asraOpDTO); | ||
77 | + return new BizResult<>(asraOpDTO); | ||
78 | + } | ||
79 | + | ||
71 | } | 80 | } |
src/main/java/com/zteits/oa/report/biz/AsraOpRelationsQueryServiceImpl.java
0 → 100644
1 | +package com.zteits.oa.report.biz; | ||
2 | + | ||
3 | +import com.zteits.oa.api.base.bean.BizResult; | ||
4 | +import com.zteits.oa.api.dto.asraoprelations.AsraOpRelationsDTO; | ||
5 | +import com.zteits.oa.api.dto.asraoprelations.param.AsraOpRelationsQueryReq; | ||
6 | +import com.zteits.oa.api.service.report.query.AsraOpRelationsQueryService; | ||
7 | +import com.zteits.oa.report.dao.AsraOpRelationsDao; | ||
8 | +import com.zteits.oa.report.domain.AsraOpRelations; | ||
9 | +import org.springframework.beans.BeanUtils; | ||
10 | +import org.springframework.beans.factory.annotation.Autowired; | ||
11 | +import org.springframework.stereotype.Service; | ||
12 | + | ||
13 | +import java.util.ArrayList; | ||
14 | +import java.util.List; | ||
15 | + | ||
16 | +/** | ||
17 | + * Copyright: Copyright (c) 2018 zteits | ||
18 | + * | ||
19 | + * @Description: | ||
20 | + * @version: v1.0.0 | ||
21 | + * @author: xiejianpeng | ||
22 | + * @date: 2018/7/31 11 | ||
23 | + * Modification History: | ||
24 | + * Date Author Version Description | ||
25 | + * ---------------------------------------------------------* | ||
26 | + * 2018/7/31 xiejianpeng v1.0.0 创建 | ||
27 | + */ | ||
28 | +@Service | ||
29 | +public class AsraOpRelationsQueryServiceImpl implements AsraOpRelationsQueryService { | ||
30 | + | ||
31 | + @Autowired | ||
32 | + private AsraOpRelationsDao asraOpRelationsDao; | ||
33 | + | ||
34 | + @Override | ||
35 | + public BizResult<List<AsraOpRelationsDTO>> queryAsraOpRelations(AsraOpRelationsQueryReq asraOpRelationsQueryReq) { | ||
36 | + | ||
37 | + List<AsraOpRelationsDTO> asraOpRelationsDTOs = new ArrayList<>(); | ||
38 | + List<AsraOpRelations> asraOpRelationsList = asraOpRelationsDao.queryAsraOpRelations(asraOpRelationsQueryReq.getParentId()); | ||
39 | + BeanUtils.copyProperties(asraOpRelationsList,asraOpRelationsDTOs,AsraOpRelationsDTO.class); | ||
40 | + return new BizResult<>(asraOpRelationsDTOs); | ||
41 | + } | ||
42 | +} |
src/main/java/com/zteits/oa/report/dao/AsraOpDao.java
@@ -15,7 +15,7 @@ public interface AsraOpDao { | @@ -15,7 +15,7 @@ public interface AsraOpDao { | ||
15 | * 2018年7月30日 wangfs.<br/> | 15 | * 2018年7月30日 wangfs.<br/> |
16 | */ | 16 | */ |
17 | PageInfo<AsraOp> queryAsraOpForPage(AsraOpQueryReq asraOpQueryReq); | 17 | PageInfo<AsraOp> queryAsraOpForPage(AsraOpQueryReq asraOpQueryReq); |
18 | - | 18 | + |
19 | /** | 19 | /** |
20 | * 获取员工信息.<br/> | 20 | * 获取员工信息.<br/> |
21 | * @param asraOpQueryRe | 21 | * @param asraOpQueryRe |
@@ -23,4 +23,14 @@ public interface AsraOpDao { | @@ -23,4 +23,14 @@ public interface AsraOpDao { | ||
23 | * 2018年7月31日 wangfs.<br/> | 23 | * 2018年7月31日 wangfs.<br/> |
24 | */ | 24 | */ |
25 | AsraOp queryAsraOp(AsraOpQueryReq asraOpQueryRe); | 25 | AsraOp queryAsraOp(AsraOpQueryReq asraOpQueryRe); |
26 | + | ||
27 | + /** | ||
28 | + * 根据登录工号查询员工信息 | ||
29 | + * @param | ||
30 | + * @return | ||
31 | + * @Author: xiejianpeng | ||
32 | + * @Date: 2018/7/31 10:36 | ||
33 | + * | ||
34 | + */ | ||
35 | + AsraOp queryAsraOpByLoginCode(String loginCode); | ||
26 | } | 36 | } |
src/main/java/com/zteits/oa/report/dao/AsraOpRelationsDao.java
0 → 100644
1 | +package com.zteits.oa.report.dao; | ||
2 | + | ||
3 | +import com.zteits.oa.report.domain.AsraOpRelations; | ||
4 | + | ||
5 | +import java.util.List; | ||
6 | + | ||
7 | +/** | ||
8 | + * Copyright: Copyright (c) 2018 zteits | ||
9 | + * | ||
10 | + * @Description: | ||
11 | + * @version: v1.0.0 | ||
12 | + * @author: xiejianpeng | ||
13 | + * @date: 2018/7/31 11 | ||
14 | + * Modification History: | ||
15 | + * Date Author Version Description | ||
16 | + * ---------------------------------------------------------* | ||
17 | + * 2018/7/31 xiejianpeng v1.0.0 创建 | ||
18 | + */ | ||
19 | +public interface AsraOpRelationsDao { | ||
20 | + | ||
21 | + /** | ||
22 | + * 根据登录工号查询管理的员工信息 | ||
23 | + * @param | ||
24 | + * @return | ||
25 | + * @Author: xiejianpeng | ||
26 | + * @Date: 2018/7/31 11:42 | ||
27 | + * | ||
28 | + */ | ||
29 | + List<AsraOpRelations> queryAsraOpRelations(Long parentId); | ||
30 | +} |
src/main/java/com/zteits/oa/report/dao/impl/AsraOpDaoImpl.java
@@ -2,6 +2,8 @@ package com.zteits.oa.report.dao.impl; | @@ -2,6 +2,8 @@ package com.zteits.oa.report.dao.impl; | ||
2 | 2 | ||
3 | import java.util.List; | 3 | import java.util.List; |
4 | 4 | ||
5 | +import com.zteits.oa.report.domain.AsraOpExample; | ||
6 | +import com.zteits.oa.report.mapper.AsraOpMapper; | ||
5 | import org.springframework.beans.factory.annotation.Autowired; | 7 | import org.springframework.beans.factory.annotation.Autowired; |
6 | import org.springframework.stereotype.Component; | 8 | import org.springframework.stereotype.Component; |
7 | import org.springframework.util.CollectionUtils; | 9 | import org.springframework.util.CollectionUtils; |
@@ -21,7 +23,7 @@ public class AsraOpDaoImpl implements AsraOpDao { | @@ -21,7 +23,7 @@ public class AsraOpDaoImpl implements AsraOpDao { | ||
21 | 23 | ||
22 | @Autowired | 24 | @Autowired |
23 | private AsraOpSmapper asraOpSmapper; | 25 | private AsraOpSmapper asraOpSmapper; |
24 | - | 26 | + |
25 | @Autowired | 27 | @Autowired |
26 | private AsraOpMapper asraOpMapper; | 28 | private AsraOpMapper asraOpMapper; |
27 | /** | 29 | /** |
@@ -62,4 +64,12 @@ public class AsraOpDaoImpl implements AsraOpDao { | @@ -62,4 +64,12 @@ public class AsraOpDaoImpl implements AsraOpDao { | ||
62 | return CollectionUtils.isEmpty(list) ? new AsraOp() : list.get(0); | 64 | return CollectionUtils.isEmpty(list) ? new AsraOp() : list.get(0); |
63 | } | 65 | } |
64 | 66 | ||
67 | + @Override | ||
68 | + public AsraOp queryAsraOpByLoginCode(String loginCode) { | ||
69 | + AsraOpExample example = new AsraOpExample(); | ||
70 | + example.createCriteria().andLoginCodeEqualTo(loginCode); | ||
71 | + List<AsraOp> berths = asraOpMapper.selectByExample(example); | ||
72 | + return berths.get(0); | ||
73 | + } | ||
74 | + | ||
65 | } | 75 | } |
src/main/java/com/zteits/oa/report/dao/impl/AsraOpRelationsDaoImpl.java
0 → 100644
1 | +package com.zteits.oa.report.dao.impl; | ||
2 | + | ||
3 | +import com.zteits.oa.report.dao.AsraOpRelationsDao; | ||
4 | +import com.zteits.oa.report.domain.AsraOpRelations; | ||
5 | +import com.zteits.oa.report.domain.AsraOpRelationsExample; | ||
6 | +import com.zteits.oa.report.mapper.AsraOpRelationsMapper; | ||
7 | +import org.springframework.beans.factory.annotation.Autowired; | ||
8 | +import org.springframework.stereotype.Component; | ||
9 | + | ||
10 | +import java.util.List; | ||
11 | + | ||
12 | +/** | ||
13 | + * Copyright: Copyright (c) 2018 zteits | ||
14 | + * | ||
15 | + * @Description: | ||
16 | + * @version: v1.0.0 | ||
17 | + * @author: xiejianpeng | ||
18 | + * @date: 2018/7/31 11 | ||
19 | + * Modification History: | ||
20 | + * Date Author Version Description | ||
21 | + * ---------------------------------------------------------* | ||
22 | + * 2018/7/31 xiejianpeng v1.0.0 创建 | ||
23 | + */ | ||
24 | +@Component | ||
25 | +public class AsraOpRelationsDaoImpl implements AsraOpRelationsDao { | ||
26 | + | ||
27 | + @Autowired | ||
28 | + private AsraOpRelationsMapper asraOpRelationsMapper; | ||
29 | + | ||
30 | + @Override | ||
31 | + public List<AsraOpRelations> queryAsraOpRelations(Long parentId) { | ||
32 | + AsraOpRelationsExample example = new AsraOpRelationsExample(); | ||
33 | + example.createCriteria().andParentIdEqualTo(parentId); | ||
34 | + List<AsraOpRelations> asraOpRelationsList = asraOpRelationsMapper.selectByExample(example); | ||
35 | + return asraOpRelationsList; | ||
36 | + } | ||
37 | +} |
src/main/java/com/zteits/oa/report/web/AsraOpController.java
1 | package com.zteits.oa.report.web; | 1 | package com.zteits.oa.report.web; |
2 | 2 | ||
3 | +import com.alibaba.fastjson.JSONObject; | ||
4 | +import com.xiaoleilu.hutool.util.CollectionUtil; | ||
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; | 6 | import com.zteits.oa.api.base.bean.PageBean; |
5 | import com.zteits.oa.api.dto.asraop.AsraOpDTO; | 7 | import com.zteits.oa.api.dto.asraop.AsraOpDTO; |
6 | import com.zteits.oa.api.dto.asraop.param.AsraOpQueryReq; | 8 | import com.zteits.oa.api.dto.asraop.param.AsraOpQueryReq; |
7 | -import com.zteits.oa.api.service.report.query.AsraOpRueryService; | 9 | +import com.zteits.oa.api.dto.asraoprelations.AsraOpRelationsDTO; |
10 | +import com.zteits.oa.api.dto.asraoprelations.param.AsraOpRelationsQueryReq; | ||
11 | +import com.zteits.oa.api.service.report.query.AsraOpQueryService; | ||
12 | +import com.zteits.oa.api.service.report.query.AsraOpRelationsQueryService; | ||
8 | import io.swagger.annotations.Api; | 13 | import io.swagger.annotations.Api; |
14 | +import org.slf4j.Logger; | ||
15 | +import org.slf4j.LoggerFactory; | ||
9 | import org.springframework.beans.factory.annotation.Autowired; | 16 | import org.springframework.beans.factory.annotation.Autowired; |
17 | +import org.springframework.cglib.core.CollectionUtils; | ||
10 | import org.springframework.web.bind.annotation.RequestBody; | 18 | import org.springframework.web.bind.annotation.RequestBody; |
11 | import org.springframework.web.bind.annotation.RequestMapping; | 19 | import org.springframework.web.bind.annotation.RequestMapping; |
12 | import org.springframework.web.bind.annotation.RequestMethod; | 20 | import org.springframework.web.bind.annotation.RequestMethod; |
13 | import org.springframework.web.bind.annotation.RestController; | 21 | import org.springframework.web.bind.annotation.RestController; |
14 | 22 | ||
15 | import javax.servlet.http.HttpServletRequest; | 23 | import javax.servlet.http.HttpServletRequest; |
24 | +import java.util.ArrayList; | ||
25 | +import java.util.List; | ||
16 | 26 | ||
17 | @Api(value = "日报系统-员工管理", description = "日报系统-员工管理") | 27 | @Api(value = "日报系统-员工管理", description = "日报系统-员工管理") |
18 | @RestController | 28 | @RestController |
19 | @RequestMapping("/asraOp") | 29 | @RequestMapping("/asraOp") |
20 | public class AsraOpController { | 30 | public class AsraOpController { |
21 | 31 | ||
32 | + private static final Logger logger = LoggerFactory.getLogger(AsraOpController.class); | ||
33 | + | ||
34 | + @Autowired | ||
35 | + private AsraOpQueryService asraOpQueryService; | ||
36 | + | ||
22 | @Autowired | 37 | @Autowired |
23 | - private AsraOpRueryService asraOpRueryService; | 38 | + private AsraOpRelationsQueryService asraOpRelationsQueryService; |
39 | + | ||
40 | + | ||
41 | + | ||
42 | + | ||
24 | 43 | ||
25 | @RequestMapping(value="/queryAsraOpPage",method = RequestMethod.POST) | 44 | @RequestMapping(value="/queryAsraOpPage",method = RequestMethod.POST) |
26 | public BizResult<PageBean<AsraOpDTO>> queryAsraOpPage(@RequestBody AsraOpQueryReq asraOpQueryReq, HttpServletRequest request){ | 45 | public BizResult<PageBean<AsraOpDTO>> queryAsraOpPage(@RequestBody AsraOpQueryReq asraOpQueryReq, HttpServletRequest request){ |
27 | - BizResult<PageBean<AsraOpDTO>> result = asraOpRueryService.queryAsraOpForPage(asraOpQueryReq); | 46 | + logger.info("日报系统-员工管理-根据登录人分页查询员工信息入参:{}", JSONObject.toJSON(asraOpQueryReq)); |
47 | + /**1.根据当前登录人查询登录人下面管理的员工-缓存中获取*/ | ||
48 | + | ||
49 | + AsraOpDTO asraOpDTO = null; | ||
50 | + | ||
51 | + /**2.判断登录人是领导还是员工 ,2:员工,1:领导*/ | ||
52 | + List<Long> opIdLists = new ArrayList<>(); | ||
53 | + opIdLists.add(asraOpDTO.getId()); | ||
54 | + if(asraOpDTO.getRoleId() == 1){ | ||
55 | + /**如果是领导,获取领导下面的员工信息*/ | ||
56 | + AsraOpRelationsQueryReq asraOpRelationsQueryReq = new AsraOpRelationsQueryReq(); | ||
57 | + asraOpRelationsQueryReq.setParentId(asraOpDTO.getId()); | ||
58 | + BizResult<List<AsraOpRelationsDTO>> listBizResult = asraOpRelationsQueryService.queryAsraOpRelations(asraOpRelationsQueryReq); | ||
59 | + if(listBizResult.isSuccess() && CollectionUtil.isNotEmpty(listBizResult.getData())){ | ||
60 | + for(AsraOpRelationsDTO asraOpRelationsDTO : listBizResult.getData()){ | ||
61 | + opIdLists.add(asraOpRelationsDTO.getOpId()); | ||
62 | + } | ||
63 | + } | ||
64 | + } | ||
65 | + BizResult<PageBean<AsraOpDTO>> result = asraOpQueryService.queryAsraOpForPage(asraOpQueryReq); | ||
66 | + logger.info("日报系统-员工管理-根据登录人分页查询员工信息结果:{}", JSONObject.toJSON(result)); | ||
28 | return result; | 67 | return result; |
29 | } | 68 | } |
30 | 69 |
src/main/java/com/zteits/oa/report/web/OAuthController.java
@@ -3,6 +3,7 @@ package com.zteits.oa.report.web; | @@ -3,6 +3,7 @@ package com.zteits.oa.report.web; | ||
3 | import javax.servlet.http.HttpServletRequest; | 3 | import javax.servlet.http.HttpServletRequest; |
4 | import javax.servlet.http.HttpSession; | 4 | import javax.servlet.http.HttpSession; |
5 | 5 | ||
6 | +import com.zteits.oa.api.service.report.query.AsraOpQueryService; | ||
6 | import org.slf4j.Logger; | 7 | import org.slf4j.Logger; |
7 | import org.slf4j.LoggerFactory; | 8 | import org.slf4j.LoggerFactory; |
8 | import org.springframework.beans.factory.annotation.Autowired; | 9 | import org.springframework.beans.factory.annotation.Autowired; |
@@ -19,7 +20,6 @@ import com.zteits.oa.api.dto.asraop.AsraOpDTO; | @@ -19,7 +20,6 @@ import com.zteits.oa.api.dto.asraop.AsraOpDTO; | ||
19 | import com.zteits.oa.api.dto.asraop.LoginOathRes; | 20 | import com.zteits.oa.api.dto.asraop.LoginOathRes; |
20 | import com.zteits.oa.api.dto.asraop.param.AsraOpQueryReq; | 21 | import com.zteits.oa.api.dto.asraop.param.AsraOpQueryReq; |
21 | import com.zteits.oa.api.dto.asraop.param.LoginOauthReq; | 22 | import com.zteits.oa.api.dto.asraop.param.LoginOauthReq; |
22 | -import com.zteits.oa.api.service.report.query.AsraOpRueryService; | ||
23 | import com.zteits.oa.report.vo.OAuthResult; | 23 | import com.zteits.oa.report.vo.OAuthResult; |
24 | import com.zteits.oa.util.MD5Utils; | 24 | import com.zteits.oa.util.MD5Utils; |
25 | 25 | ||
@@ -33,7 +33,7 @@ public class OAuthController { | @@ -33,7 +33,7 @@ public class OAuthController { | ||
33 | private static final Logger logger = LoggerFactory.getLogger(OAuthController.class); | 33 | private static final Logger logger = LoggerFactory.getLogger(OAuthController.class); |
34 | 34 | ||
35 | @Autowired | 35 | @Autowired |
36 | - private AsraOpRueryService asraOpRueryService; | 36 | + private AsraOpQueryService asraOpQueryService; |
37 | 37 | ||
38 | @Autowired | 38 | @Autowired |
39 | private HttpServletRequest request; | 39 | private HttpServletRequest request; |
@@ -64,7 +64,7 @@ public class OAuthController { | @@ -64,7 +64,7 @@ public class OAuthController { | ||
64 | boolean isCheckSuccess = false; | 64 | boolean isCheckSuccess = false; |
65 | //1.判断登录账号/密码 | 65 | //1.判断登录账号/密码 |
66 | asraOpQueryRe.setLoginCode(loginCode); | 66 | asraOpQueryRe.setLoginCode(loginCode); |
67 | - BizResult<AsraOpDTO> asraOpReult = asraOpRueryService.queryAsraOp(asraOpQueryRe); | 67 | + BizResult<AsraOpDTO> asraOpReult = asraOpQueryService.queryAsraOp(asraOpQueryRe); |
68 | if(asraOpReult != null && asraOpReult.getData() != null){ | 68 | if(asraOpReult != null && asraOpReult.getData() != null){ |
69 | asraOpDTO = asraOpReult.getData(); | 69 | asraOpDTO = asraOpReult.getData(); |
70 | if(StringUtils.isEmpty(asraOpDTO.getLoginCode())){ | 70 | if(StringUtils.isEmpty(asraOpDTO.getLoginCode())){ |
src/main/resources/mybatis/smapper/AsraOpSmapper.xml
@@ -31,15 +31,21 @@ | @@ -31,15 +31,21 @@ | ||
31 | <include refid="Base_Column_List" /> | 31 | <include refid="Base_Column_List" /> |
32 | from asra_op | 32 | from asra_op |
33 | where 1=1 | 33 | where 1=1 |
34 | - <if test="loginCode != null and loginCode !=''"> | 34 | + <if test="loginCode != null and loginCode !=''"> |
35 | and login_code = #{loginCode,jdbcType=VARCHAR} | 35 | and login_code = #{loginCode,jdbcType=VARCHAR} |
36 | </if> | 36 | </if> |
37 | <if test="opName != null and opName != ''"> | 37 | <if test="opName != null and opName != ''"> |
38 | - and op_name = #{opName,jdbcType=VARCHAR} | 38 | + and op_name ike concat('${opName}','%') |
39 | </if> | 39 | </if> |
40 | <if test="email != null and email != ''"> | 40 | <if test="email != null and email != ''"> |
41 | and email = #{email,jdbcType=VARCHAR} | 41 | and email = #{email,jdbcType=VARCHAR} |
42 | </if> | 42 | </if> |
43 | + <if test="opIdLists != null and opIdLists.size >0"> | ||
44 | + and id in | ||
45 | + <foreach collection="opIdLists" item="opId" open="(" close=")" separator="," > | ||
46 | + #{opId} | ||
47 | + </foreach> | ||
48 | + </if> | ||
43 | </select> | 49 | </select> |
44 | 50 | ||
45 | </mapper> | 51 | </mapper> |
46 | \ No newline at end of file | 52 | \ No newline at end of file |