Browse Source

修改备货报错

master
pref_mail@163.com 11 months ago
parent
commit
bdb901a569
  1. 2
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupListVO.java
  2. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml
  3. 16
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

2
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupListVO.java

@ -8,7 +8,7 @@ import java.io.Serializable;
public class DistributionStockupListVO implements Serializable {
private Long id;//预约单id
private Long reservationId;//预约单id(自提Id)
private String reservationId;//预约单id(自提Id)
private String reservation;//预约单id
private Integer typeService;//服务类型

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml

@ -815,7 +815,7 @@
</select>
<select id="selectStockupPageInfo" resultType="com.logpm.distribution.vo.DistributionStockupListVO">
select GROUP_CONCAT(ldsi.reservation_id SEPARATOR ',') reservationId, lds.stockup_code
select GROUP_CONCAT(ldsi.reservation_id SEPARATOR ',') reservation, lds.stockup_code
stockupCode,lds.type_service typeService,
lds.stockup_status stockupStatus,lds.stockup_area stockupArea
from logpm_distribution_stockup lds

16
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

@ -398,13 +398,18 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
map.put("typeServiceStr", vo.getTypeServiceStr());
map.put("typeService", vo.getTypeService());
map.put("stockupArea", vo.getStockupArea());
map.put("reservationId", vo.getReservationId());
map.put("reservation", vo.getReservationId());
map.put("reservationId", vo.getReservationId());
map.put("stockupStatusStr", vo.getStockupStatusStr());
//查询客户数据
if (vo.getTypeService().equals(3)) {
//自
String[] split = vo.getReservation().split(",");
List<DistributionStockupListVO> list = baseMapper.selectStockupClientInfoSelf(stockupDTO);
list.forEach(i -> {
QueryWrapper<DistributionReservationZeroPackageEntity> queryWrapper = new QueryWrapper<>();
//查询有没有零担数据
@ -419,8 +424,10 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
i.setPlanNum(0);
}
//没有
List<DistributionStockPackageVO> list2 = distrilbutionBillStockService.listPackageSelf(i.getReservationId());
for (String s : split) {
List<DistributionStockPackageVO> list2 = distrilbutionBillStockService.listPackageSelf(Long.parseLong(s));
i.setPlanNum(i.getPlanNum() + list2.size());
}
List<DistributionStockEntity> listStock = distributionStockService.list(Wrappers.<DistributionStockEntity>query().lambda()
.eq(DistributionStockEntity::getBillLadingId, i.getReservationId())
.eq(DistributionStockEntity::getStockupId, stockupDTO.getStockupId())
@ -432,7 +439,10 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
i.setStockupNum(0);
}
});
map.put("orderList", list);
} else {
//商 ,市
@ -464,7 +474,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
queryWrapper.in("zero_package_status", "1", "3");
List<DistributionReservationZeroPackageEntity> list1 = reservationZeroPackageService.list(queryWrapper);
intToStrDistributionStockupListVO(distributionStockupListVO);
distributionStockupListVO.setReservationId(Long.parseLong(split[i]));
distributionStockupListVO.setReservationId(stockupDTO.getReservationId() + "");
distributionStockupListVO.setPlanNum(distributionStockupListVO.getPlanNum() + list1.stream().mapToInt(DistributionReservationZeroPackageEntity::getQuantity).sum());
List<DistributionStockEntity> list2 = distributionStockService.list(Wrappers.<DistributionStockEntity>query().lambda()
.eq(DistributionStockEntity::getReservationId, stockupDTO.getReservationId())

Loading…
Cancel
Save