Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
0d4a1072
Commit
0d4a1072
authored
Feb 27, 2019
by
gary
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、fixbug
parent
0f65d57f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
11 deletions
+35
-11
DataInitTest.java
...test/java/pwc/taxtech/atms/service/impl/DataInitTest.java
+31
-7
organization-manage.html
...nfrastructure/organizationManage/organization-manage.html
+4
-4
No files found.
atms-api/src/test/java/pwc/taxtech/atms/service/impl/DataInitTest.java
View file @
0d4a1072
...
@@ -26,6 +26,7 @@ import java.io.IOException;
...
@@ -26,6 +26,7 @@ import java.io.IOException;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Field
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
/**
* @Auther: Gary J Li
* @Auther: Gary J Li
...
@@ -65,7 +66,6 @@ public class DataInitTest extends CommonIT {
...
@@ -65,7 +66,6 @@ public class DataInitTest extends CommonIT {
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
JSONObject
object
=
JSONObject
.
parseObject
(
input
);
JSONObject
object
=
JSONObject
.
parseObject
(
input
);
Map
<
String
,
Object
>
orgs
=
object
.
getInnerMap
();
Map
<
String
,
Object
>
orgs
=
object
.
getInnerMap
();
Map
<
String
,
Object
>
failList
=
new
HashMap
<>();
Map
<
String
,
Object
>
failList
=
new
HashMap
<>();
...
@@ -104,7 +104,13 @@ public class DataInitTest extends CommonIT {
...
@@ -104,7 +104,13 @@ public class DataInitTest extends CommonIT {
equityInfo
.
setPayableContributionProportion
(
Float
.
valueOf
((
investmentRadio
.
replace
(
"%"
,
""
))));
equityInfo
.
setPayableContributionProportion
(
Float
.
valueOf
((
investmentRadio
.
replace
(
"%"
,
""
))));
}
}
}
else
if
(
"payableCapitalContributionAmount"
.
equals
(
OrgKV
.
Map
.
get
(
eK
)))
{
}
else
if
(
"payableCapitalContributionAmount"
.
equals
(
OrgKV
.
Map
.
get
(
eK
)))
{
equityInfo
.
setPayableCapitalContributionAmount
((
long
)
Double
.
parseDouble
(((
String
)
eV
).
trim
()));
String
payableCapitalContributionAmount
=
((
String
)
eV
).
trim
();
if
(
payableCapitalContributionAmount
.
contains
(
","
)){
double
res
=
Arrays
.
asList
(
payableCapitalContributionAmount
.
split
(
","
)).
stream
().
mapToDouble
(
Double:
:
parseDouble
).
sum
();
equityInfo
.
setPayableCapitalContributionAmount
((
long
)
res
);
}
else
{
equityInfo
.
setPayableCapitalContributionAmount
(
"-"
.
equals
(
payableCapitalContributionAmount
)
?
0
:(
long
)
Double
.
parseDouble
(
payableCapitalContributionAmount
));
}
}
else
if
(
"investorName"
.
equals
(
OrgKV
.
Map
.
get
(
eK
)))
{
}
else
if
(
"investorName"
.
equals
(
OrgKV
.
Map
.
get
(
eK
)))
{
String
investorName
=
(
String
)
eV
;
String
investorName
=
(
String
)
eV
;
if
(
investorName
.
contains
(
"公司"
))
{
if
(
investorName
.
contains
(
"公司"
))
{
...
@@ -127,14 +133,14 @@ public class DataInitTest extends CommonIT {
...
@@ -127,14 +133,14 @@ public class DataInitTest extends CommonIT {
double
res
=
Arrays
.
asList
(
investmentAmountStr
.
split
(
","
)).
stream
().
mapToDouble
(
Double:
:
parseDouble
).
sum
();
double
res
=
Arrays
.
asList
(
investmentAmountStr
.
split
(
","
)).
stream
().
mapToDouble
(
Double:
:
parseDouble
).
sum
();
equityInfo
.
setInvestmentAmount
((
long
)
res
);
equityInfo
.
setInvestmentAmount
((
long
)
res
);
}
else
{
}
else
{
equityInfo
.
setInvestmentAmount
((
long
)
Double
.
parseDouble
(
investmentAmountStr
));
equityInfo
.
setInvestmentAmount
(
"-"
.
equals
(
investmentAmountStr
)
?
0
:
(
long
)
Double
.
parseDouble
(
investmentAmountStr
));
}
}
if
(
equityInfo
.
getPayableCapitalContributionAmount
()==
null
){
if
(
equityInfo
.
getPayableCapitalContributionAmount
()==
null
){
if
(
investmentAmountStr
.
contains
(
","
)){
if
(
investmentAmountStr
.
contains
(
","
)){
double
res
=
Arrays
.
asList
(
investmentAmountStr
.
split
(
","
)).
stream
().
mapToDouble
(
Double:
:
parseDouble
).
sum
();
double
res
=
Arrays
.
asList
(
investmentAmountStr
.
split
(
","
)).
stream
().
mapToDouble
(
Double:
:
parseDouble
).
sum
();
equityInfo
.
setPayableCapitalContributionAmount
((
long
)
res
);
equityInfo
.
setPayableCapitalContributionAmount
((
long
)
res
);
}
else
{
}
else
{
equityInfo
.
setPayableCapitalContributionAmount
((
long
)
Double
.
parseDouble
(
investmentAmountStr
));
equityInfo
.
setPayableCapitalContributionAmount
(
"-"
.
equals
(
investmentAmountStr
)
?
0
:
(
long
)
Double
.
parseDouble
(
investmentAmountStr
));
}
}
}
}
}
else
if
(
null
!=
OrgKV
.
Map
.
get
(
eK
))
{
}
else
if
(
null
!=
OrgKV
.
Map
.
get
(
eK
))
{
...
@@ -170,7 +176,13 @@ public class DataInitTest extends CommonIT {
...
@@ -170,7 +176,13 @@ public class DataInitTest extends CommonIT {
equityInfo
.
setPayableContributionProportion
(
Float
.
valueOf
((
investmentRadio
.
replace
(
"%"
,
""
))));
equityInfo
.
setPayableContributionProportion
(
Float
.
valueOf
((
investmentRadio
.
replace
(
"%"
,
""
))));
}
}
}
else
if
(
"payableCapitalContributionAmount"
.
equals
(
OrgKV
.
Map
.
get
(
eK
)))
{
}
else
if
(
"payableCapitalContributionAmount"
.
equals
(
OrgKV
.
Map
.
get
(
eK
)))
{
equityInfo
.
setPayableCapitalContributionAmount
((
long
)
Double
.
parseDouble
(((
String
)
eV
).
trim
()));
String
payableCapitalContributionAmount
=
((
String
)
eV
).
trim
();
if
(
payableCapitalContributionAmount
.
contains
(
","
)){
double
res
=
Arrays
.
asList
(
payableCapitalContributionAmount
.
split
(
","
)).
stream
().
mapToDouble
(
Double:
:
parseDouble
).
sum
();
equityInfo
.
setPayableCapitalContributionAmount
((
long
)
res
);
}
else
{
equityInfo
.
setPayableCapitalContributionAmount
(
"-"
.
equals
(
payableCapitalContributionAmount
)
?
0
:(
long
)
Double
.
parseDouble
(
payableCapitalContributionAmount
));
}
}
else
if
(
"investorName"
.
equals
(
OrgKV
.
Map
.
get
(
eK
)))
{
}
else
if
(
"investorName"
.
equals
(
OrgKV
.
Map
.
get
(
eK
)))
{
String
investorName
=
(
String
)
eV
;
String
investorName
=
(
String
)
eV
;
if
(
investorName
.
contains
(
"公司"
))
{
if
(
investorName
.
contains
(
"公司"
))
{
...
@@ -193,14 +205,14 @@ public class DataInitTest extends CommonIT {
...
@@ -193,14 +205,14 @@ public class DataInitTest extends CommonIT {
double
res
=
Arrays
.
asList
(
investmentAmountStr
.
split
(
","
)).
stream
().
mapToDouble
(
Double:
:
parseDouble
).
sum
();
double
res
=
Arrays
.
asList
(
investmentAmountStr
.
split
(
","
)).
stream
().
mapToDouble
(
Double:
:
parseDouble
).
sum
();
equityInfo
.
setInvestmentAmount
((
long
)
res
);
equityInfo
.
setInvestmentAmount
((
long
)
res
);
}
else
{
}
else
{
equityInfo
.
setInvestmentAmount
((
long
)
Double
.
parseDouble
(
investmentAmountStr
));
equityInfo
.
setInvestmentAmount
(
"-"
.
equals
(
investmentAmountStr
)
?
0
:
(
long
)
Double
.
parseDouble
(
investmentAmountStr
));
}
}
if
(
equityInfo
.
getPayableCapitalContributionAmount
()==
null
){
if
(
equityInfo
.
getPayableCapitalContributionAmount
()==
null
){
if
(
investmentAmountStr
.
contains
(
","
)){
if
(
investmentAmountStr
.
contains
(
","
)){
double
res
=
Arrays
.
asList
(
investmentAmountStr
.
split
(
","
)).
stream
().
mapToDouble
(
Double:
:
parseDouble
).
sum
();
double
res
=
Arrays
.
asList
(
investmentAmountStr
.
split
(
","
)).
stream
().
mapToDouble
(
Double:
:
parseDouble
).
sum
();
equityInfo
.
setPayableCapitalContributionAmount
((
long
)
res
);
equityInfo
.
setPayableCapitalContributionAmount
((
long
)
res
);
}
else
{
}
else
{
equityInfo
.
setPayableCapitalContributionAmount
((
long
)
Double
.
parseDouble
(
investmentAmountStr
));
equityInfo
.
setPayableCapitalContributionAmount
(
"-"
.
equals
(
investmentAmountStr
)
?
0
:
(
long
)
Double
.
parseDouble
(
investmentAmountStr
));
}
}
}
}
}
else
if
(
null
!=
OrgKV
.
Map
.
get
(
eK
))
{
}
else
if
(
null
!=
OrgKV
.
Map
.
get
(
eK
))
{
...
@@ -323,6 +335,7 @@ public class DataInitTest extends CommonIT {
...
@@ -323,6 +335,7 @@ public class DataInitTest extends CommonIT {
}
}
});
});
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
String
.
format
(
"机构:[%s]导入异常"
,
orgK
),
e
);
failMsg
.
append
(
e
.
getMessage
()+
"\n"
);
failMsg
.
append
(
e
.
getMessage
()+
"\n"
);
failList
.
putIfAbsent
(
orgK
,
orgV
);
failList
.
putIfAbsent
(
orgK
,
orgV
);
}
}
...
@@ -346,9 +359,20 @@ public class DataInitTest extends CommonIT {
...
@@ -346,9 +359,20 @@ public class DataInitTest extends CommonIT {
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
System
.
out
.
println
(
String
.
format
(
"成功条数[%s]"
,
orgs
.
size
()));
System
.
out
.
println
(
String
.
format
(
"失败条数[%s]"
,
failList
.
size
()));
System
.
out
.
println
(
String
.
format
(
"失败条数[%s]"
,
failList
.
size
()));
}
}
@Test
public
void
syncOrg
(){
List
<
String
>
taxPayNums
=
organizationMapper
.
selectByExample
(
new
OrganizationExample
()).
stream
().
map
(
Organization:
:
getTaxPayerNumber
).
collect
(
Collectors
.
toList
());
/**
* 1、taxPayNums http 滴滴oa接口同步机构的信息
* 2、逐条update,记录更新失败或未更新上的taxPayNum
* 3、失败的再次处理
*/
}
private
void
setProperty
(
Object
obj
,
String
propertyName
,
Object
value
)
{
private
void
setProperty
(
Object
obj
,
String
propertyName
,
Object
value
)
{
try
{
try
{
Class
c
=
obj
.
getClass
();
Class
c
=
obj
.
getClass
();
...
...
atms-web/src/main/webapp/app/admin/infrastructure/organizationManage/organization-manage.html
View file @
0d4a1072
...
@@ -98,7 +98,7 @@
...
@@ -98,7 +98,7 @@
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<div
class=
"col-sm-12"
>
<div
class=
"col-sm-12"
>
<span
class=
""
>
{{'LegalPersonName' | translate}}:{{selectCompany
Extra
.legalPersonName}}
</span>
<span
class=
""
>
{{'LegalPersonName' | translate}}:{{selectCompany.legalPersonName}}
</span>
</div>
</div>
</div>
</div>
<div
class=
"form-group"
ng-show=
"!isInternational"
>
<div
class=
"form-group"
ng-show=
"!isInternational"
>
...
@@ -121,8 +121,8 @@
...
@@ -121,8 +121,8 @@
</div>
</div>
<div
class=
"form-group"
ng-show=
"!isInternational"
>
<div
class=
"form-group"
ng-show=
"!isInternational"
>
<div
class=
"col-sm-12"
>
<div
class=
"col-sm-12"
>
<span
class=
"control-label"
>
{{'Registration
Location
' | translate}}:
<span
<span
class=
"control-label"
>
{{'Registration
Address
' | translate}}:
<span
title=
"{{selectCompany.regist
rationLocation}}"
>
{{selectCompany.registrationLocation
}}
</span></span>
title=
"{{selectCompany.regist
erAddress}}"
>
{{selectCompany.registerAddress
}}
</span></span>
</div>
</div>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
...
@@ -184,7 +184,7 @@
...
@@ -184,7 +184,7 @@
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<div
class=
"col-sm-12"
>
<div
class=
"col-sm-12"
>
<span
class=
"control-label"
>
{{'Registration
Location
En' | translate}}:
<span
<span
class=
"control-label"
>
{{'Registration
Address
En' | translate}}:
<span
title=
"{{selectCompany.registrationLocationEn}}"
>
{{selectCompany.registrationLocationEn }}
</span></span>
title=
"{{selectCompany.registrationLocationEn}}"
>
{{selectCompany.registrationLocationEn }}
</span></span>
</div>
</div>
</div>
</div>
...
...
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