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
236f34a3
Commit
236f34a3
authored
Feb 21, 2025
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
批量导入调整
parent
74c81091
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
0 deletions
+28
-0
OpenStaffImportDTO.java
...ava/com/gic/haoban/manage/api/dto/OpenStaffImportDTO.java
+9
-0
OpenStaffImportTaskApiServiceImpl.java
...e/service/out/impl/OpenStaffImportTaskApiServiceImpl.java
+1
-0
QywxOpenController.java
...haoban/manage/web/controller/open/QywxOpenController.java
+18
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/OpenStaffImportDTO.java
View file @
236f34a3
...
...
@@ -13,6 +13,15 @@ public class OpenStaffImportDTO implements Serializable {
private
String
loginName
;
private
String
realName
;
private
String
clerkCode
;
private
String
sourceUrl
;
public
String
getSourceUrl
()
{
return
sourceUrl
;
}
public
void
setSourceUrl
(
String
sourceUrl
)
{
this
.
sourceUrl
=
sourceUrl
;
}
public
String
getLoginName
()
{
return
loginName
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/OpenStaffImportTaskApiServiceImpl.java
View file @
236f34a3
...
...
@@ -133,6 +133,7 @@ public class OpenStaffImportTaskApiServiceImpl extends AbstractTaskCenterManageO
initTaskQo
.
setTaskModelName
(
"好办企微托管"
);
initTaskQo
.
setTaskName
(
"导入托管账号"
);
initTaskQo
.
setTaskContent
(
"批量导入托管账号"
+
dto
.
getClerkCodeList
().
size
()
+
"个"
);
initTaskQo
.
setSourceUrl
(
dto
.
getSourceUrl
());
try
{
TaskAllocationSdkClient
instance
=
TaskAllocationSdkClient
.
getInstance
();
String
taskId
=
instance
.
initTask
(
initTaskQo
);
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/open/QywxOpenController.java
View file @
236f34a3
...
...
@@ -35,10 +35,15 @@ import com.gic.haoban.manage.web.vo.open.OpenClerkVO;
import
com.gic.haoban.manage.web.vo.open.OpenQwAccountInfoVO
;
import
com.gic.haoban.manage.web.vo.open.OpenStaffVO
;
import
com.gic.qcloud.BucketNameEnum
;
import
com.gic.thirdparty.cloudfile.CloudFileUtil
;
import
com.gic.thirdparty.cloudfile.enums.CloudFileBusinessOptEnum
;
import
com.gic.thirdparty.cloudfile.enums.CloudFileTypeEnum
;
import
com.gic.thirdparty.cloudfile.pojo.CloudFileInfo
;
import
com.gic.web.common.download.DownloadTask
;
import
com.gic.web.common.download.DownloadTaskUtil
;
import
com.gic.web.common.download.constants.TaskTypeEnum
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.io.FileUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
...
...
@@ -49,6 +54,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.File
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -470,6 +476,16 @@ public class QywxOpenController {
if
(
CollectionUtils
.
isEmpty
(
clerkCodeList
))
{
return
RestResponse
.
failure
(
"9999"
,
"导入文件无数据"
);
}
File
excelFile
=
File
.
createTempFile
(
"tmp"
,
null
);
FileUtils
.
copyInputStreamToFile
(
file
.
getInputStream
(),
excelFile
);
EnterpriseDTO
en
=
this
.
enterpriseService
.
getEnterpriseById
(
enterpriseId
)
;
CloudFileInfo
uploadInfo
=
CloudFileUtil
.
uploadTempFile
(
excelFile
,
".xlxs"
,
CloudFileTypeEnum
.
FILE
,
en
.
getFactoryCode
()
,
CloudFileBusinessOptEnum
.
TASK_CENTER
,
365L
)
;
log
.
info
(
"上传返回的实体信息为:{}"
,
uploadInfo
);
String
sourceUrl
=
null
;
if
(
uploadInfo
!=
null
)
{
sourceUrl
=
uploadInfo
.
getOrgFileUrl
()
;
}
OpenStaffImportDTO
qdto
=
new
OpenStaffImportDTO
()
;
qdto
.
setWxEnterpriseId
(
wxEnterpriseId
);
qdto
.
setEnterpriseId
(
enterpriseId
);
...
...
@@ -477,8 +493,10 @@ public class QywxOpenController {
qdto
.
setClerkCodeList
(
clerkCodeList
);
qdto
.
setLoginName
(
login
.
getClerkName
());
qdto
.
setRealName
(
login
.
getClerkName
());
qdto
.
setSourceUrl
(
sourceUrl
);
ServiceResponse
<
String
>
serviceResponse
=
this
.
openStaffImportTaskApiService
.
createTask
(
qdto
);
log
.
info
(
"批量导入导购任务结果 result:{}"
,
JSON
.
toJSONString
(
serviceResponse
));
excelFile
.
delete
();
if
(
serviceResponse
.
isSuccess
())
{
return
RestResponse
.
successResult
(
serviceResponse
.
getResult
());
}
...
...
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