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

fixed entity page-- frank

parent 1076e372
...@@ -7,7 +7,6 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -7,7 +7,6 @@ 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.OrgBasicDto; import pwc.taxtech.atms.dpo.OrgBasicDto;
import pwc.taxtech.atms.dpo.OrgInfoDto;
import pwc.taxtech.atms.dpo.OrgSelectDto; import pwc.taxtech.atms.dpo.OrgSelectDto;
import pwc.taxtech.atms.dpo.OrganizationDto; import pwc.taxtech.atms.dpo.OrganizationDto;
import pwc.taxtech.atms.dto.*; import pwc.taxtech.atms.dto.*;
...@@ -18,6 +17,7 @@ import pwc.taxtech.atms.dto.navtree.NavTreeDto; ...@@ -18,6 +17,7 @@ import pwc.taxtech.atms.dto.navtree.NavTreeDto;
import pwc.taxtech.atms.dto.organization.*; import pwc.taxtech.atms.dto.organization.*;
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.organization.dpo.OrganizationHKDto;
import pwc.taxtech.atms.organization.entity.OrganizationHK;
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;
...@@ -85,7 +85,7 @@ public class OrganizationController { ...@@ -85,7 +85,7 @@ public class OrganizationController {
// @ApiOperation(value = "层级显示机构列表_列表显示") // @ApiOperation(value = "层级显示机构列表_列表显示")
@RequestMapping(value = "getOrgInfoList", method = RequestMethod.GET) @RequestMapping(value = "getOrgInfoList", method = RequestMethod.GET)
public @ResponseBody public @ResponseBody
List<OrgInfoDto> getOrgInfoList() { List<OrganizationHK> getOrgInfoList() {
logger.info("GET /api/v1/org/getOrgInfoList"); logger.info("GET /api/v1/org/getOrgInfoList");
return organizationService.getOrgInfo(); return organizationService.getOrgInfo();
} }
......
...@@ -235,8 +235,8 @@ public class OrganizationServiceImpl extends BaseService { ...@@ -235,8 +235,8 @@ public class OrganizationServiceImpl extends BaseService {
} }
private OrganizationHKDto genarateSubOrgs(OrganizationHKDto parentOrg, List<OrganizationHK> orgs, private OrganizationHKDto genarateSubOrgs(OrganizationHKDto parentOrg, List<OrganizationHK> orgs,
List<ServiceType> serviceList, Integer useType) { List<ServiceType> serviceList, Integer useType) {
if (parentOrg.getParentId()>0) { if (parentOrg.getParentId() > 0) {
OrganizationHK 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());
...@@ -338,36 +338,35 @@ public class OrganizationServiceImpl extends BaseService { ...@@ -338,36 +338,35 @@ public class OrganizationServiceImpl extends BaseService {
* @return List<OrgInfoDto> * @return List<OrgInfoDto>
* @author Gary J Li * @author Gary J Li
*/ */
public List<OrgInfoDto> getOrgInfo() { public List<OrganizationHK> getOrgInfo() {
List<OrgInfoDto> orgInfoDtoList = new ArrayList<>(); // List<OrganizationHKDto> orgInfoDtoList = new ArrayList<>();
List<OrgBasicDto> orgBasicDtoList = organizationMapper.selectIndBusiunitAreaOrgstrctReg(false); List<OrganizationHK> orgBasicDtoList = organizationHKMapper.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; // }
} // }
} // orgInfoDtoList.add(orgInfoDto);
orgInfoDtoList.add(orgInfoDto); // }
} // }
}
//判断用户是否是admin用户,不是则进行机构权限判断 //判断用户是否是admin用户,不是则进行机构权限判断
String uid = authUserHelper.getCurrentUserId(); // String uid = authUserHelper.getCurrentUserId();
User user = userMapper.selectByPrimaryKey(uid); // User user = userMapper.selectByPrimaryKey(uid);
if (!user.getIsSuperAdmin()) { // if (!user.getIsSuperAdmin()) {
UserOrganizationExample userOrganizationExample = new UserOrganizationExample(); // UserOrganizationExample userOrganizationExample = new UserOrganizationExample();
userOrganizationExample.createCriteria().andUserIdEqualTo(user.getId()); // userOrganizationExample.createCriteria().andUserIdEqualTo(user.getId());
List<UserOrganization> userOrganizations = userOrganizationMapper.selectByExample(userOrganizationExample); // List<UserOrganization> userOrganizations = userOrganizationMapper.selectByExample(userOrganizationExample);
List<String> userOrgIds = userOrganizations.stream().map(e -> e.getOrganizationId()).collect(toList()); // List<String> userOrgIds = userOrganizations.stream().map(e -> e.getOrganizationId()).collect(toList());
List<OrgInfoDto> orgInfoDtoFilterList = orgInfoDtoList.stream().filter(orgInfoDto -> userOrgIds.contains(orgInfoDto.getId())).collect(toList()); // List<OrgInfoDto> orgInfoDtoFilterList = orgInfoDtoList.stream().filter(orgInfoDto -> userOrgIds.contains(orgInfoDto.getId())).collect(toList());
return orgInfoDtoFilterList; // return orgInfoDtoFilterList;
} // }
return orgInfoDtoList; return orgBasicDtoList;
} }
private void addBasicInfo(OrgInfoDto orgInfoDto, OrgBasicDto orgBasicDto) { private void addBasicInfo(OrgInfoDto orgInfoDto, OrgBasicDto orgBasicDto) {
...@@ -1914,32 +1913,10 @@ public class OrganizationServiceImpl extends BaseService { ...@@ -1914,32 +1913,10 @@ public class OrganizationServiceImpl extends BaseService {
public OrganizationHKDto getSingleOrgByOrgId(Long orgId) { public OrganizationHKDto getSingleOrgByOrgId(Long orgId) {
OrganizationHK organizationHK = organizationHKMapper.selectByPrimaryKey(orgId); OrganizationHK organizationHK = organizationHKMapper.selectByPrimaryKey(orgId);
OrganizationHKDto result = new OrganizationHKDto(); OrganizationHKDto result = new OrganizationHKDto();
CommonUtils.copyProperties(organizationHK,result); 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()); if (result.getParentId() == 0) {
// 查询机构账套
// List<EnterpriseAccountSetOrgDto> query1 = enterpriseAccountSetOrgMapper.getSingleOrgByOrgIdToEASODto(orgId);
// for (EnterpriseAccountSetOrgDto p : query1) {
// SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM");
// p.setExpiredDateStr(p.getExpiredDate() == null ? "" : formatter.format(p.getExpiredDate()));
// p.setEffectiveDateStr(p.getEffectiveDate() == null ? "" : formatter.format(p.getEffectiveDate()));
// }
// result.setEnterpriseAccountSetOrgList(query1);
// 查询机构服务
// List<ServiceType> serviceType = serviceTypeMapper.selectByExample(null);
// List<OrganizationServiceTemplateGroupDto> query2 = organizationServiceTemplateGroupMapper
// .getSingleOrgByOrgIdToOSTGDto(orgId);
// for (OrganizationServiceTemplateGroupDto mapping : query2) {
// ServiceType st = serviceType.stream().filter(n -> Objects.equals(n.getId(), mapping.getServiceTypeId()))
// .findFirst().orElse(null);
// if (st != null) {
// mapping.setServiceTypeName(st.getName());
// }
// }
// result.setOrganizationServiceTemplateGroupList(query2);
if (result.getParentId()==0) {
result.setParentName(""); result.setParentName("");
} else { } else {
OrganizationHK tParent = organizationHKMapper.selectByExample(null).stream() OrganizationHK tParent = organizationHKMapper.selectByExample(null).stream()
...@@ -1947,7 +1924,6 @@ public class OrganizationServiceImpl extends BaseService { ...@@ -1947,7 +1924,6 @@ public class OrganizationServiceImpl extends BaseService {
Assert.notNull(tParent, "tParent is null"); Assert.notNull(tParent, "tParent is null");
result.setParentName(tParent.getName()); result.setParentName(tParent.getName());
} }
// result.setDimensionValueOrgList(dimensionService.getAllDimensionOrgListByOrgId(result.getId()));
return result; return result;
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -409,5 +409,55 @@ ...@@ -409,5 +409,55 @@
height: 16px; height: 16px;
} }
} }
#advancedOptions {
max-height: 100%;
margin:10px 20px 0px 20px;
.right-option {
height: 30px;
display: inline-block;
vertical-align: middle;
float: right;
}
#equityGridContainer {
/*height: 600px;*/
margin-bottom: 15px;
}
.label-current-holding {
padding-top: 10px;
}
.current-holding-info {
padding-top: 10px;
}
.label {
padding-bottom: 2px;
}
.page-footer {
display: inline-block;
float: right;
/*padding-right: 20px;*/
}
.page-form-group {
float: right;
margin-top: 20px;
.page-size {
margin: 0;
}
.pagination {
margin: 0;
}
}
}
} }
} }
\ 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