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> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId> <artifactId>maven-antrun-plugin</artifactId>
</plugin> </plugin>
</plugins> </plugins>
</build> </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; package com.logpm.report.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.report.mapper.InLibraryDeliverMapper; import com.logpm.report.mapper.InLibraryDeliverMapper;
import com.logpm.report.service.InLibraryDeliverService; import com.logpm.report.service.InLibraryDeliverService;
import io.swagger.models.auth.In;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springblade.core.redis.cache.BladeRedis;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.math.BigDecimal; import java.math.BigDecimal;
@ -19,6 +20,7 @@ public class InLibraryDeliverServiceImpl implements InLibraryDeliverService {
private InLibraryDeliverMapper inLibraryDeliverMapper; private InLibraryDeliverMapper inLibraryDeliverMapper;
/*** /***
* 总在库数 * 总在库数
* @param * @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.aftersales.WorkOrderStatusConstant;
import org.springblade.common.constant.orderpackage.OrderPackageStatusConstant; import org.springblade.common.constant.orderpackage.OrderPackageStatusConstant;
import org.springblade.common.constant.stockup.StockupTypeConstant; import org.springblade.common.constant.stockup.StockupTypeConstant;
import org.springblade.core.redis.cache.BladeRedis;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable; import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -35,7 +36,7 @@ public class IndexCountServiceImpl implements IndexCountService {
private InLibraryDeliverServiceImpl inLibraryDeliverService; private InLibraryDeliverServiceImpl inLibraryDeliverService;
private BillingServiceImpl billingService; private BillingServiceImpl billingService;
private final BladeRedis redis;
/** /**
@ -43,6 +44,8 @@ public class IndexCountServiceImpl implements IndexCountService {
*/ */
@Cacheable(value = "indexCount=10") @Cacheable(value = "indexCount=10")
public IndexCountVO indexCount() { public IndexCountVO indexCount() {
IndexCountVO indexCountVo = new IndexCountVO(); IndexCountVO indexCountVo = new IndexCountVO();
List<Long> warehouse = billingService.getWarehouse(); List<Long> warehouse = billingService.getWarehouse();
indexCountVo.setInStoreData(inStoreData(warehouse)); 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); BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(nowWarehouseId);
String warehouseAddress = null; String warehouseAddress = null;
if (ObjectUtil.isNotEmpty(warehouseEntity)) { if (ObjectUtil.isNotEmpty(warehouseEntity)) {
warehouseAddress = warehouseEntity.getName(); warehouseAddress = "从【" + warehouseEntity.getName() + "】发出";
} }
sendFactoryData(brands, node, warehouseAddress); sendFactoryData(brands, node, warehouseAddress);
} catch (Exception e) { } catch (Exception e) {
@ -942,7 +942,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(nowWarehouseId); BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(nowWarehouseId);
String warehouseAddress = null; String warehouseAddress = null;
if (ObjectUtil.isNotEmpty(warehouseEntity)) { if (ObjectUtil.isNotEmpty(warehouseEntity)) {
warehouseAddress = warehouseEntity.getName(); warehouseAddress = "到达【" + warehouseEntity.getName() + "】";
} }
sendFactoryData(brands, node, warehouseAddress); sendFactoryData(brands, node, warehouseAddress);
} catch (Exception e) { } catch (Exception e) {
@ -1209,8 +1209,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
return R.fail(405, "配载计划不存在"); return R.fail(405, "配载计划不存在");
} }
TrunklineCarsLoadLineEntity currentLoadLineEntity = trunklineCarsLoadLineService.findEntityByLoadIdAndNodeId(loadId, warehouseId); TrunklineCarsLoadLineEntity currentLoadLineEntity = trunklineCarsLoadLineService.findEntityByLoadIdAndNodeId(loadId, warehouseId);
if(Objects.isNull(currentLoadLineEntity)){ if (Objects.isNull(currentLoadLineEntity)) {
log.warn("###############updateCarsLoadBasicData: 配载计划节点不存在 loadId={} nodeId={}", loadId,warehouseId); log.warn("###############updateCarsLoadBasicData: 配载计划节点不存在 loadId={} nodeId={}", loadId, warehouseId);
return R.fail(405, "配载计划节点不存在"); return R.fail(405, "配载计划节点不存在");
} }
@ -1709,7 +1709,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(nowWarehouseId); BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(nowWarehouseId);
String warehouseAddress = null; String warehouseAddress = null;
if (ObjectUtil.isNotEmpty(warehouseEntity)) { if (ObjectUtil.isNotEmpty(warehouseEntity)) {
warehouseAddress = warehouseEntity.getName(); warehouseAddress = "从【" + warehouseEntity.getName() + "】发出";
} }
this.sendFactoryData(brands, NodeEnums.TRIPARTITE_TRANSFER_DEPART, warehouseAddress); this.sendFactoryData(brands, NodeEnums.TRIPARTITE_TRANSFER_DEPART, warehouseAddress);
} catch (Exception e) { } catch (Exception e) {
@ -2039,7 +2039,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
distributionStockArticleClient.submitHandleNumByOrderId(1, articleId); distributionStockArticleClient.submitHandleNumByOrderId(1, articleId);
remark = "有数据,不在当前仓,异常装车"; remark = "有数据,不在当前仓,异常装车";
updownTypeClient.downPackageOrDelTray(orderPackageCode,fromWarehouseId,"干线装车下架解托"); updownTypeClient.downPackageOrDelTray(orderPackageCode, fromWarehouseId, "干线装车下架解托");
} }
} else { } else {
@ -2112,7 +2112,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
distributionParcelListClient.updateOrderPackageCodeById(packageId, "60"); distributionParcelListClient.updateOrderPackageCodeById(packageId, "60");
distributionStockArticleClient.submitHandleNumByOrderId(1, articleId); distributionStockArticleClient.submitHandleNumByOrderId(1, articleId);
if (StringUtil.isBlank(trayCode)) { if (StringUtil.isBlank(trayCode)) {
updownTypeClient.downPackageOrDelTray(orderPackageCode,warehouseId,"干线装车下架解托"); updownTypeClient.downPackageOrDelTray(orderPackageCode, warehouseId, "干线装车下架解托");
} }
} }
carsLoadScanEntity.setLoadingUserName(AuthUtil.getNickName()); carsLoadScanEntity.setLoadingUserName(AuthUtil.getNickName());
@ -2853,7 +2853,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
String orders = null; String orders = null;
if (0 == isZero) { if (0 == isZero) {
unloadPackage(loadId, orderPackageCode, warehouseId, 1, "卸分一体 卸车",incomingType); unloadPackage(loadId, orderPackageCode, warehouseId, 1, "卸分一体 卸车", incomingType);
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("trayType", trayType); map.put("trayType", trayType);
map.put("trayCode", trayCode); map.put("trayCode", trayCode);
@ -2877,7 +2877,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
map.put("warehouseId", warehouseId); map.put("warehouseId", warehouseId);
map.put("orderCode", orderCode); map.put("orderCode", orderCode);
map.put("num", enterNum); map.put("num", enterNum);
map.put("remark","卸分一体零担打托"); map.put("remark", "卸分一体零担打托");
boolean b = trayTypeClient.enterZeroOrderByTrayCode(map); boolean b = trayTypeClient.enterZeroOrderByTrayCode(map);
if (!b) { if (!b) {
log.warn("##########findNextNodeList: 打托失败 trayCode={} orderCode={}", trayCode, orderCode); log.warn("##########findNextNodeList: 打托失败 trayCode={} orderCode={}", trayCode, orderCode);
@ -3064,7 +3064,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
distributionStockArticleClient.submitHandleNumByOrderId(1, articleId); distributionStockArticleClient.submitHandleNumByOrderId(1, articleId);
distributionParcelListClient.updateOrderPackageCodeById(pacakageId, "60"); distributionParcelListClient.updateOrderPackageCodeById(pacakageId, "60");
updownTypeClient.downPackageOrDelTray(orderPackageCode,wid,"中转卸车下架解托"); updownTypeClient.downPackageOrDelTray(orderPackageCode, wid, "中转卸车下架解托");
} }
} else { } else {
// carsLoadScanEntity.getS // carsLoadScanEntity.getS
@ -3101,8 +3101,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
trayId = trayEntity.getId(); trayId = trayEntity.getId();
trayName = trayEntity.getPalletName(); trayName = trayEntity.getPalletName();
} }
if(unbindTray == 1){ if (unbindTray == 1) {
updownTypeClient.downPackageOrDelTray(orderPackageCode,fromWarehouseId,"中转卸车下架解托"); updownTypeClient.downPackageOrDelTray(orderPackageCode, fromWarehouseId, "中转卸车下架解托");
} }
trunklineCarsLoadScanService.updateById(carsLoadScanEntity); trunklineCarsLoadScanService.updateById(carsLoadScanEntity);
@ -3182,9 +3182,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
trunklineCarsUnloadLogService.savaUnloadLog(warehouseId, warehouseName, loadId, loadCode, waybillId, waybillNo, orderCode, trunklineCarsUnloadLogService.savaUnloadLog(warehouseId, warehouseName, loadId, loadCode, waybillId, waybillNo, orderCode,
scanCode, enterNum, 2, 1, isAbnormal, trayId, trayCode, trayName, fromWarehouseId, loadScanId, remark); scanCode, enterNum, 2, 1, isAbnormal, trayId, trayCode, trayName, fromWarehouseId, loadScanId, remark);
if(unbindTray == 1){ if (unbindTray == 1) {
if(!StringUtil.isBlank(trayCode)){ if (!StringUtil.isBlank(trayCode)) {
trayTypeClient.deleteZeroOrderByTrayCode(orderCode,trayCode,fromWarehouseId,"干线中转零担解托"); trayTypeClient.deleteZeroOrderByTrayCode(orderCode, trayCode, fromWarehouseId, "干线中转零担解托");
} }
} }
@ -3247,7 +3247,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
for (UnloadPackageDTO unloadPackageDTO : unloadPackageList) { for (UnloadPackageDTO unloadPackageDTO : unloadPackageList) {
String orderPackageCode = unloadPackageDTO.getOrderPackageCode(); 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(); Integer planNum = carsOrderEntity.getPlanNum();
List<DistributionParcelListEntity> entityListByOrderCode = distributionParcelListClient.findEntityListByOrderCodeAndStatus(orderCode, warehouseId, "20"); List<DistributionParcelListEntity> entityListByOrderCode = distributionParcelListClient.findEntityListByOrderCodeAndStatus(orderCode, warehouseId, "20");
int size = entityListByOrderCode.size(); int size = entityListByOrderCode.size();
if (planNum.equals(size+realNum)) { if (planNum.equals(size + realNum)) {
for (DistributionParcelListEntity parcelListEntity : entityListByOrderCode) { for (DistributionParcelListEntity parcelListEntity : entityListByOrderCode) {
String orderPackageCode = parcelListEntity.getOrderPackageCode(); String orderPackageCode = parcelListEntity.getOrderPackageCode();
//查询包件是否已经装车 //查询包件是否已经装车
@ -4302,12 +4302,12 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
parcelListEntity.setIsTransfer(1); parcelListEntity.setIsTransfer(1);
} }
distributionParcelListClient.update(parcelListEntity); distributionParcelListClient.update(parcelListEntity);
if(StringUtil.isNotBlank(trayCode)){ if (StringUtil.isNotBlank(trayCode)) {
updownTypeClient.downPackageOrDelTray(scanCode,warehouseId,"包件下架解托"); updownTypeClient.downPackageOrDelTray(scanCode, warehouseId, "包件下架解托");
} }
}else{ } else {
if(StringUtil.isNotBlank(trayCode)){ if (StringUtil.isNotBlank(trayCode)) {
trayTypeClient.deleteZeroOrderByTrayCode(orderCode,trayCode,warehouseId,"零担解托"); 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); updateNumByLoadId(loadId);
} }
@ -4371,7 +4371,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
} }
@Override @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: 卸车包件"); log.info("#############unloadPackage: 卸车包件");
BasicdataWarehouseEntity basicdataWarehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId); BasicdataWarehouseEntity basicdataWarehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId);
@ -4587,7 +4587,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
} }
distributionParcelListClient.update(distributionParcelListEntity); distributionParcelListClient.update(distributionParcelListEntity);
} }
updownTypeClient.downPackageOrDelTray(orderPackageCode,wid,"干线卸车下架解托"); updownTypeClient.downPackageOrDelTray(orderPackageCode, wid, "干线卸车下架解托");
} }
//无装车记录异常日志记录 //无装车记录异常日志记录
@ -4625,8 +4625,8 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
trayId = trayEntity.getId(); trayId = trayEntity.getId();
trayName = trayEntity.getPalletName(); trayName = trayEntity.getPalletName();
} }
if(unbindTray == 1){ if (unbindTray == 1) {
updownTypeClient.downPackageOrDelTray(orderPackageCode,fromWarehouseId,"干线卸车下架解托"); updownTypeClient.downPackageOrDelTray(orderPackageCode, fromWarehouseId, "干线卸车下架解托");
} }
trunklineCarsLoadScanService.updateById(carsLoadScanEntity); trunklineCarsLoadScanService.updateById(carsLoadScanEntity);
@ -4835,9 +4835,9 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
trunklineCarsUnloadLogService.savaUnloadLog(warehouseId, warehouseName, loadId, loadCode, waybillId, waybillNo, orderCode, trunklineCarsUnloadLogService.savaUnloadLog(warehouseId, warehouseName, loadId, loadCode, waybillId, waybillNo, orderCode,
scanCode, enterNun, 2, 1, isAbnormal, trayId, trayCode, trayName, fromWarehouseId, loadScanId, remark); scanCode, enterNun, 2, 1, isAbnormal, trayId, trayCode, trayName, fromWarehouseId, loadScanId, remark);
if(unbindTray == 1){ if (unbindTray == 1) {
if(!StringUtil.isBlank(trayCode)){ if (!StringUtil.isBlank(trayCode)) {
trayTypeClient.deleteZeroOrderByTrayCode(orderCode,trayCode,fromWarehouseId,"干线卸车零担解托"); trayTypeClient.deleteZeroOrderByTrayCode(orderCode, trayCode, fromWarehouseId, "干线卸车零担解托");
} }
} }
@ -5072,7 +5072,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
} }
@Override @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); TrunklineCarsLoadEntity carsLoadEntity = baseMapper.selectById(loadId);
if (Objects.isNull(carsLoadEntity)) { if (Objects.isNull(carsLoadEntity)) {
log.warn("###############unloadTray: 配载计划不存在 loadId={}", loadId); log.warn("###############unloadTray: 配载计划不存在 loadId={}", loadId);
@ -5086,7 +5086,7 @@ public class TrunklineCarsLoadServiceImpl extends BaseServiceImpl<TrunklineCarsL
String scanCode = carsLoadScanEntity.getScanCode(); String scanCode = carsLoadScanEntity.getScanCode();
if (type == 1) { if (type == 1) {
//包件 //包件
unloadPackage(loadId, scanCode, warehouseId, 0, "托盘正常卸车",incomingType); unloadPackage(loadId, scanCode, warehouseId, 0, "托盘正常卸车", incomingType);
} else if (type == 2) { } else if (type == 2) {
String waybillNo = carsLoadScanEntity.getWaybillNo(); String waybillNo = carsLoadScanEntity.getWaybillNo();
Integer num = carsLoadScanEntity.getNum(); Integer num = carsLoadScanEntity.getNum();

Loading…
Cancel
Save