Commit 9ce316d8 by zhangxingmin

push

parent 998922da
......@@ -268,7 +268,7 @@ public class PolicyServiceImpl extends ServiceImpl<PolicyMapper, Policy>
// 供款期数为空时,默认按 1 期处理
if (StringUtils.isBlank(issueNumberStr)) {
issueNumber = BigDecimal.ONE;
issueNumber = new BigDecimal("1");
} else {
// 安全转换为 BigDecimal
try {
......
......@@ -7,6 +7,7 @@ import com.yd.csf.service.model.PolicyBroker;
import com.yd.csf.service.model.PolicyFollow;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import java.io.Serializable;
......@@ -530,6 +531,25 @@ public class PolicyFollowDetailVO implements Serializable {
detailVO.setPolicyBizId(policyFollow.getPolicyBizId());
// 转换PolicyFollow
BeanUtils.copyProperties(policyFollow, detailVO);
Object issueNumberObj = policyFollow.getIssueNumber();
if (issueNumberObj instanceof Integer) {
detailVO.setIssueNumber((Integer) issueNumberObj);
} else if (issueNumberObj instanceof String) {
String str = (String) issueNumberObj;
if (StringUtils.isNotBlank(str)) {
try {
detailVO.setIssueNumber(Integer.parseInt(str.trim()));
} catch (NumberFormatException e) {
// 可记录日志,然后置为 null
detailVO.setIssueNumber(null);
}
} else {
detailVO.setIssueNumber(null);
}
} else {
// 其他类型(如 null 或意外类型)统一置 null
detailVO.setIssueNumber(null);
}
// 处理 nextStatusList 字段
Object nextStatusList = policyFollow.getNextStatusList();
if (nextStatusList != null && !nextStatusList.toString().isEmpty()) {
......
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