Browse Source

1.修改入库的的查询服务仓

fix-sign
pref_mail@163.com 4 months ago
parent
commit
c932cde227
  1. 10
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/dto/BasicdataTripartiteMallFeignDTO.java
  2. 7
      blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataTripartiteMallClient.java
  3. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataTripartiteMallController.java
  4. 35
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataTripartiteMallClient.java
  5. 1
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTripartiteMallMapper.java
  6. 1
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataTripartiteMallService.java
  7. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataTripartiteMallServiceImpl.java
  8. 53
      blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java

10
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/dto/BasicdataTripartiteMallFeignDTO.java

@ -0,0 +1,10 @@
package com.logpm.basicdata.dto;
import lombok.Data;
@Data
public class BasicdataTripartiteMallFeignDTO {
private String dealerName;
private String dealerCode;
private String brand;
}

7
blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/feign/IBasicdataTripartiteMallClient.java

@ -16,11 +16,14 @@
*/
package com.logpm.basicdata.feign;
import com.logpm.basicdata.dto.BasicdataTripartiteMallFeignDTO;
import com.logpm.basicdata.entity.BasicdataTripartiteMallEntity;
import org.springblade.common.constant.ModuleNameConstant;
import org.springblade.core.mp.support.BladePage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
/**
@ -54,6 +57,6 @@ public interface IBasicdataTripartiteMallClient {
@GetMapping(API_PREFIX+"/getClientIdByNameAndBrandAndCode")
Long getClientIdByNameAndBrandAndCode(@RequestParam String name, @RequestParam String code,@RequestParam String brand);
@GetMapping(API_PREFIX+"/findEntityByDealerNameAndDealerCodeAndBrand")
BasicdataTripartiteMallEntity findEntityByDealerNameAndDealerCodeAndBrand(@RequestParam String dealerName, @RequestParam String dealerCode, @RequestParam String brand);
@PostMapping(API_PREFIX+"/findEntityByDealerNameAndDealerCodeAndBrand")
BasicdataTripartiteMallEntity findEntityByDealerNameAndDealerCodeAndBrand(@RequestBody BasicdataTripartiteMallFeignDTO basicdataTripartiteMallDTO);
}

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataTripartiteMallController.java

@ -20,7 +20,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.basicdata.dto.BasicdataTripartiteMallDTO;
import com.logpm.basicdata.entity.BasicdataTripartiteMallEntity;
import com.logpm.basicdata.excel.BasicdataTripartiteMallExcel;
import com.logpm.basicdata.service.IBasicdataTripartiteMallService;
@ -37,7 +36,6 @@ import org.springblade.core.secure.BladeUser;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.constant.BladeConstant;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;

35
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataTripartiteMallClient.java

@ -19,12 +19,14 @@ package com.logpm.basicdata.feign;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.basicdata.dto.BasicdataTripartiteMallFeignDTO;
import com.logpm.basicdata.entity.BasicdataTripartiteMallEntity;
import com.logpm.basicdata.service.IBasicdataTripartiteMallService;
import lombok.AllArgsConstructor;
import org.springblade.core.mp.support.BladePage;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.utils.StringUtil;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
@ -56,24 +58,41 @@ public class BasicdataTripartiteMallClient implements IBasicdataTripartiteMallCl
@Override
public Long getClientIdByNameAndBrand(String name, String brand) {
return basicdataTripartiteMallService.getClientIdByNameAndBrand(name,brand);
return basicdataTripartiteMallService.getClientIdByNameAndBrand(name, brand);
}
@Override
public Long getClientIdByNameAndBrandAndCode(String name, String code, String brand) {
return basicdataTripartiteMallService.getClientIdByNameAndBrandAndCode(name,code,brand);
return basicdataTripartiteMallService.getClientIdByNameAndBrandAndCode(name, code, brand);
}
@Override
public BasicdataTripartiteMallEntity findEntityByDealerNameAndDealerCodeAndBrand(String dealerName, String dealerCode, String brand) {
public BasicdataTripartiteMallEntity findEntityByDealerNameAndDealerCodeAndBrand(BasicdataTripartiteMallFeignDTO basicdataTripartiteMallDTO) {
if (basicdataTripartiteMallDTO == null) {
return null;
}
if (StringUtil.isBlank(basicdataTripartiteMallDTO.getDealerName()) &&
StringUtil.isBlank(basicdataTripartiteMallDTO.getDealerCode()) &&
StringUtil.isBlank(basicdataTripartiteMallDTO.getBrand())
) {
return null;
}
QueryWrapper<BasicdataTripartiteMallEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("tripartite_mall",dealerName)
.eq("tripartite_coding",dealerCode)
.eq("brand_name",brand);
if (!StringUtil.isBlank(basicdataTripartiteMallDTO.getDealerName())) {
queryWrapper.eq("tripartite_mall", basicdataTripartiteMallDTO.getDealerName());
}
if (!StringUtil.isBlank(basicdataTripartiteMallDTO.getDealerCode())) {
queryWrapper.eq("tripartite_coding", basicdataTripartiteMallDTO.getDealerCode());
}
if (!StringUtil.isBlank(basicdataTripartiteMallDTO.getBrand())) {
queryWrapper.eq("brand_name", basicdataTripartiteMallDTO.getBrand());
}
List<BasicdataTripartiteMallEntity> list = basicdataTripartiteMallService.list(queryWrapper);
if(CollUtil.isEmpty(list)){
if (CollUtil.isEmpty(list)) {
return null;
}else{
} else {
return list.get(0);
}
}

1
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataTripartiteMallMapper.java

@ -19,7 +19,6 @@ package com.logpm.basicdata.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.basicdata.dto.BasicdataTripartiteMallDTO;
import com.logpm.basicdata.entity.BasicdataTripartiteMallEntity;
import com.logpm.basicdata.excel.BasicdataTripartiteMallExcel;
import com.logpm.basicdata.vo.BasicdataTripartiteMallVO;

1
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/IBasicdataTripartiteMallService.java

@ -18,7 +18,6 @@ package com.logpm.basicdata.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.basicdata.dto.BasicdataTripartiteMallDTO;
import com.logpm.basicdata.entity.BasicdataTripartiteMallEntity;
import com.logpm.basicdata.excel.BasicdataTripartiteMallExcel;
import com.logpm.basicdata.vo.BasicdataTripartiteMallVO;

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

@ -16,11 +16,9 @@
*/
package com.logpm.basicdata.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.logpm.basicdata.dto.BasicdataTripartiteMallDTO;
import com.logpm.basicdata.entity.BasicdataClientEntity;
import com.logpm.basicdata.entity.BasicdataClientLogEntity;
import com.logpm.basicdata.entity.BasicdataTripartiteMallEntity;

53
blade-service/logpm-trunkline/src/main/java/com/logpm/trunkline/service/impl/InComingServiceImpl.java

@ -6,6 +6,7 @@ import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.logpm.basicdata.dto.BasicdataTripartiteMallFeignDTO;
import com.logpm.basicdata.entity.BasicdataStorageServicesEntity;
import com.logpm.basicdata.entity.BasicdataTripartiteMallEntity;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
@ -193,13 +194,13 @@ public class InComingServiceImpl implements IInComingService {
String sendWarehouse = null;
String endWarehouse = null;
List<DistributionParcelListEntity> byPacketBarCode = parcelListClient.findByPacketBarCode(packageCode);
if(CollUtil.isNotEmpty(byPacketBarCode)){
if (CollUtil.isNotEmpty(byPacketBarCode)) {
DistributionParcelListEntity parcelListEntity = byPacketBarCode.get(0);
if(ObjectUtil.isNotEmpty(parcelListEntity)){
if(StrUtil.isNotEmpty(parcelListEntity.getSendWarehouseName())){
if (ObjectUtil.isNotEmpty(parcelListEntity)) {
if (StrUtil.isNotEmpty(parcelListEntity.getSendWarehouseName())) {
sendWarehouse = parcelListEntity.getSendWarehouseName();
}
if(StrUtil.isNotEmpty(parcelListEntity.getAcceptWarehouseName())){
if (StrUtil.isNotEmpty(parcelListEntity.getAcceptWarehouseName())) {
endWarehouse = parcelListEntity.getAcceptWarehouseName();
}
}
@ -241,7 +242,7 @@ public class InComingServiceImpl implements IInComingService {
Long warehouseId = inComingDTO.getWarehouseId();//仓库id
String warehouseName = inComingDTO.getWarehouseName();
Integer incomingType = inComingDTO.getIncomingType();//入库类型 1码板打托 2扫码入库 3直接入库 4 按车次号入库 5按订单入库 6扫描入库 7 批量卸车入库 8卸车托盘 9卸分一体 10补录数据入库
try{
try {
if (StringUtil.isBlank(warehouseName)) {
BasicdataWarehouseEntity warehouseEntity = warehouseClient.getEntityWarehouseId(warehouseId);
@ -406,7 +407,7 @@ public class InComingServiceImpl implements IInComingService {
Tenant tenant = result.getData();
if (tenant!=null && tenant.getTenantType() == 1) {
if (tenant != null && tenant.getTenantType() == 1) {
// 发送入库消息
OrderStatusDTO orderStatusDTO = new OrderStatusDTO();
// 通过包件id 查询包件
@ -421,13 +422,13 @@ public class InComingServiceImpl implements IInComingService {
String sendWarehouse = null;
String endWarehouse = null;
List<DistributionParcelListEntity> byPacketBarCode = parcelListClient.findByPacketBarCode(advanceDetailEntity.getOrderPackageCode());
if(CollUtil.isNotEmpty(byPacketBarCode)){
if (CollUtil.isNotEmpty(byPacketBarCode)) {
DistributionParcelListEntity parcelListEntity = byPacketBarCode.get(0);
if(ObjectUtil.isNotEmpty(parcelListEntity)){
if(StrUtil.isNotEmpty(parcelListEntity.getSendWarehouseName())){
if (ObjectUtil.isNotEmpty(parcelListEntity)) {
if (StrUtil.isNotEmpty(parcelListEntity.getSendWarehouseName())) {
sendWarehouse = parcelListEntity.getSendWarehouseName();
}
if(StrUtil.isNotEmpty(parcelListEntity.getAcceptWarehouseName())){
if (StrUtil.isNotEmpty(parcelListEntity.getAcceptWarehouseName())) {
endWarehouse = parcelListEntity.getAcceptWarehouseName();
}
}
@ -451,7 +452,7 @@ public class InComingServiceImpl implements IInComingService {
.build()))
.build();
factoryDataMessageSender.sendNodeDataByBrand(nodePushMsg);
} else if (tenant!=null && tenant.getTenantType() == 2) {
} else if (tenant != null && tenant.getTenantType() == 2) {
// 完结预入库数据状态
// JSONObject jsonObject = new JSONObject();
// jsonObject.put("orderPackageCode", advanceDetailEntity.getOrderPackageCode());
@ -559,7 +560,11 @@ public class InComingServiceImpl implements IInComingService {
return Resp.scanSuccess("商家为" + dealerName, "商家为" + dealerName);
}
} else {
BasicdataTripartiteMallEntity tripartiteMallEntity = tripartiteMallClient.findEntityByDealerNameAndDealerCodeAndBrand(dealerName, dealerCode, brand);
BasicdataTripartiteMallFeignDTO basicdataTripartiteMallFeignDTO = new BasicdataTripartiteMallFeignDTO();
basicdataTripartiteMallFeignDTO.setDealerName(dealerName);
basicdataTripartiteMallFeignDTO.setDealerCode(dealerCode);
basicdataTripartiteMallFeignDTO.setBrand(brand);
BasicdataTripartiteMallEntity tripartiteMallEntity = tripartiteMallClient.findEntityByDealerNameAndDealerCodeAndBrand(basicdataTripartiteMallFeignDTO);
if (!Objects.isNull(tripartiteMallEntity)) {
Long clientId = tripartiteMallEntity.getClientId();
BasicdataStorageServicesEntity storageServicesEntity = storageServicesClient.findEntityBySendWarehouseIdAndClientId(warehouseId, clientId);
@ -578,8 +583,8 @@ public class InComingServiceImpl implements IInComingService {
throw e;
}
if(CollUtil.isNotEmpty(sendAdvanceDetailEntityList)){
advanceDetailService.sendReportIncomingData(AuthUtil.getUserId(),AuthUtil.getNickName(),sendAdvanceDetailEntityList,warehouseId,warehouseName,incomingType);
if (CollUtil.isNotEmpty(sendAdvanceDetailEntityList)) {
advanceDetailService.sendReportIncomingData(AuthUtil.getUserId(), AuthUtil.getNickName(), sendAdvanceDetailEntityList, warehouseId, warehouseName, incomingType);
}
String a = audio.get();
@ -833,7 +838,7 @@ public class InComingServiceImpl implements IInComingService {
//查询所有包件
List<TrunklineAdvanceDetailEntity> detailList = advanceDetailService.list(queryWrapper);
List<String> orderPackageCodes = advanceService.incomingPackageBatch(advanceId, warehouseId, detailList, userId, deptId, tenantId, waybillEntity,incomingType);
List<String> orderPackageCodes = advanceService.incomingPackageBatch(advanceId, warehouseId, detailList, userId, deptId, tenantId, waybillEntity, incomingType);
advanceDetailService.updateBatchById(detailList);
@ -869,21 +874,21 @@ public class InComingServiceImpl implements IInComingService {
}
if(CollUtil.isNotEmpty(sendAdvanceDetailEntityList)){
if (CollUtil.isNotEmpty(sendAdvanceDetailEntityList)) {
try {
if (CollUtil.isNotEmpty(sendAdvanceDetailEntityList)) {
for (TrunklineAdvanceDetailEntity advanceDetailEntity : sendAdvanceDetailEntityList) {
String waybillNo = advanceDetailEntity.getWaybillNo();
String sendWarehouse = null;
String endWarehouse = null;
if(StrUtil.isNotEmpty(waybillNo)){
if(waybillEntityMap.containsKey(waybillNo)){
if (StrUtil.isNotEmpty(waybillNo)) {
if (waybillEntityMap.containsKey(waybillNo)) {
WarehouseWaybillEntity warehouseWaybillEntity = waybillEntityMap.get(waybillNo);
if(ObjectUtil.isNotEmpty(warehouseWaybillEntity)){
if(StrUtil.isNotEmpty(warehouseWaybillEntity.getDepartureWarehouseName())){
if (ObjectUtil.isNotEmpty(warehouseWaybillEntity)) {
if (StrUtil.isNotEmpty(warehouseWaybillEntity.getDepartureWarehouseName())) {
sendWarehouse = warehouseWaybillEntity.getDepartureWarehouseName();
}
if(StrUtil.isNotEmpty(warehouseWaybillEntity.getDestinationWarehouseName())){
if (StrUtil.isNotEmpty(warehouseWaybillEntity.getDestinationWarehouseName())) {
endWarehouse = warehouseWaybillEntity.getDestinationWarehouseName();
}
}
@ -911,10 +916,10 @@ public class InComingServiceImpl implements IInComingService {
factoryDataMessageSender.sendNodeDataByBrand(nodePushMsg);
}
}
}catch (Exception e){
log.error("始发仓入库推送工厂消息异常",e);
} catch (Exception e) {
log.error("始发仓入库推送工厂消息异常", e);
}
advanceDetailService.sendReportIncomingData(AuthUtil.getUserId(),AuthUtil.getNickName(),sendAdvanceDetailEntityList,warehouseId,warehouseName,incomingType);
advanceDetailService.sendReportIncomingData(AuthUtil.getUserId(), AuthUtil.getNickName(), sendAdvanceDetailEntityList, warehouseId, warehouseName, incomingType);
}
// DynamicDataSourceContextHolder.clear();

Loading…
Cancel
Save