Browse Source

增加签收扫描详情、维护商配修改新订单无包件

dev-pushdata-important
汤建军 1 year ago
parent
commit
edb61c2482
  1. 49
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppPackageDetailVO.java
  2. 12
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionSignforAppController.java
  3. 12
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java
  4. 49
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
  5. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java
  6. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  7. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

49
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppPackageDetailVO.java

@ -0,0 +1,49 @@
package com.logpm.distribution.vo.app;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@Data
public class DistributionAppPackageDetailVO implements Serializable {
/**
* 订单自编号
*/
@ApiModelProperty(value = "订单自编号")
private String orderCode;
/**
* 订单自编号
*/
@ApiModelProperty(value = "包条码")
private String orderPackageCode;
/**
* 订单自编号
*/
@ApiModelProperty(value = "订单自编号")
private Integer isLoading;
/**
* 订单自编号
*/
@ApiModelProperty(value = "订单自编号")
private Integer type;
/**
* 订单自编号
*/
@ApiModelProperty(value = "订单自编号")
private Integer isSignfor;
/**
* 订单自编号
*/
@ApiModelProperty(value = "订单自编号")
private Integer isAbnormal;
}

12
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionSignforAppController.java

@ -295,4 +295,16 @@ public class DistributionSignforAppController {
}
}
/**
* 查询签收包件列表
* @param reservationId
* @return
*/
@GetMapping("/signingPackageDetail")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "查询签收包件列表" )
public R signingPackageDetail(@RequestParam Long reservationId) {
return distributionSignforService.signingPackageDetail(reservationId);
}
}

12
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.java

@ -25,10 +25,7 @@ import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.entity.DistributionSignforEntity;
import com.logpm.distribution.excel.DistributionSignforExcel;
import com.logpm.distribution.vo.*;
import com.logpm.distribution.vo.app.DistributionAppDeliveryListVO;
import com.logpm.distribution.vo.app.DistributionAppParcelListVO;
import com.logpm.distribution.vo.app.DistributionAppSignforVO;
import com.logpm.distribution.vo.app.DistributionAppStockArticleVO;
import com.logpm.distribution.vo.app.*;
import com.logpm.oldproject.dto.SignPushDataUnitDTO;
import org.apache.ibatis.annotations.Param;
import org.springblade.core.secure.BladeUser;
@ -309,4 +306,11 @@ public interface DistributionSignforMapper extends BaseMapper<DistributionSignfo
* @return
*/
DistributionSignforEntity selectByDeliveryIdAndMallName(@Param("reservationId")Long deliveryId,@Param("mallName") String mallName);
/**
* PDA查询签收列表详情
* @param reservationId
* @return
*/
List<DistributionAppPackageDetailVO> signingPackageDetail(@Param("reservationId") Long reservationId);
}

49
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml

@ -1230,4 +1230,53 @@
resultType="com.logpm.distribution.entity.DistributionSignforEntity">
SELECT * FROM logpm_distribution_signfor AS lds LEFT JOIN logpm_distribution_reservation AS ldr ON lds.reservation_id = ldr.id WHERE lds.delivery_id = #{deliveryId} AND ldr.mall_mame = #{mallName}
</select>
<select id="signingPackageDetail"
resultType="com.logpm.distribution.vo.app.DistributionAppPackageDetailVO">
SELECT
ldpl.order_code AS orderCode,
ldpl.order_package_code AS orderPackageCode,
1 AS type,
IF(ldl.id is null,0,1) AS isLoading,
IF(ldl.id is null or ldl.signfor_state = 1,0,1) AS isSignfor,
0 AS isAbnormal
FROM
logpm_distribution_reservation AS ldr
LEFT JOIN logpm_distribution_reservation_package AS ldrp ON ldr.id = ldrp.reservation_id
LEFT JOIN logpm_distribution_parcel_list AS ldpl ON ldrp.parce_list_id = ldpl.id
LEFT JOIN logpm_distribution_loadscan AS ldl ON ldl.package_id = ldpl.id AND ldl.is_abnormal_loading = 1 AND ldl.scan_status != 1
WHERE
ldrp.packet_bar_status != 2
AND ldr.id = #{reservationId}
UNION
SELECT
ldpl.order_code AS orderCode,
ldpl.order_package_code AS orderPackageCode,
1 AS type,
1 AS isLoading,
IF(ldl.id is not null AND ldl.signfor_state = 2,0,1) AS isSignfor,
1 AS isAbnormal
FROM
logpm_distribution_loadscan AS ldl
LEFT JOIN logpm_distribution_parcel_list AS ldpl ON ldl.package_id = ldpl.id
WHERE
ldl.reservation_id = #{reservationId} AND ldl.is_abnormal_loading = 2 AND ldl.scan_status != 1
UNION
SELECT
ldsl.order_code AS orderCode,
ldsld.stock_package_code AS orderPackageCode,
2 AS type,
IF
( ldll.id IS NULL, 0, 1 ) AS isLoading,
IF(ldll.id is null or ldll.signfor_state = 1,0,1) AS isSignfor,
0 AS isAbnormal
FROM
logpm_distribution_reservation AS ldr
LEFT JOIN logpm_distribution_reservation_stocklist AS ldrs ON ldr.id = ldrs.reservation_id
LEFT JOIN logpm_distribution_stock_list AS ldsl ON ldsl.id = ldrs.stocklist_id
LEFT JOIN logpm_dis_stock_list_detail AS ldsld ON ldr.id = ldsld.reservation_id AND ldsld.stock_list_id = ldrs.stocklist_id
LEFT JOIN logpm_distribution_loadscaninvn As ldll ON ldll.inventory_package_id = ldsld.id AND ldll.scan_status != 1
WHERE
ldr.id = #{reservationId}
</select>
</mapper>

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java

@ -272,4 +272,7 @@ public interface IDistributionSignforService extends BaseService<DistributionSig
* @return
*/
R signforackPC(DistributionSignforDTO distributionSignfor);
R signingPackageDetail(Long reservationId);
}

10
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java

@ -3049,6 +3049,10 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//没有进行包件选择 默认添加可配送的所有包件
//添加订单下的所有在库订单的包件
List<DistributionParcelListEntity> distributionParcelListEntities = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda().eq(DistributionParcelListEntity::getStockArticleId, s.getId()).ne(DistributionParcelListEntity::getOrderPackageLoadingStatus, OrderPackageLoadingStatusConstant.yizhuangche.getValue()).ne(DistributionParcelListEntity::getOrderPackageReservationStatus, OrderPackageReservationStatusConstant.yiyueyue.getValue()).notIn(DistributionParcelListEntity::getOrderPackageStatus, new String[]{OrderPackageStatusConstant.yichuku.getValue(), OrderPackageStatusConstant.yiqianshou.getValue()}));
if (Func.isEmpty(distributionParcelListEntities)) {
log.error("##############添加空订单");
throw new RuntimeException(s.getOrderCode()+"无可用包件!!!");
}
distributionParcelListEntities.forEach(dp -> {
if (!dp.getOrderPackageStatus().equals(OrderPackageStatusConstant.yiqianshou.getValue())) {
if (!Func.equals(dp.getOrderPackageFreezeStatus(), OrderPackageFreezeStatusConstant.yidongjie.getValue()) && !Func.equals(dp.getOrderPackageReservationStatus(), OrderPackageReservationStatusConstant.yiyueyue.getValue())) {
@ -3141,13 +3145,17 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
List<DistributionParcelListDTO> packageListInfo = s.getPackageListInfo();
log.info("reservationEntity.getId()>>>>>>>>{}", reservationEntity.getId());
log.info("s.getId()>>>>>>>>{}", s.getId());
List<DistributionReservationPackageEntity> list = distributionReservationPackageMapper.selectList(Wrappers.<DistributionReservationPackageEntity>query().lambda().eq(DistributionReservationPackageEntity::getReservationId, reservationEntity.getId()).eq(DistributionReservationPackageEntity::getStockArticleId, s.getId()).ne(DistributionReservationPackageEntity::getPacketBarStatus, "2"));
List<DistributionReservationPackageEntity> list = distributionReservationPackageMapper.selectList(Wrappers.<DistributionReservationPackageEntity>query().lambda()
.eq(DistributionReservationPackageEntity::getReservationId, reservationEntity.getId())
.eq(DistributionReservationPackageEntity::getStockArticleId, s.getId())
.ne(DistributionReservationPackageEntity::getPacketBarStatus, "2"));
// List<DistributionReservationPackageEntity> distributionReservationPackageEntities = distributionReservationPackageMapper.selectList(new QueryWrapper<DistributionReservationPackageEntity>().lambda()
// .eq(DistributionReservationPackageEntity::getReservationId, reservationEntity.getId())
// .eq(DistributionReservationPackageEntity::getStockArticleId, s.getId())
// );
if (Func.isEmpty(list)) {
log.error("###########################预约包件查询错误:{}", list);
log.error("###########################查询错误预约Id:{}", reservationEntity.getId());
throw new RuntimeException("服务器正忙...");
}
Map<Long, List<DistributionReservationPackageEntity>> oldPackageList = list.stream().collect(Collectors.groupingBy(DistributionReservationPackageEntity::getParceListId));

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

@ -752,6 +752,12 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
return R.status(update);
}
@Override
public R signingPackageDetail(Long reservationId) {
List<DistributionAppPackageDetailVO> details = baseMapper.signingPackageDetail(reservationId);
return R.data(details);
}
private boolean judgmentSignIsHavePackage(Long reservationId) {
boolean flag = false;
List<DistributionParcelListEntity> distributionParcelListEntities = distributionReservationMapper.selectPackageListByReservationId(reservationId);

Loading…
Cancel
Save