演示2.1-2.7

dev
landole 2 years ago
parent f6573bb833
commit ca404625ba

@ -0,0 +1,317 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :span="8">
<a-form-item
label="机台"
name="equipNo"
>
<a-input v-model:value="queryParam.equipNo" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="日期" name="startEndDate">
<a-range-picker
v-model="queryParam.startEndDate"
format="YYYY-MM-DD"
name="buildTime"
style="width: 100%"
@change="handleDate"
v-decorator="[
'buildTime',
{rules: [{ required: true, message: '请选择起止日期' }]}
]" />
</a-form-model-item>
</a-col>
<a-col :span="8">
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> -->
<a-button @click="searchQuery" type="primary" icon="search">查询</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('tt_inject_spot_data')"></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"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<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-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
<!-- <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="handleDetail(record)"></a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown> -->
</span>
</a-table>
</div>
<tt-inject-spot-data-modal ref="modalForm" @ok="modalFormOk"></tt-inject-spot-data-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TtInjectSpotDataModal from './modules/TtInjectSpotDataModal'
export default {
name: 'TtInjectSpotDataList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TtInjectSpotDataModal
},
data () {
return {
description: 'tt_inject_spot_data管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'日期',
align:"center",
dataIndex: 'dayName',
sorter: true,
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title:'机台',
align:"center",
sorter: true,
dataIndex: 'equipNo'
},
{
title:'定模设定值',
align:"center",
dataIndex: 'fixedMoldCfgTemp'
},
{
title:'定模实际值',
align:"center",
dataIndex: 'fixedMoldActTemp'
},
{
title:'动模设定值',
align:"center",
dataIndex: 'dynamicMoldCfgTemp'
},
{
title:'动模实际值',
align:"center",
dataIndex: 'dynamicMoldActTemp'
},
{
title:'液压油温度',
align:"center",
dataIndex: 'hydraulicOilTemp'
},
{
title:'干燥机滤芯',
align:"center",
dataIndex: 'dryer'
},
{
title:'机台润滑油量',
align:"center",
dataIndex: 'lubricateOil'
},
{
title:'清扫',
align:"center",
dataIndex: 'clean'
},
{
title:'是否漏油/水',
align:"center",
dataIndex: 'noLeakageOil'
},
{
title:'动作确认',
align:"center",
dataIndex: 'actConfirm'
},
{
title:'压力计',
align:"center",
dataIndex: 'pressureGauge'
},
{
title:'模具松紧',
align:"center",
dataIndex: 'moldTightness'
},
{
title:'材料干燥温度设定值',
align:"center",
dataIndex: 'materialDryCfgTemp'
},
{
title:'材料干燥温度实际值',
align:"center",
dataIndex: 'materialDryActTemp'
},
{
title:'担当',
align:"center",
dataIndex: 'operator'
},
{
title:'确认',
align:"center",
dataIndex: 'confirmUser'
},
{
title:'备注',
align:"center",
dataIndex: 'remark'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/injectspotdata/ttInjectSpotData/list",
delete: "/injectspotdata/ttInjectSpotData/delete",
deleteBatch: "/injectspotdata/ttInjectSpotData/deleteBatch",
exportXlsUrl: "/injectspotdata/ttInjectSpotData/exportXls",
importExcelUrl: "injectspotdata/ttInjectSpotData/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
//
handleDate: function (value, dateString) {
console.log(dateString[0],dateString[1]);
this.queryParam.startDayName=dateString[0];
this.queryParam.endDayName=dateString[1];
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'date',value:'dayName',text:'日期'})
fieldList.push({type:'string',value:'equipNo',text:'机台'})
fieldList.push({type:'string',value:'fixedMoldCfgTemp',text:'定模设定值'})
fieldList.push({type:'string',value:'fixedMoldActTemp',text:'定模实际值'})
fieldList.push({type:'string',value:'dynamicMoldCfgTemp',text:'动模设定值'})
fieldList.push({type:'string',value:'dynamicMoldActTemp',text:'动模实际值'})
fieldList.push({type:'string',value:'hydraulicOilTemp',text:'液压油温度'})
fieldList.push({type:'string',value:'dryer',text:'干燥机滤芯'})
fieldList.push({type:'string',value:'lubricateOil',text:'机台润滑油量'})
fieldList.push({type:'string',value:'clean',text:'清扫'})
fieldList.push({type:'string',value:'noLeakageOil',text:'是否漏油/水'})
fieldList.push({type:'string',value:'actConfirm',text:'动作确认'})
fieldList.push({type:'string',value:'pressureGauge',text:'压力计'})
fieldList.push({type:'string',value:'moldTightness',text:'模具松紧'})
fieldList.push({type:'string',value:'materialDryCfgTemp',text:'材料干燥温度设定值'})
fieldList.push({type:'string',value:'materialDryActTemp',text:'材料干燥温度实际值'})
fieldList.push({type:'string',value:'operator',text:'担当'})
fieldList.push({type:'string',value:'confirmUser',text:'确认'})
fieldList.push({type:'string',value:'remark',text:'备注'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,26 @@
-- 注意该页面对应的前台目录为views/injectspotdata文件夹下
-- 如果你想更改到其他目录请修改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 ('2023020511096670090', NULL, 'tt_inject_spot_data', '/injectspotdata/ttInjectSpotDataList', 'injectspotdata/TtInjectSpotDataList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-02-05 11:09:09', 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 ('2023020511096670091', '2023020511096670090', '添加tt_inject_spot_data', NULL, NULL, 0, NULL, NULL, 2, 'injectspotdata:tt_inject_spot_data:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 11:09:09', 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 ('2023020511096670092', '2023020511096670090', '编辑tt_inject_spot_data', NULL, NULL, 0, NULL, NULL, 2, 'injectspotdata:tt_inject_spot_data:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 11:09:09', 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 ('2023020511096670093', '2023020511096670090', '删除tt_inject_spot_data', NULL, NULL, 0, NULL, NULL, 2, 'injectspotdata:tt_inject_spot_data:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 11:09:09', 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 ('2023020511096670094', '2023020511096670090', '批量删除tt_inject_spot_data', NULL, NULL, 0, NULL, NULL, 2, 'injectspotdata:tt_inject_spot_data:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 11:09:09', 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 ('2023020511096680095', '2023020511096670090', '导出excel_tt_inject_spot_data', NULL, NULL, 0, NULL, NULL, 2, 'injectspotdata:tt_inject_spot_data:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 11:09:09', 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 ('2023020511096680096', '2023020511096670090', '导入excel_tt_inject_spot_data', NULL, NULL, 0, NULL, NULL, 2, 'injectspotdata:tt_inject_spot_data:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 11:09:09', NULL, NULL, 0, 0, '1', 0);

@ -0,0 +1,194 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<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="dayName">
<j-date placeholder="请选择日期" v-model="model.dayName" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="机台" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipNo">
<a-input v-model="model.equipNo" placeholder="请输入机台" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="定模设定值" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fixedMoldCfgTemp">
<a-input v-model="model.fixedMoldCfgTemp" placeholder="请输入定模设定值" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="定模实际值" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fixedMoldActTemp">
<a-input v-model="model.fixedMoldActTemp" placeholder="请输入定模实际值" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="动模设定值" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dynamicMoldCfgTemp">
<a-input v-model="model.dynamicMoldCfgTemp" placeholder="请输入动模设定值" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="动模实际值" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dynamicMoldActTemp">
<a-input v-model="model.dynamicMoldActTemp" placeholder="请输入动模实际值" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="液压油温度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hydraulicOilTemp">
<a-input v-model="model.hydraulicOilTemp" placeholder="请输入液压油温度" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="干燥机滤芯" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dryer">
<a-input v-model="model.dryer" placeholder="请输入干燥机滤芯" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="机台润滑油量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="lubricateOil">
<a-input v-model="model.lubricateOil" placeholder="请输入机台润滑油量" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="清扫" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clean">
<a-input v-model="model.clean" placeholder="请输入清扫" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="是否漏油/水" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="noLeakageOil">
<a-input v-model="model.noLeakageOil" placeholder="请输入是否漏油/水" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="动作确认" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="actConfirm">
<a-input v-model="model.actConfirm" placeholder="请输入动作确认" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="压力计" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pressureGauge">
<a-input v-model="model.pressureGauge" placeholder="请输入压力计" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="模具松紧" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="moldTightness">
<a-input v-model="model.moldTightness" placeholder="请输入模具松紧" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="材料干燥温度设定值" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialDryCfgTemp">
<a-input v-model="model.materialDryCfgTemp" placeholder="请输入材料干燥温度设定值" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="材料干燥温度实际值" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialDryActTemp">
<a-input v-model="model.materialDryActTemp" placeholder="请输入材料干燥温度实际值" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="担当" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operator">
<a-input v-model="model.operator" placeholder="请输入担当" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="确认" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="confirmUser">
<a-input v-model="model.confirmUser" placeholder="请输入确认" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
<a-input v-model="model.remark" placeholder="请输入备注" ></a-input>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TtInjectSpotDataForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/injectspotdata/ttInjectSpotData/add",
edit: "/injectspotdata/ttInjectSpotData/edit",
queryById: "/injectspotdata/ttInjectSpotData/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
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';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<tt-inject-spot-data-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-inject-spot-data-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>
</div>
</a-drawer>
</template>
<script>
import TtInjectSpotDataForm from './TtInjectSpotDataForm'
export default {
name: 'TtInjectSpotDataModal',
components: {
TtInjectSpotDataForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<tt-inject-spot-data-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-inject-spot-data-form>
</j-modal>
</template>
<script>
import TtInjectSpotDataForm from './TtInjectSpotDataForm'
export default {
name: 'TtInjectSpotDataModal',
components: {
TtInjectSpotDataForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

@ -0,0 +1,288 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :span="8">
<a-form-item
label="机台"
name="equipNo"
>
<a-input v-model:value="queryParam.equipNo" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-model-item label="日期" name="startEndDate">
<a-range-picker
v-model="queryParam.startEndDate"
format="YYYY-MM-DD"
name="buildTime"
style="width: 100%"
@change="handleDate"
v-decorator="[
'buildTime',
{rules: [{ required: true, message: '请选择起止日期' }]}
]" />
</a-form-model-item>
</a-col>
<a-col :span="8">
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> -->
<a-button @click="searchQuery" type="primary" icon="search">查询</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('tt_ipqc_ma_data')"></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"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<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-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
</a-table>
</div>
<tt-ipqc-ma-data-modal ref="modalForm" @ok="modalFormOk"></tt-ipqc-ma-data-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TtIpqcMaDataModal from './modules/TtIpqcMaDataModal'
export default {
name: 'TtIpqcMaDataList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TtIpqcMaDataModal
},
data () {
return {
description: 'tt_ipqc_ma_data管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'日期',
align:"center",
dataIndex: 'day_name',
sorter: true,
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title:'班次',
align:"center",
sorter: true,
dataIndex: 'shift_name'
},
{
title:'机台',
align:"center",
dataIndex: 'equip_no'
},
{
title:'操作工',
align:"center",
dataIndex: 'operator'
},
{
title:'规格',
align:"center",
dataIndex: 'spec'
},
{
title:'胶料型号',
align:"center",
dataIndex: 'glue_type'
},
{
title:'时间(单位:秒)',
align:"center",
dataIndex: 'sulf_time'
},
{
title:'最低温度(℃)',
align:"center",
dataIndex: 'sulf_temp1'
},
{
title:'最高温度(℃)',
align:"center",
dataIndex: 'sulf_temp2'
},
{
title:'压力(Mpa)',
align:"center",
dataIndex: 'sulf_pressure'
},
{
title:'厚度(mm)',
align:"center",
dataIndex: 'height'
},
{
title:'外径(mm)',
align:"center",
dataIndex: 'external_size'
},
{
title:'孔径(mm)',
align:"center",
dataIndex: 'aperture_size'
},
{
title:'硬度(A)',
align:"center",
dataIndex: 'hardness'
},
{
title:'外观检查结果',
align:"center",
dataIndex: 'desc1'
},
{
title:'质检确认结果',
align:"center",
dataIndex: 'desc2'
},
{
title:'IPQC人员',
align:"center",
dataIndex: 'ipqc_user'
},
{
title:'硫化主管',
align:"center",
dataIndex: 'sulf_user'
},
{
title:'品质主管',
align:"center",
dataIndex: 'qa_user'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/ipqcmadata/ttIpqcMaData/queryPageList",
delete: "/ipqcmadata/ttIpqcMaData/delete",
deleteBatch: "/ipqcmadata/ttIpqcMaData/deleteBatch",
exportXlsUrl: "/ipqcmadata/ttIpqcMaData/exportXls",
importExcelUrl: "ipqcmadata/ttIpqcMaData/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
//
handleDate: function (value, dateString) {
console.log(dateString[0],dateString[1]);
this.queryParam.startDayName=dateString[0];
this.queryParam.endDayName=dateString[1];
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'date',value:'dayName',text:'日期名称'})
fieldList.push({type:'string',value:'shiftName',text:'班次名称'})
fieldList.push({type:'string',value:'ipqcStandard',text:'参考标准'})
fieldList.push({type:'string',value:'ipqcUser',text:'ipqc用户'})
fieldList.push({type:'string',value:'sulfUser',text:'硫化主管'})
fieldList.push({type:'string',value:'qaUser',text:'品质主管'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,26 @@
-- 注意该页面对应的前台目录为views/ipqcmadata文件夹下
-- 如果你想更改到其他目录请修改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 ('2023020509154700580', NULL, 'tt_ipqc_ma_data', '/ipqcmadata/ttIpqcMaDataList', 'ipqcmadata/TtIpqcMaDataList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-02-05 09:15:58', 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 ('2023020509154700581', '2023020509154700580', '添加tt_ipqc_ma_data', NULL, NULL, 0, NULL, NULL, 2, 'ipqcmadata:tt_ipqc_ma_data:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:15:58', 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 ('2023020509154710582', '2023020509154700580', '编辑tt_ipqc_ma_data', NULL, NULL, 0, NULL, NULL, 2, 'ipqcmadata:tt_ipqc_ma_data:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:15:58', 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 ('2023020509154710583', '2023020509154700580', '删除tt_ipqc_ma_data', NULL, NULL, 0, NULL, NULL, 2, 'ipqcmadata:tt_ipqc_ma_data:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:15:58', 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 ('2023020509154710584', '2023020509154700580', '批量删除tt_ipqc_ma_data', NULL, NULL, 0, NULL, NULL, 2, 'ipqcmadata:tt_ipqc_ma_data:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:15:58', 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 ('2023020509154710585', '2023020509154700580', '导出excel_tt_ipqc_ma_data', NULL, NULL, 0, NULL, NULL, 2, 'ipqcmadata:tt_ipqc_ma_data:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:15:58', 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 ('2023020509154710586', '2023020509154700580', '导入excel_tt_ipqc_ma_data', NULL, NULL, 0, NULL, NULL, 2, 'ipqcmadata:tt_ipqc_ma_data:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:15:58', NULL, NULL, 0, 0, '1', 0);

@ -0,0 +1,138 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<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="dayName">
<j-date placeholder="请选择日期名称" v-model="model.dayName" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="班次名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shiftName">
<a-input v-model="model.shiftName" placeholder="请输入班次名称" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="参考标准" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ipqcStandard">
<a-input v-model="model.ipqcStandard" placeholder="请输入参考标准" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="ipqc用户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ipqcUser">
<a-input v-model="model.ipqcUser" placeholder="请输入ipqc用户" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="硫化主管" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sulfUser">
<a-input v-model="model.sulfUser" placeholder="请输入硫化主管" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="品质主管" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="qaUser">
<a-input v-model="model.qaUser" placeholder="请输入品质主管" ></a-input>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TtIpqcMaDataForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
dayName: [
{ required: true, message: '请输入日期名称!'},
],
shiftName: [
{ required: true, message: '请输入班次名称!'},
],
ipqcStandard: [
{ required: true, message: '请输入参考标准!'},
],
},
url: {
add: "/ipqcmadata/ttIpqcMaData/add",
edit: "/ipqcmadata/ttIpqcMaData/edit",
queryById: "/ipqcmadata/ttIpqcMaData/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
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';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<tt-ipqc-ma-data-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-ipqc-ma-data-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>
</div>
</a-drawer>
</template>
<script>
import TtIpqcMaDataForm from './TtIpqcMaDataForm'
export default {
name: 'TtIpqcMaDataModal',
components: {
TtIpqcMaDataForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<tt-ipqc-ma-data-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-ipqc-ma-data-form>
</j-modal>
</template>
<script>
import TtIpqcMaDataForm from './TtIpqcMaDataForm'
export default {
name: 'TtIpqcMaDataModal',
components: {
TtIpqcMaDataForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

@ -0,0 +1,184 @@
package org.jeecg.modules.demo.injectspotdata.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 org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.injectspotdata.entity.TtInjectSpotData;
import org.jeecg.modules.demo.injectspotdata.service.ITtInjectSpotDataService;
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.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_inject_spot_data
* @Author: jeecg-boot
* @Date: 2023-02-05
* @Version: V1.0
*/
@Api(tags="tt_inject_spot_data")
@RestController
@RequestMapping("/injectspotdata/ttInjectSpotData")
@Slf4j
public class TtInjectSpotDataController extends JeecgController<TtInjectSpotData, ITtInjectSpotDataService> {
@Autowired
private ITtInjectSpotDataService ttInjectSpotDataService;
/**
*
*
* @param ttInjectSpotData
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "tt_inject_spot_data-分页列表查询")
@ApiOperation(value="tt_inject_spot_data-分页列表查询", notes="tt_inject_spot_data-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<TtInjectSpotData>> queryPageList(TtInjectSpotData ttInjectSpotData,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<TtInjectSpotData> queryWrapper = QueryGenerator.initQueryWrapper(ttInjectSpotData, req.getParameterMap());
Page<TtInjectSpotData> page = new Page<TtInjectSpotData>(pageNo, pageSize);
if(ttInjectSpotData.getStartDayName() != null){
queryWrapper.gt("day_name", ttInjectSpotData.getStartDayName());
}
if(ttInjectSpotData.getEndDayName() != null){
queryWrapper.lt("day_name", ttInjectSpotData.getEndDayName());
}
IPage<TtInjectSpotData> pageList = ttInjectSpotDataService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
*
*
* @param ttInjectSpotData
* @return
*/
@AutoLog(value = "tt_inject_spot_data-添加")
@ApiOperation(value="tt_inject_spot_data-添加", notes="tt_inject_spot_data-添加")
//@RequiresPermissions("injectspotdata:tt_inject_spot_data:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody TtInjectSpotData ttInjectSpotData) {
ttInjectSpotDataService.save(ttInjectSpotData);
return Result.OK("添加成功!");
}
/**
*
*
* @param ttInjectSpotData
* @return
*/
@AutoLog(value = "tt_inject_spot_data-编辑")
@ApiOperation(value="tt_inject_spot_data-编辑", notes="tt_inject_spot_data-编辑")
//@RequiresPermissions("injectspotdata:tt_inject_spot_data:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody TtInjectSpotData ttInjectSpotData) {
ttInjectSpotDataService.updateById(ttInjectSpotData);
return Result.OK("编辑成功!");
}
/**
* id
*
* @param id
* @return
*/
@AutoLog(value = "tt_inject_spot_data-通过id删除")
@ApiOperation(value="tt_inject_spot_data-通过id删除", notes="tt_inject_spot_data-通过id删除")
//@RequiresPermissions("injectspotdata:tt_inject_spot_data:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
ttInjectSpotDataService.removeById(id);
return Result.OK("删除成功!");
}
/**
*
*
* @param ids
* @return
*/
@AutoLog(value = "tt_inject_spot_data-批量删除")
@ApiOperation(value="tt_inject_spot_data-批量删除", notes="tt_inject_spot_data-批量删除")
//@RequiresPermissions("injectspotdata:tt_inject_spot_data:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.ttInjectSpotDataService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* id
*
* @param id
* @return
*/
//@AutoLog(value = "tt_inject_spot_data-通过id查询")
@ApiOperation(value="tt_inject_spot_data-通过id查询", notes="tt_inject_spot_data-通过id查询")
@GetMapping(value = "/queryById")
public Result<TtInjectSpotData> queryById(@RequestParam(name="id",required=true) String id) {
TtInjectSpotData ttInjectSpotData = ttInjectSpotDataService.getById(id);
if(ttInjectSpotData==null) {
return Result.error("未找到对应数据");
}
return Result.OK(ttInjectSpotData);
}
/**
* excel
*
* @param request
* @param ttInjectSpotData
*/
//@RequiresPermissions("injectspotdata:tt_inject_spot_data:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, TtInjectSpotData ttInjectSpotData) {
return super.exportXls(request, ttInjectSpotData, TtInjectSpotData.class, "tt_inject_spot_data");
}
/**
* excel
*
* @param request
* @param response
* @return
*/
//@RequiresPermissions("injectspotdata:tt_inject_spot_data:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, TtInjectSpotData.class);
}
}

@ -0,0 +1,125 @@
package org.jeecg.modules.demo.injectspotdata.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: tt_inject_spot_data
* @Author: jeecg-boot
* @Date: 2023-02-05
* @Version: V1.0
*/
@Data
@TableName("tt_inject_spot_data")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="tt_inject_spot_data对象", description="tt_inject_spot_data")
public class TtInjectSpotData implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private Integer id;
/**日期*/
@Excel(name = "日期", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "日期")
private Date dayName;
/**机台*/
@Excel(name = "机台", width = 15)
@ApiModelProperty(value = "机台")
private String equipNo;
/**定模设定值*/
@Excel(name = "定模设定值", width = 15)
@ApiModelProperty(value = "定模设定值")
private String fixedMoldCfgTemp;
/**定模实际值*/
@Excel(name = "定模实际值", width = 15)
@ApiModelProperty(value = "定模实际值")
private String fixedMoldActTemp;
/**动模设定值*/
@Excel(name = "动模设定值", width = 15)
@ApiModelProperty(value = "动模设定值")
private String dynamicMoldCfgTemp;
/**动模实际值*/
@Excel(name = "动模实际值", width = 15)
@ApiModelProperty(value = "动模实际值")
private String dynamicMoldActTemp;
/**液压油温度*/
@Excel(name = "液压油温度", width = 15)
@ApiModelProperty(value = "液压油温度")
private String hydraulicOilTemp;
/**干燥机滤芯*/
@Excel(name = "干燥机滤芯", width = 15)
@ApiModelProperty(value = "干燥机滤芯")
private String dryer;
/**机台润滑油量*/
@Excel(name = "机台润滑油量", width = 15)
@ApiModelProperty(value = "机台润滑油量")
private String lubricateOil;
/**清扫*/
@Excel(name = "清扫", width = 15)
@ApiModelProperty(value = "清扫")
private String clean;
/**是否漏油/水*/
@Excel(name = "是否漏油/水", width = 15)
@ApiModelProperty(value = "是否漏油/水")
private String noLeakageOil;
/**动作确认*/
@Excel(name = "动作确认", width = 15)
@ApiModelProperty(value = "动作确认")
private String actConfirm;
/**压力计*/
@Excel(name = "压力计", width = 15)
@ApiModelProperty(value = "压力计")
private String pressureGauge;
/**模具松紧*/
@Excel(name = "模具松紧", width = 15)
@ApiModelProperty(value = "模具松紧")
private String moldTightness;
/**材料干燥温度设定值*/
@Excel(name = "材料干燥温度设定值", width = 15)
@ApiModelProperty(value = "材料干燥温度设定值")
private String materialDryCfgTemp;
/**材料干燥温度实际值*/
@Excel(name = "材料干燥温度实际值", width = 15)
@ApiModelProperty(value = "材料干燥温度实际值")
private String materialDryActTemp;
/**担当*/
@Excel(name = "担当", width = 15)
@ApiModelProperty(value = "担当")
private String operator;
/**确认*/
@Excel(name = "确认", width = 15)
@ApiModelProperty(value = "确认")
private String confirmUser;
/**备注*/
@Excel(name = "备注", width = 15)
@ApiModelProperty(value = "备注")
private String remark;
@TableField(exist = false)
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "开始日期")
private Date startDayName;
@TableField(exist = false)
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "结束日期")
private Date endDayName;
}

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

@ -0,0 +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.injectspotdata.mapper.TtInjectSpotDataMapper">
</mapper>

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

@ -0,0 +1,19 @@
package org.jeecg.modules.demo.injectspotdata.service.impl;
import org.jeecg.modules.demo.injectspotdata.entity.TtInjectSpotData;
import org.jeecg.modules.demo.injectspotdata.mapper.TtInjectSpotDataMapper;
import org.jeecg.modules.demo.injectspotdata.service.ITtInjectSpotDataService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: tt_inject_spot_data
* @Author: jeecg-boot
* @Date: 2023-02-05
* @Version: V1.0
*/
@Service
public class TtInjectSpotDataServiceImpl extends ServiceImpl<TtInjectSpotDataMapper, TtInjectSpotData> implements ITtInjectSpotDataService {
}

@ -0,0 +1,282 @@
<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('tt_inject_spot_data')"></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"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<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="handleDetail(record)"></a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a></a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<tt-inject-spot-data-modal ref="modalForm" @ok="modalFormOk"></tt-inject-spot-data-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TtInjectSpotDataModal from './modules/TtInjectSpotDataModal'
export default {
name: 'TtInjectSpotDataList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TtInjectSpotDataModal
},
data () {
return {
description: 'tt_inject_spot_data',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'',
align:"center",
dataIndex: 'dayName',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title:'',
align:"center",
dataIndex: 'equipNo'
},
{
title:'',
align:"center",
dataIndex: 'fixedMoldCfgTemp'
},
{
title:'',
align:"center",
dataIndex: 'fixedMoldActTemp'
},
{
title:'',
align:"center",
dataIndex: 'dynamicMoldCfgTemp'
},
{
title:'',
align:"center",
dataIndex: 'dynamicMoldActTemp'
},
{
title:'',
align:"center",
dataIndex: 'hydraulicOilTemp'
},
{
title:'',
align:"center",
dataIndex: 'dryer'
},
{
title:'',
align:"center",
dataIndex: 'lubricateOil'
},
{
title:'',
align:"center",
dataIndex: 'clean'
},
{
title:'/',
align:"center",
dataIndex: 'noLeakageOil'
},
{
title:'',
align:"center",
dataIndex: 'actConfirm'
},
{
title:'',
align:"center",
dataIndex: 'pressureGauge'
},
{
title:'',
align:"center",
dataIndex: 'moldTightness'
},
{
title:'',
align:"center",
dataIndex: 'materialDryCfgTemp'
},
{
title:'',
align:"center",
dataIndex: 'materialDryActTemp'
},
{
title:'',
align:"center",
dataIndex: 'operator'
},
{
title:'',
align:"center",
dataIndex: 'confirmUser'
},
{
title:'',
align:"center",
dataIndex: 'remark'
},
{
title: '',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/injectspotdata/ttInjectSpotData/list",
delete: "/injectspotdata/ttInjectSpotData/delete",
deleteBatch: "/injectspotdata/ttInjectSpotData/deleteBatch",
exportXlsUrl: "/injectspotdata/ttInjectSpotData/exportXls",
importExcelUrl: "injectspotdata/ttInjectSpotData/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'date',value:'dayName',text:''})
fieldList.push({type:'string',value:'equipNo',text:''})
fieldList.push({type:'string',value:'fixedMoldCfgTemp',text:''})
fieldList.push({type:'string',value:'fixedMoldActTemp',text:''})
fieldList.push({type:'string',value:'dynamicMoldCfgTemp',text:''})
fieldList.push({type:'string',value:'dynamicMoldActTemp',text:''})
fieldList.push({type:'string',value:'hydraulicOilTemp',text:''})
fieldList.push({type:'string',value:'dryer',text:''})
fieldList.push({type:'string',value:'lubricateOil',text:''})
fieldList.push({type:'string',value:'clean',text:''})
fieldList.push({type:'string',value:'noLeakageOil',text:'/'})
fieldList.push({type:'string',value:'actConfirm',text:''})
fieldList.push({type:'string',value:'pressureGauge',text:''})
fieldList.push({type:'string',value:'moldTightness',text:''})
fieldList.push({type:'string',value:'materialDryCfgTemp',text:''})
fieldList.push({type:'string',value:'materialDryActTemp',text:''})
fieldList.push({type:'string',value:'operator',text:''})
fieldList.push({type:'string',value:'confirmUser',text:''})
fieldList.push({type:'string',value:'remark',text:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,26 @@
-- views/injectspotdata
-- 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 ('2023020511096670090', NULL, 'tt_inject_spot_data', '/injectspotdata/ttInjectSpotDataList', 'injectspotdata/TtInjectSpotDataList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-02-05 11:09:09', 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 ('2023020511096670091', '2023020511096670090', 'tt_inject_spot_data', NULL, NULL, 0, NULL, NULL, 2, 'injectspotdata:tt_inject_spot_data:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 11:09:09', 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 ('2023020511096670092', '2023020511096670090', 'tt_inject_spot_data', NULL, NULL, 0, NULL, NULL, 2, 'injectspotdata:tt_inject_spot_data:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 11:09:09', 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 ('2023020511096670093', '2023020511096670090', 'tt_inject_spot_data', NULL, NULL, 0, NULL, NULL, 2, 'injectspotdata:tt_inject_spot_data:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 11:09:09', 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 ('2023020511096670094', '2023020511096670090', 'tt_inject_spot_data', NULL, NULL, 0, NULL, NULL, 2, 'injectspotdata:tt_inject_spot_data:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 11:09:09', 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 ('2023020511096680095', '2023020511096670090', 'excel_tt_inject_spot_data', NULL, NULL, 0, NULL, NULL, 2, 'injectspotdata:tt_inject_spot_data:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 11:09:09', 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 ('2023020511096680096', '2023020511096670090', 'excel_tt_inject_spot_data', NULL, NULL, 0, NULL, NULL, 2, 'injectspotdata:tt_inject_spot_data:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 11:09:09', NULL, NULL, 0, 0, '1', 0);

@ -0,0 +1,194 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<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="dayName">
<j-date placeholder="请选择日期" v-model="model.dayName" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="机台" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipNo">
<a-input v-model="model.equipNo" placeholder="请输入机台" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="定模设定值" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fixedMoldCfgTemp">
<a-input v-model="model.fixedMoldCfgTemp" placeholder="请输入定模设定值" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="定模实际值" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="fixedMoldActTemp">
<a-input v-model="model.fixedMoldActTemp" placeholder="请输入定模实际值" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="动模设定值" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dynamicMoldCfgTemp">
<a-input v-model="model.dynamicMoldCfgTemp" placeholder="请输入动模设定值" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="动模实际值" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dynamicMoldActTemp">
<a-input v-model="model.dynamicMoldActTemp" placeholder="请输入动模实际值" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="液压油温度" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hydraulicOilTemp">
<a-input v-model="model.hydraulicOilTemp" placeholder="请输入液压油温度" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="干燥机滤芯" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dryer">
<a-input v-model="model.dryer" placeholder="请输入干燥机滤芯" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="机台润滑油量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="lubricateOil">
<a-input v-model="model.lubricateOil" placeholder="请输入机台润滑油量" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="清扫" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clean">
<a-input v-model="model.clean" placeholder="请输入清扫" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="是否漏油/水" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="noLeakageOil">
<a-input v-model="model.noLeakageOil" placeholder="请输入是否漏油/水" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="动作确认" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="actConfirm">
<a-input v-model="model.actConfirm" placeholder="请输入动作确认" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="压力计" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pressureGauge">
<a-input v-model="model.pressureGauge" placeholder="请输入压力计" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="模具松紧" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="moldTightness">
<a-input v-model="model.moldTightness" placeholder="请输入模具松紧" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="材料干燥温度设定值" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialDryCfgTemp">
<a-input v-model="model.materialDryCfgTemp" placeholder="请输入材料干燥温度设定值" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="材料干燥温度实际值" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="materialDryActTemp">
<a-input v-model="model.materialDryActTemp" placeholder="请输入材料干燥温度实际值" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="担当" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operator">
<a-input v-model="model.operator" placeholder="请输入担当" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="确认" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="confirmUser">
<a-input v-model="model.confirmUser" placeholder="请输入确认" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
<a-input v-model="model.remark" placeholder="请输入备注" ></a-input>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TtInjectSpotDataForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/injectspotdata/ttInjectSpotData/add",
edit: "/injectspotdata/ttInjectSpotData/edit",
queryById: "/injectspotdata/ttInjectSpotData/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
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';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<tt-inject-spot-data-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-inject-spot-data-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>
</div>
</a-drawer>
</template>
<script>
import TtInjectSpotDataForm from './TtInjectSpotDataForm'
export default {
name: 'TtInjectSpotDataModal',
components: {
TtInjectSpotDataForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<tt-inject-spot-data-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-inject-spot-data-form>
</j-modal>
</template>
<script>
import TtInjectSpotDataForm from './TtInjectSpotDataForm'
export default {
name: 'TtInjectSpotDataModal',
components: {
TtInjectSpotDataForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

@ -0,0 +1,178 @@
package org.jeecg.modules.demo.ipqcdedata.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 org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.ipqcdedata.entity.TtIpqcDeData;
import org.jeecg.modules.demo.ipqcdedata.service.ITtIpqcDeDataService;
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.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_ipqc_de_data
* @Author: jeecg-boot
* @Date: 2023-02-05
* @Version: V1.0
*/
@Api(tags="tt_ipqc_de_data")
@RestController
@RequestMapping("/ipqcdedata/ttIpqcDeData")
@Slf4j
public class TtIpqcDeDataController extends JeecgController<TtIpqcDeData, ITtIpqcDeDataService> {
@Autowired
private ITtIpqcDeDataService ttIpqcDeDataService;
/**
*
*
* @param ttIpqcDeData
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "tt_ipqc_de_data-分页列表查询")
@ApiOperation(value="tt_ipqc_de_data-分页列表查询", notes="tt_ipqc_de_data-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<TtIpqcDeData>> queryPageList(TtIpqcDeData ttIpqcDeData,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<TtIpqcDeData> queryWrapper = QueryGenerator.initQueryWrapper(ttIpqcDeData, req.getParameterMap());
Page<TtIpqcDeData> page = new Page<TtIpqcDeData>(pageNo, pageSize);
IPage<TtIpqcDeData> pageList = ttIpqcDeDataService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
*
*
* @param ttIpqcDeData
* @return
*/
@AutoLog(value = "tt_ipqc_de_data-添加")
@ApiOperation(value="tt_ipqc_de_data-添加", notes="tt_ipqc_de_data-添加")
//@RequiresPermissions("ipqcdedata:tt_ipqc_de_data:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody TtIpqcDeData ttIpqcDeData) {
ttIpqcDeDataService.save(ttIpqcDeData);
return Result.OK("添加成功!");
}
/**
*
*
* @param ttIpqcDeData
* @return
*/
@AutoLog(value = "tt_ipqc_de_data-编辑")
@ApiOperation(value="tt_ipqc_de_data-编辑", notes="tt_ipqc_de_data-编辑")
//@RequiresPermissions("ipqcdedata:tt_ipqc_de_data:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody TtIpqcDeData ttIpqcDeData) {
ttIpqcDeDataService.updateById(ttIpqcDeData);
return Result.OK("编辑成功!");
}
/**
* id
*
* @param id
* @return
*/
@AutoLog(value = "tt_ipqc_de_data-通过id删除")
@ApiOperation(value="tt_ipqc_de_data-通过id删除", notes="tt_ipqc_de_data-通过id删除")
//@RequiresPermissions("ipqcdedata:tt_ipqc_de_data:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
ttIpqcDeDataService.removeById(id);
return Result.OK("删除成功!");
}
/**
*
*
* @param ids
* @return
*/
@AutoLog(value = "tt_ipqc_de_data-批量删除")
@ApiOperation(value="tt_ipqc_de_data-批量删除", notes="tt_ipqc_de_data-批量删除")
//@RequiresPermissions("ipqcdedata:tt_ipqc_de_data:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.ttIpqcDeDataService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* id
*
* @param id
* @return
*/
//@AutoLog(value = "tt_ipqc_de_data-通过id查询")
@ApiOperation(value="tt_ipqc_de_data-通过id查询", notes="tt_ipqc_de_data-通过id查询")
@GetMapping(value = "/queryById")
public Result<TtIpqcDeData> queryById(@RequestParam(name="id",required=true) String id) {
TtIpqcDeData ttIpqcDeData = ttIpqcDeDataService.getById(id);
if(ttIpqcDeData==null) {
return Result.error("未找到对应数据");
}
return Result.OK(ttIpqcDeData);
}
/**
* excel
*
* @param request
* @param ttIpqcDeData
*/
//@RequiresPermissions("ipqcdedata:tt_ipqc_de_data:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, TtIpqcDeData ttIpqcDeData) {
return super.exportXls(request, ttIpqcDeData, TtIpqcDeData.class, "tt_ipqc_de_data");
}
/**
* excel
*
* @param request
* @param response
* @return
*/
//@RequiresPermissions("ipqcdedata:tt_ipqc_de_data:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, TtIpqcDeData.class);
}
}

@ -0,0 +1,99 @@
package org.jeecg.modules.demo.ipqcdedata.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: tt_ipqc_de_data
* @Author: jeecg-boot
* @Date: 2023-02-05
* @Version: V1.0
*/
@Data
@TableName("tt_ipqc_de_data")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="tt_ipqc_de_data对象", description="tt_ipqc_de_data")
public class TtIpqcDeData implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private Integer id;
/**主表id对应tt_ipqc_ma_data中的id列*/
@Excel(name = "主表id对应tt_ipqc_ma_data中的id列", width = 15)
@ApiModelProperty(value = "主表id对应tt_ipqc_ma_data中的id列")
private Integer mId;
/**机台*/
@Excel(name = "机台", width = 15)
@ApiModelProperty(value = "机台")
private String equipNo;
/**操作工*/
@Excel(name = "操作工", width = 15)
@ApiModelProperty(value = "操作工")
private String operator;
/**规格*/
@Excel(name = "规格", width = 15)
@ApiModelProperty(value = "规格")
private String spec;
/**胶料型号*/
@Excel(name = "胶料型号", width = 15)
@ApiModelProperty(value = "胶料型号")
private String glueType;
/**时间(单位:秒)*/
@Excel(name = "时间(单位:秒)", width = 15)
@ApiModelProperty(value = "时间(单位:秒)")
private String sulfTime;
/**最低温度(℃)*/
@Excel(name = "最低温度(℃)", width = 15)
@ApiModelProperty(value = "最低温度(℃)")
private String sulfTemp1;
/**最高温度(℃)*/
@Excel(name = "最高温度(℃)", width = 15)
@ApiModelProperty(value = "最高温度(℃)")
private String sulfTemp2;
/**压力Mpa*/
@Excel(name = "压力Mpa", width = 15)
@ApiModelProperty(value = "压力Mpa")
private String sulfPressure;
/**厚度mm*/
@Excel(name = "厚度mm", width = 15)
@ApiModelProperty(value = "厚度mm")
private String height;
/**外径mm*/
@Excel(name = "外径mm", width = 15)
@ApiModelProperty(value = "外径mm")
private String externalSize;
/**孔径mm*/
@Excel(name = "孔径mm", width = 15)
@ApiModelProperty(value = "孔径mm")
private String apertureSize;
/**硬度A*/
@Excel(name = "硬度A", width = 15)
@ApiModelProperty(value = "硬度A")
private String hardness;
/**外观检查结果*/
@Excel(name = "外观检查结果", width = 15)
@ApiModelProperty(value = "外观检查结果")
private String desc1;
/**质检确认结果*/
@Excel(name = "质检确认结果", width = 15)
@ApiModelProperty(value = "质检确认结果")
private String desc2;
}

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

@ -0,0 +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.ipqcdedata.mapper.TtIpqcDeDataMapper">
</mapper>

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

@ -0,0 +1,19 @@
package org.jeecg.modules.demo.ipqcdedata.service.impl;
import org.jeecg.modules.demo.ipqcdedata.entity.TtIpqcDeData;
import org.jeecg.modules.demo.ipqcdedata.mapper.TtIpqcDeDataMapper;
import org.jeecg.modules.demo.ipqcdedata.service.ITtIpqcDeDataService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: tt_ipqc_de_data
* @Author: jeecg-boot
* @Date: 2023-02-05
* @Version: V1.0
*/
@Service
public class TtIpqcDeDataServiceImpl extends ServiceImpl<TtIpqcDeDataMapper, TtIpqcDeData> implements ITtIpqcDeDataService {
}

@ -0,0 +1,255 @@
<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('tt_ipqc_de_data')"></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"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<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="handleDetail(record)"></a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a></a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<tt-ipqc-de-data-modal ref="modalForm" @ok="modalFormOk"></tt-ipqc-de-data-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TtIpqcDeDataModal from './modules/TtIpqcDeDataModal'
export default {
name: 'TtIpqcDeDataList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TtIpqcDeDataModal
},
data () {
return {
description: 'tt_ipqc_de_data',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'idtt_ipqc_ma_dataid',
align:"center",
dataIndex: 'mId'
},
{
title:'',
align:"center",
dataIndex: 'equipNo'
},
{
title:'',
align:"center",
dataIndex: 'operator'
},
{
title:'',
align:"center",
dataIndex: 'spec'
},
{
title:'',
align:"center",
dataIndex: 'glueType'
},
{
title:'',
align:"center",
dataIndex: 'sulfTime'
},
{
title:'',
align:"center",
dataIndex: 'sulfTemp1'
},
{
title:'',
align:"center",
dataIndex: 'sulfTemp2'
},
{
title:'Mpa',
align:"center",
dataIndex: 'sulfPressure'
},
{
title:'mm',
align:"center",
dataIndex: 'height'
},
{
title:'mm',
align:"center",
dataIndex: 'externalSize'
},
{
title:'mm',
align:"center",
dataIndex: 'apertureSize'
},
{
title:'A',
align:"center",
dataIndex: 'hardness'
},
{
title:'',
align:"center",
dataIndex: 'desc1'
},
{
title:'',
align:"center",
dataIndex: 'desc2'
},
{
title: '',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/ipqcdedata/ttIpqcDeData/list",
delete: "/ipqcdedata/ttIpqcDeData/delete",
deleteBatch: "/ipqcdedata/ttIpqcDeData/deleteBatch",
exportXlsUrl: "/ipqcdedata/ttIpqcDeData/exportXls",
importExcelUrl: "ipqcdedata/ttIpqcDeData/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'int',value:'mId',text:'idtt_ipqc_ma_dataid'})
fieldList.push({type:'string',value:'equipNo',text:''})
fieldList.push({type:'string',value:'operator',text:''})
fieldList.push({type:'string',value:'spec',text:''})
fieldList.push({type:'string',value:'glueType',text:''})
fieldList.push({type:'string',value:'sulfTime',text:''})
fieldList.push({type:'string',value:'sulfTemp1',text:''})
fieldList.push({type:'string',value:'sulfTemp2',text:''})
fieldList.push({type:'string',value:'sulfPressure',text:'Mpa'})
fieldList.push({type:'string',value:'height',text:'mm'})
fieldList.push({type:'string',value:'externalSize',text:'mm'})
fieldList.push({type:'string',value:'apertureSize',text:'mm'})
fieldList.push({type:'string',value:'hardness',text:'A'})
fieldList.push({type:'string',value:'desc1',text:''})
fieldList.push({type:'string',value:'desc2',text:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,26 @@
-- views/ipqcdedata
-- 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 ('2023020509156360410', NULL, 'tt_ipqc_de_data', '/ipqcdedata/ttIpqcDeDataList', 'ipqcdedata/TtIpqcDeDataList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-02-05 09:15:41', 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 ('2023020509156360411', '2023020509156360410', 'tt_ipqc_de_data', NULL, NULL, 0, NULL, NULL, 2, 'ipqcdedata:tt_ipqc_de_data:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:15:41', 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 ('2023020509156360412', '2023020509156360410', 'tt_ipqc_de_data', NULL, NULL, 0, NULL, NULL, 2, 'ipqcdedata:tt_ipqc_de_data:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:15:41', 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 ('2023020509156360413', '2023020509156360410', 'tt_ipqc_de_data', NULL, NULL, 0, NULL, NULL, 2, 'ipqcdedata:tt_ipqc_de_data:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:15:41', 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 ('2023020509156360414', '2023020509156360410', 'tt_ipqc_de_data', NULL, NULL, 0, NULL, NULL, 2, 'ipqcdedata:tt_ipqc_de_data:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:15:41', 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 ('2023020509156360415', '2023020509156360410', 'excel_tt_ipqc_de_data', NULL, NULL, 0, NULL, NULL, 2, 'ipqcdedata:tt_ipqc_de_data:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:15:41', 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 ('2023020509156360416', '2023020509156360410', 'excel_tt_ipqc_de_data', NULL, NULL, 0, NULL, NULL, 2, 'ipqcdedata:tt_ipqc_de_data:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:15:41', NULL, NULL, 0, 0, '1', 0);

@ -0,0 +1,174 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="主表id对应tt_ipqc_ma_data中的id列" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="mId">
<a-input-number v-model="model.mId" placeholder="请输入主表id对应tt_ipqc_ma_data中的id列" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="机台" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipNo">
<a-input v-model="model.equipNo" placeholder="请输入机台" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="操作工" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operator">
<a-input v-model="model.operator" placeholder="请输入操作工" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="spec">
<a-input v-model="model.spec" placeholder="请输入规格" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="胶料型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="glueType">
<a-input v-model="model.glueType" placeholder="请输入胶料型号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="时间(单位:秒)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sulfTime">
<a-input v-model="model.sulfTime" placeholder="请输入时间(单位:秒)" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="最低温度(℃)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sulfTemp1">
<a-input v-model="model.sulfTemp1" placeholder="请输入最低温度(℃)" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="最高温度(℃)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sulfTemp2">
<a-input v-model="model.sulfTemp2" placeholder="请输入最高温度(℃)" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="压力Mpa" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sulfPressure">
<a-input v-model="model.sulfPressure" placeholder="请输入压力Mpa" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="厚度mm" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="height">
<a-input v-model="model.height" placeholder="请输入厚度mm" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="外径mm" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="externalSize">
<a-input v-model="model.externalSize" placeholder="请输入外径mm" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="孔径mm" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="apertureSize">
<a-input v-model="model.apertureSize" placeholder="请输入孔径mm" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="硬度A" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hardness">
<a-input v-model="model.hardness" placeholder="请输入硬度A" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="外观检查结果" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="desc1">
<a-input v-model="model.desc1" placeholder="请输入外观检查结果" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="质检确认结果" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="desc2">
<a-input v-model="model.desc2" placeholder="请输入质检确认结果" ></a-input>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TtIpqcDeDataForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/ipqcdedata/ttIpqcDeData/add",
edit: "/ipqcdedata/ttIpqcDeData/edit",
queryById: "/ipqcdedata/ttIpqcDeData/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
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';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<tt-ipqc-de-data-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-ipqc-de-data-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>
</div>
</a-drawer>
</template>
<script>
import TtIpqcDeDataForm from './TtIpqcDeDataForm'
export default {
name: 'TtIpqcDeDataModal',
components: {
TtIpqcDeDataForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<tt-ipqc-de-data-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-ipqc-de-data-form>
</j-modal>
</template>
<script>
import TtIpqcDeDataForm from './TtIpqcDeDataForm'
export default {
name: 'TtIpqcDeDataModal',
components: {
TtIpqcDeDataForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

@ -0,0 +1,199 @@
package org.jeecg.modules.demo.ipqcmadata.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 org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.ipqcmadata.entity.TtIpqcMaData;
import org.jeecg.modules.demo.ipqcmadata.service.ITtIpqcMaDataService;
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.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_ipqc_ma_data
* @Author: jeecg-boot
* @Date: 2023-02-05
* @Version: V1.0
*/
@Api(tags="tt_ipqc_ma_data")
@RestController
@RequestMapping("/ipqcmadata/ttIpqcMaData")
@Slf4j
public class TtIpqcMaDataController extends JeecgController<TtIpqcMaData, ITtIpqcMaDataService> {
@Autowired
private ITtIpqcMaDataService ttIpqcMaDataService;
/**
*
*
* @param ttIpqcMaData
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "tt_ipqc_ma_data-分页列表查询")
@ApiOperation(value="tt_ipqc_ma_data-分页列表查询", notes="tt_ipqc_ma_data-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<TtIpqcMaData>> queryPageList(TtIpqcMaData ttIpqcMaData,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<TtIpqcMaData> queryWrapper = QueryGenerator.initQueryWrapper(ttIpqcMaData, req.getParameterMap());
Page<TtIpqcMaData> page = new Page<TtIpqcMaData>(pageNo, pageSize);
IPage<TtIpqcMaData> pageList = ttIpqcMaDataService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
*
*
* @param ttIpqcMaData
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "tt_ipqc_ma_data-分页列表查询")
@ApiOperation(value="tt_ipqc_ma_data-分页列表查询", notes="tt_ipqc_ma_data-分页列表查询")
@GetMapping(value = "/queryPageList")
public Result<IPage<List<Map>>> queryPageList2(TtIpqcMaData ttIpqcMaData,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
Page<TtIpqcMaData> page = new Page<TtIpqcMaData>(pageNo, pageSize);
IPage<List<Map>> pageList = ttIpqcMaDataService.queryPage(page, ttIpqcMaData);
return Result.OK(pageList);
}
/**
*
*
* @param ttIpqcMaData
* @return
*/
@AutoLog(value = "tt_ipqc_ma_data-添加")
@ApiOperation(value="tt_ipqc_ma_data-添加", notes="tt_ipqc_ma_data-添加")
//@RequiresPermissions("ipqcmadata:tt_ipqc_ma_data:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody TtIpqcMaData ttIpqcMaData) {
ttIpqcMaDataService.save(ttIpqcMaData);
return Result.OK("添加成功!");
}
/**
*
*
* @param ttIpqcMaData
* @return
*/
@AutoLog(value = "tt_ipqc_ma_data-编辑")
@ApiOperation(value="tt_ipqc_ma_data-编辑", notes="tt_ipqc_ma_data-编辑")
//@RequiresPermissions("ipqcmadata:tt_ipqc_ma_data:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody TtIpqcMaData ttIpqcMaData) {
ttIpqcMaDataService.updateById(ttIpqcMaData);
return Result.OK("编辑成功!");
}
/**
* id
*
* @param id
* @return
*/
@AutoLog(value = "tt_ipqc_ma_data-通过id删除")
@ApiOperation(value="tt_ipqc_ma_data-通过id删除", notes="tt_ipqc_ma_data-通过id删除")
//@RequiresPermissions("ipqcmadata:tt_ipqc_ma_data:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
ttIpqcMaDataService.removeById(id);
return Result.OK("删除成功!");
}
/**
*
*
* @param ids
* @return
*/
@AutoLog(value = "tt_ipqc_ma_data-批量删除")
@ApiOperation(value="tt_ipqc_ma_data-批量删除", notes="tt_ipqc_ma_data-批量删除")
//@RequiresPermissions("ipqcmadata:tt_ipqc_ma_data:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.ttIpqcMaDataService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* id
*
* @param id
* @return
*/
//@AutoLog(value = "tt_ipqc_ma_data-通过id查询")
@ApiOperation(value="tt_ipqc_ma_data-通过id查询", notes="tt_ipqc_ma_data-通过id查询")
@GetMapping(value = "/queryById")
public Result<TtIpqcMaData> queryById(@RequestParam(name="id",required=true) String id) {
TtIpqcMaData ttIpqcMaData = ttIpqcMaDataService.getById(id);
if(ttIpqcMaData==null) {
return Result.error("未找到对应数据");
}
return Result.OK(ttIpqcMaData);
}
/**
* excel
*
* @param request
* @param ttIpqcMaData
*/
//@RequiresPermissions("ipqcmadata:tt_ipqc_ma_data:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, TtIpqcMaData ttIpqcMaData) {
return super.exportXls(request, ttIpqcMaData, TtIpqcMaData.class, "tt_ipqc_ma_data");
}
/**
* excel
*
* @param request
* @param response
* @return
*/
//@RequiresPermissions("ipqcmadata:tt_ipqc_ma_data:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, TtIpqcMaData.class);
}
}

@ -0,0 +1,77 @@
package org.jeecg.modules.demo.ipqcmadata.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: tt_ipqc_ma_data
* @Author: jeecg-boot
* @Date: 2023-02-05
* @Version: V1.0
*/
@Data
@TableName("tt_ipqc_ma_data")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="tt_ipqc_ma_data对象", description="tt_ipqc_ma_data")
public class TtIpqcMaData implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private Integer id;
/**日期名称*/
@Excel(name = "日期名称", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "日期名称")
private Date dayName;
/**班次名称*/
@Excel(name = "班次名称", width = 15)
@ApiModelProperty(value = "班次名称")
private String shiftName;
/**参考标准*/
@Excel(name = "参考标准", width = 15)
@ApiModelProperty(value = "参考标准")
private String ipqcStandard;
/**ipqc用户*/
@Excel(name = "ipqc用户", width = 15)
@ApiModelProperty(value = "ipqc用户")
private String ipqcUser;
/**硫化主管*/
@Excel(name = "硫化主管", width = 15)
@ApiModelProperty(value = "硫化主管")
private String sulfUser;
/**品质主管*/
@Excel(name = "品质主管", width = 15)
@ApiModelProperty(value = "品质主管")
private String qaUser;
@TableField(exist = false)
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "开始日期")
private Date startDayName;
@TableField(exist = false)
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "结束日期")
private Date endDayName;
@TableField(exist = false)
@ApiModelProperty(value = "机台")
private String equipNo;
}

@ -0,0 +1,21 @@
package org.jeecg.modules.demo.ipqcmadata.mapper;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.demo.ipqcmadata.entity.TtIpqcMaData;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: tt_ipqc_ma_data
* @Author: jeecg-boot
* @Date: 2023-02-05
* @Version: V1.0
*/
public interface TtIpqcMaDataMapper extends BaseMapper<TtIpqcMaData> {
IPage<List<Map>> queryPage(Page<TtIpqcMaData> page, TtIpqcMaData ttIpqcMaData);
}

@ -0,0 +1,21 @@
<?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.ipqcmadata.mapper.TtIpqcMaDataMapper">
<!-- 列表查询 -->
<select id="queryPage" resultType="java.util.Map">
select a.*,b.* from tt_ipqc_ma_data a, tt_ipqc_de_data b
where a.id=b.m_id
<if test="ttIpqcMaData.startDayName != null">
AND a.dayName <![CDATA[ <= ]]> #{ttIpqcMaData.startDayName}
</if>
<if test="ttIpqcMaData.endDayName != null">
AND a.dayName <![CDATA[ < ]]> #{ttIpqcMaData.endDayName}
</if>
<if test="ttIpqcMaData.equipNo != null and ttIpqcMaData.equipNo != ''">
AND b.equip_no = #{ttIpqcMaData.equipNo}
</if>
order by a.day_name,a.shift_name
</select>
</mapper>

@ -0,0 +1,20 @@
package org.jeecg.modules.demo.ipqcmadata.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.demo.ipqcmadata.entity.TtIpqcMaData;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
import java.util.Map;
/**
* @Description: tt_ipqc_ma_data
* @Author: jeecg-boot
* @Date: 2023-02-05
* @Version: V1.0
*/
public interface ITtIpqcMaDataService extends IService<TtIpqcMaData> {
IPage<List<Map>> queryPage(Page<TtIpqcMaData> page, TtIpqcMaData ttIpqcMaData);
}

@ -0,0 +1,31 @@
package org.jeecg.modules.demo.ipqcmadata.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.demo.ipqcmadata.entity.TtIpqcMaData;
import org.jeecg.modules.demo.ipqcmadata.mapper.TtIpqcMaDataMapper;
import org.jeecg.modules.demo.ipqcmadata.service.ITtIpqcMaDataService;
import org.jeecg.modules.demo.kanbanpsrate.mapper.TtKanbanPsRateMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
import java.util.Map;
/**
* @Description: tt_ipqc_ma_data
* @Author: jeecg-boot
* @Date: 2023-02-05
* @Version: V1.0
*/
@Service
public class TtIpqcMaDataServiceImpl extends ServiceImpl<TtIpqcMaDataMapper, TtIpqcMaData> implements ITtIpqcMaDataService {
@Autowired
private TtIpqcMaDataMapper ttIpqcMaDataMapper;
@Override
public IPage<List<Map>> queryPage(Page<TtIpqcMaData> page, TtIpqcMaData ttIpqcMaData) {
return ttIpqcMaDataMapper.queryPage(page, ttIpqcMaData);
}
}

@ -0,0 +1,204 @@
<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('tt_ipqc_ma_data')"></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"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<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="handleDetail(record)"></a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a></a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<tt-ipqc-ma-data-modal ref="modalForm" @ok="modalFormOk"></tt-ipqc-ma-data-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TtIpqcMaDataModal from './modules/TtIpqcMaDataModal'
export default {
name: 'TtIpqcMaDataList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TtIpqcMaDataModal
},
data () {
return {
description: 'tt_ipqc_ma_data',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'',
align:"center",
dataIndex: 'dayName',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title:'',
align:"center",
dataIndex: 'shiftName'
},
{
title:'',
align:"center",
dataIndex: 'ipqcStandard'
},
{
title:'ipqc',
align:"center",
dataIndex: 'ipqcUser'
},
{
title:'',
align:"center",
dataIndex: 'sulfUser'
},
{
title:'',
align:"center",
dataIndex: 'qaUser'
},
{
title: '',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/ipqcmadata/ttIpqcMaData/list",
delete: "/ipqcmadata/ttIpqcMaData/delete",
deleteBatch: "/ipqcmadata/ttIpqcMaData/deleteBatch",
exportXlsUrl: "/ipqcmadata/ttIpqcMaData/exportXls",
importExcelUrl: "ipqcmadata/ttIpqcMaData/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'date',value:'dayName',text:''})
fieldList.push({type:'string',value:'shiftName',text:''})
fieldList.push({type:'string',value:'ipqcStandard',text:''})
fieldList.push({type:'string',value:'ipqcUser',text:'ipqc'})
fieldList.push({type:'string',value:'sulfUser',text:''})
fieldList.push({type:'string',value:'qaUser',text:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,26 @@
-- views/ipqcmadata
-- 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 ('2023020509154700580', NULL, 'tt_ipqc_ma_data', '/ipqcmadata/ttIpqcMaDataList', 'ipqcmadata/TtIpqcMaDataList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-02-05 09:15:58', 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 ('2023020509154700581', '2023020509154700580', 'tt_ipqc_ma_data', NULL, NULL, 0, NULL, NULL, 2, 'ipqcmadata:tt_ipqc_ma_data:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:15:58', 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 ('2023020509154710582', '2023020509154700580', 'tt_ipqc_ma_data', NULL, NULL, 0, NULL, NULL, 2, 'ipqcmadata:tt_ipqc_ma_data:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:15:58', 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 ('2023020509154710583', '2023020509154700580', 'tt_ipqc_ma_data', NULL, NULL, 0, NULL, NULL, 2, 'ipqcmadata:tt_ipqc_ma_data:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:15:58', 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 ('2023020509154710584', '2023020509154700580', 'tt_ipqc_ma_data', NULL, NULL, 0, NULL, NULL, 2, 'ipqcmadata:tt_ipqc_ma_data:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:15:58', 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 ('2023020509154710585', '2023020509154700580', 'excel_tt_ipqc_ma_data', NULL, NULL, 0, NULL, NULL, 2, 'ipqcmadata:tt_ipqc_ma_data:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:15:58', 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 ('2023020509154710586', '2023020509154700580', 'excel_tt_ipqc_ma_data', NULL, NULL, 0, NULL, NULL, 2, 'ipqcmadata:tt_ipqc_ma_data:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:15:58', NULL, NULL, 0, 0, '1', 0);

@ -0,0 +1,138 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<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="dayName">
<j-date placeholder="请选择日期名称" v-model="model.dayName" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="班次名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shiftName">
<a-input v-model="model.shiftName" placeholder="请输入班次名称" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="参考标准" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ipqcStandard">
<a-input v-model="model.ipqcStandard" placeholder="请输入参考标准" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="ipqc用户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ipqcUser">
<a-input v-model="model.ipqcUser" placeholder="请输入ipqc用户" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="硫化主管" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sulfUser">
<a-input v-model="model.sulfUser" placeholder="请输入硫化主管" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="品质主管" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="qaUser">
<a-input v-model="model.qaUser" placeholder="请输入品质主管" ></a-input>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TtIpqcMaDataForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
dayName: [
{ required: true, message: '!'},
],
shiftName: [
{ required: true, message: '!'},
],
ipqcStandard: [
{ required: true, message: '!'},
],
},
url: {
add: "/ipqcmadata/ttIpqcMaData/add",
edit: "/ipqcmadata/ttIpqcMaData/edit",
queryById: "/ipqcmadata/ttIpqcMaData/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
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';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<tt-ipqc-ma-data-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-ipqc-ma-data-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>
</div>
</a-drawer>
</template>
<script>
import TtIpqcMaDataForm from './TtIpqcMaDataForm'
export default {
name: 'TtIpqcMaDataModal',
components: {
TtIpqcMaDataForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<tt-ipqc-ma-data-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-ipqc-ma-data-form>
</j-modal>
</template>
<script>
import TtIpqcMaDataForm from './TtIpqcMaDataForm'
export default {
name: 'TtIpqcMaDataModal',
components: {
TtIpqcMaDataForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

@ -0,0 +1,195 @@
package org.jeecg.modules.demo.kanbanequiprate.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 org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.kanbanequiprate.entity.TtKanbanEquipRate;
import org.jeecg.modules.demo.kanbanequiprate.service.ITtKanbanEquipRateService;
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.kanbanpassrate.entity.TtKanbanPassRate;
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_kanban_equip_rate
* @Author: jeecg-boot
* @Date: 2023-02-05
* @Version: V1.0
*/
@Api(tags="tt_kanban_equip_rate")
@RestController
@RequestMapping("/kanbanequiprate/ttKanbanEquipRate")
@Slf4j
public class TtKanbanEquipRateController extends JeecgController<TtKanbanEquipRate, ITtKanbanEquipRateService> {
@Autowired
private ITtKanbanEquipRateService ttKanbanEquipRateService;
/**
*
*
* @param ttKanbanEquipRate
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "tt_kanban_equip_rate-分页列表查询")
@ApiOperation(value="tt_kanban_equip_rate-分页列表查询", notes="tt_kanban_equip_rate-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<TtKanbanEquipRate>> queryPageList(TtKanbanEquipRate ttKanbanEquipRate,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<TtKanbanEquipRate> queryWrapper = QueryGenerator.initQueryWrapper(ttKanbanEquipRate, req.getParameterMap());
Page<TtKanbanEquipRate> page = new Page<TtKanbanEquipRate>(pageNo, pageSize);
IPage<TtKanbanEquipRate> pageList = ttKanbanEquipRateService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 6
*
* @param ttKanbanEquipRate
* @return
*/
//@AutoLog(value = "tt_kanban_equip_rate-分页列表查询")
@ApiOperation(value="tt_kanban_equip_rate-看板6列表查询", notes="tt_kanban_equip_rate-看板6列表查询")
@GetMapping(value = "/queryList")
public Result<List<TtKanbanEquipRate>> queryList(TtKanbanEquipRate ttKanbanEquipRate) {
QueryWrapper<TtKanbanEquipRate> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("company_id", 1);
List<TtKanbanEquipRate> kanbanEquipRateList = ttKanbanEquipRateService.list(queryWrapper);
return Result.OK(kanbanEquipRateList);
}
/**
*
*
* @param ttKanbanEquipRate
* @return
*/
@AutoLog(value = "tt_kanban_equip_rate-添加")
@ApiOperation(value="tt_kanban_equip_rate-添加", notes="tt_kanban_equip_rate-添加")
//@RequiresPermissions("kanbanequiprate:tt_kanban_equip_rate:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody TtKanbanEquipRate ttKanbanEquipRate) {
ttKanbanEquipRateService.save(ttKanbanEquipRate);
return Result.OK("添加成功!");
}
/**
*
*
* @param ttKanbanEquipRate
* @return
*/
@AutoLog(value = "tt_kanban_equip_rate-编辑")
@ApiOperation(value="tt_kanban_equip_rate-编辑", notes="tt_kanban_equip_rate-编辑")
//@RequiresPermissions("kanbanequiprate:tt_kanban_equip_rate:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody TtKanbanEquipRate ttKanbanEquipRate) {
ttKanbanEquipRateService.updateById(ttKanbanEquipRate);
return Result.OK("编辑成功!");
}
/**
* id
*
* @param id
* @return
*/
@AutoLog(value = "tt_kanban_equip_rate-通过id删除")
@ApiOperation(value="tt_kanban_equip_rate-通过id删除", notes="tt_kanban_equip_rate-通过id删除")
//@RequiresPermissions("kanbanequiprate:tt_kanban_equip_rate:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
ttKanbanEquipRateService.removeById(id);
return Result.OK("删除成功!");
}
/**
*
*
* @param ids
* @return
*/
@AutoLog(value = "tt_kanban_equip_rate-批量删除")
@ApiOperation(value="tt_kanban_equip_rate-批量删除", notes="tt_kanban_equip_rate-批量删除")
//@RequiresPermissions("kanbanequiprate:tt_kanban_equip_rate:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.ttKanbanEquipRateService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* id
*
* @param id
* @return
*/
//@AutoLog(value = "tt_kanban_equip_rate-通过id查询")
@ApiOperation(value="tt_kanban_equip_rate-通过id查询", notes="tt_kanban_equip_rate-通过id查询")
@GetMapping(value = "/queryById")
public Result<TtKanbanEquipRate> queryById(@RequestParam(name="id",required=true) String id) {
TtKanbanEquipRate ttKanbanEquipRate = ttKanbanEquipRateService.getById(id);
if(ttKanbanEquipRate==null) {
return Result.error("未找到对应数据");
}
return Result.OK(ttKanbanEquipRate);
}
/**
* excel
*
* @param request
* @param ttKanbanEquipRate
*/
//@RequiresPermissions("kanbanequiprate:tt_kanban_equip_rate:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, TtKanbanEquipRate ttKanbanEquipRate) {
return super.exportXls(request, ttKanbanEquipRate, TtKanbanEquipRate.class, "tt_kanban_equip_rate");
}
/**
* excel
*
* @param request
* @param response
* @return
*/
//@RequiresPermissions("kanbanequiprate:tt_kanban_equip_rate:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, TtKanbanEquipRate.class);
}
}

@ -0,0 +1,55 @@
package org.jeecg.modules.demo.kanbanequiprate.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: tt_kanban_equip_rate
* @Author: jeecg-boot
* @Date: 2023-02-05
* @Version: V1.0
*/
@Data
@TableName("tt_kanban_equip_rate")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="tt_kanban_equip_rate对象", description="tt_kanban_equip_rate")
public class TtKanbanEquipRate implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private Integer id;
/**月份名称*/
@Excel(name = "月份名称", width = 15)
@ApiModelProperty(value = "月份名称")
private String monthName;
/**设备名称*/
@Excel(name = "设备名称", width = 15)
@ApiModelProperty(value = "设备名称")
private String equipName;
/**设备利用率*/
@Excel(name = "设备利用率", width = 15)
@ApiModelProperty(value = "设备利用率")
private BigDecimal utiliRate;
/**公司id, 1表示电气元器件2表示轨道扣件*/
@Excel(name = "公司id, 1表示电气元器件2表示轨道扣件", width = 15)
@ApiModelProperty(value = "公司id, 1表示电气元器件2表示轨道扣件")
private Integer companyId;
}

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

@ -0,0 +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.kanbanequiprate.mapper.TtKanbanEquipRateMapper">
</mapper>

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

@ -0,0 +1,19 @@
package org.jeecg.modules.demo.kanbanequiprate.service.impl;
import org.jeecg.modules.demo.kanbanequiprate.entity.TtKanbanEquipRate;
import org.jeecg.modules.demo.kanbanequiprate.mapper.TtKanbanEquipRateMapper;
import org.jeecg.modules.demo.kanbanequiprate.service.ITtKanbanEquipRateService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: tt_kanban_equip_rate
* @Author: jeecg-boot
* @Date: 2023-02-05
* @Version: V1.0
*/
@Service
public class TtKanbanEquipRateServiceImpl extends ServiceImpl<TtKanbanEquipRateMapper, TtKanbanEquipRate> implements ITtKanbanEquipRateService {
}

@ -0,0 +1,189 @@
<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('tt_kanban_equip_rate')"></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"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<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="handleDetail(record)"></a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a></a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<tt-kanban-equip-rate-modal ref="modalForm" @ok="modalFormOk"></tt-kanban-equip-rate-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TtKanbanEquipRateModal from './modules/TtKanbanEquipRateModal'
export default {
name: 'TtKanbanEquipRateList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TtKanbanEquipRateModal
},
data () {
return {
description: 'tt_kanban_equip_rate',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'',
align:"center",
dataIndex: 'monthName'
},
{
title:'',
align:"center",
dataIndex: 'equipName'
},
{
title:'',
align:"center",
dataIndex: 'utiliRate'
},
{
title:'id, 12',
align:"center",
dataIndex: 'companyId'
},
{
title: '',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/kanbanequiprate/ttKanbanEquipRate/list",
delete: "/kanbanequiprate/ttKanbanEquipRate/delete",
deleteBatch: "/kanbanequiprate/ttKanbanEquipRate/deleteBatch",
exportXlsUrl: "/kanbanequiprate/ttKanbanEquipRate/exportXls",
importExcelUrl: "kanbanequiprate/ttKanbanEquipRate/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'monthName',text:''})
fieldList.push({type:'string',value:'equipName',text:''})
fieldList.push({type:'number',value:'utiliRate',text:''})
fieldList.push({type:'int',value:'companyId',text:'id, 12'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,26 @@
-- views/kanbanequiprate
-- 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 ('2023020509133980400', NULL, 'tt_kanban_equip_rate', '/kanbanequiprate/ttKanbanEquipRateList', 'kanbanequiprate/TtKanbanEquipRateList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-02-05 09:13:40', 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 ('2023020509133980401', '2023020509133980400', 'tt_kanban_equip_rate', NULL, NULL, 0, NULL, NULL, 2, 'kanbanequiprate:tt_kanban_equip_rate:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:13:40', 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 ('2023020509133980402', '2023020509133980400', 'tt_kanban_equip_rate', NULL, NULL, 0, NULL, NULL, 2, 'kanbanequiprate:tt_kanban_equip_rate:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:13:40', 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 ('2023020509133980403', '2023020509133980400', 'tt_kanban_equip_rate', NULL, NULL, 0, NULL, NULL, 2, 'kanbanequiprate:tt_kanban_equip_rate:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:13:40', 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 ('2023020509133980404', '2023020509133980400', 'tt_kanban_equip_rate', NULL, NULL, 0, NULL, NULL, 2, 'kanbanequiprate:tt_kanban_equip_rate:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:13:40', 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 ('2023020509133980405', '2023020509133980400', 'excel_tt_kanban_equip_rate', NULL, NULL, 0, NULL, NULL, 2, 'kanbanequiprate:tt_kanban_equip_rate:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:13:40', 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 ('2023020509133980406', '2023020509133980400', 'excel_tt_kanban_equip_rate', NULL, NULL, 0, NULL, NULL, 2, 'kanbanequiprate:tt_kanban_equip_rate:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:13:40', NULL, NULL, 0, 0, '1', 0);

@ -0,0 +1,128 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<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="monthName">
<a-input v-model="model.monthName" placeholder="请输入月份名称" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="设备名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipName">
<a-input v-model="model.equipName" placeholder="请输入设备名称" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="设备利用率" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="utiliRate">
<a-input-number v-model="model.utiliRate" placeholder="请输入设备利用率" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="公司id, 1表示电气元器件2表示轨道扣件" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyId">
<a-input-number v-model="model.companyId" placeholder="请输入公司id, 1表示电气元器件2表示轨道扣件" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TtKanbanEquipRateForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
monthName: [
{ required: true, message: '!'},
],
equipName: [
{ required: true, message: '!'},
],
utiliRate: [
{ required: true, message: '!'},
],
},
url: {
add: "/kanbanequiprate/ttKanbanEquipRate/add",
edit: "/kanbanequiprate/ttKanbanEquipRate/edit",
queryById: "/kanbanequiprate/ttKanbanEquipRate/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
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';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<tt-kanban-equip-rate-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-kanban-equip-rate-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>
</div>
</a-drawer>
</template>
<script>
import TtKanbanEquipRateForm from './TtKanbanEquipRateForm'
export default {
name: 'TtKanbanEquipRateModal',
components: {
TtKanbanEquipRateForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<tt-kanban-equip-rate-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-kanban-equip-rate-form>
</j-modal>
</template>
<script>
import TtKanbanEquipRateForm from './TtKanbanEquipRateForm'
export default {
name: 'TtKanbanEquipRateModal',
components: {
TtKanbanEquipRateForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

@ -0,0 +1,194 @@
package org.jeecg.modules.demo.kanbaninwh.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.kanbaninwh.entity.TtKanbanInWh;
import org.jeecg.modules.demo.kanbaninwh.service.ITtKanbanInWhService;
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.kanbanplan.entity.TtKanbanPlan;
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_kanban_in_wh
* @Author: jeecg-boot
* @Date: 2023-02-05
* @Version: V1.0
*/
@Api(tags="tt_kanban_in_wh")
@RestController
@RequestMapping("/kanbaninwh/ttKanbanInWh")
@Slf4j
public class TtKanbanInWhController extends JeecgController<TtKanbanInWh, ITtKanbanInWhService> {
@Autowired
private ITtKanbanInWhService ttKanbanInWhService;
/**
*
*
* @param ttKanbanInWh
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "tt_kanban_in_wh-分页列表查询")
@ApiOperation(value="tt_kanban_in_wh-分页列表查询", notes="tt_kanban_in_wh-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<TtKanbanInWh>> queryPageList(TtKanbanInWh ttKanbanInWh,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<TtKanbanInWh> queryWrapper = QueryGenerator.initQueryWrapper(ttKanbanInWh, req.getParameterMap());
Page<TtKanbanInWh> page = new Page<TtKanbanInWh>(pageNo, pageSize);
IPage<TtKanbanInWh> pageList = ttKanbanInWhService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 2
*
* @param ttKanbanInWh
* @return
*/
//@AutoLog(value = "tt_kanban_in_wh-分页列表查询")
@ApiOperation(value="tt_kanban_in_wh-看板2列表查询", notes="tt_kanban_in_wh-看板2列表查询")
@GetMapping(value = "/queryList")
public Result<List<TtKanbanInWh>> queryList(TtKanbanInWh ttKanbanInWh) {
List<TtKanbanInWh> kanbanInWhList = ttKanbanInWhService.kanbanInWhList();
return Result.OK(kanbanInWhList);
}
/**
*
*
* @param ttKanbanInWh
* @return
*/
@AutoLog(value = "tt_kanban_in_wh-添加")
@ApiOperation(value="tt_kanban_in_wh-添加", notes="tt_kanban_in_wh-添加")
//@RequiresPermissions("kanbaninwh:tt_kanban_in_wh:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody TtKanbanInWh ttKanbanInWh) {
ttKanbanInWhService.save(ttKanbanInWh);
return Result.OK("添加成功!");
}
/**
*
*
* @param ttKanbanInWh
* @return
*/
@AutoLog(value = "tt_kanban_in_wh-编辑")
@ApiOperation(value="tt_kanban_in_wh-编辑", notes="tt_kanban_in_wh-编辑")
//@RequiresPermissions("kanbaninwh:tt_kanban_in_wh:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody TtKanbanInWh ttKanbanInWh) {
ttKanbanInWhService.updateById(ttKanbanInWh);
return Result.OK("编辑成功!");
}
/**
* id
*
* @param id
* @return
*/
@AutoLog(value = "tt_kanban_in_wh-通过id删除")
@ApiOperation(value="tt_kanban_in_wh-通过id删除", notes="tt_kanban_in_wh-通过id删除")
//@RequiresPermissions("kanbaninwh:tt_kanban_in_wh:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
ttKanbanInWhService.removeById(id);
return Result.OK("删除成功!");
}
/**
*
*
* @param ids
* @return
*/
@AutoLog(value = "tt_kanban_in_wh-批量删除")
@ApiOperation(value="tt_kanban_in_wh-批量删除", notes="tt_kanban_in_wh-批量删除")
//@RequiresPermissions("kanbaninwh:tt_kanban_in_wh:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.ttKanbanInWhService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* id
*
* @param id
* @return
*/
//@AutoLog(value = "tt_kanban_in_wh-通过id查询")
@ApiOperation(value="tt_kanban_in_wh-通过id查询", notes="tt_kanban_in_wh-通过id查询")
@GetMapping(value = "/queryById")
public Result<TtKanbanInWh> queryById(@RequestParam(name="id",required=true) String id) {
TtKanbanInWh ttKanbanInWh = ttKanbanInWhService.getById(id);
if(ttKanbanInWh==null) {
return Result.error("未找到对应数据");
}
return Result.OK(ttKanbanInWh);
}
/**
* excel
*
* @param request
* @param ttKanbanInWh
*/
//@RequiresPermissions("kanbaninwh:tt_kanban_in_wh:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, TtKanbanInWh ttKanbanInWh) {
return super.exportXls(request, ttKanbanInWh, TtKanbanInWh.class, "tt_kanban_in_wh");
}
/**
* excel
*
* @param request
* @param response
* @return
*/
//@RequiresPermissions("kanbaninwh:tt_kanban_in_wh:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, TtKanbanInWh.class);
}
}

@ -0,0 +1,61 @@
package org.jeecg.modules.demo.kanbaninwh.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: tt_kanban_in_wh
* @Author: jeecg-boot
* @Date: 2023-02-05
* @Version: V1.0
*/
@Data
@TableName("tt_kanban_in_wh")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="tt_kanban_in_wh对象", description="tt_kanban_in_wh")
public class TtKanbanInWh implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private Integer id;
/**日期*/
@Excel(name = "日期", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "日期")
private Date dayName;
/**日期名称*/
@Excel(name = "日期名称", width = 15)
@ApiModelProperty(value = "日期名称")
private String dayDesc;
/**产品类型id1表示底座2表示胶塞*/
@Excel(name = "产品类型id1表示底座2表示胶塞", width = 15)
@ApiModelProperty(value = "产品类型id1表示底座2表示胶塞")
private Integer typeId;
/**入库数量*/
@Excel(name = "入库数量", width = 15)
@ApiModelProperty(value = "入库数量")
private BigDecimal inQty;
/**公司id, 1表示电气元器件2表示轨道扣件*/
@Excel(name = "公司id, 1表示电气元器件2表示轨道扣件", width = 15)
@ApiModelProperty(value = "公司id, 1表示电气元器件2表示轨道扣件")
private Integer companyId;
}

@ -0,0 +1,18 @@
package org.jeecg.modules.demo.kanbaninwh.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.demo.kanbaninwh.entity.TtKanbanInWh;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: tt_kanban_in_wh
* @Author: jeecg-boot
* @Date: 2023-02-05
* @Version: V1.0
*/
public interface TtKanbanInWhMapper extends BaseMapper<TtKanbanInWh> {
List<TtKanbanInWh> kanbanInWhList();
}

@ -0,0 +1,10 @@
<?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.kanbaninwh.mapper.TtKanbanInWhMapper">
<!-- 看板2列表查询 -->
<select id="kanbanInWhList" resultType="org.jeecg.modules.demo.kanbaninwh.entity.TtKanbanInWh">
select * from tt_kanban_in_wh where company_id = 1 and day_name &gt;= date_sub(now(), interval 5 day) and day_name &lt; now()
order by type_id,day_name
</select>
</mapper>

@ -0,0 +1,17 @@
package org.jeecg.modules.demo.kanbaninwh.service;
import org.jeecg.modules.demo.kanbaninwh.entity.TtKanbanInWh;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* @Description: tt_kanban_in_wh
* @Author: jeecg-boot
* @Date: 2023-02-05
* @Version: V1.0
*/
public interface ITtKanbanInWhService extends IService<TtKanbanInWh> {
List<TtKanbanInWh> kanbanInWhList();
}

@ -0,0 +1,28 @@
package org.jeecg.modules.demo.kanbaninwh.service.impl;
import org.jeecg.modules.demo.kanbaninwh.entity.TtKanbanInWh;
import org.jeecg.modules.demo.kanbaninwh.mapper.TtKanbanInWhMapper;
import org.jeecg.modules.demo.kanbaninwh.service.ITtKanbanInWhService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
/**
* @Description: tt_kanban_in_wh
* @Author: jeecg-boot
* @Date: 2023-02-05
* @Version: V1.0
*/
@Service
public class TtKanbanInWhServiceImpl extends ServiceImpl<TtKanbanInWhMapper, TtKanbanInWh> implements ITtKanbanInWhService {
@Autowired
private TtKanbanInWhMapper TtKanbanInWhMapper;
@Override
public List<TtKanbanInWh> kanbanInWhList() {
return TtKanbanInWhMapper.kanbanInWhList();
}
}

@ -0,0 +1,198 @@
<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('tt_kanban_in_wh')"></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"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<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="handleDetail(record)"></a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a></a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<tt-kanban-in-wh-modal ref="modalForm" @ok="modalFormOk"></tt-kanban-in-wh-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TtKanbanInWhModal from './modules/TtKanbanInWhModal'
export default {
name: 'TtKanbanInWhList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TtKanbanInWhModal
},
data () {
return {
description: 'tt_kanban_in_wh',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'',
align:"center",
dataIndex: 'dayName',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title:'',
align:"center",
dataIndex: 'dayDesc'
},
{
title:'id12',
align:"center",
dataIndex: 'typeId'
},
{
title:'',
align:"center",
dataIndex: 'inQty'
},
{
title:'id, 12',
align:"center",
dataIndex: 'companyId'
},
{
title: '',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/kanbaninwh/ttKanbanInWh/list",
delete: "/kanbaninwh/ttKanbanInWh/delete",
deleteBatch: "/kanbaninwh/ttKanbanInWh/deleteBatch",
exportXlsUrl: "/kanbaninwh/ttKanbanInWh/exportXls",
importExcelUrl: "kanbaninwh/ttKanbanInWh/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'date',value:'dayName',text:''})
fieldList.push({type:'string',value:'dayDesc',text:''})
fieldList.push({type:'int',value:'typeId',text:'id12'})
fieldList.push({type:'number',value:'inQty',text:''})
fieldList.push({type:'int',value:'companyId',text:'id, 12'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,26 @@
-- views/kanbaninwh
-- 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 ('2023020509134860030', NULL, 'tt_kanban_in_wh', '/kanbaninwh/ttKanbanInWhList', 'kanbaninwh/TtKanbanInWhList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-02-05 09:13:03', 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 ('2023020509134860031', '2023020509134860030', 'tt_kanban_in_wh', NULL, NULL, 0, NULL, NULL, 2, 'kanbaninwh:tt_kanban_in_wh:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:13:03', 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 ('2023020509134860032', '2023020509134860030', 'tt_kanban_in_wh', NULL, NULL, 0, NULL, NULL, 2, 'kanbaninwh:tt_kanban_in_wh:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:13:03', 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 ('2023020509134860033', '2023020509134860030', 'tt_kanban_in_wh', NULL, NULL, 0, NULL, NULL, 2, 'kanbaninwh:tt_kanban_in_wh:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:13:03', 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 ('2023020509134870034', '2023020509134860030', 'tt_kanban_in_wh', NULL, NULL, 0, NULL, NULL, 2, 'kanbaninwh:tt_kanban_in_wh:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:13:03', 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 ('2023020509134870035', '2023020509134860030', 'excel_tt_kanban_in_wh', NULL, NULL, 0, NULL, NULL, 2, 'kanbaninwh:tt_kanban_in_wh:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:13:03', 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 ('2023020509134870036', '2023020509134860030', 'excel_tt_kanban_in_wh', NULL, NULL, 0, NULL, NULL, 2, 'kanbaninwh:tt_kanban_in_wh:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:13:03', NULL, NULL, 0, 0, '1', 0);

@ -0,0 +1,139 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<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="dayName">
<j-date placeholder="请选择日期" v-model="model.dayName" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="日期名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dayDesc">
<a-input v-model="model.dayDesc" placeholder="请输入日期名称" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="产品类型id1表示底座2表示胶塞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId">
<a-input-number v-model="model.typeId" placeholder="请输入产品类型id1表示底座2表示胶塞" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="入库数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inQty">
<a-input-number v-model="model.inQty" placeholder="请输入入库数量" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="公司id, 1表示电气元器件2表示轨道扣件" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyId">
<a-input-number v-model="model.companyId" placeholder="请输入公司id, 1表示电气元器件2表示轨道扣件" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TtKanbanInWhForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
dayName: [
{ required: true, message: '!'},
],
dayDesc: [
{ required: true, message: '!'},
],
typeId: [
{ required: true, message: 'id12!'},
],
inQty: [
{ required: true, message: '!'},
],
companyId: [
{ required: true, message: 'id, 12!'},
],
},
url: {
add: "/kanbaninwh/ttKanbanInWh/add",
edit: "/kanbaninwh/ttKanbanInWh/edit",
queryById: "/kanbaninwh/ttKanbanInWh/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
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';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<tt-kanban-in-wh-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-kanban-in-wh-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>
</div>
</a-drawer>
</template>
<script>
import TtKanbanInWhForm from './TtKanbanInWhForm'
export default {
name: 'TtKanbanInWhModal',
components: {
TtKanbanInWhForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<tt-kanban-in-wh-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-kanban-in-wh-form>
</j-modal>
</template>
<script>
import TtKanbanInWhForm from './TtKanbanInWhForm'
export default {
name: 'TtKanbanInWhModal',
components: {
TtKanbanInWhForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

@ -0,0 +1,196 @@
package org.jeecg.modules.demo.kanbanpassrate.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.kanbanpassrate.entity.TtKanbanPassRate;
import org.jeecg.modules.demo.kanbanpassrate.service.ITtKanbanPassRateService;
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.kanbanplan.entity.TtKanbanPlan;
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_kanban_pass_rate
* @Author: jeecg-boot
* @Date: 2023-02-05
* @Version: V1.0
*/
@Api(tags="tt_kanban_pass_rate")
@RestController
@RequestMapping("/kanbanpassrate/ttKanbanPassRate")
@Slf4j
public class TtKanbanPassRateController extends JeecgController<TtKanbanPassRate, ITtKanbanPassRateService> {
@Autowired
private ITtKanbanPassRateService ttKanbanPassRateService;
/**
*
*
* @param ttKanbanPassRate
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "tt_kanban_pass_rate-分页列表查询")
@ApiOperation(value="tt_kanban_pass_rate-分页列表查询", notes="tt_kanban_pass_rate-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<TtKanbanPassRate>> queryPageList(TtKanbanPassRate ttKanbanPassRate,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<TtKanbanPassRate> queryWrapper = QueryGenerator.initQueryWrapper(ttKanbanPassRate, req.getParameterMap());
Page<TtKanbanPassRate> page = new Page<TtKanbanPassRate>(pageNo, pageSize);
IPage<TtKanbanPassRate> pageList = ttKanbanPassRateService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 3
*
* @param ttKanbanPassRate
* @return
*/
//@AutoLog(value = "tt_kanban_pass_rate-分页列表查询")
@ApiOperation(value="tt_kanban_pass_rate-看板3列表查询", notes="tt_kanban_plan-看板3列表查询")
@GetMapping(value = "/queryList")
public Result<List<TtKanbanPassRate>> queryList(TtKanbanPassRate ttKanbanPassRate) {
QueryWrapper<TtKanbanPassRate> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("company_id", 1);
List<TtKanbanPassRate> kanbanPassRateList = ttKanbanPassRateService.list(queryWrapper);
return Result.OK(kanbanPassRateList);
}
/**
*
*
* @param ttKanbanPassRate
* @return
*/
@AutoLog(value = "tt_kanban_pass_rate-添加")
@ApiOperation(value="tt_kanban_pass_rate-添加", notes="tt_kanban_pass_rate-添加")
//@RequiresPermissions("kanbanpassrate:tt_kanban_pass_rate:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody TtKanbanPassRate ttKanbanPassRate) {
ttKanbanPassRateService.save(ttKanbanPassRate);
return Result.OK("添加成功!");
}
/**
*
*
* @param ttKanbanPassRate
* @return
*/
@AutoLog(value = "tt_kanban_pass_rate-编辑")
@ApiOperation(value="tt_kanban_pass_rate-编辑", notes="tt_kanban_pass_rate-编辑")
//@RequiresPermissions("kanbanpassrate:tt_kanban_pass_rate:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody TtKanbanPassRate ttKanbanPassRate) {
ttKanbanPassRateService.updateById(ttKanbanPassRate);
return Result.OK("编辑成功!");
}
/**
* id
*
* @param id
* @return
*/
@AutoLog(value = "tt_kanban_pass_rate-通过id删除")
@ApiOperation(value="tt_kanban_pass_rate-通过id删除", notes="tt_kanban_pass_rate-通过id删除")
//@RequiresPermissions("kanbanpassrate:tt_kanban_pass_rate:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
ttKanbanPassRateService.removeById(id);
return Result.OK("删除成功!");
}
/**
*
*
* @param ids
* @return
*/
@AutoLog(value = "tt_kanban_pass_rate-批量删除")
@ApiOperation(value="tt_kanban_pass_rate-批量删除", notes="tt_kanban_pass_rate-批量删除")
//@RequiresPermissions("kanbanpassrate:tt_kanban_pass_rate:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.ttKanbanPassRateService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* id
*
* @param id
* @return
*/
//@AutoLog(value = "tt_kanban_pass_rate-通过id查询")
@ApiOperation(value="tt_kanban_pass_rate-通过id查询", notes="tt_kanban_pass_rate-通过id查询")
@GetMapping(value = "/queryById")
public Result<TtKanbanPassRate> queryById(@RequestParam(name="id",required=true) String id) {
TtKanbanPassRate ttKanbanPassRate = ttKanbanPassRateService.getById(id);
if(ttKanbanPassRate==null) {
return Result.error("未找到对应数据");
}
return Result.OK(ttKanbanPassRate);
}
/**
* excel
*
* @param request
* @param ttKanbanPassRate
*/
//@RequiresPermissions("kanbanpassrate:tt_kanban_pass_rate:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, TtKanbanPassRate ttKanbanPassRate) {
return super.exportXls(request, ttKanbanPassRate, TtKanbanPassRate.class, "tt_kanban_pass_rate");
}
/**
* excel
*
* @param request
* @param response
* @return
*/
//@RequiresPermissions("kanbanpassrate:tt_kanban_pass_rate:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, TtKanbanPassRate.class);
}
}

@ -0,0 +1,51 @@
package org.jeecg.modules.demo.kanbanpassrate.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: tt_kanban_pass_rate
* @Author: jeecg-boot
* @Date: 2023-02-05
* @Version: V1.0
*/
@Data
@TableName("tt_kanban_pass_rate")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="tt_kanban_pass_rate对象", description="tt_kanban_pass_rate")
public class TtKanbanPassRate implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private Integer id;
/**月份名称*/
@Excel(name = "月份名称", width = 15)
@ApiModelProperty(value = "月份名称")
private String monthName;
/**产品合格率*/
@Excel(name = "产品合格率", width = 15)
@ApiModelProperty(value = "产品合格率")
private BigDecimal passRate;
/**公司id, 1表示老厂2表示新厂*/
@Excel(name = "公司id, 1表示老厂2表示新厂", width = 15)
@ApiModelProperty(value = "公司id, 1表示老厂2表示新厂")
private Integer companyId;
}

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

@ -0,0 +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.kanbanpassrate.mapper.TtKanbanPassRateMapper">
</mapper>

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

@ -0,0 +1,19 @@
package org.jeecg.modules.demo.kanbanpassrate.service.impl;
import org.jeecg.modules.demo.kanbanpassrate.entity.TtKanbanPassRate;
import org.jeecg.modules.demo.kanbanpassrate.mapper.TtKanbanPassRateMapper;
import org.jeecg.modules.demo.kanbanpassrate.service.ITtKanbanPassRateService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: tt_kanban_pass_rate
* @Author: jeecg-boot
* @Date: 2023-02-05
* @Version: V1.0
*/
@Service
public class TtKanbanPassRateServiceImpl extends ServiceImpl<TtKanbanPassRateMapper, TtKanbanPassRate> implements ITtKanbanPassRateService {
}

@ -0,0 +1,183 @@
<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('tt_kanban_pass_rate')"></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"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<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="handleDetail(record)"></a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a></a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<tt-kanban-pass-rate-modal ref="modalForm" @ok="modalFormOk"></tt-kanban-pass-rate-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TtKanbanPassRateModal from './modules/TtKanbanPassRateModal'
export default {
name: 'TtKanbanPassRateList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TtKanbanPassRateModal
},
data () {
return {
description: 'tt_kanban_pass_rate',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'',
align:"center",
dataIndex: 'monthName'
},
{
title:'',
align:"center",
dataIndex: 'passRate'
},
{
title:'id, 12',
align:"center",
dataIndex: 'companyId'
},
{
title: '',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/kanbanpassrate/ttKanbanPassRate/list",
delete: "/kanbanpassrate/ttKanbanPassRate/delete",
deleteBatch: "/kanbanpassrate/ttKanbanPassRate/deleteBatch",
exportXlsUrl: "/kanbanpassrate/ttKanbanPassRate/exportXls",
importExcelUrl: "kanbanpassrate/ttKanbanPassRate/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'monthName',text:''})
fieldList.push({type:'number',value:'passRate',text:''})
fieldList.push({type:'int',value:'companyId',text:'id, 12'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,26 @@
-- views/kanbanpassrate
-- 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 ('2023020509138920180', NULL, 'tt_kanban_pass_rate', '/kanbanpassrate/ttKanbanPassRateList', 'kanbanpassrate/TtKanbanPassRateList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-02-05 09:13:18', 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 ('2023020509138920181', '2023020509138920180', 'tt_kanban_pass_rate', NULL, NULL, 0, NULL, NULL, 2, 'kanbanpassrate:tt_kanban_pass_rate:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:13:18', 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 ('2023020509138920182', '2023020509138920180', 'tt_kanban_pass_rate', NULL, NULL, 0, NULL, NULL, 2, 'kanbanpassrate:tt_kanban_pass_rate:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:13:18', 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 ('2023020509138920183', '2023020509138920180', 'tt_kanban_pass_rate', NULL, NULL, 0, NULL, NULL, 2, 'kanbanpassrate:tt_kanban_pass_rate:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:13:18', 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 ('2023020509138920184', '2023020509138920180', 'tt_kanban_pass_rate', NULL, NULL, 0, NULL, NULL, 2, 'kanbanpassrate:tt_kanban_pass_rate:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:13:18', 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 ('2023020509138920185', '2023020509138920180', 'excel_tt_kanban_pass_rate', NULL, NULL, 0, NULL, NULL, 2, 'kanbanpassrate:tt_kanban_pass_rate:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:13:18', 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 ('2023020509138920186', '2023020509138920180', 'excel_tt_kanban_pass_rate', NULL, NULL, 0, NULL, NULL, 2, 'kanbanpassrate:tt_kanban_pass_rate:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:13:18', NULL, NULL, 0, 0, '1', 0);

@ -0,0 +1,120 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<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="monthName">
<a-input v-model="model.monthName" placeholder="请输入月份名称" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="产品合格率" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="passRate">
<a-input-number v-model="model.passRate" placeholder="请输入产品合格率" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="公司id, 1表示老厂2表示新厂" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyId">
<a-input-number v-model="model.companyId" placeholder="请输入公司id, 1表示老厂2表示新厂" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TtKanbanPassRateForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
monthName: [
{ required: true, message: '!'},
],
passRate: [
{ required: true, message: '!'},
],
},
url: {
add: "/kanbanpassrate/ttKanbanPassRate/add",
edit: "/kanbanpassrate/ttKanbanPassRate/edit",
queryById: "/kanbanpassrate/ttKanbanPassRate/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
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';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<tt-kanban-pass-rate-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-kanban-pass-rate-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>
</div>
</a-drawer>
</template>
<script>
import TtKanbanPassRateForm from './TtKanbanPassRateForm'
export default {
name: 'TtKanbanPassRateModal',
components: {
TtKanbanPassRateForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<tt-kanban-pass-rate-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-kanban-pass-rate-form>
</j-modal>
</template>
<script>
import TtKanbanPassRateForm from './TtKanbanPassRateForm'
export default {
name: 'TtKanbanPassRateModal',
components: {
TtKanbanPassRateForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

@ -0,0 +1,199 @@
package org.jeecg.modules.demo.kanbanplan.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.kanbanplan.entity.TtKanbanPlan;
import org.jeecg.modules.demo.kanbanplan.service.ITtKanbanPlanService;
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.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_kanban_plan
* @Author: jeecg-boot
* @Date: 2023-02-05
* @Version: V1.0
*/
@Api(tags="tt_kanban_plan")
@RestController
@RequestMapping("/kanbanplan/ttKanbanPlan")
@Slf4j
public class TtKanbanPlanController extends JeecgController<TtKanbanPlan, ITtKanbanPlanService> {
@Autowired
private ITtKanbanPlanService ttKanbanPlanService;
/**
*
*
* @param ttKanbanPlan
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "tt_kanban_plan-分页列表查询")
@ApiOperation(value="tt_kanban_plan-分页列表查询", notes="tt_kanban_plan-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<TtKanbanPlan>> queryPageList(TtKanbanPlan ttKanbanPlan,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<TtKanbanPlan> queryWrapper = QueryGenerator.initQueryWrapper(ttKanbanPlan, req.getParameterMap());
Page<TtKanbanPlan> page = new Page<TtKanbanPlan>(pageNo, pageSize);
IPage<TtKanbanPlan> pageList = ttKanbanPlanService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 1
*
* @param ttKanbanPlan
* @return
*/
//@AutoLog(value = "tt_kanban_plan-分页列表查询")
@ApiOperation(value="tt_kanban_plan-看板1列表查询", notes="tt_kanban_plan-看板1列表查询")
@GetMapping(value = "/queryList")
public Result<List<TtKanbanPlan>> queryList(TtKanbanPlan ttKanbanPlan) {
QueryWrapper<TtKanbanPlan> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("company_id", 1);
List<String> list = new ArrayList<>();
list.add("type_id");
list.add("month_name");
queryWrapper.orderByAsc(list);
List<TtKanbanPlan> kanbanPlanList = ttKanbanPlanService.list(queryWrapper);
return Result.OK(kanbanPlanList);
}
/**
*
*
* @param ttKanbanPlan
* @return
*/
@AutoLog(value = "tt_kanban_plan-添加")
@ApiOperation(value="tt_kanban_plan-添加", notes="tt_kanban_plan-添加")
//@RequiresPermissions("kanbanplan:tt_kanban_plan:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody TtKanbanPlan ttKanbanPlan) {
ttKanbanPlanService.save(ttKanbanPlan);
return Result.OK("添加成功!");
}
/**
*
*
* @param ttKanbanPlan
* @return
*/
@AutoLog(value = "tt_kanban_plan-编辑")
@ApiOperation(value="tt_kanban_plan-编辑", notes="tt_kanban_plan-编辑")
//@RequiresPermissions("kanbanplan:tt_kanban_plan:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody TtKanbanPlan ttKanbanPlan) {
ttKanbanPlanService.updateById(ttKanbanPlan);
return Result.OK("编辑成功!");
}
/**
* id
*
* @param id
* @return
*/
@AutoLog(value = "tt_kanban_plan-通过id删除")
@ApiOperation(value="tt_kanban_plan-通过id删除", notes="tt_kanban_plan-通过id删除")
//@RequiresPermissions("kanbanplan:tt_kanban_plan:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
ttKanbanPlanService.removeById(id);
return Result.OK("删除成功!");
}
/**
*
*
* @param ids
* @return
*/
@AutoLog(value = "tt_kanban_plan-批量删除")
@ApiOperation(value="tt_kanban_plan-批量删除", notes="tt_kanban_plan-批量删除")
//@RequiresPermissions("kanbanplan:tt_kanban_plan:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.ttKanbanPlanService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* id
*
* @param id
* @return
*/
//@AutoLog(value = "tt_kanban_plan-通过id查询")
@ApiOperation(value="tt_kanban_plan-通过id查询", notes="tt_kanban_plan-通过id查询")
@GetMapping(value = "/queryById")
public Result<TtKanbanPlan> queryById(@RequestParam(name="id",required=true) String id) {
TtKanbanPlan ttKanbanPlan = ttKanbanPlanService.getById(id);
if(ttKanbanPlan==null) {
return Result.error("未找到对应数据");
}
return Result.OK(ttKanbanPlan);
}
/**
* excel
*
* @param request
* @param ttKanbanPlan
*/
//@RequiresPermissions("kanbanplan:tt_kanban_plan:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, TtKanbanPlan ttKanbanPlan) {
return super.exportXls(request, ttKanbanPlan, TtKanbanPlan.class, "tt_kanban_plan");
}
/**
* excel
*
* @param request
* @param response
* @return
*/
//@RequiresPermissions("kanbanplan:tt_kanban_plan:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, TtKanbanPlan.class);
}
}

@ -0,0 +1,59 @@
package org.jeecg.modules.demo.kanbanplan.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: tt_kanban_plan
* @Author: jeecg-boot
* @Date: 2023-02-05
* @Version: V1.0
*/
@Data
@TableName("tt_kanban_plan")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="tt_kanban_plan对象", description="tt_kanban_plan")
public class TtKanbanPlan implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private Integer id;
/**月份名称*/
@Excel(name = "月份名称", width = 15)
@ApiModelProperty(value = "月份名称")
private String monthName;
/**产品类型id1表示底座2表示胶塞*/
@Excel(name = "产品类型id1表示底座2表示胶塞", width = 15)
@ApiModelProperty(value = "产品类型id1表示底座2表示胶塞")
private Integer typeId;
/**计划数量*/
@Excel(name = "计划数量", width = 15)
@ApiModelProperty(value = "计划数量")
private BigDecimal planQty;
/**公司id, 1表示电气元器件2表示轨道扣件*/
@Excel(name = "公司id, 1表示电气元器件2表示轨道扣件", width = 15)
@ApiModelProperty(value = "公司id, 1表示电气元器件2表示轨道扣件")
private Integer companyId;
/**年份名称*/
@Excel(name = "年份名称", width = 15)
@ApiModelProperty(value = "年份名称")
private String yearName;
}

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

@ -0,0 +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.kanbanplan.mapper.TtKanbanPlanMapper">
</mapper>

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

@ -0,0 +1,19 @@
package org.jeecg.modules.demo.kanbanplan.service.impl;
import org.jeecg.modules.demo.kanbanplan.entity.TtKanbanPlan;
import org.jeecg.modules.demo.kanbanplan.mapper.TtKanbanPlanMapper;
import org.jeecg.modules.demo.kanbanplan.service.ITtKanbanPlanService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: tt_kanban_plan
* @Author: jeecg-boot
* @Date: 2023-02-05
* @Version: V1.0
*/
@Service
public class TtKanbanPlanServiceImpl extends ServiceImpl<TtKanbanPlanMapper, TtKanbanPlan> implements ITtKanbanPlanService {
}

@ -0,0 +1,195 @@
<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('tt_kanban_plan')"></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"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<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="handleDetail(record)"></a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a></a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<tt-kanban-plan-modal ref="modalForm" @ok="modalFormOk"></tt-kanban-plan-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TtKanbanPlanModal from './modules/TtKanbanPlanModal'
export default {
name: 'TtKanbanPlanList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TtKanbanPlanModal
},
data () {
return {
description: 'tt_kanban_plan',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'',
align:"center",
dataIndex: 'monthName'
},
{
title:'id12',
align:"center",
dataIndex: 'typeId'
},
{
title:'',
align:"center",
dataIndex: 'planQty'
},
{
title:'id, 12',
align:"center",
dataIndex: 'companyId'
},
{
title:'',
align:"center",
dataIndex: 'yearName'
},
{
title: '',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/kanbanplan/ttKanbanPlan/list",
delete: "/kanbanplan/ttKanbanPlan/delete",
deleteBatch: "/kanbanplan/ttKanbanPlan/deleteBatch",
exportXlsUrl: "/kanbanplan/ttKanbanPlan/exportXls",
importExcelUrl: "kanbanplan/ttKanbanPlan/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'monthName',text:''})
fieldList.push({type:'int',value:'typeId',text:'id12'})
fieldList.push({type:'number',value:'planQty',text:''})
fieldList.push({type:'int',value:'companyId',text:'id, 12'})
fieldList.push({type:'string',value:'yearName',text:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,26 @@
-- views/kanbanplan
-- 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 ('2023020509128490290', NULL, 'tt_kanban_plan', '/kanbanplan/ttKanbanPlanList', 'kanbanplan/TtKanbanPlanList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-02-05 09:12:29', 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 ('2023020509128490291', '2023020509128490290', 'tt_kanban_plan', NULL, NULL, 0, NULL, NULL, 2, 'kanbanplan:tt_kanban_plan:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:12:29', 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 ('2023020509128490292', '2023020509128490290', 'tt_kanban_plan', NULL, NULL, 0, NULL, NULL, 2, 'kanbanplan:tt_kanban_plan:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:12:29', 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 ('2023020509128490293', '2023020509128490290', 'tt_kanban_plan', NULL, NULL, 0, NULL, NULL, 2, 'kanbanplan:tt_kanban_plan:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:12:29', 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 ('2023020509128490294', '2023020509128490290', 'tt_kanban_plan', NULL, NULL, 0, NULL, NULL, 2, 'kanbanplan:tt_kanban_plan:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:12:29', 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 ('2023020509128490295', '2023020509128490290', 'excel_tt_kanban_plan', NULL, NULL, 0, NULL, NULL, 2, 'kanbanplan:tt_kanban_plan:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:12:29', 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 ('2023020509128490296', '2023020509128490290', 'excel_tt_kanban_plan', NULL, NULL, 0, NULL, NULL, 2, 'kanbanplan:tt_kanban_plan:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:12:29', NULL, NULL, 0, 0, '1', 0);

@ -0,0 +1,136 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<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="monthName">
<a-input v-model="model.monthName" placeholder="请输入月份名称" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="产品类型id1表示底座2表示胶塞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId">
<a-input-number v-model="model.typeId" placeholder="请输入产品类型id1表示底座2表示胶塞" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="计划数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="planQty">
<a-input-number v-model="model.planQty" placeholder="请输入计划数量" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="公司id, 1表示电气元器件2表示轨道扣件" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyId">
<a-input-number v-model="model.companyId" placeholder="请输入公司id, 1表示电气元器件2表示轨道扣件" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="年份名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="yearName">
<a-input v-model="model.yearName" placeholder="请输入年份名称" ></a-input>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TtKanbanPlanForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
monthName: [
{ required: true, message: '!'},
],
typeId: [
{ required: true, message: 'id12!'},
],
planQty: [
{ required: true, message: '!'},
],
companyId: [
{ required: true, message: 'id, 12!'},
],
},
url: {
add: "/kanbanplan/ttKanbanPlan/add",
edit: "/kanbanplan/ttKanbanPlan/edit",
queryById: "/kanbanplan/ttKanbanPlan/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
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';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<tt-kanban-plan-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-kanban-plan-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>
</div>
</a-drawer>
</template>
<script>
import TtKanbanPlanForm from './TtKanbanPlanForm'
export default {
name: 'TtKanbanPlanModal',
components: {
TtKanbanPlanForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<tt-kanban-plan-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-kanban-plan-form>
</j-modal>
</template>
<script>
import TtKanbanPlanForm from './TtKanbanPlanForm'
export default {
name: 'TtKanbanPlanModal',
components: {
TtKanbanPlanForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

@ -0,0 +1,193 @@
package org.jeecg.modules.demo.kanbanpsrate.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 org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.kanbaninwh.entity.TtKanbanInWh;
import org.jeecg.modules.demo.kanbanpsrate.entity.TtKanbanPsRate;
import org.jeecg.modules.demo.kanbanpsrate.service.ITtKanbanPsRateService;
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.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_kanban_ps_rate
* @Author: jeecg-boot
* @Date: 2023-02-05
* @Version: V1.0
*/
@Api(tags="tt_kanban_ps_rate")
@RestController
@RequestMapping("/kanbanpsrate/ttKanbanPsRate")
@Slf4j
public class TtKanbanPsRateController extends JeecgController<TtKanbanPsRate, ITtKanbanPsRateService> {
@Autowired
private ITtKanbanPsRateService ttKanbanPsRateService;
/**
*
*
* @param ttKanbanPsRate
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "tt_kanban_ps_rate-分页列表查询")
@ApiOperation(value="tt_kanban_ps_rate-分页列表查询", notes="tt_kanban_ps_rate-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<TtKanbanPsRate>> queryPageList(TtKanbanPsRate ttKanbanPsRate,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<TtKanbanPsRate> queryWrapper = QueryGenerator.initQueryWrapper(ttKanbanPsRate, req.getParameterMap());
Page<TtKanbanPsRate> page = new Page<TtKanbanPsRate>(pageNo, pageSize);
IPage<TtKanbanPsRate> pageList = ttKanbanPsRateService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 5
*
* @param ttKanbanPsRate
* @return
*/
//@AutoLog(value = "tt_kanban_ps_rate-分页列表查询")
@ApiOperation(value="tt_kanban_ps_rate-看板5列表查询", notes="tt_kanban_ps_rate-看板5列表查询")
@GetMapping(value = "/queryList")
public Result<List<TtKanbanPsRate>> queryList(TtKanbanPsRate ttKanbanPsRate) {
List<TtKanbanPsRate> kanbanPsRateList = ttKanbanPsRateService.kanbanPsRateList();
return Result.OK(kanbanPsRateList);
}
/**
*
*
* @param ttKanbanPsRate
* @return
*/
@AutoLog(value = "tt_kanban_ps_rate-添加")
@ApiOperation(value="tt_kanban_ps_rate-添加", notes="tt_kanban_ps_rate-添加")
//@RequiresPermissions("kanbanpsrate:tt_kanban_ps_rate:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody TtKanbanPsRate ttKanbanPsRate) {
ttKanbanPsRateService.save(ttKanbanPsRate);
return Result.OK("添加成功!");
}
/**
*
*
* @param ttKanbanPsRate
* @return
*/
@AutoLog(value = "tt_kanban_ps_rate-编辑")
@ApiOperation(value="tt_kanban_ps_rate-编辑", notes="tt_kanban_ps_rate-编辑")
//@RequiresPermissions("kanbanpsrate:tt_kanban_ps_rate:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody TtKanbanPsRate ttKanbanPsRate) {
ttKanbanPsRateService.updateById(ttKanbanPsRate);
return Result.OK("编辑成功!");
}
/**
* id
*
* @param id
* @return
*/
@AutoLog(value = "tt_kanban_ps_rate-通过id删除")
@ApiOperation(value="tt_kanban_ps_rate-通过id删除", notes="tt_kanban_ps_rate-通过id删除")
//@RequiresPermissions("kanbanpsrate:tt_kanban_ps_rate:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
ttKanbanPsRateService.removeById(id);
return Result.OK("删除成功!");
}
/**
*
*
* @param ids
* @return
*/
@AutoLog(value = "tt_kanban_ps_rate-批量删除")
@ApiOperation(value="tt_kanban_ps_rate-批量删除", notes="tt_kanban_ps_rate-批量删除")
//@RequiresPermissions("kanbanpsrate:tt_kanban_ps_rate:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.ttKanbanPsRateService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* id
*
* @param id
* @return
*/
//@AutoLog(value = "tt_kanban_ps_rate-通过id查询")
@ApiOperation(value="tt_kanban_ps_rate-通过id查询", notes="tt_kanban_ps_rate-通过id查询")
@GetMapping(value = "/queryById")
public Result<TtKanbanPsRate> queryById(@RequestParam(name="id",required=true) String id) {
TtKanbanPsRate ttKanbanPsRate = ttKanbanPsRateService.getById(id);
if(ttKanbanPsRate==null) {
return Result.error("未找到对应数据");
}
return Result.OK(ttKanbanPsRate);
}
/**
* excel
*
* @param request
* @param ttKanbanPsRate
*/
//@RequiresPermissions("kanbanpsrate:tt_kanban_ps_rate:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, TtKanbanPsRate ttKanbanPsRate) {
return super.exportXls(request, ttKanbanPsRate, TtKanbanPsRate.class, "tt_kanban_ps_rate");
}
/**
* excel
*
* @param request
* @param response
* @return
*/
//@RequiresPermissions("kanbanpsrate:tt_kanban_ps_rate:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, TtKanbanPsRate.class);
}
}

@ -0,0 +1,61 @@
package org.jeecg.modules.demo.kanbanpsrate.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: tt_kanban_ps_rate
* @Author: jeecg-boot
* @Date: 2023-02-05
* @Version: V1.0
*/
@Data
@TableName("tt_kanban_ps_rate")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="tt_kanban_ps_rate对象", description="tt_kanban_ps_rate")
public class TtKanbanPsRate implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private Integer id;
/**日期*/
@Excel(name = "日期", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "日期")
private Date dayName;
/**日期名称*/
@Excel(name = "日期名称", width = 15)
@ApiModelProperty(value = "日期名称")
private String dayDesc;
/**工序名称*/
@Excel(name = "工序名称", width = 15)
@ApiModelProperty(value = "工序名称")
private String psName;
/**工序达成率*/
@Excel(name = "工序达成率", width = 15)
@ApiModelProperty(value = "工序达成率")
private BigDecimal psRate;
/**公司id, 1表示电气元器件2表示轨道扣件*/
@Excel(name = "公司id, 1表示电气元器件2表示轨道扣件", width = 15)
@ApiModelProperty(value = "公司id, 1表示电气元器件2表示轨道扣件")
private Integer companyId;
}

@ -0,0 +1,18 @@
package org.jeecg.modules.demo.kanbanpsrate.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.demo.kanbanpsrate.entity.TtKanbanPsRate;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: tt_kanban_ps_rate
* @Author: jeecg-boot
* @Date: 2023-02-05
* @Version: V1.0
*/
public interface TtKanbanPsRateMapper extends BaseMapper<TtKanbanPsRate> {
List<TtKanbanPsRate> kanbanPsRateList();
}

@ -0,0 +1,11 @@
<?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.kanbanpsrate.mapper.TtKanbanPsRateMapper">
<!-- 看板5列表查询 -->
<select id="kanbanPsRateList" resultType="org.jeecg.modules.demo.kanbanpsrate.entity.TtKanbanPsRate">
select * from tt_kanban_ps_rate where company_id = 1 and day_name &gt;= date_sub(now(), interval 5 day) and day_name &lt; now()
order by day_name
</select>
</mapper>

@ -0,0 +1,17 @@
package org.jeecg.modules.demo.kanbanpsrate.service;
import org.jeecg.modules.demo.kanbanpsrate.entity.TtKanbanPsRate;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* @Description: tt_kanban_ps_rate
* @Author: jeecg-boot
* @Date: 2023-02-05
* @Version: V1.0
*/
public interface ITtKanbanPsRateService extends IService<TtKanbanPsRate> {
List<TtKanbanPsRate> kanbanPsRateList();
}

@ -0,0 +1,29 @@
package org.jeecg.modules.demo.kanbanpsrate.service.impl;
import org.jeecg.modules.demo.kanbaninwh.mapper.TtKanbanInWhMapper;
import org.jeecg.modules.demo.kanbanpsrate.entity.TtKanbanPsRate;
import org.jeecg.modules.demo.kanbanpsrate.mapper.TtKanbanPsRateMapper;
import org.jeecg.modules.demo.kanbanpsrate.service.ITtKanbanPsRateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
/**
* @Description: tt_kanban_ps_rate
* @Author: jeecg-boot
* @Date: 2023-02-05
* @Version: V1.0
*/
@Service
public class TtKanbanPsRateServiceImpl extends ServiceImpl<TtKanbanPsRateMapper, TtKanbanPsRate> implements ITtKanbanPsRateService {
@Autowired
private TtKanbanPsRateMapper TtKanbanInWhMapper;
@Override
public List<TtKanbanPsRate> kanbanPsRateList() {
return TtKanbanInWhMapper.kanbanPsRateList();
}
}

@ -0,0 +1,198 @@
<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('tt_kanban_ps_rate')"></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"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<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="handleDetail(record)"></a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a></a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<tt-kanban-ps-rate-modal ref="modalForm" @ok="modalFormOk"></tt-kanban-ps-rate-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TtKanbanPsRateModal from './modules/TtKanbanPsRateModal'
export default {
name: 'TtKanbanPsRateList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TtKanbanPsRateModal
},
data () {
return {
description: 'tt_kanban_ps_rate',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'',
align:"center",
dataIndex: 'dayName',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title:'',
align:"center",
dataIndex: 'dayDesc'
},
{
title:'',
align:"center",
dataIndex: 'psName'
},
{
title:'',
align:"center",
dataIndex: 'psRate'
},
{
title:'id, 12',
align:"center",
dataIndex: 'companyId'
},
{
title: '',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/kanbanpsrate/ttKanbanPsRate/list",
delete: "/kanbanpsrate/ttKanbanPsRate/delete",
deleteBatch: "/kanbanpsrate/ttKanbanPsRate/deleteBatch",
exportXlsUrl: "/kanbanpsrate/ttKanbanPsRate/exportXls",
importExcelUrl: "kanbanpsrate/ttKanbanPsRate/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'date',value:'dayName',text:''})
fieldList.push({type:'string',value:'dayDesc',text:''})
fieldList.push({type:'string',value:'psName',text:''})
fieldList.push({type:'number',value:'psRate',text:''})
fieldList.push({type:'int',value:'companyId',text:'id, 12'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,26 @@
-- views/kanbanpsrate
-- 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 ('202302050912550470', NULL, 'tt_kanban_ps_rate', '/kanbanpsrate/ttKanbanPsRateList', 'kanbanpsrate/TtKanbanPsRateList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-02-05 09:12: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 ('202302050912550471', '202302050912550470', 'tt_kanban_ps_rate', NULL, NULL, 0, NULL, NULL, 2, 'kanbanpsrate:tt_kanban_ps_rate:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:12: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 ('202302050912550472', '202302050912550470', 'tt_kanban_ps_rate', NULL, NULL, 0, NULL, NULL, 2, 'kanbanpsrate:tt_kanban_ps_rate:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:12: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 ('202302050912550473', '202302050912550470', 'tt_kanban_ps_rate', NULL, NULL, 0, NULL, NULL, 2, 'kanbanpsrate:tt_kanban_ps_rate:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:12: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 ('202302050912550474', '202302050912550470', 'tt_kanban_ps_rate', NULL, NULL, 0, NULL, NULL, 2, 'kanbanpsrate:tt_kanban_ps_rate:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:12: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 ('202302050912550475', '202302050912550470', 'excel_tt_kanban_ps_rate', NULL, NULL, 0, NULL, NULL, 2, 'kanbanpsrate:tt_kanban_ps_rate:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:12: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 ('202302050912550476', '202302050912550470', 'excel_tt_kanban_ps_rate', NULL, NULL, 0, NULL, NULL, 2, 'kanbanpsrate:tt_kanban_ps_rate:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-05 09:12:47', NULL, NULL, 0, 0, '1', 0);

@ -0,0 +1,139 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<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="dayName">
<j-date placeholder="请选择日期" v-model="model.dayName" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="日期名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dayDesc">
<a-input v-model="model.dayDesc" placeholder="请输入日期名称" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="工序名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="psName">
<a-input v-model="model.psName" placeholder="请输入工序名称" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="工序达成率" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="psRate">
<a-input-number v-model="model.psRate" placeholder="请输入工序达成率" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="公司id, 1表示电气元器件2表示轨道扣件" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyId">
<a-input-number v-model="model.companyId" placeholder="请输入公司id, 1表示电气元器件2表示轨道扣件" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TtKanbanPsRateForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
dayName: [
{ required: true, message: '!'},
],
dayDesc: [
{ required: true, message: '!'},
],
psName: [
{ required: true, message: '!'},
],
psRate: [
{ required: true, message: '!'},
],
companyId: [
{ required: true, message: 'id, 12!'},
],
},
url: {
add: "/kanbanpsrate/ttKanbanPsRate/add",
edit: "/kanbanpsrate/ttKanbanPsRate/edit",
queryById: "/kanbanpsrate/ttKanbanPsRate/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
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';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<tt-kanban-ps-rate-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-kanban-ps-rate-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>
</div>
</a-drawer>
</template>
<script>
import TtKanbanPsRateForm from './TtKanbanPsRateForm'
export default {
name: 'TtKanbanPsRateModal',
components: {
TtKanbanPsRateForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<tt-kanban-ps-rate-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-kanban-ps-rate-form>
</j-modal>
</template>
<script>
import TtKanbanPsRateForm from './TtKanbanPsRateForm'
export default {
name: 'TtKanbanPsRateModal',
components: {
TtKanbanPsRateForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

@ -0,0 +1,201 @@
package org.jeecg.modules.demo.kanbansales.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.kanbanplan.entity.TtKanbanPlan;
import org.jeecg.modules.demo.kanbansales.entity.TtKanbanSales;
import org.jeecg.modules.demo.kanbansales.service.ITtKanbanSalesService;
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.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_kanban_sales
* @Author: jeecg-boot
* @Date: 2023-02-05
* @Version: V1.0
*/
@Api(tags="tt_kanban_sales")
@RestController
@RequestMapping("/kanbansales/ttKanbanSales")
@Slf4j
public class TtKanbanSalesController extends JeecgController<TtKanbanSales, ITtKanbanSalesService> {
@Autowired
private ITtKanbanSalesService ttKanbanSalesService;
/**
*
*
* @param ttKanbanSales
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "tt_kanban_sales-分页列表查询")
@ApiOperation(value="tt_kanban_sales-分页列表查询", notes="tt_kanban_sales-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<TtKanbanSales>> queryPageList(TtKanbanSales ttKanbanSales,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<TtKanbanSales> queryWrapper = QueryGenerator.initQueryWrapper(ttKanbanSales, req.getParameterMap());
Page<TtKanbanSales> page = new Page<TtKanbanSales>(pageNo, pageSize);
IPage<TtKanbanSales> pageList = ttKanbanSalesService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 4
*
* @param ttKanbanSales
* @return
*/
//@AutoLog(value = "tt_kanban_sales-分页列表查询")
@ApiOperation(value="tt_kanban_sales-看板4列表查询", notes="tt_kanban_sales-看板4列表查询")
@GetMapping(value = "/queryList")
public Result<List<TtKanbanSales>> queryList(TtKanbanSales ttKanbanSales) {
QueryWrapper<TtKanbanSales> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("company_id", 1);
List<String> list = new ArrayList<>();
list.add("type_id");
list.add("year_name");
list.add("month_name");
queryWrapper.orderByAsc(list);
List<TtKanbanSales> kanbanSalesList = ttKanbanSalesService.list(queryWrapper);
return Result.OK(kanbanSalesList);
}
/**
*
*
* @param ttKanbanSales
* @return
*/
@AutoLog(value = "tt_kanban_sales-添加")
@ApiOperation(value="tt_kanban_sales-添加", notes="tt_kanban_sales-添加")
//@RequiresPermissions("kanbansales:tt_kanban_sales:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody TtKanbanSales ttKanbanSales) {
ttKanbanSalesService.save(ttKanbanSales);
return Result.OK("添加成功!");
}
/**
*
*
* @param ttKanbanSales
* @return
*/
@AutoLog(value = "tt_kanban_sales-编辑")
@ApiOperation(value="tt_kanban_sales-编辑", notes="tt_kanban_sales-编辑")
//@RequiresPermissions("kanbansales:tt_kanban_sales:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody TtKanbanSales ttKanbanSales) {
ttKanbanSalesService.updateById(ttKanbanSales);
return Result.OK("编辑成功!");
}
/**
* id
*
* @param id
* @return
*/
@AutoLog(value = "tt_kanban_sales-通过id删除")
@ApiOperation(value="tt_kanban_sales-通过id删除", notes="tt_kanban_sales-通过id删除")
//@RequiresPermissions("kanbansales:tt_kanban_sales:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
ttKanbanSalesService.removeById(id);
return Result.OK("删除成功!");
}
/**
*
*
* @param ids
* @return
*/
@AutoLog(value = "tt_kanban_sales-批量删除")
@ApiOperation(value="tt_kanban_sales-批量删除", notes="tt_kanban_sales-批量删除")
//@RequiresPermissions("kanbansales:tt_kanban_sales:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.ttKanbanSalesService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* id
*
* @param id
* @return
*/
//@AutoLog(value = "tt_kanban_sales-通过id查询")
@ApiOperation(value="tt_kanban_sales-通过id查询", notes="tt_kanban_sales-通过id查询")
@GetMapping(value = "/queryById")
public Result<TtKanbanSales> queryById(@RequestParam(name="id",required=true) String id) {
TtKanbanSales ttKanbanSales = ttKanbanSalesService.getById(id);
if(ttKanbanSales==null) {
return Result.error("未找到对应数据");
}
return Result.OK(ttKanbanSales);
}
/**
* excel
*
* @param request
* @param ttKanbanSales
*/
//@RequiresPermissions("kanbansales:tt_kanban_sales:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, TtKanbanSales ttKanbanSales) {
return super.exportXls(request, ttKanbanSales, TtKanbanSales.class, "tt_kanban_sales");
}
/**
* excel
*
* @param request
* @param response
* @return
*/
//@RequiresPermissions("kanbansales:tt_kanban_sales:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, TtKanbanSales.class);
}
}

@ -0,0 +1,59 @@
package org.jeecg.modules.demo.kanbansales.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: tt_kanban_sales
* @Author: jeecg-boot
* @Date: 2023-02-05
* @Version: V1.0
*/
@Data
@TableName("tt_kanban_sales")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="tt_kanban_sales对象", description="tt_kanban_sales")
public class TtKanbanSales implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private Integer id;
/**月份名称*/
@Excel(name = "月份名称", width = 15)
@ApiModelProperty(value = "月份名称")
private String monthName;
/**产品类型id1表示底座2表示胶塞*/
@Excel(name = "产品类型id1表示底座2表示胶塞", width = 15)
@ApiModelProperty(value = "产品类型id1表示底座2表示胶塞")
private Integer typeId;
/**销售数量*/
@Excel(name = "销售数量", width = 15)
@ApiModelProperty(value = "销售数量")
private BigDecimal salesQty;
/**公司id, 1表示电气元器件2表示轨道扣件*/
@Excel(name = "公司id, 1表示电气元器件2表示轨道扣件", width = 15)
@ApiModelProperty(value = "公司id, 1表示电气元器件2表示轨道扣件")
private Integer companyId;
/**年份名称*/
@Excel(name = "年份名称", width = 15)
@ApiModelProperty(value = "年份名称")
private String yearName;
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save