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
40eb5a1a
Commit
40eb5a1a
authored
Mar 19, 2019
by
gary
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、fixbug
parent
f983e538
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
56 additions
and
27 deletions
+56
-27
ErrorMessageCN.java
.../java/pwc/taxtech/atms/common/message/ErrorMessageCN.java
+2
-1
OrgSyncJob.java
...ain/java/pwc/taxtech/atms/common/schedule/OrgSyncJob.java
+0
-3
DateUtils.java
...src/main/java/pwc/taxtech/atms/common/util/DateUtils.java
+12
-0
UserController.java
...main/java/pwc/taxtech/atms/controller/UserController.java
+1
-7
DataImportService.java
...java/pwc/taxtech/atms/service/impl/DataImportService.java
+5
-2
OrganizationServiceImpl.java
...wc/taxtech/atms/service/impl/OrganizationServiceImpl.java
+8
-0
OrganizationStructureServiceImpl.java
...h/atms/service/impl/OrganizationStructureServiceImpl.java
+15
-2
UserServiceImpl.java
...n/java/pwc/taxtech/atms/service/impl/UserServiceImpl.java
+3
-0
UserDto.java
atms-dao/src/main/java/pwc/taxtech/atms/dpo/UserDto.java
+0
-8
UserExtendsMapper.xml
...ources/pwc/taxtech/atms/dao/extends/UserExtendsMapper.xml
+2
-2
user-detail-view.ctrl.js
.../admin/infrastructure/userDetail/user-detail-view.ctrl.js
+6
-0
user-manage.ctrl.js
...p/app/admin/infrastructure/userManage/user-manage.ctrl.js
+1
-1
edit-user-modal.ctrl.js
...p/common/controls/edit-user-modal/edit-user-modal.ctrl.js
+1
-1
No files found.
atms-api/src/main/java/pwc/taxtech/atms/common/message/ErrorMessageCN.java
View file @
40eb5a1a
...
...
@@ -12,7 +12,8 @@ public class ErrorMessageCN {
public
static
final
String
StrctureRepeat
=
"层级重复!"
;
public
static
final
String
BusinssUnitRepeat
=
"事业部重复!"
;
public
static
final
String
BusinssUnitUpdateFailed
=
"未对事业部名称或状态进行修改!"
;
public
static
final
String
OrgStructureFailed
=
"未对事业部名称或状态进行修改!"
;
public
static
final
String
OrgStructureFailed
=
"未对层级名称或状态进行修改!"
;
public
static
final
String
OrgStructureNameExist
=
"层级名称已存在!"
;
public
static
final
String
NoLedgerID
=
"该机构未同步主数据账套ID!"
;
public
static
final
String
NoCompanyCode
=
"该机构缺少机构代码字段!"
;
...
...
atms-api/src/main/java/pwc/taxtech/atms/common/schedule/OrgSyncJob.java
View file @
40eb5a1a
...
...
@@ -35,9 +35,6 @@ public class OrgSyncJob extends QuartzJobBean {
@Resource
private
RegionMapper
regionMapper
;
@Autowired
private
OrganizationMapper
orgMapper
;
@Value
(
"${org_sync_url}"
)
private
String
orgSyncUrl
;
...
...
atms-api/src/main/java/pwc/taxtech/atms/common/util/DateUtils.java
View file @
40eb5a1a
...
...
@@ -240,6 +240,18 @@ public class DateUtils {
return
currentTime
;
}
/**
* 得到当前期间
*
* @return
*/
public
static
Integer
getPeriodNow
()
{
Date
currentTime
=
new
Date
();
SimpleDateFormat
fmt
=
new
SimpleDateFormat
(
"yyyyMM"
);
String
date
=
fmt
.
format
(
currentTime
);
return
Integer
.
valueOf
(
date
);
}
/**
* 提取一个月中的最后一天
*
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/UserController.java
View file @
40eb5a1a
...
...
@@ -19,16 +19,10 @@ import pwc.taxtech.atms.dpo.UserRoleInfo;
import
pwc.taxtech.atms.dto.LoginInputDto
;
import
pwc.taxtech.atms.dto.LoginOutputDto
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.analysis.AnalysisDomesticlParam
;
import
pwc.taxtech.atms.dto.organization.OrgRoleDtoList
;
import
pwc.taxtech.atms.dto.permission.UserPermissionDto
;
import
pwc.taxtech.atms.dto.permission.UserPermissionKeyDto
;
import
pwc.taxtech.atms.dto.user.UpdateParam
;
import
pwc.taxtech.atms.dto.user.UserAndUserRoleSaveDto
;
import
pwc.taxtech.atms.dto.user.UserOrganizationDto
;
import
pwc.taxtech.atms.dto.user.UserRoleDimensionValueDto
;
import
pwc.taxtech.atms.dto.user.UserRoleDisplayInfo
;
import
pwc.taxtech.atms.dto.user.UserRoleSaveDto
;
import
pwc.taxtech.atms.dto.user.*
;
import
pwc.taxtech.atms.entity.User
;
import
pwc.taxtech.atms.service.impl.RoleServiceImpl
;
import
pwc.taxtech.atms.service.impl.UserAccountServiceImpl
;
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/DataImportService.java
View file @
40eb5a1a
...
...
@@ -730,21 +730,24 @@ public class DataImportService extends BaseService {
List
<
InvoiceData
>
cfs
=
Lists
.
newArrayList
();
String
[]
sheetName
=
sheet
.
getSheetName
().
split
(
"-"
);
String
companyCode
=
sheetName
[
0
];
String
taypayerNum
=
sheetName
[
0
];
OrganizationExample
example
=
new
OrganizationExample
();
example
.
createCriteria
().
and
CodeEqualTo
(
companyCode
);
example
.
createCriteria
().
and
TaxPayerNumberEqualTo
(
taypayerNum
);
List
<
Organization
>
organizations
=
organizationMapper
.
selectByExample
(
example
);
String
orgId
=
""
;
String
companyName
=
""
;
String
companyCode
=
""
;
String
taxPayerId
=
""
;
if
(
organizations
.
size
()
>
0
)
{
orgId
=
organizations
.
get
(
0
).
getId
();
companyName
=
organizations
.
get
(
0
).
getName
();
taxPayerId
=
StringUtils
.
isNotEmpty
(
organizations
.
get
(
0
).
getLegalCode
())
?
organizations
.
get
(
0
).
getLegalCode
()
:
organizations
.
get
(
0
).
getTaxPayerNumber
();
companyCode
=
organizations
.
get
(
0
).
getCode
();
}
String
periodStr
=
sheetName
[
1
].
substring
(
0
,
6
);
String
fileType
=
"发票资料"
;
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/OrganizationServiceImpl.java
View file @
40eb5a1a
...
...
@@ -2,6 +2,7 @@ package pwc.taxtech.atms.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.google.common.collect.Lists
;
import
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.BooleanUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -12,6 +13,7 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.dao.DuplicateKeyException
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
org.springframework.util.Assert
;
...
...
@@ -2433,6 +2435,9 @@ public class OrganizationServiceImpl extends BaseService{
}
List
<
EnterpriseAccountSetOrg
>
enterpriseAccountSetOrgList
=
enterpriseAccountSetOrgMapper
.
selectByExample
(
example
);
EnterpriseAccountSetOrgExample
e2
=
new
EnterpriseAccountSetOrgExample
();
for
(
EnterpriseAccountSetOrgDto
p
:
orgDto
.
getEnterpriseAccountSetOrgList
())
{
p
.
setEffectiveDate
(
Strings
.
isBlank
(
p
.
getEffectiveDateStr
())
?
p
.
getEffectiveDate
()
:
DateTimeFormat
.
forPattern
(
"yyyy-MM-dd"
).
parseDateTime
(
p
.
getEffectiveDateStr
()
+
"-01"
)
...
...
@@ -2591,6 +2596,9 @@ public class OrganizationServiceImpl extends BaseService{
updateOrganizationServiceTemplateGroupList
);
operationLogService
.
addOrDeleteDataAddLog
(
selfDimensionList
);
return
new
OperationResultDto
(
true
);
}
catch
(
DuplicateKeyException
e
)
{
//万不得已出此下策
return
new
OperationResultDto
(
true
,
"保存成功!"
);
}
catch
(
Exception
ex
)
{
logger
.
error
(
"UpdateOrg出错了:"
+
ex
,
ex
);
logger
.
error
(
"标记回滚, ready to call setRollbackOnly"
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/OrganizationStructureServiceImpl.java
View file @
40eb5a1a
...
...
@@ -20,8 +20,11 @@ import pwc.taxtech.atms.entity.OrganizationStructureExample;
import
pwc.taxtech.atms.exception.ApplicationException
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.stream.Collector
;
import
java.util.stream.Collectors
;
@Service
public
class
OrganizationStructureServiceImpl
{
...
...
@@ -136,10 +139,20 @@ public class OrganizationStructureServiceImpl {
if
(
organizationStructure
==
null
)
{
return
ApiResultDto
.
fail
(
"can't find organizationStructure, id: "
+
organizationStructureDto
.
getId
());
}
if
(
organizationStructureDto
.
getIsActive
().
equals
(
organizationStructure
.
getIsActive
())&&
organizationStructure
.
getName
().
equals
(
organizationStructureDto
.
getName
())){
boolean
notChange
=
organizationStructureDto
.
getIsActive
().
equals
(
organizationStructure
.
getIsActive
())&&
organizationStructure
.
getName
().
equals
(
organizationStructureDto
.
getName
());
OrganizationStructureExample
example
=
new
OrganizationStructureExample
();
example
.
createCriteria
().
andIdNotEqualTo
(
organizationStructureDto
.
getId
());
boolean
nameNotExist
=
organizationStructureMapper
.
countByExample
(
example
)
<
1
;
if
(
notChange
)
{
return
ApiResultDto
.
fail
(
ErrorMessageCN
.
OrgStructureFailed
);
}
if
(!
nameNotExist
)
{
return
ApiResultDto
.
fail
(
ErrorMessageCN
.
OrgStructureNameExist
);
}
//copy current OrganizationStructure as tmp
OrganizationStructure
originOrganizationStructure
=
new
OrganizationStructure
();
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/UserServiceImpl.java
View file @
40eb5a1a
...
...
@@ -21,6 +21,7 @@ import pwc.taxtech.atms.common.UserLoginType;
import
pwc.taxtech.atms.common.UserStatus
;
import
pwc.taxtech.atms.common.message.ErrorMessage
;
import
pwc.taxtech.atms.common.message.UserMessage
;
import
pwc.taxtech.atms.common.util.BeanUtil
;
import
pwc.taxtech.atms.common.util.HttpUtil
;
import
pwc.taxtech.atms.constant.DimensionConstant
;
import
pwc.taxtech.atms.constant.PermissionCode
;
...
...
@@ -104,6 +105,8 @@ public class UserServiceImpl extends AbstractService {
private
UserRoleServiceImpl
userRoleService
;
@Autowired
private
JwtAuthenticationService
jwtAuthenticationService
;
@Autowired
private
BeanUtil
beanUtil
;
@Value
(
"${api.url}"
)
private
String
apiUrl
;
...
...
atms-dao/src/main/java/pwc/taxtech/atms/dpo/UserDto.java
View file @
40eb5a1a
...
...
@@ -32,14 +32,6 @@ public class UserDto {
this
.
id
=
id
;
}
public
String
getID
()
{
return
id
;
}
public
void
setID
(
String
id
)
{
this
.
id
=
id
;
}
public
String
getUserName
()
{
return
userName
;
}
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/dao/extends/UserExtendsMapper.xml
View file @
40eb5a1a
...
...
@@ -34,7 +34,7 @@
user
WHERE
LOWER (user_name) = LOWER (#{userName})
AND id != #{
ID
}
AND id != #{
id
}
</select>
<select
id=
"selectUserWithSameEmail"
parameterType=
"pwc.taxtech.atms.dpo.UserDto"
resultMap=
"BaseResultMap"
>
...
...
@@ -46,7 +46,7 @@
user
WHERE
LOWER (email) = LOWER (#{email})
AND id != #{
ID
}
AND id != #{
id
}
</select>
<select
id=
"selectByEmailIgnoreCase"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
...
...
atms-web/src/main/webapp/app/admin/infrastructure/userDetail/user-detail-view.ctrl.js
View file @
40eb5a1a
...
...
@@ -90,6 +90,12 @@
$scope
.
addExistOrgIsUpdate
=
false
;
};
$scope
.
$watch
(
'addExistOrgOperateType'
,
function
(
newValue
,
oldValue
)
{
if
(
newValue
==
null
&&
oldValue
==
constant
.
Operation
.
Add
)
{
$scope
.
getOrgRoleListView
();
}
});
//添加现有权限
$scope
.
popupRoleAddWin
=
function
()
{
...
...
atms-web/src/main/webapp/app/admin/infrastructure/userManage/user-manage.ctrl.js
View file @
40eb5a1a
...
...
@@ -56,7 +56,7 @@
resetErrorStatus
();
userService
.
getSingleUser
(
userId
).
success
(
function
(
userData
)
{
$scope
.
editUserModel
.
IsAdmin
=
userData
.
isAdmin
;
$scope
.
editUserModel
.
id
=
userData
.
ID
;
$scope
.
editUserModel
.
ID
=
userData
.
ID
;
$scope
.
editUserModel
.
UserName
=
userData
.
userName
;
$scope
.
editUserModel
.
Status
=
userData
.
status
;
$scope
.
editUserModel
.
OrganizationID
=
userData
.
organizationID
;
...
...
atms-web/src/main/webapp/app/common/controls/edit-user-modal/edit-user-modal.ctrl.js
View file @
40eb5a1a
...
...
@@ -24,7 +24,7 @@ controller('editUserModalController', ['$scope', '$log', '$translate', 'uiGridCo
resetErrorStatus
();
userService
.
getSingleUser
(
userId
).
success
(
function
(
userData
)
{
$scope
.
editUserModel
=
{};
$scope
.
editUserModel
.
id
=
userData
.
ID
;
$scope
.
editUserModel
.
ID
=
userData
.
ID
;
$scope
.
editUserModel
.
UserName
=
userData
.
userName
;
$scope
.
editUserModel
.
Status
=
userData
.
status
;
$scope
.
editUserModel
.
OrganizationID
=
userData
.
organizationID
;
...
...
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