Merge remote-tracking branch 'origin/master'

zhc4dev
lenovo 2 years ago
commit 1b29a3edb5
  1. 35
      ant-design-vue-jeecg/src/views/process/modules/ZyProcessComponentModal.vue
  2. 293
      ant-design-vue-jeecg/src/views/process/modules/list/ZyProcessList.vue
  3. 3
      ant-design-vue-jeecg/src/views/zyProcessModular/ZyProcessModularList.vue
  4. 293
      ant-design-vue-jeecg/src/views/zyProcessModular/modules/ZyProcessList.vue
  5. 35
      ant-design-vue-jeecg/src/views/zyProcessModular/modules/ZyProcessModularModal.vue
  6. 38
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyProcessController.java
  7. 6
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/ZyProcessMapper.java
  8. 4
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/IZyProcessService.java
  9. 20
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyProcessServiceImpl.java
  10. 18
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/pro/controller/ZyProcessComponentController.java
  11. 18
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyProcessModular/controller/ZyProcessModularController.java
  12. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/controller/ZyStyleFabricController.java

@ -8,28 +8,44 @@
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<zy-process-component-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></zy-process-component-form>
<!-- <zy-process-component-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></zy-process-component-form>-->
<zy-process ref="realForm"
@onChangeRowKey="chuancan"
@ok="submitCallback"
:disabled="disableSubmit"></zy-process>
</j-modal>
</template>
<script>
import ZyProcessComponentForm from './ZyProcessComponentForm'
import {postAction} from "@api/manage";
import ZyProcess from "@views/process/modules/list/ZyProcessList";
export default {
name: 'ZyProcessComponentModal',
components: {
ZyProcess,
ZyProcessComponentForm
},
data () {
return {
model:{
componentId: '',
processId: '',
},
title:'',
width:800,
visible: false,
disableSubmit: false
disableSubmit: false,
url: {
add: "/pro/zyProcessComponent/add",
}
}
},
methods: {
add1 (componentId1) {
this.model.componentId = componentId1;
//console.log("componentId1: "+componentId1)
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add1(componentId1);
@ -41,12 +57,25 @@
this.$refs.realForm.edit(record);
})
},
chuancan(res) {
this.model.processId = res;
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
// this.$refs.realForm.submitForm();
postAction(this.url.add, this.model).then((res) => {
if (res.success) {
this.$message.success(res.message);
} else {
this.$message.warning(res.message);
}
this.$emit('valueChange', 1)
this.close()
})
},
submitCallback(){
this.$emit('ok');

@ -0,0 +1,293 @@
<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="8" :lg="7" :md="8" :sm="24">
<a-form-item label="工序代码">
<a-input placeholder="请输入工序代码" v-model="queryParam.processCode"></a-input>
</a-form-item>
</a-col>
<a-col :xl="10" :lg="7" :md="8" :sm="24">
<a-form-item label="工序名称">
<a-input placeholder="请输入工序名称" v-model="queryParam.processName"></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>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
</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: onSelectChange1}"
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>
</a-table>
</div>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import {getAction} from "@api/manage";
import {filterObj} from "@/utils/util";
export default {
name: 'ZyProcessList',
mixins: [JeecgListMixin, mixinDevice],
components: {},
data() {
return {
description: 'zy_process管理页面',
model:{
clothStyleId: '',
},
//
columns: [
{
title: '#',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: "center",
customRender: function (t, r, index) {
return parseInt(index) + 1;
}
},
{
title: '工序代码',
align: "center",
dataIndex: 'processCode'
},
{
title: '工序名称',
align: "center",
dataIndex: 'processName'
},
// {
// title:'',
// align:"center",
// dataIndex: 'processDescribe'
// },
{
title: '服装类型',
align: "center",
dataIndex: 'styleId_dictText'
},
{
title: '工序等级',
align: "center",
dataIndex: 'grade'
},
{
title: '工段代码',
align: "center",
dataIndex: 'worksectionCode'
},
{
title:'创建时间',
align:"center",
dataIndex: 'createTime'
},
],
url: {
list: "/base/zyProcess/listScreenThree",
delete: "/base/zyProcess/delete",
deleteBatch: "/base/zyProcess/deleteBatch",
exportXlsUrl: "/base/zyProcess/exportXls",
importExcelUrl: "base/zyProcess/importExcel",
},
//
loadRouteType: false,
styleId: '',
dictOptions: {},
superFieldList: [],
}
},
created() {
// queryParam.styleId=this.styleId
this.getSuperFieldList();
//this.loadParameter();
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig() {
},
add1(id) {
//console.log("list id zy cloths componentId1: "+ id)
//this.model.clothStyleId = id;
this.queryParam.clothsComponentId = id;
//list
this.url.list = '/base/zyProcess/listScreenThree';
this.loadData();
},
onSelectChange1(selectedRowKeys, selectionRows) {
this.selectedRowKeys = selectedRowKeys;
this.selectionRows = selectionRows;
let ids = "";
for (var a = 0; a < this.selectedRowKeys.length; a++) {
ids += this.selectedRowKeys[a] + ",";
}
this.$emit('onChangeRowKey', ids)
},
//
// loadParameter() {
// if (this.loadRouteType === false) {
// this.styleId = this.$route.query.styleId;
// console.log(this.styleId)
// 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;
// getAction(this.url.list, params).then((res) => {
// if (res.success) {
// //update-begin---author:zhangyafei Date:20201118 for------------
// this.dataSource = res.result.records || res.result;
// if (res.result.total) {
// this.ipagination.total = res.result.total;
// } else {
// this.ipagination.total = 0;
// }
// //update-end---author:zhangyafei Date:20201118 for------------
// } else {
// this.$message.warning(res.message)
// }
// }).finally(() => {
// 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.styleId = this.styleId;
// return filterObj(param);
// },
getSuperFieldList() {
let fieldList = [];
fieldList.push({type: 'string', value: 'processCode', text: '工序代码', dictCode: ''})
fieldList.push({type: 'string', value: 'processName', text: '工序名称', dictCode: ''})
fieldList.push({type: 'string', value: 'processDescribe', text: '工艺描述', dictCode: ''})
fieldList.push({type: 'string', value: 'mkExplain', text: '做工说明', dictCode: ''})
fieldList.push({type: 'string', value: 'qualityRequire', text: '品质要求', dictCode: ''})
fieldList.push({type: 'string', value: 'processTime', text: '工序时间', dictCode: ''})
fieldList.push({type: 'double', value: 'price', text: '工序单价', dictCode: ''})
fieldList.push({type: 'string', value: 'grade', text: '工序等级', dictCode: ''})
fieldList.push({type: 'string', value: 'fabricNum', text: '面料代码', dictCode: ''})
fieldList.push({type: 'string', value: 'fabricGrade', text: '面料等级', dictCode: ''})
fieldList.push({type: 'int', value: 'needlePitch', text: '针距(针/厘米)', dictCode: ''})
fieldList.push({type: 'string', value: 'machineId', text: '机器名', dictCode: 'zy_machine,name,id'})
fieldList.push({type: 'string', value: 'manualWide', text: '手工宽放', dictCode: ''})
fieldList.push({type: 'double', value: 'manualTime', text: '手工时间', dictCode: ''})
fieldList.push({type: 'int', value: 'machineSpeed', text: '机器转速', dictCode: ''})
fieldList.push({type: 'string', value: 'machineWide', text: '机器宽放', dictCode: ''})
fieldList.push({type: 'double', value: 'machineTime', text: '机器时间', dictCode: ''})
fieldList.push({type: 'string', value: 'machineFloat', text: '机器浮于', dictCode: ''})
fieldList.push({type: 'string', value: 'bundleWide', text: '绑包宽放', dictCode: ''})
fieldList.push({type: 'string', value: 'bundleTime', text: '绑包时间', dictCode: ''})
fieldList.push({type: 'string', value: 'componentId', text: '部件表', dictCode: 'zy_cloths_component,parts_name,id'})
fieldList.push({type: 'int', value: 'isBottleneck', text: '是否为瓶颈工序', dictCode: ''})
fieldList.push({type: 'string', value: 'enterpriseId', text: '企业名称', dictCode: ''})
fieldList.push({type: 'string', value: 'toolId', text: '工具名称', dictCode: 'zy_tool,name,id'})
fieldList.push({type: 'string', value: 'styleId', text: '款式名称', dictCode: ''})
fieldList.push({type: 'string', value: 'worksectionCode', text: '工段代码', dictCode: ''})
fieldList.push({type: 'string', value: 'contractNum', text: '合同号', dictCode: ''})
fieldList.push({type: 'int', value: 'totalManualTmu', text: '合计(手工TMU)', dictCode: ''})
fieldList.push({type: 'int', value: 'totalMachineTmu', text: '合计(机器TMU)', dictCode: ''})
fieldList.push({type: 'int', value: 'totalMaunal', text: '合计(手工秒)', dictCode: ''})
fieldList.push({type: 'int', value: 'totalMachine', text: '合计(机器秒)', dictCode: ''})
fieldList.push({type: 'string', value: 'image', text: '图片', dictCode: ''})
fieldList.push({type: 'string', value: 'vedio', text: '视频', dictCode: ''})
this.superFieldList = fieldList
},
openDetail(id) {
this.$refs.zyProcessDetail.showModal(id)
// this.$children[0].showModal(id)
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -216,13 +216,14 @@ export default {
this.biaoTi = record.modularName+"模块工序管理";
//console.log(topicid);
this.queryParam.modularId = this.model.id;
console.log("子弹窗拿到的ID++++++:"+ this.queryParam.modularId);
//console.log("ID++++++"+ this.queryParam.modularId);
this.loadData();
this.visible = true;
},
showModal1() {
this.visible = true;
},
//list List
valueChange(value) {
if (value) this.loadData()
},

@ -0,0 +1,293 @@
<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="8" :lg="7" :md="8" :sm="24">
<a-form-item label="工序代码">
<a-input placeholder="请输入工序代码" v-model="queryParam.processCode"></a-input>
</a-form-item>
</a-col>
<a-col :xl="10" :lg="7" :md="8" :sm="24">
<a-form-item label="工序名称">
<a-input placeholder="请输入工序名称" v-model="queryParam.processName"></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>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
</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: onSelectChange1}"
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>
</a-table>
</div>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import {getAction} from "@api/manage";
import {filterObj} from "@/utils/util";
export default {
name: 'ZyProcessList',
mixins: [JeecgListMixin, mixinDevice],
components: {},
data() {
return {
description: 'zy_process管理页面',
model:{
clothStyleId: '',
},
//
columns: [
{
title: '#',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: "center",
customRender: function (t, r, index) {
return parseInt(index) + 1;
}
},
{
title: '工序代码',
align: "center",
dataIndex: 'processCode'
},
{
title: '工序名称',
align: "center",
dataIndex: 'processName'
},
// {
// title:'',
// align:"center",
// dataIndex: 'processDescribe'
// },
{
title: '服装类型',
align: "center",
dataIndex: 'styleId_dictText'
},
{
title: '工序等级',
align: "center",
dataIndex: 'grade'
},
{
title: '工段代码',
align: "center",
dataIndex: 'worksectionCode'
},
{
title:'创建时间',
align:"center",
dataIndex: 'createTime'
},
],
url: {
list: "/base/zyProcess/listScreenTwo",
delete: "/base/zyProcess/delete",
deleteBatch: "/base/zyProcess/deleteBatch",
exportXlsUrl: "/base/zyProcess/exportXls",
importExcelUrl: "base/zyProcess/importExcel",
},
//
loadRouteType: false,
styleId: '',
dictOptions: {},
superFieldList: [],
}
},
created() {
// queryParam.styleId=this.styleId
this.getSuperFieldList();
//this.loadParameter();
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig() {
},
add1(id) {
//console.log("list id zy cloths modularId: "+ id)
//this.model.clothStyleId = id;
this.queryParam.clothsTypeId = id;
//list
this.url.list = '/base/zyProcess/listScreenTwo';
this.loadData();
},
onSelectChange1(selectedRowKeys, selectionRows) {
this.selectedRowKeys = selectedRowKeys;
this.selectionRows = selectionRows;
let ids = "";
for (var a = 0; a < this.selectedRowKeys.length; a++) {
ids += this.selectedRowKeys[a] + ",";
}
this.$emit('onChangeRowKey', ids)
},
//
// loadParameter() {
// if (this.loadRouteType === false) {
// this.styleId = this.$route.query.styleId;
// console.log(this.styleId)
// 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;
// getAction(this.url.list, params).then((res) => {
// if (res.success) {
// //update-begin---author:zhangyafei Date:20201118 for------------
// this.dataSource = res.result.records || res.result;
// if (res.result.total) {
// this.ipagination.total = res.result.total;
// } else {
// this.ipagination.total = 0;
// }
// //update-end---author:zhangyafei Date:20201118 for------------
// } else {
// this.$message.warning(res.message)
// }
// }).finally(() => {
// 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.styleId = this.styleId;
// return filterObj(param);
// },
getSuperFieldList() {
let fieldList = [];
fieldList.push({type: 'string', value: 'processCode', text: '工序代码', dictCode: ''})
fieldList.push({type: 'string', value: 'processName', text: '工序名称', dictCode: ''})
fieldList.push({type: 'string', value: 'processDescribe', text: '工艺描述', dictCode: ''})
fieldList.push({type: 'string', value: 'mkExplain', text: '做工说明', dictCode: ''})
fieldList.push({type: 'string', value: 'qualityRequire', text: '品质要求', dictCode: ''})
fieldList.push({type: 'string', value: 'processTime', text: '工序时间', dictCode: ''})
fieldList.push({type: 'double', value: 'price', text: '工序单价', dictCode: ''})
fieldList.push({type: 'string', value: 'grade', text: '工序等级', dictCode: ''})
fieldList.push({type: 'string', value: 'fabricNum', text: '面料代码', dictCode: ''})
fieldList.push({type: 'string', value: 'fabricGrade', text: '面料等级', dictCode: ''})
fieldList.push({type: 'int', value: 'needlePitch', text: '针距(针/厘米)', dictCode: ''})
fieldList.push({type: 'string', value: 'machineId', text: '机器名', dictCode: 'zy_machine,name,id'})
fieldList.push({type: 'string', value: 'manualWide', text: '手工宽放', dictCode: ''})
fieldList.push({type: 'double', value: 'manualTime', text: '手工时间', dictCode: ''})
fieldList.push({type: 'int', value: 'machineSpeed', text: '机器转速', dictCode: ''})
fieldList.push({type: 'string', value: 'machineWide', text: '机器宽放', dictCode: ''})
fieldList.push({type: 'double', value: 'machineTime', text: '机器时间', dictCode: ''})
fieldList.push({type: 'string', value: 'machineFloat', text: '机器浮于', dictCode: ''})
fieldList.push({type: 'string', value: 'bundleWide', text: '绑包宽放', dictCode: ''})
fieldList.push({type: 'string', value: 'bundleTime', text: '绑包时间', dictCode: ''})
fieldList.push({type: 'string', value: 'componentId', text: '部件表', dictCode: 'zy_cloths_component,parts_name,id'})
fieldList.push({type: 'int', value: 'isBottleneck', text: '是否为瓶颈工序', dictCode: ''})
fieldList.push({type: 'string', value: 'enterpriseId', text: '企业名称', dictCode: ''})
fieldList.push({type: 'string', value: 'toolId', text: '工具名称', dictCode: 'zy_tool,name,id'})
fieldList.push({type: 'string', value: 'styleId', text: '款式名称', dictCode: ''})
fieldList.push({type: 'string', value: 'worksectionCode', text: '工段代码', dictCode: ''})
fieldList.push({type: 'string', value: 'contractNum', text: '合同号', dictCode: ''})
fieldList.push({type: 'int', value: 'totalManualTmu', text: '合计(手工TMU)', dictCode: ''})
fieldList.push({type: 'int', value: 'totalMachineTmu', text: '合计(机器TMU)', dictCode: ''})
fieldList.push({type: 'int', value: 'totalMaunal', text: '合计(手工秒)', dictCode: ''})
fieldList.push({type: 'int', value: 'totalMachine', text: '合计(机器秒)', dictCode: ''})
fieldList.push({type: 'string', value: 'image', text: '图片', dictCode: ''})
fieldList.push({type: 'string', value: 'vedio', text: '视频', dictCode: ''})
this.superFieldList = fieldList
},
openDetail(id) {
this.$refs.zyProcessDetail.showModal(id)
// this.$children[0].showModal(id)
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -8,28 +8,44 @@
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<zy-process-modular-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></zy-process-modular-form>
<!-- <zy-process-modular-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></zy-process-modular-form>-->
<ZyProcess ref="realForm"
@onChangeRowKey="chuancan"
@ok="submitCallback"
:disabled="disableSubmit"></ZyProcess>
</j-modal>
</template>
<script>
import ZyProcessModularForm from './ZyProcessModularForm'
import ZyProcess from "@views/zyProcessModular/modules/ZyProcessList";
import {postAction} from "@api/manage";
export default {
name: 'ZyProcessModularModal',
components: {
ZyProcess,
ZyProcessModularForm
},
data () {
return {
model:{
modularId: '',
processId: '',
},
title:'',
width:800,
visible: false,
disableSubmit: false
disableSubmit: false,
url: {
add: "/zyProcessModular/zyProcessModular/add",
},
}
},
methods: {
add1 (modularId1) {
this.model.modularId = modularId1;
//console.log("modal modularId1: "+ modularId1);
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add1(modularId1);
@ -41,12 +57,25 @@ export default {
this.$refs.realForm.edit(record);
})
},
chuancan(res) {
this.model.processId = res;
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
// this.$refs.realForm.submitForm();
postAction(this.url.add, this.model).then((res) => {
if (res.success) {
this.$message.success(res.message);
} else {
this.$message.warning(res.message);
}
this.$emit('valueChange', 1)
this.close()
})
},
submitCallback(){
this.$emit('ok');

@ -101,6 +101,44 @@ public class ZyProcessController extends JeecgController<ZyProcess, IZyProcessSe
return Result.OK(pageList);
}
/**
* 制衣模块之模块工序中的工序接口 分页列表查询
* 根据服装类型筛选list中的数据
*/
@GetMapping(value = "/listScreenTwo")
public Result<?> queryPageListScreenTwo(ZyProcess zyProcess,
@RequestParam(name = "clothsTypeId", required = true) String clothsTypeId,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
//根据clothsTypeId 查到服装类型的编号 在根据编号进行筛选
String nums = zyProcessService.getNums(clothsTypeId);
QueryWrapper<ZyProcess> queryWrappers = QueryGenerator.initQueryWrapper(zyProcess, req.getParameterMap());
queryWrappers.eq(StringUtils.hasText(nums), "style_id", nums);
Page<ZyProcess> page = new Page<>(pageNo, pageSize);
IPage<ZyProcess> pageList = zyProcessService.page(page, queryWrappers);
return Result.OK(pageList);
}
/**
* 制衣部件之部件工序中的工序接口 分页列表查询
* 根据服装类型筛选list中的数据
*/
@GetMapping(value = "/listScreenThree")
public Result<?> queryPageListScreenThree(ZyProcess zyProcess,
@RequestParam(name = "clothsComponentId", required = true) String clothsComponentId,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
//根据clothsTypeId 查到服装类型的编号 在根据编号进行筛选
String nums = zyProcessService.getNumsByClothsComponentId(clothsComponentId);
QueryWrapper<ZyProcess> queryWrappers = QueryGenerator.initQueryWrapper(zyProcess, req.getParameterMap());
queryWrappers.eq(StringUtils.hasText(nums), "style_id", nums);
Page<ZyProcess> page = new Page<>(pageNo, pageSize);
IPage<ZyProcess> pageList = zyProcessService.page(page, queryWrappers);
return Result.OK(pageList);
}
/**
* 添加
*

@ -34,4 +34,10 @@ public interface ZyProcessMapper extends BaseMapper<ZyProcess> {
@Select("select nums from zy_cloths_type where id=#{typeId}")
String getNums(String typeId);
@Select("select cloths_type_id from zy_cloths_modular where id=#{clothsTypeId}")
String getClothsTypeId(String clothsTypeId);
@Select("select cloths_type_id from zy_cloths_component where id=#{clothsComponentId}")
String getClothsComponentId(String clothsComponentId);
}

@ -24,4 +24,8 @@ public interface IZyProcessService extends IService<ZyProcess> {
/**根据服装类型筛选list中的数据*/
String screenList(String clothStyleId);
String getNums(String clothsTypeId);
String getNumsByClothsComponentId(String clothsComponentId);
}

@ -48,17 +48,29 @@ public class ZyProcessServiceImpl extends ServiceImpl<ZyProcessMapper, ZyProcess
/**
* 根据服装类型筛选list中的数据
*
* @param clothStyleId
* @param clothStyleId zy cloths style中的Id
*/
@Override
public String screenList(String clothStyleId) {
//先拿到zy cloths style 中的typeId
//在拿到zy cloths type 中的nums
//先拿到zy cloths style 中的typeId 再拿到zy cloths type 中的nums
String typeId = baseMapper.getTypeId(clothStyleId);
return baseMapper.getNums(typeId);
}
@Override
public String getNums(String clothsTypeId) {
//先在zy cloths modular 根据id拿到clothsTypeId 再在zy cloths type中拿到编号
String id = baseMapper.getClothsTypeId(clothsTypeId);
return baseMapper.getNums(id);
}
@Override
public String getNumsByClothsComponentId(String clothsComponentId) {
//先在zy cloths component中 根据id拿到clothsTypeId 再在zy cloths type中拿到编号
String id = baseMapper.getClothsComponentId(clothsComponentId);
return baseMapper.getNums(id);
}
@Override
public ZyProcess selectZyprocess(String id) {
List<String> list=baseMapper.selectByIds(id);

@ -1,5 +1,6 @@
package org.jeecg.modules.demo.pro.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;
@ -27,6 +28,7 @@ import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@ -131,8 +133,22 @@ public class ZyProcessComponentController extends JeecgController<ZyProcessCompo
@ApiOperation(value = "zy_process_component-添加", notes = "zy_process_component-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyProcessComponent zyProcessComponent) {
//System.err.println("zyProcessComponent"+ zyProcessComponent+ LocalDateTime.now());
LambdaQueryWrapper<ZyProcessComponent> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ZyProcessComponent::getComponentId,zyProcessComponent.getComponentId());
String[] processIds = zyProcessComponent.getProcessId().split(",");
for (String processId : processIds) {
queryWrapper.eq( ZyProcessComponent::getProcessId,processId);
int count = zyProcessComponentService.count(queryWrapper);
if (count >= 1){
return Result.error("存在已添加过的数据!");
}
zyProcessComponent.setId(null);
zyProcessComponent.setProcessId(processId);
//System.out.println(""+zyProcessComponent + LocalDateTime.now());
zyProcessComponentService.save(zyProcessComponent);
return Result.OK("添加成功!");
}
return Result.OK("添加成功");
}
/**

@ -1,5 +1,6 @@
package org.jeecg.modules.zyProcessModular.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;
@ -18,6 +19,7 @@ import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.time.LocalDateTime;
import java.util.Arrays;
/**
@ -66,8 +68,22 @@ public class ZyProcessModularController extends JeecgController<ZyProcessModular
@ApiOperation(value="模块工序表-添加", notes="模块工序表-添加")
//@RequiresPermissions("org.jeecg.modules.demo:zy_process_modular:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody ZyProcessModular zyProcessModular) {
public Result<Object> add(@RequestBody ZyProcessModular zyProcessModular) {
//System.err.println("zyProcessModular"+ zyProcessModular+ LocalDateTime.now());
LambdaQueryWrapper<ZyProcessModular> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq( ZyProcessModular::getModularId,zyProcessModular.getModularId());
String[] processIds = zyProcessModular.getProcessId().split(",");
for (String processId : processIds) {
queryWrapper.eq( ZyProcessModular::getProcessId,processId);
int count = zyProcessModularService.count(queryWrapper);
if (count >= 1){
return Result.error("存在已添加过的数据!");
}
zyProcessModular.setId(null);
zyProcessModular.setProcessId(processId);
//System.out.println(""+zyProcessModular + LocalDateTime.now());
zyProcessModularService.save(zyProcessModular);
}
return Result.OK("添加成功!");
}

@ -110,7 +110,7 @@ public class ZyStyleFabricController extends JeecgController<ZyStyleFabric, IZyS
queryWrapper.eq("fabric_id", zyStyleFabric.getFabricId());
int a = zyStyleFabricService.count(queryWrapper);
if (a >= 1)
return Result.error("存在添加过的数据!!!");
return Result.error("存在添加过的数据!!!");
zyStyleFabricService.save(zyStyleFabric);
}
return Result.OK("添加成功!");

Loading…
Cancel
Save