|
@@ -3,10 +3,13 @@ package com.ruoyi.ccb.service.impl;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import cn.hutool.json.JSONObject;
|
|
|
import com.ruoyi.basicData.domain.TCorps;
|
|
|
+import com.ruoyi.basicData.mapper.TWarehouseMapper;
|
|
|
import com.ruoyi.basicData.service.ITWarehouseService;
|
|
|
import com.ruoyi.ccb.domain.QueryLowerPositionR;
|
|
|
import com.ruoyi.ccb.service.ForeignHttpService;
|
|
|
import com.ruoyi.common.core.domain.entity.TWarehouse;
|
|
|
+import com.ruoyi.reportManagement.domain.TWhgenleg;
|
|
|
+import com.ruoyi.reportManagement.service.ITWhgenlegService;
|
|
|
import com.ruoyi.warehouseBusiness.domain.TWarehouseBills;
|
|
|
import com.ruoyi.warehouseBusiness.request.InventoryQueryRequest;
|
|
|
import com.ruoyi.warehouseBusiness.response.InventoryQueryResponse;
|
|
@@ -15,6 +18,7 @@ import lombok.AllArgsConstructor;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.util.*;
|
|
|
|
|
|
/**
|
|
@@ -29,6 +33,12 @@ public class ForeignHttpServiceImpl implements ForeignHttpService {
|
|
|
@Autowired
|
|
|
private ITWarehouseService itWarehouseService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ITWhgenlegService itWhgenlegService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private TWarehouseMapper tWarehouseMapper;
|
|
|
+
|
|
|
@Override
|
|
|
public QueryLowerPositionR queryLowerPositionV1(String position) {
|
|
|
List<Map<String, Object>> mapList = new ArrayList<>();
|
|
@@ -151,10 +161,19 @@ public class ForeignHttpServiceImpl implements ForeignHttpService {
|
|
|
System.out.println("=================仓库id:=================" + wareHouseId);
|
|
|
System.out.println("=================开始时间:=================" + startTime);
|
|
|
System.out.println("=================结束时间:=================" + endTime);
|
|
|
-
|
|
|
+ TWhgenleg tWhgenleg = new TWhgenleg();
|
|
|
+ // 获取仓库信息
|
|
|
+ tWhgenleg.setfWarehouseLocationid(Long.parseLong(wareHouseId));
|
|
|
+ tWhgenleg.setIsCntrno(0L);
|
|
|
+ TWarehouse tWarehouse = tWarehouseMapper.selectTWarehouseById(tWhgenleg.getfWarehouseLocationid());
|
|
|
+ if (tWarehouse.getfLocation() == 1) {
|
|
|
+ tWhgenleg.setfLocation(1L);
|
|
|
+ } else {
|
|
|
+ tWhgenleg.setfLocation(0L);
|
|
|
+ }
|
|
|
List<Map<String, Object>> storageInfo = itWarehouseService.getTimeStorageInfo(wareHouseId, startTime, endTime);
|
|
|
storageInfo.removeAll(Collections.singleton(null));
|
|
|
- if (storageInfo == null) {
|
|
|
+ if (storageInfo.size() == 0) {
|
|
|
data.put("storageInfo", new ArrayList<Map<String, Object>>());
|
|
|
} else {
|
|
|
data.put("storageInfo", storageInfo);
|