Browse Source

fix: 入库单详情报错问题

zhongwei
liwen 3 months ago
parent
commit
deaf61a2a8
  1. 3
      hzims-service/assets/src/main/java/com/hnac/hzims/spare/service/impl/SpWarehouseOutServiceImpl.java

3
hzims-service/assets/src/main/java/com/hnac/hzims/spare/service/impl/SpWarehouseOutServiceImpl.java

@ -16,6 +16,7 @@ import com.hnac.hzims.spare.service.*;
import com.hnac.hzims.spare.vo.SpWarehouseOutVO; import com.hnac.hzims.spare.vo.SpWarehouseOutVO;
import com.hnac.hzims.spare.vo.WtSpBasicVO; import com.hnac.hzims.spare.vo.WtSpBasicVO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.apache.commons.lang3.ObjectUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springblade.core.log.exception.ServiceException; import org.springblade.core.log.exception.ServiceException;
@ -258,6 +259,7 @@ public class SpWarehouseOutServiceImpl extends ServiceImpl<SpWarehouseOutMapper,
List<WtSpBasicVO> basicVOList = new ArrayList<>(); List<WtSpBasicVO> basicVOList = new ArrayList<>();
for (int i = 0; i < basicList.size(); i++) { for (int i = 0; i < basicList.size(); i++) {
WtSpBasicEntity spBasicEntity = basicService.getById(basicList.get(i).getSpBasicId()); WtSpBasicEntity spBasicEntity = basicService.getById(basicList.get(i).getSpBasicId());
if (ObjectUtils.isNotEmpty(spBasicEntity)) {
WtSpBasicVO spBasicVO = new WtSpBasicVO(); WtSpBasicVO spBasicVO = new WtSpBasicVO();
spBasicVO.setId(spBasicEntity.getId()); spBasicVO.setId(spBasicEntity.getId());
spBasicVO.setCode(spBasicEntity.getCode()); spBasicVO.setCode(spBasicEntity.getCode());
@ -269,6 +271,7 @@ public class SpWarehouseOutServiceImpl extends ServiceImpl<SpWarehouseOutMapper,
spBasicVO.setCreateTime(spBasicEntity.getCreateTime()); spBasicVO.setCreateTime(spBasicEntity.getCreateTime());
basicVOList.add(spBasicVO); basicVOList.add(spBasicVO);
} }
}
spWarehouseOutVO.setBasicVOList(basicVOList); spWarehouseOutVO.setBasicVOList(basicVOList);
return spWarehouseOutVO; return spWarehouseOutVO;
} }

Loading…
Cancel
Save