Browse Source

Merge branch 'dev' into pre-production

pre-production
zhaoqiaobo 2 weeks ago
parent
commit
910244b0d7
  1. 1
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppStockUpClientVO.java
  2. 13
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppStockUpScanDetailVO.java
  3. 24
      blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/entity/ExpenseDispatchTrainDetailEntity.java
  4. 1
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java
  5. 5
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml
  6. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/api/DistributionStockupAppController.java
  7. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  8. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockMapper.xml
  9. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.java
  10. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillLadingMapper.xml
  11. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java
  12. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  13. 98
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java
  14. 16
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/QualityDeliverServiceImpl.java
  15. 6
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/mapper/ExpenseDispatchTrainDetailMapper.xml
  16. 12
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/mapper/ExpenseDispatchWarehouseMonthMapper.xml
  17. 12
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/query/ExpenseDispatchTrainDetailQuery.java
  18. 8
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/vo/ExpenseDispatchTrainDetailVO.java

1
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppStockUpClientVO.java

@ -50,6 +50,7 @@ public class DistributionAppStockUpClientVO implements Serializable {
private List<DistributionAppStockUpZeroOrderDetailVO> stockUpZeroOrderDetailVOList;
private List<DistributionAppStockUpPackageDetailVO> deliveryPackageDetailList;
private List<DistributionAppStockUpTrayDetailVO> deliveryTrayList;
private List<DistributionAppStockUpScanDetailVO> stockUpScanDetailVO;

13
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppStockUpScanDetailVO.java

@ -31,10 +31,11 @@ import java.util.List;
public class DistributionAppStockUpScanDetailVO implements Serializable {
private static final long serialVersionUID = 1L;
private String trayName;
private String trayCode;
private Integer planNum;
private Integer scanNum;
private Long stockId;
private Integer type;
private String orderPackageCode;
private String typeName;
private String goodsName;
private String orderCode;
private String stockupAllocation;
}

24
blade-service-api/logpm-statisticsdata-api/src/main/java/com/logpm/statistics/entity/ExpenseDispatchTrainDetailEntity.java

@ -75,6 +75,30 @@ public class ExpenseDispatchTrainDetailEntity extends TenantEntity {
@ApiModelProperty(value = "配送日期")
@ExcelProperty("车次号")
private String deliveryDate;
/**
* 车次完成时间
*/
@ApiModelProperty(value = "车次完成时间")
@ExcelProperty("车次完成时间")
private Date trainCompletionTime;
/**
* 车次完成时间-
*/
@ApiModelProperty(value = "车次完成时间-年")
@ExcelProperty("车次完成时间-年")
private int trainCompletionYear;
/**
* 车次完成时间-
*/
@ApiModelProperty(value = "车次完成时间-月")
@ExcelProperty("车次完成时间-月")
private int trainCompletionMonth;
/**
* 车次完成时间-
*/
@ApiModelProperty(value = "车次完成时间-日")
@ExcelProperty("车次完成时间-日")
private int trainCompletionDay;
/**
* 目的仓
*/

1
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java

@ -140,7 +140,6 @@ public class AftersalesWorkOrderController extends BladeController {
log.error("工单查询系统异常》》》{}", e.getMessage());
return R.fail("系统异常!");
}
}
/**

5
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml

@ -1250,9 +1250,10 @@
logpm_aftersales_processor AS lbp
WHERE
lbp.types_of != 3
AND lbp.processing_status IN ( '1', '3' )
AND lbp.processing_status = 1
AND lbp.is_deleted = 0
AND DATEDIFF(DATE_FORMAT(lbp.create_time,'%y%m%d'), DATE_FORMAT(NOW(),'%y%m%d')) &lt;= -3
AND DATEDIFF(DATE_FORMAT(lbp.create_time,'%y%m%d'), DATE_FORMAT('2025-01-01','%y%m%d')) &lt;= -3
AND DATE_FORMAT(lbp.create_time,'%y%m%d') >= DATE_FORMAT( '2025-01-01', '%y%m%d' )
</select>
<select id="pageAllList" resultType="com.logpm.aftersales.vo.AftersalesWorkOrderVO">
SELECT DISTINCT

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/api/DistributionStockupAppController.java

@ -1121,9 +1121,9 @@ public class DistributionStockupAppController extends BladeController {
Long reservationId = stockupDTO.getReservationId();
switch (typeService){
case "1": case "2":
return distributionStockupService.handleDeliveryPackageDetailList(reservationId,orderId);
return distributionStockupService.handleDeliveryPackageDetailList(reservationId);
case "3":
return distributionStockupService.handleBillPackageDetailList(reservationId,orderId);
return distributionStockupService.handleBillPackageDetailList(reservationId);
default:
return R.fail("未知的typeService");
}
@ -1221,7 +1221,7 @@ public class DistributionStockupAppController extends BladeController {
@ResponseBody
@PostMapping("/stockupScanDetail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "备货扫描", notes = "传入stockupDTO")
@ApiOperation(value = "备货扫描详情", notes = "传入stockupDTO")
public R stockupScanDetail(@RequestBody StockupDTO stockupDTO) {
String lockKey = "Lock:" + stockupDTO.getPacketBarCode() + stockupDTO.getStockupId();
String method = "#######################DistributionStockupAppController.newStockupScan";
@ -1233,7 +1233,7 @@ public class DistributionStockupAppController extends BladeController {
redis.setEx(lockKey, stockupDTO.getPacketBarCode() + stockupDTO.getStockupId(), 5L);
//针对商市配、自提分别进行处理
if (Objects.isNull(stockupDTO.getReservationId())){
log.error(method+"参数:stockupDTO.getTypeService()缺失");
log.error(method+"参数:stockupDTO.getReservationId()缺失");
return Resp.scanFail("参数缺失,请联系管理员!!!","参数缺失,请联系管理员!!!");
}
if (Objects.isNull(stockupDTO.getStockupId())){

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

@ -92,7 +92,7 @@
LEFT JOIN logpm_distribution_parcel_list AS ldpl ON ldpl.id = ldrp.parce_list_id AND ldpl.is_deleted = 0 AND ldpl.is_transfer = 0
LEFT JOIN logpm_warehouse_tray AS lwt ON ldpl.pallet = lwt.pallet_name
AND lwt.warehouse_id = ldpl.warehouse_id
LEFT JOIN logpm_distribution_stock AS lds ON lds.reservation_id = ldrp.reservation_id
LEFT JOIN logpm_distribution_stock AS lds ON lds.reservation_id = ldrp.reservation_id AND lds.coding = ldpl.order_package_code
AND lds.type = 1
AND lds.outbound_type != 3
AND lds.cancel_status != 1
@ -102,7 +102,7 @@
GROUP BY
ldpl.pallet
HAVING
IFNULL( sum( ldpl.quantity ), 0 ) > 0
IFNULL( sum( ldpl.quantity ), 0 ) > 0 AND ldpl.pallet IS NOT NULL
) AS t
LEFT JOIN logpm_warehouse_tray_goods AS lwtg ON lwtg.tray_code = t.trayCode
AND lwtg.is_deleted = 0

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

@ -117,10 +117,11 @@
<select id="selectScanDetail"
resultType="com.logpm.distribution.vo.app.DistributionAppStockUpScanDetailVO">
SELECT
lds.id,
lds.id AS stockId,
lds.type AS type,
lds.coding AS orderPackageCode,
CASE lds.type
WHEN 1 THEN '制品'
WHEN 1 THEN '制品'
WHEN 2 THEN '库存品'
WHEN 3 THEN '零担'
ELSE

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.java

@ -373,7 +373,7 @@ public interface DistributionStockupMapper extends BaseMapper<DistributionStocku
* @param orderId
* @return
*/
List<DistributionAppStockUpPackageDetailVO> selectDeliveryPackageDetailList(@Param("reservationId")Long reservationId,@Param("orderId") Long orderId);
List<DistributionAppStockUpPackageDetailVO> selectDeliveryPackageDetailList(@Param("reservationId")Long reservationId);
/**
* 查询自提包件列表
@ -381,7 +381,7 @@ public interface DistributionStockupMapper extends BaseMapper<DistributionStocku
* @param orderId
* @return
*/
List<DistributionAppStockUpPackageDetailVO> selectBillPackageDetailList(@Param("billId")Long billId,@Param("orderId") Long orderId);
List<DistributionAppStockUpPackageDetailVO> selectBillPackageDetailList(@Param("billId")Long billId);
/**
* 查询自提备货所有包件

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

@ -1145,7 +1145,7 @@
LEFT JOIN logpm_distribution_parcel_list AS ldpl ON ldpl.id = ldbp.parce_list_id AND ldpl.is_deleted = 0 AND ldpl.is_transfer = 0
LEFT JOIN logpm_warehouse_tray AS lwt ON ldpl.pallet = lwt.pallet_name
AND lwt.warehouse_id = ldpl.warehouse_id
LEFT JOIN logpm_distribution_stock AS lds ON lds.reservation_id = ldbp.bill_lading_id
LEFT JOIN logpm_distribution_stock AS lds ON lds.reservation_id = ldbp.bill_lading_id AND lds.coding = ldpl.order_package_code
AND lds.type = 1
AND lds.outbound_type = 3
AND lds.cancel_status != 1
@ -1155,7 +1155,7 @@
GROUP BY
ldpl.pallet
HAVING
IFNULL( sum( ldpl.quantity ), 0 ) > 0
IFNULL( sum( ldpl.quantity ), 0 ) > 0 AND ldpl.pallet IS NOT NULL
) AS t
LEFT JOIN logpm_warehouse_tray_goods AS lwtg ON lwtg.tray_code = t.trayCode
AND lwtg.is_deleted = 0

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

@ -365,18 +365,18 @@ public interface IDistributionStockupService extends BaseService<DistributionSto
/**
* 查询备货扫描PDA包件详情
* @param reservationId
* @param orderId
* @param
* @return
*/
R handleDeliveryPackageDetailList(Long reservationId, Long orderId);
R handleDeliveryPackageDetailList(Long reservationId);
/**
* 查询自提包件数据
* @param reservationId
* @param orderId
* @param
* @return
*/
R handleBillPackageDetailList(Long reservationId, Long orderId);
R handleBillPackageDetailList(Long reservationId);
/**

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java

@ -2123,7 +2123,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
//构建库存品
DisStockListDetailEntity disStockListDetailEntity = new DisStockListDetailEntity();
disStockListDetailEntity.setNum(1);
disStockListDetailEntity.setSku(distributionStockListDTO.getSku());
disStockListDetailEntity.setSku(distributionStockListDTO.getCargoNumber());
disStockListDetailEntity.setStockListId(distributionStockListDTO.getId());
disStockListDetailEntity.setStockLockingStatus(InventoryLoadingStatusConstant.weizhuangche.getValue());
disStockListDetailEntity.setStockSignfoStatus(InventorySigningStatusConstant.weiqianshou.getValue());

98
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

@ -4643,7 +4643,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
//配送零担备货
return handleDeliveryZeroStockUp(stockupDTO, myCurrentWarehouse, reservationId, stockupEntity);
case 4:
//配送零担备货
//配送托盘备货
return handleDeliveryTrayStockUp(stockupDTO, myCurrentWarehouse, reservationId, stockupEntity);
default:
log.error(method + "未知scanType");
@ -4687,26 +4687,42 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
log.info(method+"查询预约包件计划信息错误>>>>>>>>>>>>>>>>>>>>>>reservationId:{}",reservationId);
return R.fail("查询计划信息错误");
}
List<Long> trayPackageIds = trayIdList.stream().map(WarehouseTrayGoodsEntity::getAssociationId).collect(Collectors.toList());
boolean isAllStockUp = distributionParcelListEntities.stream().anyMatch(a -> OrderPackageStockupStatusConstant.daibeihuo.getValue().equals(a.getOrderPackageStockupStatus()));
if (isAllStockUp) {
List<DistributionParcelListEntity> unStockUpPackageData = distributionParcelListEntities.stream().filter(f1 -> OrderPackageStockupStatusConstant.daibeihuo.getValue().equals(f1.getOrderPackageStockupStatus())).collect(Collectors.toList());
if (unStockUpPackageData.isEmpty()) {
return Resp.scanFail("扫描已完成","扫描已完成");
}
List<Long> trayPackageIds = trayIdList.stream().map(WarehouseTrayGoodsEntity::getAssociationId).collect(Collectors.toList());
List<DistributionParcelListEntity> packageData = unStockUpPackageData.stream().filter(f -> trayPackageIds.contains(f.getId())).collect(Collectors.toList());
if (packageData.isEmpty()) {
return R.fail("当前托盘无此客户的货物");
}
warehouseUpdownTypeClient.downTray(trayByTrayCode.getPalletCode(),myCurrentWarehouse.getId());
//生成扫描数据
List<DistributionStockEntity> stockEntityList = generateDeliveryTrayPackageStockEntity(reservationEntity,packageData,myCurrentWarehouse,user,stockupDTO.getStockupId(),stockupEntity);
if (!stockEntityList.isEmpty()) {
// 备货作业节点
distributionStockService.saveBatch(stockEntityList);
List<Long> updatePackageIds = stockEntityList.stream().map(DistributionStockEntity::getParcelListId).collect(Collectors.toList());
distributionParcelListService.update(Wrappers.<DistributionParcelListEntity>update().lambda()
.in(DistributionParcelListEntity::getId,updatePackageIds)
.set(DistributionParcelListEntity::getOrderPackageStockupStatus,OrderPackageStockupStatusConstant.yibeihu.getValue())
);
}
List<DistributionParcelListEntity> packageData = distributionParcelListEntities.stream().filter(f -> trayPackageIds.contains(f.getId())).collect(Collectors.toList());
if (packageData.isEmpty()) {
return R.fail("当前托盘无此客户的货物");
}
warehouseUpdownTypeClient.downTray(trayByTrayCode.getPalletCode(),myCurrentWarehouse.getId());
//生成扫描数据
List<DistributionStockEntity> stockEntityList = generateDeliveryTrayPackageStockEntity(reservationEntity,packageData,myCurrentWarehouse,user,stockupDTO.getStockupId());
if (!stockEntityList.isEmpty()) {
distributionStockService.saveBatch(stockEntityList);
return Resp.scanSuccess("操作成功","");
}else {
return Resp.scanFail("订制品备货已完成","");
}
return Resp.scanSuccess("操作成功"," ");
}
private List<DistributionStockEntity> generateDeliveryTrayPackageStockEntity(DistributionReservationEntity reservationEntity,
List<DistributionParcelListEntity> packageData,
BasicdataWarehouseEntity warehouse,
BladeUser user,
Long stockUpId) {
Long stockUpId,
DistributionStockupEntity stockupEntity) {
List<DistributionStockEntity> list= new ArrayList<>();
for (DistributionParcelListEntity parcelListEntity : packageData) {
DistributionStockEntity distributionStockEntity = new DistributionStockEntity();
@ -4728,6 +4744,10 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
distributionStockEntity.setScanUser(user.getNickName());
distributionStockEntity.setIsTray(Integer.parseInt(IsOrNoConstant.yes.getValue()));
list.add(distributionStockEntity);
NodeFanoutMsg<StockUpVO> nodeFanoutMsg = buildStockUpNodeData(stockupEntity, distributionStockEntity, parcelListEntity);
if (ObjectUtils.isNotNull(nodeFanoutMsg)) {
distributionNodeWorkService.planStock(nodeFanoutMsg, AuthUtil.getUser());
}
}
return list;
}
@ -5071,7 +5091,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
if (parcelListEntity.getConditions() != 2) {
return Resp.scanFail("当前包件不是库存品", "当前包件不是库存品");
}
if (OrderPackageGroundingStatusConstant.yishangjia.getValue().equals(parcelListEntity.getOrderPackageFreezeStatus())) {
if (OrderPackageGroundingStatusConstant.yishangjia.getValue().equals(parcelListEntity.getOrderPackageGroundingStatus())) {
return Resp.scanFail("当前库存品未上架", "当前库存品未上架");
}
//查询计划是否正常
@ -5660,12 +5680,12 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
}
@Override
public R handleDeliveryPackageDetailList(Long reservationId, Long orderId) {
public R handleDeliveryPackageDetailList(Long reservationId) {
DistributionAppStockUpClientVO stockUpClientVO = baseMapper.selectPlanClientDetailById(reservationId);
if (Objects.isNull(stockUpClientVO)){
return R.fail("查询备货客户信息错误");
}
List<DistributionAppStockUpPackageDetailVO> deliveryPackageDetailList = baseMapper.selectDeliveryPackageDetailList(reservationId,orderId);
List<DistributionAppStockUpPackageDetailVO> deliveryPackageDetailList = baseMapper.selectDeliveryPackageDetailList(reservationId);
if (!deliveryPackageDetailList.isEmpty()) {
stockUpClientVO.setDeliveryPackageDetailList(deliveryPackageDetailList);
}
@ -5674,12 +5694,12 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
}
@Override
public R handleBillPackageDetailList(Long reservationId, Long orderId) {
public R handleBillPackageDetailList(Long reservationId) {
DistributionAppStockUpClientVO stockUpClientVO = baseMapper.selectPlanClientDetailById(reservationId);
if (Objects.isNull(stockUpClientVO)){
return R.fail("查询备货客户信息错误");
}
List<DistributionAppStockUpPackageDetailVO> billPackageDetailList = baseMapper.selectBillPackageDetailList(reservationId,orderId);
List<DistributionAppStockUpPackageDetailVO> billPackageDetailList = baseMapper.selectBillPackageDetailList(reservationId);
if (!billPackageDetailList.isEmpty()) {
stockUpClientVO.setDeliveryPackageDetailList(billPackageDetailList);
}
@ -5827,14 +5847,15 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
}
//查询已扫备货的详情
List<DistributionAppStockUpScanDetailVO> stockUpScanDetailVO = distributionStockService.selectScanDetail(reservationId,stockupId);
return R.data(stockUpScanDetailVO);
if (!stockUpScanDetailVO.isEmpty()) {
stockUpClientVO.setStockUpScanDetailVO(stockUpScanDetailVO);
return R.data(stockUpClientVO);
}
return R.fail("无备货记录");
}
@Override
public R newStockupArea(StockupDTO stockupDTO) {
if (Objects.isNull(stockupDTO.getStockupId())){
return R.fail("StockupId()参数缺失");
}
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
if (Objects.isNull(myCurrentWarehouse)) {
return Resp.scanFail("请选择备货作业仓库","请选择备货作业仓库");
@ -5843,6 +5864,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
return Resp.scanFail("当前仓库无部门信息","当前仓库无部门信息");
}
Long stockupId = stockupDTO.getStockupId();
String allocationCode = stockupDTO.getAllocationCode();
DistributionStockupEntity stockupEntity = this.getById(stockupId);
if (Objects.isNull(stockupEntity)) {
return R.fail("查询备货计划错误");
@ -5862,7 +5884,16 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
}
Long deptId = myCurrentWarehouse.getDepartment();
return R.data(basicdataGoodsAreaClient.getDepartmentId(deptId));
List<BasicdataGoodsAreaVO> goodsAreaVOList = basicdataGoodsAreaClient.getDepartmentId(deptId);
BasicdataGoodsAllocationEntity entityByQrCode = basicdataGoodsAllocationClient.findEntityByQrCode(myCurrentWarehouse.getId(), allocationCode);
if (Objects.isNull(entityByQrCode)){
return Resp.scanFail("请扫描库位码","请扫描库位码");
}
List<BasicdataGoodsAreaVO> areaVOList = goodsAreaVOList.stream().filter(f -> "1".equals(f.getAreaType()) && entityByQrCode.getGoodsAreaId().equals(f.getId())).collect(Collectors.toList());
if (!areaVOList.isEmpty()) {
return Resp.scanFail("当前库位不是备货库位","当前库位不是备货库位");
}
return R.data(entityByQrCode);
}else {
return Resp.scanFail("当前操作人无此操作权限","当前操作人无此操作权限");
}
@ -6058,13 +6089,28 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
@Override
public R handleDeliveryTrayDetailList(Long reservationId) {
return R.data(distributionReservationMapper.deliveryTrayDetailList(reservationId));
DistributionAppStockUpClientVO stockUpClientVO = baseMapper.selectPlanClientDetailById(reservationId);
if (Objects.isNull(stockUpClientVO)){
return R.fail("查询备货客户信息错误");
}
List<DistributionAppStockUpTrayDetailVO> distributionAppStockUpTrayDetailVOS = distributionReservationMapper.deliveryTrayDetailList(reservationId);
if (!distributionAppStockUpTrayDetailVOS.isEmpty()) {
stockUpClientVO.setDeliveryTrayList(distributionAppStockUpTrayDetailVOS);
}
return R.data(stockUpClientVO);
}
@Override
public R handleBillTrayDetailList(Long reservationId) {
return R.data(distrilbutionBillLadingMapper.billTrayDetailList(reservationId));
DistributionAppStockUpClientVO stockUpClientVO = baseMapper.selectPlanClientDetailById(reservationId);
if (Objects.isNull(stockUpClientVO)){
return R.fail("查询备货客户信息错误");
}
List<DistributionAppStockUpTrayDetailVO> distributionAppStockUpTrayDetailVOS = distrilbutionBillLadingMapper.billTrayDetailList(reservationId);
if (!distributionAppStockUpTrayDetailVOS.isEmpty()) {
stockUpClientVO.setDeliveryTrayList(distributionAppStockUpTrayDetailVOS);
}
return R.data(stockUpClientVO);
}
/**

16
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/QualityDeliverServiceImpl.java

@ -116,6 +116,10 @@ public class QualityDeliverServiceImpl extends BaseServiceImpl<QualityDeliverMap
BigDecimal fuelCost = BigDecimal.ZERO;
trainDetailEntity.setSettlementStatus("未结算");
for (QualityDeliverEntity qualityDeliverEntity : value) {
trainDetailEntity.setTrainCompletionYear(DateUtil.year(qualityDeliverEntity.getCarComplateTime()));
trainDetailEntity.setTrainCompletionMonth(DateUtil.month(qualityDeliverEntity.getCarComplateTime()) + 1);
trainDetailEntity.setTrainCompletionDay(DateUtil.dayOfMonth(qualityDeliverEntity.getCarComplateTime()));
trainDetailEntity.setTrainCompletionTime(qualityDeliverEntity.getCarComplateTime());
trainDetailEntity.setTotalOrderQuantity(qualityDeliverEntity.getOrderNumber());
trainDetailEntity.setDeliveryVehicle(qualityDeliverEntity.getSignCarNumber());
trainDetailEntity.setDistributionModel(qualityDeliverEntity.getSignCarType());
@ -426,16 +430,16 @@ public class QualityDeliverServiceImpl extends BaseServiceImpl<QualityDeliverMap
baseMapper.delPlanDelivery(id);
}
@Override
public void delDistributionCarStart(Long id) {
baseMapper.delDistributionCarStart(id);
}
@Override
public void delDistributionCarStart(Long id) {
baseMapper.delDistributionCarStart(id);
}
@Override
public void carExpenseDispatchDetailFinal(String trainNumber) {
if(StrUtil.isNotEmpty(trainNumber)){
if (StrUtil.isNotEmpty(trainNumber)) {
List<QualityDeliverEntity> entities = this.list(Wrappers.<QualityDeliverEntity>lambdaQuery().eq(QualityDeliverEntity::getSignTrainNumber, trainNumber));
if(CollUtil.isNotEmpty(entities)){
if (CollUtil.isNotEmpty(entities)) {
buildCarExpenseReport(entities);
}
}

6
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/mapper/ExpenseDispatchTrainDetailMapper.xml

@ -37,6 +37,12 @@
<if test="expenseDispatchTrainDetail.deliveryDateEnd != null and expenseDispatchTrainDetail.deliveryDateEnd != ''">
and delivery_date &lt;= #{expenseDispatchTrainDetail.deliveryDateEnd}
</if>
<if test="expenseDispatchTrainDetail.trainCompletionTimeStart != null and expenseDispatchTrainDetail.trainCompletionTimeStart != ''">
and train_completion_time >= #{expenseDispatchTrainDetail.trainCompletionTimeStart}
</if>
<if test="expenseDispatchTrainDetail.trainCompletionTimeEnd != null and expenseDispatchTrainDetail.trainCompletionTimeEnd != ''">
and train_completion_time &lt;= #{expenseDispatchTrainDetail.trainCompletionTimeEnd}
</if>
<if test="expenseDispatchTrainDetail.distributionType != null and expenseDispatchTrainDetail.distributionType != ''">
and distribution_type = #{expenseDispatchTrainDetail.distributionType}
</if>

12
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/mapper/ExpenseDispatchWarehouseMonthMapper.xml

@ -32,9 +32,9 @@
<select id="expenseDispatchDetailMonthJob" resultType="com.logpm.statistics.entity.ExpenseDispatchWarehouseMonthEntity">
select t.destination_warehouse destinationWarehouse,
t.settlement_month settlementMonth,
t.settlement_year settlementYear,
concat(t.settlement_year,'年',t.settlement_month,'月') settlementTime,
t.train_completion_month settlementMonth,
t.train_completion_year settlementYear,
concat(t.train_completion_year,'年',t.train_completion_month,'月') settlementTime,
count(*) totalTrainService,
sum(t.planned_total_quantity) plannedTotalQuantity,
sum(t.inventory_item_count) inventoryItemCount,
@ -57,9 +57,9 @@
sum(t.change_amount) changeAmount,
sum(t.settlement_amount) settlementAmount
from logpm_expense_dispatch_train_detail t
where t.settlement_year = #{year}
and t.settlement_month = #{month}
group by t.settlement_month,t.settlement_year,t.destination_warehouse
where t.train_completion_year = #{year}
and t.train_completion_month = #{month}
group by t.train_completion_month,t.train_completion_year,t.destination_warehouse
</select>

12
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/query/ExpenseDispatchTrainDetailQuery.java

@ -5,6 +5,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.support.Query;
import java.util.Date;
@Data
@EqualsAndHashCode(callSuper = true)
public class ExpenseDispatchTrainDetailQuery extends Query {
@ -18,6 +20,16 @@ public class ExpenseDispatchTrainDetailQuery extends Query {
*/
@ApiModelProperty(value = "配送日期结束")
private String deliveryDateEnd;
/**
* 车次完成时间开始
*/
@ApiModelProperty(value = "车次完成时间开始")
private Date trainCompletionTimeStart;
/**
* 车次完成时间结束
*/
@ApiModelProperty(value = "车次完成时间结束")
private Date trainCompletionTimeEnd;
/**
* 配送司机
*/

8
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/vo/ExpenseDispatchTrainDetailVO.java

@ -64,8 +64,14 @@ public class ExpenseDispatchTrainDetailVO {
* 配送日期
*/
@ApiModelProperty(value = "配送日期")
@ExcelProperty("车次号")
@ExcelProperty("配送日期")
private String deliveryDate;
/**
* 车次完成时间
*/
@ApiModelProperty(value = "车次完成时间")
@ExcelProperty("车次完成时间")
private String trainCompletionTime;
/**
* 目的仓
*/

Loading…
Cancel
Save