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

fixed shareholder structure -- frank

parent 063c97f5
...@@ -10,10 +10,7 @@ import pwc.taxtech.atms.common.message.ErrorMessage; ...@@ -10,10 +10,7 @@ import pwc.taxtech.atms.common.message.ErrorMessage;
import pwc.taxtech.atms.dto.OperationResultDto; import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.navtree.NavTreeDto; import pwc.taxtech.atms.dto.navtree.NavTreeDto;
import pwc.taxtech.atms.exception.ApplicationException; import pwc.taxtech.atms.exception.ApplicationException;
import pwc.taxtech.atms.organization.dpo.OrgShareholderTreeDataDto; import pwc.taxtech.atms.organization.dpo.*;
import pwc.taxtech.atms.organization.dpo.OrganizationDirectorDto;
import pwc.taxtech.atms.organization.dpo.OrganizationHKDto;
import pwc.taxtech.atms.organization.dpo.OrganizationShareholderDto;
import pwc.taxtech.atms.organization.entity.OrganizationDirector; import pwc.taxtech.atms.organization.entity.OrganizationDirector;
import pwc.taxtech.atms.organization.entity.OrganizationShareholder; import pwc.taxtech.atms.organization.entity.OrganizationShareholder;
import pwc.taxtech.atms.service.impl.OrganizationHKServiceImpl; import pwc.taxtech.atms.service.impl.OrganizationHKServiceImpl;
...@@ -187,4 +184,16 @@ public class OrganizationHKController { ...@@ -187,4 +184,16 @@ public class OrganizationHKController {
return organizationHKService.getOrgTreeData(orgId); return organizationHKService.getOrgTreeData(orgId);
} }
@RequestMapping(value="getOrgsListInfo",method = RequestMethod.GET)
public @ResponseBody OperationResultDto<List<OrgInfoDto>> getOrgsListInfo(){
logger.info("GET /api/v1/orgHK/getOrgsListInfo");
return organizationHKService.getOrgsListInfo();
}
@RequestMapping(value = "deleteShareholder",method = RequestMethod.DELETE)
public @ResponseBody OperationResultDto deleteShareholder(@RequestParam("id")Long id){
logger.info("GET /api/v1/orgHK/deleteShareholder");
return organizationHKService.deleteShareholder(id);
}
} }
...@@ -97,9 +97,15 @@ public class OrganizationHKServiceImpl { ...@@ -97,9 +97,15 @@ public class OrganizationHKServiceImpl {
public List<OrganizationHKDto> getOrgInfo() { public List<OrganizationHKDto> getOrgInfo() {
List<OrganizationHKDto> organizationHKDtos = new ArrayList<>(); List<OrganizationHKDto> organizationHKDtos = new ArrayList<>();
List<OrganizationHK> organizationHKS = organizationHKMapper.selectByExample(null); OrganizationHKExample organizationHKExample =new OrganizationHKExample();
List<OrganizationShareholder> organizationShareholders = organizationShareholderMapper.selectByExample(null); organizationHKExample.createCriteria().andIsActiveEqualTo(true);
List<OrganizationDirector> organizationDirectors = organizationDirectorMapper.selectByExample(null); List<OrganizationHK> organizationHKS = organizationHKMapper.selectByExample(organizationHKExample);
OrganizationShareholderExample organizationShareholderExample = new OrganizationShareholderExample();
organizationShareholderExample.createCriteria().andIsDeleteEqualTo(false);
List<OrganizationShareholder> organizationShareholders = organizationShareholderMapper.selectByExample(organizationShareholderExample);
OrganizationDirectorExample organizationDirectorExample = new OrganizationDirectorExample();
organizationDirectorExample.createCriteria().andIsDeleteEqualTo(false);
List<OrganizationDirector> organizationDirectors = organizationDirectorMapper.selectByExample(organizationDirectorExample);
List<OrganizationAttachment> organizationAttachments = organizationAttachmentMapper.selectByExample(null); List<OrganizationAttachment> organizationAttachments = organizationAttachmentMapper.selectByExample(null);
organizationHKS.forEach(a -> { organizationHKS.forEach(a -> {
OrganizationHKDto organizationHKDto = organizationHKTMapper.toOrganizationHKDto(a); OrganizationHKDto organizationHKDto = organizationHKTMapper.toOrganizationHKDto(a);
...@@ -504,28 +510,24 @@ public class OrganizationHKServiceImpl { ...@@ -504,28 +510,24 @@ public class OrganizationHKServiceImpl {
public OperationResultDto<Object> updateShareholders(List<OrganizationShareholderDto> organizationShareholderDtos) { public OperationResultDto<Object> updateShareholders(List<OrganizationShareholderDto> organizationShareholderDtos) {
OperationResultDto<Object> resultDto = new OperationResultDto<>(); OperationResultDto<Object> resultDto = new OperationResultDto<>();
organizationShareholderDtos.forEach(a -> { organizationShareholderDtos.forEach(a -> {
OrganizationShareholder organizationShareholder; OrganizationShareholder organizationShareholder = organizationShareholderTMapper.toOrganizationShareholder(a);
try { Date now = new Date();
organizationShareholder = CommonUtils.copyProperties(a, new OrganizationShareholder());
} catch (Exception ex) {
organizationShareholder = new OrganizationShareholder();
organizationShareholder.setEntityId(Long.valueOf(a.getEntityId()));
// organizationShareholder.setClassOfShares(Byte.valueOf(a.getClassOfShares()));
// organizationShareholder.setInvestmentEntityId(Long.valueOf(a.getInvestmentEntityId()));
// organizationShareholder.setCommonPreferred(Boolean.valueOf(a.getCommonPreferred()));
// organizationShareholder.setOwnershipForm(Byte.valueOf(a.getOwnershipForm()));
organizationShareholder.setVotingPercentage(a.getVotingPercentage());
}
if (organizationShareholder.getId() != null) { if (organizationShareholder.getId() != null) {
organizationShareholderMapper.deleteByPrimaryKey(organizationShareholder.getId()); organizationShareholder.setUpdateTime(now);
organizationShareholderMapper.updateByPrimaryKeySelective(organizationShareholder);
} else {
organizationShareholder.setId(distributedIdService.nextId());
organizationShareholder.setUpdateTime(now);
organizationShareholder.setCreateTime(now);
organizationShareholderMapper.insertSelective(organizationShareholder);
} }
organizationShareholder.setId(distributedIdService.nextId());
Date now = new Date();
organizationShareholder.setUpdateTime(now);
organizationShareholder.setCreateTime(now);
organizationShareholderMapper.insertSelective(organizationShareholder);
}); });
OrganizationShareholderExample organizationShareholderExample = new OrganizationShareholderExample();
organizationShareholderExample.createCriteria().andEntityIdEqualTo(Long.valueOf(organizationShareholderDtos.get(0).getEntityId())).andIsDeleteEqualTo(false);
List<OrganizationShareholder> organizationShareholders = organizationShareholderMapper.selectByExample(organizationShareholderExample);
List<OrganizationShareholderDto> organizationShareholderDtoList = organizationShareholders.stream().map(organizationShareholderTMapper::toOrgShareholder).collect(Collectors.toList());
resultDto.setResult(true); resultDto.setResult(true);
resultDto.setData(organizationShareholderDtoList);
return resultDto; return resultDto;
} }
...@@ -657,7 +659,7 @@ public class OrganizationHKServiceImpl { ...@@ -657,7 +659,7 @@ public class OrganizationHKServiceImpl {
orgShareholderTreeDataDto.setId(i); orgShareholderTreeDataDto.setId(i);
orgShareholderTreeDataDto.setName(shareholderDto.getEntityName()); orgShareholderTreeDataDto.setName(shareholderDto.getEntityName());
orgShareholderTreeDataDto.setPercent(shareholderDto.getVotingPercentage()); orgShareholderTreeDataDto.setPercent(shareholderDto.getVotingPercentage());
orgShareholderTreeDataDto.setPid(shareholderDtos.size() + 1); // orgShareholderTreeDataDto.setPid(shareholderDtos.size() + 1);
orgShareholderTreeDataDto.setSpids(Collections.emptyList()); orgShareholderTreeDataDto.setSpids(Collections.emptyList());
orgShareholderTreeDataDtos.add(orgShareholderTreeDataDto); orgShareholderTreeDataDtos.add(orgShareholderTreeDataDto);
if (i > 1) { if (i > 1) {
...@@ -670,7 +672,7 @@ public class OrganizationHKServiceImpl { ...@@ -670,7 +672,7 @@ public class OrganizationHKServiceImpl {
treeDataDto.setId(i); treeDataDto.setId(i);
treeDataDto.setName(organizationHK.getName()); treeDataDto.setName(organizationHK.getName());
treeDataDto.setPercent(""); treeDataDto.setPercent("");
if(i>1) { if (i > 1) {
treeDataDto.setPid(1); treeDataDto.setPid(1);
treeDataDto.setSpids(parentIds); treeDataDto.setSpids(parentIds);
} }
...@@ -692,4 +694,25 @@ public class OrganizationHKServiceImpl { ...@@ -692,4 +694,25 @@ public class OrganizationHKServiceImpl {
resultDto.setData(orgShareholderTreeDataDtos); resultDto.setData(orgShareholderTreeDataDtos);
return resultDto; return resultDto;
} }
public OperationResultDto<List<OrgInfoDto>> getOrgsListInfo() {
OperationResultDto<List<OrgInfoDto>> resultDto = new OperationResultDto<>();
OrganizationHKExample organizationHKExample = new OrganizationHKExample();
organizationHKExample.createCriteria().andIsActiveEqualTo(true);
List<OrganizationHK> organizationHKS = organizationHKMapper.selectByExample(organizationHKExample);
List<OrgInfoDto> orgInfoDtos = organizationHKS.stream().map(organizationHKTMapper::toOrgInfoDto).collect(Collectors.toList());
resultDto.setResult(true);
resultDto.setData(orgInfoDtos);
return resultDto;
}
public OperationResultDto deleteShareholder(Long id) {
OperationResultDto resultDto =new OperationResultDto();
OrganizationShareholder organizationShareholder = organizationShareholderMapper.selectByPrimaryKey(id);
organizationShareholder.setIsDelete(true);
organizationShareholder.setUpdateTime(new Date());
organizationShareholderMapper.updateByPrimaryKeySelective(organizationShareholder);
resultDto.setResult(true);
return resultDto;
}
} }
...@@ -41,24 +41,24 @@ ...@@ -41,24 +41,24 @@
<property name="rootInterface" value="pwc.taxtech.atms.MyMapper"/> <property name="rootInterface" value="pwc.taxtech.atms.MyMapper"/>
</javaClientGenerator> </javaClientGenerator>
<table tableName="organization" domainObjectName="OrganizationHK"> <!--<table tableName="organization" domainObjectName="OrganizationHK">-->
<property name="useActualColumnNames" value="false"/> <!--<property name="useActualColumnNames" value="false"/>-->
<property name="ignoreQualifiersAtRuntime" value="true"/> <!--<property name="ignoreQualifiersAtRuntime" value="true"/>-->
</table> <!--</table>-->
<table tableName="organization_attachment" domainObjectName="OrganizationAttachment"> <!--<table tableName="organization_attachment" domainObjectName="OrganizationAttachment">-->
<property name="useActualColumnNames" value="false"/> <!--<property name="useActualColumnNames" value="false"/>-->
<property name="ignoreQualifiersAtRuntime" value="true"/> <!--<property name="ignoreQualifiersAtRuntime" value="true"/>-->
</table> <!--</table>-->
<table tableName="organization_shareholder" domainObjectName="OrganizationShareholder"> <table tableName="organization_shareholder" domainObjectName="OrganizationShareholder">
<property name="useActualColumnNames" value="false"/> <property name="useActualColumnNames" value="false"/>
<property name="ignoreQualifiersAtRuntime" value="true"/> <property name="ignoreQualifiersAtRuntime" value="true"/>
</table> </table>
<table tableName="organization_director" domainObjectName="OrganizationDirector"> <!--<table tableName="organization_director" domainObjectName="OrganizationDirector">-->
<property name="useActualColumnNames" value="false"/> <!--<property name="useActualColumnNames" value="false"/>-->
<property name="ignoreQualifiersAtRuntime" value="true"/> <!--<property name="ignoreQualifiersAtRuntime" value="true"/>-->
</table> <!--</table>-->
</context> </context>
</generatorConfiguration> </generatorConfiguration>
\ No newline at end of file
...@@ -11,9 +11,9 @@ import java.util.List; ...@@ -11,9 +11,9 @@ import java.util.List;
@Mapper @Mapper
public interface OrganizationShareholderExtMapper extends MyMapper { public interface OrganizationShareholderExtMapper extends MyMapper {
@Select("select a.id, a.investment_entity_id as entityId,b.name,a.voting_percentage as votingPercentage from organization_shareholder a left join organization b on a.investment_entity_id=b.id where entity_id=#{id}") @Select("select a.id, a.investment_entity_id as entityId,b.name as entityName,a.voting_percentage as votingPercentage from organization_shareholder a left join organization b on a.investment_entity_id=b.id where entity_id=#{id} and a.is_delete=0")
List<ShareholderDto> selectShareholder(Long entityId); List<ShareholderDto> selectShareholder(Long entityId);
@Select("select a.id, a.entity_id as entityId,b.name,a.voting_percentage as votingPercentage from organization_shareholder a left join organization b on a.entity_id=b.id where investment_entity_id=#{id}") @Select("select a.id, a.entity_id as entityId,b.name as entityName,a.voting_percentage as votingPercentage from organization_shareholder a left join organization b on a.entity_id=b.id where investment_entity_id=#{id} and a.is_delete=0")
List<SubsidaryDto> selectSubsidary(Long entityId); List<SubsidaryDto> selectSubsidary(Long entityId);
} }
package pwc.taxtech.atms.organization.dpo;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class OrgInfoDto {
String id;
String name;
}
...@@ -13,8 +13,8 @@ public class OrganizationShareholderDto { ...@@ -13,8 +13,8 @@ public class OrganizationShareholderDto {
String id; String id;
String entityId; String entityId;
String investmentEntityId; String investmentEntityId;
String ownershipForm; Integer ownershipForm;
String commonPreferred; Integer commonPreferred;
String classOfShares; Integer classOfShares;
String votingPercentage; String votingPercentage;
} }
package pwc.taxtech.atms.organization.entity; package pwc.taxtech.atms.organization.entity;
import pwc.taxtech.atms.entity.BaseEntity;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import pwc.taxtech.atms.entity.BaseEntity;
/** /**
* *
...@@ -55,7 +56,7 @@ public class OrganizationShareholder extends BaseEntity implements Serializable ...@@ -55,7 +56,7 @@ public class OrganizationShareholder extends BaseEntity implements Serializable
* *
* @mbg.generated * @mbg.generated
*/ */
private Boolean commonPreferred; private Byte commonPreferred;
/** /**
* *
...@@ -218,7 +219,7 @@ public class OrganizationShareholder extends BaseEntity implements Serializable ...@@ -218,7 +219,7 @@ public class OrganizationShareholder extends BaseEntity implements Serializable
* *
* @mbg.generated * @mbg.generated
*/ */
public Boolean getCommonPreferred() { public Byte getCommonPreferred() {
return commonPreferred; return commonPreferred;
} }
...@@ -230,7 +231,7 @@ public class OrganizationShareholder extends BaseEntity implements Serializable ...@@ -230,7 +231,7 @@ public class OrganizationShareholder extends BaseEntity implements Serializable
* *
* @mbg.generated * @mbg.generated
*/ */
public void setCommonPreferred(Boolean commonPreferred) { public void setCommonPreferred(Byte commonPreferred) {
this.commonPreferred = commonPreferred; this.commonPreferred = commonPreferred;
} }
......
...@@ -445,52 +445,52 @@ public class OrganizationShareholderExample { ...@@ -445,52 +445,52 @@ public class OrganizationShareholderExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCommonPreferredEqualTo(Boolean value) { public Criteria andCommonPreferredEqualTo(Byte value) {
addCriterion("common_preferred =", value, "commonPreferred"); addCriterion("common_preferred =", value, "commonPreferred");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCommonPreferredNotEqualTo(Boolean value) { public Criteria andCommonPreferredNotEqualTo(Byte value) {
addCriterion("common_preferred <>", value, "commonPreferred"); addCriterion("common_preferred <>", value, "commonPreferred");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCommonPreferredGreaterThan(Boolean value) { public Criteria andCommonPreferredGreaterThan(Byte value) {
addCriterion("common_preferred >", value, "commonPreferred"); addCriterion("common_preferred >", value, "commonPreferred");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCommonPreferredGreaterThanOrEqualTo(Boolean value) { public Criteria andCommonPreferredGreaterThanOrEqualTo(Byte value) {
addCriterion("common_preferred >=", value, "commonPreferred"); addCriterion("common_preferred >=", value, "commonPreferred");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCommonPreferredLessThan(Boolean value) { public Criteria andCommonPreferredLessThan(Byte value) {
addCriterion("common_preferred <", value, "commonPreferred"); addCriterion("common_preferred <", value, "commonPreferred");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCommonPreferredLessThanOrEqualTo(Boolean value) { public Criteria andCommonPreferredLessThanOrEqualTo(Byte value) {
addCriterion("common_preferred <=", value, "commonPreferred"); addCriterion("common_preferred <=", value, "commonPreferred");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCommonPreferredIn(List<Boolean> values) { public Criteria andCommonPreferredIn(List<Byte> values) {
addCriterion("common_preferred in", values, "commonPreferred"); addCriterion("common_preferred in", values, "commonPreferred");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCommonPreferredNotIn(List<Boolean> values) { public Criteria andCommonPreferredNotIn(List<Byte> values) {
addCriterion("common_preferred not in", values, "commonPreferred"); addCriterion("common_preferred not in", values, "commonPreferred");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCommonPreferredBetween(Boolean value1, Boolean value2) { public Criteria andCommonPreferredBetween(Byte value1, Byte value2) {
addCriterion("common_preferred between", value1, value2, "commonPreferred"); addCriterion("common_preferred between", value1, value2, "commonPreferred");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCommonPreferredNotBetween(Boolean value1, Boolean value2) { public Criteria andCommonPreferredNotBetween(Byte value1, Byte value2) {
addCriterion("common_preferred not between", value1, value2, "commonPreferred"); addCriterion("common_preferred not between", value1, value2, "commonPreferred");
return (Criteria) this; return (Criteria) this;
} }
......
...@@ -3,6 +3,7 @@ package pwc.taxtech.atms.organization.mapper; ...@@ -3,6 +3,7 @@ package pwc.taxtech.atms.organization.mapper;
import org.mapstruct.Mapper; import org.mapstruct.Mapper;
import org.mapstruct.Mapping; import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers; import org.mapstruct.factory.Mappers;
import pwc.taxtech.atms.organization.dpo.OrgInfoDto;
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.organization.entity.OrganizationHK;
...@@ -14,4 +15,6 @@ public interface OrganizationHKTMapper { ...@@ -14,4 +15,6 @@ public interface OrganizationHKTMapper {
@Mapping(source = "updateTime", target = "updateTime" ,dateFormat = "yyyy/MM/dd") @Mapping(source = "updateTime", target = "updateTime" ,dateFormat = "yyyy/MM/dd")
@Mapping(source = "dateOfIncorporation", target = "dateOfIncorporation" ,dateFormat = "yyyy/MM/dd") @Mapping(source = "dateOfIncorporation", target = "dateOfIncorporation" ,dateFormat = "yyyy/MM/dd")
OrganizationHKDto toOrganizationHKDto(OrganizationHK organizationHK); OrganizationHKDto toOrganizationHKDto(OrganizationHK organizationHK);
OrgInfoDto toOrgInfoDto(OrganizationHK organizationHK);
} }
...@@ -18,4 +18,6 @@ public interface OrganizationShareholderTMapper { ...@@ -18,4 +18,6 @@ public interface OrganizationShareholderTMapper {
@Mapping(source = "votingPercentage", target = "percentage") @Mapping(source = "votingPercentage", target = "percentage")
OrgSubsidaryDto toOrgSubsidaryDto(SubsidaryDto subsidaryDto); OrgSubsidaryDto toOrgSubsidaryDto(SubsidaryDto subsidaryDto);
OrganizationShareholder toOrganizationShareholder(OrganizationShareholderDto organizationShareholderDto);
} }
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<result column="entity_id" jdbcType="BIGINT" property="entityId" /> <result column="entity_id" jdbcType="BIGINT" property="entityId" />
<result column="investment_entity_id" jdbcType="BIGINT" property="investmentEntityId" /> <result column="investment_entity_id" jdbcType="BIGINT" property="investmentEntityId" />
<result column="ownership_form" jdbcType="TINYINT" property="ownershipForm" /> <result column="ownership_form" jdbcType="TINYINT" property="ownershipForm" />
<result column="common_preferred" jdbcType="BIT" property="commonPreferred" /> <result column="common_preferred" jdbcType="TINYINT" property="commonPreferred" />
<result column="class_of_shares" jdbcType="TINYINT" property="classOfShares" /> <result column="class_of_shares" jdbcType="TINYINT" property="classOfShares" />
<result column="voting_percentage" jdbcType="VARCHAR" property="votingPercentage" /> <result column="voting_percentage" jdbcType="VARCHAR" property="votingPercentage" />
<result column="is_delete" jdbcType="BIT" property="isDelete" /> <result column="is_delete" jdbcType="BIT" property="isDelete" />
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
voting_percentage, is_delete, create_time, voting_percentage, is_delete, create_time,
update_time) update_time)
values (#{id,jdbcType=BIGINT}, #{entityId,jdbcType=BIGINT}, #{investmentEntityId,jdbcType=BIGINT}, values (#{id,jdbcType=BIGINT}, #{entityId,jdbcType=BIGINT}, #{investmentEntityId,jdbcType=BIGINT},
#{ownershipForm,jdbcType=TINYINT}, #{commonPreferred,jdbcType=BIT}, #{classOfShares,jdbcType=TINYINT}, #{ownershipForm,jdbcType=TINYINT}, #{commonPreferred,jdbcType=TINYINT}, #{classOfShares,jdbcType=TINYINT},
#{votingPercentage,jdbcType=VARCHAR}, #{isDelete,jdbcType=BIT}, #{createTime,jdbcType=TIMESTAMP}, #{votingPercentage,jdbcType=VARCHAR}, #{isDelete,jdbcType=BIT}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}) #{updateTime,jdbcType=TIMESTAMP})
</insert> </insert>
...@@ -203,7 +203,7 @@ ...@@ -203,7 +203,7 @@
#{ownershipForm,jdbcType=TINYINT}, #{ownershipForm,jdbcType=TINYINT},
</if> </if>
<if test="commonPreferred != null"> <if test="commonPreferred != null">
#{commonPreferred,jdbcType=BIT}, #{commonPreferred,jdbcType=TINYINT},
</if> </if>
<if test="classOfShares != null"> <if test="classOfShares != null">
#{classOfShares,jdbcType=TINYINT}, #{classOfShares,jdbcType=TINYINT},
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
ownership_form = #{record.ownershipForm,jdbcType=TINYINT}, ownership_form = #{record.ownershipForm,jdbcType=TINYINT},
</if> </if>
<if test="record.commonPreferred != null"> <if test="record.commonPreferred != null">
common_preferred = #{record.commonPreferred,jdbcType=BIT}, common_preferred = #{record.commonPreferred,jdbcType=TINYINT},
</if> </if>
<if test="record.classOfShares != null"> <if test="record.classOfShares != null">
class_of_shares = #{record.classOfShares,jdbcType=TINYINT}, class_of_shares = #{record.classOfShares,jdbcType=TINYINT},
...@@ -284,7 +284,7 @@ ...@@ -284,7 +284,7 @@
entity_id = #{record.entityId,jdbcType=BIGINT}, entity_id = #{record.entityId,jdbcType=BIGINT},
investment_entity_id = #{record.investmentEntityId,jdbcType=BIGINT}, investment_entity_id = #{record.investmentEntityId,jdbcType=BIGINT},
ownership_form = #{record.ownershipForm,jdbcType=TINYINT}, ownership_form = #{record.ownershipForm,jdbcType=TINYINT},
common_preferred = #{record.commonPreferred,jdbcType=BIT}, common_preferred = #{record.commonPreferred,jdbcType=TINYINT},
class_of_shares = #{record.classOfShares,jdbcType=TINYINT}, class_of_shares = #{record.classOfShares,jdbcType=TINYINT},
voting_percentage = #{record.votingPercentage,jdbcType=VARCHAR}, voting_percentage = #{record.votingPercentage,jdbcType=VARCHAR},
is_delete = #{record.isDelete,jdbcType=BIT}, is_delete = #{record.isDelete,jdbcType=BIT},
...@@ -311,7 +311,7 @@ ...@@ -311,7 +311,7 @@
ownership_form = #{ownershipForm,jdbcType=TINYINT}, ownership_form = #{ownershipForm,jdbcType=TINYINT},
</if> </if>
<if test="commonPreferred != null"> <if test="commonPreferred != null">
common_preferred = #{commonPreferred,jdbcType=BIT}, common_preferred = #{commonPreferred,jdbcType=TINYINT},
</if> </if>
<if test="classOfShares != null"> <if test="classOfShares != null">
class_of_shares = #{classOfShares,jdbcType=TINYINT}, class_of_shares = #{classOfShares,jdbcType=TINYINT},
...@@ -340,7 +340,7 @@ ...@@ -340,7 +340,7 @@
set entity_id = #{entityId,jdbcType=BIGINT}, set entity_id = #{entityId,jdbcType=BIGINT},
investment_entity_id = #{investmentEntityId,jdbcType=BIGINT}, investment_entity_id = #{investmentEntityId,jdbcType=BIGINT},
ownership_form = #{ownershipForm,jdbcType=TINYINT}, ownership_form = #{ownershipForm,jdbcType=TINYINT},
common_preferred = #{commonPreferred,jdbcType=BIT}, common_preferred = #{commonPreferred,jdbcType=TINYINT},
class_of_shares = #{classOfShares,jdbcType=TINYINT}, class_of_shares = #{classOfShares,jdbcType=TINYINT},
voting_percentage = #{votingPercentage,jdbcType=VARCHAR}, voting_percentage = #{votingPercentage,jdbcType=VARCHAR},
is_delete = #{isDelete,jdbcType=BIT}, is_delete = #{isDelete,jdbcType=BIT},
......
...@@ -641,6 +641,7 @@ ...@@ -641,6 +641,7 @@
$scope.showOrgs = false; $scope.showOrgs = false;
console.log(org); console.log(org);
$scope.selectCompany = org; $scope.selectCompany = org;
$scope.selectedOrgID = org.id;
$scope.shareholderDatasource = org.shareholders; $scope.shareholderDatasource = org.shareholders;
$scope.directorDatasource = org.directors; $scope.directorDatasource = org.directors;
$scope.attachmentDatasource = org.attachments; $scope.attachmentDatasource = org.attachments;
...@@ -819,9 +820,9 @@ ...@@ -819,9 +820,9 @@
caption: $translate.instant('operation'), caption: $translate.instant('operation'),
cellTemplate: function (container, options) { cellTemplate: function (container, options) {
try { try {
$('<button type="button" class="btn btn-in-grid" style="margin-top: -11px;" onclick = "editDirector2(\'' + options.data.id + '\')"><i class="material-icons middle" style="vertical-align: text-bottom">modify</i>edit</button>&nbsp;&nbsp;') $('<button type="button" class="btn btn-in-grid" style="margin-top: 0px;" onclick = "editDirector2(\'' + options.data.id + '\')"><i class="material-icons middle" style="vertical-align: text-bottom">edit</i>edit</button>&nbsp;&nbsp;')
.appendTo(container); .appendTo(container);
$('<button type="button" class="btn btn-in-grid" style="margin-top: -11px;" onclick = "deleteDirector2(\'' + options.data.id + '\')"><i class="material-icons middle" style="vertical-align: text-bottom">delete</i>delete</button>&nbsp;&nbsp;') $('<button type="button" class="btn btn-in-grid" style="margin-top: 0px;" onclick = "deleteDirector2(\'' + options.data.id + '\')"><i class="material-icons middle" style="vertical-align: text-bottom">delete</i>delete</button>&nbsp;&nbsp;')
.appendTo(container); .appendTo(container);
} catch (e) { } catch (e) {
$log.error(e); $log.error(e);
...@@ -865,6 +866,12 @@ ...@@ -865,6 +866,12 @@
} }
}; };
orgHKService.getOrgsListInfo().success(function (res) {
if (res && res.result) {
$scope.investmentEntityList = res.data;
}
});
$scope.equityGridOptions = { $scope.equityGridOptions = {
bindingOptions: { bindingOptions: {
dataSource: 'shareholderDatasource' dataSource: 'shareholderDatasource'
...@@ -882,49 +889,77 @@ ...@@ -882,49 +889,77 @@
keyExpr: "id", keyExpr: "id",
columns: [ columns: [
{ {
dataField: "investmentEntity", dataField: "investmentEntityId",
allowHeaderFiltering: false, allowHeaderFiltering: false,
caption: $translate.instant('investmentEntity'), caption: $translate.instant('investmentEntity'),
calculateDisplayValue: function (data) { calculateDisplayValue: function (data) {
// var importType1 = _.find(constant.importTypeList, function (item) { var importType1 = _.find($scope.investmentEntityList, function (item) {
// return item.value == data.importType; return item.id === data.investmentEntityId;
// }); });
// if (importType1) { if (importType1) {
// return importType1.name; return importType1.name;
// } else { } else {
// return '未知'; return '未知';
// } }
} }
}, },
{ {
dataField: "ownershipForm", dataField: "ownershipForm",
allowHeaderFiltering: false, allowHeaderFiltering: false,
caption: $translate.instant('ownershipForm'), caption: $translate.instant('ownershipForm'),
calculateDisplayValue: function (data) {
var importType1 = _.find(constant.organizationHK.OwnershipForm, function (item) {
return item.id === data.ownershipForm;
});
if (importType1) {
return importType1.name;
} else {
return '未知';
}
}
}, },
{ {
dataField: "commonOrPreferred", dataField: "commonPreferred",
allowHeaderFiltering: false, allowHeaderFiltering: false,
caption: $translate.instant('commonOrPreferred'), caption: $translate.instant('commonOrPreferred'),
calculateDisplayValue: function (data) { calculateDisplayValue: function (data) {
// var importType1 = _.find(constant.importTypeList, function (item) { var importType1 = _.find(constant.organizationHK.commonOrPreferredType, function (item) {
// return item.value == data.importType; return item.id === data.commonPreferred;
// }); });
// if (importType1) { if (importType1) {
// return importType1.name; return importType1.name;
// } else { } else {
// return '未知'; return '未知';
// } }
} }
}, },
{ {
dataField: "classOfShares", dataField: "classOfShares",
allowHeaderFiltering: false, allowHeaderFiltering: false,
caption: $translate.instant('classOfShares'), caption: $translate.instant('classOfShares'),
calculateDisplayValue: function (data) {
var importType1 = _.find(constant.organizationHK.classOfSharesType, function (item) {
return item.id === data.classOfShares;
});
if (importType1) {
return importType1.name;
} else {
return '未知';
}
}
}, },
{ {
dataField: "votingPercentage", dataField: "votingPercentage",
allowHeaderFiltering: false, allowHeaderFiltering: false,
caption: $translate.instant('votingPercentage'), caption: $translate.instant('votingPercentage'),
calculateDisplayValue: function (data) {
if (data.votingPercentage) {
return data.votingPercentage + "%";
}
else {
return "0%";
}
}
}, },
{ {
dataField: "id", dataField: "id",
...@@ -932,9 +967,9 @@ ...@@ -932,9 +967,9 @@
caption: $translate.instant('operation'), caption: $translate.instant('operation'),
cellTemplate: function (container, options) { cellTemplate: function (container, options) {
try { try {
$('<button type="button" class="btn btn-in-grid" style="margin-top: -11px;" onclick = "editShareholder2(\'' + options.data.id + '\')"><i class="material-icons middle" style="vertical-align: text-bottom">modify</i>edit</button>&nbsp;&nbsp;') $('<button type="button" class="btn btn-in-grid" style="margin-top: 0px;" onclick = "editShareholder2(\'' + options.data.id + '\')"><i class="material-icons middle" style="vertical-align: text-bottom">edit</i>edit</button>&nbsp;&nbsp;&nbsp;&nbsp;')
.appendTo(container); .appendTo(container);
$('<button type="button" class="btn btn-in-grid" style="margin-top: -11px;" onclick = "deleteShareholder2(\'' + options.data.id + '\')"><i class="material-icons middle" style="vertical-align: text-bottom">delete</i>delete</button>&nbsp;&nbsp;') $('<button type="button" class="btn btn-in-grid" style="margin-top: 0px;" onclick = "deleteShareholder2(\'' + options.data.id + '\')"><i class="material-icons middle" style="vertical-align: text-bottom">delete</i>delete</button>&nbsp;&nbsp;')
.appendTo(container); .appendTo(container);
} catch (e) { } catch (e) {
$log.error(e); $log.error(e);
...@@ -983,38 +1018,48 @@ ...@@ -983,38 +1018,48 @@
}; };
$scope.saveShareholder2 = function (shareholderEntity) { $scope.saveShareholder2 = function (shareholderEntity) {
var shareholder = _.filter($scope.shareholderDatasource, function (item) { //todo: validate the value for saving
return item.id === shareholderEntity.id; var findResult = _.find($scope.shareholderDatasource, function (item) {
return item.investmentEntityId === shareholderEntity.investmentEntityId;
}); });
if (shareholder && shareholder.length > 0) { if (findResult || shareholderEntity.investmentEntityId === $scope.selectCompany.id) {
$scope.shareholderDatasource = _.without($scope.shareholderDatasource, shareholder[0]); return "duplicated shareholder added, please change to another one.";
} else {
shareholderEntity.entityId = $scope.selectCompany.id;
var shareholders = [];
shareholders.concat($scope.shareholderDatasource);
shareholders.push(shareholderEntity);
// $scope.shareholderDatasource.push(shareholderEntity);
orgHKService.updateShareholders(shareholders).success(function (res) {
if (res && res.result) {
$scope.shareholderDatasource = res.data;
}
});
} }
$scope.shareholderDatasource.push(shareholderEntity);
orgHKService.updateShareholders($scope.shareholderDatasource);
}; };
window.editShareholder2 = function (id) { window.editShareholder2 = function (id) {
console.log("editShareholder " + id); console.log("editShareholder " + id);
var shareholder = _.filter($scope.shareholderDatasource, function (item) { var shareholder = _.find($scope.shareholderDatasource, function (item) {
return item.id === id; return item.id !== null && item.id.toString() === id;
}); });
if (shareholder && shareholder.length > 0) { if (shareholder) {
$scope.gModel.editShareholderModel = shareholder[0]; $scope.gModel.editShareholderModel = shareholder;
$scope.isShowShareholderModal2 = true; $scope.isShowShareholderModal2 = true;
} }
}; };
window.deleteShareholder2 = function (id) { window.deleteShareholder2 = function (id) {
console.log("deleteShareholder " + id); console.log("deleteShareholder " + id);
var shareholder = _.filter($scope.shareholderDatasource, function (item) { var shareholder = _.find($scope.shareholderDatasource, function (item) {
return item.id === id; return item.id === id;
}); });
if (shareholder && shareholder.length > 0) { if (shareholder) {
$scope.shareholderDatasource = _.without($scope.shareholderDatasource, shareholder[0]); $scope.shareholderDatasource = _.without($scope.shareholderDatasource, shareholder);
} }
orgHKService.deleteShareholder(id);
}; };
$scope.closeDirector2 = function () { $scope.closeDirector2 = function () {
...@@ -1022,12 +1067,12 @@ ...@@ -1022,12 +1067,12 @@
}; };
$scope.saveDirector2 = function (directorEntity) { $scope.saveDirector2 = function (directorEntity) {
var director = _.filter($scope.directorDatasource, function (item) { var director = _.find($scope.directorDatasource, function (item) {
return item.id === directorEntity.id; return item.id === directorEntity.id;
}); });
if (director && director.length > 0) { if (director) {
$scope.directorDatasource = _.without($scope.directorDatasource, director[0]); $scope.directorDatasource = _.without($scope.directorDatasource, director);
} }
$scope.directorDatasource.push(directorEntity); $scope.directorDatasource.push(directorEntity);
orgHKService.updateDirectors($scope.directorDatasource); orgHKService.updateDirectors($scope.directorDatasource);
...@@ -1035,23 +1080,23 @@ ...@@ -1035,23 +1080,23 @@
window.editDirector2 = function (id) { window.editDirector2 = function (id) {
console.log("editDirector " + id); console.log("editDirector " + id);
var director = _.filter($scope.directorDatasource, function (item) { var director = _.find($scope.directorDatasource, function (item) {
return item.id === id; return item.id === id;
}); });
if (director && director.length > 0) { if (director) {
$scope.gModel.editDirectorModel = director[0]; $scope.gModel.editDirectorModel = director;
$scope.isShowDirectorModal2 = true; $scope.isShowDirectorModal2 = true;
} }
}; };
window.deleteDirector2 = function (id) { window.deleteDirector2 = function (id) {
console.log("deleteDirector " + id); console.log("deleteDirector " + id);
var director = _.filter($scope.directorDatasource, function (item) { var director = _.find($scope.directorDatasource, function (item) {
return item.id === id; return item.id === id;
}); });
if (director && director.length > 0) { if (director > 0) {
$scope.directorDatasource = _.without($scope.directorDatasource, director[0]); $scope.directorDatasource = _.without($scope.directorDatasource, director);
} }
}; };
...@@ -1083,9 +1128,9 @@ ...@@ -1083,9 +1128,9 @@
caption: $translate.instant('operation'), caption: $translate.instant('operation'),
cellTemplate: function (container, options) { cellTemplate: function (container, options) {
try { try {
$('<button type="button" class="btn btn-in-grid" style="margin-top: -11px;" onclick = "downloadDocument(\'' + options.data.id + '\')"><i class="material-icons middle" style="vertical-align: text-bottom">edit</i>download</button>&nbsp;&nbsp;') $('<button type="button" class="btn btn-in-grid" style="margin-top: 0px;" onclick = "downloadDocument(\'' + options.data.id + '\')"><i class="material-icons middle" style="vertical-align: text-bottom">edit</i>download</button>&nbsp;&nbsp;')
.appendTo(container); .appendTo(container);
$('<button type="button" class="btn btn-in-grid" style="margin-top: -11px;" onclick = "deleteDocument(\'' + options.data.id + '\')"><i class="material-icons middle" style="vertical-align: text-bottom">delete</i>delete</button>&nbsp;&nbsp;') $('<button type="button" class="btn btn-in-grid" style="margin-top: 0px;" onclick = "deleteDocument(\'' + options.data.id + '\')"><i class="material-icons middle" style="vertical-align: text-bottom">delete</i>delete</button>&nbsp;&nbsp;')
.appendTo(container); .appendTo(container);
} catch (e) { } catch (e) {
$log.error(e); $log.error(e);
...@@ -1457,7 +1502,7 @@ ...@@ -1457,7 +1502,7 @@
initialized = true; initialized = true;
} }
if (middleNode.id > 0) { if (middleNode && middleNode.id > 0) {
var middleNodeSelector = "svg>g[node-id=" + middleNode.id + "]>rect"; var middleNodeSelector = "svg>g[node-id=" + middleNode.id + "]>rect";
var polygon = makeSVG('polygon', {"points": '100,0 0,100 200,100', style: "fill:#ffff;stroke:#000;stroke-width:1", height: 115, width: 250}); var polygon = makeSVG('polygon', {"points": '100,0 0,100 200,100', style: "fill:#ffff;stroke:#000;stroke-width:1", height: 115, width: 250});
$(middleNodeSelector).css("fill", "transparent").css("stroke-width", 0).after(polygon); $(middleNodeSelector).css("fill", "transparent").css("stroke-width", 0).after(polygon);
...@@ -1473,18 +1518,20 @@ ...@@ -1473,18 +1518,20 @@
// $("svg>g[node-id=5]").attr("transform","matrix(1, 0, 0, 1, 360, 0)"); // $("svg>g[node-id=5]").attr("transform","matrix(1, 0, 0, 1, 360, 0)");
// $("svg>g[node-id=6]").attr("transform","matrix(1, 0, 0, 1, 590, 0)"); // $("svg>g[node-id=6]").attr("transform","matrix(1, 0, 0, 1, 590, 0)");
if (middleNode.id > 2) { if (middleNode && middleNode.id > 2) {
var count = 0; var count = 0;
for (var i = middleNode.id; i > 1; i--) { for (var i = middleNode.id-1; i > 1; i--) {
var nodeSelector = "svg>g[second-link-id=[" + middleNode.id + "][" + i + "]"; var nodeSelector = "svg>g[second-link-id='[" + middleNode.id + "][" + i + "]']>path";
var value = 440 + 220 * count; var value = 320 + 220 * count;
$(nodeSelector).attr("d", "M210,180 L210,160 L" + value + ",160 L" + value + ",102"); $(nodeSelector).attr("d", "M100,180 L100,160 L" + value + ",160 L" + value + ",102");
count++; count++;
} }
} }
// $("svg>g[second-link-id='[4][2]']>path").attr("d", "M210,180 L210,160 L440,160 L440,102"); // $("svg>g[second-link-id='[4][2]']>path").attr("d", "M210,180 L210,160 L440,160 L440,102");
// $("svg>g[second-link-id='[4][3]']>path").attr("d", "M210,180 L210,160 L660,160 L660,102"); // $("svg>g[second-link-id='[4][3]']>path").attr("d", "M210,180 L210,160 L660,160 L660,102");
// d: path(" M240 180 L240 160 L680 160 L680 120"); // d: path(" M240 180 L240 160 L680 160 L680 120");
// M100,180 L100,160 L320,160 L320,102
// M100,180 L100,160 L540,160 L540,102
}; };
var makeSVG = function (tag, attrs) { var makeSVG = function (tag, attrs) {
...@@ -1524,7 +1571,7 @@ ...@@ -1524,7 +1571,7 @@
} }
} else { } else {
middleNode = _.find(res.data, function (node) { middleNode = _.find(res.data, function (node) {
return node.spids.length > 0; return node.spids && node.spids.length > 0;
}); });
} }
initOrgTree(res.data); initOrgTree(res.data);
......
commonModule.controller('editOrganizationShareholderModalController', ['$scope', '$log', 'ackUibModal', '$translate', function ($scope, $log, ackUibModal, $translate) { commonModule.controller('editOrganizationShareholderModalController', ['$scope', '$log', 'ackUibModal', '$translate', 'orgHKService', 'SweetAlert', function ($scope, $log, ackUibModal, $translate, orgHKService, SweetAlert) {
'use strict'; 'use strict';
//模态框管理 //模态框管理
$scope.modalManage = { $scope.modalManage = {
...@@ -15,43 +15,39 @@ commonModule.controller('editOrganizationShareholderModalController', ['$scope', ...@@ -15,43 +15,39 @@ commonModule.controller('editOrganizationShareholderModalController', ['$scope',
}, },
close: function () { close: function () {
$scope.onClose(); $scope.onClose();
$scope.editModelS = {};
$scope.modalInstance.close(); $scope.modalInstance.close();
}, },
cancel: function () { cancel: function () {
$scope.onClose(); $scope.onClose();
$scope.editModelS = {};
$scope.modalInstance.cancel(); $scope.modalInstance.cancel();
}, },
save: function () { save: function () {
var dxResult = DevExpress.validationEngine.validateGroup($('#shareholderControlForm').dxValidationGroup("instance")).isValid; var dxResult = DevExpress.validationEngine.validateGroup($('#shareholderControlForm').dxValidationGroup("instance")).isValid;
if (dxResult) { if (dxResult) {
if (!$scope.editModelS.id) { if (!$scope.editModelS.id && $scope.parentPage !== ".system-manage") {
$scope.editModelS.id = PWC.newGuid(); $scope.editModelS.id = PWC.newGuid();
} }
$scope.onSave({shareholderEntity: $scope.editModelS}); var result = $scope.onSave({shareholderEntity: $scope.editModelS});
$scope.editModelS = {}; if (result) {
$scope.modalManage.shareholderModal.close(); SweetAlert.warning(result);
}
else {
$scope.editModelS = {};
$scope.modalManage.shareholderModal.close();
}
} }
} }
} }
}; };
var initParams = function () { var initParams = function () {
$scope.ownershipFormTypeList = constant.organizationHK.OwnershipForm;
$scope.commonOrPreferredTypeList = ['Commmon', 'Preferred'];
$scope.classOfSharesTypeList = ['A', 'B'];
$scope.dropdownDatasource = {
investmentEntityTypeList: [],
ownershipFormTypeList: constant.organizationHK.OwnershipForm,
commonOrPreferredTypeList: [{id: 1, name: 'Commmon'}, {id: 2, name: 'Preferred'}],
classOfSharesTypeList: [{id: 1, name: 'A'}, {id: 2, name: 'B'}]
};
$scope.textboxOption = { $scope.textboxOption = {
investmentEntityOption: { investmentEntityOption: {
bindingOptions: { bindingOptions: {
dataSource: 'dropdownDatasource.ownershipFormTypeList', dataSource: 'dropdownDatasource.investmentEntityList',
value: 'editModelS.investmentEntity' value: 'editModelS.investmentEntityId'
}, },
onSelectionChanged: function (args) { onSelectionChanged: function (args) {
// $scope.editModelS.investmentEntity = args.selectedItem.id; // $scope.editModelS.investmentEntity = args.selectedItem.id;
...@@ -83,7 +79,7 @@ commonModule.controller('editOrganizationShareholderModalController', ['$scope', ...@@ -83,7 +79,7 @@ commonModule.controller('editOrganizationShareholderModalController', ['$scope',
commonOrPreferredOption: { commonOrPreferredOption: {
bindingOptions: { bindingOptions: {
dataSource: 'dropdownDatasource.commonOrPreferredTypeList', dataSource: 'dropdownDatasource.commonOrPreferredTypeList',
value: 'editModelS.commonOrPreferred' value: 'editModelS.commonPreferred'
}, },
onSelectionChanged: function (args) { onSelectionChanged: function (args) {
// $scope.editModelS.commonOrPreferred = args.selectedItem.id; // $scope.editModelS.commonOrPreferred = args.selectedItem.id;
...@@ -191,7 +187,20 @@ commonModule.controller('editOrganizationShareholderModalController', ['$scope', ...@@ -191,7 +187,20 @@ commonModule.controller('editOrganizationShareholderModalController', ['$scope',
(function initialize() { (function initialize() {
$log.debug('editOrganizationShareholderModalController.ctor()...'); $log.debug('editOrganizationShareholderModalController.ctor()...');
$scope.editModelS = {}; $scope.editModelS = {};
initParams();
//todo:get the entity list id and name @ here
$scope.dropdownDatasource = {
// investmentEntityTypeList: [],
ownershipFormTypeList: constant.organizationHK.OwnershipForm,
commonOrPreferredTypeList: [{id: "1", name: 'Commmon'}, {id: "2", name: 'Preferred'}],
classOfSharesTypeList: [{id: "1", name: 'A'}, {id: "2", name: 'B'}]
};
orgHKService.getOrgsListInfo().success(function (res) {
if (res && res.result) {
$scope.dropdownDatasource.investmentEntityList = res.data;
}
initParams();
});
init(); init();
thisModuleService.initWatches(); thisModuleService.initWatches();
thisModuleService.initEvents(); thisModuleService.initEvents();
......
...@@ -1721,6 +1721,14 @@ constant.organizationHK = { ...@@ -1721,6 +1721,14 @@ constant.organizationHK = {
executiveType: [ executiveType: [
{id: 1, name: "Y"}, {id: 1, name: "Y"},
{id: 2, name: "N"} {id: 2, name: "N"}
],
commonOrPreferredType: [
{id: 1, name: "Commmon"},
{id: 2, name: "Preferred"}
],
classOfSharesType: [
{id: 1, name: "A"},
{id: 2, name: "B"}
] ]
}; };
......
...@@ -61,6 +61,12 @@ webservices.factory('orgHKService', ['$http', 'apiConfig', function ($http, apiC ...@@ -61,6 +61,12 @@ webservices.factory('orgHKService', ['$http', 'apiConfig', function ($http, apiC
}, },
getOrgList: function (type) { getOrgList: function (type) {
return $http.get('/org/display?useType=' + type, apiConfig.create()); return $http.get('/org/display?useType=' + type, apiConfig.create());
},
getOrgsListInfo:function () {
return $http.get('/orgHK/getOrgsListInfo', apiConfig.create());
},
deleteShareholder:function (id) {
return $http.delete('/orgHK/deleteShareholder?id='+id,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