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
a90a6a34
Commit
a90a6a34
authored
May 09, 2018
by
eddie.woo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
115c76fc
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
214 additions
and
71 deletions
+214
-71
mysql-connector-java-5.1.41.jar
atms-api/etc/generator/mysql-connector-java-5.1.41.jar
+0
-0
ServiceException.java
...c/main/java/pwc/taxtech/atms/common/ServiceException.java
+18
-0
MenuController.java
...main/java/pwc/taxtech/atms/controller/MenuController.java
+16
-5
OrganizationController.java
...a/pwc/taxtech/atms/controller/OrganizationController.java
+7
-0
ServiceTypeController.java
...va/pwc/taxtech/atms/controller/ServiceTypeController.java
+26
-0
MyUserMapper.java
...-api/src/main/java/pwc/taxtech/atms/dao/MyUserMapper.java
+3
-3
UserMapper.java
atms-api/src/main/java/pwc/taxtech/atms/dao/UserMapper.java
+1
-1
OperationResultDto.java
...rc/main/java/pwc/taxtech/atms/dto/OperationResultDto.java
+5
-1
Menu.java
atms-api/src/main/java/pwc/taxtech/atms/entitiy/Menu.java
+3
-0
Region.java
atms-api/src/main/java/pwc/taxtech/atms/entitiy/Region.java
+3
-3
MenuService.java
...i/src/main/java/pwc/taxtech/atms/service/MenuService.java
+2
-0
AreaServiceImpl.java
...n/java/pwc/taxtech/atms/service/impl/AreaServiceImpl.java
+5
-2
MenuServiceImpl.java
...n/java/pwc/taxtech/atms/service/impl/MenuServiceImpl.java
+5
-0
UserAccountServiceImpl.java
...pwc/taxtech/atms/service/impl/UserAccountServiceImpl.java
+19
-18
DimensionValueOrgMapper.xml
...esources/pwc/taxtech/atms/dao/DimensionValueOrgMapper.xml
+18
-18
OperationLogBasicDataMapper.xml
...rces/pwc/taxtech/atms/dao/OperationLogBasicDataMapper.xml
+71
-8
OrganizationMapper.xml
...ain/resources/pwc/taxtech/atms/dao/OrganizationMapper.xml
+3
-3
OrganizationServiceTemplateGroupMapper.xml
...xtech/atms/dao/OrganizationServiceTemplateGroupMapper.xml
+1
-1
RegionMapper.xml
.../src/main/resources/pwc/taxtech/atms/dao/RegionMapper.xml
+7
-7
UserRoleMapper.xml
...rc/main/resources/pwc/taxtech/atms/dao/UserRoleMapper.xml
+1
-1
No files found.
atms-api/etc/generator/mysql-connector-java-5.1.41.jar
0 → 100644
View file @
a90a6a34
File added
atms-api/src/main/java/pwc/taxtech/atms/common/ServiceException.java
0 → 100644
View file @
a90a6a34
package
pwc
.
taxtech
.
atms
.
common
;
public
class
ServiceException
extends
Exception
{
public
ServiceException
()
{
}
public
ServiceException
(
String
message
)
{
super
(
message
);
}
public
ServiceException
(
String
message
,
Throwable
cause
)
{
super
(
message
,
cause
);
}
public
ServiceException
(
Throwable
cause
)
{
super
(
cause
);
}
}
atms-api/src/main/java/pwc/taxtech/atms/controller/MenuController.java
View file @
a90a6a34
...
@@ -6,15 +6,13 @@ import org.slf4j.Logger;
...
@@ -6,15 +6,13 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
pwc.taxtech.atms.dto.MenuDisplayDto
;
import
pwc.taxtech.atms.dto.MenuDisplayDto
;
import
pwc.taxtech.atms.dto.MenuDto
;
import
pwc.taxtech.atms.dto.MenuDto
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.entitiy.Menu
;
import
pwc.taxtech.atms.service.MenuService
;
import
pwc.taxtech.atms.service.MenuService
;
/** @see PwC.Tax.Tech.Atms.WebApi\Controllers\MenuController.cs */
/** @see PwC.Tax.Tech.Atms.WebApi\Controllers\MenuController.cs */
...
@@ -40,4 +38,17 @@ public class MenuController {
...
@@ -40,4 +38,17 @@ public class MenuController {
logger
.
info
(
"come into menu"
);
logger
.
info
(
"come into menu"
);
return
menuService
.
getMenus
(
serviceId
);
return
menuService
.
getMenus
(
serviceId
);
}
}
@ResponseBody
@ApiOperation
(
value
=
"更新菜单项"
,
notes
=
"更新菜单项"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
)
public
OperationResultDto
updateMenu
(
@RequestBody
Menu
menu
)
{
try
{
menuService
.
update
(
menu
);
return
OperationResultDto
.
success
();
}
catch
(
Exception
e
)
{
logger
.
error
(
"更新菜单项失败"
,
e
);
}
return
OperationResultDto
.
error
();
}
}
}
atms-api/src/main/java/pwc/taxtech/atms/controller/OrganizationController.java
View file @
a90a6a34
...
@@ -2,6 +2,7 @@ package pwc.taxtech.atms.controller;
...
@@ -2,6 +2,7 @@ package pwc.taxtech.atms.controller;
import
java.util.List
;
import
java.util.List
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -178,6 +179,9 @@ public class OrganizationController {
...
@@ -178,6 +179,9 @@ public class OrganizationController {
@RequestMapping
(
value
=
"add"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"add"
,
method
=
RequestMethod
.
POST
)
public
@ResponseBody
OperationResultDto
<
Object
>
addOrg
(
@RequestBody
OrganizationDto
orgDto
)
{
public
@ResponseBody
OperationResultDto
<
Object
>
addOrg
(
@RequestBody
OrganizationDto
orgDto
)
{
logger
.
info
(
"POST /api/v1/org/add"
);
logger
.
info
(
"POST /api/v1/org/add"
);
if
(
StringUtils
.
isBlank
(
orgDto
.
getClientCode
())
&&
StringUtils
.
isNotBlank
(
orgDto
.
getCode
()))
{
orgDto
.
setClientCode
(
orgDto
.
getCode
());
}
return
organizationService
.
addOrg
(
orgDto
);
return
organizationService
.
addOrg
(
orgDto
);
}
}
...
@@ -185,6 +189,9 @@ public class OrganizationController {
...
@@ -185,6 +189,9 @@ public class OrganizationController {
@RequestMapping
(
value
=
"update"
,
method
=
RequestMethod
.
PUT
)
@RequestMapping
(
value
=
"update"
,
method
=
RequestMethod
.
PUT
)
public
@ResponseBody
OperationResultDto
<
Object
>
updateOrg
(
@RequestBody
OrganizationDto
orgDto
)
{
public
@ResponseBody
OperationResultDto
<
Object
>
updateOrg
(
@RequestBody
OrganizationDto
orgDto
)
{
logger
.
info
(
"PUT /api/v1/org/update"
);
logger
.
info
(
"PUT /api/v1/org/update"
);
if
(
StringUtils
.
isBlank
(
orgDto
.
getClientCode
())
&&
StringUtils
.
isNotBlank
(
orgDto
.
getCode
()))
{
orgDto
.
setClientCode
(
orgDto
.
getCode
());
}
return
organizationService
.
updateOrg
(
orgDto
);
return
organizationService
.
updateOrg
(
orgDto
);
}
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/ServiceTypeController.java
0 → 100644
View file @
a90a6a34
package
pwc
.
taxtech
.
atms
.
controller
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
pwc.taxtech.atms.dto.ServiceTypeDto
;
import
pwc.taxtech.atms.service.ProjectService
;
import
java.util.List
;
@RestController
@RequestMapping
(
"/api/v1/servicetype/"
)
public
class
ServiceTypeController
{
@Autowired
private
ProjectService
projectService
;
@ApiOperation
(
value
=
"获取ServiceType列表"
)
@RequestMapping
(
value
=
"getlist"
,
method
=
RequestMethod
.
GET
)
public
@ResponseBody
List
<
ServiceTypeDto
>
getList
()
{
return
projectService
.
getServiceList
();
}
}
atms-api/src/main/java/pwc/taxtech/atms/dao/MyUserMapper.java
View file @
a90a6a34
...
@@ -29,7 +29,7 @@ public interface MyUserMapper extends MyMapper {
...
@@ -29,7 +29,7 @@ public interface MyUserMapper extends MyMapper {
List
<
Map
<
String
,
Object
>>
selectUserOrganizationMapByUserID
(
@Param
(
value
=
"userID"
)
String
userID
);
List
<
Map
<
String
,
Object
>>
selectUserOrganizationMapByUserID
(
@Param
(
value
=
"userID"
)
String
userID
);
@Select
(
"select urd.ID, urd.DimensionValueID, urd.DimensionID, urd.UserID, urd.IsAccessible, urd.HasOriginalRole, u.UserName "
@Select
(
"select urd.ID, urd.DimensionValueID, urd.DimensionID, urd.UserID, urd.IsAccessible, urd.HasOriginalRole, u.UserName "
+
"from UserDimensionValue as urd "
+
"join
\"USER\"
as u on urd.UserID = u.ID "
+
"where u.Status = 1"
)
+
"from UserDimensionValue as urd "
+
"join
User
as u on urd.UserID = u.ID "
+
"where u.Status = 1"
)
@Results
({
@Result
(
id
=
true
,
column
=
"ID"
,
property
=
"ID"
),
@Results
({
@Result
(
id
=
true
,
column
=
"ID"
,
property
=
"ID"
),
@Result
(
column
=
"DimensionValueID"
,
property
=
"dimensionValueID"
,
javaType
=
String
.
class
),
@Result
(
column
=
"DimensionValueID"
,
property
=
"dimensionValueID"
,
javaType
=
String
.
class
),
@Result
(
column
=
"DimensionID"
,
property
=
"dimensionID"
,
javaType
=
String
.
class
),
@Result
(
column
=
"DimensionID"
,
property
=
"dimensionID"
,
javaType
=
String
.
class
),
...
@@ -45,7 +45,7 @@ public interface MyUserMapper extends MyMapper {
...
@@ -45,7 +45,7 @@ public interface MyUserMapper extends MyMapper {
@Result
(
column
=
"RoleName"
,
property
=
"roleName"
,
javaType
=
String
.
class
)
})
@Result
(
column
=
"RoleName"
,
property
=
"roleName"
,
javaType
=
String
.
class
)
})
List
<
Map
<
String
,
String
>>
selectUserRoleListByUserID
(
@Param
(
value
=
"userId"
)
String
userId
);
List
<
Map
<
String
,
String
>>
selectUserRoleListByUserID
(
@Param
(
value
=
"userId"
)
String
userId
);
@Select
(
"select q.ID, q.OrganizationID, q.UserID, q.IsAccessible, q.HasOriginalRole from UserOrganization as q join
\"USER\"
as u on q.UserID = u.ID "
@Select
(
"select q.ID, q.OrganizationID, q.UserID, q.IsAccessible, q.HasOriginalRole from UserOrganization as q join
User
as u on q.UserID = u.ID "
+
"where u.Status = 1"
)
+
"where u.Status = 1"
)
@Results
({
@Result
(
id
=
true
,
column
=
"ID"
,
property
=
"ID"
),
@Results
({
@Result
(
id
=
true
,
column
=
"ID"
,
property
=
"ID"
),
@Result
(
column
=
"OrganizationID"
,
property
=
"organizationID"
),
@Result
(
column
=
"OrganizationID"
,
property
=
"organizationID"
),
...
@@ -67,7 +67,7 @@ public interface MyUserMapper extends MyMapper {
...
@@ -67,7 +67,7 @@ public interface MyUserMapper extends MyMapper {
@Param
(
value
=
"dimensionID"
)
String
dimensionID
);
@Param
(
value
=
"dimensionID"
)
String
dimensionID
);
@Select
(
"select urd.ID, urd.OrganizationID as OrgID, urd.UserID, urd.IsAccessible, urd.HasOriginalRole, u.UserName as UserName "
@Select
(
"select urd.ID, urd.OrganizationID as OrgID, urd.UserID, urd.IsAccessible, urd.HasOriginalRole, u.UserName as UserName "
+
"from UserOrganization as urd join
\"USER\"
as u on urd.UserID = u.ID where u.Status = 1"
)
+
"from UserOrganization as urd join
User
as u on urd.UserID = u.ID where u.Status = 1"
)
@Results
({
@Result
(
id
=
true
,
column
=
"ID"
,
property
=
"ID"
),
@Results
({
@Result
(
id
=
true
,
column
=
"ID"
,
property
=
"ID"
),
@Result
(
column
=
"OrgID"
,
property
=
"orgID"
,
javaType
=
String
.
class
),
@Result
(
column
=
"OrgID"
,
property
=
"orgID"
,
javaType
=
String
.
class
),
@Result
(
column
=
"UserID"
,
property
=
"userID"
,
javaType
=
String
.
class
),
@Result
(
column
=
"UserID"
,
property
=
"userID"
,
javaType
=
String
.
class
),
...
...
atms-api/src/main/java/pwc/taxtech/atms/dao/UserMapper.java
View file @
a90a6a34
...
@@ -138,7 +138,7 @@ public interface UserMapper extends MyMapper {
...
@@ -138,7 +138,7 @@ public interface UserMapper extends MyMapper {
@Select
(
"select u.UserName as UserName, o.ID as OrganizationID, o.Name as OrganizationName, "
@Select
(
"select u.UserName as UserName, o.ID as OrganizationID, o.Name as OrganizationName, "
+
"u.Email as Email, u.Status as Status, u.AttemptTimes as AttemptTimes, u.CreateTime as CreateTime, "
+
"u.Email as Email, u.Status as Status, u.AttemptTimes as AttemptTimes, u.CreateTime as CreateTime, "
+
"u.ExpirationDate as ExpirationDate, u.IsAdmin as IsAdmin, u.ID as ID, u.LockedTime as LockedTime, "
+
"u.ExpirationDate as ExpirationDate, u.IsAdmin as IsAdmin, u.ID as ID, u.LockedTime as LockedTime, "
+
"u.LoginType as LoginType, u.Password as Password, u.PasswordUpdateTime as PasswordUpdateTime, u.UpdateTime as UpdateTime from
\"USER\"
as u "
+
"u.LoginType as LoginType, u.Password as Password, u.PasswordUpdateTime as PasswordUpdateTime, u.UpdateTime as UpdateTime from
User
as u "
+
"left join Organization as o on u.OrganizationID = o.ID "
+
"left join Organization as o on u.OrganizationID = o.ID "
+
"where u.ID = #{userId}"
)
+
"where u.ID = #{userId}"
)
@Results
({
@Results
({
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/OperationResultDto.java
View file @
a90a6a34
...
@@ -35,7 +35,11 @@ public class OperationResultDto<T> extends OperationResultBase {
...
@@ -35,7 +35,11 @@ public class OperationResultDto<T> extends OperationResultBase {
}
}
public
static
OperationResultDto
<?>
error
()
{
public
static
OperationResultDto
<?>
error
()
{
return
new
OperationResultDto
<>(
false
,
null
);
return
OperationResultDto
.
error
(
null
);
}
public
static
OperationResultDto
<?>
error
(
String
msg
)
{
return
new
OperationResultDto
<>(
false
,
msg
);
}
}
public
Map
<
String
,
String
>
getErrors
()
{
public
Map
<
String
,
String
>
getErrors
()
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/entitiy/Menu.java
View file @
a90a6a34
package
pwc
.
taxtech
.
atms
.
entitiy
;
package
pwc
.
taxtech
.
atms
.
entitiy
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -18,6 +20,7 @@ public class Menu implements Serializable {
...
@@ -18,6 +20,7 @@ public class Menu implements Serializable {
*
*
* @mbg.generated
* @mbg.generated
*/
*/
@JSONField
(
name
=
"id"
)
private
String
ID
;
private
String
ID
;
/**
/**
...
...
atms-api/src/main/java/pwc/taxtech/atms/entitiy/Region.java
View file @
a90a6a34
...
@@ -87,7 +87,7 @@ public class Region implements Serializable, Cloneable {
...
@@ -87,7 +87,7 @@ public class Region implements Serializable, Cloneable {
*
*
* @mbg.generated
* @mbg.generated
*/
*/
private
Integer
zipCode
;
private
String
zipCode
;
/**
/**
*
*
...
@@ -309,7 +309,7 @@ public class Region implements Serializable, Cloneable {
...
@@ -309,7 +309,7 @@ public class Region implements Serializable, Cloneable {
*
*
* @mbg.generated
* @mbg.generated
*/
*/
public
Integer
getZipCode
()
{
public
String
getZipCode
()
{
return
zipCode
;
return
zipCode
;
}
}
...
@@ -321,7 +321,7 @@ public class Region implements Serializable, Cloneable {
...
@@ -321,7 +321,7 @@ public class Region implements Serializable, Cloneable {
*
*
* @mbg.generated
* @mbg.generated
*/
*/
public
void
setZipCode
(
Integer
zipCode
)
{
public
void
setZipCode
(
String
zipCode
)
{
this
.
zipCode
=
zipCode
;
this
.
zipCode
=
zipCode
;
}
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/MenuService.java
View file @
a90a6a34
...
@@ -14,4 +14,6 @@ public interface MenuService {
...
@@ -14,4 +14,6 @@ public interface MenuService {
List
<
Menu
>
findByIsActive
(
Boolean
isActive
);
List
<
Menu
>
findByIsActive
(
Boolean
isActive
);
void
update
(
Menu
menu
);
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/AreaServiceImpl.java
View file @
a90a6a34
...
@@ -5,6 +5,8 @@ import java.util.Date;
...
@@ -5,6 +5,8 @@ import java.util.Date;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
org.apache.commons.lang3.StringUtils
;
import
org.nutz.lang.Strings
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -56,7 +58,8 @@ public class AreaServiceImpl implements AreaService {
...
@@ -56,7 +58,8 @@ public class AreaServiceImpl implements AreaService {
AreaExample
areaExample
=
new
AreaExample
();
AreaExample
areaExample
=
new
AreaExample
();
Criteria
criteria
=
areaExample
.
createCriteria
();
Criteria
criteria
=
areaExample
.
createCriteria
();
criteria
.
andParentIDIsNull
();
// criteria.andParentIDIsNull();
criteria
.
andParentIDEqualTo
(
StringUtils
.
EMPTY
);
return
areaMapper
.
selectByExample
(
areaExample
);
return
areaMapper
.
selectByExample
(
areaExample
);
...
@@ -226,7 +229,7 @@ public class AreaServiceImpl implements AreaService {
...
@@ -226,7 +229,7 @@ public class AreaServiceImpl implements AreaService {
List
<
AreaDto
>
areaList
=
getAreaList
(
type
);
List
<
AreaDto
>
areaList
=
getAreaList
(
type
);
// Top Node
// Top Node
List
<
AreaDto
>
topNode
=
areaList
.
stream
().
filter
(
sa
->
sa
.
getParentID
()
==
null
).
collect
(
Collectors
.
toList
());
List
<
AreaDto
>
topNode
=
areaList
.
stream
().
filter
(
sa
->
StringUtils
.
isBlank
(
sa
.
getParentID
())
).
collect
(
Collectors
.
toList
());
if
(
topNode
==
null
)
{
if
(
topNode
==
null
)
{
throw
new
ApplicationException
(
AreaMessage
.
NoAreaRootData
);
throw
new
ApplicationException
(
AreaMessage
.
NoAreaRootData
);
}
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/MenuServiceImpl.java
View file @
a90a6a34
...
@@ -120,4 +120,9 @@ public class MenuServiceImpl implements MenuService {
...
@@ -120,4 +120,9 @@ public class MenuServiceImpl implements MenuService {
return
menuMapper
.
selectByExample
(
menuExample
);
return
menuMapper
.
selectByExample
(
menuExample
);
}
}
@Override
public
void
update
(
Menu
menu
)
{
menuMapper
.
updateByPrimaryKeySelective
(
menu
);
}
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/UserAccountServiceImpl.java
View file @
a90a6a34
...
@@ -269,23 +269,24 @@ public class UserAccountServiceImpl extends AbstractService implements UserAccou
...
@@ -269,23 +269,24 @@ public class UserAccountServiceImpl extends AbstractService implements UserAccou
@Override
@Override
public
OperationResultDto
<
User
>
addNewUser
(
UserAndUserRoleSaveDto
userAndUserRoleSaveDto
)
{
public
OperationResultDto
<
User
>
addNewUser
(
UserAndUserRoleSaveDto
userAndUserRoleSaveDto
)
{
OperationResultDto
<
User
>
user
=
addUser
(
userAndUserRoleSaveDto
);
OperationResultDto
<
User
>
user
=
addUser
(
userAndUserRoleSaveDto
);
if
(
BooleanUtils
.
isTrue
(
user
.
getResult
()))
{
//todo send mail
MailMto
mailMto
=
new
MailMto
();
// if (BooleanUtils.isTrue(user.getResult())) {
String
path
=
MAIL_TEMPLATE_PATH
+
"WebAdminWelcomeLetter.html"
;
// MailMto mailMto = new MailMto();
String
content
=
CommonUtils
.
readClasspathFileToString
(
path
);
// String path = MAIL_TEMPLATE_PATH + "WebAdminWelcomeLetter.html";
content
=
content
.
replaceAll
(
"\\{Password\\}"
,
user
.
getResultMsg
());
// String content = CommonUtils.readClasspathFileToString(path);
content
=
content
.
replaceAll
(
"\\{\\[Env\\]link\\}"
,
atmsApiSettings
.
getWebUrl
());
// content = content.replaceAll("\\{Password\\}", user.getResultMsg());
content
=
content
.
replaceAll
(
"\\{UserName\\}"
,
user
.
getData
().
getUserName
());
// content = content.replaceAll("\\{\\[Env\\]link\\}", atmsApiSettings.getWebUrl());
mailMto
.
setContent
(
content
);
// content = content.replaceAll("\\{UserName\\}", user.getData().getUserName());
// Get Subject Avoid Multi-language
// mailMto.setContent(content);
String
beginTag
=
"<title>"
;
// // Get Subject Avoid Multi-language
int
beginIndex
=
content
.
indexOf
(
beginTag
);
// String beginTag = "<title>";
int
endIndex
=
content
.
indexOf
(
"</title>"
);
// int beginIndex = content.indexOf(beginTag);
String
subject
=
content
.
substring
(
beginIndex
+
beginTag
.
length
(),
endIndex
);
// int endIndex = content.indexOf("</title>");
mailMto
.
setSubject
(
subject
);
// String subject = content.substring(beginIndex + beginTag.length(), endIndex);
mailMto
.
setTo
(
user
.
getData
().
getEmail
());
// mailMto.setSubject(subject);
commonService
.
sendMail
(
mailMto
);
// mailMto.setTo(user.getData().getEmail());
}
// commonService.sendMail(mailMto);
// }
return
user
;
return
user
;
}
}
...
@@ -343,7 +344,7 @@ public class UserAccountServiceImpl extends AbstractService implements UserAccou
...
@@ -343,7 +344,7 @@ public class UserAccountServiceImpl extends AbstractService implements UserAccou
.
orElse
(
new
Role
()).
getServiceTypeID
());
.
orElse
(
new
Role
()).
getServiceTypeID
());
userRoleList
.
add
(
userRole
);
userRoleList
.
add
(
userRole
);
logger
.
debug
(
"Start to insert user role [ {} ]"
,
userRole
.
getID
());
logger
.
debug
(
"Start to insert user role [ {} ]"
,
userRole
.
getID
());
userRoleMapper
.
insert
(
userRole
);
userRoleMapper
.
insert
Selective
(
userRole
);
}
}
}
}
// 默认添加机构可访问权限
// 默认添加机构可访问权限
...
...
atms-api/src/main/resources/pwc/taxtech/atms/dao/DimensionValueOrgMapper.xml
View file @
a90a6a34
...
@@ -267,32 +267,32 @@
...
@@ -267,32 +267,32 @@
<select
id=
"selectUnionDimensionValueOrgByDimension"
parameterType=
"pwc.taxtech.atms.dto.DimensionParamDto"
resultMap=
"UnionDimensionValueOrg"
>
<select
id=
"selectUnionDimensionValueOrgByDimension"
parameterType=
"pwc.taxtech.atms.dto.DimensionParamDto"
resultMap=
"UnionDimensionValueOrg"
>
select * from
select * from
(select #{organizationStructureID} as
"ID", StructureID as DimensionValueID, "ID"
as
(select #{organizationStructureID} as
ID, StructureID as DimensionValueID, ID
as
OrganizationID from
"Organization"
OrganizationID from
Organization
union
union
select #{businessUnitID} as
"ID", BusinessUnitID as DimensionValueID, "ID"
as
select #{businessUnitID} as
ID, BusinessUnitID as DimensionValueID, ID
as
OrganizationID from
"Organization"
OrganizationID from
Organization
union
union
select #{areaID} as
"ID", AreaID as DimensionValueID, "ID"
as OrganizationID
select #{areaID} as
ID, AreaID as DimensionValueID, ID
as OrganizationID
from
"Organization"
from
Organization
union
union
select ID, DimensionValueID, OrganizationID from DimensionValueOrg) as q
select ID, DimensionValueID, OrganizationID from DimensionValueOrg) as q
join
join
(select
"ID" as "DimensionValueID", "Name" as "DimensionValueName"
,
(select
ID as DimensionValueID, Name as DimensionValueName
,
"IsActive", #{organizationStructureID} as "DimensionID"
, CreateTime, UpdateTime from
IsActive, #{organizationStructureID} as DimensionID
, CreateTime, UpdateTime from
"OrganizationStructure" where "IsActive"
=1
OrganizationStructure where IsActive
=1
union
union
select
"ID" as "DimensionValueID", "Name" as "DimensionValueName"
,
select
ID as DimensionValueID, Name as DimensionValueName
,
"IsActive", #{businessUnitID} as "DimensionID"
, CreateTime, UpdateTime from
IsActive, #{businessUnitID} as DimensionID
, CreateTime, UpdateTime from
"BusinessUnit" where "IsActive"
=1
BusinessUnit where IsActive
=1
union
union
select
"ID" as "DimensionValueID", "Name" as "DimensionValueName"
,
select
ID as DimensionValueID, Name as DimensionValueName
,
"IsActive", #{areaID} as "DimensionID", GETDATE
() as CreateTime,
IsActive, #{areaID} as DimensionID, now
() as CreateTime,
GETDATE() as UpdateTime from "Area" where "IsActive"
=1
now() as UpdateTime from Area where IsActive
=1
union
union
select
"ID" as "DimensionValueID", "Name" as "DimensionValueName"
,
select
ID as DimensionValueID, Name as DimensionValueName
,
"IsActive", DimensionID, CreateTime, UpdateTime from "DimensionValue"
IsActive, DimensionID, CreateTime, UpdateTime from DimensionValue
where
"IsActive"
=1) as p
where
IsActive
=1) as p
on p.DimensionValueID = q.DimensionValueID
on p.DimensionValueID = q.DimensionValueID
join
join
Dimension as r on r.IsActive = 1 and p.DimensionID = r.ID
Dimension as r on r.IsActive = 1 and p.DimensionID = r.ID
...
...
atms-api/src/main/resources/pwc/taxtech/atms/dao/OperationLogBasicDataMapper.xml
View file @
a90a6a34
...
@@ -393,14 +393,77 @@
...
@@ -393,14 +393,77 @@
</select>
</select>
<insert
id=
"insertSmart"
parameterType=
"pwc.taxtech.atms.entitiy.OperationLogSmart"
>
<insert
id=
"insertSmart"
parameterType=
"pwc.taxtech.atms.entitiy.OperationLogSmart"
>
insert into ${tableName} (ID, OperationContent, ModuleName,
insert into ${tableName}
OperationObject, OperationAction, OriginalState,
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
UpdateState, OperationUser, IP,
<if
test=
"ID != null"
>
"Comment", CreateTime)
ID,
values (#{ID,jdbcType=VARCHAR}, #{operationContent,jdbcType=NVARCHAR}, #{moduleName,jdbcType=NVARCHAR},
</if>
#{operationObject,jdbcType=NVARCHAR}, #{operationAction,jdbcType=NVARCHAR}, #{originalState,jdbcType=NVARCHAR},
<if
test=
"operationContent != null"
>
#{updateState,jdbcType=NVARCHAR}, #{operationUser,jdbcType=NVARCHAR}, #{IP,jdbcType=VARCHAR},
OperationContent,
#{comment,jdbcType=NVARCHAR}, #{createTime,jdbcType=TIMESTAMP})
</if>
<if
test=
"moduleName != null"
>
ModuleName,
</if>
<if
test=
"operationObject != null"
>
OperationObject,
</if>
<if
test=
"operationAction != null"
>
OperationAction,
</if>
<if
test=
"originalState != null"
>
OriginalState,
</if>
<if
test=
"updateState != null"
>
UpdateState,
</if>
<if
test=
"operationUser != null"
>
OperationUser,
</if>
<if
test=
"IP != null"
>
IP,
</if>
<if
test=
"comment != null"
>
Comment,
</if>
<if
test=
"createTime != null"
>
CreateTime,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"ID != null"
>
#{ID,jdbcType=VARCHAR},
</if>
<if
test=
"operationContent != null"
>
#{operationContent,jdbcType=VARCHAR},
</if>
<if
test=
"moduleName != null"
>
#{moduleName,jdbcType=VARCHAR},
</if>
<if
test=
"operationObject != null"
>
#{operationObject,jdbcType=VARCHAR},
</if>
<if
test=
"operationAction != null"
>
#{operationAction,jdbcType=VARCHAR},
</if>
<if
test=
"originalState != null"
>
#{originalState,jdbcType=VARCHAR},
</if>
<if
test=
"updateState != null"
>
#{updateState,jdbcType=VARCHAR},
</if>
<if
test=
"operationUser != null"
>
#{operationUser,jdbcType=VARCHAR},
</if>
<if
test=
"IP != null"
>
#{IP,jdbcType=VARCHAR},
</if>
<if
test=
"comment != null"
>
#{comment,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
</insert>
...
...
atms-api/src/main/resources/pwc/taxtech/atms/dao/OrganizationMapper.xml
View file @
a90a6a34
...
@@ -833,7 +833,7 @@
...
@@ -833,7 +833,7 @@
org.RegionID as RegionID,
org.RegionID as RegionID,
reg.MergerName as RegionName,
reg.MergerName as RegionName,
org.IsActive as IsActive
org.IsActive as IsActive
from
"Organization"
as org
from
Organization
as org
left join Industry as ind on org.IndustryID = ind.ID
left join Industry as ind on org.IndustryID = ind.ID
left join BusinessUnit as bu on org.BusinessUnitID = bu.ID
left join BusinessUnit as bu on org.BusinessUnitID = bu.ID
left join Area as area on org.AreaID = area.ID
left join Area as area on org.AreaID = area.ID
...
@@ -1020,8 +1020,8 @@ WHERE org.isactive = 1
...
@@ -1020,8 +1020,8 @@ WHERE org.isactive = 1
union
union
select area.ID as DimensionValueID, area.Name as DimensionValueName,
select area.ID as DimensionValueID, area.Name as DimensionValueName,
area.IsActive as IsActive, 'c61a5bd6-a996-4952-9869-d053995237e6' DimensionID,
area.IsActive as IsActive, 'c61a5bd6-a996-4952-9869-d053995237e6' DimensionID,
getDate
() as CreateTime,
now
() as CreateTime,
getDate
() as UpdateTime
now
() as UpdateTime
from Area as area
from Area as area
where area.IsActive = 1
where area.IsActive = 1
...
...
atms-api/src/main/resources/pwc/taxtech/atms/dao/OrganizationServiceTemplateGroupMapper.xml
View file @
a90a6a34
...
@@ -282,7 +282,7 @@
...
@@ -282,7 +282,7 @@
select
select
m.ID as ID,
m.ID as ID,
m.ServiceTypeID as ServiceTypeID,
m.ServiceTypeID as ServiceTypeID,
M
.OrganizationID as OrganizationID,
m
.OrganizationID as OrganizationID,
m.TemplateGroupID as TemplateGroupID,
m.TemplateGroupID as TemplateGroupID,
t.Name as TemplateGroupName
t.Name as TemplateGroupName
from OrganizationServiceTemplateGroup as m
from OrganizationServiceTemplateGroup as m
...
...
atms-api/src/main/resources/pwc/taxtech/atms/dao/RegionMapper.xml
View file @
a90a6a34
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
<result
column=
"MergerName"
jdbcType=
"VARCHAR"
property=
"mergerName"
/>
<result
column=
"MergerName"
jdbcType=
"VARCHAR"
property=
"mergerName"
/>
<result
column=
"LevelType"
jdbcType=
"INTEGER"
property=
"levelType"
/>
<result
column=
"LevelType"
jdbcType=
"INTEGER"
property=
"levelType"
/>
<result
column=
"TelCode"
jdbcType=
"VARCHAR"
property=
"telCode"
/>
<result
column=
"TelCode"
jdbcType=
"VARCHAR"
property=
"telCode"
/>
<result
column=
"ZipCode"
jdbcType=
"
INTEGE
R"
property=
"zipCode"
/>
<result
column=
"ZipCode"
jdbcType=
"
VARCHA
R"
property=
"zipCode"
/>
<result
column=
"PinYin"
jdbcType=
"VARCHAR"
property=
"pinYin"
/>
<result
column=
"PinYin"
jdbcType=
"VARCHAR"
property=
"pinYin"
/>
<result
column=
"Longitude"
jdbcType=
"REAL"
property=
"longitude"
/>
<result
column=
"Longitude"
jdbcType=
"REAL"
property=
"longitude"
/>
<result
column=
"Latitude"
jdbcType=
"REAL"
property=
"latitude"
/>
<result
column=
"Latitude"
jdbcType=
"REAL"
property=
"latitude"
/>
...
@@ -151,7 +151,7 @@
...
@@ -151,7 +151,7 @@
)
)
values (#{ID,jdbcType=VARCHAR}, #{parentID,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
values (#{ID,jdbcType=VARCHAR}, #{parentID,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{shortName,jdbcType=VARCHAR}, #{mergerName,jdbcType=VARCHAR}, #{levelType,jdbcType=INTEGER},
#{shortName,jdbcType=VARCHAR}, #{mergerName,jdbcType=VARCHAR}, #{levelType,jdbcType=INTEGER},
#{telCode,jdbcType=VARCHAR}, #{zipCode,jdbcType=
INTEGER}, #{pinYin,jdbcType=VARCHAR},
#{telCode,jdbcType=VARCHAR}, #{zipCode,jdbcType=
VARCHAR}, #{pinYin,jdbcType=VARCHAR},
#{longitude,jdbcType=REAL}, #{latitude,jdbcType=REAL}, #{isActive,jdbcType=SMALLINT}
#{longitude,jdbcType=REAL}, #{latitude,jdbcType=REAL}, #{isActive,jdbcType=SMALLINT}
)
)
</insert>
</insert>
...
@@ -222,7 +222,7 @@
...
@@ -222,7 +222,7 @@
#{telCode,jdbcType=VARCHAR},
#{telCode,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"zipCode != null"
>
<if
test=
"zipCode != null"
>
#{zipCode,jdbcType=
INTEGE
R},
#{zipCode,jdbcType=
VARCHA
R},
</if>
</if>
<if
test=
"pinYin != null"
>
<if
test=
"pinYin != null"
>
#{pinYin,jdbcType=VARCHAR},
#{pinYin,jdbcType=VARCHAR},
...
@@ -277,7 +277,7 @@
...
@@ -277,7 +277,7 @@
TelCode = #{record.telCode,jdbcType=VARCHAR},
TelCode = #{record.telCode,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"record.zipCode != null"
>
<if
test=
"record.zipCode != null"
>
ZipCode = #{record.zipCode,jdbcType=
INTEGE
R},
ZipCode = #{record.zipCode,jdbcType=
VARCHA
R},
</if>
</if>
<if
test=
"record.pinYin != null"
>
<if
test=
"record.pinYin != null"
>
PinYin = #{record.pinYin,jdbcType=VARCHAR},
PinYin = #{record.pinYin,jdbcType=VARCHAR},
...
@@ -309,7 +309,7 @@
...
@@ -309,7 +309,7 @@
MergerName = #{record.mergerName,jdbcType=VARCHAR},
MergerName = #{record.mergerName,jdbcType=VARCHAR},
LevelType = #{record.levelType,jdbcType=INTEGER},
LevelType = #{record.levelType,jdbcType=INTEGER},
TelCode = #{record.telCode,jdbcType=VARCHAR},
TelCode = #{record.telCode,jdbcType=VARCHAR},
ZipCode = #{record.zipCode,jdbcType=
INTEGE
R},
ZipCode = #{record.zipCode,jdbcType=
VARCHA
R},
PinYin = #{record.pinYin,jdbcType=VARCHAR},
PinYin = #{record.pinYin,jdbcType=VARCHAR},
Longitude = #{record.longitude,jdbcType=REAL},
Longitude = #{record.longitude,jdbcType=REAL},
Latitude = #{record.latitude,jdbcType=REAL},
Latitude = #{record.latitude,jdbcType=REAL},
...
@@ -344,7 +344,7 @@
...
@@ -344,7 +344,7 @@
TelCode = #{telCode,jdbcType=VARCHAR},
TelCode = #{telCode,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"zipCode != null"
>
<if
test=
"zipCode != null"
>
ZipCode = #{zipCode,jdbcType=
INTEGE
R},
ZipCode = #{zipCode,jdbcType=
VARCHA
R},
</if>
</if>
<if
test=
"pinYin != null"
>
<if
test=
"pinYin != null"
>
PinYin = #{pinYin,jdbcType=VARCHAR},
PinYin = #{pinYin,jdbcType=VARCHAR},
...
@@ -373,7 +373,7 @@
...
@@ -373,7 +373,7 @@
MergerName = #{mergerName,jdbcType=VARCHAR},
MergerName = #{mergerName,jdbcType=VARCHAR},
LevelType = #{levelType,jdbcType=INTEGER},
LevelType = #{levelType,jdbcType=INTEGER},
TelCode = #{telCode,jdbcType=VARCHAR},
TelCode = #{telCode,jdbcType=VARCHAR},
ZipCode = #{zipCode,jdbcType=
INTEGE
R},
ZipCode = #{zipCode,jdbcType=
VARCHA
R},
PinYin = #{pinYin,jdbcType=VARCHAR},
PinYin = #{pinYin,jdbcType=VARCHAR},
Longitude = #{longitude,jdbcType=REAL},
Longitude = #{longitude,jdbcType=REAL},
Latitude = #{latitude,jdbcType=REAL},
Latitude = #{latitude,jdbcType=REAL},
...
...
atms-api/src/main/resources/pwc/taxtech/atms/dao/UserRoleMapper.xml
View file @
a90a6a34
...
@@ -306,7 +306,7 @@
...
@@ -306,7 +306,7 @@
<select
id=
"selectUserRoleQueryByServiceTypeID"
parameterType=
"java.lang.String"
resultMap=
"UserRoleQuery"
>
<select
id=
"selectUserRoleQueryByServiceTypeID"
parameterType=
"java.lang.String"
resultMap=
"UserRoleQuery"
>
select ur.ID as ID, u.ID as UserID, u.UserName as UserName, ur.RoleID as RoleID,
select ur.ID as ID, u.ID as UserID, u.UserName as UserName, ur.RoleID as RoleID,
r.Name as RoleName, s.Name as ServiceTypeName, s.ID as ServiceTypeID, rc.ID as RoleCategoryID,
r.Name as RoleName, s.Name as ServiceTypeName, s.ID as ServiceTypeID, rc.ID as RoleCategoryID,
rc.Name as RoleCatetoryName, org.ID as OrgID, org.Name as OrgName, u.Email as Email, u.Status as Status from
"USER"
as u
rc.Name as RoleCatetoryName, org.ID as OrgID, org.Name as OrgName, u.Email as Email, u.Status as Status from
User
as u
left join UserRole as ur on u.ID = ur.UserID
left join UserRole as ur on u.ID = ur.UserID
left join Role as r on ur.RoleID = r.ID
left join Role as r on ur.RoleID = r.ID
left join ServiceType as s on s.ID = r.ServiceTypeID and s.IsActive = 1 and s.ID = #{serviceTypeID}
left join ServiceType as s on s.ID = r.ServiceTypeID and s.IsActive = 1 and s.ID = #{serviceTypeID}
...
...
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