99 lines
1.9 KiB
Java
99 lines
1.9 KiB
Java
package io.lroyia.bean;
|
|
|
|
import lombok.Data;
|
|
import lombok.experimental.Accessors;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
import java.io.Serializable;
|
|
import java.math.BigDecimal;
|
|
import java.time.LocalDate;
|
|
|
|
/**
|
|
* 主体信息
|
|
*
|
|
* @author lroyia
|
|
* @since 2023/10/24 9:19
|
|
**/
|
|
@Data
|
|
@Accessors(chain = true)
|
|
public class EntInfo implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
/**
|
|
* 主体id
|
|
*/
|
|
private String pripid;
|
|
|
|
/**
|
|
* 企业名称
|
|
*/
|
|
private String entName;
|
|
|
|
/**
|
|
* 成立日期
|
|
*/
|
|
private LocalDate estDate;
|
|
|
|
/**
|
|
* 企业类型
|
|
*/
|
|
private String entType;
|
|
|
|
/**
|
|
* 注册金额
|
|
*/
|
|
private BigDecimal regCap;
|
|
|
|
/**
|
|
* 行业门类
|
|
*/
|
|
private String industryPhy;
|
|
|
|
/**
|
|
* 行业编码
|
|
*/
|
|
private String industryCo;
|
|
|
|
/**
|
|
* 登记状态
|
|
*/
|
|
private String regState;
|
|
|
|
/**
|
|
* 风险等级
|
|
*/
|
|
private String riskLevel;
|
|
|
|
/**
|
|
* 转计算Bean
|
|
*
|
|
* @return 转换结果
|
|
* @author lroyia
|
|
* @since 2023年10月24日 09:54:11
|
|
*/
|
|
public EntCalInfo toCalInfo() {
|
|
EntCalInfo result = new EntCalInfo();
|
|
result.setPripid(pripid);
|
|
result.setEntName(entName);
|
|
result.setIndustryPhy(industryPhy);
|
|
if (estDate != null) {
|
|
LocalDate now = LocalDate.now();
|
|
result.setEstDate(now.getYear() - estDate.getYear());
|
|
}
|
|
if (StringUtils.isNotBlank(entType)) {
|
|
result.setEntType(Double.parseDouble(entType));
|
|
}
|
|
if (regCap != null) {
|
|
result.setRegCap(regCap.doubleValue());
|
|
}
|
|
if (StringUtils.isNotBlank(industryCo)) {
|
|
result.setIndustryCo(Double.parseDouble(industryCo));
|
|
}
|
|
if (StringUtils.isNotBlank(regState)) {
|
|
result.setRegState(Double.parseDouble(regState));
|
|
}
|
|
return result;
|
|
}
|
|
}
|