班组管理功能添加 12.6

zhc4dev
zhc077 2 years ago
parent 8abb8f42c9
commit 53b2f5de85
  1. 207
      ant-design-vue-jeecg/src/views/team/StationList.vue
  2. 175
      ant-design-vue-jeecg/src/views/team/StationMachineList.vue
  3. 173
      ant-design-vue-jeecg/src/views/team/StationToolList.vue
  4. 114
      ant-design-vue-jeecg/src/views/team/modules/StationMachineModal.vue
  5. 134
      ant-design-vue-jeecg/src/views/team/modules/StationMachineModal__Style#Drawer.vue
  6. 134
      ant-design-vue-jeecg/src/views/team/modules/StationModal.vue
  7. 140
      ant-design-vue-jeecg/src/views/team/modules/StationModal__Style#Drawer.vue
  8. 114
      ant-design-vue-jeecg/src/views/team/modules/StationToolModal.vue
  9. 134
      ant-design-vue-jeecg/src/views/team/modules/StationToolModal__Style#Drawer.vue
  10. 14
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/station/controller/StationController.java
  11. 15
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/station/entity/Station.java
  12. 7
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/station/mapper/StationMapper.java
  13. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/station/service/impl/StationServiceImpl.java
  14. 178
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/StationController.java
  15. 152
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/StationMachineController.java
  16. 152
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/controller/StationToolController.java
  17. 87
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/entity/Station.java
  18. 56
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/entity/StationMachine.java
  19. 56
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/entity/StationTool.java
  20. 14
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/mapper/StationMachineMapper.java
  21. 14
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/mapper/StationMapper.java
  22. 14
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/mapper/StationToolMapper.java
  23. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/mapper/xml/StationMachineMapper.xml
  24. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/mapper/xml/StationMapper.xml
  25. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/mapper/xml/StationToolMapper.xml
  26. 15
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/IStationMachineService.java
  27. 15
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/IStationService.java
  28. 15
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/IStationToolService.java
  29. 18
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/impl/StationMachineServiceImpl.java
  30. 19
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/impl/StationServiceImpl.java
  31. 18
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/team/service/impl/StationToolServiceImpl.java
  32. 2
      jeecg-boot/jeecg-boot-module-system/src/main/resources/application-dev.yml

@ -0,0 +1,207 @@
<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 :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="车间ID">
<a-input placeholder="请输入车间ID" v-model="queryParam.departId"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="工位名称">
<a-input placeholder="请输入工位名称" v-model="queryParam.stationName"></a-input>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
</template>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('车间工位管理')">导出</a-button>
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"-->
<!-- @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<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"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
class="j-table-force-nowrap"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<span slot="action1" slot-scope="text, record">
<a @click="jumpPage1(record)">工位设备管理</a>
<a-divider type="vertical"/>
<a @click="jumpPage2(record)">工位工具管理</a>
</span>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical"/>
<a @click="handleDetail(record)">详情</a>
<a-divider type="vertical"/>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</span>
</a-table>
</div>
<!-- table区域-end -->
<!-- 表单区域 -->
<station-modal ref="modalForm" @ok="modalFormOk"></station-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import StationModal from './modules/StationModal'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
export default {
name: "StationList",
mixins: [JeecgListMixin, mixinDevice],
components: {
StationModal
},
data() {
return {
description: '车间工位管理管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: "center",
customRender: function (t, r, index) {
return parseInt(index) + 1;
}
},
{
title: '车间ID',
align: "center",
dataIndex: 'departId'
},
{
title: '车间名称',
align: "center",
dataIndex: 'departName'
},
{
title: '工位名称',
align: "center",
dataIndex: 'stationName'
},
{
title: '工位序号',
align: "center",
dataIndex: 'stationNum'
},
{
title: '备注',
align: "center",
dataIndex: 'description'
},
{
title: '管理模块',
dataIndex: 'action1',
align: "center",
// fixed: "right",
width: 80,
scopedSlots: {customRender: 'action1'}
},
{
title: '操作',
dataIndex: 'action',
align: "center",
width: 60,
scopedSlots: {customRender: 'action'},
}
],
url: {
list: "/team/station/list",
delete: "/team/station/delete",
deleteBatch: "/team/station/deleteBatch",
exportXlsUrl: "/team/station/exportXls",
importExcelUrl: "/team/station/importExcel",
},
}
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
}
},
methods: {
//
jumpPage1(record) {
this.$router.push({
path: '/team/stationMachineList',
// query: { //
// 'id': record.id,
// // 'styleNames': record.styleNames,
// },
});
},
jumpPage2(record) {
this.$router.push({
path: '/team/StationToolList',
// query: { //
// 'id': record.stationId,
// // 'styleNames': record.styleNames,
// },
});
},
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,175 @@
<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 :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="工位ID">
<a-input placeholder="请输入工位ID" v-model="queryParam.stationId"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="设备ID">
<a-input placeholder="请输入设备ID" v-model="queryParam.machineId"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('1')">导出</a-button>
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"-->
<!-- @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel">
<a-icon type="delete"/>
删除
</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作
<a-icon type="down"/>
</a-button>
</a-dropdown>
<a-button type="primary" @click="fanHui()">返回</a-button>
</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"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
class="j-table-force-nowrap"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<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-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<!-- table区域-end -->
<!-- 表单区域 -->
<stationMachine-modal ref="modalForm" @ok="modalFormOk"></stationMachine-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import StationMachineModal from './modules/StationMachineModal'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
export default {
name: "StationMachineList",
mixins: [JeecgListMixin],
components: {
StationMachineModal
},
data() {
return {
description: '1管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: "center",
customRender: function (t, r, index) {
return parseInt(index) + 1;
}
},
{
title: '工位ID',
align: "center",
dataIndex: 'stationId'
},
{
title: '设备ID',
align: "center",
dataIndex: 'machineId'
},
{
title: '操作',
dataIndex: 'action',
align: "center",
scopedSlots: {customRender: 'action'},
}
],
url: {
list: "/stationMachine/list",
delete: "/stationMachine/delete",
deleteBatch: "/stationMachine/deleteBatch",
exportXlsUrl: "/stationMachine/exportXls",
importExcelUrl: "/stationMachine/importExcel",
},
}
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
}
},
methods: {
fanHui() {
this.$router.push({
path: '/team/StationList',
// query: { //
// 'id': record.id,
// 'typeId': record.typeId,
// }
// });
});
},
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,173 @@
<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 :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="工位ID">
<a-input placeholder="请输入工位ID" v-model="queryParam.stationId"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="工具ID">
<a-input placeholder="请输入工具ID" v-model="queryParam.toolsId"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('工序工具管理')">导出</a-button>
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"-->
<!-- @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel">
<a-icon type="delete"/>
删除
</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作
<a-icon type="down"/>
</a-button>
</a-dropdown>
<a-button type="primary" @click="fanHui()">返回</a-button>
</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"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
class="j-table-force-nowrap"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<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-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<!-- table区域-end -->
<!-- 表单区域 -->
<stationTool-modal ref="modalForm" @ok="modalFormOk"></stationTool-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import StationToolModal from './modules/StationToolModal'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
export default {
name: "StationToolList",
mixins: [JeecgListMixin,mixinDevice],
components: {
StationToolModal
},
data() {
return {
description: '工序工具管理管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: "center",
customRender: function (t, r, index) {
return parseInt(index) + 1;
}
},
{
title: '工位ID',
align: "center",
dataIndex: 'stationId'
},
{
title: '工具ID',
align: "center",
dataIndex: 'toolsId'
},
{
title: '操作',
dataIndex: 'action',
align: "center",
scopedSlots: {customRender: 'action'},
}
],
url: {
list: "/stationTool/list",
delete: "/stationTool/delete",
deleteBatch: "/stationTool/deleteBatch",
exportXlsUrl: "/stationTool/exportXls",
importExcelUrl: "/stationTool/importExcel",
},
}
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
}
},
methods: {fanHui() {
this.$router.push({
path: '/team/StationList',
// query: { //
// 'id': record.id,
// 'typeId': record.typeId,
// }
// });
});
},}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,114 @@
<template>
<j-modal
:title="title"
:width="800"
:visible="visible"
:confirmLoading="confirmLoading"
switchFullscreen
@ok="handleOk"
@cancel="handleCancel"
cancelText="关闭">
<a-spin :spinning="confirmLoading">
<a-form-model ref="form" :model="model" :rules="validatorRules">
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="stationId" label="工位ID">
<a-input placeholder="请输入工位ID" v-model="model.stationId" />
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="machineId" label="设备ID">
<a-input placeholder="请输入设备ID" v-model="model.machineId" />
</a-form-model-item>
</a-form-model>
</a-spin>
</j-modal>
</template>
<script>
import { httpAction } from '@/api/manage'
import moment from "moment"
export default {
name: "StationMachineModal",
data () {
return {
title:"操作",
visible: false,
model: {},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules:{
},
url: {
add: "/stationMachine/add",
edit: "/stationMachine/edit",
},
}
},
created () {
},
methods: {
add () {
//
this.edit({});
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
close () {
this.$emit('close');
this.visible = false;
this.$refs.form.clearValidate();
},
handleOk () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
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;
that.close();
})
}else{
return false;
}
})
},
handleCancel () {
this.close()
},
}
}
</script>
<style lang="less" scoped>
</style>

@ -0,0 +1,134 @@
<template>
<a-drawer
:title="title"
:width="800"
placement="right"
:closable="false"
@close="close"
:visible="visible">
<a-spin :spinning="confirmLoading">
<a-form-model ref="form" :model="model" :rules="validatorRules">
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="stationId" label="工位id,uuid,FK,工位表">
<a-input placeholder="请输入工位id,uuid,FK,工位表" v-model="model.stationId" />
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="machineId" label="设备id,uuid,FK,设备表">
<a-input placeholder="请输入设备id,uuid,FK,设备表" v-model="model.machineId" />
</a-form-model-item>
</a-form-model>
</a-spin>
<div class="drawer-bootom-button">
<a-button type="primary" @click="handleOk">确定</a-button>
<a-button type="primary" @click="handleCancel">取消</a-button>
</div>
</a-drawer>
</template>
<script>
import { httpAction } from '@/api/manage'
import moment from "moment"
export default {
name: "StationMachineModal",
data () {
return {
title:"操作",
visible: false,
model: {},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules:{
},
url: {
add: "/org.jeecg.modules.team/stationMachine/add",
edit: "/org.jeecg.modules.team/stationMachine/edit",
},
}
},
created () {
},
methods: {
add () {
//
this.edit({});
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
close () {
this.$emit('close');
this.visible = false;
this.$refs.form.clearValidate();
},
handleOk () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
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;
that.close();
})
}else{
return false;
}
})
},
handleCancel () {
this.close()
},
}
}
</script>
<style lang="less" scoped>
/**Button按钮间距*/
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
/**抽屉按钮样式*/
.drawer-bootom-button {
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,134 @@
<template>
<j-modal
:title="title"
:width="800"
:visible="visible"
:confirmLoading="confirmLoading"
switchFullscreen
@ok="handleOk"
@cancel="handleCancel"
cancelText="关闭">
<a-spin :spinning="confirmLoading">
<a-form-model ref="form" :model="model" :rules="validatorRules">
<!-- <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="departId"-->
<!-- label="车间ID">-->
<!-- <a-input placeholder="请输入车间ID" v-model="model.departId"/>-->
<!-- </a-form-model-item>-->
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="departId" label="车间编号">
<!-- <a-input placeholder="请输入部门编号" v-model="model.departId"/>-->
<j-select-depart placeholder="请选择车间" v-model="model.departId"/>
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="stationName" label="工位名称">
<a-input placeholder="请输入工位名称" v-model="model.stationName"/>
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="stationNum" label="工位序号">
<a-input-number v-model="model.stationNum"/>
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="description" label="备注">
<a-input placeholder="请输入备注" v-model="model.description"/>
</a-form-model-item>
</a-form-model>
</a-spin>
</j-modal>
</template>
<script>
import {httpAction} from '@/api/manage'
import moment from "moment"
export default {
name: "StationModal",
data() {
return {
title: "操作",
visible: false,
model: {},
labelCol: {
xs: {span: 24},
sm: {span: 5},
},
wrapperCol: {
xs: {span: 24},
sm: {span: 16},
},
confirmLoading: false,
validatorRules: {
departId: [
{required: true},
],
stationName: [
{required: true},
],
stationNum: [
{required: true},
],
},
url: {
add: "/team/station/add",
edit: "/team/station/edit",
},
}
},
created() {
},
methods: {
add() {
//
this.edit({});
},
edit(record) {
this.model = Object.assign({}, record);
this.visible = true;
},
close() {
this.$emit('close');
this.visible = false;
this.$refs.form.clearValidate();
},
handleOk() {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if (!this.model.id) {
httpurl += this.url.add;
method = 'post';
} else {
httpurl += this.url.edit;
method = 'put';
}
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;
that.close();
})
} else {
return false;
}
})
},
handleCancel() {
this.close()
},
}
}
</script>
<style lang="less" scoped>
</style>

@ -0,0 +1,140 @@
<template>
<a-drawer
:title="title"
:width="800"
placement="right"
:closable="false"
@close="close"
:visible="visible">
<a-spin :spinning="confirmLoading">
<a-form-model ref="form" :model="model" :rules="validatorRules">
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="departId" label="FK,部门表,最下级的生产部门,即车间">
<a-input placeholder="请输入FK,部门表,最下级的生产部门,即车间" v-model="model.departId" />
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="stationName" label="工位名称">
<a-input placeholder="请输入工位名称" v-model="model.stationName" />
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="stationNum" label="工位序号">
<a-input-number v-model="model.stationNum" />
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="description" label="备注">
<a-input placeholder="请输入备注" v-model="model.description" />
</a-form-model-item>
</a-form-model>
</a-spin>
<div class="drawer-bootom-button">
<a-button type="primary" @click="handleOk">确定</a-button>
<a-button type="primary" @click="handleCancel">取消</a-button>
</div>
</a-drawer>
</template>
<script>
import { httpAction } from '@/api/manage'
import moment from "moment"
export default {
name: "StationModal",
data () {
return {
title:"操作",
visible: false,
model: {},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules:{
},
url: {
add: "/team/station/add",
edit: "/team/station/edit",
},
}
},
created () {
},
methods: {
add () {
//
this.edit({});
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
close () {
this.$emit('close');
this.visible = false;
this.$refs.form.clearValidate();
},
handleOk () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
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;
that.close();
})
}else{
return false;
}
})
},
handleCancel () {
this.close()
},
}
}
</script>
<style lang="less" scoped>
/**Button按钮间距*/
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
/**抽屉按钮样式*/
.drawer-bootom-button {
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,114 @@
<template>
<j-modal
:title="title"
:width="800"
:visible="visible"
:confirmLoading="confirmLoading"
switchFullscreen
@ok="handleOk"
@cancel="handleCancel"
cancelText="关闭">
<a-spin :spinning="confirmLoading">
<a-form-model ref="form" :model="model" :rules="validatorRules">
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="stationId" label="工位ID">
<a-input placeholder="请输入工位ID" v-model="model.stationId" />
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toolsId" label="工具ID">
<a-input placeholder="请输入工具ID" v-model="model.toolsId" />
</a-form-model-item>
</a-form-model>
</a-spin>
</j-modal>
</template>
<script>
import { httpAction } from '@/api/manage'
import moment from "moment"
export default {
name: "StationToolModal",
data () {
return {
title:"操作",
visible: false,
model: {},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules:{
},
url: {
add: "/stationTool/add",
edit: "/stationTool/edit",
},
}
},
created () {
},
methods: {
add () {
//
this.edit({});
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
close () {
this.$emit('close');
this.visible = false;
this.$refs.form.clearValidate();
},
handleOk () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
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;
that.close();
})
}else{
return false;
}
})
},
handleCancel () {
this.close()
},
}
}
</script>
<style lang="less" scoped>
</style>

@ -0,0 +1,134 @@
<template>
<a-drawer
:title="title"
:width="800"
placement="right"
:closable="false"
@close="close"
:visible="visible">
<a-spin :spinning="confirmLoading">
<a-form-model ref="form" :model="model" :rules="validatorRules">
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="stationId" label="工位id,uuid,FK,工位表">
<a-input placeholder="请输入工位id,uuid,FK,工位表" v-model="model.stationId" />
</a-form-model-item>
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="toolsId" label="工具id,uuid,FK,工具表">
<a-input placeholder="请输入工具id,uuid,FK,工具表" v-model="model.toolsId" />
</a-form-model-item>
</a-form-model>
</a-spin>
<div class="drawer-bootom-button">
<a-button type="primary" @click="handleOk">确定</a-button>
<a-button type="primary" @click="handleCancel">取消</a-button>
</div>
</a-drawer>
</template>
<script>
import { httpAction } from '@/api/manage'
import moment from "moment"
export default {
name: "StationToolModal",
data () {
return {
title:"操作",
visible: false,
model: {},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules:{
},
url: {
add: "/org.jeecg.modules.team/stationTool/add",
edit: "/org.jeecg.modules.team/stationTool/edit",
},
}
},
created () {
},
methods: {
add () {
//
this.edit({});
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
close () {
this.$emit('close');
this.visible = false;
this.$refs.form.clearValidate();
},
handleOk () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
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;
that.close();
})
}else{
return false;
}
})
},
handleCancel () {
this.close()
},
}
}
</script>
<style lang="less" scoped>
/**Button按钮间距*/
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
/**抽屉按钮样式*/
.drawer-bootom-button {
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>

@ -43,13 +43,13 @@ import org.jeecg.common.aspect.annotation.AutoLog;
* @Version: V1.0 * @Version: V1.0
*/ */
@Api(tags="工位表") @Api(tags="工位表")
@RestController @RestController(value = "StationControllerOld")
@RequestMapping("/station/station") @RequestMapping("/station/station")
@Slf4j @Slf4j
public class StationController extends JeecgController<Station, IStationService> { public class StationController extends JeecgController<Station, IStationService> {
@Autowired @Autowired
private IStationService stationService; private IStationService stationService;
/** /**
* 分页列表查询 * 分页列表查询
* *
@ -71,7 +71,7 @@ public class StationController extends JeecgController<Station, IStationService>
IPage<Station> pageList = stationService.page(page, queryWrapper); IPage<Station> pageList = stationService.page(page, queryWrapper);
return Result.ok(pageList); return Result.ok(pageList);
} }
/** /**
* 添加 * 添加
* *
@ -85,7 +85,7 @@ public class StationController extends JeecgController<Station, IStationService>
stationService.save(station); stationService.save(station);
return Result.ok("添加成功!"); return Result.ok("添加成功!");
} }
/** /**
* 编辑 * 编辑
* *
@ -99,7 +99,7 @@ public class StationController extends JeecgController<Station, IStationService>
stationService.updateById(station); stationService.updateById(station);
return Result.ok("编辑成功!"); return Result.ok("编辑成功!");
} }
/** /**
* 通过id删除 * 通过id删除
* *
@ -113,7 +113,7 @@ public class StationController extends JeecgController<Station, IStationService>
stationService.removeById(id); stationService.removeById(id);
return Result.ok("删除成功!"); return Result.ok("删除成功!");
} }
/** /**
* 批量删除 * 批量删除
* *
@ -127,7 +127,7 @@ public class StationController extends JeecgController<Station, IStationService>
this.stationService.removeByIds(Arrays.asList(ids.split(","))); this.stationService.removeByIds(Arrays.asList(ids.split(",")));
return Result.ok("批量删除成功!"); return Result.ok("批量删除成功!");
} }
/** /**
* 通过id查询 * 通过id查询
* *

@ -24,7 +24,20 @@ import lombok.experimental.Accessors;
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("station") //@TableName("station")
/**
* station 工位表 station|工位表
* id内部编号varchar32PK
* depart_id部门idvarchar32FK部门表最下级的生产部门即车间
* station_num工位序号int
* station_name工位名称varchar32
* description描述varchar500
* create_by创建人varchar32
* create_time创建时间datetime
*
*根据软件平台V4.0需求重构将station重命名为statoin_old
*/
@TableName("station_old")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@ApiModel(value="station对象", description="工位表") @ApiModel(value="station对象", description="工位表")

@ -1,10 +1,8 @@
package org.jeecg.modules.station.mapper; package org.jeecg.modules.station.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.station.entity.Station;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.station.entity.Station;
import org.springframework.stereotype.Service;
/** /**
* @Description: 工位表 * @Description: 工位表
@ -12,6 +10,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @Date: 2021-11-12 * @Date: 2021-11-12
* @Version: V1.0 * @Version: V1.0
*/ */
@Service(value = "StationMapperOld")
public interface StationMapper extends BaseMapper<Station> { public interface StationMapper extends BaseMapper<Station> {
} }

@ -13,7 +13,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
* @Date: 2021-11-12 * @Date: 2021-11-12
* @Version: V1.0 * @Version: V1.0
*/ */
@Service @Service(value = "StationServiceOld")
public class StationServiceImpl extends ServiceImpl<StationMapper, Station> implements IStationService { public class StationServiceImpl extends ServiceImpl<StationMapper, Station> implements IStationService {
} }

@ -0,0 +1,178 @@
package org.jeecg.modules.team.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.activiti.entity.ActBusiness;
import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.service.ISysDepartService;
import org.jeecg.modules.team.entity.Station;
import org.jeecg.modules.team.service.IStationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* @Description: 车间工位管理
* @Author: jeecg-boot
* @Date: 2022-12-05
* @Version: V1.0
*/
@Slf4j
@Api(tags = "车间工位管理")
@RestController
@RequestMapping("/team/station")
public class StationController extends JeecgController<Station, IStationService> {
@Autowired
private IStationService stationService;
@Autowired
private ISysDepartService iSysDepartService;
/**
* 分页列表查询
*
* @param station
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "车间工位管理-分页列表查询")
@ApiOperation(value = "车间工位管理-分页列表查询", notes = "车间工位管理-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(Station station,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<Station> queryWrapper = QueryGenerator.initQueryWrapper(station, req.getParameterMap());
Page<Station> page = new Page<Station>(pageNo, pageSize);
IPage<Station> pageList = stationService.page(page, queryWrapper);
if (!ObjectUtils.isEmpty(pageList.getRecords())) {
List<Station> records = pageList.getRecords();
List<String> ids = records.stream().map(o -> o.getDepartId()).collect(Collectors.toList());
List<SysDepart> departList = iSysDepartService.list(new LambdaQueryWrapper<SysDepart>().in(SysDepart::getId, ids));
records.forEach(e -> {
departList.forEach(j -> {
if (e.getDepartId().equals(j.getId())) {
e.setDepartName(j.getDepartName());
return;
}
});
});
}
return Result.OK(pageList);
}
/**
* 添加
*
* @param station
* @return
*/
@AutoLog(value = "车间工位管理-添加")
@ApiOperation(value = "车间工位管理-添加", notes = "车间工位管理-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody Station station) {
stationService.save(station);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param station
* @return
*/
@AutoLog(value = "车间工位管理-编辑")
@ApiOperation(value = "车间工位管理-编辑", notes = "车间工位管理-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody Station station) {
stationService.updateById(station);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "车间工位管理-通过id删除")
@ApiOperation(value = "车间工位管理-通过id删除", notes = "车间工位管理-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
stationService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "车间工位管理-批量删除")
@ApiOperation(value = "车间工位管理-批量删除", notes = "车间工位管理-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
this.stationService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "车间工位管理-通过id查询")
@ApiOperation(value = "车间工位管理-通过id查询", notes = "车间工位管理-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
Station station = stationService.getById(id);
return Result.OK(station);
}
/**
* 导出excel
*
* @param request
* @param station
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, Station station) {
return super.exportXls(request, station, Station.class, "车间工位管理");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, Station.class);
}
}

@ -0,0 +1,152 @@
package org.jeecg.modules.team.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.team.entity.StationMachine;
import org.jeecg.modules.team.service.IStationMachineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
/**
* @Description: 工序设备管理
* @Author: jeecg-boot
* @Date: 2022-12-06
* @Version: V1.0
*/
@Slf4j
@Api(tags = "工序设备管理")
@RestController
@RequestMapping("/stationMachine")
public class StationMachineController extends JeecgController<StationMachine, IStationMachineService> {
@Autowired
private IStationMachineService stationMachineService;
/**
* 分页列表查询
*
* @param stationMachine
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "工序设备管理-分页列表查询")
@ApiOperation(value = "工序设备管理-分页列表查询", notes = "工序设备管理-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(StationMachine stationMachine,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<StationMachine> queryWrapper = QueryGenerator.initQueryWrapper(stationMachine, req.getParameterMap());
Page<StationMachine> page = new Page<StationMachine>(pageNo, pageSize);
IPage<StationMachine> pageList = stationMachineService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param stationMachine
* @return
*/
@AutoLog(value = "工序设备管理-添加")
@ApiOperation(value = "工序设备管理-添加", notes = "工序设备管理-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody StationMachine stationMachine) {
stationMachineService.save(stationMachine);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param stationMachine
* @return
*/
@AutoLog(value = "工序设备管理-编辑")
@ApiOperation(value = "工序设备管理-编辑", notes = "工序设备管理-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody StationMachine stationMachine) {
stationMachineService.updateById(stationMachine);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "工序设备管理-通过id删除")
@ApiOperation(value = "工序设备管理-通过id删除", notes = "工序设备管理-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
stationMachineService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "工序设备管理-批量删除")
@ApiOperation(value = "工序设备管理-批量删除", notes = "工序设备管理-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
this.stationMachineService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "工序设备管理-通过id查询")
@ApiOperation(value = "工序设备管理-通过id查询", notes = "工序设备管理-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
StationMachine stationMachine = stationMachineService.getById(id);
return Result.OK(stationMachine);
}
/**
* 导出excel
*
* @param request
* @param stationMachine
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, StationMachine stationMachine) {
return super.exportXls(request, stationMachine, StationMachine.class, "工序设备管理");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, StationMachine.class);
}
}

@ -0,0 +1,152 @@
package org.jeecg.modules.team.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.team.entity.StationTool;
import org.jeecg.modules.team.service.IStationToolService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
/**
* @Description: 工序工具管理
* @Author: jeecg-boot
* @Date: 2022-12-06
* @Version: V1.0
*/
@Slf4j
@Api(tags = "工序工具管理")
@RestController
@RequestMapping("/stationTool")
public class StationToolController extends JeecgController<StationTool, IStationToolService> {
@Autowired
private IStationToolService stationToolService;
/**
* 分页列表查询
*
* @param stationTool
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "工序工具管理-分页列表查询")
@ApiOperation(value = "工序工具管理-分页列表查询", notes = "工序工具管理-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(StationTool stationTool,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<StationTool> queryWrapper = QueryGenerator.initQueryWrapper(stationTool, req.getParameterMap());
Page<StationTool> page = new Page<StationTool>(pageNo, pageSize);
IPage<StationTool> pageList = stationToolService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param stationTool
* @return
*/
@AutoLog(value = "工序工具管理-添加")
@ApiOperation(value = "工序工具管理-添加", notes = "工序工具管理-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody StationTool stationTool) {
stationToolService.save(stationTool);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param stationTool
* @return
*/
@AutoLog(value = "工序工具管理-编辑")
@ApiOperation(value = "工序工具管理-编辑", notes = "工序工具管理-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody StationTool stationTool) {
stationToolService.updateById(stationTool);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "工序工具管理-通过id删除")
@ApiOperation(value = "工序工具管理-通过id删除", notes = "工序工具管理-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
stationToolService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "工序工具管理-批量删除")
@ApiOperation(value = "工序工具管理-批量删除", notes = "工序工具管理-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
this.stationToolService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "工序工具管理-通过id查询")
@ApiOperation(value = "工序工具管理-通过id查询", notes = "工序工具管理-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
StationTool stationTool = stationToolService.getById(id);
return Result.OK(stationTool);
}
/**
* 导出excel
*
* @param request
* @param stationTool
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, StationTool stationTool) {
return super.exportXls(request, stationTool, StationTool.class, "工序工具管理");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, StationTool.class);
}
}

@ -0,0 +1,87 @@
package org.jeecg.modules.team.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* @Description: 车间工位管理
* @Author: jeecg-boot
* @Date: 2022-12-05
* @Version: V1.0
*/
@Data
@TableName("station")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "station对象", description = "车间工位管理")
public class Station {
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private String id;
/**
* 创建人
*/
@Excel(name = "创建人", width = 15)
@ApiModelProperty(value = "创建人")
private String createBy;
/**
* 创建日期
*/
@Excel(name = "创建日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
/**
* FK部门表最下级的生产部门即车间
*/
@Excel(name = "车间ID", width = 15)
@ApiModelProperty(value = "FK,部门表,最下级的生产部门,即车间")
private String departId;
/**
* FK部门表最下级的生产部门即车间
*/
@TableField(exist = false)
@Excel(name = "车间名称", width = 15)
@ApiModelProperty(value = "车间")
// @Dict(dictTable = "depart_status")
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
private String departName;
/**
* 工位名称
*/
@Excel(name = "工位名称", width = 15)
@ApiModelProperty(value = "工位名称")
private String stationName;
/**
* 工位序号
*/
@Excel(name = "工位序号", width = 15)
@ApiModelProperty(value = "工位序号")
private Integer stationNum;
/**
* 备注
*/
@Excel(name = "备注", width = 15)
@ApiModelProperty(value = "备注")
private String description;
}

@ -0,0 +1,56 @@
package org.jeecg.modules.team.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* @Description: 工序设备管理
* @Author: jeecg-boot
* @Date: 2022-12-06
* @Version: V1.0
*/
@Data
@TableName("station_machine")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "station_machine对象", description = "工序设备管理")
public class StationMachine {
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private String id;
/**
* 工位iduuidFK工位表
*/
@Excel(name = "工位id,uuid,FK,工位表", width = 15)
@ApiModelProperty(value = "工位id,uuid,FK,工位表")
private String stationId;
/**
* 设备iduuidFK设备表
*/
@Excel(name = "设备id,uuid,FK,设备表", width = 15)
@ApiModelProperty(value = "设备id,uuid,FK,设备表")
private String machineId;
/**
* 创建日期
*/
@Excel(name = "创建日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
}

@ -0,0 +1,56 @@
package org.jeecg.modules.team.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* @Description: 工序工具管理
* @Author: jeecg-boot
* @Date: 2022-12-06
* @Version: V1.0
*/
@Data
@TableName("station_tool")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "station_tool对象", description = "工序工具管理")
public class StationTool {
/**
* id
*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private String id;
/**
* 工位iduuidFK工位表
*/
@Excel(name = "工位id,uuid,FK,工位表", width = 15)
@ApiModelProperty(value = "工位id,uuid,FK,工位表")
private String stationId;
/**
* 工具iduuidFK工具表
*/
@Excel(name = "工具id,uuid,FK,工具表", width = 15)
@ApiModelProperty(value = "工具id,uuid,FK,工具表")
private String toolsId;
/**
* 创建日期
*/
@Excel(name = "创建日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
}

@ -0,0 +1,14 @@
package org.jeecg.modules.team.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.team.entity.StationMachine;
/**
* @Description: 工序设备管理
* @Author: jeecg-boot
* @Date: 2022-12-06
* @Version: V1.0
*/
public interface StationMachineMapper extends BaseMapper<StationMachine> {
}

@ -0,0 +1,14 @@
package org.jeecg.modules.team.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.team.entity.Station;
/**
* @Description: 车间工位管理
* @Author: jeecg-boot
* @Date: 2022-12-05
* @Version: V1.0
*/
public interface StationMapper extends BaseMapper<Station> {
}

@ -0,0 +1,14 @@
package org.jeecg.modules.team.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.team.entity.StationTool;
/**
* @Description: 工序工具管理
* @Author: jeecg-boot
* @Date: 2022-12-06
* @Version: V1.0
*/
public interface StationToolMapper extends BaseMapper<StationTool> {
}

@ -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.team.mapper.StationMachineMapper">
</mapper>

@ -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.team.mapper.StationMapper">
</mapper>

@ -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.team.mapper.StationToolMapper">
</mapper>

@ -0,0 +1,15 @@
package org.jeecg.modules.team.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.team.entity.StationMachine;
/**
* @Description: 工序设备管理
* @Author: jeecg-boot
* @Date: 2022-12-06
* @Version: V1.0
*/
public interface IStationMachineService extends IService<StationMachine> {
}

@ -0,0 +1,15 @@
package org.jeecg.modules.team.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.team.entity.Station;
/**
* @Description: 车间工位管理
* @Author: jeecg-boot
* @Date: 2022-12-05
* @Version: V1.0
*/
public interface IStationService extends IService<Station> {
}

@ -0,0 +1,15 @@
package org.jeecg.modules.team.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.team.entity.StationTool;
/**
* @Description: 工序工具管理
* @Author: jeecg-boot
* @Date: 2022-12-06
* @Version: V1.0
*/
public interface IStationToolService extends IService<StationTool> {
}

@ -0,0 +1,18 @@
package org.jeecg.modules.team.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.team.entity.StationMachine;
import org.jeecg.modules.team.mapper.StationMachineMapper;
import org.jeecg.modules.team.service.IStationMachineService;
import org.springframework.stereotype.Service;
/**
* @Description: 工序设备管理
* @Author: jeecg-boot
* @Date: 2022-12-06
* @Version: V1.0
*/
@Service
public class StationMachineServiceImpl extends ServiceImpl<StationMachineMapper, StationMachine> implements IStationMachineService {
}

@ -0,0 +1,19 @@
package org.jeecg.modules.team.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.team.entity.Station;
import org.jeecg.modules.team.mapper.StationMapper;
import org.jeecg.modules.team.service.IStationService;
import org.springframework.stereotype.Service;
/**
* @Description: 车间工位管理
* @Author: jeecg-boot
* @Date: 2022-12-05
* @Version: V1.0
*/
@Service
public class StationServiceImpl extends ServiceImpl<StationMapper, Station> implements IStationService {
}

@ -0,0 +1,18 @@
package org.jeecg.modules.team.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.team.entity.StationTool;
import org.jeecg.modules.team.mapper.StationToolMapper;
import org.jeecg.modules.team.service.IStationToolService;
import org.springframework.stereotype.Service;
/**
* @Description: 工序工具管理
* @Author: jeecg-boot
* @Date: 2022-12-06
* @Version: V1.0
*/
@Service
public class StationToolServiceImpl extends ServiceImpl<StationToolMapper, StationTool> implements IStationToolService {
}

@ -169,7 +169,7 @@ mybatis-plus:
table-underline: true table-underline: true
configuration: configuration:
# 这个配置会将执行的sql打印出来,在开发或测试的时候可以用 # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
# 返回类型为Map,显示null对应的字段 # 返回类型为Map,显示null对应的字段
call-setters-on-nulls: true call-setters-on-nulls: true
#jeecg专用配置 #jeecg专用配置

Loading…
Cancel
Save