Commit 7a44fe74 authored by tangwei's avatar tangwei

app 增加默认仓库

parent 7de1f492
...@@ -5,6 +5,7 @@ import com.yeejoin.equipmanage.service.IStatisticsService; ...@@ -5,6 +5,7 @@ import com.yeejoin.equipmanage.service.IStatisticsService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
...@@ -27,6 +28,8 @@ public class StatisticsController { ...@@ -27,6 +28,8 @@ public class StatisticsController {
@Autowired @Autowired
private IStatisticsService iStatisticsService; private IStatisticsService iStatisticsService;
@Value("${state.code:code}")
private String stationCode;
/** /**
* 根据基本类型统计总数(按仓库) * 根据基本类型统计总数(按仓库)
* *
...@@ -41,6 +44,15 @@ public class StatisticsController { ...@@ -41,6 +44,15 @@ public class StatisticsController {
return iStatisticsService.getAllCategoryBaseByWarehouseId(warehouseId); return iStatisticsService.getAllCategoryBaseByWarehouseId(warehouseId);
} }
@RequestMapping(value = "/getwarehouseId", method = RequestMethod.GET)
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "根据id查询", notes = "根据id查询")
public Map<String, Object> getEquipmentStatusByWarehouseId() {
return iStatisticsService.getWarehouseId(stationCode);
}
/** /**
* 根据装备状态统计总数(按仓库) * 根据装备状态统计总数(按仓库)
* *
......
...@@ -174,7 +174,7 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> { ...@@ -174,7 +174,7 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
Map<String,Double> getEquipLocationInfo(Long equipmentSpecificId); Map<String,Double> getEquipLocationInfo(Long equipmentSpecificId);
Map<String, Object> getEquipSpeInfo(@Param("equipmentSpecificId") Long equipmentSpecificId); Map<String, Object> getEquipSpeInfo(@Param("equipmentSpecificId") Long equipmentSpecificId);
Map<String, Object> getWarehouseId(@Param("code") String code);
/** /**
* 根据specificId删除装备相关数据 * 根据specificId删除装备相关数据
* @param specificId specificId * @param specificId specificId
......
...@@ -21,4 +21,6 @@ public interface IStatisticsService { ...@@ -21,4 +21,6 @@ public interface IStatisticsService {
* @return List<EquipCategoryVo> * @return List<EquipCategoryVo>
*/ */
List<EquipCategoryVo> equipCategoryVoList(String systemCode); List<EquipCategoryVo> equipCategoryVoList(String systemCode);
Map<String, Object> getWarehouseId(String orgcode);
} }
...@@ -221,6 +221,12 @@ public class StatisticsServiceImpl implements IStatisticsService { ...@@ -221,6 +221,12 @@ public class StatisticsServiceImpl implements IStatisticsService {
return equipmentSpecificMapper.selectEquipCategoryNumber(fightingSystemEntity.getId()); return equipmentSpecificMapper.selectEquipCategoryNumber(fightingSystemEntity.getId());
} }
@Override
public Map<String, Object> getWarehouseId(String orgcode) {
Map<String, Object> map=equipmentSpecificMapper.getWarehouseId(orgcode);
return map;
}
private Double getExtinguishingCountByWarehouseId(String categoryCode, Long warehouseId) { private Double getExtinguishingCountByWarehouseId(String categoryCode, Long warehouseId) {
List<EquipmentCategory> categoryList = iEquipmentCategoryService List<EquipmentCategory> categoryList = iEquipmentCategoryService
.list(new QueryWrapper<EquipmentCategory>().eq("code", categoryCode)); .list(new QueryWrapper<EquipmentCategory>().eq("code", categoryCode));
......
...@@ -1403,6 +1403,14 @@ ...@@ -1403,6 +1403,14 @@
LEFT JOIN wl_warehouse_structure ws ON sd.warehouse_structure_id = ws.id LEFT JOIN wl_warehouse_structure ws ON sd.warehouse_structure_id = ws.id
WHERE es.id = #{equipmentSpecificId} WHERE es.id = #{equipmentSpecificId}
</select> </select>
<select id="getWarehouseId" resultType="Map">
select warehouse_id as warehouseId from idx_biz_station_info where code = #{code}
</select>
<delete id="deleteEquipDataBySpecificId"> <delete id="deleteEquipDataBySpecificId">
DELETE es, ed, esi, ves, esr, esa, esal, eard FROM DELETE es, ed, esi, ves, esr, esa, esal, eard FROM
wl_equipment_specific es wl_equipment_specific es
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment