Commit 0e605a2a authored by zhengjuzi's avatar zhengjuzi

设备管理的信息统计修改:加入了企业id

parent 5e4ee059
...@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.module.ugp.api.entity.Company; ...@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.module.ugp.api.entity.Company;
import com.yeejoin.amos.boot.module.ugp.api.entity.Equipment; import com.yeejoin.amos.boot.module.ugp.api.entity.Equipment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -22,5 +23,5 @@ import java.util.Set; ...@@ -22,5 +23,5 @@ import java.util.Set;
public interface EquipmentMapper extends BaseMapper<Equipment> { public interface EquipmentMapper extends BaseMapper<Equipment> {
IPage<EquipmentDto> queryEquipmentPage(IPage<EquipmentDto> page, Equipment equipment, Set<String> companyIds); IPage<EquipmentDto> queryEquipmentPage(IPage<EquipmentDto> page, Equipment equipment, Set<String> companyIds);
List<Map<String, Long>> informationStatistics(); List<Map<String, Long>> informationStatistics(@Param("companySequenceNbr") Long companySequenceNbr);
} }
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
order by rec_date desc order by rec_date desc
</select> </select>
<select id="informationStatistics" resultType="java.util.HashMap"> <select id="informationStatistics" parameterType="Long" resultType="java.util.HashMap">
SELECT type as name ,count(1) AS value FROM tz_ugp_equipment GROUP BY type SELECT type as name ,count(1) AS value FROM tz_ugp_equipment where company_id = #{companySequenceNbr} GROUP BY type
</select> </select>
</mapper> </mapper>
...@@ -283,7 +283,6 @@ public class EquipmentController extends BaseController { ...@@ -283,7 +283,6 @@ public class EquipmentController extends BaseController {
@GetMapping(value = "/information") @GetMapping(value = "/information")
@ApiOperation(httpMethod = "GET",value = "设备管理->信息统计", notes = "设备管理->信息统计") @ApiOperation(httpMethod = "GET",value = "设备管理->信息统计", notes = "设备管理->信息统计")
public ResponseModel<List<Map<String,Long>>> informationStatistics() { public ResponseModel<List<Map<String,Long>>> informationStatistics() {
return ResponseHelper.buildResponse(equipmentServiceImpl.informationStatistics()); return ResponseHelper.buildResponse(equipmentServiceImpl.informationStatistics());
} }
} }
...@@ -240,6 +240,7 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E ...@@ -240,6 +240,7 @@ public class EquipmentServiceImpl extends BaseService<EquipmentDto, Equipment, E
//设备管理->信息统计 //设备管理->信息统计
public List<Map<String,Long>> informationStatistics() { public List<Map<String,Long>> informationStatistics() {
return equipmentMapper.informationStatistics(); Long companySequenceNbr = orgService.getReginParams().getBusinessInfo().getCompanySequenceNbr();
return equipmentMapper.informationStatistics(companySequenceNbr);
} }
} }
\ No newline at end of file
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