Browse Source

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

dist.1.3.0
zhaoqiaobo 8 months ago
parent
commit
27539a043d
  1. 96
      blade-service-api/logpm-basic-api/src/main/java/com/logpm/basic/entity/BasicCarModelEntity.java
  2. 37
      blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicCarModelController.java
  3. 13
      blade-service/logpm-basic/src/main/java/com/logpm/basic/dto/BasicCarModelDTO.java
  4. 32
      blade-service/logpm-basic/src/main/java/com/logpm/basic/mapper/BasicCarModelMapper.java
  5. 34
      blade-service/logpm-basic/src/main/java/com/logpm/basic/service/IBasicCarModelService.java
  6. 85
      blade-service/logpm-basic/src/main/java/com/logpm/basic/service/impl/BasicCarModelServiceImpl.java
  7. 3
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataStorageServicesController.java
  8. 3
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataStoreBrandController.java
  9. 6
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataTripartiteMallController.java
  10. 7
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataStorageServicesService.java
  11. 8
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataStoreBrandService.java
  12. 15
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataTripartiteMallService.java
  13. 1
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java
  14. 45
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataStorageServicesServiceImpl.java
  15. 40
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataStoreBrandServiceImpl.java
  16. 6
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataTrayServiceImpl.java
  17. 134
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataTripartiteMallServiceImpl.java
  18. 9
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistrilbutionBillLadingController.java
  19. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistrilbutionBillLadingService.java
  20. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionAsyncServiceImpl.java
  21. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  22. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java
  23. 43
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java
  24. 15
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/config/ExecutorConfig.java
  25. 31
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  26. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java
  27. 8
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  28. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineWaybillPackageServiceImpl.java
  29. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseUpdownGoodsMapper.java
  30. 7
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseUpdownGoodsMapper.xml
  31. 3
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseTaryAllocationService.java
  32. 2
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseUpdownGoodsService.java
  33. 8
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTaryAllocationServiceImpl.java
  34. 5
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownGoodsServiceImpl.java
  35. 134
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java

96
blade-service-api/logpm-basic-api/src/main/java/com/logpm/basic/entity/BasicCarModelEntity.java

@ -0,0 +1,96 @@
/*
* 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.basic.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.Size;
/**
* 车型基础信息 实体类
*
* @author lmy
* @since 2023-05-24
*/
@Data
@TableName("logpm_basic_car_model")
@ApiModel(value = "BasicCarModel对象", description = "车型基础信息")
@EqualsAndHashCode(callSuper = true)
public class BasicCarModelEntity extends TenantEntity {
/**
* 预留1
*/
@ApiModelProperty(value = "预留1")
private String reserve1;
/**
* 预留2
*/
@ApiModelProperty(value = "预留2")
private String reserve2;
/**
* 预留3
*/
@ApiModelProperty(value = "预留3")
private String reserve3;
/**
* 预留4
*/
@ApiModelProperty(value = "预留4")
private String reserve4;
/**
* 预留5
*/
@ApiModelProperty(value = "预留5")
private String reserve5;
@ApiModelProperty(value = "车辆类型")
private String vehicleModel;
@Min(value = 0, message = "车辆类型车辆核定体积最小为:0")
@Max(value = 64, message = "车辆类型长度最大为:64")
@ApiModelProperty(value = "车长")
private Float vehicleCommander;
@Min(value = 0, message = "车辆类型外廓高最小为:0")
@Max(value = 64, message = "车辆类型外廓高最大为:64")
@ApiModelProperty(value = "外廓高")
private Float vehicleHeight;
@Min(value = 0, message = "车辆类型车辆核定体积最小为:0")
@Max(value = 999999, message = "车辆类型车辆核定体积最大为:999999")
@ApiModelProperty(value = "核定体积")
private Float approvedVolume;
@Min(value = 0, message = "车辆类型车辆总质量最小为:0")
@Max(value = 999999, message = "车辆类型车辆总质量最大为:999999")
@ApiModelProperty(value = "车辆总质量")
private Float vehicleQuality;
@Min(value = 0, message = "车辆类型车辆整备质量最小为:0")
@Max(value = 999999, message = "车辆类型车辆整备质量最大为:999999")
@ApiModelProperty(value = "整备质量")
private Float curbWeight;
}

37
blade-service/logpm-basic/src/main/java/com/logpm/basic/controller/BasicCarModelController.java

@ -0,0 +1,37 @@
package com.logpm.basic.controller;
import com.logpm.basic.dto.BasicCarModelDTO;
import com.logpm.basic.entity.BasicCarModelEntity;
import com.logpm.basic.service.IBasicCarModelService;
import io.swagger.annotations.Api;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.List;
@RestController
@AllArgsConstructor
@RequestMapping("/carModel")
@Api(value = "车型默认数据", tags = "车型默认数据")
@Slf4j
public class BasicCarModelController extends BladeController {
private IBasicCarModelService basicCarModelService;
@GetMapping("/list")
public R<List<BasicCarModelEntity>> getCarModelList(Query query) {
return R.data(basicCarModelService.list());
}
@PostMapping("/save")
public R<String> saveCarModel(@Valid @RequestBody @Validated BasicCarModelDTO basicCarModelDTO) {
String res = basicCarModelService.saveCarModel(basicCarModelDTO);
return "".equals(res) ? R.success("保存成功") : R.fail(res);
}
}

13
blade-service/logpm-basic/src/main/java/com/logpm/basic/dto/BasicCarModelDTO.java

@ -0,0 +1,13 @@
package com.logpm.basic.dto;
import com.logpm.basic.entity.BasicCarModelEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = true)
public class BasicCarModelDTO extends BasicCarModelEntity {
private static final long serialVersionUID = 1L;
}

32
blade-service/logpm-basic/src/main/java/com/logpm/basic/mapper/BasicCarModelMapper.java

@ -0,0 +1,32 @@
/*
* 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.basic.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.logpm.basic.entity.BasicCarModelEntity;
/**
* 车辆型号 Mapper 接口
*
* @author lmy
* @since 2023-05-24
*/
public interface BasicCarModelMapper extends BaseMapper<BasicCarModelEntity> {
}

34
blade-service/logpm-basic/src/main/java/com/logpm/basic/service/IBasicCarModelService.java

@ -0,0 +1,34 @@
/*
* 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.basic.service;
import com.logpm.basic.dto.BasicCarModelDTO;
import com.logpm.basic.entity.BasicCarModelEntity;
import org.springblade.core.mp.base.BaseService;
/**
* 提货线路中间表 服务类
*
* @author lmy
* @since 2023-05-25
*/
public interface IBasicCarModelService extends BaseService<BasicCarModelEntity> {
String saveCarModel(BasicCarModelDTO basicCarModelDTO);
}

85
blade-service/logpm-basic/src/main/java/com/logpm/basic/service/impl/BasicCarModelServiceImpl.java

@ -0,0 +1,85 @@
/*
* 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.basic.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.basic.dto.BasicCarModelDTO;
import com.logpm.basic.entity.BasicCarModelEntity;
import com.logpm.basic.mapper.BasicCarModelMapper;
import com.logpm.basic.service.IBasicCarModelService;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.system.cache.DictBizCache;
import org.springblade.system.entity.DictBiz;
import org.springframework.stereotype.Service;
import javax.management.Query;
import java.util.List;
import java.util.stream.Collectors;
/**
* 车辆型号 服务实现类
*
* @author lmy
* @since 2023-05-25
*/
@Service
@Slf4j
public class BasicCarModelServiceImpl extends BaseServiceImpl<BasicCarModelMapper, BasicCarModelEntity> implements IBasicCarModelService {
private final String CarTypeDictCode = "basic_vehicle_model";
@Override
public String saveCarModel(BasicCarModelDTO basicCarModelDTO) {
try {
if (basicCarModelDTO == null) {
return "数据不能为空";
}
if (basicCarModelDTO.getVehicleModel() == null || basicCarModelDTO.getVehicleModel().isEmpty()) {
return "车辆类型不能为空";
}
List<DictBiz> list = DictBizCache.getList(CarTypeDictCode);
List<String> codes = list.stream().map(DictBiz::getDictKey).collect(Collectors.toList());
if (!codes.contains(basicCarModelDTO.getVehicleModel())) {
return "车辆类型不存在";
}
LambdaQueryWrapper<BasicCarModelEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(BasicCarModelEntity::getVehicleModel, basicCarModelDTO.getVehicleModel());
boolean isUpdate = false;
if (basicCarModelDTO.getId() != null && !basicCarModelDTO.getId().equals(0L)) {
lambdaQueryWrapper.ne(BasicCarModelEntity::getId, basicCarModelDTO.getId());
isUpdate = true;
}
BasicCarModelEntity have = getOne(lambdaQueryWrapper);
if (have != null) {
return "车辆类型已存在";
}
boolean res = isUpdate ? updateById(basicCarModelDTO) : save(basicCarModelDTO);
return res ? "" : "保存失败";
} catch (Exception e) {
log.error("车辆模型保存》系统异常", e);
return "保存失败";
}
}
}

3
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataStorageServicesController.java

@ -129,7 +129,8 @@ public class BasicdataStorageServicesController extends BladeController {
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(basicdataStorageServicesService.deleteLogic(Func.toLongList(ids)));
R r = basicdataStorageServicesService.removeClientStorageServices(ids);
return r;
}

3
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataStoreBrandController.java

@ -155,7 +155,8 @@ public class BasicdataStoreBrandController extends BladeController {
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(basicdataStoreBrandService.deleteLogic(Func.toLongList(ids)));
R r = basicdataStoreBrandService.removeClientBrand(ids);
return r;
}

6
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataTripartiteMallController.java

@ -126,7 +126,8 @@ public class BasicdataTripartiteMallController extends BladeController {
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入basicdataTripartiteMall")
public R submit(@Valid @RequestBody BasicdataTripartiteMallEntity basicdataTripartiteMall) {
return R.status(basicdataTripartiteMallService.saveOrUpdate(basicdataTripartiteMall));
R r = basicdataTripartiteMallService.saveOrUpdateClientTripartiteMall(basicdataTripartiteMall);
return r;
}
/**
@ -136,7 +137,8 @@ public class BasicdataTripartiteMallController extends BladeController {
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(basicdataTripartiteMallService.deleteLogic(Func.toLongList(ids)));
R r = basicdataTripartiteMallService.removeClientTripartiteMall(ids);
return r;
}

7
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataStorageServicesService.java

@ -58,4 +58,11 @@ public interface IBasicdataStorageServicesService extends BaseService<BasicdataS
List<BasicdataStorageServicesVO> pageList(IPage<Object> page, Map<String, Object> basicdataStorageServices);
BasicdataStorageServicesEntity findEntityBySendWarehouseIdIsNullAndClientId(Long clientId);
/**
* 删除服务仓
* @param ids
* @return
*/
R removeClientStorageServices(String ids);
}

8
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataStoreBrandService.java

@ -22,6 +22,7 @@ import com.logpm.basicdata.entity.BasicdataStoreBrandEntity;
import com.logpm.basicdata.excel.BasicdataStoreBrandExcel;
import com.logpm.basicdata.vo.BasicdataStoreBrandVO;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.tool.api.R;
import java.util.List;
import java.util.Map;
@ -71,4 +72,11 @@ public interface IBasicdataStoreBrandService extends BaseService<BasicdataStoreB
* @param basicdataStoreBrand@return
*/
List<BasicdataStoreBrandVO> listIdsName(Map<String, Object> basicdataStoreBrand);
/**
* 移除客户品牌
* @param ids
* @return
*/
R removeClientBrand(String ids);
}

15
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataTripartiteMallService.java

@ -22,6 +22,7 @@ import com.logpm.basicdata.entity.BasicdataTripartiteMallEntity;
import com.logpm.basicdata.excel.BasicdataTripartiteMallExcel;
import com.logpm.basicdata.vo.BasicdataTripartiteMallVO;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.tool.api.R;
import java.util.List;
@ -55,4 +56,18 @@ public interface IBasicdataTripartiteMallService extends BaseService<BasicdataTr
List<BasicdataTripartiteMallEntity> getOwn();
Long getClientIdByNameAndBrandAndCode(String name, String code, String brand);
/**
* 客户三方商场信息保存或修改
* @param basicdataTripartiteMall
* @return
*/
R saveOrUpdateClientTripartiteMall(BasicdataTripartiteMallEntity basicdataTripartiteMall);
/**
* 删除三方商城
* @param ids
* @return
*/
R removeClientTripartiteMall(String ids);
}

1
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java

@ -88,6 +88,7 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl<BasicdataClientM
@Autowired
private IBasicdataStoreBusinessService basicdataStoreBusinessService;
@Autowired
@Lazy
private IBasicdataTripartiteMallService basicdataTripartiteMallService; //三方商场
@Autowired
@Lazy

45
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataStorageServicesServiceImpl.java

@ -22,10 +22,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.basicdata.dto.BasicdataStorageServicesDTO;
import com.logpm.basicdata.entity.BasicdataClientEntity;
import com.logpm.basicdata.entity.BasicdataClientLogEntity;
import com.logpm.basicdata.entity.BasicdataStorageServicesEntity;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.entity.*;
import com.logpm.basicdata.excel.BasicdataStorageServicesExcel;
import com.logpm.basicdata.mapper.BasicdataStorageServicesMapper;
import com.logpm.basicdata.service.IBasicdataClientLogService;
@ -262,4 +259,44 @@ public class BasicdataStorageServicesServiceImpl extends BaseServiceImpl<Basicda
return baseMapper.findEntityBySendWarehouseIdIsNullAndClientId(clientId);
}
@Override
public R removeClientStorageServices(String ids) {
String method ="#####################BasicdataStoreBrandServiceImpl.removeClientStorageServices";
List<Long> list = Func.toLongList(ids);
if (list.isEmpty()) {
log.error(method+"参数缺少");
return R.fail("参数缺少");
}
List<BasicdataStorageServicesEntity> basicdataStorageServicesEntities = this.listByIds(list);
if (basicdataStorageServicesEntities.isEmpty()) {
log.error("查询目标删除客户品牌信息错误,ids:{}",list);
return R.fail("查询目标删除客户品牌信息错误");
}
List<Long> clientIds = basicdataStorageServicesEntities.stream().map(BasicdataStorageServicesEntity::getClientId).distinct().collect(Collectors.toList());
if (!clientIds.isEmpty()) {
if (clientIds.size()!=1) {
log.error(method+"当前删除客户品牌存在多个客户信息");
return R.fail("当前删除客户品牌存在多个客户信息");
}
Long clientId = clientIds.get(0);
BasicdataClientEntity clientEntity = basicdataClientService.getById(clientId);
if (Objects.isNull(clientEntity)){
log.error(method+"查询客户信息错误");
return R.fail("查询客户信息错误");
}
BasicdataClientLogEntity basicdataClientLogEntity = new BasicdataClientLogEntity();
basicdataClientLogEntity.setClientId(clientId);
basicdataClientLogEntity.setClientName(clientEntity.getClientName());
basicdataClientLogEntity.setOperator(AuthUtil.getNickName());
StringBuilder builder = new StringBuilder();
for (BasicdataStorageServicesEntity basicdataStorageServicesEntity : basicdataStorageServicesEntities) {
builder.append("[发站仓:").append(basicdataStorageServicesEntity.getSendWarehouseName()).append(",").append("服务仓:").append(basicdataStorageServicesEntity.getServeWarehouseName()).append("],");
}
String content = "删除发站仓配置-->"+builder.deleteCharAt(builder.lastIndexOf(","));
basicdataClientLogEntity.setContent(content);
basicdataClientLogService.saveAppointLog(basicdataClientLogEntity);
}
return R.status(this.removeByIds(list));
}
}

40
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataStoreBrandServiceImpl.java

@ -34,6 +34,7 @@ import com.logpm.basicdata.vo.BasicdataStoreBrandVO;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
@ -185,6 +186,45 @@ public class BasicdataStoreBrandServiceImpl extends BaseServiceImpl<BasicdataSto
return voList;
}
@Override
public R removeClientBrand(String ids) {
String method ="#####################BasicdataStoreBrandServiceImpl.removeClientBrand";
List<Long> list = Func.toLongList(ids);
if (list.isEmpty()) {
log.error(method+"参数缺少");
return R.fail("参数缺少");
}
List<BasicdataStoreBrandEntity> basicdataStoreBrandEntities = this.listByIds(list);
if (basicdataStoreBrandEntities.isEmpty()) {
log.error("查询目标删除客户品牌信息错误,ids:{}",list);
return R.fail("查询目标删除客户品牌信息错误");
}
List<Long> clientIds = basicdataStoreBrandEntities.stream().map(BasicdataStoreBrandEntity::getClientId).distinct().collect(Collectors.toList());
if (!clientIds.isEmpty()) {
if (clientIds.size()!=1) {
log.error(method+"当前删除客户品牌存在多个客户信息");
return R.fail("当前删除客户品牌存在多个客户信息");
}
Long clientId = clientIds.get(0);
BasicdataClientEntity clientEntity = basicdataClientService.getById(clientId);
if (Objects.isNull(clientEntity)){
log.error(method+"查询客户信息错误");
return R.fail("查询客户信息错误");
}
BasicdataClientLogEntity basicdataClientLogEntity = new BasicdataClientLogEntity();
basicdataClientLogEntity.setClientId(clientId);
basicdataClientLogEntity.setClientName(clientEntity.getClientName());
basicdataClientLogEntity.setOperator(AuthUtil.getNickName());
String brandNames = basicdataStoreBrandEntities.stream().map(BasicdataStoreBrandEntity::getBrandName).collect(Collectors.joining(","));
String content = "删除品牌-->["+brandNames+"]";
basicdataClientLogEntity.setContent(content);
basicdataClientLogService.saveAppointLog(basicdataClientLogEntity);
}
return R.status(this.deleteLogic(list));
}
public static <T> Predicate<T> distinctByKey(Function<? super T, ?> keyExtractor) {
Map<Object, Boolean> seen = new ConcurrentHashMap<>(16);
return t -> seen.putIfAbsent(keyExtractor.apply(t), Boolean.TRUE) == null;

6
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataTrayServiceImpl.java

@ -64,14 +64,14 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletResponse;
import javax.swing.text.html.HTML;
import java.io.*;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
/**
* 托盘 服务实现类

134
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataTripartiteMallServiceImpl.java

@ -18,15 +18,28 @@ package com.logpm.basicdata.service.impl;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.basicdata.entity.BasicdataClientEntity;
import com.logpm.basicdata.entity.BasicdataClientLogEntity;
import com.logpm.basicdata.entity.BasicdataStorageServicesEntity;
import com.logpm.basicdata.entity.BasicdataTripartiteMallEntity;
import com.logpm.basicdata.excel.BasicdataTripartiteMallExcel;
import com.logpm.basicdata.mapper.BasicdataTripartiteMallMapper;
import com.logpm.basicdata.service.IBasicdataClientLogService;
import com.logpm.basicdata.service.IBasicdataClientService;
import com.logpm.basicdata.service.IBasicdataTripartiteMallService;
import com.logpm.basicdata.vo.BasicdataTripartiteMallVO;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
/**
* 客户三方商城 服务实现类
@ -35,8 +48,15 @@ import java.util.List;
* @since 2023-06-21
*/
@Service
@AllArgsConstructor
@Slf4j
public class BasicdataTripartiteMallServiceImpl extends BaseServiceImpl<BasicdataTripartiteMallMapper, BasicdataTripartiteMallEntity> implements IBasicdataTripartiteMallService {
private IBasicdataClientService basicdataClientService;
private IBasicdataClientLogService basicdataClientLogService;
@Override
public IPage<BasicdataTripartiteMallVO> selectBasicdataTripartiteMallPage(IPage<BasicdataTripartiteMallVO> page, BasicdataTripartiteMallVO basicdataTripartiteMall) {
return page.setRecords(baseMapper.selectBasicdataTripartiteMallPage(page, basicdataTripartiteMall));
@ -54,7 +74,7 @@ public class BasicdataTripartiteMallServiceImpl extends BaseServiceImpl<Basicdat
@Override
public Long getClientIdByNameAndBrand(String name, String brand) {
return baseMapper.getClientIdByNameAndBrand(name,brand);
return baseMapper.getClientIdByNameAndBrand(name, brand);
}
@Override
@ -64,10 +84,116 @@ public class BasicdataTripartiteMallServiceImpl extends BaseServiceImpl<Basicdat
@Override
public Long getClientIdByNameAndBrandAndCode(String name, String code, String brand) {
if("".equals(code)){
code=null;
if ("".equals(code)) {
code = null;
}
return baseMapper.getClientIdByNameAndBrandAndCode(name, code, brand);
}
@Override
@Transactional
public R saveOrUpdateClientTripartiteMall(BasicdataTripartiteMallEntity basicdataTripartiteMall) {
String method = "##############################BasicdataTripartiteMallServiceImpl.saveOrUpdateClientTripartiteMall";
if (Objects.isNull(basicdataTripartiteMall.getBrandId())) {
log.error(method + "BrandId参数缺失");
return R.fail("操作失败,参数缺失");
}
if (Objects.isNull(basicdataTripartiteMall.getTripartiteMall())) {
log.error(method + "TripartiteMall参数缺失");
return R.fail("操作失败,请输入商城名称");
}
if (Objects.isNull(basicdataTripartiteMall.getClientId())) {
log.error(method + "ClientId参数缺失");
return R.fail("操作失败,参数缺失");
}
BasicdataClientEntity clientEntity = basicdataClientService.getById(basicdataTripartiteMall.getClientId());
if (Objects.isNull(clientEntity)) {
log.error(method + "查询客户信息错误,clientId:{}", basicdataTripartiteMall.getClientId());
return R.fail("操作失败,参数缺失");
}
BasicdataClientLogEntity basicdataClientLogEntity = new BasicdataClientLogEntity();
basicdataClientLogEntity.setClientId(clientEntity.getId());
basicdataClientLogEntity.setClientName(clientEntity.getClientName());
basicdataClientLogEntity.setOperator(AuthUtil.getNickName());
String content = "";
if (Objects.isNull(basicdataTripartiteMall.getId())) {
String str = basicdataTripartiteMall.getTripartiteCoding().isEmpty() ? "空" : basicdataTripartiteMall.getTripartiteCoding();
//新增
content = "新增三方商场-->[名称:" + basicdataTripartiteMall.getTripartiteMall() + ",编码:" + str + ",品牌:" + basicdataTripartiteMall.getBrandName() + "]";
basicdataClientLogEntity.setContent(content);
basicdataClientLogService.save(basicdataClientLogEntity);
} else {
//修改
BasicdataTripartiteMallEntity entity = this.getById(basicdataTripartiteMall.getId());
Boolean flag = judgeComparisonBasicdataTripartiteMall(entity, basicdataTripartiteMall);
if (flag) {
content = comparisonBasicdataTripartiteMall(entity, basicdataTripartiteMall);
basicdataClientLogEntity.setContent(content);
basicdataClientLogService.save(basicdataClientLogEntity);
}
}
return R.status(this.saveOrUpdate(basicdataTripartiteMall));
}
private Boolean judgeComparisonBasicdataTripartiteMall(BasicdataTripartiteMallEntity entity, BasicdataTripartiteMallEntity basicdataTripartiteMall) {
String str1 = entity.getTripartiteCoding().isEmpty() ? "空" : entity.getTripartiteCoding();
String str2 = basicdataTripartiteMall.getTripartiteCoding().isEmpty() ? "空" : basicdataTripartiteMall.getTripartiteCoding();
String oldTripartiteMall = "[名称:" + entity.getTripartiteMall() + ",编码:" + str1 + ",品牌:" + entity.getBrandName() + "]";
String newTripartiteMall = "[名称:" + basicdataTripartiteMall.getTripartiteMall() + ",编码:" + str2 + ",品牌:" + basicdataTripartiteMall.getBrandName() + "]";
return !oldTripartiteMall.equals(newTripartiteMall);
}
@Override
public R removeClientTripartiteMall(String ids) {
String method = "#####################BasicdataStoreBrandServiceImpl.removeClientStorageServices";
List<Long> list = Func.toLongList(ids);
if (list.isEmpty()) {
log.error(method + "参数缺少");
return R.fail("参数缺少");
}
List<BasicdataTripartiteMallEntity> basicdataStorageServicesEntities = this.listByIds(list);
if (basicdataStorageServicesEntities.isEmpty()) {
log.error("查询目标删除客户三方信息错误,ids:{}", list);
return R.fail("查询目标删除客户三方信息错误");
}
List<Long> clientIds = basicdataStorageServicesEntities.stream().map(BasicdataTripartiteMallEntity::getClientId).distinct().collect(Collectors.toList());
if (!clientIds.isEmpty()) {
if (clientIds.size() != 1) {
log.error(method + "当前删除客户三方商城存在多个客户信息");
return R.fail("当前删除客户三方商城存在多个客户信息");
}
Long clientId = clientIds.get(0);
BasicdataClientEntity clientEntity = basicdataClientService.getById(clientId);
if (Objects.isNull(clientEntity)) {
log.error(method + "查询客户信息错误");
return R.fail("查询客户信息错误");
}
BasicdataClientLogEntity basicdataClientLogEntity = new BasicdataClientLogEntity();
basicdataClientLogEntity.setClientId(clientId);
basicdataClientLogEntity.setClientName(clientEntity.getClientName());
basicdataClientLogEntity.setOperator(AuthUtil.getNickName());
StringBuilder builder = new StringBuilder();
for (BasicdataTripartiteMallEntity basicdataTripartiteMall : basicdataStorageServicesEntities) {
builder.append("[名称:").append(basicdataTripartiteMall.getTripartiteMall()).append(",编码:").append(basicdataTripartiteMall.getTripartiteCoding()).append(",品牌:").append(basicdataTripartiteMall.getBrandName()).append("],");
}
String content = "删除三方商城配置-->" + builder.deleteCharAt(builder.lastIndexOf(","));
basicdataClientLogEntity.setContent(content);
basicdataClientLogService.saveAppointLog(basicdataClientLogEntity);
}
return R.status(this.removeByIds(list));
}
return baseMapper.getClientIdByNameAndBrandAndCode(name,code,brand);
private String comparisonBasicdataTripartiteMall(BasicdataTripartiteMallEntity entity, BasicdataTripartiteMallEntity basicdataTripartiteMall) {
StringBuilder builder = new StringBuilder();
String str1 = entity.getTripartiteCoding().isEmpty() ? "空" : entity.getTripartiteCoding();
String str2 = basicdataTripartiteMall.getTripartiteCoding().isEmpty() ? "空" : basicdataTripartiteMall.getTripartiteCoding();
String oldTripartiteMall = "[名称:" + entity.getTripartiteMall() + ",编码:" + str1 + ",品牌:" + entity.getBrandName() + "]";
String newTripartiteMall = "[名称:" + basicdataTripartiteMall.getTripartiteMall() + ",编码:" + str2 + ",品牌:" + basicdataTripartiteMall.getBrandName() + "]";
builder.append("编辑三方商城-->").append(oldTripartiteMall).append(",变更为").append(newTripartiteMall);
return builder.toString();
}
}

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

@ -300,8 +300,13 @@ public class DistrilbutionBillLadingController extends BladeController {
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入distrilbutionBillLading")
public R updateOwn(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
Boolean st = distrilbutionBillLadingService.updateOwn(ids);
return R.status(st);
try {
R st = distrilbutionBillLadingService.updateOwn(ids);
return st;
} catch (Exception e) {
log.error(">>>>>", e);
}
return R.fail("操作失败");
}
/**

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

@ -145,7 +145,7 @@ public interface IDistrilbutionBillLadingService extends BaseService<Distrilbuti
* @param ids
* @return
*/
Boolean updateOwn(String ids);
R updateOwn(String ids);
/**
* 查询数据

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

@ -1854,7 +1854,7 @@ public class DistributionAsyncServiceImpl implements IDistributionAsyncService {
List<Long> ids = list.stream().map(DistrilbutionBillPackageEntity::getParceListId).collect(Collectors.toList());
//查询包件
List<DistributionParcelListEntity> distributionParcelListEntities = distributionParcelListService.listByIds(ids);
List<Long> packageIds = distributionParcelListEntities.stream().filter(f -> OrderPackageLoadingStatusConstant.yizhuangche.getValue().equals(f.getOrderPackageLoadingStatus()) || !OrderPackageStatusConstant.yiqianshou.getValue().equals(f.getOrderPackageStatus())).map(DistributionParcelListEntity::getId).collect(Collectors.toList());
List<Long> packageIds = distributionParcelListEntities.stream().filter(f -> !OrderPackageLoadingStatusConstant.yizhuangche.getValue().equals(f.getOrderPackageLoadingStatus()) || !OrderPackageStatusConstant.yiqianshou.getValue().equals(f.getOrderPackageStatus())).map(DistributionParcelListEntity::getId).collect(Collectors.toList());
if (Func.isNotEmpty(packageIds)) {
distributionParcelListService.update(new UpdateWrapper<DistributionParcelListEntity>().lambda()
.set(DistributionParcelListEntity::getOrderPackageReservationStatus, OrderPackageReservationStatusConstant.daiyuyue.getValue())

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

@ -779,7 +779,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
info.put("orderPackageCode", parcelListEntity.getOrderPackageCode());
info.put("warehouseId", myCurrentWarehouse.getId());
warehouseUpdownTypeClient.downPackageAndDelTrayAndIsUpdate(parcelListEntity.getOrderPackageCode(), myCurrentWarehouse.getId(), "扫描装车进行下架、解托", false);
warehouseUpdownTypeClient.downPackageOrDelTray(parcelListEntity.getOrderPackageCode(), myCurrentWarehouse.getId(), "扫描装车进行下架、解托");
Map<String, Object> map = new HashMap();
String distrilbutionloadingscanDTOJson = JSONObject.toJSONString(distrilbutionloadingscanDTO);

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

@ -5985,6 +5985,7 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl<Distribution
}
@Override
@Transactional
public R zeroSignfor(DistrilbutionAppsignforDTO distrilbutionloadingscanDTO) {
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
if (Func.isEmpty(myCurrentWarehouse)) {

43
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

@ -3544,15 +3544,15 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
*/
@Override
@Transactional(rollbackFor = Exception.class)
public Boolean updateOwn(String ids) {
public R updateOwn(String ids) {
String[] split = ids.split(",");
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
if (Func.isEmpty(myCurrentWarehouse)) {
return false;
return R.fail(403,"未授权!!!");
}
Set<Long> parcelListIds = new HashSet<>();
try {
for (int i = 0; i < split.length; i++) {
String s = split[i];
//查询是不是上传图片
@ -3560,14 +3560,22 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
.eq(DistributionPrintEntity::getBillLadingId, s)
);
if (list1.isEmpty()) {
throw new ServiceException("请上传签收图片!!");
return R.fail("请上传签收图片!!");
}
int count = (int) list1.stream().filter(ii -> "1".equals(ii.getGenre().toString())).count();
int count1 = (int) list1.stream().filter(ii -> "2".equals(ii.getGenre().toString())).count();
int count2 = (int) list1.stream().filter(ii -> "3".equals(ii.getGenre().toString())).count();
if (count1 < 1 || count < 1 || count2 < 1) {
throw new ServiceException("请上传完整签收图片!!");
return R.fail("请上传完整签收图片!!");
}
List<DistributionBillLadingScanEntity> ladingScanEntities = distributionBillLadingScanService.list(Wrappers.<DistributionBillLadingScanEntity>query().lambda()
.eq(DistributionBillLadingScanEntity::getBillLadingId, Long.parseLong(s))
.eq(DistributionBillLadingScanEntity::getMaterialType, "2")
);
if (ladingScanEntities.isEmpty()){
return R.fail("无签收数据!!");
}
//修改提货状态
DistrilbutionBillLadingEntity billLadingEntity = new DistrilbutionBillLadingEntity();
billLadingEntity.setConditions(BillLadingStatusConstant.yiqianshou.getValue());
@ -3580,12 +3588,15 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
distributionStockupInfoService.maintenanceStockUp(Long.parseLong(s), 2);
//查询自提单是否完成扫描
Integer integer = this.selectBillLadingPlanNum(Long.parseLong(s));
List<DistributionBillLadingScanEntity> ladingScanEntities = distributionBillLadingScanService.list(Wrappers.<DistributionBillLadingScanEntity>query().lambda()
.eq(DistributionBillLadingScanEntity::getBillLadingId, Long.parseLong(s))
.eq(DistributionBillLadingScanEntity::getMaterialType, "2")
);
if (Func.isNotEmpty(ladingScanEntities)) {
int sum = ladingScanEntities.stream().mapToInt(DistributionBillLadingScanEntity::getQuantity).sum();
// if (sum == 0){
// //未进行任何签收扫描的操作这里需要进行拦截
// throw new ServiceException("无签收数据");
//
// }
if (integer != sum) {
//存在资源释放操作
distributionAsyncService.releaseBillLadingResource(Long.parseLong(s), myCurrentWarehouse.getId());
@ -3633,9 +3644,12 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
// 签收发送消息到工厂
pushFactoryOrderData(myCurrentWarehouse.getId(), ladingScanEntity.getParcelListId().toString(), ladingScanEntity.getOrderSelfNumbering());
}
} else {
distributionAsyncService.releaseBillLadingResource(Long.parseLong(s), myCurrentWarehouse.getId());
}
// else {
// //未进行任何签收扫描的操作这里需要进行拦截
//
//// distributionAsyncService.releaseBillLadingResource(Long.parseLong(s), myCurrentWarehouse.getId());
// }
//修改订单状态
List<DistrilbutionBillStockEntity> list = distrilbutionBillStockService.list(Wrappers.<DistrilbutionBillStockEntity>query().lambda()
@ -3677,15 +3691,10 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
// 回传老系统自提数据
sendOldSystem(Long.parseLong(s));
}
} catch (Exception e) {
log.error(">>>>>", e);
return false;
}
// 回传工厂数据
sendFactory(myCurrentWarehouse, parcelListIds);
return true;
return R.success("操作成功");
}
/**

15
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/config/ExecutorConfig.java

@ -1,6 +1,7 @@
package com.logpm.trunkline.config;
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.MDC;
import org.springblade.core.secure.utils.AuthUtil;
@ -55,6 +56,8 @@ public class ExecutorConfig {
public Runnable decorate(@Nonnull Runnable runnable) {
RequestAttributes context = RequestContextHolder.currentRequestAttributes();
String tenantId = AuthUtil.getTenantId();
Map<String, Object> all = ThreadLocalUtil.getAll();
Map<String, String> mdcMap = MDC.getCopyOfContextMap();
return () -> {
@ -64,9 +67,19 @@ public class ExecutorConfig {
MDC.setContextMap(mdcMap);
}
RequestContextHolder.setRequestAttributes(context);
// 未当前的异步线程绑定租户ID 和切换数据源
log.info(">>>> 异步线程创建,绑定租户数据源 {}",tenantId);
if(StringUtils.isBlank(tenantId)){
//这里为null 存在问题
log.info(">>>> 异步线程创建,没有用户信息 {}",AuthUtil.getUserId());
log.info(">>>> 异步线程创建,没有用户信息 {}",AuthUtil.getUser());
log.info(">>>> 异步线程创建,没有用户信息 {}",context);
DynamicDataSourceContextHolder.push("627683");
}else{
// 未当前的异步线程绑定租户ID 和切换数据源
DynamicDataSourceContextHolder.push(tenantId);
}
runnable.run();
} finally {
RequestContextHolder.resetRequestAttributes();

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

@ -1819,6 +1819,9 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
});
List<TrunklineAdvanceDetailEntity> updateMaterialList = new ArrayList<>();
if(CollUtil.isNotEmpty(hasOrderPackageCodeList)){
//把importStandardOuPaiDTOS转化成orderPackageCode为key的Map
Map<String, ImportStandardOuPaiDTO> importStandardOuPaiDTOMap = importStandardOuPaiDTOS.stream().collect(Collectors.toMap(ImportStandardOuPaiDTO::getOrderPackageCode, Function.identity(), (a, b) -> a));
List<TrunklineAdvanceDetailEntity> hasAdvanceDetailList = advanceDetailService.findListByOrderPackageCodeList(hasOrderPackageCodeList);
@ -1841,6 +1844,8 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
advanceDetailService.updateBatchById(updateMaterialList);
}
}
//排除importStandardOuPaiDTOS中orderPackageCode在hasOrderPackageCodeList中存在的元素
importStandardOuPaiDTOS = importStandardOuPaiDTOS.stream().filter(item -> !hasOrderPackageCodeList.contains(item.getOrderPackageCode())).collect(Collectors.toList());
@ -2261,19 +2266,19 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
trunklineWaybillPackageService.updateBatchById(trunklineWaybillPackageEntities);
}
}
if(CollUtil.isNotEmpty(noArriveWarehousePackageCode)){
QueryWrapper<TrunklineWaybillPackageEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.in("order_package_code",noArriveWarehousePackageCode)
.eq("is_deleted",0);
List<TrunklineWaybillPackageEntity> trunklineWaybillPackageEntities = trunklineWaybillPackageService.list(queryWrapper);
if(!trunklineWaybillPackageEntities.isEmpty()){
for (TrunklineWaybillPackageEntity trunklineWaybillPackageEntity : trunklineWaybillPackageEntities) {
trunklineWaybillPackageEntity.setPackageStatus(WorkNodeEnums.INITIAL_WAREHOUSE_DEPART.getCode());
}
trunklineWaybillPackageService.updateBatchById(trunklineWaybillPackageEntities);
}
}
trunklineWaybillPackageService.updateWaybillStatus(waybillEntity);
// if(CollUtil.isNotEmpty(noArriveWarehousePackageCode)){
// QueryWrapper<TrunklineWaybillPackageEntity> queryWrapper = new QueryWrapper<>();
// queryWrapper.in("order_package_code",noArriveWarehousePackageCode)
// .eq("is_deleted",0);
// List<TrunklineWaybillPackageEntity> trunklineWaybillPackageEntities = trunklineWaybillPackageService.list(queryWrapper);
// if(!trunklineWaybillPackageEntities.isEmpty()){
// for (TrunklineWaybillPackageEntity trunklineWaybillPackageEntity : trunklineWaybillPackageEntities) {
// trunklineWaybillPackageEntity.setPackageStatus(WorkNodeEnums.INITIAL_WAREHOUSE_DEPART.getCode());
// }
// trunklineWaybillPackageService.updateBatchById(trunklineWaybillPackageEntities);
// }
// }
// trunklineWaybillPackageService.updateWaybillStatus(waybillEntity);
}
openOrderAsyncService.sendUpdateWaybillFanout(waybillEntity,wayBillDetailList,advanceIds,oldConsignee);
return R.success("改单成功");

2
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineBillladingServiceImpl.java

@ -286,7 +286,7 @@ public class TrunklineBillladingServiceImpl extends BaseServiceImpl<TrunklineBil
BeanUtil.copy(billladingWaybillVO,billladingWaybillEntity);
billladingWaybillEntity.setBillladingId(billladingId);
billladingWaybillEntity.setBilladingCode(billladingCode);
billladingWaybillEntity.setRealNum(0);
billladingWaybillEntity.setRealNum(planNum);
billladingWaybillEntity.setRealWeight(BigDecimal.ZERO);
billladingWaybillEntity.setRealVolume(BigDecimal.ZERO);
billladingWaybillEntity.setBillladingFee(BigDecimal.ZERO);

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

@ -1127,9 +1127,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
//卸车数大于实际装车数
throw new CustomerException(405,"零担订单"+orderCode+"卸车件数已大于实际装车件数,请去调整补录");
}else {
if(unloadNum < realNum){
distributionStockArticleClient.addHandQuantity(stockArticleEntity.getId(),realNum-unloadNum);
}
// if(unloadNum < realNum){
// distributionStockArticleClient.addHandQuantity(stockArticleEntity.getId(),realNum-unloadNum);
// }
DistributionStockArticleEntity newStockArticleEntity = distributionStockArticleClient.findStockArticleByOrderCodeAndWarehouseId(orderCode, warehouseId);
if (Objects.isNull(newStockArticleEntity)) {
@ -4554,7 +4554,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
// carsLoadAsyncService.dealwithAfterAbnormalPackage(e.getOrderPackageCode(), warehouseId, warehouseName, carsLoadEntity.getCarsNo(), userId, deptId, nickName);
});
String content = "包件在 " + warehouseName + "卸车卸车方式:" + IncomingTypeEnum.getValue(incomingType);
String content = "包件在 " + warehouseName + "卸车,车次号:"+carsNo+",卸车方式:" + IncomingTypeEnum.getValue(incomingType);
List<WarehousePackageTrackLogEntity> list = new ArrayList<>();
orderPackageCodes.forEach(orderPackageCode -> {

4
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineWaybillPackageServiceImpl.java

@ -188,10 +188,10 @@ public class TrunklineWaybillPackageServiceImpl extends BaseServiceImpl<Trunklin
}
Integer packageStatus = null;
if(WorkNodeEnums.INITIAL_WAREHOUSE_DEPART.getCode().equals(workNode)){
if(WorkNodeEnums.INITIAL_WAREHOUSE_LOADING.getCode().equals(workNode)){
//始发仓发车
packageStatus = 20;
}else if (WorkNodeEnums.CANCEL_INITIAL_WAREHOUSE_DEPART.getCode().equals(workNode)){
}else if (WorkNodeEnums.CANCEL_INITIAL_WAREHOUSE_LOADING.getCode().equals(workNode)){
packageStatus = 10;
}else if (WorkNodeEnums.END_WAREHOUSE_UNLOADING.getCode().equals(workNode)){
packageStatus = 30;

2
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseUpdownGoodsMapper.java

@ -138,6 +138,8 @@ public interface WarehouseUpdownGoodsMapper extends BaseMapper<WarehouseUpdownGo
void deleteByUpdownGoodsIds(@Param("updownGoodsIds") List<Long> updownGoodsIds);
Integer findNumByUpdownTypeId(@Param("updownTypeId") Long updownTypeId);
// /**
// * 根据货位查询货物
// *

7
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/mapper/WarehouseUpdownGoodsMapper.xml

@ -555,4 +555,11 @@
</foreach>
</delete>
<select id="findNumByUpdownTypeId" >
select IFNULL(sum(num),0)
from logpm_warehouse_updown_goods
where updown_type_id = #{updownTypeId}
</select>
</mapper>

3
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseTaryAllocationService.java

@ -4,8 +4,6 @@ import com.logpm.basicdata.entity.BasicdataTrayEntity;
import com.logpm.warehouse.entity.WarehouseTaryAllocationEntity;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
public interface IWarehouseTaryAllocationService extends BaseService<WarehouseTaryAllocationEntity> {
BasicdataTrayEntity getTrayByAllocation(String targetAllocation);
@ -18,4 +16,5 @@ public interface IWarehouseTaryAllocationService extends BaseService<WarehouseTa
void deleteByTrayIdAndAllocationId(Long trayId, Long allocationId);
WarehouseTaryAllocationEntity findEntityByAllocationId(Long allocationId);
}

2
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/IWarehouseUpdownGoodsService.java

@ -158,4 +158,6 @@ public interface IWarehouseUpdownGoodsService extends BaseService<WarehouseUpdow
List<String> getAllocationsByWarehouseIdAndMarketIdAndSku(Long mallId, String sku, Long warehouseId);
List<String> findOrderPackageCodesByOrderPackageCodeList(List<String> orderPackageCodeList, Long warehouseId);
Integer findNumByUpdownTypeId(Long updownTypeId);
}

8
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTaryAllocationServiceImpl.java

@ -49,4 +49,12 @@ public class WarehouseTaryAllocationServiceImpl extends BaseServiceImpl<Warehous
baseMapper.deleteByTrayIdAndAllocationId(trayId,allocationId);
}
@Override
public WarehouseTaryAllocationEntity findEntityByAllocationId(Long allocationId) {
QueryWrapper<WarehouseTaryAllocationEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("allocation_id",allocationId)
.eq("is_deleted",0);
return baseMapper.selectOne(queryWrapper);
}
}

5
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownGoodsServiceImpl.java

@ -347,4 +347,9 @@ public class WarehouseUpdownGoodsServiceImpl extends BaseServiceImpl<WarehouseUp
return baseMapper.findOrderPackageCodesByOrderPackageCodeList(orderPackageCodeList,warehouseId);
}
@Override
public Integer findNumByUpdownTypeId(Long updownTypeId) {
return baseMapper.findNumByUpdownTypeId(updownTypeId);
}
}

134
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java

@ -1727,6 +1727,26 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
log.warn("###########downPackage: 发送下架广播失败");
}
try{
updownTypeList.forEach(updownTypeEntity -> {
Long updownTypeId = updownTypeEntity.getId();
Integer reNum = warehouseUpdownGoodsService.findNumByUpdownTypeId(updownTypeId);
if(reNum == 0){
removeById(updownTypeId);
Long allocationId = updownTypeEntity.getAllocationId();
WarehouseTaryAllocationEntity taryAllocationEntity = warehouseTaryAllocationService.findEntityByAllocationId(allocationId);
if(!Objects.isNull(taryAllocationEntity)){
//修改库位状态为空闲
basicdataGoodsAllocationClient.updateAllocationStatus(allocationId, "1");
warehouseTaryAllocationService.deleteById(taryAllocationEntity);
}
}
});
}catch (Exception e){
log.warn("###########downPackage: 补充下架失败");
}
return Resp.scanSuccess("下架成功", "成功下架" + num + "件");
}
@ -1875,6 +1895,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
@Override
public R downDeliveryPackage(List<UpShelfPackageDTO> upShelfPackageList, Long warehouseId) {
int num = 0;
List<WarehouseUpdownTypeEntity> updownTypeList = new ArrayList<>();
for (UpShelfPackageDTO upShelfPackageDTO : upShelfPackageList) {
String orderPackageCode = upShelfPackageDTO.getOrderPackageCode();
//查询包件在哪个库位上
@ -1893,6 +1914,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
Long updownGoodsId = updownGoodsEntity.getId();
Long updownTypeId = updownGoodsEntity.getUpdownTypeId();
WarehouseUpdownTypeEntity updownTypeEntity = baseMapper.selectById(updownTypeId);
updownTypeList.add(updownTypeEntity);
if (Func.isNotEmpty(updownTypeEntity)) {
QueryWrapper<WarehouseTaryAllocationEntity> taryAllocationEntityQueryWrapper = new QueryWrapper<>();
taryAllocationEntityQueryWrapper.eq("allocation_id", allocationId)
@ -1944,6 +1966,27 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
}
}
try{
updownTypeList.forEach(updownTypeEntity -> {
Long updownTypeId = updownTypeEntity.getId();
Integer reNum = warehouseUpdownGoodsService.findNumByUpdownTypeId(updownTypeId);
if(reNum == 0){
removeById(updownTypeId);
Long allocationId = updownTypeEntity.getAllocationId();
WarehouseTaryAllocationEntity taryAllocationEntity = warehouseTaryAllocationService.findEntityByAllocationId(allocationId);
if(!Objects.isNull(taryAllocationEntity)){
//修改库位状态为空闲
basicdataGoodsAllocationClient.updateAllocationStatus(allocationId, "1");
warehouseTaryAllocationService.deleteById(taryAllocationEntity);
}
}
});
}catch (Exception e){
log.warn("###########downPackage: 补充下架失败");
}
return Resp.scanSuccess("下架成功", "成功下架" + num + "件");
}
@ -1960,6 +2003,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
Set<String> orderSet = new TreeSet<>();
List<String> orderPackageCodes = new ArrayList<>();
List<WarehouseUpdownTypeEntity> updownTypeList = new ArrayList<>();
for (UpShelfPackageDTO upShelfPackageDTO : upShelfPackageList) {
String orderPackageCode = upShelfPackageDTO.getOrderPackageCode();
//查询包件在哪个库位上
@ -1989,6 +2033,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
Long updownGoodsId = updownGoodsEntity.getId();
Long updownTypeId = updownGoodsEntity.getUpdownTypeId();
WarehouseUpdownTypeEntity updownTypeEntity = baseMapper.selectById(updownTypeId);
updownTypeList.add(updownTypeEntity);
QueryWrapper<WarehouseTaryAllocationEntity> taryAllocationEntityQueryWrapper = new QueryWrapper<>();
taryAllocationEntityQueryWrapper.eq("allocation_id", allocationId)
.eq("is_deleted", 0);
@ -2069,6 +2114,27 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
log.warn("###########downPackageOrDelTray: 发送下架广播失败");
}
try{
updownTypeList.forEach(updownTypeEntity -> {
Long updownTypeId = updownTypeEntity.getId();
Integer reNum = warehouseUpdownGoodsService.findNumByUpdownTypeId(updownTypeId);
if(reNum == 0){
removeById(updownTypeId);
Long allocationId = updownTypeEntity.getAllocationId();
WarehouseTaryAllocationEntity taryAllocationEntity = warehouseTaryAllocationService.findEntityByAllocationId(allocationId);
if(!Objects.isNull(taryAllocationEntity)){
//修改库位状态为空闲
basicdataGoodsAllocationClient.updateAllocationStatus(allocationId, "1");
warehouseTaryAllocationService.deleteById(taryAllocationEntity);
}
}
});
}catch (Exception e){
log.warn("###########downPackage: 补充下架失败");
}
return Resp.scanSuccess("下架成功", "成功下架" + num + "件");
}
@ -2089,7 +2155,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
orderPackageDTO.setStrings(barcodeList);
List<DistributionParcelListEntity> parcelListEntitys = distributionParcelListClient.findByPacketBarCodesAndWarehouseId(orderPackageDTO);
List<WarehouseUpdownTypeEntity> updownTypeList = new ArrayList<>();
for (UpShelfPackageDTO upShelfPackageDTO : upShelfPackageList) {
String orderPackageCode = upShelfPackageDTO.getOrderPackageCode();
//查询包件在哪个库位上
@ -2128,6 +2194,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
Long updownGoodsId = updownGoodsEntity.getId();
Long updownTypeId = updownGoodsEntity.getUpdownTypeId();
WarehouseUpdownTypeEntity updownTypeEntity = baseMapper.selectById(updownTypeId);
updownTypeList.add(updownTypeEntity);
QueryWrapper<WarehouseTaryAllocationEntity> taryAllocationEntityQueryWrapper = new QueryWrapper<>();
taryAllocationEntityQueryWrapper.eq("allocation_id", allocationId)
.eq("is_deleted", 0);
@ -2186,10 +2253,27 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
}
}
}
}
try{
updownTypeList.forEach(updownTypeEntity -> {
Long updownTypeId = updownTypeEntity.getId();
Integer reNum = warehouseUpdownGoodsService.findNumByUpdownTypeId(updownTypeId);
if(reNum == 0){
removeById(updownTypeId);
Long allocationId = updownTypeEntity.getAllocationId();
WarehouseTaryAllocationEntity taryAllocationEntity = warehouseTaryAllocationService.findEntityByAllocationId(allocationId);
if(!Objects.isNull(taryAllocationEntity)){
//修改库位状态为空闲
basicdataGoodsAllocationClient.updateAllocationStatus(allocationId, "1");
warehouseTaryAllocationService.deleteById(taryAllocationEntity);
}
}
});
}catch (Exception e){
log.warn("###########downPackage: 补充下架失败");
}
return Resp.scanSuccess("下架成功", "成功下架" + num + "件");
}
@ -2198,6 +2282,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
public R downZeroOrder(List<UpShelfZeroOrderDTO> upShelfPackageList, Long warehouseId, String remark) {
StringBuffer stringBuffer = new StringBuffer("下架零担订单成功");
boolean b = false;
List<WarehouseUpdownTypeEntity> updownTypeList = new ArrayList<>();
Integer allNum = 0;
for (UpShelfZeroOrderDTO upShelfZeroOrderDTO : upShelfPackageList) {
List<WarehouseUpdownGoodsEntity> updownGoodsList = new ArrayList<>();
@ -2228,6 +2313,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
Long updownGoodsId = updownGoodsEntity.getId();
Long updownTypeId = updownGoodsEntity.getUpdownTypeId();
WarehouseUpdownTypeEntity updownTypeEntity = baseMapper.selectById(updownTypeId);
updownTypeList.add(updownTypeEntity);
updownGoodsList.add(updownGoodsEntity);
if (enterNum.equals(num)) {
if (!Objects.isNull(trayEntity)) {
@ -2288,6 +2374,26 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
//更新货位缓存
warehouseGoodsAllocationClient.updateAllocationCache(allocationId.toString());
}
try{
updownTypeList.forEach(updownTypeEntity -> {
Long updownTypeId = updownTypeEntity.getId();
Integer reNum = warehouseUpdownGoodsService.findNumByUpdownTypeId(updownTypeId);
if(reNum == 0){
removeById(updownTypeId);
Long allocationId = updownTypeEntity.getAllocationId();
WarehouseTaryAllocationEntity taryAllocationEntity = warehouseTaryAllocationService.findEntityByAllocationId(allocationId);
if(!Objects.isNull(taryAllocationEntity)){
//修改库位状态为空闲
basicdataGoodsAllocationClient.updateAllocationStatus(allocationId, "1");
warehouseTaryAllocationService.deleteById(taryAllocationEntity);
}
}
});
}catch (Exception e){
log.warn("###########downPackage: 补充下架失败");
}
if (b) {
stringBuffer.append("超出输入数量,或输入数量为0,请输入正确数量再进行操作");
}
@ -2321,6 +2427,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
public R downStock(List<UpShelfStockDTO> upShelfStockList, Long warehouseId, String remark) {
StringBuffer stringBuffer = new StringBuffer("下架库存品成功");
boolean b = false;
List<WarehouseUpdownTypeEntity> updownTypeList = new ArrayList<>();
Integer allNum = 0;
for (UpShelfStockDTO upShelfStockDTO : upShelfStockList) {
List<WarehouseUpdownGoodsEntity> updownGoodsList = new ArrayList<>();
@ -2356,7 +2463,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
Long updownGoodsId = updownGoodsEntity.getId();
Long updownTypeId = updownGoodsEntity.getUpdownTypeId();
WarehouseUpdownTypeEntity updownTypeEntity = baseMapper.selectById(updownTypeId);
updownTypeList.add(updownTypeEntity);
updownGoodsList.add(updownGoodsEntity);
if (enterNum.equals(num)) {
if (!Objects.isNull(trayEntity)) {
@ -2442,6 +2549,27 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
updateUpdownTypeNum(updownTypeEntity);
allNum = allNum + enterNum;
}
try{
updownTypeList.forEach(updownTypeEntity -> {
Long updownTypeId = updownTypeEntity.getId();
Integer reNum = warehouseUpdownGoodsService.findNumByUpdownTypeId(updownTypeId);
if(reNum == 0){
removeById(updownTypeId);
Long allocationId = updownTypeEntity.getAllocationId();
WarehouseTaryAllocationEntity taryAllocationEntity = warehouseTaryAllocationService.findEntityByAllocationId(allocationId);
if(!Objects.isNull(taryAllocationEntity)){
//修改库位状态为空闲
basicdataGoodsAllocationClient.updateAllocationStatus(allocationId, "1");
warehouseTaryAllocationService.deleteById(taryAllocationEntity);
}
}
});
}catch (Exception e){
log.warn("###########downPackage: 补充下架失败");
}
if (b) {
stringBuffer.append("超出输入数量,或输入数量为0,请输入正确数量再进行操作");
}

Loading…
Cancel
Save