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
c4b1d76d
Commit
c4b1d76d
authored
Mar 12, 2019
by
gary
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、机构信息同步定时任务
parent
34b99b79
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
621 additions
and
40 deletions
+621
-40
OrgSyncJob.java
...ain/java/pwc/taxtech/atms/common/schedule/OrgSyncJob.java
+84
-0
HttpUtil.java
.../src/main/java/pwc/taxtech/atms/common/util/HttpUtil.java
+8
-5
DDSyncOrgInfo.java
...java/pwc/taxtech/atms/dto/organization/DDSyncOrgInfo.java
+63
-0
OrgSyncData.java
...n/java/pwc/taxtech/atms/dto/organization/OrgSyncData.java
+181
-0
applicationContext-job.xml
atms-api/src/main/resources/applicationContext-job.xml
+16
-0
applicationContext-security.xml
atms-api/src/main/resources/applicationContext-security.xml
+1
-0
conf.properties
atms-api/src/main/resources/conf/conf.properties
+4
-0
conf_profile_dev.properties
atms-api/src/main/resources/conf/conf_profile_dev.properties
+3
-0
conf_profile_pub.properties
atms-api/src/main/resources/conf/conf_profile_pub.properties
+5
-2
ddOrgJson.json
atms-api/src/main/resources/orgImport/ddOrgJson.json
+0
-0
DataInitTest.java
...test/java/pwc/taxtech/atms/service/impl/DataInitTest.java
+34
-1
Organization.java
...o/src/main/java/pwc/taxtech/atms/entity/Organization.java
+152
-27
OrganizationExample.java
...ain/java/pwc/taxtech/atms/entity/OrganizationExample.java
+0
-0
OrganizationMapper.xml
...ain/resources/pwc/taxtech/atms/dao/OrganizationMapper.xml
+70
-5
No files found.
atms-api/src/main/java/pwc/taxtech/atms/common/schedule/OrgSyncJob.java
0 → 100644
View file @
c4b1d76d
package
pwc
.
taxtech
.
atms
.
common
.
schedule
;
import
com.alibaba.fastjson.JSONObject
;
import
org.quartz.JobDataMap
;
import
org.quartz.JobExecutionContext
;
import
org.quartz.JobExecutionException
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.quartz.QuartzJobBean
;
import
pwc.taxtech.atms.common.util.HttpUtil
;
import
pwc.taxtech.atms.dao.OrganizationMapper
;
import
pwc.taxtech.atms.dao.RegionMapper
;
import
pwc.taxtech.atms.dto.organization.DDSyncOrgInfo
;
import
pwc.taxtech.atms.dto.organization.OrgSyncData
;
import
pwc.taxtech.atms.entity.Organization
;
import
pwc.taxtech.atms.entity.OrganizationExample
;
import
pwc.taxtech.atms.entity.Region
;
import
pwc.taxtech.atms.entity.RegionExample
;
import
javax.annotation.Resource
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
public
class
OrgSyncJob
extends
QuartzJobBean
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
OrgSyncJob
.
class
);
@Resource
private
OrganizationMapper
organizationMapper
;
@Resource
private
RegionMapper
regionMapper
;
@Autowired
private
OrganizationMapper
orgMapper
;
@Value
(
"${org_sync_url}"
)
private
String
orgSyncUrl
;
@Value
(
"${org_sync_token}"
)
private
String
token
;
@Override
protected
void
executeInternal
(
JobExecutionContext
jobExecutionContext
)
throws
JobExecutionException
{
JobDataMap
dataMap
=
jobExecutionContext
.
getJobDetail
().
getJobDataMap
();
Map
<
String
,
String
>
headers
=
new
HashMap
<>();
headers
.
put
(
"token"
,
token
);
headers
.
put
(
"Content-Type"
,
"application/x-www-form-urlencoded"
);
try
{
// todo 这里要加分页查询的参数
String
response
=
HttpUtil
.
get
(
orgSyncUrl
,
headers
);
DDSyncOrgInfo
ddSyncOrgInfo
=
JSONObject
.
parseObject
(
response
,
DDSyncOrgInfo
.
class
);
List
<
OrgSyncData
>
orgSyncDatas
=
ddSyncOrgInfo
.
getData
();
orgSyncDatas
.
forEach
(
osd
->
{
OrganizationExample
example
=
new
OrganizationExample
();
example
.
createCriteria
().
andNameEqualTo
(
osd
.
getNameCN
());
Organization
o
=
new
Organization
();
o
.
setClientCode
(
osd
.
getCode
());
o
.
setCode
(
osd
.
getCode
());
o
.
setEnterpriseAccountCode
(
String
.
valueOf
(
osd
.
getSobId
()));
o
.
setEnterpriseAccountName
(
osd
.
getSobName
());
o
.
setCurrencyCode
(
osd
.
getCurrencyCode
());
o
.
setLegalEntity
(
osd
.
getLegalEntity
());
o
.
setLegalPersonName
(
osd
.
getLegalRepresentative
());
o
.
setAddress
(
osd
.
getAddress
());
o
.
setCreateTime
(
osd
.
getGmtCreate
());
o
.
setUpdateTime
(
osd
.
getGmtModified
());
o
.
setPsCode
(
osd
.
getPsCode
());
RegionExample
regionExample
=
new
RegionExample
();
regionExample
.
createCriteria
().
andShortNameEqualTo
(
osd
.
getCompanyLocation
());
List
<
Region
>
regions
=
regionMapper
.
selectByExample
(
regionExample
);
if
(
regions
.
size
()
>
0
)
{
o
.
setRegionId
(
regions
.
get
(
0
).
getId
());
}
organizationMapper
.
updateByExampleSelective
(
o
,
example
);
});
}
catch
(
Exception
e
)
{
logger
.
error
(
String
.
format
(
"机构信息同步异常:[%s]"
,
e
.
getMessage
()),
e
);
}
}
}
atms-api/src/main/java/pwc/taxtech/atms/common/util/HttpUtil.java
View file @
c4b1d76d
...
@@ -76,12 +76,12 @@ public class HttpUtil {
...
@@ -76,12 +76,12 @@ public class HttpUtil {
return
postForm
(
url
,
params
,
null
,
connTimeout
,
readTimeout
);
return
postForm
(
url
,
params
,
null
,
connTimeout
,
readTimeout
);
}
}
public
static
String
get
(
String
url
)
throws
Exception
{
public
static
String
get
(
String
url
,
Map
<
String
,
String
>
headers
)
throws
Exception
{
return
get
(
url
,
charset
,
null
,
null
);
return
get
(
url
,
headers
,
charset
,
null
,
null
);
}
}
public
static
String
get
(
String
url
,
String
charset
)
throws
Exception
{
public
static
String
get
(
String
url
,
Map
<
String
,
String
>
headers
,
String
charset
)
throws
Exception
{
return
get
(
url
,
charset
,
connTimeout
,
readTimeout
);
return
get
(
url
,
headers
,
charset
,
connTimeout
,
readTimeout
);
}
}
/**
/**
...
@@ -216,7 +216,7 @@ public class HttpUtil {
...
@@ -216,7 +216,7 @@ public class HttpUtil {
* @throws SocketTimeoutException 响应超时
* @throws SocketTimeoutException 响应超时
* @throws Exception
* @throws Exception
*/
*/
public
static
String
get
(
String
url
,
String
charset
,
Integer
connTimeout
,
Integer
readTimeout
)
public
static
String
get
(
String
url
,
Map
<
String
,
String
>
headers
,
String
charset
,
Integer
connTimeout
,
Integer
readTimeout
)
throws
ConnectTimeoutException
,
SocketTimeoutException
,
Exception
{
throws
ConnectTimeoutException
,
SocketTimeoutException
,
Exception
{
HttpClient
client
=
null
;
HttpClient
client
=
null
;
...
@@ -231,6 +231,9 @@ public class HttpUtil {
...
@@ -231,6 +231,9 @@ public class HttpUtil {
if
(
readTimeout
!=
null
)
{
if
(
readTimeout
!=
null
)
{
customReqConf
.
setSocketTimeout
(
readTimeout
);
customReqConf
.
setSocketTimeout
(
readTimeout
);
}
}
headers
.
forEach
((
k
,
v
)->{
get
.
setHeader
(
k
,
v
);
});
get
.
setConfig
(
customReqConf
.
build
());
get
.
setConfig
(
customReqConf
.
build
());
HttpResponse
res
=
null
;
HttpResponse
res
=
null
;
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/organization/DDSyncOrgInfo.java
0 → 100644
View file @
c4b1d76d
package
pwc
.
taxtech
.
atms
.
dto
.
organization
;
import
java.util.List
;
/**
* @Auther: Gary J Li
* @Date: 12/03/2019 11:23
* @Description:
*/
public
class
DDSyncOrgInfo
{
private
List
<
OrgSyncData
>
data
;
private
int
currentPage
;
private
int
pageSize
;
private
int
totalPage
;
private
int
totalCount
;
public
void
setData
(
List
<
OrgSyncData
>
data
)
{
this
.
data
=
data
;
}
public
List
<
OrgSyncData
>
getData
()
{
return
data
;
}
public
void
setCurrentPage
(
int
currentPage
)
{
this
.
currentPage
=
currentPage
;
}
public
int
getCurrentPage
()
{
return
currentPage
;
}
public
void
setPageSize
(
int
pageSize
)
{
this
.
pageSize
=
pageSize
;
}
public
int
getPageSize
()
{
return
pageSize
;
}
public
void
setTotalPage
(
int
totalPage
)
{
this
.
totalPage
=
totalPage
;
}
public
int
getTotalPage
()
{
return
totalPage
;
}
public
void
setTotalCount
(
int
totalCount
)
{
this
.
totalCount
=
totalCount
;
}
public
int
getTotalCount
()
{
return
totalCount
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/dto/organization/OrgSyncData.java
0 → 100644
View file @
c4b1d76d
package
pwc
.
taxtech
.
atms
.
dto
.
organization
;
import
java.util.Date
;
/**
* @Auther: Gary J Li
* @Date: 12/03/2019 11:26
* @Description:
*/
public
class
OrgSyncData
{
private
String
id
;
private
String
code
;
private
String
commonValueId
;
private
String
nameCN
;
private
int
orgId
;
private
String
orgName
;
private
int
sobId
;
private
String
sobName
;
private
String
currencyCode
;
private
String
legalEntity
;
private
String
legalRepresentative
;
private
String
address
;
private
String
registrationFromDate
;
private
Date
gmtCreate
;
private
Date
gmtModified
;
private
String
psCode
;
private
String
companyLocation
;
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
String
getId
()
{
return
id
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCommonValueId
(
String
commonValueId
)
{
this
.
commonValueId
=
commonValueId
;
}
public
String
getCommonValueId
()
{
return
commonValueId
;
}
public
void
setNameCN
(
String
nameCN
)
{
this
.
nameCN
=
nameCN
;
}
public
String
getNameCN
()
{
return
nameCN
;
}
public
void
setOrgId
(
int
orgId
)
{
this
.
orgId
=
orgId
;
}
public
int
getOrgId
()
{
return
orgId
;
}
public
void
setOrgName
(
String
orgName
)
{
this
.
orgName
=
orgName
;
}
public
String
getOrgName
()
{
return
orgName
;
}
public
void
setSobId
(
int
sobId
)
{
this
.
sobId
=
sobId
;
}
public
int
getSobId
()
{
return
sobId
;
}
public
void
setSobName
(
String
sobName
)
{
this
.
sobName
=
sobName
;
}
public
String
getSobName
()
{
return
sobName
;
}
public
void
setCurrencyCode
(
String
currencyCode
)
{
this
.
currencyCode
=
currencyCode
;
}
public
String
getCurrencyCode
()
{
return
currencyCode
;
}
public
void
setLegalEntity
(
String
legalEntity
)
{
this
.
legalEntity
=
legalEntity
;
}
public
String
getLegalEntity
()
{
return
legalEntity
;
}
public
void
setLegalRepresentative
(
String
legalRepresentative
)
{
this
.
legalRepresentative
=
legalRepresentative
;
}
public
String
getLegalRepresentative
()
{
return
legalRepresentative
;
}
public
void
setAddress
(
String
address
)
{
this
.
address
=
address
;
}
public
String
getAddress
()
{
return
address
;
}
public
void
setRegistrationFromDate
(
String
registrationFromDate
)
{
this
.
registrationFromDate
=
registrationFromDate
;
}
public
String
getRegistrationFromDate
()
{
return
registrationFromDate
;
}
public
void
setGmtCreate
(
Date
gmtCreate
)
{
this
.
gmtCreate
=
gmtCreate
;
}
public
Date
getGmtCreate
()
{
return
gmtCreate
;
}
public
void
setGmtModified
(
Date
gmtModified
)
{
this
.
gmtModified
=
gmtModified
;
}
public
Date
getGmtModified
()
{
return
gmtModified
;
}
public
void
setPsCode
(
String
psCode
)
{
this
.
psCode
=
psCode
;
}
public
String
getPsCode
()
{
return
psCode
;
}
public
void
setCompanyLocation
(
String
companyLocation
)
{
this
.
companyLocation
=
companyLocation
;
}
public
String
getCompanyLocation
()
{
return
companyLocation
;
}
}
atms-api/src/main/resources/applicationContext-job.xml
View file @
c4b1d76d
...
@@ -35,11 +35,13 @@
...
@@ -35,11 +35,13 @@
<property
name=
"triggers"
>
<property
name=
"triggers"
>
<list>
<list>
<ref
bean=
"lgApiJobTrigger"
/>
<ref
bean=
"lgApiJobTrigger"
/>
<ref
bean=
"orgSyncJobTrigger"
/>
</list>
</list>
</property>
</property>
<property
name=
"jobDetails"
>
<property
name=
"jobDetails"
>
<list>
<list>
<ref
bean=
"lgGlBalanceJob"
/>
<ref
bean=
"lgGlBalanceJob"
/>
<ref
bean=
"orgSyncJob"
/>
</list>
</list>
</property>
</property>
<property
name=
"taskExecutor"
ref=
"executor"
/>
<property
name=
"taskExecutor"
ref=
"executor"
/>
...
@@ -59,5 +61,18 @@
...
@@ -59,5 +61,18 @@
<property
name=
"cronExpression"
value=
"0 0 1 3 * ?"
/>
<property
name=
"cronExpression"
value=
"0 0 1 3 * ?"
/>
</bean>
</bean>
<bean
name=
"orgSyncJob"
class=
"org.springframework.scheduling.quartz.JobDetailFactoryBean"
>
<property
name=
"jobClass"
value=
"pwc.taxtech.atms.common.schedule.OrgSyncJob"
/>
<property
name=
"durability"
value=
"true"
/>
<property
name=
"requestsRecovery"
value=
"false"
/>
<property
name=
"description"
value=
"机构信息同步"
/>
</bean>
<!-- 每月1日执行一次-->
<bean
id=
"orgSyncJobTrigger"
class=
"org.springframework.scheduling.quartz.CronTriggerFactoryBean"
>
<property
name=
"jobDetail"
ref=
"orgSyncJob"
/>
<property
name=
"cronExpression"
value=
"0 0 0 1 * ?"
/>
</bean>
<!-- 分布式事务配置 end -->
<!-- 分布式事务配置 end -->
</beans>
</beans>
\ No newline at end of file
atms-api/src/main/resources/applicationContext-security.xml
View file @
c4b1d76d
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
<intercept-url
pattern=
"/api/v1/cache/getallcache"
access=
"permitAll"
/>
<intercept-url
pattern=
"/api/v1/cache/getallcache"
access=
"permitAll"
/>
<intercept-url
pattern=
"/api/v1/user/login"
access=
"permitAll"
/>
<intercept-url
pattern=
"/api/v1/user/login"
access=
"permitAll"
/>
<intercept-url
pattern=
"/api/v1/approval/**"
access=
"permitAll"
/>
<intercept-url
pattern=
"/api/v1/approval/**"
access=
"permitAll"
/>
<intercept-url
pattern=
"/ebs/api/v1/dd/**"
access=
"permitAll"
/>
<intercept-url
pattern=
"/api/**"
access=
"authenticated"
/>
<intercept-url
pattern=
"/api/**"
access=
"authenticated"
/>
<intercept-url
pattern=
"/**"
access=
"permitAll"
/>
<intercept-url
pattern=
"/**"
access=
"permitAll"
/>
<headers>
<headers>
...
...
atms-api/src/main/resources/conf/conf.properties
View file @
c4b1d76d
...
@@ -53,3 +53,6 @@ get_user_info_url=${get_user_info_url}
...
@@ -53,3 +53,6 @@ get_user_info_url=${get_user_info_url}
app_id
=
${app_id}
app_id
=
${app_id}
app_key
=
${app_key}
app_key
=
${app_key}
cookie.maxAgeSeconds
=
${cookie.maxAgeSeconds}
cookie.maxAgeSeconds
=
${cookie.maxAgeSeconds}
api_white_list
=
${api_white_list}
org_sync_url
=
${org_sync_url}
org_sync_token
=
${org_sync_token}
\ No newline at end of file
atms-api/src/main/resources/conf/conf_profile_dev.properties
View file @
c4b1d76d
...
@@ -51,3 +51,6 @@ get_user_info_url=http://mis-test.diditaxi.com.cn/auth/sso/api/
...
@@ -51,3 +51,6 @@ get_user_info_url=http://mis-test.diditaxi.com.cn/auth/sso/api/
app_id
=
2500
app_id
=
2500
app_key
=
983258e7fd04d7fa0534735f7b1c33f3
app_key
=
983258e7fd04d7fa0534735f7b1c33f3
cookie.maxAgeSeconds
=
86400
cookie.maxAgeSeconds
=
86400
api_white_list
=
/ebs/api/v1/dd;
org_sync_url
=
http://10.96.238.10/erp-main-data-test-v2/api/companies
org_sync_token
=
174af08f
atms-api/src/main/resources/conf/conf_profile_pub.properties
View file @
c4b1d76d
...
@@ -53,4 +53,7 @@ check_ticket=true
...
@@ -53,4 +53,7 @@ check_ticket=true
get_user_info_url
=
http://mis.diditaxi.com.cn/auth/sso/api/
get_user_info_url
=
http://mis.diditaxi.com.cn/auth/sso/api/
app_id
=
2500
app_id
=
2500
app_key
=
983258e7fd04d7fa0534735f7b1c33f3
app_key
=
983258e7fd04d7fa0534735f7b1c33f3
cookie.maxAgeSeconds
=
18000
cookie.maxAgeSeconds
=
18000
\ No newline at end of file
api_white_list
=
/ebs/api/v1/dd;
org_sync_url
=
http://10.96.238.10/erp-main-data-test-v2/api/companies
org_sync_token
=
174af08f
\ No newline at end of file
atms-api/src/main/resources/orgImport/ddOrgJson.json
0 → 100644
View file @
c4b1d76d
This diff is collapsed.
Click to expand it.
atms-api/src/test/java/pwc/taxtech/atms/service/impl/DataInitTest.java
View file @
c4b1d76d
...
@@ -17,6 +17,8 @@ import pwc.taxtech.atms.common.message.LogMessage;
...
@@ -17,6 +17,8 @@ import pwc.taxtech.atms.common.message.LogMessage;
import
pwc.taxtech.atms.common.util.DateUtils
;
import
pwc.taxtech.atms.common.util.DateUtils
;
import
pwc.taxtech.atms.constant.enums.NationalEconomicIndustryEnum
;
import
pwc.taxtech.atms.constant.enums.NationalEconomicIndustryEnum
;
import
pwc.taxtech.atms.dao.*
;
import
pwc.taxtech.atms.dao.*
;
import
pwc.taxtech.atms.dto.organization.DDSyncOrgInfo
;
import
pwc.taxtech.atms.dto.organization.OrgSyncData
;
import
pwc.taxtech.atms.entity.*
;
import
pwc.taxtech.atms.entity.*
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
...
@@ -397,12 +399,43 @@ public class DataInitTest extends CommonIT {
...
@@ -397,12 +399,43 @@ public class DataInitTest extends CommonIT {
@Test
@Test
public
void
syncOrg
(){
public
void
syncOrg
(){
List
<
String
>
taxPayNums
=
organizationMapper
.
selectByExample
(
new
OrganizationExample
()).
stream
().
map
(
Organization:
:
getTaxPayerNumber
).
collect
(
Collectors
.
toList
());
/**
/**
* 1、taxPayNums http 滴滴oa接口同步机构的信息
* 1、taxPayNums http 滴滴oa接口同步机构的信息
* 2、逐条update,记录更新失败或未更新上的taxPayNum
* 2、逐条update,记录更新失败或未更新上的taxPayNum
* 3、失败的再次处理
* 3、失败的再次处理
*/
*/
String
input
=
""
;
try
{
File
targetFile
=
new
File
(
"src/main/resources/orgImport/ddOrgJson.json"
);
input
=
FileUtils
.
readFileToString
(
targetFile
,
"UTF-8"
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
DDSyncOrgInfo
ddSyncOrgInfo
=
JSONObject
.
parseObject
(
input
,
DDSyncOrgInfo
.
class
);
List
<
OrgSyncData
>
orgSyncDatas
=
ddSyncOrgInfo
.
getData
();
orgSyncDatas
.
forEach
(
osd
->
{
OrganizationExample
example
=
new
OrganizationExample
();
example
.
createCriteria
().
andNameEqualTo
(
osd
.
getNameCN
());
Organization
o
=
new
Organization
();
o
.
setClientCode
(
osd
.
getCode
());
o
.
setCode
(
osd
.
getCode
());
o
.
setEnterpriseAccountCode
(
String
.
valueOf
(
osd
.
getSobId
()));
o
.
setEnterpriseAccountName
(
osd
.
getSobName
());
o
.
setCurrencyCode
(
osd
.
getCurrencyCode
());
o
.
setLegalEntity
(
osd
.
getLegalEntity
());
o
.
setLegalPersonName
(
osd
.
getLegalRepresentative
());
o
.
setAddress
(
osd
.
getAddress
());
o
.
setCreateTime
(
osd
.
getGmtCreate
());
o
.
setUpdateTime
(
osd
.
getGmtModified
());
o
.
setPsCode
(
osd
.
getPsCode
());
RegionExample
regionExample
=
new
RegionExample
();
regionExample
.
createCriteria
().
andShortNameEqualTo
(
osd
.
getCompanyLocation
());
List
<
Region
>
regions
=
regionMapper
.
selectByExample
(
regionExample
);
if
(
regions
.
size
()
>
0
)
{
o
.
setRegionId
(
regions
.
get
(
0
).
getId
());
}
organizationMapper
.
updateByExampleSelective
(
o
,
example
);
});
}
}
private
void
setProperty
(
Object
obj
,
String
propertyName
,
Object
value
)
{
private
void
setProperty
(
Object
obj
,
String
propertyName
,
Object
value
)
{
...
...
atms-dao/src/main/java/pwc/taxtech/atms/entity/Organization.java
View file @
c4b1d76d
...
@@ -482,8 +482,6 @@ public class Organization extends BaseEntity implements Serializable {
...
@@ -482,8 +482,6 @@ public class Organization extends BaseEntity implements Serializable {
*/
*/
private
Boolean
engageNationalProhibitIndustry
;
private
Boolean
engageNationalProhibitIndustry
;
private
String
enterpriseAccountCode
;
/**
/**
* Database Column Remarks:
* Database Column Remarks:
* 注销时间。
* 注销时间。
...
@@ -495,6 +493,59 @@ public class Organization extends BaseEntity implements Serializable {
...
@@ -495,6 +493,59 @@ public class Organization extends BaseEntity implements Serializable {
*/
*/
private
Date
logoutTime
;
private
Date
logoutTime
;
/**
* Database Column Remarks:
* 账套ID(DD)
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column organization.enterprise_account_code
*
* @mbg.generated
*/
private
String
enterpriseAccountCode
;
/**
* Database Column Remarks:
* 账套名称(DD)
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column organization.enterprise_account_name
*
* @mbg.generated
*/
private
String
enterpriseAccountName
;
/**
* Database Column Remarks:
* 本位币币种(DD)
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column organization.currency_code
*
* @mbg.generated
*/
private
String
currencyCode
;
/**
* Database Column Remarks:
* 法人主体
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column organization.legal_entity
*
* @mbg.generated
*/
private
String
legalEntity
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column organization.ps_code
*
* @mbg.generated
*/
private
String
psCode
;
private
Area
area
;
private
Area
area
;
private
BusinessUnit
businessUnit
;
private
BusinessUnit
businessUnit
;
...
@@ -795,30 +846,6 @@ public class Organization extends BaseEntity implements Serializable {
...
@@ -795,30 +846,6 @@ public class Organization extends BaseEntity implements Serializable {
this
.
pLevel
=
pLevel
;
this
.
pLevel
=
pLevel
;
}
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column organization.p_level
*
* @return the value of organization.p_level
*
* @mbg.generated
*/
public
Integer
getPLevel
()
{
return
pLevel
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column organization.p_level
*
* @param pLevel the value for organization.p_level
*
* @mbg.generated
*/
public
void
setPLevel
(
Integer
pLevel
)
{
this
.
pLevel
=
pLevel
;
}
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method returns the value of the database column organization.create_time
* This method returns the value of the database column organization.create_time
...
@@ -1755,6 +1782,101 @@ public class Organization extends BaseEntity implements Serializable {
...
@@ -1755,6 +1782,101 @@ public class Organization extends BaseEntity implements Serializable {
this
.
enterpriseAccountCode
=
enterpriseAccountCode
==
null
?
null
:
enterpriseAccountCode
.
trim
();
this
.
enterpriseAccountCode
=
enterpriseAccountCode
==
null
?
null
:
enterpriseAccountCode
.
trim
();
}
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column organization.enterprise_account_name
*
* @return the value of organization.enterprise_account_name
*
* @mbg.generated
*/
public
String
getEnterpriseAccountName
()
{
return
enterpriseAccountName
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column organization.enterprise_account_name
*
* @param enterpriseAccountName the value for organization.enterprise_account_name
*
* @mbg.generated
*/
public
void
setEnterpriseAccountName
(
String
enterpriseAccountName
)
{
this
.
enterpriseAccountName
=
enterpriseAccountName
==
null
?
null
:
enterpriseAccountName
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column organization.currency_code
*
* @return the value of organization.currency_code
*
* @mbg.generated
*/
public
String
getCurrencyCode
()
{
return
currencyCode
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column organization.currency_code
*
* @param currencyCode the value for organization.currency_code
*
* @mbg.generated
*/
public
void
setCurrencyCode
(
String
currencyCode
)
{
this
.
currencyCode
=
currencyCode
==
null
?
null
:
currencyCode
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column organization.legal_entity
*
* @return the value of organization.legal_entity
*
* @mbg.generated
*/
public
String
getLegalEntity
()
{
return
legalEntity
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column organization.legal_entity
*
* @param legalEntity the value for organization.legal_entity
*
* @mbg.generated
*/
public
void
setLegalEntity
(
String
legalEntity
)
{
this
.
legalEntity
=
legalEntity
==
null
?
null
:
legalEntity
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column organization.ps_code
*
* @return the value of organization.ps_code
*
* @mbg.generated
*/
public
String
getPsCode
()
{
return
psCode
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column organization.ps_code
*
* @param psCode the value for organization.ps_code
*
* @mbg.generated
*/
public
void
setPsCode
(
String
psCode
)
{
this
.
psCode
=
psCode
==
null
?
null
:
psCode
.
trim
();
}
public
Area
getArea
()
{
public
Area
getArea
()
{
return
area
;
return
area
;
...
@@ -1772,7 +1894,6 @@ public class Organization extends BaseEntity implements Serializable {
...
@@ -1772,7 +1894,6 @@ public class Organization extends BaseEntity implements Serializable {
this
.
businessUnit
=
businessUnit
;
this
.
businessUnit
=
businessUnit
;
}
}
/**
/**
* This method was generated by MyBatis Generator.
* This method was generated by MyBatis Generator.
* This method corresponds to the database table organization
* This method corresponds to the database table organization
...
@@ -1836,6 +1957,10 @@ public class Organization extends BaseEntity implements Serializable {
...
@@ -1836,6 +1957,10 @@ public class Organization extends BaseEntity implements Serializable {
sb
.
append
(
", engageNationalProhibitIndustry="
).
append
(
engageNationalProhibitIndustry
);
sb
.
append
(
", engageNationalProhibitIndustry="
).
append
(
engageNationalProhibitIndustry
);
sb
.
append
(
", logoutTime="
).
append
(
logoutTime
);
sb
.
append
(
", logoutTime="
).
append
(
logoutTime
);
sb
.
append
(
", enterpriseAccountCode="
).
append
(
enterpriseAccountCode
);
sb
.
append
(
", enterpriseAccountCode="
).
append
(
enterpriseAccountCode
);
sb
.
append
(
", enterpriseAccountName="
).
append
(
enterpriseAccountName
);
sb
.
append
(
", currencyCode="
).
append
(
currencyCode
);
sb
.
append
(
", legalEntity="
).
append
(
legalEntity
);
sb
.
append
(
", psCode="
).
append
(
psCode
);
sb
.
append
(
"]"
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
return
sb
.
toString
();
}
}
...
...
atms-dao/src/main/java/pwc/taxtech/atms/entity/OrganizationExample.java
View file @
c4b1d76d
This diff is collapsed.
Click to expand it.
atms-dao/src/main/resources/pwc/taxtech/atms/dao/OrganizationMapper.xml
View file @
c4b1d76d
...
@@ -57,6 +57,10 @@
...
@@ -57,6 +57,10 @@
<result
column=
"engage_national_prohibit_industry"
jdbcType=
"BIT"
property=
"engageNationalProhibitIndustry"
/>
<result
column=
"engage_national_prohibit_industry"
jdbcType=
"BIT"
property=
"engageNationalProhibitIndustry"
/>
<result
column=
"logout_time"
jdbcType=
"TIMESTAMP"
property=
"logoutTime"
/>
<result
column=
"logout_time"
jdbcType=
"TIMESTAMP"
property=
"logoutTime"
/>
<result
column=
"enterprise_account_code"
jdbcType=
"VARCHAR"
property=
"enterpriseAccountCode"
/>
<result
column=
"enterprise_account_code"
jdbcType=
"VARCHAR"
property=
"enterpriseAccountCode"
/>
<result
column=
"enterprise_account_name"
jdbcType=
"VARCHAR"
property=
"enterpriseAccountName"
/>
<result
column=
"currency_code"
jdbcType=
"VARCHAR"
property=
"currencyCode"
/>
<result
column=
"legal_entity"
jdbcType=
"VARCHAR"
property=
"legalEntity"
/>
<result
column=
"ps_code"
jdbcType=
"VARCHAR"
property=
"psCode"
/>
</resultMap>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<sql
id=
"Example_Where_Clause"
>
<!--
<!--
...
@@ -138,7 +142,8 @@
...
@@ -138,7 +142,8 @@
legal_code, vehicleroutinglocation, business_scope, architecture_type, num_of_branches,
legal_code, vehicleroutinglocation, business_scope, architecture_type, num_of_branches,
api_update_flag, effec_time_of_general_taxpayers, registration_location_en, paid_in_capital,
api_update_flag, effec_time_of_general_taxpayers, registration_location_en, paid_in_capital,
general_tax_payer_effective_time, oversea, reg_status, national_economic_industry,
general_tax_payer_effective_time, oversea, reg_status, national_economic_industry,
engage_national_prohibit_industry, logout_time, enterprise_account_code
engage_national_prohibit_industry, logout_time, enterprise_account_code, enterprise_account_name,
currency_code, legal_entity, ps_code
</sql>
</sql>
<select
id=
"selectByExample"
parameterType=
"pwc.taxtech.atms.entity.OrganizationExample"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByExample"
parameterType=
"pwc.taxtech.atms.entity.OrganizationExample"
resultMap=
"BaseResultMap"
>
<!--
<!--
...
@@ -209,7 +214,9 @@
...
@@ -209,7 +214,9 @@
registration_location_en, paid_in_capital,
registration_location_en, paid_in_capital,
general_tax_payer_effective_time, oversea, reg_status,
general_tax_payer_effective_time, oversea, reg_status,
national_economic_industry, engage_national_prohibit_industry,
national_economic_industry, engage_national_prohibit_industry,
logout_time, enterprise_account_code)
logout_time, enterprise_account_code, enterprise_account_name,
currency_code, legal_entity, ps_code
)
values (#{id,jdbcType=VARCHAR}, #{clientCode,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
values (#{id,jdbcType=VARCHAR}, #{clientCode,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{code,jdbcType=VARCHAR}, #{parentId,jdbcType=VARCHAR}, #{taxPayerNumber,jdbcType=VARCHAR},
#{code,jdbcType=VARCHAR}, #{parentId,jdbcType=VARCHAR}, #{taxPayerNumber,jdbcType=VARCHAR},
#{regionId,jdbcType=VARCHAR}, #{structureId,jdbcType=VARCHAR}, #{industryId,jdbcType=VARCHAR},
#{regionId,jdbcType=VARCHAR}, #{structureId,jdbcType=VARCHAR}, #{industryId,jdbcType=VARCHAR},
...
@@ -228,7 +235,9 @@
...
@@ -228,7 +235,9 @@
#{registrationLocationEn,jdbcType=VARCHAR}, #{paidInCapital,jdbcType=VARCHAR},
#{registrationLocationEn,jdbcType=VARCHAR}, #{paidInCapital,jdbcType=VARCHAR},
#{generalTaxPayerEffectiveTime,jdbcType=TIMESTAMP}, #{oversea,jdbcType=BIT}, #{regStatus,jdbcType=VARCHAR},
#{generalTaxPayerEffectiveTime,jdbcType=TIMESTAMP}, #{oversea,jdbcType=BIT}, #{regStatus,jdbcType=VARCHAR},
#{nationalEconomicIndustry,jdbcType=VARCHAR}, #{engageNationalProhibitIndustry,jdbcType=BIT},
#{nationalEconomicIndustry,jdbcType=VARCHAR}, #{engageNationalProhibitIndustry,jdbcType=BIT},
#{logoutTime,jdbcType=TIMESTAMP}, #{enterpriseAccountCode,jdbcType=VARCHAR})
#{logoutTime,jdbcType=TIMESTAMP}, #{enterpriseAccountCode,jdbcType=VARCHAR}, #{enterpriseAccountName,jdbcType=VARCHAR},
#{currencyCode,jdbcType=VARCHAR}, #{legalEntity,jdbcType=VARCHAR}, #{psCode,jdbcType=VARCHAR}
)
</insert>
</insert>
<insert
id=
"insertSelective"
parameterType=
"pwc.taxtech.atms.entity.Organization"
>
<insert
id=
"insertSelective"
parameterType=
"pwc.taxtech.atms.entity.Organization"
>
<!--
<!--
...
@@ -390,6 +399,18 @@
...
@@ -390,6 +399,18 @@
<if
test=
"enterpriseAccountCode != null"
>
<if
test=
"enterpriseAccountCode != null"
>
enterprise_account_code,
enterprise_account_code,
</if>
</if>
<if
test=
"enterpriseAccountName != null"
>
enterprise_account_name,
</if>
<if
test=
"currencyCode != null"
>
currency_code,
</if>
<if
test=
"legalEntity != null"
>
legal_entity,
</if>
<if
test=
"psCode != null"
>
ps_code,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
<if
test=
"id != null"
>
...
@@ -545,6 +566,18 @@
...
@@ -545,6 +566,18 @@
<if
test=
"enterpriseAccountCode != null"
>
<if
test=
"enterpriseAccountCode != null"
>
#{enterpriseAccountCode,jdbcType=VARCHAR},
#{enterpriseAccountCode,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"enterpriseAccountName != null"
>
#{enterpriseAccountName,jdbcType=VARCHAR},
</if>
<if
test=
"currencyCode != null"
>
#{currencyCode,jdbcType=VARCHAR},
</if>
<if
test=
"legalEntity != null"
>
#{legalEntity,jdbcType=VARCHAR},
</if>
<if
test=
"psCode != null"
>
#{psCode,jdbcType=VARCHAR},
</if>
</trim>
</trim>
</insert>
</insert>
<select
id=
"countByExample"
parameterType=
"pwc.taxtech.atms.entity.OrganizationExample"
resultType=
"java.lang.Long"
>
<select
id=
"countByExample"
parameterType=
"pwc.taxtech.atms.entity.OrganizationExample"
resultType=
"java.lang.Long"
>
...
@@ -717,6 +750,18 @@
...
@@ -717,6 +750,18 @@
<if
test=
"record.enterpriseAccountCode != null"
>
<if
test=
"record.enterpriseAccountCode != null"
>
enterprise_account_code = #{record.enterpriseAccountCode,jdbcType=VARCHAR},
enterprise_account_code = #{record.enterpriseAccountCode,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"record.enterpriseAccountName != null"
>
enterprise_account_name = #{record.enterpriseAccountName,jdbcType=VARCHAR},
</if>
<if
test=
"record.currencyCode != null"
>
currency_code = #{record.currencyCode,jdbcType=VARCHAR},
</if>
<if
test=
"record.legalEntity != null"
>
legal_entity = #{record.legalEntity,jdbcType=VARCHAR},
</if>
<if
test=
"record.psCode != null"
>
ps_code = #{record.psCode,jdbcType=VARCHAR},
</if>
</set>
</set>
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
@@ -778,7 +823,11 @@
...
@@ -778,7 +823,11 @@
national_economic_industry = #{record.nationalEconomicIndustry,jdbcType=VARCHAR},
national_economic_industry = #{record.nationalEconomicIndustry,jdbcType=VARCHAR},
engage_national_prohibit_industry = #{record.engageNationalProhibitIndustry,jdbcType=BIT},
engage_national_prohibit_industry = #{record.engageNationalProhibitIndustry,jdbcType=BIT},
logout_time = #{record.logoutTime,jdbcType=TIMESTAMP},
logout_time = #{record.logoutTime,jdbcType=TIMESTAMP},
enterprise_account_code = #{record.enterpriseAccountCode,jdbcType=VARCHAR}
enterprise_account_code = #{record.enterpriseAccountCode,jdbcType=VARCHAR},
enterprise_account_name = #{record.enterpriseAccountName,jdbcType=VARCHAR},
currency_code = #{record.currencyCode,jdbcType=VARCHAR},
legal_entity = #{record.legalEntity,jdbcType=VARCHAR},
ps_code = #{record.psCode,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</if>
...
@@ -940,6 +989,18 @@
...
@@ -940,6 +989,18 @@
<if
test=
"enterpriseAccountCode != null"
>
<if
test=
"enterpriseAccountCode != null"
>
enterprise_account_code = #{enterpriseAccountCode,jdbcType=VARCHAR},
enterprise_account_code = #{enterpriseAccountCode,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"enterpriseAccountName != null"
>
enterprise_account_name = #{enterpriseAccountName,jdbcType=VARCHAR},
</if>
<if
test=
"currencyCode != null"
>
currency_code = #{currencyCode,jdbcType=VARCHAR},
</if>
<if
test=
"legalEntity != null"
>
legal_entity = #{legalEntity,jdbcType=VARCHAR},
</if>
<if
test=
"psCode != null"
>
ps_code = #{psCode,jdbcType=VARCHAR},
</if>
</set>
</set>
where id = #{id,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
</update>
...
@@ -998,7 +1059,11 @@
...
@@ -998,7 +1059,11 @@
national_economic_industry = #{nationalEconomicIndustry,jdbcType=VARCHAR},
national_economic_industry = #{nationalEconomicIndustry,jdbcType=VARCHAR},
engage_national_prohibit_industry = #{engageNationalProhibitIndustry,jdbcType=BIT},
engage_national_prohibit_industry = #{engageNationalProhibitIndustry,jdbcType=BIT},
logout_time = #{logoutTime,jdbcType=TIMESTAMP},
logout_time = #{logoutTime,jdbcType=TIMESTAMP},
enterprise_account_code = #{enterpriseAccountCode,jdbcType=VARCHAR}
enterprise_account_code = #{enterpriseAccountCode,jdbcType=VARCHAR},
enterprise_account_name = #{enterpriseAccountName,jdbcType=VARCHAR},
currency_code = #{currencyCode,jdbcType=VARCHAR},
legal_entity = #{legalEntity,jdbcType=VARCHAR},
ps_code = #{psCode,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
</update>
<select
id=
"selectByExampleWithRowbounds"
parameterType=
"pwc.taxtech.atms.entity.OrganizationExample"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByExampleWithRowbounds"
parameterType=
"pwc.taxtech.atms.entity.OrganizationExample"
resultMap=
"BaseResultMap"
>
...
...
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