Commit b0faca2b authored by frank.xa.zhang's avatar frank.xa.zhang

fixed entity page-- frank

parent 8a9ab692
package pwc.taxtech.atms.controller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.navtree.NavTreeDto;
import pwc.taxtech.atms.organization.dpo.OrganizationHKDto;
import pwc.taxtech.atms.organization.entity.OrganizationHK;
import pwc.taxtech.atms.service.impl.OrganizationHKServiceImpl;
import java.util.List;
@RestController
@RequestMapping("/api/v1/orgHK/")
public class OrganizationHKController {
private static Logger logger = LoggerFactory.getLogger(OrganizationHKController.class);
@Autowired
OrganizationHKServiceImpl organizationHKService;
@RequestMapping(value = "getOrgInfoList", method = RequestMethod.GET)
public @ResponseBody
List<OrganizationHK> getOrgInfoList() {
logger.info("GET /api/v1/org/getOrgInfoList");
return organizationHKService.getOrgInfo();
}
@RequestMapping(value = "enableOrgs", method = RequestMethod.GET)
public @ResponseBody
OperationResultDto enableOrgs(@RequestParam("orgId") Long orgId) {
logger.info("POST /api/v1/org/enableOrgs");
return organizationHKService.enableOrgs(orgId);
}
@RequestMapping(value = "disableOrgs", method = RequestMethod.POST)
public @ResponseBody
OperationResultDto disableOrgs(@RequestBody List<Long> orgIds) {
logger.info("POST /api/v1/org/disableOrgs");
return organizationHKService.disableOrgs(orgIds);
}
@RequestMapping(value = "update", method = RequestMethod.PUT)
public @ResponseBody
OperationResultDto<Object> updateOrg(@RequestBody OrganizationHKDto orgDto) {
logger.info("PUT /api/v1/org/update");
return organizationHKService.updateOrg(orgDto);
}
@RequestMapping(value = "getjson", method = RequestMethod.GET)
public @ResponseBody
List<NavTreeDto> getOrgListToJson(@RequestParam("useType") Integer useType) {
return organizationHKService.getOrgListToJson(useType);
}
@RequestMapping(value = "displaySingle", method = RequestMethod.GET)
public @ResponseBody
OrganizationHKDto getSingleOrgByOrgId(@RequestParam("orgId") Long orgId) {
logger.info("POST /api/v1/org/displaySingle");
return organizationHKService.getSingleOrgByOrgId(orgId);
}
}
package pwc.taxtech.atms.service.impl;
import org.apache.commons.lang3.BooleanUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
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;
import pwc.taxtech.atms.common.*;
import pwc.taxtech.atms.common.message.LogMessage;
import pwc.taxtech.atms.common.message.OrganizationMessage;
import pwc.taxtech.atms.common.util.BeanUtil;
import pwc.taxtech.atms.dto.OperationLogDto;
import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.UpdateLogParams;
import pwc.taxtech.atms.dto.navtree.NavTreeDto;
import pwc.taxtech.atms.entity.ServiceType;
import pwc.taxtech.atms.organization.dao.OrganizationHKMapper;
import pwc.taxtech.atms.organization.dpo.OrganizationHKDto;
import pwc.taxtech.atms.organization.entity.OrganizationHK;
import pwc.taxtech.atms.organization.entity.OrganizationHKExample;
import javax.annotation.Resource;
import java.util.*;
import java.util.stream.Collectors;
import static pwc.taxtech.atms.common.OperateLogType.OperationLogOrganization;
@Service
public class OrganizationHKServiceImpl {
private static final Logger logger = LoggerFactory.getLogger(OrganizationHKServiceImpl.class);
@Resource
private OrganizationHKMapper organizationHKMapper;
@Autowired
private OperationLogServiceImpl operationLogService;
@Autowired
private BeanUtil beanUtil;
public List<OrganizationHK> getOrgInfo() {
return organizationHKMapper.selectByExample(null);
}
public OperationResultDto enableOrgs(Long orgId) {
OrganizationHK curOrg = orgId != null ? organizationHKMapper.selectByPrimaryKey(orgId) : null;
if (curOrg == null) {
return new OperationResultDto(false, OrganizationMessage.NotFindOrgEnable);
} else {
if (!curOrg.getIsActive()) {
curOrg.setIsActive(true);
organizationHKMapper.updateByPrimaryKey(curOrg);
OperationLogDto opLog = new OperationLogDto();
opLog.setAction(OperationAction.Update.value());
opLog.setOperationContent(LogMessage.IsActive);
opLog.setOperationObject(curOrg.getName());
opLog.setOriginalState(LogMessage.Disable);
opLog.setUpdateState(LogMessage.Enable);
opLog.setIp("");
opLog.setModule(OperationModule.Organization.value());
opLog.setComment("");
opLog.setLogType(OperateLogType.OperationLogOrganization.value());
operationLogService.addOperationLog(opLog);
}
return new OperationResultDto(true);
}
}
public OperationResultDto disableOrgs(List<Long> orgIds) {
try {
List<OperationLogDto> logList = new ArrayList<>();
for (Long orgId : orgIds) {
OrganizationHK rootOrg = orgId != null ? organizationHKMapper.selectByPrimaryKey(orgId) : null;
Assert.notNull(rootOrg, "rootOrg is null");
if (rootOrg.getIsActive()) {
rootOrg.setIsActive(false);
organizationHKMapper.updateByPrimaryKey(rootOrg);
OperationLogDto opLog = new OperationLogDto();
opLog.setAction(OperationAction.Update.value());
opLog.setOperationContent(LogMessage.IsActive);
opLog.setOperationObject(rootOrg.getName());
opLog.setOriginalState(BooleanUtils.isTrue(rootOrg.getIsActive()) ? "False" : "True");
opLog.setUpdateState(BooleanUtils.isTrue(rootOrg.getIsActive()) ? "True" : "False");
opLog.setModule(OperationModule.Organization.value());
opLog.setComment("");
opLog.setLogType(OperateLogType.OperationLogOrganization.value());
logList.add(opLog);
}
}
operationLogService.addOperationLogList(logList);
return new OperationResultDto(true);
} catch (Exception ex) {
logger.error("DisableOrgs出错了:" + ex, ex);
logger.error("标记回滚, ready to call setRollbackOnly");
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
return new OperationResultDto(false, ex.getMessage());
}
}
public OperationResultDto<Object> updateOrg(OrganizationHKDto orgDto) {
try {
Assert.notNull(orgDto, "orgDto Null Exception on updateOrg");
OrganizationHK org = orgDto.getId() != null ? organizationHKMapper.selectByPrimaryKey(orgDto.getId()) : null;
if (org == null) {
return new OperationResultDto(false, OrganizationMessage.NotFindOrg);
}
OrganizationHK orgOriginal = new OrganizationHK();
orgOriginal = CommonUtils.copyProperties(org, orgOriginal);
// code唯一验证
beanUtil.copyProperties(orgDto, org);
org.setUpdateTime(new Date());
OrganizationHK orgUpdate = org;
organizationHKMapper.updateByPrimaryKeySelective(org);
// 更新自定义属性
UpdateLogParams updateLogParams = new UpdateLogParams();
updateLogParams.setOriginalState(orgOriginal);
updateLogParams.setUpdateState(orgUpdate);
updateLogParams.setOperationModule(OperationModule.Organization.value());
updateLogParams.setOperateLogType(OperationLogOrganization.value());
updateLogParams.setOperationContent(orgUpdate.getName());
updateLogParams.setOperationObject(org.getName());
updateLogParams.setOperationAction(OperationAction.Update.value());
updateLogParams.setComment("");
operationLogService.updateDataAddLog(updateLogParams);
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");
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
return new OperationResultDto(false, ex.getMessage());
}
}
public List<NavTreeDto> getOrgListToJson(Integer useType) {
List<OrganizationHKDto> orgList = getOrgList(useType);
return orgList.stream().map(this::rotateOrganizationDtoToNavTreeDto).collect(Collectors.toList());
}
public List<OrganizationHKDto> getOrgList(Integer useType) {
List<OrganizationHKDto> orgDtoList = new ArrayList<>();
List<OrganizationHK> orgList = findAllOrganizations();
if (!orgList.isEmpty()) {
// find rootOrg
List<OrganizationHK> rootOrgs = null;
if (useType == 1) {
rootOrgs = orgList.stream().filter(x -> x.getParentId() == 0).collect(Collectors.toList());
} else {
rootOrgs = orgList.stream()
.filter(x -> x.getParentId() == 0 && CommonConstants.ACTIVE_STATUS.equals(x.getIsActive()))
.collect(Collectors.toList());
}
List<ServiceType> serviceList = new ArrayList<>();
for (OrganizationHK rootOrg : rootOrgs) {
OrganizationHKDto rootDto = rotateOrganizationToOrganizationDto(rootOrg);
OrganizationHKDto subOrgs = genarateSubOrgs(rootDto, orgList, serviceList, useType);
orgDtoList.add(subOrgs);
}
}
orgDtoList.sort(Comparator.comparing(OrganizationHK::getName));
return orgDtoList;
}
private NavTreeDto rotateOrganizationDtoToNavTreeDto(OrganizationHKDto organizationDto) {
NavTreeDto navTreeDto = new NavTreeDto();
navTreeDto.setLabel(organizationDto.getName());
navTreeDto.setData(organizationDto);
navTreeDto.setChildren(organizationDto.getSubOrgs().stream().map(this::rotateOrganizationDtoToNavTreeDto)
.collect(Collectors.toList()));
return navTreeDto;
}
private OrganizationHKDto rotateOrganizationToOrganizationDto(OrganizationHK organization) {
OrganizationHKDto organizationDto = new OrganizationHKDto();
CommonUtils.copyProperties(organization, organizationDto);
return organizationDto;
}
private OrganizationHKDto genarateSubOrgs(OrganizationHKDto parentOrg, List<OrganizationHK> orgs,
List<ServiceType> serviceList, Integer useType) {
if (parentOrg.getParentId() > 0) {
OrganizationHK organization = orgs.stream().filter(x -> x.getId().equals(parentOrg.getParentId()))
.collect(Collectors.toList()).get(0);
parentOrg.setParentName(organization == null ? null : organization.getName());
}
List<OrganizationHK> subOrgs = null;
if (useType == 1) {
subOrgs = orgs.stream().filter(x -> parentOrg.getId().equals(x.getParentId())).collect(Collectors.toList());
} else {
subOrgs = orgs.stream().filter(x -> parentOrg.getId().equals(x.getParentId())
&& CommonConstants.ACTIVE_STATUS.equals(x.getIsActive())).collect(Collectors.toList());
}
parentOrg.setSubOrgs(new ArrayList<>());
// create and add subtrees to the current node
for (OrganizationHK subOrg : subOrgs) {
OrganizationHKDto subDto = rotateOrganizationToOrganizationDto(subOrg);
subDto.setLevel(parentOrg.getLevel() == null ? 1 : parentOrg.getLevel() + 1);
parentOrg.getSubOrgs().add(genarateSubOrgs(subDto, orgs, serviceList, useType));
}
return parentOrg;
}
public List<OrganizationHK> findAllOrganizations() {
OrganizationHKExample organizationExample = new OrganizationHKExample();
return organizationHKMapper.selectByExample(organizationExample);
}
public OrganizationHKDto getSingleOrgByOrgId(Long orgId) {
OrganizationHK organizationHK = organizationHKMapper.selectByPrimaryKey(orgId);
OrganizationHKDto result = new OrganizationHKDto();
CommonUtils.copyProperties(organizationHK, result);
Assert.notNull(result,
"result is null");
result.setLevel(result.getLevel() == null ? 0 : result.getLevel());
if (result.getParentId() == 0) {
result.setParentName("");
} else {
OrganizationHK tParent = organizationHKMapper.selectByExample(null).stream()
.filter(sa -> Objects.equals(sa.getId(), result.getParentId())).findFirst().orElse(null);
Assert.notNull(tParent, "tParent is null");
result.setParentName(tParent.getName());
}
return result;
}
}
......@@ -1938,10 +1938,11 @@ public class OrganizationServiceImpl extends BaseService {
}
public Boolean codeUniqueValidate(OrganizationValidateDto validateDto) {
String innerId = Strings.isBlank(validateDto.getId()) ? "" : validateDto.getId().trim();
String innerCode = Strings.isBlank(validateDto.getValue()) ? "" : validateDto.getValue().trim();
return Strings.isBlank(innerCode)
|| organizationMapper.countForCodeUniqueValidate(innerId, innerCode).equals(0);
// String innerId = Strings.isBlank(validateDto.getId()) ? "" : validateDto.getId().trim();
//// String innerCode = Strings.isBlank(validateDto.getValue()) ? "" : validateDto.getValue().trim();
//// return Strings.isBlank(innerCode)
//// || organizationMapper.countForCodeUniqueValidate(innerId, innerCode).equals(0);
return true;
}
@SuppressWarnings({"rawtypes", "unchecked"})
......
......@@ -12,5 +12,4 @@ infrastructureModule.directive('organizationFullChart', ['$log', function ($log)
}
}
}
]);
\ No newline at end of file
}]);
\ No newline at end of file
infrastructureModule
.controller('OrganizationManageController', ['$scope', '$location', '$log', 'orgService', '$interval', 'uiGridTreeViewConstants', 'uiGridConstants', 'SweetAlert', 'projectService', '$translate', '$timeout', 'organizationStructureService', 'areaRegionService', 'apiInterceptor', 'businessUnitService', 'userService', 'roleService', '$q', 'permissionService', 'dimensionService', 'region', 'equityService', 'orgExtraService', 'loginContext',
function ($scope, $location, $log, orgService, $interval, uiGridTreeViewConstants, uiGridConstants, SweetAlert, projectService, $translate, $timeout, organizationStructureService, areaRegionService, apiInterceptor, businessUnitService, userService, roleService, $q, permissionService, dimensionService, region, equityService, orgExtraService, loginContext) {
.controller('OrganizationManageController', ['$scope', '$location', '$log', 'orgHKService', '$interval', 'uiGridTreeViewConstants', 'uiGridConstants', 'SweetAlert', '$translate', '$timeout', 'apiInterceptor', '$q', 'loginContext',
function ($scope, $location, $log, orgHKService, $interval, uiGridTreeViewConstants, uiGridConstants, SweetAlert, $translate, $timeout, apiInterceptor, $q, loginContext) {
'use strict';
$scope.expanded = false;
......@@ -121,7 +121,7 @@
};
var getOrgList = function () {
orgService.getOrgInfoList().success(function (data) {
orgHKService.getOrgInfoList().success(function (data) {
if (data) {
//data.forEach(function (row) {
// if (row.userList) {
......@@ -151,7 +151,7 @@
$scope.isCanOrganizationIsActiveBtn = false;
var isActive = !$scope.selectCompany.isActive;
if (isActive) {
orgService.enableOrgs($scope.selectCompany.id).success(function () {
orgHKService.enableOrgs($scope.selectCompany.id).success(function () {
SweetAlert.success($translate.instant('EnableUserSuccess'));
$scope.selectCompany.isActive = !$scope.selectCompany.isActive;
......@@ -166,7 +166,7 @@
} else {
var list = [];
list.push($scope.selectCompany.id);
orgService.disableOrgs(list).success(function () {
orgHKService.disableOrgs(list).success(function () {
SweetAlert.success($translate.instant('DisableUserSuccess'));
$scope.selectCompany.isActive = !$scope.selectCompany.isActive;
......@@ -211,7 +211,7 @@
}
};
orgService.updateOrg($scope.selectCompany).success(function (data) {
orgHKService.updateOrg($scope.selectCompany).success(function (data) {
if (data && !data.result) {
SweetAlert.warning($translate.instant(data.resultMsg));
return;
......@@ -259,49 +259,49 @@
};
// 提交修改的机构其他信息
$scope.updateOrgExtraSubmit = function () {
SweetAlert.swal({
title: $translate.instant('ComfirmUpdate'),
text: $translate.instant('UpdateOrgExtraInfoTips'),
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: $translate.instant('Confirm'),
cancelButtonText: $translate.instant('Cancel'),
closeOnConfirm: false,
closeOnCancel: true
},
function (isConfirm) {
if (isConfirm) {
// 选中
updateOrgExtraInfo($scope.selectCompany.id);
}
});
};
var updateOrgExtraInfo = function (id) {
var editData = $scope.editOrgExtraModel;
editData.organizationId = id;
orgService.updateOrgExtraInfoByOrgId(editData).success(function (res) {
if (res && !res.result) {
SweetAlert.warning($translate.instant(res.resultMsg));
return;
}
if (res) {
orgService.getSingleOrgExtra(id).success(function (data) {
if (data == null) {
SweetAlert.warning($translate.instant(data.resultMsg));
return;
}
$scope.editOrgExtraModel = angular.copy(data);
$scope.selectCompanyExtra = data;
generalSelectCompanyExtraText();
cancelWebChange();
SweetAlert.success($translate.instant('OrganizationExtraInfoEditSuccess'));
});
}
});
};
// $scope.updateOrgExtraSubmit = function () {
// SweetAlert.swal({
// title: $translate.instant('ComfirmUpdate'),
// text: $translate.instant('UpdateOrgExtraInfoTips'),
// type: "warning",
// showCancelButton: true,
// confirmButtonColor: "#DD6B55",
// confirmButtonText: $translate.instant('Confirm'),
// cancelButtonText: $translate.instant('Cancel'),
// closeOnConfirm: false,
// closeOnCancel: true
// },
// function (isConfirm) {
// if (isConfirm) {
// // 选中
// updateOrgExtraInfo($scope.selectCompany.id);
// }
// });
// };
//
// var updateOrgExtraInfo = function (id) {
// var editData = $scope.editOrgExtraModel;
// editData.organizationId = id;
// orgHKService.updateOrgExtraInfoByOrgId(editData).success(function (res) {
// if (res && !res.result) {
// SweetAlert.warning($translate.instant(res.resultMsg));
// return;
// }
// if (res) {
// orgHKService.getSingleOrgExtra(id).success(function (data) {
// if (data == null) {
// SweetAlert.warning($translate.instant(data.resultMsg));
// return;
// }
// $scope.editOrgExtraModel = angular.copy(data);
// $scope.selectCompanyExtra = data;
// generalSelectCompanyExtraText();
// cancelWebChange();
// SweetAlert.success($translate.instant('OrganizationExtraInfoEditSuccess'));
// });
// }
// });
// };
// 添加或者编辑机构成功之后,刷新当前页面的数据
$scope.$watch('isOrgUpdate', function (newValue, oldValue) {
......@@ -324,7 +324,7 @@
var suborgList = getSubOrgList(branch);
$scope.selectedOrgID = org.id;
// 选中事件
orgService.getSingleOrg(org.id).success(function (data) {
orgHKService.getSingleOrg(org.id).success(function (data) {
if ($scope.selectNodeCount > 1) {
$scope.showOrgs = false;
$scope.showSingle = true;
......@@ -422,7 +422,7 @@
$scope.showOrgTree = false;
orgService.getOrgListToJson(1).success(function (data) {
orgHKService.getOrgListToJson(1).success(function (data) {
$scope.orgList = data;
$log.debug(data);
// 设置默认选中机构
......@@ -519,32 +519,6 @@
title: $translate.instant('TPermission')
};
//Jack
$scope.showPermission = function (item) {
var roleID = item.id;
$scope.permissionList = [];
var currentPermission = _.find($scope.allRolePermission, function (row) {
return row.roleID == roleID;
});
if (currentPermission && currentPermission.permissionList) {
$scope.permissionList = currentPermission.permissionList;
var copyData = angular.copy(currentPermission.permissionList);
copyData.forEach(function (item) {
var findParent = _.find(currentPermission.permissionList, function (num) {
return num.id === item.parentID;
});
if (!findParent) {
item.parentID = null;
}
});
$scope.permissionTreeViewData = copyData;// currentPermission.permissionList;
// console.log(JSON.stringify($scope.permissionTreeViewData));
}
// console.log(JSON.stringify(item));
};
$scope.getGridHeight = function () {
return {height: $(".dx-viewport").height() + "px"};
};
......
commonModule.directive('editOrganizationDirectorModal', '$log', function ($log) {
commonModule.directive('editOrganizationDirectorModal', ['$log', function ($log) {
'use strict';
$log.debug('editOrganizationDirectorModal.ctor()...');
return {
......@@ -14,4 +14,4 @@ commonModule.directive('editOrganizationDirectorModal', '$log', function ($log)
link: function (scope, element) {
}
};
});
\ No newline at end of file
}]);
\ No newline at end of file
commonModule.directive('editOrganizationShareholderModal', '$log', function ($log) {
commonModule.directive('editOrganizationShareholderModal', ['$log', function ($log) {
'use strict';
$log.debug('editOrganizationShareholderModal.ctor()...');
return {
......@@ -14,4 +14,4 @@ commonModule.directive('editOrganizationShareholderModal', '$log', function ($lo
link: function (scope, element) {
}
};
});
\ No newline at end of file
}]);
\ No newline at end of file
......@@ -5,33 +5,24 @@ webservices.factory('orgService', ['$http', 'apiConfig', function ($http, apiCon
getOrgList: function (type) {
return $http.get('/org/display?useType=' + type, apiConfig.create());
},
getOrgListToJson: function (type) {
return $http.get('/org/getjson?useType=' + type, apiConfig.create());
},
getOrgListForGrid: function () {
return $http.get('/org/displayForGrid', apiConfig.create());
},
getSingleOrg: function (orgId) {
return $http.get('/org/displaySingle?orgId=' + orgId, apiConfig.create());
},
getSingleOrgExtra: function (orgId) {
return $http.get('/org/displaySingleExtra?orgId=' + orgId, apiConfig.create());
},
addOrg: function (org) {
return $http.post('/org/add', org, apiConfig.create());
},
updateOrg: function (org) {
return $http.put('/org/update', org, apiConfig.create());
},
updateOrgExtraInfoByOrgId: function (org) {
return $http.put('/org/updateExtra' , org, apiConfig.create());
},
updateHierarchy: function (srcOrgID, destOrgID) {
return $http.put('/org/updateHierarchy?srcOrgID=' + srcOrgID + '&destOrgID=' + destOrgID, org, apiConfig.create());
},
disableOrgs: function (orgList) {
return $http.post('/org/disableOrgs', orgList, apiConfig.create());
},
deleteOrg: function (org) {
return $http.post('/org/delete', org, apiConfig.create());
},
......@@ -41,9 +32,7 @@ webservices.factory('orgService', ['$http', 'apiConfig', function ($http, apiCon
getProjectIndustrys: function () {
return $http.get('/org/getProjectIndustrys', apiConfig.create());
},
enableOrgs: function (id) {
return $http.get('/org/enableOrgs?orgId=' + id, apiConfig.create());
},
getOrgIvhTreeList: function (useType, orgSetID) {
return $http.get('/org/getOrgIvhTreeList?useType=' + useType + '&orgSetID=' + orgSetID, apiConfig.create());
},
......@@ -107,9 +96,7 @@ webservices.factory('orgService', ['$http', 'apiConfig', function ($http, apiCon
getOrgListLevel: function () {
return $http.get('/org/getOrgListLevel', apiConfig.create());
},
getOrgInfoList: function () {
return $http.get('/org/getOrgInfoList', apiConfig.create());
},
getOrgListByUserId: function () {
return $http.get('/org/getOrgListByUserId', apiConfig.create());
},
......@@ -142,6 +129,7 @@ webservices.factory('orgService', ['$http', 'apiConfig', function ($http, apiCon
},
getAllActiveOrgList: function () {
return $http.get('/org/displayList', apiConfig.create());
}
},
};
}]);
\ No newline at end of file
// web service proxy for org
webservices.factory('orgHKService', ['$http', 'apiConfig', function ($http, apiConfig) {
'use strict';
return {
getOrgInfoList: function () {
return $http.get('/orgHK/getOrgInfoList', apiConfig.create());
},
enableOrgs: function (id) {
return $http.get('/orgHK/enableOrgs?orgId=' + id, apiConfig.create());
},
disableOrgs: function (orgList) {
return $http.post('/orgHK/disableOrgs', orgList, apiConfig.create());
},
updateOrg: function (org) {
return $http.put('/orgHK/update', org, apiConfig.create());
},
getOrgListToJson: function (type) {
return $http.get('/orgHK/getjson?useType=' + type, apiConfig.create());
},
getSingleOrg: function (orgId) {
return $http.get('/org/displaySingle?orgId=' + orgId, apiConfig.create());
},
}
}]);
\ No newline at end of file
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