天台祥和 硫化机、浇注机 历史数据管理代码调整

dev
ccongli 2 years ago
parent b65c8a27e1
commit 04a4413415

@ -236,7 +236,7 @@ export const JeecgListMixin = {
handleTableChange(pagination, filters, sorter) { handleTableChange(pagination, filters, sorter) {
//分页、排序、筛选变化时触发 //分页、排序、筛选变化时触发
//TODO 筛选 //TODO 筛选
console.log(pagination) console.log(pagination, filters, sorter)
if (Object.keys(sorter).length > 0) { if (Object.keys(sorter).length > 0) {
this.isorter.column = sorter.field; this.isorter.column = sorter.field;
this.isorter.order = "ascend" == sorter.order ? "asc" : "desc" this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"

@ -130,38 +130,38 @@
}, },
data () { data () {
return { return {
description: 'tt_pouring_equip管理页面', description: '浇注设备历史数据',
// //
columns: [ columns: [
{ {
title: '#', title: 'ID',
dataIndex: '', dataIndex: 'id',
key:'rowIndex', key:'rowIndex',
width:60, width:60,
align:"center", align:"center"
customRender:function (t,r,index) {
return parseInt(index)+1;
}
}, },
{ {
title:'设备编号', title:'设备编号',
align:"center", align:"center",
dataIndex: 'eqtNo' dataIndex: 'eqtNo',
customRender:function (text) {
return "浇注机" + text;
}
}, },
{ {
title:'设备供应商', title:'设备名称',
align:"center", align:"center",
dataIndex: 'eqtSupplier' dataIndex: 'descr'
}, },
{ {
title:'料罐温度(℃)', title:'设备IP',
align:"center", align:"center",
dataIndex: 'bucketTemperature' dataIndex: 'eqtIp',
}, },
{ {
title:'模具温度(℃)', title:'温度(℃)',
align:"center", align:"center",
dataIndex: 'moldTemperature' dataIndex: 'temperature'
}, },
{ {
title:'采集时间', title:'采集时间',
@ -188,6 +188,11 @@
importExcelUrl: "ttpouringequip/ttPouringEquip/importExcel", importExcelUrl: "ttpouringequip/ttPouringEquip/importExcel",
}, },
//
isorter: {
column: "createTime",
order: "desc"
},
dictOptions:{}, dictOptions:{},
superFieldList:[], superFieldList:[],
} }
@ -205,9 +210,8 @@
}, },
getSuperFieldList(){ getSuperFieldList(){
let fieldList=[]; let fieldList=[];
fieldList.push({type:'BigDecimal',value:'bucketTemperature',text:'料罐温度',dictCode:''})
fieldList.push({type:'BigDecimal',value:'moldTemperature',text:'模具温度',dictCode:''})
fieldList.push({type:'string',value:'eqtNo',text:'浇筑设备编号',dictCode:''}) fieldList.push({type:'string',value:'eqtNo',text:'浇筑设备编号',dictCode:''})
fieldList.push({type:'BigDecimal',value:'temperature',text:'温度',dictCode:''})
fieldList.push({type:'date',value:'createTime',text:'记录的创建时间'}) fieldList.push({type:'date',value:'createTime',text:'记录的创建时间'})
this.superFieldList = fieldList this.superFieldList = fieldList
} }

@ -9,13 +9,8 @@
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="料罐温度(℃)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bucketTemperature"> <a-form-model-item label="温度(℃)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="temperature">
<a-input-number v-model="model.bucketTemperature" placeholder="请输入料罐温度" style="width: 100%" /> <a-input-number v-model="model.temperature" placeholder="请输入温度" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="模具温度(℃)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="moldTemperature">
<a-input-number v-model="model.moldTemperature" placeholder="请输入模具温度" style="width: 100%" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
@ -55,12 +50,9 @@
}, },
confirmLoading: false, confirmLoading: false,
validatorRules: { validatorRules: {
bucketTemperature: [ temperature: [
{ required: true, message: '请输入料罐温度!'}, { required: true, message: '请输入料罐温度!'},
], ],
moldTemperature: [
{ required: true, message: '请输入模具温度!'},
],
// eqtNo: [ // eqtNo: [
// { required: true, message: '!'}, // { required: true, message: '!'},
// ], // ],

@ -13,7 +13,6 @@
</template> </template>
<script> <script>
import TtPouringEquipForm from './TtPouringEquipForm' import TtPouringEquipForm from './TtPouringEquipForm'
export default { export default {
name: 'TtPouringEquipModal', name: 'TtPouringEquipModal',

@ -36,16 +36,16 @@
<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>--> <!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
<a-button type="primary" icon="download" @click="handleExportXls('tt_sulf_equip')"></a-button> <a-button type="primary" icon="download" @click="handleExportXls('tt_sulf_equip')"></a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<!-- <a-button type="primary" icon="import">导入</a-button>--> <!-- <a-button type="primary" icon="import">导入</a-button> -->
</a-upload> </a-upload>
<!-- 高级查询区域 --> <!-- 高级查询区域 -->
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>--> <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<!-- <a-dropdown v-if="selectedRowKeys.length > 0">--> <a-dropdown v-if="selectedRowKeys.length > 0">
<!-- <a-menu slot="overlay">--> <a-menu slot="overlay">
<!-- <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>--> <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
<!-- </a-menu>--> </a-menu>
<!-- <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>--> <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
<!-- </a-dropdown>--> </a-dropdown>
</div> </div>
<!-- table区域-begin --> <!-- table区域-begin -->
@ -133,7 +133,7 @@
}, },
data () { data () {
return { return {
description: 'tt_sulf_equip管理页面', description: '硫化机历史数据',
// //
columns: [ columns: [
// { // {
@ -208,11 +208,10 @@
title:'采集时间', title:'采集时间',
align:"center", align:"center",
dataIndex: 'createTime', dataIndex: 'createTime',
customRender:function (createTime) { customRender:function (createTime) {
return createTime.substring(0,10) return createTime.substring(0,10)
}, },
}, },
{ {
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
@ -222,6 +221,11 @@
scopedSlots: { customRender: 'action' } scopedSlots: { customRender: 'action' }
} }
], ],
//
isorter: {
column: "createTime",
order: "desc"
},
url: { url: {
list: "/ttsulfequip/ttSulfEquip/list", list: "/ttsulfequip/ttSulfEquip/list",
delete: "/ttsulfequip/ttSulfEquip/delete", delete: "/ttsulfequip/ttSulfEquip/delete",
@ -235,7 +239,7 @@
} }
}, },
created() { created() {
this.getSuperFieldList(); this.getSuperFieldList();
}, },
computed: { computed: {
importExcelUrl: function(){ importExcelUrl: function(){

@ -66,14 +66,17 @@ public class TtPouringEquipController extends JeecgController<TtPouringEquip, IT
IPage<TtPouringEquip> pageList = ttPouringEquipService.page(page, queryWrapper); IPage<TtPouringEquip> pageList = ttPouringEquipService.page(page, queryWrapper);
List<TtPouringEquip> list = pageList.getRecords(); List<TtPouringEquip> list = pageList.getRecords();
if (list.size() > 0) { if (list.size() > 0) {
// 查询所有浇注设备,按ip标注
LambdaQueryWrapper<TtEqtBase> lwq = new LambdaQueryWrapper<>();
lwq.eq(TtEqtBase::getEqtStatus, 1);
lwq.eq(TtEqtBase::getEqtType, 2);
List<TtEqtBase> deviceList = ttEqtBaseService.list(lwq);
Map<String, TtEqtBase> deviceMap = deviceList.stream().collect(Collectors.toMap(TtEqtBase::getEqtIp, v -> v));
for (TtPouringEquip pouring : list) { for (TtPouringEquip pouring : list) {
QueryWrapper<TtEqtBase> eqtBase = new QueryWrapper<>(); TtEqtBase eqtBase = deviceMap.get(pouring.getEqtIp());
eqtBase.eq("eqt_no", pouring.getEqtNo()); if(eqtBase != null) {
eqtBase.eq("eqt_type", 2); pouring.setDescr(eqtBase.getDescr());
TtEqtBase ttEqtBase = ttEqtBaseService.getOne(eqtBase); }
// if (ttEqtBase != null) {
// pouring.setEqtSupplier(ttEqtBase.getEqtSupplier());
// }
} }
} }
return Result.OK(pageList); return Result.OK(pageList);
@ -94,6 +97,7 @@ public class TtPouringEquipController extends JeecgController<TtPouringEquip, IT
lwq.eq(TtEqtBase::getEqtStatus, 1); lwq.eq(TtEqtBase::getEqtStatus, 1);
lwq.eq(TtEqtBase::getEqtType, 2); lwq.eq(TtEqtBase::getEqtType, 2);
List<TtEqtBase> JZ_DeviceList = ttEqtBaseService.list(lwq); List<TtEqtBase> JZ_DeviceList = ttEqtBaseService.list(lwq);
long timestamp = System.currentTimeMillis(); long timestamp = System.currentTimeMillis();
Map<String,PouringModel> pouringModelMap = new HashMap<>(); Map<String,PouringModel> pouringModelMap = new HashMap<>();
PouringModel model; PouringModel model;

@ -88,13 +88,4 @@ public class TtPouringEquip implements Serializable {
@ApiModelProperty(value = "设备位置") @ApiModelProperty(value = "设备位置")
@TableField(exist = false) @TableField(exist = false)
private String location; private String location;
// @TableField(exist = false)
// private BigDecimal utilizeRate;
// @TableField(exist = false)
// private String createTime2;
//
// @TableField(exist = false)
// private Integer DiffDate;
} }

Loading…
Cancel
Save