修改产品管理部分问题

zhc4dev
赵玉瑞 2 years ago
parent 7df8f7c92f
commit 364467c9dd
  1. 8
      ant-design-vue-jeecg/src/views/process/ZyClothsModularCompentList.vue
  2. 8
      ant-design-vue-jeecg/src/views/process/ZyClothsTypeList.vue
  3. 1
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue
  4. 1
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularCompentForm.vue
  5. 6
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularCompentModal.vue
  6. 1
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularCompentModal__Style#Drawer.vue
  7. 46
      ant-design-vue-jeecg/src/views/process/modules/ZyClothsTypeForm.vue
  8. 6
      ant-design-vue-jeecg/src/views/process/modules/list/ZyClothsComponentList.vue
  9. 31
      ant-design-vue-jeecg/src/views/zyclothsstyle/ZyClothsStyleList.vue
  10. 133
      ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleForm.vue
  11. 12
      ant-design-vue-jeecg/src/views/zystylemodel/ZyStyleModelList.vue
  12. 2
      ant-design-vue-jeecg/src/views/zystylemodule/ZyStyleModuleList.vue
  13. 10
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsModularCompentController.java
  14. 15
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsTypeController.java
  15. 3
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/ZyClothsTypeMapper.java
  16. 5
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/IZyClothsTypeService.java
  17. 43
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsTypeServiceImpl.java
  18. 77
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/controller/ZyClothsStyleController.java
  19. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/entity/ZyClothsStyle.java
  20. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/IZyClothsStyleService.java
  21. 10
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsstyle/service/impl/ZyClothsStyleServiceImpl.java
  22. 22
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/controller/ZyStyleModuleController.java
  23. 3
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/service/impl/ZyStyleModuleServiceImpl.java

@ -200,9 +200,9 @@ export default {
this.yid = this.model.id;
this.biaoTi = record.modularName+" 模块部件管理";
//this.title = record.modularName;
console.log("+++++ this.biaoTi "+ this.biaoTi)
//console.log("+++++ this.biaoTi "+ this.biaoTi)
this.queryParam.modularId = this.model.id;
console.log("+++++ this.queryParam.modularId: " + this.queryParam.modularId);
//console.log("+++++ this.queryParam.modularId: " + this.queryParam.modularId);
this.loadData();
this.visible = true;
},
@ -215,10 +215,10 @@ export default {
setTimeout(() => {
this.visible = false;
this.confirmLoading = false;
}, 2000);
}, 1000);
},
handleCancel(e) {
console.log('Clicked cancel button');
//console.log('Clicked cancel button');
this.visible = false;
},

@ -21,6 +21,14 @@
<!-- <a-input placeholder="请输入类型名称" v-model="queryParam.typeName" ></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 v-model="queryParam.typeId" dictCode="zy_cloths_type, type_name, id"
placeholder="上级类型"></j-dict-select-tag>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="企业名称">
<j-select-depart placeholder="请输入企业名称" v-model="queryParam.enterpriseId" />

@ -215,7 +215,6 @@
// },
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);

@ -98,6 +98,7 @@ export default {
add1(id) {
this.edit(this.modelDefault);
this.model.modularId = id;
console.log("form11111")
},
edit(record) {
this.model = Object.assign({}, record);

@ -37,6 +37,7 @@
visible: false,
disableSubmit: false,
url: {
list: "/base/zyClothsModularCompent/list",
add: "/base/zyClothsModularCompent/add",
edit: "/base/zyClothsModularCompent/edit",
queryById: "/base/zyClothsModularCompent/queryById"
@ -48,7 +49,7 @@
//this.model.componentId = this.$route.query.id;
// id
this.model.modularId = id;
console.log('this.modularId'+id)
console.log('this.modularId + modal33333'+id)
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add1(id);
@ -71,8 +72,11 @@
// this.$refs.realForm.submitForm();
postAction(this.url.add, this.model).then((res) => {
if (res.success) {
console.log(111)
this.$message.success(res.message);
//this.loadData()
} else {
console.log(222)
this.$message.warning(res.message);
}
this.$emit('valueChange', 1)

@ -34,6 +34,7 @@
},
methods: {
add () {
console.log("modal style")
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();

@ -5,7 +5,7 @@
<a-row>
<a-col :span="24">
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">
<j-select-depart v-model="model.enterpriseId" @change="bianhao" />
<j-select-depart v-model="model.enterpriseId" @change="bianHao" />
</a-form-model-item>
</a-col>
<a-col :span="24">
@ -44,9 +44,10 @@
<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 {Message} from "element-ui";
import JTreeSelect from '@/components/jeecg/JTreeSelect';
export default {
name: 'ZyClothsTypeForm',
components: {
@ -105,19 +106,34 @@
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
bianhao(){
var n=6
getAction(this.url.weiyi,null).then((res)=>{
var num=parseInt(res.result,10)+1
console.log(num)
num=num.toString()
while(num.length<n){
num="0"+num
async bianHao(){
const {data: res} = await this.$axios.get('/jeecg-boot/base/zyClothsType/weiyi?id=' + this.model.enterpriseId)
if (res.code !== 200) {
this.$message({
type: 'error',
message: '未查询到数据!'
});
}
console.log(num)
this.model.nums="QIYE"+num;
})
this.model.nums = res.result
console.log('res.result')
console.log(res.result)
//this.confirmLoading = false
// if (this.data.length === 0) {
// this.data.push(res.result)
// }
//console.log("List "+this.model.nums);
// var n=6
// getAction(this.url.weiyi,null).then((res)=>{
// var num=parseInt(res.result,10)+1
// console.log(num)
// num=num.toString()
// while(num.length<n){
// num="0"+num
// }
// console.log(num)
// this.model.nums="QIYE"+num;
// })
},
add () {
this.edit(this.modelDefault);

@ -186,7 +186,7 @@ export default {
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
//fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
@ -228,7 +228,9 @@ export default {
},
add1(id) {
//this.model.fuId = id;
console.log("弹窗list层接受到的id 应该等于modularName: "+id);
// this.loadData()
// console.log("list 22222")
// console.log("listid modularName: "+id);
},
initDictConfig(){
},

@ -165,6 +165,12 @@
}
},
{
title: '服装类型',
align: "center",
dataIndex: 'typeId_dictText'
},
{
title: '款式名称',
align: "center",
@ -181,27 +187,32 @@
align: "center",
dataIndex: 'specification'
},
{
title: '形式',
title: '风格',
align: "center",
dataIndex: 'shape_dictText'
dataIndex: 'characteristic'
},
{
title: '企业',
title: '形式',
align: "center",
dataIndex: 'enterpriseId_dictText'
dataIndex: 'shape_dictText'
},
// {
// title:'',
// align:"center",
// dataIndex: 'foldingPackaging_dictText'
// },
// {
// title:'',
// align:"center",
// dataIndex: 'sewingForm_dictText'
// },
{
title:'缝纫形式',
align:"center",
dataIndex: 'sewingForm_dictText'
},
{
title: '企业',
align: "center",
dataIndex: 'enterpriseId_dictText'
},
{
title: '创建时间',
align: "center",

@ -5,10 +5,12 @@
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row type="flex" justify="space-between">
<a-col :span="12">
<a-form-model-item label="企业" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="enterpriseId" class="label">
<j-select-depart v-model="model.enterpriseId" multi/>
<a-form-model-item label="企业" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="enterpriseId"
class="label">
<j-select-depart v-model="model.enterpriseId" multi @change="bianHao"/>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId">
<j-popup
@ -21,7 +23,7 @@
@input="popupCallback"
/>
</a-form-model-item>
<a-input v-model="model.typeId" hidden/>
<a-input v-model="model.typeId" placeholder="请选择服装类型" hidden/>
</a-col>
<a-col :span="12">
@ -50,7 +52,8 @@
</a-col>
<a-col :span="12">
<a-form-model-item label="规格" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="specification" class="label">
<a-form-model-item label="规格" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="specification"
class="label">
<a-input v-model="model.specification" placeholder="请输入规格"></a-input>
</a-form-model-item>
</a-col>
@ -61,7 +64,8 @@
</a-col>
<a-col :span="12">
<a-form-model-item label="风格" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="characteristic" class="label">
<a-form-model-item label="风格" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="characteristic"
class="label">
<a-input v-model="model.characteristic" placeholder="请输入风格"></a-input>
</a-form-model-item>
</a-col>
@ -72,12 +76,14 @@
</a-col>
<a-col :span="12">
<a-form-model-item label="结构" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="structure" class="label">
<a-form-model-item label="结构" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="structure"
class="label">
<a-input v-model="model.structure" placeholder="请输入结构"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="12">
<a-form-model-item label="折叠搭配及包装" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="foldingPackaging" class="label">
<a-form-model-item label="折叠搭配及包装" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="foldingPackaging"
class="label">
<j-dict-select-tag v-model="model.foldingPackaging" placeholder="请选择折叠搭配及包装"
dict-code="foldingPackaging"/>
</a-form-model-item>
@ -85,7 +91,8 @@
</a-row>
<a-row>
<a-col :span="48">
<a-form-model-item label="产品概述" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="productOverview" class="label" >
<a-form-model-item label="产品概述" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="productOverview"
class="label">
<a-textarea v-model="model.productOverview" placeholder="请输入产品概述"/>
</a-form-model-item>
</a-col>
@ -95,14 +102,16 @@
<!-- <a-form-model-item label="销售地区" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="salesTerritory" :labelAlign="left">-->
<!-- <a-textarea v-model="model.salesTerritory" placeholder="请输入销售地区" />-->
<!-- </a-form-model-item>-->
<a-form-model-item label="销售地区" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="salesTerritory" class="label">
<a-form-model-item label="销售地区" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="salesTerritory"
class="label">
<a-textarea v-model="model.salesTerritory" placeholder="请输入销售地区"/>
</a-form-model-item>
</a-col>
</a-row>
<a-row>
<a-col>
<a-form-model-item label="制衣参数" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="measuringMethod" class="label">
<a-form-model-item label="制衣参数" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="measuringMethod"
class="label">
<a-textarea v-model="model.measuringMethod" placeholder="请输入制衣参数"></a-textarea>
</a-form-model-item>
</a-col>
@ -110,7 +119,8 @@
<a-row>
<a-col>
<a-form-model-item label="配件及标志" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="accLogos" class="label">
<a-form-model-item label="配件及标志" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="accLogos"
class="label">
<a-textarea v-model="model.accLogos" placeholder="请输入配件及标志"/>
</a-form-model-item>
</a-col>
@ -127,7 +137,7 @@
</a-form-model-item>
</a-col>
</a-row>
<!-- <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" multi />-->
@ -152,51 +162,21 @@
<!-- <j-dict-select-tag type="radio" v-model="model.shape" dictCode="style_shape" placeholder="请输入形式" ></j-dict-select-tag>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="nums">-->
<!-- <a-input v-model="model.nums" placeholder="请输入编号" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="款式名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleNames">-->
<!-- <a-input v-model="model.styleNames" placeholder="请输入款式名称" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specification">-->
<!-- <a-input v-model="model.specification" placeholder="请输入规格" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col>-->
<!-- <a-form-model-item label="销售地区" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="salesTerritory" :labelAlign="left">-->
<!-- <a-textarea v-model="model.salesTerritory" rows="4" placeholder="请输入销售地区" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col>-->
<!-- <a-form-model-item label="产品概述" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="productOverview">-->
<!-- <a-textarea v-model="model.productOverview" rows="4" placeholder="请输入产品概述" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="规格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specification">-->
<!-- <a-input v-model="model.specification" placeholder="请输入规格" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="结构" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="structure">-->
<!-- <a-input v-model="model.structure" placeholder="请输入结构" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="风格" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="characteristic">-->
<!-- <a-input v-model="model.characteristic" placeholder="请输入风格" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="测体余量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="error">-->
<!-- <a-input v-model="model.error" placeholder="请输入测体余量" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="效果" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="designSketch">-->
<!-- <j-image-upload isMultiple v-model="model.designSketch" ></j-image-upload>-->
@ -218,12 +198,8 @@
<!-- <a-input v-model="model.quotaMaterials" placeholder="请输入定额用料" ></a-input>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col :span="24">-->
<!-- <a-form-model-item label="折叠搭配及包装" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="foldingPackaging">-->
<!-- <j-dict-select-tag v-model="model.foldingPackaging" placeholder="请选择折叠搭配及包装" dict-code="foldingPackaging" />-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- <a-col>-->
<!-- <a-form-model-item label="配件及标志" :labelCol="labelCol1" :wrapperCol="wrapperCol1" prop="accLogos">-->
<!-- <a-textarea v-model="model.accLogos" rows="4" placeholder="请输入配件及标志" />-->
<!-- </a-form-model-item>-->
@ -233,7 +209,7 @@
<!-- <j-dict-select-tag v-model="model.sewingForm" placeholder="请选择缝纫形式" dict-code="sewingForm"/>-->
<!-- </a-form-model-item>-->
<!-- </a-col>-->
<!-- </a-row>-->
<!-- </a-row>-->
<!-- <a-row>-->
<!-- <a-col :span="24">-->
@ -338,6 +314,7 @@
<!-- </a-col>-->
<!-- </a-row>-->
</a-form-model>
</j-form-container>
</a-spin>
@ -345,6 +322,7 @@
<script>
import {getAction, httpAction} from '@/api/manage'
export default {
@ -402,7 +380,9 @@ export default {
edit: "/zyclothsstyle/zyClothsStyle/edit",
queryById: "/zyclothsstyle/zyClothsStyle/queryById",
//getActionurl
sort:"/zyclothsstyle/zyClothsStyle/sort"
sort: "/zyclothsstyle/zyClothsStyle/sort",
//
enterpriseNum: "/zyclothsstyle/zyClothsStyle/enterpriseNum"
}
}
},
@ -416,6 +396,25 @@ export default {
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
async bianHao() {
if (this.model.id) {
const {data: res} = await this.$axios.get('/jeecg-boot/zyclothsstyle/zyClothsStyle/enterpriseNum?id=' + this.model.enterpriseId)
if (res.code === 500){
this.$message({
type: 'error',
message: '只能选择一个企业!'
});
}else if (res.code !== 200) {
this.$message({
type: 'error',
message: '未查询到数据!'
});
}
this.model.nums = res.result + this.model.nums.substring(4);
console.log('res.result '+this.model.nums)
}
},
add() {
this.edit(this.modelDefault);
},
@ -452,12 +451,20 @@ export default {
})
},
popupCallback(value, row) {
console.log("1222346584" + "++++++"+row)
var n = 8;
async popupCallback(value, row) {
this.model = Object.assign(this.model, row);
getAction(this.url.sort, {id: this.model.typeId}).then((res) => {
console.log("aaaaaa"+res.result);
console.log("1222346584" + "++++++" + row)
const {data: res} = await this.$axios.get('/jeecg-boot/zyclothsstyle/zyClothsStyle/sort?id=' + this.model.typeId)
if (res.code !== 200) {
this.$message({
type: 'error',
message: '未查询到数据!'
});
}
// var n = 8;
// this.model = Object.assign(this.model, row);
// getAction(this.url.sort, {id: this.model.typeId}).then((res) => {
//console.log("aaaaaa" + res.result);
//var num = parseInt(res.result, 10) + 1;
// num = num.toString();
// while (num.length < n) {
@ -465,7 +472,6 @@ export default {
// }
this.model.nums = res.result;
// console.log(this.model.processCode)
})
},
}
}
@ -474,7 +480,8 @@ export default {
.ant-form-item {
margin-bottom: 16px;
}
/deep/ .label label{
text-align:left;
/deep/ .label label {
text-align: left;
}
</style>

@ -5,8 +5,8 @@
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col>
<!-- <a-button type="primary">{{biaoTi}}</a-button>-->
<p style="font-size: 30px;color:#333">{{biaoTi}}</p>
<!-- <a-button type="primary">{{biaoTi}}</a-button>-->
<p style="font-size: 30px;color:#333;padding-left: 40%">{{biaoTi}}</p>
</a-col>
</a-row>
@ -16,7 +16,7 @@
<a-button type="primary" icon="rollback" @click="fanHui()">返回</a-button>
<!-- table区域-begin -->
<div>
<div >
<j-vxe-table
toolbar
:toolbarConfig="toolbarConfig"
@ -32,7 +32,9 @@
:pagination="pagination"
style="margin-top: 8px;"
@pageChange="handlePageChange"
>
<template v-slot:action="props">
<a @click="submitForm(props)">保存</a>
<a-divider type="vertical"/>
@ -72,7 +74,7 @@ export default {
//
toolbarConfig: {
// add remove clearSelection
btn: ['add']
btn: ['add'],
},
validatorRules: {
styleId: [
@ -223,7 +225,7 @@ export default {
loadParameter() {
if (this.loadRouteType === false) {
this.id = this.$route.query.id;
this.biaoTi = this.$route.query.styleNames+"款式型号管理";
this.biaoTi = this.$route.query.styleNames + "款式型号管理";
console.log("**********传递到此层的id:" + this.id);
this.loadRouteType = true;
}

@ -1,6 +1,6 @@
<template>
<a-card :bordered="false">
<p style="font-size: 30px;color:#333">{{biaoTi}}</p>
<p style="font-size: 30px;color:#333; padding-left: 40% ">{{biaoTi}}</p>
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">

@ -16,6 +16,7 @@ import org.jeecg.modules.demo.base.mapper.ZyClothsModularCompentMapper;
import org.jeecg.modules.demo.base.service.IZyClothsComponentService;
import org.jeecg.modules.demo.base.service.IZyClothsModularCompentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
@ -63,13 +64,14 @@ public class ZyClothsModularCompentController extends JeecgController<ZyClothsMo
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
String modularId,
HttpServletRequest req) {
System.out.println("接受到的modularId: "+modularId);
System.out.println("模块部件 接受到的modularId: "+modularId);
QueryWrapper<ZyClothsModularCompent> queryWrapper = QueryGenerator.initQueryWrapper(zyClothsModularCompent, req.getParameterMap());
queryWrapper.eq("modular_id", modularId);
queryWrapper.eq(StringUtils.hasText(modularId),"modular_id", modularId);
//queryWrapper.eq("modular_id", modularId);
Page<ZyClothsModularCompent> page = new Page<ZyClothsModularCompent>(pageNo, pageSize);
IPage<ZyClothsModularCompent> pageList = zyClothsModularCompentService.page(page, queryWrapper);
List<ZyClothsModularCompent> recordList = zyClothsModularCompentMapper.queryList(modularId);
pageList.setRecords(recordList);
//List<ZyClothsModularCompent> recordList = zyClothsModularCompentMapper.queryList(modularId);
//pageList.setRecords(recordList);
List<ZyClothsModularCompent> records = pageList.getRecords();
//Pattern pattern = Pattern.compile("-?[0-9]+(\\.[0-9]+)?");
//只要数字 如果是纯数字 就把它替换了

@ -88,8 +88,8 @@ public class ZyClothsTypeController extends JeecgController<ZyClothsType, IZyClo
return Result.error("类型名称 不能为空");
}
//类型名称输入时没有最大长度限制,提交时才提示。前端校验、后台校验
if (typeName.length() > 10) {
return Result.error("类型名称长度不能超过10");
if (typeName.length() > 50) {
return Result.error("类型名称长度不能超过50");
}
//类型名称 同类型下不重复
if (!StringUtils.isEmpty(zyClothsType.getTypeId())) {
@ -197,12 +197,17 @@ public class ZyClothsTypeController extends JeecgController<ZyClothsType, IZyClo
}
@GetMapping(value = "/weiyi")
public Result<?> weiyi() {
String a=zyClothsTypeService.sort();
public Result<?> weiyi(@RequestParam(name = "id", required = true) String enterpriseId) {
if(StringUtils.isEmpty(enterpriseId)){
return Result.error("请先选择一个企业");
}
String a=zyClothsTypeService.sort(enterpriseId);
if(a==null){
return Result.OK("0");
}
return Result.OK(a.substring(4));
//a.substring(4)截掉前4位
//return Result.OK(a.substring(4));
return Result.OK(a);
}

@ -21,12 +21,15 @@ public interface ZyClothsTypeMapper extends BaseMapper<ZyClothsType> {
@Select("select nums from zy_cloths_type where nums like 'QIYE%' order by nums desc limit 0,1 ")
String sort();
@Select("select nums from zy_cloths_type where order by nums desc limit 0,1 ")
String sortTime();
/**根据部门id拿到部门名称*/
String getEnterprisenameById(String enterpriseId);
/**根据部门名称拿到部门id*/
String getEnterpriseName(String enterpriseName);
/**计数*/
void setEnterpriseId(String id);

@ -14,7 +14,10 @@ public interface IZyClothsTypeService extends IService<ZyClothsType> {
/**nums,编号,varchar,10,非空,不重复,企业缩写(4)+顺序号(6)*/
String generateNumber();
String sort();
String sort(String enterpriseId);
/**根据企业名称拿到企业编号*/
String getEnterpriseNums(String enterpriseName);
void chuliBianHaoWenti();
}

@ -46,8 +46,47 @@ public class ZyClothsTypeServiceImpl extends ServiceImpl<ZyClothsTypeMapper, ZyC
* 顺序号
* */
@Override
public String sort() {
return zyClothsTypeMapper.sort();
public String sort(String enterpriseId) {
//String sort = zyClothsTypeMapper.sort();
String sort = String.format("%06d", orderNumber());
String enterpriseName = zyClothsTypeMapper.getEnterprisenameById(enterpriseId);
//根据企业名称拿到企业编号
String enterpriseNums = getEnterpriseNums(enterpriseName);
return enterpriseNums+sort;
}
@Override
public String getEnterpriseNums(String enterpriseName) {
if (StringUtils.isEmpty(enterpriseName)){
return "NULL";
}
switch (enterpriseName) {
case "生产车间":
return "SCCJ";
case "黄淮服装智能制造中心":
return "HHZZ";
case "销售部":
return "XSBU";
case "顺丰控股股份有限公司":
return "SFKG";
case "设计部":
return "SJBU";
case "仓库":
return "CAKU";
case "黄淮服装销售中心":
return "HHXS";
case "平台":
return "PTAI";
case "上海韵达货运有限公司":
return "SHYD";
case "天中纺织厂":
return "TZFZ";
case "申通快递股份有限公司":
return "STKD";
case "黄淮服装定制网":
return "HHDZ";
}
return enterpriseName;
}
@Override

@ -1,57 +1,34 @@
package org.jeecg.modules.zyclothsstyle.controller;
import java.time.LocalDateTime;
import java.util.*;
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 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.modules.demo.accessories.entity.ZyAccessories;
import org.jeecg.modules.demo.base.entity.*;
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.ZyClothsComponent;
import org.jeecg.modules.demo.base.entity.ZyClothsModular;
import org.jeecg.modules.demo.base.service.IZyClothsComponentService;
import org.jeecg.modules.demo.base.service.IZyClothsModularService;
import org.jeecg.modules.demo.base.service.IZyClothsTypeService;
import org.jeecg.modules.demo.device.entity.ZyDevicetypel;
import org.jeecg.modules.demo.fabric.entity.ZyFabric;
import org.jeecg.modules.demo.pro.entity.NewZyProcessComponent;
import org.jeecg.modules.demo.pro.entity.ZyProcessComponent;
import org.jeecg.modules.demo.tools.entity.ZyToolTypes;
import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.service.ISysDepartService;
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import org.jeecg.modules.zyclothsstyle.entity.vo.AllClothStyle;
import org.jeecg.modules.zyclothsstyle.mapper.ZyClothsStyleMapper;
import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService;
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.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;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.List;
/**
* @Description: 服装款式表
@ -68,16 +45,11 @@ public class ZyClothsStyleController extends JeecgController<ZyClothsStyle, IZyC
private IZyClothsStyleService zyClothsStyleService;
@Autowired
private IZyClothsComponentService zyClothsComponentService;
@Autowired
private ISysDepartService sysDepartService;
@Autowired
private IZyClothsModularService zyClothsModularService;
@Autowired
private IZyClothsTypeService zyClothsTypeService;
@Resource
private ZyClothsStyleMapper zyClothsStyleMapper;
/**
* 分页列表查询
@ -122,13 +94,14 @@ public class ZyClothsStyleController extends JeecgController<ZyClothsStyle, IZyC
/**
* 服装款式详情
*
* @param id 根据服装款式id进行查询
*/
@AutoLog(value = "服装款式详情")
@ApiOperation(value = "服装款式详情", notes = "根据服装款式id进行查询")
@GetMapping(value = "/detail")
public Result<?> detail(@RequestParam(name = "id", required = true) String id) {
System.out.println("服装款式详情 /detail controller层接受到的id: styleId: "+id);
//System.out.println("服装款式详情 /detail controller层接受到的id: styleId: "+id);
AllClothStyle allClothStyle = zyClothsStyleService.queryDetail(id);
return Result.OK(allClothStyle);
}
@ -198,6 +171,21 @@ public class ZyClothsStyleController extends JeecgController<ZyClothsStyle, IZyC
return Result.OK("添加成功!");
}
@GetMapping(value = "/enterpriseNum")
public Result<?> enterpriseNum(@RequestParam(name = "id", required = true) String id) {
//id.contains(",") 判断是否字符中是否包含","
if (id.contains(",")) {
return Result.error("只能选择一个企业");
} else {
String sort = zyClothsStyleService.enterpriseNum(id);
//System.err.println(sort + " enterpriseNum");
if (StringUtils.isEmpty(sort)) {
return Result.OK(0);
}
return Result.OK(sort);
}
}
/**
* getAction的url sort 编码
*/
@ -206,7 +194,7 @@ public class ZyClothsStyleController extends JeecgController<ZyClothsStyle, IZyC
@GetMapping(value = "/sort")
public Result<?> sort(@RequestParam(name = "id", required = true) String id) {
String sort = zyClothsStyleService.sort(id);
System.err.println(sort+ " sort");
//System.err.println(sort+ " sort");
if (StringUtils.isEmpty(sort)) {
return Result.OK(0);
}
@ -223,6 +211,9 @@ public class ZyClothsStyleController extends JeecgController<ZyClothsStyle, IZyC
@ApiOperation(value = "服装款式表-编辑", notes = "服装款式表-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody ZyClothsStyle zyClothsStyle) {
if (StringUtils.isEmpty(zyClothsStyle.getEnterpriseId())){
return Result.error("企业不能为空");
}
zyClothsStyleService.updateById(zyClothsStyle);
return Result.OK("编辑成功!");
}

@ -74,8 +74,8 @@ public class ZyClothsStyle implements Serializable {
@ApiModelProperty(value = "结构")
private String structure;
/**特征*/
@Excel(name = "特征", width = 15)
@ApiModelProperty(value = "特征")
@Excel(name = "特征 又叫 风格", width = 15)
@ApiModelProperty(value = "特征 风格")
private String characteristic;
/**效果*/
@Excel(name = "效果", width = 15)

@ -23,4 +23,6 @@ public interface IZyClothsStyleService extends IService<ZyClothsStyle> {
* @param id 根据服装款式id进行查询
*/
AllClothStyle queryDetail(String id);
String enterpriseNum(String id);
}

@ -2,6 +2,7 @@ package org.jeecg.modules.zyclothsstyle.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.demo.base.service.IZyClothsTypeService;
import org.jeecg.modules.demo.zyStyleModular.entity.ZyStyleModular;
import org.jeecg.modules.demo.zyStyleModular.service.IZyStyleModularService;
import org.jeecg.modules.demo.zyaccessories.entity.ZyStyleAccessories;
@ -44,6 +45,8 @@ public class ZyClothsStyleServiceImpl extends ServiceImpl<ZyClothsStyleMapper, Z
private IZyStyleAccessoriesService zyStyleAccessoriesService;
@Autowired
private IZyStyleModelService zyStyleModelService;
@Autowired
private IZyClothsTypeService zyClothsTypeService;
@Resource
private ZyClothsStyleMapper zyClothsStyleMapper;
@ -78,6 +81,13 @@ public class ZyClothsStyleServiceImpl extends ServiceImpl<ZyClothsStyleMapper, Z
return zyAllClothStyle;
}
@Override
public String enterpriseNum(String id) {
String enterpriseName = zyClothsStyleMapper.getEnterpriseName(id);
//根据企业名称拿到企业编号
return zyClothsTypeService.getEnterpriseNums(enterpriseName);
}
public List<ZyClothsStyle> detail(String id){
ZyClothsStyle zyClothsStyle = zyClothsStyleMapper.selectById(id);
//翻译规格 shape 和企业

@ -71,19 +71,25 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
@AutoLog(value = "款式模块表-分页列表查询")
@ApiOperation(value = "款式模块表-分页列表查询", notes = "款式模块表-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(ZyStyleModule zyStyleModule2, String id,
public Result<?> queryPageList(ZyStyleModule zyStyleModule2,
@RequestParam(name = "id" )String id,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
System.err.println("ZyStyleModule 款式模块表 传来的 " + id);
//List<NewStyleModule> listNewStyleModules = new ArrayList<>();
//QueryWrapper<ZyStyleModule> queryWrapper = new QueryWrapper<>();
List<ZyStyleModule> zyStyleModules = zyStyleModuleMapper.getListByStyleId(id);
List<NewStyleModule> newStyleModuleList = zyStyleModuleService.changeList(zyStyleModules);
IPage<NewStyleModule> pageList = new Page<>(pageNo, pageSize, newStyleModuleList.size());
pageList.setRecords(newStyleModuleList);
return Result.OK(pageList);
QueryWrapper<ZyStyleModule> queryWrapper = new QueryWrapper<>();
queryWrapper.eq(StringUtils.hasText(id),"style_id", id);
Page<ZyStyleModule> page = new Page<>(pageNo, pageSize);
IPage<ZyStyleModule> pageList = zyStyleModuleService.page(page, queryWrapper);
System.out.println(pageList.getRecords());
//List<ZyStyleModule> zyStyleModules = zyStyleModuleMapper.getListByStyleId(id);
//改变list中的实体类 类型
List<NewStyleModule> newStyleModuleList = zyStyleModuleService.changeList(pageList.getRecords());
IPage<NewStyleModule> pageList2 = new Page<>(pageNo, pageSize, newStyleModuleList.size());
pageList2.setRecords(newStyleModuleList);
return Result.OK(pageList2);
}

@ -49,6 +49,9 @@ public class ZyStyleModuleServiceImpl extends ServiceImpl<ZyStyleModuleMapper, Z
@Override
public List<NewStyleModule> changeList(List<ZyStyleModule> zyStyleModules) {
if (ObjectUtils.isEmpty(zyStyleModules)){
return null;
}
List<NewStyleModule> newStyleModuleList = new ArrayList<>();
for (ZyStyleModule zy : zyStyleModules) {
NewStyleModule newSeMo = new NewStyleModule();

Loading…
Cancel
Save