Browse Source

1.干线bug修复

dist.1.2.0^2
zhenghaoyu 5 months ago
parent
commit
7417f8ac15
  1. 5
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java
  2. 1
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java
  3. 15
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/ZeroPackageDTO.java
  4. 51
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineScanZeroDetailEntity.java
  5. 5
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/LoadZeroListVO.java
  6. 15
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/ZeroPackageVO.java
  7. 14
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionParcelListClient.java
  8. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.java
  9. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionParcelListMapper.xml
  10. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionParcelListService.java
  11. 20
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java
  12. 6
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/api/CarsLoadApiController.java
  13. 12
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineScanZeroDetailMapper.java
  14. 3
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java
  15. 7
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineScanZeroDetailService.java
  16. 5
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java
  17. 120
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  18. 15
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineScanZeroDetailServiceImpl.java

5
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionParcelListClient.java

@ -16,6 +16,7 @@
*/
package com.logpm.distribution.feign;
import com.alibaba.fastjson.JSONObject;
import com.logpm.distribution.dto.FindParamterDTO;
import com.logpm.distribution.dto.OrderPackageDTO;
import com.logpm.distribution.entity.DistributionParcelListEntity;
@ -211,6 +212,10 @@ public interface IDistributionParcelListClient {
@PostMapping(API_PREFIX + "/clearPallet")
void clearPallet(@RequestBody List<Long> orderPackageIdList);
@GetMapping(API_PREFIX + "/findPackageGoodsListByWaybillNo")
List<JSONObject> findPackageGoodsListByWaybillNo(@RequestParam String waybillNo);
@GetMapping(API_PREFIX + "/findListByStockArticleId")
List<DistributionParcelListEntity> findListByStockArticleId(@RequestParam Long articleId);
}

1
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/LoadCarsDTO.java

@ -61,6 +61,7 @@ public class LoadCarsDTO implements Serializable {
private String orderPackageCode;
private List<ProductInfoDTO> productInfoList = new ArrayList<>();
private List<ZeroPackageDTO> zeroPackageList = new ArrayList<>();
private String goodsName;

15
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/dto/ZeroPackageDTO.java

@ -0,0 +1,15 @@
package com.logpm.trunkline.dto;
import lombok.Data;
import java.io.Serializable;
@Data
public class ZeroPackageDTO implements Serializable {
private Long packageId;
private Long goodsId;
private String goodsName;//品类名称
private Integer enterNum;//装车数量
}

51
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/entity/TrunklineScanZeroDetailEntity.java

@ -0,0 +1,51 @@
package com.logpm.trunkline.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;
@Data
@TableName("logpm_trunkline_scan_zero_detail")
@ApiModel(value = "TrunklineScanZeroDetail对象", description = "装车扫描零担明细表")
@EqualsAndHashCode(callSuper = true)
public class TrunklineScanZeroDetailEntity extends TenantEntity {
/** 预留1 */
@ApiModelProperty(name = "预留1",notes = "")
private String reserve1 ;
/** 预留2 */
@ApiModelProperty(name = "预留2",notes = "")
private String reserve2 ;
/** 预留3 */
@ApiModelProperty(name = "预留3",notes = "")
private String reserve3 ;
/** 预留4 */
@ApiModelProperty(name = "预留4",notes = "")
private String reserve4 ;
/** 预留5 */
@ApiModelProperty(name = "预留5",notes = "")
private String reserve5 ;
/** scanId */
@ApiModelProperty(name = "装车扫描id",notes = "")
private Long scanId ;
/** packageId */
@ApiModelProperty(name = "包件id",notes = "")
private Long packageId ;
/** goodsId */
@ApiModelProperty(name = "品类id",notes = "")
private Long goodsId ;
/** goodsName */
@ApiModelProperty(name = "品类名称",notes = "")
private String goodsName ;
/** loadingNum */
@ApiModelProperty(name = "装车数量",notes = "")
private Integer loadingNum ;
/** unloadNum */
@ApiModelProperty(name = "卸车数量",notes = "")
private Integer unloadNum ;
}

5
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/LoadZeroListVO.java

@ -3,6 +3,8 @@ package com.logpm.trunkline.vo;
import lombok.Data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
@Data
public class LoadZeroListVO implements Serializable {
@ -12,4 +14,7 @@ public class LoadZeroListVO implements Serializable {
private Integer planNum;//计划装车件数
private Integer loadingNum;//已装车件数
private Integer unloadingNum;//已卸车件数
private List<ZeroPackageVO> zeroPackageList = new ArrayList<>();
}

15
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/ZeroPackageVO.java

@ -0,0 +1,15 @@
package com.logpm.trunkline.vo;
import lombok.Data;
import java.io.Serializable;
@Data
public class ZeroPackageVO implements Serializable {
private Long packageId;
private Long goodsId;
private String goodsName;//品类名称
private Integer stockNum;//品类在库件数
}

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

@ -18,6 +18,7 @@ package com.logpm.distribution.feign;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
@ -502,4 +503,17 @@ public class DistributionParcelListClient implements IDistributionParcelListClie
public void clearPallet(List<Long> orderPackageIdList) {
distributionParcelListService.clearPalletByIds(orderPackageIdList);
}
@Override
public List<JSONObject> findPackageGoodsListByWaybillNo(String waybillNo) {
return distributionParcelListService.findPackageGoodsListByWaybillNo(waybillNo);
}
@Override
public List<DistributionParcelListEntity> findListByStockArticleId(Long articleId) {
QueryWrapper<DistributionParcelListEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("stock_article_id",articleId);
return distributionParcelListService.list(queryWrapper);
}
}

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

@ -16,6 +16,7 @@
*/
package com.logpm.distribution.mapper;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.dto.DistributionParcelListDTO;
@ -296,4 +297,6 @@ public interface DistributionParcelListMapper extends BaseMapper<DistributionPar
String findAllAllocationByNoParcelListIds(@Param("parcelListIdList") List<Long> parcelListIdList, @Param("orderCode") String orderCode);
void clearAllocationByIds(@Param("clearTrayList") List<Long> clearTrayList);
List<JSONObject> findPackageGoodsListByWaybillNo(@Param("waybillNo") String waybillNo);
}

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

@ -1874,4 +1874,15 @@
</foreach>
</update>
<select id="findPackageGoodsListByWaybillNo" resultType="com.alibaba.fastjson.JSONObject">
select ldpl.id packageId,
lwwd.product_id goodsId,
lwwd.product_name goodsName,
ldpl.quantity stockNum
from logpm_distribution_parcel_list ldpl
left join logpm_warehouse_waybill_detail lwwd on lwwd.id = ldpl.advanceId
where lwwd.order_code = #{waybillNo}
</select>
</mapper>

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

@ -16,6 +16,7 @@
*/
package com.logpm.distribution.service;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.dto.app.StockupDTO;
import com.logpm.distribution.entity.DistributionParcelListEntity;
@ -255,4 +256,6 @@ public interface IDistributionParcelListService extends BaseService<Distribution
void clearAllocationByIds(List<Long> clearTrayList);
List<JSONObject> findPackageGoodsListByWaybillNo(String waybillNo);
}

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

@ -32,23 +32,12 @@ import com.logpm.basicdata.feign.IBasicdataClientClient;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.distribution.dto.DistributionParcelListDTO;
import com.logpm.distribution.dto.app.StockupDTO;
import com.logpm.distribution.entity.DistributionParcelDetailsEntity;
import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.entity.DistributionParcelNumberEntity;
import com.logpm.distribution.entity.DistributionReservationZeroPackageEntity;
import com.logpm.distribution.entity.DistributionStockArticleEntity;
import com.logpm.distribution.entity.DistributionStockListEntity;
import com.logpm.distribution.entity.DistributionStockListInfoEntity;
import com.logpm.distribution.entity.DistrilbutionBillPackageEntity;
import com.logpm.distribution.entity.*;
import com.logpm.distribution.excel.DistributionParcelListExcel;
import com.logpm.distribution.mapper.DistributionParcelListMapper;
import com.logpm.distribution.mapper.DistributionStockArticleMapper;
import com.logpm.distribution.service.*;
import com.logpm.distribution.vo.DistributionParcelListBaseVO;
import com.logpm.distribution.vo.DistributionParcelListNodeVO;
import com.logpm.distribution.vo.DistributionParcelListVO;
import com.logpm.distribution.vo.DistributionParcelListZeroVO;
import com.logpm.distribution.vo.PackageStockupVO;
import com.logpm.distribution.vo.*;
import com.logpm.trunkline.feign.ITrunklinePackageTrackLogClient;
import com.logpm.warehouse.entity.WarehouseUpdownGoodsEntity;
import com.logpm.warehouse.entity.WarehouseWaybillEntity;
@ -1360,6 +1349,11 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
baseMapper.clearAllocationByIds(clearTrayList);
}
@Override
public List<JSONObject> findPackageGoodsListByWaybillNo(String waybillNo) {
return baseMapper.findPackageGoodsListByWaybillNo(waybillNo);
}
private JSONObject handleLogJSONObject(BasicdataWarehouseEntity warehouse, BladeUser user, String orderPackageCode, String content, Integer node) {
JSONObject trunklinePackageTrackLog = new JSONObject();

6
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/api/CarsLoadApiController.java

@ -6,6 +6,7 @@ import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.trunkline.dto.LoadCarsDTO;
import com.logpm.trunkline.dto.LoadingPackageDTO;
import com.logpm.trunkline.dto.LoadingZeroDTO;
import com.logpm.trunkline.dto.ZeroPackageDTO;
import com.logpm.trunkline.service.ITrunklineCarsLoadService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -420,8 +421,7 @@ public class CarsLoadApiController {
String trayCode = loadCarsDTO.getTrayCode();
Integer enterNum = loadCarsDTO.getEnterNum();
String orderCode = loadCarsDTO.getOrderCode();
// List<ProductInfoDTO> productInfoList = loadCarsDTO.getProductInfoList();
List<ZeroPackageDTO> zeroPackageList = loadCarsDTO.getZeroPackageList();
try{
//当前登录人选择的仓库
@ -457,7 +457,7 @@ public class CarsLoadApiController {
// return R.fail(405,"零担品类信息为空");
// }
return carsLoadService.loadingZero(loadId,myCurrentWarehouse.getId(),waybillNo,orderCode,trayCode,enterNum,"正常装车");
return carsLoadService.loadingZero(loadId,myCurrentWarehouse.getId(),waybillNo,orderCode,trayCode,enterNum,"正常装车",zeroPackageList);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);

12
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineScanZeroDetailMapper.java

@ -0,0 +1,12 @@
package com.logpm.trunkline.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.logpm.trunkline.entity.TrunklineScanZeroDetailEntity;
import org.mapstruct.Mapper;
@Mapper
public interface TrunklineScanZeroDetailMapper extends BaseMapper<TrunklineScanZeroDetailEntity> {
}

3
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineCarsLoadService.java

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.trunkline.dto.BatchUnloadDTO;
import com.logpm.trunkline.dto.LoadCarsDTO;
import com.logpm.trunkline.dto.TrunklineCarsLoadDTO;
import com.logpm.trunkline.dto.ZeroPackageDTO;
import com.logpm.trunkline.entity.TrunklineCarsLoadEntity;
import com.logpm.trunkline.vo.LoadingDetailExportVO;
import com.logpm.trunkline.vo.TripartiteTransferVO;
@ -76,7 +77,7 @@ public interface ITrunklineCarsLoadService extends BaseService<TrunklineCarsLoad
R loadingScan(Long loadId,Long warehouseId,String orderPackageCode,String trayCode,String remark);
R loadingZero(Long loadId, Long warehouseId, String waybillNo,String orderCode, String trayCode, Integer enterNum,String remark);
R loadingZero(Long loadId, Long warehouseId, String waybillNo,String orderCode, String trayCode, Integer enterNum,String remark,List<ZeroPackageDTO> zeroPackageList);
R findZeroAllocation(String orderCode, Long warehouseId);

7
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/ITrunklineScanZeroDetailService.java

@ -0,0 +1,7 @@
package com.logpm.trunkline.service;
import com.logpm.trunkline.entity.TrunklineScanZeroDetailEntity;
import org.springblade.core.mp.base.BaseService;
public interface ITrunklineScanZeroDetailService extends BaseService<TrunklineScanZeroDetailEntity> {
}

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

@ -4678,10 +4678,14 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
List<DistributionParcelNumberEntity> parcelNumberList = new ArrayList<>();
for (WarehouseWayBillDetail warehouseWayBillDetail : wayBillDetailList) {
DistributionParcelListEntity entity = new DistributionParcelListEntity();
entity.setBrandId(warehouseWaybill.getBrandId());
entity.setBrandName(warehouseWaybill.getBrand());
entity.setDealerName(warehouseWaybill.getConsignee());
entity.setFirsts(warehouseWayBillDetail.getProductName());
entity.setWarehouseId(distributionStockArticleEntity.getWarehouseId());
entity.setWarehouse(distributionStockArticleEntity.getWarehouse());
entity.setQuantity(warehouseWayBillDetail.getNum());
entity.setTrainNumber(warehouseWaybill.getCustomerTrain());
entity.setConditions(1);
entity.setStockArticleId(orderId);
entity.setOrderCode(distributionStockArticleEntity.getOrderCode());
@ -4694,6 +4698,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
entity.setWaybillId(warehouseWaybill.getId());
entity.setWaybillNumber(warehouseWaybill.getWaybillNo());
entity.setIsZero("1");
entity.setAdvanceId(warehouseWayBillDetail.getId());
entity.setWarehouseEntryTimeEnd(date);
entity.setSendWarehouseId(departureWarehouseId);
entity.setSendWarehouseName(departureWarehouseName);

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

@ -122,6 +122,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
private final ITrunklinePackageTrackLogClient packageTrackLogClient;
private final IAftersalesWorkOrderClient aftersalesWorkOrderClient;
private final ITrunklineWaybillTrackService waybillTrackService;
private final ITrunklineScanZeroDetailService scanZeroDetailService;
@Override
public IPage<TrunklineCarsLoadVO> loadCarsPageList(LoadCarsDTO loadCarsDTO) {
@ -3015,8 +3016,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
}
}
@Transactional(rollbackFor = Exception.class)
@Override
public R loadingZero(Long loadId, Long warehouseId, String waybillNo, String orderCode, String trayCode, Integer enterNum, String remark) {
public R loadingZero(Long loadId, Long warehouseId, String waybillNo, String orderCode, String trayCode, Integer enterNum, String remark,List<ZeroPackageDTO> zeroPackageList) {
TrunklineCarsLoadEntity carsLoadEntity = baseMapper.selectById(loadId);
if (Objects.isNull(carsLoadEntity)) {
@ -3071,6 +3073,28 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
Long fromWarehouseId = stockArticleEntity.getWarehouseId();
Long articleId = stockArticleEntity.getId();
Integer handQuantity = stockArticleEntity.getHandQuantity();
Integer totalNumber = stockArticleEntity.getTotalNumber();
List<DistributionParcelListEntity> parcelListEntities = distributionParcelListClient.findListByStockArticleId(articleId);
//把parcelListEntities转化为id作为key的Map
Map<Long, DistributionParcelListEntity> parcelListMapById = parcelListEntities.stream().collect(Collectors.toMap(DistributionParcelListEntity::getId, Function.identity()));
//把parcelListEntities转化成以firsts作为key的map
Map<String, DistributionParcelListEntity> parcelListMap = parcelListEntities.stream().collect(Collectors.toMap(DistributionParcelListEntity::getFirsts, Function.identity()));
if(CollUtil.isNotEmpty(zeroPackageList)){
for (ZeroPackageDTO zeroPackageDTO : zeroPackageList) {
Integer en = zeroPackageDTO.getEnterNum();
String gn = zeroPackageDTO.getGoodsName();
DistributionParcelListEntity parcelList = parcelListMap.get(gn);
if(Objects.isNull(parcelList)){
log.warn("##################loadingZero: 品类信息不存在 gn={}", gn);
return R.fail(405, "品类信息有误");
}
}
}
Long loadScanId = null;
Integer isAbnormal = 0;
Integer isData = 1;
@ -3152,6 +3176,51 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
carsLoadScanEntity.setLoadingUserName(AuthUtil.getNickName());
trunklineCarsLoadScanService.save(carsLoadScanEntity);
loadScanId = carsLoadScanEntity.getId();
List<TrunklineScanZeroDetailEntity> zeroDetailList = new ArrayList<>();
List<DistributionParcelListEntity> updateParceList = new ArrayList<>();
if(CollUtil.isNotEmpty(zeroPackageList)){
Long finalLoadScanId = loadScanId;
zeroPackageList.forEach(zeroPackageDTO -> {
TrunklineScanZeroDetailEntity scanZeroDetailEntity = new TrunklineScanZeroDetailEntity();
scanZeroDetailEntity.setGoodsId(zeroPackageDTO.getGoodsId());
scanZeroDetailEntity.setScanId(finalLoadScanId);
scanZeroDetailEntity.setGoodsName(zeroPackageDTO.getGoodsName());
scanZeroDetailEntity.setPackageId(zeroPackageDTO.getPackageId());
scanZeroDetailEntity.setLoadingNum(zeroPackageDTO.getEnterNum());
scanZeroDetailEntity.setUnloadNum(0);
zeroDetailList.add(scanZeroDetailEntity);
DistributionParcelListEntity parcelList = parcelListMap.get(zeroPackageDTO.getGoodsName());
Integer quantity = parcelList.getQuantity();
DistributionParcelListEntity updateEntity = new DistributionParcelListEntity();
updateEntity.setId(parcelList.getId());
updateEntity.setQuantity(quantity-zeroPackageDTO.getEnterNum());
updateParceList.add(updateEntity);
});
}else{
if(enterNum == handQuantity){
Long finalLoadScanId = loadScanId;
parcelListEntities.forEach(entity -> {
Long waybillDetailId = entity.getAdvanceId();
WarehouseWayBillDetail entityByWaybillDetailId = warehouseWaybillDetailClient.findEntityByWaybillDetailId(waybillDetailId);
TrunklineScanZeroDetailEntity scanZeroDetailEntity = new TrunklineScanZeroDetailEntity();
scanZeroDetailEntity.setGoodsId(entityByWaybillDetailId.getProductId());
scanZeroDetailEntity.setScanId(finalLoadScanId);
scanZeroDetailEntity.setGoodsName(entityByWaybillDetailId.getProductName());
scanZeroDetailEntity.setPackageId(entity.getId());
scanZeroDetailEntity.setLoadingNum(entityByWaybillDetailId.getNum());
scanZeroDetailEntity.setUnloadNum(0);
zeroDetailList.add(scanZeroDetailEntity);
Integer quantity = entity.getQuantity();
DistributionParcelListEntity updateEntity = new DistributionParcelListEntity();
updateEntity.setId(entity.getId());
updateEntity.setQuantity(quantity-entityByWaybillDetailId.getNum());
updateParceList.add(updateEntity);
});
}
}
scanZeroDetailService.saveBatch(zeroDetailList);
distributionParcelListClient.updateList(updateParceList);
difficult = enterNum;
distributionStockArticleClient.submitHandleNumByOrderId(enterNum, articleId);
} else {
@ -3178,6 +3247,41 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
carsLoadScanEntity.setNum(enterNum);
trunklineCarsLoadScanService.updateById(carsLoadScanEntity);
distributionStockArticleClient.submitHandleNumByOrderId(difficult, articleId);
List<TrunklineScanZeroDetailEntity> zeroDetailList = new ArrayList<>();
List<DistributionParcelListEntity> updateParceList = new ArrayList<>();
QueryWrapper<TrunklineScanZeroDetailEntity> queryWrapper1 = new QueryWrapper<>();
queryWrapper1.eq("scanId",loadScanId);
List<TrunklineScanZeroDetailEntity> scanZeroDetailEntities = scanZeroDetailService.list(queryWrapper1);
//把scanZeroDetailEntities中所有元素的scanId作为key转为Map
Map<Long, TrunklineScanZeroDetailEntity> map = scanZeroDetailEntities.stream().collect(Collectors.toMap(TrunklineScanZeroDetailEntity::getPackageId, Function.identity()));
for (ZeroPackageDTO zeroPackageDTO : zeroPackageList) {
Long packageId = zeroPackageDTO.getPackageId();
Integer enterNum1 = zeroPackageDTO.getEnterNum();
TrunklineScanZeroDetailEntity scanZeroDetailEntity = map.get(packageId);
if(Objects.isNull(scanZeroDetailEntity)){
log.warn("##################loadingZero: 品类信息不存在 packageId={}", packageId);
return R.fail(405, "品类信息有误");
}
DistributionParcelListEntity parcelList = parcelListMapById.get(packageId);
if(Objects.isNull(parcelList)){
log.warn("##################loadingZero: 包件信息不存在 packageId={}", packageId);
return R.fail(405, "包件信息不存在");
}
Integer quantity = parcelList.getQuantity();
Integer loadingNum = scanZeroDetailEntity.getLoadingNum();
int i2 = enterNum1 - loadingNum;
parcelList.setQuantity(quantity-i2);
updateParceList.add(parcelList);
scanZeroDetailEntity.setLoadingNum(enterNum1);
zeroDetailList.add(scanZeroDetailEntity);
}
distributionParcelListClient.updateList(updateParceList);
scanZeroDetailService.updateBatchById(zeroDetailList);
}
audio = (enterNum)+"件";
@ -5929,7 +6033,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
String waybillNo = e.getWaybillNo();
Integer planNum = e.getPlanNum();
if (realNum < planNum) {
loadingZero(loadId, warehouseId, waybillNo, orderCode, null, planNum, "手动一键装车");
loadingZero(loadId, warehouseId, waybillNo, orderCode, null, planNum, "手动一键装车",null);
}
});
@ -6939,7 +7043,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
String waybillNo = loadingZeroDTO.getWaybillNo();
Integer enterNum = loadingZeroDTO.getEnterNum();
String orderCode = loadingZeroDTO.getOrderCode();
loadingZero(loadId, warehouseId, waybillNo, orderCode, trayCode, enterNum, "整托正常装车");
loadingZero(loadId, warehouseId, waybillNo, orderCode, trayCode, enterNum, "整托正常装车",null);
zeroNum = zeroNum + enterNum;
}
@ -6966,6 +7070,16 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
//查询已装车的零担
List<LoadZeroListVO> zeroList = trunklineCarsOrderService.findZeroList(loadId, warehouseId);
zeroList.forEach(loadZeroListVO -> {
String waybillNo = loadZeroListVO.getWaybillNo();
List<JSONObject> zeroPackageList = distributionParcelListClient.findPackageGoodsListByWaybillNo(waybillNo);
List<ZeroPackageVO> ls = new ArrayList<>();
zeroPackageList.forEach(jsonObject -> {
ls.add(jsonObject.toJavaObject(ZeroPackageVO.class));
});
loadZeroListVO.setZeroPackageList(ls);
});
//查询异常列表
QueryWrapper<TrunklineCarsLoadScanEntity> queryWrapper = new QueryWrapper<>();

15
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineScanZeroDetailServiceImpl.java

@ -0,0 +1,15 @@
package com.logpm.trunkline.service.impl;
import com.logpm.trunkline.entity.TrunklineScanZeroDetailEntity;
import com.logpm.trunkline.mapper.TrunklineScanZeroDetailMapper;
import com.logpm.trunkline.service.ITrunklineScanZeroDetailService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;
@Service
@AllArgsConstructor
@Slf4j
public class TrunklineScanZeroDetailServiceImpl extends BaseServiceImpl<TrunklineScanZeroDetailMapper, TrunklineScanZeroDetailEntity> implements ITrunklineScanZeroDetailService {
}
Loading…
Cancel
Save