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
767d6509
Commit
767d6509
authored
Apr 11, 2019
by
zhkwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CIT--历史版本,归档,固定资产损失计算,数据预览日记账摘要条件筛选
parent
40f27bbd
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
1177 additions
and
38 deletions
+1177
-38
DateUtils.java
...src/main/java/pwc/taxtech/atms/common/util/DateUtils.java
+2
-2
CitReportController.java
...java/pwc/taxtech/atms/controller/CitReportController.java
+40
-1
CitReportUploadDetailController.java
...tech/atms/controller/CitReportUploadDetailController.java
+60
-0
CitImportExcelServiceImpl.java
.../taxtech/atms/service/impl/CitImportExcelServiceImpl.java
+6
-6
CitReportServiceImpl.java
...a/pwc/taxtech/atms/service/impl/CitReportServiceImpl.java
+34
-5
CitReportUploadService.java
...pwc/taxtech/atms/service/impl/CitReportUploadService.java
+142
-0
ReportUploadService.java
...va/pwc/taxtech/atms/service/impl/ReportUploadService.java
+3
-1
TemplateGroupServiceImpl.java
...c/taxtech/atms/service/impl/TemplateGroupServiceImpl.java
+7
-10
CitSalaryAdvance.java
...c/main/java/pwc/taxtech/atms/entity/CitSalaryAdvance.java
+36
-0
CitSalaryAdvanceExample.java
...java/pwc/taxtech/atms/entity/CitSalaryAdvanceExample.java
+60
-0
ReportUploadMapper.java
...ain/java/pwc/taxtech/atms/vat/dao/ReportUploadMapper.java
+33
-0
ReportUpload.java
...c/main/java/pwc/taxtech/atms/vat/entity/ReportUpload.java
+36
-0
ReportUploadExample.java
...java/pwc/taxtech/atms/vat/entity/ReportUploadExample.java
+60
-0
CitSalaryAdvanceMapper.xml
...resources/pwc/taxtech/atms/dao/CitSalaryAdvanceMapper.xml
+22
-5
CitJournalAdjustExtendsMapper.xml
...axtech/atms/dao/extends/CitJournalAdjustExtendsMapper.xml
+6
-0
CitSalaryAdvanceExtendsMapper.xml
...axtech/atms/dao/extends/CitSalaryAdvanceExtendsMapper.xml
+4
-0
ReportUploadMapper.xml
...resources/pwc/taxtech/atms/vat/dao/ReportUploadMapper.xml
+91
-7
module-part2.js
atms-web/src/main/webapp/Scripts/module-part2.js
+17
-0
cit-preview-journal-merge-search.html
...eview-journal-merge/cit-preview-journal-merge-search.html
+6
-0
cit-preview-journal-merge.ctrl.js
...t-preview-journal-merge/cit-preview-journal-merge.ctrl.js
+2
-0
cit-report-upload-detail.ctrl.js
...t/cit-report-upload-view/cit-report-upload-detail.ctrl.js
+0
-0
cit-report-upload-detail.html
...port/cit-report-upload-view/cit-report-upload-detail.html
+64
-0
cit-report-upload-detail.js
...report/cit-report-upload-view/cit-report-upload-detail.js
+14
-0
cit-report-upload-detail.less
...port/cit-report-upload-view/cit-report-upload-detail.less
+392
-0
cit-report-view.ctrl.js
...pp/app/cit/report/cit-report-view/cit-report-view.ctrl.js
+39
-0
cit-report-view.html
...ebapp/app/cit/report/cit-report-view/cit-report-view.html
+1
-1
No files found.
atms-api/src/main/java/pwc/taxtech/atms/common/util/DateUtils.java
View file @
767d6509
...
...
@@ -171,9 +171,9 @@ public class DateUtils {
* @param dateStr
* @return
*/
public
static
Integer
strToPeriod
Y
M
(
String
dateStr
)
{
public
static
Integer
strToPeriodM
(
String
dateStr
)
{
dateStr
=
dateStr
.
replace
(
"-"
,
""
).
replace
(
" "
,
""
).
replace
(
"年"
,
""
).
replace
(
"月"
,
""
);
Integer
period
=
Integer
.
valueOf
(
dateStr
);
Integer
period
=
Integer
.
valueOf
(
dateStr
.
substring
(
4
,
6
)
);
return
period
;
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/CitReportController.java
View file @
767d6509
package
pwc
.
taxtech
.
atms
.
controller
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.ss.usermodel.Workbook
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
pwc.taxtech.atms.common.message.ErrorMessage
;
import
pwc.taxtech.atms.constant.enums.EnumServiceType
;
import
pwc.taxtech.atms.dpo.ReportDto
;
import
pwc.taxtech.atms.dto.*
;
import
pwc.taxtech.atms.dto.periodReport.PeriodReportDataParam
;
import
pwc.taxtech.atms.dto.vatdto.ManualDataSourceDto
;
import
pwc.taxtech.atms.dto.vatdto.PeriodJobDto
;
import
pwc.taxtech.atms.dto.vatdto.ReportDataDto
;
import
pwc.taxtech.atms.service.impl.CitReportServiceImpl
;
import
pwc.taxtech.atms.service.impl.CitReportUploadService
;
import
pwc.taxtech.atms.service.impl.ReportUploadService
;
import
pwc.taxtech.atms.vat.entity.PeriodJob
;
import
pwc.taxtech.atms.vat.entity.ReportUpload
;
import
pwc.taxtech.atms.vat.service.impl.ReportServiceImpl
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.ByteArrayOutputStream
;
import
java.util.List
;
import
java.util.Optional
;
...
...
@@ -35,9 +42,10 @@ public class CitReportController {
@Autowired
CitReportServiceImpl
reportService
;
@Autowired
CitReportServiceImpl
citReportService
;
@Autowired
CitReportUploadService
citReportUploadService
;
/**
* 获取CIT所有要生成的报表模板相关信息,
...
...
@@ -243,4 +251,34 @@ public class CitReportController {
return
ResponseEntity
.
ok
(
reportService
.
addCellManualDataSource
(
data
,
from
));
}
@RequestMapping
(
value
=
"uploadReportData/{projectId}/{period}"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@ResponseBody
public
OperationResultDto
uploadReportData
(
@RequestBody
PeriodReportDataParam
param
,
@PathVariable
(
name
=
"period"
,
required
=
false
)
Integer
period
,
@PathVariable
(
name
=
"projectId"
,
required
=
false
)
String
projectId
)
{
ByteArrayOutputStream
bout
=
new
ByteArrayOutputStream
();
try
{
Workbook
tWorkbook
=
citReportService
.
generateReportData
(
param
.
getReportIds
(),
projectId
,
period
);
tWorkbook
.
write
(
bout
);
ReportUpload
data
=
new
ReportUpload
();
data
.
setProjectId
(
projectId
);
data
.
setPeriod
(
period
);
citReportUploadService
.
saveData
(
bout
.
toByteArray
(),
data
);
return
OperationResultDto
.
success
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
try
{
if
(
bout
!=
null
)
{
bout
.
close
();
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
return
OperationResultDto
.
error
(
ErrorMessage
.
SystemError
);
}
}
\ No newline at end of file
atms-api/src/main/java/pwc/taxtech/atms/controller/CitReportUploadDetailController.java
0 → 100644
View file @
767d6509
package
pwc
.
taxtech
.
atms
.
controller
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
pwc.taxtech.atms.common.message.ErrorMessage
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.input.CamelPagingResultDto
;
import
pwc.taxtech.atms.dto.reportFileUpload.ReportFileUploadParam
;
import
pwc.taxtech.atms.dto.reportFileUpload.ReportFileUploadResult
;
import
pwc.taxtech.atms.dto.reportUpload.ReportUploadParam
;
import
pwc.taxtech.atms.dto.reportUpload.ReportUploadResult
;
import
pwc.taxtech.atms.exception.ServiceException
;
import
pwc.taxtech.atms.service.impl.CitReportUploadService
;
import
pwc.taxtech.atms.service.impl.ReportFileUploadService
;
import
pwc.taxtech.atms.service.impl.ReportUploadService
;
import
pwc.taxtech.atms.vat.entity.ReportFileUpload
;
import
javax.annotation.Resource
;
import
java.util.List
;
@RestController
@RequestMapping
(
value
=
"api/v1/citReportUploadDetail"
)
public
class
CitReportUploadDetailController
extends
BaseController
{
@Resource
private
CitReportUploadService
citReportUploadService
;
@Resource
private
ReportFileUploadService
reportFileUploadService
;
@PostMapping
(
"queryPage"
)
public
CamelPagingResultDto
<
ReportUploadResult
>
queryPage
(
@RequestBody
ReportUploadParam
param
)
{
return
new
CamelPagingResultDto
<>(
citReportUploadService
.
queryPage
(
param
));
}
@PostMapping
(
"queryFileUpload"
)
public
List
<
ReportFileUploadResult
>
queryFileUpload
(
@RequestBody
ReportFileUploadParam
param
)
{
return
reportFileUploadService
.
queryData
(
param
);
}
@ResponseBody
@PostMapping
(
"saveFileUpload"
)
public
OperationResultDto
saveFileUpload
(
@RequestParam
MultipartFile
file
,
@RequestParam
String
sourceType
,
@RequestParam
String
reportType
,
@RequestParam
String
projectId
,
@RequestParam
Integer
period
)
{
try
{
ReportFileUpload
data
=
new
ReportFileUpload
();
data
.
setPeriod
(
period
);
data
.
setProjectId
(
projectId
);
data
.
setReportType
(
reportType
);
data
.
setSourceType
(
sourceType
);
reportFileUploadService
.
saveData
(
file
,
data
);
return
OperationResultDto
.
success
();
}
catch
(
ServiceException
e
)
{
return
OperationResultDto
.
error
(
e
.
getMessage
());
}
catch
(
Exception
e
)
{
logger
.
error
(
"upload file error."
,
e
);
return
OperationResultDto
.
error
(
ErrorMessage
.
SystemError
);
}
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CitImportExcelServiceImpl.java
View file @
767d6509
...
...
@@ -114,8 +114,8 @@ public class CitImportExcelServiceImpl extends BaseService {
break
;
case
SalaryAdvance:
//目前只有预提费用需要月份
period
=
DateUtils
.
strToPeriodY
M
(
periodDate
);
operationResultDto
=
importSalaryAdvance
(
input
,
orgList
,
fileName
,
period
,
importType
);
Integer
month
=
DateUtils
.
strToPeriod
M
(
periodDate
);
operationResultDto
=
importSalaryAdvance
(
input
,
orgList
,
fileName
,
period
,
month
,
importType
);
break
;
}
return
operationResultDto
;
...
...
@@ -1036,7 +1036,7 @@ public class CitImportExcelServiceImpl extends BaseService {
* @throws InvalidFormatException
* @throws ParseException
*/
public
OperationResultDto
importSalaryAdvance
(
InputStream
inputStream
,
List
<
String
>
orgList
,
String
fileName
,
Integer
period
,
Integer
importType
)
throws
IOException
,
InvalidFormatException
,
ParseException
{
public
OperationResultDto
importSalaryAdvance
(
InputStream
inputStream
,
List
<
String
>
orgList
,
String
fileName
,
Integer
period
,
Integer
month
,
Integer
importType
)
throws
IOException
,
InvalidFormatException
,
ParseException
{
OperationResultDto
<
Object
>
saveResult
=
new
OperationResultDto
<>();
Workbook
workbook
=
fileService
.
getWorkbook
(
inputStream
,
fileName
,
"citTrialBalance"
);
if
(
workbook
==
null
)
{
...
...
@@ -1062,7 +1062,7 @@ public class CitImportExcelServiceImpl extends BaseService {
Map
<
String
,
Integer
>
noProjectMap
=
new
HashMap
();
String
currentUserName
=
authUserHelper
.
getCurrentAuditor
().
get
();
//通过循环来完成sheet获取每一行每一列数据并进行相关逻辑处理
for
(
int
rowNum
=
sheet
.
getFirstRowNum
()
+
2
;
rowNum
<=
sheet
.
getLastRowNum
();
rowNum
++)
{
for
(
int
rowNum
=
sheet
.
getFirstRowNum
()
+
3
;
rowNum
<=
sheet
.
getLastRowNum
();
rowNum
++)
{
DecimalFormat
df
=
new
DecimalFormat
(
"0"
);
//获取该行数据
...
...
@@ -1107,8 +1107,7 @@ public class CitImportExcelServiceImpl extends BaseService {
continue
;
}
//因预提传过来的时间带着月份,所以要算出年份来查询卡片
projectId
=
getProjectId
(
orgId
,
period
/
100
);
projectId
=
getProjectId
(
orgId
,
period
);
if
(
StringUtils
.
isBlank
(
projectId
)){
noProjectMap
.
put
(
sb
.
toString
(),
noProjectMap
.
containsKey
(
sb
.
toString
())?
noProjectMap
.
get
(
sb
.
toString
())+
1
:
1
);
continue
;
...
...
@@ -1125,6 +1124,7 @@ public class CitImportExcelServiceImpl extends BaseService {
citSalaryAdvance
.
setOrganizationId
(
orgId
);
citSalaryAdvance
.
setProjectId
(
projectId
);
citSalaryAdvance
.
setPeriod
(
period
);
citSalaryAdvance
.
setMonth
(
month
);
citSalaryAdvance
.
setCreatedBy
(
currentUserName
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CitReportServiceImpl.java
View file @
767d6509
...
...
@@ -46,6 +46,7 @@ import pwc.taxtech.atms.vat.service.impl.report.functions.FormulaHelper;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.ByteArrayOutputStream
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
java.util.regex.Matcher
;
...
...
@@ -1245,7 +1246,7 @@ public class CitReportServiceImpl extends BaseService {
}
cellData
.
setData
(
sumValue
);
cellData
.
setUpdateTime
(
new
Date
());
int
i
=
periodCellDataMapper
.
updateByPrimaryKeySelective
(
cellData
);
periodCellDataMapper
.
updateByPrimaryKeySelective
(
cellData
);
/*kevin insert */
// TODO: 3/21/2019 需要验证
if
(
sumValue
!=
null
){
...
...
@@ -1476,12 +1477,12 @@ public class CitReportServiceImpl extends BaseService {
BeanUtils
.
copyProperties
(
citAssetsListDto
,
citAssetsList
);
List
<
CitAssetEamMapping
>
citAssetEamMappings
=
assetsListMapper
.
getAssetEamMapping
(
citAssetsList
);
for
(
CitAssetEamMapping
temp
:
citAssetEamMappings
)
{
//计算处置损益
处置/赔偿收入-账面净值(年终剩余价值)
temp
.
setDisposalProfitAndLoss
(
temp
.
get
CompensationSaleAmount
().
subtract
(
temp
.
getYearEndValue
()));
//计算处置损益
账面净值(年终剩余价值)-处置/赔偿收入
temp
.
setDisposalProfitAndLoss
(
temp
.
get
YearEndValue
().
subtract
(
temp
.
getCompensationSaleAmount
()));
//计算资产的税务净值 taxNetValue 原值-累计税务折旧/摊销
temp
.
setTaxNetValue
(
temp
.
getAcquisitionValue
().
subtract
(
temp
.
getTaxToCurrentYearDepreciationAmount
()));
//处置的税收损益
处置/赔偿收入-资产的税务净值
temp
.
setDisposalTaxBenefit
(
temp
.
get
CompensationSaleAmount
().
subtract
(
temp
.
getTaxNetValue
()));
//处置的税收损益
资产的税务净值-处置/赔偿收入
temp
.
setDisposalTaxBenefit
(
temp
.
get
TaxNetValue
().
subtract
(
temp
.
getCompensationSaleAmount
()));
temp
.
setId
(
idService
.
nextId
());
temp
.
setCreateTime
(
null
);
temp
.
setUpdateTime
(
null
);
...
...
@@ -1690,4 +1691,32 @@ public class CitReportServiceImpl extends BaseService {
}
return
citDistributionDto
;
}
public
Workbook
generateReportData
(
List
<
Long
>
reportIds
,
String
projectId
,
Integer
period
)
{
PeriodReportExample
reportExample
=
new
PeriodReportExample
();
reportExample
.
createCriteria
().
andIdIn
(
reportIds
);
List
<
PeriodReport
>
reports
=
periodReportMapper
.
selectByExample
(
reportExample
);
PeriodTemplateExample
example
=
new
PeriodTemplateExample
();
example
.
createCriteria
().
andTemplateIdIn
(
reports
.
stream
().
map
(
m
->
m
.
getTemplateId
()).
collect
(
Collectors
.
toList
())).
andProjectIdEqualTo
(
projectId
).
andPeriodEqualTo
(
period
);
List
<
PeriodTemplate
>
dataList
=
periodTemplateMapper
.
selectByExample
(
example
);
ByteArrayOutputStream
bout
=
new
ByteArrayOutputStream
();
Workbook
tWorkbook
=
null
;
try
{
tWorkbook
=
reportGenerator
.
createWorkBookByPeriodTemplate
(
dataList
);
tWorkbook
.
write
(
bout
);
// FileUpload fileUpload = didiFileUploadService.uploadFile(bout.toByteArray(), "demo.xlsx", FileUploadEnum.BizSource.PERIOD_REPORT_TEMPLATE_UPLOAD.name());
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
try
{
bout
.
close
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
return
tWorkbook
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CitReportUploadService.java
0 → 100644
View file @
767d6509
package
pwc
.
taxtech
.
atms
.
service
.
impl
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.multipart.MultipartFile
;
import
pwc.taxtech.atms.common.AuthUserHelper
;
import
pwc.taxtech.atms.common.CommonUtils
;
import
pwc.taxtech.atms.constant.enums.EnumServiceType
;
import
pwc.taxtech.atms.constant.enums.FileUploadEnum
;
import
pwc.taxtech.atms.dao.ProjectMapper
;
import
pwc.taxtech.atms.dao.UserMapper
;
import
pwc.taxtech.atms.dto.didiFileUpload.DidiFileIUploadParam
;
import
pwc.taxtech.atms.dto.didiFileUpload.DidiFileUploadDetailResult
;
import
pwc.taxtech.atms.dto.reportUpload.ReportUploadParam
;
import
pwc.taxtech.atms.dto.reportUpload.ReportUploadResult
;
import
pwc.taxtech.atms.entity.Project
;
import
pwc.taxtech.atms.entity.User
;
import
pwc.taxtech.atms.vat.dao.ReportUploadMapper
;
import
pwc.taxtech.atms.vat.entity.FileUpload
;
import
pwc.taxtech.atms.vat.entity.ReportUpload
;
import
pwc.taxtech.atms.vat.entity.ReportUploadExample
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
@Service
public
class
CitReportUploadService
extends
BaseService
{
@Resource
private
ReportUploadMapper
reportUploadMapper
;
@Autowired
protected
AuthUserHelper
authUserHelper
;
@Resource
private
UserMapper
userMapper
;
@Resource
private
ProjectMapper
projectMapper
;
@Autowired
DidiFileUploadService
didiFileUploadService
;
public
PageInfo
<
ReportUploadResult
>
queryPage
(
ReportUploadParam
param
)
{
Page
page
=
PageHelper
.
startPage
(
param
.
getPageInfo
().
getPageIndex
(),
param
.
getPageInfo
().
getPageSize
());
ReportUploadExample
example
=
new
ReportUploadExample
();
example
.
createCriteria
().
andProjectIdEqualTo
(
param
.
getProjectId
()).
andPeriodEqualTo
(
param
.
getPeriod
()).
andServiceTypeEqualTo
(
EnumServiceType
.
CIT
.
getCode
());
example
.
setOrderByClause
(
" create_time DESC "
);
List
<
ReportUpload
>
dataList
=
reportUploadMapper
.
selectByExample
(
example
);
DidiFileIUploadParam
fileParam
=
new
DidiFileIUploadParam
();
fileParam
.
setUuids
(
dataList
.
stream
()
.
map
(
o
->
o
.
getFileUploadId
()).
collect
(
Collectors
.
toList
()));
PageInfo
<
DidiFileUploadDetailResult
>
uploadDetail
=
didiFileUploadService
.
queryPage
(
fileParam
);
Map
<
String
,
String
>
urlMap
=
null
;
if
(
CollectionUtils
.
isNotEmpty
(
uploadDetail
.
getList
())){
urlMap
=
uploadDetail
.
getList
().
stream
().
collect
(
Collectors
.
toMap
(
DidiFileUploadDetailResult:
:
getUid
,
didiFileUploadDetailResult
->
didiFileUploadDetailResult
.
getViewHttpUrl
()));
}
List
<
ReportUploadResult
>
resultList
=
new
ArrayList
<
ReportUploadResult
>();
for
(
ReportUpload
data:
dataList
){
ReportUploadResult
result
=
beanUtil
.
copyProperties
(
data
,
new
ReportUploadResult
());
result
.
setFileUrl
(
urlMap
.
get
(
data
.
getFileUploadId
()));
resultList
.
add
(
result
);
}
PageInfo
<
ReportUploadResult
>
pageInfo
=
new
PageInfo
<>(
resultList
);
pageInfo
.
setTotal
(
page
.
getTotal
());
return
pageInfo
;
}
public
void
saveData
(
MultipartFile
file
,
ReportUpload
data
)
{
String
uid
=
authUserHelper
.
getCurrentUserId
();
User
user
=
userMapper
.
selectByPrimaryKey
(
uid
);
data
.
setCreator
(
user
.
getUserName
());
String
fileName
=
""
;
Project
project
=
projectMapper
.
selectByPrimaryKey
(
data
.
getProjectId
());
data
.
setOrgId
(
project
.
getOrganizationId
());
fileName
+=
project
.
getName
();
fileName
+=
"-"
;
fileName
+=
data
.
getPeriod
();
fileName
+=
"-V"
;
ReportUploadExample
example
=
new
ReportUploadExample
();
example
.
createCriteria
().
andProjectIdEqualTo
(
data
.
getProjectId
()).
andPeriodEqualTo
(
data
.
getPeriod
());
example
.
setOrderByClause
(
"version desc"
);
List
<
ReportUpload
>
dataList
=
reportUploadMapper
.
selectByExample
(
example
);
if
(
CollectionUtils
.
isNotEmpty
(
dataList
))
{
fileName
+=
(
dataList
.
get
(
0
).
getVersion
()
+
1
);
data
.
setVersion
(
dataList
.
get
(
0
).
getVersion
()
+
1
);
}
else
{
fileName
+=
1
;
data
.
setVersion
(
1
);
}
fileName
+=
".xlsx"
;
data
.
setReportName
(
fileName
);
FileUpload
fileUpload
=
didiFileUploadService
.
uploadFile
(
file
,
fileName
,
FileUploadEnum
.
BizSource
.
REPORT_UPLOAD
.
name
());
data
.
setFileUploadId
(
fileUpload
.
getUid
());
data
.
setUid
(
CommonUtils
.
getUUID
());
data
.
setCreateTime
(
new
Date
());
reportUploadMapper
.
insert
(
data
);
}
public
void
saveData
(
byte
[]
bytes
,
ReportUpload
data
)
{
String
uid
=
authUserHelper
.
getCurrentUserId
();
User
user
=
userMapper
.
selectByPrimaryKey
(
uid
);
data
.
setCreator
(
user
.
getUserName
());
String
fileName
=
""
;
Project
project
=
projectMapper
.
selectByPrimaryKey
(
data
.
getProjectId
());
data
.
setOrgId
(
project
.
getOrganizationId
());
String
period
=
""
+
project
.
getYear
()+(
data
.
getPeriod
()>
9
?
data
.
getPeriod
():(
"0"
+
data
.
getPeriod
()));
data
.
setPeriod
(
Integer
.
valueOf
(
period
));
fileName
+=
project
.
getName
();
fileName
+=
"-"
;
fileName
+=
data
.
getPeriod
();
fileName
+=
"-V"
;
ReportUploadExample
example
=
new
ReportUploadExample
();
example
.
createCriteria
().
andProjectIdEqualTo
(
data
.
getProjectId
()).
andPeriodEqualTo
(
data
.
getPeriod
());
example
.
setOrderByClause
(
"version desc"
);
List
<
ReportUpload
>
dataList
=
reportUploadMapper
.
selectByExample
(
example
);
if
(
CollectionUtils
.
isNotEmpty
(
dataList
))
{
fileName
+=
(
dataList
.
get
(
0
).
getVersion
()
+
1
);
data
.
setVersion
(
dataList
.
get
(
0
).
getVersion
()
+
1
);
}
else
{
fileName
+=
1
;
data
.
setVersion
(
1
);
}
fileName
+=
".xlsx"
;
data
.
setReportName
(
fileName
);
FileUpload
fileUpload
=
didiFileUploadService
.
uploadFile
(
bytes
,
fileName
,
FileUploadEnum
.
BizSource
.
REPORT_UPLOAD
.
name
());
data
.
setFileUploadId
(
fileUpload
.
getUid
());
data
.
setUid
(
CommonUtils
.
getUUID
());
data
.
setCreateTime
(
new
Date
());
data
.
setServiceType
(
EnumServiceType
.
CIT
.
getCode
());
reportUploadMapper
.
insert
(
data
);
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/ReportUploadService.java
View file @
767d6509
...
...
@@ -9,6 +9,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.web.multipart.MultipartFile
;
import
pwc.taxtech.atms.common.AuthUserHelper
;
import
pwc.taxtech.atms.common.CommonUtils
;
import
pwc.taxtech.atms.constant.enums.EnumServiceType
;
import
pwc.taxtech.atms.constant.enums.FileUploadEnum
;
import
pwc.taxtech.atms.dao.ProjectMapper
;
import
pwc.taxtech.atms.dao.UserMapper
;
...
...
@@ -52,7 +53,7 @@ public class ReportUploadService extends BaseService {
public
PageInfo
<
ReportUploadResult
>
queryPage
(
ReportUploadParam
param
)
{
Page
page
=
PageHelper
.
startPage
(
param
.
getPageInfo
().
getPageIndex
(),
param
.
getPageInfo
().
getPageSize
());
ReportUploadExample
example
=
new
ReportUploadExample
();
example
.
createCriteria
().
andProjectIdEqualTo
(
param
.
getProjectId
()).
andPeriodEqualTo
(
param
.
getPeriod
());
example
.
createCriteria
().
andProjectIdEqualTo
(
param
.
getProjectId
()).
andPeriodEqualTo
(
param
.
getPeriod
())
.
andServiceTypeEqualTo
(
EnumServiceType
.
VAT
.
getCode
())
;
example
.
setOrderByClause
(
" create_time DESC "
);
List
<
ReportUpload
>
dataList
=
reportUploadMapper
.
selectByExample
(
example
);
DidiFileIUploadParam
fileParam
=
new
DidiFileIUploadParam
();
...
...
@@ -135,6 +136,7 @@ public class ReportUploadService extends BaseService {
data
.
setFileUploadId
(
fileUpload
.
getUid
());
data
.
setUid
(
CommonUtils
.
getUUID
());
data
.
setCreateTime
(
new
Date
());
data
.
setServiceType
(
EnumServiceType
.
VAT
.
getCode
());
reportUploadMapper
.
insert
(
data
);
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/TemplateGroupServiceImpl.java
View file @
767d6509
...
...
@@ -397,11 +397,10 @@ public class TemplateGroupServiceImpl extends AbstractService {
config
.
setUpdateTime
(
now
);
config
.
setUpdateBy
(
authUserHelper
.
getCurrentUserId
());
cellTemplateConfigList
.
add
(
config
);
//只允许单元格内容为${KeyIn}的才允许手工收入,所以此处注释 update by zhikai.z.wei start
// if (allowManual) {
// addManualConfig(cellTemplate, template, cell, now, cellTemplateConfigList);
// }
//只允许单元格内容为${KeyIn}的才允许手工收入,所以此处注释 update by zhikai.z.wei end
if
(
allowManual
)
{
addManualConfig
(
cellTemplate
,
template
,
cell
,
now
,
cellTemplateConfigList
);
}
PeriodDataSource
pds
=
new
PeriodDataSource
();
pds
.
setAmount
(
BigDecimal
.
ZERO
);
pds
.
setUpdateBy
(
"Admin"
);
...
...
@@ -557,11 +556,9 @@ public class TemplateGroupServiceImpl extends AbstractService {
config
.
setUpdateBy
(
authUserHelper
.
getCurrentUserId
());
cellTemplateConfigList
.
add
(
config
);
//noinspection Duplicates
//只允许单元格内容为${KeyIn}的才允许手工收入,所以此处注释 update by zhikai.z.wei start
// if (allowManual) {
// addManualConfig(cellTemplate, template, cell, now, cellTemplateConfigList);
// }
//只允许单元格内容为${KeyIn}的才允许手工收入,所以此处注释 update by zhikai.z.wei end
if
(
allowManual
)
{
addManualConfig
(
cellTemplate
,
template
,
cell
,
now
,
cellTemplateConfigList
);
}
PeriodDataSource
pds
=
new
PeriodDataSource
();
pds
.
setAmount
(
BigDecimal
.
ZERO
);
pds
.
setUpdateBy
(
"Admin"
);
...
...
atms-dao/src/main/java/pwc/taxtech/atms/entity/CitSalaryAdvance.java
View file @
767d6509
...
...
@@ -540,6 +540,17 @@ public class CitSalaryAdvance extends BaseEntity implements Serializable {
*/
private
Date
updateTime
;
/**
* Database Column Remarks:
* 月份期间
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column cit_salary_advance.month
*
* @mbg.generated
*/
private
Integer
month
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table cit_salary_advance
...
...
@@ -1700,6 +1711,30 @@ public class CitSalaryAdvance extends BaseEntity implements Serializable {
this
.
updateTime
=
updateTime
;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column cit_salary_advance.month
*
* @return the value of cit_salary_advance.month
*
* @mbg.generated
*/
public
Integer
getMonth
()
{
return
month
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column cit_salary_advance.month
*
* @param month the value for cit_salary_advance.month
*
* @mbg.generated
*/
public
void
setMonth
(
Integer
month
)
{
this
.
month
=
month
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table cit_salary_advance
...
...
@@ -1760,6 +1795,7 @@ public class CitSalaryAdvance extends BaseEntity implements Serializable {
sb
.
append
(
", updatedBy="
).
append
(
updatedBy
);
sb
.
append
(
", createTime="
).
append
(
createTime
);
sb
.
append
(
", updateTime="
).
append
(
updateTime
);
sb
.
append
(
", month="
).
append
(
month
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
...
...
atms-dao/src/main/java/pwc/taxtech/atms/entity/CitSalaryAdvanceExample.java
View file @
767d6509
...
...
@@ -3405,6 +3405,66 @@ public class CitSalaryAdvanceExample {
addCriterion
(
"update_time not between"
,
value1
,
value2
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMonthIsNull
()
{
addCriterion
(
"month is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMonthIsNotNull
()
{
addCriterion
(
"month is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMonthEqualTo
(
Integer
value
)
{
addCriterion
(
"month ="
,
value
,
"month"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMonthNotEqualTo
(
Integer
value
)
{
addCriterion
(
"month <>"
,
value
,
"month"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMonthGreaterThan
(
Integer
value
)
{
addCriterion
(
"month >"
,
value
,
"month"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMonthGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"month >="
,
value
,
"month"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMonthLessThan
(
Integer
value
)
{
addCriterion
(
"month <"
,
value
,
"month"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMonthLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"month <="
,
value
,
"month"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMonthIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"month in"
,
values
,
"month"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMonthNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"month not in"
,
values
,
"month"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMonthBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"month between"
,
value1
,
value2
,
"month"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMonthNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"month not between"
,
value1
,
value2
,
"month"
);
return
(
Criteria
)
this
;
}
}
/**
...
...
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/ReportUploadMapper.java
View file @
767d6509
...
...
@@ -26,6 +26,14 @@ public interface ReportUploadMapper extends MyVatMapper {
*/
int
deleteByExample
(
ReportUploadExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table report_upload
*
* @mbg.generated
*/
int
deleteByPrimaryKey
(
String
uid
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table report_upload
...
...
@@ -58,6 +66,14 @@ public interface ReportUploadMapper extends MyVatMapper {
*/
List
<
ReportUpload
>
selectByExample
(
ReportUploadExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table report_upload
*
* @mbg.generated
*/
ReportUpload
selectByPrimaryKey
(
String
uid
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table report_upload
...
...
@@ -73,4 +89,20 @@ public interface ReportUploadMapper extends MyVatMapper {
* @mbg.generated
*/
int
updateByExample
(
@Param
(
"record"
)
ReportUpload
record
,
@Param
(
"example"
)
ReportUploadExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table report_upload
*
* @mbg.generated
*/
int
updateByPrimaryKeySelective
(
ReportUpload
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table report_upload
*
* @mbg.generated
*/
int
updateByPrimaryKey
(
ReportUpload
record
);
}
\ No newline at end of file
atms-dao/src/main/java/pwc/taxtech/atms/vat/entity/ReportUpload.java
View file @
767d6509
...
...
@@ -109,6 +109,17 @@ public class ReportUpload extends BaseEntity implements Serializable {
*/
private
String
fileUploadId
;
/**
* Database Column Remarks:
* 税务类型(2代表VAT,6代表CIT)
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column report_upload.service_type
*
* @mbg.generated
*/
private
Integer
serviceType
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table report_upload
...
...
@@ -333,6 +344,30 @@ public class ReportUpload extends BaseEntity implements Serializable {
this
.
fileUploadId
=
fileUploadId
==
null
?
null
:
fileUploadId
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column report_upload.service_type
*
* @return the value of report_upload.service_type
*
* @mbg.generated
*/
public
Integer
getServiceType
()
{
return
serviceType
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column report_upload.service_type
*
* @param serviceType the value for report_upload.service_type
*
* @mbg.generated
*/
public
void
setServiceType
(
Integer
serviceType
)
{
this
.
serviceType
=
serviceType
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table report_upload
...
...
@@ -354,6 +389,7 @@ public class ReportUpload extends BaseEntity implements Serializable {
sb
.
append
(
", reportName="
).
append
(
reportName
);
sb
.
append
(
", version="
).
append
(
version
);
sb
.
append
(
", fileUploadId="
).
append
(
fileUploadId
);
sb
.
append
(
", serviceType="
).
append
(
serviceType
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
...
...
atms-dao/src/main/java/pwc/taxtech/atms/vat/entity/ReportUploadExample.java
View file @
767d6509
...
...
@@ -794,6 +794,66 @@ public class ReportUploadExample {
addCriterion
(
"file_upload_id not between"
,
value1
,
value2
,
"fileUploadId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andServiceTypeIsNull
()
{
addCriterion
(
"service_type is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andServiceTypeIsNotNull
()
{
addCriterion
(
"service_type is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andServiceTypeEqualTo
(
Integer
value
)
{
addCriterion
(
"service_type ="
,
value
,
"serviceType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andServiceTypeNotEqualTo
(
Integer
value
)
{
addCriterion
(
"service_type <>"
,
value
,
"serviceType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andServiceTypeGreaterThan
(
Integer
value
)
{
addCriterion
(
"service_type >"
,
value
,
"serviceType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andServiceTypeGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"service_type >="
,
value
,
"serviceType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andServiceTypeLessThan
(
Integer
value
)
{
addCriterion
(
"service_type <"
,
value
,
"serviceType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andServiceTypeLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"service_type <="
,
value
,
"serviceType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andServiceTypeIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"service_type in"
,
values
,
"serviceType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andServiceTypeNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"service_type not in"
,
values
,
"serviceType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andServiceTypeBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"service_type between"
,
value1
,
value2
,
"serviceType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andServiceTypeNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"service_type not between"
,
value1
,
value2
,
"serviceType"
);
return
(
Criteria
)
this
;
}
}
/**
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/dao/CitSalaryAdvanceMapper.xml
View file @
767d6509
...
...
@@ -54,6 +54,7 @@
<result
column=
"updated_by"
jdbcType=
"VARCHAR"
property=
"updatedBy"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"month"
jdbcType=
"INTEGER"
property=
"month"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<!--
...
...
@@ -134,7 +135,7 @@
subject_description, auxiliary_subject, auxiliary_subject_description, profit_center,
profit_center_description, product, product_description, project, project_description,
company, company_description, segment1, segment1_description, segment2, segment2_description,
created_by, updated_by, create_time, update_time
created_by, updated_by, create_time, update_time
, month
</sql>
<select
id=
"selectByExample"
parameterType=
"pwc.taxtech.atms.entity.CitSalaryAdvanceExample"
resultMap=
"BaseResultMap"
>
<!--
...
...
@@ -203,7 +204,8 @@
project_description, company, company_description,
segment1, segment1_description, segment2,
segment2_description, created_by, updated_by,
create_time, update_time)
create_time, update_time, month
)
values (#{id,jdbcType=BIGINT}, #{organizationId,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR},
#{period,jdbcType=INTEGER}, #{source,jdbcType=VARCHAR}, #{poNo,jdbcType=VARCHAR},
#{poRow,jdbcType=VARCHAR}, #{poCreateTime,jdbcType=TIMESTAMP}, #{ladingBillPerson,jdbcType=VARCHAR},
...
...
@@ -220,7 +222,8 @@
#{projectDescription,jdbcType=VARCHAR}, #{company,jdbcType=VARCHAR}, #{companyDescription,jdbcType=VARCHAR},
#{segment1,jdbcType=VARCHAR}, #{segment1Description,jdbcType=VARCHAR}, #{segment2,jdbcType=VARCHAR},
#{segment2Description,jdbcType=VARCHAR}, #{createdBy,jdbcType=VARCHAR}, #{updatedBy,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{month,jdbcType=INTEGER}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"pwc.taxtech.atms.entity.CitSalaryAdvance"
>
<!--
...
...
@@ -373,6 +376,9 @@
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"month != null"
>
month,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
...
...
@@ -519,6 +525,9 @@
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"month != null"
>
#{month,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"pwc.taxtech.atms.entity.CitSalaryAdvanceExample"
resultType=
"java.lang.Long"
>
...
...
@@ -682,6 +691,9 @@
<if
test=
"record.updateTime != null"
>
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.month != null"
>
month = #{record.month,jdbcType=INTEGER},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
...
@@ -740,7 +752,8 @@
created_by = #{record.createdBy,jdbcType=VARCHAR},
updated_by = #{record.updatedBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
month = #{record.month,jdbcType=INTEGER}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
...
...
@@ -893,6 +906,9 @@
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"month != null"
>
month = #{month,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
...
...
@@ -948,7 +964,8 @@
created_by = #{createdBy,jdbcType=VARCHAR},
updated_by = #{updatedBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
update_time = #{updateTime,jdbcType=TIMESTAMP},
month = #{month,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>
<select
id=
"selectByExampleWithRowbounds"
parameterType=
"pwc.taxtech.atms.entity.CitSalaryAdvanceExample"
resultMap=
"BaseResultMap"
>
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/dao/extends/CitJournalAdjustExtendsMapper.xml
View file @
767d6509
...
...
@@ -364,6 +364,9 @@
<if
test=
"subjectName != null and subjectName != ''"
>
and subject_name LIKE CONCAT('%' ,#{subjectName},'%')
</if>
<if
test=
"description != null and description != ''"
>
and description LIKE CONCAT('%' ,#{description},'%')
</if>
<if
test=
"periodStart!=null"
>
AND account_period >= #{periodStart,jdbcType=INTEGER}
</if>
...
...
@@ -393,6 +396,9 @@
<if
test=
"subjectName != null and subjectName != ''"
>
and segment3_name LIKE CONCAT('%' ,#{segment3_name},'%')
</if>
<if
test=
"description != null and description != ''"
>
and description LIKE CONCAT('%' ,#{description},'%')
</if>
<if
test=
"periodStart!=null"
>
AND period
>
= #{periodStart,jdbcType=INTEGER}
</if>
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/dao/extends/CitSalaryAdvanceExtendsMapper.xml
View file @
767d6509
...
...
@@ -218,6 +218,10 @@
<when
test=
"item.updateTime != null"
>
#{item.updateTime,jdbcType=TIMESTAMP},
</when>
<otherwise>
CURRENT_TIMESTAMP,
</otherwise>
</choose>
<choose>
<when
test=
"item.month != null"
>
#{item.month,jdbcType=INTEGER},
</when>
<otherwise>
0,
</otherwise>
</choose>
</trim>
</foreach>
;
SELECT 1 FROM DUAL;
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/vat/dao/ReportUploadMapper.xml
View file @
767d6509
...
...
@@ -6,7 +6,7 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<
result
column=
"uid"
jdbcType=
"VARCHAR"
property=
"uid"
/>
<
id
column=
"uid"
jdbcType=
"VARCHAR"
property=
"uid"
/>
<result
column=
"org_id"
jdbcType=
"VARCHAR"
property=
"orgId"
/>
<result
column=
"project_id"
jdbcType=
"VARCHAR"
property=
"projectId"
/>
<result
column=
"period"
jdbcType=
"INTEGER"
property=
"period"
/>
...
...
@@ -15,6 +15,7 @@
<result
column=
"report_name"
jdbcType=
"VARCHAR"
property=
"reportName"
/>
<result
column=
"version"
jdbcType=
"INTEGER"
property=
"version"
/>
<result
column=
"file_upload_id"
jdbcType=
"VARCHAR"
property=
"fileUploadId"
/>
<result
column=
"service_type"
jdbcType=
"INTEGER"
property=
"serviceType"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<!--
...
...
@@ -87,7 +88,8 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
`uid`, org_id, project_id, period, creator, create_time, report_name, version, file_upload_id
`uid`, org_id, project_id, period, creator, create_time, report_name, version, file_upload_id,
service_type
</sql>
<select
id=
"selectByExample"
parameterType=
"pwc.taxtech.atms.vat.entity.ReportUploadExample"
resultMap=
"BaseResultMap"
>
<!--
...
...
@@ -107,6 +109,24 @@
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include
refid=
"Base_Column_List"
/>
from report_upload
where `uid` = #{uid,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from report_upload
where `uid` = #{uid,jdbcType=VARCHAR}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"pwc.taxtech.atms.vat.entity.ReportUploadExample"
>
<!--
WARNING - @mbg.generated
...
...
@@ -124,12 +144,12 @@
-->
insert into report_upload (`uid`, org_id, project_id,
period, creator, create_time,
report_name, version, file_upload_id
)
report_name, version, file_upload_id
,
service_type
)
values (#{uid,jdbcType=VARCHAR}, #{orgId,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR},
#{period,jdbcType=INTEGER}, #{creator,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{reportName,jdbcType=VARCHAR}, #{version,jdbcType=INTEGER}, #{fileUploadId,jdbcType=VARCHAR}
)
#{reportName,jdbcType=VARCHAR}, #{version,jdbcType=INTEGER}, #{fileUploadId,jdbcType=VARCHAR}
,
#{serviceType,jdbcType=INTEGER}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"pwc.taxtech.atms.vat.entity.ReportUpload"
>
<!--
...
...
@@ -165,6 +185,9 @@
<if
test=
"fileUploadId != null"
>
file_upload_id,
</if>
<if
test=
"serviceType != null"
>
service_type,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"uid != null"
>
...
...
@@ -194,6 +217,9 @@
<if
test=
"fileUploadId != null"
>
#{fileUploadId,jdbcType=VARCHAR},
</if>
<if
test=
"serviceType != null"
>
#{serviceType,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"pwc.taxtech.atms.vat.entity.ReportUploadExample"
resultType=
"java.lang.Long"
>
...
...
@@ -240,6 +266,9 @@
<if
test=
"record.fileUploadId != null"
>
file_upload_id = #{record.fileUploadId,jdbcType=VARCHAR},
</if>
<if
test=
"record.serviceType != null"
>
service_type = #{record.serviceType,jdbcType=INTEGER},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
...
@@ -259,11 +288,66 @@
create_time = #{record.createTime,jdbcType=TIMESTAMP},
report_name = #{record.reportName,jdbcType=VARCHAR},
version = #{record.version,jdbcType=INTEGER},
file_upload_id = #{record.fileUploadId,jdbcType=VARCHAR}
file_upload_id = #{record.fileUploadId,jdbcType=VARCHAR},
service_type = #{record.serviceType,jdbcType=INTEGER}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"pwc.taxtech.atms.vat.entity.ReportUpload"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update report_upload
<set>
<if
test=
"orgId != null"
>
org_id = #{orgId,jdbcType=VARCHAR},
</if>
<if
test=
"projectId != null"
>
project_id = #{projectId,jdbcType=VARCHAR},
</if>
<if
test=
"period != null"
>
period = #{period,jdbcType=INTEGER},
</if>
<if
test=
"creator != null"
>
creator = #{creator,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"reportName != null"
>
report_name = #{reportName,jdbcType=VARCHAR},
</if>
<if
test=
"version != null"
>
version = #{version,jdbcType=INTEGER},
</if>
<if
test=
"fileUploadId != null"
>
file_upload_id = #{fileUploadId,jdbcType=VARCHAR},
</if>
<if
test=
"serviceType != null"
>
service_type = #{serviceType,jdbcType=INTEGER},
</if>
</set>
where `uid` = #{uid,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"pwc.taxtech.atms.vat.entity.ReportUpload"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update report_upload
set org_id = #{orgId,jdbcType=VARCHAR},
project_id = #{projectId,jdbcType=VARCHAR},
period = #{period,jdbcType=INTEGER},
creator = #{creator,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
report_name = #{reportName,jdbcType=VARCHAR},
version = #{version,jdbcType=INTEGER},
file_upload_id = #{fileUploadId,jdbcType=VARCHAR},
service_type = #{serviceType,jdbcType=INTEGER}
where `uid` = #{uid,jdbcType=VARCHAR}
</update>
<select
id=
"selectByExampleWithRowbounds"
parameterType=
"pwc.taxtech.atms.vat.entity.ReportUploadExample"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
...
...
atms-web/src/main/webapp/Scripts/module-part2.js
View file @
767d6509
...
...
@@ -1100,6 +1100,23 @@ init-row="initRow" init-col="initCol" service-type="\'6\'" is-document-list="tru
sticky
:
false
});
$stateProvider
.
state
({
name
:
'cit.generateReport.reportUploadView'
,
url
:
'/reportUploadView'
,
views
:
{
'@cit.generateReport'
:
{
controller
:
[
'$scope'
,
'$stateParams'
,
'appTranslation'
,
function
(
$scope
,
$stateParams
,
appTranslation
)
{
appTranslation
.
load
([
appTranslation
.
cit
]);
}],
template
:
'<cit-report-upload-detail></cit-report-upload-detail>'
,
}
},
resolve
:
scriptDependencyProvider
.
createDependenciesMap
(
scriptDependencyProvider
.
cit
),
deepStateRedirect
:
true
,
sticky
:
true
});
// TODO: DCH Demo
$stateProvider
.
state
({
name
:
'cit.generateReport.performOCR'
,
...
...
atms-web/src/main/webapp/app/cit/preview/cit-preview-journal-merge/cit-preview-journal-merge-search.html
View file @
767d6509
...
...
@@ -15,6 +15,12 @@
<input
class=
"form-control input-width-middle"
type=
"text"
id=
"subjectName"
ng-model=
"queryParams.subjectName"
/>
</td>
</tr>
<tr>
<td>
<span
translate=
"Summary"
></span>
<input
class=
"form-control input-width-middle"
type=
"text"
id=
"description"
ng-model=
"queryParams.description"
/>
</td>
</tr>
<tr
style=
"display: none"
>
<td>
<span
translate=
"orgCode"
></span>
...
...
atms-web/src/main/webapp/app/cit/preview/cit-preview-journal-merge/cit-preview-journal-merge.ctrl.js
View file @
767d6509
...
...
@@ -41,6 +41,7 @@
periodEnd
:
''
,
subjectCode
:
null
,
subjectName
:
null
,
description
:
null
,
orgCode
:
null
,
orgName
:
null
,
documentDate
:
null
,
...
...
@@ -93,6 +94,7 @@
periodEnd
:
''
,
subjectCode
:
null
,
subjectName
:
null
,
description
:
null
,
orgCode
:
null
,
orgName
:
null
,
documentDate
:
null
,
...
...
atms-web/src/main/webapp/app/cit/report/cit-report-upload-view/cit-report-upload-detail.ctrl.js
0 → 100644
View file @
767d6509
This diff is collapsed.
Click to expand it.
atms-web/src/main/webapp/app/cit/report/cit-report-upload-view/cit-report-upload-detail.html
0 → 100644
View file @
767d6509
<div
class=
"cit-report-upload-detail"
>
<div
class=
"header-title"
>
<div
style=
"display:inline-block"
><span
class=
"title-name"
>
{{'ReportUploadDetail' | translate }}
</span></div>
</div>
<div
class=
"content-container"
style=
"height: 60%"
>
<div
class=
"body"
>
<div
class=
"grid-container"
>
<div
id=
"invoiceGridContainer"
dx-data-grid=
"reportOneGridOptions"
>
<div
data-options=
"dxTemplate:{ name:'editCellTemplate' }"
>
</div>
</div>
</div>
<div
class=
"page-footer"
>
<ack-pagination
page-options=
"pagingOptions"
refresh-table=
"refreshGrid()"
></ack-pagination>
</div>
</div>
</div>
<div
style=
"height: 40%"
>
<div
class=
"content-container-other"
style=
"float:left;width:49%;"
>
<div
class=
"body"
>
<div
class=
"grid-container"
>
<div
id=
"invoiceGridContainer1"
dx-data-grid=
"reportTwoGridOptions"
>
<div
data-options=
"dxTemplate:{ name:'editCellTemplate' }"
>
</div>
</div>
</div>
</div>
</div>
<div
class=
"content-container-other"
style=
"float:right;width:49%;"
>
<div
class=
"body"
>
<div
class=
"grid-container"
>
<div
id=
"invoiceGridContainer2"
dx-data-grid=
"reportThreeGridOptions"
>
<div
data-options=
"dxTemplate:{ name:'editCellTemplate' }"
>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
atms-web/src/main/webapp/app/cit/report/cit-report-upload-view/cit-report-upload-detail.js
0 → 100644
View file @
767d6509
citModule
.
directive
(
'citReportUploadDetail'
,
[
'$log'
,
function
(
$log
)
{
$log
.
debug
(
'citReportUploadDetail.ctor()...'
);
return
{
restrict
:
'E'
,
templateUrl
:
'app/cit/report/cit-report-upload-view/cit-report-upload-detail.html'
+
'?_='
+
Math
.
random
(),
scope
:
{},
controller
:
'citReportUploadDetailController'
}
}
]);
\ No newline at end of file
atms-web/src/main/webapp/app/cit/report/cit-report-upload-view/cit-report-upload-detail.less
0 → 100644
View file @
767d6509
@border-color: #d4d4d4;
@margin-left: 60px;
@container-width: 970px;
@control-width: 120px;
//sharing
.header {
padding: 15px;
img {
margin-top: 3px;
}
.search-panel {
border: 1px solid #CDCDCD;
border-radius: 5px;
padding: 5px;
.row {
margin: 10px 0;
.filter-item {
display: inline-block;
vertical-align: middle;
height: 32px;
}
.fileter-label {
text-align: right;
height: 32px;
padding-top: 5px;
}
.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
padding-left: 0;
}
.invoice-btn {
min-width: 90px;
height: 34px;
}
}
.table-bottom {
margin-bottom: 0px !important;
.lbl-name {
word-break: keep-all;
}
td {
vertical-align: middle;
}
}
}
}
.table-bottom {
margin-bottom: 0px !important;
.lbl-name {
word-break: keep-all;
}
td {
vertical-align: middle;
}
}
.red-color {
color: #d04a02;
/*vertical-align: middle;*/
}
.dx-widget {
font-size: 13px;
}
//share
.header-title {
padding: 10px;
.sub-title {
font-family: "Microsoft YaHei";
font-weight: 400;
font-size: 12px;
color: rgb(153, 153, 153);
}
.title-name {
font-family: "Microsoft YaHei Bold", "Microsoft YaHei Regular", "Microsoft YaHei";
font-weight: 700;
font-style: normal;
}
}
.inline-block {
display: inline-block;
.left-side {
display: inline-block;
}
.right-side {
float: right;
display: inline-block;
}
}
.invoice-btn {
min-width: 80px;
height: 28px;
margin-right: 10px;
font-weight: normal;
font-size: 13px;
font-family: 'Microsoft YaHei';
}
.invoice-card {
width: 120px;
height: 130px;
border: 1px dashed @border-color;
border: 1px dashed rgba(0, 0, 0, 0.2);
border-radius: 5px;
background-color: #fff; /*#fbfbfb;*/
text-align: center;
cursor: pointer;
float: left;
margin: 10px;
position: relative;
&:hover {
background-color: #fff !important;
box-shadow: #a06748 1px 1px;
}
//卡片顶部的绝对定位
.dx-checkbox-container {
position: absolute;
left: 59px;
top: -8px;
}
}
.span-btn {
color: #6699CC;
padding: 0px 4px;
cursor: pointer;
font-size: 12px;
}
.borderless td, .borderless th {
border: none !important;
vertical-align: middle !important;
}
.page-footer {
display: inline-block;
float: right;
/*padding-right: 20px;*/
}
.invoice-table-dialog {
.modal-dialog {
min-width: 650px;
.modal-title {
color: red;
}
}
}
.invoiceNumber-link {
cursor: pointer;
/*color:#6699cc;*/
}
.cit-report-upload-detail {
height: 100% !important;
padding-top: 0px !important;
position: relative;
font-size: 13px;
.period-picker {
width: 150px;
border: 1px solid #c7c5c0;
display: inline-block;
line-height: 20px;
margin-top: 7px;
}
.imp-subheader {
display: inline-block;
font-size: 15px;
height: 30px;
line-height: 30px;
vertical-align: middle;
border: none;
select {
appearance: none;
-moz-appearance: none;
-webkit-appearance: none;
background: transparent;
}
}
.dx-datagrid-group-closed:before {
/* font-family: "ui-grid"; */
font-style: normal;
font-weight: normal;
speak: none;
display: inline-block;
text-decoration: inherit;
width: 1em;
margin-right: .2em;
text-align: center;
font-variant: normal;
text-transform: none;
line-height: 1em;
margin-left: .2em;
content: inherit!important;
}
.header-title {
padding: 10px;
.title-name {
font-family: "Microsoft YaHei Bold", "Microsoft YaHei Regular", "Microsoft YaHei";
font-weight: 700;
font-style: normal;
}
}
.custom-control {
width: @control-width !important;
height: 25px;
line-height: 25px;
}
.btn-search {
width: @control-width !important;
}
.content-container {
height: calc(~'100% - 40px');
position: relative;
.body {
.buttom-row {
padding: 15px;
display: inline-block;
width: 100%;
.left-side {
display: inline-block;
/*padding-left:5px;*/
.select-title {
margin-left: 20px;
}
.select-number {
padding: 0 1px;
color: red;
}
}
.right-side {
float: right;
display: inline-block;
/*padding-right:5px;*/
.btn {
margin-left: 20px;
}
}
}
.grid-container {
padding: 0px 15px;
/*height: 350px;*/
/*height:100%;*/
#invoiceGridContainer {
max-height: 100%;
}
.dx-datagrid-rowsview .dx-row > .dx-master-detail-cell {
padding: 0px !important;
}
.dx-datagrid-nowrap.dx-datagrid-headers .dx-header-row > td > .dx-datagrid-text-content {
white-space: normal !important;
}
.internal-grid-container {
padding: 10px 10px 10px 0;
& > div:first-child {
padding: 0 0 5px 10px;
font-size: 13px;
/*font-weight: bold;*/
}
}
}
}
}
.content-container-other {
height: calc(~'100% - 40px');
position: relative;
.body {
.buttom-row {
padding: 15px;
display: inline-block;
width: 100%;
.left-side {
display: inline-block;
/*padding-left:5px;*/
.select-title {
margin-left: 20px;
}
.select-number {
padding: 0 1px;
color: red;
}
}
.right-side {
float: right;
display: inline-block;
/*padding-right:5px;*/
.btn {
margin-left: 20px;
}
}
}
.grid-container {
padding: 0px 15px;
/*height: 350px;*/
/*height:100%;*/
#invoiceGridContainer {
max-height: 100%;
}
.dx-datagrid-rowsview .dx-row > .dx-master-detail-cell {
padding: 0px !important;
}
.dx-datagrid-nowrap.dx-datagrid-headers .dx-header-row > td > .dx-datagrid-text-content {
white-space: normal !important;
}
.internal-grid-container {
padding: 10px 10px 10px 0;
& > div:first-child {
padding: 0 0 5px 10px;
font-size: 13px;
/*font-weight: bold;*/
}
}
}
}
}
.importVerifyInvoiceModal {
.modal-dialog {
height: 200px;
width: 610px;
}
.modal-footer {
text-align: left;
}
}
}
atms-web/src/main/webapp/app/cit/report/cit-report-view/cit-report-view.ctrl.js
View file @
767d6509
...
...
@@ -916,6 +916,14 @@
//打开导出文件弹出框
$scope
.
openExportPop
=
function
(
evenType
)
{
$scope
.
evenType
=
evenType
;
if
(
'export'
==
$scope
.
evenType
)
{
$scope
.
viewTitle
=
$translate
.
instant
(
'SelectExportReport'
);
}
if
(
'upload'
==
$scope
.
evenType
)
{
$scope
.
viewTitle
=
$translate
.
instant
(
'SelectUploadReport'
);
}
var
grp
=
_
.
find
(
$scope
.
$parent
.
$parent
.
groups
,
function
(
g
)
{
return
g
.
name
==
'TaxReturnType'
;
});
...
...
@@ -993,6 +1001,37 @@ debugger;
SweetAlert
.
warning
(
$translate
.
instant
(
'ExportReportRequiredCheck'
));
return
;
}
var
reportIds
=
[];
angular
.
forEach
(
$scope
.
selectedReportIds
,
function
(
reportId
)
{
var
node
=
_
.
first
(
_
.
where
(
grp
.
children
,
{
reportId
:
reportId
}));
if
(
node
)
{
reportIds
.
push
(
node
.
reportId
);
}
else
{
node
=
_
.
first
(
_
.
where
(
grp2
.
children
,
{
reportId
:
reportId
}));
if
(
node
)
{
reportIds
.
push
(
node
.
reportId
);
}
}
});
if
(
'upload'
==
$scope
.
evenType
)
{
var
xhr
=
new
XMLHttpRequest
();
xhr
.
onload
=
function
(
e
)
{
if
(
xhr
.
status
===
200
){
SweetAlert
.
success
(
''
,
$translate
.
instant
(
'FileUploadSuccess'
));
}
else
{
SweetAlert
.
success
(
''
,
$translate
.
instant
(
'FileUploadFailed'
));
}
$
(
'#busy-indicator-container'
).
hide
();
};
xhr
.
open
(
"POST"
,
apiInterceptor
.
webApiHostUrl
+
'/citReport/uploadReportData/'
+
vatSessionService
.
project
.
id
+
'/'
+
0
,
true
);
xhr
.
setRequestHeader
(
"Authorization"
,
apiInterceptor
.
tokenType
+
' '
+
apiInterceptor
.
apiToken
());
xhr
.
setRequestHeader
(
"Content-Type"
,
'application/json;charset=UTF-8'
);
xhr
.
responseType
=
"arraybuffer"
;
xhr
.
send
(
JSON
.
stringify
({
reportIds
:
reportIds
}));
return
;
}
//设置报表的排序号,用于对导出的报表sheet进行排序
var
orderIndex
=
0
;
...
...
atms-web/src/main/webapp/app/cit/report/cit-report-view/cit-report-view.html
View file @
767d6509
...
...
@@ -9,7 +9,7 @@
<!--<span ng-if="!isBSPL" ng-click="upLoadManual();"><i-->
<!--class="fa fa-floppy-o"></i> {{'上传手工数据'}}-->
<!--</span>-->
<
!--<span ng-if="!isBSPL" ng-click="openExportPop('upload');"><i class="fa fa-upload"></i> {{'UploadExcel' | translate}}</span>--
>
<
span
ng-if=
"!isBSPL"
ng-click=
"openExportPop('upload');"
><i
class=
"fa fa-upload"
></i>
{{'UploadExcel' | translate}}
</span
>
<!--<span ng-if="!isBSPL" ng-click="saveReportCache();"><i-->
<!--class="fa fa-floppy-o"></i> {{'Save' | translate}}</span>-->
</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