Commit d077b460 authored by gary's avatar gary

1、fixbug

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