更新装备状态统计接口,增加品牌和型号名称参数
This commit is contained in:
parent
78052209cb
commit
c38cc86b12
|
|
@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue