模温机设备管理模块

dev
ccongli 2 years ago
parent 23efc65bad
commit 6416562761

@ -45,11 +45,11 @@
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('tt_eqt_base')"></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-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-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
@ -144,16 +144,16 @@
description: '设备基础信息管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
// {
// title: '#',
// dataIndex: '',
// key:'rowIndex',
// width:60,
// align:"center",
// customRender:function (t,r,index) {
// return parseInt(index)+1;
// }
// },
{
title:'设备编号',
align:"center",
@ -212,6 +212,13 @@
},
dictOptions:{},
superFieldList:[],
isorter:{
column: 'createTime,eqtType,eqtNo',
order: 'desc,asc,asc',
},
ipagination:{
pageSize: 20
}
}
},
created() {

@ -5,8 +5,8 @@
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="模温设备编号">
<a-input placeholder="请输入模温设备编号" v-model="queryParam.eqtNo"></a-input>
<a-form-item label="模温设备编号">
<a-input placeholder="请输入模温设备编号" v-model="queryParam.eqtNo"></a-input>
</a-form-item>
</a-col>
<a-col :xl="10" :lg="11" :md="12" :sm="24">
@ -33,19 +33,19 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('tt_mold_temperature_equip')"></a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> -->
<a-button type="primary" icon="download" @click="handleExportXls('模温机设备管理')"></a-button>
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<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-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</a-dropdown> -->
</div>
<!-- table区域-begin -->
@ -111,7 +111,7 @@
</a-table>
</div>
<tt-mold-temperature-equip-modal ref="modalForm" @ok="modalFormOk"></tt-mold-temperature-equip-modal>
<tt-molding-equip-modal ref="modalForm" @ok="modalFormOk"></tt-molding-equip-modal>
</a-card>
</template>
@ -120,17 +120,17 @@
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TtMoldTemperatureEquipModal from './modules/TtMoldTemperatureEquipModal'
import TtMoldingEquipModal from './modules/TtMoldingEquipModal'
export default {
name: 'TtMoldTemperatureEquipList',
name: 'TtMoldingEquipList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TtMoldTemperatureEquipModal
TtMoldingEquipModal
},
data () {
return {
description: 'tt_mold_temperature_equip管理页面',
description: '模温机设备管理管理页面',
//
columns: [
{
@ -144,27 +144,29 @@
}
},
{
title:'模温机设备编号',
title:'设备编号',
align:"center",
dataIndex: 'eqtNo'
},
{
title:'描述',
title:'设备名称',
align:"center",
dataIndex: 'descr'
},
{
title:'温度(℃)',
title:'设备Ip',
align:"center",
dataIndex: 'moldTemperature'
dataIndex: 'eqtIp'
},
{
title:'采集时间',
title:'温度',
align:"center",
dataIndex: 'createTime',
// customRender:function (text) {
// return !text?"":(text.length>10?text.substr(0,10):text)
// }
dataIndex: 'temperature'
},
{
title:'记录的创建时间',
align:"center",
dataIndex: 'createTime'
},
{
title: '操作',
@ -176,12 +178,12 @@
}
],
url: {
list: "/ttmoldtemperatureequip/ttMoldTemperatureEquip/list",
delete: "/ttmoldtemperatureequip/ttMoldTemperatureEquip/delete",
deleteBatch: "/ttmoldtemperatureequip/ttMoldTemperatureEquip/deleteBatch",
exportXlsUrl: "/ttmoldtemperatureequip/ttMoldTemperatureEquip/exportXls",
importExcelUrl: "ttmoldtemperatureequip/ttMoldTemperatureEquip/importExcel",
list: "/ttmoldingequip/ttMoldingEquip/list",
delete: "/ttmoldingequip/ttMoldingEquip/delete",
deleteBatch: "/ttmoldingequip/ttMoldingEquip/deleteBatch",
exportXlsUrl: "/ttmoldingequip/ttMoldingEquip/exportXls",
importExcelUrl: "ttmoldingequip/ttMoldingEquip/importExcel",
},
dictOptions:{},
superFieldList:[],
@ -200,8 +202,9 @@
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'BigDecimal',value:'moldTemperature',text:'温度',dictCode:''})
fieldList.push({type:'string',value:'eqtNo',text:'模温机设备编号只有1和2两种值',dictCode:''})
fieldList.push({type:'string',value:'eqtNo',text:'设备编号',dictCode:''})
fieldList.push({type:'string',value:'eqtIp',text:'设备Ip',dictCode:''})
fieldList.push({type:'BigDecimal',value:'temperature',text:'温度',dictCode:''})
fieldList.push({type:'date',value:'createTime',text:'记录的创建时间'})
this.superFieldList = fieldList
}

@ -1,26 +1,26 @@
-- 注意该页面对应的前台目录为views/demo888文件夹下
-- 注意该页面对应的前台目录为views/ttmoldingequip文件夹下
-- 如果你想更改到其他目录请修改sql中component字段对应的值
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
VALUES ('2023041302342260040', NULL, '商品分类', '/demo888/testShoptypeTreeList', 'demo888/TestShoptypeTreeList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-04-13 14:34:04', NULL, NULL, 0);
VALUES ('2023041703392350320', NULL, '模温机设备管理', '/ttmoldingequip/ttMoldingEquipList', 'ttmoldingequip/TtMoldingEquipList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-04-17 15:39:32', NULL, NULL, 0);
-- 权限控制sql
-- 新增
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023041302342260041', '2023041302342260040', '添加商品分类', NULL, NULL, 0, NULL, NULL, 2, 'demo888:test_shoptype_tree:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-04-13 14:34:04', NULL, NULL, 0, 0, '1', 0);
VALUES ('2023041703392350321', '2023041703392350320', '添加模温机设备管理', NULL, NULL, 0, NULL, NULL, 2, 'ttmoldingequip:tt_molding_equip:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-04-17 15:39:32', NULL, NULL, 0, 0, '1', 0);
-- 编辑
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023041302342260042', '2023041302342260040', '编辑商品分类', NULL, NULL, 0, NULL, NULL, 2, 'demo888:test_shoptype_tree:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-04-13 14:34:04', NULL, NULL, 0, 0, '1', 0);
VALUES ('2023041703392350322', '2023041703392350320', '编辑模温机设备管理', NULL, NULL, 0, NULL, NULL, 2, 'ttmoldingequip:tt_molding_equip:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-04-17 15:39:32', NULL, NULL, 0, 0, '1', 0);
-- 删除
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023041302342260043', '2023041302342260040', '删除商品分类', NULL, NULL, 0, NULL, NULL, 2, 'demo888:test_shoptype_tree:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-04-13 14:34:04', NULL, NULL, 0, 0, '1', 0);
VALUES ('2023041703392350323', '2023041703392350320', '删除模温机设备管理', NULL, NULL, 0, NULL, NULL, 2, 'ttmoldingequip:tt_molding_equip:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-04-17 15:39:32', NULL, NULL, 0, 0, '1', 0);
-- 批量删除
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023041302342260044', '2023041302342260040', '批量删除商品分类', NULL, NULL, 0, NULL, NULL, 2, 'demo888:test_shoptype_tree:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-04-13 14:34:04', NULL, NULL, 0, 0, '1', 0);
VALUES ('2023041703392350324', '2023041703392350320', '批量删除模温机设备管理', NULL, NULL, 0, NULL, NULL, 2, 'ttmoldingequip:tt_molding_equip:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-04-17 15:39:32', NULL, NULL, 0, 0, '1', 0);
-- 导出excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023041302342260045', '2023041302342260040', '导出excel_商品分类', NULL, NULL, 0, NULL, NULL, 2, 'demo888:test_shoptype_tree:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-04-13 14:34:04', NULL, NULL, 0, 0, '1', 0);
VALUES ('2023041703392350325', '2023041703392350320', '导出excel_模温机设备管理', NULL, NULL, 0, NULL, NULL, 2, 'ttmoldingequip:tt_molding_equip:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-04-17 15:39:32', NULL, NULL, 0, 0, '1', 0);
-- 导入excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023041302342260046', '2023041302342260040', '导入excel_商品分类', NULL, NULL, 0, NULL, NULL, 2, 'demo888:test_shoptype_tree:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-04-13 14:34:04', NULL, NULL, 0, 0, '1', 0);
VALUES ('2023041703392350326', '2023041703392350320', '导入excel_模温机设备管理', NULL, NULL, 0, NULL, NULL, 2, 'ttmoldingequip:tt_molding_equip:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-04-17 15:39:32', NULL, NULL, 0, 0, '1', 0);

@ -4,13 +4,23 @@
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<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 label="设备编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="eqtNo">
<a-input v-model="model.eqtNo" placeholder="请输入设备编号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="模温机设备编号只有1和2两种值" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="eqtNo">
<a-input v-model="model.eqtNo" placeholder="请输入模温机设备编号只有1和2两种值" ></a-input>
<a-form-model-item label="设备Ip" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="eqtIp">
<a-input v-model="model.eqtIp" placeholder="请输入设备Ip" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="温度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="temperature">
<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="createTime">
<j-date placeholder="请选择记录的创建时间" v-model="model.createTime" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
@ -25,7 +35,7 @@
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TtMoldTemperatureEquipForm',
name: 'TtMoldingEquipForm',
components: {
},
props: {
@ -50,17 +60,20 @@
},
confirmLoading: false,
validatorRules: {
moldTemperature: [
eqtNo: [
{ required: true, message: '请输入设备编号!'},
],
temperature: [
{ required: true, message: '请输入温度!'},
],
eqtNo: [
{ required: true, message: '请输入模温机设备编号只有1和2两种值!'},
createTime: [
{ required: true, message: '请输入记录的创建时间!'},
],
},
url: {
add: "/ttmoldtemperatureequip/ttMoldTemperatureEquip/add",
edit: "/ttmoldtemperatureequip/ttMoldTemperatureEquip/edit",
queryById: "/ttmoldtemperatureequip/ttMoldTemperatureEquip/queryById"
add: "/ttmoldingequip/ttMoldingEquip/add",
edit: "/ttmoldingequip/ttMoldingEquip/edit",
queryById: "/ttmoldingequip/ttMoldingEquip/queryById"
}
}
},

@ -7,7 +7,7 @@
@close="close"
destroyOnClose
:visible="visible">
<tt-mold-temperature-equip-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-mold-temperature-equip-form>
<tt-molding-equip-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-molding-equip-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;"></a-button>
@ -17,12 +17,12 @@
<script>
import TtMoldTemperatureEquipForm from './TtMoldTemperatureEquipForm'
import TtMoldingEquipForm from './TtMoldingEquipForm'
export default {
name: 'TtMoldTemperatureEquipModal',
name: 'TtMoldingEquipModal',
components: {
TtMoldTemperatureEquipForm
TtMoldingEquipForm
},
data () {
return {

@ -8,17 +8,17 @@
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<tt-mold-temperature-equip-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-mold-temperature-equip-form>
<tt-molding-equip-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-molding-equip-form>
</j-modal>
</template>
<script>
import TtMoldTemperatureEquipForm from './TtMoldTemperatureEquipForm'
import TtMoldingEquipForm from './TtMoldingEquipForm'
export default {
name: 'TtMoldTemperatureEquipModal',
name: 'TtMoldingEquipModal',
components: {
TtMoldTemperatureEquipForm
TtMoldingEquipForm
},
data () {
return {

@ -1,26 +0,0 @@
-- 注意该页面对应的前台目录为views/ttmoldtemperatureequip文件夹下
-- 如果你想更改到其他目录请修改sql中component字段对应的值
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
VALUES ('2023021404033310470', NULL, 'tt_mold_temperature_equip', '/ttmoldtemperatureequip/ttMoldTemperatureEquipList', 'ttmoldtemperatureequip/TtMoldTemperatureEquipList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-02-14 16:03:47', NULL, NULL, 0);
-- 权限控制sql
-- 新增
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021404033310471', '2023021404033310470', '添加tt_mold_temperature_equip', NULL, NULL, 0, NULL, NULL, 2, 'ttmoldtemperatureequip:tt_mold_temperature_equip:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 16:03:47', NULL, NULL, 0, 0, '1', 0);
-- 编辑
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021404033310472', '2023021404033310470', '编辑tt_mold_temperature_equip', NULL, NULL, 0, NULL, NULL, 2, 'ttmoldtemperatureequip:tt_mold_temperature_equip:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 16:03:47', NULL, NULL, 0, 0, '1', 0);
-- 删除
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021404033320473', '2023021404033310470', '删除tt_mold_temperature_equip', NULL, NULL, 0, NULL, NULL, 2, 'ttmoldtemperatureequip:tt_mold_temperature_equip:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 16:03:47', NULL, NULL, 0, 0, '1', 0);
-- 批量删除
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021404033320474', '2023021404033310470', '批量删除tt_mold_temperature_equip', NULL, NULL, 0, NULL, NULL, 2, 'ttmoldtemperatureequip:tt_mold_temperature_equip:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 16:03:47', NULL, NULL, 0, 0, '1', 0);
-- 导出excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021404033320475', '2023021404033310470', '导出excel_tt_mold_temperature_equip', NULL, NULL, 0, NULL, NULL, 2, 'ttmoldtemperatureequip:tt_mold_temperature_equip:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 16:03:47', NULL, NULL, 0, 0, '1', 0);
-- 导入excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021404033320476', '2023021404033310470', '导入excel_tt_mold_temperature_equip', NULL, NULL, 0, NULL, NULL, 2, 'ttmoldtemperatureequip:tt_mold_temperature_equip:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 16:03:47', NULL, NULL, 0, 0, '1', 0);

@ -1,354 +0,0 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('商品分类')"></a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected"></a>
</div>
<a-table
ref="table"
size="middle"
rowKey="id"
class="j-table-force-nowrap"
:scroll="{x:true}"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:expandedRowKeys="expandedRowKeys"
@change="handleTableChange"
@expand="handleExpand"
v-bind="tableProps">
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;"></span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;"></span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)"></a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleAddChild(record)"></a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDeleteNode(record.id)" placement="topLeft">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<testShoptypeTree-modal ref="modalForm" @ok="modalFormOk"></testShoptypeTree-modal>
</a-card>
</template>
<script>
import { getAction, deleteAction } from '@/api/manage'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TestShoptypeTreeModal from './modules/TestShoptypeTreeModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import { filterObj } from '@/utils/util';
export default {
name: "TestShoptypeTreeList",
mixins:[JeecgListMixin],
components: {
TestShoptypeTreeModal
},
data () {
return {
description: '商品分类管理页面',
//
columns: [
{
title:'商品分类',
align:"left",
dataIndex: 'typeName'
},
{
title:'分类图片',
align:"left",
dataIndex: 'pic',
scopedSlots: {customRender: 'imgSlot'}
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' },
}
],
url: {
list: "/demo888/testShoptypeTree/rootList",
childList: "/demo888/testShoptypeTree/childList",
getChildListBatch: "/demo888/testShoptypeTree/getChildListBatch",
delete: "/demo888/testShoptypeTree/delete",
deleteBatch: "/demo888/testShoptypeTree/deleteBatch",
exportXlsUrl: "/demo888/testShoptypeTree/exportXls",
importExcelUrl: "demo888/testShoptypeTree/importExcel",
},
expandedRowKeys:[],
hasChildrenField:"hasChild",
pidField:"pid",
dictOptions: {},
loadParent: false,
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
tableProps() {
let _this = this
return {
//
rowSelection: {
selectedRowKeys: _this.selectedRowKeys,
onChange: (selectedRowKeys) => _this.selectedRowKeys = selectedRowKeys
}
}
}
},
methods: {
loadData(arg){
if(arg==1){
this.ipagination.current=1
}
this.loading = true
let params = this.getQueryParams()
params.hasQuery = 'true'
getAction(this.url.list,params).then(res=>{
if(res.success){
let result = res.result
if(Number(result.total)>0){
this.ipagination.total = Number(result.total)
this.dataSource = this.getDataByResult(res.result.records)
return this.loadDataByExpandedRows(this.dataSource)
}else{
this.ipagination.total=0
this.dataSource=[]
}
}else{
this.$message.warning(res.message)
}
}).finally(()=>{
this.loading = false
})
},
//
loadDataByExpandedRows(dataList) {
if (this.expandedRowKeys.length > 0) {
return getAction(this.url.getChildListBatch,{ parentIds: this.expandedRowKeys.join(',') }).then(res=>{
if (res.success && res.result.records.length>0) {
//
let records = res.result.records
const listMap = new Map();
for (let item of records) {
let pid = item[this.pidField];
if (this.expandedRowKeys.join(',').includes(pid)) {
let mapList = listMap.get(pid);
if (mapList == null) {
mapList = [];
}
mapList.push(item);
listMap.set(pid, mapList);
}
}
let childrenMap = listMap;
let fn = (list) => {
if(list) {
list.forEach(data => {
if (this.expandedRowKeys.includes(data.id)) {
data.children = this.getDataByResult(childrenMap.get(data.id))
fn(data.children)
}
})
}
}
fn(dataList)
}
})
} else {
return Promise.resolve()
}
},
getQueryParams(arg) {
//
let sqp = {}
let param = {}
if(this.superQueryParams){
sqp['superQueryParams']=encodeURI(this.superQueryParams)
sqp['superQueryMatchType'] = this.superQueryMatchType
}
if(arg){
param = Object.assign(sqp, this.isorter ,this.filters);
}else{
param = Object.assign(sqp, this.queryParam, this.isorter ,this.filters);
}
if(JSON.stringify(this.queryParam) === "{}" || arg){
param.hasQuery = 'false'
}else{
param.hasQuery = 'true'
}
param.field = this.getQueryField();
param.pageNo = this.ipagination.current;
param.pageSize = this.ipagination.pageSize;
return filterObj(param);
},
searchReset() {
//
this.expandedRowKeys = []
this.queryParam = {}
this.loadData(1);
},
getDataByResult(result){
if(result){
return result.map(item=>{
//
if(item[this.hasChildrenField]=='1'){
let loadChild = { id: item.id+'_loadChild', name: 'loading...', isLoading: true }
item.children = [loadChild]
}
return item
})
}
},
handleExpand(expanded, record){
//
if (expanded) {
this.expandedRowKeys.push(record.id)
if (record.children.length>0 && record.children[0].isLoading === true) {
let params = this.getQueryParams(1);//
params[this.pidField] = record.id
params.hasQuery = 'false'
params.superQueryParams=""
getAction(this.url.childList,params).then((res)=>{
if(res.success){
if(res.result.records){
record.children = this.getDataByResult(res.result.records)
this.dataSource = [...this.dataSource]
}else{
record.children=''
record.hasChildrenField='0'
}
}else{
this.$message.warning(res.message)
}
})
}
}else{
let keyIndex = this.expandedRowKeys.indexOf(record.id)
if(keyIndex>=0){
this.expandedRowKeys.splice(keyIndex, 1);
}
}
},
handleAddChild(record){
this.loadParent = true
let obj = {}
obj[this.pidField] = record['id']
this.$refs.modalForm.add(obj);
},
handleDeleteNode(id) {
if(!this.url.delete){
this.$message.error("请设置url.delete属性!")
return
}
var that = this;
deleteAction(that.url.delete, {id: id}).then((res) => {
if (res.success) {
that.loadData(1)
} else {
that.$message.warning(res.message);
}
});
},
batchDel(){
if(this.selectedRowKeys.length<=0){
this.$message.warning('请选择一条记录!');
return false;
}else{
let ids = "";
let that = this;
that.selectedRowKeys.forEach(function(val) {
ids+=val+",";
});
that.$confirm({
title:"确认删除",
content:"是否删除选中数据?",
onOk: function(){
that.handleDeleteNode(ids)
that.onClearSelected();
}
});
}
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'typeName',text:'商品分类',dictCode:''})
fieldList.push({type:'string',value:'pic',text:'分类图片',dictCode:''})
fieldList.push({type:'string',value:'pid',text:'父级节点',dictCode:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -1,156 +0,0 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
:confirmLoading="confirmLoading"
switchFullscreen
@ok="handleOk"
@cancel="handleCancel"
cancelText="关闭">
<a-spin :spinning="confirmLoading">
<a-form-model ref="form" :model="model" :rules="validatorRules">
<a-form-model-item label="商品分类" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeName">
<a-input v-model="model.typeName" placeholder="请输入商品分类" ></a-input>
</a-form-model-item>
<a-form-model-item label="分类图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pic">
<j-image-upload isMultiple v-model="model.pic" ></j-image-upload>
</a-form-model-item>
<a-form-model-item label="父级节点" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pid">
<j-tree-select
ref="treeSelect"
placeholder="请选择父级节点"
v-model="model.pid"
dict="test_shoptype_tree,type_name,id"
pidField="pid"
pidValue="0"
hasChildField="has_child"
>
</j-tree-select>
</a-form-model-item>
</a-form-model>
</a-spin>
</j-modal>
</template>
<script>
import { httpAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: "TestShoptypeTreeModal",
components: {
},
data () {
return {
title:"操作",
width:800,
visible: false,
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/demo888/testShoptypeTree/add",
edit: "/demo888/testShoptypeTree/edit",
},
expandedRowKeys:[],
pidField:"pid"
}
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add (obj) {
this.modelDefault.pid=''
this.edit(Object.assign(this.modelDefault , obj));
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
close () {
this.$emit('close');
this.visible = false;
this.$refs.form.clearValidate()
},
handleOk () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
if(this.model.id && this.model.id === this.model[this.pidField]){
that.$message.warning("父级节点不能选择自己");
that.confirmLoading = false;
return;
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
this.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
that.close();
})
}else{
return false
}
})
},
handleCancel () {
this.close()
},
submitSuccess(formData,flag){
if(!formData.id){
let treeData = this.$refs.treeSelect.getCurrTreeData()
this.expandedRowKeys=[]
this.getExpandKeysByPid(formData[this.pidField],treeData,treeData)
this.$emit('ok',formData,this.expandedRowKeys.reverse());
}else{
this.$emit('ok',formData,flag);
}
},
getExpandKeysByPid(pid,arr,all){
if(pid && arr && arr.length>0){
for(let i=0;i<arr.length;i++){
if(arr[i].key==pid){
this.expandedRowKeys.push(arr[i].key)
this.getExpandKeysByPid(arr[i]['parentId'],all,all)
}else{
this.getExpandKeysByPid(pid,arr[i].children,all)
}
}
}
}
}
}
</script>

@ -25,25 +25,14 @@ 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.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;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.apache.shiro.authz.annotation.RequiresPermissions;
/**
* @Description: tt_electric_meter

@ -31,7 +31,7 @@ public class TtElectricMeter implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "id")
private java.lang.Integer id;

@ -12,10 +12,8 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.checkerframework.checker.units.qual.A;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.tteqtbase.entity.TtEqtBase;
import org.jeecg.modules.demo.tteqtbase.service.ITtEqtBaseService;
@ -27,24 +25,14 @@ 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;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.apache.shiro.authz.annotation.RequiresPermissions;
/**
* @Description: tt_feeding_equip

@ -33,7 +33,7 @@ public class TtInjectEquip implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "id")
private java.lang.Integer id;
/**日期*/

@ -0,0 +1,200 @@
package org.jeecg.modules.demo.ttmoldingequip.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
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 com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.tteqtbase.entity.TtEqtBase;
import org.jeecg.modules.demo.tteqtbase.service.ITtEqtBaseService;
import org.jeecg.modules.demo.ttmoldingequip.entity.TtMoldingEquip;
import org.jeecg.modules.demo.ttmoldingequip.service.ITtMoldingEquipService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
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.ttpouringequip.entity.TtPouringEquip;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.apache.shiro.authz.annotation.RequiresPermissions;
/**
* @Description:
* @Author: jeecg-boot
* @Date: 2023-04-17
* @Version: V1.0
*/
@Api(tags="模温机设备管理")
@RestController
@RequestMapping("/ttmoldingequip/ttMoldingEquip")
@Slf4j
public class TtMoldingEquipController extends JeecgController<TtMoldingEquip, ITtMoldingEquipService> {
@Autowired
private ITtMoldingEquipService ttMoldingEquipService;
@Autowired
private ITtEqtBaseService ttEqtBaseService;
/**
*
*
* @param ttMoldingEquip
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "模温机设备管理-分页列表查询")
@ApiOperation(value="模温机设备管理-分页列表查询", notes="模温机设备管理-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<TtMoldingEquip>> queryPageList(TtMoldingEquip ttMoldingEquip,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, HttpServletRequest req) {
QueryWrapper<TtMoldingEquip> queryWrapper = QueryGenerator.initQueryWrapper(ttMoldingEquip, req.getParameterMap());
Page<TtMoldingEquip> page = new Page<TtMoldingEquip>(pageNo, pageSize);
IPage<TtMoldingEquip> pageList = ttMoldingEquipService.page(page, queryWrapper);
List<TtMoldingEquip> list = pageList.getRecords();
if (list.size() > 0) {
// 查询所有浇注设备,按ip标注
LambdaQueryWrapper<TtEqtBase> lwq = new LambdaQueryWrapper<>();
lwq.eq(TtEqtBase::getEqtStatus, 1);
lwq.eq(TtEqtBase::getEqtType, 7);
List<TtEqtBase> deviceList = ttEqtBaseService.list(lwq);
Map<String, TtEqtBase> deviceMap = deviceList.stream().collect(Collectors.toMap(TtEqtBase::getEqtIp, v -> v));
for (TtMoldingEquip molding : list) {
TtEqtBase eqtBase = deviceMap.get(molding.getEqtIp());
if(eqtBase != null) {
molding.setDescr(eqtBase.getDescr());
}
}
}
return Result.OK(pageList);
}
/**
*
*
* @param ttMoldingEquip
* @return
*/
@AutoLog(value = "模温机设备管理-添加")
@ApiOperation(value="模温机设备管理-添加", notes="模温机设备管理-添加")
//@RequiresPermissions("ttmoldingequip:tt_molding_equip:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody TtMoldingEquip ttMoldingEquip) {
ttMoldingEquipService.save(ttMoldingEquip);
return Result.OK("添加成功!");
}
/**
*
*
* @param ttMoldingEquip
* @return
*/
@AutoLog(value = "模温机设备管理-编辑")
@ApiOperation(value="模温机设备管理-编辑", notes="模温机设备管理-编辑")
//@RequiresPermissions("ttmoldingequip:tt_molding_equip:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody TtMoldingEquip ttMoldingEquip) {
ttMoldingEquipService.updateById(ttMoldingEquip);
return Result.OK("编辑成功!");
}
/**
* id
*
* @param id
* @return
*/
@AutoLog(value = "模温机设备管理-通过id删除")
@ApiOperation(value="模温机设备管理-通过id删除", notes="模温机设备管理-通过id删除")
//@RequiresPermissions("ttmoldingequip:tt_molding_equip:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
ttMoldingEquipService.removeById(id);
return Result.OK("删除成功!");
}
/**
*
*
* @param ids
* @return
*/
@AutoLog(value = "模温机设备管理-批量删除")
@ApiOperation(value="模温机设备管理-批量删除", notes="模温机设备管理-批量删除")
//@RequiresPermissions("ttmoldingequip:tt_molding_equip:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.ttMoldingEquipService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* id
*
* @param id
* @return
*/
//@AutoLog(value = "模温机设备管理-通过id查询")
@ApiOperation(value="模温机设备管理-通过id查询", notes="模温机设备管理-通过id查询")
@GetMapping(value = "/queryById")
public Result<TtMoldingEquip> queryById(@RequestParam(name="id",required=true) String id) {
TtMoldingEquip ttMoldingEquip = ttMoldingEquipService.getById(id);
if(ttMoldingEquip==null) {
return Result.error("未找到对应数据");
}
return Result.OK(ttMoldingEquip);
}
/**
* excel
*
* @param request
* @param ttMoldingEquip
*/
//@RequiresPermissions("ttmoldingequip:tt_molding_equip:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, TtMoldingEquip ttMoldingEquip) {
return super.exportXls(request, ttMoldingEquip, TtMoldingEquip.class, "模温机设备管理");
}
/**
* excel
*
* @param request
* @param response
* @return
*/
//@RequiresPermissions("ttmoldingequip:tt_molding_equip:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, TtMoldingEquip.class);
}
}

@ -1,4 +1,4 @@
package org.jeecg.modules.demo.ttmoldtemperatureequip.entity;
package org.jeecg.modules.demo.ttmoldingequip.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
@ -17,52 +17,66 @@ import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: tt_mold_temperature_equip
* @Description:
* @Author: jeecg-boot
* @Date: 2023-02-14
* @Date: 2023-04-17
* @Version: V1.0
*/
@Data
@TableName("tt_mold_temperature_equip")
@TableName("tt_molding_equip")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="tt_mold_temperature_equip对象", description="tt_mold_temperature_equip")
public class TtMoldTemperatureEquip implements Serializable {
@ApiModel(value="tt_molding_equip对象", description="模温机设备管理")
public class TtMoldingEquip implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@TableId(type = IdType.AUTO)
@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;
private java.lang.Integer id;
/**设备编号*/
@Excel(name = "设备编号", width = 15)
@ApiModelProperty(value = "设备编号")
private java.lang.String eqtNo;
/**设备Ip*/
@Excel(name = "设备Ip", width = 15)
@ApiModelProperty(value = "设备Ip")
private java.lang.String eqtIp;
/**温度*/
@Excel(name = "温度", width = 15)
@ApiModelProperty(value = "温度")
private BigDecimal moldTemperature;
private java.math.BigDecimal temperature;
/**记录的创建时间*/
@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")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "记录的创建时间")
private Date createTime;
private java.util.Date createTime;
/**记录的创建人默认admin*/
@ApiModelProperty(value = "记录的创建人默认admin")
private String createBy;
private java.lang.String createBy;
/**记录的修改时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "记录的修改时间")
private Date updateTime;
private java.util.Date updateTime;
/**记录的修改人,修改人员的登录账号*/
@ApiModelProperty(value = "记录的修改人,修改人员的登录账号")
private String updateBy;
private java.lang.String updateBy;
@ApiModelProperty(value = "设备状态")
@TableField(exist = false)
private Integer eqtStatus;
@ApiModelProperty(value = "设备近7天使用率")
@TableField(exist = false)
private BigDecimal utilizeRate;
@ApiModelProperty(value = "设备描述")
@TableField(exist = false)
private String descr;
@ApiModelProperty(value = "设备位置")
@TableField(exist = false)
private String location;
}

@ -0,0 +1,17 @@
package org.jeecg.modules.demo.ttmoldingequip.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.demo.ttmoldingequip.entity.TtMoldingEquip;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description:
* @Author: jeecg-boot
* @Date: 2023-04-17
* @Version: V1.0
*/
public interface TtMoldingEquipMapper extends BaseMapper<TtMoldingEquip> {
}

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.demo.ttmoldtemperatureequip.mapper.TtMoldTemperatureEquipMapper">
<mapper namespace="org.jeecg.modules.demo.ttmoldingequip.mapper.TtMoldingEquipMapper">
</mapper>

@ -0,0 +1,14 @@
package org.jeecg.modules.demo.ttmoldingequip.service;
import org.jeecg.modules.demo.ttmoldingequip.entity.TtMoldingEquip;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description:
* @Author: jeecg-boot
* @Date: 2023-04-17
* @Version: V1.0
*/
public interface ITtMoldingEquipService extends IService<TtMoldingEquip> {
}

@ -0,0 +1,19 @@
package org.jeecg.modules.demo.ttmoldingequip.service.impl;
import org.jeecg.modules.demo.ttmoldingequip.entity.TtMoldingEquip;
import org.jeecg.modules.demo.ttmoldingequip.mapper.TtMoldingEquipMapper;
import org.jeecg.modules.demo.ttmoldingequip.service.ITtMoldingEquipService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description:
* @Author: jeecg-boot
* @Date: 2023-04-17
* @Version: V1.0
*/
@Service
public class TtMoldingEquipServiceImpl extends ServiceImpl<TtMoldingEquipMapper, TtMoldingEquip> implements ITtMoldingEquipService {
}

@ -4,28 +4,6 @@
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="模温机设备编号只有1和2两种值">
<a-input placeholder="请输入模温机设备编号只有1和2两种值" v-model="queryParam.eqtNo"></a-input>
</a-form-item>
</a-col>
<a-col :xl="10" :lg="11" :md="12" :sm="24">
<a-form-item label="记录的创建时间">
<j-date placeholder="请选择开始日期" class="query-group-cust" v-model="queryParam.createTime_begin"></j-date>
<span class="query-group-split-cust"></span>
<j-date placeholder="请选择结束日期" class="query-group-cust" v-model="queryParam.createTime_end"></j-date>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search"></a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px"></a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '' : '' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</span>
</a-col>
</a-row>
</a-form>
</div>
@ -34,7 +12,7 @@
<!-- -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus"></a-button>
<a-button type="primary" icon="download" @click="handleExportXls('tt_mold_temperature_equip')"></a-button>
<a-button type="primary" icon="download" @click="handleExportXls('模温机设备管理')"></a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import"></a-button>
</a-upload>
@ -111,7 +89,7 @@
</a-table>
</div>
<tt-mold-temperature-equip-modal ref="modalForm" @ok="modalFormOk"></tt-mold-temperature-equip-modal>
<tt-molding-equip-modal ref="modalForm" @ok="modalFormOk"></tt-molding-equip-modal>
</a-card>
</template>
@ -120,17 +98,17 @@
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TtMoldTemperatureEquipModal from './modules/TtMoldTemperatureEquipModal'
import TtMoldingEquipModal from './modules/TtMoldingEquipModal'
export default {
name: 'TtMoldTemperatureEquipList',
name: 'TtMoldingEquipList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TtMoldTemperatureEquipModal
TtMoldingEquipModal
},
data () {
return {
description: 'tt_mold_temperature_equip',
description: '',
// 表头
columns: [
{
@ -144,14 +122,19 @@
}
},
{
title:'',
title:'',
align:"center",
dataIndex: 'moldTemperature'
dataIndex: 'eqtNo'
},
{
title:'12',
title:'Ip',
align:"center",
dataIndex: 'eqtNo'
dataIndex: 'eqtIp'
},
{
title:'',
align:"center",
dataIndex: 'temperature'
},
{
title:'',
@ -171,11 +154,11 @@
}
],
url: {
list: "/ttmoldtemperatureequip/ttMoldTemperatureEquip/list",
delete: "/ttmoldtemperatureequip/ttMoldTemperatureEquip/delete",
deleteBatch: "/ttmoldtemperatureequip/ttMoldTemperatureEquip/deleteBatch",
exportXlsUrl: "/ttmoldtemperatureequip/ttMoldTemperatureEquip/exportXls",
importExcelUrl: "ttmoldtemperatureequip/ttMoldTemperatureEquip/importExcel",
list: "/ttmoldingequip/ttMoldingEquip/list",
delete: "/ttmoldingequip/ttMoldingEquip/delete",
deleteBatch: "/ttmoldingequip/ttMoldingEquip/deleteBatch",
exportXlsUrl: "/ttmoldingequip/ttMoldingEquip/exportXls",
importExcelUrl: "ttmoldingequip/ttMoldingEquip/importExcel",
},
dictOptions:{},
@ -195,8 +178,9 @@
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'BigDecimal',value:'moldTemperature',text:'',dictCode:''})
fieldList.push({type:'string',value:'eqtNo',text:'12',dictCode:''})
fieldList.push({type:'string',value:'eqtNo',text:'',dictCode:''})
fieldList.push({type:'string',value:'eqtIp',text:'Ip',dictCode:''})
fieldList.push({type:'BigDecimal',value:'temperature',text:'',dictCode:''})
fieldList.push({type:'date',value:'createTime',text:''})
this.superFieldList = fieldList
}

@ -1,26 +1,26 @@
-- views/ttmoldtemperatureequip
-- views/ttmoldingequip
-- sqlcomponent
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
VALUES ('2023021404033310470', NULL, 'tt_mold_temperature_equip', '/ttmoldtemperatureequip/ttMoldTemperatureEquipList', 'ttmoldtemperatureequip/TtMoldTemperatureEquipList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-02-14 16:03:47', NULL, NULL, 0);
VALUES ('2023041703392350320', NULL, '', '/ttmoldingequip/ttMoldingEquipList', 'ttmoldingequip/TtMoldingEquipList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-04-17 15:39:32', NULL, NULL, 0);
-- sql
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021404033310471', '2023021404033310470', 'tt_mold_temperature_equip', NULL, NULL, 0, NULL, NULL, 2, 'ttmoldtemperatureequip:tt_mold_temperature_equip:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 16:03:47', NULL, NULL, 0, 0, '1', 0);
VALUES ('2023041703392350321', '2023041703392350320', '', NULL, NULL, 0, NULL, NULL, 2, 'ttmoldingequip:tt_molding_equip:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-04-17 15:39:32', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021404033310472', '2023021404033310470', 'tt_mold_temperature_equip', NULL, NULL, 0, NULL, NULL, 2, 'ttmoldtemperatureequip:tt_mold_temperature_equip:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 16:03:47', NULL, NULL, 0, 0, '1', 0);
VALUES ('2023041703392350322', '2023041703392350320', '', NULL, NULL, 0, NULL, NULL, 2, 'ttmoldingequip:tt_molding_equip:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-04-17 15:39:32', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021404033320473', '2023021404033310470', 'tt_mold_temperature_equip', NULL, NULL, 0, NULL, NULL, 2, 'ttmoldtemperatureequip:tt_mold_temperature_equip:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 16:03:47', NULL, NULL, 0, 0, '1', 0);
VALUES ('2023041703392350323', '2023041703392350320', '', NULL, NULL, 0, NULL, NULL, 2, 'ttmoldingequip:tt_molding_equip:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-04-17 15:39:32', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021404033320474', '2023021404033310470', 'tt_mold_temperature_equip', NULL, NULL, 0, NULL, NULL, 2, 'ttmoldtemperatureequip:tt_mold_temperature_equip:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 16:03:47', NULL, NULL, 0, 0, '1', 0);
VALUES ('2023041703392350324', '2023041703392350320', '', NULL, NULL, 0, NULL, NULL, 2, 'ttmoldingequip:tt_molding_equip:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-04-17 15:39:32', NULL, NULL, 0, 0, '1', 0);
-- excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021404033320475', '2023021404033310470', 'excel_tt_mold_temperature_equip', NULL, NULL, 0, NULL, NULL, 2, 'ttmoldtemperatureequip:tt_mold_temperature_equip:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 16:03:47', NULL, NULL, 0, 0, '1', 0);
VALUES ('2023041703392350325', '2023041703392350320', 'excel_', NULL, NULL, 0, NULL, NULL, 2, 'ttmoldingequip:tt_molding_equip:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-04-17 15:39:32', NULL, NULL, 0, 0, '1', 0);
-- excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021404033320476', '2023021404033310470', 'excel_tt_mold_temperature_equip', NULL, NULL, 0, NULL, NULL, 2, 'ttmoldtemperatureequip:tt_mold_temperature_equip:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-14 16:03:47', NULL, NULL, 0, 0, '1', 0);
VALUES ('2023041703392350326', '2023041703392350320', 'excel_', NULL, NULL, 0, NULL, NULL, 2, 'ttmoldingequip:tt_molding_equip:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-04-17 15:39:32', NULL, NULL, 0, 0, '1', 0);

@ -4,13 +4,23 @@
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="模温机设备编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="eqtNo">
<a-input v-model="model.eqtNo" disabled="true" ></a-input>
<a-form-model-item label="设备编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="eqtNo">
<a-input v-model="model.eqtNo" placeholder="请输入设备编号" ></a-input>
</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 label="设备Ip" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="eqtIp">
<a-input v-model="model.eqtIp" placeholder="请输入设备Ip" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="温度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="temperature">
<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="createTime">
<j-date placeholder="请选择记录的创建时间" v-model="model.createTime" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
@ -25,7 +35,7 @@
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TtMoldTemperatureEquipForm',
name: 'TtMoldingEquipForm',
components: {
},
props: {
@ -50,17 +60,20 @@
},
confirmLoading: false,
validatorRules: {
moldTemperature: [
eqtNo: [
{ required: true, message: '!'},
],
temperature: [
{ required: true, message: '!'},
],
// eqtNo: [
// { required: true, message: '请输入模温机设备编号只有1和2两种值!'},
// ],
createTime: [
{ required: true, message: '!'},
],
},
url: {
add: "/ttmoldtemperatureequip/ttMoldTemperatureEquip/add",
edit: "/ttmoldtemperatureequip/ttMoldTemperatureEquip/edit",
queryById: "/ttmoldtemperatureequip/ttMoldTemperatureEquip/queryById"
add: "/ttmoldingequip/ttMoldingEquip/add",
edit: "/ttmoldingequip/ttMoldingEquip/edit",
queryById: "/ttmoldingequip/ttMoldingEquip/queryById"
}
}
},
@ -107,7 +120,7 @@
that.confirmLoading = false;
})
}
})
},
}

@ -7,7 +7,7 @@
@close="close"
destroyOnClose
:visible="visible">
<tt-mold-temperature-equip-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-mold-temperature-equip-form>
<tt-molding-equip-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-molding-equip-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;"></a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;"></a-button>
@ -17,12 +17,12 @@
<script>
import TtMoldTemperatureEquipForm from './TtMoldTemperatureEquipForm'
import TtMoldingEquipForm from './TtMoldingEquipForm'
export default {
name: 'TtMoldTemperatureEquipModal',
name: 'TtMoldingEquipModal',
components: {
TtMoldTemperatureEquipForm
TtMoldingEquipForm
},
data () {
return {

@ -8,17 +8,17 @@
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<tt-mold-temperature-equip-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-mold-temperature-equip-form>
<tt-molding-equip-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-molding-equip-form>
</j-modal>
</template>
<script>
import TtMoldTemperatureEquipForm from './TtMoldTemperatureEquipForm'
import TtMoldingEquipForm from './TtMoldingEquipForm'
export default {
name: 'TtMoldTemperatureEquipModal',
name: 'TtMoldingEquipModal',
components: {
TtMoldTemperatureEquipForm
TtMoldingEquipForm
},
data () {
return {

@ -1,226 +0,0 @@
package org.jeecg.modules.demo.ttmoldtemperatureequip.controller;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
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.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
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;
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;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.apache.shiro.authz.annotation.RequiresPermissions;
/**
* @Description: tt_mold_temperature_equip
* @Author: jeecg-boot
* @Date: 2023-02-14
* @Version: V1.0
*/
@Api(tags = "tt_mold_temperature_equip")
@RestController
@RequestMapping("/ttmoldtemperatureequip/ttMoldTemperatureEquip")
@Slf4j
public class TtMoldTemperatureEquipController extends JeecgController<TtMoldTemperatureEquip, ITtMoldTemperatureEquipService> {
@Autowired
private ITtMoldTemperatureEquipService ttMoldTemperatureEquipService;
@Autowired
private ITtEqtBaseService ttEqtBaseService;
/**
*
*
* @param ttMoldTemperatureEquip
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "tt_mold_temperature_equip-分页列表查询")
@ApiOperation(value = "tt_mold_temperature_equip-分页列表查询", notes = "tt_mold_temperature_equip-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<TtMoldTemperatureEquip>> queryPageList(TtMoldTemperatureEquip ttMoldTemperatureEquip,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<TtMoldTemperatureEquip> queryWrapper = QueryGenerator.initQueryWrapper(ttMoldTemperatureEquip, req.getParameterMap());
Page<TtMoldTemperatureEquip> page = new Page<TtMoldTemperatureEquip>(pageNo, pageSize);
IPage<TtMoldTemperatureEquip> pageList = ttMoldTemperatureEquipService.page(page, queryWrapper);
List<TtMoldTemperatureEquip> list = pageList.getRecords();
if (list.size() > 0) {
for (TtMoldTemperatureEquip mold : list) {
QueryWrapper<TtEqtBase> eqtBase = new QueryWrapper<>();
eqtBase.eq("eqt_no", mold.getEqtNo());
eqtBase.eq("eqt_type", 7);
TtEqtBase ttEqtBase = ttEqtBaseService.getOne(eqtBase);
if (ttEqtBase != null) {
mold.setDescr(ttEqtBase.getDescr());
}
}
}
return Result.OK(pageList);
}
/**
*
*
* @param ttMoldTemperatureEquip
* @return
*/
@AutoLog(value = "tt_mold_temperature_equip-添加")
@ApiOperation(value = "tt_mold_temperature_equip-添加", notes = "tt_mold_temperature_equip-添加")
//@RequiresPermissions("ttmoldtemperatureequip:tt_mold_temperature_equip:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody TtMoldTemperatureEquip ttMoldTemperatureEquip) {
ttMoldTemperatureEquipService.save(ttMoldTemperatureEquip);
return Result.OK("添加成功!");
}
/**
*
*
* @param ttMoldTemperatureEquip
* @return
*/
@AutoLog(value = "tt_mold_temperature_equip-编辑")
@ApiOperation(value = "tt_mold_temperature_equip-编辑", notes = "tt_mold_temperature_equip-编辑")
//@RequiresPermissions("ttmoldtemperatureequip:tt_mold_temperature_equip:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
public Result<String> edit(@RequestBody TtMoldTemperatureEquip ttMoldTemperatureEquip) {
ttMoldTemperatureEquipService.updateById(ttMoldTemperatureEquip);
return Result.OK("编辑成功!");
}
/**
* id
*
* @param id
* @return
*/
@AutoLog(value = "tt_mold_temperature_equip-通过id删除")
@ApiOperation(value = "tt_mold_temperature_equip-通过id删除", notes = "tt_mold_temperature_equip-通过id删除")
//@RequiresPermissions("ttmoldtemperatureequip:tt_mold_temperature_equip:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
ttMoldTemperatureEquipService.removeById(id);
return Result.OK("删除成功!");
}
/**
*
*
* @param ids
* @return
*/
@AutoLog(value = "tt_mold_temperature_equip-批量删除")
@ApiOperation(value = "tt_mold_temperature_equip-批量删除", notes = "tt_mold_temperature_equip-批量删除")
//@RequiresPermissions("ttmoldtemperatureequip:tt_mold_temperature_equip:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
this.ttMoldTemperatureEquipService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* id
*
* @param id
* @return
*/
//@AutoLog(value = "tt_mold_temperature_equip-通过id查询")
@ApiOperation(value = "tt_mold_temperature_equip-通过id查询", notes = "tt_mold_temperature_equip-通过id查询")
@GetMapping(value = "/queryById")
public Result<TtMoldTemperatureEquip> queryById(@RequestParam(name = "id", required = true) String id) {
TtMoldTemperatureEquip ttMoldTemperatureEquip = ttMoldTemperatureEquipService.getById(id);
if (ttMoldTemperatureEquip == null) {
return Result.error("未找到对应数据");
}
return Result.OK(ttMoldTemperatureEquip);
}
/**
* excel
*
* @param request
* @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) {
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;
}
/**
* excel
*
* @param request
* @param response
* @return
*/
//@RequiresPermissions("ttmoldtemperatureequip:tt_mold_temperature_equip:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, TtMoldTemperatureEquip.class);
}
}

@ -1,17 +0,0 @@
package org.jeecg.modules.demo.ttmoldtemperatureequip.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.demo.ttmoldtemperatureequip.entity.TtMoldTemperatureEquip;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: tt_mold_temperature_equip
* @Author: jeecg-boot
* @Date: 2023-02-14
* @Version: V1.0
*/
public interface TtMoldTemperatureEquipMapper extends BaseMapper<TtMoldTemperatureEquip> {
}

@ -1,14 +0,0 @@
package org.jeecg.modules.demo.ttmoldtemperatureequip.service;
import org.jeecg.modules.demo.ttmoldtemperatureequip.entity.TtMoldTemperatureEquip;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: tt_mold_temperature_equip
* @Author: jeecg-boot
* @Date: 2023-02-14
* @Version: V1.0
*/
public interface ITtMoldTemperatureEquipService extends IService<TtMoldTemperatureEquip> {
}

@ -1,19 +0,0 @@
package org.jeecg.modules.demo.ttmoldtemperatureequip.service.impl;
import org.jeecg.modules.demo.ttmoldtemperatureequip.entity.TtMoldTemperatureEquip;
import org.jeecg.modules.demo.ttmoldtemperatureequip.mapper.TtMoldTemperatureEquipMapper;
import org.jeecg.modules.demo.ttmoldtemperatureequip.service.ITtMoldTemperatureEquipService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: tt_mold_temperature_equip
* @Author: jeecg-boot
* @Date: 2023-02-14
* @Version: V1.0
*/
@Service
public class TtMoldTemperatureEquipServiceImpl extends ServiceImpl<TtMoldTemperatureEquipMapper, TtMoldTemperatureEquip> implements ITtMoldTemperatureEquipService {
}

@ -31,7 +31,7 @@ public class TtPouringEquip implements Serializable {
private static final long serialVersionUID = 1L;
/**自增字段*/
@TableId(type = IdType.ASSIGN_ID)
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "自增字段")
private Integer id;
/**浇筑设备编号*/

Loading…
Cancel
Save