Commit 5783d9e9 authored by frank.xa.zhang's avatar frank.xa.zhang

fixed page issue -- frank

parent cba7426d
This diff is collapsed.
...@@ -45,7 +45,7 @@ public class POIUtil { ...@@ -45,7 +45,7 @@ public class POIUtil {
} }
Row targetRow = targetSheet.createRow(r); Row targetRow = targetSheet.createRow(r);
for (int c = row.getFirstCellNum(); c <= row.getLastCellNum(); c++) { for (int c = row.getFirstCellNum(); c <= row.getLastCellNum(); c++) {
if(c < 0 ){ if (c < 0) {
continue; continue;
} }
Cell cell = row.getCell(c); Cell cell = row.getCell(c);
...@@ -76,10 +76,10 @@ public class POIUtil { ...@@ -76,10 +76,10 @@ public class POIUtil {
if (null != cell.getCellComment()) { if (null != cell.getCellComment()) {
targetCell.setCellComment(cell.getCellComment()); targetCell.setCellComment(cell.getCellComment());
} }
if (null != cell.getCellStyle() && targetCell.getCellStyle() != null ) { if (null != cell.getCellStyle() && targetCell.getCellStyle() != null) {
try{ try {
targetCell.getCellStyle().cloneStyleFrom(cell.getCellStyle()); targetCell.getCellStyle().cloneStyleFrom(cell.getCellStyle());
}catch (Exception e){ } catch (Exception e) {
//e.printStackTrace(); //e.printStackTrace();
} }
} }
...@@ -90,11 +90,11 @@ public class POIUtil { ...@@ -90,11 +90,11 @@ public class POIUtil {
} }
} }
public static void cloneSheetAndStyle(Sheet sheet, Sheet targetSheet,Workbook tWorkbook) { public static void cloneSheetAndStyle(Sheet sheet, Sheet targetSheet, Workbook tWorkbook) {
//设置合并单元格 //设置合并单元格
List<CellRangeAddress> merges = sheet.getMergedRegions(); List<CellRangeAddress> merges = sheet.getMergedRegions();
if(CollectionUtils.isNotEmpty(merges)){ if (CollectionUtils.isNotEmpty(merges)) {
for(CellRangeAddress merge : merges){ for (CellRangeAddress merge : merges) {
targetSheet.addMergedRegion(merge); targetSheet.addMergedRegion(merge);
} }
} }
...@@ -105,7 +105,7 @@ public class POIUtil { ...@@ -105,7 +105,7 @@ public class POIUtil {
} }
Row targetRow = targetSheet.createRow(r); Row targetRow = targetSheet.createRow(r);
for (int c = row.getFirstCellNum(); c <= row.getLastCellNum(); c++) { for (int c = row.getFirstCellNum(); c <= row.getLastCellNum(); c++) {
if(c < 0 ){ if (c < 0) {
continue; continue;
} }
Cell cell = row.getCell(c); Cell cell = row.getCell(c);
...@@ -116,9 +116,9 @@ public class POIUtil { ...@@ -116,9 +116,9 @@ public class POIUtil {
targetCell.setCellType(cell.getCellTypeEnum()); targetCell.setCellType(cell.getCellTypeEnum());
switch (cell.getCellTypeEnum()) { switch (cell.getCellTypeEnum()) {
case STRING: case STRING:
if (cell.getStringCellValue().indexOf("KeyIn")>0){ if (cell.getStringCellValue().indexOf("KeyIn") > 0) {
targetCell.setCellValue(""); targetCell.setCellValue("");
}else{ } else {
targetCell.setCellValue(cell.getStringCellValue()); targetCell.setCellValue(cell.getStringCellValue());
} }
break; break;
...@@ -141,11 +141,11 @@ public class POIUtil { ...@@ -141,11 +141,11 @@ public class POIUtil {
targetCell.setCellComment(cell.getCellComment()); targetCell.setCellComment(cell.getCellComment());
} }
if (null != cell.getCellStyle()) { if (null != cell.getCellStyle()) {
CellStyle newstyle=tWorkbook.createCellStyle(); CellStyle newstyle = tWorkbook.createCellStyle();
targetCell.setCellStyle(newstyle); targetCell.setCellStyle(newstyle);
try{ try {
targetCell.getCellStyle().cloneStyleFrom(cell.getCellStyle()); targetCell.getCellStyle().cloneStyleFrom(cell.getCellStyle());
}catch (Exception e){ } catch (Exception e) {
//e.printStackTrace(); //e.printStackTrace();
} }
} }
...@@ -155,6 +155,7 @@ public class POIUtil { ...@@ -155,6 +155,7 @@ public class POIUtil {
} }
} }
} }
public static String getCellFormulaString(Cell cell) { public static String getCellFormulaString(Cell cell) {
switch (cell.getCellTypeEnum()) { switch (cell.getCellTypeEnum()) {
case STRING: case STRING:
...@@ -192,14 +193,14 @@ public class POIUtil { ...@@ -192,14 +193,14 @@ public class POIUtil {
return row; return row;
} }
public static Row createAndCloneRow(Workbook wb , Sheet sheet, Integer destRowIndex, Row fromRow) { public static Row createAndCloneRow(Workbook wb, Sheet sheet, Integer destRowIndex, Row fromRow) {
Row toRow = null; Row toRow = null;
if (sheet.getRow(destRowIndex) != null) { if (sheet.getRow(destRowIndex) != null) {
int lastRowNo = sheet.getLastRowNum(); int lastRowNo = sheet.getLastRowNum();
sheet.shiftRows(destRowIndex, lastRowNo, 1); sheet.shiftRows(destRowIndex, lastRowNo, 1);
} }
toRow = sheet.createRow(destRowIndex); toRow = sheet.createRow(destRowIndex);
for (Iterator cellIt = fromRow.cellIterator(); cellIt.hasNext();) { for (Iterator cellIt = fromRow.cellIterator(); cellIt.hasNext(); ) {
Cell tmpCell = (Cell) cellIt.next(); Cell tmpCell = (Cell) cellIt.next();
Cell newCell = toRow.createCell(tmpCell.getColumnIndex()); Cell newCell = toRow.createCell(tmpCell.getColumnIndex());
copyCell(wb, tmpCell, newCell, false); copyCell(wb, tmpCell, newCell, false);
...@@ -207,9 +208,9 @@ public class POIUtil { ...@@ -207,9 +208,9 @@ public class POIUtil {
return toRow; return toRow;
} }
public static void copyCell(Workbook wb,Cell srcCell, Cell distCell, public static void copyCell(Workbook wb, Cell srcCell, Cell distCell,
boolean copyValueFlag) { boolean copyValueFlag) {
CellStyle newstyle=wb.createCellStyle(); CellStyle newstyle = wb.createCellStyle();
newstyle.cloneStyleFrom(srcCell.getCellStyle()); newstyle.cloneStyleFrom(srcCell.getCellStyle());
// copyCellStyle(wb,srcCell.getCellStyle(), newstyle); // copyCellStyle(wb,srcCell.getCellStyle(), newstyle);
// distCell.setEncoding(srcCell.getEncoding()); // distCell.setEncoding(srcCell.getEncoding());
...@@ -244,7 +245,7 @@ public class POIUtil { ...@@ -244,7 +245,7 @@ public class POIUtil {
} }
} }
public static void copyCellStyle(Workbook wb,CellStyle fromStyle, public static void copyCellStyle(Workbook wb, CellStyle fromStyle,
CellStyle toStyle) { CellStyle toStyle) {
toStyle.setAlignment(HorizontalAlignment.forInt(fromStyle.getAlignment())); toStyle.setAlignment(HorizontalAlignment.forInt(fromStyle.getAlignment()));
//边框和边框颜色 //边框和边框颜色
...@@ -263,7 +264,7 @@ public class POIUtil { ...@@ -263,7 +264,7 @@ public class POIUtil {
// //
toStyle.setDataFormat(fromStyle.getDataFormat()); toStyle.setDataFormat(fromStyle.getDataFormat());
toStyle.setFillPattern(FillPatternType.forInt(fromStyle.getFillPattern())); toStyle.setFillPattern(FillPatternType.forInt(fromStyle.getFillPattern()));
toStyle.setFont(wb.getFontAt(fromStyle.getFontIndex())); toStyle.setFont(wb.getFontAt(fromStyle.getFontIndex()));
toStyle.setHidden(fromStyle.getHidden()); toStyle.setHidden(fromStyle.getHidden());
toStyle.setIndention(fromStyle.getIndention());//首行缩进 toStyle.setIndention(fromStyle.getIndention());//首行缩进
toStyle.setLocked(fromStyle.getLocked()); toStyle.setLocked(fromStyle.getLocked());
......
...@@ -7,7 +7,9 @@ import org.springframework.web.bind.annotation.*; ...@@ -7,7 +7,9 @@ import org.springframework.web.bind.annotation.*;
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.organization.dpo.OrganizationHKDto; import pwc.taxtech.atms.organization.dpo.OrganizationHKDto;
import pwc.taxtech.atms.organization.entity.OrganizationDirector;
import pwc.taxtech.atms.organization.entity.OrganizationHK; import pwc.taxtech.atms.organization.entity.OrganizationHK;
import pwc.taxtech.atms.organization.entity.OrganizationShareholder;
import pwc.taxtech.atms.service.impl.OrganizationHKServiceImpl; import pwc.taxtech.atms.service.impl.OrganizationHKServiceImpl;
import java.util.List; import java.util.List;
...@@ -69,4 +71,32 @@ public class OrganizationHKController { ...@@ -69,4 +71,32 @@ public class OrganizationHKController {
logger.info("POST /api/v1/orgHK/add"); logger.info("POST /api/v1/orgHK/add");
return organizationHKService.addOrg(orgDto); return organizationHKService.addOrg(orgDto);
} }
@RequestMapping(value = "addDirecotr", method = RequestMethod.POST)
public @ResponseBody
OperationResultDto<Object> addDirector(@RequestBody OrganizationDirector organizationDirector) {
logger.info("POST /api/v1/orgHK/addDirecotr");
return organizationHKService.addOrgDirector(organizationDirector);
}
@RequestMapping(value = "addShareholder", method = RequestMethod.POST)
public @ResponseBody
OperationResultDto<Object> addShareholder(@RequestBody OrganizationShareholder organizationShareholder) {
logger.info("POST /api/v1/orgHK/addShareholder");
return organizationHKService.addOrgShareholder(organizationShareholder);
}
@RequestMapping(value = "updateDirector", method = RequestMethod.PUT)
public @ResponseBody
OperationResultDto<Object> updateDirector(@RequestBody OrganizationDirector organizationDirector) {
logger.info("PUT /api/v1/orgHK/updateDirector");
return organizationHKService.updateDirector(organizationDirector);
}
@RequestMapping(value = "updateShareholder", method = RequestMethod.PUT)
public @ResponseBody
OperationResultDto<Object> updateShareholder(@RequestBody OrganizationShareholder organizationShareholder) {
logger.info("PUT /api/v1/orgHK/updateShareholder");
return organizationHKService.updateShareholder(organizationShareholder);
}
} }
...@@ -12,16 +12,19 @@ import pwc.taxtech.atms.common.*; ...@@ -12,16 +12,19 @@ import pwc.taxtech.atms.common.*;
import pwc.taxtech.atms.common.message.LogMessage; import pwc.taxtech.atms.common.message.LogMessage;
import pwc.taxtech.atms.common.message.OrganizationMessage; import pwc.taxtech.atms.common.message.OrganizationMessage;
import pwc.taxtech.atms.common.util.BeanUtil; import pwc.taxtech.atms.common.util.BeanUtil;
import pwc.taxtech.atms.constant.OrganizationConstant;
import pwc.taxtech.atms.dto.OperationLogDto; import pwc.taxtech.atms.dto.OperationLogDto;
import pwc.taxtech.atms.dto.OperationResultDto; import pwc.taxtech.atms.dto.OperationResultDto;
import pwc.taxtech.atms.dto.UpdateLogParams; import pwc.taxtech.atms.dto.UpdateLogParams;
import pwc.taxtech.atms.dto.navtree.NavTreeDto; import pwc.taxtech.atms.dto.navtree.NavTreeDto;
import pwc.taxtech.atms.entity.ServiceType; import pwc.taxtech.atms.entity.ServiceType;
import pwc.taxtech.atms.organization.dao.OrganizationDirectorMapper;
import pwc.taxtech.atms.organization.dao.OrganizationHKMapper; import pwc.taxtech.atms.organization.dao.OrganizationHKMapper;
import pwc.taxtech.atms.organization.dao.OrganizationShareholderMapper;
import pwc.taxtech.atms.organization.dpo.OrganizationHKDto; import pwc.taxtech.atms.organization.dpo.OrganizationHKDto;
import pwc.taxtech.atms.organization.entity.OrganizationDirector;
import pwc.taxtech.atms.organization.entity.OrganizationHK; import pwc.taxtech.atms.organization.entity.OrganizationHK;
import pwc.taxtech.atms.organization.entity.OrganizationHKExample; import pwc.taxtech.atms.organization.entity.OrganizationHKExample;
import pwc.taxtech.atms.organization.entity.OrganizationShareholder;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.*; import java.util.*;
...@@ -40,9 +43,18 @@ public class OrganizationHKServiceImpl { ...@@ -40,9 +43,18 @@ public class OrganizationHKServiceImpl {
@Resource @Resource
private OrganizationHKMapper organizationHKMapper; private OrganizationHKMapper organizationHKMapper;
@Resource
private OrganizationDirectorMapper organizationDirectorMapper;
@Resource
private OrganizationShareholderMapper organizationShareholderMapper;
@Autowired @Autowired
private OperationLogServiceImpl operationLogService; private OperationLogServiceImpl operationLogService;
@Autowired
private AuthUserHelper authUserHelper;
@Autowired @Autowired
private BeanUtil beanUtil; private BeanUtil beanUtil;
...@@ -149,7 +161,7 @@ public class OrganizationHKServiceImpl { ...@@ -149,7 +161,7 @@ public class OrganizationHKServiceImpl {
return orgList.stream().map(this::rotateOrganizationDtoToNavTreeDto).collect(Collectors.toList()); return orgList.stream().map(this::rotateOrganizationDtoToNavTreeDto).collect(Collectors.toList());
} }
public List<OrganizationHKDto> getOrgList(Integer useType) { private List<OrganizationHKDto> getOrgList(Integer useType) {
List<OrganizationHKDto> orgDtoList = new ArrayList<>(); List<OrganizationHKDto> orgDtoList = new ArrayList<>();
List<OrganizationHK> orgList = findAllOrganizations(); List<OrganizationHK> orgList = findAllOrganizations();
if (!orgList.isEmpty()) { if (!orgList.isEmpty()) {
...@@ -214,7 +226,7 @@ public class OrganizationHKServiceImpl { ...@@ -214,7 +226,7 @@ public class OrganizationHKServiceImpl {
return parentOrg; return parentOrg;
} }
public List<OrganizationHK> findAllOrganizations() { private List<OrganizationHK> findAllOrganizations() {
OrganizationHKExample organizationExample = new OrganizationHKExample(); OrganizationHKExample organizationExample = new OrganizationHKExample();
return organizationHKMapper.selectByExample(organizationExample); return organizationHKMapper.selectByExample(organizationExample);
} }
...@@ -243,18 +255,34 @@ public class OrganizationHKServiceImpl { ...@@ -243,18 +255,34 @@ public class OrganizationHKServiceImpl {
if (result != null && !BooleanUtils.isTrue(result.getResult())) { if (result != null && !BooleanUtils.isTrue(result.getResult())) {
return new OperationResultDto(result.getResult(), result.getResultMsg()); return new OperationResultDto(result.getResult(), result.getResultMsg());
} }
if (Objects.equals(orgDto.getParentId(), OrganizationConstant.NoParentId)) { orgDto.setParentId(null);
orgDto.setParentId(null); orgDto.setPLevel(0);
orgDto.setpLevel(0);
} else {
}
orgDto.setId(distributedIdService.nextId()); orgDto.setId(distributedIdService.nextId());
Date now = new Date(); Date now = new Date();
OrganizationHK org = copyProperties(orgDto, new OrganizationHK()); OrganizationHK org = copyProperties(orgDto, new OrganizationHK());
org.setCreateTime(now); org.setCreateTime(now);
org.setUpdateTime(now); org.setUpdateTime(now);
if (orgDto.getDirectors() != null && orgDto.getDirectors().size() > 0) {
orgDto.getDirectors().forEach(a -> {
OrganizationDirector organizationDirector = beanUtil.copyProperties(a, new OrganizationDirector());
organizationDirector.setUpdateTime(now);
organizationDirector.setCreateTime(now);
organizationDirector.setEntityId(org.getId());
organizationDirector.setId(distributedIdService.nextId());
organizationDirectorMapper.insertSelective(organizationDirector);
});
}
if (orgDto.getShareholders() != null && orgDto.getShareholders().size() > 0) {
orgDto.getShareholders().forEach(a -> {
OrganizationShareholder organizationShareholder = beanUtil.copyProperties(a, new OrganizationShareholder());
organizationShareholder.setId(distributedIdService.nextId());
organizationShareholder.setInvestmentEntityId(0L);
organizationShareholder.setEntityId(org.getId());
organizationShareholder.setCreateTime(now);
organizationShareholder.setUpdateTime(now);
organizationShareholderMapper.insertSelective(organizationShareholder);
});
}
organizationHKMapper.insertSelective(org); organizationHKMapper.insertSelective(org);
UpdateLogParams tempCommonLogParms = new UpdateLogParams(); UpdateLogParams tempCommonLogParms = new UpdateLogParams();
...@@ -308,4 +336,60 @@ public class OrganizationHKServiceImpl { ...@@ -308,4 +336,60 @@ public class OrganizationHKServiceImpl {
} }
return new OperationResultDto(true); return new OperationResultDto(true);
} }
public OperationResultDto<Object> addOrgDirector(OrganizationDirector organizationDirector) {
OperationResultDto<Object> operationResultDto = new OperationResultDto<>();
organizationDirectorMapper.insertSelective(organizationDirector);
operationResultDto.setResult(true);
return operationResultDto;
}
public OperationResultDto<Object> addOrgShareholder(OrganizationShareholder organizationShareholder) {
OperationResultDto<Object> operationResultDto = new OperationResultDto<>();
organizationShareholderMapper.insertSelective(organizationShareholder);
operationResultDto.setResult(true);
return operationResultDto;
}
public OperationResultDto<Object> updateDirector(OrganizationDirector organizationDirector) {
OperationResultDto<Object> resultDto = new OperationResultDto<>();
if (existDirector(organizationDirector.getId())) {
Date now = new Date();
organizationDirector.setUpdateTime(now);
organizationDirector.setUpdateBy(authUserHelper.getCurrentUserId());
organizationDirectorMapper.updateByPrimaryKey(organizationDirector);
resultDto.setResult(true);
} else {
resultDto.setResult(false);
resultDto.setResultMsg("Not exist director");
}
return resultDto;
}
public OperationResultDto<Object> updateShareholder(OrganizationShareholder organizationShareholder) {
OperationResultDto<Object> resultDto = new OperationResultDto<>();
if (existShareholder(organizationShareholder.getId())) {
Date now = new Date();
organizationShareholder.setUpdateTime(now);
organizationShareholder.setUpdateBy(authUserHelper.getCurrentUserId());
organizationShareholderMapper.updateByPrimaryKey(organizationShareholder);
resultDto.setResult(true);
} else {
resultDto.setResult(false);
resultDto.setResultMsg("Not exist director");
}
return resultDto;
}
private boolean existShareholder(Long organizationShardholderId) {
OrganizationShareholder organizationShareholder = organizationShareholderMapper.selectByPrimaryKey(organizationShardholderId);
return organizationShareholder != null;
}
private boolean existDirector(Long organizationDirectorId) {
OrganizationDirector organizationDirector = organizationDirectorMapper.selectByPrimaryKey(organizationDirectorId);
return organizationDirector != null;
}
} }
...@@ -90,5 +90,13 @@ ...@@ -90,5 +90,13 @@
<classifier>jdk15</classifier> <classifier>jdk15</classifier>
</dependency> </dependency>
<!--Excel to Json End--> <!--Excel to Json End-->
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.8</version>
<scope>provided</scope>
</dependency>
</dependencies> </dependencies>
</project> </project>
package pwc.taxtech.atms.organization.dpo;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
@Getter
@Setter
@ToString
@NoArgsConstructor
public class OrganizationDirectorDto {
String id;
String entityId;
String directorName;
String residency;
String dateOfAppointment;
String dateOfResignation;
String isExecutive;
String otherRoles;
String isDelete;
}
package pwc.taxtech.atms.organization.dpo; package pwc.taxtech.atms.organization.dpo;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import java.util.List; import java.util.List;
@Getter
@Setter
@ToString
public class OrganizationHKDto { public class OrganizationHKDto {
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long id; private Long id;
...@@ -38,284 +45,12 @@ public class OrganizationHKDto { ...@@ -38,284 +45,12 @@ public class OrganizationHKDto {
private String structureId; private String structureId;
private String industryId; private String industryId;
private String businessUnitId; private String businessUnitId;
private String parentName; private String parentName;
private List<OrganizationHKDto> subOrgs; private List<OrganizationHKDto> subOrgs;
private Integer pLevel; private Integer pLevel;
public Integer getLevel() {
return level;
}
public void setLevel(Integer level) {
this.level = level;
}
private Integer level; private Integer level;
@JsonProperty("directors")
public String getParentName() { private List<OrganizationDirectorDto> directors;
return parentName; @JsonProperty("shareholders")
} private List<OrganizationShareholderDto> shareholders;
public void setParentName(String parentName) {
this.parentName = parentName;
}
public List<OrganizationHKDto> getSubOrgs() {
return subOrgs;
}
public void setSubOrgs(List<OrganizationHKDto> subOrgs) {
this.subOrgs = subOrgs;
}
public Integer getpLevel() {
return pLevel;
}
public void setpLevel(Integer pLevel) {
this.pLevel = pLevel;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public Boolean getActive() {
return isActive;
}
public void setActive(Boolean active) {
isActive = active;
}
public Long getParentId() {
return parentId;
}
public void setParentId(Long parentId) {
this.parentId = parentId;
}
public String getLegalForm() {
return legalForm;
}
public void setLegalForm(String legalForm) {
this.legalForm = legalForm;
}
public String getRegisterAddress() {
return registerAddress;
}
public void setRegisterAddress(String registerAddress) {
this.registerAddress = registerAddress;
}
public Float getAuthorisedCapital() {
return authorisedCapital;
}
public void setAuthorisedCapital(Float authorisedCapital) {
this.authorisedCapital = authorisedCapital;
}
public Float getIssuedCapital() {
return issuedCapital;
}
public void setIssuedCapital(Float issuedCapital) {
this.issuedCapital = issuedCapital;
}
public String getIndustry() {
return industry;
}
public void setIndustry(String industry) {
this.industry = industry;
}
public String getPaymentOfAnnualGovernmentFee() {
return paymentOfAnnualGovernmentFee;
}
public void setPaymentOfAnnualGovernmentFee(String paymentOfAnnualGovernmentFee) {
this.paymentOfAnnualGovernmentFee = paymentOfAnnualGovernmentFee;
}
public String getAnnualReturnFillings() {
return annualReturnFillings;
}
public void setAnnualReturnFillings(String annualReturnFillings) {
this.annualReturnFillings = annualReturnFillings;
}
public String getBoardMeetingRequirement() {
return boardMeetingRequirement;
}
public void setBoardMeetingRequirement(String boardMeetingRequirement) {
this.boardMeetingRequirement = boardMeetingRequirement;
}
public String getBusinessLicense() {
return businessLicense;
}
public void setBusinessLicense(String businessLicense) {
this.businessLicense = businessLicense;
}
public String getRenewalOfBusinessLicense() {
return renewalOfBusinessLicense;
}
public void setRenewalOfBusinessLicense(String renewalOfBusinessLicense) {
this.renewalOfBusinessLicense = renewalOfBusinessLicense;
}
public String getEntityLevel() {
return entityLevel;
}
public void setEntityLevel(String entityLevel) {
this.entityLevel = entityLevel;
}
public String getDateOfIncorporation() {
return dateOfIncorporation;
}
public void setDateOfIncorporation(String dateOfIncorporation) {
this.dateOfIncorporation = dateOfIncorporation;
}
public String getJurisdictionOfFormation() {
return jurisdictionOfFormation;
}
public void setJurisdictionOfFormation(String jurisdictionOfFormation) {
this.jurisdictionOfFormation = jurisdictionOfFormation;
}
public String getFinancialYearEnd() {
return financialYearEnd;
}
public void setFinancialYearEnd(String financialYearEnd) {
this.financialYearEnd = financialYearEnd;
}
public String getAnnualAuditRequirement() {
return annualAuditRequirement;
}
public void setAnnualAuditRequirement(String annualAuditRequirement) {
this.annualAuditRequirement = annualAuditRequirement;
}
public String getRegisteredAgent() {
return registeredAgent;
}
public void setRegisteredAgent(String registeredAgent) {
this.registeredAgent = registeredAgent;
}
public String getOwnershipForm() {
return ownershipForm;
}
public void setOwnershipForm(String ownershipForm) {
this.ownershipForm = ownershipForm;
}
public String getResidentSecretary() {
return residentSecretary;
}
public void setResidentSecretary(String residentSecretary) {
this.residentSecretary = residentSecretary;
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public String getUpdateTime() {
return updateTime;
}
public void setUpdateTime(String updateTime) {
this.updateTime = updateTime;
}
public String getAreaId() {
return areaId;
}
public void setAreaId(String areaId) {
this.areaId = areaId;
}
public String getRegionId() {
return regionId;
}
public void setRegionId(String regionId) {
this.regionId = regionId;
}
public String getStructureId() {
return structureId;
}
public void setStructureId(String structureId) {
this.structureId = structureId;
}
public String getIndustryId() {
return industryId;
}
public void setIndustryId(String industryId) {
this.industryId = industryId;
}
public String getBusinessUnitId() {
return businessUnitId;
}
public void setBusinessUnitId(String businessUnitId) {
this.businessUnitId = businessUnitId;
}
} }
package pwc.taxtech.atms.organization.dpo;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
@Getter
@Setter
@NoArgsConstructor
@ToString
public class OrganizationShareholderDto {
String id;
String entityId;
String investmentEntityId;
String ownershipForm;
String commonPreferred;
String classOfShares;
String votingPercentage;
}
...@@ -387,8 +387,8 @@ ...@@ -387,8 +387,8 @@
<operate-log is-show="isShowLog"></operate-log> <operate-log is-show="isShowLog"></operate-log>
<edit-organization-modal is-show="showEditModal" parent-page=".system-manage" operate-type="orgOperateType" is-update="isOrgUpdate" <edit-organization-modal is-show="showEditModal" parent-page=".system-manage" operate-type="orgOperateType" is-update="isOrgUpdate"
selected-organization="selectedOrg" dimension-id="showAttributeDimensionID"></edit-organization-modal> selected-organization="selectedOrg" dimension-id="showAttributeDimensionID"></edit-organization-modal>
<edit-organization-shareholder-modal is-show-s="isShowShareholderModal2" parent-page=".system-manage" edit-model=""></edit-organization-shareholder-modal> <!--<edit-organization-shareholder-modal is-show-s="isShowShareholderModal2" parent-page=".system-manage" edit-model=""></edit-organization-shareholder-modal>-->
<edit-organization-director-modal is-show-d="isShowDirectorModal2" parent-page=".system-manage" edit-model=""></edit-organization-director-modal> <!--<edit-organization-director-modal is-show-d="isShowDirectorModal2" parent-page=".system-manage" edit-model=""></edit-organization-director-modal>-->
<!--<edit-equity-modal operate-type="equityEditOperateType" is-update="isEquityUpdate"--> <!--<edit-equity-modal operate-type="equityEditOperateType" is-update="isEquityUpdate"-->
<!--selected-organization="selectedOrg"></edit-equity-modal>--> <!--selected-organization="selectedOrg"></edit-equity-modal>-->
<!--<edit-equity-change-modal operate-type="equityChangeOperateType" is-update="isEquityChange"--> <!--<edit-equity-change-modal operate-type="equityChangeOperateType" is-update="isEquityChange"-->
......
commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$log', 'ackUibModal', '$translate', function ($scope, $log, ackUibModal, $translate) { commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$log', 'ackUibModal', '$translate', 'orgHKService', function ($scope, $log, ackUibModal, $translate, orgHKService) {
'use strict'; 'use strict';
$scope.isShow = false;
//模态框管理 //模态框管理
$scope.modalManage = { $scope.modalManage = {
...@@ -16,16 +15,22 @@ commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$ ...@@ -16,16 +15,22 @@ commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$
$scope.modalInstance.open(); $scope.modalInstance.open();
}, },
close: function () { close: function () {
$scope.onClose();
$scope.modalInstance.close(); $scope.modalInstance.close();
}, },
cancel: function () { cancel: function () {
$scope.onClose(); $scope.onClose();
$scope.modalInstance.cancel(); $scope.modalInstance.cancel();
}, },
save:function () { save: function () {
var dxResult = DevExpress.validationEngine.validateGroup($('#directorControlForm').dxValidationGroup("instance")).isValid; var dxResult = DevExpress.validationEngine.validateGroup($('#directorControlForm').dxValidationGroup("instance")).isValid;
if (dxResult) { if (dxResult) {
if (!$scope.editModelD.id) {
$scope.editModelD.id = PWC.newGuid();
}
$scope.onSave({directorEntity: $scope.editModelD});
$scope.editModelD = {};
$scope.modalManage.directorModal.close();
} }
} }
} }
...@@ -34,19 +39,15 @@ commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$ ...@@ -34,19 +39,15 @@ commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$
var now = new Date(); var now = new Date();
var initParams = function () { var initParams = function () {
$scope.editModel = {};
$scope.dropdownDatasource = { $scope.dropdownDatasource = {
otherRolesTypeList: constant.organizationHK.OtherRoles, otherRolesTypeList: constant.organizationHK.OtherRoles,
executiveTypeList: constant.organizationHK.executiveType executiveTypeList: constant.organizationHK.executiveType
}; };
$scope.textOptions = { $scope.textOptions = {
directorNameOption: { directorNameOption: {
bindingOptions: { bindingOptions: {
value: 'editModel.directorName' value: 'editModelD.directorName'
}, },
maxLength: 100, maxLength: 100,
placeholder: $translate.instant('directorName'), placeholder: $translate.instant('directorName'),
...@@ -54,7 +55,7 @@ commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$ ...@@ -54,7 +55,7 @@ commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$
}, },
residencyOption: { residencyOption: {
bindingOptions: { bindingOptions: {
value: 'editModel.residency' value: 'editModelD.residency'
}, },
maxLength: 100, maxLength: 100,
placeholder: $translate.instant('residency'), placeholder: $translate.instant('residency'),
...@@ -62,7 +63,7 @@ commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$ ...@@ -62,7 +63,7 @@ commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$
}, },
dateOfAppointmentOption: { dateOfAppointmentOption: {
bindingOptions: { bindingOptions: {
value: 'editModel.dateOfAppointment' value: 'editModelD.dateOfAppointment'
}, },
type: "date", type: "date",
value: now, value: now,
...@@ -72,7 +73,7 @@ commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$ ...@@ -72,7 +73,7 @@ commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$
}, },
dateOfResignationOption: { dateOfResignationOption: {
bindingOptions: { bindingOptions: {
value: 'editModel.dateOfResignation' value: 'editModelD.dateOfResignation'
}, },
type: "date", type: "date",
value: now, value: now,
...@@ -83,10 +84,10 @@ commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$ ...@@ -83,10 +84,10 @@ commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$
executiveOption: { executiveOption: {
bindingOptions: { bindingOptions: {
dataSource: 'dropdownDatasource.executiveTypeList', dataSource: 'dropdownDatasource.executiveTypeList',
value: 'editModel.executive' value: 'editModelD.executive'
}, },
onSelectionChanged: function (args) { onSelectionChanged: function (args) {
$scope.editModel.executive = args.selectedItem.id; // $scope.editModel.executive = args.selectedItem.id;
}, },
itemTemplate: function (itemData, itemIndex, itemElement) { itemTemplate: function (itemData, itemIndex, itemElement) {
var span = $('<span title="' + itemData.name + '">').text(itemData.name); var span = $('<span title="' + itemData.name + '">').text(itemData.name);
...@@ -99,10 +100,10 @@ commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$ ...@@ -99,10 +100,10 @@ commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$
otherRolesOption: { otherRolesOption: {
bindingOptions: { bindingOptions: {
dataSource: 'dropdownDatasource.otherRolesTypeList', dataSource: 'dropdownDatasource.otherRolesTypeList',
value: 'editModel.otherRoles' value: 'editModelD.otherRoles'
}, },
onSelectionChanged: function (args) { onSelectionChanged: function (args) {
$scope.editModel.otherRoles = args.selectedItem.id; // $scope.editModel.otherRoles = args.selectedItem.id;
}, },
itemTemplate: function (itemData, itemIndex, itemElement) { itemTemplate: function (itemData, itemIndex, itemElement) {
var span = $('<span title="' + itemData.name + '">').text(itemData.name); var span = $('<span title="' + itemData.name + '">').text(itemData.name);
...@@ -172,14 +173,13 @@ commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$ ...@@ -172,14 +173,13 @@ commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$
var thisModuleService = { var thisModuleService = {
initEvents: function () { initEvents: function () {
$scope.save = function () {
};
}, },
initWatches: function () { initWatches: function () {
$scope.$watch('isShowD', function (newValue, oldValue) { $scope.$watch('isShowD', function (newValue) {
if (newValue) { if (newValue) {
console.log($scope.$parent.$parent.gModel.editDirectorModel);
$scope.editModelD= $scope.$parent.$parent.gModel.editDirectorModel;
$scope.modalManage.directorModal.open(); $scope.modalManage.directorModal.open();
} }
}); });
...@@ -188,6 +188,7 @@ commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$ ...@@ -188,6 +188,7 @@ commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$
(function initialize() { (function initialize() {
$log.debug('editOrganizationDirectorModalController.ctor()...'); $log.debug('editOrganizationDirectorModalController.ctor()...');
$scope.editModelD = {};
initParams(); initParams();
init(); init();
thisModuleService.initWatches(); thisModuleService.initWatches();
......
...@@ -8,9 +8,10 @@ commonModule.directive('editOrganizationDirectorModal', ['$log', function ($log) ...@@ -8,9 +8,10 @@ commonModule.directive('editOrganizationDirectorModal', ['$log', function ($log)
controller: 'editOrganizationDirectorModalController', controller: 'editOrganizationDirectorModalController',
scope: { scope: {
isShowD: '=?', isShowD: '=?',
editModelD: '=?',
parentPage: '@', parentPage: '@',
editModel: '=?', onClose:'&',
onClose:'&' onSave:'&'
}, },
link: function (scope, element) { link: function (scope, element) {
} }
......
...@@ -169,8 +169,7 @@ ...@@ -169,8 +169,7 @@
</button> </button>
</span> </span>
</div> </div>
<edit-organization-shareholder-modal is-show-s="isShowShareholderModal" parent-page=".edit-organization-modal-wrapper" edit-model="editShareholder" <edit-organization-shareholder-modal is-show-s="isShowShareholderModal" parent-page=".edit-organization-modal-wrapper" edit-model-s="gModel.editShareholderModel" on-close="closeSharehoder()" on-save="saveShareholder(shareholderEntity)"></edit-organization-shareholder-modal>
on-close="closeSharehoder()"></edit-organization-shareholder-modal> <edit-organization-director-modal is-show-d="isShowDirectorModal" parent-page=".edit-organization-modal-wrapper" edit-model-d="gModel.editDirectorModel" on-close="closeDirector()" on-save="saveDirector(directorEntity)"></edit-organization-director-modal>
<edit-organization-director-modal is-show-d="isShowDirectorModal" parent-page=".edit-organization-modal-wrapper" edit-model="editDirector" on-close="closeDirector()"></edit-organization-director-modal>
</script> </script>
</div> </div>
\ No newline at end of file
commonModule.controller('editOrganizationShareholderModalController', ['$scope', '$log', 'ackUibModal','$translate', function ($scope, $log, ackUibModal,$translate) { commonModule.controller('editOrganizationShareholderModalController', ['$scope', '$log', 'ackUibModal', '$translate', function ($scope, $log, ackUibModal, $translate) {
'use strict'; 'use strict';
$scope.isShow = false;
//模态框管理 //模态框管理
$scope.modalManage = { $scope.modalManage = {
shareholderModal: { shareholderModal: {
...@@ -16,23 +14,28 @@ commonModule.controller('editOrganizationShareholderModalController', ['$scope', ...@@ -16,23 +14,28 @@ commonModule.controller('editOrganizationShareholderModalController', ['$scope',
$scope.modalInstance.open(); $scope.modalInstance.open();
}, },
close: function () { close: function () {
$scope.onClose();
$scope.modalInstance.close(); $scope.modalInstance.close();
}, },
cancel: function () { cancel: function () {
$scope.onClose(); $scope.onClose();
$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) {
$scope.editModelS.id = PWC.newGuid();
}
$scope.onSave({shareholderEntity: $scope.editModelS});
$scope.editModelS = {};
$scope.modalManage.shareholderModal.close();
} }
} }
} }
}; };
var initParams = function () { var initParams = function () {
$scope.editModel = {};
$scope.ownershipFormTypeList = constant.organizationHK.OwnershipForm; $scope.ownershipFormTypeList = constant.organizationHK.OwnershipForm;
$scope.commonOrPreferredTypeList = ['Commmon', 'Preferred']; $scope.commonOrPreferredTypeList = ['Commmon', 'Preferred'];
$scope.classOfSharesTypeList = ['A', 'B']; $scope.classOfSharesTypeList = ['A', 'B'];
...@@ -47,11 +50,11 @@ commonModule.controller('editOrganizationShareholderModalController', ['$scope', ...@@ -47,11 +50,11 @@ commonModule.controller('editOrganizationShareholderModalController', ['$scope',
$scope.textboxOption = { $scope.textboxOption = {
investmentEntityOption: { investmentEntityOption: {
bindingOptions: { bindingOptions: {
dataSource: 'dropdownDatasource.investmentEntityTypeList', dataSource: 'dropdownDatasource.ownershipFormTypeList',
value: 'editModel.investmentEntity' value: 'editModelS.investmentEntity'
}, },
onSelectionChanged: function (args) { onSelectionChanged: function (args) {
$scope.editModel.investmentEntity = args.selectedItem.id; // $scope.editModelS.investmentEntity = args.selectedItem.id;
}, },
itemTemplate: function (itemData, itemIndex, itemElement) { itemTemplate: function (itemData, itemIndex, itemElement) {
var span = $('<span title="' + itemData.name + '">').text(itemData.name); var span = $('<span title="' + itemData.name + '">').text(itemData.name);
...@@ -64,10 +67,10 @@ commonModule.controller('editOrganizationShareholderModalController', ['$scope', ...@@ -64,10 +67,10 @@ commonModule.controller('editOrganizationShareholderModalController', ['$scope',
ownershipFormOption: { ownershipFormOption: {
bindingOptions: { bindingOptions: {
dataSource: 'dropdownDatasource.ownershipFormTypeList', dataSource: 'dropdownDatasource.ownershipFormTypeList',
value: 'editModel.ownershipForm' value: 'editModelS.ownershipForm'
}, },
onSelectionChanged: function (args) { onSelectionChanged: function (args) {
$scope.editModel.ownershipForm = args.selectedItem.id; // $scope.editModelS.ownershipForm = args.selectedItem.id;
}, },
itemTemplate: function (itemData, itemIndex, itemElement) { itemTemplate: function (itemData, itemIndex, itemElement) {
var span = $('<span title="' + itemData.name + '">').text(itemData.name); var span = $('<span title="' + itemData.name + '">').text(itemData.name);
...@@ -80,10 +83,10 @@ commonModule.controller('editOrganizationShareholderModalController', ['$scope', ...@@ -80,10 +83,10 @@ commonModule.controller('editOrganizationShareholderModalController', ['$scope',
commonOrPreferredOption: { commonOrPreferredOption: {
bindingOptions: { bindingOptions: {
dataSource: 'dropdownDatasource.commonOrPreferredTypeList', dataSource: 'dropdownDatasource.commonOrPreferredTypeList',
value: 'editModel.commonOrPreferred' value: 'editModelS.commonOrPreferred'
}, },
onSelectionChanged: function (args) { onSelectionChanged: function (args) {
$scope.editModel.commonOrPreferred = args.selectedItem.id; // $scope.editModelS.commonOrPreferred = args.selectedItem.id;
}, },
itemTemplate: function (itemData, itemIndex, itemElement) { itemTemplate: function (itemData, itemIndex, itemElement) {
var span = $('<span title="' + itemData.name + '">').text(itemData.name); var span = $('<span title="' + itemData.name + '">').text(itemData.name);
...@@ -96,10 +99,10 @@ commonModule.controller('editOrganizationShareholderModalController', ['$scope', ...@@ -96,10 +99,10 @@ commonModule.controller('editOrganizationShareholderModalController', ['$scope',
classOfSharesOption: { classOfSharesOption: {
bindingOptions: { bindingOptions: {
dataSource: 'dropdownDatasource.classOfSharesTypeList', dataSource: 'dropdownDatasource.classOfSharesTypeList',
value: 'editModel.classOfShares' value: 'editModelS.classOfShares'
}, },
onSelectionChanged: function (args) { onSelectionChanged: function (args) {
$scope.editModel.classOfShares = args.selectedItem.id; // $scope.editModelS.classOfShares = args.selectedItem.id;
}, },
itemTemplate: function (itemData, itemIndex, itemElement) { itemTemplate: function (itemData, itemIndex, itemElement) {
var span = $('<span title="' + itemData.name + '">').text(itemData.name); var span = $('<span title="' + itemData.name + '">').text(itemData.name);
...@@ -111,7 +114,7 @@ commonModule.controller('editOrganizationShareholderModalController', ['$scope', ...@@ -111,7 +114,7 @@ commonModule.controller('editOrganizationShareholderModalController', ['$scope',
}, },
votingPercentageOption: { votingPercentageOption: {
bindingOptions: { bindingOptions: {
value: 'editModel.votingPercentage' value: 'editModelS.votingPercentage'
}, },
maxLength: 100, maxLength: 100,
placeholder: $translate.instant('votingPercentage'), placeholder: $translate.instant('votingPercentage'),
...@@ -169,14 +172,13 @@ commonModule.controller('editOrganizationShareholderModalController', ['$scope', ...@@ -169,14 +172,13 @@ commonModule.controller('editOrganizationShareholderModalController', ['$scope',
var thisModuleService = { var thisModuleService = {
initEvents: function () { initEvents: function () {
$scope.save = function () {
};
}, },
initWatches: function () { initWatches: function () {
$scope.$watch('isShowS', function (newValue, oldValue) { $scope.$watch('isShowS', function (newValue, oldValue) {
if (newValue) { if (newValue) {
console.log($scope.$parent.$parent.gModel.editShareholderModel);
$scope.editModelS= $scope.$parent.$parent.gModel.editShareholderModel;
$scope.modalManage.shareholderModal.open(); $scope.modalManage.shareholderModal.open();
} }
}); });
...@@ -185,6 +187,7 @@ commonModule.controller('editOrganizationShareholderModalController', ['$scope', ...@@ -185,6 +187,7 @@ commonModule.controller('editOrganizationShareholderModalController', ['$scope',
(function initialize() { (function initialize() {
$log.debug('editOrganizationShareholderModalController.ctor()...'); $log.debug('editOrganizationShareholderModalController.ctor()...');
$scope.editModelS={};
initParams(); initParams();
init(); init();
thisModuleService.initWatches(); thisModuleService.initWatches();
......
...@@ -9,8 +9,9 @@ commonModule.directive('editOrganizationShareholderModal', ['$log', function ($l ...@@ -9,8 +9,9 @@ commonModule.directive('editOrganizationShareholderModal', ['$log', function ($l
scope: { scope: {
isShowS: '=?', isShowS: '=?',
parentPage: '@', parentPage: '@',
editModel: '=?', editModelS: '=?',
onClose:'&' onClose:'&',
onSave:'&'
}, },
link: function (scope, element) { link: function (scope, element) {
} }
......
...@@ -22,6 +22,18 @@ webservices.factory('orgHKService', ['$http', 'apiConfig', function ($http, apiC ...@@ -22,6 +22,18 @@ webservices.factory('orgHKService', ['$http', 'apiConfig', function ($http, apiC
}, },
addOrg: function (org) { addOrg: function (org) {
return $http.post('/orgHK/add', org, apiConfig.create()); return $http.post('/orgHK/add', org, apiConfig.create());
},
addDirecotr: function (orgDirector) {
return $http.post('/orgHK/addDirecotr', orgDirector, apiConfig.create());
},
addShareholder: function (orgShareholder) {
return $http.post('/orgHK/addShareholder', orgShareholder, apiConfig.create());
},
updateDirector: function (orgDirector) {
return $http.put('/orgHK/updateDirector', orgDirector, apiConfig.create());
},
updateShareholder: function (orgShareholder) {
return $http.put('/orgHK/updateShareholder', orgShareholder, 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