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
355c5d38
Commit
355c5d38
authored
Mar 01, 2019
by
zhkwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CIT数据导入功能模块改bug
parent
f09cd069
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
29 additions
and
17 deletions
+29
-17
CitImportExcelController.java
...pwc/taxtech/atms/controller/CitImportExcelController.java
+1
-1
CitImportExcelServiceImpl.java
.../taxtech/atms/service/impl/CitImportExcelServiceImpl.java
+8
-4
CitSalaryAdvanceMapper.java
...ain/java/pwc/taxtech/atms/dao/CitSalaryAdvanceMapper.java
+2
-1
CitBSPrcAdjustExtendsMapper.xml
.../taxtech/atms/dao/extends/CitBSPrcAdjustExtendsMapper.xml
+1
-1
CitProfitPrcAdjustExtendsMapper.xml
...tech/atms/dao/extends/CitProfitPrcAdjustExtendsMapper.xml
+1
-1
CitSalaryAdvanceExtendsMapper.xml
...axtech/atms/dao/extends/CitSalaryAdvanceExtendsMapper.xml
+2
-2
import-cit-bs-prc-adjust.ctrl.js
...import-cit-bs-prc-adjust/import-cit-bs-prc-adjust.ctrl.js
+9
-2
import-cit-draft-account-mapping.ctrl.js
...-account-mapping/import-cit-draft-account-mapping.ctrl.js
+1
-1
import-cit-eam-assets-disposal.ctrl.js
...am-assets-disposal/import-cit-eam-assets-disposal.ctrl.js
+1
-1
import-cit-profit-prc-adjust.ctrl.js
...it-profit-prc-adjust/import-cit-profit-prc-adjust.ctrl.js
+1
-1
import-cit-salary-advance.ctrl.js
...port-cit-salary-advance/import-cit-salary-advance.ctrl.js
+1
-1
import-cit-trial-balance.ctrl.js
...import-cit-trial-balance/import-cit-trial-balance.ctrl.js
+1
-1
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/CitImportExcelController.java
View file @
355c5d38
...
...
@@ -31,7 +31,7 @@ public class CitImportExcelController {
@RequestMapping
(
value
=
"/citImportExcel"
,
method
=
RequestMethod
.
POST
)
public
@ResponseBody
OperationResultDto
citImportExcel
(
@RequestParam
MultipartFile
file
,
@RequestParam
String
orgIds
,
OperationResultDto
citImportExcel
(
@RequestParam
MultipartFile
file
,
@RequestParam
(
required
=
false
)
String
orgIds
,
@RequestParam
String
periodDate
,
@RequestParam
Integer
importType
,
@RequestParam
Integer
importFileType
){
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CitImportExcelServiceImpl.java
View file @
355c5d38
...
...
@@ -25,6 +25,7 @@ import java.math.BigDecimal;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Service
public
class
CitImportExcelServiceImpl
extends
BaseService
{
...
...
@@ -537,7 +538,7 @@ public class CitImportExcelServiceImpl extends BaseService {
List
<
CitDataImportLog
>
citDataImportLogList
=
new
ArrayList
<>();
// Integer period = CitCommonUtil.getPeriod();
String
companyName
=
CitCommonUtil
.
getValue
(
sheet
.
getRow
(
5
).
getCell
(
1
)).
toString
();
List
<
Organization
>
organizations
=
getOrganizationByName
(
companyName
);
List
<
Organization
>
organizations
=
getOrganizationByName
(
companyName
)
.
stream
().
filter
(
r
->
r
.
getCode
()!=
null
&&!(
""
.
equals
(
r
.
getCode
()))).
collect
(
Collectors
.
toList
())
;
String
companyCode
=
""
;
String
orgId
=
""
;
String
taxPayerId
=
""
;
...
...
@@ -547,6 +548,7 @@ public class CitImportExcelServiceImpl extends BaseService {
if
(!
orgList
.
contains
(
orgId
)){
saveResult
.
setResult
(
false
);
saveResult
.
setData
(
false
);
saveResult
.
setResultMsg
(
ErrorMessageCN
.
DoNotSelectCompany
);
return
saveResult
;
}
...
...
@@ -556,6 +558,7 @@ public class CitImportExcelServiceImpl extends BaseService {
}
else
{
saveResult
.
setResult
(
false
);
saveResult
.
setData
(
false
);
saveResult
.
setResultMsg
(
ErrorMessageCN
.
NoCompanyError
);
return
saveResult
;
}
...
...
@@ -592,7 +595,6 @@ public class CitImportExcelServiceImpl extends BaseService {
citDataImportLogList
.
add
(
citDataImportLogError
);
continue
;
}
System
.
out
.
println
(
cellValue
);
citBSPrcAdjust
.
setBegBal
(
new
BigDecimal
(
cellValue
.
toString
().
replace
(
","
,
""
)));
...
...
@@ -888,7 +890,7 @@ public class CitImportExcelServiceImpl extends BaseService {
citDataImportLogList
.
add
(
citDataImportLogError
);
continue
;
}
String
companyCode
=
cellValueCode
.
toString
();
String
companyCode
=
cellValueCode
.
toString
()
.
replace
(
".0"
,
""
)
;
//根据code(主体)获取机构相关信息
List
<
Organization
>
organizations
=
getOrganizationByCode
(
companyCode
);
String
companyName
=
""
;
...
...
@@ -969,7 +971,9 @@ public class CitImportExcelServiceImpl extends BaseService {
citSalaryAdvanceMapper
.
deleteByExample
(
example
);
updateImportLog
(
EnumCitImportType
.
SalaryAdvance
.
getCode
());
}
int
insertBatchNum
=
citSalaryAdvanceMapper
.
insertBatch
(
citSalaryAdvanceList
);
if
(
citSalaryAdvanceList
.
size
()>
0
){
int
insertBatchNum
=
citSalaryAdvanceMapper
.
insertBatch
(
citSalaryAdvanceList
);
}
//循环遍历成功导入的数据,组装日志记录实体并放入集合
for
(
Map
.
Entry
<
String
,
Integer
>
entry
:
companySuccessMap
.
entrySet
())
{
...
...
atms-dao/src/main/java/pwc/taxtech/atms/dao/CitSalaryAdvanceMapper.java
View file @
355c5d38
...
...
@@ -106,5 +106,5 @@ public interface CitSalaryAdvanceMapper extends MyMapper {
*/
int
updateByPrimaryKey
(
CitSalaryAdvance
record
);
int
insertBatch
(
List
<
CitSalaryAdvance
>
citSalaryAdvanceL
ist
);
int
insertBatch
(
List
<
CitSalaryAdvance
>
l
ist
);
}
\ No newline at end of file
atms-dao/src/main/resources/pwc/taxtech/atms/dao/extends/CitBSPrcAdjustExtendsMapper.xml
View file @
355c5d38
...
...
@@ -49,7 +49,7 @@
<otherwise>
0,
</otherwise>
</choose>
<choose>
<when
test=
"item.createBy != null"
>
#{item.create
d
By,jdbcType=VARCHAR},
</when>
<when
test=
"item.createBy != null"
>
#{item.createBy,jdbcType=VARCHAR},
</when>
<otherwise>
'',
</otherwise>
</choose>
<choose>
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/dao/extends/CitProfitPrcAdjustExtendsMapper.xml
View file @
355c5d38
...
...
@@ -49,7 +49,7 @@
<otherwise>
0,
</otherwise>
</choose>
<choose>
<when
test=
"item.createBy != null"
>
#{item.create
d
By,jdbcType=VARCHAR},
</when>
<when
test=
"item.createBy != null"
>
#{item.createBy,jdbcType=VARCHAR},
</when>
<otherwise>
'',
</otherwise>
</choose>
<choose>
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/dao/extends/CitSalaryAdvanceExtendsMapper.xml
View file @
355c5d38
...
...
@@ -29,8 +29,8 @@
<otherwise>
'',
</otherwise>
</choose>
<choose>
<when
test=
"item.poNo != null"
>
#{item.poNo,jdbcType=
INTEGE
R},
</when>
<otherwise>
0
,
</otherwise>
<when
test=
"item.poNo != null"
>
#{item.poNo,jdbcType=
VARCHA
R},
</when>
<otherwise>
''
,
</otherwise>
</choose>
<choose>
<when
test=
"item.poSubjectCode != null"
>
#{item.poSubjectCode,jdbcType=VARCHAR},
</when>
...
...
atms-web/src/main/webapp/app/common/controls/import/import-cit-bs-prc-adjust/import-cit-bs-prc-adjust.ctrl.js
View file @
355c5d38
...
...
@@ -170,16 +170,22 @@
}).
then
(
function
(
resp
)
{
$
(
'#busy-indicator-container'
).
hide
();
deferred
.
resolve
();
if
(
resp
.
data
)
{
if
(
resp
.
data
||
resp
.
result
)
{
logDto
.
UpdateState
=
$translate
.
instant
(
'ImportSuccess'
);
vatOperationLogService
.
addOperationLog
(
logDto
);
SweetAlert
.
success
(
$translate
.
instant
(
'ImportSuccess'
));
}
else
{
if
(
resp
.
message
&&
resp
.
message
.
length
>
0
)
{
SweetAlert
.
warning
(
$translate
.
instant
(
resp
.
message
));
}
else
{
SweetAlert
.
error
(
$translate
.
instant
(
'ImportFailed'
));
}
if
(
resp
.
resultMsg
&&
resp
.
resultMsg
.
length
>
0
)
{
SweetAlert
.
warning
(
$translate
.
instant
(
resp
.
resultMsg
));
}
else
{
SweetAlert
.
error
(
$translate
.
instant
(
'ImportFailed'
));
}
logDto
.
UpdateState
=
$translate
.
instant
(
'ImportFail'
);
vatOperationLogService
.
addOperationLog
(
logDto
);
}
...
...
@@ -395,7 +401,7 @@
ele1
.
datepicker
(
"setDate"
,
$scope
.
selectedDate
);
};
$scope
.
initCompanyList
=
function
()
{
var
initCompanyList
=
function
()
{
orgService
.
getOrgListByUserId
().
success
(
function
(
data
)
{
if
(
data
)
{
$scope
.
companyList
=
data
;
...
...
@@ -494,6 +500,7 @@
$scope
.
setGridStyle
=
setGridStyle
;
getUserPermission
();
initCompanyList
();
loadImportInfoDataGrid
();
initDatePicker
();
...
...
atms-web/src/main/webapp/app/common/controls/import/import-cit-draft-account-mapping/import-cit-draft-account-mapping.ctrl.js
View file @
355c5d38
...
...
@@ -162,7 +162,7 @@
}).
then
(
function
(
resp
)
{
$
(
'#busy-indicator-container'
).
hide
();
deferred
.
resolve
();
if
(
resp
.
data
)
{
if
(
resp
.
data
||
resp
.
result
)
{
logDto
.
UpdateState
=
$translate
.
instant
(
'ImportSuccess'
);
vatOperationLogService
.
addOperationLog
(
logDto
);
SweetAlert
.
success
(
$translate
.
instant
(
'ImportSuccess'
));
...
...
atms-web/src/main/webapp/app/common/controls/import/import-cit-eam-assets-disposal/import-cit-eam-assets-disposal.ctrl.js
View file @
355c5d38
...
...
@@ -161,7 +161,7 @@
}).
then
(
function
(
resp
)
{
$
(
'#busy-indicator-container'
).
hide
();
deferred
.
resolve
();
if
(
resp
.
data
)
{
if
(
resp
.
data
||
resp
.
result
)
{
logDto
.
UpdateState
=
$translate
.
instant
(
'ImportSuccess'
);
vatOperationLogService
.
addOperationLog
(
logDto
);
SweetAlert
.
success
(
$translate
.
instant
(
'ImportSuccess'
));
...
...
atms-web/src/main/webapp/app/common/controls/import/import-cit-profit-prc-adjust/import-cit-profit-prc-adjust.ctrl.js
View file @
355c5d38
...
...
@@ -170,7 +170,7 @@
}).
then
(
function
(
resp
)
{
$
(
'#busy-indicator-container'
).
hide
();
deferred
.
resolve
();
if
(
resp
.
data
)
{
if
(
resp
.
data
||
resp
.
result
)
{
logDto
.
UpdateState
=
$translate
.
instant
(
'ImportSuccess'
);
vatOperationLogService
.
addOperationLog
(
logDto
);
SweetAlert
.
success
(
$translate
.
instant
(
'ImportSuccess'
));
...
...
atms-web/src/main/webapp/app/common/controls/import/import-cit-salary-advance/import-cit-salary-advance.ctrl.js
View file @
355c5d38
...
...
@@ -171,7 +171,7 @@
}).
then
(
function
(
resp
)
{
$
(
'#busy-indicator-container'
).
hide
();
deferred
.
resolve
();
if
(
resp
.
data
)
{
if
(
resp
.
data
||
resp
.
result
)
{
logDto
.
UpdateState
=
$translate
.
instant
(
'ImportSuccess'
);
vatOperationLogService
.
addOperationLog
(
logDto
);
SweetAlert
.
success
(
$translate
.
instant
(
'ImportSuccess'
));
...
...
atms-web/src/main/webapp/app/common/controls/import/import-cit-trial-balance/import-cit-trial-balance.ctrl.js
View file @
355c5d38
...
...
@@ -173,7 +173,7 @@
}).
then
(
function
(
resp
)
{
$
(
'#busy-indicator-container'
).
hide
();
deferred
.
resolve
();
if
(
resp
.
data
)
{
if
(
resp
.
data
||
resp
.
result
)
{
logDto
.
UpdateState
=
$translate
.
instant
(
'ImportSuccess'
);
vatOperationLogService
.
addOperationLog
(
logDto
);
SweetAlert
.
success
(
$translate
.
instant
(
'ImportSuccess'
));
...
...
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