Browse Source

零担订单详情列表查询

pull/1/head
汤建军 1 year ago
parent
commit
d0b600cf72
  1. 85
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionReservationZeroPackageVO.java
  2. 12
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java
  3. 12
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.java
  4. 37
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  5. 9
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryInfoService.java
  6. 13
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java
  7. 31
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

85
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionReservationZeroPackageVO.java

@ -21,6 +21,8 @@ import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 预约零担包件中间表 视图实体类
*
@ -32,4 +34,87 @@ import lombok.EqualsAndHashCode;
public class DistributionReservationZeroPackageVO extends DistributionReservationZeroPackageEntity {
private static final long serialVersionUID = 1L;
/**
* 货物名称
*/
private String firsts;
/**
* 运单号
*/
private String waybillNumber;
/**
* 订单号
*/
private String orderCode;
/**
* 服务号
*/
private String serviceNumber;
/**
* 包件总数
*/
private Integer quantity;
/**
* 包件总数
*/
private Long id;
/**
* 包件预约状态
*/
private String orderPackageReservationStatusName;
/**
* 包件预约数量
*/
private Integer reservationNum;
/**
* 装车数量
*/
private Integer loadingNum;
/**
* 签收数量
*/
private Integer signingNum;
/**
* 包件装车状态
*/
private String loadingStatusName;
/**
* 包件签收状态
*/
private String signingStatusName;
/**
* 装车人
*/
private String scanUser;
/**
* 签收人
*/
private String signingUser;
/**
* 装车扫描时间
*/
private Date scanTime;
/**
* 签收扫描时间
*/
private Date signingTime;
}

12
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java

@ -115,6 +115,18 @@ public class DistributionDeliveryListController extends BladeController {
return R.data(pages);
}
/**
* 查看库存品包件 详情
*/
@GetMapping("/getReservationZeroPackageList")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "查看包件详情", notes = "传入distributionDeliveryList")
public R<IPage<DistributionReservationZeroPackageVO>> getReservationZeroPackageList(@RequestParam Map<String,Object> reservationPackageDTO, Query query) {
IPage<DistributionReservationZeroPackageVO> pages = distributionDeliveryInfoService.getReservationZeroPackageList(reservationPackageDTO,Condition.getPage(query));
return R.data(pages);
}
/**
* 查看订单
*/

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

@ -360,9 +360,17 @@ public interface DistributionReservationMapper extends BaseMapper<DistributionRe
/**
* 根据预约单号查询预约
* @param warehouseCode
* @param searchCode
* @param warehouseId
* @param reservationCode
* @return
*/
DistributionReservationEntity selectByReservationCode(@Param("warehouseId") Long warehouseId,@Param("reservationCode") String reservationCode);
/**
* 查询预约零担包件
* @param reservationPackageDTO
* @param page
* @return
*/
IPage<DistributionReservationZeroPackageVO> selectZeroPackageByReservationInfo(@Param("param")Map<String, Object> reservationPackageDTO, IPage<DistributionReservationZeroPackageVO> page);
}

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

@ -1700,4 +1700,41 @@
resultType="com.logpm.distribution.entity.DistributionReservationEntity">
SELECT * FROM logpm_distribution_reservation WHERE reservation_code = #{reservationCode} AND warehouse_id = #{warehouseId}
</select>
<select id="selectZeroPackageByReservationInfo"
resultType="com.logpm.distribution.vo.DistributionReservationZeroPackageVO">
SELECT DISTINCT
ldpl.firsts AS firsts,
ldsa.waybill_number AS waybillNumber,
ldsa.order_code AS orderCode,
ldsa.service_number AS serviceNumber,
ldpl.quantity AS quantity,
ldpl.id AS id,
ldpl.order_package_reservation_status AS orderPackageReservationStatusName,
ldrzp.quantity AS reservationNum,
IF(ldl.loaded_nub is null,0,ldl.loaded_nub) AS loadingNum,
ldrzp.quantity = IF(ldl.loaded_nub is null,0,ldl.loaded_nub) AS AS signingNum ,
CASE IF(ldl.loaded_nub is null,0,ldl.loaded_nub)
WHEN 0 THEN '待装车'
ELSE IF(ldl.loaded_nub = ldrzp.quantity,'已装车','部分装车')
END loadingStatusName,
CASE IF(ldl.received_quantity is null,0,ldl.loaded_nub)
WHEN 0 THEN '待签收'
ELSE IF(ldl.received_quantity = ldrzp.quantity,'已签收','部分签收')
END signingStatusName,
ldl.scan_user AS scanUser,
ldl.scan_time AS scanTime,
ldl.signing_user AS signingUser,
ldl.signing_time AS signingTime
FROM
logpm_distribution_reservation_zero_package AS ldrzp
LEFT JOIN logpm_distribution_parcel_list AS ldpl ON ldrzp.parcel_list_id = ldpl.id
LEFT JOIN logpm_distribution_parcel_number AS ldpn ON ldpl.id = ldpn.parcel_list_id
LEFT JOIN logpm_distribution_stock_article AS ldsa ON ldpl.stock_article_id = ldsa.id
LEFT JOIN logpm_distribution_loadscan As ldl ON ldrzp.reservation_id = ldl.reservation_id AND ldl.package_id = ldpl.id AND ldl.scan_status != 1 AND ldl.is_deleted =0
<where>
ldrzp.reservation_id = #{param.reservationId} AND ldrzp.zero_package_status in ('1','3')
</where>
</select>
</mapper>

9
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryInfoService.java

@ -109,4 +109,13 @@ public interface IDistributionDeliveryInfoService extends BaseService<Distributi
* @return
*/
IPage<DistributionReservationInventoryPackageVO> getReservationPackageList(Map<String, Object> reservationPackageDTO, IPage<DistributionReservationInventoryPackageVO> page);
/**
* 查询零担详情
* @param reservationPackageDTO
* @param page
* @return
*/
IPage<DistributionReservationZeroPackageVO> getReservationZeroPackageList(Map<String, Object> reservationPackageDTO, IPage<DistributionReservationZeroPackageVO> page);
}

13
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java

@ -531,4 +531,17 @@ public class DistributionDeliveryInfoServiceImpl extends BaseServiceImpl<Distrib
}
@Override
public IPage<DistributionReservationZeroPackageVO> getReservationZeroPackageList(Map<String, Object> reservationPackageDTO, IPage<DistributionReservationZeroPackageVO> page) {
String method = "DistributionDeliveryInfoServiceImpl类,getReservationPackageList方法";
if (Func.isEmpty(reservationPackageDTO.get("reservationId"))){
//参数缺失
log.error(method+"reservationId参数缺失");
return null;
}
IPage<DistributionReservationZeroPackageVO> reservationInventoryPackageVOIPage = distributionReservationMapper.selectZeroPackageByReservationInfo(reservationPackageDTO,page);
return reservationInventoryPackageVOIPage;
}
}

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

@ -1390,6 +1390,10 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (ObjectUtils.isNotNull(o)) {
distributionSignfor.remove("ids");
}
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
if (Func.isNotEmpty(myCurrentWarehouse)){
distributionSignfor.put("warehouseId",myCurrentWarehouse.getId());
}
// BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
// if(ObjectUtils.isNull()){
// throw new ServiceException("请选择仓库!");
@ -2775,22 +2779,29 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
int reservationTotal = reservationZeroPackageEntityList.stream().mapToInt(DistributionReservationZeroPackageEntity::getQuantity).sum();
distributionAppStockArticleVO.setReservationNum(reservationTotal);
List<DistributionParcelNumberVO> parcelNumberVOS = distributionReservationMapper.selectReservationZeroOrderDetail(orderId, Long.parseLong(distributionDeliveryList.getReservationId()));
parcelNumberVOS.forEach(p -> {
DistributionLoadscanEntity loadscanEntity = distributionLoadscanService.getOne(Wrappers.<DistributionLoadscanEntity>query().lambda().eq(DistributionLoadscanEntity::getReservationId, distributionDeliveryList.getReservationId()).eq(DistributionLoadscanEntity::getOrderId, orderId).eq(DistributionLoadscanEntity::getPackageId, p.getParcelListId()).ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()));
p.setLoadingNum(0);
p.setSigningNum(0);
if (Func.isNotEmpty(loadscanEntity)) {
p.setLoadingNum(loadscanEntity.getLoadedNub());
if (loadscanEntity.getSignforState().equals(LoadScanSigningStatusConstant.yiqianshou.getValue())) {
p.setSigningNum(loadscanEntity.getReceivedQuantity());
distributionAppStockArticleVO.setSignforNub(0);
if (Func.isNotEmpty(parcelNumberVOS)){
parcelNumberVOS.forEach(p -> {
DistributionLoadscanEntity loadscanEntity = distributionLoadscanService.getOne(Wrappers.<DistributionLoadscanEntity>query().lambda().eq(DistributionLoadscanEntity::getReservationId, distributionDeliveryList.getReservationId()).eq(DistributionLoadscanEntity::getOrderId, orderId).eq(DistributionLoadscanEntity::getPackageId, p.getParcelListId()).ne(DistributionLoadscanEntity::getScanStatus, LoadingStatusConstant.quxiao.getValue()));
p.setLoadingNum(0);
p.setSigningNum(0);
if (Func.isNotEmpty(loadscanEntity)) {
p.setLoadingNum(loadscanEntity.getLoadedNub());
if (loadscanEntity.getSignforState().equals(LoadScanSigningStatusConstant.yiqianshou.getValue())) {
p.setSigningNum(loadscanEntity.getReceivedQuantity());
}
}
}
});
});
distributionAppStockArticleVO.setDistributionParcelNumberVOS(parcelNumberVOS);
distributionAppStockArticleVO.setSignforNub(parcelNumberVOS.stream().mapToInt(DistributionParcelNumberVO::getSigningNum).sum());
}
}
}
orderVos.add(distributionAppStockArticleVO);
}
}
return orderVos;

Loading…
Cancel
Save