Browse Source

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

training
pref_mail@163.com 1 year ago
parent
commit
604347b1ef
  1. 4
      blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseUpdownGoodsClient.java
  2. 66
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/appcontroller/DistributionStockupAppController.java
  3. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/app/StockupDTO.java
  4. 37
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  5. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockArticleMapper.xml
  6. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.java
  7. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml
  8. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockupMapper.java
  9. 12
      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/service/IDistributionStockListService.java
  11. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java
  12. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockListServiceImpl.java
  13. 15
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java
  14. 14
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseUpdownGoodsClient.java

4
blade-service-api/logpm-warehouse-api/src/main/java/com/logpm/warehouse/feign/IWarehouseUpdownGoodsClient.java

@ -40,6 +40,7 @@ public interface IWarehouseUpdownGoodsClient {
String TOP = API_PREFIX + "/top";
String SELECTSTOCKLISTOWE = API_PREFIX + "/selectStockListOwe";
String LOCATIONINFORMATION = API_PREFIX + "/locationInformation";
String LOCATIONSTOCKLISTINFORMATION = API_PREFIX + "/locationStockListInformation";
// /**
// *查询包条
@ -79,4 +80,7 @@ public interface IWarehouseUpdownGoodsClient {
*/
@PostMapping(LOCATIONINFORMATION)
WarehouseUpdownGoodsEntity getLocationInformation(@RequestBody WarehouseUpdownGoodsEntity updownGoodsEntity);
@PostMapping(LOCATIONSTOCKLISTINFORMATION)
WarehouseUpdownGoodsEntity getLocationStockListInformation(@RequestBody WarehouseUpdownGoodsEntity warehouseUpdownGoodsEntity);
}

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

@ -26,6 +26,7 @@ import com.logpm.basicdata.feign.IBasicdataGoodsAreaClient;
import com.logpm.distribution.bean.Resp;
import com.logpm.distribution.dto.app.StockupDTO;
import com.logpm.distribution.entity.*;
import com.logpm.distribution.mapper.DistributionStockListMapper;
import com.logpm.distribution.service.*;
import com.logpm.distribution.vo.*;
import com.logpm.warehouse.entity.WarehouseGoodsAllocationEntity;
@ -87,6 +88,7 @@ public class DistributionStockupAppController extends BladeController {
private final IWarehouseUpdownGoodsClient warehouseUpdownGoodsClient;
private final IWarehouseUpdownGoodsLogClient warehouseUpdownGoodsLogClient;
private final IWarehouseGoodsAllocationClient warehouseGoodsAllocationClient;
private IWarehouseUpdownTypeClient warehouseUpdownTypeClient;
private IDistributionAsyncService distributionAsyncService;
private final RabbitTemplate rabbitTemplate;
@ -323,7 +325,7 @@ public class DistributionStockupAppController extends BladeController {
DistributionStockupStockListInfoVO infoVO = distributionStockupService.selectStockListInfoSelf(reservationId, stockListId,allocationId);
return R.data(infoVO);
} else {
DistributionStockupStockListInfoVO infoVO = distributionStockupService.selectStockListInfo(reservationId, stockListId);
DistributionStockupStockListInfoVO infoVO = distributionStockupService.selectStockListInfo(reservationId, stockListId,allocationId);
return R.data(infoVO);
}
@ -381,8 +383,15 @@ public class DistributionStockupAppController extends BladeController {
log.warn("############备货库存品ID为空:{}",stockupDTO.getDeliveryDetailsId());
return R.fail(3002, "备货库存品ID不能为空");
}
List<DistributionStockupTrayVO> list = distributionStockupService.getLocationSelection(stockupDTO);
return R.data(list);
List<DistributionStockupTrayVO> list = distributionStockupService.getLocationSelection(stockupDTO);
if(!list.isEmpty()){
return R.data(list);
}
List<DistributionStockupTrayVO> listMarket = distributionStockupService.getLocationMarketSelection(stockupDTO);
if(!listMarket.isEmpty()){
return R.data(listMarket);
}
return R.data(null);
}
@ -558,6 +567,7 @@ public class DistributionStockupAppController extends BladeController {
String packetBarCode = stockupDTO.getPacketBarCode();
// String stockupArea = stockupDTO.getStockupArea();//备货区
Long stockupId = stockupDTO.getStockupId();//备货区
Long allocationId = stockupDTO.getAllocationId();//备货区
Integer stockPrint = stockupDTO.getStockPrint(); // 库存
if (StringUtil.isBlank(packetBarCode)) {
@ -580,6 +590,10 @@ public class DistributionStockupAppController extends BladeController {
log.warn("##################stockupScan: 库存品扫码,类型为空");
return R.fail("库存品扫码:类型不能为空");
}
if (Objects.isNull(allocationId)) {
log.warn("##################allocationId: 货位ID为空!");
return R.fail("货位ID不能为空");
}
Integer i = distributionStockupService.selectPackagePrint(stockupDTO);
switch (i) {
@ -592,7 +606,8 @@ public class DistributionStockupAppController extends BladeController {
//先保存扫码包件信息,后续由队列来出来余下补充信息
DistributionStockEntity entity = new DistributionStockEntity();
entity.setCoding(packetBarCode);
// entity.setStockupArea(stockupArea);
DistributionStockupEntity byId1 = distributionStockupService.getById(stockupId);
entity.setStockupArea(byId1.getStockupArea());
entity.setStockupId(stockupId);
if(stockupEntity.getTypeService().equals("3")){
entity.setBillLadingId(reservationId);
@ -606,24 +621,31 @@ public class DistributionStockupAppController extends BladeController {
if(ObjectUtils.isNotNull(byId.getMarketId())){
entity.setMarketId(byId.getMarketId());
entity.setMaterialId(byId.getMaterialId());
//查询库位id
// WarehouseUpdownGoodsEntity updownGoods = new WarehouseUpdownGoodsEntity();
// updownGoods.setAssociationId(byId.getId());
// updownGoods.setMarketId(byId.getMarketId());
// updownGoods.setIncomingBatch(byId.getIncomingBatch());
// Long l = warehouseUpdownGoodsClient.selectStockListOwe(updownGoods);
// if(!ObjectUtils.isNull(l)){
// //todo 待下架操作
// JSONObject jsonObject = new JSONObject();
// jsonObject.put("marketId",byId.getMarketId());
// jsonObject.put("materialCode",byId.getMarketCode());
// jsonObject.put("incomingBatch",byId.getIncomingBatch());
// jsonObject.put("enterNum",1);
// jsonObject.put("allocationId",l);
// List<JSONObject> list = new ArrayList<>();
// list.add(jsonObject);
// warehouseUpdownTypeClient.downStock(list);
// }
WarehouseUpdownGoodsEntity warehouseUpdownGoodsEntity = new WarehouseUpdownGoodsEntity();
warehouseUpdownGoodsEntity.setAllocationId(stockupDTO.getAllocationId());
warehouseUpdownGoodsEntity.setIncomingBatch(byId.getIncomingBatch());
warehouseUpdownGoodsEntity.setMarketId(byId.getMarketId());
warehouseUpdownGoodsEntity.setAssociationType("4");
WarehouseUpdownGoodsEntity locationInformation = warehouseUpdownGoodsClient.getLocationStockListInformation(warehouseUpdownGoodsEntity);
if(!ObjectUtils.isNull(locationInformation)){
entity.setAllocationTitle(locationInformation.getPositionCode());
entity.setAllocationId(stockupDTO.getAllocationId());
//todo 待下架操作
JSONObject jsonObject = new JSONObject();
jsonObject.put("marketId",byId.getMarketId());
jsonObject.put("materialCode",byId.getMarketCode());
jsonObject.put("incomingBatch",byId.getIncomingBatch());
jsonObject.put("enterNum",1);
jsonObject.put("allocationId",stockupDTO.getAllocationId());
List<JSONObject> list = new ArrayList<>();
list.add(jsonObject);
R r = warehouseUpdownTypeClient.downStock(list);
log.debug("下架状态:{}",r.getMsg());
}else{
return R.fail(3002,"本货位的物料已为0,请更换货位继续!!");
}
}else{
return R.fail(3002,"物料信息查询失败,请联系TJJ!!");
}
entity.setConditions("0");
entity.setType(2);

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

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

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

@ -217,29 +217,24 @@
<select id="selectStockupStockList" resultType="com.logpm.distribution.vo.DistributionStockupStockListVO">
select ldst.id stockListId,
ldst.storage_location allocation,
ldst.description_goods materialName,
ldst.sku sku,
ldst.cargo_norms cargoNorms,
ldrs.reservation_num planNum,
ldst.cargo_unit cargoUnit,
ldst.tray_name trayName,
ldst.unpack unpack,
count(ldss.id) realNum
ldst.description_goods materialName,
ldst.sku sku,
ldst.cargo_norms cargoNorms,
ldrs.reservation_num planNum,
ldst.cargo_unit cargoUnit,
ldst.tray_name trayName,
ldst.unpack unpack,
count(ldss.id) realNum,
GROUP_CONCAT( DISTINCT lwug.position_code) allocation,
ldrs.id deliveryDetailsId
from logpm_distribution_reservation_stocklist ldrs
left join logpm_distribution_stock_list ldst on ldst.id = ldrs.stocklist_id and ldst.is_deleted = 0
left join logpm_distribution_stock ldss on ldss.stock_list_id = ldst.id and ldss.reservation_id = #{reservationId} and ldss.is_deleted = 0
left join logpm_distribution_stock_list ldst on ldst.id = ldrs.stocklist_id and ldst.is_deleted = 0
left join logpm_distribution_stock ldss on ldss.stock_list_id = ldst.id and ldss.reservation_id = #{reservationId} and ldss.is_deleted = 0
LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldst.material_id and lwug.association_type = '4' and ldst.market_id = lwug.market_id and ldst.incoming_batch = lwug.incoming_batch
where ldrs.reservation_id = #{reservationId}
and ldrs.is_deleted = 0
group by ldst.id,
ldst.storage_location,
ldst.description_goods,
ldst.sku,
ldst.cargo_norms,
ldrs.reservation_num,
ldst.cargo_unit,
ldst.tray_name,
ldst.unpack
and ldrs.is_deleted = 0
group by ldst.id, ldst.storage_location, ldst.description_goods, ldst.sku,ldrs.id,
ldst.cargo_norms, ldrs.reservation_num, ldst.cargo_unit, ldst.tray_name, ldst.unpack
</select>
<select id="selectOrderNumByReservationId" resultType="Integer">

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

@ -330,7 +330,12 @@
ldsa.inventory_date, ldsa.inventory_person, ldsa.inventory_person_id,
ldsa.available_quantity, ldsa.is_have_data, ldsa.stock_article_code, ldsa.dealer_name, ldsa.dealer_code,
ldsa.train_number, ldsa.factory_train, ldsa.sending, ldsa.send_warehouse_id, ldsa.send_warehouse_name,
ldsa.is_zero, ldsa.accept_warehouse_id, ldsa.accept_warehouse_name, ldsa.order_delivery_status,GROUP_CONCAT(DISTINCT lwtg.tray_code) trays,
ldsa.is_zero, ldsa.accept_warehouse_id, ldsa.accept_warehouse_name, ldsa.order_delivery_status,
(select GROUP_CONCAT(DISTINCT lwtg.tray_code)
from logpm_distribution_parcel_list ldpl
LEFT JOIN logpm_warehouse_tray_goods lwtg on lwtg.association_id = ldpl.id
LEFT JOIN logpm_warehouse_updown_goods lwug on lwug.association_id = ldpl.id
where ldpl.stock_article_id = ldsa.id) trays,
(
select GROUP_CONCAT(DISTINCT lwug.position_code)
from logpm_distribution_parcel_list ldpl

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

@ -58,7 +58,7 @@ public interface DistributionStockListMapper extends BaseMapper<DistributionStoc
IPage<DistributionStockListVO> pageOwn(IPage page,@Param("param") DistributionStockListEntity distributionStockListEntity);
DistributionStockupStockListInfoVO selectStockListInfo(@Param("reservationId") Long reservationId, @Param("stockListId") Long stockListId);
DistributionStockupStockListInfoVO selectStockListInfo(@Param("reservationId") Long reservationId, @Param("stockListId") Long stockListId,@Param("allocationId") Long allocationId);
List<String> selectWarehouseAreaByReservationId(@Param("reservationId") Long reservationId);

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

@ -197,7 +197,9 @@
ldr.delivery_address deliveryAddress,
ldr.goods_area_name stockupArea,
ldrs.reservation_num planNum,
ldsl.storage_location warehouseArea,
(select DISTINCT allocation_title
from logpm_warehouse_updown_goods
where allocation_id = #{allocationId}) warehouseArea,
ldsl.tray_name trays,
ldsl.sku sku,
ldsl.cargo_unit unit,

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

@ -191,5 +191,7 @@ public interface DistributionStockupMapper extends BaseMapper<DistributionStocku
* @param stockupDTO
* @return
*/
List<DistributionStockupTrayVO> getLocationSelection(StockupDTO stockupDTO);
List<DistributionStockupTrayVO> getLocationSelection(@Param("param") StockupDTO stockupDTO);
List<DistributionStockupTrayVO> getLocationMarketSelection(@Param("param")StockupDTO stockupDTO);
}

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

@ -67,13 +67,21 @@
ldbs.order_status in (1,2) and ldbs.bill_lading_id = #{param.reservationId}
</where>
</select>
<select id="getLocationMarketSelection" resultType="com.logpm.distribution.vo.DistributionStockupTrayVO">
select lwug.position_code positionCode,lwug.allocation_id allocationId,lwug.allocation_title allocationTitle,lwug.num
from logpm_distribution_reservation_stocklist ldrs
LEFT JOIN logpm_distribution_stock_list ldsl on ldrs.stocklist_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 ldrs.id = #{param.deliveryDetailsId}
</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'
where lddd.id = #{param.deliveryDetailsId}
GROUP BY lwug.position_code ,lwug.allocation_id,lwug.allocation_title,lwug.num
</select>
<select id="stockupOffShelf" resultType="com.logpm.distribution.vo.DistributionStockupSelfVO">
@ -369,7 +377,7 @@
</select>
<select id="selectStockupSelf" resultType="com.logpm.distribution.vo.DistributionStockupStockListVO">
select lddd.stock_list_id stockListId,
GROUP_CONCAT(lwug.position_code) allocation,
GROUP_CONCAT(DISTINCT lwug.position_code) allocation,
ldsl.description_goods materialName,
ldsl.sku sku,
ldsl.cargo_norms cargoNorms,

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

@ -94,7 +94,7 @@ public interface IDistributionStockListService extends BaseService<DistributionS
IPage<DistributionStockListVO> pageOwn(IPage<Object> page, Map<String, Object> distributionStockList);
DistributionStockupStockListInfoVO selectStockListInfo(Long reservationId, Long stockListId);
DistributionStockupStockListInfoVO selectStockListInfo(Long reservationId, Long stockListId,Long allocationId);
List<String> selectWarehouseAreaByReservationId(Long reservationId);

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

@ -105,11 +105,13 @@ public interface IDistributionStockupService extends BaseService<DistributionSto
/**
* 包件数据查询
*
* @param reservationId
* @param stockListId
* @param allocationId
* @return
*/
DistributionStockupStockListInfoVO selectStockListInfo(Long reservationId, Long stockListId);
DistributionStockupStockListInfoVO selectStockListInfo(Long reservationId, Long stockListId,Long allocationId);
/**
* 自提库存品包件查询
@ -185,4 +187,11 @@ public interface IDistributionStockupService extends BaseService<DistributionSto
* @return
*/
List<DistributionStockupTrayVO> getLocationSelection(StockupDTO stockupDTO);
/**
* 库存品选择货位展示
*
* @param stockupDTO
* @return
*/
List<DistributionStockupTrayVO> getLocationMarketSelection(StockupDTO stockupDTO);
}

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockListServiceImpl.java

@ -323,8 +323,8 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi
}
@Override
public DistributionStockupStockListInfoVO selectStockListInfo(Long reservationId, Long stockListId) {
return baseMapper.selectStockListInfo(reservationId,stockListId);
public DistributionStockupStockListInfoVO selectStockListInfo(Long reservationId, Long stockListId, Long allocationId) {
return baseMapper.selectStockListInfo(reservationId,stockListId,allocationId);
}
@Override

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

@ -832,7 +832,11 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
} else {
//商,市
List<DistributionStockupStockListVO> list = distributionReservationService.selectStockupStockList(reservationId);
list.forEach(i ->{
if(i.getPlanNum().equals(i.getRealNum())){
i.setCompleteStact(true);
}
});
return list;
}
@ -1272,12 +1276,12 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
}
@Override
public DistributionStockupStockListInfoVO selectStockListInfo(Long reservationId, Long stockListId) {
public DistributionStockupStockListInfoVO selectStockListInfo(Long reservationId, Long stockListId, Long allocationId) {
//查询客户信息
// DistributionReservationEntity reservationEntity = distributionReservationService.getById(reservationId);
//通过订单id和库位心系,托盘信息查询对应的库存品列表
DistributionStockupStockListInfoVO entity = distributionStockListService.selectStockListInfo(reservationId, stockListId);
DistributionStockupStockListInfoVO entity = distributionStockListService.selectStockListInfo(reservationId, stockListId,allocationId);
List<StockListInfoListVO> list = distributionStockListService.selectStockListInfoList(reservationId, stockListId);
entity.setStockList(list);
@ -1766,4 +1770,9 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
return baseMapper.getLocationSelection(stockupDTO);
}
@Override
public List<DistributionStockupTrayVO> getLocationMarketSelection(StockupDTO stockupDTO) {
return baseMapper.getLocationMarketSelection(stockupDTO);
}
}

14
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/feign/WarehouseUpdownGoodsClient.java

@ -6,6 +6,7 @@ import com.logpm.warehouse.entity.WarehouseUpdownGoodsEntity;
import com.logpm.warehouse.service.IWarehouseUpdownGoodsService;
import lombok.AllArgsConstructor;
import org.springblade.core.tenant.annotation.NonDS;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
@ -50,6 +51,7 @@ public class WarehouseUpdownGoodsClient implements IWarehouseUpdownGoodsClient {
@Override
@PostMapping(SELECTSTOCKLISTOWE)
public Long selectStockListOwe(WarehouseUpdownGoodsEntity updownGoodsEntity) {
WarehouseUpdownGoodsEntity one = warehouseUpdownGoodsService.getOne(Wrappers.<WarehouseUpdownGoodsEntity>query().lambda()
.eq(WarehouseUpdownGoodsEntity::getAssociationId, updownGoodsEntity.getAssociationId())
@ -61,6 +63,7 @@ public class WarehouseUpdownGoodsClient implements IWarehouseUpdownGoodsClient {
}
@Override
@PostMapping(LOCATIONINFORMATION)
public WarehouseUpdownGoodsEntity getLocationInformation(WarehouseUpdownGoodsEntity updownGoodsEntity) {
return warehouseUpdownGoodsService.getOne(Wrappers.<WarehouseUpdownGoodsEntity>query().lambda()
@ -68,4 +71,15 @@ public class WarehouseUpdownGoodsClient implements IWarehouseUpdownGoodsClient {
.eq(WarehouseUpdownGoodsEntity::getAssociationValue,updownGoodsEntity.getAssociationValue())
);
}
@Override
@PostMapping(LOCATIONSTOCKLISTINFORMATION)
public WarehouseUpdownGoodsEntity getLocationStockListInformation(WarehouseUpdownGoodsEntity warehouseUpdownGoodsEntity) {
return warehouseUpdownGoodsService.getOne(Wrappers.<WarehouseUpdownGoodsEntity>query().lambda()
.eq(WarehouseUpdownGoodsEntity::getAllocationId,warehouseUpdownGoodsEntity.getAllocationId())
.eq(WarehouseUpdownGoodsEntity::getAssociationType,warehouseUpdownGoodsEntity.getAssociationType())
.eq(WarehouseUpdownGoodsEntity::getMarketId,warehouseUpdownGoodsEntity.getMarketId())
.eq(WarehouseUpdownGoodsEntity::getIncomingBatch,warehouseUpdownGoodsEntity.getIncomingBatch())
);
}
}

Loading…
Cancel
Save