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
d58f1203
Commit
d58f1203
authored
Nov 16, 2018
by
eddie.woo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_oracle' of
http://code.tech.tax.asia.pwcinternal.com/root/atms
into dev_oracle
parents
2c57c3e5
0c93b8e9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
12 deletions
+10
-12
MyAsserts.java
...src/main/java/pwc/taxtech/atms/common/util/MyAsserts.java
+4
-0
TemplateGroupServiceImpl.java
...c/taxtech/atms/service/impl/TemplateGroupServiceImpl.java
+2
-2
ReportGeneratorImpl.java
...wc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
+1
-2
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+3
-8
No files found.
atms-api/src/main/java/pwc/taxtech/atms/common/util/MyAsserts.java
View file @
d58f1203
...
...
@@ -18,6 +18,10 @@ public class MyAsserts {
if
(!
obj
)
throw
exception
;
}
public
static
void
assertNull
(
Object
obj
,
ApiException
exception
){
if
(
obj
!=
null
)
throw
exception
;
}
public
static
void
assertFalse
(
boolean
obj
,
ApiException
exception
)
{
if
(
obj
)
throw
exception
;
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/TemplateGroupServiceImpl.java
View file @
d58f1203
...
...
@@ -266,7 +266,7 @@ public class TemplateGroupServiceImpl extends AbstractService {
cellTemplate
.
setIsReadOnly
(
cell
.
getCellStyle
().
getLocked
());
cellTemplateList
.
add
(
cellTemplate
);
//todo: 这里没有Config数据只有在上传模板以后,在界面里面可以配置公式
if
(!
cell
.
getCellStyle
().
getLocked
()
&&
hasKeyIn
(
cell
))
{
if
(!
cell
.
getCellStyle
().
getLocked
()
&&
hasKeyIn
(
cell
)
&&
allowManual
)
{
cell
.
setCellValue
(
StringUtils
.
EMPTY
);
addManualConfig
(
cellTemplate
,
template
,
cell
,
now
,
cellTemplateConfigList
);
}
...
...
@@ -402,7 +402,7 @@ public class TemplateGroupServiceImpl extends AbstractService {
cellTemplate
.
setIsReadOnly
(
cell
.
getCellStyle
().
getLocked
()
?
true
:
false
);
cellTemplateList
.
add
(
cellTemplate
);
//todo: 这里没有Config数据只有在上传模板以后,在界面里面可以配置公式
if
(!
cell
.
getCellStyle
().
getLocked
()
&&
hasKeyIn
(
cell
))
{
if
(!
cell
.
getCellStyle
().
getLocked
()
&&
hasKeyIn
(
cell
)
&&
allowManual
)
{
cell
.
setCellValue
(
StringUtils
.
EMPTY
);
addManualConfig
(
cellTemplate
,
template
,
cell
,
now
,
cellTemplateConfigList
);
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
View file @
d58f1203
...
...
@@ -94,6 +94,7 @@ public class ReportGeneratorImpl {
Sheet
sheet
=
workbook
.
getSheetAt
(
i
);
String
code
=
sheet
.
getSheetName
();
logger
.
info
(
"-------------------------------------Begin Job [{}]------------------------------------------------------"
,
code
);
setStatus
(
job
,
STATUS_END
);
setStatus
(
job
,
code
,
STATUS_BEGIN
);
job
.
setCurrentStep
(
code
);
periodJobMapper
.
updateByPrimaryKey
(
job
);
...
...
@@ -406,8 +407,6 @@ public class ReportGeneratorImpl {
}
}
}
setStatus
(
job
,
code
,
STATUS_END
);
periodJobMapper
.
updateByPrimaryKey
(
job
);
logger
.
info
(
"-------------------------------------End Job [{}]------------------------------------------------------"
,
code
);
}
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
d58f1203
...
...
@@ -277,9 +277,6 @@ public class ReportServiceImpl {
List
<
Long
>
exceptTemplateIds
=
templateMapper
.
getIdsForExceptTemplate
();
clearPeriodData
(
projectId
,
period
,
exceptTemplateIds
,
isMergeManualData
);
copyTemplateAndConfigFromAdmin
(
projectId
,
templates
,
period
);
setStatus
(
job
,
STATUS_END
);
periodJobMapper
.
updateByPrimaryKey
(
job
);
}
private
List
<
Template
>
getTemplatesByProjectId
(
String
projectId
)
{
...
...
@@ -481,10 +478,7 @@ public class ReportServiceImpl {
Integer
periodParam
,
Integer
reportType
,
Optional
<
String
>
generator
)
{
OperationResultDto
operationResultDto
=
new
OperationResultDto
();
MyAsserts
.
assertEq
(
serviceType
,
EnumServiceType
.
VAT
,
new
NotFoundException
());
PeriodJobExample
example
=
new
PeriodJobExample
();
example
.
createCriteria
().
andProjectIdEqualTo
(
projectId
).
andPeriodEqualTo
(
periodParam
)
.
andStatusEqualTo
(
WrapPeriodJobDto
.
STATUS_BEGIN
);
MyAsserts
.
assertEmpty
(
periodJobMapper
.
selectByExample
(
example
),
Exceptions
.
TASK_HAS_BEGINNING
);
MyAsserts
.
assertNull
(
periodJobMapper
.
getRunningJob
(
projectId
,
periodParam
),
Exceptions
.
TASK_HAS_BEGINNING
);
String
status
=
periodApprovalMapper
.
getStatusByProjectIdAndPeriod
(
projectId
,
periodParam
);
MyAsserts
.
assertTrue
(
status
==
null
||
status
.
equals
(
Constant
.
APPROVAL_DISAGREED
),
Exceptions
.
REPORT_IN_PROCESS_OR_AGREED_EXCEPTION
);
...
...
@@ -517,12 +511,13 @@ public class ReportServiceImpl {
evaluator
.
evaluateAll
();
reportGenerator
.
updateWorkbookCaclsValueToDb
(
projectId
,
periodParam
,
workbook
,
resources
,
isMergeManualData
,
genJob
);
setStatus
(
genJob
,
STATUS_END
);
periodJobMapper
.
updateByPrimaryKey
(
genJob
);
}
catch
(
Exception
e
)
{
setStatus
(
genJob
,
STATUS_ERROR
);
e
.
printStackTrace
();
genJob
.
setErrorMsg
(
"Sever error "
+
e
.
getClass
().
getName
());
periodJobMapper
.
updateByPrimaryKey
(
genJob
);
}
}
}).
start
();
...
...
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