Browse Source

1.App配送,客户,不在表单签收

dev-warehouse
0.0 2 years ago
parent
commit
cb21691d78
  1. 5
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryListEntity.java
  2. 80
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionLoadscaninvnEntity.java
  3. 60
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppDeliveryListVO.java
  4. 58
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppReservationVO.java
  5. 35
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppStockArticleVO.java
  6. 63
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionDeliveryAppController.java
  7. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionSignforAppController.java
  8. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java
  9. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java
  10. 42
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/DistributionAppDeliveryListDTO.java
  11. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/DistrilbutionloadingscanDTO.java
  12. 15
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.java
  13. 26
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml
  14. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java
  15. 53
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
  16. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionLoadscanMapper.java
  17. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionLoadscanordMapper.java
  18. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionLoadscanresMapper.java
  19. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryInfoService.java
  20. 29
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java
  21. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java
  22. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java
  23. 51
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  24. 138
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

5
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryListEntity.java

@ -210,6 +210,11 @@ public class DistributionDeliveryListEntity extends TenantEntity {
*/ */
@ApiModelProperty(value = "增值服务总费用") @ApiModelProperty(value = "增值服务总费用")
private BigDecimal fee; private BigDecimal fee;
/**
* 任务时间
*/
@ApiModelProperty(value = "任务时间")
private String taskTime;
/** /**
* 配送单号 * 配送单号

80
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionLoadscaninvnEntity.java

@ -35,7 +35,6 @@ import org.springblade.core.tenant.mp.TenantEntity;
@ApiModel(value = "DistributionLoadscaninvn对象", description = "装车扫描签收(库存)表") @ApiModel(value = "DistributionLoadscaninvn对象", description = "装车扫描签收(库存)表")
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
public class DistributionLoadscaninvnEntity extends TenantEntity { public class DistributionLoadscaninvnEntity extends TenantEntity {
/** /**
* 预留1 * 预留1
*/ */
@ -86,66 +85,93 @@ public class DistributionLoadscaninvnEntity extends TenantEntity {
*/ */
@ApiModelProperty(value = "托盘码") @ApiModelProperty(value = "托盘码")
private String trayNo; private String trayNo;
/** /**
* 车次号 * 车次号
*/ */
@ApiModelProperty(value = "车次号") @ApiModelProperty(value = "车次号")
private String trainNumber; private String trainNumber;
/**
* 装车表id
*/
@ApiModelProperty(value = "装车表id")
private String loadingId;
/** /**
* 配送车辆id * 配送车辆id
*/ */
@ApiModelProperty(value = "配送车辆id") @ApiModelProperty(value = "配送车辆id")
private String vehicleId; private String vehicleId;
/** /**
* 配送司机id * 配送司机id
*/ */
@ApiModelProperty(value = "配送司机id") @ApiModelProperty(value = "配送司机id")
private String driverId; private String driverId;
/** /**
* 配送车辆车牌 * 配送车辆车牌
*/ */
@ApiModelProperty(value = "配送车辆车牌") @ApiModelProperty(value = "配送车辆车牌")
private String vehicleName; private String vehicleName;
/** /**
* 配送司机名称 * 配送司机名称
*/ */
@ApiModelProperty(value = "配送司机名称") @ApiModelProperty(value = "配送司机名称")
private String driverName; private String driverName;
/**
* 配送司机手机
*/
@ApiModelProperty(value = "配送司机手机")
private String driverPhone;
/** /**
* 扫描仓库id * 扫描仓库id
*/ */
@ApiModelProperty(value = "扫描仓库id") @ApiModelProperty(value = "扫描仓库id")
private Long warehouseId; private Long warehouseId;
/** /**
* 仓库名称 * 仓库名称
*/ */
@ApiModelProperty(value = "仓库名称") @ApiModelProperty(value = "仓库名称")
private String warehouseName; private String warehouseName;
/** /**
* 条码 * 条码
*/ */
@ApiModelProperty(value = "条码") @ApiModelProperty(value = "条码")
private String packetBarCode; private String packetBarCode;
/** /**
* 扫描状态;1=未装车2=扫描,3=确认 * 扫描状态;1=未装车2=扫描,3=确认
*/ */
@ApiModelProperty(value = "扫描状态;(1=未装车,2=扫描,3=确认)") @ApiModelProperty(value = "扫描状态;(1=未装车,2=扫描,3=确认,4-补录)")
private Integer scanStatus; private Integer scanStatus;
/** /**
* 确认时间 * 确认时间
*/ */
@ApiModelProperty(value = "确认时间") @ApiModelProperty(value = "确认时间")
private Date confirmTime; private Date confirmTime;
/** /**
* 扫描时间 * 扫描时间
*/ */
@ApiModelProperty(value = "扫描时间") @ApiModelProperty(value = "扫描时间")
private Date scanTime; private Date scanTime;
/** /**
* 是否齐套;1未齐套2齐套 * 是否齐套;1未齐套2齐套
*/ */
@ApiModelProperty(value = "是否齐套;(1未齐套,2齐套)") @ApiModelProperty(value = "是否齐套;(1未齐套,2齐套)")
private Integer kitting; private Integer kitting;
/**
* 是否一键装车1-不是,2-
*/
@ApiModelProperty(value = "是否一键装车(1-不是,2-是)")
private Integer oneClick;
/** /**
* 类型;1卸车2装车 * 类型;1卸车2装车
*/ */
@ -156,60 +182,83 @@ public class DistributionLoadscaninvnEntity extends TenantEntity {
*/ */
@ApiModelProperty(value = "滞留操作人") @ApiModelProperty(value = "滞留操作人")
private String detentionPerson; private String detentionPerson;
/** /**
* 卸货仓库id * 卸货仓库id
*/ */
@ApiModelProperty(value = "卸货仓库id") @ApiModelProperty(value = "卸货仓库id")
private Long unWarehouseId; private Long unWarehouseId;
/** /**
* 卸货仓库名称 * 卸货仓库名称
*/ */
@ApiModelProperty(value = "卸货仓库名称") @ApiModelProperty(value = "卸货仓库名称")
private String unWarehouseName; private String unWarehouseName;
/** /**
* 卸货人id * 卸货人id
*/ */
@ApiModelProperty(value = "卸货人id") @ApiModelProperty(value = "卸货人id")
private Long unAdministratorsId; private Long unAdministratorsId;
/** /**
* 卸货人名称 * 卸货人名称
*/ */
@ApiModelProperty(value = "卸货人名称") @ApiModelProperty(value = "卸货人名称")
private String unAdministratorsName; private String unAdministratorsName;
/** /**
* 补录;1=正常,2=补录数据 * 补录;1=正常,2=补录数据
*/ */
@ApiModelProperty(value = "补录;(1=正常,2=补录数据)") @ApiModelProperty(value = "补录;(1=正常,2=补录数据)")
private Integer isInsert; private Integer isInsert;
/** /**
* 扫码状态;1=无数据装车2=有数据装车 * 扫码状态;1=无数据装车2=有数据装车
*/ */
@ApiModelProperty(value = "扫码状态;(1=无数据装车;2=有数据装车)") @ApiModelProperty(value = "扫码状态;(1=无数据装车;2=有数据装车)")
private Integer scanState; private Integer scanState;
/** /**
* 同步;1=正常数据2=无编码未同步3=无编码已同步待绑定 * 同步;1=正常数据2=无编码未同步3=无编码已同步待绑定
*/ */
@ApiModelProperty(value = "同步;(1=正常数据,2=无编码未同步,3=无编码已同步待绑定)") @ApiModelProperty(value = "同步;(1=正常数据,2=无编码未同步,3=无编码已同步待绑定)")
private Integer scanSynchronous; private Integer scanSynchronous;
/** /**
* 计划目的网点 * 计划目的网点
*/ */
@ApiModelProperty(value = "计划目的网点") @ApiModelProperty(value = "计划目的网点")
private String planDestinationId; private String planDestinationId;
/** /**
* 备注信息 * 备注信息
*/ */
@ApiModelProperty(value = "备注信息") @ApiModelProperty(value = "备注信息")
private String msg; private String msg;
/** /**
* 卸车时间 * 卸车时间
*/ */
@ApiModelProperty(value = "卸车时间") @ApiModelProperty(value = "卸车时间")
private Date unloadTime; private Date unloadTime;
/** /**
* 客户表id(预约) * 签收扫描时间
*/
@ApiModelProperty(value = "签收扫描时间")
private String signingTime;
/**
* 订单表id
*/
@ApiModelProperty(value = "订单表id")
private Long orderId;
/**
* 客户表id
*/ */
@ApiModelProperty(value = "客户表id(预约)") @ApiModelProperty(value = "客户表id")
private Long reservationId; private Long reservationId;
/** /**
* 库存品id * 库存品id
@ -221,38 +270,25 @@ public class DistributionLoadscaninvnEntity extends TenantEntity {
*/ */
@ApiModelProperty(value = "配送表id") @ApiModelProperty(value = "配送表id")
private Long deliveryId; private Long deliveryId;
/** /**
* 装车数量 * 装车数量
*/ */
@ApiModelProperty(value = "装车数量") @ApiModelProperty(value = "装车数量")
private Integer loadedNub; private Integer loadedNub;
/**
* 订单编号
*/
@ApiModelProperty(value = "订单编号")
private Long orderId;
/** /**
* 包内数量 * 包内数量
*/ */
@ApiModelProperty(value = "包内数量") @ApiModelProperty(value = "包内数量")
private Integer packageNub; private Integer packageNub;
/**
* (当前)装车表id
*/
@ApiModelProperty(value = "(当前)装车表id")
private String loadingId;
/**
* 司机电话
*/
@ApiModelProperty(value = "司机电话")
private String driverPhone;
/** /**
* 签收状态(1-未签收,2签收) * 签收状态(1-未签收,2签收)
*/ */
@ApiModelProperty(value = "签收状态(1-未签收,2签收)") @ApiModelProperty(value = "签收状态(1-未签收,2签收)")
private Integer signforState; private Integer signforState;
/** /**
* 是否再签收(1-不是,2-) * 是否再签收(1-不是,2-)
*/ */

60
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppDeliveryListVO.java

@ -0,0 +1,60 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.vo.app;
import com.logpm.distribution.entity.DistributionDeliveryListEntity;
import com.logpm.distribution.vo.DistributionDeliveryInfoVO;
import com.logpm.distribution.vo.DistributionReservationVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
/**
* 配送管理 App视图实体类
*
* @author lmy
* @since 2023-06-16
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class DistributionAppDeliveryListVO extends DistributionDeliveryListEntity {
private static final long serialVersionUID = 1L;
/**
* 装车件数
*/
@ApiModelProperty(value = "装车件数")
private Integer loadingNub;
/**
* 是否备货
*/
@ApiModelProperty(value = "是否备货(1-没有,2-备货)")
private String isstock;
/**
* 预约客户数据
*/
@ApiModelProperty(value = "预约客户数据")
private List<DistributionAppReservationVO> reservationList;
}

58
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppReservationVO.java

@ -0,0 +1,58 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.vo.app;
import com.logpm.distribution.entity.DistributionReservationEntity;
import com.logpm.distribution.vo.DistributionStockArticleVO;
import com.logpm.distribution.vo.DistributionStockListVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
/**
* 预约列表 App视图实体类
*
* @author TJJ
* @since 2023-06-12
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class DistributionAppReservationVO extends DistributionReservationEntity {
private static final long serialVersionUID = 1L;
/**
* 是否备货
*/
@ApiModelProperty(value = "是否备货(1-没有,2-备货)")
private String isstock;
/**
* 装车件数
*/
@ApiModelProperty(value = "装车件数")
private Integer loadingNub;
/**
* 订单总数
*/
@ApiModelProperty(value = "订单总数")
private Integer ordNub;
}

35
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppStockArticleVO.java

@ -0,0 +1,35 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.vo.app;
import com.logpm.distribution.entity.DistributionStockArticleEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 配送在库订单 视图实体类
*
* @author cyz
* @since 2023-06-13
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class DistributionAppStockArticleVO extends DistributionStockArticleEntity {
private static final long serialVersionUID = 1L;
}

63
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionDeliveryAppController.java

@ -1,12 +1,24 @@
package com.logpm.distribution.appcontroller; package com.logpm.distribution.appcontroller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.distribution.dto.DistrilbutionloadingscanDTO; import com.logpm.distribution.dto.DistributionDeliveryInfoDTO;
import com.logpm.distribution.dto.DistributionDeliveryListDTO;
import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO;
import com.logpm.distribution.dto.app.DistrilbutionloadingscanDTO;
import com.logpm.distribution.entity.DistributionDeliveryListEntity;
import com.logpm.distribution.service.IDistributionDeliveryInfoService; import com.logpm.distribution.service.IDistributionDeliveryInfoService;
import com.logpm.distribution.service.IDistributionDeliveryListService; import com.logpm.distribution.service.IDistributionDeliveryListService;
import com.logpm.distribution.vo.DistributionDeliveryListVO;
import com.logpm.distribution.vo.DistributionStockArticleVO;
import com.logpm.distribution.vo.app.DistributionAppDeliveryListVO;
import com.logpm.distribution.vo.app.DistributionAppStockArticleVO;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -28,11 +40,49 @@ public class DistributionDeliveryAppController {
private final IDistributionDeliveryInfoService distributionDeliveryInfoService; private final IDistributionDeliveryInfoService distributionDeliveryInfoService;
/**
* 配送管理 列表
*/
@GetMapping("/list")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "列表", notes = "DistributionAppDeliveryListDTO")
public R<IPage<DistributionAppDeliveryListVO>> list(DistributionAppDeliveryListDTO distributionDeliveryList, Query query) {
IPage<DistributionAppDeliveryListVO> pages = distributionDeliveryListService.selectDistributionAppDeliveryListPage(Condition.getPage(query), distributionDeliveryList);
return R.data(pages);
}
/**
* 配送 查看客户
*/
@GetMapping("/custom")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入DistributionDeliveryListDTO")
public R<DistributionAppDeliveryListVO> detail(DistributionAppDeliveryListDTO distributionDeliveryList) {
DistributionDeliveryListEntity detail = distributionDeliveryListService.getOne(Condition.getQueryWrapper(distributionDeliveryList));
DistributionAppDeliveryListVO distributionAppDeliveryListVO = distributionDeliveryListService.getAppDeliverydetailVO(detail);
return R.data(distributionAppDeliveryListVO);
}
/**
* 配送 查看订单
*/
@GetMapping("/order")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "查看订单", notes = "DistributionAppDeliveryListDTO")
public R<IPage<DistributionAppStockArticleVO>> order(DistributionAppDeliveryListDTO distributionAppDeliveryListDTO, Query query) {
IPage<DistributionAppStockArticleVO> pages = distributionDeliveryInfoService.selectDistributionAppDeliveryorder(Condition.getPage(query), distributionAppDeliveryListDTO);
return R.data(pages);
}
/** /**
* 配送管理 装车扫描 * 配送管理 装车扫描
*/ */
@PostMapping("/loadingscan") @PostMapping("/loadingscan")
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
@ApiOperation(value = "装车扫描", notes = "传入DistrilbutionloadingscanDTO")
public R loadingscan(@Valid @RequestBody DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) { public R loadingscan(@Valid @RequestBody DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) {
R msg = distributionDeliveryListService.loadingscan(distrilbutionloadingscanDTO); R msg = distributionDeliveryListService.loadingscan(distrilbutionloadingscanDTO);
return msg; return msg;
@ -42,8 +92,8 @@ public class DistributionDeliveryAppController {
* 配送管理 库存品装车 * 配送管理 库存品装车
*/ */
@PostMapping("/loadinginventory") @PostMapping("/loadinginventory")
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 3)
@ApiOperation(value = "分页", notes = "DistrilbutionloadingscanDTO") @ApiOperation(value = "库存品装车", notes = "传入DistrilbutionloadingscanDTO")
public R loadinginventory(@Valid @RequestBody DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) { public R loadinginventory(@Valid @RequestBody DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) {
R msg = distributionDeliveryListService.loadinginventory(distrilbutionloadingscanDTO); R msg = distributionDeliveryListService.loadinginventory(distrilbutionloadingscanDTO);
return msg; return msg;
@ -53,8 +103,8 @@ public class DistributionDeliveryAppController {
* 配送管理 装车扫描取消 * 配送管理 装车扫描取消
*/ */
@PostMapping("/loadingscanoff") @PostMapping("/loadingscanoff")
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 4)
@ApiOperation(value = "分页", notes = "传入distributionDeliveryList") @ApiOperation(value = "装车扫描(取消)", notes = "传入DistrilbutionloadingscanDTO")
public R loadingscanoff(@Valid @RequestBody DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) { public R loadingscanoff(@Valid @RequestBody DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) {
R msg = distributionDeliveryListService.loadingscanoff(distrilbutionloadingscanDTO); R msg = distributionDeliveryListService.loadingscanoff(distrilbutionloadingscanDTO);
return msg; return msg;
@ -64,7 +114,8 @@ public class DistributionDeliveryAppController {
* 配送管理 装车确认(确认) * 配送管理 装车确认(确认)
*/ */
@GetMapping("/oneack") @GetMapping("/oneack")
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 5)
@ApiOperation(value = "装车确认(确认))", notes = "DistrilbutionloadingscanDTO")
public R oneack(@Valid @RequestBody DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) { public R oneack(@Valid @RequestBody DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) {
R msg = distributionDeliveryListService.oneack(distrilbutionloadingscanDTO); R msg = distributionDeliveryListService.oneack(distrilbutionloadingscanDTO);
return msg; return msg;

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

@ -30,6 +30,8 @@ public class DistributionSignforAppController {
private final IDistributionSignforService distributionSignforService; private final IDistributionSignforService distributionSignforService;
private final IDistributionReservationService reservationService; private final IDistributionReservationService reservationService;
/** /**
* 司机扫描签收管理 客户签收 * 司机扫描签收管理 客户签收
*/ */
@ -46,7 +48,7 @@ public class DistributionSignforAppController {
@GetMapping("/signforcontinue") @GetMapping("/signforcontinue")
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
public R signforcontinue(@Valid @RequestBody DistrilbutionAppsignforDTO distrilbutionloadingscanDTO) { public R signforcontinue(@Valid @RequestBody DistrilbutionAppsignforDTO distrilbutionloadingscanDTO) {
R msg = distributionSignforService.signfor(distrilbutionloadingscanDTO); R msg = distributionSignforService.signforcontinue(distrilbutionloadingscanDTO);
return msg; return msg;
} }
/** /**

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

@ -16,11 +16,9 @@
*/ */
package com.logpm.distribution.controller; package com.logpm.distribution.controller;
import cn.hutool.core.util.BooleanUtil;
import com.baomidou.mybatisplus.core.metadata.OrderItem;
import com.logpm.distribution.dto.DistributionDeliveryInfoDTO; import com.logpm.distribution.dto.DistributionDeliveryInfoDTO;
import com.logpm.distribution.dto.DistributionDeliveryListDTO; import com.logpm.distribution.dto.DistributionDeliveryListDTO;
import com.logpm.distribution.dto.DistrilbutionloadingscanDTO; import com.logpm.distribution.dto.app.DistrilbutionloadingscanDTO;
import com.logpm.distribution.service.IDistributionDeliveryInfoService; import com.logpm.distribution.service.IDistributionDeliveryInfoService;
import com.logpm.distribution.vo.*; import com.logpm.distribution.vo.*;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -36,7 +34,6 @@ import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.Func;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSignforController.java

@ -17,11 +17,8 @@
package com.logpm.distribution.controller; package com.logpm.distribution.controller;
import com.logpm.distribution.dto.DistributionSignforDTO; import com.logpm.distribution.dto.DistributionSignforDTO;
import com.logpm.distribution.dto.DistrilbutionAppsignforDTO;
import com.logpm.distribution.dto.DistrilbutionloadingscanDTO;
import com.logpm.distribution.service.IDistributionReservationService; import com.logpm.distribution.service.IDistributionReservationService;
import com.logpm.distribution.vo.DistributionSignforsnmbVO; import com.logpm.distribution.vo.DistributionSignforsnmbVO;
import com.logpm.distribution.vo.DistributionstatisticsnmbVO;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
@ -35,7 +32,6 @@ import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.Func;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;

42
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/DistributionAppDeliveryListDTO.java

@ -0,0 +1,42 @@
/*
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the dreamlu.net developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
* Author: Chill 庄骞 (smallchill@163.com)
*/
package com.logpm.distribution.dto.app;
import com.logpm.distribution.entity.DistributionDeliveryListEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NonNull;
/**
* 配送管理 数据传输对象实体类
*
* @author lmy
* @since 2023-06-16
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class DistributionAppDeliveryListDTO extends DistributionDeliveryListEntity {
private static final long serialVersionUID = 1L;
/**
* 查询创建时间
*/
@ApiModelProperty(value = "查询创建时间")
private String createTime_query;
}

2
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistrilbutionloadingscanDTO.java → blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/DistrilbutionloadingscanDTO.java

@ -1,4 +1,4 @@
package com.logpm.distribution.dto; package com.logpm.distribution.dto.app;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;

15
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.java

@ -17,6 +17,7 @@
package com.logpm.distribution.mapper; package com.logpm.distribution.mapper;
import com.logpm.distribution.dto.DistributionDeliveryInfoDTO; import com.logpm.distribution.dto.DistributionDeliveryInfoDTO;
import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO;
import com.logpm.distribution.entity.DistributionDeliveryInfoEntity; import com.logpm.distribution.entity.DistributionDeliveryInfoEntity;
import com.logpm.distribution.vo.DistributionDeliveryInfoVO; import com.logpm.distribution.vo.DistributionDeliveryInfoVO;
import com.logpm.distribution.excel.DistributionDeliveryInfoExcel; import com.logpm.distribution.excel.DistributionDeliveryInfoExcel;
@ -25,6 +26,8 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.vo.DistributionStockArticleVO; import com.logpm.distribution.vo.DistributionStockArticleVO;
import com.logpm.distribution.vo.DistributionStockListVO; import com.logpm.distribution.vo.DistributionStockListVO;
import com.logpm.distribution.vo.app.DistributionAppReservationVO;
import com.logpm.distribution.vo.app.DistributionAppStockArticleVO;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
@ -108,4 +111,16 @@ public interface DistributionDeliveryInfoMapper extends BaseMapper<DistributionD
* @return * @return
*/ */
List<DistributionStockArticleVO> selectDistributionDeliveryOrderPage(IPage<DistributionStockArticleVO> page,@Param("param") DistributionDeliveryInfoDTO distributionDeliveryInfoDTO); List<DistributionStockArticleVO> selectDistributionDeliveryOrderPage(IPage<DistributionStockArticleVO> page,@Param("param") DistributionDeliveryInfoDTO distributionDeliveryInfoDTO);
/**
* App-通过配送查询客户信息
*
* @return
*/
List<DistributionAppReservationVO> selectAppcustomList( Long id);
/**
* App-通过客户查询订单
*
* @return
*/
List<DistributionAppStockArticleVO> selectDistributionAppDeliveryOrderPage(IPage<DistributionAppStockArticleVO> page,@Param("param") DistributionAppDeliveryListDTO distributionAppDeliveryListDTO);
} }

26
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml

@ -248,6 +248,32 @@
JOIN logpm_distribution_stock_article ldsa ON ldrs.stock_article_id = ldsa.id JOIN logpm_distribution_stock_article ldsa ON ldrs.stock_article_id = ldsa.id
where lddl.id = #{param.deliveryId} where lddl.id = #{param.deliveryId}
</select> </select>
<select id="selectAppcustomList" resultType="com.logpm.distribution.vo.app.DistributionAppReservationVO">
SELECT
ldr.consignee consignee,
ldr.reservation_num reservationNum,
lds.loaded_number loadingNub,
(SELECT COUNT(*) from logpm_distribution_reservation_stockarticle ldrs WHERE ldrs.reservation_id =ldr.id ) ordNub
FROM
logpm_distribution_signfor lds
JOIN logpm_distribution_reservation ldr ON ldr.id = lds.reservation_id
WHERE
lds.is_deleted = 0
AND lds.delivery_id = #{id}
</select>
<select id="selectDistributionAppDeliveryOrderPage" resultType="com.logpm.distribution.vo.app.DistributionAppStockArticleVO">
SELECT
ldr.consignee consignee,
ldr.reservation_num reservationNum,
lds.loaded_number loadingNub,
(SELECT COUNT(*) from logpm_distribution_reservation_stockarticle ldrs WHERE ldrs.reservation_id =ldr.id ) ordNub
FROM
logpm_distribution_signfor lds
JOIN logpm_distribution_reservation ldr ON ldr.id = lds.reservation_id
WHERE
lds.is_deleted = 0
AND lds.delivery_id = #{id}
</select>
</mapper> </mapper>

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

@ -18,7 +18,7 @@ package com.logpm.distribution.mapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.logpm.distribution.dto.DistributionDeliveryListDTO; import com.logpm.distribution.dto.DistributionDeliveryListDTO;
import com.logpm.distribution.dto.DistrilbutionloadingscanDTO; import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO;
import com.logpm.distribution.entity.*; import com.logpm.distribution.entity.*;
import com.logpm.distribution.vo.DistributionDeliveryListPrintReponseVO; import com.logpm.distribution.vo.DistributionDeliveryListPrintReponseVO;
import com.logpm.distribution.vo.DistributionDeliveryListPrintRequestVO; import com.logpm.distribution.vo.DistributionDeliveryListPrintRequestVO;
@ -28,6 +28,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.vo.DistributionLoadscaninvnVO; import com.logpm.distribution.vo.DistributionLoadscaninvnVO;
import com.logpm.distribution.vo.app.DistributionAppDeliveryListVO;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
@ -172,4 +173,6 @@ public interface DistributionDeliveryListMapper extends BaseMapper<DistributionD
* @return * @return
*/ */
List<DistributionLoadscaninvnEntity> selectdeliveryworkVnScanStock(@Param("barcode")String barcode,@Param("deliveryId") Long deliveryId); List<DistributionLoadscaninvnEntity> selectdeliveryworkVnScanStock(@Param("barcode")String barcode,@Param("deliveryId") Long deliveryId);
List<DistributionAppDeliveryListVO> selectDistributionAppDeliveryListPage(IPage page, @Param("param") DistributionAppDeliveryListDTO distributionAppDeliveryListDTO);
} }

53
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml

@ -47,7 +47,7 @@
WHERE ldl.package_id = #{id} and lddl.loading_time is null WHERE ldl.package_id = #{id} and lddl.loading_time is null
</update> </update>
<update id="updateloadingTimeById"> <update id="updateloadingTimeById">
UPDATE logpm_distribution_delivery_list lddl SET lddl.loading_time = now() WHERE lddl.id = #{id} and lddl.loading_time is null UPDATE logpm_distribution_delivery_list lddl SET lddl.loading_time = now(),lddl.state =2 WHERE lddl.id = #{id} and lddl.loading_time is null
</update> </update>
@ -76,6 +76,7 @@
lddl.lead_time leadTime, lddl.lead_time leadTime,
lddl.order_id orderId, lddl.order_id orderId,
lddl.fee fee, lddl.fee fee,
lddl.task_time taskTime,
lddl.loading_time loadingTime, lddl.loading_time loadingTime,
lddl.note_number noteNumber, lddl.note_number noteNumber,
lddl.source source, lddl.source source,
@ -113,13 +114,13 @@
and lddl.state = #{param.state} and lddl.state = #{param.state}
</if> </if>
<if test="param.createTime_query!=null and param.createTime_query!=''"> <if test="param.createTime_query!=null and param.createTime_query!=''">
and lddl.date_format(create_time,'%y%m%d%') = date_format(#{param.createTime_query},'%y%m%d%') and date_format(lddl.create_time,'%y%m%d%') = date_format(#{param.createTime_query},'%y%m%d%')
</if> </if>
<if test="param.leadTime!=null and param.leadTime!=''"> <if test="param.leadTime!=null and param.leadTime!=''">
and lddl.date_format(lead_time,'%y%m%d%') = date_format(#{param.leadTime},'%y%m%d%') and date_format(lddl.lead_time,'%y%m%d%') = date_format(#{param.leadTime},'%y%m%d%')
</if> </if>
<if test="param.loadingTime!=null and param.loadingTime!=''"> <if test="param.loadingTime!=null and param.loadingTime!=''">
and lddl.date_format(loading_time,'%y%m%d%') = date_format(#{param.loadingTime},'%y%m%d%') and date_format(lddl.loading_time,'%y%m%d%') = date_format(#{param.loadingTime},'%y%m%d%')
</if> </if>
</where> </where>
</select> </select>
@ -499,4 +500,48 @@
logpm_distribution_stock lds on lds.delivery_list_id = lddl.id logpm_distribution_stock lds on lds.delivery_list_id = lddl.id
where lddl.id = #{deliveryId} and ldpl.coding =#{barcode} where lddl.id = #{deliveryId} and ldpl.coding =#{barcode}
</select> </select>
<select id="selectDistributionAppDeliveryListPage" resultType="com.logpm.distribution.vo.app.DistributionAppDeliveryListVO">
SELECT
lddl.id id,
lddl.train_number trainNumber,
lddl.warehouse_name warehouseName,
lddl.warehouse_id warehouseId,
lddl.type type,
lddl.kind kind,
lddl.vehicle_name vehicleName,
lddl.driver_name driverName,
lddl.vehicle_id vehicleId,
lddl.driver_id driverId,
lddl.distribution_company distributionCompany,
lddl.state state,
lddl.customers_number customersNumber,
lddl.price price,
lddl.added_services_id addedServicesId,
lddl.order_number orderNumber,
lddl.delivery_number deliveryNumber,
lddl.loading_team_id loadingTeamId,
lddl.loading_team_name loadingTeamName,
lddl.reservation_id reservationId,
lddl.lead_time leadTime,
lddl.order_id orderId,
lddl.fee fee,
lddl.loading_time loadingTime,
lddl.note_number noteNumber,
lddl.source source,
lddl.task_time taskTime,
(SELECT COALESCE(sum(lds.loaded_number), 0) FROM logpm_distribution_signfor lds WHERE
lddl.id = lds.delivery_list_id) scannedNumber
FROM
logpm_distribution_delivery_list lddl
<where>
lddl.is_deleted =0
<if test="param.createTime_query!=null and param.createTime_query!=''">
and date_format(lddl.create_time,'%y%m%d%') = date_format(#{param.createTime_query},'%y%m%d%')
</if>
<if test="param.taskTime!=null and param.taskTime!=''">
and date_format(lddl.task_time,'%y%m%d%') = date_format(#{param.taskTime},'%y%m%d%')
</if>
</where>
</select>
</mapper> </mapper>

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

@ -16,7 +16,7 @@
*/ */
package com.logpm.distribution.mapper; package com.logpm.distribution.mapper;
import com.logpm.distribution.dto.DistrilbutionloadingscanDTO; import com.logpm.distribution.dto.app.DistrilbutionloadingscanDTO;
import com.logpm.distribution.entity.DistributionLoadscanEntity; import com.logpm.distribution.entity.DistributionLoadscanEntity;
import com.logpm.distribution.vo.DistributionLoadscanVO; import com.logpm.distribution.vo.DistributionLoadscanVO;
import com.logpm.distribution.excel.DistributionLoadscanExcel; import com.logpm.distribution.excel.DistributionLoadscanExcel;

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

@ -16,7 +16,7 @@
*/ */
package com.logpm.distribution.mapper; package com.logpm.distribution.mapper;
import com.logpm.distribution.dto.DistrilbutionloadingscanDTO; import com.logpm.distribution.dto.app.DistrilbutionloadingscanDTO;
import com.logpm.distribution.entity.DistributionLoadscanordEntity; import com.logpm.distribution.entity.DistributionLoadscanordEntity;
import com.logpm.distribution.vo.DistributionLoadscanordVO; import com.logpm.distribution.vo.DistributionLoadscanordVO;
import com.logpm.distribution.excel.DistributionLoadscanordExcel; import com.logpm.distribution.excel.DistributionLoadscanordExcel;

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

@ -16,7 +16,7 @@
*/ */
package com.logpm.distribution.mapper; package com.logpm.distribution.mapper;
import com.logpm.distribution.dto.DistrilbutionloadingscanDTO; import com.logpm.distribution.dto.app.DistrilbutionloadingscanDTO;
import com.logpm.distribution.entity.DistributionLoadscanresEntity; import com.logpm.distribution.entity.DistributionLoadscanresEntity;
import com.logpm.distribution.vo.DistributionLoadscanresVO; import com.logpm.distribution.vo.DistributionLoadscanresVO;
import com.logpm.distribution.excel.DistributionLoadscanresExcel; import com.logpm.distribution.excel.DistributionLoadscanresExcel;

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

@ -18,12 +18,14 @@ package com.logpm.distribution.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.logpm.distribution.dto.DistributionDeliveryInfoDTO; import com.logpm.distribution.dto.DistributionDeliveryInfoDTO;
import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO;
import com.logpm.distribution.entity.DistributionDeliveryInfoEntity; import com.logpm.distribution.entity.DistributionDeliveryInfoEntity;
import com.logpm.distribution.vo.DistributionDeliveryInfoVO; import com.logpm.distribution.vo.DistributionDeliveryInfoVO;
import com.logpm.distribution.excel.DistributionDeliveryInfoExcel; import com.logpm.distribution.excel.DistributionDeliveryInfoExcel;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.vo.DistributionStockArticleVO; import com.logpm.distribution.vo.DistributionStockArticleVO;
import com.logpm.distribution.vo.DistributionStockListVO; import com.logpm.distribution.vo.DistributionStockListVO;
import com.logpm.distribution.vo.app.DistributionAppStockArticleVO;
import org.springblade.core.mp.base.BaseService; import org.springblade.core.mp.base.BaseService;
import java.util.List; import java.util.List;
@ -83,4 +85,12 @@ public interface IDistributionDeliveryInfoService extends BaseService<Distributi
* @return * @return
*/ */
IPage<DistributionStockArticleVO> selectDistributionDeliveryorder(IPage<DistributionStockArticleVO> page, DistributionDeliveryInfoDTO distributionDeliveryInfoDTO); IPage<DistributionStockArticleVO> selectDistributionDeliveryorder(IPage<DistributionStockArticleVO> page, DistributionDeliveryInfoDTO distributionDeliveryInfoDTO);
/**
* 从客户查看订单
*
* @param page
* @param distributionAppDeliveryListDTO
* @return
*/
IPage<DistributionAppStockArticleVO> selectDistributionAppDeliveryorder(IPage<DistributionAppStockArticleVO> page, DistributionAppDeliveryListDTO distributionAppDeliveryListDTO);
} }

29
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionDeliveryListService.java

@ -19,7 +19,8 @@ package com.logpm.distribution.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.logpm.distribution.dto.DistributionDeliveryListDTO; import com.logpm.distribution.dto.DistributionDeliveryListDTO;
import com.logpm.distribution.dto.DistrilbutionloadingscanDTO; import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO;
import com.logpm.distribution.dto.app.DistrilbutionloadingscanDTO;
import com.logpm.distribution.entity.DistributionDeliveryListEntity; import com.logpm.distribution.entity.DistributionDeliveryListEntity;
import com.logpm.distribution.vo.DistributionDeliveryListPrintReponseVO; import com.logpm.distribution.vo.DistributionDeliveryListPrintReponseVO;
import com.logpm.distribution.vo.DistributionDeliveryListPrintRequestVO; import com.logpm.distribution.vo.DistributionDeliveryListPrintRequestVO;
@ -27,6 +28,7 @@ import com.logpm.distribution.vo.DistributionDeliveryListVO;
import com.logpm.distribution.excel.DistributionDeliveryListExcel; import com.logpm.distribution.excel.DistributionDeliveryListExcel;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.vo.DistributionstatisticsnmbVO; import com.logpm.distribution.vo.DistributionstatisticsnmbVO;
import com.logpm.distribution.vo.app.DistributionAppDeliveryListVO;
import org.springblade.core.mp.base.BaseService; import org.springblade.core.mp.base.BaseService;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
@ -73,34 +75,34 @@ public interface IDistributionDeliveryListService extends BaseService<Distributi
*/ */
DistributionstatisticsnmbVO getNubTotal(DistributionDeliveryListDTO distributionDeliveryList); DistributionstatisticsnmbVO getNubTotal(DistributionDeliveryListDTO distributionDeliveryList);
/** /**
* 发车 * App-发车
* *
* @param * @param
* @return * @return
*/ */
Boolean start(DistributionDeliveryListDTO distributionDeliveryList); Boolean start(DistributionDeliveryListDTO distributionDeliveryList);
/** /**
*装车扫描 *App-装车扫描
*/ */
R loadingscan(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO); R loadingscan(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO);
/** /**
*装车确认 *App-装车确认
*/ */
R loadingack(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO); R loadingack(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO);
/** /**
*装车扫描(一键装车) *App-装车扫描(一键装车)
*/ */
R oneloading(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO); R oneloading(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO);
/** /**
*装车扫描(确认) *App-装车扫描(确认)
*/ */
R oneack(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO); R oneack(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO);
/** /**
*装车扫描(取消) *App-装车扫描(取消)
*/ */
R loadingscanoff(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO); R loadingscanoff(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO);
/** /**
*库存品装车 *App-库存品装车
*/ */
R loadinginventory(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO); R loadinginventory(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO);
@ -112,7 +114,16 @@ public interface IDistributionDeliveryListService extends BaseService<Distributi
*/ */
IPage<DistributionDeliveryListPrintReponseVO> customListPage(IPage<DistributionDeliveryListPrintReponseVO> page, QueryWrapper<DistributionDeliveryListPrintRequestVO> queryWrapper); IPage<DistributionDeliveryListPrintReponseVO> customListPage(IPage<DistributionDeliveryListPrintReponseVO> page, QueryWrapper<DistributionDeliveryListPrintRequestVO> queryWrapper);
/** /**
*装车扫描(单件扫) *App-装车扫描(单件扫)
*/ */
R singleloading(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO); R singleloading(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO);
/**
*App-配送列表
*/
IPage<DistributionAppDeliveryListVO> selectDistributionAppDeliveryListPage(IPage<DistributionAppDeliveryListVO> page, DistributionAppDeliveryListDTO distributionAppDeliveryListDTO);
/**
* App-配送管理 详情
*/
DistributionAppDeliveryListVO getAppDeliverydetailVO(DistributionDeliveryListEntity detail);
} }

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

@ -78,4 +78,8 @@ public interface IDistributionSignforService extends BaseService<DistributionSig
* 签收管理 司机签收 * 签收管理 司机签收
*/ */
R signforack(DistributionSignforEntity distributionSignfor); R signforack(DistributionSignforEntity distributionSignfor);
/**
* 签收管理 用户不在配送单签收
*/
R signforcontinue(DistrilbutionAppsignforDTO distrilbutionloadingscanDTO);
} }

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

@ -17,6 +17,7 @@
package com.logpm.distribution.service.impl; package com.logpm.distribution.service.impl;
import com.logpm.distribution.dto.DistributionDeliveryInfoDTO; import com.logpm.distribution.dto.DistributionDeliveryInfoDTO;
import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO;
import com.logpm.distribution.entity.DistributionDeliveryInfoEntity; import com.logpm.distribution.entity.DistributionDeliveryInfoEntity;
import com.logpm.distribution.vo.DistributionDeliveryInfoVO; import com.logpm.distribution.vo.DistributionDeliveryInfoVO;
import com.logpm.distribution.excel.DistributionDeliveryInfoExcel; import com.logpm.distribution.excel.DistributionDeliveryInfoExcel;
@ -24,6 +25,7 @@ import com.logpm.distribution.mapper.DistributionDeliveryInfoMapper;
import com.logpm.distribution.service.IDistributionDeliveryInfoService; import com.logpm.distribution.service.IDistributionDeliveryInfoService;
import com.logpm.distribution.vo.DistributionStockArticleVO; import com.logpm.distribution.vo.DistributionStockArticleVO;
import com.logpm.distribution.vo.DistributionStockListVO; import com.logpm.distribution.vo.DistributionStockListVO;
import com.logpm.distribution.vo.app.DistributionAppStockArticleVO;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
@ -79,4 +81,10 @@ public class DistributionDeliveryInfoServiceImpl extends BaseServiceImpl<Distrib
return page.setRecords(distributionDeliveryInfoVOS); return page.setRecords(distributionDeliveryInfoVOS);
} }
@Override
public IPage<DistributionAppStockArticleVO> selectDistributionAppDeliveryorder(IPage<DistributionAppStockArticleVO> page, DistributionAppDeliveryListDTO distributionAppDeliveryListDTO) {
List<DistributionAppStockArticleVO> distributionAppStockArticleVOS = baseMapper.selectDistributionAppDeliveryOrderPage(page, distributionAppDeliveryListDTO);
return page.setRecords(distributionAppStockArticleVOS);
}
} }

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

@ -19,41 +19,33 @@ package com.logpm.distribution.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.logpm.distribution.dto.DistributionDeliveryListDTO; import com.logpm.distribution.dto.DistributionDeliveryListDTO;
import com.logpm.distribution.dto.DistributionSignforDTO; import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO;
import com.logpm.distribution.dto.DistrilbutionloadingscanDTO; import com.logpm.distribution.dto.app.DistrilbutionloadingscanDTO;
import com.logpm.distribution.entity.*; import com.logpm.distribution.entity.*;
import com.logpm.distribution.mapper.*; import com.logpm.distribution.mapper.*;
import com.logpm.distribution.vo.*; import com.logpm.distribution.vo.*;
import com.logpm.distribution.excel.DistributionDeliveryListExcel; import com.logpm.distribution.excel.DistributionDeliveryListExcel;
import com.logpm.distribution.service.IDistributionDeliveryListService; import com.logpm.distribution.service.IDistributionDeliveryListService;
import com.logpm.distribution.vo.app.DistributionAppDeliveryListVO;
import com.logpm.distribution.vo.app.DistributionAppReservationVO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.poi.ss.formula.functions.T;
import org.springblade.core.redis.cache.BladeRedis; import org.springblade.core.redis.cache.BladeRedis;
import org.springblade.core.redis.config.RedisAutoCacheManager;
import org.springblade.core.secure.BladeUser; import org.springblade.core.secure.BladeUser;
import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.Func;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.cache.CacheProperties;
import org.springframework.data.redis.cache.RedisCache;
import org.springframework.data.redis.cache.RedisCacheManager;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.transaction.annotation.Isolation; import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.math.BigInteger;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
import java.util.concurrent.TimeUnit;
/** /**
* 配送管理 服务实现类 * 配送管理 服务实现类
@ -822,8 +814,10 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
if (distributionLoadscanvnEntities.size() <= 0) { if (distributionLoadscanvnEntities.size() <= 0) {
//拆包从备货查询 //拆包从备货查询
distributionLoadscanvnEntities = baseMapper.selectdeliveryworkVnScanStock(distrilbutionloadingscanDTO.getBarcode(), distrilbutionloadingscanDTO.getDeliveryId()); distributionLoadscanvnEntities = baseMapper.selectdeliveryworkVnScanStock(distrilbutionloadingscanDTO.getBarcode(), distrilbutionloadingscanDTO.getDeliveryId());
if (distributionLoadscanvnEntities.size()<=0){
return R.fail(3001, "窜货"); return R.fail(3001, "窜货");
} }
}
for (DistributionLoadscaninvnEntity distributionLoadscanEntity : distributionLoadscanvnEntities) { for (DistributionLoadscaninvnEntity distributionLoadscanEntity : distributionLoadscanvnEntities) {
//查询是否重复扫码 //查询是否重复扫码
// List<DistributionLoadscanEntity> distributionLoadscanEntitiesflag = distributionLoadscanMapper.selectList(new QueryWrapper<DistributionLoadscanEntity>().lambda() // List<DistributionLoadscanEntity> distributionLoadscanEntitiesflag = distributionLoadscanMapper.selectList(new QueryWrapper<DistributionLoadscanEntity>().lambda()
@ -845,7 +839,6 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
distributionLoadscanEntity.setPackageNub(1); distributionLoadscanEntity.setPackageNub(1);
} }
distributionLoadscanEntity.setLoadingId(distrilbutionloadingscanDTO.getLoadingId()); distributionLoadscanEntity.setLoadingId(distrilbutionloadingscanDTO.getLoadingId());
distributionLoadscanEntity.setLoadedNub(distrilbutionloadingscanDTO.getInventoryNub());
distributionLoadscanEntity.setVehicleName(distributionDeliverySelfEntity.getVehicleNub()); distributionLoadscanEntity.setVehicleName(distributionDeliverySelfEntity.getVehicleNub());
if (null != distributionDeliverySelfEntity.getDriverPhone()) { if (null != distributionDeliverySelfEntity.getDriverPhone()) {
distributionLoadscanEntity.setDriverPhone(distributionDeliverySelfEntity.getDriverPhone()); distributionLoadscanEntity.setDriverPhone(distributionDeliverySelfEntity.getDriverPhone());
@ -895,4 +888,36 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
} }
return R.status(b); return R.status(b);
} }
@Override
public IPage<DistributionAppDeliveryListVO> selectDistributionAppDeliveryListPage(IPage<DistributionAppDeliveryListVO> page, DistributionAppDeliveryListDTO distributionAppDeliveryListDTO) {
//转换创建时间
if (null != distributionAppDeliveryListDTO.getCreateTime()) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
distributionAppDeliveryListDTO.setCreateTime_query(sdf.format(distributionAppDeliveryListDTO.getCreateTime()));
}
//获取当前登录人
BladeUser user = AuthUtil.getUser();
String roleId = user.getRoleId();
List<DistributionAppDeliveryListVO> distributionAppDeliveryListVOS = baseMapper.selectDistributionAppDeliveryListPage(page, distributionAppDeliveryListDTO);
//查询是否备货
// for (DistributionAppDeliveryListVO distributionAppDeliveryListVO : distributionAppDeliveryListVOS) {
//
// }
return page.setRecords(distributionAppDeliveryListVOS);
}
@Override
public DistributionAppDeliveryListVO getAppDeliverydetailVO(DistributionDeliveryListEntity detail) {
DistributionAppDeliveryListVO distributionAppDeliveryListVO = new DistributionAppDeliveryListVO();
//转移数据到VO上
Func.copy(detail, distributionAppDeliveryListVO);
// //装车件数
// Integer sum = distributionSignforMapper.selectloadNub(distributionAppDeliveryListVO.getId());
// distributionAppDeliveryListVO.setLoadingNub(sum);
//查询客户
List<DistributionAppReservationVO> customList = distributionDeliveryInfoMapper.selectAppcustomList(detail.getId());
distributionAppDeliveryListVO.setReservationList(customList);
return distributionAppDeliveryListVO;
}
} }

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

@ -22,27 +22,25 @@ import com.baomidou.mybatisplus.extension.conditions.update.UpdateChainWrapper;
import com.logpm.distribution.dto.DistributionLoadscanDTO; import com.logpm.distribution.dto.DistributionLoadscanDTO;
import com.logpm.distribution.dto.DistributionSignforDTO; import com.logpm.distribution.dto.DistributionSignforDTO;
import com.logpm.distribution.dto.DistrilbutionAppsignforDTO; import com.logpm.distribution.dto.DistrilbutionAppsignforDTO;
import com.logpm.distribution.entity.DistributionLoadscanEntity; import com.logpm.distribution.entity.*;
import com.logpm.distribution.entity.DistributionLoadscanordEntity; import com.logpm.distribution.mapper.*;
import com.logpm.distribution.entity.DistributionSignforEntity;
import com.logpm.distribution.mapper.DistributionDeliverySelfMapper;
import com.logpm.distribution.mapper.DistributionLoadscanMapper;
import com.logpm.distribution.vo.DistributionLoadscanordVO; import com.logpm.distribution.vo.DistributionLoadscanordVO;
import com.logpm.distribution.vo.DistributionSignforVO; import com.logpm.distribution.vo.DistributionSignforVO;
import com.logpm.distribution.excel.DistributionSignforExcel; import com.logpm.distribution.excel.DistributionSignforExcel;
import com.logpm.distribution.mapper.DistributionSignforMapper;
import com.logpm.distribution.service.IDistributionSignforService; import com.logpm.distribution.service.IDistributionSignforService;
import com.logpm.distribution.vo.DistributionSignforsnmbVO; import com.logpm.distribution.vo.DistributionSignforsnmbVO;
import com.logpm.distribution.vo.DistributionstatisticsnmbVO; import com.logpm.distribution.vo.DistributionstatisticsnmbVO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@ -56,7 +54,14 @@ import java.util.List;
@AllArgsConstructor @AllArgsConstructor
public class DistributionSignforServiceImpl extends BaseServiceImpl<DistributionSignforMapper, DistributionSignforEntity> implements IDistributionSignforService { public class DistributionSignforServiceImpl extends BaseServiceImpl<DistributionSignforMapper, DistributionSignforEntity> implements IDistributionSignforService {
private final DistributionLoadscanServiceImpl distributionLoadscanService; private final DistributionLoadscanServiceImpl distributionLoadscanService;
private final DistributionLoadscaninvnServiceImpl distributionLoadscaninvnService;
private final DistributionLoadscanMapper distributionLoadscanMapper; private final DistributionLoadscanMapper distributionLoadscanMapper;
private final DistributionLoadscaninvnMapper distributionLoadscaninvnMapper;
private final DistributionDeliveryListMapper distributionDeliveryListMapper;
private final DistributionDeliverySelfMapper distributionDeliverySelfMapper;
private final DistributionDeliveryTripartiteMapper distributionDeliveryTripartiteMapper;
private final DistributionSignforMapper distributionSignforMapper;
@Override @Override
public IPage<DistributionSignforVO> selectDistributionSignforPage(IPage<DistributionSignforVO> page, DistributionSignforVO distributionSignfor) { public IPage<DistributionSignforVO> selectDistributionSignforPage(IPage<DistributionSignforVO> page, DistributionSignforVO distributionSignfor) {
//转换创建时间 //转换创建时间
@ -105,6 +110,31 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
); );
if (distributionLoadscanEntities.size() < 0) { if (distributionLoadscanEntities.size() < 0) {
//TODO 查询库存品 //TODO 查询库存品
//无拆包
// List<DistributionLoadscaninvnEntity> distributionLoadscanvnEntities = new ArrayList<>();
// distributionLoadscanvnEntities = baseMapper.selectdeliveryworkVnScan(distrilbutionloadingscanDTO.getBarcode(), distrilbutionloadingscanDTO.getDeliveryId());
// if (distributionLoadscanvnEntities.size() <= 0) {
// //拆包从备货查询
// distributionLoadscanvnEntities = baseMapper.selectdeliveryworkVnScanStock(distrilbutionloadingscanDTO.getBarcode(), distrilbutionloadingscanDTO.getDeliveryId());
// if (distributionLoadscanvnEntities.size()<=0){
// return R.fail(3007, "没有该货物");
// }
// }
// if (distributionLoadscanvnEntities.size()>0){
// //修改装车表状态
// boolean b =false;
// for (DistributionLoadscaninvnEntity distributionLoadscanEntity : distributionLoadscanvnEntities) {
// distributionLoadscanEntity.setSigningTime(simpleDateFormat.format(new Date()));
// distributionLoadscanEntity.setSignforState(2);
// distributionLoadscanEntity.setReceivedQuantity(distributionLoadscanEntity.getLoadedNub());
// distributionLoadscaninvnMapper.updateById(distributionLoadscanEntity);
// //修改签收表司机签收数量
// this.update(new UpdateWrapper<DistributionSignforEntity>().lambda()
// .eq(DistributionSignforEntity::getReservationId,distributionLoadscanEntity.getReservationId())
// .setSql("received_quantity = received_quantity + "+distributionLoadscanEntity.getLoadedNub())
// );
// }
// }
return R.fail(3006, "该货物并未装车处理"); return R.fail(3006, "该货物并未装车处理");
} }
//修改装车表状态 //修改装车表状态
@ -149,5 +179,101 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
return R.status(update); return R.status(update);
} }
@Override
public R signforcontinue(DistrilbutionAppsignforDTO distrilbutionloadingscanDTO) {
//获取当前用户司机
DistributionDeliveryListEntity distributionDeliveryListEntity = distributionDeliveryListMapper.selectById(distrilbutionloadingscanDTO.getDeliveryId());
DistributionDeliverySelfEntity distributionDeliverySelfEntity = null;
if (distributionDeliveryListEntity.getKind().equals("1")){
distributionDeliverySelfEntity = distributionDeliverySelfMapper.selectOne(new QueryWrapper<DistributionDeliverySelfEntity>().lambda()
.eq(DistributionDeliverySelfEntity::getDeliveryId,distrilbutionloadingscanDTO.getDeliveryId())
.eq(DistributionDeliverySelfEntity::getIsMaster,2)
);
}else {
DistributionDeliveryTripartiteEntity distributionDeliveryTripartiteEntity = distributionDeliveryTripartiteMapper.selectOne(new QueryWrapper<DistributionDeliveryTripartiteEntity>().lambda()
.eq(DistributionDeliveryTripartiteEntity::getDeliveryId,distrilbutionloadingscanDTO.getDeliveryId()));
BeanUtils.copyProperties(distributionDeliveryTripartiteEntity,distributionDeliverySelfEntity);
}
//查询是否为库存品
//无拆包
List<DistributionLoadscaninvnEntity> distributionLoadscanvnEntities = new ArrayList<>();
distributionLoadscanvnEntities = distributionDeliveryListMapper.selectdeliveryworkVnScan(distrilbutionloadingscanDTO.getBarcode(), distrilbutionloadingscanDTO.getDeliveryId());
if (distributionLoadscanvnEntities.size() <= 0) {
//拆包从备货查询
distributionLoadscanvnEntities = distributionDeliveryListMapper.selectdeliveryworkVnScanStock(distrilbutionloadingscanDTO.getBarcode(), distrilbutionloadingscanDTO.getDeliveryId());
if (distributionLoadscanvnEntities.size() <= 0) {
List<DistributionLoadscanEntity> distributionLoadscanEntities = distributionDeliveryListMapper.selectdeliverywork(distrilbutionloadingscanDTO.getBarcode(), distrilbutionloadingscanDTO.getDeliveryId());
if (distributionLoadscanEntities.size()>0){
for (DistributionLoadscanEntity distributionLoadscanEntity : distributionLoadscanEntities) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
//回填数据
if (null != distributionDeliverySelfEntity.getDriverId()){
distributionLoadscanEntity.setDriverId(distributionDeliverySelfEntity.getDriverId());
}
distributionLoadscanEntity.setDriverName(distributionDeliverySelfEntity.getDriverName());
distributionLoadscanEntity.setVehicleName(distributionDeliverySelfEntity.getVehicleNub());
distributionLoadscanEntity.setScanStatus(4);
distributionLoadscanEntity.setScanType("1");
distributionLoadscanEntity.setSigningTime(simpleDateFormat.format(new Date()));
distributionLoadscanEntity.setSignforState(2);
distributionLoadscanEntity.setReceivedQuantity(distributionLoadscanEntity.getLoadedNub());
distributionLoadscanEntity.setIsInsert(2);
if (null != distributionDeliverySelfEntity.getDriverPhone()) {
distributionLoadscanEntity.setDriverPhone(distributionDeliverySelfEntity.getDriverPhone());
}
if (null != distributionDeliverySelfEntity.getVehicleId()){
distributionLoadscanEntity.setVehicleId(distributionDeliverySelfEntity.getVehicleId());
}
distributionLoadscanEntity.setLoadingId(String.valueOf(distributionDeliverySelfEntity.getId()));
//查询本车次是否第一次扫码,没有则更新上车时间
//Integer i = distributionDeliveryListMapper.updateloadingTimeById(distrilbutionloadingscanDTO.getDeliveryId());
//更新签收表的装车数量
Integer j = distributionSignforMapper.updateloadByReservationId(distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
//修改签收表司机签收数量
this.update(new UpdateWrapper<DistributionSignforEntity>().lambda()
.eq(DistributionSignforEntity::getReservationId, distributionLoadscanEntity.getReservationId())
.setSql("received_quantity = received_quantity + " + distributionLoadscanEntity.getLoadedNub())
);
}
distributionLoadscanService.saveBatch(distributionLoadscanEntities);
return R.success("补录成功");
}
}
return R.fail(3007, "没有该货物");
}
for (DistributionLoadscaninvnEntity distributionLoadscanEntity : distributionLoadscanvnEntities) {
//依次插入该装车记录,设置车辆
if (null !=distributionDeliverySelfEntity.getDriverId()){
distributionLoadscanEntity.setDriverId(distributionDeliverySelfEntity.getDriverId());}
distributionLoadscanEntity.setDriverName(distributionDeliverySelfEntity.getDriverName());
distributionLoadscanEntity.setScanStatus(4);
distributionLoadscanEntity.setScanType("1");
distributionLoadscanEntity.setScanTime(new Date());
if (null == distributionLoadscanEntity.getPackageNub() ){
distributionLoadscanEntity.setPackageNub(1);
}
distributionLoadscanEntity.setLoadingId(String.valueOf(distributionDeliverySelfEntity.getId()));
distributionLoadscanEntity.setVehicleName(distributionDeliverySelfEntity.getVehicleNub());
if (null != distributionDeliverySelfEntity.getDriverPhone()) {
distributionLoadscanEntity.setDriverPhone(distributionDeliverySelfEntity.getDriverPhone());
}
if (null != distributionDeliverySelfEntity.getVehicleId()){
distributionLoadscanEntity.setVehicleId(distributionDeliverySelfEntity.getVehicleId());}
//回填数据
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
distributionLoadscanEntity.setSigningTime(simpleDateFormat.format(new Date()));
distributionLoadscanEntity.setSignforState(2);
distributionLoadscanEntity.setReceivedQuantity(distributionLoadscanEntity.getLoadedNub());
distributionLoadscanEntity.setIsInsert(2);
//更新签收表的装车数量
Integer j = distributionSignforMapper.updateloadByReservationId(distributionLoadscanEntity.getReservationId(), distributionLoadscanEntity.getPackageNub());
}
boolean b = distributionLoadscaninvnService.saveBatch(distributionLoadscanvnEntities);
return b?R.success("补录成功"):R.fail(3007, "没有该货物");
}
} }

Loading…
Cancel
Save