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
70392891
Commit
70392891
authored
Mar 27, 2020
by
qwmqiuwenmin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' into 'master'
Developer See merge request
!12
parents
21ddbbc7
89389b47
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
92 additions
and
8 deletions
+92
-8
GicMessageDTO.java
...ain/java/com/gic/haoban/manage/api/dto/GicMessageDTO.java
+12
-0
EnterpriseController.java
...ic/haoban/manage/web/controller/EnterpriseController.java
+10
-5
BindApiServiceImpl.java
...n/manage/service/service/out/impl/BindApiServiceImpl.java
+1
-1
MessageApiServiceImpl.java
...anage/service/service/out/impl/MessageApiServiceImpl.java
+5
-0
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+50
-2
StoreController.java
...com/gic/haoban/manage/web/controller/StoreController.java
+1
-0
StoreController.java
...com/gic/haoban/manage/web/controller/StoreController.java
+3
-0
StoreDetailVO.java
...main/java/com/gic/haoban/manage/web/vo/StoreDetailVO.java
+10
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/GicMessageDTO.java
View file @
70392891
...
...
@@ -15,6 +15,8 @@ public class GicMessageDTO implements Serializable {
private
String
name
;
//1新增,2修改,3删除
private
Integer
changeType
;
private
GicClerkDTO
gicClerkDTO
;
public
String
getEnterpriseId
()
{
return
enterpriseId
;
...
...
@@ -71,4 +73,14 @@ public class GicMessageDTO implements Serializable {
public
void
setParentChain
(
String
parentChain
)
{
this
.
parentChain
=
parentChain
;
}
public
GicClerkDTO
getGicClerkDTO
()
{
return
gicClerkDTO
;
}
public
void
setGicClerkDTO
(
GicClerkDTO
gicClerkDTO
)
{
this
.
gicClerkDTO
=
gicClerkDTO
;
}
}
haoban-manage3-operation-web/src/main/java/com/gic/haoban/manage/web/controller/EnterpriseController.java
View file @
70392891
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.stream.Collectors
;
...
...
@@ -51,15 +52,19 @@ public class EnterpriseController extends WebBaseController{
@Autowired
private
EnterpriseService
enterpriseService
;
// @Autowired
// private WxEnterpriseRelatedApiService wxEnterpriseRelatedApiService;
// private WxEnterpriseRelatedApiService wxEnterpriseRel
ll
atedApiService;
//企业列表
@RequestMapping
(
"wx-enterprise-list"
)
public
HaobanResponse
wxEnterpriseList
(
BasePageInfo
pageInfo
,
String
keyword
,
String
gicEnterpriseName
,
Integer
gicContactHelper
,
String
version
)
{
List
<
EnterpriseDTO
>
enterpriseNames
=
enterpriseService
.
getEnterpriseByName
(
gicEnterpriseName
);
List
<
String
>
enterpriseIds
=
enterpriseNames
.
stream
().
map
(
s
->
s
.
getEnterpriseId
()).
collect
(
Collectors
.
toList
());
List
<
EnterpriseDetailDTO
>
wxEnterpriseIdDTOs
=
wxEnterpriseRelatedApiService
.
listEnterpriseByEnterpriseIds
(
enterpriseIds
);
List
<
String
>
wxEnterpriseIds
=
wxEnterpriseIdDTOs
.
stream
().
map
(
s
->
s
.
getWxEnterpriseId
()).
collect
(
Collectors
.
toList
());
List
<
String
>
wxEnterpriseIds
=
new
ArrayList
<
String
>();
if
(
CollectionUtil
.
isNotEmpty
(
enterpriseNames
)){
List
<
String
>
enterpriseIds
=
enterpriseNames
.
stream
().
map
(
s
->
s
.
getEnterpriseId
()).
collect
(
Collectors
.
toList
());
List
<
EnterpriseDetailDTO
>
wxEnterpriseIdDTOs
=
wxEnterpriseRelatedApiService
.
listEnterpriseByEnterpriseIds
(
enterpriseIds
);
if
(
CollectionUtil
.
isNotEmpty
(
wxEnterpriseIdDTOs
)){
wxEnterpriseIds
=
wxEnterpriseIdDTOs
.
stream
().
map
(
s
->
s
.
getWxEnterpriseId
()).
collect
(
Collectors
.
toList
());
}
}
Page
<
YwWxEnterpriseDTO
>
page
=
wxEnterpriseApiService
.
list
(
pageInfo
,
keyword
,
wxEnterpriseIds
,
gicContactHelper
,
version
);
PageResult
<
YwWxEnterpriseDTO
>
pageVo
=
new
PageResult
<>();
List
<
YwWxEnterpriseDTO
>
list
=
EntityUtil
.
changeEntityListByJSON
(
YwWxEnterpriseDTO
.
class
,
page
.
getResult
());
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/BindApiServiceImpl.java
View file @
70392891
...
...
@@ -250,7 +250,7 @@ public class BindApiServiceImpl implements BindApiService {
for
(
ClerkDTO
clerkDTO
:
list
){
clerkDTO
.
setPhoneNumber
(
staffDTO
.
getPhoneNumber
());
clerkDTO
.
setClerkName
(
staffDTO
.
getStaffName
());
clerkDTO
.
setHeadImgUrl
(
StringUtils
.
isEmpty
(
staffDTO
.
getHeadImg
())?
"
--
"
:
staffDTO
.
getHeadImg
());
clerkDTO
.
setHeadImgUrl
(
StringUtils
.
isEmpty
(
staffDTO
.
getHeadImg
())?
""
:
staffDTO
.
getHeadImg
());
clerkService
.
updateClerk
(
clerkDTO
);
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MessageApiServiceImpl.java
View file @
70392891
...
...
@@ -6,6 +6,7 @@ import com.gic.commons.util.GICMQClientUtil;
import
com.gic.haoban.base.api.common.Constant
;
import
com.gic.haoban.base.api.common.ServiceResponse
;
import
com.gic.haoban.manage.api.dto.DepartmentDTO
;
import
com.gic.haoban.manage.api.dto.GicClerkDTO
;
import
com.gic.haoban.manage.api.dto.GicMessageDTO
;
import
com.gic.haoban.manage.api.dto.QywxCallBackDTO
;
import
com.gic.haoban.manage.api.dto.StaffDTO
;
...
...
@@ -106,6 +107,10 @@ public class MessageApiServiceImpl implements MessageApiService {
departmentDTO
.
setWxEnterpriseId
(
enterprise
.
getWxEnterpriseId
());
if
(
dto
.
getChangeType
()
==
GicEditType
.
ADD
.
getCode
()){
ServiceResponse
response
=
this
.
departmentApiService
.
add
(
departmentDTO
);
GicClerkDTO
gicClerkDTO
=
dto
.
getGicClerkDTO
();
if
(
gicClerkDTO
!=
null
){
staffApiService
.
addGicClerk
(
gicClerkDTO
);
}
log
.
info
(
"添加结果:{}"
,
JSON
.
toJSONString
(
response
));
}
else
if
(
dto
.
getChangeType
()
==
GicEditType
.
UPDATE
.
getCode
()){
TabHaobanDepartment
department
=
this
.
departmentService
.
selectByRelatedId
(
dto
.
getId
());
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
70392891
...
...
@@ -38,6 +38,7 @@ import com.gic.haoban.common.utils.PageUtil;
import
com.gic.haoban.common.utils.StringUtil
;
import
com.gic.haoban.common.utils.UuidUtil
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.WxEnterpriseRelatedApiService
;
import
com.gic.haoban.manage.service.dao.mapper.StaffDepartmentRelatedMapper
;
import
com.gic.haoban.manage.service.dao.mapper.StaffMapper
;
import
com.gic.haoban.manage.service.entity.TabHaobanDepartment
;
...
...
@@ -53,6 +54,7 @@ import com.gic.haoban.manage.service.service.WxEnterpriseService;
import
com.gic.wechat.api.dto.qywx.UserDTO
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
com.github.pagehelper.PageHelper
;
import
com.google.i18n.phonenumbers.PhoneNumberUtil
;
@Service
public
class
StaffApiServiceImpl
implements
StaffApiService
{
...
...
@@ -85,6 +87,8 @@ public class StaffApiServiceImpl implements StaffApiService {
private
StoreGroupService
storeGroupService
;
@Autowired
private
UserLoginLogService
userLoginLogService
;
@Autowired
private
WxEnterpriseRelatedApiService
wxEnterpriseRelatedApiService
;
@Override
public
StaffDTO
selectById
(
String
staffId
)
{
...
...
@@ -342,6 +346,33 @@ public class StaffApiServiceImpl implements StaffApiService {
}
}
}
}
else
{
WxEnterpriseDTO
enterpriseDTO
=
wxEnterpriseService
.
selectById
(
wxEnterpriseId
);
TabHaobanWxApplication
application
=
wxApplicationService
.
selectByWxEnterpriseIdAndApplicationType
(
wxEnterpriseId
,
1
);
if
(
application
==
null
){
application
=
wxApplicationService
.
selectByWxEnterpriseIdAndApplicationType
(
wxEnterpriseId
,
2
);
}
if
(
enterpriseDTO
!=
null
)
{
if
(
application
!=
null
)
{
UserDTO
user
=
qywxUserApiService
.
getWorkWxUser
(
enterpriseDTO
.
getCorpid
(),
application
.
getSiteId
(),
userId
);
logger
.
info
(
"【修改用户】user={}"
,
JSON
.
toJSONString
(
user
));
Integer
[]
departmentId
=
user
.
getDepartment
();
String
departmentIds
=
""
;
for
(
Integer
integer
:
departmentId
)
{
TabHaobanDepartment
tabDepartment
=
departmentService
.
getByWxId
(
integer
.
toString
(),
wxEnterpriseId
);
if
(
tabDepartment
!=
null
){
departmentIds
+=
tabDepartment
.
getDepartmentId
()
+
","
;
}
}
if
(
StringUtils
.
isNotBlank
(
departmentIds
)){
departmentIds
=
departmentIds
.
substring
(
1
,
departmentIds
.
length
()
-
1
);
}
StaffDTO
staffDTO
=
EntityUtil
.
changeEntityByJSON
(
StaffDTO
.
class
,
staff
);
staffDTO
.
setWeixinPush
(
true
);
this
.
staffEdit
(
staffDTO
,
departmentIds
);
//String staffId = staffService.add(tab);
}
}
}
}
...
...
@@ -586,8 +617,10 @@ public class StaffApiServiceImpl implements StaffApiService {
continue
;
}
}
addClerkByGic
(
clerkMid
);
if
(
wxEnterpriseRelatedApiService
.
enterpriseUseNew
(
clerkMid
.
getEnterpriseId
())){
addClerkByGic
(
clerkMid
);
}
}
...
...
@@ -755,5 +788,20 @@ public class StaffApiServiceImpl implements StaffApiService {
}
return
staffDepartmentRelatedMapper
.
countByDepartmentIds
(
departmentIds
);
}
// private String getMobile(String phoneNumber,String nationcode){
// String mobile = nationcode + phoneNumber;
// return mobile;
// }
//
// private String getNationcode(String mobile){
// String nationcode = "";
// return nationcode;
// }
//
// private String getPhoneNumber(String mobile){
// String phoneNumber = "";
// return phoneNumber;
// }
}
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/StoreController.java
View file @
70392891
...
...
@@ -44,6 +44,7 @@ public class StoreController extends WebBaseController{
page
.
setPageSize
(
basePageInfo
.
getPageSize
());
StoreSearchDTO
storeSearchDTO
=
new
StoreSearchDTO
();
storeSearchDTO
.
setEnterpriseId
(
enterpriseId
);
storeSearchDTO
.
setStatus
(
"2"
);
Page
<
StoreDTO
>
resultPage
=
storeService
.
storeListPage
(
page
,
storeSearchDTO
);
List
<
StoreDTO
>
resultList
=
resultPage
.
getResult
();
PageResult
<
StoreDTO
>
pageVo
=
new
PageResult
<>();
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/StoreController.java
View file @
70392891
...
...
@@ -294,6 +294,9 @@ public class StoreController extends WebBaseController{
vo
.
setClerkCode
(
staffDepartmentRelatedDTO
.
getClerkCode
());
vo
.
setBindFlag
(
StringUtils
.
isEmpty
(
staffDepartmentRelatedDTO
.
getClerkCode
())?
0
:
1
);
vo
.
setAuditDetail
(
list
);
AuditSettingDTO
auditSettingDTO
=
auditSettingApiService
.
findSettingByWxEnterpriseId
(
staffDepartmentRelatedDTO
.
getWxEnterpriseId
());
vo
.
setAuditFlag
(
auditSettingDTO
==
null
?
0
:
auditSettingDTO
.
getAuditFlag
());
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
vo
);
}
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/vo/StoreDetailVO.java
View file @
70392891
...
...
@@ -41,6 +41,16 @@ public class StoreDetailVO implements Serializable {
private
Object
auditDetail
;
private
Integer
auditFlag
=
0
;
public
Integer
getAuditFlag
()
{
return
auditFlag
;
}
public
void
setAuditFlag
(
Integer
auditFlag
)
{
this
.
auditFlag
=
auditFlag
;
}
public
Object
getAuditDetail
()
{
return
auditDetail
;
}
...
...
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