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. 90
      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);
/** /**
* 查询当前签收率 * 查询当前签收率

90
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,47 +528,58 @@ 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()){
List<IndexDeliveryDataVO> indexDeliveryDataVO = warehouseIndexMapper.findBillLadingTotal(indexDTO); indexBillDataVOList = new ArrayList<>();
if (Func.isNotEmpty(indexDeliveryDataVO)) { //查询自提信息
for (IndexDeliveryDataVO deliveryDataVO : indexDeliveryDataVO) { List<IndexDeliveryDataVO> indexDeliveryDataVO = warehouseIndexMapper.findBillLadingTotal(indexDTO);
//查询自提总件数 if (Func.isNotEmpty(indexDeliveryDataVO)) {
Integer billLadingTotalNum = warehouseIndexMapper.findBillLadingTotalNum(deliveryDataVO.getWarehouseId()); for (IndexDeliveryDataVO deliveryDataVO : indexDeliveryDataVO) {
deliveryDataVO.setTotalDeliveryNum(billLadingTotalNum); //查询自提总件数
//查询总重量 Integer billLadingTotalNum = warehouseIndexMapper.findBillLadingTotalNum(deliveryDataVO.getWarehouseId());
BigDecimal billLadingTotalWeight = warehouseIndexMapper.findBillLadingTotalWeight(deliveryDataVO.getWarehouseId()); deliveryDataVO.setTotalDeliveryNum(billLadingTotalNum);
deliveryDataVO.setTotalWeight(billLadingTotalWeight); //查询总重量
//查询总包件体积 BigDecimal billLadingTotalWeight = warehouseIndexMapper.findBillLadingTotalWeight(deliveryDataVO.getWarehouseId());
BigDecimal billLadingTotalVolume = warehouseIndexMapper.findBillLadingTotalVolume(deliveryDataVO.getWarehouseId()); deliveryDataVO.setTotalWeight(billLadingTotalWeight);
deliveryDataVO.setTotalVolume(billLadingTotalVolume); //查询总包件体积
//查询在途件数 BigDecimal billLadingTotalVolume = warehouseIndexMapper.findBillLadingTotalVolume(deliveryDataVO.getWarehouseId());
deliveryDataVO.setTotalVolume(billLadingTotalVolume);
//查询在途件数
// Integer billLadingRoadTotalNum = warehouseIndexMapper.findBillLadingRoadTotalNum(deliveryDataVO.getWarehouseId()); // Integer billLadingRoadTotalNum = warehouseIndexMapper.findBillLadingRoadTotalNum(deliveryDataVO.getWarehouseId());
// deliveryDataVO.setTotalRoadNum(billLadingRoadTotalNum); // deliveryDataVO.setTotalRoadNum(billLadingRoadTotalNum);
}
indexBillDataVOList.addAll(indexDeliveryDataVO);
} }
indexDeliveryDataVOList.addAll(indexDeliveryDataVO); bladeRedis.setEx(billKey, indexBillDataVOList, 3600L);
} }
//查询尊外协信息 map.put("data2",indexBillDataVOList);
List<IndexDeliveryDataVO> indexTripartiteDeliveryDataVOS = warehouseIndexMapper.findTripartiteDeliveryTotal(indexDTO); if (indexTripartiteDeliveryDataVOList.isEmpty()){
if (!indexTripartiteDeliveryDataVOS.isEmpty()) { //查询尊外协信息
for (IndexDeliveryDataVO indexTripartiteDeliveryDataVO : indexTripartiteDeliveryDataVOS) { indexTripartiteDeliveryDataVOList = new ArrayList<>();
//总包件数量 List<IndexDeliveryDataVO> indexTripartiteDeliveryDataVOS = warehouseIndexMapper.findTripartiteDeliveryTotal(indexDTO);
Integer deLiveryTotalNum = warehouseIndexMapper.findDeLiveryTotalNum(indexTripartiteDeliveryDataVO.getType(),indexTripartiteDeliveryDataVO.getWarehouseId(),2); if (!indexTripartiteDeliveryDataVOS.isEmpty()) {
indexTripartiteDeliveryDataVO.setTotalDeliveryNum(deLiveryTotalNum); for (IndexDeliveryDataVO indexTripartiteDeliveryDataVO : indexTripartiteDeliveryDataVOS) {
//查询总重量 //总包件数量
BigDecimal totalWeight = warehouseIndexMapper.findDeliveryTotalWeight( indexTripartiteDeliveryDataVO.getType(),indexTripartiteDeliveryDataVO.getWarehouseId(),2); Integer deLiveryTotalNum = warehouseIndexMapper.findDeLiveryTotalNum(indexTripartiteDeliveryDataVO.getType(),indexTripartiteDeliveryDataVO.getWarehouseId(),2);
indexTripartiteDeliveryDataVO.setTotalWeight(totalWeight); indexTripartiteDeliveryDataVO.setTotalDeliveryNum(deLiveryTotalNum);
//查询总包件体积 //查询总重量
BigDecimal totalVolume = warehouseIndexMapper.findDeliveryTotalVolume( indexTripartiteDeliveryDataVO.getType(),indexTripartiteDeliveryDataVO.getWarehouseId(),2); BigDecimal totalWeight = warehouseIndexMapper.findDeliveryTotalWeight( indexTripartiteDeliveryDataVO.getType(),indexTripartiteDeliveryDataVO.getWarehouseId(),2);
indexTripartiteDeliveryDataVO.setTotalVolume(totalVolume); indexTripartiteDeliveryDataVO.setTotalWeight(totalWeight);
//查询总包件体积
BigDecimal totalVolume = warehouseIndexMapper.findDeliveryTotalVolume( indexTripartiteDeliveryDataVO.getType(),indexTripartiteDeliveryDataVO.getWarehouseId(),2);
indexTripartiteDeliveryDataVO.setTotalVolume(totalVolume);
}
indexTripartiteDeliveryDataVOList.addAll(indexTripartiteDeliveryDataVOS);
bladeRedis.setEx(tripartiteDeliveryKey, indexTripartiteDeliveryDataVOList, 3600L);
} }
} }
map.put("data3",indexTripartiteDeliveryDataVOList);
bladeRedis.setEx(key, indexDeliveryDataVOList, 3600L);
} }
return indexDeliveryDataVOList;
return map;
} }
@Override @Override

Loading…
Cancel
Save