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
b9563dfe
Commit
b9563dfe
authored
Mar 18, 2019
by
gary
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、fixbug
parent
b006169e
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
142 additions
and
16 deletions
+142
-16
ErrorMessageCN.java
.../java/pwc/taxtech/atms/common/message/ErrorMessageCN.java
+2
-0
DateUtils.java
...src/main/java/pwc/taxtech/atms/common/util/DateUtils.java
+17
-4
DataImportService.java
...java/pwc/taxtech/atms/service/impl/DataImportService.java
+87
-2
DataInitTest.java
...test/java/pwc/taxtech/atms/service/impl/DataInitTest.java
+1
-1
Organization.java
...o/src/main/java/pwc/taxtech/atms/entity/Organization.java
+24
-0
IndexController.java
...java/pwc/taxtech/atms/web/controller/IndexController.java
+2
-3
infrastructure.json
.../main/webapp/app-resources/i18n/zh-CN/infrastructure.json
+5
-5
organization-manage.ctrl.js
...astructure/organizationManage/organization-manage.ctrl.js
+3
-1
edit-equity-change-modal.ctrl.js
...edit-equity-change-modal/edit-equity-change-modal.ctrl.js
+1
-0
No files found.
atms-api/src/main/java/pwc/taxtech/atms/common/message/ErrorMessageCN.java
View file @
b9563dfe
...
...
@@ -7,6 +7,8 @@ public class ErrorMessageCN {
public
static
final
String
InconsistentPeriod
=
"单表中期间不一致"
;
public
static
final
String
DoNotSelectPeriod
=
"未选择期间"
;
public
static
final
String
DoNotSelectCompany
=
"非选定主体"
;
public
static
final
String
DoNotExistProject
=
"项目未开启"
;
public
static
final
String
DoNotInputPeriod
=
"缺少期间字段"
;
public
static
final
String
StrctureRepeat
=
"层级重复!"
;
public
static
final
String
BusinssUnitRepeat
=
"事业部重复!"
;
public
static
final
String
BusinssUnitUpdateFailed
=
"未对事业部名称或状态进行修改!"
;
...
...
atms-api/src/main/java/pwc/taxtech/atms/common/util/DateUtils.java
View file @
b9563dfe
...
...
@@ -109,7 +109,6 @@ public class DateUtils {
return
dateString
;
}
/**
* 将短时间格式字符串转换为区间格式 yyyyMM
*
...
...
@@ -117,12 +116,13 @@ public class DateUtils {
* @return
*/
public
static
Integer
dateToPeriod
(
java
.
util
.
Date
dateDate
)
{
if
(
dateDate
==
null
){
return
null
;
}
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyyMM"
);
Integer
period
=
Integer
.
valueOf
(
formatter
.
format
(
dateDate
));
return
period
;
return
Integer
.
valueOf
(
formatter
.
format
(
dateDate
));
}
/**
* 将yyyy-mm yyyy - mm等字符串转换为区间格式 yyyyMM
*
...
...
@@ -217,6 +217,19 @@ public class DateUtils {
return
strtodate
;
}
/**
* 将短时间格式字符串转换为时间 yyyy-MM
*
* @param strDate
* @return
*/
public
static
Date
strToDate5
(
String
strDate
)
{
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM"
);
ParsePosition
pos
=
new
ParsePosition
(
0
);
Date
strtodate
=
formatter
.
parse
(
strDate
,
pos
);
return
strtodate
;
}
/**
* 得到现在时间
*
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/DataImportService.java
View file @
b9563dfe
...
...
@@ -295,6 +295,13 @@ public class DataImportService extends BaseService {
// 根据机构ID和年份获取卡片
String
projId
=
getProjId
(
orgId
,
tmsPeriod
);
if
(
StringUtils
.
isEmpty
(
projId
))
{
dataImportLog
.
setImportResult
(
false
);
dataImportLog
.
setErrorMsg
(
ErrorMessageCN
.
DoNotExistProject
);
dataImportLogs
.
add
(
dataImportLog
);
continue
;
}
if
(!
orgIds
.
contains
(
orgId
))
{
dataImportLog
.
setImportResult
(
false
);
dataImportLog
.
setErrorMsg
(
ErrorMessageCN
.
DoNotSelectCompany
);
...
...
@@ -461,6 +468,13 @@ public class DataImportService extends BaseService {
// 根据机构ID和年份获取卡片
String
projId
=
getProjId
(
orgId
,
tmsPeriod
);
if
(
StringUtils
.
isEmpty
(
projId
))
{
dataImportLog
.
setImportResult
(
false
);
dataImportLog
.
setErrorMsg
(
ErrorMessageCN
.
DoNotExistProject
);
dataImportLogs
.
add
(
dataImportLog
);
continue
;
}
if
(!
orgIds
.
contains
(
orgId
))
{
dataImportLog
.
setImportResult
(
false
);
dataImportLog
.
setErrorMsg
(
ErrorMessageCN
.
DoNotSelectCompany
);
...
...
@@ -602,6 +616,13 @@ public class DataImportService extends BaseService {
// 根据机构ID和年份获取卡片
String
projId
=
getProjId
(
orgId
,
tmsPeriod
);
if
(
StringUtils
.
isEmpty
(
projId
))
{
dataImportLog
.
setImportResult
(
false
);
dataImportLog
.
setErrorMsg
(
ErrorMessageCN
.
DoNotExistProject
);
dataImportLogs
.
add
(
dataImportLog
);
continue
;
}
if
(!
orgIds
.
contains
(
orgId
))
{
dataImportLog
.
setImportResult
(
false
);
dataImportLog
.
setErrorMsg
(
ErrorMessageCN
.
DoNotSelectCompany
);
...
...
@@ -744,6 +765,13 @@ public class DataImportService extends BaseService {
// 根据机构ID和年份获取卡片
String
projId
=
getProjId
(
orgId
,
tmsPeriod
);
if
(
StringUtils
.
isEmpty
(
projId
))
{
dataImportLog
.
setImportResult
(
false
);
dataImportLog
.
setErrorMsg
(
ErrorMessageCN
.
DoNotExistProject
);
dataImportLogs
.
add
(
dataImportLog
);
continue
;
}
if
(!
orgIds
.
contains
(
orgId
))
{
dataImportLog
.
setImportResult
(
false
);
dataImportLog
.
setErrorMsg
(
ErrorMessageCN
.
DoNotSelectCompany
);
...
...
@@ -948,6 +976,13 @@ public class DataImportService extends BaseService {
// 根据机构ID和年份获取卡片
String
projId
=
getProjId
(
orgId
,
tmsPeriod
);
if
(
StringUtils
.
isEmpty
(
projId
))
{
dataImportLog
.
setImportResult
(
false
);
dataImportLog
.
setErrorMsg
(
ErrorMessageCN
.
DoNotExistProject
);
dataImportLogs
.
add
(
dataImportLog
);
return
;
}
if
(!
orgIds
.
contains
(
orgId
)){
dataImportLog
.
setErrorMsg
(
ErrorMessageCN
.
DoNotSelectCompany
);
dataImportLog
.
setImportResult
(
false
);
...
...
@@ -1042,6 +1077,13 @@ public class DataImportService extends BaseService {
// 根据机构ID和年份获取卡片
String
projId
=
getProjId
(
orgId
,
tmsPeriod
);
if
(
StringUtils
.
isEmpty
(
projId
))
{
dataImportLog
.
setImportResult
(
false
);
dataImportLog
.
setErrorMsg
(
ErrorMessageCN
.
DoNotExistProject
);
dataImportLogs
.
add
(
dataImportLog
);
return
;
}
if
(!
orgIds
.
contains
(
orgId
)){
dataImportLog
.
setErrorMsg
(
ErrorMessageCN
.
DoNotSelectCompany
);
dataImportLog
.
setImportResult
(
false
);
...
...
@@ -1139,6 +1181,13 @@ public class DataImportService extends BaseService {
// 根据机构ID和年份获取卡片
String
projId
=
getProjId
(
orgId
,
tmsPeriod
);
if
(
StringUtils
.
isEmpty
(
projId
))
{
dataImportLog
.
setImportResult
(
false
);
dataImportLog
.
setErrorMsg
(
ErrorMessageCN
.
DoNotExistProject
);
dataImportLogs
.
add
(
dataImportLog
);
return
;
}
if
(!
orgIds
.
contains
(
orgId
)){
dataImportLog
.
setErrorMsg
(
ErrorMessageCN
.
DoNotSelectCompany
);
dataImportLog
.
setImportResult
(
false
);
...
...
@@ -1234,6 +1283,13 @@ public class DataImportService extends BaseService {
// 根据机构ID和年份获取卡片
String
projId
=
getProjId
(
orgId
,
tmsPeriod
);
if
(
StringUtils
.
isEmpty
(
projId
))
{
dataImportLog
.
setImportResult
(
false
);
dataImportLog
.
setErrorMsg
(
ErrorMessageCN
.
DoNotExistProject
);
dataImportLogs
.
add
(
dataImportLog
);
continue
;
}
if
(!
orgIds
.
contains
(
orgId
))
{
dataImportLog
.
setImportResult
(
false
);
dataImportLog
.
setErrorMsg
(
ErrorMessageCN
.
DoNotSelectCompany
);
...
...
@@ -1370,7 +1426,7 @@ public class DataImportService extends BaseService {
private
void
processIrs
(
String
billingBody
,
List
<
InvoiceRecord
>
irs
,
List
<
String
>
orgIds
,
Integer
tmsPeriod
,
Integer
importType
,
List
<
DataImportLog
>
dataImportLogs
)
{
OrganizationExample
organizationExample
=
new
OrganizationExample
();
organizationExample
.
createCriteria
().
and
Cod
eEqualTo
(
billingBody
);
organizationExample
.
createCriteria
().
and
Nam
eEqualTo
(
billingBody
);
List
<
Organization
>
orgs
=
organizationMapper
.
selectByExample
(
organizationExample
);
DataImportLog
dataImportLog
=
generalDataImportLog
(
irs
.
get
(
0
).
getBillingBody
(),
""
,
""
,
...
...
@@ -1390,6 +1446,13 @@ public class DataImportService extends BaseService {
// 根据机构ID和年份获取卡片
String
projId
=
getProjId
(
orgId
,
tmsPeriod
);
if
(
StringUtils
.
isEmpty
(
projId
))
{
dataImportLog
.
setImportResult
(
false
);
dataImportLog
.
setErrorMsg
(
ErrorMessageCN
.
DoNotExistProject
);
dataImportLogs
.
add
(
dataImportLog
);
return
;
}
if
(!
orgIds
.
contains
(
orgId
)){
dataImportLog
.
setErrorMsg
(
ErrorMessageCN
.
DoNotSelectCompany
);
dataImportLog
.
setImportResult
(
false
);
...
...
@@ -1407,6 +1470,13 @@ public class DataImportService extends BaseService {
boolean
validateRes
=
true
;
for
(
InvoiceRecord
ir
:
irs
)
{
// 校验该主体导入所有记录区间是否一致
if
(
null
==
ir
.
getPeriod
()){
dataImportLog
.
setImportResult
(
false
);
dataImportLog
.
setErrorMsg
(
ErrorMessageCN
.
DoNotInputPeriod
);
validateRes
=
false
;
break
;
}
if
(!
ir
.
getPeriod
().
equals
(
period1
))
{
dataImportLog
.
setImportResult
(
false
);
dataImportLog
.
setErrorMsg
(
ErrorMessageCN
.
InconsistentPeriod
);
...
...
@@ -1484,7 +1554,7 @@ public class DataImportService extends BaseService {
ir
.
setApplicationDate
(
row
.
getCell
(
11
).
getDateCellValue
());
ir
.
setBillingDate
(
row
.
getCell
(
12
).
getDateCellValue
());
ir
.
setPeriod
(
DateUtils
.
dateToPeriod
(
ir
.
getBillingDate
()));
ir
.
setBillingMonth
(
row
.
getCell
(
13
).
getDateCellValue
(
));
ir
.
setBillingMonth
(
DateUtils
.
strToDate5
(
getCellStringValue
(
row
.
getCell
(
13
))
));
ir
.
setInvoiceCode
(
getCellStringValue
(
row
.
getCell
(
14
)));
ir
.
setInvoiceNum
(
getCellStringValue
(
row
.
getCell
(
15
)));
ir
.
setRemarks
(
getCellStringValue
(
row
.
getCell
(
16
)));
...
...
@@ -1589,6 +1659,9 @@ public class DataImportService extends BaseService {
}
private
String
getCellStringValue
(
Cell
cell
)
{
if
(
null
==
cell
){
return
""
;
}
if
(
cell
.
getCellTypeEnum
().
equals
(
CellType
.
STRING
))
{
return
cell
.
getStringCellValue
();
}
else
if
(
cell
.
getCellTypeEnum
().
equals
(
CellType
.
NUMERIC
))
{
...
...
@@ -1600,6 +1673,9 @@ public class DataImportService extends BaseService {
}
private
Boolean
getCellBolleanValue
(
Cell
cell
)
{
if
(
null
==
cell
){
return
false
;
}
if
(
cell
.
getCellTypeEnum
().
equals
(
CellType
.
STRING
))
{
switch
(
cell
.
getStringCellValue
())
{
case
"TRUE"
:
...
...
@@ -1621,6 +1697,9 @@ public class DataImportService extends BaseService {
}
private
Integer
getCellIntegerValue
(
Cell
cell
)
{
if
(
null
==
cell
){
return
null
;
}
if
(
cell
.
getCellTypeEnum
().
equals
(
CellType
.
STRING
))
{
return
Integer
.
valueOf
(
cell
.
getStringCellValue
());
}
else
if
(
cell
.
getCellTypeEnum
().
equals
(
CellType
.
NUMERIC
))
{
...
...
@@ -1631,6 +1710,9 @@ public class DataImportService extends BaseService {
}
private
BigDecimal
getCellBigDecimalValue
(
Cell
cell
)
{
if
(
null
==
cell
){
return
null
;
}
if
(
cell
.
getCellTypeEnum
().
equals
(
CellType
.
STRING
))
{
return
new
BigDecimal
(
cell
.
getStringCellValue
());
}
else
if
(
cell
.
getCellTypeEnum
().
equals
(
CellType
.
NUMERIC
))
{
...
...
@@ -1641,6 +1723,9 @@ public class DataImportService extends BaseService {
}
private
Long
getCellLongDecimalValue
(
Cell
cell
)
{
if
(
null
==
cell
){
return
null
;
}
if
(
cell
.
getCellTypeEnum
().
equals
(
CellType
.
STRING
))
{
return
Long
.
valueOf
(
cell
.
getStringCellValue
());
}
else
if
(
cell
.
getCellTypeEnum
().
equals
(
CellType
.
NUMERIC
))
{
...
...
atms-api/src/test/java/pwc/taxtech/atms/service/impl/DataInitTest.java
View file @
b9563dfe
...
...
@@ -406,7 +406,7 @@ public class DataInitTest extends CommonIT {
*/
String
input
=
""
;
try
{
File
targetFile
=
new
File
(
"src/main/resources/orgImport/ddOrgJson
2
.json"
);
File
targetFile
=
new
File
(
"src/main/resources/orgImport/ddOrgJson
3
.json"
);
// File targetFile = new File("src/main/resources/orgImport/failedJson.json");
input
=
FileUtils
.
readFileToString
(
targetFile
,
"UTF-8"
);
}
catch
(
Exception
e
)
{
...
...
atms-dao/src/main/java/pwc/taxtech/atms/entity/Organization.java
View file @
b9563dfe
...
...
@@ -857,6 +857,30 @@ public class Organization extends BaseEntity implements Serializable {
this
.
pLevel
=
pLevel
;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column organization.p_level
*
* @return the value of organization.p_level
*
* @mbg.generated
*/
public
Integer
getPLevel
()
{
return
pLevel
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column organization.p_level
*
* @param pLevel the value for organization.p_level
*
* @mbg.generated
*/
public
void
setPLevel
(
Integer
pLevel
)
{
this
.
pLevel
=
pLevel
;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column organization.create_time
...
...
atms-web/src/main/java/pwc/taxtech/atms/web/controller/IndexController.java
View file @
b9563dfe
...
...
@@ -94,7 +94,7 @@ public class IndexController {
}
@RequestMapping
(
value
=
{
"/sso/callback"
},
method
=
RequestMethod
.
GET
)
public
String
ddSSOCallback
(
@RequestParam
(
value
=
"jumpto"
)
String
jumpto
,
public
void
ddSSOCallback
(
@RequestParam
(
value
=
"jumpto"
)
String
jumpto
,
@RequestParam
(
value
=
"code"
)
String
code
,
HttpServletResponse
response
)
throws
IOException
,
ServletException
{
try
{
...
...
@@ -108,11 +108,10 @@ public class IndexController {
response
.
addCookie
(
codeCookie
);
response
.
addCookie
(
jumptoCookie
);
response
.
addCookie
(
ddTicket
);
response
.
sendRedirect
(
jumpto
);
}
catch
(
Exception
e
){
logger
.
error
(
"ddSSOCallback error"
,
e
);
}
return
"redirect:/Account/LogOn"
;
}
@RequestMapping
(
value
=
{
"/admin"
,
"/admin.html"
},
method
=
RequestMethod
.
GET
)
...
...
atms-web/src/main/webapp/app-resources/i18n/zh-CN/infrastructure.json
View file @
b9563dfe
...
...
@@ -373,11 +373,11 @@
"InvestmentAmount"
:
"投资金额"
,
"InvestmentCurrency"
:
"投资金额币种"
,
"InvestmentRadio"
:
"投资比例"
,
"PayableShareholderName"
:
"实缴
股东名称
"
,
"PayableShareholderIdNum"
:
"
实缴股东
证件编号"
,
"PayableCapitalContributionAmount"
:
"实缴
出资
金额"
,
"PayableCapitalContributionCurrency"
:
"实缴
出资
币种"
,
"PayableContributionProportion"
:
"实缴出资比例"
,
"PayableShareholderName"
:
"实缴
投资方信息
"
,
"PayableShareholderIdNum"
:
"证件编号"
,
"PayableCapitalContributionAmount"
:
"实缴
投资方
金额"
,
"PayableCapitalContributionCurrency"
:
"实缴
投资方
币种"
,
"PayableContributionProportion"
:
"实缴
投资方
出资比例"
,
"TotalInvestment"
:
"出资总额"
,
"HoldingInstitution"
:
"控股机构"
,
"TaxRegistrationInformation"
:
"税务登记信息"
,
...
...
atms-web/src/main/webapp/app/admin/infrastructure/organizationManage/organization-manage.ctrl.js
View file @
b9563dfe
...
...
@@ -2979,9 +2979,11 @@
orgTotal
:
data
.
length
,
amountTotal
:
amountTotal
,
proportionTotal
:
proportionTotal
}
}
;
if
(
$scope
.
EquitySumInfo
.
proportionTotal
!==
100
){
$scope
.
isNotHundred
=
true
;
}
else
{
$scope
.
isNotHundred
=
false
;
}
}
else
{
SweetAlert
.
warning
(
$translate
.
instant
(
'NoEquityInfo'
));
...
...
atms-web/src/main/webapp/app/common/controls/edit-equity-change-modal/edit-equity-change-modal.ctrl.js
View file @
b9563dfe
...
...
@@ -33,6 +33,7 @@ controller('editEquityChangeModalController', ['$scope', '$log', '$translate', '
// 保存股权
$scope
.
saveEquity
=
function
()
{
$scope
.
equityControlForm
.
$setSubmitted
();
var
rows
=
$scope
.
equityListInstance
.
getVisibleRows
();
var
updateEquity
=
[];
for
(
var
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
...
...
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