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
89cee29d
Commit
89cee29d
authored
Nov 27, 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
6044f0ef
3c5011e2
Hide whitespace changes
Inline
Side-by-side
Showing
37 changed files
with
233 additions
and
164 deletions
+233
-164
ApprovalController.java
.../java/pwc/taxtech/atms/controller/ApprovalController.java
+3
-27
InputInvoiceImportController.java
...taxtech/atms/controller/InputInvoiceImportController.java
+7
-0
OutputInvoiceController.java
.../pwc/taxtech/atms/controller/OutputInvoiceController.java
+6
-0
OrganizationShort.java
...va/pwc/taxtech/atms/dto/arearegion/OrganizationShort.java
+1
-1
DimensinTypeOrgDto.java
...va/pwc/taxtech/atms/dto/dimension/DimensinTypeOrgDto.java
+1
-1
DimensionDto.java
...ain/java/pwc/taxtech/atms/dto/dimension/DimensionDto.java
+1
-1
DimensionValueDto.java
...ava/pwc/taxtech/atms/dto/dimension/DimensionValueDto.java
+1
-1
DimensionValueJoinDimensionDto.java
...ch/atms/dto/dimension/DimensionValueJoinDimensionDto.java
+1
-1
UnionDimensionValueOrg.java
...wc/taxtech/atms/dto/dimension/UnionDimensionValueOrg.java
+1
-1
OrgCountDto.java
...n/java/pwc/taxtech/atms/dto/organization/OrgCountDto.java
+1
-1
OrgGeneralInfoMiddleDto.java
...axtech/atms/dto/organization/OrgGeneralInfoMiddleDto.java
+1
-1
OrganizationPermissionDto.java
...axtech/atms/dto/permission/OrganizationPermissionDto.java
+1
-4
OrganizationPermissionKeyDto.java
...ech/atms/dto/permission/OrganizationPermissionKeyDto.java
+1
-5
PermissionDto.java
...n/java/pwc/taxtech/atms/dto/permission/PermissionDto.java
+1
-1
PermissionKeyDto.java
...ava/pwc/taxtech/atms/dto/permission/PermissionKeyDto.java
+1
-1
UserPermissionDto.java
...va/pwc/taxtech/atms/dto/permission/UserPermissionDto.java
+1
-1
UserPermissionKeyDto.java
...pwc/taxtech/atms/dto/permission/UserPermissionKeyDto.java
+1
-1
DimensionUser.java
...rc/main/java/pwc/taxtech/atms/dto/user/DimensionUser.java
+1
-1
UserRoleDisplayInfo.java
...n/java/pwc/taxtech/atms/dto/user/UserRoleDisplayInfo.java
+1
-1
UserRoleQuery.java
...rc/main/java/pwc/taxtech/atms/dto/user/UserRoleQuery.java
+1
-1
Exceptions.java
.../src/main/java/pwc/taxtech/atms/exception/Exceptions.java
+2
-1
ApprovalService.java
...va/pwc/taxtech/atms/vat/service/impl/ApprovalService.java
+5
-4
OutputInvoiceServiceImpl.java
...xtech/atms/vat/service/impl/OutputInvoiceServiceImpl.java
+6
-5
ReportGeneratorImpl.java
...wc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
+1
-8
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+10
-1
DFFS.java
.../taxtech/atms/vat/service/impl/report/functions/DFFS.java
+13
-9
PC.java
...wc/taxtech/atms/vat/service/impl/report/functions/PC.java
+5
-9
PSUM.java
.../taxtech/atms/vat/service/impl/report/functions/PSUM.java
+9
-11
PeriodApproveMapper.java
...in/java/pwc/taxtech/atms/vat/dao/PeriodApproveMapper.java
+13
-4
ApprovalTaskInfo.java
.../main/java/pwc/taxtech/atms/vat/dpo/ApprovalTaskInfo.java
+9
-0
tax-report-cell-detail-modal.html
...eport-cell-detail-modal/tax-report-cell-detail-modal.html
+2
-2
vat-report-view.ctrl.js
...p/common/controls/vat-report-view/vat-report-view.ctrl.js
+21
-6
vatApproveService.js
...c/main/webapp/app/common/vatservices/vatApproveService.js
+2
-2
vatPreviewService.js
...c/main/webapp/app/common/vatservices/vatPreviewService.js
+54
-16
app-side-bar.ctrl.js
...in/webapp/app/framework/app-side-bar/app-side-bar.ctrl.js
+0
-8
vat-preview-input-invoice.ctrl.js
...t-preview-input-invoice/vat-preview-input-invoice.ctrl.js
+24
-13
vat-preview-output-invoice.ctrl.js
...preview-output-invoice/vat-preview-output-invoice.ctrl.js
+24
-14
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/ApprovalController.java
View file @
89cee29d
...
...
@@ -65,9 +65,9 @@ public class ApprovalController {
}
@ResponseBody
@RequestMapping
(
value
=
"/check/{
taskI
d}"
,
method
=
RequestMethod
.
PUT
)
public
void
check
(
@PathVariable
String
taskI
d
,
@RequestParam
String
decide
,
@RequestParam
String
comment
)
{
//only for manager role
approvalService
.
checkTask
(
taskI
d
,
decide
,
comment
);
@RequestMapping
(
value
=
"/check/{
projectId}/{perio
d}"
,
method
=
RequestMethod
.
PUT
)
public
void
check
(
@PathVariable
String
projectId
,
@PathVariable
Integer
perio
d
,
@RequestParam
String
decide
,
@RequestParam
String
comment
)
{
//only for manager role
approvalService
.
checkTask
(
projectId
,
perio
d
,
decide
,
comment
);
}
@ResponseBody
...
...
@@ -151,29 +151,5 @@ public class ApprovalController {
}
private
void
mocoDisAggreAndOver
()
{
logger
.
debug
(
"------------------------update db -----------------------------------"
);
logger
.
debug
(
"dis aggre"
);
logger
.
debug
(
"------------------------updage db-----------------------------------"
);
}
private
void
mocoAggreAndOver
()
{
logger
.
debug
(
"------------------------update db-----------------------------------"
);
logger
.
debug
(
"aggree"
);
logger
.
debug
(
"------------------------update db-----------------------------------"
);
}
private
void
mocoHasCommittedAndOver
()
{
logger
.
debug
(
"-------------------------update db----------------------------------"
);
logger
.
debug
(
"has committed"
);
logger
.
debug
(
"-------------------------update db----------------------------------"
);
}
private
void
mocoInsert
(
ApprovalDto
dto
)
{
logger
.
debug
(
"-------------------------insert db----------------------------------"
);
logger
.
debug
(
"save approval {}"
,
dto
.
toString
());
logger
.
debug
(
"-------------------------insert db----------------------------------"
);
}
}
atms-api/src/main/java/pwc/taxtech/atms/controller/InputInvoiceImportController.java
View file @
89cee29d
...
...
@@ -37,6 +37,13 @@ public class InputInvoiceImportController {
private
IdentityServiceImpl
identityService
;
private
Logger
logger
=
LoggerFactory
.
getLogger
(
InputInvoiceImportController
.
class
);
@RequestMapping
(
value
=
"inputInvoicePreviewAllList"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
@ResponseBody
List
<
InputInvoice
>
getInputInvoiceTree
(
@RequestBody
InputInvoicePreviewQueryParam
paras
,
@RequestHeader
(
"from"
)
String
projectId
)
{
return
inputInvoiceDataImportService
.
getInputInvoiceTree
(
paras
,
projectId
);
}
@RequestMapping
(
value
=
"inputInvoicePreviewList"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
@ResponseBody
PageInfo
<
InputInvoice
>
getInputInvoiceTreeViewData
(
@RequestBody
InputInvoicePreviewQueryParam
paras
,
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/OutputInvoiceController.java
View file @
89cee29d
...
...
@@ -52,6 +52,12 @@ public class OutputInvoiceController {
return
outputInvoiceService
.
queryOutputInvoiceList
(
queryDto
,
projectId
);
}
@RequestMapping
(
value
=
"queryOutputInvoiceAllList"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
List
<
OutputInvoice
>
queryOutputInvoiceAllList
(
@RequestBody
QueryOutputDto
queryDto
,
@RequestHeader
(
"from"
)
String
projectId
)
{
return
outputInvoiceService
.
queryOutputInvoiceAllList
(
queryDto
,
projectId
);
}
@RequestMapping
(
value
=
"getExportOutputInvoiceList"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
void
downloadInvoiceQueryData
(
@RequestBody
QueryOutputDto
paras
,
@RequestHeader
(
"from"
)
String
projectId
,
HttpServletResponse
response
)
{
response
.
setContentType
(
"application/vnd.ms-excel;charset=utf-8"
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/arearegion/OrganizationShort.java
View file @
89cee29d
...
...
@@ -12,7 +12,7 @@ public class OrganizationShort {
}
public
void
setId
(
String
id
)
{
id
=
id
;
this
.
id
=
id
;
}
public
String
getName
()
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/dimension/DimensinTypeOrgDto.java
View file @
89cee29d
...
...
@@ -15,7 +15,7 @@ public class DimensinTypeOrgDto {
}
public
void
setId
(
String
id
)
{
id
=
id
;
this
.
id
=
id
;
}
public
String
getName
()
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/dimension/DimensionDto.java
View file @
89cee29d
...
...
@@ -40,7 +40,7 @@ public class DimensionDto {
}
public
void
setId
(
String
id
)
{
id
=
id
;
this
.
id
=
id
;
}
public
String
getName
()
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/dimension/DimensionValueDto.java
View file @
89cee29d
...
...
@@ -24,7 +24,7 @@ public class DimensionValueDto {
}
public
void
setId
(
String
id
)
{
id
=
id
;
this
.
id
=
id
;
}
public
String
getName
()
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/dimension/DimensionValueJoinDimensionDto.java
View file @
89cee29d
...
...
@@ -19,7 +19,7 @@ public class DimensionValueJoinDimensionDto {
}
public
void
setId
(
String
id
)
{
id
=
id
;
this
.
id
=
id
;
}
public
String
getDimensionName
()
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/dimension/UnionDimensionValueOrg.java
View file @
89cee29d
...
...
@@ -50,7 +50,7 @@ public class UnionDimensionValueOrg {
}
public
void
setId
(
String
id
)
{
id
=
id
;
this
.
id
=
id
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/dto/organization/OrgCountDto.java
View file @
89cee29d
...
...
@@ -13,7 +13,7 @@ public class OrgCountDto {
}
public
void
setId
(
String
id
)
{
id
=
id
;
this
.
id
=
id
;
}
public
String
getName
()
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/organization/OrgGeneralInfoMiddleDto.java
View file @
89cee29d
...
...
@@ -76,7 +76,7 @@ public class OrgGeneralInfoMiddleDto {
}
public
void
setId
(
String
id
)
{
id
=
id
;
this
.
id
=
id
;
}
public
String
getOrgName
()
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/permission/OrganizationPermissionDto.java
View file @
89cee29d
package
pwc
.
taxtech
.
atms
.
dto
.
permission
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
java.util.List
;
public
class
OrganizationPermissionDto
{
@JsonProperty
(
"ID"
)
private
String
id
;
private
String
name
;
...
...
@@ -17,7 +14,7 @@ public class OrganizationPermissionDto {
}
public
void
setId
(
String
id
)
{
id
=
id
;
this
.
id
=
id
;
}
public
String
getName
()
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/permission/OrganizationPermissionKeyDto.java
View file @
89cee29d
package
pwc
.
taxtech
.
atms
.
dto
.
permission
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
java.util.List
;
public
class
OrganizationPermissionKeyDto
{
@JsonProperty
(
"ID"
)
private
String
id
;
private
String
name
;
...
...
@@ -18,7 +14,7 @@ public class OrganizationPermissionKeyDto {
}
public
void
setId
(
String
id
)
{
id
=
id
;
this
.
id
=
id
;
}
public
String
getName
()
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/permission/PermissionDto.java
View file @
89cee29d
...
...
@@ -39,7 +39,7 @@ public class PermissionDto {
}
public
void
setId
(
String
id
)
{
id
=
id
;
this
.
id
=
id
;
}
public
String
getName
()
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/permission/PermissionKeyDto.java
View file @
89cee29d
...
...
@@ -15,7 +15,7 @@ public class PermissionKeyDto {
}
public
void
setId
(
String
id
)
{
id
=
id
;
this
.
id
=
id
;
}
public
String
getCode
()
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/permission/UserPermissionDto.java
View file @
89cee29d
...
...
@@ -25,7 +25,7 @@ public class UserPermissionDto {
}
public
void
setId
(
String
id
)
{
id
=
id
;
this
.
id
=
id
;
}
public
String
getUserName
()
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/permission/UserPermissionKeyDto.java
View file @
89cee29d
...
...
@@ -25,7 +25,7 @@ public class UserPermissionKeyDto {
}
public
void
setId
(
String
id
)
{
id
=
id
;
this
.
id
=
id
;
}
public
String
getUserName
()
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/user/DimensionUser.java
View file @
89cee29d
...
...
@@ -30,7 +30,7 @@ public class DimensionUser {
}
public
void
setId
(
String
id
)
{
id
=
id
;
this
.
id
=
id
;
}
public
String
getDimensionId
()
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/user/UserRoleDisplayInfo.java
View file @
89cee29d
...
...
@@ -36,7 +36,7 @@ public class UserRoleDisplayInfo {
}
public
void
setId
(
String
id
)
{
id
=
id
;
this
.
id
=
id
;
}
public
String
getUserId
()
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/user/UserRoleQuery.java
View file @
89cee29d
...
...
@@ -28,7 +28,7 @@ public class UserRoleQuery {
}
public
void
setId
(
String
id
)
{
id
=
id
;
this
.
id
=
id
;
}
public
String
getUserId
()
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/exception/Exceptions.java
View file @
89cee29d
...
...
@@ -20,5 +20,6 @@ public class Exceptions {
public
static
final
ApiException
NOT_FOUND_EXCEPTION
=
new
NotFoundException
(
"not found resources"
);
public
static
final
ApiException
REPORT_IN_PROCESS_OR_AGREED_EXCEPTION
=
new
PreconditionFailedException
(
"report in approval or agreed result"
);
public
static
final
FormulaException
PROJECT_NOT_FOUND
=
new
FormulaException
(
"project not found"
);;
public
static
final
FormulaException
PSUM_CELL_TEMP_NULL
=
new
FormulaException
(
"cell template group is null or empty"
);
;
public
static
final
FormulaException
PSUM_CELL_TEMP_NULL
=
new
FormulaException
(
"cell template group is null or empty"
);
public
static
final
ApiException
NOT_FOUND_INSTANCE_EXCEPTION
=
new
NotFoundException
(
"not found instance"
);
}
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ApprovalService.java
View file @
89cee29d
...
...
@@ -55,9 +55,7 @@ public class ApprovalService {
public
List
<
ApprovalTaskInfo
>
getTask
()
{
String
userId
=
authUserHelper
.
getCurrentUserId
();
//TODO query user role from sesstion or db
String
assignee
=
(
"66933E7B-DA75-4B2E-B7D6-AB65DCA20D50"
.
equalsIgnoreCase
(
userId
))
?
"manager"
:
"accountant"
;
return
periodApproveMapper
.
queryApprovalList
(
assignee
.
equalsIgnoreCase
(
"manager"
)
?
null
:
userId
);
return
periodApproveMapper
.
queryApprovalList
();
}
private
void
startInstance
(
ApprovalDto
dto
,
PeriodApprove
pa
)
{
...
...
@@ -125,7 +123,10 @@ public class ApprovalService {
@Transactional
public
void
checkTask
(
String
instanceId
,
String
decide
,
String
comment
)
{
public
void
checkTask
(
String
projectId
,
Integer
period
,
String
decide
,
String
comment
)
{
PeriodApprove
approve
=
periodApproveMapper
.
getInstanceIdByProjectIdAndPeriod
(
projectId
,
period
);
MyAsserts
.
assertTrue
(
approve
!=
null
&&
approve
.
getStatus
().
equals
(
"committed"
),
Exceptions
.
NOT_FOUND_INSTANCE_EXCEPTION
);
String
instanceId
=
approve
.
getInstanceId
();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
PeriodApprove
pa
=
new
PeriodApprove
();
switch
(
decide
)
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/OutputInvoiceServiceImpl.java
View file @
89cee29d
...
...
@@ -73,7 +73,7 @@ public class OutputInvoiceServiceImpl {
@Autowired
private
OutputInvoiceDetailMapper
outputInvoiceDetailMapper
;
public
PageInfo
<
OutputInvoice
>
queryOutputInvoice
List
(
QueryOutputDto
queryDto
,
String
projectId
)
{
public
List
<
OutputInvoice
>
queryOutputInvoiceAll
List
(
QueryOutputDto
queryDto
,
String
projectId
)
{
Project
project
=
projectMapper
.
selectByPrimaryKey
(
projectId
);
Organization
organization
=
organizationMapper
.
selectByPrimaryKey
(
project
.
getOrganizationId
());
...
...
@@ -89,9 +89,6 @@ public class OutputInvoiceServiceImpl {
DateUtils
.
getPeriodEnd
(
project
.
getYear
(),
queryDto
.
getPeriodEnd
()))
.
andFPZTNotEqualTo
(
"1"
);
}
PageHelper
.
startPage
(
queryDto
.
getPageInfo
().
getPageIndex
(),
queryDto
.
getPageInfo
().
getPageSize
());
List
<
OutputInvoice
>
invoices
=
outputInvoiceMapper
.
selectByExample
(
outputInvoiceExample
);
DecimalFormat
df
=
new
DecimalFormat
(
"#,###.00"
);
invoices
.
stream
().
forEach
(
x
->
{
...
...
@@ -99,7 +96,11 @@ public class OutputInvoiceServiceImpl {
x
.
setHJSE
(
df
.
format
(
new
BigDecimal
(
x
.
getHJSE
())));
}
);
PageInfo
<
OutputInvoice
>
pageInfo
=
new
PageInfo
<>(
invoices
);
return
invoices
;
}
public
PageInfo
<
OutputInvoice
>
queryOutputInvoiceList
(
QueryOutputDto
queryDto
,
String
projectId
)
{
PageInfo
<
OutputInvoice
>
pageInfo
=
new
PageInfo
<>(
queryOutputInvoiceAllList
(
queryDto
,
projectId
));
return
pageInfo
;
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
View file @
89cee29d
package
pwc
.
taxtech
.
atms
.
vat
.
service
.
impl
;
import
com.google.common.collect.Lists
;
import
jdk.nashorn.internal.runtime.options.Option
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.openxml4j.exceptions.InvalidFormatException
;
import
org.apache.poi.ss.formula.functions.FreeRefFunction
;
...
...
@@ -16,20 +14,16 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
import
pwc.taxtech.atms.common.POIUtil
;
import
pwc.taxtech.atms.common.util.SpringContextUtil
;
import
pwc.taxtech.atms.constant.enums.CellDataSourceType
;
import
pwc.taxtech.atms.constant.enums.FormulaDataSourceType
;
import
pwc.taxtech.atms.dao.ProjectMapper
;
import
pwc.taxtech.atms.dto.vatdto.CellCalcInfoDto
;
import
pwc.taxtech.atms.dto.vatdto.PeriodResources
;
import
pwc.taxtech.atms.dto.vatdto.WrapPeriodJobDto
;
import
pwc.taxtech.atms.exception.Exceptions
;
import
pwc.taxtech.atms.service.impl.DistributedIdService
;
import
pwc.taxtech.atms.service.impl.HttpFileService
;
import
pwc.taxtech.atms.vat.dao.*
;
import
pwc.taxtech.atms.vat.dpo.MergerManaualCellData
;
import
pwc.taxtech.atms.vat.dpo.PeriodCellTemplateConfigExtendDto
;
import
pwc.taxtech.atms.vat.entity.*
;
import
pwc.taxtech.atms.vat.service.impl.report.functions.*
;
...
...
@@ -44,7 +38,6 @@ import java.util.regex.Pattern;
import
java.util.stream.Collectors
;
import
static
pwc
.
taxtech
.
atms
.
common
.
util
.
SpringContextUtil
.
reportMapper
;
import
static
pwc
.
taxtech
.
atms
.
constant
.
Constant
.
EMPTY
;
import
static
pwc
.
taxtech
.
atms
.
dto
.
vatdto
.
WrapPeriodJobDto
.*;
@Component
...
...
@@ -517,7 +510,7 @@ public class ReportGeneratorImpl {
*/
public
void
addFunctionsAndContext
(
Workbook
workbook
,
String
[]
functions
,
FormulaContext
formulaContext
)
{
FreeRefFunction
[]
functionImpls
=
{
new
SGSR
(
formulaContext
),
new
FSJZ
(
formulaContext
),
new
ND
(
formulaContext
),
new
BB
(
formulaContext
),
new
XXFP
(
formulaContext
),
new
GZSD
(
formulaContext
),
new
P
rojectContext
(
formulaContext
)
new
BB
(
formulaContext
),
new
XXFP
(
formulaContext
),
new
GZSD
(
formulaContext
),
new
P
C
(
formulaContext
)
,
new
JXFPMX
(
formulaContext
),
new
JXFP
(
formulaContext
),
new
PSUM
(
formulaContext
),
new
DFFS
(
formulaContext
),
new
JFFS
(
formulaContext
),
new
WPSR
(
formulaContext
)};
UDFFinder
udfs
=
new
DefaultUDFFinder
(
functions
,
functionImpls
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
89cee29d
...
...
@@ -50,7 +50,7 @@ import static pwc.taxtech.atms.dto.vatdto.WrapPeriodJobDto.*;
public
class
ReportServiceImpl
{
private
final
static
Logger
logger
=
LoggerFactory
.
getLogger
(
ReportServiceImpl
.
class
);
private
BlockingQueue
<
PeriodJob
>
queue
=
new
LinkedBlockingQueue
<>();
private
final
static
String
[]
functions
=
{
"SGSR"
,
"FSJZ"
,
"ND"
,
"BB"
,
"XXFP"
,
"GZSD"
,
"P
rojectContext
"
,
"JXFPMX"
,
private
final
static
String
[]
functions
=
{
"SGSR"
,
"FSJZ"
,
"ND"
,
"BB"
,
"XXFP"
,
"GZSD"
,
"P
C
"
,
"JXFPMX"
,
"JXFP"
,
"PSUM"
,
"DFFS"
,
"JFFS"
,
"WPSR"
};
@Autowired
...
...
@@ -654,6 +654,8 @@ public class ReportServiceImpl {
dataSourceDto
.
setDataSourceType
(
CellDataSourceType
.
InputInvoice
.
getCode
());
}
else
if
(
a
.
getType
().
equals
(
FormulaDataSourceType
.
Voucher
.
getCode
()))
{
dataSourceDto
.
setDataSourceType
(
CellDataSourceType
.
Voucher
.
getCode
());
}
else
if
(
a
.
getType
().
equals
(
FormulaDataSourceType
.
OutputInvoice
.
getCode
())){
dataSourceDto
.
setDataSourceType
(
CellDataSourceType
.
OutputInvoice
.
getCode
());
}
else
{
dataSourceDto
.
setDataSourceType
(
0
);
}
...
...
@@ -692,6 +694,13 @@ public class ReportServiceImpl {
if
(
z
.
getItem2
().
getItems
()
!=
null
&&
!
z
.
getItem2
().
getItems
().
isEmpty
()
&&
z
.
getItem2
().
getItems
().
get
(
0
).
contains
(
"tag"
))
{
z
.
getItem2
().
getItems
().
forEach
(
m
->
{
ReportCellDataSourceDto
dto
=
JSON
.
parseObject
(
m
,
ReportCellDataSourceDto
.
class
);
PeriodTemplateExample
periodTemplateExample1
=
new
PeriodTemplateExample
();
periodTemplateExample1
.
createCriteria
().
andTemplateIdEqualTo
(
a
.
getReportTemplateId
())
.
andPeriodEqualTo
(
report
.
getPeriod
());
Optional
<
PeriodTemplate
>
optional
=
periodTemplateMapper
.
selectByExample
(
periodTemplateExample1
).
stream
().
findFirst
();
if
(
optional
.
isPresent
()){
dto
.
setReportName
(
optional
.
get
().
getName
());
}
dataSourceDtoList
.
add
(
dto
);
});
}
else
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/DFFS.java
View file @
89cee29d
...
...
@@ -14,10 +14,7 @@ import pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType;
import
pwc.taxtech.atms.constant.enums.FormulaDataSourceType
;
import
pwc.taxtech.atms.dpo.CellTemplatePerGroupDto
;
import
pwc.taxtech.atms.dto.vatdto.ReportCellDataSourceDto
;
import
pwc.taxtech.atms.entity.AccountMapping
;
import
pwc.taxtech.atms.entity.AccountMappingExample
;
import
pwc.taxtech.atms.entity.EnterpriseAccountSetOrg
;
import
pwc.taxtech.atms.entity.EnterpriseAccountSetOrgExample
;
import
pwc.taxtech.atms.entity.*
;
import
pwc.taxtech.atms.exception.Exceptions
;
import
pwc.taxtech.atms.vat.entity.GlBalance
;
import
pwc.taxtech.atms.vat.entity.GlBalanceExample
;
...
...
@@ -70,7 +67,7 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
double
result
=
0
;
for
(
AccountMapping
a
:
accountMappings
){
result
+=
count
(
a
.
getEnterpriseAccountCode
(),
dataSource
,
period
,
year
);
result
+=
count
(
a
.
getEnterpriseAccountCode
(),
dataSource
,
period
,
year
,
orgId
);
}
Long
dataSoureId
=
saveDataSource
(
ec
,
Collections
.
singletonList
(
dataSource
),
FormulaDataSourceDetailType
.
FormulaDataSourceDto
,
...
...
@@ -80,7 +77,7 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
return
new
NumberEval
(
result
);
}
else
if
(
type
==
1
){
double
result
=
count
(
code
,
dataSource
,
period
,
year
);
double
result
=
count
(
code
,
dataSource
,
period
,
year
,
orgId
);
Long
dataSoureId
=
saveDataSource
(
ec
,
Collections
.
singletonList
(
dataSource
),
FormulaDataSourceDetailType
.
FormulaDataSourceDto
,
new
BigDecimal
(
result
),
period
,
formulaContext
.
getReportTemplateGroupId
(),
formulaContext
.
getProjectId
());
...
...
@@ -95,10 +92,17 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
return
year
+
"-"
+
(
period
>
9
?
period
:
(
"0"
+
period
));
}
private
double
count
(
String
code
,
List
<
ReportCellDataSourceDto
>
contain
,
int
period
,
int
year
){
private
double
count
(
String
code
,
List
<
ReportCellDataSourceDto
>
contain
,
int
period
,
int
year
,
String
orgId
){
Organization
organization
=
SpringContextUtil
.
organizationMapper
.
selectByPrimaryKey
(
orgId
);
GlBalanceExample
glBalanceExample
=
new
GlBalanceExample
();
GlBalanceExample
.
Criteria
c1
=
glBalanceExample
.
createCriteria
().
andSegment3EqualTo
(
code
).
andPeriodNameEqualTo
(
periodName
(
period
,
year
));
GlBalanceExample
.
Criteria
c2
=
glBalanceExample
.
createCriteria
().
andSegment4EqualTo
(
code
).
andPeriodNameEqualTo
(
periodName
(
period
,
year
));
GlBalanceExample
.
Criteria
c1
=
glBalanceExample
.
createCriteria
().
andSegment3EqualTo
(
code
)
.
andPeriodNameEqualTo
(
periodName
(
period
,
year
));
GlBalanceExample
.
Criteria
c2
=
glBalanceExample
.
createCriteria
().
andSegment4EqualTo
(
code
)
.
andPeriodNameEqualTo
(
periodName
(
period
,
year
));
if
(
organization
!=
null
){
c1
.
andSegment1EqualTo
(
organization
.
getClientCode
());
c2
.
andSegment1EqualTo
(
organization
.
getClientCode
());
}
glBalanceExample
.
or
(
c2
);
List
<
GlBalance
>
list
=
SpringContextUtil
.
glBalanceMapper
.
selectByExample
(
glBalanceExample
);
if
(
CollectionUtils
.
isEmpty
(
list
)){
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/P
rojectContext
.java
→
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/P
C
.java
View file @
89cee29d
...
...
@@ -12,8 +12,8 @@ import pwc.taxtech.atms.vat.entity.PeriodReport;
import
java.util.Calendar
;
import
java.util.Date
;
public
class
P
rojectContext
extends
FunctionBase
implements
FreeRefFunction
{
public
P
rojectContext
(
FormulaContext
formulaContext
)
{
public
class
P
C
extends
FunctionBase
implements
FreeRefFunction
{
public
P
C
(
FormulaContext
formulaContext
)
{
super
(
formulaContext
);
}
...
...
@@ -56,13 +56,9 @@ public class ProjectContext extends FunctionBase implements FreeRefFunction {
,
formulaContext
.
getPeriod
(),
calendar
.
get
(
Calendar
.
DAY_OF_MONTH
),
formulaContext
.
getYear
()
,
formulaContext
.
getPeriod
(),
calendar2
.
get
(
Calendar
.
DAY_OF_MONTH
)));
case
"FillForm"
:
PeriodReport
report
=
SpringContextUtil
.
reportMapper
.
selectByPrimaryKey
(
formulaContext
.
getReportId
());
if
(
report
!=
null
)
{
return
new
StringEval
(
String
.
format
(
Constant
.
ReportBuildInStringFormat
.
FillForm
,
report
.
getUpdateTime
().
getYear
()
,
report
.
getUpdateTime
().
getMonth
(),
report
.
getUpdateTime
().
getDay
()));
}
else
{
return
new
StringEval
(
String
.
format
(
Constant
.
ReportBuildInStringFormat
.
FillFormStr
,
" "
,
" "
,
" "
));
}
Date
updateDate
=
new
Date
();
return
new
StringEval
(
String
.
format
(
Constant
.
ReportBuildInStringFormat
.
FillForm
,
updateDate
.
getYear
()
,
updateDate
.
getMonth
(),
updateDate
.
getDay
()));
case
"TaxPayerNo"
:
String
taxPayerNo
=
SpringContextUtil
.
organizationMapper
.
selectByPrimaryKey
(
formulaContext
.
getOrganizationId
()).
getTaxPayerNumber
();
if
(
StringUtils
.
isNotBlank
(
taxPayerNo
)
&&
taxPayerNo
.
length
()
-
1
>=
parameterInt
)
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/PSUM.java
View file @
89cee29d
package
pwc
.
taxtech
.
atms
.
vat
.
service
.
impl
.
report
.
functions
;
import
org.apache.poi.ss.formula.OperationEvaluationContext
;
import
org.apache.poi.ss.formula.WorkbookEvaluator
;
import
org.apache.poi.ss.formula.eval.*
;
import
org.apache.poi.ss.formula.eval.NumberEval
;
import
org.apache.poi.ss.formula.eval.StringEval
;
import
org.apache.poi.ss.formula.eval.ValueEval
;
import
org.apache.poi.ss.formula.functions.FreeRefFunction
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -13,10 +14,7 @@ import pwc.taxtech.atms.constant.enums.FormulaDataSourceType;
import
pwc.taxtech.atms.dpo.CellTemplatePerGroupDto
;
import
pwc.taxtech.atms.dto.vatdto.ReportCellDataSourceDto
;
import
pwc.taxtech.atms.exception.Exceptions
;
import
pwc.taxtech.atms.vat.entity.PeriodDataSource
;
import
pwc.taxtech.atms.vat.service.impl.FormulaAgent
;
import
java.lang.reflect.Field
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -80,16 +78,16 @@ public class PSUM extends FunctionBase implements FreeRefFunction {
dto
.
setName
(
DataSourceName
.
ReportDataSource
);
dto
.
setPeriod
(
formulaContext
.
getPeriod
());
dto
.
setProjectId
(
formulaContext
.
getProjectId
());
dto
.
setRowIndex
(
pCell
.
rowIndex
-
1
);
dto
.
setColumnIndex
(
pCell
.
columnIndex
-
1
);
dto
.
setColumnName
((
pCell
.
columnIndex
)
+
"列"
);
dto
.
setRowName
((
pCell
.
rowIndex
)
+
"行"
);
dto
.
setRowIndex
(
pCell
.
rowIndex
-
1
);
dto
.
setColumnIndex
(
pCell
.
columnIndex
-
1
);
dto
.
setColumnName
((
pCell
.
columnIndex
)
+
"列"
);
dto
.
setRowName
((
pCell
.
rowIndex
)
+
"行"
);
dto
.
setReportName
(
ec
.
getWorkbook
().
getSheetName
(
ec
.
getSheetIndex
()));
dto
.
setType
(
FormulaDataSourceType
.
Report
.
getCode
());
dto
.
setType
(
FormulaDataSourceType
.
Report
.
getCode
());
dataSource
.
add
(
dto
);
bigDecimal
=
bigDecimal
.
add
(
cellValue
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
...
...
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/PeriodApproveMapper.java
View file @
89cee29d
...
...
@@ -110,6 +110,7 @@ public interface PeriodApproveMapper extends MyVatMapper {
@Select
(
"<script>"
+
"SELECT "
+
" p.ORGANIZATION_ID AS organizationId, "
+
" p.NAME AS projectName, "
+
" pa.PROJECT_ID AS projectId, "
+
" pa.PERIOD AS period, "
+
...
...
@@ -128,11 +129,8 @@ public interface PeriodApproveMapper extends MyVatMapper {
" INNER JOIN PROJECT p ON pa.PROJECT_ID = p.ID "
+
" JOIN \"USER\" u1 ON pa.CREATE_BY = u1.id "
+
" LEFT JOIN \"USER\" u2 ON pa.APPROVAL_BY = u2.id "
+
"<where> 1=1 "
+
" <if test=\"createId != null and createId !='' \">AND pa.CREATE_BY=#{createId}</if>"
+
"</where>"
+
"</script>"
)
List
<
ApprovalTaskInfo
>
queryApprovalList
(
@Param
(
"createId"
)
String
createId
);
List
<
ApprovalTaskInfo
>
queryApprovalList
();
@Select
(
""
+
"SELECT "
+
...
...
@@ -143,4 +141,14 @@ public interface PeriodApproveMapper extends MyVatMapper {
" ROWNUM = 1"
+
""
)
String
getStatusByProjectIdAndPeriod
(
@Param
(
"projectId"
)
String
projectId
,
@Param
(
"period"
)
Integer
period
);
@Select
(
""
+
"SELECT "
+
" INSTANCE_ID AS instanceId ,STATUS AS status "
+
"FROM "
+
" ( SELECT * FROM PERIOD_APPROVE WHERE PROJECT_ID = #{projectId} AND PERIOD = #{period} ORDER BY CREATE_TIME DESC ) "
+
"WHERE "
+
" ROWNUM = 1"
+
""
)
PeriodApprove
getInstanceIdByProjectIdAndPeriod
(
@Param
(
"projectId"
)
String
projectId
,
@Param
(
"period"
)
Integer
period
);
}
\ No newline at end of file
atms-dao/src/main/java/pwc/taxtech/atms/vat/dpo/ApprovalTaskInfo.java
View file @
89cee29d
...
...
@@ -3,6 +3,7 @@ package pwc.taxtech.atms.vat.dpo;
import
java.sql.Date
;
public
class
ApprovalTaskInfo
{
private
String
organizationId
;
private
String
projectName
;
private
String
projectId
;
private
Integer
period
;
...
...
@@ -120,4 +121,12 @@ public class ApprovalTaskInfo {
public
void
setTemplateIds
(
String
templateIds
)
{
this
.
templateIds
=
templateIds
;
}
public
String
getOrganizationId
()
{
return
organizationId
;
}
public
void
setOrganizationId
(
String
organizationId
)
{
this
.
organizationId
=
organizationId
;
}
}
atms-web/src/main/webapp/app/common/controls/tax-report-cell-detail-modal/tax-report-cell-detail-modal.html
View file @
89cee29d
...
...
@@ -41,11 +41,11 @@
<label
class=
"cell-info-subject-label"
>
{{'ColumnName' | translate}}:
</label>
{{detail.cellInfo.column}}
</div>
<div
class=
"cell-info-subject"
>
<
!--<
div class="cell-info-subject">
<label class="cell-info-subject-label">{{'Formula' | translate}}</label>
<formula-translator formula-list="formulaList" key-value-list="keyValueList" include-optional="false"
account-data-source="accountDataSource" formula-exp="detail.config.formula"></formula-translator>
</div>
</div>
-->
<div
class=
"cell-info-subject"
>
<label
class=
"cell-info-subject-label"
>
{{'SourceOrFormula' | translate}}:
</label>
{{detail.cellInfo.description}}
...
...
atms-web/src/main/webapp/app/common/controls/vat-report-view/vat-report-view.ctrl.js
View file @
89cee29d
commonModule
.
controller
(
'VatReportViewController'
,
[
'$scope'
,
'$rootScope'
,
'$log'
,
'$translate'
,
'$timeout'
,
'$q'
,
'$compile'
,
'$state'
,
'$stateParams'
,
commonModule
.
controller
(
'VatReportViewController'
,
[
'$scope'
,
'$rootScope'
,
'$log'
,
'$translate'
,
'$timeout'
,
'$q'
,
'$compile'
,
'$state'
,
'$stateParams'
,
'apiInterceptor'
,
'vatExportService'
,
'SweetAlert'
,
'BSPLService'
,
'vatReportService'
,
'vatReportCacheService'
,
'vatSessionService'
,
'loginContext'
,
'enums'
,
'vatCommonService'
,
'vatWorkflowService'
,
'projectService'
,
'$uibModal'
,
'$cookies'
,
'Upload'
,
'vatImportService'
,
'vatApproveService'
,
function
(
$scope
,
$rootScope
,
$log
,
$translate
,
$timeout
,
$q
,
$compile
,
$state
,
$stateParams
,
apiInterceptor
,
vatExportService
,
SweetAlert
,
BSPLService
,
...
...
@@ -972,7 +972,7 @@
delete
x
.
cellValue
;
});
reportData
.
data
.
cellData
.
reportName
=
node
.
name
;
//
reportData.data.cellData.reportName = node.name;
reportData
.
data
.
cellData
.
orderIndex
=
node
.
orderIndex
;
reportData
.
data
.
cellData
.
templateId
=
node
.
id
;
exportReportData
.
push
(
reportData
.
data
.
cellData
);
...
...
@@ -2538,7 +2538,9 @@
};
$scope
.
commitApprove
=
function
(){
vatApproveService
.
approvalStatus
(
vatSessionService
.
project
.
id
,
vatSessionService
.
month
).
success
(
function
(
result
){
if
(
vatSessionService
.
month
)
vatSessionService
.
project
.
period
=
vatSessionService
.
month
;
vatApproveService
.
approvalStatus
(
vatSessionService
.
project
.
id
,
vatSessionService
.
project
.
period
).
success
(
function
(
result
){
if
(
result
&&
result
==
'committed'
){
SweetAlert
.
error
(
'报表提审中或审核已通过!'
);
}
else
{
...
...
@@ -2568,17 +2570,30 @@
}
$scope
.
doApprove
=
function
(){
$
(
"#ApprovalComment"
).
modal
(
'show'
);
if
(
vatSessionService
.
month
)
vatSessionService
.
project
.
period
=
vatSessionService
.
month
;
vatApproveService
.
approvalStatus
(
vatSessionService
.
project
.
id
,
vatSessionService
.
project
.
period
).
success
(
function
(
result
){
if
(
result
&&
result
==
'committed'
){
$
(
"#ApprovalComment"
).
modal
(
'show'
)
}
else
{
SweetAlert
.
warning
(
'当前报表未提审,请先提审!'
);
}
});
;
}
$scope
.
rejectApproval
=
function
(){
vatApproveService
.
checkTask
(
vatSessionService
.
approvalInfo
.
instanceId
,
'disagreed'
,
$scope
.
comment
).
success
(
function
(){
if
(
vatSessionService
.
month
)
vatSessionService
.
project
.
period
=
vatSessionService
.
month
;
vatApproveService
.
checkTask
(
vatSessionService
.
project
.
id
,
vatSessionService
.
project
.
period
,
'disagreed'
,
$scope
.
comment
).
success
(
function
(){
$
(
"#ApprovalComment"
).
modal
(
'hide'
);
});
}
$scope
.
agreeApproval
=
function
(){
vatApproveService
.
checkTask
(
vatSessionService
.
approvalInfo
.
instanceId
,
'agreed'
,
$scope
.
comment
).
success
(
function
(){
if
(
vatSessionService
.
month
)
vatSessionService
.
project
.
period
=
vatSessionService
.
month
;
vatApproveService
.
checkTask
(
vatSessionService
.
project
.
id
,
vatSessionService
.
project
.
period
,
'agreed'
,
$scope
.
comment
).
success
(
function
(){
vatCommonService
.
setProjectStatus
(
vatSessionService
.
project
.
id
,
vatSessionService
.
month
,
constant
.
ProjectStatusEnum
.
Completed
,
constant
.
DictionaryDictKey
.
WFDataProcess
,
enums
.
FinishStatusEnum
.
Finished
);
$
(
"#ApprovalComment"
).
modal
(
'hide'
);
...
...
atms-web/src/main/webapp/app/common/vatservices/vatApproveService.js
View file @
89cee29d
...
...
@@ -21,8 +21,8 @@
return
$http
.
get
(
'/approval/templateInfo/'
+
templateId
,
apiConfig
.
createVat
());
},
checkTask
:
function
(
taskI
d
,
decide
,
comment
){
return
$http
.
put
(
'/approval/check/'
+
taskI
d
+
'?decide='
+
decide
+
'&comment='
+
comment
,
{},
apiConfig
.
createVat
());
checkTask
:
function
(
projectId
,
perio
d
,
decide
,
comment
){
return
$http
.
put
(
'/approval/check/'
+
projectId
+
'/'
+
perio
d
+
'?decide='
+
decide
+
'&comment='
+
comment
,
{},
apiConfig
.
createVat
());
},
approvalStatus
:
function
(
projectId
,
period
){
...
...
atms-web/src/main/webapp/app/common/vatservices/vatPreviewService.js
View file @
89cee29d
...
...
@@ -5,6 +5,25 @@
return
$http
.
get
(
'url'
,
apiConfig
.
createVat
());
},
queryOutputInvoiceAllList
:
function
(
param
)
{
return
$http
.
post
(
'/outputInvoiceImport/queryOutputInvoiceAllList'
,
{
// PageInfo: param.pageInfo,
PeriodStart
:
param
.
periodStart
,
PeriodEnd
:
param
.
periodEnd
,
InvoiceType
:
param
.
invoiceType
,
StartInvoiceDate
:
param
.
invoiceDateStart
,
EndInvoiceDate
:
param
.
invoiceDateEnd
,
ClassCode
:
param
.
classCode
,
InvoiceNumber
:
param
.
invoiceNumber
,
BuyerName
:
param
.
buyerName
,
ProductName
:
param
.
productName
,
AmountStart
:
param
.
amountStart
,
AmountEnd
:
param
.
amountEnd
,
TaxAmountStart
:
param
.
taxAmountStart
,
TaxAmountEnd
:
param
.
taxAmountEnd
,
},
apiConfig
.
createVat
());
},
queryOutputInvoiceList
:
function
(
param
)
{
return
$http
.
post
(
'/outputInvoiceImport/queryOutputInvoiceList'
,
{
PageInfo
:
param
.
pageInfo
,
...
...
@@ -49,22 +68,41 @@
queryInputInvoiceList
:
function
(
param
)
{
return
$http
.
post
(
'/inputInvoiceImport/inputInvoicePreviewList'
,
{
PageInfo
:
param
.
pageInfo
,
PeriodStart
:
param
.
periodStart
,
PeriodEnd
:
param
.
periodEnd
,
CertificationDateStart
:
param
.
certificationDateStart
,
CertificationDateEnd
:
param
.
certificationDateEnd
,
InvoiceCode
:
param
.
invoiceCode
,
InvoiceNumber
:
param
.
invoiceNumber
,
SellerTaxNumber
:
param
.
sellerTaxNumber
,
AmountStart
:
param
.
amountStart
,
AmountEnd
:
param
.
amountEnd
,
InvoiceType
:
param
.
invoiceType
,
TaxAmountStart
:
param
.
taxAmountStart
,
TaxAmountEnd
:
param
.
taxAmountEnd
,
CertificationStatus
:
param
.
certificationStatus
},
apiConfig
.
createVat
());
return
$http
.
post
(
'/inputInvoiceImport/inputInvoicePreviewList'
,
{
PageInfo
:
param
.
pageInfo
,
PeriodStart
:
param
.
periodStart
,
PeriodEnd
:
param
.
periodEnd
,
CertificationDateStart
:
param
.
certificationDateStart
,
CertificationDateEnd
:
param
.
certificationDateEnd
,
InvoiceCode
:
param
.
invoiceCode
,
InvoiceNumber
:
param
.
invoiceNumber
,
SellerTaxNumber
:
param
.
sellerTaxNumber
,
AmountStart
:
param
.
amountStart
,
AmountEnd
:
param
.
amountEnd
,
InvoiceType
:
param
.
invoiceType
,
TaxAmountStart
:
param
.
taxAmountStart
,
TaxAmountEnd
:
param
.
taxAmountEnd
,
CertificationStatus
:
param
.
certificationStatus
},
apiConfig
.
createVat
());
},
queryInputInvoiceAllList
:
function
(
param
)
{
return
$http
.
post
(
'/inputInvoiceImport/inputInvoicePreviewAllList'
,
{
// PageInfo: param.pageInfo,
PeriodStart
:
param
.
periodStart
,
PeriodEnd
:
param
.
periodEnd
,
CertificationDateStart
:
param
.
certificationDateStart
,
CertificationDateEnd
:
param
.
certificationDateEnd
,
InvoiceCode
:
param
.
invoiceCode
,
InvoiceNumber
:
param
.
invoiceNumber
,
SellerTaxNumber
:
param
.
sellerTaxNumber
,
AmountStart
:
param
.
amountStart
,
AmountEnd
:
param
.
amountEnd
,
InvoiceType
:
param
.
invoiceType
,
TaxAmountStart
:
param
.
taxAmountStart
,
TaxAmountEnd
:
param
.
taxAmountEnd
,
CertificationStatus
:
param
.
certificationStatus
},
apiConfig
.
createVat
());
},
queryInputInvoiceItemList
:
function
(
inputInvoiceID
)
{
...
...
atms-web/src/main/webapp/app/framework/app-side-bar/app-side-bar.ctrl.js
View file @
89cee29d
...
...
@@ -10,17 +10,9 @@ frameworkModule.controller('appSideBarController', ['$scope', '$log', 'menuServi
$log
.
debug
(
'appSideBarController.ctor()...'
);
userService
.
getUserPermission
(
loginContext
.
userName
).
success
(
function
(
data
)
{
$timeout
(
function
()
{
menuService
.
getMenusForDisplay
(
1
).
success
(
function
(
menuData
)
{
$scope
.
menuData
=
menuData
;
$scope
.
menuData
[
2
].
subMenus
[
0
].
isVisible
=
true
;
$scope
.
menuData
[
2
].
subMenus
[
1
].
isVisible
=
false
;
$scope
.
menuData
[
2
].
subMenus
[
3
].
isVisible
=
false
;
$scope
.
menuData
[
2
].
subMenus
[
4
].
isVisible
=
true
;
$scope
.
menuData
[
2
].
subMenus
[
5
].
isVisible
=
true
;
$window
.
location
.
href
=
'#/adminHomePage'
;
});
},
500
);
...
...
atms-web/src/main/webapp/app/vat/preview/vat-preview-input-invoice/vat-preview-input-invoice.ctrl.js
View file @
89cee29d
...
...
@@ -82,6 +82,27 @@
};
};
var
countTotal
=
function
(){
$scope
.
queryParams
.
pageInfo
=
{
totalCount
:
-
1
,
pageIndex
:
1
,
pageSize
:
-
1
,
totalPage
:
0
,
};
vatPreviewService
.
queryInputInvoiceAllList
(
$scope
.
queryParams
).
success
(
function
(
data
)
{
if
(
data
)
{
var
totalMoneyAmount
=
0
;
var
totalTaxAmount
=
0
;
_
.
each
(
data
,
function
(
x
)
{
totalMoneyAmount
=
totalMoneyAmount
+
parseFloat
(
x
.
hjje
.
replace
(
/,/g
,
""
));
totalTaxAmount
=
totalTaxAmount
+
parseFloat
(
x
.
hjse
.
replace
(
/,/g
,
""
));
})
$scope
.
totalMoneyAmount
=
totalMoneyAmount
.
toLocaleString
();
$scope
.
totalTaxAmount
=
totalTaxAmount
.
toLocaleString
();
}
});
};
//从数据库中load数据
var
loadIncomeInvoiceItemDataFromDB
=
function
(
pageIndex
)
{
initIncomeInvoiceItemPagination
();
...
...
@@ -96,16 +117,6 @@
totalPage
:
0
,
};
var
countTotal
=
function
(){
var
totalMoneyAmount
=
0
;
var
totalTaxAmount
=
0
;
_
.
each
(
$scope
.
gridOptions
.
data
,
function
(
x
)
{
totalMoneyAmount
=
totalMoneyAmount
+
parseFloat
(
x
.
hjje
.
replace
(
/,/g
,
""
));
totalTaxAmount
=
totalTaxAmount
+
parseFloat
(
x
.
hjse
.
replace
(
/,/g
,
""
));
})
$scope
.
totalMoneyAmount
=
totalMoneyAmount
.
toLocaleString
();
$scope
.
totalTaxAmount
=
totalTaxAmount
.
toLocaleString
();
}
vatPreviewService
.
queryInputInvoiceList
(
$scope
.
queryParams
).
success
(
function
(
data
)
{
if
(
data
)
{
...
...
@@ -113,13 +124,12 @@
var
index
=
1
;
data
.
list
.
forEach
(
function
(
v
)
{
v
.
index
=
index
++
;
v
.
amount
=
PWC
.
round
(
v
.
amount
,
2
);
v
.
taxAmount
=
PWC
.
round
(
v
.
taxAmount
,
2
);
v
.
amount
=
PWC
.
round
(
parseFloat
(
v
.
hjje
.
replace
(
/,/g
,
""
))
,
2
);
v
.
taxAmount
=
PWC
.
round
(
parseFloat
(
v
.
hjse
.
replace
(
/,/g
,
""
))
,
2
);
});
$scope
.
gridOptions
.
data
=
data
.
list
;
$scope
.
queryIncomeInvoiceItemResult
.
pageInfo
=
data
;
computeIncomeInvoiceItemPage
();
countTotal
();
}
});
};
...
...
@@ -636,6 +646,7 @@
//初始化查询条件-期间范围
$scope
.
queryParams
.
periodStart
=
vatSessionService
.
month
;
$scope
.
queryParams
.
periodEnd
=
vatSessionService
.
month
;
countTotal
();
loadIncomeInvoiceItemDataFromDB
(
1
);
})();
...
...
atms-web/src/main/webapp/app/vat/preview/vat-preview-output-invoice/vat-preview-output-invoice.ctrl.js
View file @
89cee29d
...
...
@@ -68,6 +68,23 @@
$scope
.
queryParams
.
periodEnd
=
vatSessionService
.
month
;
};
var
countTotal
=
function
(){
var
totalMoneyAmount
=
0
;
var
totalTaxAmount
=
0
;
vatPreviewService
.
queryOutputInvoiceAllList
(
$scope
.
queryParams
).
success
(
function
(
data
)
{
if
(
data
)
{
_
.
each
(
data
,
function
(
x
)
{
totalMoneyAmount
+=
parseFloat
(
x
.
hjje
.
replace
(
/,/g
,
""
));
totalTaxAmount
+=
parseFloat
(
x
.
hjse
.
replace
(
/,/g
,
""
));
})
}
$scope
.
totalMoneyAmount
=
totalMoneyAmount
.
toLocaleString
();
$scope
.
totalTaxAmount
=
totalTaxAmount
.
toLocaleString
();
}).
error
(
function
()
{
SweetAlert
.
error
(
$translate
.
instant
(
'PleaseContactAdministrator'
));
});
}
//从数据库中load数据
var
loadOutputInvoiceDataFromDB
=
function
(
pageIndex
)
{
initOutputInvoicePagination
();
...
...
@@ -81,24 +98,15 @@
totalPage
:
0
,
}
var
countTotal
=
function
(){
var
totalMoneyAmount
=
0
;
var
totalTaxAmount
=
0
;
_
.
each
(
$scope
.
gridOptions
.
data
,
function
(
x
)
{
totalMoneyAmount
=
totalMoneyAmount
+
parseFloat
(
x
.
hjje
.
replace
(
/,/g
,
""
));
totalTaxAmount
=
totalTaxAmount
+
parseFloat
(
x
.
hjse
.
replace
(
/,/g
,
""
));
})
$scope
.
totalMoneyAmount
=
totalMoneyAmount
.
toLocaleString
();
$scope
.
totalTaxAmount
=
totalTaxAmount
.
toLocaleString
();
}
vatPreviewService
.
queryOutputInvoiceList
(
$scope
.
queryParams
).
success
(
function
(
data
)
{
if
(
data
)
{
var
index
=
1
;
data
.
list
.
forEach
(
function
(
v
)
{
v
.
index
=
index
++
;
v
.
amount
=
PWC
.
round
(
v
.
amount
,
2
);
v
.
taxAmount
=
PWC
.
round
(
v
.
taxAmount
,
2
);
v
.
amount
=
PWC
.
round
(
parseFloat
(
v
.
hjje
.
replace
(
/,/g
,
""
))
,
2
);
v
.
taxAmount
=
PWC
.
round
(
parseFloat
(
v
.
hjse
.
replace
(
/,/g
,
""
))
,
2
);
});
$scope
.
gridOptions
.
data
=
data
.
list
;
$scope
.
queryOutputInvoiceResult
.
pageInfo
=
data
;
...
...
@@ -381,7 +389,7 @@
var
criteria
=
JSON
.
stringify
(
$scope
.
queryParams
);
if
(
browserService
.
isIE
()
||
browserService
.
isEdge
())
criteria
=
encodeURIComponent
(
criteria
);
countTotal
();
loadOutputInvoiceDataFromDB
(
1
);
$
(
'.filter-button'
).
popover
(
"hide"
);
};
...
...
@@ -407,6 +415,7 @@
$scope
.
criteriaList
=
[];
$scope
.
queryParams
.
periodStart
=
startMonth
;
$scope
.
queryParams
.
periodEnd
=
endMonth
;
countTotal
();
loadOutputInvoiceDataFromDB
(
1
);
$
(
'.filter-button'
).
popover
(
"hide"
);
};
...
...
@@ -598,7 +607,7 @@
endMonth
=
result
[
1
][
0
];
$scope
.
queryParams
.
periodStart
=
startMonth
;
$scope
.
queryParams
.
periodEnd
=
endMonth
;
countTotal
();
loadOutputInvoiceDataFromDB
(
1
);
});
...
...
@@ -651,6 +660,7 @@
$scope
.
showPopover
=
showPopover
;
initPeriods
();
initOutputInvoicePagination
();
countTotal
();
loadOutputInvoiceDataFromDB
(
1
);
})();
}
...
...
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