更新装备状态统计接口,增加品牌和型号名称参数

This commit is contained in:
syruan 2025-09-18 20:32:05 +08:00
parent 78052209cb
commit c38cc86b12
3 changed files with 6 additions and 4 deletions

View File

@ -200,8 +200,8 @@ public class DevInfoController extends BaseController {
*/
@ApiOperation(value = "装备状态统计")
@GetMapping("/sumType")
public AjaxResult sumType() {
return success(devInfoService.sumType());
public AjaxResult sumType(@RequestParam(value = "brand", required = false) String brand, @RequestParam(value = "modelName", required = false) String modelName) {
return success(devInfoService.sumType(brand, modelName));
}
/**

View File

@ -88,7 +88,7 @@ public interface DevInfoService {
*/
AjaxResult insertDevInfo(DevInfo devInfo);
Map<String, Integer> sumType();
Map<String, Integer> sumType(String brand, String modelName);
Map<String, Integer> sumProfession();

View File

@ -682,8 +682,10 @@ public class DevInfoServiceImpl implements DevInfoService {
* 装备状态统计
*/
@Override
public Map<String, Integer> sumType() {
public Map<String, Integer> sumType(String brand, String modelName) {
DevInfoVo devInfoVo = new DevInfoVo();
devInfoVo.setBrand(brand);
devInfoVo.setModelName(modelName);
Map<String, Integer> sumTypeMap = new IdentityHashMap<>();
//获取所有的装备信息
List<DevInfoVo> devInfoList = devInfoMapper.selectDevInfoList(devInfoVo);