Browse Source

Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java
dist.1.3.0
pref_mail@163.com 5 months ago
parent
commit
5c036a1c1e
  1. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.java
  2. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml
  3. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java
  4. 62
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

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

@ -197,7 +197,7 @@ public interface DistrilbutionBillLadingMapper extends BaseMapper<DistrilbutionB
* @param nickName
* @return
*/
List<WaybillLogDTO> getWaybillSignforData(@Param("param")Long id,@Param("userId") Long userId,@Param("nickName") String nickName);
List<WaybillLogDTO> getWaybillSignforData(@Param("id")Long id,@Param("userId") Long userId,@Param("nickName") String nickName);
// Page<DistrilbutionBillLadingAppVO> getInventoryPage(IPage<Object> page, DistrilbutionBillLadingEntity distrilbutionBillLadingEntity);

6
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml

@ -984,7 +984,7 @@
ldsld.id
</select>
<select id="getAllBillLadingByView" resultType="com.logpm.distribution.vo.DistrilbutionBillLadingVO">
SELECT id,
SELECT id,
orderCode,
serviceNumber,
consigneeUnit,
@ -1020,9 +1020,9 @@
GROUP_CONCAT( DISTINCT t.loadingUser ) AS loadingUser,
GROUP_CONCAT( DISTINCT t.signUser ) AS signUser,
GROUP_CONCAT( DISTINCT t.signOrderCode ) AS signOrderCode,
3 AS type,
4 AS type,
#{userId} AS userId,
#{userName} AS nickName
#{nickName} AS nickName
FROM
(
SELECT

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java

@ -1870,6 +1870,10 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
.eq(DistrilbutionBillPackageEntity::getBillLadingId, l)
.in(DistrilbutionBillPackageEntity::getParceListId, packageIds)
);
//增加释放日志
}
String collect = distributionParcelListEntities.stream().map(DistributionParcelListEntity::getOrderCode).distinct().collect(Collectors.joining(","));
distributionStockArticleService.maintenanceOrderInfo(collect, warehouseId);

62
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

@ -109,6 +109,7 @@ import com.logpm.oldproject.dto.SignPushDataUnitDTO;
import com.logpm.oldproject.feign.IOldSignPushClient;
import com.logpm.trunkline.dto.WaybillLogDTO;
import com.logpm.trunkline.feign.ITrunklinePackageTrackLogClient;
import com.logpm.trunkline.feign.ITrunklineWaybillTrackClient;
import com.logpm.warehouse.feign.IWarehouseUpdownTypeClient;
import com.sun.org.apache.xpath.internal.operations.Bool;
import lombok.extern.log4j.Log4j2;
@ -126,6 +127,7 @@ import org.springblade.common.constant.order.OrderStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageLoadingStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageReservationStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageStockupStatusConstant;
import org.springblade.common.constant.pda.PdaAudioLingoStatus;
import org.springblade.common.constant.reservation.ReservationOrderStatusConstant;
import org.springblade.common.constant.reservation.ReservationPackageStatusConstant;
@ -254,6 +256,9 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
@Autowired
private IDistributionNodeWorkService iDistributionNodeWorkService;
@Autowired
private ITrunklineWaybillTrackClient trunklineWaybillTrackClient;
@Override
public IPage<DistrilbutionBillLadingVO> selectDistrilbutionBillLadingPage(IPage<DistrilbutionBillLadingVO> page, DistrilbutionBillLadingVO distrilbutionBillLading) {
@ -3614,7 +3619,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
// }
if (integer != sum) {
//存在资源释放操作
distributionAsyncService.releaseBillLadingResource(Long.parseLong(s), myCurrentWarehouse.getId());
releaseBillLadingResource(Long.parseLong(s), myCurrentWarehouse,distrilbutionBillLadingEntity.getPickupBatch());
}
try {
if (sum > 0){
@ -3697,8 +3702,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
// 回传老系统自提数据
sendOldSystem(Long.parseLong(s));
//整理运单信息
// List<WaybillLogDTO> mapList = baseMapper.getWaybillSignforData(billLadingEntity.getId(),AuthUtil.getUser().getUserId(),AuthUtil.getUser().getNickName());
handletrunklineWaybillSignLog(billLadingEntity.getId());
}
// 回传工厂数据
sendFactory(myCurrentWarehouse, parcelListIds);
@ -3730,6 +3734,58 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
}
}
private void handletrunklineWaybillSignLog(Long id) {
List<WaybillLogDTO> mapList = baseMapper.getWaybillSignforData(id, AuthUtil.getUser().getUserId(), AuthUtil.getUser().getNickName());
if (!mapList.isEmpty()) {
for (WaybillLogDTO waybillLogDTO : mapList) {
trunklineWaybillTrackClient.addSignWaybillLog(waybillLogDTO);
}
}
}
public void releaseBillLadingResource(Long l, BasicdataWarehouseEntity warehouse,String pickupBatch) {
List<DistrilbutionBillPackageEntity> list = distrilbutionBillPackageService.list(Wrappers.<DistrilbutionBillPackageEntity>query().lambda()
.eq(DistrilbutionBillPackageEntity::getBillLadingId, l)
.ne(DistrilbutionBillPackageEntity::getPacketBarStatus, 2)
);
if (Func.isNotEmpty(list)) {
List<Long> ids = list.stream().map(DistrilbutionBillPackageEntity::getParceListId).collect(Collectors.toList());
//查询包件
List<DistributionParcelListEntity> distributionParcelListEntities = distributionParcelListService.listByIds(ids);
List<Long> packageIds = distributionParcelListEntities.stream().filter(f -> !OrderPackageLoadingStatusConstant.yizhuangche.getValue().equals(f.getOrderPackageLoadingStatus()) || !OrderPackageStatusConstant.yiqianshou.getValue().equals(f.getOrderPackageStatus())).map(DistributionParcelListEntity::getId).collect(Collectors.toList());
if (Func.isNotEmpty(packageIds)) {
distributionParcelListService.update(new UpdateWrapper<DistributionParcelListEntity>().lambda()
.set(DistributionParcelListEntity::getOrderPackageReservationStatus, OrderPackageReservationStatusConstant.daiyuyue.getValue())
.set(DistributionParcelListEntity::getOrderPackageLoadingStatus, OrderPackageLoadingStatusConstant.weizhuancghe.getValue())
.set(DistributionParcelListEntity::getOrderPackageStatus, OrderPackageStatusConstant.yiruku.getValue())
.set(DistributionParcelListEntity::getOrderPackageStockupStatus, OrderPackageStockupStatusConstant.daibeihuo.getValue())
.in(DistributionParcelListEntity::getId, packageIds)
);
distrilbutionBillPackageService.update(new UpdateWrapper<DistrilbutionBillPackageEntity>().lambda()
.set(DistrilbutionBillPackageEntity::getPacketBarStatus, 2)
.eq(DistrilbutionBillPackageEntity::getBillLadingId, l)
.in(DistrilbutionBillPackageEntity::getParceListId, packageIds)
);
List<JSONObject> logList = new ArrayList<>();
for (DistributionParcelListEntity distributionParcelListEntity : distributionParcelListEntities) {
String content = "包件在" + warehouse.getName() + "由" + AuthUtil.getNickName() + "确认自提,取消包件计划,操作方式:复核自提单包件释放,自提批次号:" + pickupBatch;
JSONObject logJS = handleLogJSONObject(warehouse, AuthUtil.getUser(), distributionParcelListEntity.getOrderPackageCode(), content, WorkNodeEnums.CANCEL_BILLOFLADING.getCode());
logList.add(logJS);
}
if (!logList.isEmpty()) {
trunklinePackageTrackLogClient.addPackageTrackLog(logList);
}
}
String collect = distributionParcelListEntities.stream().map(DistributionParcelListEntity::getOrderCode).distinct().collect(Collectors.joining(","));
distributionStockArticleService.maintenanceOrderInfo(collect, warehouse.getId());
//维护自提单订单信息
distrilbutionBillStockService.maintenanceOrderInfo(l);
}
}
private void sendFactory(BasicdataWarehouseEntity myCurrentWarehouse, Set<Long> parcelListIds) {
try {
// ladingScanEntities中的包件id数据封装为set

Loading…
Cancel
Save