Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-store
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
base_platform_enterprise
gic-store
Commits
914aa506
Commit
914aa506
authored
Mar 23, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
7de42621
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
0 deletions
+33
-0
StoreTaskServiceImpl.java
...om/gic/store/service/outer/impl/StoreTaskServiceImpl.java
+16
-0
StoreImportController.java
...a/com/gic/store/web/controller/StoreImportController.java
+17
-0
No files found.
gic-store-service/src/main/java/com/gic/store/service/outer/impl/StoreTaskServiceImpl.java
View file @
914aa506
...
...
@@ -204,6 +204,22 @@ public class StoreTaskServiceImpl extends AbstractTaskAllocationOperation implem
storeDTO
.
setIsEditStoreGroup
(
0
);
}
// 经纬度校验
if
(
StringUtils
.
isNotBlank
(
storeDTO
.
getLongitude
()))
{
try
{
Float
.
valueOf
(
storeDTO
.
getLongitude
());
}
catch
(
NumberFormatException
e
)
{
t
.
setErrorMessage
(
"经度错误"
);
}
}
if
(
StringUtils
.
isNotBlank
(
storeDTO
.
getLatitude
()))
{
try
{
Float
.
valueOf
(
storeDTO
.
getLatitude
());
}
catch
(
NumberFormatException
e
)
{
t
.
setErrorMessage
(
"维度错误"
);
}
}
// 判断分组
// if (Integer.valueOf(1) == storeStrategyApiService.getStoreGroupStrategyWeight(t.getEnterpriseId()).getResult()) {
// // 不启用分组策略
...
...
gic-store-web/src/main/java/com/gic/store/web/controller/StoreImportController.java
View file @
914aa506
...
...
@@ -463,9 +463,26 @@ public class StoreImportController {
// validate = false;
// }
// }
bean
.
setLongitude
(
row
.
get
(
12
));
bean
.
setLatitude
(
row
.
get
(
13
));
// 经纬度校验
if
(
StringUtils
.
isNotBlank
(
bean
.
getLongitude
()))
{
try
{
Float
.
valueOf
(
bean
.
getLongitude
());
}
catch
(
NumberFormatException
e
)
{
errorMessage
.
append
(
"经度错误,"
);
}
}
if
(
StringUtils
.
isNotBlank
(
bean
.
getLatitude
()))
{
try
{
Float
.
valueOf
(
bean
.
getLatitude
());
}
catch
(
NumberFormatException
e
)
{
errorMessage
.
append
(
"维度错误,"
);
}
}
// 自定义属性
ServiceResponse
<
List
<
StoreFieldDTO
>>
fieldServiceResponse
=
storeFieldApiService
.
listStoreFieldByRegionId
(
regionId
);
List
<
StoreFieldDTO
>
fieldList
=
fieldServiceResponse
.
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