Browse Source

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

# Conflicts:
#	blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataWarehouseClient.java
training
pref_mail@163.com 1 year ago
parent
commit
14fbac4d88
  1. 8
      blade-biz-common/src/main/java/org/springblade/common/constant/stockup/StockupTypeConstant.java
  2. 29
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataWarehouseClient.java
  3. 6
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryTripartiteEntity.java
  4. 4
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java
  5. 26
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataWarehouseClient.java
  6. 5
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataWarehouseService.java
  7. 5
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java
  8. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionDeliveryListController.java
  9. 13
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java
  10. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockArticleController.java
  11. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionDeliveryAllocationDTO.java
  12. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.java
  13. 15
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
  14. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  15. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.java
  16. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml
  17. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionReservationService.java
  18. 23
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  19. 77
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionReservationServiceImpl.java
  20. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java

8
blade-biz-common/src/main/java/org/springblade/common/constant/stockup/StockupTypeConstant.java

@ -1,19 +1,21 @@
package org.springblade.common.constant.stockup;
/**
* 备货任务类型
* 备货任务指派状态枚举
* 对应码表
* stock_assign_status
* stockup_status
* @author pref
*/
public enum StockupTypeConstant {
shipei("市配","1"),
shangpei("商配","2"),
shangpei("商配","1"),
shipei("市配","2"),
ziti("自提","3");
/**
* 状态
*/

29
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataWarehouseClient.java

@ -18,6 +18,7 @@ package com.logpm.basicdata.feign;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.vo.BasicdataWarehouseVO;
import org.springblade.common.constant.ModuleNameConstant;
import org.springblade.core.mp.support.BladePage;
import org.springframework.cloud.openfeign.FeignClient;
@ -26,6 +27,8 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
/**
* 仓库 Feign接口类
*
@ -72,9 +75,35 @@ public interface IBasicdataWarehouseClient {
@GetMapping(API_PREFIX+"/getWarehouseEntityByWarehouseCode")
BasicdataWarehouseEntity getWarehouseEntityByWarehouseCode(@RequestParam String warehouseCode);
@GetMapping(API_PREFIX+"/getWarehouseByDepartment")
BasicdataWarehouseEntity getWarehouseByDepartment(@RequestParam String deptId);
/**
* 查询当前登录人仓库信息
* @return
*/
@GetMapping(API_PREFIX+"/getMyWarehouseList")
List<BasicdataWarehouseVO> getMyWarehouseList();
/**
* 将当前登录人选择仓库存至缓存
*/
@PostMapping(API_PREFIX+"/preserveCurrentWarehouse")
BasicdataWarehouseEntity preserveCurrentWarehouse(@RequestBody BasicdataWarehouseEntity warehouseEntity);
/**
* 根据当前用户查询缓存中仓库信息
* @return
*/
@GetMapping(API_PREFIX+"/getMyCurrentWarehouse")
Object getMyCurrentWarehouse();
@GetMapping(API_PREFIX+"/getEntityWarehouseId")
BasicdataWarehouseEntity getEntityWarehouseId(@RequestParam("warehouseId") Long warehouseId);
}

6
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/entity/DistributionDeliveryTripartiteEntity.java

@ -62,6 +62,12 @@ public class DistributionDeliveryTripartiteEntity extends TenantEntity {
*/
@ApiModelProperty(value = "预约信息编号")
private String reservationIds;
/**
* 预约信息编号
*/
@ApiModelProperty(value = "预约信息编号")
private String company;
/**
* 预留1
*/

4
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataWarehouseController.java

@ -250,8 +250,8 @@ BasicdataWarehouseController extends BladeController {
@ApiOperationSupport(order = 3)
@ApiOperation(value = "分页", notes = "传入BasicdataGoodsShelf")
public R<?> preserveCurrentWarehouse(@RequestBody BasicdataWarehouseDTO warehouseDTO) {
warehouseService.preserveCurrentMyWarehouse(warehouseDTO);
return null;
R<?> r = warehouseService.preserveCurrentMyWarehouse(warehouseDTO);
return r;
}

26
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataWarehouseClient.java

@ -20,13 +20,17 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.basicdata.dto.BasicdataWarehouseDTO;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.service.IBasicdataWarehouseService;
import com.logpm.basicdata.vo.BasicdataWarehouseVO;
import lombok.AllArgsConstructor;
import org.springblade.core.mp.support.BladePage;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
@ -110,6 +114,28 @@ public class BasicdataWarehouseClient implements IBasicdataWarehouseClient {
}
}
@GetMapping(API_PREFIX+"/getMyWarehouseList")
@Override
public List<BasicdataWarehouseVO> getMyWarehouseList() {
List<BasicdataWarehouseVO> myWarehouseList = warehouseWarehouseService.getMyWarehouseList();
return myWarehouseList;
}
@PostMapping(API_PREFIX+"/preserveCurrentWarehouse")
@Override
public BasicdataWarehouseEntity preserveCurrentWarehouse(BasicdataWarehouseEntity warehouseEntity) {
warehouseWarehouseService.preserveCurrentMyWarehouse( warehouseEntity);
return null;
}
@GetMapping(API_PREFIX+"/getMyCurrentWarehouse")
@Override
public Object getMyCurrentWarehouse() {
Object myCurrentWarehouse = warehouseWarehouseService.getMyCurrentWarehouse();
return myCurrentWarehouse;
}
@Override
public BasicdataWarehouseEntity getWarehouseByDepartment(String deptId) {
QueryWrapper<BasicdataWarehouseEntity> queryWrapper = new QueryWrapper<>();

5
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataWarehouseService.java

@ -26,6 +26,7 @@ import com.logpm.basicdata.excel.BasicdataWarehouseExcel;
import com.logpm.basicdata.vo.BasicdataGoodsShelfVO;
import com.logpm.basicdata.vo.BasicdataWarehouseVO;
import org.springblade.core.mp.base.BaseService;
import org.springblade.core.tool.api.R;
import java.util.List;
import java.util.Map;
@ -98,9 +99,9 @@ public interface IBasicdataWarehouseService extends BaseService<BasicdataWarehou
/**
* 保存当前用户选择的仓库至Redis缓存中
* @param warehouseDTO
* @param warehouseEntity
*/
void preserveCurrentMyWarehouse(BasicdataWarehouseDTO warehouseDTO);
R<?> preserveCurrentMyWarehouse(BasicdataWarehouseEntity warehouseEntity);
/**
* 根据当前登录用户查询Redis缓存中选择的仓库信息

5
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java

@ -183,12 +183,13 @@ public class BasicdataWarehouseServiceImpl extends BaseServiceImpl<BasicdataWare
@Override
public void preserveCurrentMyWarehouse(BasicdataWarehouseDTO warehouseDTO) {
public R<?> preserveCurrentMyWarehouse(BasicdataWarehouseEntity warehouseEntity) {
// 2、存放用户选择的仓库id
// key 租户Id + 用户id
BladeUser user = AuthUtil.getUser();
String str = user.getTenantId() +"--"+ user.getUserId();
redis.set(str,warehouseDTO);
redis.set(str,warehouseEntity);
return R.status(true);
}

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

@ -316,8 +316,6 @@ public class DistributionDeliveryListController extends BladeController {
List<DistributionStockArticleVO> atlasInfo= distributionDeliveryListService.getStockArticleAtlasInfo(id);
return R.data(atlasInfo);
}
/**
* 修改市配配送计划
*/

13
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java

@ -26,6 +26,7 @@ import com.logpm.distribution.entity.DistributionReservationEntity;
import com.logpm.distribution.excel.DistributionReservationExcel;
import com.logpm.distribution.service.IDistributionReservationService;
import com.logpm.distribution.vo.DistributionReservationVO;
import com.logpm.distribution.vo.DistributionStockArticleVO;
import com.logpm.distribution.wrapper.DistributionReservationWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -289,4 +290,16 @@ public class DistributionReservationController extends BladeController {
R<?> reservationPackage = reservationService.getReservationStockListInfo(reservationId);
return reservationPackage;
}
/**
* 预约列表 详情
*/
@GetMapping("/selectUpdateAvailableStockArticle")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入distrbutionReservation")
public R<?> selectUpdateAvailableStockArticle(@RequestParam Long id) {
List<DistributionStockArticleVO> stockArticleVOS = reservationService.selectUpdateAvailableStockArticle(id);
return R.data(stockArticleVOS);
}
}

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

@ -114,6 +114,7 @@ public class DistributionStockArticleController extends BladeController {
} /**
* 配送在库订单 分页
*/
@GetMapping("/selectStockArticleInfoList")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入distributionStockArticle")
@ -127,6 +128,7 @@ public class DistributionStockArticleController extends BladeController {
distributionStockArticle.remove("startDate");
distributionStockArticle.remove("entDate");
QueryWrapper<DistributionStockArticleEntity> queryWrapper = Condition.getQueryWrapper(distributionStockArticle, DistributionStockArticleEntity.class);
queryWrapper.ne("reservation_status","30");
if(Func.isNotEmpty(o)){
queryWrapper.in("order_self_numbering",String.valueOf(o).split(","));
}

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

@ -80,7 +80,7 @@ public class DistributionDeliveryAllocationDTO {
* 任务时间
*/
@ApiModelProperty(value = "任务时间")
private Date taskTime;
private String taskTime;
}

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

@ -277,4 +277,11 @@ public interface DistributionDeliveryListMapper extends BaseMapper<DistributionD
* @return
*/
List<DistributionReservationEntity> selectReservationByDeliveryListId(@Param("deliveryListId")Long id);
/**
*
* @param id
* @return
*/
List<DistributionStockArticleEntity> getDeliveryDisuccStockArticleInfo(Long id);
}

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

@ -1093,5 +1093,20 @@
</if>
</where>
</select>
<select id="getDeliveryDisuccStockArticleInfo" resultType="com.logpm.distribution.entity.DistributionStockArticleEntity">
SELECT
ldsa.*
FROM
logpm_distribution_delivery_list AS lddl
INNER JOIN logpm_distribution_signfor AS lds ON lddl.id = lds.delivery_id
INNER JOIN logpm_distribution_reservation_stockarticle AS ldrs ON lds.reservation_id = ldrs.reservation_id
INNER JOIN logpm_distribution_stock_article AS ldsa ON ldsa.id = ldrs.stock_article_id
<where>
ldrs.stock_article_status != 2
<if test="id!= '' and id!=null">
and lddl.id = #{id}
</if>
</where>
</select>
</mapper>

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

@ -244,10 +244,6 @@
SELECT DISTINCT
ldr.tenant_id,
ldr.is_deleted,
ldr.mall_id,
ldr.mall_name,
ldr.store_id,
ldr.store_name,
ldr.serve_type,
ldr.delivery_way,
ldr.delivery_type,

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

@ -76,7 +76,7 @@ public interface DistributionStockArticleMapper extends BaseMapper<DistributionS
* @param id
* @return
*/
List<DistributionStockArticleVO> getStockArticleByReservationId(Long id);
List<DistributionStockArticleEntity> getStockArticleByReservationId(Long id);
/**
* 查询二维码包件数据

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

@ -194,7 +194,7 @@
</select>
<select id="getStockArticleByReservationId"
resultType="com.logpm.distribution.vo.DistributionStockArticleVO">
resultType="com.logpm.distribution.entity.DistributionStockArticleEntity">
SELECT
ldsa.tenant_id,
ldsa.id,
@ -273,6 +273,7 @@
logpm_distribution_reservation_stockarticle AS ldrs
INNER JOIN logpm_distribution_stock_article AS ldsa ON ldrs.stock_article_id = ldsa.id
<where>
ldrs.stock_article_status != 2
<if test="reservationId != '' and reservationId != null">
and ldrs.reservation_id = #{reservationId}
</if>

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

@ -23,6 +23,7 @@ import com.logpm.distribution.dto.DistributionReservationDTO;
import com.logpm.distribution.entity.DistributionReservationEntity;
import com.logpm.distribution.excel.DistributionReservationExcel;
import com.logpm.distribution.vo.DistributionReservationVO;
import com.logpm.distribution.vo.DistributionStockArticleVO;
import com.logpm.distribution.vo.DistributionStockupOrderListVO;
import com.logpm.distribution.vo.DistributionStockupStockListVO;
import org.springblade.core.mp.base.BaseService;
@ -166,4 +167,10 @@ public interface IDistributionReservationService extends BaseService<Distributio
*/
R<?> getReservationStockListInfo(Long reservationId);
/**
* 查询出预约可进行编辑的订单列表
* @param reservationId
* @return
*/
List<DistributionStockArticleVO> selectUpdateAvailableStockArticle(Long reservationId);
}

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

@ -38,6 +38,7 @@ import com.logpm.distribution.vo.app.*;
import com.logpm.distribution.wrapper.DistributionDeliveryListWrapper;
import com.logpm.distribution.wrapper.DistributionParcelListWrapper;
import com.logpm.distribution.wrapper.DistributionReservationWrapper;
import com.logpm.distribution.wrapper.DistributionStockArticleWrapper;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.apache.commons.lang.StringUtils;
@ -1200,7 +1201,10 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
DistributionReservationVO reservationVOS = distributionReservationMapper.getReservationInfo(id);
deliveryListVO.setReservationInfo(reservationVOS);
//1、查询出订单信息
List<DistributionStockArticleVO> stockArticleVOS = distributionDeliveryListMapper.getDeliveryStockArticleInfo(id);
// List<DistributionStockArticleVO> stockArticleVOS = distributionDeliveryListMapper.getDeliveryStockArticleInfo(id);
List<DistributionStockArticleEntity> stockArticleVOS = distributionDeliveryListMapper.getDeliveryDisuccStockArticleInfo(id);
List<DistributionStockArticleVO> stockArticleVOList = new ArrayList<>();
stockArticleVOS.forEach(s -> {
//这里查询出订单选取的包件信息
DistributionReservationPackageDTO reservationPackageDTO = new DistributionReservationPackageDTO();
@ -1211,11 +1215,12 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//查询出订单的所有包件信息
List<DistributionParcelListEntity> parcelListEntityList = distributionParcelListService.getBaseMapper().selectList(Wrappers.<DistributionParcelListEntity>query().lambda().eq(DistributionParcelListEntity::getStockArticleId, s.getId()));
List<DistributionParcelListVO> parcelListVOS = DistributionParcelListWrapper.build().listVO(parcelListEntityList);
s.setPackageList(distributionParcelListVOS);
s.setParcelListVOS(parcelListVOS);
DistributionStockArticleVO entityVO = DistributionStockArticleWrapper.build().entityVO(s);
entityVO.setPackageList(distributionParcelListVOS);
entityVO.setParcelListVOS(parcelListVOS);
stockArticleVOList.add(entityVO);
});
deliveryListVO.setStockArticleList(stockArticleVOS);
deliveryListVO.setStockArticleList(stockArticleVOList);
//2、查询出备货信息
DistributionStockupVO stockupEntity = distributionStockupMapper.getDeliveryStockupInfo(id);
deliveryListVO.setStockupInfo(stockupEntity);
@ -1273,9 +1278,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//查询出配送任务的基本信息
DistributionDeliveryListEntity deliveryListEntity = this.getById(deliveryListDTO.getId());
Long deliveryListEntityId = deliveryListEntity.getId();
if (deliveryListEntity.getDeliveryStatus().equals(DeliveryStatusConstant.peisongzhong.getValue())) {
return R.fail("正在配送中...");
}
// if (deliveryListEntity.getDeliveryStatus().equals(DeliveryStatusConstant.peisongzhong.getValue())) {
// return R.fail("正在配送中...");
// }
if (deliveryListEntity.getDeliveryStatus().equals(DeliveryStatusConstant.yiwancheng.getValue())) {
return R.fail("配送已完成...");
}
@ -1299,6 +1304,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
//前端进行校验这个备货任务是否发生改变,没有发生改变则不需要传递此参数
if (!Func.isEmpty(stockupInfo)) {
if (Func.isNotEmpty(stockupInfo.getForkliftName())) {
deliveryStockupInfo.setForkliftId(stockupInfo.getForkliftId());
deliveryStockupInfo.setForkliftName(stockupInfo.getForkliftName());
deliveryStockupInfo.setAssignStatusName(StockAssignStatusConstant.weizhipai.getValue());
deliveryStockupInfo.setStockupStatus(StockupStatusConstant.weibeihuo.getValue());
//不存在备货人员,此时该任务的状态处于未指派、待分配的状态

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

@ -35,6 +35,7 @@ import com.logpm.distribution.wrapper.DistributionParcelListWrapper;
import com.logpm.distribution.wrapper.DistributionReservationWrapper;
import com.logpm.distribution.wrapper.DistributionStockArticleWrapper;
import com.logpm.distribution.wrapper.DistributionStockListWrapper;
import lombok.AllArgsConstructor;
import org.springblade.common.constant.DistributionTypeConstant;
import org.springblade.common.constant.delivery.DeliveryStatusConstant;
import org.springblade.common.constant.order.OrderReservationStatusConstant;
@ -45,6 +46,7 @@ import org.springblade.common.constant.reservation.*;
import org.springblade.common.constant.signing.SignforStatusConstant;
import org.springblade.common.constant.stockup.StockAssignStatusConstant;
import org.springblade.common.constant.stockup.StockupStatusConstant;
import org.springblade.common.constant.stockup.StockupTypeConstant;
import org.springblade.common.serviceConstant.ServiceConstant;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.mp.support.Condition;
@ -69,6 +71,7 @@ import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* 预约列表 服务实现类
@ -494,6 +497,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
//构建中间表信息
DistributionStockupInfoEntity reservationStockupEntity = new DistributionStockupInfoEntity();
reservationStockupEntity.setStockupId(id);
reservationStockupEntity.setStockUpType(StockupTypeConstant.shangpei.getValue());
reservationStockupEntity.setReservationId(reservationEntity.getId());
result = distributionStockupInfoService.save(reservationStockupEntity);
if (!result) {
@ -626,6 +630,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
if (Func.equals(reservationEntity.getStockupStatus(), ReservationStockupStatusConstant.weibeihuo.getValue())) {
//如果预约已经备货
DistributionStockupInfoEntity stockupInfoEntity = new DistributionStockupInfoEntity();
stockupInfoEntity.setStockUpType(StockupTypeConstant.shipei.getValue());
stockupInfoEntity.setReservationId(ids.get(i));
stockupInfoEntity.setStockupId(distributionStockupEntity.getId());
distributionStockupInfoService.save(stockupInfoEntity);
@ -764,8 +769,18 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
distributionDeliveryListEntity.setOrderNumber(orderNum.get());
distributionDeliveryListEntity.setType(DistributionTypeConstant.shipie.getValue());
distributionDeliveryListEntity.setOrderCode(String.join(",", hashSet));
distributionDeliveryListEntity.setTaskTime(allocationDTO.getTaskTime());
// distributionDeliveryListEntity.setTaskTime(allocationDTO.getTaskTime());
distributionDeliveryListEntity.setNoteNumber(Func.random(13, RandomType.INT));
String taskTime = allocationDTO.getTaskTime();
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date parse = null;
try {
parse = format.parse(taskTime);
} catch (ParseException e) {
e.printStackTrace();
}
distributionDeliveryListEntity.setTaskTime(parse);
distributionDeliveryListEntity.setNoteNumber(Func.random(13,RandomType.INT));
// if (orderIds.length() > 1) {
// distributionDeliveryListEntity.setOrderId(orderIds.deleteCharAt(orderIds.length() - 1).toString());
// }
@ -790,8 +805,9 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
List<DistributionReservationStocklistEntity> reservationStocklistEntityList = distributionReservationStocklistService.getBaseMapper().selectList(w);
//根据预约单信息查询订单信息
List<DistributionStockArticleVO> distrinbutionStockArticleVOS = distributionStockArticleMapper.getStockArticleByReservationId(reservationEntity.getId());
distrinbutionStockArticleVOS.forEach(s -> {
List<DistributionStockArticleEntity> distrinbutionStockArticleVOS = distributionStockArticleMapper.getStockArticleByReservationId(reservationEntity.getId());
List<DistributionStockArticleVO> stockArticleVOS = DistributionStockArticleWrapper.build().listVO(distrinbutionStockArticleVOS);
stockArticleVOS.forEach(s -> {
//这里查询两个东西,一个是该订单在预约中所被选取的包件信息,以及该订单下所有的包件列表
List<DistributionParcelListEntity> pageVOList = distributionParcelListMapper.getPageVOList(s.getId());
s.setParcelListVOS(DistributionParcelListWrapper.build().listVO(pageVOList));
@ -799,7 +815,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
List<DistributionParcelListEntity> packageVOList = distributionReservationPackageMapper.selectPackageVOList(reservationEntity.getId(), s.getId());
s.setPackageList(DistributionParcelListWrapper.build().listVO(packageVOList));
});
reservationVO.setStockArticleList(distrinbutionStockArticleVOS);
reservationVO.setStockArticleList(stockArticleVOS);
List<DistributionStockListEntity> stockArticleEntityList = distributionReservationStocklistMapper.selectInventory(reservationEntity.getId());
reservationVO.setInventoryList(DistributionStockListWrapper.build().listVO(stockArticleEntityList));
return R.data(reservationVO);
@ -1102,6 +1118,7 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
clientNum.getAndIncrement();
//维护预约和备货的关系
DistributionStockupInfoEntity stockupInfoEntity = new DistributionStockupInfoEntity();
stockupInfoEntity.setStockUpType(StockupTypeConstant.shangpei.getValue());
stockupInfoEntity.setReservationId(reservationEntity.getId());
stockupInfoEntity.setStockupId(stockupEntity.getId());
distributionStockupInfoService.save(stockupInfoEntity);
@ -1249,10 +1266,19 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
distributionDeliveryListEntity.setDriverName(driverNames.deleteCharAt(driverNames.length() - 1).toString());
distributionDeliveryListEntity.setVehicleName(vehicleNubs.deleteCharAt(vehicleNubs.length() - 1).toString());
}
String taskTime = allocationDTO.getTaskTime();
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date parse = null;
try {
parse = format.parse(taskTime);
} catch (ParseException e) {
e.printStackTrace();
}
distributionDeliveryListEntity.setTaskTime(parse);
//完善配送信息
Date taskTime = allocationDTO.getTaskTime();
if (!Func.isEmpty(taskTime)) {
distributionDeliveryListEntity.setTaskTime(taskTime);
distributionDeliveryListEntity.setTaskTime(parse);
}
distributionDeliveryListEntity.setWarehouseName(String.join(",", deliveryWarehouseName));
distributionDeliveryListEntity.setOrderCode(String.join(",", orderNumber));
@ -1341,4 +1367,43 @@ public class DistributionReservationServiceImpl extends BaseServiceImpl<Distribu
List<DistributionStockListEntity> stockListEntityList = baseMapper.getReservationStockListInfo(reservationId);
return R.data(stockListEntityList);
}
@Override
public List<DistributionStockArticleVO> selectUpdateAvailableStockArticle(Long reservationId) {
List<DistributionStockArticleEntity> stockArticleEntityList = distributionStockArticleService.getBaseMapper().selectList(Wrappers.<DistributionStockArticleEntity>query().lambda()
.ne(DistributionStockArticleEntity::getReservationStatus, "30")
.eq(DistributionStockArticleEntity::getTypeService, DistributionTypeConstant.shipie.getValue()));
List<DistributionStockArticleVO> stockArticleVOS = DistributionStockArticleWrapper.build().listVO(stockArticleEntityList);
stockArticleVOS.forEach(s->{
//查询出这个订单的所有包件信息
List<DistributionParcelListEntity> parcelListEntityList = distributionParcelListService.getBaseMapper().selectList(Wrappers.<DistributionParcelListEntity>query().lambda().eq(DistributionParcelListEntity::getStockArticleId, s.getId()));
s.setParcelListVOS(DistributionParcelListWrapper.build().listVO(parcelListEntityList));
});
//这里还需要查询出该预约单下的订单信息
List<DistributionReservationStockarticleEntity> reservationStockarticleEntityList = distributionReservationStockarticleService.getBaseMapper().selectList(Wrappers.<DistributionReservationStockarticleEntity>query().lambda().eq(DistributionReservationStockarticleEntity::getReservationId, reservationId));
List<DistributionStockArticleVO> stockArticleVOArrayList = new ArrayList<>();
reservationStockarticleEntityList.forEach(r->{
List<DistributionStockArticleEntity> stockArticleEntities = distributionStockArticleService.getBaseMapper().selectList(Wrappers.<DistributionStockArticleEntity>query().lambda().eq(DistributionStockArticleEntity::getId, r.getStockArticleId()));
List<DistributionStockArticleVO> stockArticleVOList = DistributionStockArticleWrapper.build().listVO(stockArticleEntities);
stockArticleVOList.forEach(s->{
List<DistributionParcelListEntity> parcelListEntityList = distributionParcelListService.getBaseMapper().selectList(Wrappers.<DistributionParcelListEntity>query().lambda().eq(DistributionParcelListEntity::getStockArticleId, s.getId()));
s.setParcelListVOS(DistributionParcelListWrapper.build().listVO(parcelListEntityList));
List<DistributionReservationPackageEntity> reservationPackageEntityList = distributionReservationPackageService.getBaseMapper().selectList(Wrappers.<DistributionReservationPackageEntity>query().lambda()
.eq(DistributionReservationPackageEntity::getReservationId, reservationId)
.eq(DistributionReservationPackageEntity::getStockArticleId, s.getId()));
List<DistributionParcelListVO> packageList = new ArrayList<>();
reservationPackageEntityList.forEach(p->{
DistributionParcelListEntity parcelListEntity = distributionParcelListService.getById(p.getParceListId());
packageList.add(DistributionParcelListWrapper.build().entityVO(parcelListEntity));
});
s.setPackageList(packageList);
stockArticleVOArrayList.add(s);
});
});
stockArticleVOS.addAll(stockArticleVOArrayList);
List<DistributionStockArticleVO> stockArticleVOList = stockArticleVOS.stream().distinct().collect(Collectors.toList());
return stockArticleVOS;
}
}

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

@ -401,6 +401,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl<Distrilb
distrilbutionBillStock.setBillLadingId(id);
distrilbutionBillStock.setStockArticleId(i.getId());
distrilbutionBillStock.setConditions(BillLadingStatusConstant.daitihuo.getValue());
distrilbutionBillStock.setOrderStatus("2");
list1.add(distrilbutionBillStock);
});

Loading…
Cancel
Save