制衣模块相关问题

zhc4dev
赵玉瑞 2 years ago
parent 6c99115e97
commit febda1402c
  1. 9
      ant-design-vue-jeecg/src/views/process/ZyClothsModularList.vue
  2. 158
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue
  3. 122
      ant-design-vue-jeecg/src/views/zyProcessModular/ZyProcessModularList.vue
  4. 10
      ant-design-vue-jeecg/src/views/zystyleaccessories/ZyStyleAccessoriesList.vue
  5. 14
      ant-design-vue-jeecg/src/views/zystylemodular/ZyStyleModularList.vue
  6. 28
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/controller/ZyStyleModularController.java
  7. 5
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/entity/ZyStyleModular.java
  8. 5
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/mapper/ZyStyleModularMapper.java
  9. 5
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/mapper/xml/ZyStyleModularMapper.xml
  10. 57
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyaccessories/controller/ZyStyleAccessoriesController.java
  11. 33
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyProcessModular/controller/ZyProcessModularController.java
  12. 11
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyProcessModular/entity/ZyProcessModular.java
  13. 8
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyProcessModular/mapper/ZyProcessModularMapper.java
  14. 20
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/controller/ZyStyleFabricController.java

@ -5,8 +5,9 @@
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="模块名称">
<a-input placeholder="请输入模块名称" v-model="queryParam.modularName"></a-input>
<a-form-item label="模块编号">
<!--自带模糊查询-->
<a-input placeholder="请输入模块编号" v-model="queryParam.nums"></a-input>
</a-form-item>
</a-col>
@ -20,7 +21,7 @@
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-model-item label="企业" >
<j-select-depart v-model="queryParam.enterpriseId" placeholder="请输入企业名称"/>
<j-select-depart v-model="queryParam.enterpriseId" />
</a-form-model-item>
</a-col>
<!-- </a-row>-->
@ -183,7 +184,7 @@ export default {
}
},
{
title: '编号',
title: '模块编号',
align: "center",
dataIndex: 'nums'
},

@ -5,15 +5,15 @@
<a-row>
<a-col :span="48">
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">
<j-select-depart v-model="model.enterpriseId" />
<j-select-depart v-model="model.enterpriseId"/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col :span="48">
<!-- <a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clothsTypeId">-->
<!-- <j-dict-select-tag type="list" v-model="model.clothsTypeId" dictCode="zy_cloths_type,type_name,id" placeholder="请选择衣服类型" />-->
<!-- </a-form-model-item>-->
<!-- <a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clothsTypeId">-->
<!-- <j-dict-select-tag type="list" v-model="model.clothsTypeId" dictCode="zy_cloths_type,type_name,id" placeholder="请选择衣服类型" />-->
<!-- </a-form-model-item>-->
<a-form-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clothsTypeId">
<j-tree-select v-model="model.clothsTypeId"
dict="zy_cloths_type,type_name,id"
@ -36,17 +36,17 @@
<a-row>
<a-col :span="48">
<a-form-model-item label="部件名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partsName">
<a-input v-model="model.partsName" placeholder="请输入部件名称" ></a-input>
<a-input v-model="model.partsName" placeholder="请输入部件名称"></a-input>
</a-form-model-item>
</a-col>
</a-row>
<!-- <a-row>-->
<!-- <a-col :span="48">-->
<!-- <a-form-model-item label="模块" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modularId">-->
<!-- <j-dict-select-tag type="list" v-model="model.modularId" dictCode="zy_cloths_modular,modular_name,id" placeholder="请选择模块" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- </a-row>-->
<!--<a-row>-->
<!-- <a-col :span="48">-->
<!-- <a-form-model-item label="模块" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modularId">-->
<!-- <j-dict-select-tag type="list" v-model="model.modularId" dictCode="zy_cloths_modular,modular_name,id" placeholder="请选择模块" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!--</a-row>-->
<a-row>
<a-col :span="48">
@ -67,54 +67,43 @@
<a-row>
<a-col :span="48">
<a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pictureUrl">
<j-image-upload isMultiple v-model="model.pictureUrl" ></j-image-upload>
<j-image-upload isMultiple v-model="model.pictureUrl"></j-image-upload>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">-->
<!-- <j-select-depart v-model="model.enterpriseId" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!--<a-col :span="24">-->
<!-- <a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">-->
<!-- <j-select-depart v-model="model.enterpriseId" />-->
<!-- </a-form-model-item>-->
<!--</a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clothsTypeId">-->
<!-- <j-dict-select-tag type="list" v-model="model.clothsTypeId" dictCode="zy_cloths_type,type_name,id" placeholder="请选择衣服类型" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="部件名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partsName">-->
<!-- <a-input v-model="model.partsName" placeholder="请输入部件名称" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="模块" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modularId">-->
<!-- <j-dict-select-tag type="list" v-model="model.modularId" dictCode="zy_cloths_modular,modular_name,id" placeholder="请选择模块" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="部件类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="componentType">-->
<!-- <a-input v-model="model.componentType" placeholder="请输入部件类型" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="description">-->
<!-- <a-textarea v-model="model.description" rows="4" placeholder="请输入描述"/>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pictureUrl">-->
<!-- <j-image-upload isMultiple v-model="model.pictureUrl" ></j-image-upload>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!--<a-col :span="24">-->
<!-- <a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clothsTypeId">-->
<!-- <j-dict-select-tag type="list" v-model="model.clothsTypeId" dictCode="zy_cloths_type,type_name,id" placeholder="请选择衣服类型" />-->
<!-- </a-form-model-item>-->
<!--</a-col>-->
<!--<a-col :span="24">-->
<!-- <a-form-model-item label="模块" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modularId">-->
<!-- <j-dict-select-tag type="list" v-model="model.modularId" dictCode="zy_cloths_modular,modular_name,id" placeholder="请选择模块" />-->
<!-- </a-form-model-item>-->
<!--</a-col>-->
<!--<a-col :span="24">-->
<!-- <a-form-model-item label="描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="description">-->
<!-- <a-textarea v-model="model.description" rows="4" placeholder="请输入描述"/>-->
<!-- </a-form-model-item>-->
<!--</a-col>-->
<!--<a-col :span="24">-->
<!-- <a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pictureUrl">-->
<!-- <j-image-upload isMultiple v-model="model.pictureUrl" ></j-image-upload>-->
<!-- </a-form-model-item>-->
<!--</a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">-->
<!-- <a-input v-model="model.enterpriseId" placeholder="请输入企业" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!--<a-col :span="24">-->
<!-- <a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">-->
<!-- <a-input v-model="model.enterpriseId" placeholder="请输入企业" ></a-input>-->
<!-- </a-form-model-item>-->
<!--</a-col>-->
</a-row>
</a-form-model>
@ -124,11 +113,11 @@
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
import JTreeSelect from '@/components/jeecg/JTreeSelect'
import {httpAction, getAction} from '@/api/manage'
import {validateDuplicateValue} from '@/utils/util'
import JTreeSelect from '@/components/jeecg/JTreeSelect'
export default {
export default {
name: 'ZyClothsComponentForm',
components: {
JTreeSelect
@ -141,18 +130,18 @@
required: false
}
},
data () {
data() {
return {
model:{
model: {
nums: '',
},
labelCol: {
xs: { span: 24 },
sm: { span: 4 },
xs: {span: 24},
sm: {span: 4},
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
xs: {span: 24},
sm: {span: 16},
},
confirmLoading: false,
validatorRules: {
@ -160,16 +149,16 @@
// { required: true, message: '!'},
// ],
clothsTypeId: [
{ required: true, message: '请选择服装类型!'},
{required: true, message: '请选择服装类型!'},
],
partsName: [
{ required: true, message: '请输入部件名称!'},
{required: true, message: '请输入部件名称!'},
],
// modularId: [
// { required: true, message: '!'},
// ],
modularType: [
{ required: true, message: '请选择制衣模块类型!'},
{required: true, message: '请选择制衣模块类型!'},
],
},
@ -183,11 +172,11 @@
}
},
computed: {
formDisabled(){
formDisabled() {
return this.disabled
},
},
created () {
created() {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
@ -201,15 +190,14 @@
message: '未查询到数据!'
});
}
this.model.nums = res.result
this.model.nums = res.result;
console.log("制衣部件 编号: " + this.model.nums);
//console.log('res.result')
//console.log(res.result)
//this.confirmLoading = false
// if (this.data.length === 0) {
// this.data.push(res.result)
// }
console.log("制衣部件 编号: "+this.model.nums);
})
},
// bianHao() {
@ -220,14 +208,14 @@
// this.model.nums = number;
// })
// },
add () {
add() {
this.edit(this.modelDefault);
},
edit (record) {
edit(record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
submitForm() {
const that = this;
//
this.$refs.form.validate(valid => {
@ -235,18 +223,18 @@
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
if (!this.model.id) {
httpurl += this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
} else {
httpurl += this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
httpAction(httpurl, this.model, method).then((res) => {
if (res.success) {
that.$message.success(res.message);
that.$emit('ok');
}else{
} else {
that.$message.warning(res.message);
}
}).finally(() => {
@ -257,10 +245,10 @@
})
},
}
}
}
</script>
<style scoped>
.ant-form-item{
.ant-form-item {
margin-bottom: 16px;
}
}
</style>

@ -1,5 +1,5 @@
<template>
<!-- <a-card :bordered="false">-->
<!-- <a-card :bordered="false">-->
<a-modal
width="70%"
title=""
@ -13,10 +13,16 @@
<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="模块名称">-->
<!-- <j-dict-select-tag v-model="queryParam.modularId"-->
<!-- dictCode="zy_cloths_modular,modular_name,id" placeholder="请选择模块名称"/>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="模块名称">
<j-dict-select-tag v-model="queryParam.modularId"
dictCode="zy_cloths_modular,modular_name,id" placeholder="请选择模块名称"/>
<a-form-item label="工序代码">
<a-input v-model="queryParam.processCode"
placeholder="请输入工序代码"/>
</a-form-item>
</a-col>
@ -41,24 +47,30 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd1(modularId1)" 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-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>-->
<!-- <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-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-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>
<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>
@ -81,7 +93,8 @@
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt=""
style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
@ -99,25 +112,12 @@
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<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-dropdown>-->
<!-- <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>-->
<!-- <a-menu slot="overlay">-->
<!-- <a-menu-item>-->
<!-- <a @click="handleDetail(record)">详情</a>-->
<!-- </a-menu-item>-->
<!-- <a-menu-item>-->
<!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
<!-- <a>删除</a>-->
<!-- </a-popconfirm>-->
<!-- </a-menu-item>-->
<!-- </a-menu>-->
<!-- </a-dropdown>-->
</span>
</a-table>
@ -130,19 +130,19 @@
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import ZyProcessModularModal from './modules/ZyProcessModularModal'
import {getAction} from "@api/manage";
import {filterObj} from "@/utils/util";
export default {
name: 'ZyProcessModularList',
mixins:[JeecgListMixin, mixinDevice],
mixins: [JeecgListMixin, mixinDevice],
components: {
ZyProcessModularModal
},
data () {
data() {
return {
description: '模块工序表管理页面',
visible: false,
@ -156,36 +156,46 @@ export default {
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
key: 'rowIndex',
width: 60,
align: "center",
customRender: function (t, r, index) {
return parseInt(index) + 1;
}
},
{
title:'模块名称',
align:"center",
title: '模块编号',
align: "center",
dataIndex: 'modularNums'
},
{
title: '模块名称',
align: "center",
dataIndex: 'modularId_dictText'
},
{
title:'工序名称',
align:"center",
title: '工序代码',
align: "center",
dataIndex: 'processCode'
},
{
title: '工序名称',
align: "center",
dataIndex: 'processId_dictText'
},
{
title:'创建时间',
align:"center",
title: '创建时间',
align: "center",
dataIndex: 'createTime'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
align: "center",
fixed: "right",
width: 147,
scopedSlots: {customRender: 'action'}
}
],
url: {
@ -196,8 +206,8 @@ export default {
importExcelUrl: "zyProcessModular/zyProcessModular/importExcel",
},
dictOptions:{},
superFieldList:[],
dictOptions: {},
superFieldList: [],
}
},
created() {
@ -205,15 +215,15 @@ export default {
//this.loadParameter();
},
computed: {
importExcelUrl: function(){
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
edit1(record) {
this.model = Object.assign({}, record);
this.modularId1= this.model.id;
this.biaoTi = record.modularName+"模块工序管理";
this.modularId1 = this.model.id;
this.biaoTi = record.modularName + "模块工序管理";
//console.log(topicid);
this.queryParam.modularId = this.model.id;
//console.log("ID++++++"+ this.queryParam.modularId);
@ -290,12 +300,12 @@ export default {
console.log('Clicked cancel button');
this.visible = false;
},
initDictConfig(){
initDictConfig() {
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'modularId',text:'模块ID',dictCode:''})
fieldList.push({type:'string',value:'processId',text:'工序ID',dictCode:''})
getSuperFieldList() {
let fieldList = [];
fieldList.push({type: 'string', value: 'modularId', text: '模块ID', dictCode: ''})
fieldList.push({type: 'string', value: 'processId', text: '工序ID', dictCode: ''})
this.superFieldList = fieldList
}
}

@ -16,11 +16,11 @@
<!-- v-model="queryParam.styleId" disabled></j-dict-select-tag>-->
<!-- </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.accessNum"></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.accessNum"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="辅料名称">
<j-dict-select-tag placeholder="请选择辅料名称" dictCode="zy_accessories,contents,id"

@ -8,6 +8,13 @@
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-model-item label="工序代码" >
<a-input v-model="queryParam.processCode"
placeholder="请输入工序代码"/>
</a-form-model-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<!-- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a-button type="primary">{{biaoTi}}</a-button>-->
<!-- <a-button type="primary">{{biaoTi}}</a-button>-->
<a-form-model-item label="工序" >
@ -154,6 +161,11 @@ export default {
align: "center",
dataIndex: 'styleId_dictText'
},
{
title:'工序代码',
align:"center",
dataIndex: 'processCode'
},
{
title: '工序',
align: "center",
@ -260,7 +272,7 @@ export default {
param.pageNo = this.ipagination.current;
param.pageSize = this.ipagination.pageSize;
//param.id=this.id;
param.id = this.$route.query.id;
param.styleId = this.$route.query.id;
return filterObj(param);
},
initDictConfig() {

@ -1,5 +1,7 @@
package org.jeecg.modules.demo.zyStyleModular.controller;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@ -11,6 +13,7 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
@ -54,6 +57,9 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class ZyStyleModularController extends JeecgController<ZyStyleModular, IZyStyleModularService> {
@Autowired
private IZyStyleModularService zyStyleModularService;
@Resource
private ZyStyleModularMapper zyStyleModularMapper;
/**
* 分页列表查询
*
@ -67,21 +73,25 @@ public class ZyStyleModularController extends JeecgController<ZyStyleModular, IZ
@ApiOperation(value = "款式工序表-分页列表查询", notes = "款式工序表-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(ZyStyleModular zyStyleModular,
@RequestParam(value = "id", required = false) String id,
@RequestParam(value = "processId", required = false) String processId,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
//QueryWrapper<ZyStyleModular> queryWrapper = QueryGenerator.initQueryWrapper(zyStyleModular, req.getParameterMap());
//System.err.println("id "+id);
//System.err.println("processId "+processId);
QueryWrapper<ZyStyleModular> queryWrapper = new QueryWrapper<>();
queryWrapper.eq(StringUtils.hasText(id), "style_id", id);
queryWrapper.eq(StringUtils.hasText(processId), "process_id", processId);
LambdaQueryWrapper<ZyStyleModular> queryWrapper = new LambdaQueryWrapper<>();
//当从服装款式进入款式工序的时候 会有一个 styleId
queryWrapper.eq(StringUtils.hasText(zyStyleModular.getStyleId()), ZyStyleModular::getStyleId, zyStyleModular.getStyleId());
//在工序页面 根据工序查询的时候 会有一个 processId
queryWrapper.eq(StringUtils.hasText(zyStyleModular.getProcessId()), ZyStyleModular::getProcessId, zyStyleModular.getProcessId());
Page<ZyStyleModular> page = new Page<>(pageNo, pageSize);
IPage<ZyStyleModular> pageList = zyStyleModularService.page(page, queryWrapper);
//List<ZyStyleModular> list = zyStyleModularMapper.selectListByStyleId(id);
//pageList.setRecords(list);
//在工序页面 根据工序代码查询的时候 会有一个 processCode
if (StringUtils.hasText(zyStyleModular.getProcessCode())){
String newProcessCode = "%"+zyStyleModular.getProcessCode()+"%";
List<ZyStyleModular> listByProcessCode = new ArrayList<>(zyStyleModularMapper.getListByProcessCode(newProcessCode));
List<ZyStyleModular> collect = listByProcessCode.stream().filter(zyStyMo -> zyStyMo.getStyleId().equals(zyStyleModular.getStyleId())).collect(Collectors.toList());
pageList.setRecords(collect);
}
pageList.getRecords().forEach(zyStyMo -> zyStyMo.setProcessCode(zyStyleModularMapper.getCodeById(zyStyMo.getProcessId())));
return Result.OK(pageList);
}

@ -5,6 +5,7 @@ import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
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 lombok.Data;
@ -65,6 +66,10 @@ public class ZyStyleModular implements Serializable {
@Dict(dictTable = "zy_process",dicText = "process_name",dicCode = "id")
private String processId;
/**工序代码*/
@TableField(exist = false)
private String processCode;
/**序号*/
@Excel(name = "序号", width = 15,dicCode = "序号")
@ApiModelProperty(value = "序号")

@ -27,4 +27,9 @@ public interface ZyStyleModularMapper extends BaseMapper<ZyStyleModular> {
@Select("select process_name from zy_process where id = #{processId}")
String getProcessNameByStyleId(String processId);
@Select("select process_code from zy_process where id=#{id}")
String getCodeById(String id);
//简单的用注解 复杂的用xml 复杂的注解处理好像有问题
List<ZyStyleModular> getListByProcessCode(String processCode);
}

@ -7,4 +7,9 @@
FROM zy_style_modular
WHERE style_id = #{styleId}
</select>
<select id="getListByProcessCode" resultType="org.jeecg.modules.demo.zyStyleModular.entity.ZyStyleModular">
SELECT *
FROM zy_style_modular
WHERE process_id IN (SELECT id FROM zy_process WHERE process_code LIKE #{processCode}) LIMIT 0, 1000
</select>
</mapper>

@ -1,24 +1,18 @@
package org.jeecg.modules.demo.zyaccessories.controller;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.accessories.entity.ZyAccessories;
import org.jeecg.modules.demo.accessories.service.IZyAccessoriesService;
import org.jeecg.modules.demo.fabric.service.IZyFabricService;
import org.jeecg.modules.demo.zyaccessories.entity.ZyStyleAccDetailVO;
import org.jeecg.modules.demo.zyaccessories.entity.ZyStyleAccessories;
import org.jeecg.modules.demo.zyaccessories.mapper.ZyStyleAccessoriesMapper;
@ -29,22 +23,13 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.zystylefabric.entity.ZyStyleFabricDetailVo;
import org.jeecg.modules.zystylefabric.mapper.ZyStyleFabricMapper;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
@ -88,35 +73,25 @@ public class ZyStyleAccessoriesController extends JeecgController<ZyStyleAccesso
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
//zyStyleAccessories.getAccessNum() 辅料编号 查询参数 只有查询的时候才会有
// List<ZyAccessories> accessories = new ArrayList<>();
// if (StringUtils.hasText(zyStyleAccessories.getAccessNum())) {
// LambdaQueryWrapper<ZyAccessories> queryWrapper2 = new LambdaQueryWrapper<>();
// queryWrapper2.like(ZyAccessories::getNums, zyStyleAccessories.getAccessNum());
// accessories.addAll(zyAccessoriesService.list());
// }
List<ZyAccessories> accessories = new ArrayList<>();
if (StringUtils.hasText(zyStyleAccessories.getAccessNum())) {
accessories.addAll(zyAccessoriesService.list(new LambdaQueryWrapper<ZyAccessories>().like(ZyAccessories::getNums, zyStyleAccessories.getAccessNum())));
}
QueryWrapper<ZyStyleAccessories> queryWrapper = QueryGenerator.initQueryWrapper(zyStyleAccessories, req.getParameterMap());
Page<ZyStyleAccessories> page = new Page<ZyStyleAccessories>(pageNo, pageSize);
IPage<ZyStyleAccessories> pageList = zyStyleAccessoriesService.page(page, queryWrapper);
IPage<ZyStyleAccessories> pageList = zyStyleAccessoriesService.page(new Page<>(pageNo, pageSize), queryWrapper);
List<ZyStyleAccessories> listRecords = pageList.getRecords();
// if (!ObjectUtils.isEmpty(accessories) && !ObjectUtils.isEmpty(listRecords)) {
// for (ZyAccessories zy : accessories) {
// listRecords.stream()
// .filter(ZyStyleAccessories -> ZyStyleAccessories.getAccessoriesId().equals(zy.getId()))
// .collect(Collectors.toList());
// }
// }
for (ZyStyleAccessories zy : listRecords) {
String typeName = zyStyleFabricMapper.getTypeName(zy.getStyleId());
String num = zyStyleFabricMapper.getAccessoriesNumById(zy.getAccessoriesId());
if (StringUtils.hasText(typeName)) {
zy.setTypeName(typeName);
}
if (StringUtils.hasText(num)) {
zy.setAccessNum(num);
}
if (!ObjectUtils.isEmpty(accessories) && !ObjectUtils.isEmpty(listRecords)) {
List<ZyStyleAccessories> list = new ArrayList<>();
accessories.forEach(zy -> listRecords.stream().filter(ZyStyleAccess -> ZyStyleAccess.getAccessoriesId().equals(zy.getId())).forEachOrdered(list::add));
pageList.setRecords(list.stream().distinct().collect(Collectors.toList()));//去重
}
pageList.getRecords().forEach(zyStyleAccess -> {
String typeName = zyStyleFabricMapper.getTypeName(zyStyleAccess.getStyleId());
String num = zyStyleFabricMapper.getAccessoriesNumById(zyStyleAccess.getAccessoriesId());
if (StringUtils.hasText(typeName)) zyStyleAccess.setTypeName(typeName);
if (StringUtils.hasText(num)) zyStyleAccess.setAccessNum(num);
});
return Result.OK(pageList);
}

@ -11,16 +11,25 @@ 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.demo.base.entity.ZyProcess;
import org.jeecg.modules.demo.base.mapper.ZyProcessMapper;
import org.jeecg.modules.demo.base.service.IZyProcessService;
import org.jeecg.modules.zyProcessModular.entity.ZyProcessModular;
import org.jeecg.modules.zyProcessModular.mapper.ZyProcessModularMapper;
import org.jeecg.modules.zyProcessModular.service.IZyProcessModularService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
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;
import java.util.stream.Collectors;
/**
* @Description: 模块工序表
@ -35,13 +44,17 @@ import java.util.Arrays;
public class ZyProcessModularController extends JeecgController<ZyProcessModular, IZyProcessModularService> {
@Autowired
private IZyProcessModularService zyProcessModularService;
@Autowired
private IZyProcessService zyProcessService;
@Autowired
private ZyProcessModularMapper zyProcessModularMapper;
/**
* 分页列表查询
*
* @param zyProcessModular
* @param pageNo
* @param pageSize
* @param pageNo 当前页的页码
* @param pageSize 当前页的数据条数
* @param req
* @return
*/
@ -55,6 +68,22 @@ public class ZyProcessModularController extends JeecgController<ZyProcessModular
QueryWrapper<ZyProcessModular> queryWrapper = QueryGenerator.initQueryWrapper(zyProcessModular, req.getParameterMap());
Page<ZyProcessModular> page = new Page<ZyProcessModular>(pageNo, pageSize);
IPage<ZyProcessModular> pageList = zyProcessModularService.page(page, queryWrapper);
//在模块工序中 根据工序代码查询的时候 会有一个 processCode
if (StringUtils.hasText(zyProcessModular.getProcessCode())){
//System.err.println(LocalDateTime.now() + " +++ " +zyProcessModular.getProcessCode());
List<ZyProcess> zyProcessList = zyProcessService.list(new LambdaQueryWrapper<ZyProcess>().like(ZyProcess::getProcessCode,zyProcessModular.getProcessCode()));
List<ZyProcessModular> modularList = new ArrayList<>();
zyProcessList.forEach(zyProcess -> {
modularList.addAll(zyProcessModularService.list(new LambdaQueryWrapper<ZyProcessModular>().eq(ZyProcessModular::getProcessId, zyProcess.getId())));
List<ZyProcessModular> collect = modularList.stream().filter(zyPModular -> zyPModular.getModularId().equals(zyProcessModular.getModularId())).collect(Collectors.toList());
pageList.setRecords(collect);
});
}
//不怕空值
pageList.getRecords().forEach(zyProModular -> {
zyProModular.setModularNums(zyProcessModularMapper.getModularNumsByModularId(zyProModular.getModularId()));
zyProModular.setProcessCode(zyProcessModularMapper.getProcessCodeByProcessId(zyProModular.getProcessId()));
});
return Result.OK(pageList);
}

@ -1,6 +1,7 @@
package org.jeecg.modules.zyProcessModular.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;
@ -57,11 +58,21 @@ public class ZyProcessModular implements Serializable {
@ApiModelProperty(value = "模块ID")
@Dict(dictTable = "zy_cloths_modular",dicText = "modular_name",dicCode = "id")
private java.lang.String modularId;
/**模块编号*/
@TableField(exist = false)
private String modularNums;
/**工序ID*/
@Excel(name = "工序ID", width = 15)
@ApiModelProperty(value = "工序ID")
@Dict(dictTable = "zy_process", dicText = "process_name", dicCode = "id")
private java.lang.String processId;
/**工序代码*/
@TableField(exist = false)
private String processCode;
/**序号*/
@Excel(name = "序号", width = 15,dicCode = "序号")
@ApiModelProperty(value = "序号")

@ -1,6 +1,8 @@
package org.jeecg.modules.zyProcessModular.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.zyProcessModular.entity.ZyProcessModular;
/**
@ -9,6 +11,12 @@ import org.jeecg.modules.zyProcessModular.entity.ZyProcessModular;
* @Date: 2022-11-22
* @Version: V1.0
*/
@Mapper
public interface ZyProcessModularMapper extends BaseMapper<ZyProcessModular> {
@Select("select nums from zy_cloths_modular where id = #{modularId}")
String getModularNumsByModularId(String modularId);
@Select("select process_code from zy_process where id = #{processId}")
String getProcessCodeByProcessId(String processId);
}

@ -95,23 +95,16 @@ public class ZyStyleFabricController extends JeecgController<ZyStyleFabric, IZyS
List<ZyStyleFabric> list = zyStyleFabricService.list(queryWrapper);
//fabricNumber 面料编号查询参数 只有查询的时候才会有
if (StringUtils.hasText(fabricNumber)) {
LambdaQueryWrapper<ZyFabric> queryWrapper2 = new LambdaQueryWrapper<>();
queryWrapper2.like( ZyFabric::getFabricNumber,fabricNumber);
List<ZyFabric> listTwo = zyFabricService.list(queryWrapper2);
if (ObjectUtils.isEmpty(listTwo)){
IPage<NewZyStyleFabric> pageList2 = new Page<>(pageNo, pageSize, 0);
List<ZyFabric> listTwo = zyFabricService.list(new LambdaQueryWrapper<ZyFabric>().like(ZyFabric::getFabricNumber, fabricNumber));
if (ObjectUtils.isEmpty(listTwo)) {
IPage<NewZyStyleFabric> pageList2 = new Page<NewZyStyleFabric>(pageNo, pageSize, 0);
return Result.OK(pageList2);
}
List<ZyStyleFabric> zyStyleFabricList = new ArrayList<>();
for (ZyFabric zy : listTwo) {
List<ZyStyleFabric> zyStyleFabrics = zyStyleFabricMapper.getListByFabricId(zy.getId());
zyStyleFabricList.addAll(zyStyleFabrics);
}
//将新查出来的集合在根据styleid 筛选一下
zyStyleFabricList = zyStyleFabricList.stream().filter(ZyStyleFabric -> ZyStyleFabric.getStyleId().equals(id)).collect(Collectors.toList());
listTwo.stream().map(zy -> zyStyleFabricMapper.getListByFabricId(zy.getId())).forEachOrdered(zyStyleFabricList::addAll);
List<ZyStyleFabric> collect = zyStyleFabricList.stream().filter(ZyStyleFabric -> ZyStyleFabric.getStyleId().equals(id)).collect(Collectors.toList());
list.clear();
list.addAll(zyStyleFabricList);
list.addAll(collect);
}
List<NewZyStyleFabric> newZyStyleFabrics = zyStyleFabricService.changeList(list);
IPage<NewZyStyleFabric> pageList = new Page<>(pageNo, pageSize, list.size());
@ -174,6 +167,7 @@ public class ZyStyleFabricController extends JeecgController<ZyStyleFabric, IZyS
zyStyleFabricService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 详情
*/

Loading…
Cancel
Save