Browse Source

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

training
pref_mail@163.com 1 year ago
parent
commit
1ec7ce29ae
  1. 1
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupSelfVO.java
  2. 6
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupStockListVO.java
  3. 4
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupTrayVO.java
  4. 25
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java
  5. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/DistributionStockDTO.java
  6. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/StockupDTO.java
  7. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockMapper.xml
  8. 16
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.java
  9. 39
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml
  10. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistrilbutionBillStockMapper.xml
  11. 14
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java
  12. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java
  13. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockServiceImpl.java
  14. 44
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java
  15. 1
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWarehousingEntryController.java
  16. 1
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/WarehouseWarehousingEntryDTO.java
  17. 47
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java

1
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupSelfVO.java

@ -22,6 +22,7 @@ public class DistributionStockupSelfVO {
private Long ldsId; // 扫码ID
private Long allocationId; // 货位ID
private Long parcelListId; // 包件ID
private Long stockArticleId; // 订单ID
}

6
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupStockListVO.java

@ -7,10 +7,12 @@ import java.io.Serializable;
@Data
public class DistributionStockupStockListVO implements Serializable {
private Long stockListId;
private Long stockListId;//库存品id
private String allocation;//货位
private Long deliveryDetailsId; //自提库存品id
private String allocation;//货位
private boolean completeStact;//货位配货状态
private String materialName;//物品名称
private String sku;//sku

4
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionStockupTrayVO.java

@ -14,5 +14,9 @@ import java.io.Serializable;
public class DistributionStockupTrayVO implements Serializable {
private String associationId; //包件ID
private String associationValue; // 包件编码
private String positionCode; // 包件编码
private String allocationId; // 包件编码
private String allocationTitle; // 包件编码
private String num; // 包件编码
}

25
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java

@ -30,6 +30,7 @@ import com.logpm.distribution.service.*;
import com.logpm.distribution.vo.*;
import com.logpm.warehouse.entity.WarehouseGoodsAllocationEntity;
import com.logpm.warehouse.entity.WarehouseUpdownGoodsEntity;
import com.logpm.warehouse.entity.WarehouseWarehousingEntryEntity;
import com.logpm.warehouse.feign.IWarehouseGoodsAllocationClient;
import com.logpm.warehouse.feign.IWarehouseUpdownGoodsClient;
import com.logpm.warehouse.feign.IWarehouseUpdownGoodsLogClient;
@ -197,14 +198,18 @@ public class DistributionStockupAppController extends BladeController {
Long reservationId = stockupDTO.getReservationId();
if (stockupDTO.getTypeService().equals("3")) {
//自提
if (orderStatus.equals(1)) {
//查询备货区信息
DistributionStockupSelfVO distributionStockupSelfVO = distributionStockupService.selectStockupDetails(reservationId);
map = convertObjectToMap(distributionStockupSelfVO);
if (orderStatus.equals(1)) {
//客户订单
List<DistributionStockupOrderListVO> list = distributionStockupService.selectStockupOrderList(stockupDTO);
map.put("orderList", list);
} else {
//查询备货区信息
DistributionStockupSelfVO distributionStockupSelfVO = distributionStockupService.selectStockupStockListDetails(reservationId);
map = convertObjectToMap(distributionStockupSelfVO);
//库存品
List<DistributionStockupStockListVO> list = distributionStockupService.selectStockupStockList(stockupDTO);
map.put("stockList", list);
@ -276,7 +281,7 @@ public class DistributionStockupAppController extends BladeController {
return R.fail(3002, "备货任务Id为空");
}
if (ObjectUtils.isNull(status)) {
log.warn("##############status: 货位状态为空 allocation={}", stockupId);
log.warn("##############status: 货位状态为空 status={}", status);
return R.fail(3002, "货位状态为空");
}
//查询自提还是商 市
@ -304,6 +309,10 @@ public class DistributionStockupAppController extends BladeController {
} else if (orderStatus == 2) { //库存品
Long stockListId = stockupDTO.getStockListId();//库存品id
if (ObjectUtils.isNull(allocationId)) {
log.warn("##############allocationId: 货位状态为空 allocationId={}", allocationId);
return R.fail(3002, "货位id为空");
}
if (Objects.isNull(stockListId)) {
return R.fail(3002, "库存品id为空");
@ -311,7 +320,7 @@ public class DistributionStockupAppController extends BladeController {
//查询自提还是商 市
if (byId.getTypeService().equals("3")) {
//自
DistributionStockupStockListInfoVO infoVO = distributionStockupService.selectStockListInfoSelf(reservationId, stockListId);
DistributionStockupStockListInfoVO infoVO = distributionStockupService.selectStockListInfoSelf(reservationId, stockListId,allocationId);
return R.data(infoVO);
} else {
DistributionStockupStockListInfoVO infoVO = distributionStockupService.selectStockListInfo(reservationId, stockListId);
@ -365,6 +374,16 @@ public class DistributionStockupAppController extends BladeController {
R b = distributionStockupService.addPackTrayList(stockupDTO);
return b;
}
@PostMapping("/locationSelection")
@ApiOperation(value = "库存品选择货位展示")
public R<List<DistributionStockupTrayVO>> locationSelection(@RequestBody StockupDTO stockupDTO) {
if (ObjectUtils.isNull(stockupDTO.getDeliveryDetailsId())) {
log.warn("############备货库存品ID为空:{}",stockupDTO.getDeliveryDetailsId());
return R.fail(3002, "备货库存品ID不能为空");
}
List<DistributionStockupTrayVO> list = distributionStockupService.getLocationSelection(stockupDTO);
return R.data(list);
}

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

@ -34,7 +34,7 @@ public class DistributionStockDTO extends DistributionStockEntity {
private static final long serialVersionUID = 1L;
private List<String> ids; //包件ID
private String goodsAreaId; //备货区
// private String stockupId; //配货id
private Long stockupId; //配货id
private String stockupArea; //名称
private String stockupType; //标识

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/StockupDTO.java

@ -43,6 +43,7 @@ public class StockupDTO implements Serializable {
private String cargoUnit;//单位
private Long userId;//当前操作人
private String deliveryDetailsId;//当前操作人
//扫码参数
private Integer scanType;//备货扫码类型 1 包件 2库存品

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockMapper.xml

@ -97,19 +97,15 @@
)
</select>
<select id="selectAllocation" resultType="com.logpm.distribution.vo.DistributionStockAllocationVO">
select lwugl.position_code,lwugl.allocation_id
select lds.allocation_id allocationId,lds.allocation_title positionCode
from logpm_distribution_stock lds
LEFT JOIN logpm_warehouse_updown_goods_log lwugl on lds.parcel_list_id = lwugl.association_id and lwugl.binding_type = 2 and lwugl.create_time >= DATE_SUB(NOW(), INTERVAL 10 MINUTE)
where lds.reservation_id = #{reservationId} and lds.stockup_id = #{stockupId} and lds.parcel_list_id = #{parcelListId}
GROUP BY lwugl.create_time ,lwugl.position_code,lwugl.allocation_id
LIMIT 1
</select>
<select id="selectSelfAllocation" resultType="com.logpm.distribution.vo.DistributionStockAllocationVO">
select lwugl.position_code,lwugl.allocation_id
select lds.allocation_title positionCode,lds.allocation_id allocationId
from logpm_distribution_stock lds
LEFT JOIN logpm_warehouse_updown_goods_log lwugl on lds.parcel_list_id = lwugl.association_id and lwugl.binding_type = 2 and lwugl.create_time >= DATE_SUB(NOW(), INTERVAL 10 MINUTE)
where lds.bill_lading_id = #{reservationId} and lds.stockup_id = #{stockupId} and lds.parcel_list_id = #{parcelListId}
GROUP BY lwugl.create_time ,lwugl.position_code,lwugl.allocation_id
LIMIT 1
</select>

16
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.java

@ -22,10 +22,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.dto.app.StockupDTO;
import com.logpm.distribution.entity.DistributionStockupEntity;
import com.logpm.distribution.excel.DistributionStockupExcel;
import com.logpm.distribution.vo.DistributionStockupListVO;
import com.logpm.distribution.vo.DistributionStockupSelfVO;
import com.logpm.distribution.vo.DistributionStockupStockListVO;
import com.logpm.distribution.vo.DistributionStockupVO;
import com.logpm.distribution.vo.*;
import com.logpm.warehouse.entity.WarehouseUpdownGoodsEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -145,6 +143,9 @@ public interface DistributionStockupMapper extends BaseMapper<DistributionStocku
*/
DistributionStockupSelfVO selectStockupDetails(@Param("reservationId") Long reservationId);
DistributionStockupSelfVO selectStockupStockListDetails(Long reservationId);
List<DistributionStockupStockListVO> selectStockupSelf(@Param("reservationId")Long reservationId);
/**
@ -184,4 +185,11 @@ public interface DistributionStockupMapper extends BaseMapper<DistributionStocku
* @return
*/
List<DistributionStockupSelfVO> stockupOffShelf(@Param("param")StockupDTO stockupDTO);
/**
*
* @param stockupDTO
* @return
*/
List<DistributionStockupTrayVO> getLocationSelection(StockupDTO stockupDTO);
}

39
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.xml

@ -67,6 +67,15 @@
ldbs.order_status in (1,2) and ldbs.bill_lading_id = #{param.reservationId}
</where>
</select>
<select id="getLocationSelection" resultType="com.logpm.distribution.vo.DistributionStockupTrayVO">
select lwug.position_code positionCode,lwug.allocation_id allocationId,lwug.allocation_title allocationTitle,lwug.num
from logpm_distribution_delivery_details lddd
LEFT JOIN logpm_distribution_stock_list ldsl on lddd.stock_list_id = ldsl.id
LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldsl.material_id and lwug.association_type = '4' and ldsl.market_id = lwug.market_id
and ldsl.incoming_batch = lwug.incoming_batch
where lddd.id = '1704701570896048130'
GROUP BY lwug.position_code ,lwug.allocation_id,lwug.allocation_title,lwug.num
</select>
<select id="stockupOffShelf" resultType="com.logpm.distribution.vo.DistributionStockupSelfVO">
select lwug.id lwugId,lds.id ldsId,ldrp.packet_bar_code orderPackageCode,lwug.allocation_id allocationId
from logpm_distribution_reservation_package ldrp
@ -360,7 +369,7 @@
</select>
<select id="selectStockupSelf" resultType="com.logpm.distribution.vo.DistributionStockupStockListVO">
select lddd.stock_list_id stockListId,
ldsl.storage_location allocation,
GROUP_CONCAT(lwug.position_code) allocation,
ldsl.description_goods materialName,
ldsl.sku sku,
ldsl.cargo_norms cargoNorms,
@ -372,10 +381,12 @@
select COUNT(id)
from logpm_distribution_stock
where bill_lading_id = lddd.bill_lading_id
) realNum
) realNum,lddd.id deliveryDetailsId
from logpm_distribution_delivery_details lddd
LEFT JOIN logpm_distribution_stock_list ldsl on lddd.stock_list_id = ldsl.id
LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldsl.material_id and lwug.association_type = '4' and ldsl.market_id = lwug.market_id and ldsl.incoming_batch = lwug.incoming_batch
where lddd.bill_lading_id = #{reservationId}
GROUP BY lddd.stock_list_id,ldsl.description_goods,ldsl.sku,ldsl.cargo_norms,lddd.quantity,ldsl.cargo_unit,ldsl.tray_name,ldsl.unpack,lddd.id
</select>
@ -407,6 +418,30 @@
where ldsi.reservation_id = #{reservationId}
</select>
<select id="selectStockupStockListDetails" resultType="com.logpm.distribution.vo.DistributionStockupSelfVO">
select lds.stockup_area goodsAreaName,
(
select GROUP_CONCAT(DISTINCT ldsa.mall_name SEPARATOR ',')
from logpm_distrilbution_bill_stock ldbs
LEFT JOIN logpm_distribution_stock_article ldsa on ldsa.id = ldbs.stock_article_id
where ldbs.bill_lading_id = ldsi.reservation_id
) consignee,(
select SUM(lddd.quantity)
from logpm_distribution_delivery_details lddd
where lddd.bill_lading_id = ldsi.reservation_id
) planNum,(
select COUNT(id)
from logpm_distribution_stock
where stock_list_id in (
select lddd.stock_list_id
from logpm_distribution_delivery_details lddd
where lddd.bill_lading_id = ldsi.reservation_id
) and bill_lading_id = ldsi.reservation_id and ldsi.stockup_id = stockup_id
) scanNum
from logpm_distribution_stockup_info ldsi
LEFT JOIN logpm_distribution_stockup lds on ldsi.stockup_id = lds.id
where ldsi.reservation_id = #{reservationId}
</select>
<select id="selectStockupClientInfoSelf" resultType="com.logpm.distribution.vo.DistributionStockupListVO">

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

@ -104,7 +104,7 @@
SELECT GROUP_CONCAT(lwtg.tray_code SEPARATOR ',')
FROM logpm_warehouse_tray_goods lwtg
where lwtg.association_id = ldpl.id and lwtg.association_type = 3
) trays
) trays,ldbs.stock_article_id stockArticleId
from logpm_distribution_stockup_info ldsi
LEFT JOIN logpm_distrilbution_bill_stock ldbs on ldsi.reservation_id = ldbs.bill_lading_id
LEFT JOIN logpm_distribution_parcel_list ldpl on ldpl.stock_article_id = ldbs.stock_article_id and ldpl.order_package_grounding_status = 10

14
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java

@ -113,11 +113,13 @@ public interface IDistributionStockupService extends BaseService<DistributionSto
/**
* 自提库存品包件查询
*
* @param reservationId
* @param stockListId
* @param allocationId
* @return
*/
DistributionStockupStockListInfoVO selectStockListInfoSelf(Long reservationId, Long stockListId);
DistributionStockupStockListInfoVO selectStockListInfoSelf(Long reservationId, Long stockListId ,Long allocationId);
/**
* 订单详细
@ -167,10 +169,20 @@ public interface IDistributionStockupService extends BaseService<DistributionSto
DistributionStockupSelfVO selectStockupDetails(Long reservationId);
DistributionStockupSelfVO selectStockupStockListDetails(Long reservationId);
/**
* 备货打印包条扫码
* @param stockupDTO
* @return
*/
Integer selectPackagePrint(StockupDTO stockupDTO);
/**
* 库存品选择货位展示
*
* @param stockupDTO
* @return
*/
List<DistributionStockupTrayVO> getLocationSelection(StockupDTO stockupDTO);
}

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

@ -120,7 +120,7 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
IPage<DistributionParcelListVO> parcelListOwn = baseMapper.getParcelListOwn(page, Long.parseLong((String) o));
parcelListOwn.getRecords().forEach(i ->{
if(ObjectUtils.isNotNull(i) && ObjectUtils.isNotNull(i.getStockupStatus())){
i.setStockupStatusName(DictBizCache.getValue(DictBizConstant.STOCKUP_STATUS,i.getStockupStatus()));
i.setStockupStatusName(DictBizCache.getValue(DictBizConstant.ORDER_PACKAGE_STOCKUP_STATUS,i.getStockupStatus()));
}
//出现货位信息
String s = warehouseUpdownGoodsClient.selectMsgBywrap(i.getId());

5
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockServiceImpl.java

@ -34,6 +34,7 @@ import com.logpm.distribution.vo.DistributionStockVO;
import lombok.AllArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springblade.common.constant.order.OrderStockupStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageStockupStatusConstant;
import org.springblade.common.constant.stockup.StockupStatusConstant;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.context.annotation.Lazy;
@ -227,14 +228,14 @@ public class DistributionStockServiceImpl extends BaseServiceImpl<DistributionSt
stockEntity.setUnit(byId.getMaterialUnit()); //单位
stockEntity.setOrderSelfNumbering(byId.getOrderCode()); //自编码
stockEntity.setStockupArea(distributionStocks.getStockupArea()); //自编码
stockEntity.setStockupId(Long.parseLong(distributionStocks.getGoodsAreaId())); //自编码
stockEntity.setStockupId(distributionStocks.getStockupId()); //自编码
stockEntity.setType(1);
stockEntity.setOutboundType(byId1.getTypeService());//类型
list.add(stockEntity);
//修改备货状态
DistributionParcelListEntity parcelListEntity = new DistributionParcelListEntity();
parcelListEntity.setId(Long.parseLong(i));
parcelListEntity.setOrderPackageStockupStatus(StockupStatusConstant.yibeihuo.getValue());
parcelListEntity.setOrderPackageStockupStatus(OrderPackageStockupStatusConstant.yibeihu.getValue());
distributionParcelListService.updateById(parcelListEntity);
});

44
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

@ -36,14 +36,12 @@ import com.logpm.distribution.vo.*;
import com.logpm.distribution.wrapper.DistributionStockupWrapper;
import com.logpm.warehouse.entity.WarehouseTaryAllocationEntity;
import com.logpm.warehouse.entity.WarehouseTrayGoodsEntity;
import com.logpm.warehouse.entity.WarehouseUpdownGoodsLogEntity;
import com.logpm.warehouse.feign.IWarehouseTaryAllocationClient;
import com.logpm.warehouse.feign.IWarehouseTrayGoodsClient;
import com.logpm.warehouse.feign.IWarehouseUpdownGoodsLogClient;
import lombok.AllArgsConstructor;
import org.springblade.common.constant.CodeDesEnum;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.common.constant.orderpackage.OrderPackageReservationStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageStockupStatusConstant;
import org.springblade.common.constant.stocklist.StockLockingStatusConstant;
import org.springblade.common.constant.stocklist.StockSignfoStatusConstant;
@ -825,6 +823,11 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
if (stockupDTO.getTypeService().equals("3")) {
//自
List<DistributionStockupStockListVO> list = distributionStockupService.selectStockupSelf(reservationId);
list.forEach(i ->{
if(i.getPlanNum().equals(i.getRealNum())){
i.setCompleteStact(true);
}
});
return list;
} else {
//商,市
@ -1067,16 +1070,17 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
if(ObjectUtils.isNotNull(stockupDTO.getAllocationId())){
//查询订单数量 有库位
List<DistributionStockupSelfVO> distributionStockupSelfVOS = distrilbutionBillStockService.selectDistrilbutionBillPackSelf(stockupDTO);
List<DistributionStockupSelfVO> collect = distributionStockupSelfVOS.stream().filter(i -> ObjectUtils.isNotNull(i.getWarehouseArea())).collect(Collectors.toList());
DistributionStockupSelfVO distributionStockup= new DistributionStockupSelfVO();
AtomicReference<Integer> j = new AtomicReference<>(0);
AtomicReference<Integer> y = new AtomicReference<>(0);
distributionStockupSelfVOS.forEach(i -> {
collect.forEach(i -> {
j.updateAndGet(v -> v + i.getPlanNum());
y.updateAndGet(v -> v + i.getScanNum());
if(ObjectUtils.isNull(distributionStockup.getConsignee())){
distributionStockup.setConsignee(i.getConsignee());
}else{
if(ObjectUtils.isNotNull(i.getConsignee())){
if(ObjectUtils.isNotNull(distributionStockup.getConsignee()) && !distributionStockup.getConsignee().equals(i.getConsignee())){
String s = distributionStockup.getConsignee() + i.getConsignee();
distributionStockup.setConsignee(s);
}
@ -1084,11 +1088,19 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
if(ObjectUtils.isNull(distributionStockup.getTrays()) ){
distributionStockup.setTrays(i.getTrays());
}else{
if(ObjectUtils.isNotNull(i.getTrays())){
if(ObjectUtils.isNotNull(distributionStockup.getTrays()) && !distributionStockup.getTrays().equals(i.getTrays())){
String s = distributionStockup.getTrays() + i.getTrays();
distributionStockup.setTrays(s);
}
}
if(ObjectUtils.isNull(distributionStockup.getWarehouseArea()) ){
distributionStockup.setWarehouseArea(i.getWarehouseArea());
}else{
if(ObjectUtils.isNotNull(distributionStockup.getWarehouseArea()) && !distributionStockup.getWarehouseArea().equals(i.getWarehouseArea())){
String s = distributionStockup.getWarehouseArea() + i.getWarehouseArea();
distributionStockup.setWarehouseArea(s);
}
}
});
distributionStockup.setPlanNum(j.get());
distributionStockup.setScanNum(y.get());
@ -1105,7 +1117,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
if(ObjectUtils.isNull(distributionStockup.getConsignee())){
distributionStockup.setConsignee(i.getConsignee());
}else{
if(ObjectUtils.isNotNull(i.getConsignee())){
if(ObjectUtils.isNotNull(i.getConsignee()) && !distributionStockup.getConsignee().equals(i.getConsignee()) ){
String s = distributionStockup.getConsignee() + i.getConsignee();
distributionStockup.setConsignee(s);
}
@ -1113,7 +1125,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
if(ObjectUtils.isNull(distributionStockup.getTrays())){
distributionStockup.setTrays(i.getTrays());
}else{
if(ObjectUtils.isNotNull(i.getTrays())){
if(ObjectUtils.isNotNull(i.getTrays()) && !distributionStockup.getTrays().equals(i.getTrays())){
String s = distributionStockup.getTrays() + i.getTrays();
distributionStockup.setTrays(s);
}
@ -1275,7 +1287,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
}
@Override
public DistributionStockupStockListInfoVO selectStockListInfoSelf(Long reservationId, Long stockListId) {
public DistributionStockupStockListInfoVO selectStockListInfoSelf(Long reservationId, Long stockListId, Long allocationId) {
DistributionStockupStockListInfoVO entity = distributionStockListService.selectStockListInfoSelf(reservationId, stockListId);
List<StockListInfoListVO> list = distributionStockListService.selectStockListInfoSelfList(reservationId, stockListId);
@ -1664,6 +1676,11 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
return baseMapper.selectStockupDetails(reservationId);
}
@Override
public DistributionStockupSelfVO selectStockupStockListDetails(Long reservationId) {
return baseMapper.selectStockupStockListDetails(reservationId);
}
/**
* 备货打印包件码绑定
*
@ -1738,4 +1755,15 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
}
/**
* 库存品选择货位展示
*
* @param stockupDTO
* @return
*/
@Override
public List<DistributionStockupTrayVO> getLocationSelection(StockupDTO stockupDTO) {
return baseMapper.getLocationSelection(stockupDTO);
}
}

1
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/controller/WarehouseWarehousingEntryController.java

@ -163,6 +163,7 @@ public class WarehouseWarehousingEntryController extends BladeController {
@ApiOperationSupport(order = 12)
@ApiOperation(value = "导入入库数据", notes = "传入excel")
public R importWarehousingEntry(MultipartFile file, Integer isCovered) {
isCovered = 1;
WarehouseEntryImporter userImporter = new WarehouseEntryImporter(warehouseWarehousingEntryService, isCovered == 1);
ExcelUtil.save(file, userImporter, WarehousingEntryDetailExcel.class);
return R.success("操作成功");

1
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/dto/WarehouseWarehousingEntryDTO.java

@ -33,6 +33,7 @@ import java.util.List;
@EqualsAndHashCode(callSuper = true)
public class WarehouseWarehousingEntryDTO extends WarehouseWarehousingEntryEntity {
private static final long serialVersionUID = 1L;
private String type;
private List<WarehouseWarehousingDetailEntity> list;

47
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseWarehousingEntryServiceImpl.java

@ -100,6 +100,49 @@ public class WarehouseWarehousingEntryServiceImpl extends BaseServiceImpl<Wareho
@Override
@Transactional(rollbackFor = Exception.class)
public Boolean saveOrUpdateOwn(WarehouseWarehousingEntryDTO warehouseWarehousingEntryDTO) {
if(ObjectUtils.isNull(warehouseWarehousingEntryDTO.getType())){
throw new ServiceException("入库类型不能为空!!");
}
if(warehouseWarehousingEntryDTO.getType().equals("2")){
//直接入库
List<WarehouseWarehousingDetailEntity> list = warehouseWarehousingEntryDTO.getList();
WarehouseWarehousingEntryEntity warehouseWarehousingEntry = new WarehouseWarehousingEntryEntity();
BeanUtil.copyProperties(warehouseWarehousingEntryDTO,warehouseWarehousingEntry);
WarehouseWarehousingEntryEntity entryEntity = new WarehouseWarehousingEntryEntity();
entryEntity.setId(warehouseWarehousingEntryDTO.getId());
//添加
//获取当前登录人仓库
BasicdataWarehouseEntity basicdataWarehouseEntity = basicdataWarehouseClient.getMyCurrentWarehouse();
if (Objects.isNull(basicdataWarehouseEntity)) {
log.warn("#####操作人,当前未查询到仓库信息");
return false;
}
warehouseWarehousingEntry.setWarehouseId(basicdataWarehouseEntity.getId());
warehouseWarehousingEntry.setSource("添加");
warehouseWarehousingEntry.setConditions("3");
this.save(warehouseWarehousingEntry);
list.forEach( i ->{
//添加库存品
addInventory(i.getCreateInventory(),warehouseWarehousingEntryDTO,i);
});
//添加入库明细
// Iterator<WarehouseWarehousingDetailEntity> iterator = list.iterator();
// while (iterator.hasNext()){
// if(ObjectUtils.isNotNull(iterator.next().getConditions() ) && iterator.next().getConditions().equals("3")){
// iterator.remove();
// }
// }
if(list.size() > 0){
list.forEach(i ->{
i.setWarehousingEntryId(warehouseWarehousingEntry.getId());
i.setConditions("3");
}
);
warehouseWarehousingDetailService.saveBatch(list);
}
return true;
}else if(warehouseWarehousingEntryDTO.getType().equals("1")){
//预计入库
List<WarehouseWarehousingDetailEntity> list = warehouseWarehousingEntryDTO.getList();
WarehouseWarehousingEntryEntity warehouseWarehousingEntry = new WarehouseWarehousingEntryEntity();
BeanUtil.copyProperties(warehouseWarehousingEntryDTO,warehouseWarehousingEntry);
@ -190,6 +233,10 @@ public class WarehouseWarehousingEntryServiceImpl extends BaseServiceImpl<Wareho
warehouseWarehousingDetailService.saveBatch(list);
}
return true;
}else{
return false;
}
}
/**

Loading…
Cancel
Save