Browse Source

1.修改根据仓库ID查询物资列表接口

2.修改获取机场详细信息接口
tags/v1.2.0^2
wanghaoran 1 year ago
parent
commit
b583fb0b2f
2 changed files with 8 additions and 2 deletions
  1. +1
    -1
      tuoheng-admin/src/main/java/com/tuoheng/admin/service/goods/query/QueryGoodsListByWarehouseIdService.java
  2. +7
    -1
      tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/IndexServiceImpl.java

+ 1
- 1
tuoheng-admin/src/main/java/com/tuoheng/admin/service/goods/query/QueryGoodsListByWarehouseIdService.java View File

@@ -67,7 +67,7 @@ public class QueryGoodsListByWarehouseIdService {
}
Warehouse warehouse = warehouseMapper.selectOne(new LambdaQueryWrapper<Warehouse>()
.eq(Warehouse::getTenantId, request.getTenantId())
.eq(Warehouse::getMark, MarkTypeEnum.VALID)
.eq(Warehouse::getMark, MarkTypeEnum.VALID.getCode())
.eq(Warehouse::getId, request.getWarehouseId()));
if (ObjectUtil.isNull(warehouse)) {
log.info("仓库不存在, warehouseId:{}", request.getWarehouseId());

+ 7
- 1
tuoheng-admin/src/main/java/com/tuoheng/admin/service/impl/IndexServiceImpl.java View File

@@ -97,6 +97,12 @@ public class IndexServiceImpl implements IndexService {
JSONObject wthJson = dataObject.getJSONObject("WTH");
if(Objects.nonNull(wthJson)){
JSONObject parmJson = wthJson.getJSONObject("parm");

BigDecimal hum = parmJson.getBigDecimal("Hum").divide(new BigDecimal(10), 1, BigDecimal.ROUND_HALF_UP);
airportDetailDto.setHum(hum + "rh");
BigDecimal tmp = parmJson.getBigDecimal("Tmp").divide(new BigDecimal(10), 1, BigDecimal.ROUND_HALF_UP);
airportDetailDto.setTmp(tmp + "℃");

airportDetailDto.setWspd(parmJson.getString("WSPD") + "m/s")
.setWdir(parmJson.getString("WDIR") + "度");
//用角度表示风向,是把圆周分成360度,北风(N)是0度(即360度),东风(E)是90度,南风(S)是180度,西风(W)是270度
@@ -108,7 +114,7 @@ public class IndexServiceImpl implements IndexService {
}
JSONObject tahJson = dataObject.getJSONObject("TAH");
if(Objects.nonNull(tahJson)){
JSONObject parmJson = wthJson.getJSONObject("parm");
JSONObject parmJson = tahJson.getJSONObject("parm");
BigDecimal hum = parmJson.getBigDecimal("Hum").divide(new BigDecimal(10), 1, BigDecimal.ROUND_HALF_UP);
airportDetailDto.setHum(hum + "rh");
BigDecimal tmp = parmJson.getBigDecimal("Tmp").divide(new BigDecimal(10), 1, BigDecimal.ROUND_HALF_UP);

Loading…
Cancel
Save