Merge remote-tracking branch 'origin/zhc4dev'

zhc4dev
zhc077 2 years ago
commit e3b6ec81d4
  1. 226
      ant-design-vue-jeecg/src/views/productplan/ZyPlanFabricDataList.vue
  2. 198
      ant-design-vue-jeecg/src/views/productplan/ZyPlanFabricList.vue
  3. 10
      ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessList.vue
  4. 331
      ant-design-vue-jeecg/src/views/productplan/ZyPlanTeamDataList.vue
  5. 257
      ant-design-vue-jeecg/src/views/productplan/ZyPlanTeamList.vue
  6. 126
      ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanFabricForm.vue
  7. 106
      ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanFabricForm2.vue
  8. 70
      ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanFabricModal.vue
  9. 60
      ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanFabricModal2.vue
  10. 84
      ant-design-vue-jeecg/src/views/productplan/modules/ZyPlanFabricModal__Style#Drawer.vue
  11. 152
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanFabricController.java
  12. 75
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanProcessController.java
  13. 85
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanFabric.java
  14. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanProcess.java
  15. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/vo/ProcessDataVo.java
  16. 14
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/mapper/ZyPlanFabricMapper.java
  17. 15
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/IZyPlanFabricService.java
  18. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/IZyPlanProcessService.java
  19. 20
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanFabricServiceImpl.java
  20. 41
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanProcessServiceImpl.java

@ -0,0 +1,226 @@
<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 @click="zyStyleFabricHandleAdd(planId)" type="primary" icon="plus">新增</a-button>
<!-- <a-button @click="zyStyleFabricHandleAdd(stationId)" type="primary" icon="plus">新增</a-button>-->
<a-button type="primary" icon="download" @click="handleExportXls('计划面料')">导出</a-button>
<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"
: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">
<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>
<!-- <a-divider type="vertical"/>-->
<!-- <a @click="jumpPage1(record)">制定计划工序</a>-->
</span>
</a-table>
</div>
<!-- <div class="table-operator" style="text-align: right">-->
<!-- <a-button type="primary" @click="saveBatch">提交</a-button>-->
<!-- </div>-->
<zy-plan-fabric-modal @valueChange="valueChange" ref="modalForm" @ok="modalFormOk"></zy-plan-fabric-modal>
<!-- <zy-plan-process-modal @valueChange="valueChange" ref="modalForm" @ok="modalFormOk"></zy-plan-process-modal>-->
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import ZyPlanFabricModal from './modules/ZyPlanFabricModal'
import {getAction, httpAction, downFile, postAction} from "@api/manage";
import {filterObj} from "@/utils/util";
export default {
name: 'ZyPlanFabricDataList',
mixins: [JeecgListMixin, mixinDevice],
components: {
ZyPlanFabricModal
},
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: 'planId'
// },
{
title: '计划ID',
align: "center",
dataIndex: 'planId'
},
{
title: '面料',
align: "center",
dataIndex: 'fabricId_dictText'
},
{
title: '用量(厘米)',
align: "center",
dataIndex: 'amount'
},
{
title: '操作',
dataIndex: 'action',
align: "center",
fixed: "right",
width: 147,
scopedSlots: {customRender: 'action'}
}
],
url: {
list: "/org.jeecg.modules.productplan/zyPlanFabric/list",
delete: "/org.jeecg.modules.productplan/zyPlanFabric/delete",
deleteBatch: "/org.jeecg.modules.productplan/zyPlanFabric/deleteBatch",
exportXlsUrl: "/org.jeecg.modules.productplan/zyPlanFabric/exportXls",
importExcelUrl: "org.jeecg.modules.productplan/zyPlanFabric/importExcel",
},
loadRouteType: false,
planId: "",
dictOptions: {},
superFieldList: [],
}
},
created() {
this.getSuperFieldList();
// this.model = Object.assign({}, record);
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
fanHui() {
this.$router.push({
//
path: '/productplan/ZyplanFabricList',
});
},
valueChange(value) {
if (value) this.loadData()
},
//
loadParameter() {
if (this.loadRouteType === false) {
this.planId = this.$route.query.planId;
// this.biaoTi = this.$route.query.styleNames+"";
console.log("*******传递的planId:" + this.planId)
this.loadRouteType = true;
}
},
loadData(arg) {
if (!this.url.list) {
this.$message.error("请设置url.list属性!")
return
}
// 1
if (arg === 1) {
this.ipagination.current = 1;
}
this.loadParameter();
var params = this.getQueryParams();//
this.loading = true;
console.log("----------------the params:", params);
getAction(this.url.list, params).then((res) => {
if (res.success) {
this.dataSource = res.result.records || res.result;
if (res.result.total) {
this.ipagination.total = res.result.total;
} else {
this.ipagination.total = 0;
}
} else {
this.$message.warning(res.message)
}
}).finally(() => {
// this.dataSource.forEach(item => {
// item['stationName'] = this.stationName;
// item['stationNum'] = this.stationNum;
// })
this.loading = false
})
},
getQueryParams() {
//
let sqp = {}
if (this.superQueryParams) {
sqp['superQueryParams'] = encodeURI(this.superQueryParams)
sqp['superQueryMatchType'] = this.superQueryMatchType
}
var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters);
param.field = this.getQueryField();
param.pageNo = this.ipagination.current;
param.pageSize = this.ipagination.pageSize;
param.planId = this.planId;
return filterObj(param);
},
// initDictConfig() {
// },
getSuperFieldList() {
let fieldList = [];
fieldList.push({type: 'string', value: 'planId', text: '生产计划id', dictCode: ''})
fieldList.push({type: 'string', value: 'stationId', text: '工位id', dictCode: ''})
fieldList.push({type: 'string', value: 'machineIds', text: '设备id列表', dictCode: ''})
fieldList.push({type: 'string', value: 'toolsIds', text: '工具id列表', dictCode: ''})
fieldList.push({type: 'string', value: 'processIds', text: '工序id列表', dictCode: ''})
fieldList.push({type: 'string', value: 'userIds', text: '成员id列表', dictCode: ''})
this.superFieldList = fieldList
},
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -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('计划面料表')">导出</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">-->
<!-- <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>-->
<!-- <img v-else :src="getImgView(text)" 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">-->
<!--&lt;!&ndash; <a @click="handleEdit(record)">编辑</a>&ndash;&gt;-->
<!-- <a-divider type="vertical" />-->
<!-- <a-dropdown>-->
<!--&lt;!&ndash; <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>&ndash;&gt;-->
<!-- <a-menu slot="overlay">-->
<!--&lt;!&ndash; <a-menu-item>&ndash;&gt;-->
<!--&lt;!&ndash; <a @click="handleDetail(record)">详情</a>&ndash;&gt;-->
<!--&lt;!&ndash; </a-menu-item>&ndash;&gt;-->
<!-- <a-menu-item>-->
<!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
<!-- <a>删除</a>-->
<!-- </a-popconfirm>-->
<!-- </a-menu-item>-->
<!-- </a-menu>-->
<!-- </a-dropdown>-->
<!-- </span>-->
<span slot="action" slot-scope="text, record">
<!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
<!-- <a>删除</a>-->
<!-- </a-popconfirm>-->
<!-- <a-divider type="vertical"/>-->
<a @click="jumpPage1(record)">制定计划面料</a>
</span>
</a-table>
</div>
<zy-plan-fabric-modal2 ref="modalForm" @ok="modalFormOk"></zy-plan-fabric-modal2>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ZyPlanFabricModal2 from './modules/ZyPlanFabricModal2'
export default {
name: 'ZyPlanFabricList',
mixins:[JeecgListMixin, mixinDevice],
components: {
ZyPlanFabricModal2
},
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: 'planId'
},
{
title:'面料',
align:"center",
dataIndex: 'fabricId_dictText'
},
{
title:'用量(合计)',
align:"center",
dataIndex: 'amount'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/org.jeecg.modules.productplan/zyPlanFabric/list",
delete: "/org.jeecg.modules.productplan/zyPlanFabric/delete",
deleteBatch: "/org.jeecg.modules.productplan/zyPlanFabric/deleteBatch",
exportXlsUrl: "/org.jeecg.modules.productplan/zyPlanFabric/exportXls",
importExcelUrl: "org.jeecg.modules.productplan/zyPlanFabric/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
jumpPage1(record) {
this.$router.push({
path: '/productplan/ZyPlanFabricDataList',
query: { //
'planId': record.planId,
// 'stationName': record.stationName,
},
});
},
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'fabricId',text:'面料id',dictCode:''})
fieldList.push({type:'BigDecimal',value:'amount',text:'用量(合计)',dictCode:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -104,7 +104,7 @@
<a>删除</a>
</a-popconfirm>
<a-divider type="vertical"/>
<a @click="jumpPage1(record)">制定计划详情</a>
<a @click="jumpPage1(record)">制定计划工序</a>
</span>
</a-table>
@ -174,8 +174,8 @@ export default {
{
title: '成员',
align: "center",
dataIndex: 'userIds',
scopedSlots: {customRender: 'userIds'}
dataIndex: 'userIds_dictText',
scopedSlots: {customRender: 'userIds_dictText'}
},
{
title: '操作',
@ -187,8 +187,8 @@ export default {
}
],
url: {
// list: "/org.jeecg.modules.productplan/zyPlanProcess/list",
list: "/org.jeecg.modules.productplan/zyPlanProcess/list2",
list: "/org.jeecg.modules.productplan/zyPlanProcess/list",
// list: "/org.jeecg.modules.productplan/zyPlanProcess/list2",
productPlanlist: "/org.jeecg.modules.productplan/zyProductPlan/list",
delete: "/org.jeecg.modules.productplan/zyPlanProcess/delete",
deleteBatch: "/org.jeecg.modules.productplan/zyPlanProcess/deleteBatch",

@ -0,0 +1,331 @@
<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 @click="zyStyleFabricHandleAdd(stationId)" type="primary" icon="plus">新增</a-button>-->
<a-button type="primary" icon="download" @click="handleExportXls('1')">导出</a-button>
<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"
: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">
<!-- <span slot="machineIds_dictText" slot-scope="text, record">-->
<span slot="groupMemberList" slot-scope="record,text">
<a-select mode="multiple"
@select="selectData($event,text)"
style="width: 220px"
placeholder="请选择">
<a-select-option v-for="item in record" :value="item.id">
{{ item.userId }}
</a-select-option>
</a-select>
</span>
<!-- <span slot="toolsList" slot-scope="toolsList">-->
<!-- <a-select style="width: 180px" placeholder="请选择">-->
<!-- <a-select-option v-for="item in toolsList" :value="item.id">-->
<!-- {{ item.name }}-->
<!-- </a-select-option>-->
<!-- </a-select>-->
<!-- </span>-->
<!-- <span slot="machineList" slot-scope="machineList">-->
<!-- <a-select style="width: 180px" placeholder="请选择">-->
<!-- <a-select-option v-for="item in machineList" :value="item.id">-->
<!-- {{ item.name }}-->
<!-- </a-select-option>-->
<!-- </a-select>-->
<!-- </span>-->
</a-table>
</div>
<div class="table-operator" style="text-align: right">
<a-button type="primary" @click="saveBatch">提交</a-button>
</div>
<!-- <zy-plan-process-modal @valueChange="valueChange" ref="modalForm" @ok="modalFormOk"></zy-plan-process-modal>-->
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import ZyPlanProcessModal from './modules/ZyPlanProcessModal2'
import {getAction, httpAction, downFile, postAction} from "@api/manage";
import {filterObj} from "@/utils/util";
export default {
name: 'ZyPlanProcessList',
mixins: [JeecgListMixin, mixinDevice],
components: {
ZyPlanProcessModal
},
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: 'planId'
// },
{
title: '工单编号',
align: "center",
dataIndex: 'workOrderId'
},
{
title: '产品id',
align: "center",
dataIndex: 'productId'
},
{
title: '产品',
align: "center",
dataIndex: 'productName'
},
{
title: '车间',
align: "center",
dataIndex: 'departName'
},
{
title: '工序',
align: "center",
dataIndex: 'processName'
},
{
title: '班组成员',
align: "center",
dataIndex: 'groupMemberList',
width: 150,
scopedSlots: {customRender: 'groupMemberList'}
},
// {
// title: '',
// align: "center",
// dataIndex: 'toolsList',
// width: 150,
// scopedSlots: {customRender: 'toolsList'}
// // scopedSlots: {customRender: this.toolsList}
// },
// {
// title: '',
// align: "center",
// dataIndex: 'machineList',
// width: 150,
// scopedSlots: {customRender: 'machineList'}
// },
{
title: '操作',
dataIndex: 'action',
align: "center",
fixed: "right",
width: 147,
scopedSlots: {customRender: 'action'}
}
],
url: {
list: "/org.jeecg.modules.productplan/zyPlanProcess/getTeamDatalist",
// getTeamDatalistByPlanId: "/org.jeecg.modules.productplan/zyPlanProcess/getTeamDatalistByPlanId",
groupMemberlist: "/groupxMember/list",
addTeamBatch: "/org.jeecg.modules.productplan/zyPlanProcess/addTeamBatch",
// stationMachinelist: "/stationMachine/list",
// productPlanlist: "/org.jeecg.modules.productplan/zyProductPlan/list",
delete: "/org.jeecg.modules.productplan/zyPlanProcess/delete",
// deleteBatch: "/org.jeecg.modules.productplan/zyPlanProcess/deleteBatch",
// exportXlsUrl: "/org.jeecg.modules.productplan/zyPlanProcess/exportXls",
// importExcelUrl: "org.jeecg.modules.productplan/zyPlanProcess/importExcel",
},
loadRouteType: false,
planId: "",
dictOptions: {},
superFieldList: [],
toolsList: [],
machineList: [],
processIds: [],
memberIds: [],
}
},
created() {
this.getSuperFieldList();
// this.model = Object.assign({}, record);
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
saveBatch() {
alert("保存开始")
postAction(this.url.addTeamBatch, this.processIds).then((res) => {
if (res.success) {
this.$message.success(res.message)
this.$emit('ok')
this.close()
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.confirmLoading = false
})
},
fanHui() {
this.$router.push({
path: '/productplan/ZyPlanTeamList',
});
},
//$eventkey
selectData($event, row) {
console.log("group_member key $event=" + $event);
// console.log("group_member key row=" + JSON.stringify(row));
console.log("productProcessId=" + JSON.stringify(row.productProcessId));
this.processIds.push({"processId": row.productProcessId, "userIds": $event});
// for (var i = 0; i < processIds.length; i++) {
console.log("the processIds length:" + this.processIds.length);
},
//
loadParameter() {
if (this.loadRouteType === false) {
this.planId = this.$route.query.planId;
// this.biaoTi = this.$route.query.styleNames+"";
console.log("*******传递的planId:" + this.planId)
this.loadRouteType = true;
}
},
loadData(arg) {
if (!this.url.list) {
this.$message.error("请设置url.list属性!")
return
}
// 1
if (arg === 1) {
this.ipagination.current = 1;
}
this.loadParameter();
var params = this.getQueryParams();//
this.loading = true;
console.log("----------------the params:", params);
getAction(this.url.list, params).then((res) => {
if (res.success) {
this.dataSource = res.result.records || res.result;
if (res.result.total) {
this.ipagination.total = res.result.total;
} else {
this.ipagination.total = 0;
}
} else {
this.$message.warning(res.message)
}
}).finally(() => {
// this.dataSource.forEach(item => {
// item['stationName'] = this.stationName;
// item['stationNum'] = this.stationNum;
// })
this.loading = false
})
},
getQueryParams() {
//
let sqp = {}
if (this.superQueryParams) {
sqp['superQueryParams'] = encodeURI(this.superQueryParams)
sqp['superQueryMatchType'] = this.superQueryMatchType
}
var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters);
param.field = this.getQueryField();
param.pageNo = this.ipagination.current;
param.pageSize = this.ipagination.pageSize;
param.planId = this.planId;
return filterObj(param);
},
// initDictConfig() {
// },
getSuperFieldList() {
let fieldList = [];
fieldList.push({type: 'string', value: 'planId', text: '生产计划id', dictCode: ''})
fieldList.push({type: 'string', value: 'stationId', text: '工位id', dictCode: ''})
fieldList.push({type: 'string', value: 'machineIds', text: '设备id列表', dictCode: ''})
fieldList.push({type: 'string', value: 'toolsIds', text: '工具id列表', dictCode: ''})
fieldList.push({type: 'string', value: 'processIds', text: '工序id列表', dictCode: ''})
fieldList.push({type: 'string', value: 'userIds', text: '成员id列表', dictCode: ''})
this.superFieldList = fieldList
},
// jumpPage1(record) {
// this.$router.push({
// // path: '/productplan/ZyProductPlanList',
// path: '/productplan/ZyPlanProcessDataList',
//
// // query: { //
// // 'stationId': record.id,
// // 'stationName': record.stationName,
// // },
// });
// },
// pf(record) {
// this.$router.push({
// path: '/productplan/ZyPlanProcessAddList',
// query: { //
// }
// });
// getAction("productPlanlist", {id: record.id}).then((res) => {
// if (res.success) {
// this.$router.push({
// path: '/src/views/processassessment/assessmentCourse/ClassOpeningTaskList',
// query: { //
// }
// });
// } else {
// this.$message.error(res.message)
// }
// });
// },
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,257 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('生产计划工序')">导出</a-button>
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"-->
<!-- @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal"
@handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel">
<a-icon type="delete"/>
删除
</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作
<a-icon type="down"/>
</a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a
style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
: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">
<span slot="processId_dictText" slot-scope="text, record">
<a-popover>
<template slot="content">
<p>{{ text }}</p>
</template>
<a style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;display: inline-block;width: 100px">{{ text }}</a>
</a-popover>
</span>
<span slot="stationId_dictText" slot-scope="text, record">
<a-popover>
<template slot="content">
<p>{{ text }}</p>
</template>
<a style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;display: inline-block;width: 100px">{{ text }}</a>
</a-popover>
</span>
<span slot="toolsIds_dictText" slot-scope="text, record">
<a-popover>
<template slot="content">
<p>{{ text }}</p>
</template>
<a style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;display: inline-block;width: 100px">{{ text }}</a>
</a-popover>
</span>
<span slot="machineIds_dictText" slot-scope="text, record">
<a-popover>
<template slot="content">
<p>{{ text }}</p>
</template>
<a style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;display: inline-block;width: 100px">{{ text }}</a>
</a-popover>
</span>
<span slot="userIds" slot-scope="text, record">
<a-popover>
<template slot="content">
<p>{{ text }}</p>
</template>
<a style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;display: inline-block;width: 100px">{{ text }}</a>
</a-popover>
</span>
<span slot="action" slot-scope="text, record">
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
<a-divider type="vertical"/>
<a @click="jumpPage1(record)">制定计划班组</a>
</span>
</a-table>
</div>
<zy-plan-process-modal ref="modalForm" @ok="modalFormOk"></zy-plan-process-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import ZyPlanProcessModal from './modules/ZyPlanProcessModal2'
export default {
name: 'ZyPlanProcessList',
mixins: [JeecgListMixin, mixinDevice],
components: {
ZyPlanProcessModal
},
data() {
return {
description: '生产计划工序管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: "center",
customRender: function (t, r, index) {
return parseInt(index) + 1;
}
},
{
title: '生产计划',
align: "center",
dataIndex: 'planId'
},
{
title: '工序',
align: "center",
dataIndex: 'processId_dictText',
scopedSlots: {customRender: 'stationId_dictText'}
},
{
title: '工位',
align: "center",
dataIndex: 'stationId_dictText',
scopedSlots: {customRender: 'stationId_dictText'}
},
{
title: '设备',
align: "center",
dataIndex: 'machineIds_dictText',
scopedSlots: {customRender: 'machineIds_dictText'}
},
{
title: '工具',
align: "center",
dataIndex: 'toolsIds_dictText',
scopedSlots: {customRender: 'toolsIds_dictText'}
},
{
title: '成员',
align: "center",
dataIndex: 'userIds_dictText',
scopedSlots: {customRender: 'userIds_dictText'}
},
{
title: '操作',
dataIndex: 'action',
align: "center",
fixed: "right",
width: 147,
scopedSlots: {customRender: 'action'}
}
],
url: {
list: "/org.jeecg.modules.productplan/zyPlanProcess/list",
// list: "/org.jeecg.modules.productplan/zyPlanProcess/list2",
productPlanlist: "/org.jeecg.modules.productplan/zyProductPlan/list",
delete: "/org.jeecg.modules.productplan/zyPlanProcess/delete",
deleteBatch: "/org.jeecg.modules.productplan/zyPlanProcess/deleteBatch",
exportXlsUrl: "/org.jeecg.modules.productplan/zyPlanProcess/exportXls",
importExcelUrl: "org.jeecg.modules.productplan/zyPlanProcess/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: 'planId', text: '生产计划id', dictCode: ''})
fieldList.push({type: 'string', value: 'stationId', text: '工位id', dictCode: ''})
fieldList.push({type: 'string', value: 'machineIds', text: '设备id列表', dictCode: ''})
fieldList.push({type: 'string', value: 'toolsIds', text: '工具id列表', dictCode: ''})
fieldList.push({type: 'string', value: 'processIds', text: '工序id列表', dictCode: ''})
fieldList.push({type: 'string', value: 'userIds', text: '成员id列表', dictCode: ''})
this.superFieldList = fieldList
},
jumpPage1(record) {
this.$router.push({
path: '/productplan/ZyPlanTeamDataList',
query: { //
'planId': record.planId,
// 'stationName': record.stationName,
},
});
},
// pf(record) {
// this.$router.push({
// path: '/productplan/ZyPlanProcessAddList',
// query: { //
// }
// });
// getAction("productPlanlist", {id: record.id}).then((res) => {
// if (res.success) {
// this.$router.push({
// path: '/src/views/processassessment/assessmentCourse/ClassOpeningTaskList',
// query: { //
// }
// });
// } else {
// this.$message.error(res.message)
// }
// });
// },
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,126 @@
<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="fabricId">
<!-- <j-multi-select-tag type="checkbox" v-model="model.fabricId" dictCode="zy_fabric,name,id" placeholder="请选择面料" />-->
<j-dict-select-tag type="list" v-model="model.fabricId" dictCode="zy_fabric,name,id" placeholder="请选择面料"/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="用量(厘米)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="amount">
<a-input-number v-model="model.amount" placeholder="请输入用量" 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: 'ZyPlanFabricForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
planId:''
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
fabricId: [
{required: true, message: "面料不能为空"},
],
// status: [
// {required: true,message: ""},
// ],
amount: [
{required: true, message: "用量不能不空"},
{pattern: /^[0-9]{0,1000}$/, message: '用量不能为空且长度为正整数'}
],
},
url: {
add: "/org.jeecg.modules.productplan/zyPlanFabric/add",
edit: "/org.jeecg.modules.productplan/zyPlanFabric/edit",
queryById: "/org.jeecg.modules.productplan/zyPlanFabric/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add(planId) {
this.model.planId = planId;
console.log("Modal层接收到上级参数-planId:" + this.model.planId);
this.edit(this.model);
},
// 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,106 @@
<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="planId">
<!-- <a-input v-model="model.planId" placeholder="请选择生产计划"></a-input>-->
<j-dict-select-tag type="list" v-model="model.planId" dictCode="zy_product_plan,id,id"
placeholder="请选择生产计划"/>
</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: 'ZyPlanFabricForm2',
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: "/org.jeecg.modules.productplan/zyPlanFabric/add",
edit: "/org.jeecg.modules.productplan/zyPlanFabric/edit",
queryById: "/org.jeecg.modules.productplan/zyPlanFabric/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,70 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<zy-plan-fabric-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></zy-plan-fabric-form>
</j-modal>
</template>
<script>
import ZyPlanFabricForm from './ZyPlanFabricForm'
export default {
name: 'ZyPlanFabricModal',
components: {
ZyPlanFabricForm
},
data () {
return {
model:{
planId:'',
},
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add (id) {
this.model.planId=id
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add(id);
})
},
// 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,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<zy-plan-fabric-form2 ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></zy-plan-fabric-form2>
</j-modal>
</template>
<script>
import ZyPlanFabricForm2 from './ZyPlanFabricForm2'
export default {
name: 'ZyPlanFabricModal2',
components: {
ZyPlanFabricForm2
},
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,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<zy-plan-fabric-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></zy-plan-fabric-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 ZyPlanFabricForm from './ZyPlanFabricForm'
export default {
name: 'ZyPlanFabricModal',
components: {
ZyPlanFabricForm
},
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,152 @@
package org.jeecg.modules.productplan.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.productplan.entity.ZyPlanFabric;
import org.jeecg.modules.productplan.service.IZyPlanFabricService;
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-20
* @Version: V1.0
*/
@Api(tags = "计划面料表")
@RestController
@RequestMapping("/org.jeecg.modules.productplan/zyPlanFabric")
@Slf4j
public class ZyPlanFabricController extends JeecgController<ZyPlanFabric, IZyPlanFabricService> {
@Autowired
private IZyPlanFabricService zyPlanFabricService;
/**
* 分页列表查询
*
* @param zyPlanFabric
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "计划面料表-分页列表查询")
@ApiOperation(value = "计划面料表-分页列表查询", notes = "计划面料表-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(ZyPlanFabric zyPlanFabric, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) {
QueryWrapper<ZyPlanFabric> queryWrapper = QueryGenerator.initQueryWrapper(zyPlanFabric, req.getParameterMap());
Page<ZyPlanFabric> page = new Page<ZyPlanFabric>(pageNo, pageSize);
IPage<ZyPlanFabric> pageList = zyPlanFabricService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param zyPlanFabric
* @return
*/
@AutoLog(value = "计划面料表-添加")
@ApiOperation(value = "计划面料表-添加", notes = "计划面料表-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyPlanFabric zyPlanFabric) {
zyPlanFabricService.save(zyPlanFabric);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param zyPlanFabric
* @return
*/
@AutoLog(value = "计划面料表-编辑")
@ApiOperation(value = "计划面料表-编辑", notes = "计划面料表-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody ZyPlanFabric zyPlanFabric) {
zyPlanFabricService.updateById(zyPlanFabric);
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) {
zyPlanFabricService.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.zyPlanFabricService.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) {
ZyPlanFabric zyPlanFabric = zyPlanFabricService.getById(id);
if (zyPlanFabric == null) {
return Result.error("未找到对应数据");
}
return Result.OK(zyPlanFabric);
}
/**
* 导出excel
*
* @param request
* @param zyPlanFabric
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ZyPlanFabric zyPlanFabric) {
return super.exportXls(request, zyPlanFabric, ZyPlanFabric.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, ZyPlanFabric.class);
}
}

@ -1,7 +1,10 @@
package org.jeecg.modules.productplan.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.metadata.PageList;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -10,11 +13,14 @@ 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.exception.JeecgBootException;
import org.jeecg.common.system.base.controller.JeecgController;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.productplan.entity.ZyPlanProcess;
import org.jeecg.modules.productplan.entity.vo.ProcessDataVo;
import org.jeecg.modules.productplan.service.IZyPlanProcessService;
import org.jeecg.modules.team.entity.GroupxMember;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
@ -22,9 +28,7 @@ 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.*;
/**
* @Description: 生产计划工序
@ -111,6 +115,33 @@ public class ZyPlanProcessController extends JeecgController<ZyPlanProcess, IZyP
return Result.OK(processDatalist);
}
@ApiOperation(value = "计划班组管理-查询产品工序&班组", notes = "计划班组管理-查询产品工序&班组")
@GetMapping(value = "/getTeamDatalist")
public Result<?> getTeamDatalist(ZyPlanProcess zyPlanProcess,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ZyPlanProcess> queryWrapper = QueryGenerator.initQueryWrapper(zyPlanProcess, req.getParameterMap());
// Page<ZyPlanProcess> page = new Page<ZyPlanProcess>(pageNo, pageSize);
List<ProcessDataVo> processDatalist = zyPlanProcessService.getTeamDatalist(zyPlanProcess);
// PageList<ProcessDataVo> processDataVos = new PageList<>(processDatalist, processDatalist.size());
return Result.OK(processDatalist);
}
@ApiOperation(value = "计划班组管理-查询产品工序&班组", notes = "计划班组管理-查询产品工序&班组")
@GetMapping(value = "/getTeamDatalistByPlanId")
public Result<?> getTeamDatalistByPlanId(ZyPlanProcess zyPlanProcess,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ZyPlanProcess> queryWrapper = QueryGenerator.initQueryWrapper(zyPlanProcess, req.getParameterMap());
queryWrapper.eq("plan_id", zyPlanProcess.getPlanId());
Page<ZyPlanProcess> page = new Page<ZyPlanProcess>(pageNo, pageSize);
IPage<ZyPlanProcess> pageList = zyPlanProcessService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
@ -125,6 +156,29 @@ public class ZyPlanProcessController extends JeecgController<ZyPlanProcess, IZyP
return Result.OK("添加成功!");
}
// @AutoLog(value = "生产计划工序-添加")
@ApiOperation(value = "计划工序管理-批量添加工序、工位、设备", notes = "计划工序管理-批量添加工序、工位、设备")
@PostMapping(value = "/addProcessBatch")
public Result<?> addProcessBatch(@RequestBody List<ZyPlanProcess> zyPlanProcessList) {
zyPlanProcessService.saveBatch(zyPlanProcessList);
return Result.OK("添加成功!");
}
// @AutoLog(value = "计划班组管理-批量添加成员")
@ApiOperation(value = "计划班组管理-批量添zyPlanProcessList = {ArrayList@21228} size = 7加工序-班组成员", notes = "批量添加工序-班组成员")
@PostMapping(value = "/addTeamBatch")
public Result<?> addTeamBatch(@RequestBody List<ZyPlanProcess> zyPlanProcessList) {
if (!ObjectUtils.isEmpty(zyPlanProcessList)) {
zyPlanProcessList.forEach(e -> {
zyPlanProcessService.update(new LambdaUpdateWrapper<ZyPlanProcess>()
.set(ZyPlanProcess::getUserIds, e.getUserIds())
.eq(ZyPlanProcess::getProcessId, e.getProcessId()));
});
}
return Result.OK("添加成功!");
}
/**
* 编辑
*
@ -145,7 +199,6 @@ public class ZyPlanProcessController extends JeecgController<ZyPlanProcess, IZyP
* @param id
* @return
*/
@AutoLog(value = "生产计划工序-通过id删除")
@ApiOperation(value = "生产计划工序-通过id删除", notes = "生产计划工序-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
@ -159,11 +212,19 @@ public class ZyPlanProcessController extends JeecgController<ZyPlanProcess, IZyP
* @param ids
* @return
*/
@AutoLog(value = "生产计划工序-批量删除")
@ApiOperation(value = "生产计划工序-批量删除", notes = "生产计划工序-批量删除")
@ApiOperation(value = "计划班组管理-批量删除工序-班组成员", notes = "计划班组管理-批量删除工序-班组成员")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
this.zyPlanProcessService.removeByIds(Arrays.asList(ids.split(",")));
List<ZyPlanProcess> zyPlanProcessList = zyPlanProcessService.list(new LambdaQueryWrapper<ZyPlanProcess>().in(ZyPlanProcess::getId, Arrays.asList(ids.split(","))));
if (ObjectUtils.isEmpty(zyPlanProcessList)) throw new JeecgBootException("计划工序数据异常");
List<ZyPlanProcess> updateList = new LinkedList<>();
zyPlanProcessList.forEach(e -> {
ZyPlanProcess en = new ZyPlanProcess();
BeanUtils.copyProperties(e, en);
en.setUserIds("");
updateList.add(en);
});
zyPlanProcessService.updateBatchById(updateList);
return Result.OK("批量删除成功!");
}

@ -0,0 +1,85 @@
package org.jeecg.modules.productplan.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 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: 计划面料表
* @Author: jeecg-boot
* @Date: 2022-12-20
* @Version: V1.0
*/
@Data
@TableName("zy_plan_fabric")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "zy_plan_fabric对象", description = "计划面料表")
public class ZyPlanFabric implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**
* 创建人
*/
@ApiModelProperty(value = "创建人")
private String createBy;
/**
* 创建日期
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
/**
* 更新人
*/
@ApiModelProperty(value = "更新人")
private String updateBy;
/**
* 更新日期
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private Date updateTime;
/**
* 计划id
*/
@Excel(name = "计划id", width = 15)
@ApiModelProperty(value = "计划id")
private String planId;
/**
* 面料id
*/
@Excel(name = "面料id", width = 15)
@ApiModelProperty(value = "面料id")
@Dict(dictTable = "zy_fabric", dicText = "name", dicCode = "id")
private String fabricId;
/**
* 用量合计
*/
@Excel(name = "用量(合计)", width = 15)
@ApiModelProperty(value = "用量(合计)")
private BigDecimal amount;
}

@ -100,6 +100,6 @@ public class ZyPlanProcess implements Serializable {
*/
@Excel(name = "成员id列表", width = 15)
@ApiModelProperty(value = "成员id列表")
// @Dict(dictTable = "sys_user", dicText = "name", dicCode = "id")
@Dict(dictTable = "groupx_member", dicText = "user_id", dicCode = "id")
private String userIds;
}

@ -4,6 +4,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecg.modules.team.entity.GroupxMember;
import org.jeecg.modules.team.entity.Station;
import java.io.Serializable;
@ -16,6 +17,7 @@ public class ProcessDataVo implements Serializable {
private static final long serialVersionUID = 1009888L;
private String id;
//工单id
private String workOrderId;
@ -31,6 +33,9 @@ public class ProcessDataVo implements Serializable {
//工位
private List<Station> stationList;
//班组成员列表
private List<GroupxMember> groupMemberList;
//产品工序id
// @Dict(dictTable ="zy_process",dicText = "process_name",dicCode = "id")
private String productProcessId;

@ -0,0 +1,14 @@
package org.jeecg.modules.productplan.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.productplan.entity.ZyPlanFabric;
/**
* @Description: 计划面料表
* @Author: jeecg-boot
* @Date: 2022-12-20
* @Version: V1.0
*/
public interface ZyPlanFabricMapper extends BaseMapper<ZyPlanFabric> {
}

@ -0,0 +1,15 @@
package org.jeecg.modules.productplan.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.productplan.entity.ZyPlanFabric;
/**
* @Description: 计划面料表
* @Author: jeecg-boot
* @Date: 2022-12-20
* @Version: V1.0
*/
public interface IZyPlanFabricService extends IService<ZyPlanFabric> {
}

@ -16,4 +16,6 @@ import java.util.List;
public interface IZyPlanProcessService extends IService<ZyPlanProcess> {
List<ProcessDataVo> getProcessDatalist(ZyPlanProcess zyPlanProcess);
List<ProcessDataVo> getTeamDatalist(ZyPlanProcess zyPlanProcess);
}

@ -0,0 +1,20 @@
package org.jeecg.modules.productplan.service.impl;
import org.jeecg.modules.productplan.entity.ZyPlanFabric;
import org.jeecg.modules.productplan.mapper.ZyPlanFabricMapper;
import org.jeecg.modules.productplan.service.IZyPlanFabricService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 计划面料表
* @Author: jeecg-boot
* @Date: 2022-12-20
* @Version: V1.0
*/
@Service
public class ZyPlanFabricServiceImpl extends ServiceImpl<ZyPlanFabricMapper, ZyPlanFabric> implements IZyPlanFabricService {
}

@ -16,7 +16,9 @@ import org.jeecg.modules.productplan.service.IZyPlanProcessService;
import org.jeecg.modules.productplan.service.IZyProductPlanService;
import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.service.ISysDepartService;
import org.jeecg.modules.team.entity.GroupxMember;
import org.jeecg.modules.team.entity.Station;
import org.jeecg.modules.team.service.IGroupxMemberService;
import org.jeecg.modules.team.service.IStationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -48,6 +50,8 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl<ZyPlanProcessMapper, Z
private ISysDepartService iSysDepartService;
@Autowired
private IZyProcessService iZyProcessService;
@Autowired
private IGroupxMemberService iGroupxMemberService;
public List<ProcessDataVo> getProcessDatalist(ZyPlanProcess zyPlanProcess) {
@ -83,4 +87,41 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl<ZyPlanProcessMapper, Z
}
return result;
}
@Override
public List<ProcessDataVo> getTeamDatalist(ZyPlanProcess zyPlanProcess) {
//生产计划id
String planId = zyPlanProcess.getPlanId();
ZyProductPlan zyProductPlan = iZyProductPlanService.getById(planId);
if (ObjectUtils.isEmpty(zyPlanProcess)) {
throw new JeecgBootException("生产计划不存在!");
}
//工单id
String productCode = zyProductPlan.getProductCode();
String departId = zyProductPlan.getWorkshopId();
// TODO zy_product产品表,根据工单id获取产品id,
List<ProcessDataVo> result = new LinkedList<>();
//根据产品id获取产品工序列表
// List<ZyProductProcess> productProcessesList = iZyProductProcessService.list(new LambdaQueryWrapper<ZyProductProcess>().eq(ZyProductProcess::getProductId, "产品id"));
List<ZyProductProcess> productProcessesList = iZyProductProcessService.list(new LambdaQueryWrapper<ZyProductProcess>().eq(ZyProductProcess::getProductId, "1"));
if (!ObjectUtils.isEmpty(productProcessesList)) {
SysDepart depart = iSysDepartService.getById(departId);
List<GroupxMember> groupxMemberList = iGroupxMemberService.list(new LambdaQueryWrapper<GroupxMember>().eq(GroupxMember::getGroupxId, zyProductPlan.getTeamId()));
productProcessesList.forEach(e -> {
ProcessDataVo vo = new ProcessDataVo();
// vo.setId()
vo.setProductProcessId(e.getProcessId());
vo.setProcessName(iZyProcessService.getById(e.getProcessId()).getProcessName());
vo.setProductId(e.getProductId());
// vo.setProductName("产品名称")
vo.setWorkOrderId(productCode);
vo.setDepartId(departId);
vo.setDepartName(depart.getDepartName());
// vo.setStationList(stationList);
vo.setGroupMemberList(groupxMemberList);
result.add(vo);
});
}
return result;
}
}

Loading…
Cancel
Save