2,3,5楼生产看板接口
parent
a7c70e552d
commit
5755eb05d8
@ -0,0 +1,32 @@
|
||||
package com.hw.mes.board.controller;
|
||||
|
||||
import com.hw.common.core.web.domain.AjaxResult;
|
||||
import com.hw.mes.board.service.FifthMesBorderService;
|
||||
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;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/fifthMesBorder")
|
||||
public class FifthMesBorderController {
|
||||
|
||||
@Autowired
|
||||
private FifthMesBorderService fifthMesBorderService;
|
||||
|
||||
/**
|
||||
* 五楼生产进度
|
||||
*/
|
||||
@GetMapping("/productProgress")
|
||||
public AjaxResult productProgress(){
|
||||
return AjaxResult.success(fifthMesBorderService.productProgress());
|
||||
}
|
||||
/**
|
||||
* 工单生产进度
|
||||
*/
|
||||
@GetMapping("/workOrderProgress")
|
||||
public AjaxResult workOrderProgress(){
|
||||
return AjaxResult.success(fifthMesBorderService.workOrderProgress());
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
package com.hw.mes.board.controller;
|
||||
|
||||
|
||||
import com.hw.common.core.web.domain.AjaxResult;
|
||||
import com.hw.mes.board.service.SecondMesBorderService;
|
||||
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;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/SecondMesBorder")
|
||||
public class SecondMesBorderController {
|
||||
@Autowired
|
||||
private SecondMesBorderService secondBorderService;
|
||||
|
||||
/**
|
||||
* 查询近一个月的工单数据
|
||||
*/
|
||||
@GetMapping("selectOrderMonth")
|
||||
public AjaxResult selectOrderMonth(){
|
||||
return AjaxResult.success(secondBorderService.selectOrderMonth());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询最近一条工单的完成情况
|
||||
*/
|
||||
@GetMapping("/selectLatestWorkOrder")
|
||||
public AjaxResult selectLatestWorkOrder(){
|
||||
return AjaxResult.success(secondBorderService.selectLatestWorkOrder());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取二楼风机状态
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getLineStatus")
|
||||
public AjaxResult getLineStatus(){
|
||||
return AjaxResult.success(secondBorderService.getLineStatus());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取近6小时每小时产量
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getHourProduction")
|
||||
public AjaxResult getHourProduction(){
|
||||
return AjaxResult.success(secondBorderService.getHourProduction());
|
||||
}
|
||||
/**
|
||||
* 获取近7天的产量
|
||||
*/
|
||||
@GetMapping("/getDayProduction")
|
||||
public AjaxResult getDayProduction(){
|
||||
return AjaxResult.success(secondBorderService.getDayProduction());
|
||||
}
|
||||
/**
|
||||
* 粉尘数据走势
|
||||
*/
|
||||
|
||||
@GetMapping("/dustAnalysis")
|
||||
public AjaxResult dustAnalysis(){
|
||||
return AjaxResult.success(secondBorderService.dustAnalysis());
|
||||
}
|
||||
|
||||
/**
|
||||
* 设备时长
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/deviceTimeCount")
|
||||
public AjaxResult deviceTimeCount(){
|
||||
return AjaxResult.success(secondBorderService.deviceTimeCount());
|
||||
}
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.hw.mes.board.controller;
|
||||
|
||||
import com.hw.common.core.web.domain.AjaxResult;
|
||||
import com.hw.mes.board.service.ThirdMesBorderService;
|
||||
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;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/ThirdMesBorder")
|
||||
public class ThirdMesBorderController {
|
||||
@Autowired
|
||||
private ThirdMesBorderService thirdMesBorderService;
|
||||
|
||||
/**
|
||||
* 工单计划
|
||||
*/
|
||||
@GetMapping("/thirdOrderPlan")
|
||||
public AjaxResult thirdOrderPlan(){
|
||||
return AjaxResult.success(thirdMesBorderService.thirdOrderPlan());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取最新一条工单
|
||||
*/
|
||||
@GetMapping("/getLatestWorkOrder")
|
||||
public AjaxResult getLatestWorkOrder(){
|
||||
return AjaxResult.success(thirdMesBorderService.getLatestWorkOrder());
|
||||
}
|
||||
/**
|
||||
* 温湿度曲线
|
||||
*/
|
||||
@GetMapping("/temperatureAndhumunity")
|
||||
public AjaxResult temperatureAndhumunity(){
|
||||
return AjaxResult.success(thirdMesBorderService.temperatureAndhumunity());
|
||||
}
|
||||
/**
|
||||
* 生产统计数据
|
||||
*/
|
||||
@GetMapping("/productAmount")
|
||||
public AjaxResult productAmount(){
|
||||
return AjaxResult.success(thirdMesBorderService.productAmount());
|
||||
}
|
||||
/**
|
||||
* 生产完成统计和3楼仓储的出入库统计一样
|
||||
*/
|
||||
@GetMapping("/productCompleteCount")
|
||||
public AjaxResult productCompleteCount(){
|
||||
return AjaxResult.success(thirdMesBorderService.productCompleteCount());
|
||||
}
|
||||
|
||||
/**
|
||||
* 原材料入库折线图
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/rawInstock")
|
||||
public AjaxResult rawInstock(){
|
||||
return AjaxResult.success(thirdMesBorderService.rawInstock());
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,123 @@
|
||||
package com.hw.mes.board.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* (DmsRealtimeStatusHistory)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-11-06 10:57:57
|
||||
*/
|
||||
public class DmsRealtimeStatusHistory implements Serializable {
|
||||
private static final long serialVersionUID = 153296577307956929L;
|
||||
|
||||
private Long historyId;
|
||||
|
||||
private Long statusId;
|
||||
/**
|
||||
* 设备状态编号
|
||||
*/
|
||||
private String statusCode;
|
||||
/**
|
||||
* 设备状态名称
|
||||
*/
|
||||
private String statusName;
|
||||
/**
|
||||
* 设备状态值
|
||||
*/
|
||||
private String statusValue;
|
||||
/**
|
||||
* 所属设备id
|
||||
*/
|
||||
private Long deviceId;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date creatTime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 同步时间
|
||||
*/
|
||||
private Date syncTime;
|
||||
private Date hour;
|
||||
private Long timeCount;
|
||||
|
||||
|
||||
public Long getHistoryId() {
|
||||
return historyId;
|
||||
}
|
||||
|
||||
public void setHistoryId(Long historyId) {
|
||||
this.historyId = historyId;
|
||||
}
|
||||
|
||||
public Long getStatusId() {
|
||||
return statusId;
|
||||
}
|
||||
|
||||
public void setStatusId(Long statusId) {
|
||||
this.statusId = statusId;
|
||||
}
|
||||
|
||||
public String getStatusCode() {
|
||||
return statusCode;
|
||||
}
|
||||
|
||||
public void setStatusCode(String statusCode) {
|
||||
this.statusCode = statusCode;
|
||||
}
|
||||
|
||||
public String getStatusName() {
|
||||
return statusName;
|
||||
}
|
||||
|
||||
public void setStatusName(String statusName) {
|
||||
this.statusName = statusName;
|
||||
}
|
||||
|
||||
public String getStatusValue() {
|
||||
return statusValue;
|
||||
}
|
||||
|
||||
public void setStatusValue(String statusValue) {
|
||||
this.statusValue = statusValue;
|
||||
}
|
||||
|
||||
public Long getDeviceId() {
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(Long deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public Date getCreatTime() {
|
||||
return creatTime;
|
||||
}
|
||||
|
||||
public void setCreatTime(Date creatTime) {
|
||||
this.creatTime = creatTime;
|
||||
}
|
||||
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public Date getSyncTime() {
|
||||
return syncTime;
|
||||
}
|
||||
|
||||
public void setSyncTime(Date syncTime) {
|
||||
this.syncTime = syncTime;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,13 @@
|
||||
package com.hw.mes.board.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class RawAmount {
|
||||
private String materialId;
|
||||
private BigDecimal inStock;
|
||||
private BigDecimal outStock;
|
||||
private String week;
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.hw.mes.board.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class RecordIotenvInstant {
|
||||
private Long objId;
|
||||
private String monitorId;
|
||||
private BigDecimal tempreture;
|
||||
private BigDecimal humidity;
|
||||
private BigDecimal illuminance;
|
||||
private BigDecimal noise;
|
||||
private BigDecimal concentration;
|
||||
private BigDecimal pm1;
|
||||
private BigDecimal pm2;
|
||||
private BigDecimal pm10;
|
||||
private BigDecimal standBy;
|
||||
private Date collectTime;
|
||||
private Date recodeTime;
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.hw.mes.board.service;
|
||||
|
||||
|
||||
import com.hw.mes.domain.MesProductOrder;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface FifthMesBorderService {
|
||||
|
||||
MesProductOrder productProgress();
|
||||
|
||||
List<MesProductOrder> workOrderProgress();
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.hw.mes.board.service;
|
||||
|
||||
|
||||
|
||||
import com.hw.mes.board.domain.DmsRealtimeStatusHistory;
|
||||
import com.hw.mes.board.domain.RecordIotenvInstant;
|
||||
import com.hw.mes.domain.MesProductOrder;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface SecondMesBorderService {
|
||||
List<MesProductOrder> selectOrderMonth();
|
||||
|
||||
MesProductOrder selectLatestWorkOrder();
|
||||
|
||||
Boolean getLineStatus();
|
||||
|
||||
List<Map<Date, BigDecimal>> getHourProduction();
|
||||
|
||||
List<Map<Date, BigDecimal>> getDayProduction();
|
||||
|
||||
List<RecordIotenvInstant> dustAnalysis();
|
||||
|
||||
List<DmsRealtimeStatusHistory> deviceTimeCount();
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.hw.mes.board.service;
|
||||
|
||||
import com.hw.common.core.web.domain.AjaxResult;
|
||||
import com.hw.mes.board.domain.RawAmount;
|
||||
import com.hw.mes.board.domain.RecordIotenvInstant;
|
||||
import com.hw.mes.domain.MesProductOrder;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface ThirdMesBorderService{
|
||||
List<MesProductOrder> thirdOrderPlan();
|
||||
|
||||
MesProductOrder getLatestWorkOrder();
|
||||
|
||||
List<RecordIotenvInstant> temperatureAndhumunity();
|
||||
|
||||
List<Map<String,Object>> productAmount();
|
||||
|
||||
List<RawAmount> productCompleteCount();
|
||||
|
||||
List<RawAmount> rawInstock();
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package com.hw.mes.board.service.impl;
|
||||
|
||||
|
||||
import com.hw.mes.board.service.FifthMesBorderService;
|
||||
import com.hw.mes.domain.MesProductOrder;
|
||||
import com.hw.mes.mapper.MesProductOrderMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Service
|
||||
public class FifthMesBoardServiceImpl implements FifthMesBorderService {
|
||||
@Autowired
|
||||
private MesProductOrderMapper mesProductOrderMapper;
|
||||
|
||||
@Override
|
||||
public MesProductOrder productProgress() {
|
||||
return mesProductOrderMapper.productProgress();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MesProductOrder> workOrderProgress() {
|
||||
return mesProductOrderMapper.selectFifthWorkorder();
|
||||
}
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package com.hw.mes.board.service.impl;
|
||||
|
||||
import com.hw.mes.board.domain.DmsRealtimeStatusHistory;
|
||||
import com.hw.mes.board.domain.RecordIotenvInstant;
|
||||
import com.hw.mes.board.service.SecondMesBorderService;
|
||||
import com.hw.mes.domain.MesProductOrder;
|
||||
import com.hw.mes.mapper.MesProductOrderMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class SecondMesBoardServiceImpl implements SecondMesBorderService {
|
||||
@Autowired
|
||||
private MesProductOrderMapper mesProductOrderMapper;
|
||||
|
||||
@Override
|
||||
public List<MesProductOrder> selectOrderMonth() {
|
||||
return mesProductOrderMapper.selectOrderMonth();
|
||||
}
|
||||
|
||||
@Override
|
||||
public MesProductOrder selectLatestWorkOrder() {
|
||||
return mesProductOrderMapper.selectLatestWorkOrder();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean getLineStatus() {
|
||||
return mesProductOrderMapper.getLineStatus();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DmsRealtimeStatusHistory> deviceTimeCount() {
|
||||
return mesProductOrderMapper.deviceTimeCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RecordIotenvInstant> dustAnalysis() {
|
||||
return mesProductOrderMapper.dustAnalysis();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<Date, BigDecimal>> getDayProduction() {
|
||||
return mesProductOrderMapper.getDayProduction();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<Date, BigDecimal>> getHourProduction() {
|
||||
return mesProductOrderMapper.getHourProduction();
|
||||
}
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
package com.hw.mes.board.service.impl;
|
||||
|
||||
import com.hw.mes.board.domain.RawAmount;
|
||||
import com.hw.mes.board.domain.RecordIotenvInstant;
|
||||
import com.hw.mes.board.service.ThirdMesBorderService;
|
||||
import com.hw.mes.domain.MesProductOrder;
|
||||
import com.hw.mes.mapper.MesProductOrderMapper;
|
||||
import com.hw.wms.api.domain.vo.WmsRawStockVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class ThirdMesBorderServiceImpl implements ThirdMesBorderService {
|
||||
@Autowired
|
||||
private MesProductOrderMapper mesProductOrderMapper;
|
||||
|
||||
@Override
|
||||
public MesProductOrder getLatestWorkOrder() {
|
||||
return mesProductOrderMapper.getLatestWorkOrder();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RecordIotenvInstant> temperatureAndhumunity() {
|
||||
return mesProductOrderMapper.dustAnalysis();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RawAmount> productCompleteCount() {
|
||||
List<RawAmount> maps = mesProductOrderMapper.productCompleteCount();
|
||||
List<RawAmount> maps1 = mesProductOrderMapper.productInstockCount();
|
||||
List<RawAmount> rawAmounts = new ArrayList<>();
|
||||
for (RawAmount map : maps) {
|
||||
for (RawAmount decimalMap : maps1) {
|
||||
RawAmount rawAmount = new RawAmount();
|
||||
rawAmount.setMaterialId(map.getMaterialId());
|
||||
rawAmount.setInStock(map.getInStock());
|
||||
if (map.getMaterialId().equals(decimalMap.getMaterialId())){
|
||||
rawAmount.setOutStock(decimalMap.getOutStock());
|
||||
}
|
||||
}
|
||||
}
|
||||
return rawAmounts;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RawAmount> rawInstock() {
|
||||
List<RawAmount> list = mesProductOrderMapper.rawInstock();
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String,Object>> productAmount() {
|
||||
return mesProductOrderMapper.productAmount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MesProductOrder> thirdOrderPlan() {
|
||||
return mesProductOrderMapper.thirdOrderPlan();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue