Commit d077b460 authored by gary's avatar gary

1、fixbug

parent 5710dcc4
...@@ -125,8 +125,7 @@ public class UserController { ...@@ -125,8 +125,7 @@ public class UserController {
} }
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
// @ApiOperation(value = "为角色添加用户") // @ApiOperation(value = "启用或停用用户")
// todo 这里应该是错的 @ApiOperation(value = "启用或停用用户")
@Secured("user:edit") @Secured("user:edit")
@RequestMapping(value = "enableordisableuser", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @RequestMapping(value = "enableordisableuser", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public @ResponseBody public @ResponseBody
......
...@@ -6,8 +6,10 @@ import com.fasterxml.jackson.annotation.JsonProperty; ...@@ -6,8 +6,10 @@ import com.fasterxml.jackson.annotation.JsonProperty;
* @see PwC.Tax.Tech.Atms.Application.Dto\TaxAdminDto\UserAndUserRoleSaveDto.cs * @see PwC.Tax.Tech.Atms.Application.Dto\TaxAdminDto\UserAndUserRoleSaveDto.cs
*/ */
public class UpdateParam { public class UpdateParam {
@JsonProperty("userID") @JsonProperty("userID")
private String userId; private String userId;
private Integer updateType; private Integer updateType;
public String getUserId() { public String getUserId() {
......
...@@ -225,7 +225,7 @@ public class OrganizationServiceImpl extends BaseService{ ...@@ -225,7 +225,7 @@ public class OrganizationServiceImpl extends BaseService{
rootOrgs = orgList.stream().filter(x -> StringUtils.isEmpty(x.getParentId())).collect(Collectors.toList()); rootOrgs = orgList.stream().filter(x -> StringUtils.isEmpty(x.getParentId())).collect(Collectors.toList());
} else { } else {
rootOrgs = orgList.stream() rootOrgs = orgList.stream()
.filter(x -> x.getParentId() == null && CommonConstants.ACTIVE_STATUS.equals(x.getIsActive())) .filter(x -> StringUtils.isEmpty(x.getParentId())&& CommonConstants.ACTIVE_STATUS.equals(x.getIsActive()))
.collect(Collectors.toList()); .collect(Collectors.toList());
} }
...@@ -2996,9 +2996,9 @@ public class OrganizationServiceImpl extends BaseService{ ...@@ -2996,9 +2996,9 @@ public class OrganizationServiceImpl extends BaseService{
//find rootOrg //find rootOrg
List<Organization> rootOrgList; List<Organization> rootOrgList;
if (useType == 1) { if (useType == 1) {
rootOrgList = orgList.stream().filter(x -> StringUtils.isBlank(x.getParentId())).collect(toList()); rootOrgList = orgList.stream().filter(x -> StringUtils.isEmpty(x.getParentId())).collect(toList());
} else { } else {
rootOrgList = orgList.stream().filter(x -> StringUtils.isBlank(x.getParentId()) && x.getIsActive()) rootOrgList = orgList.stream().filter(x -> StringUtils.isEmpty(x.getParentId()) && x.getIsActive())
.collect(toList()); .collect(toList());
} }
List<ServiceType> serviceList = Lists.newArrayList(); List<ServiceType> serviceList = Lists.newArrayList();
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
$log, SweetAlert, permissionService, $translate, areaRegionService, uiGridTreeViewConstants, $timeout, $log, SweetAlert, permissionService, $translate, areaRegionService, uiGridTreeViewConstants, $timeout,
areaService, uiGridConstants, $interval, orgService, $q, roleService, $rootScope, $state, userService) { areaService, uiGridConstants, $interval, orgService, $q, roleService, $rootScope, $state, userService) {
$scope.serviceType = constant.serviceType.VAT; $scope.serviceType = constant.serviceType.VAT;
var roleCardSelector = '#assign-user-box'; var roleCardSelector = '#assign-user-box';
...@@ -510,7 +511,7 @@ ...@@ -510,7 +511,7 @@
$scope.userOperateType = constant.Operation.Disable; $scope.userOperateType = constant.Operation.Disable;
$scope.isUpdateUser = false; $scope.isUpdateUser = false;
$scope.selectedUser = { $scope.selectedUser = {
id: user.id, id: $stateParams.id,
userName: user.userName, userName: user.userName,
currentStatus: user.status currentStatus: user.status
}; };
...@@ -528,7 +529,7 @@ ...@@ -528,7 +529,7 @@
$scope.userOperateType = constant.Operation.Enable; $scope.userOperateType = constant.Operation.Enable;
$scope.isUpdateUser = false; $scope.isUpdateUser = false;
$scope.selectedUser = { $scope.selectedUser = {
id: user.id, id: $stateParams.id,
userName: user.userName, userName: user.userName,
currentStatus: user.status currentStatus: user.status
}; };
......
...@@ -125,6 +125,7 @@ ...@@ -125,6 +125,7 @@
function (isConfirm) { function (isConfirm) {
if (isConfirm) { if (isConfirm) {
// 选中 // 选中
debugger;
userService.enableOrDisableUser(user.id, 0).success(function (or) { userService.enableOrDisableUser(user.id, 0).success(function (or) {
if (or) { if (or) {
if (or.result === true) { if (or.result === true) {
......
...@@ -201,7 +201,7 @@ ...@@ -201,7 +201,7 @@
ng-class="{'has-error':orgControlForm.businessScope.$invalid && (orgControlForm.businessScope.$dirty || orgControlForm.$submitted)}"> ng-class="{'has-error':orgControlForm.businessScope.$invalid && (orgControlForm.businessScope.$dirty || orgControlForm.$submitted)}">
<input class="form-control" name="businessScope" id="businessScope" <input class="form-control" name="businessScope" id="businessScope"
ng-model="editOrgModel.businessScope" ng-model="editOrgModel.businessScope"
placeholder="{{resources.BusinessScope}}" maxlength="50"> placeholder="{{resources.BusinessScope}}">
</div> </div>
</div> </div>
</div> </div>
......
...@@ -29,8 +29,8 @@ webservices.factory('userService', ['$http', 'apiConfig', 'httpCacheService', 'l ...@@ -29,8 +29,8 @@ webservices.factory('userService', ['$http', 'apiConfig', 'httpCacheService', 'l
}, },
enableOrDisableUser: function (userId, updateType) { enableOrDisableUser: function (userId, updateType) {
return $http.post('/user/enableordisableuser', { return $http.post('/user/enableordisableuser', {
'UserId': userId, 'userID': userId,
'UpdateType': updateType 'updateType': updateType
}, apiConfig.create()); }, apiConfig.create());
}, },
getRoleTypeList: function () { getRoleTypeList: function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment