生产设备大屏 功能添加 5.8

master
zhc077 2 years ago
parent 43c840d9e9
commit e8f116054e
  1. 1
      jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java
  2. 4
      jeecg-boot/jeecg-boot-module-system/pom.xml
  3. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/largeScreen/controller/LargeScreenController.java
  4. 36
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/largeScreen/controller/ProductionLargeScreenController.java
  5. 8
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/largeScreen/service/ProductionLargeService.java
  6. 46
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/largeScreen/service/impl/ProductionLargeServiceImpl.java

@ -128,6 +128,7 @@ public class ShiroConfig {
filterChainDefinitionMap.put("/zyShopOrder/shopOrder/**","anon");
//大屏数据
filterChainDefinitionMap.put("/largeScreen/**","anon");
filterChainDefinitionMap.put("/productionLargeScreen/**","anon");
//人员管理
filterChainDefinitionMap.put("/zyPerson/**","anon");

@ -135,11 +135,11 @@
<version>5.2.4.RELEASE</version>
</dependency>
<!-- 引入定时任务依赖 -->
<dependency>
<!-- <dependency>
<groupId>org.jeecgframework.boot</groupId>
<artifactId>jeecg-boot-starter-job</artifactId>
</dependency>
-->
<!-- https://mvnrepository.com/artifact/com.jacob/jacob 语音合成 -->
<dependency>
<groupId>com.hynnet</groupId>

@ -1,4 +1,4 @@
package org.jeecg.modules.largeScreen;
package org.jeecg.modules.largeScreen.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@ -0,0 +1,36 @@
package org.jeecg.modules.largeScreen.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.largeScreen.service.ProductionLargeService;
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.Map;
@Api(tags = "生产设备大屏数据")
@RequestMapping("/productionLargeScreen")
@RestController
@Slf4j
public class ProductionLargeScreenController {
@Autowired
private ProductionLargeService productionLargeService;
/**
* 查询订单的状态
*
* @return
*/
@ApiOperation(value = "获取生产设备大屏数据", notes = "获取生产设备大屏数据")
@GetMapping("/getData")
public Result<?> getData() {
Map<String, Object> data = productionLargeService.getData();
return Result.OK(data);
}
}

@ -0,0 +1,8 @@
package org.jeecg.modules.largeScreen.service;
import java.util.Map;
public interface ProductionLargeService {
Map<String, Object> getData();
}

@ -0,0 +1,46 @@
package org.jeecg.modules.largeScreen.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.modules.hanger.entity.HangRecord;
import org.jeecg.modules.hanger.service.IHangRecordService;
import org.jeecg.modules.largeScreen.service.ProductionLargeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service
public class ProductionLargeServiceImpl implements ProductionLargeService {
@Autowired
private IHangRecordService iHangRecordService;
@Override
public Map<String, Object> getData() {
Map<String, Object> resultMap = new HashMap<>();
//1,吊挂 分组统计,获取最新时间5条吊挂运行记录
List<HangRecord> recordList = iHangRecordService.list(new LambdaQueryWrapper<HangRecord>().groupBy(HangRecord::getHangCode));
Map<String, Object> diaoguaData = new HashMap<>();
if (!ObjectUtils.isEmpty(recordList)) {
recordList.stream().forEach(e -> {
List<HangRecord> records = iHangRecordService.list(new LambdaQueryWrapper<HangRecord>()
.eq(HangRecord::getHangCode, e.getHangCode())
.orderByDesc(HangRecord::getCreateTime)
.last("limit 5")
);
diaoguaData.put(e.getHangCode(), records);
});
}
resultMap.put("diaogua_Data", diaoguaData);
//2,TODO
return resultMap;
}
}
Loading…
Cancel
Save