Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-webapp-plug
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-webapp-plug
Commits
8a173552
Commit
8a173552
authored
Sep 21, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码规范
parent
1cbff4ae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
28 deletions
+28
-28
ProvincesController.java
...java/com/gic/plug/web/controller/ProvincesController.java
+15
-15
StoreCustomBackImpl.java
...a/com/gic/plug/web/strategy/impl/StoreCustomBackImpl.java
+13
-13
No files found.
src/main/java/com/gic/plug/web/controller/ProvincesController.java
View file @
8a173552
...
@@ -44,9 +44,9 @@ public class ProvincesController {
...
@@ -44,9 +44,9 @@ public class ProvincesController {
ServiceResponse
<
List
<
ProvinceDTO
>>
serviceResponse
=
this
.
provincesApiService
.
selectAllProvince
();
ServiceResponse
<
List
<
ProvinceDTO
>>
serviceResponse
=
this
.
provincesApiService
.
selectAllProvince
();
return
RestResponse
.
success
(
EntityUtil
.
changeEntityListByJSON
(
ProvinceVO
.
class
,
serviceResponse
.
getResult
()));
return
RestResponse
.
success
(
EntityUtil
.
changeEntityListByJSON
(
ProvinceVO
.
class
,
serviceResponse
.
getResult
()));
case
2
:
case
2
:
ServiceResponse
<
List
<
CityDTO
>>
serviceResponse1
=
this
.
provincesApiService
.
selectAllCity
();
ServiceResponse
<
List
<
CityDTO
>>
cityResponse
=
this
.
provincesApiService
.
selectAllCity
();
if
(
serviceResponse1
.
isSuccess
()){
if
(
cityResponse
.
isSuccess
()){
List
<
CityDTO
>
list
=
serviceResponse1
.
getResult
();
List
<
CityDTO
>
list
=
cityResponse
.
getResult
();
List
<
CityVO
>
resultList
=
new
ArrayList
<>();
List
<
CityVO
>
resultList
=
new
ArrayList
<>();
for
(
CityDTO
cityDTO
:
list
){
for
(
CityDTO
cityDTO
:
list
){
if
(
cityDTO
.
getProvinceId
().
equals
(
id
)){
if
(
cityDTO
.
getProvinceId
().
equals
(
id
)){
...
@@ -56,9 +56,9 @@ public class ProvincesController {
...
@@ -56,9 +56,9 @@ public class ProvincesController {
return
RestResponse
.
success
(
resultList
);
return
RestResponse
.
success
(
resultList
);
}
}
case
3
:
case
3
:
ServiceResponse
<
List
<
CountyDTO
>>
serviceResponse2
=
this
.
provincesApiService
.
selectAllCounty
();
ServiceResponse
<
List
<
CountyDTO
>>
countyResponse
=
this
.
provincesApiService
.
selectAllCounty
();
if
(
serviceResponse2
.
isSuccess
()){
if
(
countyResponse
.
isSuccess
()){
List
<
CountyDTO
>
list
=
serviceResponse2
.
getResult
();
List
<
CountyDTO
>
list
=
countyResponse
.
getResult
();
List
<
CountyDTO
>
resultList
=
new
ArrayList
<>();
List
<
CountyDTO
>
resultList
=
new
ArrayList
<>();
for
(
CountyDTO
countyDTO
:
list
){
for
(
CountyDTO
countyDTO
:
list
){
if
(
countyDTO
.
getCityId
().
equals
(
id
)){
if
(
countyDTO
.
getCityId
().
equals
(
id
)){
...
@@ -120,8 +120,8 @@ public class ProvincesController {
...
@@ -120,8 +120,8 @@ public class ProvincesController {
}
}
List
<
String
>
result
=
new
ArrayList
<>();
List
<
String
>
result
=
new
ArrayList
<>();
ServiceResponse
<
List
<
ProvinceDTO
>>
serviceResponse
=
this
.
provincesApiService
.
selectAllProvince
();
ServiceResponse
<
List
<
ProvinceDTO
>>
serviceResponse
=
this
.
provincesApiService
.
selectAllProvince
();
ServiceResponse
<
List
<
CityDTO
>>
serviceResponse1
=
this
.
provincesApiService
.
selectAllCity
();
ServiceResponse
<
List
<
CityDTO
>>
cityResponse
=
this
.
provincesApiService
.
selectAllCity
();
ServiceResponse
<
List
<
CountyDTO
>>
serviceResponse2
=
this
.
provincesApiService
.
selectAllCounty
();
ServiceResponse
<
List
<
CountyDTO
>>
countyResponse
=
this
.
provincesApiService
.
selectAllCounty
();
String
[]
idArr
=
ids
.
split
(
","
);
String
[]
idArr
=
ids
.
split
(
","
);
for
(
String
id
:
idArr
){
for
(
String
id
:
idArr
){
if
(
serviceResponse
.
isSuccess
()){
if
(
serviceResponse
.
isSuccess
()){
...
@@ -133,8 +133,8 @@ public class ProvincesController {
...
@@ -133,8 +133,8 @@ public class ProvincesController {
}
}
}
}
}
}
if
(
serviceResponse1
.
isSuccess
()){
if
(
cityResponse
.
isSuccess
()){
List
<
CityDTO
>
cityDTOList
=
serviceResponse1
.
getResult
();
List
<
CityDTO
>
cityDTOList
=
cityResponse
.
getResult
();
for
(
CityDTO
cityDTO
:
cityDTOList
){
for
(
CityDTO
cityDTO
:
cityDTOList
){
if
(
id
.
equals
(
cityDTO
.
getCityId
())){
if
(
id
.
equals
(
cityDTO
.
getCityId
())){
result
.
add
(
cityDTO
.
getCityName
());
result
.
add
(
cityDTO
.
getCityName
());
...
@@ -142,8 +142,8 @@ public class ProvincesController {
...
@@ -142,8 +142,8 @@ public class ProvincesController {
}
}
}
}
}
}
if
(
serviceResponse2
.
isSuccess
()){
if
(
countyResponse
.
isSuccess
()){
List
<
CountyDTO
>
countyDTOList
=
serviceResponse2
.
getResult
();
List
<
CountyDTO
>
countyDTOList
=
countyResponse
.
getResult
();
for
(
CountyDTO
countyDTO
:
countyDTOList
){
for
(
CountyDTO
countyDTO
:
countyDTOList
){
if
(
id
.
equals
(
countyDTO
.
getCountyId
())){
if
(
id
.
equals
(
countyDTO
.
getCountyId
())){
result
.
add
(
countyDTO
.
getCountyName
());
result
.
add
(
countyDTO
.
getCountyName
());
...
@@ -160,7 +160,7 @@ public class ProvincesController {
...
@@ -160,7 +160,7 @@ public class ProvincesController {
@IgnoreLogin
@IgnoreLogin
public
RestResponse
listProvincesCitys
(){
public
RestResponse
listProvincesCitys
(){
ServiceResponse
<
List
<
ProvinceDTO
>>
serviceResponse
=
this
.
provincesApiService
.
selectAllProvince
();
ServiceResponse
<
List
<
ProvinceDTO
>>
serviceResponse
=
this
.
provincesApiService
.
selectAllProvince
();
ServiceResponse
<
List
<
CityDTO
>>
serviceResponse1
=
this
.
provincesApiService
.
selectAllCity
();
ServiceResponse
<
List
<
CityDTO
>>
citResponse
=
this
.
provincesApiService
.
selectAllCity
();
List
<
JSONObject
>
result
=
new
ArrayList
<>();
List
<
JSONObject
>
result
=
new
ArrayList
<>();
if
(
serviceResponse
.
isSuccess
()){
if
(
serviceResponse
.
isSuccess
()){
List
<
ProvinceDTO
>
list
=
serviceResponse
.
getResult
();
List
<
ProvinceDTO
>
list
=
serviceResponse
.
getResult
();
...
@@ -169,8 +169,8 @@ public class ProvincesController {
...
@@ -169,8 +169,8 @@ public class ProvincesController {
JSONObject
jsonObject
=
new
JSONObject
();
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"provinceId"
,
provinceDTO
.
getProvinceId
());
jsonObject
.
put
(
"provinceId"
,
provinceDTO
.
getProvinceId
());
jsonObject
.
put
(
"provinceName"
,
provinceDTO
.
getProvinceName
());
jsonObject
.
put
(
"provinceName"
,
provinceDTO
.
getProvinceName
());
if
(
serviceResponse1
.
isSuccess
()){
if
(
citResponse
.
isSuccess
()){
List
<
CityDTO
>
cityDTOList
=
serviceResponse1
.
getResult
();
List
<
CityDTO
>
cityDTOList
=
citResponse
.
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
cityDTOList
)){
if
(
CollectionUtils
.
isNotEmpty
(
cityDTOList
)){
List
<
JSONObject
>
jsonObjectList
=
new
ArrayList
<>();
List
<
JSONObject
>
jsonObjectList
=
new
ArrayList
<>();
for
(
CityDTO
cityDTO
:
cityDTOList
){
for
(
CityDTO
cityDTO
:
cityDTOList
){
...
...
src/main/java/com/gic/plug/web/strategy/impl/StoreCustomBackImpl.java
View file @
8a173552
...
@@ -158,41 +158,41 @@ public class StoreCustomBackImpl implements ScreenBackStrategy {
...
@@ -158,41 +158,41 @@ public class StoreCustomBackImpl implements ScreenBackStrategy {
public
String
yearMonthDateHourMinuteSecondBack
(
String
value
)
throws
ParseException
{
public
String
yearMonthDateHourMinuteSecondBack
(
String
value
)
throws
ParseException
{
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyyMMddHHmmss"
);
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyyMMddHHmmss"
);
SimpleDateFormat
simpleDateFormat
1
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
SimpleDateFormat
simpleDateFormat
Common
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
return
this
.
dateBack
(
value
,
simpleDateFormat
,
simpleDateFormat
1
);
return
this
.
dateBack
(
value
,
simpleDateFormat
,
simpleDateFormat
Common
);
}
}
public
String
yearMonthDateBack
(
String
value
)
throws
ParseException
{
public
String
yearMonthDateBack
(
String
value
)
throws
ParseException
{
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
SimpleDateFormat
simpleDateFormat
1
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
SimpleDateFormat
simpleDateFormat
Common
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
return
this
.
dateBack
(
value
,
simpleDateFormat
,
simpleDateFormat
1
);
return
this
.
dateBack
(
value
,
simpleDateFormat
,
simpleDateFormat
Common
);
}
}
public
String
yearMonth
(
String
value
)
throws
ParseException
{
public
String
yearMonth
(
String
value
)
throws
ParseException
{
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyyMM"
);
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyyMM"
);
SimpleDateFormat
simpleDateFormat
1
=
new
SimpleDateFormat
(
"yyyy-MM"
);
SimpleDateFormat
simpleDateFormat
Common
=
new
SimpleDateFormat
(
"yyyy-MM"
);
return
this
.
dateBack
(
value
,
simpleDateFormat
,
simpleDateFormat
1
);
return
this
.
dateBack
(
value
,
simpleDateFormat
,
simpleDateFormat
Common
);
}
}
public
String
monthDateBack
(
String
value
)
throws
ParseException
{
public
String
monthDateBack
(
String
value
)
throws
ParseException
{
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"MMdd"
);
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"MMdd"
);
SimpleDateFormat
simpleDateFormat
1
=
new
SimpleDateFormat
(
"MM-dd"
);
SimpleDateFormat
simpleDateFormat
Common
=
new
SimpleDateFormat
(
"MM-dd"
);
return
this
.
dateBack
(
value
,
simpleDateFormat
,
simpleDateFormat
1
);
return
this
.
dateBack
(
value
,
simpleDateFormat
,
simpleDateFormat
Common
);
}
}
public
String
hourMinuteSecondBack
(
String
value
)
throws
ParseException
{
public
String
hourMinuteSecondBack
(
String
value
)
throws
ParseException
{
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"HHmmss"
);
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"HHmmss"
);
SimpleDateFormat
simpleDateFormat
1
=
new
SimpleDateFormat
(
"HH:mm:ss"
);
SimpleDateFormat
simpleDateFormat
Common
=
new
SimpleDateFormat
(
"HH:mm:ss"
);
return
this
.
dateBack
(
value
,
simpleDateFormat
,
simpleDateFormat
1
);
return
this
.
dateBack
(
value
,
simpleDateFormat
,
simpleDateFormat
Common
);
}
}
private
String
dateBack
(
String
value
,
SimpleDateFormat
simpleDateFormat
,
SimpleDateFormat
simpleDateFormat
1
)
throws
ParseException
{
private
String
dateBack
(
String
value
,
SimpleDateFormat
simpleDateFormat
,
SimpleDateFormat
simpleDateFormat
Common
)
throws
ParseException
{
String
[]
valueArr
=
value
.
split
(
" "
);
String
[]
valueArr
=
value
.
split
(
" "
);
StringBuilder
stringBuilder
=
new
StringBuilder
();
StringBuilder
stringBuilder
=
new
StringBuilder
();
stringBuilder
.
append
(
"【"
).
append
(
simpleDateFormat
1
.
format
(
simpleDateFormat
.
parse
(
valueArr
[
0
]))).
append
(
"】"
).
append
(
" "
);
stringBuilder
.
append
(
"【"
).
append
(
simpleDateFormat
Common
.
format
(
simpleDateFormat
.
parse
(
valueArr
[
0
]))).
append
(
"】"
).
append
(
" "
);
if
(
valueArr
.
length
>
1
)
{
if
(
valueArr
.
length
>
1
)
{
stringBuilder
.
append
(
"至"
);
stringBuilder
.
append
(
"至"
);
stringBuilder
.
append
(
"【"
).
append
(
simpleDateFormat
1
.
format
(
simpleDateFormat
.
parse
(
valueArr
[
1
]))).
append
(
"】"
).
append
(
" "
);
stringBuilder
.
append
(
"【"
).
append
(
simpleDateFormat
Common
.
format
(
simpleDateFormat
.
parse
(
valueArr
[
1
]))).
append
(
"】"
).
append
(
" "
);
}
}
return
stringBuilder
.
toString
();
return
stringBuilder
.
toString
();
}
}
...
...
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