12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- package com.huimv.center.controller;
- import com.huimv.center.service.BizDeviceRegisteredFlowService;
- import com.huimv.eartag2.common.utils.Result;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.PostMapping;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RequestParam;
- import org.springframework.web.bind.annotation.RestController;
- import java.sql.ResultSet;
- import java.util.Map;
- /**
- * <p>
- * 前端控制器
- * </p>
- *
- * @author zn
- * @since 2022-06-22
- */
- @RestController
- @RequestMapping("/bizDeviceRegisteredFlow")
- public class BizDeviceRegisteredFlowController {
- @Autowired
- private BizDeviceRegisteredFlowService bizDeviceRegisteredFlowService;
- @PostMapping("/list")
- public Result list(@RequestParam Map<String, Object> paramsMap){
- String pageNo = paramsMap.get("pageNo").toString();
- if (pageNo == null) {
- pageNo = "1";
- }
- String pageSize = paramsMap.get("pageSize").toString();
- if (pageSize == null) {
- pageSize = "10";
- }
- String chipId = "";
- if (paramsMap.get("chipId") != null) {
- chipId = paramsMap.get("chipId").toString();
- }
- String deviceCode = "";
- if (paramsMap.get("deviceCode") != null) {
- deviceCode = paramsMap.get("deviceCode").toString();
- }
- String farmCode = "";
- if (paramsMap.get("farmCode") != null) {
- farmCode = paramsMap.get("farmCode").toString();
- }
- String startDate = "";
- if (paramsMap.get("startDate") != null) {
- startDate = paramsMap.get("startDate").toString();
- }
- String endDate = "";
- if (paramsMap.get("endDate") != null) {
- endDate = paramsMap.get("endDate").toString();
- }
- return bizDeviceRegisteredFlowService.listDeviceRegisteredFlow(Integer.parseInt(pageNo), Integer.parseInt(pageSize), farmCode, chipId, deviceCode,startDate, endDate);
- }
- @PostMapping("/remove")
- public Result remove(@RequestParam Map<String, Object> paramsMap){
- String farmCode = "";
- if (paramsMap.get("farmCode") != null) {
- farmCode = paramsMap.get("farmCode").toString();
- }
- String chipId = "";
- if (paramsMap.get("chipId") != null) {
- chipId = paramsMap.get("chipId").toString();
- }
- String deviceCode = "";
- if (paramsMap.get("deviceCode") != null) {
- deviceCode = paramsMap.get("deviceCode").toString();
- }
- String startDate = "";
- if (paramsMap.get("startDate") != null) {
- startDate = paramsMap.get("startDate").toString();
- }
- String endDate = "";
- if (paramsMap.get("endDate") != null) {
- endDate = paramsMap.get("endDate").toString();
- }
- return bizDeviceRegisteredFlowService.removeDeviceRegisteredFlow(farmCode,chipId,deviceCode,startDate,endDate);
- }
- }
|