Browse Source

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

training
pref_mail@163.com 1 year ago
parent
commit
01309a316c
  1. 3
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java
  2. 4
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionParcelListController.java
  3. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockController.java
  4. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryInfoMapper.xml
  5. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
  6. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java
  7. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationPackageMapper.xml
  8. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java
  9. 21
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java
  10. 12
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  11. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java
  12. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

3
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/DistributionParcelListVO.java

@ -36,7 +36,8 @@ import java.util.Date;
public class DistributionParcelListVO extends DistributionParcelListEntity {
private static final long serialVersionUID = 1L;
private String stockupStatus;
private String stockupStatus; //备货状态
private String stockupStatusName; //备货名称
private Date stockupDate;
private String stockupArea;
private String goodsAllocation;

4
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionParcelListController.java

@ -102,9 +102,9 @@ public class DistributionParcelListController extends BladeController {
@GetMapping("/parcelListOwn")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入distributionParcelList")
public R<IPage<DistributionParcelListEntity>> getParcelListOwn(@ApiIgnore @RequestParam Map<String, Object> distributionParcelList, Query query) {
public R<IPage<DistributionParcelListVO>> getParcelListOwn(@ApiIgnore @RequestParam Map<String, Object> distributionParcelList, Query query) {
IPage<DistributionParcelListEntity> pages = distributionParcelListService.getParcelListOwn(Condition.getPage(query), distributionParcelList);
IPage<DistributionParcelListVO> pages = distributionParcelListService.getParcelListOwn(Condition.getPage(query), distributionParcelList);
return R.data(pages);
}

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

@ -100,6 +100,17 @@ public class DistributionStockController extends BladeController {
return R.status(distributionStockService.save(distributionStock));
}
/**
* 库存品详情信息 新增
*/
@PostMapping("/addStockDetail")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入distributionStock")
public R addStockDetail(@Valid @RequestBody DistributionStockEntity distributionStock) {
distributionStockService.save(distributionStock);
return R.status(true);
}
/**
* 库存品详情信息 修改
*/

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

@ -301,7 +301,7 @@
ldr.reservation_num reservationNum,
COALESCE(lds.loaded_number + lds.loadedin_number, 0) loadingNub,
(SELECT COALESCE(COUNT(*), 0) from logpm_distribution_reservation_stockarticle ldrs WHERE ldrs.reservation_id =ldr.id ) ordNub,
COALESCE(lds.loaded_number + lds.loadedin_number, 0) signNub
COALESCE(lds.received_quantity + lds.receivedin_quantity, 0) signNub
FROM
logpm_distribution_signfor lds
JOIN logpm_distribution_reservation ldr ON ldr.id = lds.reservation_id

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

@ -396,7 +396,7 @@
</where>
</select>
<select id="selectdeliverywork" resultType="com.logpm.distribution.entity.DistributionLoadscanEntity">
SELECT
<!-- SELECT
ldpl.id packageId,
ldrs.stock_article_id orderId,
ldpl.order_package_code orderPackageCode,
@ -411,7 +411,14 @@
JOIN logpm_distribution_delivery_list lddl on lddl.id = lds.delivery_id
join logpm_distribution_parcel_list ldpl on ldrp.parce_list_id = ldpl.id
where
lds.is_deleted =0 and lddl.id = #{deliveryId} and ldpl.order_package_code =#{barcode}
lds.is_deleted =0 and lddl.id = #{deliveryId} and ldpl.order_package_code =#{barcode} -->
select ldrp.parce_list_id packageId,ldrp.stock_article_id orderId ,ldrp.packet_bar_code orderPackageCode,ldrp.reservation_id reservationId,
lds.train_number trainNumber, lds.delivery_id deliveryId , ldpl.quantity packageNub
FROM logpm_distribution_reservation_package ldrp
LEFT JOIN logpm_distribution_signfor lds on lds.reservation_id = ldrp.reservation_id
INNER JOIN logpm_distribution_parcel_list ldpl on ldpl.id = ldrp.parce_list_id
where ldrp.packet_bar_code = #{barcode} and lds.delivery_id = #{deliveryId} and ldrp.packet_bar_status in (1,3) and lds.is_deleted = 0
</select>
<select id="selectdeliverypallet" resultType="com.logpm.distribution.entity.DistributionLoadscanEntity">

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

@ -62,7 +62,7 @@ public interface DistributionParcelListMapper extends BaseMapper<DistributionPar
List<String> selectPalletByReservationId(@Param("reservationId") Long reservationId);
IPage<DistributionParcelListEntity> getParcelListOwn(IPage<Object> page,@Param("id") Long id);
IPage<DistributionParcelListVO> getParcelListOwn(IPage<Object> page,@Param("id") Long id);
/**
* 查询订单下的包件信息 VO封装

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

@ -65,7 +65,7 @@
<select id="getOrderPackageListByOrderCode" resultType="com.logpm.distribution.vo.app.DistributionAppParcelListVO">
SELECT DISTINCT
<!-- SELECT DISTINCT
ldpl.*,
IF ( (
SELECT id
@ -77,7 +77,11 @@ FROM
logpm_distribution_reservation_package ldrp
INNER JOIN logpm_distribution_parcel_list ldpl ON ldrp.parce_list_id = ldpl.id
WHERE
ldrp.stock_article_id = #{id}
ldrp.stock_article_id = #{id} -->
select DISTINCT ldrp.packet_bar_code packetBarCode,ldsa.description_goods description_goods
from logpm_distribution_reservation_package ldrp
left JOIN logpm_distribution_stock_article ldsa on ldsa.id = ldrp.stock_article_id
WHERE ldrp.stock_article_id = #{id} and ldrp.packet_bar_status in (1,3)
</select>
<select id="getReservationPackageList" resultType="com.logpm.distribution.entity.DistributionParcelListEntity">

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

@ -66,7 +66,7 @@ public interface IDistributionParcelListService extends BaseService<Distribution
* @param distributionParcelList
* @return
*/
IPage<DistributionParcelListEntity> getParcelListOwn(IPage<Object> page, Map<String, Object> distributionParcelList);
IPage<DistributionParcelListVO> getParcelListOwn(IPage<Object> page, Map<String, Object> distributionParcelList);
/**

21
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryInfoServiceImpl.java

@ -16,12 +16,17 @@
*/
package com.logpm.distribution.service.impl;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.distribution.dto.DistributionDeliveryInfoDTO;
import com.logpm.distribution.dto.DistributionReservationPackageDTO;
import com.logpm.distribution.dto.app.DistributionAppDeliveryListDTO;
import com.logpm.distribution.entity.DistributionDeliveryInfoEntity;
import com.logpm.distribution.entity.DistributionLoadscanEntity;
import com.logpm.distribution.entity.DistributionLoadscanordEntity;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.mapper.DistributionReservationPackageMapper;
import com.logpm.distribution.service.IDistributionLoadscanService;
import com.logpm.distribution.service.IDistributionLoadscanordService;
import com.logpm.distribution.vo.DistributionDeliveryInfoVO;
import com.logpm.distribution.excel.DistributionDeliveryInfoExcel;
import com.logpm.distribution.mapper.DistributionDeliveryInfoMapper;
@ -31,6 +36,7 @@ import com.logpm.distribution.vo.DistributionStockListVO;
import com.logpm.distribution.vo.app.*;
import com.logpm.distribution.wrapper.DistributionParcelListAppWrapper;
import com.logpm.distribution.wrapper.DistributionParcelListWrapper;
import lombok.AllArgsConstructor;
import org.checkerframework.checker.units.qual.A;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.Func;
@ -51,11 +57,13 @@ import java.util.List;
* @since 2023-06-16
*/
@Service
@AllArgsConstructor
public class DistributionDeliveryInfoServiceImpl extends BaseServiceImpl<DistributionDeliveryInfoMapper, DistributionDeliveryInfoEntity> implements IDistributionDeliveryInfoService {
@Autowired
private DistributionReservationPackageMapper distributionReservationPackageMapper;
private IDistributionLoadscanService distributionLoadscanService;
@Override
public IPage<DistributionDeliveryInfoVO> selectDistributionDeliveryInfoPage(IPage<DistributionDeliveryInfoVO> page, DistributionDeliveryInfoVO distributionDeliveryInfo) {
List<DistributionDeliveryInfoVO> distributionDeliveryInfoVOS = baseMapper.selectDistributionDeliveryInfoPage(page, distributionDeliveryInfo);
@ -114,6 +122,17 @@ public class DistributionDeliveryInfoServiceImpl extends BaseServiceImpl<Distrib
distributionAppStockArticleVOS.forEach(e -> {
// 需要根据当前的客户的ID查询对应的包件信息
List<DistributionAppParcelListVO> ks =distributionReservationPackageMapper.getOrderPackageListByOrderCode(e.getStockArticleId());
ks.forEach( k ->{
List<DistributionLoadscanEntity> list = distributionLoadscanService.list(Wrappers.<DistributionLoadscanEntity>query().lambda()
.eq(DistributionLoadscanEntity::getOrderPackageCode, k.getOrderPackageCode())
.apply("scan_status != 1")
);
if(list.size() > 0){
k.setScanStatus(2);
}else{
k.setScanStatus(1);
}
});
e.setDistributionAppParcelListVOS(ks);
if (e.getLoadingNub() == 0) {

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

@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
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.entity.BasicdataDriverArteryEntity;
import com.logpm.basicdata.feign.IBasicdataDriverArteryClient;
@ -288,6 +289,16 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
@Override
@Transactional(isolation = Isolation.READ_COMMITTED, rollbackFor = Exception.class)
public Resp loadingscan(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) {
String s = distrilbutionloadingscanDTO.getBarcode() + distrilbutionloadingscanDTO.getReservationId();
String barcode = distrilbutionloadingscanDTO.getBarcode();
Object o = bladeRedis.get(barcode);
if(ObjectUtils.isNotNull(o)){
bladeRedis.del(barcode);
return Resp.scanSuccess("重复扫描!!","重复扫描!!");
}
bladeRedis.setEx(barcode,s, 500L);
//获取当前用户司机
DistributionDeliveryListEntity distributionDeliveryListEntity = distributionDeliveryListMapper.selectById(distrilbutionloadingscanDTO.getDeliveryId());
DistributionDeliverySelfEntity distributionDeliverySelfEntity = new DistributionDeliverySelfEntity();
@ -853,6 +864,7 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
@Override
public R loadingscanoff(DistrilbutionloadingscanDTO distrilbutionloadingscanDTO) {
//查询是否重复扫码
List<DistributionLoadscanEntity> distributionLoadscanEntitiesflag = distributionLoadscanMapper.selectList(new QueryWrapper<DistributionLoadscanEntity>().lambda()
.eq(DistributionLoadscanEntity::getDeliveryId, distrilbutionloadingscanDTO.getDeliveryId())

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

@ -91,9 +91,13 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
* @return
*/
@Override
public IPage<DistributionParcelListEntity> getParcelListOwn(IPage<Object> page, Map<String, Object> distributionParcelList) {
public IPage<DistributionParcelListVO> getParcelListOwn(IPage<Object> page, Map<String, Object> distributionParcelList) {
Object o = distributionParcelList.get("id");
return baseMapper.getParcelListOwn(page, Long.parseLong((String) o) );
IPage<DistributionParcelListVO> parcelListOwn = baseMapper.getParcelListOwn(page, Long.parseLong((String) o));
parcelListOwn.getRecords().forEach(i ->{
i.setStockupStatusName(DictBizCache.getValue(DictBizConstant.STOCKUP_STATUS,i.getStockupStatus()));
});
return parcelListOwn;
}
@Override

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

@ -409,7 +409,11 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
*/
@Override
public IPage<DistributionStockupVO> detailReservationOwn(IPage page, Long id) {
return baseMapper.detailReservationOwn(page,id);
IPage<DistributionStockupVO> iPage = baseMapper.detailReservationOwn(page, id);
iPage.getRecords().forEach(i ->{
i.setStockupStatusName(DictBizCache.getValue(DictBizConstant.STOCKUP_STATUS,i.getStockupStatus()));
});
return iPage;
}
@Override

Loading…
Cancel
Save