增加 看板接口
parent
d020b61f86
commit
6dfea314d7
@ -1,25 +1,50 @@
|
|||||||
package com.ruoyi.api.controller;
|
package com.ruoyi.api.controller;
|
||||||
|
|
||||||
|
import com.ruoyi.api.domain.BroadCountNumber;
|
||||||
import com.ruoyi.api.service.impl.BroadApiService;
|
import com.ruoyi.api.service.impl.BroadApiService;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.manage.domain.BaseStore;
|
||||||
|
import com.ruoyi.manage.domain.LedgerRfid;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author wanghao
|
* @author wanghao
|
||||||
* @date 2024/3/1 13:29
|
* @date 2024/3/1 13:29
|
||||||
*/
|
*/
|
||||||
@RestController
|
@Controller
|
||||||
@RequestMapping("/api")
|
@RequestMapping("/api")
|
||||||
public class BroadApiController {
|
public class BroadApiController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private BroadApiService service;
|
private BroadApiService service;
|
||||||
|
|
||||||
|
//获取区域
|
||||||
@PostMapping("/selectCountNumber")
|
@PostMapping("/getArea")
|
||||||
private String selectCountNumber(){
|
@ResponseBody
|
||||||
return service.selectCountNumber();
|
public AjaxResult getArea() {
|
||||||
|
List<BaseStore> list = service.getArea();
|
||||||
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
|
//获取统计
|
||||||
|
@PostMapping("/getCountNumberById")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult getCountNumberById(int id) {
|
||||||
|
List<BroadCountNumber> list = service.getCountNumberById(id);
|
||||||
|
|
||||||
|
return AjaxResult.success(list);
|
||||||
|
}
|
||||||
|
//获取详细轮挡
|
||||||
|
@PostMapping("/getLedgerByCode")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult getLedgerByCode(String locationCode){
|
||||||
|
List<LedgerRfid> list=service.getLedgerByCode(locationCode);
|
||||||
|
return AjaxResult.success(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,33 @@
|
|||||||
|
package com.ruoyi.api.domain;
|
||||||
|
|
||||||
|
public class BroadCountNumber {
|
||||||
|
private String areaName;
|
||||||
|
private String locationCode;
|
||||||
|
private int countNumber;
|
||||||
|
|
||||||
|
|
||||||
|
public String getAreaName() {
|
||||||
|
|
||||||
|
return areaName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAreaName(String areaName) {
|
||||||
|
this.areaName = areaName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLocationCode() {
|
||||||
|
return locationCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLocationCode(String locationCode) {
|
||||||
|
this.locationCode = locationCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getCountNumber() {
|
||||||
|
return countNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCountNumber(int countNumber) {
|
||||||
|
this.countNumber = countNumber;
|
||||||
|
}
|
||||||
|
}
|
@ -1,12 +1,23 @@
|
|||||||
package com.ruoyi.api.mapper;
|
package com.ruoyi.api.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.api.domain.BroadCountNumber;
|
||||||
|
import com.ruoyi.manage.domain.BaseStore;
|
||||||
|
import com.ruoyi.manage.domain.LedgerRfid;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author wanghao
|
* @author wanghao
|
||||||
* @date 2024/3/1 13:30
|
* @date 2024/3/1 13:30
|
||||||
*/
|
*/
|
||||||
@Repository
|
@Repository
|
||||||
public interface BroadApiMapper {
|
public interface BroadApiMapper {
|
||||||
String selectCountNumber();
|
|
||||||
|
|
||||||
|
List<BaseStore> getArea();
|
||||||
|
|
||||||
|
List<BroadCountNumber> getCountNumberById(int id);
|
||||||
|
|
||||||
|
List<LedgerRfid> getLedgerByCode(String locationCode);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue