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