结算报错bug修改

This commit is contained in:
liang.chao 2024-12-10 16:22:42 +08:00
parent 223d0081b7
commit 71916e3a23
1 changed files with 3 additions and 2 deletions

View File

@ -15,6 +15,7 @@ import com.bonus.sgzb.material.domain.TmTask;
import com.bonus.sgzb.material.mapper.SltAgreementInfoMapper; import com.bonus.sgzb.material.mapper.SltAgreementInfoMapper;
import com.bonus.sgzb.material.service.SltAgreementInfoService; import com.bonus.sgzb.material.service.SltAgreementInfoService;
import com.bonus.sgzb.material.vo.GlobalContants; import com.bonus.sgzb.material.vo.GlobalContants;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -254,10 +255,10 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
loseList.addAll(oneOfList); loseList.addAll(oneOfList);
} }
for (SltAgreementInfo bean : loseList) { for (SltAgreementInfo bean : loseList) {
if (bean.getBuyPrice() == null) { if (StringUtils.isBlank(bean.getBuyPrice())) {
bean.setBuyPrice("0"); bean.setBuyPrice("0");
} }
if (bean.getNum() == null) { if (StringUtils.isBlank(bean.getNum())) {
bean.setNum("0"); bean.setNum("0");
} }
BigDecimal buyPrice = new BigDecimal(bean.getBuyPrice()); BigDecimal buyPrice = new BigDecimal(bean.getBuyPrice());