Browse Source

Merge pull request 'dev' (#17) from dev into pre-production

Reviewed-on: #17
master
zhaoqiaobo 10 months ago
parent
commit
1e775f265e
  1. 1
      blade-service/logpm-report/pom.xml
  2. 6
      blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/InLibraryDeliverServiceImpl.java
  3. 5
      blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/IndexCountServiceImpl.java
  4. 64
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/TrunklineCarsLoadServiceImpl.java

1
blade-service/logpm-report/pom.xml

@ -63,6 +63,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
</plugin>
</plugins>
</build>

6
blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/InLibraryDeliverServiceImpl.java

@ -1,10 +1,11 @@
package com.logpm.report.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.report.mapper.InLibraryDeliverMapper;
import com.logpm.report.service.InLibraryDeliverService;
import io.swagger.models.auth.In;
import lombok.AllArgsConstructor;
import org.springblade.core.redis.cache.BladeRedis;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
@ -19,6 +20,7 @@ public class InLibraryDeliverServiceImpl implements InLibraryDeliverService {
private InLibraryDeliverMapper inLibraryDeliverMapper;
/***
* 总在库数
* @param

5
blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/IndexCountServiceImpl.java

@ -11,6 +11,7 @@ import org.checkerframework.checker.units.qual.A;
import org.springblade.common.constant.aftersales.WorkOrderStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageStatusConstant;
import org.springblade.common.constant.stockup.StockupTypeConstant;
import org.springblade.core.redis.cache.BladeRedis;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
@ -35,7 +36,7 @@ public class IndexCountServiceImpl implements IndexCountService {
private InLibraryDeliverServiceImpl inLibraryDeliverService;
private BillingServiceImpl billingService;
private final BladeRedis redis;
/**
@ -43,6 +44,8 @@ public class IndexCountServiceImpl implements IndexCountService {
*/
@Cacheable(value = "indexCount=10")
public IndexCountVO indexCount() {
IndexCountVO indexCountVo = new IndexCountVO();
List<Long> warehouse = billingService.getWarehouse();
indexCountVo.setInStoreData(inStoreData(warehouse));

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

@ -380,7 +380,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(nowWarehouseId);
String warehouseAddress = null;
if (ObjectUtil.isNotEmpty(warehouseEntity)) {
warehouseAddress = warehouseEntity.getName();
warehouseAddress = "从【" + warehouseEntity.getName() + "】发出";
}
sendFactoryData(brands, node, warehouseAddress);
} catch (Exception e) {
@ -942,7 +942,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(nowWarehouseId);
String warehouseAddress = null;
if (ObjectUtil.isNotEmpty(warehouseEntity)) {
warehouseAddress = warehouseEntity.getName();
warehouseAddress = "到达【" + warehouseEntity.getName() + "】";
}
sendFactoryData(brands, node, warehouseAddress);
} catch (Exception e) {
@ -1209,8 +1209,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
return R.fail(405, "配载计划不存在");
}
TrunklineCarsLoadLineEntity currentLoadLineEntity = trunklineCarsLoadLineService.findEntityByLoadIdAndNodeId(loadId, warehouseId);
if(Objects.isNull(currentLoadLineEntity)){
log.warn("###############updateCarsLoadBasicData: 配载计划节点不存在 loadId={} nodeId={}", loadId,warehouseId);
if (Objects.isNull(currentLoadLineEntity)) {
log.warn("###############updateCarsLoadBasicData: 配载计划节点不存在 loadId={} nodeId={}", loadId, warehouseId);
return R.fail(405, "配载计划节点不存在");
}
@ -1709,7 +1709,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(nowWarehouseId);
String warehouseAddress = null;
if (ObjectUtil.isNotEmpty(warehouseEntity)) {
warehouseAddress = warehouseEntity.getName();
warehouseAddress = "从【" + warehouseEntity.getName() + "】发出";
}
this.sendFactoryData(brands, NodeEnums.TRIPARTITE_TRANSFER_DEPART, warehouseAddress);
} catch (Exception e) {
@ -2039,7 +2039,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
distributionStockArticleClient.submitHandleNumByOrderId(1, articleId);
remark = "有数据,不在当前仓,异常装车";
updownTypeClient.downPackageOrDelTray(orderPackageCode,fromWarehouseId,"干线装车下架解托");
updownTypeClient.downPackageOrDelTray(orderPackageCode, fromWarehouseId, "干线装车下架解托");
}
} else {
@ -2112,7 +2112,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
distributionParcelListClient.updateOrderPackageCodeById(packageId, "60");
distributionStockArticleClient.submitHandleNumByOrderId(1, articleId);
if (StringUtil.isBlank(trayCode)) {
updownTypeClient.downPackageOrDelTray(orderPackageCode,warehouseId,"干线装车下架解托");
updownTypeClient.downPackageOrDelTray(orderPackageCode, warehouseId, "干线装车下架解托");
}
}
carsLoadScanEntity.setLoadingUserName(AuthUtil.getNickName());
@ -2853,7 +2853,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
String orders = null;
if (0 == isZero) {
unloadPackage(loadId, orderPackageCode, warehouseId, 1, "卸分一体 卸车",incomingType);
unloadPackage(loadId, orderPackageCode, warehouseId, 1, "卸分一体 卸车", incomingType);
Map<String, Object> map = new HashMap<>();
map.put("trayType", trayType);
map.put("trayCode", trayCode);
@ -2877,7 +2877,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
map.put("warehouseId", warehouseId);
map.put("orderCode", orderCode);
map.put("num", enterNum);
map.put("remark","卸分一体零担打托");
map.put("remark", "卸分一体零担打托");
boolean b = trayTypeClient.enterZeroOrderByTrayCode(map);
if (!b) {
log.warn("##########findNextNodeList: 打托失败 trayCode={} orderCode={}", trayCode, orderCode);
@ -3064,7 +3064,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
distributionStockArticleClient.submitHandleNumByOrderId(1, articleId);
distributionParcelListClient.updateOrderPackageCodeById(pacakageId, "60");
updownTypeClient.downPackageOrDelTray(orderPackageCode,wid,"中转卸车下架解托");
updownTypeClient.downPackageOrDelTray(orderPackageCode, wid, "中转卸车下架解托");
}
} else {
// carsLoadScanEntity.getS
@ -3101,8 +3101,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
trayId = trayEntity.getId();
trayName = trayEntity.getPalletName();
}
if(unbindTray == 1){
updownTypeClient.downPackageOrDelTray(orderPackageCode,fromWarehouseId,"中转卸车下架解托");
if (unbindTray == 1) {
updownTypeClient.downPackageOrDelTray(orderPackageCode, fromWarehouseId, "中转卸车下架解托");
}
trunklineCarsLoadScanService.updateById(carsLoadScanEntity);
@ -3182,9 +3182,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
trunklineCarsUnloadLogService.savaUnloadLog(warehouseId, warehouseName, loadId, loadCode, waybillId, waybillNo, orderCode,
scanCode, enterNum, 2, 1, isAbnormal, trayId, trayCode, trayName, fromWarehouseId, loadScanId, remark);
if(unbindTray == 1){
if(!StringUtil.isBlank(trayCode)){
trayTypeClient.deleteZeroOrderByTrayCode(orderCode,trayCode,fromWarehouseId,"干线中转零担解托");
if (unbindTray == 1) {
if (!StringUtil.isBlank(trayCode)) {
trayTypeClient.deleteZeroOrderByTrayCode(orderCode, trayCode, fromWarehouseId, "干线中转零担解托");
}
}
@ -3247,7 +3247,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
for (UnloadPackageDTO unloadPackageDTO : unloadPackageList) {
String orderPackageCode = unloadPackageDTO.getOrderPackageCode();
unloadPackage(loadId, orderPackageCode, warehouseId, 1, "批量卸车包件正常卸车",incomingType);
unloadPackage(loadId, orderPackageCode, warehouseId, 1, "批量卸车包件正常卸车", incomingType);
}
@ -3749,7 +3749,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
Integer planNum = carsOrderEntity.getPlanNum();
List<DistributionParcelListEntity> entityListByOrderCode = distributionParcelListClient.findEntityListByOrderCodeAndStatus(orderCode, warehouseId, "20");
int size = entityListByOrderCode.size();
if (planNum.equals(size+realNum)) {
if (planNum.equals(size + realNum)) {
for (DistributionParcelListEntity parcelListEntity : entityListByOrderCode) {
String orderPackageCode = parcelListEntity.getOrderPackageCode();
//查询包件是否已经装车
@ -4302,12 +4302,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
parcelListEntity.setIsTransfer(1);
}
distributionParcelListClient.update(parcelListEntity);
if(StringUtil.isNotBlank(trayCode)){
updownTypeClient.downPackageOrDelTray(scanCode,warehouseId,"包件下架解托");
if (StringUtil.isNotBlank(trayCode)) {
updownTypeClient.downPackageOrDelTray(scanCode, warehouseId, "包件下架解托");
}
}else{
if(StringUtil.isNotBlank(trayCode)){
trayTypeClient.deleteZeroOrderByTrayCode(orderCode,trayCode,warehouseId,"零担解托");
} else {
if (StringUtil.isNotBlank(trayCode)) {
trayTypeClient.deleteZeroOrderByTrayCode(orderCode, trayCode, warehouseId, "零担解托");
}
}
@ -4315,7 +4315,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
}
}
}
if(!Objects.isNull(loadId)){
if (!Objects.isNull(loadId)) {
updateNumByLoadId(loadId);
}
@ -4371,7 +4371,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
}
@Override
public R unloadPackage(Long loadId, String orderPackageCode, Long warehouseId, Integer unbindTray, String remark,Integer incomingType) {
public R unloadPackage(Long loadId, String orderPackageCode, Long warehouseId, Integer unbindTray, String remark, Integer incomingType) {
log.info("#############unloadPackage: 卸车包件");
BasicdataWarehouseEntity basicdataWarehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId);
@ -4587,7 +4587,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
}
distributionParcelListClient.update(distributionParcelListEntity);
}
updownTypeClient.downPackageOrDelTray(orderPackageCode,wid,"干线卸车下架解托");
updownTypeClient.downPackageOrDelTray(orderPackageCode, wid, "干线卸车下架解托");
}
//无装车记录异常日志记录
@ -4625,8 +4625,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
trayId = trayEntity.getId();
trayName = trayEntity.getPalletName();
}
if(unbindTray == 1){
updownTypeClient.downPackageOrDelTray(orderPackageCode,fromWarehouseId,"干线卸车下架解托");
if (unbindTray == 1) {
updownTypeClient.downPackageOrDelTray(orderPackageCode, fromWarehouseId, "干线卸车下架解托");
}
trunklineCarsLoadScanService.updateById(carsLoadScanEntity);
@ -4835,9 +4835,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
trunklineCarsUnloadLogService.savaUnloadLog(warehouseId, warehouseName, loadId, loadCode, waybillId, waybillNo, orderCode,
scanCode, enterNun, 2, 1, isAbnormal, trayId, trayCode, trayName, fromWarehouseId, loadScanId, remark);
if(unbindTray == 1){
if(!StringUtil.isBlank(trayCode)){
trayTypeClient.deleteZeroOrderByTrayCode(orderCode,trayCode,fromWarehouseId,"干线卸车零担解托");
if (unbindTray == 1) {
if (!StringUtil.isBlank(trayCode)) {
trayTypeClient.deleteZeroOrderByTrayCode(orderCode, trayCode, fromWarehouseId, "干线卸车零担解托");
}
}
@ -5072,7 +5072,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
}
@Override
public R unloadTray(Long loadId, String trayCode, Long warehouseId,Integer incomingType) {
public R unloadTray(Long loadId, String trayCode, Long warehouseId, Integer incomingType) {
TrunklineCarsLoadEntity carsLoadEntity = baseMapper.selectById(loadId);
if (Objects.isNull(carsLoadEntity)) {
log.warn("###############unloadTray: 配载计划不存在 loadId={}", loadId);
@ -5086,7 +5086,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
String scanCode = carsLoadScanEntity.getScanCode();
if (type == 1) {
//包件
unloadPackage(loadId, scanCode, warehouseId, 0, "托盘正常卸车",incomingType);
unloadPackage(loadId, scanCode, warehouseId, 0, "托盘正常卸车", incomingType);
} else if (type == 2) {
String waybillNo = carsLoadScanEntity.getWaybillNo();
Integer num = carsLoadScanEntity.getNum();

Loading…
Cancel
Save