Browse Source

1.干线暂存单导入提醒日志添加

master
zhenghaoyu 8 months ago
parent
commit
ab37775bf9
  1. 32
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/OpenOrderController.java
  2. 9
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IOpenOrderService.java
  3. 36
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/OpenOrderServiceImpl.java

32
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/controller/OpenOrderController.java

@ -1087,13 +1087,7 @@ public class OpenOrderController {
return R.fail(403,"仓库信息为空");
}
R<List<TrunklineAdvanceEntity>> listR = openOrderService.openLabelHasPacakage(myCurrentWarehouse.getId(),myCurrentWarehouse.getName(),file);
List<TrunklineAdvanceEntity> data = listR.getData();
if(!CollUtil.isEmpty(data)){
carsLoadAsyncService.sendRabbitMessageLoadScanData(data);
}
return listR;
return openOrderService.openLabelHasPacakage(myCurrentWarehouse.getId(),myCurrentWarehouse.getName(),file);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
@ -1119,15 +1113,7 @@ public class OpenOrderController {
return R.fail(403,"仓库信息为空");
}
R<List<TrunklineAdvanceEntity>> listR = openOrderService.importOrderNoPackage(myCurrentWarehouse.getId(),myCurrentWarehouse.getName(),myCurrentWarehouse.getWarehouseCode(),file);
// List<TrunklineAdvanceEntity> data = listR.getData();
// if(!CollUtil.isEmpty(data)){
// for (TrunklineAdvanceEntity datum : data) {
// carsLoadService.sendRabbitMessageLoadScanData(JSONUtil.toJsonStr(datum));
// }
// }
return listR;
return openOrderService.importOrderNoPackage(myCurrentWarehouse.getId(),myCurrentWarehouse.getName(),myCurrentWarehouse.getWarehouseCode(),file);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
@ -1156,12 +1142,7 @@ public class OpenOrderController {
return R.fail(403,"仓库信息为空");
}
R<List<TrunklineAdvanceEntity>> listR = openOrderService.importCustomizedOuPai(myCurrentWarehouse.getId(), myCurrentWarehouse.getName(), file);
List<TrunklineAdvanceEntity> data = listR.getData();
if(!CollUtil.isEmpty(data)){
carsLoadAsyncService.sendRabbitMessageLoadScanData(data);
}
return listR;
return openOrderService.importCustomizedOuPai(myCurrentWarehouse.getId(), myCurrentWarehouse.getName(), file);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);
@ -1188,12 +1169,7 @@ public class OpenOrderController {
return R.fail(403,"仓库信息为空");
}
R<List<TrunklineAdvanceEntity>> listR = openOrderService.importStandardOuPai(myCurrentWarehouse.getId(),myCurrentWarehouse.getName(),file);
List<TrunklineAdvanceEntity> data = listR.getData();
if(!CollUtil.isEmpty(data)){
carsLoadAsyncService.sendRabbitMessageLoadScanData(data);
}
return listR;
return openOrderService.importStandardOuPai(myCurrentWarehouse.getId(),myCurrentWarehouse.getName(),file);
}catch (CustomerException e){
log.error(e.message,e);
return R.fail(e.code,e.message);

9
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/IOpenOrderService.java

@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.trunkline.dto.AdvanceDTO;
import com.logpm.trunkline.dto.OpenLabelDTO;
import com.logpm.trunkline.dto.OpenOrderDTO;
import com.logpm.trunkline.entity.TrunklineAdvanceEntity;
import com.logpm.trunkline.vo.TrunklineAdvanceDetailVO;
import com.logpm.trunkline.vo.TrunklineAdvanceVO;
import org.springblade.core.tool.api.R;
@ -44,11 +43,11 @@ public interface IOpenOrderService {
R openLabel(OpenLabelDTO openLabelDTO);
R<List<TrunklineAdvanceEntity>> openLabelHasPacakage(Long warehouseId, String warehouseName, MultipartFile file) throws IOException;
R openLabelHasPacakage(Long warehouseId, String warehouseName, MultipartFile file) throws IOException;
R<List<TrunklineAdvanceEntity>> importCustomizedOuPai(Long warehouseId, String warehouseName, MultipartFile file) throws IOException;
R importCustomizedOuPai(Long warehouseId, String warehouseName, MultipartFile file) throws IOException;
R<List<TrunklineAdvanceEntity>> importStandardOuPai(Long warehouseId, String warehouseName, MultipartFile file) throws IOException;
R importStandardOuPai(Long warehouseId, String warehouseName, MultipartFile file) throws IOException;
R findWaybillDetail(OpenOrderDTO openOrderDTO);
@ -62,7 +61,7 @@ public interface IOpenOrderService {
R findPayWayByClientId(Long clientId);
R<List<TrunklineAdvanceEntity>> importOrderNoPackage(Long warehouseId, String warehouseName, String warehouseCode, MultipartFile file) throws IOException;
R importOrderNoPackage(Long warehouseId, String warehouseName, String warehouseCode, MultipartFile file) throws IOException;
R checkWaybill(OpenOrderDTO openOrderDTO);

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

@ -93,6 +93,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
private final ITrunklineCarsLoadScanService trunklineCarsLoadScanService;
private final IBasicdataStoreContactClient basicdataStoreContactClient;
private final IAsyncService asyncService;
private final ICarsLoadAsyncService carsLoadAsyncService;
@Override
public IPage<TrunklineAdvanceVO> advancePageList(AdvanceDTO advanceDTO) {
@ -619,7 +620,6 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
//队列处理包件补数据
// sendRabbitMessageLoadScanData(JSONUtil.parseArray(advanceIds));
carsLoadService.sendRabbitMessageOpenOrder(advanceIds, waybillId);
Map<String,Object> map = new HashMap<>();
@ -1062,7 +1062,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
@Transactional(rollbackFor = Exception.class)
@Override
public R<List<TrunklineAdvanceEntity>> openLabelHasPacakage(Long warehouseId, String warehouseName, MultipartFile file) throws IOException {
public R openLabelHasPacakage(Long warehouseId, String warehouseName, MultipartFile file) throws IOException {
if (Objects.isNull(file)) {
log.warn("##################openLabelHasPacakage: 文件不存在");
return R.fail(405, "文件不存在");
@ -1352,7 +1352,13 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
}
return R.data(advanceEntityList);
if(!CollUtil.isEmpty(advanceEntityList)){
carsLoadAsyncService.sendRabbitMessageLoadScanData(advanceEntityList);
}
int successNum = advanceDetailEntities.size();
return R.success("成功处理包件"+successNum+"件");
}
public int findFirstDigitIndex(String str) {
@ -1367,7 +1373,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
@Transactional(rollbackFor = Exception.class)
@Override
public R<List<TrunklineAdvanceEntity>> importCustomizedOuPai(Long warehouseId, String warehouseName, MultipartFile file) throws IOException {
public R importCustomizedOuPai(Long warehouseId, String warehouseName, MultipartFile file) throws IOException {
if (Objects.isNull(file)) {
log.warn("##################importCustomizedOuPai: 文件不存在");
return R.fail(405, "文件不存在");
@ -1619,13 +1625,18 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
log.info("################本次耗时 " + (end - start) + "ms");
int size = advanceDetailEntities.size();
if(!CollUtil.isEmpty(advanceEntityList)){
carsLoadAsyncService.sendRabbitMessageLoadScanData(advanceEntityList);
}
return R.data(advanceEntityList);
return R.success("成功导入"+size+"条");
}
@Transactional(rollbackFor = Exception.class)
@Override
public R<List<TrunklineAdvanceEntity>> importStandardOuPai(Long warehouseId, String warehouseName, MultipartFile file) throws IOException {
public R importStandardOuPai(Long warehouseId, String warehouseName, MultipartFile file) throws IOException {
if (Objects.isNull(file)) {
log.warn("##################importStandardOuPai: 文件不存在");
return R.fail(405, "文件不存在");
@ -1907,10 +1918,15 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
comlist.add(fromCpFirstReq);
}
CompletableFuture.allOf(comlist.toArray(new CompletableFuture[0])).join();
}
if(!CollUtil.isEmpty(advanceEntityList)){
carsLoadAsyncService.sendRabbitMessageLoadScanData(advanceEntityList);
}
return R.data(advanceEntityList);
int successNum = advanceDetailEntities.size();
return R.success("成功导入"+successNum+"条");
}
@Override
@ -2206,7 +2222,7 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
@Transactional(rollbackFor = Exception.class)
@Override
public R<List<TrunklineAdvanceEntity>> importOrderNoPackage(Long warehouseId, String warehouseName, String warehouseCode, MultipartFile file) throws IOException {
public R importOrderNoPackage(Long warehouseId, String warehouseName, String warehouseCode, MultipartFile file) throws IOException {
if (Objects.isNull(file)) {
log.warn("##################importOrderNoPackage: 文件不存在");
return R.fail(405, "文件不存在");
@ -2293,7 +2309,9 @@ public class OpenOrderServiceImpl implements IOpenOrderService {
});
advanceService.saveBatch(list);
return R.data(list);
int successNum = list.size();
return R.success("成功导入"+successNum+"件");
}
@Override

Loading…
Cancel
Save