Browse Source

1.改单修改目的仓,需要修改所有该运单的包件的中转状态和目的仓

2.运单列表查询优化
master
zhenghaoyu 8 months ago
parent
commit
bdb35fed9d
  1. 3
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java
  2. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java
  3. 15
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  4. 10
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/WarehouseWaybillDTO.java
  5. 12
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml
  6. 4
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java

3
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java

@ -164,4 +164,7 @@ public interface IDistributionParcelListClient {
@PostMapping(API_PREFIX+"/clearParceListWaybillByAdvanceIds")
void clearParceListWaybillByAdvanceIds(@RequestBody List<Long> advanceIds);
@GetMapping(API_PREFIX+"/findListByWaybillId")
List<DistributionParcelListEntity> findListByWaybillId(@RequestParam Long waybillId);
}

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java

@ -376,4 +376,12 @@ public class DistributionParcelListClient implements IDistributionParcelListClie
public void clearParceListWaybillByAdvanceIds(List<Long> advanceIds) {
distributionParcelListService.clearParceListWaybillByAdvanceIds(advanceIds);
}
@Override
public List<DistributionParcelListEntity> findListByWaybillId(Long waybillId) {
QueryWrapper<DistributionParcelListEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("waybill_id",waybillId);
return distributionParcelListService.list(queryWrapper);
}
}

15
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java

@ -3548,6 +3548,8 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
log.info("###################verifyUpdateData: 验证改单数据");
StringBuilder stringBuilder = new StringBuilder();
Long waybillId = waybillEntity.getId();
String newDeparture = openOrderDTO.getDeparture();
String departure = waybillEntity.getDeparture();
if(!ObjectUtil.equals(newDeparture,departure)){
@ -3600,6 +3602,19 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
stringBuilder.append("目的仓:").append(departureWarehouseName).append("-->").append(newDestinationWarehouseName).append(";");
waybillEntity.setDestinationWarehouseId(newDestinationWarehouseId);
waybillEntity.setDestinationWarehouseName(newDestinationWarehouseName);
//查询所有该运单的包件
List<DistributionParcelListEntity> parcelListEntityList = distributionParcelListClient.findListByWaybillId(waybillId);
parcelListEntityList.forEach(parcelListEntity -> {
Long warehouseId = parcelListEntity.getWarehouseId();
parcelListEntity.setAcceptWarehouseId(newDestinationWarehouseId);
parcelListEntity.setAcceptWarehouseName(newDestinationWarehouseName);
if(warehouseId.equals(newDestinationWarehouseId)){
parcelListEntity.setIsTransfer(0);
}else{
parcelListEntity.setIsTransfer(1);
}
});
distributionParcelListClient.updateList(parcelListEntityList);
}
Long newShipperId = openOrderDTO.getShipperId();
String newShipper = openOrderDTO.getShipper();

10
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/WarehouseWaybillDTO.java

@ -57,4 +57,14 @@ public class WarehouseWaybillDTO extends WarehouseWaybillEntity {
private Date createTimeStartDate;
private Date createTimeEndDate;
private String abolishTimeStartStr;
private String abolishTimeEndStr;
private Date abolishTimeStartDate;
private Date abolishTimeEndDate;
private String freezeTimeStartStr;
private String freezeTimeEndStr;
private Date freezeTimeStartDate;
private Date freezeTimeEndDate;
}

12
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml

@ -263,6 +263,18 @@
<if test="param.totalVolume != null">
and total_volume = #{param.totalVolume}
</if>
<if test="param.abolishTimeStartDate != null">
and abolish_time &gt;= #{param.abolishTimeStartDate}
</if>
<if test="param.abolishTimeEndDate != null">
and abolish_time &lt;= #{param.abolishTimeEndDate}
</if>
<if test="param.freezeTimeStartDate != null">
and freeze_time &gt;= #{param.freezeTimeStartDate}
</if>
<if test="param.freezeTimeEndDate != null">
and freeze_time &lt;= #{param.freezeTimeEndDate}
</if>
order by create_time desc
</select>

4
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWaybillServiceImpl.java

@ -674,6 +674,10 @@ public class WarehouseWaybillServiceImpl extends BaseServiceImpl<WarehouseWaybil
waybillDTO.setDocumentMakingTimeEndDate(CommonUtil.getEndByDateStr(waybillDTO.getDocumentMakingTimeEndStr()));
waybillDTO.setCreateTimeStartDate(CommonUtil.getStartByDateStr(waybillDTO.getCreateTimeStartStr()));
waybillDTO.setCreateTimeEndDate(CommonUtil.getEndByDateStr(waybillDTO.getCreateTimeEndStr()));
waybillDTO.setAbolishTimeStartDate(CommonUtil.getStartByDateStr(waybillDTO.getAbolishTimeStartStr()));
waybillDTO.setAbolishTimeEndDate(CommonUtil.getEndByDateStr(waybillDTO.getAbolishTimeEndStr()));
waybillDTO.setFreezeTimeStartDate(CommonUtil.getStartByDateStr(waybillDTO.getFreezeTimeStartStr()));
waybillDTO.setFreezeTimeEndDate(CommonUtil.getEndByDateStr(waybillDTO.getFreezeTimeEndStr()));
IPage<WarehouseWaybillVO> pageList = baseMapper.pageList(page, waybillDTO);
List<WarehouseWaybillVO> records = pageList.getRecords();

Loading…
Cancel
Save