Commit 2f6df64b4d848f0392ddd4990012cd973655229a
1 parent
43df1f77
员工管理
Showing
14 changed files
with
457 additions
and
9 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 | 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 | 2 | |
3 | 3 | import com.zteits.oa.api.base.bean.BaseRequest; |
4 | 4 | |
5 | +import java.util.List; | |
6 | + | |
5 | 7 | public class AsraOpQueryReq extends BaseRequest{ |
6 | 8 | |
7 | 9 | /** |
... | ... | @@ -9,10 +11,14 @@ public class AsraOpQueryReq extends BaseRequest{ |
9 | 11 | */ |
10 | 12 | private static final long serialVersionUID = 7249746348000980054L; |
11 | 13 | |
14 | +<<<<<<< Updated upstream | |
12 | 15 | /**主键*/ |
13 | 16 | private Long id; |
14 | 17 | |
15 | 18 | /**登录工号*/ |
19 | +======= | |
20 | + /**当前登录人的登录工号*/ | |
21 | +>>>>>>> Stashed changes | |
16 | 22 | private String loginCode; |
17 | 23 | |
18 | 24 | /**登录密码*/ |
... | ... | @@ -25,6 +31,18 @@ public class AsraOpQueryReq extends BaseRequest{ |
25 | 31 | private String email; |
26 | 32 | |
27 | 33 | |
34 | + /**员工idlist*/ | |
35 | + private List<Long> opIdLists; | |
36 | + | |
37 | + | |
38 | + public List<Long> getOpIdLists() { | |
39 | + return opIdLists; | |
40 | + } | |
41 | + | |
42 | + public void setOpIdLists(List<Long> opIdLists) { | |
43 | + this.opIdLists = opIdLists; | |
44 | + } | |
45 | + | |
28 | 46 | public String getLoginCode() { |
29 | 47 | return loginCode; |
30 | 48 | } | ... | ... |
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 | 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 | 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 | 23 | |
24 | 24 | |
25 | 25 | |
26 | -public interface AsraOpRueryService { | |
26 | +public interface AsraOpQueryService { | |
27 | 27 | |
28 | 28 | /** |
29 | 29 | * 分页查询工时系统员工信息.<br/> |
... | ... | @@ -32,6 +32,7 @@ public interface AsraOpRueryService { |
32 | 32 | * 2018年7月30日 wangfs.<br/> |
33 | 33 | */ |
34 | 34 | BizResult<PageBean<AsraOpDTO>> queryAsraOpForPage(AsraOpQueryReq asraOpQueryReq); |
35 | +<<<<<<< Updated upstream:src/main/java/com/zteits/oa/api/service/report/query/AsraOpRueryService.java | |
35 | 36 | /** |
36 | 37 | * 获取员工信息.<br/> |
37 | 38 | * @param asraOpQueryRe |
... | ... | @@ -40,4 +41,16 @@ public interface AsraOpRueryService { |
40 | 41 | */ |
41 | 42 | BizResult<AsraOpDTO> queryAsraOp(AsraOpQueryReq asraOpQueryRe); |
42 | 43 | |
44 | +======= | |
45 | + | |
46 | + /** | |
47 | + * 根据登录工号查询员工信息 | |
48 | + * @param | |
49 | + * @return | |
50 | + * @Author: xiejianpeng | |
51 | + * @Date: 2018/7/31 10:33 | |
52 | + * | |
53 | + */ | |
54 | + BizResult<AsraOpDTO> queryAsraOpByLoginCode(AsraOpQueryReq asraOpQueryReq); | |
55 | +>>>>>>> Stashed changes:src/main/java/com/zteits/oa/api/service/report/query/AsraOpQueryService.java | |
43 | 56 | } | ... | ... |
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 | 12 | import com.zteits.oa.api.base.bean.PageBean; |
13 | 13 | import com.zteits.oa.api.dto.asraop.AsraOpDTO; |
14 | 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 | 16 | import com.zteits.oa.report.dao.AsraOpDao; |
17 | 17 | import com.zteits.oa.report.domain.AsraOp; |
18 | 18 | import com.zteits.oa.util.pagepaper.PageBeanUtil; |
... | ... | @@ -32,9 +32,9 @@ import com.zteits.oa.util.pagepaper.PageBeanUtil; |
32 | 32 | * 2018年7月30日 wangfs v1.0.0 创建 |
33 | 33 | */ |
34 | 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 | 38 | @Autowired |
39 | 39 | private AsraOpDao asraOpDao; |
40 | 40 | /** |
... | ... | @@ -68,4 +68,13 @@ public class AsraOpRueryServiceImpl implements AsraOpRueryService { |
68 | 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,6 +15,7 @@ public interface AsraOpDao { |
15 | 15 | * 2018年7月30日 wangfs.<br/> |
16 | 16 | */ |
17 | 17 | PageInfo<AsraOp> queryAsraOpForPage(AsraOpQueryReq asraOpQueryReq); |
18 | +<<<<<<< Updated upstream | |
18 | 19 | |
19 | 20 | /** |
20 | 21 | * 获取员工信息.<br/> |
... | ... | @@ -23,4 +24,16 @@ public interface AsraOpDao { |
23 | 24 | * 2018年7月31日 wangfs.<br/> |
24 | 25 | */ |
25 | 26 | AsraOp queryAsraOp(AsraOpQueryReq asraOpQueryRe); |
27 | +======= | |
28 | + | |
29 | + /** | |
30 | + * 根据登录工号查询员工信息 | |
31 | + * @param | |
32 | + * @return | |
33 | + * @Author: xiejianpeng | |
34 | + * @Date: 2018/7/31 10:36 | |
35 | + * | |
36 | + */ | |
37 | + AsraOp queryAsraOpByLoginCode(String loginCode); | |
38 | +>>>>>>> Stashed changes | |
26 | 39 | } | ... | ... |
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 | 2 | |
3 | 3 | import java.util.List; |
4 | 4 | |
5 | +import com.zteits.oa.report.domain.AsraOpExample; | |
6 | +import com.zteits.oa.report.mapper.AsraOpMapper; | |
5 | 7 | import org.springframework.beans.factory.annotation.Autowired; |
6 | 8 | import org.springframework.stereotype.Component; |
7 | 9 | import org.springframework.util.CollectionUtils; |
... | ... | @@ -21,7 +23,11 @@ public class AsraOpDaoImpl implements AsraOpDao { |
21 | 23 | |
22 | 24 | @Autowired |
23 | 25 | private AsraOpSmapper asraOpSmapper; |
26 | +<<<<<<< Updated upstream | |
24 | 27 | |
28 | +======= | |
29 | + | |
30 | +>>>>>>> Stashed changes | |
25 | 31 | @Autowired |
26 | 32 | private AsraOpMapper asraOpMapper; |
27 | 33 | /** |
... | ... | @@ -62,4 +68,12 @@ public class AsraOpDaoImpl implements AsraOpDao { |
62 | 68 | return CollectionUtils.isEmpty(list) ? new AsraOp() : list.get(0); |
63 | 69 | } |
64 | 70 | |
71 | + @Override | |
72 | + public AsraOp queryAsraOpByLoginCode(String loginCode) { | |
73 | + AsraOpExample example = new AsraOpExample(); | |
74 | + example.createCriteria().andLoginCodeEqualTo(loginCode); | |
75 | + List<AsraOp> berths = asraOpMapper.selectByExample(example); | |
76 | + return berths.get(0); | |
77 | + } | |
78 | + | |
65 | 79 | } | ... | ... |
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 | 1 | package com.zteits.oa.report.web; |
2 | 2 | |
3 | +import com.alibaba.fastjson.JSONObject; | |
4 | +import com.xiaoleilu.hutool.util.CollectionUtil; | |
3 | 5 | import com.zteits.oa.api.base.bean.BizResult; |
4 | 6 | import com.zteits.oa.api.base.bean.PageBean; |
5 | 7 | import com.zteits.oa.api.dto.asraop.AsraOpDTO; |
6 | 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 | 13 | import io.swagger.annotations.Api; |
14 | +import org.slf4j.Logger; | |
15 | +import org.slf4j.LoggerFactory; | |
9 | 16 | import org.springframework.beans.factory.annotation.Autowired; |
17 | +import org.springframework.cglib.core.CollectionUtils; | |
10 | 18 | import org.springframework.web.bind.annotation.RequestBody; |
11 | 19 | import org.springframework.web.bind.annotation.RequestMapping; |
12 | 20 | import org.springframework.web.bind.annotation.RequestMethod; |
13 | 21 | import org.springframework.web.bind.annotation.RestController; |
14 | 22 | |
15 | 23 | import javax.servlet.http.HttpServletRequest; |
24 | +import java.util.ArrayList; | |
25 | +import java.util.List; | |
16 | 26 | |
17 | 27 | @Api(value = "日报系统-员工管理", description = "日报系统-员工管理") |
18 | 28 | @RestController |
19 | 29 | @RequestMapping("/asraOp") |
20 | 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 | 37 | @Autowired |
23 | - private AsraOpRueryService asraOpRueryService; | |
38 | + private AsraOpRelationsQueryService asraOpRelationsQueryService; | |
39 | + | |
40 | + | |
41 | + | |
42 | + | |
24 | 43 | |
25 | 44 | @RequestMapping(value="/queryAsraOpPage",method = RequestMethod.POST) |
26 | 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 | 67 | return result; |
29 | 68 | } |
30 | 69 | ... | ... |
src/main/resources/mybatis/smapper/AsraOpSmapper.xml
... | ... | @@ -31,15 +31,21 @@ |
31 | 31 | <include refid="Base_Column_List" /> |
32 | 32 | from asra_op |
33 | 33 | where 1=1 |
34 | - <if test="loginCode != null and loginCode !=''"> | |
34 | + <if test="loginCode != null and loginCode !=''"> | |
35 | 35 | and login_code = #{loginCode,jdbcType=VARCHAR} |
36 | 36 | </if> |
37 | 37 | <if test="opName != null and opName != ''"> |
38 | - and op_name = #{opName,jdbcType=VARCHAR} | |
38 | + and op_name ike concat('${opName}','%') | |
39 | 39 | </if> |
40 | 40 | <if test="email != null and email != ''"> |
41 | 41 | and email = #{email,jdbcType=VARCHAR} |
42 | 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 | 49 | </select> |
44 | 50 | |
45 | 51 | </mapper> |
46 | 52 | \ No newline at end of file | ... | ... |