Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rop-dj-oaapproval
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 42e7b27b
authored
May 03, 2026
by
zhouhaibao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]审批接口
1 parent
1853c7a8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
17 deletions
src/main/java/cn/com/glsx/dj/oaapproval/dto/excel/SingleStoreExcelDTO.java
src/main/java/cn/com/glsx/dj/oaapproval/listener/CreateBusinessApproveExcelListener.java
src/main/java/cn/com/glsx/dj/oaapproval/service/StoreApproveService.java
src/test/java/cn/com/glsx/dj/oaapproval/controller/CreateBussinessApproveControllerTest.java
src/main/java/cn/com/glsx/dj/oaapproval/dto/excel/SingleStoreExcelDTO.java
View file @
42e7b27
...
@@ -22,7 +22,7 @@ public class SingleStoreExcelDTO {
...
@@ -22,7 +22,7 @@ public class SingleStoreExcelDTO {
@ExcelMergeRow
(
columIndex
=
3
)
@ExcelMergeRow
(
columIndex
=
3
)
@ExcelProperty
(
value
=
"服务商2/F公司"
,
index
=
3
)
@ExcelProperty
(
value
=
"服务商2/F公司"
,
index
=
3
)
private
String
serviceProvider2f
;
private
String
fCompany
;
@ExcelMergeRow
(
columIndex
=
4
)
@ExcelMergeRow
(
columIndex
=
4
)
@ExcelProperty
(
value
=
"*服务商"
,
index
=
4
)
@ExcelProperty
(
value
=
"*服务商"
,
index
=
4
)
...
...
src/main/java/cn/com/glsx/dj/oaapproval/listener/CreateBusinessApproveExcelListener.java
View file @
42e7b27
...
@@ -60,7 +60,7 @@ public class CreateBusinessApproveExcelListener extends AnalysisEventListener<Ob
...
@@ -60,7 +60,7 @@ public class CreateBusinessApproveExcelListener extends AnalysisEventListener<Ob
this
.
mergedCellHandler
=
mergedCellHandler
;
this
.
mergedCellHandler
=
mergedCellHandler
;
}
}
public
CreateBusinessApproveExcelListener
(
CreateBusinessApproveImportExcelContext
context
,
boolean
isSingleStoreMode
,
MergedCellHandler
mergedCellHandler
,
Integer
merchantId
,
String
merchantName
)
{
public
CreateBusinessApproveExcelListener
(
CreateBusinessApproveImportExcelContext
context
,
boolean
isSingleStoreMode
,
Integer
merchantId
,
String
merchantName
)
{
this
.
context
=
context
;
this
.
context
=
context
;
this
.
isSingleStoreMode
=
isSingleStoreMode
;
this
.
isSingleStoreMode
=
isSingleStoreMode
;
this
.
merchantId
=
merchantId
;
this
.
merchantId
=
merchantId
;
...
@@ -202,17 +202,16 @@ public class CreateBusinessApproveExcelListener extends AnalysisEventListener<Ob
...
@@ -202,17 +202,16 @@ public class CreateBusinessApproveExcelListener extends AnalysisEventListener<Ob
private
void
processSingleStoreMode
(
SingleStoreExcelDTO
data
,
Integer
rowIndex
)
{
private
void
processSingleStoreMode
(
SingleStoreExcelDTO
data
,
Integer
rowIndex
)
{
try
{
try
{
StoreWithProductsDTO
storeDTO
=
storeMap
.
get
(
merchantName
);
String
storeCode
=
merchantId
+
""
;
StoreWithProductsDTO
storeDTO
=
storeMap
.
get
(
storeCode
);
if
(
storeDTO
==
null
)
{
if
(
storeDTO
==
null
)
{
storeDTO
=
createStoreWithProductsDTO
(
data
,
merchantId
,
merchantName
);
storeDTO
=
createStoreWithProductsDTO
(
data
,
merchantId
,
merchantName
);
storeMap
.
put
(
merchantName
,
storeDTO
);
storeMap
.
put
(
storeCode
,
storeDTO
);
storeWithProducts
.
add
(
storeDTO
);
}
}
mergedCellHandler
.
fillMergedCellValues
(
data
);
StoreProductDetailDTO
productDTO
=
createStoreProductDetailDTO
(
data
);
StoreProductDetailDTO
productDTO
=
createStoreProductDetailDTO
(
data
);
store
ProductDetailDTOList
.
add
(
productDTO
);
store
DTO
.
getProductDetails
()
.
add
(
productDTO
);
this
.
context
.
incrementSuccessRows
();
this
.
context
.
incrementSuccessRows
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -322,8 +321,8 @@ public class CreateBusinessApproveExcelListener extends AnalysisEventListener<Ob
...
@@ -322,8 +321,8 @@ public class CreateBusinessApproveExcelListener extends AnalysisEventListener<Ob
String
firstCellStr
=
""
;
String
firstCellStr
=
""
;
if
(
data
instanceof
SingleStoreExcelDTO
)
{
if
(
data
instanceof
SingleStoreExcelDTO
)
{
SingleStoreExcelDTO
dto
=
(
SingleStoreExcelDTO
)
data
;
SingleStoreExcelDTO
dto
=
(
SingleStoreExcelDTO
)
data
;
if
(
dto
.
get
ProductCategory
()
!=
null
)
{
if
(
dto
.
get
BizMode
()
!=
null
)
{
firstCellStr
=
dto
.
get
ProductCategory
().
trim
();
firstCellStr
=
dto
.
get
BizMode
().
trim
();
}
}
}
else
if
(
data
instanceof
BatchStoreExcelDTO
)
{
}
else
if
(
data
instanceof
BatchStoreExcelDTO
)
{
BatchStoreExcelDTO
dto
=
(
BatchStoreExcelDTO
)
data
;
BatchStoreExcelDTO
dto
=
(
BatchStoreExcelDTO
)
data
;
...
@@ -365,7 +364,7 @@ public class CreateBusinessApproveExcelListener extends AnalysisEventListener<Ob
...
@@ -365,7 +364,7 @@ public class CreateBusinessApproveExcelListener extends AnalysisEventListener<Ob
storeDTO
.
setBizMode
(
data
.
getBizMode
());
storeDTO
.
setBizMode
(
data
.
getBizMode
());
storeDTO
.
setSigningEntity
(
data
.
getSigningEntity
());
storeDTO
.
setSigningEntity
(
data
.
getSigningEntity
());
storeDTO
.
setOpMode
(
data
.
getOpMode
());
storeDTO
.
setOpMode
(
data
.
getOpMode
());
storeDTO
.
setFCompany
(
data
.
get
ServiceProvider2f
());
storeDTO
.
setFCompany
(
data
.
get
FCompany
());
storeDTO
.
setServiceProvider
(
data
.
getServiceProvider
());
storeDTO
.
setServiceProvider
(
data
.
getServiceProvider
());
storeDTO
.
setSuperiorProvider
(
data
.
getSuperiorProvider
());
storeDTO
.
setSuperiorProvider
(
data
.
getSuperiorProvider
());
storeDTO
.
setParkingStore
(
data
.
getParkingStore
());
storeDTO
.
setParkingStore
(
data
.
getParkingStore
());
...
...
src/main/java/cn/com/glsx/dj/oaapproval/service/StoreApproveService.java
View file @
42e7b27
...
@@ -129,7 +129,7 @@ public class StoreApproveService {
...
@@ -129,7 +129,7 @@ public class StoreApproveService {
CreateBusinessApproveExcelListener
listener
;
CreateBusinessApproveExcelListener
listener
;
if
(
isSingleStoreMode
)
{
if
(
isSingleStoreMode
)
{
listener
=
new
CreateBusinessApproveExcelListener
(
context
,
isSingleStoreMode
,
listener
=
new
CreateBusinessApproveExcelListener
(
context
,
isSingleStoreMode
,
mergedCellHandler
,
storeApproveDTO
.
getMerchantId
(),
storeApproveDTO
.
getMerchantName
()
);
mergedCellHandler
);
EasyExcel
.
read
(
inputStream
,
SingleStoreExcelDTO
.
class
,
listener
)
EasyExcel
.
read
(
inputStream
,
SingleStoreExcelDTO
.
class
,
listener
)
.
sheet
()
.
sheet
()
.
headRowNumber
(
2
)
.
headRowNumber
(
2
)
...
...
src/test/java/cn/com/glsx/dj/oaapproval/controller/CreateBussinessApproveControllerTest.java
View file @
42e7b27
...
@@ -54,7 +54,7 @@ public class CreateBussinessApproveControllerTest extends BaseControllerTest {
...
@@ -54,7 +54,7 @@ public class CreateBussinessApproveControllerTest extends BaseControllerTest {
@Test
@Test
public
void
testCreateDraft
()
throws
Exception
{
public
void
testCreateDraft
()
throws
Exception
{
UploadFile
uploadFile
=
new
UploadFile
(
new
File
(
"F:\\360MoveData\\Users\\11\\Desktop\\模版\\门店上架模版-
单店模式
- 副本.xlsx"
));
UploadFile
uploadFile
=
new
UploadFile
(
new
File
(
"F:\\360MoveData\\Users\\11\\Desktop\\模版\\门店上架模版-
项目制批量上架
- 副本.xlsx"
));
String
file
=
"xlsx@"
+
Base64
.
encodeBase64String
(
uploadFile
.
getContent
());
String
file
=
"xlsx@"
+
Base64
.
encodeBase64String
(
uploadFile
.
getContent
());
MultiValueMap
<
String
,
String
>
params
=
new
LinkedMultiValueMap
<
String
,
String
>(
10
);
MultiValueMap
<
String
,
String
>
params
=
new
LinkedMultiValueMap
<
String
,
String
>(
10
);
params
.
add
(
"v"
,
"1.0.0"
);
params
.
add
(
"v"
,
"1.0.0"
);
...
@@ -62,12 +62,10 @@ public class CreateBussinessApproveControllerTest extends BaseControllerTest {
...
@@ -62,12 +62,10 @@ public class CreateBussinessApproveControllerTest extends BaseControllerTest {
params
.
add
(
"file"
,
file
);
params
.
add
(
"file"
,
file
);
params
.
add
(
"basicApproveInfo"
,
"{\"storeCode\":\"10001\",\"storeName\":\"测试门店\",\"merchantId\":1,\"merchantName\":\"测试商户\"}"
);
params
.
add
(
"basicApproveInfo"
,
"{\"storeCode\":\"10001\",\"storeName\":\"测试门店\",\"merchantId\":1,\"merchantName\":\"测试商户\"}"
);
params
.
add
(
"approveType"
,
"1"
);
params
.
add
(
"approveType"
,
"1"
);
params
.
add
(
"shelfType"
,
"1"
);
params
.
add
(
"shelfType"
,
"2"
);
params
.
add
(
"merchantId"
,
"44217777"
);
params
.
add
(
"merchantName"
,
"搭嘎121啊"
);
params
.
add
(
"sceneType"
,
"1"
);
params
.
add
(
"sceneType"
,
"1"
);
params
.
add
(
"baseSceneCode"
,
"110101"
);
params
.
add
(
"baseSceneCode"
,
"110101"
);
params
.
add
(
"sessionId"
,
"
0ae26405-366a-4e58-9981-820c8aee5e36
"
);
params
.
add
(
"sessionId"
,
"
eb96ef78-fcd3-4996-9ba7-22edb510c0f9
"
);
params
.
add
(
"submitFlag"
,
"0"
);
params
.
add
(
"submitFlag"
,
"0"
);
System
.
out
.
println
(
post
(
params
));
System
.
out
.
println
(
post
(
params
));
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment