Browse Source

首页代码提交 工单BUG修复

dev
汤建军 2 months ago
parent
commit
de51e85c14
  1. 2
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml
  2. 3
      blade-service/logpm-report/src/main/java/com/logpm/report/controller/WarehouseIndexController.java
  3. 3
      blade-service/logpm-report/src/main/java/com/logpm/report/service/IWarehouseIndexService.java
  4. 34
      blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java

2
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml

@ -719,7 +719,7 @@
lap.is_deleted AS is_deleted lap.is_deleted AS is_deleted
from logpm_aftersales_work_order lawo left JOIN from logpm_aftersales_work_order lawo left JOIN
logpm_aftersales_processor lap on lap.work_order_id= lawo.id logpm_aftersales_processor lap on lap.work_order_id= lawo.id AND lap.types_of != 3 AND lap.processing_status = 4
left join logpm_aftersales_abnormal_package laap on laap.work_order_id=lawo.id AND laap.is_deleted = 0 left join logpm_aftersales_abnormal_package laap on laap.work_order_id=lawo.id AND laap.is_deleted = 0
LEFT JOIN logpm_distribution_stock_article ldsa ON ldsa.id = laap.order_id LEFT JOIN logpm_distribution_stock_article ldsa ON ldsa.id = laap.order_id
LEFT JOIN logpm_aftersales_processing_results lapr ON lapr.work_order_id = lap.work_order_id AND lapr.is_deleted = 0 LEFT JOIN logpm_aftersales_processing_results lapr ON lapr.work_order_id = lap.work_order_id AND lapr.is_deleted = 0

3
blade-service/logpm-report/src/main/java/com/logpm/report/controller/WarehouseIndexController.java

@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.Objects; import java.util.Objects;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -294,7 +295,7 @@ public class WarehouseIndexController {
indexDTO.setWarehouseIds(warehouseIds); indexDTO.setWarehouseIds(warehouseIds);
//查询订制品打托列表 //查询订制品打托列表
List<IndexDeliveryDataVO> indexDeliveryDataVO = warehouseIndexService.deliveryData(indexDTO); Map<String,List<IndexDeliveryDataVO>> indexDeliveryDataVO = warehouseIndexService.deliveryData(indexDTO);
return R.data(indexDeliveryDataVO); return R.data(indexDeliveryDataVO);
} catch (CustomerException e) { } catch (CustomerException e) {
log.warn(e.message); log.warn(e.message);

3
blade-service/logpm-report/src/main/java/com/logpm/report/service/IWarehouseIndexService.java

@ -6,6 +6,7 @@ import com.logpm.report.vo.indexCount.IndexDeliveryDataVO;
import com.logpm.report.vo.indexCount.IndexSignforDataVO; import com.logpm.report.vo.indexCount.IndexSignforDataVO;
import java.util.List; import java.util.List;
import java.util.Map;
public interface IWarehouseIndexService { public interface IWarehouseIndexService {
IndexOpenOrderDataVO openOrderData(IndexDTO indexDTO); IndexOpenOrderDataVO openOrderData(IndexDTO indexDTO);
@ -27,7 +28,7 @@ public interface IWarehouseIndexService {
* @param indexDTO * @param indexDTO
* @return * @return
*/ */
List<IndexDeliveryDataVO> deliveryData(IndexDTO indexDTO); Map<String,List<IndexDeliveryDataVO>> deliveryData(IndexDTO indexDTO);
/** /**
* 查询当前签收率 * 查询当前签收率

34
blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java

@ -495,12 +495,19 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
} }
@Override @Override
public List<IndexDeliveryDataVO> deliveryData(IndexDTO indexDTO) { public Map<String,List<IndexDeliveryDataVO>> deliveryData(IndexDTO indexDTO) {
BladeUser user = AuthUtil.getUser(); BladeUser user = AuthUtil.getUser();
String key = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "deliveryData:" + indexDTO.toString()); String deliveryKey = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "deliveryData:" + indexDTO.toString());
// List<IndexDeliveryDataVO> indexDeliveryDataVOList = bladeRedis.get(key); String billKey = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "deliveryData:" + indexDTO.toString());
String tripartiteDeliveryKey = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "deliveryData:" + indexDTO.toString());
// List<IndexDeliveryDataVO> indexDeliveryDataVOList = bladeRedis.get(deliveryKey);
// List<IndexDeliveryDataVO> indexBillDataVOList = bladeRedis.get(billKey);
// List<IndexDeliveryDataVO> indexBillDataVOList = bladeRedis.get(tripartiteDeliveryKey);
List<IndexDeliveryDataVO> indexDeliveryDataVOList= null; List<IndexDeliveryDataVO> indexDeliveryDataVOList= null;
List<IndexDeliveryDataVO> indexBillDataVOList= null;
List<IndexDeliveryDataVO> indexTripartiteDeliveryDataVOList= null;
Map<String,List<IndexDeliveryDataVO>> map = new HashMap<>();
if (Objects.isNull(indexDeliveryDataVOList)) { if (Objects.isNull(indexDeliveryDataVOList)) {
//查询商市配的信息 //查询商市配的信息
indexDeliveryDataVOList = new ArrayList<>(); indexDeliveryDataVOList = new ArrayList<>();
@ -521,8 +528,11 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
// indexDeliveryDataVO.setTotalRoadNum(totalRoadNum); // indexDeliveryDataVO.setTotalRoadNum(totalRoadNum);
} }
indexDeliveryDataVOList.addAll(indexDeliveryDataVOS); indexDeliveryDataVOList.addAll(indexDeliveryDataVOS);
bladeRedis.setEx(deliveryKey, indexDeliveryDataVOList, 3600L);
} }
map.put("data1",indexDeliveryDataVOList);
if (indexBillDataVOList.isEmpty()){
indexBillDataVOList = new ArrayList<>();
//查询自提信息 //查询自提信息
List<IndexDeliveryDataVO> indexDeliveryDataVO = warehouseIndexMapper.findBillLadingTotal(indexDTO); List<IndexDeliveryDataVO> indexDeliveryDataVO = warehouseIndexMapper.findBillLadingTotal(indexDTO);
if (Func.isNotEmpty(indexDeliveryDataVO)) { if (Func.isNotEmpty(indexDeliveryDataVO)) {
@ -540,9 +550,14 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
// Integer billLadingRoadTotalNum = warehouseIndexMapper.findBillLadingRoadTotalNum(deliveryDataVO.getWarehouseId()); // Integer billLadingRoadTotalNum = warehouseIndexMapper.findBillLadingRoadTotalNum(deliveryDataVO.getWarehouseId());
// deliveryDataVO.setTotalRoadNum(billLadingRoadTotalNum); // deliveryDataVO.setTotalRoadNum(billLadingRoadTotalNum);
} }
indexDeliveryDataVOList.addAll(indexDeliveryDataVO); indexBillDataVOList.addAll(indexDeliveryDataVO);
}
bladeRedis.setEx(billKey, indexBillDataVOList, 3600L);
} }
map.put("data2",indexBillDataVOList);
if (indexTripartiteDeliveryDataVOList.isEmpty()){
//查询尊外协信息 //查询尊外协信息
indexTripartiteDeliveryDataVOList = new ArrayList<>();
List<IndexDeliveryDataVO> indexTripartiteDeliveryDataVOS = warehouseIndexMapper.findTripartiteDeliveryTotal(indexDTO); List<IndexDeliveryDataVO> indexTripartiteDeliveryDataVOS = warehouseIndexMapper.findTripartiteDeliveryTotal(indexDTO);
if (!indexTripartiteDeliveryDataVOS.isEmpty()) { if (!indexTripartiteDeliveryDataVOS.isEmpty()) {
for (IndexDeliveryDataVO indexTripartiteDeliveryDataVO : indexTripartiteDeliveryDataVOS) { for (IndexDeliveryDataVO indexTripartiteDeliveryDataVO : indexTripartiteDeliveryDataVOS) {
@ -557,11 +572,14 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService {
indexTripartiteDeliveryDataVO.setTotalVolume(totalVolume); indexTripartiteDeliveryDataVO.setTotalVolume(totalVolume);
} }
indexTripartiteDeliveryDataVOList.addAll(indexTripartiteDeliveryDataVOS);
bladeRedis.setEx(tripartiteDeliveryKey, indexTripartiteDeliveryDataVOList, 3600L);
} }
bladeRedis.setEx(key, indexDeliveryDataVOList, 3600L);
} }
return indexDeliveryDataVOList; map.put("data3",indexTripartiteDeliveryDataVOList);
}
return map;
} }
@Override @Override

Loading…
Cancel
Save