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
9e1827ab
Commit
9e1827ab
authored
Mar 18, 2019
by
chase
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge档案管理
parent
48adb09f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
50 additions
and
20 deletions
+50
-20
POIUtil.java
atms-api/src/main/java/pwc/taxtech/atms/common/POIUtil.java
+1
-5
TaxDocumentServiceImpl.java
...pwc/taxtech/atms/service/impl/TaxDocumentServiceImpl.java
+3
-3
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+45
-11
DFFS.java
.../taxtech/atms/vat/service/impl/report/functions/DFFS.java
+0
-0
JFFS.java
.../taxtech/atms/vat/service/impl/report/functions/JFFS.java
+0
-0
TaxDocumentMapper.java
...src/main/java/pwc/taxtech/atms/dao/TaxDocumentMapper.java
+1
-1
No files found.
atms-api/src/main/java/pwc/taxtech/atms/common/POIUtil.java
View file @
9e1827ab
...
...
@@ -117,7 +117,7 @@ public class POIUtil {
return
row
;
}
public
static
Row
createAndCloneRow
(
Workbook
wb
,
Sheet
sheet
,
Integer
destRowIndex
,
Row
fromRow
)
{
public
static
Row
createAndCloneRow
(
Workbook
wb
,
Sheet
sheet
,
Integer
destRowIndex
,
Row
fromRow
)
{
Row
toRow
=
null
;
if
(
sheet
.
getRow
(
destRowIndex
)
!=
null
)
{
int
lastRowNo
=
sheet
.
getLastRowNum
();
...
...
@@ -136,10 +136,6 @@ public class POIUtil {
boolean
copyValueFlag
)
{
CellStyle
newstyle
=
wb
.
createCellStyle
();
copyCellStyle
(
wb
,
srcCell
.
getCellStyle
(),
newstyle
);
if
(
srcCell
.
getColumnIndex
()==
7
){
newstyle
.
setLocked
(
false
);
}
// distCell.setEncoding(srcCell.getEncoding());
//样式
distCell
.
setCellStyle
(
newstyle
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/TaxDocumentServiceImpl.java
View file @
9e1827ab
...
...
@@ -190,15 +190,15 @@ public class TaxDocumentServiceImpl {
taxDocument
.
setCreatorId
(
authUserHelper
.
getCurrentUserId
());
taxDocument
.
setUploadTime
(
new
Date
());
taxDocument
.
setYearRedundancy
(
Calendar
.
getInstance
().
get
(
Calendar
.
YEAR
));
Long
id
=
taxDocumentMapper
.
insert
(
taxDocument
);
int
num
=
taxDocumentMapper
.
insert
(
taxDocument
);
//根据公司Id 设置业务线
String
businessLine
=
organizationService
.
queryBusinessByCompanyId
(
taxDocument
.
getCompanyId
());
if
(
StringUtils
.
isNotBlank
(
businessLine
))
{
taxDocument
.
setBusinessLine
(
businessLine
);
}
if
(
id
>
0
)
{
if
(
num
>
0
)
{
OperationLogTaxDocument
actionEntity
=
buildOperationLogTaxDocument
();
actionEntity
.
setId
(
id
.
toString
());
actionEntity
.
setId
(
taxDocument
.
getId
()
.
toString
());
actionEntity
.
setOperationAction
(
"新增"
);
actionEntity
.
setUpdateState
(
taxDocument
.
toString
());
boolean
result
=
operationLogTaxDocService
.
addTaxDocumentList
(
actionEntity
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
9e1827ab
...
...
@@ -366,7 +366,19 @@ public class ReportServiceImpl extends BaseService {
@Transactional
public
void
assemblePeriodTemplate
(
Template
template
,
Workbook
workbook
,
String
projectId
,
Integer
period
,
Integer
addRowIndex
)
throws
ServiceException
{
List
<
Integer
>
hasHandDatas
=
Arrays
.
asList
(
TaxesCalculateReportEnum
.
Column
.
Column_5
.
getIndex
(),
TaxesCalculateReportEnum
.
Column
.
Column_6
.
getIndex
(),
TaxesCalculateReportEnum
.
Column
.
Column_7
.
getIndex
(),
TaxesCalculateReportEnum
.
Column
.
Column_8
.
getIndex
(),
TaxesCalculateReportEnum
.
Column
.
Column_10
.
getIndex
());
List
<
Integer
>
hasFormulaDatas
=
Arrays
.
asList
(
TaxesCalculateReportEnum
.
Column
.
Column_4
.
getIndex
(),
TaxesCalculateReportEnum
.
Column
.
Column_5
.
getIndex
(),
TaxesCalculateReportEnum
.
Column
.
Column_6
.
getIndex
(),
TaxesCalculateReportEnum
.
Column
.
Column_7
.
getIndex
(),
TaxesCalculateReportEnum
.
Column
.
Column_8
.
getIndex
(),
TaxesCalculateReportEnum
.
Column
.
Column_10
.
getIndex
());
try
{
Date
now
=
new
Date
();
Sheet
sheet
=
workbook
.
getSheetAt
(
0
);
...
...
@@ -397,11 +409,7 @@ public class ReportServiceImpl extends BaseService {
}
cellTemplate
.
setIsReadOnly
(
cell
.
getCellStyle
().
getLocked
()
?
1
:
0
);
cellTemplateList
.
add
(
cellTemplate
);
//todo: 这里没有Config数据只有在上传模板以后,在界面里面可以配置公式
if
(
hasKeyIn
(
cell
))
{
cell
.
setCellValue
(
StringUtils
.
EMPTY
);
addManualConfig
(
template
.
getId
(),
cellTemplateId
,
cell
,
now
,
cellTemplateConfigList
);
}
else
if
(!
cell
.
getCellStyle
().
getLocked
()
&&
StringUtils
.
isNotBlank
(
POIUtil
.
getCellFormulaString
(
cell
)))
{
if
(
hasFormulaDatas
.
contains
(
c
)
&&
StringUtils
.
isNotBlank
(
POIUtil
.
getCellFormulaString
(
cell
)))
{
PeriodCellTemplateConfig
periodCellTemplateConfig
=
new
PeriodCellTemplateConfig
();
periodCellTemplateConfig
.
setId
(
distributedIdService
.
nextId
());
periodCellTemplateConfig
.
setPeriod
(
period
);
...
...
@@ -420,6 +428,8 @@ public class ReportServiceImpl extends BaseService {
fixedParsedFormula
(
periodCellTemplateConfig
);
fixedAccountCode
(
periodCellTemplateConfig
);
cellTemplateConfigList
.
add
(
periodCellTemplateConfig
);
}
if
(
hasHandDatas
.
contains
(
c
))
{
addManualConfig
(
template
.
getId
(),
cellTemplateId
,
cell
,
now
,
cellTemplateConfigList
);
}
}
else
{
...
...
@@ -696,8 +706,9 @@ public class ReportServiceImpl extends BaseService {
Sheet
sheet
=
tWorkbook
.
getSheetAt
(
0
);
RevenueConfigExample
example
=
new
RevenueConfigExample
();
List
<
RevenueConfig
>
dataList
=
revenueConfigMapper
.
selectByExample
(
example
);
List
<
Integer
>
unLockStyles
=
Arrays
.
asList
();
if
(
CollectionUtils
.
isNotEmpty
(
dataList
))
{
Project
project
=
projectMapper
.
selectByPrimaryKey
(
projectId
);
int
rowIndex
=
1
;
Row
sourceRow
=
sheet
.
getRow
(
3
);
for
(
RevenueConfig
config
:
dataList
)
{
...
...
@@ -705,11 +716,34 @@ public class ReportServiceImpl extends BaseService {
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_1
.
getIndex
()).
setCellValue
(
"1-"
+
rowIndex
);
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_3
.
getIndex
()).
setCellValue
(
config
.
getName
());
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_2
.
getIndex
()).
setCellValue
(
""
);
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_4
.
getIndex
()).
setCellValue
(
"PC(\"VAT020\",\"C\",\"增值税进项税\",\"G\")"
);
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_5
.
getIndex
()).
setCellValue
(
""
);
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_4
.
getIndex
()).
setCellValue
(
"PC(\"TimeInterval\",\"\""
);
//判断帐载收入明细
if
(
0
==
config
.
getAccountType
())
{
//0值
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_5
.
getIndex
()).
setCellValue
(
0.00
);
}
else
if
(
1
==
config
.
getAccountType
())
{
//科目
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_5
.
getIndex
()).
setCellValue
(
"DFFS(\""
+
config
.
getTbSegment3
()
+
"\","
+
project
.
getYear
()
+
","
+
period
+
","
+
1
+
",\""
+
config
.
getTbSegment5
()
+
"\",\""
+
config
.
getTbSegment6
()
+
"\")-"
+
"JFFS(\""
+
config
.
getTbSegment3
()
+
"\","
+
project
.
getYear
()
+
","
+
period
+
","
+
1
+
",\""
+
config
.
getTbSegment5
()
+
"\",\""
+
config
.
getTbSegment6
()
+
"\")"
);
}
else
if
(
2
==
config
.
getAccountType
()){
//手工输入
}
else
{
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_5
.
getIndex
()).
setCellValue
(
""
);
}
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_6
.
getIndex
()).
setCellValue
(
""
);
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_7
.
getIndex
()).
setCellValue
(
""
);
if
(
1
==
config
.
getTaxBase
())
{
//账载
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_8
.
getIndex
()).
setCellValue
(
"WPNAME(\"VAT020\",\"B\",\""
+
config
.
getName
()+
"\",\"E\")"
);
}
else
if
(
2
==
config
.
getTaxBase
())
{
//开票收入
}
else
if
(
3
==
config
.
getTaxBase
())
{
//手工录入
}
else
if
(
4
==
config
.
getTaxBase
())
{
//借方发生额
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_8
.
getIndex
()).
setCellValue
(
"JFFS(\""
+
config
.
getTbSegment3
()
+
"\","
+
project
.
getYear
()
+
","
+
period
+
","
+
1
+
",\"\",\"\")"
);
}
else
if
(
5
==
config
.
getTaxBase
())
{
//贷方发生额
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_8
.
getIndex
()).
setCellValue
(
"DFFS(\""
+
config
.
getTbSegment3
()
+
"\","
+
project
.
getYear
()
+
","
+
period
+
","
+
1
+
",\"\",\"\")"
);
}
else
{
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_8
.
getIndex
()).
setCellValue
(
""
);
}
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_8
.
getIndex
()).
setCellValue
(
"WPNAME(\"VAT020\",\"C\",\"增值税进项税\",\"G\")"
);
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_9
.
getIndex
()).
setCellValue
(
config
.
getTaxRate
().
multiply
(
new
BigDecimal
(
100
)).
intValue
()
+
"%"
);
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_10
.
getIndex
()).
setCellValue
(
0
);
...
...
@@ -1693,7 +1727,7 @@ public class ReportServiceImpl extends BaseService {
return
operationResultDto
;
}
@
Autowired
@
Resource
private
PwcReportAttachMapper
pwcReportAttachMapper
;
public
void
bindPwcAttach
(
Long
activeCol
,
Long
activeRow
,
String
activeTemplateId
,
FileDto
file
)
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/DFFS.java
View file @
9e1827ab
This diff is collapsed.
Click to expand it.
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/JFFS.java
View file @
9e1827ab
This diff is collapsed.
Click to expand it.
atms-dao/src/main/java/pwc/taxtech/atms/dao/TaxDocumentMapper.java
View file @
9e1827ab
...
...
@@ -41,7 +41,7 @@ public interface TaxDocumentMapper extends MyMapper {
*
* @mbg.generated
*/
Long
insert
(
TaxDocument
record
);
int
insert
(
TaxDocument
record
);
/**
* This method was generated by MyBatis Generator.
...
...
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