Browse Source

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

newStockUp
caoyizhong 1 year ago
parent
commit
3f6d9e11a9
  1. 3
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockListClient.java
  2. 5
      blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppReservationVO.java
  3. 1
      blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/UnloadPackageVO.java
  4. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataWarehouseServiceImpl.java
  5. 5
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/feign/DistributionStockListClient.java
  6. 16
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
  7. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionReservationMapper.xml
  8. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.java
  9. 6
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionStockListMapper.xml
  10. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockListService.java
  11. 2
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java
  12. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionParcelListServiceImpl.java
  13. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockListServiceImpl.java
  14. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java
  15. 2
      blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/IFactoryOrderService.java
  16. 3
      blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/FactoryOrderServiceImpl.java
  17. 7
      blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java
  18. 43
      blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java
  19. 34
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java
  20. 31
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/TripartiteTransferController.java
  21. 3
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml
  22. 2
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadingLogMapper.xml
  23. 7
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml
  24. 4
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsUnloadLogMapper.xml
  25. 69
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java
  26. 5
      blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java

3
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/feign/IDistributionStockListClient.java

@ -127,4 +127,7 @@ public interface IDistributionStockListClient {
@GetMapping(API_PREFIX+"/getEntityByMarketNameAndMaterialCodeAndIncomingBatch")
DistributionStockListEntity getEntityByMarketNameAndMaterialCodeAndIncomingBatch(@RequestParam("marketName") String marketName, @RequestParam("materialCode") String materialCode, @RequestParam("incomingBatch") String incomingBatch, @RequestParam("warehouseId") Long warehouseId);
@GetMapping(API_PREFIX+"/updeteSourceTypeById")
void updeteSourceTypeById(@RequestParam String sourceType, @RequestParam Long stockListId);
}

5
blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppReservationVO.java

@ -100,6 +100,11 @@ public class DistributionAppReservationVO extends DistributionReservationEntity
*/
@ApiModelProperty(value = "托盘码")
private String trayCode;
/**
* 托盘名称
*/
@ApiModelProperty(value = "托盘码")
private String trayName;
/**
* 货物名称

1
blade-service-api/logpm-trunkline-api/src/main/java/com/logpm/trunkline/vo/UnloadPackageVO.java

@ -9,6 +9,7 @@ public class UnloadPackageVO implements Serializable {
private String orderPackageCode;
private Integer num;
private Integer unloadNum;
private String trayName;
private String trayCode;
private String scanStatus;

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

@ -204,6 +204,8 @@ public class BasicdataWarehouseServiceImpl extends BaseServiceImpl<BasicdataWare
deptIds.add(u.getId());
});
}
deptIds.add(Long.parseLong(s));
}
if (deptIds.isEmpty()) {
return null;

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

@ -195,4 +195,9 @@ public class DistributionStockListClient implements IDistributionStockListClient
return distributionStockListService.getOne(queryWrapper);
}
@Override
public void updeteSourceTypeById(String sourceType, Long stockListId) {
distributionStockListService.updeteSourceTypeById(sourceType,stockListId);
}
}

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

@ -1334,8 +1334,20 @@
</select>
<select id="getLoadingInventoryDetail" resultType="com.logpm.distribution.entity.DisStockListDetailEntity">
SELECT
ldsld.*
SELECT DISTINCT
ldsld.stock_list_id,
ldsld.sku,
ldsld.stock_package_code,
ldsld.stock_type,
ldsld.stock_locking_status,
ldsld.stock_status,
ldsld.stock_signfo_status,
ldsld.warehouse_id,
ldsld.warehouse_name,
ldsld.num,
ldsld.status,
ldsld.reservation_id,
ldsld.stock_package_status
FROM
logpm_distribution_signfor AS lds
INNER JOIN logpm_distribution_reservation_stocklist AS ldrs ON lds.reservation_id = ldrs.reservation_id

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

@ -306,8 +306,8 @@
t.cargoUnit AS cargoUnit,
ldslNew.tray_name AS trayName,
ldslNew.unpack AS unpack,
(SELECT count(*) FROM logpm_distribution_stock AS lds WHERE lds.stock_list_id =#{reservationId} AND lds.is_deleted = 0) AS realNum,
t.reservationNum as planNum,
(SELECT SUM(aldrs.reality_num) FROM logpm_distribution_reservation_stocklist AS aldrs WHERE aldrs.reservation_id = #{reservationId} AND aldrs.stocklist_id in (t.aaa)) AS realNum,
(SELECT SUM(newldrs.reservation_num) FROM logpm_distribution_reservation_stocklist AS newldrs WHERE newldrs.reservation_id = #{reservationId} AND newldrs.stocklist_id in (t.aaa)) AS planNum,
(
select GROUP_CONCAT( DISTINCT (allocation_id)) from logpm_warehouse_updown_goods where association_value =ldslNew.cargo_number or association_value in (
SELECT order_package_code from logpm_distribution_parcel_list where conditions=2 and material_code=ldslNew.cargo_number)
@ -320,7 +320,8 @@
ldsl.id,
ldrs.id as deliveryDetailsId,
ldsl.cargo_unit as cargoUnit,
SUM(ldrs.reservation_num) AS reservationNum
ldrs.reservation_num AS reservationNum,
GROUP_CONCAT(ldsl.id) AS aaa
FROM
logpm_distribution_reservation_stocklist ldrs
LEFT JOIN logpm_distribution_stock_list ldsl ON ldrs.stocklist_id = ldsl.id

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

@ -21,7 +21,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.dto.DistributionStockListDTO;
import com.logpm.distribution.entity.DistributionStockListEntity;
import com.logpm.distribution.excel.DistributionStockListExcel;
import com.logpm.distribution.vo.DistributionStockListAllocationVO;
import com.logpm.distribution.vo.DistributionStockListVO;
import com.logpm.distribution.vo.DistributionStockupStockListInfoVO;
@ -118,4 +117,6 @@ public interface DistributionStockListMapper extends BaseMapper<DistributionStoc
* @param loadedNub
*/
int deductionQuantityStock(@Param("stockListId") Long inventoryId,@Param("decreaseNum") Integer loadedNub);
void updeteSourceTypeById(@Param("sourceType") String sourceType, @Param("stockListId") Long stockListId);
}

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

@ -506,4 +506,10 @@
LEFT JOIN logpm_distribution_stock_list ldsl ON ldsl.incoming_batch = t.order_code and ldsl.cargo_number=t.material_code
</select>
<update id="updeteSourceTypeById" >
update logpm_distribution_stock_list
set source_type = #{sourceType}
where id = #{stockListId}
</update>
</mapper>

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

@ -16,7 +16,6 @@
*/
package com.logpm.distribution.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.dto.DistributionStockListDTO;
import com.logpm.distribution.entity.DistributionStockListEntity;
@ -175,6 +174,8 @@ public interface IDistributionStockListService extends BaseService<DistributionS
*/
OrderPackgeCodeDataVO showInventorySourcePackageCode(String incomingBatch, Long packageIds) throws Exception;
void updeteSourceTypeById(String sourceType, Long stockListId);
// /**
// * 查询库存品详情

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

@ -4999,6 +4999,8 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl<Distrib
}
TrayTypeDataVO trayTypeDataVO = warehouseTrayTypeClient.selectListByTrayCode(c.getTrayCode());
if (Func.isNotEmpty(trayTypeDataVO)) {
String trayName = trayTypeDataVO.getTrayName();
c.setTrayName(trayName);
List<WarehouseTrayGoodsEntity> goodsLsit = trayTypeDataVO.getGoodsLsit();
if (Func.isNotEmpty(goodsLsit)) {
List<Long> longs = goodsLsit.stream().map(WarehouseTrayGoodsEntity::getAssociationId).collect(Collectors.toList());

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

@ -489,7 +489,8 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
}
if(stockArticleEntity1.getTotalNumber().equals(list1.size())){
//修改订单状态
DistributionStockArticleEntity stockArticleEntity = new DistributionStockArticleEntity();
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleMapper.selectById(oo);
//修改
stockArticleEntity.setId(oo);
stockArticleEntity.setGenre(2);
@ -504,8 +505,7 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
);
if(!distributionParcelListEntities.isEmpty() && stockArticleEntity1.getTotalNumber().equals(distributionParcelListEntities.size())){
//修改订单状态
DistributionStockArticleEntity stockArticleEntity = new DistributionStockArticleEntity();
//修改
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleMapper.selectById(oo); //修改
stockArticleEntity.setId(oo);
stockArticleEntity.setGenre(2);
stockArticleEntity.setTotalNumber(stockArticleEntity.getTotalNumber() - list1.size());
@ -686,7 +686,6 @@ public class DistributionParcelListServiceImpl extends BaseServiceImpl<Distribut
BeanUtil.copyProperties(distributionStockListEntity,distributionStockListInfo);
distributionStockListInfo.setWarehousingTime(distributionStockArticleEntity.getWarehouseEntryTime());
distributionStockListInfo.setStockArticleId(distributionStockArticleEntity.getId());
distributionStockListInfo.setParcelListId(distributionParcelList.getId());
// distributionStockListInfo.setLicensePlate(distributionStockArticleEntity.get); //车牌
distributionStockListInfo.setDespatch(distributionStockArticleEntity.getWaybillNumber()); //物流单号
distributionStockListInfoService.save(distributionStockListInfo);

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

@ -17,7 +17,6 @@
package com.logpm.distribution.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
@ -26,7 +25,6 @@ import com.logpm.basic.entity.BasicMaterialEntity;
import com.logpm.basic.entity.BasicPrintTemplateEntity;
import com.logpm.basic.feign.IBasicMaterialClient;
import com.logpm.basic.feign.IBasicPrintTemplateClient;
import com.logpm.basicdata.entity.BasicdataClientEntity;
import com.logpm.basicdata.entity.BasicdataClientUserEntity;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataClientClient;
@ -47,12 +45,10 @@ import com.logpm.warehouse.feign.IWarehouseTrayGoodsClient;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.DictBizConstant;
import org.springblade.common.constant.DistributionTypeConstant;
import org.springblade.common.constant.printTemplate.PrintTemplateStatusConstant;
import org.springblade.common.utils.QRCodeUtil;
import org.springblade.common.utils.TemplateUtil;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.base.BaseEntity;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.secure.utils.AuthUtil;
@ -62,7 +58,6 @@ import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.system.cache.DictBizCache;
import org.springblade.system.cache.DictCache;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -626,6 +621,11 @@ public class DistributionStockListServiceImpl extends BaseServiceImpl<Distributi
orderPackgeCodeDataVO.setDataList(data);
return orderPackgeCodeDataVO;
}
@Override
public void updeteSourceTypeById(String sourceType, Long stockListId) {
baseMapper.updeteSourceTypeById(sourceType,stockListId);
}
}
// @Override

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

@ -1179,7 +1179,6 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
//商,市
List<DistributionStockupStockListVO> list = distributionReservationService.selectStockupStockList(reservationId);
for (int i = 0; i < list.size(); i++) {
DistributionStockupStockListVO distributionStockupStockListVO = list.get(i);
if (distributionStockupStockListVO.getPlanNum().equals(distributionStockupStockListVO.getRealNum())) {

2
blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/IFactoryOrderService.java

@ -39,7 +39,7 @@ public interface IFactoryOrderService extends BaseService<FactoryOrderEntity> {
IPage<FactoryOrderVO> selectFactoryOrderPage(IPage<FactoryOrderVO> page, FactoryOrderVO factoryOrder);
FactoryOrderEntity selectEntityBySelfCode(String selfCode);
FactoryOrderEntity selectEntityBySelfCode(String selfCode,Long receivingId);
/**
* 根据包件查询订单

3
blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/FactoryOrderServiceImpl.java

@ -40,10 +40,11 @@ public class FactoryOrderServiceImpl extends BaseServiceImpl<FactoryOrderMapper,
}
@Override
public FactoryOrderEntity selectEntityBySelfCode(String selfCode) {
public FactoryOrderEntity selectEntityBySelfCode(String selfCode,Long receivingId) {
QueryWrapper<FactoryOrderEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.select("self_code","id");
queryWrapper.eq("self_code",selfCode);
queryWrapper.eq("receiving_id",receivingId);
return baseMapper.selectOne(queryWrapper);
}

7
blade-service/logpm-factory/src/main/java/com/logpm/factory/oupai/service/impl/OuPaiFactoryServiceImpl.java

@ -636,8 +636,7 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService {
analyzeData(resultArray);
opOrderStatusLogEntity.setDataStatus(1);
} catch (Exception e) {
e.printStackTrace();
log.error(">>>> TAG {} error {}", FactoryConstant.OUPAI, e.getMessage());
log.error(">>>> 欧派数据解析报错", e);
opOrderStatusLogEntity.setDataStatus(2);
}
@ -739,7 +738,7 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService {
}
String selfCode = orderEntity.getString("SelfCode");//订单自编码
//先查询是否存在订单自编码
FactoryOrderEntity factoryOrderEntity = factoryOrderService.selectEntityBySelfCode(selfCode);
FactoryOrderEntity factoryOrderEntity = factoryOrderService.selectEntityBySelfCode(selfCode,receivingId);
if (Objects.isNull(factoryOrderEntity)) {
factoryOrderEntity = new FactoryOrderEntity();
@ -845,7 +844,7 @@ public class OuPaiFactoryServiceImpl implements IOuPaiFactoryService {
boolean save = factoryOrderService.save(factoryOrderEntity);
if (!save) {
log.warn("############handleData: 保存订单失败 selfCode={}", selfCode);
log.error("############handleData: 保存订单失败 selfCode={}", selfCode);
throw new CustomerException(403, "保存订单失败");
}
}

43
blade-service/logpm-patch/src/main/java/com/logpm/patch/service/impl/SyncOrderInfoServiceImpl.java

@ -128,24 +128,21 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
// continue;
// }
//查询订单是否在盘点任务中有被盘点到
// InventoryDetailEntity inventoryDetailEntity = inventoryDetailClient.findOrderIsExist(orderCode,inventoryId);
// if(!Objects.isNull(inventoryDetailEntity)){
try{
//定单
saveOrderInfoAndInventoryId(orderCode,oldWarehouseId,newWarehouseId,inventoryId);
InventoryDetailEntity inventoryDetailEntity = inventoryDetailClient.findOrderIsExist(orderCode,inventoryId);
if(!Objects.isNull(inventoryDetailEntity)){
try{
//定单
saveOrderInfoAndInventoryId(orderCode,oldWarehouseId,newWarehouseId,inventoryId);
//存入打托信息
// saveTrayTypeInfoPackage(orderCode,oldWarehouseId,newWarehouseId);
saveTrayTypeInfoPackageNew(orderCode,oldWarehouseId,newWarehouseId,inventoryId);
saveTrayTypeInfoPackageNew(orderCode,oldWarehouseId,newWarehouseId,inventoryId);
}catch (CustomerException e){
log.error("同步订单"+orderCode+"失败: "+e.message,e);
}catch (Exception e){
log.error("同步订单"+orderCode+"失败",e);
}
}catch (CustomerException e){
log.error("同步订单"+orderCode+"失败: "+e.message,e);
}catch (Exception e){
log.error("同步订单"+orderCode+"失败",e);
}
// }
}
}
@ -1105,6 +1102,8 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
}
}else{
id = distributionStockArticleEntity.getId();
distributionStockArticleEntity.setTotalNumber(total);
distributionStockArticleClient.saveOrUpdate(distributionStockArticleEntity);
}
//保存包件信息
@ -1122,13 +1121,13 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
String unitNo = orderDetailEntity.getUnitNo();
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCode(unitNo);
if(!Objects.isNull(parcelListEntity)){
log.info("###########saveOrderPackageAndInventoryId: 包条已存在,不同步 unitNo={}",unitNo);
log.info("###########saveOrderPackage: 包条已存在,不同步 unitNo={}",unitNo);
continue;
}
InventoryDetailEntity inventoryDetailEntity = inventoryDetailClient.findUnitNoIsExist(unitNo,inventoryId);
if(Objects.isNull(inventoryDetailEntity)){
log.info("###########saveOrderPackageAndInventoryId: 包条不在盘点任务中存在,不同步 unitNo={}",unitNo);
log.info("###########saveOrderPackage: 包条不在盘点任务中存在,不同步 unitNo={}",unitNo);
continue;
}
@ -1144,6 +1143,7 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
DistributionParcelListEntity entity = new DistributionParcelListEntity();
BeanUtil.copyProperties(vo, entity);
entity.setQuantity(1);
entity.setOrderPackageCode(vo.getPacketBarCode());
entity.setConditions(1);
entity.setWarehouse(distributionStockArticleEntity.getWarehouse());
@ -1157,9 +1157,9 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
// if(3==carsType||4 == carsType){
// entity.setOrderPackageStatus(OrderPackageStatusConstant.yichuku.getValue());
// }
if(2 == signState){
entity.setOrderPackageStatus(OrderPackageStatusConstant.yiqianshou.getValue());
}
// if(2 == signState){
// entity.setOrderPackageStatus(OrderPackageStatusConstant.yiqianshou.getValue());
// }
entity.setOrderPackageFreezeStatus(OrderPackageFreezeStatusConstant.weidongjie.getValue());
entity.setOrderPackageReservationStatus(OrderPackageReservationStatusConstant.daiyuyue.getValue());
entity.setOrderPackageGroundingStatus(OrderPackageGroundingStatusConstant.daishangjia.getValue());
@ -1201,9 +1201,9 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
}
boolean b = distributionParcelListClient.add(entity);
if (!b) {
log.warn("#################saveOrderPackageAndInventoryId: 保存包件信息失败 orderCode={}", entity.getOrderCode());
log.warn("#################handleDataToPlatform: 保存包件信息失败 orderCode={}", entity.getOrderCode());
}else{
log.info("################saveOrderPackageAndInventoryId: 保存包件成功 OrderPackageCode={}",vo.getPacketBarCode());
log.info("################handleDataToPlatform: 保存包件成功 OrderPackageCode={}",vo.getPacketBarCode());
Integer handQuantity = distributionStockArticleEntity.getHandQuantity();
Integer totalNumber = distributionStockArticleEntity.getTotalNumber();
@ -1216,6 +1216,7 @@ public class SyncOrderInfoServiceImpl implements ISyncOrderInfoService {
distributionStockArticleEntity.setOrderReceiveStatus(OrderReceiveStatusConstant.bufenshouhuo.getValue());
distributionStockArticleEntity.setOrderStatus(OrderStatusConstant.bufenruku.getValue());
}
distributionStockArticleEntity.setHandQuantity(handQuantity + 1);
distributionStockArticleClient.saveOrUpdate(distributionStockArticleEntity);
}

34
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/CarsLoadController.java

@ -1053,4 +1053,38 @@ public class CarsLoadController {
}
@ResponseBody
@PostMapping("/loadingDetail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "三方中转装车明细", notes = "传入loadCarsDTO")
public R loadingDetail(@RequestBody LoadCarsDTO loadCarsDTO) {
String method = "############loadingDetail: ";
log.info(method+"请求参数{}",loadCarsDTO);
Long loadId = loadCarsDTO.getLoadId();
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(loadId)){
log.warn(method+"三方中转id为空 loadId={}",loadId);
return R.fail(400,"三方中转id为空");
}
return carsLoadService.loadingDetail(loadCarsDTO);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}
}

31
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/TripartiteTransferController.java

@ -346,38 +346,7 @@ public class TripartiteTransferController {
}
@ResponseBody
@PostMapping("/loadingDetail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "三方中转装车明细", notes = "传入loadCarsDTO")
public R loadingDetail(@RequestBody LoadCarsDTO loadCarsDTO) {
String method = "############loadingDetail: ";
log.info(method+"请求参数{}",loadCarsDTO);
Long loadId = loadCarsDTO.getLoadId();
try{
//当前登录人选择的仓库
BasicdataWarehouseEntity myCurrentWarehouse = warehouseClient.getMyCurrentWarehouse();
if(Objects.isNull(myCurrentWarehouse)){
log.warn(method+"仓库信息为空 myCurrentWarehouse={}",myCurrentWarehouse);
return R.fail(400,"仓库信息为空");
}
loadCarsDTO.setWarehouseId(myCurrentWarehouse.getId());
if(Objects.isNull(loadId)){
log.warn(method+"三方中转id为空 loadId={}",loadId);
return R.fail(400,"三方中转id为空");
}
return carsLoadService.loadingDetail(loadCarsDTO);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
}catch (Exception e){
log.error(method+"系统异常",e);
return R.fail(500,"系统异常");
}
}

3
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadScanMapper.xml

@ -144,12 +144,13 @@
<select id="findUnloadPackageList" resultType="com.logpm.trunkline.vo.UnloadPackageVO">
select scan_code orderPackageCode,
num num,
unload_num unloadNum,
tray_code trayCode,
tray_name trayName,
scan_status scanStatus
from logpm_trunkline_cars_load_scan
where load_id = #{loadId}
and warehouse_id = #{warehouseId}
and final_node_id = #{warehouseId}
and waybill_no = #{waybillNo}
and order_code = #{orderCode}
</select>

2
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsLoadingLogMapper.xml

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.logpm.trunkline.mapper.TrunklineBillladingLogMapper">
<mapper namespace="com.logpm.trunkline.mapper.TrunklineCarsLoadingLogMapper">
</mapper>

7
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsOrderMapper.xml

@ -53,10 +53,9 @@
ltco.order_code orderCode,
ltco.plan_num planNum,
sum(ltcls.num) loadingNum,
sum(ltcus.num) unloadingNum
sum(ltcls.unload_num) unloadingNum
from logpm_trunkline_cars_order ltco
left join logpm_trunkline_cars_load_scan ltcls on ltcls.waybill_no = ltco.waybill_no
left join logpm_trunkline_cars_unload_scan ltcus on ltcus.waybill_no = ltco.waybill_no
left join logpm_trunkline_cars_load_scan ltcls on ltcls.waybill_no = ltco.waybill_no and ltco.order_code = ltcls.order_code and ltco.load_id = ltcls.load_id
where ltco.load_id = #{loadId}
and ltco.node_id = #{nodeId}
and ltco.type = 2
@ -71,7 +70,7 @@
real_num loadingNum,
unload_num unloadNum
from logpm_trunkline_cars_order
where is_deleted = 0,
where is_deleted = 0
and load_id = #{loadId}
and final_node_id = #{warehouseId}
and `type` = 2

4
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/mapper/TrunklineCarsUnloadLogMapper.xml

@ -39,8 +39,4 @@
and waybill_no = #{waybillNo}
</select>
<resultMap id="unloadOrderMap" type="com.logpm.trunkline.vo.UnloadScanOrderVO">
<result
</resultMap>
</mapper>

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

@ -1,6 +1,5 @@
package com.logpm.trunkline.service.impl;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -14,8 +13,12 @@ import com.logpm.distribution.entity.DistributionParcelListEntity;
import com.logpm.distribution.entity.DistributionStockArticleEntity;
import com.logpm.distribution.feign.IDistributionParcelListClient;
import com.logpm.distribution.feign.IDistributionStockArticleClient;
import com.logpm.trunkline.bean.Resp;
import com.logpm.trunkline.dto.*;
import com.logpm.trunkline.entity.*;
import com.logpm.trunkline.entity.TrunklineCarsLoadEntity;
import com.logpm.trunkline.entity.TrunklineCarsLoadLineEntity;
import com.logpm.trunkline.entity.TrunklineCarsLoadScanEntity;
import com.logpm.trunkline.entity.TrunklineCarsOrderEntity;
import com.logpm.trunkline.mapper.TrunklineCarsLoadMapper;
import com.logpm.trunkline.service.*;
import com.logpm.trunkline.vo.*;
@ -1487,6 +1490,13 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
}
}else{
String orderPackageStatus = parcelListEntity.getOrderPackageStatus();
if("60".equals(orderPackageStatus) || "70".equals(orderPackageStatus)){
log.warn("##################loadingScan: 包件已出库 orderPackageStatus={}",orderPackageStatus);
return R.fail(405,"包件已出库");
}
//有包件所以是有数据的包件扫描
carsLoadScanEntity.setIsData(1);
//补全数据信息
@ -1539,8 +1549,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
}
distributionParcelListClient.updateOrderPackageCodeById(packageId,"60");
distributionStockArticleClient.submitHandleNumByOrderId(1,articleId);
updownTypeClient.downPackageOrDelTray(orderPackageCode,warehouseId);
if (StringUtil.isBlank(trayCode)){
updownTypeClient.downPackageOrDelTray(orderPackageCode,warehouseId);
}
}
trunklineCarsLoadScanService.save(carsLoadScanEntity);
loadScanId = carsLoadScanEntity.getId();
@ -1666,6 +1677,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
carsLoadScanEntity.setTrayName(trayName);
carsLoadScanEntity.setTrayCode(trayCode);
carsLoadScanEntity.setRemark(remark);
carsLoadScanEntity.setFromWarehouseId(warehouseId);
carsLoadScanEntity.setFinalNodeId(carsOrderEntity.getFinalNodeId());
trunklineCarsLoadScanService.save(carsLoadScanEntity);
loadScanId = carsLoadScanEntity.getId();
difficult = enterNum;
@ -1828,17 +1841,23 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
if("1".equals(associationType)){
String orderCode = jsonObject.getString("associationValue");
JSONArray plDetail = new JSONArray();
List<DistributionParcelListEntity> plList = distributionParcelListClient.findEntityListByOrderCode(orderCode, warehouseId);
for (DistributionParcelListEntity parcelListEntity : plList) {
Integer quantity = parcelListEntity.getQuantity();
String firsts = parcelListEntity.getFirsts();
JSONObject detail = new JSONObject();
detail.put("productName",firsts);
detail.put("stockNum",quantity);
plDetail.add(detail);
// JSONArray plDetail = new JSONArray();
// List<DistributionParcelListEntity> plList = distributionParcelListClient.findEntityListByOrderCode(orderCode, warehouseId);
// for (DistributionParcelListEntity parcelListEntity : plList) {
// Integer quantity = parcelListEntity.getQuantity();
// String firsts = parcelListEntity.getFirsts();
// JSONObject detail = new JSONObject();
// detail.put("productName",firsts);
// detail.put("stockNum",quantity);
// plDetail.add(detail);
// }
// jsonObject.put("details",plDetail);
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findStockArticleByOrderCodeAndWarehouseId(orderCode, warehouseId);
if(!Objects.isNull(stockArticleEntity)){
jsonObject.put("waybillNo",stockArticleEntity.getWaybillNumber());
}else{
jsonObject.put("waybillNo","");
}
jsonObject.put("details",plDetail);
zeroList.add(jsonObject);
}
if("3".equals(associationType)){
@ -1878,6 +1897,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
return R.fail(405,"节点不是到车状态");
}
Integer pacakagNum = 0;
Integer zeroNum = 0;
for (LoadingPackageDTO loadingPackageDTO : packageList) {
String orderPackageCode = loadingPackageDTO.getOrderPackageCode();
loadingScan(loadId,warehouseId,orderPackageCode,trayCode);
@ -1893,7 +1914,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
//下架托盘
updownTypeClient.downTray(trayCode,warehouseId);
return R.success("整托装车成功");
return Resp.scanSuccess("整托装车成功","装车成功包件"+pacakagNum+"件,零担"+zeroNum+"件");
}
@Override
@ -1986,16 +2007,15 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
Integer type = carsLoadScanEntity.getType();
Long fromWarehouseId = carsLoadScanEntity.getFromWarehouseId();
if(isData == 1){
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findStockArticleByOrderCodeAndWarehouseId(orderCode, fromWarehouseId);
if(Objects.isNull(stockArticleEntity)){
log.warn("##################removeCarsLoadScan: 订单信息不存在 fromWarehouseId={} orderCode={}",fromWarehouseId,orderCode);
return R.fail(405,"订单信息不存在");
}
stockArticleEntity.setHandQuantity(stockArticleEntity.getHandQuantity() + num);
distributionStockArticleClient.saveOrUpdate(stockArticleEntity);
DistributionStockArticleEntity stockArticleEntity = distributionStockArticleClient.findStockArticleByOrderCodeAndWarehouseId(orderCode, fromWarehouseId);
if(Objects.isNull(stockArticleEntity)){
log.warn("##################removeCarsLoadScan: 订单信息不存在 fromWarehouseId={} orderCode={}",fromWarehouseId,orderCode);
return R.fail(405,"订单信息不存在");
}
Long articleId = stockArticleEntity.getId();
distributionStockArticleClient.submitHandleNumByOrderId(-num,articleId);
if(isData == 1){
if(type == 1){
DistributionParcelListEntity parcelListEntity = distributionParcelListClient.findByPacketBarCodeAndWarehouseId(scanCode, fromWarehouseId);
if(Objects.isNull(parcelListEntity)){
@ -2267,6 +2287,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
}
updownTypeClient.downPackageOrDelTray(orderPackageCode,warehouseId);
}
trunklineCarsLoadScanService.updateById(carsLoadScanEntity);
trunklineCarsUnloadLogService.savaUnloadLog(warehouseId,warehouseName,loadId,loadCode,waybillId,waybillNo,orderCode,orderPackageCode,1,
1,1,isAbnormal,trayId,trayCode,trayName,fromWarehouseId,loadScanId,remark);

5
blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java

@ -2213,6 +2213,11 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl<WarehouseUpd
.eq("incoming_batch",incomingBatch);
WarehouseUpdownGoodsEntity updownGoodsEntity = warehouseUpdownGoodsService.getOne(queryWrapper);
DistributionStockListEntity stockListEntity = distributionStockListClient.getEntityByMarketIdAndMaterialCodeAndIncomingBatch(marketId, materialCode,incomingBatch,warehouseId);
String sourceType = stockListEntity.getSourceType();
if("1".equals(sourceType)){
Long stockListId = stockListEntity.getId();
distributionStockListClient.updeteSourceTypeById("2",stockListId);
}
//查询原库存数量
Integer totalNum = 0 ;
List<PositionVO> updownGoodsByStock = warehouseUpdownGoodsService.getUpdownGoodsByStock(marketId, materialCode, incomingBatch,warehouseId);

Loading…
Cancel
Save