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
698f9c26
Commit
698f9c26
authored
Sep 29, 2018
by
frank.xa.zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add period_cell_comment replace cell_comment
parent
00112873
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
99 additions
and
7 deletions
+99
-7
SpringContextUtil.java
.../java/pwc/taxtech/atms/common/util/SpringContextUtil.java
+2
-0
CellCommentController.java
...va/pwc/taxtech/atms/controller/CellCommentController.java
+2
-1
CellCommentServiceImpl.java
...taxtech/atms/vat/service/impl/CellCommentServiceImpl.java
+4
-5
VatAbstractService.java
...pwc/taxtech/atms/vat/service/impl/VatAbstractService.java
+1
-1
FSJZ.java
.../taxtech/atms/vat/service/impl/report/functions/FSJZ.java
+1
-0
PeriodStandardAccountMapper.java
...pwc/taxtech/atms/vat/dao/PeriodStandardAccountMapper.java
+7
-0
PeriodStandardAccountExtendsMapper.xml
...ms/vat/dao/extends/PeriodStandardAccountExtendsMapper.xml
+82
-0
No files found.
atms-api/src/main/java/pwc/taxtech/atms/common/util/SpringContextUtil.java
View file @
698f9c26
...
...
@@ -27,6 +27,7 @@ public class SpringContextUtil implements ApplicationContextAware {
public
static
ProjectServiceTypeMapper
projectServiceTypeMapper
;
public
static
PeriodTemplateMapper
periodTemplateMapper
;
public
static
VatStandardAccountMapper
vatStandardAccountMapper
;
public
static
PeriodStandardAccountMapper
periodStandardAccountMapper
;
public
static
ProjectDao
projectDao
;
public
static
BalanceMapper
balanceMapper
;
public
static
DataSourceMapper
dataSourceMapper
;
...
...
@@ -67,6 +68,7 @@ public class SpringContextUtil implements ApplicationContextAware {
projectServiceTypeMapper
=
webApplicationContext
.
getBean
(
ProjectServiceTypeMapper
.
class
);
periodTemplateMapper
=
webApplicationContext
.
getBean
(
PeriodTemplateMapper
.
class
);
vatStandardAccountMapper
=
webApplicationContext
.
getBean
(
VatStandardAccountMapper
.
class
);
periodStandardAccountMapper
=
webApplicationContext
.
getBean
(
PeriodStandardAccountMapper
.
class
);
projectDao
=
webApplicationContext
.
getBean
(
ProjectDao
.
class
);
balanceMapper
=
webApplicationContext
.
getBean
(
BalanceMapper
.
class
);
dataSourceMapper
=
webApplicationContext
.
getBean
(
DataSourceMapper
.
class
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/CellCommentController.java
View file @
698f9c26
...
...
@@ -8,6 +8,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import
org.springframework.web.bind.annotation.RestController
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.vat.entity.CellComment
;
import
pwc.taxtech.atms.vat.entity.PeriodCellComment
;
import
pwc.taxtech.atms.vat.service.impl.CellCommentServiceImpl
;
import
java.util.List
;
...
...
@@ -20,7 +21,7 @@ public class CellCommentController {
CellCommentServiceImpl
cellCommentService
;
@RequestMapping
(
value
=
"List"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
OperationResultDto
<
List
<
CellComment
>>
getCellComments
(
@RequestParam
(
"cellDataId"
)
Optional
<
Long
>
cellDataId
)
{
public
OperationResultDto
<
List
<
Period
CellComment
>>
getCellComments
(
@RequestParam
(
"cellDataId"
)
Optional
<
Long
>
cellDataId
)
{
return
cellCommentService
.
getCellComments
(
cellDataId
);
}
}
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/CellCommentServiceImpl.java
View file @
698f9c26
...
...
@@ -2,15 +2,14 @@ package pwc.taxtech.atms.vat.service.impl;
import
org.springframework.stereotype.Service
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.vat.entity.CellComment
;
import
pwc.taxtech.atms.vat.entity.CellCommentExample
;
import
pwc.taxtech.atms.vat.entity.*
;
import
java.util.List
;
import
java.util.Optional
;
@Service
public
class
CellCommentServiceImpl
extends
VatAbstractService
{
public
OperationResultDto
<
List
<
CellComment
>>
getCellComments
(
Optional
<
Long
>
cellDataId
)
{
public
OperationResultDto
<
List
<
Period
CellComment
>>
getCellComments
(
Optional
<
Long
>
cellDataId
)
{
OperationResultDto
resultDto
=
new
OperationResultDto
();
try
{
if
(!
cellDataId
.
isPresent
()
||
cellDataId
.
get
()
==
0L
)
{
...
...
@@ -19,9 +18,9 @@ public class CellCommentServiceImpl extends VatAbstractService {
return
resultDto
;
}
CellCommentExample
example
=
new
CellCommentExample
();
PeriodCellCommentExample
example
=
new
Period
CellCommentExample
();
example
.
createCriteria
().
andCellDataIdEqualTo
(
cellDataId
.
get
());
List
<
CellComment
>
cellComments
=
c
ellCommentMapper
.
selectByExample
(
example
);
List
<
PeriodCellComment
>
cellComments
=
periodC
ellCommentMapper
.
selectByExample
(
example
);
resultDto
.
setResult
(
true
);
resultDto
.
setData
(
cellComments
);
}
catch
(
Exception
ex
)
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/VatAbstractService.java
View file @
698f9c26
...
...
@@ -78,7 +78,7 @@ public class VatAbstractService {
@Autowired
public
ModifiedReportCellMapper
modifiedReportCellMapper
;
@Autowired
public
CellCommentMapper
c
ellCommentMapper
;
public
PeriodCellCommentMapper
periodC
ellCommentMapper
;
@Autowired
public
KeyValueConfigMapper
keyValueConfigMapper
;
@Autowired
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/FSJZ.java
View file @
698f9c26
...
...
@@ -68,6 +68,7 @@ public class FSJZ extends FunctionBase implements FreeRefFunction {
if
(
accountType
==
0
)
{
//标准账套
VatStandardAccount
vatStandardAccount
=
SpringContextUtil
.
vatStandardAccountMapper
.
selectOneByAccountCode
(
accountCode
);
//VatStandardAccount vatStandardAccount = SpringContextUtil.periodStandardAccountMapper.selectOneByAccountCode(accountCode);
if
(
vatStandardAccount
==
null
)
{
return
NumberEval
.
ZERO
;
}
...
...
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/PeriodStandardAccountMapper.java
View file @
698f9c26
...
...
@@ -5,8 +5,10 @@ import org.apache.ibatis.annotations.Mapper;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.session.RowBounds
;
import
pwc.taxtech.atms.MyVatMapper
;
import
pwc.taxtech.atms.vat.dpo.TrialBalanceDto
;
import
pwc.taxtech.atms.vat.entity.PeriodStandardAccount
;
import
pwc.taxtech.atms.vat.entity.PeriodStandardAccountExample
;
import
pwc.taxtech.atms.vat.entity.VatStandardAccount
;
@Mapper
public
interface
PeriodStandardAccountMapper
extends
MyVatMapper
{
...
...
@@ -105,4 +107,8 @@ public interface PeriodStandardAccountMapper extends MyVatMapper {
* @mbg.generated
*/
int
updateByPrimaryKey
(
PeriodStandardAccount
record
);
List
<
TrialBalanceDto
>
selectProjectStandardAccountLeftJoinBalanceStdManual
(
@Param
(
"fromMonth"
)
String
fromMonth
,
@Param
(
"toMonth"
)
String
toMonth
);
VatStandardAccount
selectOneByAccountCode
(
@Param
(
"accountCode"
)
String
accountCode
);
}
\ No newline at end of file
atms-dao/src/main/resources/pwc/taxtech/atms/vat/dao/extends/PeriodStandardAccountExtendsMapper.xml
0 → 100644
View file @
698f9c26
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"pwc.taxtech.atms.vat.dao.PeriodStandardAccountMapper"
>
<resultMap
id=
"TrialBalanceDto"
type=
"pwc.taxtech.atms.vat.dpo.TrialBalanceDto"
>
<id
column=
"BalanceId"
jdbcType=
"VARCHAR"
property=
"balanceId"
/>
<result
column=
"PERIOD_ID"
jdbcType=
"INTEGER"
property=
"periodId"
/>
<result
column=
"ACCT_CODE"
jdbcType=
"VARCHAR"
property=
"acctCode"
/>
<result
column=
"CUSTOMER_CODE"
jdbcType=
"VARCHAR"
property=
"customerCode"
/>
<result
column=
"BEG_DEBIT_BAL"
jdbcType=
"DECIMAL"
property=
"begDebitBal"
/>
<result
column=
"BEG_BAL"
jdbcType=
"DECIMAL"
property=
"begBal"
/>
<result
column=
"END_BAL"
jdbcType=
"DECIMAL"
property=
"endBal"
/>
<result
column=
"END_DEBIT_BAL"
jdbcType=
"DECIMAL"
property=
"endDebitBal"
/>
<result
column=
"END_CREDIT_BAL"
jdbcType=
"DECIMAL"
property=
"endCreditBal"
/>
<result
column=
"DEBIT_BAL"
jdbcType=
"DECIMAL"
property=
"debitBal"
/>
<result
column=
"CREDIT_BAL"
jdbcType=
"DECIMAL"
property=
"creditBal"
/>
<result
column=
"MONTH_ID"
jdbcType=
"INTEGER"
property=
"monthId"
/>
<result
column=
"YEAR_DEBIT_BAL"
jdbcType=
"DECIMAL"
property=
"yearDebitBal"
/>
<result
column=
"PARENT_CODE"
jdbcType=
"VARCHAR"
property=
"parentCode"
/>
<result
column=
"ACCOUNT_NAME"
jdbcType=
"VARCHAR"
property=
"accountName"
/>
<result
column=
"IS_DUPLICATE"
jdbcType=
"SMALLINT"
property=
"isDuplicate"
/>
<result
column=
"ACCT_PROP"
jdbcType=
"INTEGER"
property=
"acctProp"
/>
<result
column=
"DIRECTION"
jdbcType=
"INTEGER"
property=
"direction"
/>
</resultMap>
<select
id=
"selectProjectStandardAccountLeftJoinBalanceStdManual"
resultMap=
"TrialBalanceDto"
>
SELECT DISTINCT
B.PERIOD_ID,
B.ACCT_CODE,
'' AS CUSTOMER_CODE,
B.BEG_DEBIT_BAL,
B.BEG_CREDIT_BAL,
B.BEG_BAL,
B.END_BAL,
B.END_DEBIT_BAL,
B.END_CREDIT_BAL,
B.DEBIT_BAL,
B.CREDIT_BAL,
B.PERIOD_ID AS MONTH_ID,
B.YEAR_DEBIT_BAL,
B.YEAR_CREDIT_BAL,
IF (
ISNULL (
A.PARENT_CODE
)
|| A.PARENT_CODE = '',
'0',
A.PARENT_CODE
)
AS PARENT_CODE,
A.`_NAME_` AS ACCOUNT_NAME,
A.ACCT_PROP,
A.DIRECTION
FROM
STANDARD_ACCOUNT A
JOIN
BALANCE_STD_MANUAL B
ON
A.`CODE` = B.ACCT_CODE
WHERE
1=1
<if
test=
"fromMonth!=null"
>
AND B.PERIOD_ID
>
= #{fromMonth,jdbcType=VARCHAR}
</if>
<if
test=
"toMonth!=null"
>
AND B.PERIOD_ID
<
= #{toMonth,jdbcType=VARCHAR}
</if>
ORDER BY
B.PERIOD_ID
</select>
<select
id=
"selectOneByAccountCode"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
SELECT
*
FROM
STANDARD_ACCOUNT A
WHERE
A.CODE= #{accountCode,jdbcType=VARCHAR} LIMIT 1
</select>
</mapper>
\ No newline at end of file
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