Browse Source

签收列表导出、配送列表导出调整

chenglong
汤建军 1 year ago
parent
commit
b92abf5523
  1. 97
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionDeliveryListVO.java
  2. 93
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java
  3. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java
  4. 16
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryListExcel.java
  5. 101
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionSignforOwnExcel.java
  6. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java
  7. 73
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
  8. 83
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionSignforMapper.xml
  9. 65
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  10. 36
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java

97
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionDeliveryListVO.java

@ -40,12 +40,98 @@ public class DistributionDeliveryListVO extends DistributionDeliveryListEntity {
@ApiModelProperty(value = "装车件数")
private Integer loadNub;
/**
* 仓库ID
*/
@ApiModelProperty(value = "仓库ID")
private Long warehouseId;
/**
* 装车件数
*/
@ApiModelProperty(value = "装车件数")
private String driverPhone;
/**
* 车次号
*/
@ApiModelProperty(value = "车次号")
private String trainNumber;
/**
* 客户名称
*/
@ApiModelProperty(value = "客户名称")
private String consignee;
/**
* 配送日期
*/
@ApiModelProperty(value = "配送日期")
private String taskTime;
/**
* 配送种类
*/
@ApiModelProperty(value = "配送种类")
private String kindName;
/**
* 配送类型
*/
@ApiModelProperty(value = "配送类型")
private String deliveryTypeName;
/**
* 司机名称
*/
@ApiModelProperty(value = "司机名称")
private String driverName;
/**
* 车牌号
*/
@ApiModelProperty(value = "车牌号")
private String vehicleNum;
/**
* 客户数量
*/
@ApiModelProperty(value = "客户数量")
private Integer customersNumber;
/**
* 订单数量
*/
@ApiModelProperty(value = "客户数量")
private Integer orderNumber;
/**
* 配送总数
*/
@ApiModelProperty(value = "配送总数")
private Integer deliveryNumber;
/**
* 配送库存品数
*/
@ApiModelProperty(value = "配送库存品数")
private Integer inventoryNub;
/**
* 装车件数
*/
@ApiModelProperty(value = "装车件数")
private Integer scannedNumber;
/**
* 签收件数
*/
@ApiModelProperty(value = "签收件数")
private Integer signingNumber;
/**
* 配送库存品数
*/
@ -58,6 +144,12 @@ public class DistributionDeliveryListVO extends DistributionDeliveryListEntity {
@ApiModelProperty(value = "预约计划件数")
private Integer reservationNum;
/**
* 装卸班组
*/
@ApiModelProperty(value = "装卸班组")
private String handlingCrew;
@ -116,11 +208,6 @@ public class DistributionDeliveryListVO extends DistributionDeliveryListEntity {
@ApiModelProperty(value = "配送状态字典")
private String deliveryStatusName;
/**
* 配送状态字典
*/
@ApiModelProperty(value = "配送状态字典")
private String kindName;
/**
* 配送状态字典

93
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionSignforVO.java

@ -40,6 +40,26 @@ public class DistributionSignforVO extends DistributionSignforEntity {
*/
@ApiModelProperty(value = "门店名称")
private String storeName;
/**
* 客户
*/
@ApiModelProperty(value = "客户")
private String consignee;
/**
* 客户电话
*/
@ApiModelProperty(value = "客户电话")
private String deliveryPhone;
/**
* 客户地址
*/
@ApiModelProperty(value = "客户地址")
private String deliveryAddress;
/**
* 预约单号
*/
@ApiModelProperty(value = "预约单号")
private String reservationCode;
private List<String> ids;
/**
@ -54,21 +74,68 @@ public class DistributionSignforVO extends DistributionSignforEntity {
@ApiModelProperty(value = "服务类型")
private String serveType;
/**
* 配送单号
*/
@ApiModelProperty(value = "配送单号")
private String reservationCode;
/**
* 预约时间
*/
@ApiModelProperty(value = "预约时间")
private String reservationDate;
/**
* 装车未扫数
*/
@ApiModelProperty(value = "装车未扫数")
private String withoutScanning;
/**
* 计划总数
*/
@ApiModelProperty(value = "计划总数")
private Integer totalNum;
/**
* 装车件数
*/
@ApiModelProperty(value = "装车件数")
private Integer loadingNum;
/**
* 未装车件数
*/
@ApiModelProperty(value = "未装车件数")
private String unLoadingNum;
/**
* 签收件数
*/
@ApiModelProperty(value = "装车件数")
private Integer signingNum;
/**
* 复核时间
*/
@ApiModelProperty(value = "复核时间")
private String signingTime;
/**
* 司机签收时间
*/
@ApiModelProperty(value = "司机签收时间")
private String sjsigningTime;
/**
* 签收人
*/
@ApiModelProperty(value = "签收人")
private String signeeName;
/**
* 审核人
*/
@ApiModelProperty(value = "审核人")
private String examineUserName;
/**
* 复核状态
*/
@ApiModelProperty(value = "复核状态")
private String signingStatusName;
/**
* 未签收数目
*/
@ -121,8 +188,8 @@ public class DistributionSignforVO extends DistributionSignforEntity {
/**
* 签收状态
*/
@ApiModelProperty(value = "签收状态")
private String signingStatusName;
@ApiModelProperty(value = "配送状态")
private String deliveryStatusName;
/**
* 签收状态
@ -136,7 +203,7 @@ public class DistributionSignforVO extends DistributionSignforEntity {
*/
@ApiModelProperty(value = "备注")
private String remarks;
/**
/**
* 备注
*/
@ApiModelProperty(value = "订单自编号")
@ -174,9 +241,9 @@ public class DistributionSignforVO extends DistributionSignforEntity {
private String driverName;
/**
* 配送司机
* 司机电话
*/
@ApiModelProperty(value = "配送司机")
@ApiModelProperty(value = "司机电话")
private String driverPhone;
/**
@ -190,6 +257,12 @@ public class DistributionSignforVO extends DistributionSignforEntity {
@ApiModelProperty(value = "配车时间")
private String taskTime;
/**
* 装车时间
*/
@ApiModelProperty(value = "装车时间")
private String loadingTime;
/**
* 装车时间
*/

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

@ -299,9 +299,14 @@ public class DistributionDeliveryListController extends BladeController {
@GetMapping("/export-distributionDeliveryList")
@ApiOperationSupport(order = 9)
@ApiOperation(value = "导出数据", notes = "传入distributionDeliveryList")
public void exportDistributionDeliveryList(@ApiIgnore @RequestParam Map<String, Object> distributionDeliveryList, BladeUser bladeUser, HttpServletResponse response) {
public R exportDistributionDeliveryList(@ApiIgnore @RequestParam Map<String, Object> distributionDeliveryList, BladeUser bladeUser, HttpServletResponse response) {
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
if (Func.isEmpty(myCurrentWarehouse)){
return R.fail(403,"未授权仓库!!!");
}
List<DistributionDeliveryListExcel> list = distributionDeliveryListService.exportDistributionDeliveryList(distributionDeliveryList);
ExcelUtil.export(response, "配送管理数据" + DateUtil.time(), "配送管理数据表", list, DistributionDeliveryListExcel.class);
return R.status(true);
}
/**

16
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionDeliveryListExcel.java

@ -61,6 +61,13 @@ public class DistributionDeliveryListExcel implements Serializable {
@ColumnWidth(20)
@ExcelProperty("仓库")
private String warehouseName;
/**
* 仓库
*/
@ColumnWidth(20)
@ExcelProperty("客户名称")
private String consignee;
/**
* 配送类型;1-自主配送,2-三方配送
*/
@ -137,8 +144,15 @@ public class DistributionDeliveryListExcel implements Serializable {
* 扫描件数
*/
@ColumnWidth(20)
@ExcelProperty("扫描件数")
@ExcelProperty("装车件数")
private Integer scannedNumber;
/**
* 签收件数
*/
@ColumnWidth(20)
@ExcelProperty("签收件数")
private Integer signingNumber;
/**
* 装卸班组
*/

101
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/excel/DistributionSignforOwnExcel.java

@ -51,6 +51,52 @@ public class DistributionSignforOwnExcel implements Serializable {
@ExcelProperty("配送车次")
private String trainNumber;
/**
* 配送车次
*/
@ApiModelProperty(value = "配送车次")
@ColumnWidth(20)
@ExcelProperty("预约单号")
private String reservationCode;
/**
* 送货司机(名称)
*/
@ApiModelProperty(value = "送货司机(名称)")
@ColumnWidth(20)
@ExcelProperty("送货司机")
private String deliveryDriverName;
/**
* 送货司机手机号
*/
@ApiModelProperty(value = "送货司机手机号")
@ColumnWidth(20)
@ExcelProperty("送货司机手机号")
private String deliveryDriverPhone;
/**
* 配送车牌号
*/
@ColumnWidth(20)
@ExcelProperty("配送车牌号")
private String vehicleName;
/**
* 配送车牌号
*/
@ColumnWidth(20)
@ExcelProperty("配送日期")
private String taskTime;
/**
* 配送车牌号
*/
@ColumnWidth(20)
@ExcelProperty("装车时间")
private String loadingTime;
/**
* 订单自编号;订单关联id
*/
@ -93,12 +139,12 @@ public class DistributionSignforOwnExcel implements Serializable {
@ExcelProperty("配送类型")
private String deliveryTypeName;
/**
* 门店名称
*/
@ColumnWidth(20)
@ExcelProperty("服务类型")
private String deliveryWayName;
// /**
// * 门店名称
// */
// @ColumnWidth(20)
// @ExcelProperty("服务类型")
// private String deliveryWayName;
/**
* 总件数
@ -140,28 +186,14 @@ public class DistributionSignforOwnExcel implements Serializable {
@ExcelProperty("未签收数目")
private String unsigneds;
/**
* 送货司机(名称)
*/
@ApiModelProperty(value = "送货司机(名称)")
@ColumnWidth(20)
@ExcelProperty("送货司机")
private String deliveryDriverName;
/**
* 送货司机手机号
*/
@ApiModelProperty(value = "送货司机手机号")
@ColumnWidth(20)
@ExcelProperty("送货司机手机号")
private String deliveryDriverPhone;
/**
* 文员签收时间
*/
@ApiModelProperty(value = "签收时间")
@ApiModelProperty(value = "复核时间")
@ColumnWidth(20)
@ExcelProperty("签收时间")
@ExcelProperty("复核时间")
private String signingTime;
/**
@ -184,18 +216,26 @@ public class DistributionSignforOwnExcel implements Serializable {
/**
* 文员签收状态;1-未签收2-签收
*/
@ApiModelProperty(value = "文员签收状态;1-未签收,2-签收")
@ApiModelProperty(value = "复核状态")
@ColumnWidth(20)
@ExcelProperty("文员签收状态")
@ExcelProperty("复核状态")
private String signingStatusName;
/**
* 司机签收状态;1-未签收2-签收
*/
@ApiModelProperty(value = "司机签收状态;1-未签收,2-签收")
@ApiModelProperty(value = "配送状态")
@ColumnWidth(20)
@ExcelProperty("配送状态")
private String deliveryStatusName;
/**
* 司机签收状态;1-未签收2-签收
*/
@ApiModelProperty(value = "复核人")
@ColumnWidth(20)
@ExcelProperty("司机签收状态")
private String driverSigningName;
@ExcelProperty("复核人")
private String examineUserName;
@ -398,12 +438,7 @@ public class DistributionSignforOwnExcel implements Serializable {
// @ExcelProperty("是否加急")
// private String isUrgent;
//
// /**
// * 配送车牌号
// */
// @ColumnWidth(20)
// @ExcelProperty("配送车牌号")
// private String vehicleName;
//
// /**
// * 配送司机

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

@ -57,10 +57,10 @@ public interface DistributionDeliveryListMapper extends BaseMapper<DistributionD
/**
* 获取导出数据
*
* @param queryWrapper
* @param map
* @return
*/
List<DistributionDeliveryListVO> exportDistributionDeliveryList(@Param("ew") Wrapper<DistributionDeliveryListEntity> queryWrapper);
List<DistributionDeliveryListVO> exportDistributionDeliveryList(@Param("params") Map<String,Object> map);
/**
* 商配车次
*

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

@ -297,7 +297,78 @@
<select id="exportDistributionDeliveryList" resultType="com.logpm.distribution.vo.DistributionDeliveryListVO">
SELECT * FROM logpm_distribution_delivery_list ${ew.customSqlSegment}
SELECT DISTINCT
lddl.train_number AS trainNumber,
lddl.task_time AS taskTime,
ldr.warehouse_id AS warehouseId,
ldr.consignee AS consignee,
CASE
lddl.kind
WHEN 1 THEN
'自主配送'
WHEN 2 THEN
'三方配送'
END kindName,
CASE
lddl.type
WHEN 1 THEN
'商配'
WHEN 2 THEN
'市配'
END deliveryTypeName,
IF
( lddl.kind = 1, GROUP_CONCAT( DISTINCT ldds.driver_name ), lddt.driver_name ) AS driverName,
IF
( lddl.kind = 1, GROUP_CONCAT( DISTINCT ldds.driver_phone ), lddt.driver_phone ) AS driverPhone,
IF
( lddl.kind = 1, GROUP_CONCAT( DISTINCT ldds.vehicle_nub ), lddt.vehicle_num ) AS vehicleNum,
lddl.distribution_company,
CASE
lddl.delivery_status
WHEN 1 THEN
'待配送'
WHEN 2 THEN
'配送中'
WHEN 3 THEN
'已完成'
END deliveryStatusName,
lddl.customers_number AS customersNumber,
lddl.order_number AS orderNumber,
lddl.delivery_number AS deliveryNumber,
lddl.inventory_nub AS inventoryNub,
(
SELECT
COALESCE (sum(lds.loaded_number + lds.loadedin_number), 0)
FROM
logpm_distribution_signfor lds
WHERE
lddl.id = lds.delivery_id
) scannedNumber,
(SELECT
COALESCE (sum(lds.received_quantity + receivedin_quantity), 0)
FROM
logpm_distribution_signfor lds
WHERE
lddl.id = lds.delivery_id
) signingNumber,
GROUP_CONCAT( lddl.loading_team_name, lddl.loading_team_name ) AS handlingCrew
FROM
logpm_distribution_delivery_list AS lddl
LEFT JOIN logpm_distribution_signfor AS lds ON lddl.id = lds.delivery_id
LEFT JOIN logpm_distribution_reservation AS ldr ON lds.reservation_id = ldr.id
LEFT JOIN logpm_distribution_delivery_self AS ldds ON ldds.delivery_id = lddl.id
LEFT JOIN logpm_distribution_delivery_tripartite AS lddt ON ldds.delivery_id = lddl.id
<where>
lddl.is_deleted = 0 and lds.is_deleted = 0 and ldr.is_deleted = 0 and ldds.is_deleted = 0 and lddt.is_deleted = 0
<if test=" params.ids != ''">
AND lddl.id in
<foreach collection="params.ids" item="item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
GROUP BY
lddl.id
</select>
<select id="selectBycommercialNub" resultType="java.lang.Integer">
SELECT COALESCE(COUNT(*), 0) FROM logpm_distribution_delivery_list lddl

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

@ -1040,54 +1040,63 @@
</select>
<select id="exportDistributionSignforSigningOwn" resultType="com.logpm.distribution.vo.DistributionSignforVO">
SELECT DISTINCT
lds.id id,
lds.signee_name signeeName,
ldr.mall_name mallName,
lds.positioning positioning,
lddl.warehouse_name warehouseName,
ldr.stock_article_id stockArticleId,
ldr.store_name storeName,
ldr.consignee consignee,
ldr.delivery_type deliveryType,
lds.delivery_id AS deliveryId,
lds.delivery_time deliveryTime,
lds.signing_time signingTime,
lds.sjsigning_time sjsigningTime,
lds.signing_status signingStatus,
lds.is_have_abnormal_package isHaveAbnormalPackage,
lds.signing_type signingType,
lddl.train_number trainNumber,
lds.received_quantity receivedQuantity,
ldr.delivery_phone deliveryPhone,
(SELECT GROUP_CONCAT(distinct driver_name SEPARATOR ',') from logpm_distribution_loadscan ldl WHERE ldl.reservation_id = lds.reservation_id) deliveryDriverName,
(SELECT GROUP_CONCAT(distinct driver_phone SEPARATOR ',') from logpm_distribution_loadscan ldl WHERE ldl.reservation_id = lds.reservation_id) deliveryDriverPhone,
ldr.delivery_address deliveryAddress,
lds.delivery_sign_pictures deliverySignPictures,
ldr.reservation_num reservationNum,
lds.driver_signing driverSigning,
lds.loaded_number loadedNumber,
lds.create_time createTime,
lds.signing_status signingStatus,
lds.driver_signing driverSigning,
ldr.reservation_num - lds.received_quantity unsigneds,
ldr.reservation_num - lds.loaded_number withoutScanning,
lds.reservation_id reservationId,
( SELECT GROUP_CONCAT(ldsa.order_code)
from logpm_distribution_reservation_stockarticle ldrs
LEFT JOIN logpm_distribution_stock_article ldsa on ldsa.id = ldrs.stock_article_id
where reservation_id = ldr.id
) orderCode
lddl.train_number AS trainNumber,
ldr.reservation_code AS reservationCode,
lddl.driver_name AS driverName,
lddl.vehicle_name AS vehicleName,
lddl.task_time AS taskTime,
lddl.loading_time AS loadingTime,
IF(ldr.reservation_num > 0,GROUP_CONCAT(ldsa.order_code),'') AS orderCode,
lds.signee_name AS signeeName,
ldr.warehouse_id AS warehouseId,
ldr.consignee AS consignee,
ldr.delivery_phone AS deliveryPhone,
ldr.delivery_address AS deliveryAddress,
CASE ldr.delivery_type
WHEN 1 THEN '商配'
WHEN 2 THEN '市配'
WHEN 3 THEN '自提'
END deliveryTypeName,
(ldr.reservation_num + ldr.reservation_stock_list_num ) AS totalNum,
(COUNT(ldl.id) + COUNT(ldll.id) ) AS loadingNum,
lds.received_quantity AS signingNum,
((ldr.reservation_num + ldr.reservation_stock_list_num ) - (COUNT(ldl.id) + COUNT(ldll.id) )) AS unLoadingNum,
((ldr.reservation_num + ldr.reservation_stock_list_num ) - lds.received_quantity) AS unsigneds,
lds.signing_time AS signingTime,
lds.sjsigning_time AS sjsigningTime,
lds.signee_name AS signeeName,
lds.examine_user_name AS examineUserName,
CASE lddl.delivery_status
WHEN 1 THEN '待配送'
WHEN 2 THEN '配送中'
WHEN 3 THEN '已完成'
END deliveryStatusName,
CASE lds.signing_status
WHEN 1 THEN '文员待审核'
WHEN 2 THEN '文员已审核'
END signingStatusName,
IF(lddl.kind = 1,ldds.driver_phone,lddt.driver_phone) AS driverPhone
FROM
logpm_distribution_signfor lds
JOIN logpm_distribution_delivery_list lddl ON lddl.id = lds.delivery_id
JOIN logpm_distribution_reservation ldr ON ldr.id = lds.reservation_id
LEFT JOIN logpm_distribution_reservation_stockarticle ldrs on ldr.id = ldrs.reservation_id
LEFT JOIN logpm_distribution_stock_article ldsa on ldsa.id = ldrs.stock_article_id
LEFT JOIN logpm_distribution_loadscan AS ldl ON ldr.id = ldl.reservation_id AND ldl.delivery_id = ldl.delivery_id
LEFT JOIN logpm_distribution_loadscaninvn AS ldll ON ldr.id = ldll.reservation_id AND ldll.delivery_id = ldl.delivery_id
LEFT JOIN logpm_distribution_delivery_self AS ldds ON ldds.delivery_id = lddl.id AND ldds.is_master = 2
LEFT JOIN logpm_distribution_delivery_tripartite AS lddt ON lddt.delivery_id = lddl.id
<where>
lds.is_deleted = 0
<if test="param.mallName != null and param.mallName!=''">
and ldr.mall_name like concat('%',#{param.mallName},'%')
</if>
<if test="param.ids != null and param.ids!=''">
and lds.id
<foreach collection="param.ids" item="item" open="in (" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="param.warehouseIdList != null and @org.apache.commons.collections4.CollectionUtils@isNotEmpty(param.warehouseIdList)">
and ldr.warehouse_id in
<foreach collection="param.warehouseIdList" item="item" open="(" close=")" separator=",">

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

@ -259,50 +259,33 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
@Override
public List<DistributionDeliveryListExcel> exportDistributionDeliveryList(Map<String, Object> distributionDeliveryList) {
Object o = distributionDeliveryList.get("ids");
if (ObjectUtils.isNotNull(o)) {
distributionDeliveryList.remove("ids");
if (Func.isNotEmpty(distributionDeliveryList.get("ids"))){
//进行勾选操作
List<Long> deliveryId = Func.toLongList((String) distributionDeliveryList.get("ids"));
distributionDeliveryList.put("ids",deliveryId);
}
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if (ObjectUtils.isNull(myCurrentWarehouse)) {
throw new ServiceException("没有仓库信息!");
}
QueryWrapper<DistributionDeliveryListEntity> queryWrapper = Condition.getQueryWrapper(distributionDeliveryList, DistributionDeliveryListEntity.class);
queryWrapper.eq("warehouse_id", myCurrentWarehouse.getId());
if (ObjectUtils.isNotNull(o)) {
queryWrapper.in("id", String.valueOf(o).split(","));
}
queryWrapper.lambda().eq(DistributionDeliveryListEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
List<DistributionDeliveryListExcel> list = new ArrayList<>();
List<DistributionDeliveryListVO> distributionDeliveryListVOS = baseMapper.exportDistributionDeliveryList(queryWrapper);
List<DistributionDeliveryListVO> distributionDeliveryListVOS = baseMapper.exportDistributionDeliveryList(distributionDeliveryList);
distributionDeliveryListVOS.forEach(dis -> {
// distributionDeliveryList.setTypeName(DictCache.getValue(DictEnum.YES_NO, DistributionDeliveryList.getType()));
DistributionDeliveryListExcel deliveryListExcel = new DistributionDeliveryListExcel();
BeanUtils.copyProperties(dis, deliveryListExcel);
String value = DictBizCache.getValue(DictBizConstant.DISTRIBUTION_TYPE, dis.getType());
deliveryListExcel.setType(value);
String valuek = DictBizCache.getValue(DictBizConstant.DISTRIBUTION_DELIVERY_KiIND, dis.getKind());
deliveryListExcel.setKind(valuek);
String valueks = DictBizCache.getValue(DictBizConstant.DISTRIBUTION_DELIVERY_STATUS, dis.getDeliveryStatus());
deliveryListExcel.setState(valueks);
deliveryListExcel.setInventoryNub(ObjectUtils.isNotNull(dis.getInventoryNub()) ? dis.getInventoryNub() : 0);
//查询配送数据
if ("1".equals(dis.getKind())) {
//z自
List<DistributionDeliverySelfEntity> list1 = distributionDeliverySelfService.list(Wrappers.<DistributionDeliverySelfEntity>query().lambda().eq(DistributionDeliverySelfEntity::getDeliveryId, dis.getId()));
String collect = list1.stream().map(DistributionDeliverySelfEntity::getDriverName).collect(Collectors.joining(","));
String colle = list1.stream().map(DistributionDeliverySelfEntity::getVehicleNub).collect(Collectors.joining(","));
deliveryListExcel.setDriver(collect);
deliveryListExcel.setVehicle(colle);
} else {
//三
List<DistributionDeliveryTripartiteEntity> list1 = distributionDeliveryTripartiteService.list(Wrappers.<DistributionDeliveryTripartiteEntity>query().lambda().eq(DistributionDeliveryTripartiteEntity::getDeliveryId, dis.getId()));
String collect = list1.stream().map(DistributionDeliveryTripartiteEntity::getDriverName).collect(Collectors.joining(","));
String colle = list1.stream().map(DistributionDeliveryTripartiteEntity::getVehicleNum).collect(Collectors.joining(","));
deliveryListExcel.setDriver(collect);
deliveryListExcel.setVehicle(colle);
}
deliveryListExcel.setLoadingTeam("装:" + dis.getLoadingTeamName() + ",卸:" + dis.getUnloadingTeamName());
DistributionDeliveryListExcel deliveryListExcel = Func.copy(dis, DistributionDeliveryListExcel.class);
deliveryListExcel.setKind(dis.getKindName());
deliveryListExcel.setDriver(dis.getDriverName());
deliveryListExcel.setVehicle(dis.getVehicleNum());
deliveryListExcel.setType(dis.getDeliveryTypeName());
deliveryListExcel.setState(dis.getDeliveryStatusName());
deliveryListExcel.setCustomersNumber(dis.getCustomersNumber());
deliveryListExcel.setOrderNumber(dis.getOrderNumber());
deliveryListExcel.setDeliveryNumber(dis.getDeliveryNumber());
deliveryListExcel.setInventoryNub(dis.getInventoryNub());
deliveryListExcel.setCustomersNumber(dis.getScannedNumber());
deliveryListExcel.setScannedNumber(dis.getScannedNumber());
deliveryListExcel.setSigningNumber(dis.getSigningNumber());
deliveryListExcel.setLoadingTeam(dis.getHandlingCrew());
BasicdataWarehouseEntity entityWarehouseId = warehouseClient.getEntityWarehouseId(dis.getWarehouseId());
deliveryListExcel.setWarehouseName(entityWarehouseId.getName());
list.add(deliveryListExcel);
});
return list;

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

@ -1423,16 +1423,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
if (ObjectUtils.isNotNull(o)) {
distributionSignfor.remove("ids");
}
// BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
// if(ObjectUtils.isNull()){
// throw new ServiceException("请选择仓库!");
// }
// QueryWrapper<DistributionSignforEntity> queryWrapper = Condition.getQueryWrapper(distributionSignfor, DistributionSignforEntity.class);
// queryWrapper.lambda().eq(DistributionSignforEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
// if(ObjectUtils.isNotNull(o)){
// queryWrapper.in("id",String.valueOf(o).split(","));
// }
// queryWrapper.eq("warehouse_id",myCurrentWarehouse.getId());
DistributionSignforVO distributionSignforVO = JSON.parseObject(JSON.toJSONString(distributionSignfor), DistributionSignforVO.class);
if (ObjectUtils.isNotNull(o)) {
String id = (String) o;
@ -1444,17 +1435,20 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
List<DistributionSignforOwnExcel> list = new ArrayList<>();
distributionSignforList.forEach(d -> {
DistributionSignforOwnExcel signforExcel = new DistributionSignforOwnExcel();
BeanUtils.copyProperties(d, signforExcel);
String value = DictBizCache.getValue(DictBizConstant.DISTRIBUTION_TYPE, d.getDeliveryType());
signforExcel.setDeliveryTypeName(value);
String value1 = DictBizCache.getValue(DictBizConstant.DISTRIBUTION_SIGNFOR_STATUS, d.getSigningStatus());
signforExcel.setSigningStatusName(value1);
String value2 = DictBizCache.getValue(DictBizConstant.DISTRIBUTION_SIGNFOR_STATUS, d.getDriverSigning());
signforExcel.setDriverSigningName(value2);
String value3 = DictBizCache.getValue(DictBizConstant.ADD_VALUE_SERVE_TYPE, d.getServeType());
signforExcel.setDeliveryWayName(value3);
DistributionSignforOwnExcel signforExcel = Func.copy(d,DistributionSignforOwnExcel.class);
signforExcel.setLoadingTime(d.getLoadingTime());
signforExcel.setDeliveryDriverPhone(d.getDriverPhone());
signforExcel.setDeliveryDriverName(d.getDriverName());
signforExcel.setReservationNum(d.getTotalNum());
signforExcel.setLoadedNumber(d.getLoadingNum());
signforExcel.setReceivedQuantity(d.getSigningNum());
signforExcel.setWithoutScanning(d.getUnLoadingNum());
signforExcel.setUnsigneds(d.getUnsigneds());
signforExcel.setDeliveryStatusName(d.getDeliveryStatusName());
signforExcel.setDeliveryPhone(d.getDeliveryPhone());
//查询仓库
BasicdataWarehouseEntity entityWarehouseId = basicdataWarehouseClient.getEntityWarehouseId(d.getWarehouseId());
signforExcel.setWarehouseName(entityWarehouseId.getName());;
list.add(signforExcel);
});
return list;

Loading…
Cancel
Save