几个导入和设备利用率

dev
tengxi 2 years ago
parent 784cbcec6e
commit aeb4f0b47f

@ -1,7 +1,10 @@
yaNODE_ENV=development
VUE_APP_API_BASE_URL=http://222.71.165.188:8091/linkage-boot
VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas
VUE_APP_API_BASE_URL=http://localhost:8091/linkage-boot
# VUE_APP_API_BASE_URL=http://222.71.165.188:8091/linkage-boot
# VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview
# 微应用列表必须VUE_APP_SUB_开头,jeecg-app-1为子应用的项目名称,也是子应用的路由父路径
VUE_APP_SUB_jeecg-app-1 = '//localhost:8092'

@ -4,8 +4,8 @@ VOLUME /tmp
ENV LANG en_US.UTF-8
RUN echo "server { \
listen 80; \
location ^~ /jeecg-boot { \
proxy_pass http://jeecg-boot-system:8080/linkage-boot/; \
location ^~ /linkage-boot { \
proxy_pass http://linkage-boot-system:8080/linkage-boot/; \
proxy_set_header Host jeecg-boot-system; \
proxy_set_header X-Real-IP \$remote_addr; \
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; \

@ -2463,7 +2463,7 @@
// status = done
// successfalse
//
// https://github.com/zhangdaiscott/jeecg-boot/issues/2691
// https://github.com/zhangdaiscott/linkage-boot/issues/2691
if (file.response.success) {
value['path'] = file.response[column.responseName]
} else {

@ -228,8 +228,8 @@
<style scoped>
/* update--begin--autor:lvdandan-----date:20201016------forj-image-upload
* https://github.com/zhangdaiscott/jeecg-boot/issues/1810
* https://github.com/zhangdaiscott/jeecg-boot/issues/1779
* https://github.com/zhangdaiscott/linkage-boot/issues/1810
* https://github.com/zhangdaiscott/linkage-boot/issues/1779
*/
/deep/ .imgupload .iconp{padding:20px;}

@ -183,7 +183,7 @@
//
if (this.ellipsisLength !== -1) {
// JSelectBizComponent columns customRender
// https://github.com/jeecgboot/jeecg-boot/issues/3203
// https://github.com/jeecgboot/linkage-boot/issues/3203
let myCustomRender = column.customRender
column.customRender = (text, record, index) => {
let value = text

@ -314,7 +314,7 @@
})
},
queryDepartTree() {
//update-begin-author:taoyan date:20211202 for: https://github.com/jeecgboot/jeecg-boot/issues/3196
//update-begin-author:taoyan date:20211202 for: https://github.com/jeecgboot/linkage-boot/issues/3196
this.expandedKeys = []
this.departTree = []
queryDepartTreeSync().then((res) => {
@ -342,7 +342,7 @@
resolve();
});
},
//update-end-author:taoyan date:20211202 for: https://github.com/jeecgboot/jeecg-boot/issues/3196
//update-end-author:taoyan date:20211202 for: https://github.com/jeecgboot/linkage-boot/issues/3196
modalFormOk() {
this.loadData();
}

@ -2,7 +2,7 @@
<div class="footer">
<div class="links">
<!-- <a href="http://www.jeecg.com" target="_blank">JEECG 首页</a>-->
<!-- <a href="https://github.com/zhangdaiscott/jeecg-boot" target="_blank">-->
<!-- <a href="https://github.com/zhangdaiscott/linkage-boot" target="_blank">-->
<!-- <a-icon type="github"/>-->
<!-- </a>-->
<a href="https://ant.design/">Ant Design</a>

@ -148,7 +148,7 @@ export const JeecgListMixin = {
searchQuery() {
this.loadData(1);
// 点击查询清空列表选中行
// https://gitee.com/jeecg/jeecg-boot/issues/I4KTU1
// https://gitee.com/jeecg/linkage-boot/issues/I4KTU1
this.selectedRowKeys = []
this.selectionRows = []
},

@ -7,15 +7,15 @@ import { ACCESS_TOKEN, TENANT_ID } from "@/store/mutation-types"
/**
* 指定 axios的 baseURL
* 如果手工指定 baseURL: '/jeecg-boot'
* 如果手工指定 baseURL: '/linkage-boot'
* 则映射后端域名通过 vue.config.js
* @type {*|string}
*/
let apiBaseUrl = window._CONFIG['domianURL'] || "/jeecg-boot";
let apiBaseUrl = window._CONFIG['domianURL'] || "/linkage-boot";
//console.log("apiBaseUrl= ",apiBaseUrl)
// 创建 axios 实例
const service = axios.create({
//baseURL: '/jeecg-boot',
//baseURL: '/linkage-boot',
baseURL: apiBaseUrl, // api base_url
timeout: 9000 // 请求超时时间
})

@ -165,33 +165,33 @@
},
dbUrlMap: {
// MySQL
'1': { dbUrl: 'jdbc:mysql://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false' },
'1': { dbUrl: 'jdbc:mysql://127.0.0.1:3306/linkage-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false' },
//MySQL5.7+
'4': { dbUrl: 'jdbc:mysql://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai' },
'4': { dbUrl: 'jdbc:mysql://127.0.0.1:3306/linkage-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai' },
// Oracle
'2': { dbUrl: 'jdbc:oracle:thin:@127.0.0.1:1521:ORCL' },
// SQLServer
'3': { dbUrl: 'jdbc:sqlserver://127.0.0.1:1433;SelectMethod=cursor;DatabaseName=jeecgboot' },
// Mariadb
'5': { dbUrl: 'jdbc:mariadb://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useSSL=false' },
'5': { dbUrl: 'jdbc:mariadb://127.0.0.1:3306/linkage-boot?characterEncoding=UTF-8&useSSL=false' },
// Postgresql
'6': { dbUrl: 'jdbc:postgresql://127.0.0.1:5432/jeecg-boot' },
'6': { dbUrl: 'jdbc:postgresql://127.0.0.1:5432/linkage-boot' },
//
'7': { dbUrl: 'jdbc:dm://127.0.0.1:5236/?jeecg-boot&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8' },
//
'8': { dbUrl: 'jdbc:kingbase8://127.0.0.1:54321/jeecg-boot' },
'8': { dbUrl: 'jdbc:kingbase8://127.0.0.1:54321/linkage-boot' },
//
'9': { dbUrl: 'jdbc:oscar://192.168.1.125:2003/jeecg-boot' },
'9': { dbUrl: 'jdbc:oscar://192.168.1.125:2003/linkage-boot' },
// SQLite
'10': { dbUrl: 'jdbc:sqlite://opt/test.db' },
// DB2
'11': { dbUrl: 'jdbc:db2://127.0.0.1:50000/jeecg-boot' },
'11': { dbUrl: 'jdbc:db2://127.0.0.1:50000/linkage-boot' },
// Hsqldb
'12': { dbUrl: 'jdbc:hsqldb:hsql://127.0.0.1/jeecg-boot' },
'12': { dbUrl: 'jdbc:hsqldb:hsql://127.0.0.1/linkage-boot' },
// Derby
'13': { dbUrl: 'jdbc:derby://127.0.0.1:1527/jeecg-boot' },
'13': { dbUrl: 'jdbc:derby://127.0.0.1:1527/linkage-boot' },
// H2
'14': { dbUrl: 'jdbc:h2:tcp://127.0.0.1:8082/jeecg-boot' },
'14': { dbUrl: 'jdbc:h2:tcp://127.0.0.1:8082/linkage-boot' },
//
'15': { dbUrl: '' }
}

@ -207,7 +207,10 @@
{
title:'采集时间',
align:"center",
dataIndex: 'createTime'
dataIndex: 'createTime',
customRender:function (createTime) {
return createTime.substring(0,10)
},
},
{
@ -256,6 +259,7 @@
fieldList.push({type:'int',value:'sulfTempLower',text:'硫化温度(下模)'})
fieldList.push({type:'string',value:'eqtNo',text:'设备编号类似31,32,33...'})
fieldList.push({type:'datetime',value:'createTime',text:'采集时间'})
this.superFieldList = fieldList
}
}

@ -102,7 +102,7 @@ module.exports = {
ws: false,
changeOrigin: true,
pathRewrite: {
'/jeecg-boot': '' //默认所有请求都加了jeecg-boot前缀需要去掉
'/linkage-boot': '' //默认所有请求都加了jeecg-boot前缀需要去掉
}
},*/
/* jeecgboot.env

@ -209,6 +209,8 @@
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-kotlin</artifactId>
</dependency>
</dependencies>
</project>

@ -43,6 +43,9 @@ public class JeecgController<T, S extends IService<T>> {
@Value("${jeecg.path.upload}")
private String upLoadPath;
/**
* excel
*
@ -75,6 +78,8 @@ public class JeecgController<T, S extends IService<T>> {
mv.addObject(NormalExcelConstants.DATA_LIST, exportList);
return mv;
}
/**
* sheetsheet
*

@ -16,6 +16,12 @@
<groupId>org.jeecgframework.boot</groupId>
<artifactId>linkage-boot-base-core</artifactId>
</dependency>
<dependency>
<groupId>com.github.librepdf</groupId>
<artifactId>openpdf</artifactId>
<version>3.4.4</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>

@ -1,5 +1,6 @@
package org.jeecg.modules.demo.ttelectricmeter.controller;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@ -25,6 +26,7 @@ import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.demo.tteqtbase.entity.TtEqtBase;
import org.jeecg.modules.demo.tteqtbase.service.ITtEqtBaseService;
import org.jeecg.modules.demo.ttfeedingequip.entity.TtFeedingEquip;
import org.jeecg.modules.demo.ttmoldtemperatureequip.entity.TtMoldTemperatureEquip;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
@ -59,7 +61,6 @@ public class TtElectricMeterController extends JeecgController<TtElectricMeter,
private ITtEqtBaseService ttEqtBaseService;
@ApiOperation(value = "tt列表查询", notes = "tt列表查询")
@GetMapping(value = "/QueryElectricMeterList")
public Result<IPage<TtElectricMeter>> QueryElectricMeterList(TtElectricMeter ttElectricMeter,
@ -93,16 +94,18 @@ public class TtElectricMeterController extends JeecgController<TtElectricMeter,
Page<TtElectricMeter> page = new Page<TtElectricMeter>(pageNo, pageSize);
IPage<TtElectricMeter> pageList = ttElectricMeterService.page(page, queryWrapper);
List<TtElectricMeter> list = pageList.getRecords();
if (list.size() > 0) {
for (TtElectricMeter meter : list) {
QueryWrapper<TtEqtBase> eqtBase = new QueryWrapper<>();
eqtBase.eq("eqt_no", meter.getEqtNo());
eqtBase.eq("eqt_type", 6);
eqtBase.eq("location", "数字电表");
TtEqtBase ttEqtBase = ttEqtBaseService.getOne(eqtBase);
if (ttEqtBase != null) {
meter.setLocation(ttEqtBase.getLocation());
}
}
}
return Result.OK(pageList);
}
@ -190,9 +193,33 @@ public class TtElectricMeterController extends JeecgController<TtElectricMeter,
* @param ttElectricMeter
*/
//@RequiresPermissions("ttelectricmeter:tt_electric_meter:exportXls")
// @RequestMapping(value = "/exportXls")
// public ModelAndView exportXls(HttpServletRequest request, TtElectricMeter ttElectricMeter) {
// return super.exportXls(request, ttElectricMeter, TtElectricMeter.class, "tt_electric_meter");
// }
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, TtElectricMeter ttElectricMeter) {
return super.exportXls(request, ttElectricMeter, TtElectricMeter.class, "tt_electric_meter");
ModelAndView modelAndView = super.exportXls(request, ttElectricMeter, TtElectricMeter.class, "tt_electric_meter");
Object model = modelAndView.getModel().get("data");
List<TtElectricMeter> list = new ArrayList<>();
if (model instanceof ArrayList<?>) {
for (Object o : (List<?>) model) {
list.add((TtElectricMeter) o);
}
if (list.size() > 0) {
for (TtElectricMeter Electric : list) {
QueryWrapper<TtEqtBase> eqtBase = new QueryWrapper<>();
eqtBase.eq("eqt_no", Electric.getEqtNo());
eqtBase.eq("eqt_type", 6);
eqtBase.eq("location", "数字电表");
TtEqtBase ttEqtBase = ttEqtBaseService.getOne(eqtBase);
if (ttEqtBase != null) {
Electric.setLocation(ttEqtBase.getLocation());
}
}
}
}
return modelAndView;
}
/**

@ -38,6 +38,10 @@ public class TtElectricMeter implements Serializable {
@Excel(name = "电表编号", width = 15)
@ApiModelProperty(value = "电表编号")
private java.lang.String eqtNo;
/**设备位置*/
@Excel(name = "设备位置",width = 15)
@TableField(exist = false)
private java.lang.String location;
/**谷电量*/
@Excel(name = "谷电量", width = 15)
@ApiModelProperty(value = "谷电量")
@ -47,6 +51,7 @@ public class TtElectricMeter implements Serializable {
@ApiModelProperty(value = "峰电量")
private java.math.BigDecimal peakPower;
/**记录的创建时间*/
@Excel(name = "采集时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "记录的创建时间")
@ -63,7 +68,5 @@ public class TtElectricMeter implements Serializable {
@ApiModelProperty(value = "记录的修改人,修改人员的登录账号")
private java.lang.String updateBy;
/**设备位置*/
@TableField(exist = false)
private java.lang.String location;
}

@ -1,5 +1,6 @@
package org.jeecg.modules.demo.ttfeedingequip.controller;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@ -25,6 +26,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.demo.ttmoldtemperatureequip.entity.TtMoldTemperatureEquip;
import org.jeecg.modules.demo.ttpouringequip.entity.TtPouringEquip;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
@ -178,10 +180,35 @@ public class TtFeedingEquipController extends JeecgController<TtFeedingEquip, IT
* @param ttFeedingEquip
*/
//@RequiresPermissions("ttfeedingequip:tt_feeding_equip:exportXls")
// @RequestMapping(value = "/exportXls")
// public ModelAndView exportXls(HttpServletRequest request, TtFeedingEquip ttFeedingEquip) {
// return super.exportXls(request, ttFeedingEquip, TtFeedingEquip.class, "tt_feeding_equip");
// }
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, TtFeedingEquip ttFeedingEquip) {
return super.exportXls(request, ttFeedingEquip, TtFeedingEquip.class, "tt_feeding_equip");
ModelAndView modelAndView = super.exportXls(request, ttFeedingEquip, TtFeedingEquip.class, "tt_feeding_equip");
Object model = modelAndView.getModel().get("data");
List<TtFeedingEquip> list = new ArrayList<>();
if (model instanceof ArrayList<?>) {
for (Object o : (List<?>) model) {
list.add((TtFeedingEquip) o);
}
if (list.size() > 0) {
for (TtFeedingEquip ttFeeding : list) {
QueryWrapper<TtEqtBase> eqtBase = new QueryWrapper<>();
eqtBase.eq("eqt_no", ttFeeding.getEqtNo());
eqtBase.eq("eqt_type", 5);
eqtBase.eq("location", "集中供料系统车间");
TtEqtBase ttEqtBase = ttEqtBaseService.getOne(eqtBase);
if (ttEqtBase != null) {
ttFeeding.setDescr(ttEqtBase.getDescr());
}
}
}
}
return modelAndView;
}
/**
* excel

@ -38,11 +38,16 @@ public class TtFeedingEquip implements Serializable {
@Excel(name = "设备(供料系统)编号", width = 15)
@ApiModelProperty(value = "设备(供料系统)编号")
private String eqtNo;
/**描述*/
@Excel(name = "描述", width = 15)
@TableField(exist = false)
private String descr;
/**料罐温度*/
@Excel(name = "料罐温度", width = 15)
@ApiModelProperty(value = "料罐温度")
private BigDecimal bucketTemperature;
/**记录的创建时间*/
@Excel(name = "采集时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "记录的创建时间")
@ -59,6 +64,5 @@ public class TtFeedingEquip implements Serializable {
@ApiModelProperty(value = "记录的修改人,修改人员的登录账号")
private String updateBy;
@TableField(exist = false)
private String descr;
}

@ -1,5 +1,6 @@
package org.jeecg.modules.demo.ttmoldtemperatureequip.controller;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@ -9,6 +10,7 @@ import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
@ -18,7 +20,6 @@ import org.jeecg.modules.demo.tteqtbase.entity.TtEqtBase;
import org.jeecg.modules.demo.tteqtbase.service.ITtEqtBaseService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -27,6 +28,7 @@ import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.demo.ttmoldtemperatureequip.entity.TtMoldTemperatureEquip;
import org.jeecg.modules.demo.ttmoldtemperatureequip.service.ITtMoldTemperatureEquipService;
import org.jeecg.modules.demo.ttpouringequip.entity.TtPouringEquip;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
@ -179,9 +181,33 @@ public class TtMoldTemperatureEquipController extends JeecgController<TtMoldTemp
* @param ttMoldTemperatureEquip
*/
//@RequiresPermissions("ttmoldtemperatureequip:tt_mold_temperature_equip:exportXls")
// @RequestMapping(value = "/exportXls")
// public ModelAndView exportXls(HttpServletRequest request, TtMoldTemperatureEquip ttMoldTemperatureEquip) {
// return super.exportXls(request, ttMoldTemperatureEquip, TtMoldTemperatureEquip.class, "tt_mold_temperature_equip");
// }
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, TtMoldTemperatureEquip ttMoldTemperatureEquip) {
return super.exportXls(request, ttMoldTemperatureEquip, TtMoldTemperatureEquip.class, "tt_mold_temperature_equip");
ModelAndView modelAndView = super.exportXls(request, ttMoldTemperatureEquip, TtMoldTemperatureEquip.class, "tt_mold_temperature_equip");
Object model = modelAndView.getModel().get("data");
List<TtMoldTemperatureEquip> list = new ArrayList<>();
if (model instanceof ArrayList<?>) {
for (Object o : (List<?>) model) {
list.add((TtMoldTemperatureEquip) o);
}
if (list.size() > 0) {
for (TtMoldTemperatureEquip Temperature : list) {
QueryWrapper<TtEqtBase> eqtBase = new QueryWrapper<>();
eqtBase.eq("eqt_no", Temperature.getEqtNo());
eqtBase.eq("eqt_type", 7);
eqtBase.eq("location", "模温车间");
TtEqtBase ttEqtBase = ttEqtBaseService.getOne(eqtBase);
if (ttEqtBase != null) {
Temperature.setDescr(ttEqtBase.getDescr());
}
}
}
}
return modelAndView;
}
/**

@ -34,15 +34,20 @@ public class TtMoldTemperatureEquip implements Serializable {
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private Integer id;
/**模温机设备编号只有1和2两种值*/
@Excel(name = "模温机设备编号", width = 15)
@ApiModelProperty(value = "模温机设备编号只有1和2两种值")
private String eqtNo;
/**描述*/
@Excel(name = "描述", width = 15)
@TableField(exist = false)
private String descr;
/**温度*/
@Excel(name = "温度", width = 15)
@ApiModelProperty(value = "温度")
private BigDecimal moldTemperature;
/**模温机设备编号只有1和2两种值*/
@Excel(name = "模温机设备编号只有1和2两种值", width = 15)
@ApiModelProperty(value = "模温机设备编号只有1和2两种值")
private String eqtNo;
/**记录的创建时间*/
@Excel(name = "采集时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "记录的创建时间")
@ -59,6 +64,5 @@ public class TtMoldTemperatureEquip implements Serializable {
@ApiModelProperty(value = "记录的修改人,修改人员的登录账号")
private String updateBy;
@TableField(exist = false)
private String descr;
}

@ -1,16 +1,15 @@
package org.jeecg.modules.demo.ttpouringequip.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.PrimitiveIterator;
import java.util.*;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.tteqtbase.entity.TtEqtBase;
@ -112,6 +111,13 @@ public class TtPouringEquipController extends JeecgController<TtPouringEquip, IT
return Result.OK(result);
}
@ApiOperation(value = "tt_pouring_equip-浇注机7天利用率", notes = "tt_pouring_equip-浇注机7天利用率")
@GetMapping(value = "/queryratepouring")
public Result queryratePouring(TtPouringEquip ttPouringEquip) {
double rate = ttPouringEquipService.queryrate(ttPouringEquip);
return Result.OK(rate);
}
/**
*
*
@ -198,7 +204,33 @@ public class TtPouringEquipController extends JeecgController<TtPouringEquip, IT
//@RequiresPermissions("ttpouringequip:tt_pouring_equip:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, TtPouringEquip ttPouringEquip) {
return super.exportXls(request, ttPouringEquip, TtPouringEquip.class, "tt_pouring_equip");
ModelAndView modelAndView = super.exportXls(request, ttPouringEquip, TtPouringEquip.class, "tt_pouring_equip");
Object model = modelAndView.getModel().get("data");
List<TtPouringEquip> list = new ArrayList<>();
if (model instanceof ArrayList<?>) {
for (Object o : (List<?>) model) {
list.add((TtPouringEquip) o);
}
if (list.size() > 0) {
for (TtPouringEquip pouring : list) {
QueryWrapper<TtEqtBase> eqtBase = new QueryWrapper<>();
eqtBase.eq("eqt_no", pouring.getEqtNo());
eqtBase.eq("eqt_type", 2);
eqtBase.eq("location", "浇筑车间");
TtEqtBase ttEqtBase = ttEqtBaseService.getOne(eqtBase);
if (ttEqtBase != null) {
pouring.setEqtSupplier(ttEqtBase.getEqtSupplier());
// ttPouringEquip.setEqtSupplier(ttEqtBase.getEqtSupplier());
}
}
// modelAndView.addObject("data",ttPouringEquip );
}
}
System.out.println(modelAndView);
// super.exportXls(request, ttPouringEquip, TtPouringEquip.class, "tt_pouring_equip");
return modelAndView;
}
/**

@ -34,6 +34,13 @@ public class TtPouringEquip implements Serializable {
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "自增字段")
private Integer id;
/**浇筑设备编号*/
@Excel(name = "浇筑设备编号", width = 15)
@ApiModelProperty(value = "浇筑设备编号")
private String eqtNo;
@Excel(name = "设备供应商", width = 15)
@TableField(exist = false)
private String eqtSupplier;
/**料罐温度*/
@Excel(name = "料罐温度", width = 15)
@ApiModelProperty(value = "料罐温度")
@ -42,11 +49,8 @@ public class TtPouringEquip implements Serializable {
@Excel(name = "模具温度", width = 15)
@ApiModelProperty(value = "模具温度")
private BigDecimal moldTemperature;
/**浇筑设备编号*/
@Excel(name = "浇筑设备编号", width = 15)
@ApiModelProperty(value = "浇筑设备编号")
private String eqtNo;
/**记录的创建时间*/
@Excel(name = "采集时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "记录的创建时间")
@ -63,12 +67,14 @@ public class TtPouringEquip implements Serializable {
@ApiModelProperty(value = "记录的修改人,修改人员的登录账号")
private String updateBy;
@TableField(exist = false)
private String eqtSupplier;
@TableField(exist = false)
private Integer eqtStatus;
@TableField(exist = false)
private BigDecimal utilizeRate;
@TableField(exist = false)
private String createTime2;
@TableField(exist = false)
private Integer DiffDate;
}

@ -17,4 +17,6 @@ public interface TtPouringEquipMapper extends BaseMapper<TtPouringEquip> {
List<TtPouringEquip> queryPouringTemperature(TtPouringEquip ttPouringEquip);
List<TtPouringEquip> queryRate(TtPouringEquip ttPouringEquip);
}

@ -31,4 +31,20 @@ ORDER BY
create_time2
</select>
<select id="queryRate" resultType="org.jeecg.modules.demo.ttpouringequip.entity.TtPouringEquip">
SELECT
a.id,
bucket_temperature,
a.eqt_no,
a.create_time,
a.update_time,
TIMESTAMPDIFF(HOUR,a.create_time,a.update_time) AS DiffDate
FROM
tt_pouring_equip a
LEFT JOIN tt_eqt_base b ON a.eqt_no=b.eqt_no
WHERE eqt_type='2'
</select>
</mapper>

@ -16,4 +16,5 @@ public interface ITtPouringEquipService extends IService<TtPouringEquip> {
List<TtPouringEquip> queryPouringTemperatureInfo(TtPouringEquip ttPouringEquip);
double queryrate(TtPouringEquip ttPouringEquip);
}

@ -8,6 +8,7 @@ import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
/**
@ -30,4 +31,23 @@ public class TtPouringEquipServiceImpl extends ServiceImpl<TtPouringEquipMapper,
public List<TtPouringEquip> queryPouringTemperatureInfo(TtPouringEquip ttPouringEquip) {
return ttPouringEquipMapper.queryPouringTemperature(ttPouringEquip);
}
@Override
public double queryrate(TtPouringEquip ttPouringEquip) {
List<TtPouringEquip> list = new ArrayList();
list= ttPouringEquipMapper.queryRate(ttPouringEquip);
double a =0,b=0,z = 0;
if (list.size()>0){
for (TtPouringEquip ttPouringEquip1 :list){
int diff= ttPouringEquip1.getDiffDate();
if (diff>=8){
a++;
}else {
z++;
}
b= a/(z+a) *100;
}
}
return b;
}
}

@ -38,6 +38,11 @@ public class TtSulfEquip implements Serializable {
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "id")
private Integer id;
/**设备编号类似31,32,33...*/
@Excel(name = "硫化机编号", width = 15)
@ApiModelProperty(value = "设备编号类似31,32,33...")
private String eqtNo;
/**开模日期*/
@Excel(name = "开模日期", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@ -45,7 +50,7 @@ public class TtSulfEquip implements Serializable {
@ApiModelProperty(value = "开模日期")
private Date openDate;
/**开模时间,类似: 13:15*/
@Excel(name = "开模时间,类似: 13:15", width = 15)
@Excel(name = "开模时间", width = 15)
@ApiModelProperty(value = "开模时间,类似: 13:15")
private String openTime;
/**产品批号*/
@ -61,11 +66,11 @@ public class TtSulfEquip implements Serializable {
@ApiModelProperty(value = "模具编号")
private String moldNo;
/**硫化压力bar单位Mpa*/
@Excel(name = "硫化压力bar单位Mpa", width = 15)
@Excel(name = "硫化压力", width = 15)
@ApiModelProperty(value = "硫化压力bar单位Mpa")
private Integer sulfPressure;
/**硫化时间s单位*/
@Excel(name = "硫化时间s单位", width = 15)
@Excel(name = "硫化时间", width = 15)
@ApiModelProperty(value = "硫化时间s单位")
private Integer sulfTime;
/**硫化温度(上模)*/
@ -81,7 +86,8 @@ public class TtSulfEquip implements Serializable {
@ApiModelProperty(value = "硫化温度(下模)")
private Integer sulfTempLower;
/**记录的创建时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dds")
@Excel(name = "采集时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "记录的创建时间")
private Date createTime;
@ -96,8 +102,5 @@ public class TtSulfEquip implements Serializable {
/**记录的修改人,修改人员的登录账号*/
@ApiModelProperty(value = "记录的修改人,修改人员的登录账号")
private String updateBy;
/**设备编号类似31,32,33...*/
@Excel(name = "设备编号类似31,32,33...", width = 15)
@ApiModelProperty(value = "设备编号类似31,32,33...")
private String eqtNo;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save