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

fixed entity page backend-- frank

parent fee7b123
...@@ -6,18 +6,18 @@ import org.slf4j.LoggerFactory; ...@@ -6,18 +6,18 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import pwc.taxtech.atms.dpo.*; import pwc.taxtech.atms.dpo.OrgBasicDto;
import pwc.taxtech.atms.dpo.OrgInfoDto;
import pwc.taxtech.atms.dpo.OrgSelectDto;
import pwc.taxtech.atms.dpo.OrganizationDto;
import pwc.taxtech.atms.dto.*; import pwc.taxtech.atms.dto.*;
import pwc.taxtech.atms.dto.organization.OrganizationExtraDto;
import pwc.taxtech.atms.dto.dimension.DimensionOrgDtoDashboard; import pwc.taxtech.atms.dto.dimension.DimensionOrgDtoDashboard;
import pwc.taxtech.atms.dto.dimension.OrgDashboardParams; import pwc.taxtech.atms.dto.dimension.OrgDashboardParams;
import pwc.taxtech.atms.dto.navtree.DevTreeDto; import pwc.taxtech.atms.dto.navtree.DevTreeDto;
import pwc.taxtech.atms.dto.navtree.NavTreeDto; import pwc.taxtech.atms.dto.navtree.NavTreeDto;
import pwc.taxtech.atms.dto.organization.DimensionRoleDto; import pwc.taxtech.atms.dto.organization.*;
import pwc.taxtech.atms.dto.organization.OrgDto;
import pwc.taxtech.atms.dto.organization.OrgGeneralInfoDto;
import pwc.taxtech.atms.dto.organization.UpdateOrgDimensionDto;
import pwc.taxtech.atms.dto.vatdto.JsonExportDto; import pwc.taxtech.atms.dto.vatdto.JsonExportDto;
import pwc.taxtech.atms.organization.dpo.OrganizationHKDto;
import pwc.taxtech.atms.service.impl.OrganizationServiceImpl; import pwc.taxtech.atms.service.impl.OrganizationServiceImpl;
import pwc.taxtech.atms.service.impl.UserRoleServiceImpl; import pwc.taxtech.atms.service.impl.UserRoleServiceImpl;
import pwc.taxtech.atms.service.impl.UserServiceImpl; import pwc.taxtech.atms.service.impl.UserServiceImpl;
...@@ -62,7 +62,7 @@ public class OrganizationController { ...@@ -62,7 +62,7 @@ public class OrganizationController {
// @ApiOperation(value = "根据使用的方式获取机构的展示列表") // @ApiOperation(value = "根据使用的方式获取机构的展示列表")
@RequestMapping(value = "display", method = RequestMethod.GET) @RequestMapping(value = "display", method = RequestMethod.GET)
public @ResponseBody public @ResponseBody
List<OrganizationDto> getOrgList(@RequestParam("useType") Integer useType) { List<OrganizationHKDto> getOrgList(@RequestParam("useType") Integer useType) {
return organizationService.getOrgList(useType); return organizationService.getOrgList(useType);
} }
...@@ -184,7 +184,7 @@ public class OrganizationController { ...@@ -184,7 +184,7 @@ public class OrganizationController {
// @ApiOperation(value = "通过orgId获取一个组织的信息") // @ApiOperation(value = "通过orgId获取一个组织的信息")
@RequestMapping(value = "displaySingle", method = RequestMethod.GET) @RequestMapping(value = "displaySingle", method = RequestMethod.GET)
public @ResponseBody public @ResponseBody
OrganizationDto getSingleOrgByOrgId(@RequestParam("orgId") String orgId) { OrganizationHKDto getSingleOrgByOrgId(@RequestParam("orgId") Long orgId) {
logger.info("POST /api/v1/org/displaySingle"); logger.info("POST /api/v1/org/displaySingle");
return organizationService.getSingleOrgByOrgId(orgId); return organizationService.getSingleOrgByOrgId(orgId);
} }
......
...@@ -44,6 +44,10 @@ import pwc.taxtech.atms.dto.vatdto.JsonExportDto; ...@@ -44,6 +44,10 @@ import pwc.taxtech.atms.dto.vatdto.JsonExportDto;
import pwc.taxtech.atms.entity.*; import pwc.taxtech.atms.entity.*;
import pwc.taxtech.atms.entity.OrganizationExample.Criteria; import pwc.taxtech.atms.entity.OrganizationExample.Criteria;
import pwc.taxtech.atms.exception.ApplicationException; import pwc.taxtech.atms.exception.ApplicationException;
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 pwc.taxtech.atms.thirdparty.ExcelUtil; import pwc.taxtech.atms.thirdparty.ExcelUtil;
import javax.annotation.Resource; import javax.annotation.Resource;
...@@ -64,11 +68,14 @@ import static pwc.taxtech.atms.common.message.LogMessage.AddOrganization; ...@@ -64,11 +68,14 @@ import static pwc.taxtech.atms.common.message.LogMessage.AddOrganization;
* @author rzhou038 * @author rzhou038
*/ */
@Service @Service
public class OrganizationServiceImpl extends BaseService{ public class OrganizationServiceImpl extends BaseService {
@Autowired @Autowired
private OrganizationMapper organizationMapper; private OrganizationMapper organizationMapper;
@Resource
private OrganizationHKMapper organizationHKMapper;
@Autowired @Autowired
private OrganizationExtraMapper organizationExtraMapper; private OrganizationExtraMapper organizationExtraMapper;
...@@ -189,11 +196,11 @@ public class OrganizationServiceImpl extends BaseService{ ...@@ -189,11 +196,11 @@ public class OrganizationServiceImpl extends BaseService{
} }
public List<NavTreeDto> getOrgListToJson(Integer useType) { public List<NavTreeDto> getOrgListToJson(Integer useType) {
List<OrganizationDto> orgList = getOrgList(useType); List<OrganizationHKDto> orgList = getOrgList(useType);
return orgList.stream().map(this::rotateOrganizationDtoToNavTreeDto).collect(Collectors.toList()); return orgList.stream().map(this::rotateOrganizationDtoToNavTreeDto).collect(Collectors.toList());
} }
private NavTreeDto rotateOrganizationDtoToNavTreeDto(OrganizationDto organizationDto) { private NavTreeDto rotateOrganizationDtoToNavTreeDto(OrganizationHKDto organizationDto) {
NavTreeDto navTreeDto = new NavTreeDto(); NavTreeDto navTreeDto = new NavTreeDto();
navTreeDto.setLabel(organizationDto.getName()); navTreeDto.setLabel(organizationDto.getName());
navTreeDto.setData(organizationDto); navTreeDto.setData(organizationDto);
...@@ -202,39 +209,39 @@ public class OrganizationServiceImpl extends BaseService{ ...@@ -202,39 +209,39 @@ public class OrganizationServiceImpl extends BaseService{
return navTreeDto; return navTreeDto;
} }
public List<OrganizationDto> getOrgList(Integer useType) { public List<OrganizationHKDto> getOrgList(Integer useType) {
List<OrganizationDto> orgDtoList = new ArrayList<>(); List<OrganizationHKDto> orgDtoList = new ArrayList<>();
List<Organization> orgList = findAllOrganizations(); List<OrganizationHK> orgList = findAllOrganizations();
if (!orgList.isEmpty()) { if (!orgList.isEmpty()) {
// find rootOrg // find rootOrg
List<Organization> rootOrgs = null; List<OrganizationHK> rootOrgs = null;
if (useType == 1) { if (useType == 1) {
rootOrgs = orgList.stream().filter(x -> StringUtils.isEmpty(x.getParentId())).collect(Collectors.toList()); rootOrgs = orgList.stream().filter(x -> x.getParentId() == 0).collect(Collectors.toList());
} else { } else {
rootOrgs = orgList.stream() rootOrgs = orgList.stream()
.filter(x -> StringUtils.isEmpty(x.getParentId())&& CommonConstants.ACTIVE_STATUS.equals(x.getIsActive())) .filter(x -> x.getParentId() == 0 && CommonConstants.ACTIVE_STATUS.equals(x.getIsActive()))
.collect(Collectors.toList()); .collect(Collectors.toList());
} }
List<ServiceType> serviceList = new ArrayList<>(); List<ServiceType> serviceList = new ArrayList<>();
for (Organization rootOrg : rootOrgs) { for (OrganizationHK rootOrg : rootOrgs) {
OrganizationDto rootDto = rotateOrganizationToOrganizationDto(rootOrg); OrganizationHKDto rootDto = rotateOrganizationToOrganizationDto(rootOrg);
OrganizationDto subOrgs = genarateSubOrgs(rootDto, orgList, serviceList, useType); OrganizationHKDto subOrgs = genarateSubOrgs(rootDto, orgList, serviceList, useType);
orgDtoList.add(subOrgs); orgDtoList.add(subOrgs);
} }
} }
orgDtoList.sort((OrganizationDto o1, OrganizationDto o2) -> o1.getName().compareTo(o2.getName())); orgDtoList.sort((OrganizationHKDto o1, OrganizationHKDto o2) -> o1.getName().compareTo(o2.getName()));
return orgDtoList; return orgDtoList;
} }
private OrganizationDto genarateSubOrgs(OrganizationDto parentOrg, List<Organization> orgs, private OrganizationHKDto genarateSubOrgs(OrganizationHKDto parentOrg, List<OrganizationHK> orgs,
List<ServiceType> serviceList, Integer useType) { List<ServiceType> serviceList, Integer useType) {
if (StringUtils.isNotEmpty(parentOrg.getParentId())) { if (parentOrg.getParentId()>0) {
Organization organization = orgs.stream().filter(x -> x.getId().equals(parentOrg.getParentId())) OrganizationHK organization = orgs.stream().filter(x -> x.getId().equals(parentOrg.getParentId()))
.collect(Collectors.toList()).get(0); .collect(Collectors.toList()).get(0);
parentOrg.setParentName(organization == null ? null : organization.getName()); parentOrg.setParentName(organization == null ? null : organization.getName());
} }
List<Organization> subOrgs = null; List<OrganizationHK> subOrgs = null;
if (useType == 1) { if (useType == 1) {
subOrgs = orgs.stream().filter(x -> parentOrg.getId().equals(x.getParentId())).collect(Collectors.toList()); subOrgs = orgs.stream().filter(x -> parentOrg.getId().equals(x.getParentId())).collect(Collectors.toList());
} else { } else {
...@@ -244,16 +251,16 @@ public class OrganizationServiceImpl extends BaseService{ ...@@ -244,16 +251,16 @@ public class OrganizationServiceImpl extends BaseService{
parentOrg.setSubOrgs(new ArrayList<>()); parentOrg.setSubOrgs(new ArrayList<>());
// create and add subtrees to the current node // create and add subtrees to the current node
for (Organization subOrg : subOrgs) { for (OrganizationHK subOrg : subOrgs) {
OrganizationDto subDto = rotateOrganizationToOrganizationDto(subOrg); OrganizationHKDto subDto = rotateOrganizationToOrganizationDto(subOrg);
subDto.setLevel(parentOrg.getLevel() == null ? 1 : parentOrg.getLevel() + 1); subDto.setLevel(parentOrg.getLevel() == null ? 1 : parentOrg.getLevel() + 1);
parentOrg.getSubOrgs().add(genarateSubOrgs(subDto, orgs, serviceList, useType)); parentOrg.getSubOrgs().add(genarateSubOrgs(subDto, orgs, serviceList, useType));
} }
return parentOrg; return parentOrg;
} }
private OrganizationDto rotateOrganizationToOrganizationDto(Organization organization) { private OrganizationHKDto rotateOrganizationToOrganizationDto(OrganizationHK organization) {
OrganizationDto organizationDto = new OrganizationDto(); OrganizationHKDto organizationDto = new OrganizationHKDto();
CommonUtils.copyProperties(organization, organizationDto); CommonUtils.copyProperties(organization, organizationDto);
return organizationDto; return organizationDto;
} }
...@@ -289,9 +296,9 @@ public class OrganizationServiceImpl extends BaseService{ ...@@ -289,9 +296,9 @@ public class OrganizationServiceImpl extends BaseService{
return organizationDtoList; return organizationDtoList;
} }
public List<Organization> findAllOrganizations() { public List<OrganizationHK> findAllOrganizations() {
OrganizationExample organizationExample = new OrganizationExample(); OrganizationHKExample organizationExample = new OrganizationHKExample();
return organizationMapper.selectByExample(organizationExample); return organizationHKMapper.selectByExample(organizationExample);
} }
public List<IndustryDto> getProjectIndustryList() { public List<IndustryDto> getProjectIndustryList() {
...@@ -327,21 +334,22 @@ public class OrganizationServiceImpl extends BaseService{ ...@@ -327,21 +334,22 @@ public class OrganizationServiceImpl extends BaseService{
* 查询出所有机构信息及机构其他信息,合成dto[]返回。 * 查询出所有机构信息及机构其他信息,合成dto[]返回。
* 无其他信息的机构亦返回基本信息。 * 无其他信息的机构亦返回基本信息。
* [] * []
* @author Gary J Li *
* @return List<OrgInfoDto> * @return List<OrgInfoDto>
* @author Gary J Li
*/ */
public List<OrgInfoDto> getOrgInfo() { public List<OrgInfoDto> getOrgInfo() {
List<OrgInfoDto> orgInfoDtoList = new ArrayList<>(); List<OrgInfoDto> orgInfoDtoList = new ArrayList<>();
List<OrgBasicDto> orgBasicDtoList = organizationMapper.selectIndBusiunitAreaOrgstrctReg(false); List<OrgBasicDto> orgBasicDtoList = organizationMapper.selectIndBusiunitAreaOrgstrctReg(false);
List<OrganizationExtra> organizationExtraList = organizationExtraMapper.selectByExample(null); List<OrganizationExtra> organizationExtraList = organizationExtraMapper.selectByExample(null);
if (orgBasicDtoList != null && !orgBasicDtoList.isEmpty()) { if (orgBasicDtoList != null && !orgBasicDtoList.isEmpty()) {
for(OrgBasicDto orgBasicDto:orgBasicDtoList){ for (OrgBasicDto orgBasicDto : orgBasicDtoList) {
OrgInfoDto orgInfoDto = new OrgInfoDto(); OrgInfoDto orgInfoDto = new OrgInfoDto();
addBasicInfo(orgInfoDto,orgBasicDto); addBasicInfo(orgInfoDto, orgBasicDto);
for(OrganizationExtra organizationExtra:organizationExtraList){ for (OrganizationExtra organizationExtra : organizationExtraList) {
// 机构没有其他信息时,也将机构基本信息拼入查询结果 // 机构没有其他信息时,也将机构基本信息拼入查询结果
if(StringUtils.equals(orgBasicDto.getId(),organizationExtra.getOrganizationId())){ if (StringUtils.equals(orgBasicDto.getId(), organizationExtra.getOrganizationId())) {
addExtraInfo(orgInfoDto,organizationExtra); addExtraInfo(orgInfoDto, organizationExtra);
break; break;
} }
} }
...@@ -362,12 +370,12 @@ public class OrganizationServiceImpl extends BaseService{ ...@@ -362,12 +370,12 @@ public class OrganizationServiceImpl extends BaseService{
return orgInfoDtoList; return orgInfoDtoList;
} }
private void addBasicInfo(OrgInfoDto orgInfoDto,OrgBasicDto orgBasicDto) { private void addBasicInfo(OrgInfoDto orgInfoDto, OrgBasicDto orgBasicDto) {
BeanUtils.copyProperties(orgBasicDto,orgInfoDto); BeanUtils.copyProperties(orgBasicDto, orgInfoDto);
orgInfoDto.setIsActive(orgBasicDto.getIsActive()); orgInfoDto.setIsActive(orgBasicDto.getIsActive());
} }
private void addExtraInfo(OrgInfoDto orgInfoDto,OrganizationExtra orgExtra) { private void addExtraInfo(OrgInfoDto orgInfoDto, OrganizationExtra orgExtra) {
orgInfoDto.setUnifiedSocialCreditCode(orgExtra.getUnifiedSocialCreditCode()); orgInfoDto.setUnifiedSocialCreditCode(orgExtra.getUnifiedSocialCreditCode());
orgInfoDto.setTaxRegStatus(orgExtra.getTaxRegStatus()); orgInfoDto.setTaxRegStatus(orgExtra.getTaxRegStatus());
orgInfoDto.setApplicableAccountingRule(orgExtra.getApplicableAccountingRule()); orgInfoDto.setApplicableAccountingRule(orgExtra.getApplicableAccountingRule());
...@@ -1903,12 +1911,13 @@ public class OrganizationServiceImpl extends BaseService{ ...@@ -1903,12 +1911,13 @@ public class OrganizationServiceImpl extends BaseService{
} }
} }
public OrganizationDto getSingleOrgByOrgId(String orgId) { public OrganizationHKDto getSingleOrgByOrgId(Long orgId) {
OrganizationDto result = organizationMapper.getSingleOrgByOrgIdToOrgDto(orgId).stream().findFirst() OrganizationHK organizationHK = organizationHKMapper.selectByPrimaryKey(orgId);
.orElse(null); OrganizationHKDto result = new OrganizationHKDto();
CommonUtils.copyProperties(organizationHK,result);
Assert.notNull(result, "result is null"); Assert.notNull(result, "result is null");
result.setLevel(result.getLevel() == null ? 0 : result.getLevel()); result.setLevel(result.getLevel() == null ? 0 : result.getLevel());
result.setIsSystemDimension(result.getIsSystemDimension() == null ? false : result.getIsSystemDimension()); // result.setIsSystemDimension(result.getIsSystemDimension() == null ? false : result.getIsSystemDimension());
// 查询机构账套 // 查询机构账套
// List<EnterpriseAccountSetOrgDto> query1 = enterpriseAccountSetOrgMapper.getSingleOrgByOrgIdToEASODto(orgId); // List<EnterpriseAccountSetOrgDto> query1 = enterpriseAccountSetOrgMapper.getSingleOrgByOrgIdToEASODto(orgId);
...@@ -1930,10 +1939,10 @@ public class OrganizationServiceImpl extends BaseService{ ...@@ -1930,10 +1939,10 @@ public class OrganizationServiceImpl extends BaseService{
// } // }
// } // }
// result.setOrganizationServiceTemplateGroupList(query2); // result.setOrganizationServiceTemplateGroupList(query2);
if (StringUtils.isEmpty(result.getParentId())) { if (result.getParentId()==0) {
result.setParentName(""); result.setParentName("");
} else { } else {
Organization tParent = organizationMapper.selectByExample(null).stream() OrganizationHK tParent = organizationHKMapper.selectByExample(null).stream()
.filter(sa -> Objects.equals(sa.getId(), result.getParentId())).findFirst().orElse(null); .filter(sa -> Objects.equals(sa.getId(), result.getParentId())).findFirst().orElse(null);
Assert.notNull(tParent, "tParent is null"); Assert.notNull(tParent, "tParent is null");
result.setParentName(tParent.getName()); result.setParentName(tParent.getName());
...@@ -1946,8 +1955,8 @@ public class OrganizationServiceImpl extends BaseService{ ...@@ -1946,8 +1955,8 @@ public class OrganizationServiceImpl extends BaseService{
OrganizationExtraDto organizationExtraDto = new OrganizationExtraDto(); OrganizationExtraDto organizationExtraDto = new OrganizationExtraDto();
OrganizationExtra organizationExtra = organizationExtraMapper.selectByOrgId(orgId).stream().findFirst() OrganizationExtra organizationExtra = organizationExtraMapper.selectByOrgId(orgId).stream().findFirst()
.orElse(null); .orElse(null);
if(null!=organizationExtra){ if (null != organizationExtra) {
beanUtil.copyProperties(organizationExtra,organizationExtraDto); beanUtil.copyProperties(organizationExtra, organizationExtraDto);
} }
return organizationExtraDto; return organizationExtraDto;
} }
...@@ -2021,7 +2030,7 @@ public class OrganizationServiceImpl extends BaseService{ ...@@ -2021,7 +2030,7 @@ public class OrganizationServiceImpl extends BaseService{
} }
// 添加账套 // 添加账套
if(!orgDto.getOversea()){ if (!orgDto.getOversea()) {
// for (EnterpriseAccountSetOrgDto p : orgDto.getEnterpriseAccountSetOrgList()) { // for (EnterpriseAccountSetOrgDto p : orgDto.getEnterpriseAccountSetOrgList()) {
// EnterpriseAccountSetOrg enterpriseAccountSetOrg = new EnterpriseAccountSetOrg(); // EnterpriseAccountSetOrg enterpriseAccountSetOrg = new EnterpriseAccountSetOrg();
// enterpriseAccountSetOrg.setId(CommonUtils.getUUID()); // enterpriseAccountSetOrg.setId(CommonUtils.getUUID());
...@@ -2170,7 +2179,7 @@ public class OrganizationServiceImpl extends BaseService{ ...@@ -2170,7 +2179,7 @@ public class OrganizationServiceImpl extends BaseService{
private OperationResultDto checkExist(OrganizationDto orgDto) { private OperationResultDto checkExist(OrganizationDto orgDto) {
Assert.notNull(orgDto, "orgDto null point error"); Assert.notNull(orgDto, "orgDto null point error");
Organization queryRoot = null; Organization queryRoot = null;
if ((null==orgDto.getOversea()||!orgDto.getOversea()) && orgDto.getParentId() != null) { if ((null == orgDto.getOversea() || !orgDto.getOversea()) && orgDto.getParentId() != null) {
OrganizationExample example = new OrganizationExample(); OrganizationExample example = new OrganizationExample();
Criteria criteria = example.createCriteria(); Criteria criteria = example.createCriteria();
criteria.andClientCodeEqualTo(orgDto.getClientCode()); criteria.andClientCodeEqualTo(orgDto.getClientCode());
...@@ -2183,7 +2192,7 @@ public class OrganizationServiceImpl extends BaseService{ ...@@ -2183,7 +2192,7 @@ public class OrganizationServiceImpl extends BaseService{
return new OperationResultDto(false, OrganizationMessage.ClientCodeIsExist); return new OperationResultDto(false, OrganizationMessage.ClientCodeIsExist);
} }
OperationResultDto operationResult = checkOrgNameOrOrgCode(orgDto); OperationResultDto operationResult = checkOrgNameOrOrgCode(orgDto);
if (operationResult.getResult() && (null==orgDto.getOversea()||!orgDto.getOversea())) { if (operationResult.getResult() && (null == orgDto.getOversea() || !orgDto.getOversea())) {
operationResult = checkCodeTaxPaymentNo(orgDto); operationResult = checkCodeTaxPaymentNo(orgDto);
} }
return operationResult; return operationResult;
...@@ -2319,7 +2328,7 @@ public class OrganizationServiceImpl extends BaseService{ ...@@ -2319,7 +2328,7 @@ public class OrganizationServiceImpl extends BaseService{
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
private OperationResultDto checkOrgNameOrOrgCode(OrganizationDto orgDto) { private OperationResultDto checkOrgNameOrOrgCode(OrganizationDto orgDto) {
OrganizationExample example = new OrganizationExample(); OrganizationExample example = new OrganizationExample();
if (null!=orgDto.getOversea()&&orgDto.getOversea()&&null!=orgDto.getEnglishName()) { if (null != orgDto.getOversea() && orgDto.getOversea() && null != orgDto.getEnglishName()) {
return new OperationResultDto(true); return new OperationResultDto(true);
} }
if (orgDto.getId() == null) { if (orgDto.getId() == null) {
...@@ -2409,7 +2418,7 @@ public class OrganizationServiceImpl extends BaseService{ ...@@ -2409,7 +2418,7 @@ public class OrganizationServiceImpl extends BaseService{
org.setIndustryId(orgDto.getIndustryId()); org.setIndustryId(orgDto.getIndustryId());
org.setBusinessUnitId(orgDto.getBusinessUnitId());*/ org.setBusinessUnitId(orgDto.getBusinessUnitId());*/
beanUtil.copyProperties(orgDto,org); beanUtil.copyProperties(orgDto, org);
org.setUpdateTime(new Date()); org.setUpdateTime(new Date());
Organization orgUpdate = org; Organization orgUpdate = org;
...@@ -2615,26 +2624,27 @@ public class OrganizationServiceImpl extends BaseService{ ...@@ -2615,26 +2624,27 @@ public class OrganizationServiceImpl extends BaseService{
* 16/01/2019 14:26 * 16/01/2019 14:26
* 根据唯一主键进行更新机构其他信息,缺少逻辑校验 * 根据唯一主键进行更新机构其他信息,缺少逻辑校验
* [orgExtraDto] * [orgExtraDto]
* @author Gary J Li *
* @return * @return
* @author Gary J Li
*/ */
@SuppressWarnings({"rawtypes", "unchecked"}) @SuppressWarnings({"rawtypes", "unchecked"})
public OperationResultDto<Object> updateOrgExtra(OrganizationExtraDto orgExtraDto) { public OperationResultDto<Object> updateOrgExtra(OrganizationExtraDto orgExtraDto) {
try { try {
OrganizationExtra orgExtra = new OrganizationExtra(); OrganizationExtra orgExtra = new OrganizationExtra();
BeanUtils.copyProperties(orgExtraDto,orgExtra); BeanUtils.copyProperties(orgExtraDto, orgExtra);
// 根据唯一主键进行更新 // 根据唯一主键进行更新
if(null==orgExtra.getId()){ if (null == orgExtra.getId()) {
orgExtra.setId(idService.nextId()); orgExtra.setId(idService.nextId());
organizationExtraMapper.insertSelective(orgExtra); organizationExtraMapper.insertSelective(orgExtra);
}else{ } else {
OrganizationExtraExample orgExtraExample = new OrganizationExtraExample(); OrganizationExtraExample orgExtraExample = new OrganizationExtraExample();
orgExtraExample.createCriteria().andIdEqualTo(orgExtraDto.getId()); orgExtraExample.createCriteria().andIdEqualTo(orgExtraDto.getId());
organizationExtraMapper.updateByExampleSelective(orgExtra,orgExtraExample); organizationExtraMapper.updateByExampleSelective(orgExtra, orgExtraExample);
} }
// todo 暂时未做校验 // todo 暂时未做校验
return new OperationResultDto(true); return new OperationResultDto(true);
}catch (Exception ex) { } catch (Exception ex) {
logger.error("UpdateOrgExtra出错了:" + ex, ex); logger.error("UpdateOrgExtra出错了:" + ex, ex);
logger.error("标记回滚, ready to call setRollbackOnly"); logger.error("标记回滚, ready to call setRollbackOnly");
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
...@@ -2790,10 +2800,11 @@ public class OrganizationServiceImpl extends BaseService{ ...@@ -2790,10 +2800,11 @@ public class OrganizationServiceImpl extends BaseService{
/** /**
* 19/02/2019 19:26 * 19/02/2019 19:26
* * <p>
* [userId] * [userId]
* @author Gary J Li *
* @return * @return
* @author Gary J Li
*/ */
public List<OrgSelectDto> getOrgSimpleList() { public List<OrgSelectDto> getOrgSimpleList() {
String userId = authUserHelper.getCurrentUserId(); String userId = authUserHelper.getCurrentUserId();
...@@ -2806,7 +2817,7 @@ public class OrganizationServiceImpl extends BaseService{ ...@@ -2806,7 +2817,7 @@ public class OrganizationServiceImpl extends BaseService{
organizationExample.createCriteria().andIdIn(orgIds); organizationExample.createCriteria().andIdIn(orgIds);
List<Organization> organizations = organizationMapper.selectByExample(organizationExample); List<Organization> organizations = organizationMapper.selectByExample(organizationExample);
organizations.forEach(o -> { organizations.forEach(o -> {
OrgSelectDto orgSelectDto = beanUtil.copyProperties(o,new OrgSelectDto()); OrgSelectDto orgSelectDto = beanUtil.copyProperties(o, new OrgSelectDto());
orgSelectDtos.add(orgSelectDto); orgSelectDtos.add(orgSelectDto);
}); });
return orgSelectDtos; return orgSelectDtos;
...@@ -3126,7 +3137,7 @@ public class OrganizationServiceImpl extends BaseService{ ...@@ -3126,7 +3137,7 @@ public class OrganizationServiceImpl extends BaseService{
public int getDownloadFilePath(JsonExportDto exportData, OutputStream os) { public int getDownloadFilePath(JsonExportDto exportData, OutputStream os) {
List<OrgInfoDto> orgInfoDtos = JSON.parseArray(exportData.getJsonData(), OrgInfoDto.class); List<OrgInfoDto> orgInfoDtos = JSON.parseArray(exportData.getJsonData(), OrgInfoDto.class);
try{ try {
if (orgInfoDtos.size() == 0) { if (orgInfoDtos.size() == 0) {
return 0; return 0;
} }
...@@ -3135,100 +3146,100 @@ public class OrganizationServiceImpl extends BaseService{ ...@@ -3135,100 +3146,100 @@ public class OrganizationServiceImpl extends BaseService{
orgInfoDtos.stream().forEach(x -> { orgInfoDtos.stream().forEach(x -> {
pwc.taxtech.atms.dto.organization.OrgInfoDto d = pwc.taxtech.atms.dto.organization.OrgInfoDto d =
new pwc.taxtech.atms.dto.organization.OrgInfoDto(); new pwc.taxtech.atms.dto.organization.OrgInfoDto();
d = beanUtil.copyProperties(x,d); d = beanUtil.copyProperties(x, d);
cellList.add(d); cellList.add(d);
}); });
ExcelUtil.exportExcel(header, cellList, os); ExcelUtil.exportExcel(header, cellList, os);
}catch (Exception e){ } catch (Exception e) {
logger.error("机构列表导出转换Excel异常: %s",e.getMessage()); logger.error("机构列表导出转换Excel异常: %s", e.getMessage());
} }
return orgInfoDtos.size(); return orgInfoDtos.size();
} }
private Map<String, String> generalHeader() { private Map<String, String> generalHeader() {
Map<String, String> header = new LinkedHashMap<>(); Map<String, String> header = new LinkedHashMap<>();
header.put("Name","机构名称"); header.put("Name", "机构名称");
header.put("Code","机构代码"); header.put("Code", "机构代码");
header.put("TaxPayerNumber","纳税人识别号"); header.put("TaxPayerNumber", "纳税人识别号");
header.put("StructureName","机构层级"); header.put("StructureName", "机构层级");
header.put("RegionName","地区"); header.put("RegionName", "地区");
header.put("BusinessUnitName","事业部"); header.put("BusinessUnitName", "事业部");
header.put("AreaName","区域"); header.put("AreaName", "区域");
header.put("IndustryName","行业"); header.put("IndustryName", "行业");
header.put("IsActive","启用状态"); header.put("IsActive", "启用状态");
header.put("EnglishName","机构名称(英文)"); header.put("EnglishName", "机构名称(英文)");
header.put("Abbreviation","机构缩写"); header.put("Abbreviation", "机构缩写");
header.put("FoundationDate","成立日期"); header.put("FoundationDate", "成立日期");
header.put("RegistrationLocation","注册地"); header.put("RegistrationLocation", "注册地");
header.put("RegistrationLocationEn","注册地(英文)"); header.put("RegistrationLocationEn", "注册地(英文)");
header.put("LegalPersonName","法人名称"); header.put("LegalPersonName", "法人名称");
header.put("BusinessScope","经营范围"); header.put("BusinessScope", "经营范围");
header.put("RegStatus","工商登记状态"); header.put("RegStatus", "工商登记状态");
header.put("ArchitectureType","架构类型"); header.put("ArchitectureType", "架构类型");
header.put("NationalEconomicIndustry","所属国民经济行业"); header.put("NationalEconomicIndustry", "所属国民经济行业");
header.put("EngageNationalProhibitIndustry","从事国家限制或禁止行业"); header.put("EngageNationalProhibitIndustry", "从事国家限制或禁止行业");
header.put("RegistrationCapital","注册资本(万元)"); header.put("RegistrationCapital", "注册资本(万元)");
header.put("PaidInCapital","实缴资本(万元)"); header.put("PaidInCapital", "实缴资本(万元)");
header.put("NumOfBranches","分公司数量"); header.put("NumOfBranches", "分公司数量");
header.put("UnifiedSocialCreditCode","统一社会信用代码"); header.put("UnifiedSocialCreditCode", "统一社会信用代码");
header.put("RegFinancialAccountingType","注册登记财务核算方式"); header.put("RegFinancialAccountingType", "注册登记财务核算方式");
header.put("TaxRegStatus","财务核算方法"); header.put("TaxRegStatus", "财务核算方法");
header.put("TaxCreditRating","纳税信用评级"); header.put("TaxCreditRating", "纳税信用评级");
header.put("ApplicableAccountingRule","适用会计制度"); header.put("ApplicableAccountingRule", "适用会计制度");
header.put("LowValueConsumablesAmortizationMethod","低值易耗品摊销方法"); header.put("LowValueConsumablesAmortizationMethod", "低值易耗品摊销方法");
header.put("DepreciationMethod","折旧方式"); header.put("DepreciationMethod", "折旧方式");
header.put("AccountingSoftware","会计核算软件"); header.put("AccountingSoftware", "会计核算软件");
header.put("CompleteRecordTotalInstitutions","是否完成总分机构备案"); header.put("CompleteRecordTotalInstitutions", "是否完成总分机构备案");
header.put("TaxClientPersonName","办税人姓名"); header.put("TaxClientPersonName", "办税人姓名");
header.put("TaxClientPersonPhone","办税人电话"); header.put("TaxClientPersonPhone", "办税人电话");
header.put("TaxClientPersonIdNum","办税人身份证号"); header.put("TaxClientPersonIdNum", "办税人身份证号");
header.put("TicketHolderName","购票人姓名"); header.put("TicketHolderName", "购票人姓名");
header.put("TicketHolderPhoneNum","购票人电话"); header.put("TicketHolderPhoneNum", "购票人电话");
header.put("NationalTaxHallAddress","主管国税大厅地址"); header.put("NationalTaxHallAddress", "主管国税大厅地址");
header.put("NationalTaxAdministratorName","主管国税税局名称"); header.put("NationalTaxAdministratorName", "主管国税税局名称");
header.put("NationalTaxAdministratorPhoneNum","主管国税税局电话"); header.put("NationalTaxAdministratorPhoneNum", "主管国税税局电话");
header.put("LocalTaxHallAddress","主管地税大厅地址"); header.put("LocalTaxHallAddress", "主管地税大厅地址");
header.put("LocalTaxAdministratorName","主管地税税局名称"); header.put("LocalTaxAdministratorName", "主管地税税局名称");
header.put("LocalTaxAdministratorPhoneNum","主管地税税局电话"); header.put("LocalTaxAdministratorPhoneNum", "主管地税税局电话");
header.put("EtaWebsite","电子税务网站"); header.put("EtaWebsite", "电子税务网站");
header.put("SignTripartiteAgreement","三方协议是否签订"); header.put("SignTripartiteAgreement", "三方协议是否签订");
header.put("ReportingCurrency","记账本位币"); header.put("ReportingCurrency", "记账本位币");
header.put("ConsolidationTime","并表期间"); header.put("ConsolidationTime", "并表期间");
header.put("TaxAgent","税务代理"); header.put("TaxAgent", "税务代理");
header.put("TaxAgentContact","税务代理联系方式"); header.put("TaxAgentContact", "税务代理联系方式");
header.put("TaxReturnBusinessType","纳税申报企业类型"); header.put("TaxReturnBusinessType", "纳税申报企业类型");
header.put("SmallMeagerProfit","小型微利企业"); header.put("SmallMeagerProfit", "小型微利企业");
header.put("ListedCompany","上市公司"); header.put("ListedCompany", "上市公司");
header.put("ApplicableAccountingStandardsOrAccountingSystems","适用会计准则或会计制度"); header.put("ApplicableAccountingStandardsOrAccountingSystems", "适用会计准则或会计制度");
header.put("TaxPayerNumberVat","增值税纳税人识别号"); header.put("TaxPayerNumberVat", "增值税纳税人识别号");
header.put("TaxPayerNumberCit","企业所得税纳税人识别号"); header.put("TaxPayerNumberCit", "企业所得税纳税人识别号");
header.put("TaxClientPersonEmailAddress","办税人邮箱地址"); header.put("TaxClientPersonEmailAddress", "办税人邮箱地址");
header.put("BankAccountName","三方协议开户银行名称"); header.put("BankAccountName", "三方协议开户银行名称");
header.put("BankAccountNumber","三方协议开户银行账户"); header.put("BankAccountNumber", "三方协议开户银行账户");
header.put("LegalPersonPhoneNumber","法定代表人/负责人手机"); header.put("LegalPersonPhoneNumber", "法定代表人/负责人手机");
header.put("LegalPersonLandlineNum","法定代表人/负责人座机"); header.put("LegalPersonLandlineNum", "法定代表人/负责人座机");
header.put("LegalPersonEmailAddress","法定代表人/负责人邮箱"); header.put("LegalPersonEmailAddress", "法定代表人/负责人邮箱");
header.put("RegFinancialOfficerName","注册登记财务负责人姓名"); header.put("RegFinancialOfficerName", "注册登记财务负责人姓名");
header.put("RegFinancialOfficerPhoneNum","注册登记财务负责人电话"); header.put("RegFinancialOfficerPhoneNum", "注册登记财务负责人电话");
header.put("RegFinancialOfficerLandlineNum","注册登记财务负责人座机"); header.put("RegFinancialOfficerLandlineNum", "注册登记财务负责人座机");
header.put("RegFinancialOfficerEmailAddress","注册登记财务负责人邮箱"); header.put("RegFinancialOfficerEmailAddress", "注册登记财务负责人邮箱");
header.put("ActualBusinessAddress","实际经营地址"); header.put("ActualBusinessAddress", "实际经营地址");
header.put("SecondaryApprovalAmount","二级审批金额"); header.put("SecondaryApprovalAmount", "二级审批金额");
header.put("FiscalYearDeadline","财年截止日"); header.put("FiscalYearDeadline", "财年截止日");
header.put("BusinessRegistrationNumber","Business registration number"); header.put("BusinessRegistrationNumber", "Business registration number");
header.put("ParValue","Par Value"); header.put("ParValue", "Par Value");
header.put("IssuedShares","Issued shares"); header.put("IssuedShares", "Issued shares");
header.put("Directors","Directors"); header.put("Directors", "Directors");
header.put("OtherFacts","其他情况说明"); header.put("OtherFacts", "其他情况说明");
header.put("LogoutTime","注销时间"); header.put("LogoutTime", "注销时间");
header.put("TaxRuleIntroduction","税制简介"); header.put("TaxRuleIntroduction", "税制简介");
header.put("Country","国家"); header.put("Country", "国家");
return header; return header;
} }
......
...@@ -511,73 +511,73 @@ public class RoleServiceImpl extends AbstractService { ...@@ -511,73 +511,73 @@ public class RoleServiceImpl extends AbstractService {
} }
public List<UserRoleInfo> getAllOwnUserRoleList() { public List<UserRoleInfo> getAllOwnUserRoleList() {
logger.debug("Start to get all own user roles"); // logger.debug("Start to get all own user roles");
List<User> userList = userService.findAllUsers(); // List<User> userList = userService.findAllUsers();
// 角色列表 // // 角色列表
List<Role> roleList = findAll(); // List<Role> roleList = findAll();
// 原始维度 // // 原始维度
List<UserRole> userRoleList = userRoleService.findAllUserRoles(); // List<UserRole> userRoleList = userRoleService.findAllUserRoles();
List<Organization> organizationList = organizationService.findAllOrganizations(); // List<OrganizationHK> organizationList = organizationService.findAllOrganizations();
List<UserRoleInfo> retList = new ArrayList<>(); // List<UserRoleInfo> retList = new ArrayList<>();
//
for (User userItem : userList) { // for (User userItem : userList) {
List<UserRole> sameList = userRoleList.stream().filter(sa -> userItem.getId().equals(sa.getUserId())) // List<UserRole> sameList = userRoleList.stream().filter(sa -> userItem.getId().equals(sa.getUserId()))
.collect(Collectors.toList()); // .collect(Collectors.toList());
List<Organization> orgList = organizationList.stream() // List<OrganizationHK> orgList = organizationList.stream()
.filter(sa -> sa.getId().equals(userItem.getOrganizationId())).collect(Collectors.toList()); // .filter(sa -> sa.getId().equals(userItem.getOrganizationId())).collect(Collectors.toList());
if (orgList.isEmpty()) { // if (orgList.isEmpty()) {
continue; // continue;
} // }
Organization org = orgList.get(0); // OrganizationHK org = orgList.get(0);
UserRoleInfo userRoleInfo = new UserRoleInfo(); // UserRoleInfo userRoleInfo = new UserRoleInfo();
userRoleInfo.setUserName(userItem.getUserName()); // userRoleInfo.setUserName(userItem.getUserName());
userRoleInfo.setStatus(userItem.getStatus()); // userRoleInfo.setStatus(userItem.getStatus());
userRoleInfo.setServiceTypeId(""); // userRoleInfo.setServiceTypeId("");
userRoleInfo.setRoleInfoList(new ArrayList<>()); // userRoleInfo.setRoleInfoList(new ArrayList<>());
userRoleInfo.setOrganizationName(org.getName()); // userRoleInfo.setOrganizationName(org.getName());
userRoleInfo.setOrganizationId(org.getId()); // userRoleInfo.setOrganizationId(org.getId());
userRoleInfo.setIsAccessible(true); // userRoleInfo.setIsAccessible(true);
userRoleInfo.setEmail(userItem.getEmail()); // userRoleInfo.setEmail(userItem.getEmail());
userRoleInfo.setBusinessUnitId(org.getBusinessUnitId()); // userRoleInfo.setBusinessUnitId(org.getBusinessUnitId());
userRoleInfo.setAreaId(org.getAreaId()); // userRoleInfo.setAreaId(org.getAreaId());
userRoleInfo.setId(userItem.getId()); // userRoleInfo.setId(userItem.getId());
//
List<RoleInfo> roleInfoList = new ArrayList<>(); // List<RoleInfo> roleInfoList = new ArrayList<>();
for (UserRole userRole : sameList) { // for (UserRole userRole : sameList) {
for (Role role : roleList) { // for (Role role : roleList) {
if (role.getId().equals(userRole.getRoleId())) { // if (role.getId().equals(userRole.getRoleId())) {
RoleInfo roleInfo = new RoleInfo(); // RoleInfo roleInfo = new RoleInfo();
roleInfo.setDimensionId(""); // roleInfo.setDimensionId("");
roleInfo.setDimensionValue(""); // roleInfo.setDimensionValue("");
roleInfo.setDimensionValueId(""); // roleInfo.setDimensionValueId("");
roleInfo.setId(role.getId()); // roleInfo.setId(role.getId());
roleInfo.setIsAccessible(true); // roleInfo.setIsAccessible(true);
roleInfo.setIsHeritable(true); // roleInfo.setIsHeritable(true);
roleInfo.setName(role.getName()); // roleInfo.setName(role.getName());
roleInfo.setRoleSource(RoleSourceEnum.OriginalLevel.value()); // roleInfo.setRoleSource(RoleSourceEnum.OriginalLevel.value());
roleInfoList.add(roleInfo); // roleInfoList.add(roleInfo);
} // }
} // }
} // }
userRoleInfo.setRoleInfoList(roleInfoList); // userRoleInfo.setRoleInfoList(roleInfoList);
retList.add(userRoleInfo); // retList.add(userRoleInfo);
} // }
// 这里可以一次查出来再合并 // // 这里可以一次查出来再合并
retList.forEach(l->{ // retList.forEach(l->{
if(null!=l.getBusinessUnitId()){ // if(null!=l.getBusinessUnitId()){
BusinessUnit bu = businessUnitMapper.selectByPrimaryKey(l.getBusinessUnitId()); // BusinessUnit bu = businessUnitMapper.selectByPrimaryKey(l.getBusinessUnitId());
if(bu!=null){ // if(bu!=null){
l.setBusinessUnitName(bu.getName()); // l.setBusinessUnitName(bu.getName());
} // }
} // }
if (null!=l.getAreaId()){ // if (null!=l.getAreaId()){
Area area = areaMapper.selectByPrimaryKey(l.getAreaId()); // Area area = areaMapper.selectByPrimaryKey(l.getAreaId());
if(area!=null){ // if(area!=null){
l.setAreaName(area.getName()); // l.setAreaName(area.getName());
} // }
} // }
}); // });
return retList; return java.util.Collections.emptyList();
} }
public List<UserRoleInfo> getAllUserRoleList() { public List<UserRoleInfo> getAllUserRoleList() {
......
package pwc.taxtech.atms.organization.dpo;
import pwc.taxtech.atms.organization.entity.OrganizationHK;
import java.util.List;
public class OrganizationHKDto extends OrganizationHK {
private String parentName;
private List<OrganizationHKDto> subOrgs;
public Integer getLevel() {
return level;
}
public void setLevel(Integer level) {
this.level = level;
}
private Integer level;
public String getParentName() {
return parentName;
}
public void setParentName(String parentName) {
this.parentName = parentName;
}
public List<OrganizationHKDto> getSubOrgs() {
return subOrgs;
}
public void setSubOrgs(List<OrganizationHKDto> subOrgs) {
this.subOrgs = subOrgs;
}
}
...@@ -335,55 +335,55 @@ ...@@ -335,55 +335,55 @@
} }
}); });
var loadUserRoleList = function (orgID) { // var loadUserRoleList = function (orgID) {
roleService.getUserRoleList(orgID, '', '').success(function (data) { // roleService.getUserRoleList(orgID, '', '').success(function (data) {
// 构造用户信息 // // 构造用户信息
var roleStaticsList = []; // var roleStaticsList = [];
//
var userRoleShowList = []; // var userRoleShowList = [];
if (data && data.length > 0) { // if (data && data.length > 0) {
data.forEach(function (row) { // data.forEach(function (row) {
//
var uniqRoleList = _.uniq(row.roleInfoList, function (item) { // var uniqRoleList = _.uniq(row.roleInfoList, function (item) {
return item.name // return item.name
}); // });
row.roleNameList = _.map(uniqRoleList, function (x) { // row.roleNameList = _.map(uniqRoleList, function (x) {
return x.name; // return x.name;
}).join(constant.comma); // }).join(constant.comma);
//
//var roleNames = _.pluck(row.roleInfoList, 'name'); // //var roleNames = _.pluck(row.roleInfoList, 'name');
//row.roleNameList = roleNames.join(','); // //row.roleNameList = roleNames.join(',');
//
if (!row.isAccessible) { // if (!row.isAccessible) {
row.roleNameList = $translate.instant('UnAccessable'); // row.roleNameList = $translate.instant('UnAccessable');
} // }
//
row.hasEditPermission = $scope.hasEditPermission; // row.hasEditPermission = $scope.hasEditPermission;
//
userRoleShowList.push({id: row.id, userName: row.userName, roleNameList: row.roleNameList}); // userRoleShowList.push({id: row.id, userName: row.userName, roleNameList: row.roleNameList});
row.roleInfoList.forEach(function (role) { // row.roleInfoList.forEach(function (role) {
var one = _.find(roleStaticsList, function (data) { // var one = _.find(roleStaticsList, function (data) {
return data.id === role.id; // return data.id === role.id;
}); // });
//
if (one) { // if (one) {
one.count++; // one.count++;
} else { // } else {
role.count = 1; // role.count = 1;
roleStaticsList.push(role); // roleStaticsList.push(role);
} // }
}); // });
}); // });
} // }
//
$scope.roleStaticsList = roleStaticsList; // $scope.roleStaticsList = roleStaticsList;
//
$scope.userRoleList = JSON.stringify(userRoleShowList); // $scope.userRoleList = JSON.stringify(userRoleShowList);
$scope.userRoleGridOptions.data = data; // $scope.userRoleGridOptions.data = data;
//用户数统计 // //用户数统计
$scope.userCount = data.length || 0; // $scope.userCount = data.length || 0;
}); // });
}; // };
// 选中机构 // 选中机构
$scope.selectOrganization = function (branch) { $scope.selectOrganization = function (branch) {
...@@ -441,21 +441,21 @@ ...@@ -441,21 +441,21 @@
// $scope.editOrgExtraModel.unifiedSocialCreditCode = $scope.selectCompany.taxPayerNumber; // $scope.editOrgExtraModel.unifiedSocialCreditCode = $scope.selectCompany.taxPayerNumber;
// $scope.selectCompanyExtra.unifiedSocialCreditCode = $scope.selectCompany.taxPayerNumber; // $scope.selectCompanyExtra.unifiedSocialCreditCode = $scope.selectCompany.taxPayerNumber;
//加载用户权限list //加载用户权限list
loadUserRoleList(org.id); // loadUserRoleList(org.id);
generalSelectCompanyText(); // generalSelectCompanyText();
cancelWebChange(); cancelWebChange();
// $scope.updateOrgExtraCancel() // $scope.updateOrgExtraCancel()
}); });
orgService.getSingleOrgExtra(org.id).success(function (data) { // orgService.getSingleOrgExtra(org.id).success(function (data) {
if (data) { // if (data) {
$scope.selectCompanyExtra = data; // $scope.selectCompanyExtra = data;
$scope.editOrgExtraModel = angular.copy(data); // $scope.editOrgExtraModel = angular.copy(data);
generalSelectCompanyExtraText(); // // generalSelectCompanyExtraText();
} // }
}); // });
// getEquityListByOrgId(org.id); // getEquityListByOrgId(org.id);
......
...@@ -754,12 +754,12 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', ' ...@@ -754,12 +754,12 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
// 基础数据初始化 // 基础数据初始化
var init = function () { var init = function () {
loadProjectIndustryList(); // loadProjectIndustryList();
loadOrganizationStructureService(); loadOrganizationStructureService();
loadBusinessUnitList(); loadBusinessUnitList();
loadProvinceList(); loadProvinceList();
loadEnterpriseAccountSetList(); // loadEnterpriseAccountSetList();
getAllDimensionList(); // getAllDimensionList();
// loadprojectClient(); // loadprojectClient();
initDatePicker(); initDatePicker();
}; };
...@@ -1243,11 +1243,11 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', ' ...@@ -1243,11 +1243,11 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
}; };
// 获取所有维度值和维度值配置信息 // 获取所有维度值和维度值配置信息
var getAllDimensionList = function () { // var getAllDimensionList = function () {
dimensionService.getAllDimensionList().success(function (data) { // dimensionService.getAllDimensionList().success(function (data) {
$scope.dimensionList = data; // $scope.dimensionList = data;
}); // });
}; // };
// 获取添加自定义纬度列表 // 获取添加自定义纬度列表
var getAddOrgSetDimension = function () { var getAddOrgSetDimension = 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