Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -59,4 +59,10 @@ public class JobStatisticsController {
|
|||||||
|
|
||||||
return AjaxResult.success(result);
|
return AjaxResult.success(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/device/info")
|
||||||
|
public AjaxResult getDeviceInfo() {
|
||||||
|
// 获取设备信息
|
||||||
|
return jobStatisticsService.getDeviceInfo();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package com.ruoyi.api.controller;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.job.mydojob.domain.MydoJob;
|
||||||
|
import com.ruoyi.job.mydojob.service.IMydoJobService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 作业统计 Controller
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api2wcs")
|
||||||
|
public class ToWcsApiController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IMydoJobService mydoJobService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取任务
|
||||||
|
*/
|
||||||
|
@GetMapping("/getJob")
|
||||||
|
public AjaxResult getJob(MydoJob mydoJob)
|
||||||
|
{
|
||||||
|
return AjaxResult.success(mydoJobService.selectMydoJobList(mydoJob));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -17,4 +17,6 @@ public interface IJobStatisticsService {
|
|||||||
* @return 统计结果
|
* @return 统计结果
|
||||||
*/
|
*/
|
||||||
public Map<String, Object> getDailyStatistics();
|
public Map<String, Object> getDailyStatistics();
|
||||||
|
|
||||||
|
AjaxResult getDeviceInfo();
|
||||||
}
|
}
|
||||||
@@ -4,7 +4,12 @@ import java.util.ArrayList;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import cn.hutool.http.HttpUtil;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
import com.ruoyi.api.service.IJobStatisticsService;
|
import com.ruoyi.api.service.IJobStatisticsService;
|
||||||
@@ -27,6 +32,8 @@ public class JobStatisticsServiceImpl implements IJobStatisticsService {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private MydoJobMapper mydoJobMapper;
|
private MydoJobMapper mydoJobMapper;
|
||||||
|
@Value("${api.wcs.device.url}")
|
||||||
|
private String deviceUrl;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取当日入库和出库数量统计
|
* 获取当日入库和出库数量统计
|
||||||
@@ -87,5 +94,12 @@ public class JobStatisticsServiceImpl implements IJobStatisticsService {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AjaxResult getDeviceInfo() {
|
||||||
|
|
||||||
|
String s = HttpUtil.get(deviceUrl);
|
||||||
|
return JSONUtil.toBean(s, AjaxResult.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -127,3 +127,8 @@ xss:
|
|||||||
excludes: /system/notice
|
excludes: /system/notice
|
||||||
# 匹配链接
|
# 匹配链接
|
||||||
urlPatterns: /system/*,/monitor/*,/tool/*
|
urlPatterns: /system/*,/monitor/*,/tool/*
|
||||||
|
#搭配对外接口
|
||||||
|
api:
|
||||||
|
wcs:
|
||||||
|
device:
|
||||||
|
url: http://192.168.1.1:8080/api/device
|
||||||
|
|||||||
Reference in New Issue
Block a user