Browse Source

Merge remote-tracking branch 'origin/dev' into dev

visual
zhaoqiaobo 5 months ago
parent
commit
b535ec30a0
  1. 6
      blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesWorkOrderEntity.java
  2. 4
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/OpenOrderDTO.java
  3. 2
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/feign/ITrunklineAdvanceDetailClient.java
  4. 11
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseWaybillEntity.java
  5. 23
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/ExportWarehouseWaybillVO.java
  6. 12
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/FinanceWaybillExportVO.java
  7. 7
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/excel/AftersalesWorkOrderExcel.java
  8. 6
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml
  9. 13
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesProcessingResultsServiceImpl.java
  10. 2
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java
  11. 9
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/api/DistributionDeliveryAppController.java
  12. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java
  13. 134
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml
  14. 34
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java
  15. 22
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/listener/mq/WaybillCheckListener.java
  16. 39
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java
  17. 3
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/feign/TrunklineAdvanceDetailClient.java
  18. 7
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.java
  19. 125
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml
  20. 7
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java
  21. 23
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java
  22. 39
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  23. 15
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  24. 181
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml

6
blade-service-api/logpm-aftersales-api/src/main/java/com/logpm/aftersales/entity/AftersalesWorkOrderEntity.java

@ -284,6 +284,12 @@ public class AftersalesWorkOrderEntity extends TenantEntity {
@ApiModelProperty(value = "标识 1订单 2 零担 3库存品 ")
@TableField(exist = false)
private String packageCode;
/**
* 提交人
*/
@ApiModelProperty(value = "提交人 ")
private String ceator;
/**
* 处理仓库ID
*/

4
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/OpenOrderDTO.java

@ -63,7 +63,9 @@ public class OpenOrderDTO implements Serializable {
private BigDecimal pickupFee = BigDecimal.ZERO;//提货费
private BigDecimal warehouseManagementFee = BigDecimal.ZERO;//仓库管理费
private BigDecimal storageFee = BigDecimal.ZERO;//仓储费
private BigDecimal handlingFee = BigDecimal.ZERO;//装卸费
private BigDecimal sortingFee = BigDecimal.ZERO;//仓储分拣费
private BigDecimal handlingFee = BigDecimal.ZERO;//仓储操作费
private BigDecimal installFee = BigDecimal.ZERO;//安装费
private BigDecimal otherFee = BigDecimal.ZERO;//其他费
private BigDecimal insuranceFee = BigDecimal.ZERO;//保价费

2
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/feign/ITrunklineAdvanceDetailClient.java

@ -36,5 +36,5 @@ public interface ITrunklineAdvanceDetailClient {
* @return
*/
@GetMapping(API_PREFIX+"/selectByOrderCodeAndWarehouseId")
List<TrunklineAdvanceDetailEntity> selectByOrderCodeAndWarehouseId(@RequestParam String orderCode,@RequestParam String warehouseIds);
List<TrunklineAdvanceDetailEntity> selectByOrderCodeAndWarehouseId(@RequestParam String orderCode);
}

11
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/entity/WarehouseWaybillEntity.java

@ -330,11 +330,18 @@ public class WarehouseWaybillEntity extends TenantEntity {
*/
@ApiModelProperty(value = "仓储费")
private BigDecimal storageFee;//仓储费
/**
* 仓储费
*/
@ApiModelProperty(value = "仓储分拣费")
private BigDecimal sortingFee;//仓储分拣费
/**
* 装卸费
*/
@ApiModelProperty(value = "装卸费")
private BigDecimal handlingFee;//装卸费
@ApiModelProperty(value = "仓库操作费")
private BigDecimal handlingFee;//仓库操作
/**
* 安装费
*/

23
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/ExportWarehouseWaybillVO.java

@ -50,7 +50,8 @@ public class ExportWarehouseWaybillVO implements Serializable {
@ExcelProperty(value = "收货单位")
private String consignee;
@ExcelProperty(value = "收货单位编码")
private String consigneeCode;
@ExcelProperty(value = "收货人")
private String consigneeName;
@ -61,6 +62,8 @@ public class ExportWarehouseWaybillVO implements Serializable {
@ExcelProperty(value = "收货方地址")
private String consigneeAddress;
@ExcelProperty(value = "发站")
private String departure;
@ExcelProperty(value = "到站")
private String destination;
@ -109,11 +112,14 @@ public class ExportWarehouseWaybillVO implements Serializable {
@ExcelProperty(value = "仓储费")
private BigDecimal storageFee;
@ExcelProperty(value = "装卸费")
@ExcelProperty(value = "仓储分拣费")
private BigDecimal sortingFee;
@ExcelProperty(value = "仓储操作费")
private BigDecimal handlingFee;
@ExcelProperty(value = "安装费")
private BigDecimal installFee;
@ExcelProperty(value = "申明价值")
private BigDecimal claimingValue;
@ExcelProperty(value = "回扣")
private BigDecimal rebate;
@ -141,6 +147,8 @@ public class ExportWarehouseWaybillVO implements Serializable {
@ExcelProperty(value = "送货方式")
private String deliveryWay;
@ExcelProperty(value = "运输方式")
private String transportType;
@ExcelProperty(value = "紧急度")
private String urgency;
@ -148,9 +156,6 @@ public class ExportWarehouseWaybillVO implements Serializable {
@ExcelProperty(value = "回单数")
private Integer receiptNum;
@ExcelProperty(value = "运输方式")
private String transportType;
@ExcelProperty(value = "经办人")
private String agent;
@ -182,6 +187,10 @@ public class ExportWarehouseWaybillVO implements Serializable {
private Date freezeTime;
@ExcelIgnore
private Integer checkStatus;
@ExcelProperty(value = "是否审核")
private String checkStatusStr;
@ExcelProperty(value = "审核人")
private String checkUserName;

12
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/vo/FinanceWaybillExportVO.java

@ -68,7 +68,7 @@ public class FinanceWaybillExportVO implements Serializable {
@ExcelProperty(value = "备注")
private String remark;
@ExcelProperty(value = "备注")
@ExcelProperty(value = "结算方")
private String cleanObjType;
@ExcelProperty(value = "支付方式")
@ -78,16 +78,16 @@ public class FinanceWaybillExportVO implements Serializable {
private String payWay;
@ExcelProperty(value = "现付")
private BigDecimal xPay;
private BigDecimal nowPay;
@ExcelProperty(value = "到付")
private BigDecimal dPay;
private BigDecimal arrivePay;
@ExcelProperty(value = "回付")
private BigDecimal hPay;
private BigDecimal backPay;
@ExcelProperty(value = "月结")
private BigDecimal yPay;
private BigDecimal monthPay;
@ExcelProperty(value = "服务类型")
private String serviceType;
@ -134,7 +134,7 @@ public class FinanceWaybillExportVO implements Serializable {
@ExcelProperty(value = "总重量")
private BigDecimal totalWeight;
@ExcelProperty(value = "总重量")
@ExcelProperty(value = "总体积")
private BigDecimal totalVolume;
@ExcelProperty(value = "总费用")

7
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/excel/AftersalesWorkOrderExcel.java

@ -263,5 +263,12 @@ public class AftersalesWorkOrderExcel implements Serializable {
@ExcelProperty("赔付方式")
private String compensationMethods;
/**
* 钉钉流程号
*/
@ColumnWidth(20)
@ExcelProperty("创建人")
private String ceator;
}

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

@ -56,6 +56,7 @@
SELECT DISTINCT
lawo.id,
lawo.ceator,
lawo.work_order_type,
lawo.discovery_node,
lawo.work_order_number,
@ -115,7 +116,7 @@
AND b.is_deleted = 0
GROUP BY
a.id) AS t ON t.id = lawo.id
LEFT JOIN logpm_aftersales_processing_results AS lapr ON lapr.work_order_id = lawo.id
LEFT JOIN logpm_aftersales_processing_results AS lapr ON lapr.work_order_id = lawo.id AND lapr.is_deleted = 0
<where>
lawo.is_deleted = 0
<if test="param.workOrderStatusNameS != null and param.workOrderStatusNameS != '' ">and lawo.work_order_status = #{param.workOrderStatusNameS } </if>
@ -185,6 +186,7 @@
SELECT DISTINCT
lawo.id,
lawo.ceator,
CASE
lawo.work_order_type
WHEN 1 THEN
@ -288,7 +290,7 @@
AND b.is_deleted = 0
GROUP BY
a.id) AS t ON t.id = lawo.id
LEFT JOIN logpm_aftersales_processing_results AS lapr ON lapr.work_order_id = lawo.id
LEFT JOIN logpm_aftersales_processing_results AS lapr ON lapr.work_order_id = lawo.id AND lapr.is_deleted = 0
<where>
lawo.is_deleted = 0
<if test="param.workOrderStatusNameS != null and param.workOrderStatusNameS != '' ">and lawo.work_order_status = #{param.workOrderStatusNameS } </if>

13
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesProcessingResultsServiceImpl.java

@ -55,6 +55,7 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
/**
* 异常工单处理结果 服务实现类
@ -104,10 +105,22 @@ public class AftersalesProcessingResultsServiceImpl extends BaseServiceImpl<Afte
throw new ServiceException("未选择仓库");
}
if(ObjectUtil.isNull(aftersalesProcessingResults.getId())){
//查询此工单之前是否存在有处理结果 如果有则全部进行删除
List<AftersalesProcessingResultsEntity> list = this.list(Wrappers.<AftersalesProcessingResultsEntity>query().lambda()
.eq(AftersalesProcessingResultsEntity::getWorkOrderId, aftersalesProcessingResults.getWorkOrderId())
);
if (!list.isEmpty()) {
List<Long> collect = list.stream().map(AftersalesProcessingResultsEntity::getId).collect(Collectors.toList());
//删除处理结果和处理结果详情
aftersalesProcessingMoneyService.remove(Wrappers.<AftersalesProcessingMoneyEntity>update().lambda().in(AftersalesProcessingMoneyEntity::getProcessingResultsId,collect));
//移除处理结果
this.removeBatchByIds(collect);
}
aftersalesProcessingResults.setCreateUser(AuthUtil.getUserId());
aftersalesProcessingResults.setCreateDept(myCurrentWarehouse.getDepartment());
aftersalesProcessingResults.setCreateTime(new Date());
aftersalesProcessingResults.setStatus(1);
aftersalesProcessingResults.setWarehouseId(myCurrentWarehouse.getId());
aftersalesProcessingResults.setIsDeleted(0);
//添加
baseMapper.insert(aftersalesProcessingResults);

2
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/service/impl/AftersalesWorkOrderServiceImpl.java

@ -343,6 +343,8 @@ public class AftersalesWorkOrderServiceImpl extends BaseServiceImpl<AftersalesWo
aftersalesWorkOrder.setWorkOrderNumber(getWorkOrderNumber(myCurrentWarehouse.getWarehouseCode(), aftersalesWorkOrder.getWorkOrderType()));
}
aftersalesWorkOrder.setWarehouseId(myCurrentWarehouse.getId());
aftersalesWorkOrder.setWarehouseId(myCurrentWarehouse.getId());
aftersalesWorkOrder.setCeator(user.getNickName());
aftersalesWorkOrder.setWorkOrderStatus(WorkOrderStatusConstant.daichuli.getValue());
if (ObjectUtils.isNotNull(aftersalesWorkOrder.getProcessorEntityList())) {
aftersalesWorkOrder.getProcessorEntityList().stream().collect(Collectors.groupingBy(AftersalesProcessorEntity::getTypesOf))

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

@ -469,4 +469,13 @@ public class DistributionDeliveryAppController {
return distributionStockArticleService.getdeliveryInfo(type,code);
}
/**
* 扫描查询配送任务下的包件信息
*/
@GetMapping("/orderCodeWarehouseDetail")
@ApiOperationSupport(order = 11)
public R orderCodeWarehouseDetail(@RequestParam String orderCode ) {
return distributionStockArticleService.getOrderWarehouseDetail(orderCode);
}
}

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

@ -238,4 +238,6 @@ public interface DistributionStockArticleMapper extends BaseMapper<DistributionS
IPage<DistributionStockArticleVO> pageListOweTransfer(IPage page,@Param("param")DistributionStockArticleOweDTO stockArticleEntity,@Param("warehouseIds")List<Long> warehouseIds);
List<Long> findStockArticleIds(@Param("orderCodes") Set<String> orderCodes);
IPage<DistributionStockArticleEntity> selectClentAllDistributionOrder(IPage<DistributionStockArticleVO> page,@Param("par") DistributionStockArticleOweDTO stockArticleEntity);
}

134
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml

@ -762,7 +762,7 @@
LEFT JOIN logpm_warehouse_waybill AS lww ON lww.waybill_no = ltwo.waybill_no
<where>
ldsa.order_status in ('10','20','30','70')
AND lww.check_status = 1
AND lww.check_status = 1
and ldsa.reservation_status in ('10','20')
AND EXISTS (
SELECT 1
@ -2254,5 +2254,137 @@
#{orderCode}
</foreach>
</select>
<select id="selectClentAllDistributionOrder"
resultType="com.logpm.distribution.entity.DistributionStockArticleEntity">
select DISTINCT ldsa.id, ldsa.tenant_id,
ldsa.create_user,
ldsa.create_time,
ldsa.update_user,
ldsa.update_time,
ldsa.hand_quantity AS handQuantity,
ldsa.status, ldsa.is_deleted, ldsa.create_dept,
ldsa.reserve1, ldsa.reserve2, ldsa.reserve3, ldsa.reserve4, ldsa.reserve5,
ldsa.service_number, ldsa.order_code,
ldsa.mall_id, ldsa.mall_code, ldsa.mall_name, ldsa.store_name,
ldsa.store_code, ldsa.store_id, ldsa.description_goods, ldsa.warehouse_id,
ldsa.warehouse, ldsa.warehouse_entry_time, ldsa.store_time, ldsa.total_number,
ldsa.complete_set, ldsa.brand, ldsa.type_service, ldsa.customer_name, ldsa.customer_telephone,
ldsa.customer_address, ldsa.genre,
ldsa.stockup_status, ldsa.reservation_status, ldsa.order_status, ldsa.grounding_status,
ldsa.order_receive_status,
ldsa.freeze_status, ldsa.notification, ldsa.fee, ldsa.rate, ldsa.advance_id, ldsa.waybill_id,
ldsa.waybill_number,
ldsa.consignee_unit, ldsa.collect_fee, ldsa.storage_fee, ldsa.consignee_person, ldsa.consignee_address,
ldsa.consignee_mobile, ldsa.warehouse_entry_time_end,
ldsa.sorting_quantity, ldsa.delivery_quantity, ldsa.transfer_quantity,
ldsa.signin_quantity, ldsa.resource, ldsa.is_opai,
ldsa.inventory_date, ldsa.inventory_person, ldsa.inventory_person_id,
ldsa.available_quantity, ldsa.is_have_data, ldsa.stock_article_code, ldsa.dealer_name, ldsa.dealer_code,
ldsa.train_number, ldsa.factory_train, ldsa.sending, ldsa.send_warehouse_id, ldsa.send_warehouse_name,
ldsa.is_zero, ldsa.accept_warehouse_id, ldsa.accept_warehouse_name, ldsa.order_delivery_status
from logpm_distribution_stock_article ldsa
LEFT JOIN logpm_distribution_parcel_list ldpl on ldsa.id = ldpl.stock_article_id
<where>
ldsa.order_status in ('10','20','30','70')
and ldsa.reservation_status in ('10','20')
AND EXISTS (
SELECT 1
FROM logpm_distribution_parcel_list ldpll
WHERE
ldsa.id = ldpll.stock_article_id
AND ldpll.is_transfer = 0
AND ldpll.order_package_loading_status != '20'
AND ldpll.order_package_reservation_status != '20'
AND ldpll.order_package_status != '70'
AND ldpll.conditions != 2
AND ldpll.warehouse_id = #{par.warehouseId}
AND ldsa.type_service = #{par.typeService}
<if test="par.orderCode != null and par.orderCode != '' ">
and ldpll.order_code like concat('%',#{par.orderCode},'%')
</if>
GROUP BY ldpll.stock_article_id
HAVING SUM(ldpll.quantity) > 0
)
AND ldsa.hand_quantity > 0
<if test="par.warehouseId != null and par.warehouseId != '' ">
and ldsa.warehouse_id = #{par.warehouseId}
</if>
<if test="par.isZero != null ">
and ldsa.is_zero = #{par.isZero}
</if>
<if test="par.orderCode != null and par.orderCode != '' ">
and ldsa.order_code like concat('%',#{par.orderCode},'%')
</if>
<if test="par.mallName != null and par.mallName != '' ">
and ldsa.mall_name like concat('%',#{par.mallName},'%')
</if>
<if test="par.mallId != null and par.mallId != '' ">
and ldsa.mall_id = #{par.mallId}
</if>
<if test="par.storeName != null and par.storeName != '' ">
and ldsa.store_name like concat('%',#{par.storeName},'%')
</if>
<if test="par.descriptionGoods != null and par.descriptionGoods != '' ">
and ldsa.description_goods like concat('%',#{par.descriptionGoods},'%')
</if>
<if test="par.warehouse != null and par.warehouse != '' ">
and ldsa.warehouse like concat('%',#{par.warehouse},'%')
</if>
<if test="par.warehouseEntryTime != null and par.warehouseEntryTime != '' ">
and DATE(ldsa.warehouse_entry_time) = #{par.warehouseEntryTime}
</if>
<if test="par.reservationStatus != null and par.reservationStatus != '' ">
and ldsa.reservation_status = #{par.reservationStatus}
</if>
<if test="par.freezeStatus != null and par.freezeStatus != '' ">
and ldsa.freeze_status = #{par.freezeStatus}
</if>
<if test="par.brand != null and par.brand != '' ">
and ldsa.brand = #{par.brand}
</if>
<if test="par.typeService != null and par.typeService != '' ">
and ldsa.type_service = #{par.typeService}
</if>
<if test="par.customerName != null and par.customerName != '' ">
and ldsa.customer_name like concat('%',#{par.customerName},'%')
</if>
<if test="par.customerTelephone != null and par.customerTelephone != '' ">
and ldsa.customer_telephone like concat('%',#{par.customerTelephone},'%')
</if>
<if test="par.serviceNumber != null and par.serviceNumber != '' ">
and ldsa.service_number like concat('%',#{par.serviceNumber},'%')
</if>
<if test="par.consigneePerson != null and par.consigneePerson != '' ">
and ldsa.consignee_person like concat('%',#{par.consigneePerson},'%')
</if>
<if test="par.consigneeAddress != null and par.consigneeAddress != '' ">
and ldsa.consignee_address like concat('%',#{par.consigneeAddress},'%')
</if>
<if test="par.genre != null and par.genre != '' ">
and ldsa.genre = #{par.genre}
</if>
<if test="par.waybillNumber != null and par.waybillNumber != '' ">
and ldsa.waybill_number like concat('%',#{par.waybillNumber},'%')
</if>
<if test="par.customerName != null and par.customerName != '' ">
and ldsa.customer_name like concat('%',#{par.customerName},'%')
</if>
<if test="par.consigneeUnit != null and par.consigneeUnit != '' ">
and ldsa.consignee_unit like concat('%',#{par.consigneeUnit},'%')
</if>
<if test="par.totalNumber !=null ">
and ldsa.total_number = #{par.totalNumber}
</if>
<if test="par.customerAddress !=null and par.customerAddress !=''">
and ldsa.customer_address like concat('%',#{par.customerAddress},'%')
</if>
</where>
ORDER BY
ldsa.warehouse_entry_time DESC
</select>
</mapper>

34
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java

@ -84,8 +84,10 @@ import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.core.tool.utils.StringUtil;
import org.springblade.system.cache.DictBizCache;
import org.springblade.system.entity.DictBiz;
import org.springblade.system.entity.Tenant;
import org.springblade.system.entity.User;
import org.springblade.system.feign.IDictBizClient;
import org.springblade.system.feign.ISysClient;
import org.springblade.system.feign.IUserClient;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -153,6 +155,7 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
private final IWarehouseWaybillClient warehouseWaybillClient;
private final IWarehouseWaybillDetailClient warehouseWaybillDetailClient;
private final ITrunklineAdvanceDetailClient trunklineAdvanceDetailClient;
private final ISysClient sysClient;
@Override
public IPage<DistributionStockArticleVO> selectDistributionStockArticlePage(IPage<DistributionStockArticleVO> page, DistributionStockArticleVO distributionStockArticle) {
@ -1235,8 +1238,24 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
stockArticleEntity.setIdsLike(ids);
}
}
String tenantId = AuthUtil.getTenantId();
R<Tenant> tenant = sysClient.getTenant(tenantId);
IPage<DistributionStockArticleEntity> stockArticleEntityList = null;
if (tenant.isSuccess() && !Objects.isNull(tenant.getData())) {
Tenant data = tenant.getData();
Integer tenantType = data.getTenantType();
switch (tenantType){
case 2:
stockArticleEntityList = baseMapper.selectClentAllDistributionOrder(page, stockArticleEntity);
break;
default:
stockArticleEntityList = baseMapper.selectAllDistributionOrder(page, stockArticleEntity);
IPage<DistributionStockArticleEntity> stockArticleEntityList = baseMapper.selectAllDistributionOrder(page, stockArticleEntity);
}
}
// IPage<DistributionStockArticleEntity> stockArticleEntityList = baseMapper.selectAllDistributionOrder(page, stockArticleEntity);
List<DistributionStockArticleVO> stockArticleVOS = DistributionStockArticleNewWrapper.build().listVO(stockArticleEntityList.getRecords());
for (DistributionStockArticleVO stockArticleVO : stockArticleVOS) {
if (IsOrNoConstant.no.getValue().equals(stockArticleVO.getIsZero())) {
@ -2837,10 +2856,11 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
List<Long> warehouseIdList = new ArrayList<>();
if (Objects.isNull(myCurrentWarehouse)){
//查询当前人的仓库列表
List<BasicdataWarehouseEntity> warehouseList = warehouseClient.getMyWarehouseList();
if (!warehouseList.isEmpty()) {
warehouseIdList.addAll(warehouseList.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList()));
}
// List<BasicdataWarehouseEntity> warehouseList = warehouseClient.getMyWarehouseList();
// if (!warehouseList.isEmpty()) {
// warehouseIdList.addAll(warehouseList.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList()));
// }
return R.fail("多仓库权限人员请选择仓库后查看");
}else {
warehouseIdList.add(myCurrentWarehouse.getId());
}
@ -2849,7 +2869,7 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
}
Map<String,List<DistributionParcelListVO>> info = new HashMap<>();
//查询此暂存单数据在仓库的情况
List<TrunklineAdvanceDetailEntity> list = trunklineAdvanceDetailClient.selectByOrderCodeAndWarehouseId(orderCode,warehouseIdList.stream().map(String::valueOf).collect(Collectors.joining(",")));
List<TrunklineAdvanceDetailEntity> list = trunklineAdvanceDetailClient.selectByOrderCodeAndWarehouseId(orderCode);
if (!list.isEmpty()) {
List<String> orderPackageCodes = list.stream().map(TrunklineAdvanceDetailEntity::getOrderPackageCode).collect(Collectors.toList());
info = handlePackageGroupByWarehouse(list,warehouseIdList,orderPackageCodes,Objects.isNull(myCurrentWarehouse),orderCode);
@ -2866,7 +2886,7 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl<Distrib
List<DistributionParcelListEntity> parcelListEntities = distributionParcelListService.list(Wrappers.<DistributionParcelListEntity>query().lambda()
.eq(DistributionParcelListEntity::getOrderCode, orderCode)
.in(DistributionParcelListEntity::getOrderPackageCode, orderPackageCodes)
.eq(DistributionParcelListEntity::getIsTransfer, 0)
// .eq(DistributionParcelListEntity::getIsTransfer, 0)
.in(!aNull,DistributionParcelListEntity::getWarehouseId,warehouseIdList)
);
if (!parcelListEntities.isEmpty()) {

22
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/listener/mq/WaybillCheckListener.java

@ -458,6 +458,8 @@ public class WaybillCheckListener {
BigDecimal insuranceFee = Objects.isNull(waybillEntity.getInsuranceFee()) ? BigDecimal.ZERO : waybillEntity.getInsuranceFee();
BigDecimal otherFee = Objects.isNull(waybillEntity.getOtherFee()) ? BigDecimal.ZERO : waybillEntity.getOtherFee();
BigDecimal thirdOperationFee = Objects.isNull(waybillEntity.getThirdOperationFee()) ? BigDecimal.ZERO : waybillEntity.getThirdOperationFee();
BigDecimal sortingFee = Objects.isNull(waybillEntity.getSortingFee()) ? BigDecimal.ZERO : waybillEntity.getSortingFee();
BigDecimal deliveryFee = Objects.isNull(waybillEntity.getDeliveryFee()) ? BigDecimal.ZERO : waybillEntity.getDeliveryFee();
Integer totalCount = waybillEntity.getTotalCount();
// BigDecimal pickupPrice = pickupFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP);
@ -467,6 +469,8 @@ public class WaybillCheckListener {
BigDecimal insurancePrice = insuranceFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP);
BigDecimal otherPrice = otherFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP);
BigDecimal thirdOperationPrice = thirdOperationFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP);
BigDecimal sortingPrice = sortingFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP);
BigDecimal deliveryPrice = deliveryFee.divide(new BigDecimal(totalCount), 2, BigDecimal.ROUND_HALF_UP);
//查询运单下所有的订单
@ -480,6 +484,14 @@ public class WaybillCheckListener {
.collect(Collectors.toMap(WarehouseWayBillDetail::getProductId, wayBillDetail -> wayBillDetail));
// wayBillDetailMapByProductId.keySet().forEach(productId -> {
// WarehouseWayBillDetail warehouseWayBillDetail = wayBillDetailMapByProductId.get(productId);
//
//
//
// });
//保存订单信息
List<StatisticsOrderInfoEntity> orderInfoEntities = new ArrayList<>();
@ -643,8 +655,8 @@ public class WaybillCheckListener {
warehousePackageEntity.setNum(1);
warehousePackageEntity.setWarehouseFee(warehousePrice.multiply(BigDecimal.ONE));
warehousePackageEntity.setWarehouseManageFee(warehouseManagementPrice.multiply(BigDecimal.ONE));
warehousePackageEntity.setWarehouseSortingFee(BigDecimal.ZERO);
warehousePackageEntity.setWarehouseOperatingFee(BigDecimal.ZERO);
warehousePackageEntity.setWarehouseSortingFee(sortingPrice.multiply(BigDecimal.ONE));
warehousePackageEntity.setWarehouseOperatingFee(handlingPrice.multiply(BigDecimal.ONE));
warehousePackageEntity.setGoodsType(1);
warehousePackageEntity.setOrderInfoId(orderId);
warehousePackageEntity.setBrandId(brandId);
@ -689,7 +701,7 @@ public class WaybillCheckListener {
distributionPackageEntity.setVolume(Objects.isNull(volume) ? BigDecimal.ZERO : volume);
distributionPackageEntity.setGoodsType(1);
distributionPackageEntity.setOrderInfoId(orderId);
distributionPackageEntity.setDeliveryLoadingFee(handlingPrice.multiply(BigDecimal.ONE));
distributionPackageEntity.setDeliveryLoadingFee(BigDecimal.ZERO);
distributionPackageEntity.setDeliverySortingFee(BigDecimal.ZERO);
distributionPackageEntity.setDeliveryUpfloorFee(BigDecimal.ZERO);
distributionPackageEntity.setDeliveryMoveFee(BigDecimal.ZERO);
@ -726,13 +738,13 @@ public class WaybillCheckListener {
} else if (systemDeliveryChargeType == 3) {
distributionPackageEntity.setSystemDeliveryFee(systemDeliveryPrice.multiply(packageWeight));
}
distributionPackageEntity.setDeliveryFee(BigDecimal.ZERO);
distributionPackageEntity.setDeliveryFee(deliveryPrice.multiply(BigDecimal.ONE));
} else {
distributionPackageEntity.setSystemDeliveryChargeType(1);
distributionPackageEntity.setDeliveryChargeType(1);
distributionPackageEntity.setSystemDeliveryFee(BigDecimal.ZERO);
distributionPackageEntity.setDeliveryFee(BigDecimal.ZERO);
distributionPackageEntity.setDeliveryFee(deliveryPrice.multiply(BigDecimal.ONE));
}
if (payWay.equals("1") || payWay.equals("2")) {

39
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java

@ -2829,9 +2829,6 @@ public class CarsLoadController {
String method = "############loadCarsPageList: ";
log.info(method+"请求参数{}",loadCarsDTO);
try{
Enumeration<String> headerNames = request.getHeaderNames();
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
List<Long> warehouseIds = new ArrayList<>();
@ -2856,4 +2853,40 @@ public class CarsLoadController {
}
@ResponseBody
@PostMapping("/exportCarsPageList")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "到车管理分页列表", notes = "传入loadCarsDTO")
public void exportCarsPageList(@RequestBody LoadCarsDTO loadCarsDTO, HttpServletResponse response) {
String method = "############arriveCarsPageList: ";
log.info(method+"请求参数{}",loadCarsDTO);
try{
//当前登录人选择的仓库
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
List<Long> warehouseIds = new ArrayList<>();
if(!Objects.isNull(myCurrentWarehouse)){
Long warehouseId = myCurrentWarehouse.getId();
warehouseIds.add(warehouseId);
}else{
List<BasicdataWarehouseEntity> myWatchWarehouse = warehouseClient.getMyWatchWarehouse();
myWatchWarehouse.forEach(warehouseEntity -> {
warehouseIds.add(warehouseEntity.getId());
});
}
loadCarsDTO.setWarehouseIds(warehouseIds);
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
List<TrunklineCarsLoadExcel> list = carsLoadService.exportCarsPageList(loadCarsDTO);
ExcelUtil.export(response, "到达车辆数据" + DateUtil.time(), "到达车辆数据", list, TrunklineCarsLoadExcel.class);
}catch (CustomerException e){
log.error(e.message,e);
}catch (Exception e){
log.error(method+"系统异常",e);
}
}
}

3
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/feign/TrunklineAdvanceDetailClient.java

@ -45,10 +45,9 @@ public class TrunklineAdvanceDetailClient implements ITrunklineAdvanceDetailClie
}
@Override
public List<TrunklineAdvanceDetailEntity> selectByOrderCodeAndWarehouseId(String orderCode, String warehouseIds) {
public List<TrunklineAdvanceDetailEntity> selectByOrderCodeAndWarehouseId(String orderCode) {
return advanceDetailService.list(Wrappers.<TrunklineAdvanceDetailEntity>query().lambda()
.eq(TrunklineAdvanceDetailEntity::getOrderCode,orderCode)
.in(TrunklineAdvanceDetailEntity::getWarehouseId, Func.toLongList(warehouseIds))
);
}
}

7
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.java

@ -57,5 +57,12 @@ public interface TrunklineCarsLoadMapper extends BaseMapper<TrunklineCarsLoadEnt
* @return
*/
List<TrunklineCarsLoadExcel> exportLoadCarsList(@Param("param") LoadCarsDTO loadCarsDTO,@Param("idList")List<Long> idList);
/**
* 到车数据查询
* @param loadCarsDTO
* @return
*/
List<TrunklineCarsLoadExcel> exportCarsPageList(@Param("param")LoadCarsDTO loadCarsDTO);
}

125
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadMapper.xml

@ -990,6 +990,131 @@
ltcl.count_transport_cost
order by ltcl.create_time desc
</select>
<select id="exportCarsPageList" resultType="com.logpm.trunkline.excel.TrunklineCarsLoadExcel">
select ltcl.id id,
ltcl.cars_no carsNo,
ltcl.plan_loading_number planLoadingNumber,
ltcl.real_loading_number realLoadingNumber,
ltcl.stock_number stockCarsNum,
ltcl.unload_number unloadNumber,
ltcl.full_load_rate fullLoadRate,
ltcl.is_customer isCustomer,
CASE ltcl.load_status
WHEN '0' THEN '未发车'
WHEN '10' THEN '已发车'
WHEN '20' THEN '网点到车'
WHEN '30' THEN '网点发车'
WHEN '40' THEN '终点到车'
WHEN '80' THEN '已卸车'
WHEN '90' THEN '已签收'
WHEN '100' THEN '取消配载'
ELSE
'未知状态'
END loadStatusName,
ltcl.loading_type loadingType,
ltcl.driver_name driverName,
ltcl.driver_mobile driverMobile,
ltcl.car_number carNumber,
ltcl.start_warehouse_name startWarehouseName,
ltcl.end_warehouse_names endWarehouseNames,
ltcl.arrive_time arriveTime,
ltcl.start_time startTime,
ltcl.create_user_name createUserName,
ltcl.operator operator,
ltcl.create_time createTime,
ltcl.now_warehouse_id nowWarehouseId,
sum(ltcll.now_transport_cost) nowTransportCost,
sum(ltcll.oil_cost) oilCost,
sum(ltcll.back_transport_cost) backTransportCost,
sum(ltcll.reach_transport_cost) reachTransportCost,
sum(ltcll.whole_car_info_cost) wholeCarInfoCost,
sum(ltcll.whole_car_insurance_cost) wholeCarInsuranceCost,
sum(ltcll.whole_car_ground_cost) wholeCarGroundCost,
sum(ltcll.hair_whole_cost) hairWholeCost,
sum(ltcll.hair_whole_other_cost) hairWholeOtherCost,
sum(ltcll.unload_cost) unloadCost,
sum(ltcll.unload_other_cost) unloadOtherCost,
sum(ltcll.fuel) fuel,
sum(ltcll.toll_fee) tollFee
from logpm_trunkline_cars_load ltcl
left join logpm_trunkline_cars_load_line ltcll on ltcll.load_id = ltcl.id
where ltcl.is_deleted = 0
and ltcl.load_status != '100'
and ltcl.load_type != '4'
<if test="param.warehouseId != null" >
and ltcl.end_warehouse_ids like concat('%',#{param.warehouseId},'%')
</if>
<if test="param.warehouseName != null and param.warehouseName != ''">
and (Locate(#{param.warehouseName},ltcl.start_warehouse_name) > 0 or Locate(#{param.warehouseName},ltcl.end_warehouse_names) > 0)
</if>
<if test="param.loadCarsNo != null and param.loadCarsNo != ''">
and Locate(#{param.loadCarsNo},ltcl.cars_no) > 0
</if>
<if test="param.createTimeStart != null ">
and ltcl.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null ">
and ltcl.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.startTime != null ">
and ltcl.start_time &gt;= #{param.startTime}
</if>
<if test="param.endTime != null ">
and ltcl.start_time &lt;= #{param.endTime}
</if>
<if test="param.arriveTimeStart != null ">
and ltcl.arrive_time &gt;= #{param.arriveTimeStart}
</if>
<if test="param.arriveTimeEnd != null ">
and ltcl.arrive_time &lt;= #{param.arriveTimeEnd}
</if>
<if test="param.driverName != null and param.driverName != ''">
and ltcl.driver_name like CONCAT('%',#{param.driverName},'%')
</if>
<if test="param.driverMobile != null and param.driverMobile != ''">
and ltcl.driver_mobile like CONCAT('%',#{param.driverMobile},'%')
</if>
<if test="param.carNumber != null and param.carNumber != ''">
and ltcl.car_number like CONCAT('%',#{param.carNumber},'%')
</if>
<if test="param.startWarehouseName != null and param.startWarehouseName != ''">
and ltcl.start_warehouse_name like CONCAT('%',#{param.startWarehouseName},'%')
</if>
<if test="param.endWarehouseNames != null and param.endWarehouseNames != ''">
and ltcl.end_warehouse_names like CONCAT('%',#{param.endWarehouseNames},'%')
</if>
<if test="param.createUserName != null and param.createUserName != ''">
and ltcl.create_user_name like CONCAT('%',#{param.createUserName},'%')
</if>
<if test="param.operator != null and param.operator != ''">
and ltcl.operator like CONCAT('%',#{param.operator},'%')
</if>
<if test="param.arriveTime != null ">
AND DATE_FORMAT(ltcl.arrive_time,'%y%d%m') = DATE_FORMAT(#{param.arriveTime},'%y%d%m')
</if>
<if test="param.startTime != null ">
AND DATE_FORMAT(ltcl.start_time,'%y%d%m') = DATE_FORMAT(#{param.startTime},'%y%d%m')
</if>
<if test="param.createTime != null ">
AND DATE_FORMAT(ltcl.create_time,'%y%d%m') = DATE_FORMAT(#{param.createTime},'%y%d%m')
</if>
group by ltcl.id,ltcl.cars_no,
ltcl.plan_loading_number,
ltcl.real_loading_number,
ltcl.unload_number,
ltcl.full_load_rate,
ltcl.is_customer,
ltcl.load_status,
ltcl.loading_type,
ltcl.driver_name,
ltcl.driver_mobile,
ltcl.car_number,
ltcl.start_warehouse_name,
ltcl.end_warehouse_names,
ltcl.arrive_time,
ltcl.start_time
order by ltcl.create_time desc
</select>
</mapper>

7
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java

@ -261,4 +261,11 @@ public interface ITrunklineCarsLoadService extends BaseService<TrunklineCarsLoad
* @return
*/
List<TrunklineCarsLoadExcel> exportLoadCarsPageList(LoadCarsDTO loadCarsDTO);
/**
* 到车导出
* @param loadCarsDTO
* @return
*/
List<TrunklineCarsLoadExcel> exportCarsPageList(LoadCarsDTO loadCarsDTO);
}

23
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java

@ -766,6 +766,7 @@ public class InComingServiceImpl implements IInComingService {
List<TrunklineAdvanceDetailEntity> sendAdvanceDetailEntityList = new ArrayList();
Set<Long> waybillIdSet = new HashSet<>();
Integer total = 0;
for (Long advanceId : advanceIds) {
QueryWrapper<TrunklineAdvanceDetailEntity> queryWrapper = new QueryWrapper<>();
@ -786,18 +787,9 @@ public class InComingServiceImpl implements IInComingService {
//把detailList通过waybillId分组
Map<Long, List<TrunklineAdvanceDetailEntity>> map = detailList.stream().filter(t -> Objects.nonNull(t.getWaybillId())).collect(Collectors.groupingBy(TrunklineAdvanceDetailEntity::getWaybillId));
Set<Long> waybillIdSet = map.keySet();
waybillIdSet.addAll(map.keySet());
if (CollUtil.isNotEmpty(waybillIdSet)) {
List<WarehouseWaybillEntity> waybillEntityList = warehouseWaybillClient.findListByWaybillIds(new ArrayList<>(waybillIdSet));
waybillEntityList.forEach(wb -> {
Integer totalCount = wb.getTotalCount();
Integer stockCount = wb.getStockCount();
openOrderAsyncService.saveLog(wb.getId(), wb.getWaybillNo(), "20", "已入库", "运单入库:" + stockCount + "/" + totalCount + ",入库类型:【" + IncomingTypeEnum.getValue(incomingType) + "】,入库时间:" + CommonUtil.dateToStringGeneral(new Date()), AuthUtil.getNickName(), AuthUtil.getUserId(), warehouseId, warehouseName);
});
}
//把waybillEntityList转化成id为key的Map
// Map<Long, WarehouseWaybillEntity> waybillEntityMap = waybillEntityList.stream().collect(Collectors.toMap(WarehouseWaybillEntity::getId, Function.identity()));
@ -825,6 +817,17 @@ public class InComingServiceImpl implements IInComingService {
}
if (CollUtil.isNotEmpty(waybillIdSet)) {
List<WarehouseWaybillEntity> waybillEntityList = warehouseWaybillClient.findListByWaybillIds(new ArrayList<>(waybillIdSet));
waybillEntityList.forEach(wb -> {
Integer totalCount = wb.getTotalCount();
Integer stockCount = wb.getStockCount();
openOrderAsyncService.saveLog(wb.getId(), wb.getWaybillNo(), "20", "已入库", "运单入库:" + stockCount + "/" + totalCount + ",入库类型:【" + IncomingTypeEnum.getValue(incomingType) + "】,入库时间:" + CommonUtil.dateToStringGeneral(new Date()), AuthUtil.getNickName(), AuthUtil.getUserId(), warehouseId, warehouseName);
});
}
if(CollUtil.isNotEmpty(sendAdvanceDetailEntityList)){
advanceDetailService.sendReportIncomingData(AuthUtil.getUserId(),AuthUtil.getNickName(),sendAdvanceDetailEntityList,warehouseId,warehouseName,incomingType);
}

39
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java

@ -598,6 +598,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
waybillEntity.setPickupFee(openOrderDTO.getPickupFee());
waybillEntity.setWarehouseManagementFee(openOrderDTO.getWarehouseManagementFee());
waybillEntity.setStorageFee(openOrderDTO.getStorageFee());
waybillEntity.setSortingFee(openOrderDTO.getSortingFee());
waybillEntity.setHandlingFee(openOrderDTO.getHandlingFee());
waybillEntity.setInstallFee(openOrderDTO.getInstallFee());
waybillEntity.setOtherFee(openOrderDTO.getOtherFee());
@ -928,6 +929,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
waybillEntity.setPickupFee(openOrderDTO.getPickupFee());
waybillEntity.setWarehouseManagementFee(openOrderDTO.getWarehouseManagementFee());
waybillEntity.setStorageFee(openOrderDTO.getStorageFee());
waybillEntity.setSortingFee(openOrderDTO.getSortingFee());
waybillEntity.setHandlingFee(openOrderDTO.getHandlingFee());
waybillEntity.setInstallFee(openOrderDTO.getInstallFee());
waybillEntity.setOtherFee(openOrderDTO.getOtherFee());
@ -4770,12 +4772,24 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
msgList.add(editOrderMsgVO);
}
BigDecimal newSortingFee = openOrderDTO.getSortingFee();
BigDecimal sortingFee = waybillEntity.getSortingFee();
if(sortingFee.compareTo(newSortingFee) != 0){
// stringBuilder.append("装卸费:").append(handlingFee).append("-->").append(newHandlingFee).append(";");
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO();
editOrderMsgVO.setItemName("仓储操作费费");
editOrderMsgVO.setOldValue(sortingFee.toPlainString());
editOrderMsgVO.setNewValue(newSortingFee.toPlainString());
msgList.add(editOrderMsgVO);
}
BigDecimal newHandlingFee = openOrderDTO.getHandlingFee();
BigDecimal handlingFee = waybillEntity.getHandlingFee();
if(handlingFee.compareTo(newHandlingFee) != 0){
// stringBuilder.append("装卸费:").append(handlingFee).append("-->").append(newHandlingFee).append(";");
EditOrderMsgVO editOrderMsgVO = new EditOrderMsgVO();
editOrderMsgVO.setItemName("装卸费");
editOrderMsgVO.setItemName("仓储操作费费");
editOrderMsgVO.setOldValue(handlingFee.toPlainString());
editOrderMsgVO.setNewValue(newHandlingFee.toPlainString());
msgList.add(editOrderMsgVO);
@ -5315,10 +5329,17 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
waybillEntity.setStorageFee(newStorageFee);
}
BigDecimal newSortingFee = openOrderDTO.getSortingFee();
BigDecimal sortingFee = waybillEntity.getSortingFee();
if (sortingFee.compareTo(newSortingFee) != 0) {
stringBuilder.append("仓储分拣费:").append(sortingFee).append("-->").append(newSortingFee).append(";");
waybillEntity.setSortingFee(newSortingFee);
}
BigDecimal newHandlingFee = openOrderDTO.getHandlingFee();
BigDecimal handlingFee = waybillEntity.getHandlingFee();
if (handlingFee.compareTo(newHandlingFee) != 0) {
stringBuilder.append("装卸费:").append(handlingFee).append("-->").append(newHandlingFee).append(";");
stringBuilder.append("仓储操作费:").append(handlingFee).append("-->").append(newHandlingFee).append(";");
waybillEntity.setHandlingFee(newHandlingFee);
}
@ -5586,17 +5607,23 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
BasicdataClientEntity basicdataClientEntity = basicdataClientClient.findByName(unit);
if(Objects.isNull(basicdataClientEntity)){
basicdataClientEntity = new BasicdataClientEntity();
String finallyClientCode = basicdataClientClient.getFinallyClientCode();
basicdataClientEntity.setClientName(unit);
basicdataClientEntity.setClientCode(finallyClientCode);
basicdataClientEntity.setTypeService(2);
basicdataClientEntity.setTypeService(1);
basicdataClientEntity.setCargoControl(false);
basicdataClientEntity.setClientType(type);//1 工厂 2 商场 3装饰 4个人 5门店 6发货单位
basicdataClientEntity.setLinkman(linkman);
basicdataClientEntity.setPhone(linkPhone);
basicdataClientEntity.setDetailedly(linkAddress);
basicdataClientEntity.setIsNew(1);
clientId = basicdataClientClient.addReturnId(basicdataClientEntity);
basicdataClientEntity.setCleanObjType("2");
basicdataClientEntity.setBusinessType("1");
List<String> slips = new ArrayList<String>();
slips.add("1");
slips.add("3");
basicdataClientEntity.setTypeServiceList(slips);
clientId = basicdataClientClient.saveEntity(basicdataClientEntity);
}else{
clientId = basicdataClientEntity.getId();
}

15
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

@ -10416,6 +10416,21 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
return pageList;
}
@Override
public List<TrunklineCarsLoadExcel> exportCarsPageList(LoadCarsDTO loadCarsDTO) {
loadCarsDTO.setCreateTimeStart(CommonUtil.getStartByDateStr(loadCarsDTO.getCreateTimeStartStr()));
loadCarsDTO.setCreateTimeEnd(CommonUtil.getEndByDateStr(loadCarsDTO.getCreateTimeEndStr()));
loadCarsDTO.setStartTime(CommonUtil.getStartByDateStr(loadCarsDTO.getStartDate()));
loadCarsDTO.setEndTime(CommonUtil.getEndByDateStr(loadCarsDTO.getEndDate()));
loadCarsDTO.setArriveTimeStart(CommonUtil.getStartByDateStr(loadCarsDTO.getArriveTimeStartStr()));
loadCarsDTO.setArriveTimeEnd(CommonUtil.getEndByDateStr(loadCarsDTO.getArriveTimeEndStr()));
List<TrunklineCarsLoadExcel> pageList = baseMapper.exportCarsPageList(loadCarsDTO);
return pageList;
}
@Override
public R unloadZero(Long carsLoadScanId,Long loadId, String waybillNo, Integer enterNun, Long warehouseId, Integer unbindTray, String trayCode, String orderCode, String remark,String unloadTrayName,String unloadTrayCode,List<ZeroPackageDTO> zeroPackageList) {

181
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseWaybillMapper.xml

@ -174,12 +174,6 @@
lww.h_pay hPay,
lww.y_pay yPay,
lww.service_type serviceType,
IFNULL(lww.update_status,0) updateStatus,
IFNULL(lww.check_status,0) checkStatus,
lww.check_reson checkReson,
lww.check_remark checkRemark,
lww.check_user_name checkUserName,
lww.check_time checkTime,
lww.cancle_check_remark cancleCheckRemark,
lww.cancle_check_user_name cancleCheckUserName,
lww.cancle_check_time cancleCheckTime,
@ -189,39 +183,46 @@
lww.document_making_time documentMakingTime,
lww.create_time createTime,
GROUP_CONCAT(lwwd.product_name) goodsName,
GROUP_CONCAT(CONCAT(lwwd.product_name,'(',lwwd.num,')')) productNum,
GROUP_CONCAT(CONCAT(lwwd.product_name,'(',lwwd.price,')')) productPrice,
lww.total_count totalCount,
sum(lwwd.weight) totalWeight,
sum(lwwd.volume) totalVolume,
lww.x_pay+lww.d_pay+lww.h_pay+lww.y_pay totalFee,
sum(IFNULL(lwwd.freight_price,0)*lwwd.num+IFNULL(lwwd.pickup_price,0)*lwwd.num+IFNULL(lwwd.delivery_price,0)*lwwd.num) systemTotalFee,
lww.pickup_fee pickupFee,
lww.cost_piece costPiece,
lww.cost_zhang costZhang,
lww.cost_num costNum,
lww.total_freight totalFreight,
lww.storage_fee+lww.warehouse_management_fee warehouseServiceFee,
lww.delivery_fee deliveryFee,
lww.pickup_fee pickupFee,
lww.storage_fee storageFee,
lww.warehouse_management_fee warehouseManagementFee,
0.00 warehouseSortingFee,
0.00 warehouseOprationFee,
lww.delivery_fee+lww.handling_fee deliveryServiceFee,
lww.delivery_fee deliveryFee,
lww.sorting_fee sortingFee,
lww.handling_fee handlingFee,
0.00 deliverySortingFee,
0.00 deliveryUpfloorFee,
0.00 deliveryMoveFee,
0.00 deliveryLine,
0.00 deliveryLineFee,
lww.other_fee otherFee,
lww.install_fee installFee,
lww.insurance_fee insuranceFee,
lww.claiming_value claimingValue,
lww.rebate rebate,
lww.urgency urgency,
lww.receipt_num receiptNum,
lww.receipt receipt,
lww.transport_type transportType,
lww.third_operation_fee thirdOperationFee,
lww.pickup_complete_or_not pickupCompleteOrNot,
lww.trunkline_complete_or_not trunklineCompleteOrNot,
lww.freeze_status freezeStatus,
lww.freeze_user_name freezeUserName,
lww.freeze_time freezeTime,
lww.abolish_status abolishStatus,
lww.abolish_user_name abolishUserName,
lww.abolish_time abolishTime,
lww.sign_num signNum,
lww.sign_user_name signUserName,
lww.sign_time signTime,
lww.sign_check_user_name signCheckUserName,
lww.sign_check_time signCheckTime,
lww.rebate rebate,
GROUP_CONCAT(CONCAT(lwwd.product_name,'(',lwwd.num,')')) productNum,
GROUP_CONCAT(CONCAT(lwwd.product_name,'(',lwwd.price,')')) productPrice
IFNULL(lww.check_status,0) checkStatus,
lww.check_reson checkReson,
lww.check_remark checkRemark,
lww.check_user_name checkUserName,
lww.check_time checkTime
from logpm_warehouse_waybill lww
left join logpm_basicdata_client lbc on lbc.id = lww.consignee_id
left join logpm_warehouse_waybill_detail lwwd on lwwd.waybill_id = lww.id and lwwd.is_deleted = 0
@ -466,17 +467,17 @@
sum(lwwd.weight) totalWeight,
sum(lwwd.volume) totalVolume,
lww.x_pay+lww.d_pay+lww.h_pay+lww.y_pay totalFee,
sum(IFNULL(lwwd.freight_price,0)*lwwd.num+IFNULL(lwwd.pickup_price,0)*lwwd.num+IFNULL(lwwd.delivery_price,0)*lwwd.num) systemTotalFee,
sum(IFNULL(lwwd.freight_price,0)*lwwd.num+IF(lww.pickup_complete_or_not=1,IFNULL(lwwd.pickup_price,0)*lwwd.num,0)+IFNULL(lwwd.delivery_price,0)*lwwd.num) systemTotalFee,
lww.pickup_fee pickupFee,
lww.total_freight freightFee,
lww.storage_fee+lww.warehouse_management_fee warehouseServiceFee,
lww.storage_fee+lww.warehouse_management_fee+lww.sorting_fee+lww.handling_fee warehouseServiceFee,
lww.storage_fee warehouseFee,
lww.warehouse_management_fee warehouseManagementFee,
0.00 warehouseSortingFee,
0.00 warehouseOprationFee,
lww.delivery_fee+lww.handling_fee deliveryServiceFee,
lww.sorting_fee warehouseSortingFee,
lww.handling_fee warehouseOprationFee,
lww.delivery_fee deliveryServiceFee,
lww.delivery_fee deliveryFee,
lww.handling_fee deliveryHandlingFee,
0.00 deliveryHandlingFee,
0.00 deliverySortingFee,
0.00 deliveryUpfloorFee,
0.00 deliveryMoveFee,
@ -694,10 +695,10 @@
when lww.pay_way='5' then '内部结算'
when lww.pay_way='6' then '多笔付'
else '未知' end payWay,
lww.x_pay xPay,
lww.d_pay dPay,
lww.h_pay hPay,
lww.y_pay yPay,
lww.x_pay nowPay,
lww.d_pay arrivePay,
lww.h_pay backPay,
lww.y_pay monthPay,
case when lbc.type_service='1' then '商配'
when lbc.type_service='2' then '市配'
when lbc.type_service='3' then '自提'
@ -733,17 +734,17 @@
sum(lwwd.weight) totalWeight,
sum(lwwd.volume) totalVolume,
lww.x_pay+lww.d_pay+lww.h_pay+lww.y_pay totalFee,
sum(IFNULL(lwwd.freight_price,0)*lwwd.num+IFNULL(lwwd.pickup_price,0)*lwwd.num+IFNULL(lwwd.delivery_price,0)*lwwd.num) systemTotalFee,
sum(IFNULL(lwwd.freight_price,0)*lwwd.num+IF(lww.pickup_complete_or_not=1,IFNULL(lwwd.pickup_price,0)*lwwd.num,0)+IFNULL(lwwd.delivery_price,0)*lwwd.num) systemTotalFee,
lww.pickup_fee pickupFee,
lww.total_freight freightFee,
lww.storage_fee+lww.warehouse_management_fee warehouseServiceFee,
lww.storage_fee+lww.warehouse_management_fee+lww.sorting_fee+lww.handling_fee warehouseServiceFee,
lww.storage_fee warehouseFee,
lww.warehouse_management_fee warehouseManagementFee,
0.00 warehouseSortingFee,
0.00 warehouseOprationFee,
lww.delivery_fee+lww.handling_fee deliveryServiceFee,
lww.sorting_fee warehouseSortingFee,
lww.handling_fee warehouseOprationFee,
lww.delivery_fee deliveryServiceFee,
lww.delivery_fee deliveryFee,
lww.handling_fee deliveryHandlingFee,
0.00 deliveryHandlingFee,
0.00 deliverySortingFee,
0.00 deliveryUpfloorFee,
0.00 deliveryMoveFee,
@ -772,7 +773,7 @@
#{item}
</foreach>
</if>
<if test="param.warehouseId != null">
<if test="param.destinationWarehouseIds != null">
and lww.destination_warehouse_id in
<foreach collection="param.destinationWarehouseIds" item="item" open="(" separator="," close=")">
#{item}
@ -926,82 +927,74 @@
</select>
<select id="exportWaybillList" resultType="com.logpm.warehouse.vo.ExportWarehouseWaybillVO">
select lww.id id,
lww.brand brand,
select
lww.waybill_no waybillNo,
lww.order_no orderNo,
lww.remark remark,
lww.departure_warehouse_name departureWarehouseName,
lww.destination_warehouse_name destinationWarehouseName,
lww.customer_train customerTrain,
lww.brand brand,
lww.shipper shipper,
lww.shipper_name shipperName,
lww.shipper_mobile shipperMobile,
lww.shipper_address shipperAddress,
lww.consignee consignee,
lbc.client_code consigneeCode,
lww.consignee_name consigneeName,
lww.consignee_mobile consigneeMobile,
lww.consignee_address consigneeAddress,
lww.shipper shipper,
lww.shipper_name shipperName,
lww.shipper_mobile shipperMobile,
lww.shipper_address shipperAddress,
lww.destination destination,
lww.departure departure,
lww.departure_warehouse_name departureWarehouseName,
lww.destination_warehouse_name destinationWarehouseName,
lww.agent agent,
lww.delivery_way deliveryWay,
lww.customer_train customerTrain,
IFNULL(lww.return_status,0) returnStatus,
lww.remark remark,
lww.pay_type payType,
lww.pay_way payWay,
lww.x_pay nowPay,
lww.d_pay arrivePay,
lww.h_pay backPay,
lww.y_pay mouthPay,
lww.service_type serviceType,
IFNULL(lww.update_status,0) updateStatus,
IFNULL(lww.check_status,0) checkStatus,
lww.check_reson checkReson,
lww.check_remark checkRemark,
lww.check_user_name checkUserName,
lww.check_time checkTime,
lww.cancle_check_remark cancleCheckRemark,
lww.cancle_check_user_name cancleCheckUserName,
lww.cancle_check_time cancleCheckTime,
lww.waybill_status waybillStatus,
lww.waybill_type waybillType,
lww.document_making_time documentMakingTime,
lww.create_time createTime,
GROUP_CONCAT(lwwd.product_name) goodsName,
GROUP_CONCAT(CONCAT(lwwd.product_name,'(',lwwd.num,')')) productNum,
GROUP_CONCAT(CONCAT(lwwd.product_name,'(',lwwd.price,')')) productPrice,
lww.cost_piece costPiece,
lww.cost_zhang costZhang,
lww.cost_num costNum,
lww.total_count totalCount,
sum(lwwd.weight) totalWeight,
sum(lwwd.volume) totalVolume,
lww.x_pay+lww.d_pay+lww.h_pay+lww.y_pay totalFee,
sum(IFNULL(lwwd.freight_price,0)*lwwd.num+IFNULL(lwwd.pickup_price,0)*lwwd.num+IFNULL(lwwd.delivery_price,0)*lwwd.num) systemTotalFee,
lww.pickup_fee pickupFee,
lww.total_freight totalFreight,
lww.storage_fee+lww.warehouse_management_fee warehouseServiceFee,
lww.delivery_fee deliveryFee,
lww.pickup_fee pickupFee,
lww.storage_fee storageFee,
lww.warehouse_management_fee warehouseManagementFee,
0.00 warehouseSortingFee,
0.00 warehouseOprationFee,
lww.delivery_fee+lww.handling_fee deliveryServiceFee,
lww.delivery_fee deliveryFee,
lww.sorting_fee sortingFee,
lww.handling_fee handlingFee,
0.00 deliverySortingFee,
0.00 deliveryUpfloorFee,
0.00 deliveryMoveFee,
0.00 deliveryLine,
0.00 deliveryLineFee,
lww.other_fee otherFee,
lww.install_fee installFee,
lww.insurance_fee insuranceFee,
lww.claiming_value claimingValue,
lww.rebate rebate,
lww.pay_type payType,
lww.pay_way payWay,
lww.x_pay nowPay,
lww.d_pay arrivePay,
lww.h_pay backPay,
lww.y_pay mouthPay,
lww.third_operation_fee thirdOperationFee,
lww.delivery_way deliveryWay,
lww.transport_type transportType,
lww.urgency urgency,
lww.receipt_num receiptNum,
lww.agent agent,
lww.waybill_status waybillStatus,
lww.freeze_status freezeStatus,
lww.freeze_user_name freezeUserName,
lww.freeze_time freezeTime,
lww.check_status checkStatus,
lww.check_reson checkReson,
lww.check_remark checkRemark,
lww.check_user_name checkUserName,
lww.check_time checkTime,
lww.sign_num signNum,
lww.sign_user_name signUserName,
lww.sign_time signTime,
lww.sign_check_user_name signCheckUserName,
lww.sign_check_time signCheckTime,
lww.rebate rebate,
GROUP_CONCAT(CONCAT(lwwd.product_name,'(',lwwd.num,')')) productNum,
GROUP_CONCAT(CONCAT(lwwd.product_name,'(',lwwd.price,')')) productPrice
lww.abolish_status abolishStatus,
lww.abolish_user_name abolishUserName,
lww.abolish_time abolishTime,
lww.document_making_time documentMakingTime,
lww.create_time createTime
from logpm_warehouse_waybill lww
left join logpm_basicdata_client lbc on lbc.id = lww.consignee_id
left join logpm_warehouse_waybill_detail lwwd on lwwd.waybill_id = lww.id and lwwd.is_deleted = 0

Loading…
Cancel
Save