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
e890c39b
Commit
e890c39b
authored
Sep 29, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[dev] add project id form period standard acouunt
parent
bc398078
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
26 additions
and
143 deletions
+26
-143
SpringContextUtil.java
.../java/pwc/taxtech/atms/common/util/SpringContextUtil.java
+2
-2
ProjectServiceImpl.java
...ava/pwc/taxtech/atms/service/impl/ProjectServiceImpl.java
+0
-15
VatAbstractService.java
...pwc/taxtech/atms/vat/service/impl/VatAbstractService.java
+1
-1
FSJZ.java
.../taxtech/atms/vat/service/impl/report/functions/FSJZ.java
+4
-3
PeriodStandardAccountMapper.java
...pwc/taxtech/atms/vat/dao/PeriodStandardAccountMapper.java
+10
-1
VatStandardAccountMapper.java
...va/pwc/taxtech/atms/vat/dao/VatStandardAccountMapper.java
+0
-116
VatStandardAccountMapper.xml
...ces/pwc/taxtech/atms/vat/dao/VatStandardAccountMapper.xml
+0
-0
PeriodStandardAccountExtendsMapper.xml
...ms/vat/dao/extends/PeriodStandardAccountExtendsMapper.xml
+9
-5
No files found.
atms-api/src/main/java/pwc/taxtech/atms/common/util/SpringContextUtil.java
View file @
e890c39b
...
...
@@ -26,7 +26,7 @@ public class SpringContextUtil implements ApplicationContextAware {
public
static
PeriodCellTemplateMapper
periodCellTemplateMapper
;
public
static
ProjectServiceTypeMapper
projectServiceTypeMapper
;
public
static
PeriodTemplateMapper
periodTemplateMapper
;
public
static
VatStandardAccountMapper
vat
StandardAccountMapper
;
public
static
PeriodStandardAccountMapper
period
StandardAccountMapper
;
public
static
ProjectDao
projectDao
;
public
static
BalanceMapper
balanceMapper
;
public
static
DataSourceMapper
dataSourceMapper
;
...
...
@@ -66,7 +66,7 @@ public class SpringContextUtil implements ApplicationContextAware {
periodCellTemplateMapper
=
webApplicationContext
.
getBean
(
PeriodCellTemplateMapper
.
class
);
projectServiceTypeMapper
=
webApplicationContext
.
getBean
(
ProjectServiceTypeMapper
.
class
);
periodTemplateMapper
=
webApplicationContext
.
getBean
(
PeriodTemplateMapper
.
class
);
vatStandardAccountMapper
=
webApplicationContext
.
getBean
(
Vat
StandardAccountMapper
.
class
);
periodStandardAccountMapper
=
webApplicationContext
.
getBean
(
Period
StandardAccountMapper
.
class
);
projectDao
=
webApplicationContext
.
getBean
(
ProjectDao
.
class
);
balanceMapper
=
webApplicationContext
.
getBean
(
BalanceMapper
.
class
);
dataSourceMapper
=
webApplicationContext
.
getBean
(
DataSourceMapper
.
class
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/ProjectServiceImpl.java
View file @
e890c39b
...
...
@@ -2,7 +2,6 @@ package pwc.taxtech.atms.service.impl;
import
com.google.common.base.Predicate
;
import
com.google.common.collect.Lists
;
import
org.mybatis.spring.SqlSessionTemplate
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -15,7 +14,6 @@ import pwc.taxtech.atms.dao.ProjectClientMapper;
import
pwc.taxtech.atms.dao.ProjectMapper
;
import
pwc.taxtech.atms.dao.ProjectServiceTypeMapper
;
import
pwc.taxtech.atms.dao.ServiceTypeMapper
;
import
pwc.taxtech.atms.dao.StandardAccountMapper
;
import
pwc.taxtech.atms.dao.TemplateGroupMapper
;
import
pwc.taxtech.atms.dpo.ProjectDisplayDto
;
import
pwc.taxtech.atms.dto.FieldsMapper
;
...
...
@@ -26,9 +24,7 @@ import pwc.taxtech.atms.dto.taxadmin.AddProjectResult;
import
pwc.taxtech.atms.dto.taxadmin.ProjectYearParam
;
import
pwc.taxtech.atms.entity.*
;
import
pwc.taxtech.atms.entity.ProjectClientExample.Criteria
;
import
pwc.taxtech.atms.service.OperationLogService
;
import
pwc.taxtech.atms.service.ProjectService
;
import
pwc.taxtech.atms.vat.dao.VatStandardAccountMapper
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
...
...
@@ -64,17 +60,6 @@ public class ProjectServiceImpl implements ProjectService {
@Autowired
private
ProjectServiceTypeMapper
projectServiceTypeMapper
;
@Autowired
private
OperationLogService
operationLogService
;
@Autowired
private
SqlSessionTemplate
dynamicSqlSessionTemplate
;
@Autowired
private
StandardAccountMapper
standardAccountMapper
;
@Autowired
private
VatStandardAccountMapper
vatStandardAccountMapper
;
@Value
(
"${jdbc_admin_db}"
)
private
String
adminDbName
;
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/VatAbstractService.java
View file @
e890c39b
...
...
@@ -20,7 +20,7 @@ public class VatAbstractService {
@Autowired
public
VatEnterpriseAccountMapper
vatEnterpriseAccountMapper
;
@Autowired
public
VatStandardAccountMapper
vat
StandardAccountMapper
;
public
PeriodStandardAccountMapper
period
StandardAccountMapper
;
@Autowired
public
InputVatInvoiceMapper
inputVATInvoiceMapper
;
@Autowired
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/FSJZ.java
View file @
e890c39b
...
...
@@ -67,7 +67,8 @@ public class FSJZ extends FunctionBase implements FreeRefFunction {
if
(
accountType
==
0
)
{
//标准账套
VatStandardAccount
vatStandardAccount
=
SpringContextUtil
.
vatStandardAccountMapper
.
selectOneByAccountCode
(
accountCode
);
VatStandardAccount
vatStandardAccount
=
SpringContextUtil
.
periodStandardAccountMapper
.
selectOneByAccountCode
(
accountCode
,
formulaContext
.
getProjectId
());
if
(
vatStandardAccount
==
null
)
{
return
NumberEval
.
ZERO
;
}
...
...
@@ -132,7 +133,7 @@ public class FSJZ extends FunctionBase implements FreeRefFunction {
}
//todo: sava data
//save datasource
Long
dataSourceId
=
saveDataSource
(
ec
,
formulaDataSourceDtoList
,
FormulaDataSourceDetailType
.
BSPLFormulaDataSourceDto
,
val
,
period
,
formulaContext
.
getReportTemplateGroupId
());
Long
dataSourceId
=
saveDataSource
(
ec
,
formulaDataSourceDtoList
,
FormulaDataSourceDetailType
.
BSPLFormulaDataSourceDto
,
val
,
period
,
formulaContext
.
getReportTemplateGroupId
());
//save formulablock
saveFormulaBlock
(
period
,
ec
,
formulaExpression
,
val
,
dataSourceId
);
...
...
@@ -196,7 +197,7 @@ public class FSJZ extends FunctionBase implements FreeRefFunction {
//todo: sava data
//save datasource
Long
dataSourceId
=
saveDataSource
(
ec
,
dsList
,
FormulaDataSourceDetailType
.
BSPLFormulaDataSourceDto
,
val
,
period
,
formulaContext
.
getReportTemplateGroupId
());
period
,
formulaContext
.
getReportTemplateGroupId
());
//save formulablock
saveFormulaBlock
(
period
,
ec
,
formulaExpression
,
val
,
dataSourceId
);
return
new
NumberEval
(
val
.
doubleValue
());
...
...
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/PeriodStandardAccountMapper.java
View file @
e890c39b
package
pwc
.
taxtech
.
atms
.
vat
.
dao
;
import
java.util.List
;
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
;
import
java.util.List
;
@Mapper
public
interface
PeriodStandardAccountMapper
extends
MyVatMapper
{
...
...
@@ -105,4 +108,9 @@ public interface PeriodStandardAccountMapper extends MyVatMapper {
* @mbg.generated
*/
int
updateByPrimaryKey
(
PeriodStandardAccount
record
);
List
<
TrialBalanceDto
>
selectProjectStandardAccountLeftJoinBalanceStdManual
(
@Param
(
"fromMonth"
)
String
fromMonth
,
@Param
(
"toMonth"
)
String
toMonth
,
@Param
(
"projectId"
)
String
projectId
);
VatStandardAccount
selectOneByAccountCode
(
@Param
(
"accountCode"
)
String
accountCode
,
@Param
(
"projectId"
)
String
projectId
);
}
\ No newline at end of file
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/VatStandardAccountMapper.java
deleted
100644 → 0
View file @
bc398078
package
pwc
.
taxtech
.
atms
.
vat
.
dao
;
import
java.util.List
;
import
java.util.Map
;
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.VatStandardAccount
;
import
pwc.taxtech.atms.vat.entity.VatStandardAccountExample
;
@Mapper
public
interface
VatStandardAccountMapper
extends
MyVatMapper
{
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. StandardAccount
*
* @mbg.generated
*/
long
countByExample
(
VatStandardAccountExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. StandardAccount
*
* @mbg.generated
*/
int
deleteByExample
(
VatStandardAccountExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. StandardAccount
*
* @mbg.generated
*/
int
deleteByPrimaryKey
(
String
id
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. StandardAccount
*
* @mbg.generated
*/
int
insert
(
VatStandardAccount
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. StandardAccount
*
* @mbg.generated
*/
int
insertSelective
(
VatStandardAccount
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. StandardAccount
*
* @mbg.generated
*/
List
<
VatStandardAccount
>
selectByExampleWithRowbounds
(
VatStandardAccountExample
example
,
RowBounds
rowBounds
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. StandardAccount
*
* @mbg.generated
*/
List
<
VatStandardAccount
>
selectByExample
(
VatStandardAccountExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. StandardAccount
*
* @mbg.generated
*/
VatStandardAccount
selectByPrimaryKey
(
String
id
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. StandardAccount
*
* @mbg.generated
*/
int
updateByExampleSelective
(
@Param
(
"record"
)
VatStandardAccount
record
,
@Param
(
"example"
)
VatStandardAccountExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. StandardAccount
*
* @mbg.generated
*/
int
updateByExample
(
@Param
(
"record"
)
VatStandardAccount
record
,
@Param
(
"example"
)
VatStandardAccountExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. StandardAccount
*
* @mbg.generated
*/
int
updateByPrimaryKeySelective
(
VatStandardAccount
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table TAX_PROJECT. StandardAccount
*
* @mbg.generated
*/
int
updateByPrimaryKey
(
VatStandardAccount
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/VatStandardAccountMapper.xml
deleted
100644 → 0
View file @
bc398078
This diff is collapsed.
Click to expand it.
atms-dao/src/main/resources/pwc/taxtech/atms/vat/dao/extends/
Vat
StandardAccountExtendsMapper.xml
→
atms-dao/src/main/resources/pwc/taxtech/atms/vat/dao/extends/
Period
StandardAccountExtendsMapper.xml
View file @
e890c39b
<?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.
Vat
StandardAccountMapper"
>
<mapper
namespace=
"pwc.taxtech.atms.vat.dao.
Period
StandardAccountMapper"
>
<resultMap
id=
"TrialBalanceDto"
type=
"pwc.taxtech.atms.dto.vatdto.TrialBalanceDto"
>
<id
column=
"BalanceId"
jdbcType=
"VARCHAR"
property=
"balanceId"
/>
...
...
@@ -52,13 +52,14 @@
A.ACCT_PROP,
A.DIRECTION
FROM
STANDARD_ACCOUNT A
PERIOD_
STANDARD_ACCOUNT A
JOIN
BALANCE_STD_MANUAL B
PERIOD_
BALANCE_STD_MANUAL B
ON
A.`CODE` = B.ACCT_CODE
WHERE
1=1
AND A.PROJECT_ID= #{projectId,jdbcType=VARCHAR}
<if
test=
"fromMonth!=null"
>
AND B.PERIOD_ID
>
= #{fromMonth,jdbcType=VARCHAR}
</if>
...
...
@@ -73,9 +74,11 @@
SELECT
*
FROM
STANDARD_ACCOUNT A
PERIOD_
STANDARD_ACCOUNT A
WHERE
A.CODE= #{accountCode,jdbcType=VARCHAR} LIMIT 1
A.CODE= #{accountCode,jdbcType=VARCHAR}
AND A.PROJECT_ID= #{projectId,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