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
ed3867cb
Commit
ed3867cb
authored
Mar 14, 2019
by
gary
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、fixadminbug 50 51 需要问ba 61觉得可以不用修改
parent
af60c62b
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
274 additions
and
116 deletions
+274
-116
AnalysisController.java
...pi/src/main/java/pwc/taxtech/atms/AnalysisController.java
+12
-0
ErrorMessageCN.java
.../java/pwc/taxtech/atms/common/message/ErrorMessageCN.java
+2
-0
RoleData.java
atms-api/src/main/java/pwc/taxtech/atms/data/RoleData.java
+25
-11
RolePermissionData.java
...c/main/java/pwc/taxtech/atms/data/RolePermissionData.java
+5
-1
UserData.java
atms-api/src/main/java/pwc/taxtech/atms/data/UserData.java
+5
-1
AnalysisDomesticlParam.java
...pwc/taxtech/atms/dto/analysis/AnalysisDomesticlParam.java
+30
-0
AnalysisServiceImpl.java
...va/pwc/taxtech/atms/service/impl/AnalysisServiceImpl.java
+28
-1
AreaRegionServiceImpl.java
.../pwc/taxtech/atms/service/impl/AreaRegionServiceImpl.java
+1
-1
BusinessUnitServiceImpl.java
...wc/taxtech/atms/service/impl/BusinessUnitServiceImpl.java
+4
-0
DataInitServiceImpl.java
...va/pwc/taxtech/atms/service/impl/DataInitServiceImpl.java
+7
-11
OrganizationStructureServiceImpl.java
...h/atms/service/impl/OrganizationStructureServiceImpl.java
+8
-2
RoleServiceImpl.java
...n/java/pwc/taxtech/atms/service/impl/RoleServiceImpl.java
+35
-34
UserAccountServiceImpl.java
...pwc/taxtech/atms/service/impl/UserAccountServiceImpl.java
+3
-11
UserRoleServiceImpl.java
...va/pwc/taxtech/atms/service/impl/UserRoleServiceImpl.java
+8
-12
UserServiceImpl.java
...n/java/pwc/taxtech/atms/service/impl/UserServiceImpl.java
+4
-7
UserRoleInfo.java
...-dao/src/main/java/pwc/taxtech/atms/dpo/UserRoleInfo.java
+19
-0
app.json
atms-web/src/main/webapp/app-resources/i18n/zh-CN/app.json
+3
-0
business-unit.ctrl.js
...n/basicData/masterData/businessUnit/business-unit.ctrl.js
+1
-1
organization-list-view.less
...tructure/organizationListView/organization-list-view.less
+6
-0
user-list.html
...n/webapp/app/admin/infrastructure/userList/user-list.html
+1
-1
user-manage-list.ctrl.js
...in/infrastructure/userManageList/user-manage-list.ctrl.js
+21
-1
user-manage-list.html
...admin/infrastructure/userManageList/user-manage-list.html
+1
-0
domestic-data-import.ctrl.js
...-import/domestic-data-import/domestic-data-import.ctrl.js
+12
-1
edit-business-unit-modal.ctrl.js
...edit-business-unit-modal/edit-business-unit-modal.ctrl.js
+2
-6
edit-user-modal.html
.../app/common/controls/edit-user-modal/edit-user-modal.html
+11
-11
constant.js
atms-web/src/main/webapp/app/common/utils/constant.js
+12
-3
vatImportService.js
...rc/main/webapp/app/common/vatservices/vatImportService.js
+8
-0
No files found.
atms-api/src/main/java/pwc/taxtech/atms/AnalysisController.java
View file @
ed3867cb
...
...
@@ -2,16 +2,20 @@ package pwc.taxtech.atms;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
pwc.taxtech.atms.common.message.ErrorMessage
;
import
pwc.taxtech.atms.controller.BaseController
;
import
pwc.taxtech.atms.dto.ApiResultDto
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.analysis.AnalysisDomesticlParam
;
import
pwc.taxtech.atms.dto.analysis.AnalysisInternationlParam
;
import
pwc.taxtech.atms.dto.vatdto.CertifiedInvoicesListParam
;
import
pwc.taxtech.atms.exception.ServiceException
;
import
pwc.taxtech.atms.service.impl.AnalysisServiceImpl
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
...
...
@@ -46,6 +50,14 @@ public class AnalysisController extends BaseController {
}
}
@RequestMapping
(
value
=
"downloadDomesticFile/get"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
void
downloadCILQueryData
(
@RequestBody
AnalysisDomesticlParam
param
,
HttpServletResponse
response
)
{
logger
.
debug
(
"enter downloadDomesticFile"
);
String
fileName
=
"testFile"
;
analysisServiceImpl
.
downloadDomesticFile
(
response
,
param
,
fileName
);
}
@ResponseBody
@RequestMapping
(
value
=
"getAnalysisInternationalCompanyList"
,
method
=
RequestMethod
.
GET
)
public
List
<
String
>
getAnalysisInternationalCompanyList
(
@RequestParam
Integer
type
,
@RequestParam
String
period
)
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/common/message/ErrorMessageCN.java
View file @
ed3867cb
...
...
@@ -7,5 +7,7 @@ public class ErrorMessageCN {
public
static
final
String
InconsistentPeriod
=
"单表中期间不一致"
;
public
static
final
String
DoNotSelectPeriod
=
"未选择期间"
;
public
static
final
String
DoNotSelectCompany
=
"非选定主体"
;
public
static
final
String
StrctureRepeat
=
"层级重复!"
;
public
static
final
String
BusinssUnitRepeat
=
"事业部重复!"
;
}
atms-api/src/main/java/pwc/taxtech/atms/data/RoleData.java
View file @
ed3867cb
/*
package pwc.taxtech.atms.data;
import org.apache.commons.lang3.StringUtils;
...
...
@@ -19,11 +20,13 @@ import pwc.taxtech.atms.entity.RoleExample;
import javax.annotation.Resource;
*/
/**
* @Auther: Gary J Li
* @Date: 11/01/2019 14:53
* @Description:将Role存入ehcache,提高查询效率
*/
*//*
@Service
public class RoleData {
...
...
@@ -32,13 +35,15 @@ public class RoleData {
@Resource
private RoleMapper roleMapper;
/**
*/
/**
* 11/01/2019 16:15
* 根据serviceTypeId查询,存入ehcache
* [serviceTypeId]
* @author Gary J Li
* @return List<Role> roleList
*/
*//*
@Cacheable(value = "roleByServiceTypeIdCache", key = "#serviceTypeId")
public List<Role> selectByServiceTypeId(String serviceTypeId){
List<Role> roleList = new ArrayList<>();
...
...
@@ -54,13 +59,15 @@ public class RoleData {
return roleList;
}
/**
*/
/**
* 11/01/2019 16:16
* 根据id查询,存入ehcache
* [id]
* @author Gary J Li
* @return Role role
*/
*//*
@Cacheable(value = "roleByIdCache", key = "#id")
public Role selectByPrimaryKey(String id){
Role role = new Role();
...
...
@@ -72,13 +79,15 @@ public class RoleData {
return role;
}
/**
*/
/**
* 11/01/2019 16:17
* 根据主键id删除,并把ehcache里的role都删掉
* [roleDto]
* @author Gary J Li
* @return int res
*/
*//*
@Caching(evict= {@CacheEvict(value = "roleByServiceTypeIdCache", key = "#role.getServiceTypeId()"),@CacheEvict(value = "roleByIdCache", key = "#role.getId()")} )
public int deleteByPrimaryKey(RoleDto roleDto){
int res = 0;
...
...
@@ -90,13 +99,15 @@ public class RoleData {
return res;
}
/**
*/
/**
* 11/01/2019 16:20
* role写入,并在缓存里写入两个Hash(ServiceTypeId,Id)里
* [role]
* @author Gary J Li
* @return Role role
*/
*//*
@Caching(put= {@CachePut(value = "roleByServiceTypeIdCache", key = "#role.getServiceTypeId()"),@CachePut(value = "roleByIdCache", key = "#role.getId()")} )
public Role insert(Role role){
try{
...
...
@@ -107,13 +118,15 @@ public class RoleData {
return role;
}
/**
*/
/**
* 11/01/2019 16:22
* role更新,并在缓存里更新两个Hash(ServiceTypeId,Id)里
* [role]
* @author Gary J Li
* @return Role role
*/
*//*
@Caching(put= {@CachePut(value = "roleByServiceTypeIdCache", key = "#role.getServiceTypeId()"),@CachePut(value = "roleByIdCache", key = "#role.getId()")} )
public Role updateByPrimaryKey(Role role){
try{
...
...
@@ -124,3 +137,4 @@ public class RoleData {
return role;
}
}
*/
atms-api/src/main/java/pwc/taxtech/atms/data/RolePermissionData.java
View file @
ed3867cb
/*
package pwc.taxtech.atms.data;
import org.slf4j.Logger;
...
...
@@ -11,11 +12,13 @@ import pwc.taxtech.atms.entity.RolePermission;
import javax.annotation.Resource;
import java.util.List;
*/
/**
* @Auther: Gary J Li
* @Date: 11/01/2019 14:53
* @Description:
*/
*//*
@Service
public class RolePermissionData {
...
...
@@ -30,3 +33,4 @@ public class RolePermissionData {
}
}
*/
atms-api/src/main/java/pwc/taxtech/atms/data/UserData.java
View file @
ed3867cb
/*
package pwc.taxtech.atms.data;
import org.slf4j.Logger;
...
...
@@ -8,11 +9,13 @@ import org.springframework.stereotype.Service;
import pwc.taxtech.atms.dao.UserMapper;
import pwc.taxtech.atms.entity.User;
*/
/**
* @Auther: Gary J Li
* @Date: 11/01/2019 14:32
* @Description:
*/
*//*
@Service
public class UserData {
private static final Logger logger = LoggerFactory.getLogger(UserData.class);
...
...
@@ -25,3 +28,4 @@ public class UserData {
return userMapper.selectByUserNameIgnoreCase(inputLoginName);
}
}
*/
atms-api/src/main/java/pwc/taxtech/atms/dto/analysis/AnalysisDomesticlParam.java
0 → 100644
View file @
ed3867cb
package
pwc
.
taxtech
.
atms
.
dto
.
analysis
;
/**
* @Auther: Gary J Li
* @Date: 14/03/2019 11:28
* @Description:
*/
public
class
AnalysisDomesticlParam
{
private
Integer
type
;
private
String
period
;
public
Integer
getType
()
{
return
type
;
}
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
}
public
String
getPeriod
()
{
return
period
;
}
public
void
setPeriod
(
String
period
)
{
this
.
period
=
period
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/AnalysisServiceImpl.java
View file @
ed3867cb
...
...
@@ -14,6 +14,7 @@ import pwc.taxtech.atms.dto.analysis.*;
import
pwc.taxtech.atms.exception.ServiceException
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.InputStream
;
import
java.math.BigDecimal
;
import
java.text.DecimalFormat
;
...
...
@@ -613,6 +614,33 @@ public class AnalysisServiceImpl extends BaseService {
return
objects
;
}
public
void
downloadDomesticFile
(
HttpServletResponse
response
,
AnalysisDomesticlParam
param
,
String
fileName
)
{
/*String excelTemplatePathInClassPath = ExportTemplatePathConstant.CERTIFIED_INVOICES_LIST;
CertifiedInvoicesListCondition condition = beanUtil.copyProperties(param, new CertifiedInvoicesListCondition());
List<CertifiedInvoicesList> datas = certifiedInvoicesListMapper.selectByCondition(condition);
if(datas.size()<1){
throw new ServiceException(ErrorMessage.ExportFailed);
}
CertifiedInvoicesListHeader header = new CertifiedInvoicesListHeader();
Organization org = organizationMapper.selectByPrimaryKey(param.getOrgId());
header.setTaxPayerNumber(org.getTaxPayerNumber());
header.setPeriod(param.getPeriodStart());
header.setUnit(datas.get(0).getUnit());
List<CertifiedInvoicesListDto> dtoList = Lists.newArrayList();
datas.forEach(cil -> {
CertifiedInvoicesListDto dto = beanUtil.copyProperties(cil, new CertifiedInvoicesListDto());
dtoList.add(dto);
});
OutputStream outputStream = commonDocumentHelper.toXlsxFileUsingJxls(header,dtoList, excelTemplatePathInClassPath);
try {
return responseMessageBuilder.getDownloadTmpResponseMessage(response, outputStream, fileName);
} catch (Exception e) {
logger.error(String.format("导出已认证发票清单异常:%s",e.getMessage()));
}
return null;*/
}
public
List
<
String
>
getAnalysisInternationalCompanyList
(
Integer
type
,
String
periodStr
)
{
List
<
String
>
companyList
=
Lists
.
newArrayList
();
Integer
period
=
DateUtils
.
strToPeriod
(
periodStr
);
...
...
@@ -717,5 +745,4 @@ public class AnalysisServiceImpl extends BaseService {
}
return
false
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/AreaRegionServiceImpl.java
View file @
ed3867cb
...
...
@@ -91,7 +91,7 @@ public class AreaRegionServiceImpl {
AreaRegion
provinceRegion
=
new
AreaRegion
();
provinceRegion
.
setId
(
CommonUtils
.
getUUID
());
provinceRegion
.
setAreaId
(
area
.
getId
());
provinceRegion
.
setRegionId
(
null
==
provinceId
?
""
:
area
.
getId
()
);
provinceRegion
.
setRegionId
(
null
==
provinceId
?
""
:
provinceId
);
areaRegionMapper
.
insert
(
provinceRegion
);
}
// city
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/BusinessUnitServiceImpl.java
View file @
ed3867cb
...
...
@@ -12,6 +12,7 @@ import pwc.taxtech.atms.common.CommonUtils;
import
pwc.taxtech.atms.common.OperateLogType
;
import
pwc.taxtech.atms.common.OperationAction
;
import
pwc.taxtech.atms.common.OperationModule
;
import
pwc.taxtech.atms.common.message.ErrorMessageCN
;
import
pwc.taxtech.atms.dao.BusinessUnitMapper
;
import
pwc.taxtech.atms.dto.BusinessUnitDto
;
import
pwc.taxtech.atms.dto.BusinessUnitInputDto
;
...
...
@@ -128,6 +129,9 @@ public class BusinessUnitServiceImpl {
if
(
businessUnit
==
null
)
{
throw
new
ApplicationException
(
"can't find business unit, id: "
+
businessUnitDto
.
getId
());
}
if
(
businessUnit
.
getName
().
equals
(
businessUnitDto
.
getName
())){
throw
new
ApplicationException
(
ErrorMessageCN
.
BusinssUnitRepeat
);
}
// copy current businessUnit as tmp
BusinessUnit
originBusinessUnit
=
new
BusinessUnit
();
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/DataInitServiceImpl.java
View file @
ed3867cb
...
...
@@ -6,7 +6,6 @@ import org.springframework.stereotype.Service;
import
org.springframework.util.StringUtils
;
import
pwc.taxtech.atms.common.CommonConstants
;
import
pwc.taxtech.atms.common.CommonUtils
;
import
pwc.taxtech.atms.data.RoleData
;
import
pwc.taxtech.atms.dto.datainit.DataCountDto
;
import
pwc.taxtech.atms.dto.datainit.DataInitDto
;
import
pwc.taxtech.atms.dto.user.UserTemp
;
...
...
@@ -31,9 +30,6 @@ public class DataInitServiceImpl extends AbstractService {
@Autowired
private
FileService
fileService
;
@Autowired
private
RoleData
roleData
;
/*
* (non-Javadoc)
*
...
...
@@ -646,7 +642,7 @@ public class DataInitServiceImpl extends AbstractService {
/**
* 导入机构层级数据
*
* @param
orgStructureList
* @param
dataInitDto
* @return
*/
private
void
importOrgStructure
(
DataInitDto
dataInitDto
)
{
...
...
@@ -717,7 +713,7 @@ public class DataInitServiceImpl extends AbstractService {
/**
* 导入区域数据
*
* @param
orgStructureList
* @param
dataInitDto
* @return
*/
private
void
importArea
(
DataInitDto
dataInitDto
)
{
...
...
@@ -774,7 +770,7 @@ public class DataInitServiceImpl extends AbstractService {
/**
* 导入企业科目数据
*
* @param
orgStructureList
* @param
dataInitDto
* @return
*/
private
void
importEnterpriseAccount
(
DataInitDto
dataInitDto
)
{
...
...
@@ -916,8 +912,8 @@ public class DataInitServiceImpl extends AbstractService {
RoleCategory
newObject
=
queryList
.
stream
().
filter
(
a
->
Objects
.
equals
(
a
.
getName
(),
oldId
)).
findFirst
().
orElse
(
null
);
role
.
setRoleCategoryId
(
newObject
==
null
?
null
:
newObject
.
getId
());
try
{
//
roleMapper.insert(role);
roleData
.
insert
(
role
);
roleMapper
.
insert
(
role
);
//
roleData.insert(role);
}
catch
(
Exception
e
)
{
logger
.
debug
(
"Error inserting 角色: "
+
e
.
getMessage
());
errorCount
++;
...
...
@@ -950,8 +946,8 @@ public class DataInitServiceImpl extends AbstractService {
// 插入User
userTempList
=
dataInitDto
.
getImportUserTemp
();
List
<
Organization
>
orgList
=
organizationMapper
.
selectByExample
(
null
);
//
List<Role> roleList = roleMapper.selectByExample(null);
List
<
Role
>
roleList
=
roleData
.
selectByServiceTypeId
(
"All"
);
List
<
Role
>
roleList
=
roleMapper
.
selectByExample
(
null
);
//
List<Role> roleList = roleData.selectByServiceTypeId("All");
for
(
UserTemp
item
:
userTempList
)
{
try
{
User
user
=
new
User
();
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/OrganizationStructureServiceImpl.java
View file @
ed3867cb
...
...
@@ -12,6 +12,7 @@ import pwc.taxtech.atms.common.CommonUtils;
import
pwc.taxtech.atms.common.OperateLogType
;
import
pwc.taxtech.atms.common.OperationAction
;
import
pwc.taxtech.atms.common.OperationModule
;
import
pwc.taxtech.atms.common.message.ErrorMessageCN
;
import
pwc.taxtech.atms.dao.OrganizationStructureMapper
;
import
pwc.taxtech.atms.dto.IdModel
;
import
pwc.taxtech.atms.dto.OperationLogDto
;
...
...
@@ -66,6 +67,11 @@ public class OrganizationStructureServiceImpl {
}
public
void
addOrganizationStructure
(
OrganizationStructureInputDto
organizationStructureDto
)
{
OrganizationStructureExample
example
=
new
OrganizationStructureExample
();
example
.
createCriteria
().
andNameEqualTo
(
organizationStructureDto
.
getName
());
if
(
organizationStructureMapper
.
countByExample
(
example
)>
0
){
throw
new
ApplicationException
(
ErrorMessageCN
.
StrctureRepeat
);
}
OrganizationStructure
organizationStructure
=
rotateOrganizationStructureDto
(
organizationStructureDto
);
organizationStructure
.
setId
(
CommonUtils
.
getUUID
());
organizationStructure
.
setCreateTime
(
new
Date
());
...
...
@@ -136,8 +142,8 @@ public class OrganizationStructureServiceImpl {
OrganizationStructure
originOrganizationStructure
=
new
OrganizationStructure
();
CommonUtils
.
copyProperties
(
organizationStructure
,
originOrganizationStructure
);
if
(
organizationStructureDto
.
getIsActive
().
equals
(
organizationStructure
.
getIsActive
())
||
org
.
apache
.
commons
.
lang3
.
StringUtils
.
equals
(
organizationStructureDto
.
getName
(),
organizationStructure
.
getName
()))
{
if
(
!
organizationStructureDto
.
getIsActive
().
equals
(
organizationStructure
.
getIsActive
())
||
!
org
.
apache
.
commons
.
lang3
.
StringUtils
.
equals
(
organizationStructureDto
.
getName
(),
organizationStructure
.
getName
()))
{
isStatusChangeOperation
=
true
;
organizationStructure
.
setIsActive
(
organizationStructureDto
.
getIsActive
());
organizationStructure
.
setName
(
organizationStructureDto
.
getName
());
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/RoleServiceImpl.java
View file @
ed3867cb
...
...
@@ -13,7 +13,6 @@ import pwc.taxtech.atms.common.OperationModule;
import
pwc.taxtech.atms.common.RoleSourceEnum
;
import
pwc.taxtech.atms.common.ServiceTypeEnum
;
import
pwc.taxtech.atms.constant.DimensionConstant
;
import
pwc.taxtech.atms.data.RoleData
;
import
pwc.taxtech.atms.dpo.DimensionParamDto
;
import
pwc.taxtech.atms.dpo.DimensionValueOrgDto
;
import
pwc.taxtech.atms.dpo.OrganizationDto
;
...
...
@@ -70,16 +69,13 @@ public class RoleServiceImpl extends AbstractService {
@Autowired
private
JwtAuthenticationService
jwtAuthenticationService
;
@Autowired
private
RoleData
roleData
;
public
List
<
NavTreeDto
>
getRoleTreeList
()
{
logger
.
debug
(
"RoleServiceImpl getRoleTreeList"
);
RoleCategoryExample
roleCategoryExample
=
new
RoleCategoryExample
();
roleCategoryExample
.
createCriteria
().
andIsActiveEqualTo
(
CommonConstants
.
ACTIVE_STATUS
);
List
<
RoleCategory
>
roleCategoryList
=
roleCategoryMapper
.
selectByExample
(
roleCategoryExample
);
//
List<Role> allRoleList = roleMapper.selectByExample(new RoleExample());
List
<
Role
>
allRoleList
=
roleData
.
selectByServiceTypeId
(
"All"
);
List
<
Role
>
allRoleList
=
roleMapper
.
selectByExample
(
new
RoleExample
());
//
List<Role> allRoleList = roleData.selectByServiceTypeId("All");
List
<
NavTreeDto
>
retList
=
new
ArrayList
<>();
for
(
RoleCategory
category
:
roleCategoryList
)
{
NavTreeDto
treeDto
=
new
NavTreeDto
();
...
...
@@ -189,8 +185,8 @@ public class RoleServiceImpl extends AbstractService {
private
List
<
Role
>
findAll
()
{
RoleExample
roleExample
=
new
RoleExample
();
//
return roleMapper.selectByExample(roleExample);
return
roleData
.
selectByServiceTypeId
(
"All"
);
return
roleMapper
.
selectByExample
(
roleExample
);
//
return roleData.selectByServiceTypeId("All");
}
private
List
<
UserRole
>
findAllUserRoles
()
{
...
...
@@ -599,7 +595,12 @@ public class RoleServiceImpl extends AbstractService {
public
List
<
UserRoleInfo
>
getAllUserRoleList
()
{
List
<
VMUser
>
userList
=
userService
.
findAllUsers
().
stream
().
map
(
this
::
rotateUserToVMUser
)
.
collect
(
Collectors
.
toList
());
return
getAllUserRoleListByUserList
(
userList
,
""
);
List
<
UserRoleInfo
>
res
=
getAllUserRoleListByUserList
(
userList
,
""
);
res
.
forEach
(
l
->{
l
.
setBusinessUnitName
(
businessUnitMapper
.
selectByPrimaryKey
(
l
.
getBusinessUnitId
()).
getName
());
l
.
setAreaName
(
areaMapper
.
selectByPrimaryKey
(
l
.
getAreaId
()).
getName
());
});
return
res
;
}
private
VMUser
rotateUserToVMUser
(
User
user
)
{
...
...
@@ -623,8 +624,8 @@ public class RoleServiceImpl extends AbstractService {
.
collect
(
Collectors
.
toList
());
for
(
Map
<
String
,
String
>
l
:
userRoleList
)
{
//
Role role = roleMapper.selectByPrimaryKey(l.get("roleId"));
Role
role
=
roleData
.
selectByPrimaryKey
(
l
.
get
(
"roleId"
));
Role
role
=
roleMapper
.
selectByPrimaryKey
(
l
.
get
(
"roleId"
));
//
Role role = roleData.selectByPrimaryKey(l.get("roleId"));
UserRoleDto
userRoleDto
=
new
UserRoleDto
();
userRoleDto
.
setRoleId
(
l
.
get
(
"roleId"
));
userRoleDto
.
setUserId
(
l
.
get
(
"userId"
));
...
...
@@ -978,8 +979,8 @@ public class RoleServiceImpl extends AbstractService {
*/
public
void
addUsersToRole
(
String
roleId
,
String
serviceTypeId
,
List
<
String
>
userIdList
)
{
//
Role role = roleMapper.selectByPrimaryKey(roleId);
Role
role
=
roleData
.
selectByPrimaryKey
(
roleId
);
Role
role
=
roleMapper
.
selectByPrimaryKey
(
roleId
);
//
Role role = roleData.selectByPrimaryKey(roleId);
if
(
role
==
null
)
{
return
;
}
...
...
@@ -1032,8 +1033,8 @@ public class RoleServiceImpl extends AbstractService {
for
(
String
roleId
:
roleIdList
)
{
UpdateLogParams
updateLogParams
=
new
UpdateLogParams
();
User
user
=
userMapper
.
selectByPrimaryKey
(
userId
);
//
Role role = roleMapper.selectByPrimaryKey(roleId);
Role
role
=
roleData
.
selectByPrimaryKey
(
roleId
);
Role
role
=
roleMapper
.
selectByPrimaryKey
(
roleId
);
//
Role role = roleData.selectByPrimaryKey(roleId);
updateLogParams
.
setOperationModule
(
OperationModule
.
Role
.
value
());
updateLogParams
.
setOperationUser
(
authUserHelper
.
getCurrentAuditor
().
get
());
updateLogParams
.
setOperationContent
(
user
==
null
?
""
:
user
.
getUserName
());
...
...
@@ -1057,8 +1058,8 @@ public class RoleServiceImpl extends AbstractService {
// roleTypeId修订为serviceTypeId
RoleExample
example
=
new
RoleExample
();
example
.
createCriteria
().
andServiceTypeIdEqualTo
(
serviceTypeId
);
//
List<Role> roleList = roleMapper.selectByExample(example);
List
<
Role
>
roleList
=
roleData
.
selectByServiceTypeId
(
serviceTypeId
);
List
<
Role
>
roleList
=
roleMapper
.
selectByExample
(
example
);
//
List<Role> roleList = roleData.selectByServiceTypeId(serviceTypeId);
List
<
RoleDto
>
roleDtoList
=
new
ArrayList
<>();
roleList
.
stream
().
forEach
(
role
->
{
RoleDto
roleDto
=
new
RoleDto
();
...
...
@@ -1200,8 +1201,8 @@ public class RoleServiceImpl extends AbstractService {
roleToAdd
.
setName
(
roleDisplayDto
.
getName
().
trim
());
roleToAdd
.
setCreateTime
(
new
Date
());
roleToAdd
.
setUpdateTime
(
new
Date
());
//
roleMapper.insert(roleToAdd);
roleData
.
insert
(
roleToAdd
);
roleMapper
.
insert
(
roleToAdd
);
//
roleData.insert(roleToAdd);
// operation log for add role
UpdateLogParams
updateLogParams
=
new
UpdateLogParams
();
...
...
@@ -1259,8 +1260,8 @@ public class RoleServiceImpl extends AbstractService {
}
// update role info
//
Role roleToUpdate = roleMapper.selectByPrimaryKey(roleId);
Role
roleToUpdate
=
roleData
.
selectByPrimaryKey
(
roleId
);
Role
roleToUpdate
=
roleMapper
.
selectByPrimaryKey
(
roleId
);
//
Role roleToUpdate = roleData.selectByPrimaryKey(roleId);
if
(
roleToUpdate
==
null
)
{
return
;
}
...
...
@@ -1268,8 +1269,8 @@ public class RoleServiceImpl extends AbstractService {
CommonUtils
.
copyProperties
(
roleToUpdate
,
roleOriginal
);
roleToUpdate
.
setName
(
updateRole
.
getRoleName
().
trim
());
roleToUpdate
.
setDescription
(
updateRole
.
getRoleDescription
());
//
roleMapper.updateByPrimaryKey(roleToUpdate);
roleData
.
updateByPrimaryKey
(
roleToUpdate
);
roleMapper
.
updateByPrimaryKey
(
roleToUpdate
);
//
roleData.updateByPrimaryKey(roleToUpdate);
// operation log for role update
UpdateLogParams
updateRoleLogParams
=
new
UpdateLogParams
();
...
...
@@ -1394,8 +1395,8 @@ public class RoleServiceImpl extends AbstractService {
rolePermissionMapper
.
deleteByExample
(
rolePermissionExample
);
// delete role
//
roleMapper.deleteByPrimaryKey(roleDto.getId());
roleData
.
deleteByPrimaryKey
(
roleDto
);
roleMapper
.
deleteByPrimaryKey
(
roleDto
.
getId
());
//
roleData.deleteByPrimaryKey(roleDto);
// todo 未确认roleDto是否有serviceTypeId
// operation log
...
...
@@ -1470,8 +1471,8 @@ public class RoleServiceImpl extends AbstractService {
});
// 角色列表
//
List<Role> roles = roleMapper.selectByExample(null);
List
<
Role
>
roles
=
roleData
.
selectByServiceTypeId
(
"All"
);
List
<
Role
>
roles
=
roleMapper
.
selectByExample
(
null
);
//
List<Role> roles = roleData.selectByServiceTypeId("All");
List
<
NameDto
>
roleList
=
new
ArrayList
<>();
roles
.
stream
().
forEach
(
role
->
{
NameDto
nameDto
=
new
NameDto
();
...
...
@@ -1780,8 +1781,8 @@ public class RoleServiceImpl extends AbstractService {
RoleExample
roleExample
=
new
RoleExample
();
roleExample
.
createCriteria
().
andServiceTypeIdEqualTo
(
serviceTypeId
);
//
List<Role> roleList = roleMapper.selectByExample(roleExample);
List
<
Role
>
roleList
=
roleData
.
selectByServiceTypeId
(
serviceTypeId
);
List
<
Role
>
roleList
=
roleMapper
.
selectByExample
(
roleExample
);
//
List<Role> roleList = roleData.selectByServiceTypeId(serviceTypeId);
for
(
Role
role
:
roleList
)
{
RolePermissionDto
rolePermissionDto
=
new
RolePermissionDto
();
rolePermissionDto
.
setRoleId
(
role
.
getId
());
...
...
@@ -1971,8 +1972,8 @@ public class RoleServiceImpl extends AbstractService {
// 用户列表
List
<
User
>
userList
=
userMapper
.
selectByExample
(
new
UserExample
());
// 角色列表
//
List<Role> roleList = roleMapper.selectByExample(new RoleExample());
List
<
Role
>
roleList
=
roleData
.
selectByServiceTypeId
(
"All"
);
List
<
Role
>
roleList
=
roleMapper
.
selectByExample
(
new
RoleExample
());
//
List<Role> roleList = roleData.selectByServiceTypeId("All");
List
<
UserDimensionValueRoleDto
>
group
=
userDimensionValueRoleDtoList
.
stream
()
.
map
(
this
::
convertUserDimensionValueRoleDtoForDistinct
).
distinct
().
collect
(
Collectors
.
toList
());
for
(
UserDimensionValueRoleDto
item
:
group
)
{
...
...
@@ -2131,10 +2132,10 @@ public class RoleServiceImpl extends AbstractService {
List
<
VMUser
>
userList
=
userMapper
.
selectByExample
(
userExample
).
stream
()
.
map
(
sa
->
CommonUtils
.
copyProperties
(
sa
,
new
VMUser
())).
collect
(
toList
());
// 角色列表
/*List<NameDto> roleList = roleMapper.selectByExample(new RoleExample()).stream()
.map(sa -> CommonUtils.copyProperties(sa, new NameDto())).collect(toList());*/
List
<
NameDto
>
roleList
=
roleData
.
selectByServiceTypeId
(
"All"
).
stream
()
List
<
NameDto
>
roleList
=
roleMapper
.
selectByExample
(
new
RoleExample
()).
stream
()
.
map
(
sa
->
CommonUtils
.
copyProperties
(
sa
,
new
NameDto
())).
collect
(
toList
());
/*List<NameDto> roleList = roleData.selectByServiceTypeId("All").stream()
.map(sa -> CommonUtils.copyProperties(sa, new NameDto())).collect(toList());*/
// 获取原始角色列表
List
<
UserRoleSimpleDto
>
userRoleList
=
getOriginalUserRoleList
(
roleList
);
// 用户维度
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/UserAccountServiceImpl.java
View file @
ed3867cb
...
...
@@ -12,7 +12,6 @@ import pwc.taxtech.atms.common.*;
import
pwc.taxtech.atms.common.message.UserMessage
;
import
pwc.taxtech.atms.dao.UserHistoricalPasswordMapper
;
import
pwc.taxtech.atms.dao.UserMapper
;
import
pwc.taxtech.atms.data.RoleData
;
import
pwc.taxtech.atms.dto.ForgetPasswordDto
;
import
pwc.taxtech.atms.dto.LoginOutputDto
;
import
pwc.taxtech.atms.dto.MailMto
;
...
...
@@ -20,13 +19,8 @@ import pwc.taxtech.atms.dto.OperationResultDto;
import
pwc.taxtech.atms.dto.UpdateLogParams
;
import
pwc.taxtech.atms.dto.user.UserAndUserRoleSaveDto
;
import
pwc.taxtech.atms.dto.user.UserPasswordDto
;
import
pwc.taxtech.atms.entity.Role
;
import
pwc.taxtech.atms.entity.User
;
import
pwc.taxtech.atms.entity.UserHistoricalPassword
;
import
pwc.taxtech.atms.entity.UserHistoricalPasswordExample
;
import
pwc.taxtech.atms.entity.*
;
import
pwc.taxtech.atms.entity.UserHistoricalPasswordExample.Criteria
;
import
pwc.taxtech.atms.entity.UserOrganization
;
import
pwc.taxtech.atms.entity.UserRole
;
import
pwc.taxtech.atms.security.AtmsPasswordEncoder
;
import
java.util.ArrayList
;
...
...
@@ -58,8 +52,6 @@ public class UserAccountServiceImpl extends AbstractService {
private
AuthUserHelper
authUserHelper
;
@Autowired
private
AtmsApiSettings
atmsApiSettings
;
@Autowired
private
RoleData
roleData
;
public
OperationResultDto
<
LoginOutputDto
>
changeExternalUserPassword
(
UserPasswordDto
userPasswordDto
)
{
logger
.
debug
(
"修改密码 Start"
);
...
...
@@ -318,8 +310,8 @@ public class UserAccountServiceImpl extends AbstractService {
logger
.
debug
(
"Start to insert new user [ {} ]"
,
user
.
getId
());
userMapper
.
insert
(
user
);
List
<
String
>
arrRoles
=
userAndUserRoleSaveDto
.
getRoleIds
();
//
List<Role> roleQuery = roleMapper.selectByExample(new RoleExample());
List
<
Role
>
roleQuery
=
roleData
.
selectByServiceTypeId
(
"All"
);
List
<
Role
>
roleQuery
=
roleMapper
.
selectByExample
(
new
RoleExample
());
//
List<Role> roleQuery = roleData.selectByServiceTypeId("All");
if
(
arrRoles
!=
null
&&
!
arrRoles
.
isEmpty
())
{
for
(
String
role
:
arrRoles
)
{
UserRole
userRole
=
new
UserRole
();
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/UserRoleServiceImpl.java
View file @
ed3867cb
...
...
@@ -17,7 +17,6 @@ import pwc.taxtech.atms.common.message.LogMessage;
import
pwc.taxtech.atms.common.message.UserMessage
;
import
pwc.taxtech.atms.constant.DimensionConstant
;
import
pwc.taxtech.atms.constant.UserConstant
;
import
pwc.taxtech.atms.data.RoleData
;
import
pwc.taxtech.atms.dpo.DimensionValueOrgDto
;
import
pwc.taxtech.atms.dpo.OrganizationDto
;
import
pwc.taxtech.atms.dpo.RoleInfo
;
...
...
@@ -65,9 +64,6 @@ public class UserRoleServiceImpl extends AbstractService {
@Autowired
private
UserServiceImpl
userService
;
@Autowired
private
RoleData
roleData
;
public
OrgRoleDtoList
getUserRoleByUserId
(
String
userId
)
{
logger
.
debug
(
"UserRoleServiceImpl getUserRoleByUserId [ userId: {} ]"
,
userId
);
OrgRoleDtoList
result
=
new
OrgRoleDtoList
();
...
...
@@ -1245,8 +1241,8 @@ public class UserRoleServiceImpl extends AbstractService {
}
// 添加日志
for
(
UserDimensionValueRole
r
:
target
)
{
//
Role role = roleMapper.selectByPrimaryKey(r.getRoleId());
Role
role
=
roleData
.
selectByPrimaryKey
(
r
.
getRoleId
());
Role
role
=
roleMapper
.
selectByPrimaryKey
(
r
.
getRoleId
());
//
Role role = roleData.selectByPrimaryKey(r.getRoleId());
String
roleName
=
role
==
null
?
""
:
role
.
getName
();
addOrDeleteDataAddLog
(
dimensionName
+
CommonConstants
.
DashSignSeparator
+
dimensionValueName
...
...
@@ -1296,8 +1292,8 @@ public class UserRoleServiceImpl extends AbstractService {
}
private
RoleDto
getRoleDtoById
(
String
roleId
)
{
//
Role query = roleMapper.selectByPrimaryKey(roleId);
Role
query
=
roleData
.
selectByPrimaryKey
(
roleId
);
Role
query
=
roleMapper
.
selectByPrimaryKey
(
roleId
);
//
Role query = roleData.selectByPrimaryKey(roleId);
return
query
==
null
?
new
RoleDto
()
:
CommonUtils
.
copyProperties
(
query
,
new
RoleDto
());
}
...
...
@@ -1334,8 +1330,8 @@ public class UserRoleServiceImpl extends AbstractService {
userOrganizationRoleMapper
.
deleteByPrimaryKey
(
r
.
getId
());
// 添加日志
//
Role role = roleMapper.selectByPrimaryKey(r.getRoleId());
Role
role
=
roleData
.
selectByPrimaryKey
(
r
.
getRoleId
());
Role
role
=
roleMapper
.
selectByPrimaryKey
(
r
.
getRoleId
());
//
Role role = roleData.selectByPrimaryKey(r.getRoleId());
String
roleName
=
role
==
null
?
""
:
role
.
getName
();
addOrDeleteDataAddLog
(
orgName
+
CommonConstants
.
DashSignSeparator
+
roleName
,
operateUserName
,
OperationModule
.
UserOrganizationRole
.
value
(),
OperationAction
.
Delete
.
value
(),
""
);
...
...
@@ -1380,8 +1376,8 @@ public class UserRoleServiceImpl extends AbstractService {
userRole
.
getRoleId
());
userOrganizationRoleMapper
.
insert
(
userRole
);
// 添加日志
//
Role roleObject = roleMapper.selectByPrimaryKey(item.getRoleId());
Role
roleObject
=
roleData
.
selectByPrimaryKey
(
item
.
getRoleId
());
Role
roleObject
=
roleMapper
.
selectByPrimaryKey
(
item
.
getRoleId
());
//
Role roleObject = roleData.selectByPrimaryKey(item.getRoleId());
String
roleName
=
roleObject
==
null
?
""
:
roleObject
.
getName
();
addOrDeleteDataAddLog
(
orgName
+
CommonConstants
.
DashSignSeparator
+
roleName
,
operateUserName
,
OperationModule
.
UserOrganizationRole
.
value
(),
OperationAction
.
New
.
value
(),
""
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/UserServiceImpl.java
View file @
ed3867cb
...
...
@@ -30,7 +30,6 @@ import pwc.taxtech.atms.dao.RolePermissionMapper;
import
pwc.taxtech.atms.dao.UserMapper
;
import
pwc.taxtech.atms.dao.UserOrganizationMapper
;
import
pwc.taxtech.atms.dao.UserRoleMapper
;
import
pwc.taxtech.atms.data.RoleData
;
import
pwc.taxtech.atms.dpo.RoleInfo
;
import
pwc.taxtech.atms.dpo.UserDto
;
import
pwc.taxtech.atms.dpo.UserRoleInfo
;
...
...
@@ -99,8 +98,6 @@ public class UserServiceImpl extends AbstractService {
@Autowired
private
UserRoleServiceImpl
userRoleService
;
@Autowired
private
RoleData
roleData
;
@Autowired
private
JwtAuthenticationService
jwtAuthenticationService
;
@Value
(
"${api.url}"
)
...
...
@@ -804,8 +801,8 @@ public class UserServiceImpl extends AbstractService {
logger
.
debug
(
"Start to delete userRole [ {} ]"
,
userRole
.
getId
());
userRoleMapper
.
deleteByPrimaryKey
(
userRole
.
getId
());
}
//
List<Role> roleQuery = roleMapper.selectByExample(new RoleExample());
List
<
Role
>
roleQuery
=
roleData
.
selectByServiceTypeId
(
"All"
);
List
<
Role
>
roleQuery
=
roleMapper
.
selectByExample
(
new
RoleExample
());
//
List<Role> roleQuery = roleData.selectByServiceTypeId("All");
for
(
String
role
:
userDto
.
getRoleIds
())
{
if
(
oldUserRoleList
.
stream
().
anyMatch
(
sa
->
Objects
.
equals
(
sa
.
getRoleId
(),
role
)))
{
continue
;
...
...
@@ -1001,8 +998,8 @@ public class UserServiceImpl extends AbstractService {
logger
.
debug
(
"Start to delete UserOrganizationRole [ {} ]"
,
oneTarget
.
getId
());
userOrganizationRoleMapper
.
deleteByPrimaryKey
(
oneTarget
.
getId
());
// 添加日志
//
Role role = roleMapper.selectByPrimaryKey(oneTarget.getRoleId());
Role
role
=
roleData
.
selectByPrimaryKey
(
oneTarget
.
getRoleId
());
Role
role
=
roleMapper
.
selectByPrimaryKey
(
oneTarget
.
getRoleId
());
//
Role role = roleData.selectByPrimaryKey(oneTarget.getRoleId());
String
roleName
=
role
==
null
?
""
:
role
.
getName
();
operationLogService
.
addOrDeleteDataAddLog
(
generateUpdateLogParams
(
OperateLogType
.
OperationLogUser
.
value
(),
...
...
atms-dao/src/main/java/pwc/taxtech/atms/dpo/UserRoleInfo.java
View file @
ed3867cb
...
...
@@ -39,10 +39,14 @@ public class UserRoleInfo {
@JsonProperty
(
"businessUnitID"
)
private
String
businessUnitId
;
private
String
businessUnitName
;
/// 区域Id
@JsonProperty
(
"areaID"
)
private
String
areaId
;
private
String
areaName
;
public
Boolean
isAccessible
;
/// 角色列表
...
...
@@ -203,4 +207,19 @@ public class UserRoleInfo {
this
.
roleInfoList
=
roleInfoList
;
}
public
String
getBusinessUnitName
()
{
return
businessUnitName
;
}
public
void
setBusinessUnitName
(
String
businessUnitName
)
{
this
.
businessUnitName
=
businessUnitName
;
}
public
String
getAreaName
()
{
return
areaName
;
}
public
void
setAreaName
(
String
areaName
)
{
this
.
areaName
=
areaName
;
}
}
atms-web/src/main/webapp/app-resources/i18n/zh-CN/app.json
View file @
ed3867cb
...
...
@@ -893,5 +893,8 @@
"TBEBITForm"
:
"TB EBIT 表格"
,
"ClickEnsureTip"
:
"请点击确定按钮!"
,
"true"
:
"是"
,
"false"
:
"否"
,
"~MustBeEndOneApp"
:
"I Must be the End One, please!"
}
atms-web/src/main/webapp/app/admin/basicData/masterData/businessUnit/business-unit.ctrl.js
View file @
ed3867cb
...
...
@@ -240,7 +240,7 @@
required
:
$translate
.
instant
(
'BusinessUnitEmptyNode'
),
minlength
:
$translate
.
instant
(
'BusinessUnitEmptyNode'
),
maxlength
:
$translate
.
instant
(
'BusinessUnitOutOfLengthNode'
),
BURepeated
:
$translate
.
instant
(
'
BusinessUnitDuplicateNode
'
)
BURepeated
:
$translate
.
instant
(
'
TaxData
'
)
},
IsActive
:
$translate
.
instant
(
'BusinessUnitStatusUnsureness'
)
},
...
...
atms-web/src/main/webapp/app/admin/infrastructure/organizationListView/organization-list-view.less
View file @
ed3867cb
...
...
@@ -10,6 +10,10 @@
color: #333333;
}
.dx-datagrid-rowsview .dx-datagrid-table .dx-freespace-row{
height: 31.11px !important;
}
.content-container {
background-color: #ffffff;
...
...
@@ -103,6 +107,8 @@
/*height: 600px;*/
margin-bottom: 15px;
}
}
}
.page-footer {
...
...
atms-web/src/main/webapp/app/admin/infrastructure/userList/user-list.html
View file @
ed3867cb
...
...
@@ -11,7 +11,7 @@
<div
class=
"align-right"
style=
"margin-top:5px;"
>
<!--<button class="btn btn-export" type="button" ng-click="" translate="Export"></button>-->
<
export-button
style=
"float: right; margin-left: 0px; margin-top: 7px"
><export-button
>
<
!--<export-button style="float: right; margin-left: 0px; margin-top: 7px"><export-button>--
>
</div>
<div
class=
"right-operate "
>
...
...
atms-web/src/main/webapp/app/admin/infrastructure/userManageList/user-manage-list.ctrl.js
View file @
ed3867cb
...
...
@@ -584,8 +584,27 @@
// 转换大小写
var
userName
=
user
.
userName
?
user
.
userName
.
toLowerCase
()
:
''
;
var
email
=
user
.
email
?
user
.
email
.
toLowerCase
()
:
''
;
var
businessUnit
=
user
.
businessUnitName
?
user
.
businessUnitName
.
toLowerCase
()
:
''
;
var
area
=
user
.
areaName
?
user
.
areaName
.
toLowerCase
()
:
''
;
var
org
=
user
.
organizationName
?
user
.
organizationName
.
toLowerCase
()
:
''
;
if
(
userName
.
indexOf
(
$scope
.
queryUser
.
toLowerCase
())
===
-
1
&&
email
.
indexOf
(
$scope
.
queryUser
.
toLowerCase
())
===
-
1
)
{
var
userNameExist
=
!
(
userName
.
indexOf
(
$scope
.
queryUser
.
toLowerCase
())
===
-
1
);
var
emailExist
=
!
(
email
.
indexOf
(
$scope
.
queryUser
.
toLowerCase
())
===
-
1
);
var
businessUnitExist
=
!
(
businessUnit
.
indexOf
(
$scope
.
queryUser
.
toLowerCase
())
===
-
1
);
var
areaExist
=
!
(
area
.
indexOf
(
$scope
.
queryUser
.
toLowerCase
())
===
-
1
);
var
orgExist
=
!
(
org
.
indexOf
(
$scope
.
queryUser
.
toLowerCase
())
===
-
1
);
var
userRoleExist
=
false
;
user
.
roleInfoList
.
forEach
(
function
(
m
)
{
if
(
!
(
m
.
name
.
indexOf
(
$scope
.
queryUser
.
toLowerCase
())
===
-
1
))
{
userRoleExist
=
true
;
}
});
var
isExist
=
userNameExist
||
emailExist
||
businessUnitExist
||
userRoleExist
||
areaExist
||
orgExist
;
if
(
!
isExist
)
{
continue
;
}
...
...
@@ -593,6 +612,7 @@
if
(
!
$scope
.
showActiveUser
&&
user
.
status
!=
enums
.
userStatus
.
disabled
)
{
continue
;
}
}
else
{
// 用户状态筛选
// 只显示启用的
...
...
atms-web/src/main/webapp/app/admin/infrastructure/userManageList/user-manage-list.html
View file @
ed3867cb
...
...
@@ -166,6 +166,7 @@
<span
class=
"more-icon"
>
...
</span>
</div>
<!--<p ng-show="isNotHundred" class="has-error label"> {{'isNotHundred'|translate}}</p>-->
</div>
<div
class=
"line-1 "
ng-click=
"goToUserDetail(x.id)"
></div>
<div
class=
"user-info "
ng-click=
"goToUserDetail(x.id)"
>
...
...
atms-web/src/main/webapp/app/analysis/data-import/domestic-data-import/domestic-data-import.ctrl.js
View file @
ed3867cb
...
...
@@ -156,7 +156,18 @@
};
var
doExport
=
function
()
{
var
localDate
=
$filter
(
'date'
)(
new
Date
(),
'yyyyMMddHHmmss'
);
var
fileName
=
''
;
constant
.
anlDownLoadFileNameList
.
forEach
(
function
(
m
)
{
if
(
m
.
code
===
$scope
.
importType
)
{
fileName
=
m
.
name
+
$scope
.
UploadPeriodTime
+
"_"
+
localDate
;
}
});
vatImportService
.
downloadDomesticFile
(
$scope
.
queryParams
,
fileName
).
then
(
function
(
data
)
{
if
(
data
)
{
ackMessageBox
.
success
(
translate
(
'FileExportSuccess'
));
}
});
};
...
...
atms-web/src/main/webapp/app/common/controls/edit-business-unit-modal/edit-business-unit-modal.ctrl.js
View file @
ed3867cb
...
...
@@ -104,7 +104,6 @@ controller('editBusinessUnitModalController', ['$scope', '$log', 'SweetAlert', '
if
(
$scope
.
isEdit
)
{
businessUnitService
.
updateBusinessUnit
(
businessUnitArray
).
success
(
successedFun
);
}
else
{
businessUnitService
.
addBusinessUnit
(
businessUnitArray
).
success
(
successedFun
);
}
...
...
@@ -114,8 +113,7 @@ controller('editBusinessUnitModalController', ['$scope', '$log', 'SweetAlert', '
var
intiValidate
=
function
()
{
$
.
validator
.
addMethod
(
"BusinessUnitRepeated"
,
function
(
value
,
element
,
param
)
{
/*$.validator.addMethod("BusinessUnitRepeated", function (value, element, param) {
if ($scope.businessUnitList && $scope.businessUnitList.length > 0) {
var objects = $.grep($scope.businessUnitList, function (n, i) {
return $scope.editingObject.id != n.id && $.trim(n.name) == $.trim(value);
...
...
@@ -123,10 +121,8 @@ controller('editBusinessUnitModalController', ['$scope', '$log', 'SweetAlert', '
return objects.length < 1;
}
return true;
});
});*/
formValidator
=
$
(
editModalSelector
).
find
(
"#edit-form"
).
validate
({
debug
:
true
,
...
...
atms-web/src/main/webapp/app/common/controls/edit-user-modal/edit-user-modal.html
View file @
ed3867cb
...
...
@@ -8,17 +8,17 @@
</div>
<div
class=
"modal-body"
>
<form
class=
"form-horizontal"
role=
"form"
id=
"userForm"
>
<!--<div class="form-group">-->
<div
class=
"form-group"
>
<label
class=
"control-label col-sm-3"
for=
"isAdmin"
translate=
"Admin"
></label>
<div
class=
"col-sm-9"
>
<div
class=
"checkbox"
>
<label>
<input
id=
"isAdmin"
type=
"checkbox"
ng-model=
"editUserModel.isAdmin"
>
Admin
</label>
</div>
</div>
</div>
<!--<label class="control-label col-sm-3" for="checkIsAdmin" translate="Admin"></label>-->
<!--<div class="col-sm-9">-->
<!--<div class="checkbox">-->
<!--<label>-->
<!--<input type="checkbox" ng-model="editUserModel.isAdmin"> Admin-->
<!--</label>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<div
class=
"form-group"
>
<label
class=
"control-label col-sm-3"
for=
"inputUserName"
><span
class=
"red-color"
>
*
</span><span
translate=
"UserNameColon"
></span></label>
<div
class=
"col-sm-9"
>
...
...
@@ -34,7 +34,7 @@
<div
class=
"form-group"
>
<label
class=
"control-label col-sm-3"
><span
class=
"red-color"
>
*
</span><span
translate=
"Company"
></label>
<div
class=
"col-sm-9"
>
<input
id=
"orgName"
type=
"text"
name=
"orgName"
maxlength=
"100"
class=
"form-control"
style=
"width: 300px;"
ng-model=
"editUserModel.
o
rgName"
readonly=
"readonly"
required
>
<input
id=
"orgName"
type=
"text"
name=
"orgName"
maxlength=
"100"
class=
"form-control"
style=
"width: 300px;"
ng-model=
"editUserModel.
O
rgName"
readonly=
"readonly"
required
>
<!--<org-selector selected-org-name="editUserModel.OrgName" selected-org-id="editUserModel.OrganizationID" component-selected-org="" is-show-all="false" is-require="true"
style="width: 300px;"></org-selector>
<label class="error-label" style="font-size:12px;" ng-show="editUserModel.organizationIDError">{{editUserModel.organizationIDError}}</label>-->
...
...
atms-web/src/main/webapp/app/common/utils/constant.js
View file @
ed3867cb
...
...
@@ -1528,10 +1528,9 @@ constant.exportExcelFileName = {
invoiceData
:
"invoice_data_"
};
constant
.
anlTemplateNameList
=
[
{
code
:
0
,
name
:
"各税种税额
_所属期间_模版"
},
{
code
:
1
,
name
:
"实际返还税额
_所属期间_模版"
},
{
code
:
0
,
name
:
"各税种税额_所属期间_模版"
},
{
code
:
1
,
name
:
"实际返还税额_所属期间_模版"
},
{
code
:
2
,
name
:
"業務線_所属期间_模版"
},
{
code
:
3
,
name
:
"职工人数_所属期间_模版"
},
{
code
:
4
,
name
:
"司機人數_所属期间_模版"
},
...
...
@@ -1539,6 +1538,16 @@ constant.anlTemplateNameList = [
{
code
:
101
,
name
:
"国际税税务数据_国家_公司_所属期间_模版"
}
];
constant
.
anlDownLoadFileNameList
=
[
{
code
:
0
,
name
:
"各税种税额_"
},
{
code
:
1
,
name
:
"实际返还税额_"
},
{
code
:
2
,
name
:
"業務線_"
},
{
code
:
3
,
name
:
"职工人数_"
},
{
code
:
4
,
name
:
"司機人數_"
},
{
code
:
100
,
name
:
"国际税业务数据_"
},
{
code
:
101
,
name
:
"国际税税务数据_"
}
];
...
...
atms-web/src/main/webapp/app/common/vatservices/vatImportService.js
View file @
ed3867cb
...
...
@@ -417,6 +417,14 @@
},
getAnalysisInternationalCountryList
:
function
(
type
,
period
)
{
return
$http
.
get
(
'/Analysis/getAnalysisInternationalCountryList?type='
+
type
+
'&period='
+
period
,
apiConfig
.
create
());
},
downloadDomesticFile
:
function
(
queryParm
,
fileName
)
{
var
thisConfig
=
apiConfig
.
create
();
thisConfig
.
responseType
=
"arraybuffer"
;
return
$http
.
post
(
'/Analysis/downloadDomesticFile/get'
,
queryParm
,
thisConfig
).
then
(
function
(
response
)
{
var
data
=
new
Blob
([
response
.
data
],
{
type
:
response
.
headers
(
'Content-Type'
)});
FileSaver
.
saveAs
(
data
,
fileName
+
'.xlsx'
);
});
}
/***************************************批量数据导入服务(真) end**************************************************************/
...
...
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