Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoban3.0
haoban-manage3.0
Commits
86c916c2
Commit
86c916c2
authored
Feb 13, 2020
by
qwmqiuwenmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
地址调整一下
parent
ded76ad8
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
102 additions
and
17 deletions
+102
-17
DepartmentDTO.java
...ain/java/com/gic/haoban/manage/api/dto/DepartmentDTO.java
+10
-0
DepartmentApiService.java
...m/gic/haoban/manage/api/service/DepartmentApiService.java
+6
-0
TabHaobanDepartment.java
...gic/haoban/manage/service/entity/TabHaobanDepartment.java
+11
-0
DepartmentService.java
.../gic/haoban/manage/service/service/DepartmentService.java
+3
-0
ApplicationServiceImpl.java
...n/manage/service/service/impl/ApplicationServiceImpl.java
+1
-1
DepartmentServiceImpl.java
...an/manage/service/service/impl/DepartmentServiceImpl.java
+12
-1
StaffDepartmentRelatedServiceImpl.java
...rvice/service/impl/StaffDepartmentRelatedServiceImpl.java
+1
-1
StaffServiceImpl.java
.../haoban/manage/service/service/impl/StaffServiceImpl.java
+1
-1
TestApiServiceImpl.java
...aoban/manage/service/service/impl/TestApiServiceImpl.java
+1
-1
WxEnterpriseRelatedServiceImpl.java
.../service/service/impl/WxEnterpriseRelatedServiceImpl.java
+1
-1
ApplicationApiServiceImpl.java
...e/service/service/out/impl/ApplicationApiServiceImpl.java
+1
-1
DepartmentApiServiceImpl.java
...ge/service/service/out/impl/DepartmentApiServiceImpl.java
+9
-1
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+1
-1
TestServiceImpl.java
...oban/manage/service/service/out/impl/TestServiceImpl.java
+1
-1
WxEnterpriseRelatedApiServiceImpl.java
...e/service/out/impl/WxEnterpriseRelatedApiServiceImpl.java
+1
-1
DepartmentMapper.xml
...e3-service/src/main/resources/mapper/DepartmentMapper.xml
+10
-4
DepartmentContoller.java
...gic/haoban/manage/web/controller/DepartmentContoller.java
+32
-2
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/DepartmentDTO.java
View file @
86c916c2
...
@@ -30,6 +30,8 @@ public class DepartmentDTO implements Serializable {
...
@@ -30,6 +30,8 @@ public class DepartmentDTO implements Serializable {
private
Integer
level
;
private
Integer
level
;
private
Integer
sort
;
private
Integer
sort
;
private
String
wxEnterpriseId
;
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
@@ -136,6 +138,14 @@ public class DepartmentDTO implements Serializable {
...
@@ -136,6 +138,14 @@ public class DepartmentDTO implements Serializable {
public
void
setSort
(
Integer
sort
)
{
public
void
setSort
(
Integer
sort
)
{
this
.
sort
=
sort
;
this
.
sort
=
sort
;
}
}
public
String
getWxEnterpriseId
()
{
return
wxEnterpriseId
;
}
public
void
setWxEnterpriseId
(
String
wxEnterpriseId
)
{
this
.
wxEnterpriseId
=
wxEnterpriseId
;
}
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/DepartmentApiService.java
View file @
86c916c2
...
@@ -38,5 +38,11 @@ public interface DepartmentApiService {
...
@@ -38,5 +38,11 @@ public interface DepartmentApiService {
* @return
* @return
*/
*/
DepartmentDTO
selectByRelatedId
(
String
departId
);
DepartmentDTO
selectByRelatedId
(
String
departId
);
/**
* 放入回收站
* @param departmentId
* @return
*/
HaobanResponse
recycle
(
String
departmentId
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/TabHaobanDepartment.java
View file @
86c916c2
...
@@ -29,6 +29,8 @@ public class TabHaobanDepartment implements Serializable {
...
@@ -29,6 +29,8 @@ public class TabHaobanDepartment implements Serializable {
private
Integer
level
;
private
Integer
level
;
private
Integer
sort
;
private
Integer
sort
;
private
String
wxEnterpriseId
;
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
@@ -135,6 +137,14 @@ public class TabHaobanDepartment implements Serializable {
...
@@ -135,6 +137,14 @@ public class TabHaobanDepartment implements Serializable {
public
void
setSort
(
Integer
sort
)
{
public
void
setSort
(
Integer
sort
)
{
this
.
sort
=
sort
;
this
.
sort
=
sort
;
}
}
public
String
getWxEnterpriseId
()
{
return
wxEnterpriseId
;
}
public
void
setWxEnterpriseId
(
String
wxEnterpriseId
)
{
this
.
wxEnterpriseId
=
wxEnterpriseId
;
}
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/DepartmentService.java
View file @
86c916c2
...
@@ -2,6 +2,7 @@ package com.gic.haoban.manage.service.service;
...
@@ -2,6 +2,7 @@ package com.gic.haoban.manage.service.service;
import
java.util.List
;
import
java.util.List
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.manage.api.dto.DepartmentDTO
;
import
com.gic.haoban.manage.api.dto.DepartmentDTO
;
import
com.gic.haoban.manage.service.entity.TabHaobanDepartment
;
import
com.gic.haoban.manage.service.entity.TabHaobanDepartment
;
...
@@ -19,4 +20,6 @@ public interface DepartmentService {
...
@@ -19,4 +20,6 @@ public interface DepartmentService {
TabHaobanDepartment
selectByRelatedId
(
String
relatedId
);
TabHaobanDepartment
selectByRelatedId
(
String
relatedId
);
void
recycle
(
String
departmentId
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/
out/
impl/ApplicationServiceImpl.java
→
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/ApplicationServiceImpl.java
View file @
86c916c2
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
impl
;
import
java.util.List
;
import
java.util.List
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/
out/
impl/DepartmentServiceImpl.java
→
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/DepartmentServiceImpl.java
View file @
86c916c2
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
impl
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -7,6 +7,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -7,6 +7,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.common.utils.StringUtil
;
import
com.gic.haoban.common.utils.StringUtil
;
import
com.gic.haoban.manage.api.dto.DepartmentDTO
;
import
com.gic.haoban.manage.api.dto.DepartmentDTO
;
import
com.gic.haoban.manage.service.dao.mapper.DepartmentMapper
;
import
com.gic.haoban.manage.service.dao.mapper.DepartmentMapper
;
...
@@ -75,4 +76,14 @@ public class DepartmentServiceImpl implements DepartmentService {
...
@@ -75,4 +76,14 @@ public class DepartmentServiceImpl implements DepartmentService {
return
mapper
.
selectByRelatedId
(
relatedId
);
return
mapper
.
selectByRelatedId
(
relatedId
);
}
}
@Override
public
void
recycle
(
String
departmentId
)
{
TabHaobanDepartment
tab
=
mapper
.
selectByPrimaryKey
(
departmentId
);
if
(
tab
!=
null
)
{
tab
.
setRecycleFlag
(
1
);
tab
.
setUpdateTime
(
new
Date
());
}
mapper
.
updateByPrimaryKeySelective
(
tab
);
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/
out/
impl/StaffDepartmentRelatedServiceImpl.java
→
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffDepartmentRelatedServiceImpl.java
View file @
86c916c2
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
impl
;
import
java.util.List
;
import
java.util.List
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/
out/
impl/StaffServiceImpl.java
→
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffServiceImpl.java
View file @
86c916c2
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
impl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/TestServiceImpl.java
→
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/Test
Api
ServiceImpl.java
View file @
86c916c2
...
@@ -3,5 +3,5 @@ package com.gic.haoban.manage.service.service.impl;
...
@@ -3,5 +3,5 @@ package com.gic.haoban.manage.service.service.impl;
/**
/**
* Created by tgs on 2020/2/9.
* Created by tgs on 2020/2/9.
*/
*/
public
class
TestServiceImpl
{
public
class
Test
Api
ServiceImpl
{
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/
out/
impl/WxEnterpriseRelatedServiceImpl.java
→
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/WxEnterpriseRelatedServiceImpl.java
View file @
86c916c2
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
impl
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/ApplicationApiServiceImpl.java
→
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/
out/
impl/ApplicationApiServiceImpl.java
View file @
86c916c2
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
impl
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
import
java.util.List
;
import
java.util.List
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/DepartmentApiServiceImpl.java
→
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/
out/
impl/DepartmentApiServiceImpl.java
View file @
86c916c2
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
impl
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -107,4 +107,12 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
...
@@ -107,4 +107,12 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
return
EntityUtil
.
changeEntityByJSON
(
DepartmentDTO
.
class
,
tab
);
return
EntityUtil
.
changeEntityByJSON
(
DepartmentDTO
.
class
,
tab
);
}
}
@Override
public
HaobanResponse
recycle
(
String
departmentId
)
{
HaobanResponse
hr
=
new
HaobanResponse
();
hr
.
setErrorCode
(
1
);
departmentService
.
recycle
(
departmentId
);
return
hr
;
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffApiServiceImpl.java
→
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/
out/
impl/StaffApiServiceImpl.java
View file @
86c916c2
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
impl
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/Test
Api
ServiceImpl.java
→
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/TestServiceImpl.java
View file @
86c916c2
...
@@ -3,5 +3,5 @@ package com.gic.haoban.manage.service.service.out.impl;
...
@@ -3,5 +3,5 @@ package com.gic.haoban.manage.service.service.out.impl;
/**
/**
* Created by tgs on 2020/2/9.
* Created by tgs on 2020/2/9.
*/
*/
public
class
Test
Api
ServiceImpl
{
public
class
TestServiceImpl
{
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/WxEnterpriseRelatedApiServiceImpl.java
→
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/
out/
impl/WxEnterpriseRelatedApiServiceImpl.java
View file @
86c916c2
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
impl
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
...
haoban-manage3-service/src/main/resources/mapper/DepartmentMapper.xml
View file @
86c916c2
...
@@ -13,12 +13,13 @@
...
@@ -13,12 +13,13 @@
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"wx_department_id"
property=
"wxDepartmentId"
jdbcType=
"VARCHAR"
/>
<result
column=
"wx_department_id"
property=
"wxDepartmentId"
jdbcType=
"VARCHAR"
/>
<result
column=
"wx_enterprise_id"
property=
"wxEnterpriseId"
jdbcType=
"VARCHAR"
/>
<result
column=
"sort"
property=
"sort"
jdbcType=
"INTEGER"
/>
<result
column=
"sort"
property=
"sort"
jdbcType=
"INTEGER"
/>
<result
column=
"level"
property=
"level"
jdbcType=
"INTEGER"
/>
<result
column=
"level"
property=
"level"
jdbcType=
"INTEGER"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
department_id, department_name, parent_department_id, related_id, chain_id, is_store,
department_id, department_name, parent_department_id, related_id, chain_id, is_store,
status_flag, recycle_flag, create_time, update_time,wx_department_id,sort,level
status_flag, recycle_flag, create_time, update_time,wx_department_id,sort,level
,wx_enterprise_id
</sql>
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
select
...
@@ -34,11 +35,11 @@
...
@@ -34,11 +35,11 @@
insert into tab_haoban_department (department_id, department_name, parent_department_id,
insert into tab_haoban_department (department_id, department_name, parent_department_id,
related_id, chain_id, is_store,
related_id, chain_id, is_store,
status_flag, recycle_flag, create_time,
status_flag, recycle_flag, create_time,
update_time,wx_department_id,sort,level)
update_time,wx_department_id,sort,level
,wx_enterprise_id
)
values (#{departmentId,jdbcType=VARCHAR}, #{departmentName,jdbcType=VARCHAR}, #{parentDepartmentId,jdbcType=VARCHAR},
values (#{departmentId,jdbcType=VARCHAR}, #{departmentName,jdbcType=VARCHAR}, #{parentDepartmentId,jdbcType=VARCHAR},
#{relatedId,jdbcType=VARCHAR}, #{chainId,jdbcType=VARCHAR}, #{isStore,jdbcType=INTEGER},
#{relatedId,jdbcType=VARCHAR}, #{chainId,jdbcType=VARCHAR}, #{isStore,jdbcType=INTEGER},
#{statusFlag,jdbcType=INTEGER}, #{recycleFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{statusFlag,jdbcType=INTEGER}, #{recycleFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP},#{wxDepartmentId},#{sort},#{level})
#{updateTime,jdbcType=TIMESTAMP},#{wxDepartmentId},#{sort},#{level}
,#{wxEnterpriseId}
)
</insert>
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanDepartment"
>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanDepartment"
>
insert into tab_haoban_department
insert into tab_haoban_department
...
@@ -158,6 +159,9 @@
...
@@ -158,6 +159,9 @@
<if
test=
"wxDepartmentId != null"
>
<if
test=
"wxDepartmentId != null"
>
wx_department_id = #{wxDepartmentId,jdbcType=VARCHAR},
wx_department_id = #{wxDepartmentId,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"sort != null"
>
<if
test=
"sort != null"
>
sort = #{sort,jdbcType=INTEGER},
sort = #{sort,jdbcType=INTEGER},
</if>
</if>
...
@@ -180,7 +184,9 @@
...
@@ -180,7 +184,9 @@
level = #{level,jdbcType=INTEGER},
level = #{level,jdbcType=INTEGER},
recycle_flag = #{recycleFlag,jdbcType=INTEGER},
recycle_flag = #{recycleFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
update_time = #{updateTime,jdbcType=TIMESTAMP},
wx_enterprise_id = #{wxEnterpriseId}
where department_id = #{departmentId,jdbcType=VARCHAR}
where department_id = #{departmentId,jdbcType=VARCHAR}
</update>
</update>
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/DepartmentContoller.java
View file @
86c916c2
...
@@ -13,12 +13,14 @@ import com.gic.enterprise.api.dto.StoreDTO;
...
@@ -13,12 +13,14 @@ import com.gic.enterprise.api.dto.StoreDTO;
import
com.gic.enterprise.api.service.DepartmentService
;
import
com.gic.enterprise.api.service.DepartmentService
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.haoban.base.api.common.Constant
;
import
com.gic.haoban.base.api.common.Constant
;
import
com.gic.haoban.common.utils.AuthRequestUtil
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.manage.api.dto.DepartmentDTO
;
import
com.gic.haoban.manage.api.dto.DepartmentDTO
;
import
com.gic.haoban.manage.api.service.DepartmentApiService
;
import
com.gic.haoban.manage.api.service.DepartmentApiService
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
com.gic.haoban.manage.web.qo.DepartmentAddQO
;
import
com.gic.haoban.manage.web.qo.DepartmentAddQO
;
import
com.gic.haoban.manage.web.qo.DepartmentEditQO
;
import
com.gic.haoban.manage.web.qo.DepartmentEditQO
;
import
com.gic.haoban.manage.web.vo.LoginVO
;
@RestController
@RestController
public
class
DepartmentContoller
extends
WebBaseController
{
public
class
DepartmentContoller
extends
WebBaseController
{
...
@@ -50,6 +52,7 @@ public class DepartmentContoller extends WebBaseController{
...
@@ -50,6 +52,7 @@ public class DepartmentContoller extends WebBaseController{
DepartmentDTO
department
=
new
DepartmentDTO
();
DepartmentDTO
department
=
new
DepartmentDTO
();
department
.
setParentDepartmentId
(
parentId
);
department
.
setParentDepartmentId
(
parentId
);
department
.
setDepartmentName
(
departmentName
);
department
.
setDepartmentName
(
departmentName
);
department
.
setWxEnterpriseId
(
dto
.
getWxDepartmentId
());
department
.
setChainId
(
dto
.
getChainId
()
+
Constant
.
ID_SEPARATOR
+
dto
.
getDepartmentId
());
department
.
setChainId
(
dto
.
getChainId
()
+
Constant
.
ID_SEPARATOR
+
dto
.
getDepartmentId
());
department
.
setIsStore
(
0
);
department
.
setIsStore
(
0
);
departmentApiService
.
add
(
department
);
departmentApiService
.
add
(
department
);
...
@@ -88,8 +91,13 @@ public class DepartmentContoller extends WebBaseController{
...
@@ -88,8 +91,13 @@ public class DepartmentContoller extends WebBaseController{
if
(
dto
==
null
||
dto
.
getStatusFlag
()
==
0
)
{
if
(
dto
==
null
||
dto
.
getStatusFlag
()
==
0
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_10003
);
return
resultResponse
(
HaoBanErrCode
.
ERR_10003
);
}
}
HaobanResponse
hr
;
if
(
StringUtils
.
isBlank
(
dto
.
getRelatedId
()))
{
hr
=
departmentApiService
.
del
(
departmentId
);
}
else
{
hr
=
departmentApiService
.
recycle
(
departmentId
);
}
HaobanResponse
hr
=
departmentApiService
.
del
(
departmentId
);
if
(
hr
.
getErrorCode
()
==
0
)
{
if
(
hr
.
getErrorCode
()
==
0
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_0
,
hr
.
getMessage
());
return
resultResponse
(
HaoBanErrCode
.
ERR_0
,
hr
.
getMessage
());
}
}
...
@@ -112,6 +120,7 @@ public class DepartmentContoller extends WebBaseController{
...
@@ -112,6 +120,7 @@ public class DepartmentContoller extends WebBaseController{
}
}
DepartmentDTO
department
=
new
DepartmentDTO
();
DepartmentDTO
department
=
new
DepartmentDTO
();
department
.
setParentDepartmentId
(
parentId
);
department
.
setParentDepartmentId
(
parentId
);
department
.
setWxDepartmentId
(
dto
.
getWxDepartmentId
());
department
.
setDepartmentName
(
departmentAddQO
.
getDepartmentName
());
department
.
setDepartmentName
(
departmentAddQO
.
getDepartmentName
());
department
.
setChainId
(
dto
.
getChainId
()
+
Constant
.
ID_SEPARATOR
+
dto
.
getDepartmentId
());
department
.
setChainId
(
dto
.
getChainId
()
+
Constant
.
ID_SEPARATOR
+
dto
.
getDepartmentId
());
department
.
setIsStore
(
0
);
department
.
setIsStore
(
0
);
...
@@ -152,7 +161,15 @@ public class DepartmentContoller extends WebBaseController{
...
@@ -152,7 +161,15 @@ public class DepartmentContoller extends WebBaseController{
if
(
StringUtils
.
isNotBlank
(
delDepartmentIds
))
{
if
(
StringUtils
.
isNotBlank
(
delDepartmentIds
))
{
String
[]
delIds
=
delDepartmentIds
.
split
(
","
);
String
[]
delIds
=
delDepartmentIds
.
split
(
","
);
for
(
String
string
:
delIds
)
{
for
(
String
string
:
delIds
)
{
departmentApiService
.
del
(
string
);
DepartmentDTO
dto
=
departmentApiService
.
selectById
(
string
);
if
(
dto
==
null
||
dto
.
getStatusFlag
()
==
0
)
{
continue
;
}
if
(
StringUtils
.
isBlank
(
dto
.
getRelatedId
()))
{
departmentApiService
.
del
(
string
);
}
else
{
departmentApiService
.
recycle
(
string
);
}
}
}
}
}
...
@@ -193,6 +210,18 @@ public class DepartmentContoller extends WebBaseController{
...
@@ -193,6 +210,18 @@ public class DepartmentContoller extends WebBaseController{
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
dtoList
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
dtoList
);
}
}
@RequestMapping
(
"department-recycle-list"
)
public
HaobanResponse
departmentRecycleList
(
String
keyWrod
,
String
storeFlag
)
{
LoginVO
login
=
(
LoginVO
)
AuthRequestUtil
.
getAppLoginUser
();
String
wxEnterpriseId
=
login
.
getWxEnterpriseId
();
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
private
void
handler
(
String
sonDepartment
,
String
parentId
)
{
private
void
handler
(
String
sonDepartment
,
String
parentId
)
{
if
(
StringUtils
.
isNotBlank
(
sonDepartment
))
{
if
(
StringUtils
.
isNotBlank
(
sonDepartment
))
{
...
@@ -212,6 +241,7 @@ public class DepartmentContoller extends WebBaseController{
...
@@ -212,6 +241,7 @@ public class DepartmentContoller extends WebBaseController{
if
(
StringUtils
.
isBlank
(
departmentId
))
{
if
(
StringUtils
.
isBlank
(
departmentId
))
{
DepartmentDTO
department
=
new
DepartmentDTO
();
DepartmentDTO
department
=
new
DepartmentDTO
();
department
.
setParentDepartmentId
(
parentId
);
department
.
setParentDepartmentId
(
parentId
);
department
.
setWxEnterpriseId
(
dto
.
getWxEnterpriseId
());
department
.
setDepartmentName
(
departmentAddQO
.
getDepartmentName
());
department
.
setDepartmentName
(
departmentAddQO
.
getDepartmentName
());
department
.
setChainId
(
dto
.
getChainId
()
+
Constant
.
ID_SEPARATOR
+
dto
.
getDepartmentId
());
department
.
setChainId
(
dto
.
getChainId
()
+
Constant
.
ID_SEPARATOR
+
dto
.
getDepartmentId
());
department
.
setIsStore
(
0
);
department
.
setIsStore
(
0
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment