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
19c33697
Commit
19c33697
authored
Apr 18, 2019
by
zhkwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_mysql' into dev_mysql
parents
5e4f4c09
2d9565ed
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
132 additions
and
33 deletions
+132
-33
FileTypesServiceImpl.java
...a/pwc/taxtech/atms/service/impl/FileTypesServiceImpl.java
+1
-1
TaxDocumentServiceImpl.java
...pwc/taxtech/atms/service/impl/TaxDocumentServiceImpl.java
+2
-17
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+5
-5
TrialBalanceFinalMapper.java
...ava/pwc/taxtech/atms/vat/dao/TrialBalanceFinalMapper.java
+4
-1
TrialBalanceFinalExtendsMapper.xml
...h/atms/vat/dao/extends/TrialBalanceFinalExtendsMapper.xml
+89
-7
tax-document-list.ctrl.js
...ocumentManage/tax-document-list/tax-document-list.ctrl.js
+31
-2
No files found.
atms-api/src/main/java/pwc/taxtech/atms/service/impl/FileTypesServiceImpl.java
View file @
19c33697
...
@@ -83,7 +83,7 @@ public class FileTypesServiceImpl {
...
@@ -83,7 +83,7 @@ public class FileTypesServiceImpl {
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"FileTypesServiceImpl addFileTypesList error : "
+
e
.
getMessage
());
log
.
error
(
"FileTypesServiceImpl addFileTypesList error : "
+
e
.
getMessage
());
return
false
;
throw
new
RuntimeException
(
"添加档案类型异常!请联系管理员! : "
+
e
.
getMessage
())
;
}
}
}
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/TaxDocumentServiceImpl.java
View file @
19c33697
...
@@ -193,15 +193,6 @@ public class TaxDocumentServiceImpl {
...
@@ -193,15 +193,6 @@ public class TaxDocumentServiceImpl {
@Transactional
@Transactional
public
synchronized
boolean
addTaxDocumentList
(
MultipartFile
file
,
TaxDocument
taxDocument
)
{
public
synchronized
boolean
addTaxDocumentList
(
MultipartFile
file
,
TaxDocument
taxDocument
)
{
try
{
try
{
TaxDocumentExample
taxDocumentExample
=
new
TaxDocumentExample
();
taxDocumentExample
.
createCriteria
().
andFileNameEqualTo
(
taxDocument
.
getFileName
());
List
<
TaxDocument
>
list
=
taxDocumentMapper
.
selectByExample
(
taxDocumentExample
);
if
(
list
.
size
()
>
0
)
{
return
false
;
}
//上传文件
//上传文件
if
(
StringUtils
.
isBlank
(
taxDocument
.
getFileUploadId
()))
{
if
(
StringUtils
.
isBlank
(
taxDocument
.
getFileUploadId
()))
{
...
@@ -369,9 +360,7 @@ public class TaxDocumentServiceImpl {
...
@@ -369,9 +360,7 @@ public class TaxDocumentServiceImpl {
}
}
/**
/**
* 根据档案属性 档案类型 公司名称 档案名称 查询是否已存在数据
* 根据档案属性 档案类型 公司名称 查询是否已存在数据
* 不存在则返回 true
* 已存在则返回 false
*
*
* @param taxDocument
* @param taxDocument
* @return
* @return
...
@@ -397,10 +386,6 @@ public class TaxDocumentServiceImpl {
...
@@ -397,10 +386,6 @@ public class TaxDocumentServiceImpl {
if
(
null
!=
taxDocument
.
getOwnTime
())
{
if
(
null
!=
taxDocument
.
getOwnTime
())
{
criteria
.
andOwnTimeEqualTo
(
taxDocument
.
getOwnTime
());
criteria
.
andOwnTimeEqualTo
(
taxDocument
.
getOwnTime
());
}
}
//档案名称 fileName
if
(
StringUtils
.
isNotBlank
(
taxDocument
.
getFileName
()))
{
criteria
.
andFileNameEqualTo
(
taxDocument
.
getFileName
());
}
//业务线 businessLine
//业务线 businessLine
if
(
StringUtils
.
isNotBlank
(
taxDocument
.
getBusinessLine
()))
{
if
(
StringUtils
.
isNotBlank
(
taxDocument
.
getBusinessLine
()))
{
criteria
.
andBusinessLineEqualTo
(
taxDocument
.
getBusinessLine
());
criteria
.
andBusinessLineEqualTo
(
taxDocument
.
getBusinessLine
());
...
@@ -435,7 +420,7 @@ public class TaxDocumentServiceImpl {
...
@@ -435,7 +420,7 @@ public class TaxDocumentServiceImpl {
}
}
//创建人 creator
//创建人 creator
if
(
StringUtils
.
isNotBlank
(
taxDocument
.
getCreator
()))
{
if
(
StringUtils
.
isNotBlank
(
taxDocument
.
getCreator
()))
{
criteria
.
andCreatorEqualTo
(
taxDocument
.
getCreator
());
criteria
.
andCreatorEqualTo
(
taxDocument
.
getCreator
());
}
}
//设置查询可用的数据
//设置查询可用的数据
criteria
.
andEnableEqualTo
(
"T"
);
criteria
.
andEnableEqualTo
(
"T"
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
19c33697
...
@@ -6,13 +6,10 @@ import com.github.pagehelper.PageHelper;
...
@@ -6,13 +6,10 @@ import com.github.pagehelper.PageHelper;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Sets
;
import
com.google.common.collect.Sets
;
import
com.grapecity.documents.excel.V
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.map.HashedMap
;
import
org.apache.commons.collections.map.HashedMap
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.hssf.usermodel.HSSFCell
;
import
org.apache.poi.hssf.usermodel.HSSFCell
;
import
org.apache.poi.hssf.usermodel.HSSFCellStyle
;
import
org.apache.poi.hssf.usermodel.HSSFWorkbook
;
import
org.apache.poi.openxml4j.exceptions.InvalidFormatException
;
import
org.apache.poi.openxml4j.exceptions.InvalidFormatException
;
import
org.apache.poi.ss.usermodel.*
;
import
org.apache.poi.ss.usermodel.*
;
import
org.apache.poi.ss.util.CellRangeAddress
;
import
org.apache.poi.ss.util.CellRangeAddress
;
...
@@ -59,7 +56,6 @@ import javax.servlet.http.HttpServletRequest;
...
@@ -59,7 +56,6 @@ import javax.servlet.http.HttpServletRequest;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.*
;
import
java.io.*
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.BlockingQueue
;
import
java.util.concurrent.BlockingQueue
;
import
java.util.concurrent.LinkedBlockingQueue
;
import
java.util.concurrent.LinkedBlockingQueue
;
...
@@ -335,7 +331,11 @@ public class ReportServiceImpl extends BaseService {
...
@@ -335,7 +331,11 @@ public class ReportServiceImpl extends BaseService {
TrialBalanceFinalExample
example
=
new
TrialBalanceFinalExample
();
TrialBalanceFinalExample
example
=
new
TrialBalanceFinalExample
();
example
.
createCriteria
().
andProjectIdEqualTo
(
projectId
).
andPeriodEqualTo
(
Integer
.
valueOf
(
queryPeriod
));
example
.
createCriteria
().
andProjectIdEqualTo
(
projectId
).
andPeriodEqualTo
(
Integer
.
valueOf
(
queryPeriod
));
trialBalanceFinalMapper
.
deleteByExample
(
example
);
trialBalanceFinalMapper
.
deleteByExample
(
example
);
trialBalanceFinalMapper
.
generateFinalData
(
projectId
,
Integer
.
valueOf
(
queryPeriod
),
lastProject
==
null
?
"0"
:
lastProject
.
getId
(),
Integer
.
valueOf
(
lastPeriod
));
List
<
TrialBalanceFinal
>
dataList
=
trialBalanceFinalMapper
.
queryGenerateFinalData
(
projectId
,
Integer
.
valueOf
(
queryPeriod
),
lastProject
==
null
?
"0"
:
lastProject
.
getId
(),
Integer
.
valueOf
(
lastPeriod
));
if
(!
CollectionUtils
.
isEmpty
(
dataList
))
{
List
<
List
<
TrialBalanceFinal
>>
batchList
=
CommonUtils
.
subListWithLen
(
dataList
,
CommonUtils
.
BATCH_NUM_2000
);
batchList
.
forEach
(
l
->
trialBalanceFinalMapper
.
batchInsert
(
l
));
}
}
}
public
void
assembleInvoiceRecord
(
String
projectId
,
Integer
period
,
Boolean
isMergeManualData
)
{
public
void
assembleInvoiceRecord
(
String
projectId
,
Integer
period
,
Boolean
isMergeManualData
)
{
...
...
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/TrialBalanceFinalMapper.java
View file @
19c33697
...
@@ -122,8 +122,10 @@ public interface TrialBalanceFinalMapper extends MyVatMapper {
...
@@ -122,8 +122,10 @@ public interface TrialBalanceFinalMapper extends MyVatMapper {
@Param
(
"period"
)
Integer
period
,
@Param
(
"period"
)
Integer
period
,
@Param
(
"queryDate"
)
String
queryDate
);
@Param
(
"queryDate"
)
String
queryDate
);
int
g
enerateFinalData
(
@Param
(
"projectId"
)
String
projectId
,
List
<
TrialBalanceFinal
>
queryG
enerateFinalData
(
@Param
(
"projectId"
)
String
projectId
,
@Param
(
"period"
)
Integer
period
,
@Param
(
"period"
)
Integer
period
,
@Param
(
"lastProjectId"
)
String
lastProjectId
,
@Param
(
"lastProjectId"
)
String
lastProjectId
,
@Param
(
"lastPeriod"
)
Integer
lastPeriod
);
@Param
(
"lastPeriod"
)
Integer
lastPeriod
);
int
batchInsert
(
List
<
TrialBalanceFinal
>
list
);
}
}
\ No newline at end of file
atms-dao/src/main/resources/pwc/taxtech/atms/vat/dao/extends/TrialBalanceFinalExtendsMapper.xml
View file @
19c33697
...
@@ -74,10 +74,9 @@
...
@@ -74,10 +74,9 @@
order by detail.emptyCode
order by detail.emptyCode
</select>
</select>
<insert
id=
"generateFinalData"
>
<select
id=
"queryGenerateFinalData"
resultMap=
"BaseResultMap"
>
insert
select
into trial_balance_final
balance.id,
select balance.id,
balance.organization_id,
balance.organization_id,
balance.project_id,
balance.project_id,
balance.date,
balance.date,
...
@@ -124,11 +123,11 @@ select balance.id,
...
@@ -124,11 +123,11 @@ select balance.id,
balance.ytd_cr,
balance.ytd_cr,
balance.beg_bal_beq,
balance.beg_bal_beq,
balance.period_dr_beq + if(adjustment.period_dr_beq is null, 0, adjustment.period_dr_beq) -
balance.period_dr_beq + if(adjustment.period_dr_beq is null, 0, adjustment.period_dr_beq) -
if(last_adjustment.period_dr_beq is null, 0, last_adjustment.period_dr_beq),
if(last_adjustment.period_dr_beq is null, 0, last_adjustment.period_dr_beq)
as period_dr_beq
,
balance.period_cr_beq + if(adjustment.period_cr_beq is null, 0, adjustment.period_cr_beq) -
balance.period_cr_beq + if(adjustment.period_cr_beq is null, 0, adjustment.period_cr_beq) -
if(last_adjustment.period_cr_beq is null, 0, last_adjustment.period_cr_beq),
if(last_adjustment.period_cr_beq is null, 0, last_adjustment.period_cr_beq)
as period_cr_beq
,
balance.end_bal_beq + if(adjustment.end_bal_beq is null, 0, adjustment.end_bal_beq) -
balance.end_bal_beq + if(adjustment.end_bal_beq is null, 0, adjustment.end_bal_beq) -
if(last_adjustment.end_bal_beq is null, 0, last_adjustment.end_bal_beq),
if(last_adjustment.end_bal_beq is null, 0, last_adjustment.end_bal_beq)
as end_bal_beq
,
balance.qtd_dr_beq,
balance.qtd_dr_beq,
balance.qtd_cr_beq,
balance.qtd_cr_beq,
balance.ytd_dr_beq,
balance.ytd_dr_beq,
...
@@ -194,5 +193,87 @@ where balance.project_id = #{projectId}
...
@@ -194,5 +193,87 @@ where balance.project_id = #{projectId}
</select>
<insert
id=
"batchInsert"
>
insert into trial_balance_final
(id, organization_id, project_id,
`date`, `source`, tms_period,
period, ledger_id, ledger_name,
currency_code, `status`, category,
account_category, acct_code1, acct_name1,
acct_name2, acct_name3, segment1,
segment2, segment3, segment4,
segment5, segment6, segment7,
segment8, segment9, segment10,
segment1_name, segment2_name, segment3_name,
segment4_name, segment5_name, segment6_name,
segment7_name, segment8_name, segment9_name,
segment10_name, beg_bal, period_dr,
period_cr, end_bal, qtd_dr,
qtd_cr, ytd_dr, ytd_cr,
beg_bal_beq, period_dr_beq, period_cr_beq,
end_bal_beq, qtd_dr_beq, qtd_cr_beq,
ytd_dr_beq, ytd_cr_beq, create_time,
update_time)
values
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(
#{item.id,jdbcType=BIGINT},
#{item.organizationId,jdbcType=VARCHAR},
#{item.projectId,jdbcType=VARCHAR},
#{item.date,jdbcType=TIMESTAMP},
#{item.source,jdbcType=VARCHAR},
#{item.tmsPeriod,jdbcType=INTEGER},
#{item.period,jdbcType=INTEGER},
#{item.ledgerId,jdbcType=VARCHAR},
#{item.ledgerName,jdbcType=VARCHAR},
#{item.currencyCode,jdbcType=VARCHAR},
#{item.status,jdbcType=VARCHAR},
#{item.category,jdbcType=VARCHAR},
#{item.accountCategory,jdbcType=VARCHAR},
#{item.acctCode1,jdbcType=VARCHAR},
#{item.acctName1,jdbcType=VARCHAR},
#{item.acctName2,jdbcType=VARCHAR},
#{item.acctName3,jdbcType=VARCHAR},
#{item.segment1,jdbcType=VARCHAR},
#{item.segment2,jdbcType=VARCHAR},
#{item.segment3,jdbcType=VARCHAR},
#{item.segment4,jdbcType=VARCHAR},
#{item.segment5,jdbcType=VARCHAR},
#{item.segment6,jdbcType=VARCHAR},
#{item.segment7,jdbcType=VARCHAR},
#{item.segment8,jdbcType=VARCHAR},
#{item.segment9,jdbcType=VARCHAR},
#{item.segment10,jdbcType=VARCHAR},
#{item.segment1Name,jdbcType=VARCHAR},
#{item.segment2Name,jdbcType=VARCHAR},
#{item.segment3Name,jdbcType=VARCHAR},
#{item.segment4Name,jdbcType=VARCHAR},
#{item.segment5Name,jdbcType=VARCHAR},
#{item.segment6Name,jdbcType=VARCHAR},
#{item.segment7Name,jdbcType=VARCHAR},
#{item.segment8Name,jdbcType=VARCHAR},
#{item.segment9Name,jdbcType=VARCHAR},
#{item.segment10Name,jdbcType=VARCHAR},
#{item.begBal,jdbcType=DECIMAL},
#{item.periodDr,jdbcType=DECIMAL},
#{item.periodCr,jdbcType=DECIMAL},
#{item.endBal,jdbcType=DECIMAL},
#{item.qtdDr,jdbcType=DECIMAL},
#{item.qtdCr,jdbcType=DECIMAL},
#{item.ytdDr,jdbcType=DECIMAL},
#{item.ytdCr,jdbcType=DECIMAL},
#{item.begBalBeq,jdbcType=DECIMAL},
#{item.periodDrBeq,jdbcType=DECIMAL},
#{item.periodCrBeq,jdbcType=DECIMAL},
#{item.endBalBeq,jdbcType=DECIMAL},
#{item.qtdDrBeq,jdbcType=DECIMAL},
#{item.qtdCrBeq,jdbcType=DECIMAL},
#{item.ytdDrBeq,jdbcType=DECIMAL},
#{item.ytdCrBeq,jdbcType=DECIMAL},
#{item.createTime,jdbcType=TIMESTAMP},
#{item.updateTime,jdbcType=TIMESTAMP}
)
</foreach>
</insert>
</insert>
</mapper>
</mapper>
\ No newline at end of file
atms-web/src/main/webapp/app/taxDocumentManage/tax-document-list/tax-document-list.ctrl.js
View file @
19c33697
...
@@ -122,8 +122,9 @@ taxDocumentManageModule.controller('taxDocumentListController',
...
@@ -122,8 +122,9 @@ taxDocumentManageModule.controller('taxDocumentListController',
allowColumnReordering
:
true
,
allowColumnReordering
:
true
,
columns
:
[
columns
:
[
{
{
dataField
:
"
id
"
,
dataField
:
""
,
caption
:
""
,
caption
:
""
,
width
:
40
,
cellTemplate
:
function
(
container
,
options
)
{
cellTemplate
:
function
(
container
,
options
)
{
var
target
=
$
(
'<input name="dataGridCheckBox" type="checkbox" '
+
var
target
=
$
(
'<input name="dataGridCheckBox" type="checkbox" '
+
'data-id="'
+
options
.
data
.
id
+
'" '
+
'data-id="'
+
options
.
data
.
id
+
'" '
+
...
@@ -132,8 +133,24 @@ taxDocumentManageModule.controller('taxDocumentListController',
...
@@ -132,8 +133,24 @@ taxDocumentManageModule.controller('taxDocumentListController',
$scope
.
sniffCheckbox
();
$scope
.
sniffCheckbox
();
});
});
container
.
append
(
target
);
container
.
append
(
target
);
if
(
$
(
"input[name='dataGridCheckBoxALL']"
).
length
==
0
){
var
func
=
function
()
{
var
targetall
=
$
(
'<input name="dataGridCheckBoxALL" type="checkbox" data-id=""data-url=""/>'
);
targetall
.
off
(
'click'
).
on
(
'click'
,
function
()
{
$scope
.
sniffCheckboxAll
();
});
$
(
"tr td:first[role='columnheader']"
).
append
(
targetall
);
func
=
function
(){};
};
func
();
}
}
}
},
},
{
dataField
:
"id"
,
caption
:
""
,
visible
:
false
},
{
{
dataField
:
"fileAttr"
,
dataField
:
"fileAttr"
,
caption
:
$translate
.
instant
(
'DocumentAttr'
),
caption
:
$translate
.
instant
(
'DocumentAttr'
),
...
@@ -2121,7 +2138,19 @@ taxDocumentManageModule.directive('tempModule', function () {
...
@@ -2121,7 +2138,19 @@ taxDocumentManageModule.directive('tempModule', function () {
});
});
console
.
info
(
$scope
.
checkedItemIds
.
join
(
","
));
console
.
info
(
$scope
.
checkedItemIds
.
join
(
","
));
};
};
$scope
.
sniffCheckboxAll
=
function
(){
$
(
"input[name='dataGridCheckBoxALL']"
).
each
(
function
(
index
,
item
)
{
if
(
item
.
checked
){
$
(
"input[name='dataGridCheckBox']"
).
each
(
function
(
index
,
item
)
{
item
.
checked
=
true
;
});
}
else
{
$
(
"input[name='dataGridCheckBox']"
).
each
(
function
(
index
,
item
)
{
item
.
checked
=
false
;
});
}
});
};
$scope
.
getMonthLastDate
=
function
(
year
,
month
)
{
$scope
.
getMonthLastDate
=
function
(
year
,
month
)
{
year
=
year
?
year
:
new
Date
().
getFullYear
();
year
=
year
?
year
:
new
Date
().
getFullYear
();
month
=
month
?
month
:
(
new
Date
().
getMonth
()
+
1
);
month
=
month
?
month
:
(
new
Date
().
getMonth
()
+
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