Browse Source

修复待签收列表导出

dev
pref_mail@163.com 2 months ago
parent
commit
71b69be640
  1. 22
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/dto/ReseverationAnyTypeNumberDTO.java
  2. 12
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java
  3. 3
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/WarehouseLeasingServiceImpl.java
  4. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionLoadscanMapper.java
  5. 21
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionLoadscanMapper.xml
  6. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.java
  7. 24
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  8. 237
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  9. 2
      blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/impl/MapWarehouseServiceImpl.java

22
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/dto/ReseverationAnyTypeNumberDTO.java

@ -0,0 +1,22 @@
package com.logpm.distribution.dto;
import lombok.Data;
/**
* 根据预约Id查询出来的数量
*/
@Data
public class ReseverationAnyTypeNumberDTO {
/**
* 预约id
*/
private Long reservationId;
/**
* 预约数量
*/
private Integer num;
}

12
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java

@ -101,7 +101,7 @@ public class DistributionParcelListVO extends DistributionParcelListEntity {
*/
private String scanStatus;
/**
* 扫描方式
* 仓库ID
*/
private List<Long> warehouseIdList;
@ -111,15 +111,14 @@ public class DistributionParcelListVO extends DistributionParcelListEntity {
private Long mallId;
/**
* 商场id
* 预约单ID
*/
private Long reservationId;
/**
* 商场id
*/
private String genre;
/**
* 商场id
* 是否是零担
*/
private String isZero;
@ -161,31 +160,26 @@ public class DistributionParcelListVO extends DistributionParcelListEntity {
* 预约号
*/
@ApiModelProperty(value = "预约号")
@TableField(exist = false)
private String reservationCode;
/**
* 装车时间
*/
@ApiModelProperty(value = "装车时间")
@TableField(exist = false)
private String scanTime;
/**
* 配送车次
*/
@ApiModelProperty(value = "配送车次")
@TableField(exist = false)
private String dvehicleName;
/**
*签收车次
*/
@ApiModelProperty(value = "签收车次")
@TableField(exist = false)
private String zvehicleName;
/**
*配送单号
*/
@ApiModelProperty(value = "配送单号")
@TableField(exist = false)
private String noteNumber;
/**
* 服务类型

3
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/WarehouseLeasingServiceImpl.java

@ -43,6 +43,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
@ -122,7 +123,7 @@ public class WarehouseLeasingServiceImpl extends BaseServiceImpl<WarehouseLeasin
divide = acreage;
}
if (ObjectUtil.isNotEmpty(warehouseEntity.getSeating())) {
BigDecimal singleStorageArea = divide.divide(new BigDecimal(warehouseEntity.getSeating()), 2, BigDecimal.ROUND_UP);
BigDecimal singleStorageArea = divide.divide(new BigDecimal(warehouseEntity.getSeating()), 2, RoundingMode.UP);
residualAreaVO.setSingleStorageArea(Convert.toStr(singleStorageArea));
}
}

5
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionLoadscanMapper.java

@ -19,6 +19,7 @@ package com.logpm.distribution.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.dto.ReseverationAnyTypeNumberDTO;
import com.logpm.distribution.dto.app.DistrilbutionloadingscanDTO;
import com.logpm.distribution.entity.DistributionLoadscanEntity;
import com.logpm.distribution.excel.DistributionLoadscanExcel;
@ -201,4 +202,8 @@ public interface DistributionLoadscanMapper extends BaseMapper<DistributionLoads
* @return
*/
DistributionLoadscanEntity findLoadDataByRelationIdAndParcelListId(@Param("reservationId") Long reservationId, @Param("parcelListId")Long parcelListId);
List<ReseverationAnyTypeNumberDTO> selectAbnormalLoadingByReservationIds(@Param("reservationIds") List<Long> reservationIds);
List<ReseverationAnyTypeNumberDTO> selectAbnormalSigningByReservationIds(@Param("reservationIds") List<Long> reservationIdList);
}

21
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionLoadscanMapper.xml

@ -162,4 +162,25 @@
WHERE
reservation_id = #{reservationId} AND package_id = #{parcelListId}
</select>
<select id="selectAbnormalLoadingByReservationIds"
resultType="com.logpm.distribution.dto.ReseverationAnyTypeNumberDTO">
SELECT reservation_id as reservationId
,COUNT(loaded_nub) as num FROM logpm_distribution_loadscan WHERE is_abnormal_loading = 2 AND
reservation_id in
<foreach collection="reservationIds" item="reservationId" open="(" separator="," close=")">
#{reservationId}
</foreach>
group by reservation_id
</select>
<select id="selectAbnormalSigningByReservationIds"
resultType="com.logpm.distribution.dto.ReseverationAnyTypeNumberDTO">
SELECT reservation_id as reservationId,COUNT(received_quantity) as num FROM logpm_distribution_loadscan WHERE is_abnormal_signing = 2 AND signfor_state = 2
AND reservation_id in
<foreach collection="reservationIds" item="reservationId" open="(" separator="," close=")">
#{reservationId}
</foreach>
group by reservation_id
</select>
</mapper>

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

@ -448,4 +448,6 @@ public interface DistributionReservationMapper extends BaseMapper<DistributionRe
* @return
*/
List<DistributionAppStockUpTrayDetailVO> deliveryTrayDetailList(@Param("reservationId") Long reservationId);
List<DisStockListDetailEntity> selectInventoryListByReservations(@Param("reservationIds") List<Long> shiPeireservationIdList);
}

24
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml

@ -1903,12 +1903,14 @@
resultType="com.logpm.distribution.vo.DistributionParcelListVO">
SELECT
ldpl.*,
ldrs.reservation_id AS reservationId
ldsa.mall_id AS mallId,
ldrs.reservation_id
FROM
logpm_distribution_reservation_package AS ldrs
LEFT JOIN logpm_distribution_parcel_list AS ldpl ON ldrs.parce_list_id = ldpl.id
INNER JOIN logpm_distribution_parcel_list AS ldpl ON ldrs.parce_list_id = ldpl.id
LEFT JOIN logpm_distribution_stock_article As ldsa ON ldpl.stock_article_id = ldsa.id
<where>
ldrs.packet_bar_status IN ('1','3') AND ldpl.conditions = 1
ldrs.packet_bar_status IN ('1','3') AND ldpl.conditions = 1 AND ldpl.is_transfer = 0
AND ldrs.reservation_id IN
<foreach collection="reservationIds" item="reservationId" open="(" separator="," close=")">
#{reservationId}
@ -2068,4 +2070,20 @@
AND stock_article_id = #{orderId}
AND parcel_list_id = #{packageId}
</select>
<select id="selectInventoryListByReservations"
resultType="com.logpm.distribution.entity.DisStockListDetailEntity">
SELECT
ldsld.*
FROM
logpm_distribution_reservation AS ldr
INNER JOIN logpm_dis_stock_list_detail AS ldsld ON ldr.id = ldsld.reservation_id
WHERE
ldsld.stock_package_status in ('1','3')
and ldr.id in
<foreach collection="reservationIds" item="reservation" open="(" separator="," close=")">
#{reservation}
</foreach>
</select>
</mapper>

237
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

@ -37,15 +37,7 @@ import com.logpm.basicdata.feign.IBasicdataClientClient;
import com.logpm.basicdata.feign.IBasicdataDriverArteryClient;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.distribution.bean.Resp;
import com.logpm.distribution.dto.DistributionAddvalueDTO;
import com.logpm.distribution.dto.DistributionAddvaluePackageDTO;
import com.logpm.distribution.dto.DistributionDeliverySelfDTO;
import com.logpm.distribution.dto.DistributionNumberDetailDTO;
import com.logpm.distribution.dto.DistributionParcelNumberDTO;
import com.logpm.distribution.dto.DistributionSignPrintDTO;
import com.logpm.distribution.dto.DistributionSignforDTO;
import com.logpm.distribution.dto.DistributionSignforExcelDTO;
import com.logpm.distribution.dto.DistrilbutionAppsignforDTO;
import com.logpm.distribution.dto.*;
import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO;
import com.logpm.distribution.entity.DisStockListDetailEntity;
import com.logpm.distribution.entity.DistributionAddvaluePackageEntity;
@ -838,7 +830,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
// 推送作业节点数据
NodeFanoutMsg<org.springblade.common.model.DistributionReCheckSignVO> nodeFanoutMsg = buildNodeFanoutMsgByReCheck(deliveryListEntity,reservationEntity);
NodeFanoutMsg<org.springblade.common.model.DistributionReCheckSignVO> nodeFanoutMsg = buildNodeFanoutMsgByReCheck(deliveryListEntity, reservationEntity);
distributionNodeWorkService.signForCheck(nodeFanoutMsg, AuthUtil.getUser());
// // 复核作业节点推送
@ -864,7 +856,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionPlanLogService.save(distributionPlanLogEntity);
}
private NodeFanoutMsg<org.springblade.common.model.DistributionReCheckSignVO> buildNodeFanoutMsgByReCheck(DistributionDeliveryListEntity deliveryListEntity,DistributionReservationEntity reservationEntity) {
private NodeFanoutMsg<org.springblade.common.model.DistributionReCheckSignVO> buildNodeFanoutMsgByReCheck(DistributionDeliveryListEntity deliveryListEntity, DistributionReservationEntity reservationEntity) {
// 查询当前预约单下的定制品和零担签收数据
NodeFanoutMsg<org.springblade.common.model.DistributionReCheckSignVO> nodeFanoutMsg = new NodeFanoutMsg();
@ -894,7 +886,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
for (DistributionLoadscanEntity distributionLoadscanEntity : list) {
PackageData packageData = new PackageData();
packageData.setSignTime(org.springblade.core.tool.utils.DateUtil.parse(distributionLoadscanEntity.getSigningTime(),"yyyy-MM-dd HH:mm:ss"));
packageData.setSignTime(org.springblade.core.tool.utils.DateUtil.parse(distributionLoadscanEntity.getSigningTime(), "yyyy-MM-dd HH:mm:ss"));
packageData.setSignUser(distributionLoadscanEntity.getSigningUser());
// 增加装车扫描人
packageData.setLoadingUserName(distributionLoadscanEntity.getScanUser());
@ -1148,7 +1140,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
jsonObjects.add(jsonObject);
}
//修改对应库存品包件的签收数量
DisStockListDetailEntity disStockListDetailEntity = inventoryPackage.get(0);
@ -1371,7 +1362,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
return R.fail("请联系管理员");
}
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
if (Objects.isNull(myCurrentWarehouse)){
if (Objects.isNull(myCurrentWarehouse)) {
return R.fail("请选择操作仓库");
}
@ -1448,14 +1439,14 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
loadingId = distributionDeliverySelfVO.getId();
driverId = distributionDeliverySelfVO.getDriverId();
vehicId = distributionDeliverySelfVO.getVehicleId();
}else {
} else {
return R.fail("查询司机配置错误");
}
}
} else if ("2".equals(deliveryListEntity.getKind())) {
//外协
DistributionDeliverySelfEntity deliverySelfEntity = this.getDriver(deliveryListEntity, user, false);
if (!Objects.isNull(deliverySelfEntity)){
if (!Objects.isNull(deliverySelfEntity)) {
driverPhone = deliverySelfEntity.getDriverPhone();
driverName = deliverySelfEntity.getDriverName();
vehicleNub = deliverySelfEntity.getVehicleNub();
@ -1566,7 +1557,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
// 发送作业节点
// 作业节点推送
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildDistributionSignforVOByZero(deliveryListEntity, pushList,OperatModeConstant.CLERK, signforTime);
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildDistributionSignforVOByZero(deliveryListEntity, pushList, OperatModeConstant.CLERK, signforTime);
distributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser());
@ -1690,7 +1681,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (Func.isNotEmpty(distributionDeliverySelfEntity.getDriverPhone())) {
unLoadscanEntity.setDriverPhone(distributionDeliverySelfEntity.getDriverPhone());
}
if ("".equals(deliveryListEntity.getKind())){
if ("".equals(deliveryListEntity.getKind())) {
unLoadscanEntity.setDriverId(distributionDeliverySelfEntity.getDriverId());
unLoadscanEntity.setVehicleId(distributionDeliverySelfEntity.getVehicleId());
}
@ -1871,14 +1862,14 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
return R.fail("请联系管理员维护!!!");
}
Map<String,List> map = new HashMap<>();
Map<String, List> map = new HashMap<>();
List<Long> list = Func.toLongList(distrilbutionloadingscanDTO.getZeroPackageIds());
//查询是否进行装车或者签收
List<DistributionLoadscanEntity> loadscanEntityList = distributionLoadscanService.list(Wrappers.<DistributionLoadscanEntity>query().lambda()
.eq(DistributionLoadscanEntity::getReservationId, distrilbutionloadingscanDTO.getReservationId())
.eq(DistributionLoadscanEntity::getReservationId, distrilbutionloadingscanDTO.getReservationId())
// .eq(DistributionLoadscanEntity::getDriverId, distrilbutionloadingscanDTO.getDeliveryId())
.in(DistributionLoadscanEntity::getPackageId, list)
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())
.in(DistributionLoadscanEntity::getPackageId, list)
.ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue())
);
if (Func.isNotEmpty(loadscanEntityList)) {
List<Long> orderIds = loadscanEntityList.stream().map(DistributionLoadscanEntity::getOrderId).distinct().collect(Collectors.toList());
@ -1954,8 +1945,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
// 发送零担作业节点
// 作业节点推送
NodeFanoutMsg<ReservationVO> nodeFanoutMsg = distributionReservationService.buildNodeFanoutMsgByReservation(reservationEntity,map,BizOperationEnums.REMOVE);
distributionNodeWorkService.planReservation(nodeFanoutMsg,AuthUtil.getUser());
NodeFanoutMsg<ReservationVO> nodeFanoutMsg = distributionReservationService.buildNodeFanoutMsgByReservation(reservationEntity, map, BizOperationEnums.REMOVE);
distributionNodeWorkService.planReservation(nodeFanoutMsg, AuthUtil.getUser());
} else {
@ -2684,12 +2675,50 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}
//获取当前登录人仓库
//获取当前登录人仓库
List<BasicdataWarehouseEntity> myWatchWarehouse = basicdataWarehouseClient.getMyWatchWarehouse();
//取出id
List<Long> collect = myWatchWarehouse.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList());
distributionSignforVO.setWarehouseIdList(collect);
List<DistributionSignforVO> distributionSignforVOS = baseMapper.selectDistributionSignforPage(null, distributionSignforVO);
// 获取预约单ID集合
List<Long> reservationIdList = distributionSignforVOS.stream().map(DistributionSignforVO::getReservationId).collect(Collectors.toList());
// 批量查询
List<DistributionParcelListVO> distributionParcelListEntitiesAll = distributionReservationMapper.selectPackageListByReservationIds(reservationIdList);
// 通过预约单ID进行分组
Map<Long, List<DistributionParcelListVO>> map = distributionParcelListEntitiesAll.stream().collect(Collectors.groupingBy(DistributionParcelListVO::getReservationId));
List<DisStockListDetailEntity> allStockList = disStockListDetailService.list(Wrappers.<DisStockListDetailEntity>query().lambda()
.in(DisStockListDetailEntity::getReservationId, reservationIdList)
);
// 通过预约ID分组
Map<Long, List<DisStockListDetailEntity>> stockMap = allStockList.stream().collect(Collectors.groupingBy(DisStockListDetailEntity::getReservationId));
List<ReseverationAnyTypeNumberDTO> abnormalLoadingList = distributionLoadscanMapper.selectAbnormalLoadingByReservationIds(reservationIdList);
// 通过预约ID分组
Map<Long, List<ReseverationAnyTypeNumberDTO>> abnormalMap = abnormalLoadingList.stream().filter(d -> d.getReservationId()!=null).collect(Collectors.groupingBy(ReseverationAnyTypeNumberDTO::getReservationId));
List<ReseverationAnyTypeNumberDTO> abnormalSignList = distributionLoadscanMapper.selectAbnormalSigningByReservationIds(reservationIdList);
// 通过预约ID分组
Map<Long, List<ReseverationAnyTypeNumberDTO>> abnormalSignMap = abnormalSignList.stream().filter(d-> d.getReservationId()!=null).collect(Collectors.groupingBy(ReseverationAnyTypeNumberDTO::getReservationId));
// 获取市配的
List<Long> shiPeireservationIdList = distributionSignforVOS.stream().filter(d -> d.getDeliveryType().equals(DistributionTypeConstant.shipie.getValue())).map(DistributionSignforVO::getReservationId).collect(Collectors.toList());
List<DisStockListDetailEntity> allDisStockListDetailEntities = distributionReservationMapper.selectInventoryListByReservations(shiPeireservationIdList);
// 通过预约ID分组
Map<Long, List<DisStockListDetailEntity>> shiPeiMap = allDisStockListDetailEntities.stream().filter(d-> d.getReservationId()!=null).collect(Collectors.groupingBy(DisStockListDetailEntity::getReservationId));
distributionSignforVOS.forEach(d -> {
if (d.getDeliveryType().equals(DistributionTypeConstant.shipie.getValue())) {
d.setDeliveryTypeName(DistributionTypeConstant.shipie.getName());
@ -2698,20 +2727,16 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
} else {
d.setDeliveryTypeName("");
}
List<DistributionParcelListEntity> distributionParcelListEntities = distributionReservationMapper.selectPackageListByReservationId(d.getReservationId());
List<DistributionParcelListVO> distributionParcelListEntities = map.get(d.getReservationId());
//查询库存品信息
List<DisStockListDetailEntity> list = disStockListDetailService.list(Wrappers.<DisStockListDetailEntity>query().lambda()
.eq(DisStockListDetailEntity::getReservationId, d.getReservationId())
);
List<DisStockListDetailEntity> list = stockMap.get(d.getReservationId());
int weizhuangchejianshu = 0;
int weiqianshoujianshu = 0;
int zhuangchejianshu = 0;
int qianshoujianshu = 0;
if (Func.isNotEmpty(list) && list.size() > 0) {
if (Func.isNotEmpty(list)) {
zhuangchejianshu += list.stream().filter(f -> f.getStockLockingStatus().equals(InventoryLoadingStatusConstant.yizhuangche.getValue())).mapToInt(DisStockListDetailEntity::getNum).sum();
// weizhuangchejianshu += list.stream().filter(f -> f.getStockLockingStatus().equals(InventoryLoadingStatusConstant.weizhuangche.getValue())).mapToInt(DisStockListDetailEntity::getNum).sum();
qianshoujianshu += list.stream().filter(f -> f.getStockSignfoStatus().equals(InventorySigningStatusConstant.yiqianshou.getValue())).mapToInt(DisStockListDetailEntity::getNum).sum();
// weiqianshoujianshu += list.stream().filter(f -> f.getStockSignfoStatus().equals(InventorySigningStatusConstant.weiqianshou.getValue())).mapToInt(DisStockListDetailEntity::getNum).sum();
}
if (Func.isNotEmpty(distributionParcelListEntities)) {
weizhuangchejianshu += distributionParcelListEntities.stream().filter(f -> f.getOrderPackageLoadingStatus().equals(OrderPackageLoadingStatusConstant.weizhuancghe.getValue())).mapToInt(DistributionParcelListEntity::getQuantity).sum();
@ -2720,12 +2745,19 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
qianshoujianshu += distributionParcelListEntities.stream().filter(f -> f.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue())).mapToInt(DistributionParcelListEntity::getQuantity).sum();
}
//该客户的异常装车件数
Integer abnormalLoading = distributionLoadscanMapper.selectAbnormalLoadingByReservationId(d.getReservationId());
//该客户的异常签收件数
Integer abnormalSigning = distributionLoadscanMapper.selectAbnormalSigningByReservationId(d.getReservationId());
// DistributionLoadingNumDTO reservationSigningNum = distributionReservationMapper.selectReservationSigningNum(d.getReservationId());
Integer abnormalLoading = 0;
//该客户的异常装车件数
Integer abnormalSigning = 0;
List<ReseverationAnyTypeNumberDTO> reseverationAnyTypeNumberDTOS = abnormalMap.get(d.getReservationId());
if (Func.isNotEmpty(reseverationAnyTypeNumberDTOS)) {
abnormalLoading = reseverationAnyTypeNumberDTOS.get(0).getNum();
}
List<ReseverationAnyTypeNumberDTO> reseverationAnyTypeNumberDTOS1 = abnormalSignMap.get(d.getReservationId());
if (Func.isNotEmpty(reseverationAnyTypeNumberDTOS1)) {
abnormalSigning = reseverationAnyTypeNumberDTOS1.get(0).getNum();
}
if (d.getDeliveryType().equals(DistributionTypeConstant.shipie.getValue())) {
List<DisStockListDetailEntity> disStockListDetailEntities = distributionReservationMapper.selectInventoryListByReservation(d.getReservationId());
List<DisStockListDetailEntity> disStockListDetailEntities = shiPeiMap.get(d.getReservationId());
if (Func.isNotEmpty(disStockListDetailEntities)) {
//查询库存品未装车数
int inventoryuweizhuancghe = disStockListDetailEntities.stream().filter(f -> f.getStockLockingStatus().equals(OrderPackageLoadingStatusConstant.weizhuancghe.getValue())).mapToInt(DisStockListDetailEntity::getNum).sum();
@ -2750,10 +2782,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
String[] split = id.split(",");
distributionSignforVO.setIds(Arrays.asList(split));
}
// List<DistributionSignforVO> distributionSignforList = baseMapper.exportDistributionSignforOwn(distributionSignforVO);
List<DistributionSignforExcel> list = new ArrayList<>();
distributionSignforVOS.forEach(d -> {
// distributionSignfor.setTypeName(DictCache.getValue(DictEnum.YES_NO, DistributionSignfor.getType()));
DistributionSignforExcel signforExcel = new DistributionSignforExcel();
BeanUtils.copyProperties(d, signforExcel);
signforExcel.setOrderCode(d.getStockArticleId());
@ -2767,19 +2797,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
signforExcel.setReservationSignStatusName(d.getSijiSigningStatus());
signforExcel.setExamineStatusName(d.getWenyuanSigningStatus());
signforExcel.setDeliveryTime(d.getSignLoadingDate());
// signforExcel.setDeliveryTime(d.getSignLoadingDate());
// signforExcel.setConsignee();
// String value = DictBizCache.getValue(DictBizConstant.DISTRIBUTION_TYPE, d.getDeliveryType());
// signforExcel.setDeliveryTypeName(value);
// String value1 = DictBizCache.getValue(DictBizConstant.DISTRIBUTION_SIGNFOR_STATUS, d.getSigningStatus());
// signforExcel.setSigningStatusName(value1);
// String value2 = DictBizCache.getValue(DictBizConstant.DISTRIBUTION_SIGNFOR_STATUS, d.getDriverSigning());
// signforExcel.setDriverSigningName(value2);
// String value3 = DictBizCache.getValue(DictBizConstant.ADD_VALUE_SERVE_TYPE, d.getServeType());
// signforExcel.setDeliveryWayName(value3);
list.add(signforExcel);
});
return list;
@ -3218,7 +3235,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
private NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> buildDistributionSignforVOByStock(DistributionDeliveryListEntity distributionDeliveryListEntity,
List<DistributionLoadscaninvnEntity> pushList, String operatMode,Date signforTime) {
List<DistributionLoadscaninvnEntity> pushList, String operatMode, Date signforTime) {
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = new NodeFanoutMsg();
nodeFanoutMsg.setBizOperation(BizOperationEnums.ADD);
@ -3330,7 +3347,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
for (DistributionLoadscanEntity distributionParcelListEntity : pushList) {
PackageData packageData = new PackageData();
DistributionParcelListEntity distributionParcelListEntity1 = distributionParcelListService.getById(distributionParcelListEntity.getPackageId());
if(distributionParcelListEntity1.getConditions().equals(1)){
if (distributionParcelListEntity1.getConditions().equals(1)) {
// 包件
packageData.setPackageType(PackageTypeEnums.CMP);
packageData.setNumber(1);
@ -3341,7 +3358,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
data.add(packageData);
}
}else if(distributionParcelListEntity1.getConditions().equals(3)){
} else if (distributionParcelListEntity1.getConditions().equals(3)) {
// 零担
packageData.setPackageType(PackageTypeEnums.LTL);
packageData.setNumber(distributionLoadscanEntity.getReceivedQuantity());
@ -3564,8 +3581,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (isStrictLoading == Integer.parseInt(IsOrNoConstant.yes.getValue())) {
return R.fail("操作失败,存在未装车包件");
}
DistributionDeliverySelfEntity distributionDeliverySelfEntity = this.getDriver(deliveryListEntity, AuthUtil.getUser(),distributionDeliveryListService.judgeIsDriver(AuthUtil.getUser()));
if (Objects.isNull(distributionDeliverySelfEntity)){
DistributionDeliverySelfEntity distributionDeliverySelfEntity = this.getDriver(deliveryListEntity, AuthUtil.getUser(), distributionDeliveryListService.judgeIsDriver(AuthUtil.getUser()));
if (Objects.isNull(distributionDeliverySelfEntity)) {
return Resp.scanFail("查询司机信息错误...", "查询司机信息错误");
}
DistributionDeliveryListEntity listEntity = distributionDeliveryListMapper.selectById(distrilbutionloadingscanDTO.getDeliveryId());
@ -3679,7 +3696,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionDeliveryListService.maintenanceDeliveryInfo(distrilbutionloadingscanDTO.getDeliveryId());
// //维护签收异常状态
// this.maintenanceSignfor(distrilbutionloadingscanDTO.getReservationId());
distributionSignforMapper.autoDpdateSignfor(distributionReservationEntity.getId(),AuthUtil.getUser());
distributionSignforMapper.autoDpdateSignfor(distributionReservationEntity.getId(), AuthUtil.getUser());
// 推送作业节点
// 作业节点数据推送
@ -4133,7 +4150,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}
}
distributionSignforMapper.autoDpdateSignfor(signforEntity.getReservationId(),user);
distributionSignforMapper.autoDpdateSignfor(signforEntity.getReservationId(), user);
// 作业节点数据推送
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildDistributionSignforVO(distributionDeliveryListEntity, reservationEntity, pushList, OperatModeConstant.SCAN, signforTime);
@ -5116,7 +5133,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
String driverName = deliveryListEntity.getDriverName();
String vehicleName = deliveryListEntity.getVehicleName();
if(driver!=null){
if (driver != null) {
driverName = driver.getDriverName();
vehicleName = driver.getVehicleNub();
}
@ -5610,9 +5627,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}
Integer isStrictLoading = 0;
WarehouseConfigEntity warehouseConfig = warehouseConfigClient.getWarehouseConfig(myCurrentWarehouse.getId());
if (!Objects.isNull(warehouseConfig)){
if (!Objects.isNull(warehouseConfig)) {
//开启强制装车无法使用此功能
isStrictLoading = warehouseConfig.getIsStrictLoading() != null?warehouseConfig.getIsStrictLoading():0;
isStrictLoading = warehouseConfig.getIsStrictLoading() != null ? warehouseConfig.getIsStrictLoading() : 0;
}
List<DistributionLoadscanAbnormalEntity> abnormalEntities = distributionLoadscanAbnormalService.list(Wrappers.<DistributionLoadscanAbnormalEntity>query().lambda()
.eq(DistributionLoadscanAbnormalEntity::getReservationId, distributionSignfor.getReservationId())
@ -5653,8 +5670,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
isStrictLoading = warehouseConfig.getIsStrictLoading();
}
Boolean driver = distributionDeliveryListService.judgeIsDriver(user);
DistributionDeliverySelfEntity deliverySelfEntity = this.getDriver(distributionDeliveryListEntity, user,driver);
if (Objects.isNull(deliverySelfEntity)){
DistributionDeliverySelfEntity deliverySelfEntity = this.getDriver(distributionDeliveryListEntity, user, driver);
if (Objects.isNull(deliverySelfEntity)) {
return Resp.scanFail("查询司机错误", "查询司机错误");
}
if (Objects.equals(distributionDeliveryListEntity.getKind(), "1")) {
@ -5662,7 +5679,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
return Resp.scanFail("操作失败", "当前操作由司机操作");
}
}
List<JSONObject> jsonObjects = new ArrayList<>();
List<JSONObject> jsonObjects = new ArrayList<>();
if (SignforStatusConstant.yiqianshou.getValue().equals(distributionSignfor.getSigningStatus())) {
return Resp.scanFail("当前客户已完成复核", "当前客户已完成复核");
}
@ -5700,7 +5717,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (!packageLoadingData.isEmpty()) {
receivedQuantity += packageLoadingData.stream().mapToInt(DistributionLoadscanEntity::getPackageNub).sum();
//进行订制品和零担的批量签收
handlePackageLoadingData(packageLoadingData, user, distributionLoadscanEntityLists, orderCodes,distributionDeliveryListEntity,reservationEntity,myCurrentWarehouse,packageCodes,aaa);
handlePackageLoadingData(packageLoadingData, user, distributionLoadscanEntityLists, orderCodes, distributionDeliveryListEntity, reservationEntity, myCurrentWarehouse, packageCodes, aaa);
}
if (!inventoryLoadingData.isEmpty()) {
@ -5718,7 +5735,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}
} else {
if (distributionDeliveryListEntity.getKind().equals("1")){
if (distributionDeliveryListEntity.getKind().equals("1")) {
if (deliverySelfEntity.getIsMaster().equals(1)) {
return Resp.scanFail("操作失败", "当前操作由主司机操作");
}
@ -5761,7 +5778,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
// Integer j = distributionSignforMapper.updatesignforByinvn(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub());
// //更新签收人
// Integer m = distributionSignforMapper.updateSignUser(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), AuthUtil.getUser());
updataSignforeExtracted(loadscaninvnEntity.getDeliveryId(),loadscaninvnEntity.getReservationId(),loadscaninvnEntity.getPackageNub(),user);
updataSignforeExtracted(loadscaninvnEntity.getDeliveryId(), loadscaninvnEntity.getReservationId(), loadscaninvnEntity.getPackageNub(), user);
packageLockIds.add(loadscaninvnEntity.getInventoryPackageId());
distributionLoadscaninvnEntityLists.add(loadscaninvnEntity);
}
@ -6112,7 +6129,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
distributionAsyncService.handlPakcage(packageIds, myCurrentWarehouse.getId());
}
// if (Func.isNotEmpty(packageCodes)) {
//批量下架
//批量下架
// String collected = packageCodes.stream().distinct().collect(Collectors.joining(","));
// log.info(method + "司机批量签收进行包件下架:{}", collected);
// Map<String, Object> map = new HashMap<>();
@ -6151,7 +6168,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
// Integer m = distributionSignforMapper.updateSignUser(distributionDeliveryListEntity.getId(), distributionSignfor.getReservationId(), AuthUtil.getUser());
//维护配送任务状态
distributionDeliveryListService.maintenanceDeliveryInfo(distributionDeliveryListEntity.getId());
distributionSignforMapper.autoDpdateSignfor(distributionSignforEntity.getReservationId(),user);
distributionSignforMapper.autoDpdateSignfor(distributionSignforEntity.getReservationId(), user);
//批量维护订单信息
if (Func.isNotEmpty(orderCodes)) {
String orderCode = orderCodes.stream().distinct().collect(Collectors.joining(","));
@ -6160,8 +6177,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (!packageLockIds.isEmpty()) {
List<Long> a = bladeRedis.get("warehouseId:" + myCurrentWarehouse.getId() + ":trainNumber:" + distributionDeliveryListEntity.getTrainNumber() + ":orderPackageCode:");
if (Func.isNotEmpty(a)) {
assert a != null;
boolean flag = a.stream().anyMatch(any -> packageLockIds.contains(any));
assert a != null;
boolean flag = a.stream().anyMatch(any -> packageLockIds.contains(any));
if (flag) {
//正在操作,请稍后重试
throw new CustomerException("该包件正在被操作,请稍后再试!!!");
@ -6173,19 +6190,19 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
bladeRedis.setEx("warehouseId:" + myCurrentWarehouse.getId() + ":trainNumber:" + distributionDeliveryListEntity.getTrainNumber() + "orderPackageCode:", packageLockIds, 60L);
}
}
if (!aaa.isEmpty()){
if (!aaa.isEmpty()) {
trunklinePackageTrackLogClient.addPackageTrackLog(aaa);
}
bladeRedis.setEx("warehouseId:" + myCurrentWarehouse.getId() + ":reservationId:", distributionSignfor.getReservationId(), 60L);
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = buildNodeFanoutMsgByOneClick(distributionDeliveryListEntity, reservationEntity, distributionLoadscaninvnEntityLists, distributionLoadscanEntityLists);
distributionNodeWorkService.signFor(nodeFanoutMsg, AuthUtil.getUser());
Integer num = baseMapper.signforNum(distributionSignforEntity.getReservationId());
return Resp.scanSuccessWithData(num + "件", num + "件",packageCodes);
return Resp.scanSuccessWithData(num + "件", num + "件", packageCodes);
}
@NotNull
private static DistributionLoadscanEntity getDistributionLoadscanEntity(DistributionLoadscanEntity loadscanEntities) {
DistributionLoadscanEntity update = new DistributionLoadscanEntity();
DistributionLoadscanEntity update = new DistributionLoadscanEntity();
update.setId(loadscanEntities.getId());
update.setSignforState(loadscanEntities.getSignforState());
update.setReceivedQuantity(loadscanEntities.getReceivedQuantity());
@ -6200,10 +6217,10 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
return update;
}
private DistributionDeliverySelfEntity getDriver(DistributionDeliveryListEntity distributionDeliveryListEntity, BladeUser user,boolean isDriverFlag) {
private DistributionDeliverySelfEntity getDriver(DistributionDeliveryListEntity distributionDeliveryListEntity, BladeUser user, boolean isDriverFlag) {
DistributionDeliverySelfEntity distributionDeliverySelfEntity = new DistributionDeliverySelfEntity();
if ("1".equals(distributionDeliveryListEntity.getKind())) {
if (isDriverFlag){
if (isDriverFlag) {
BasicdataDriverArteryEntity driverArtery = iBasicdataDriverArteryClient.getDriverArtery(user.getUserId());
if (null == driverArtery) {
log.error("没有司机的信息!!");
@ -6211,15 +6228,15 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}
distributionDeliverySelfEntity = distributionDeliverySelfMapper.selectDriverInfoByDeliveryIdAndDriverId(driverArtery.getId(), distributionDeliveryListEntity.getId());
}else {
} else {
//文员查询当前司机
distributionDeliverySelfEntity = distributionDeliverySelfMapper.selectOne(Wrappers.<DistributionDeliverySelfEntity>query().lambda()
.eq(DistributionDeliverySelfEntity::getDeliveryId,distributionDeliveryListEntity.getId())
.eq(DistributionDeliverySelfEntity::getIsMaster,2)
.eq(DistributionDeliverySelfEntity::getDeliveryId, distributionDeliveryListEntity.getId())
.eq(DistributionDeliverySelfEntity::getIsMaster, 2)
);
}
//查询当前扫描司机是否属于当前配送任务
//查询当前扫描司机是否属于当前配送任务
} else {
DistributionDeliveryTripartiteEntity distributionDeliveryTripartiteEntity = distributionDeliveryTripartiteMapper.selectDriverInfoByDeliveryId(distributionDeliveryListEntity.getId());
if (Func.isEmpty(distributionDeliveryTripartiteEntity)) {
@ -6227,8 +6244,8 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
throw new CustomerException("没有司机的信息");
}
BeanUtils.copyProperties(distributionDeliveryTripartiteEntity, distributionDeliverySelfEntity);
distributionDeliverySelfEntity.setVehicleNub(distributionDeliveryTripartiteEntity.getVehicleNum());
}
distributionDeliverySelfEntity.setVehicleNub(distributionDeliveryTripartiteEntity.getVehicleNum());
}
return distributionDeliverySelfEntity;
@ -6267,11 +6284,11 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
private void handlePackageLoadingData(List<DistributionLoadscanEntity> packageLoadingData,
BladeUser user,
List<DistributionLoadscanEntity> distributionLoadscanEntityLists,
List<String> orderCodes,DistributionDeliveryListEntity deliveryListEntity,
List<String> orderCodes, DistributionDeliveryListEntity deliveryListEntity,
DistributionReservationEntity reservationEntity,
BasicdataWarehouseEntity myCurrentWarehouse,
List<String> orderPckageCodes,
List<JSONObject> aaa ) {
List<JSONObject> aaa) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
List<DistributionLoadscanEntity> updatePackageLoadingData = new ArrayList<>();
List<Long> packageIds = new ArrayList<>();
@ -6294,7 +6311,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
//非零担标注出库
packageIds.add(packageLoadingDatum.getPackageId());
String content = "包件在" + myCurrentWarehouse.getName() + "由" + packageLoadingDatum.getSigningUser() + "司机批量签收,装车方式:补录装车,配送车次号:" + deliveryListEntity.getTrainNumber() + "预约任务号:" + reservationEntity.getReservationCode();
JSONObject trunklinePackageTrackLog = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), packageLoadingDatum.getOrderPackageCode(), content, WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode(), deliveryListEntity.getId().toString(), parcelListEntity.getWarehouseEntryTimeEnd());
JSONObject trunklinePackageTrackLog = handleLogJSONObject(myCurrentWarehouse, AuthUtil.getUser(), packageLoadingDatum.getOrderPackageCode(), content, WorkNodeEnums.DISTRIBUTION_SIGN_FOR.getCode(), deliveryListEntity.getId().toString(), parcelListEntity.getWarehouseEntryTimeEnd());
// 节点作业推送
sendNodeWorkDataBroadcast(parcelListEntity, reservationEntity, packageLoadingDatum.getSigningTime(), myCurrentWarehouse);
orderPckageCodes.add(parcelListEntity.getOrderPackageCode());
@ -6327,7 +6344,6 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}
}
private NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> buildNodeFanoutMsgByOneClick(DistributionDeliveryListEntity distributionDeliveryListEntity, DistributionReservationEntity reservationEntity, List<DistributionLoadscaninvnEntity> distributionLoadscaninvnEntityLists, List<DistributionLoadscanEntity> distributionLoadscanEntityLists) {
@ -6475,7 +6491,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
log.info("未知的扫描状态 scanStatus={}", scanStatus);
}
if (!Objects.isNull(distributionLoadscanEntity.getSignforType())){
if (!Objects.isNull(distributionLoadscanEntity.getSignforType())) {
switch (distributionLoadscanEntity.getSignforType()) {
case 1:
p.setSignforType(LoadScanSigningTypeStatusConstant.sijiqianshou.getName());
@ -7251,7 +7267,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
return Resp.scanSuccess("签收成功", str);
}
private NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> buildDistributionSignforVOByZero(DistributionDeliveryListEntity distributionDeliveryListEntity, List<DistributionLoadscanEntity> pushList,String operatMode, Date signforTime) {
private NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> buildDistributionSignforVOByZero(DistributionDeliveryListEntity distributionDeliveryListEntity, List<DistributionLoadscanEntity> pushList, String operatMode, Date signforTime) {
NodeFanoutMsg<org.springblade.common.model.DistributionSignforVO> nodeFanoutMsg = new NodeFanoutMsg();
nodeFanoutMsg.setBizOperation(BizOperationEnums.ADD);
@ -8100,7 +8116,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
log.error(method + "查询配送信息错误,deliveryId:{}", deliveryId);
return Resp.scanFail("查询配送信息错误,请联系管理员", "查询配送信息错误,请联系管理员");
}
DistributionDeliveryListEntity updateDeliveryListEntity =new DistributionDeliveryListEntity();
DistributionDeliveryListEntity updateDeliveryListEntity = new DistributionDeliveryListEntity();
updateDeliveryListEntity.setId(deliveryListEntity.getId());
if (DeliveryStatusConstant.yiwancheng.getValue().equals(deliveryListEntity.getDeliveryStatus())) {
log.error(method + "当前配送已完成,deliveryId:{}", deliveryId);
@ -8131,11 +8147,11 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
List<DistributionLoadscanEntity> pushList = new ArrayList<>();
List<DistributionLoadscaninvnEntity> pushInventoryList = new ArrayList<>();
//配置项
DistributionDeliverySelfEntity distributionDeliverySelfEntity = this.getDriver(deliveryListEntity, user,distributionDeliveryListService.judgeIsDriver(user));
if (Objects.isNull(distributionDeliverySelfEntity)){
DistributionDeliverySelfEntity distributionDeliverySelfEntity = this.getDriver(deliveryListEntity, user, distributionDeliveryListService.judgeIsDriver(user));
if (Objects.isNull(distributionDeliverySelfEntity)) {
return Resp.scanFail("查询司机信息错误!!!", "查询司机信息错误!!!");
}
switch (type) {
switch (type) {
case 1:
if (Func.isEmpty(distrilbutionloadingscanDTO.getBarcode())) {
log.error(method + "Barcode参数缺失");
@ -8232,17 +8248,17 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
String orderPackageCodes = parcelListEntity.getOrderPackageCode();
Long warehouseId = myCurrentWarehouse.getId();
String remark = "签收下架解托";
log.info("------------------orderPackageCodes={}",orderPackageCodes);
log.info("------------------warehouseId={}",warehouseId);
log.info("------------------remark={}",remark);
log.info("------------------orderPackageCodes={}", orderPackageCodes);
log.info("------------------warehouseId={}", warehouseId);
log.info("------------------remark={}", remark);
orderPackageCodesByUnTray.add(orderPackageCodes);
// 该方法已移动到外部进行执行
// warehouseUpdownTypeClient.downPackageOrDelTray(orderPackageCodes, warehouseId, remark);
pushList.add(distributionLoadscanEntity);
pushList.add(distributionLoadscanEntity);
packageLockIds.add(parcelListEntity.getId());
DistributionParcelListEntity updateE= new DistributionParcelListEntity();
DistributionParcelListEntity updateE = new DistributionParcelListEntity();
updateE.setId(parcelListEntity.getId());
updateE.setOrderPackageLoadingStatus(OrderPackageLoadingStatusConstant.yizhuangche.getValue());
updateE.setOrderPackageStatus(OrderPackageStatusConstant.yiqianshou.getValue());
@ -8409,7 +8425,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
loadscanEntity.setPackageNub(parcelNumberDTO.getSigningNum());
loadscanEntity.setLoadedNub(parcelNumberDTO.getSigningNum());
loadscanEntity.setSigningUserId(user.getUserId());
if (Func.isNotEmpty(distributionDeliverySelfEntity.getDriverId())) {
if (Func.isNotEmpty(distributionDeliverySelfEntity.getDriverId())) {
loadscanEntity.setDriverId(distributionDeliverySelfEntity.getDriverId());
}
if (Func.isNotEmpty(distributionDeliverySelfEntity.getDriverName())) {
@ -8632,29 +8648,30 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
String collect = orderCodes.stream().distinct().collect(Collectors.joining(","));
distributionStockArticleService.maintenanceOrderInfo(collect, myCurrentWarehouse.getId());
}
distributionSignforMapper.autoDpdateSignfor(distrilbutionloadingscanDTO.getReservationId(),user);
distributionSignforMapper.autoDpdateSignfor(distrilbutionloadingscanDTO.getReservationId(), user);
// String str = checkSignNum(distrilbutionloadingscanDTO);
Integer integer = distributionSignforMapper.signforNum(distrilbutionloadingscanDTO.getReservationId());
return Resp.scanSuccessWithData(integer + "件", integer + "件",orderPackageCodesByUnTray);
return Resp.scanSuccessWithData(integer + "件", integer + "件", orderPackageCodesByUnTray);
}
/**
* 签收维护签收单数量 签收数量 签收人
* @param deliveryId 配送ID
*
* @param deliveryId 配送ID
* @param reservationId 预约单ID
* @param number 数量
* @param user 用户
* @param number 数量
* @param user 用户
*/
private void updataSignforeExtracted(Long deliveryId,Long reservationId,Integer number, BladeUser user) {
private void updataSignforeExtracted(Long deliveryId, Long reservationId, Integer number, BladeUser user) {
//缺少一个异步维护包件签收的方法
// distributionSignforMapper.updateSignforNum(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
// //更新签收人
// distributionSignforMapper.updateSignUser(distributionLoadscanEntity.getDeliveryId(), distributionLoadscanEntity.getReservationId(), user);
distributionSignforMapper.updateSignfor(deliveryId,reservationId,number,user);
distributionSignforMapper.updateSignfor(deliveryId, reservationId, number, user);
}
@ -8688,7 +8705,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
LocalDate day1 = LocalDate.parse(distributionDeliveryList.getTaskTime_start());
LocalDate day2 = LocalDate.parse(distributionDeliveryList.getTaskTime_end());
long between = ChronoUnit.DAYS.between(day1, day2);
if (between > 30){
if (between > 30) {
log.error(method + "列表搜索时间范围大于三十天");
return Resp.fail("最大区间为三十天,请缩小搜索范围");
}
@ -9218,7 +9235,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (!driver) {
return Resp.scanFail("当前操作需由司机完成", "当前操作需由司机完成");
}
DistributionDeliverySelfEntity deliverySelfEntity = this.getDriver(deliveryListEntity, user,driver);
DistributionDeliverySelfEntity deliverySelfEntity = this.getDriver(deliveryListEntity, user, driver);
if (deliverySelfEntity == null) {
return Resp.scanFail("当前人无操作权限", "当前人无操作权限");
}
@ -9274,10 +9291,10 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (!driver) {
return Resp.scanFail("当前操作需由司机完成", "当前操作需由司机完成");
}
DistributionDeliverySelfEntity deliverySelfEntity = this.getDriver(deliveryListEntity, user,driver);
DistributionDeliverySelfEntity deliverySelfEntity = this.getDriver(deliveryListEntity, user, driver);
log.info("driverName>>>>>>>>>>>>>:{}", deliverySelfEntity.getDriverName());
//针对之前该司机上传的图片进行全部删除
//针对之前该司机上传的图片进行全部删除
//查询该司机已有的图片信息
List<DistributionSignPrintEntity> list = iDistributionSignPrintService.list(Wrappers.<DistributionSignPrintEntity>query().lambda()
.eq(DistributionSignPrintEntity::getReservationId, signforEntity.getReservationId())

2
blade-service/logpm-report/src/main/java/com/logpm/report/service/largeScreen/impl/MapWarehouseServiceImpl.java

@ -46,7 +46,7 @@ public class MapWarehouseServiceImpl implements IMapWarehouseService {
mapWarehouseVO.setLng(warehouseInfoVO.getLng());
mapWarehouseVO.setWarehouseId(warehouseInfoVO.getWarehouseId());
mapWarehouseVO.setWarehouseName(warehouseInfoVO.getWarehouseName());
if (!warehouseInfoVO.getProvinceCode().isEmpty()) {
if (warehouseInfoVO.getProvinceCode()!=null && !warehouseInfoVO.getProvinceCode().isEmpty()) {
mapWarehouseVO.setArea(regionFeign.getName(warehouseInfoVO.getProvinceCode()));
}

Loading…
Cancel
Save