2022-09-21 1.1.4 款式型号管理 1.1.2 款式管理跳转其他模块

zhc4dev
chen 2 years ago
parent ebb2868e68
commit 1a8e103797
  1. 31
      ant-design-vue-jeecg/src/views/zyclothsstyle/ZyClothsStyleList.vue
  2. 60
      ant-design-vue-jeecg/src/views/zystylefabric/ZyStyleFabricList.vue
  3. 264
      ant-design-vue-jeecg/src/views/zystylemodel/ZyStyleModelList.vue
  4. 168
      ant-design-vue-jeecg/src/views/zystylemodel/modules/ZyStyleModelForm.vue
  5. 84
      ant-design-vue-jeecg/src/views/zystylemodel/modules/ZyStyleModelModal.Style#Drawer.vue
  6. 60
      ant-design-vue-jeecg/src/views/zystylemodel/modules/ZyStyleModelModal.vue
  7. 60
      ant-design-vue-jeecg/src/views/zystylemodule/ZyStyleModuleList.vue
  8. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/controller/ZyStyleFabricController.java
  9. 187
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/controller/ZyStyleModelController.java
  10. 100
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/entity/ZyStyleModel.java
  11. 17
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/mapper/ZyStyleModelMapper.java
  12. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/mapper/xml/ZyStyleModelMapper.xml
  13. 15
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/service/IZyStyleModelService.java
  14. 20
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/service/impl/ZyStyleModelServiceImpl.java
  15. 7
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/controller/ZyStyleModuleController.java

@ -99,15 +99,15 @@
</template>
<span slot="action1" slot-scope="text, record">
<a @click="jumpPage(record)" >管理模块</a>
<a @click="jumpPage1(record)" >管理模块</a>
<a-divider type="vertical" />
<a @click="jumpPage(record)" >管理面料</a>
<a @click="jumpPage2(record)" >管理面料</a>
<a-divider type="vertical" />
<a @click="jumpPage(record)" >管理辅料</a>
<a @click="jumpPage3(record)" >管理辅料</a>
<a-divider type="vertical" />
<a @click="jumpPage(record)" >管理型号</a>
<a @click="jumpPage4(record)" >管理型号</a>
<a-divider type="vertical" />
<a @click="jumpPage(record)" >管理工序</a>
<a @click="jumpPage5(record)" >管理工序</a>
</span>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
@ -229,10 +229,25 @@
methods: {
initDictConfig(){
},
jumpPage(record)
{
jumpPage1(record) {
this.$router.push({
path: '/xxx/xxx',
path: '/src/views/zystylemodule/ZyStyleModuleList',
query: { //
'id': record.id,
}
});
},
jumpPage2(record) {
this.$router.push({
path: '/src/views/zystylefabric/ZyStyleFabricList',
query: { //
'id': record.id,
}
});
},
jumpPage4(record) {
this.$router.push({
path: '/zyclothsstyle/ZyClothsStyleList',
query: { //
'id': record.id,
}

@ -106,6 +106,8 @@
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ZyStyleFabricModal from './modules/ZyStyleFabricModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import {getAction} from "@api/manage";
import {filterObj} from "@/utils/util";
export default {
name: 'ZyStyleFabricList',
@ -165,12 +167,16 @@
importExcelUrl: "zystylefabric/zyStyleFabric/importExcel",
},
//
loadRouteType:false,
id:"",
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
//this.getSuperFieldList();
this.loadParameter() ;
},
computed: {
importExcelUrl: function(){
@ -180,6 +186,58 @@
methods: {
initDictConfig(){
},
//
loadParameter() {
if (this.loadRouteType == false) {
this.id = this.$route.query.id;
console.log(this.id)
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.id=this.id;
return filterObj(param);
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'styleId',text:'款式id',dictCode:"zy_cloths_style,id,style_names"})

@ -0,0 +1,264 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- table区域-begin -->
<div>
<j-vxe-table
toolbar
:toolbarConfig="toolbarConfig"
row-number
row-selection
keep-source
async-remove
:height="340"
:loading="loading"
:columns="columns"
:dataSource="dataSource"
:pagination="pagination"
style="margin-top: 8px;"
@pageChange="handlePageChange"
@selectRowChange="handleSelectRowChange"
>
<template v-slot:action="props">
<a @click="submitForm(props)">保存</a>
<a-divider type="vertical"/>
<a-popconfirm title="确定删除吗?" @confirm="handleDelete(props.rowId)">
<a>删除</a>
</a-popconfirm>
</template>
</j-vxe-table>
</div>
<zy-style-model-modal ref="modalForm" @ok="modalFormOk"></zy-style-model-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { JVXETypes } from '@/components/jeecg/JVxeTable'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ZyStyleModelModal from './modules/ZyStyleModelModal'
import {deleteAction, getAction, postAction, putAction, postFormAction, httpAction} from "@api/manage";
import store from "@/store";
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'ZyStyleModelList',
mixins:[JeecgListMixin, mixinDevice],
components: {
ZyStyleModelModal
},
data () {
return {
description: 'zy_style_model管理页面',
//
//
toolbarConfig: {
// add remove clearSelection
btn: ['add']
},
validatorRules: {
styleId: [
{ required: true, message: '请选择服装类型!'},
],
},
//
loading: false,
//
pagination: {
//
current: 1,
//
pageSize: 10,
//
pageSizeOptions: ['10', '20', '30', '100', '200'],
// 0
total: 0,
},
//
selectedRows: [],
//
dataSource: [],
columns: [
{
title: '款式',
width: '150px',
fixed: 'left',
key: 'styleId',
type: JVXETypes.select,
placeholder: '请输入${title}',
dictCode: 'zy_cloths_style,style_names,id',
validateRules: [{required: true, message: '${title}不能为空'}]
},
{
title:'是否默认尺码',
align:"center",
width: '150px',
key: 'isdefault',
type: JVXETypes.select,
dictCode: 'isdefault',
defaultValue : 0,
},
{key: 'modelNumber', title: '型号编码', dictCode: 'modenumber',width: '120px', type: JVXETypes.select},
{key: 'size', title: '码数', width: '100px',dictCode: 'size', type: JVXETypes.select},
{key: 'anumbers', title: '型', width: '100px',dictCode: 'xsize', type: JVXETypes.select},
{key: 'bnumbers', title: '号', width: '100px',dictCode: 'hsize', type: JVXETypes.select},
{key: 'collarLarge', title: '领大', width: '80px', type: JVXETypes.input},
{key: 'bust', title: '胸围', width: '80px', type: JVXETypes.input},
{key: 'sleeveLength', title: '袖长', width: '80px', type: JVXETypes.input},
{key: 'shslLength', title: '连肩袖长', width: '100px', type: JVXETypes.input},
{key: 'tsWidth', title: '总肩宽', width: '80px', type: JVXETypes.input},
{key: 'cuff', title: '袖口', width: '80px', type: JVXETypes.input},
{key: 'waistline', title: '腰围', width: '80px', type: JVXETypes.input},
{key: 'hem', title: '下摆', width: '80px', type: JVXETypes.input},
{
title: '操作',
key: 'action',
type: JVXETypes.slot,
fixed: 'right',
minWidth: '100px',
align: 'center',
slotName: 'action',
}
],
url: {
list: "/zystylemodel/zyStyleModel/list",
delete: "/zystylemodel/zyStyleModel/delete",
add: "/zystylemodel/zyStyleModel/add",
edit: "/zystylemodel/zyStyleModel/edit",
deleteBatch: "/zystylemodel/zyStyleModel/deleteBatch",
exportXlsUrl: "/zystylemodel/zyStyleModel/exportXls",
importExcelUrl: "zystylemodel/zyStyleModel/importExcel",
},
rowId:'',
dictOptions:{},
superFieldList:[],
}
},
created() {
this.loadData();
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
handleDelete: function (id) {
if(!this.url.delete){
this.$message.error("请设置url.delete属性!")
return
}
var that = this;
deleteAction(that.url.delete, {id: id}).then((res) => {
if (res.success) {
//
that.reCalculatePage(1)
that.$message.success(res.message);
that.loadData();
} else {
that.$message.warning(res.message);
}
});
},
submitForm (props) {
this.model = Object.assign({}, props);
// console.log(props.rowId)
// console.log(this.model)
var str = props.rowId;
let httpurl = '';
let method = '';
if (str.search("row") != -1) {
httpurl += this.url.add;
method = 'post';
} else {
httpurl += this.url.edit;
method = 'put';
}
httpAction(httpurl, props.row, method).then((res) => {
if (res.success) {
this.$message.success(res.message);
this.$emit('ok');
} else {
this.$message.warning(res.message);
}
})
},
//
loadData() {
//
let formData = {
pageNo: this.pagination.current,
pageSize: this.pagination.pageSize
}
//
this.loading = true
getAction(this.url.list, formData).then(res => {
if (res.success) {
// total
this.pagination.total = res.result.total
// dataSource
this.dataSource = res.result.records
console.log(this.dataSource,'aaa')
//
this.selectedRows = []
} else {
this.$error({title: '主表查询失败', content: res.message})
}
}).finally(() => {
// loading
this.loading = false
})
},
//
handlePageChange(event) {
//
this.pagination.current = event.current
this.pagination.pageSize = event.pageSize
//
this.loadData()
},
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'styleId',text:'款式id',dictCode:''})
fieldList.push({type:'int',value:'isdefault',text:'是否默认尺码',dictCode:''})
fieldList.push({type:'int',value:'modelNumber',text:'型号编码',dictCode:''})
fieldList.push({type:'int',value:'size',text:'码数',dictCode:''})
fieldList.push({type:'string',value:'anumbers',text:'型',dictCode:''})
fieldList.push({type:'string',value:'bnumbers',text:'号',dictCode:''})
fieldList.push({type:'double',value:'collarLarge',text:'领大',dictCode:''})
fieldList.push({type:'double',value:'bust',text:'胸围',dictCode:''})
fieldList.push({type:'double',value:'sleeveLength',text:'袖长',dictCode:''})
fieldList.push({type:'double',value:'shslLength',text:'连肩袖长',dictCode:''})
fieldList.push({type:'double',value:'tsWidth',text:'总肩宽',dictCode:''})
fieldList.push({type:'double',value:'cuff',text:'袖口',dictCode:''})
fieldList.push({type:'double',value:'waistline',text:'腰围',dictCode:''})
fieldList.push({type:'double',value:'hem',text:'下摆',dictCode:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,168 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="款式id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleId">
<j-dict-select-tag type="list" v-model="model.styleId" dictCode="zy_cloths_style,style_names,id" placeholder="请选择款式类型" /> </a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="是否默认尺码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="isdefault">
<a-input-number v-model="model.isdefault" placeholder="请输入是否默认尺码" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="型号编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modelNumber">
<a-input-number v-model="model.modelNumber" placeholder="请输入型号编码" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="码数" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="size">
<a-input-number v-model="model.size" placeholder="请输入码数" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="anumbers">
<a-input v-model="model.anumbers" placeholder="请输入型" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bnumbers">
<a-input v-model="model.bnumbers" placeholder="请输入号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="领大" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="collarLarge">
<a-input-number v-model="model.collarLarge" placeholder="请输入领大" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="胸围" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bust">
<a-input-number v-model="model.bust" placeholder="请输入胸围" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="袖长" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sleeveLength">
<a-input-number v-model="model.sleeveLength" placeholder="请输入袖长" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="连肩袖长" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shslLength">
<a-input-number v-model="model.shslLength" placeholder="请输入连肩袖长" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="总肩宽" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tsWidth">
<a-input-number v-model="model.tsWidth" placeholder="请输入总肩宽" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="袖口" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cuff">
<a-input-number v-model="model.cuff" placeholder="请输入袖口" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="腰围" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="waistline">
<a-input-number v-model="model.waistline" placeholder="请输入腰围" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="下摆" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hem">
<a-input-number v-model="model.hem" placeholder="请输入下摆" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'ZyStyleModelForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/zystylemodel/zyStyleModel/add",
edit: "/zystylemodel/zyStyleModel/edit",
queryById: "/zystylemodel/zyStyleModel/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
//
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

@ -0,0 +1,84 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
destroyOnClose
:visible="visible">
<zy-style-model-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></zy-style-model-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import ZyStyleModelForm from './ZyStyleModelForm'
export default {
name: 'ZyStyleModelModal',
components: {
ZyStyleModelForm
},
data () {
return {
title:"操作",
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<zy-style-model-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></zy-style-model-form>
</j-modal>
</template>
<script>
import ZyStyleModelForm from './ZyStyleModelForm'
export default {
name: 'ZyStyleModelModal',
components: {
ZyStyleModelForm
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

@ -122,6 +122,8 @@ import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import ZyStyleModuleModal from './modules/ZyStyleModuleModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import {getAction} from "@api/manage";
import {filterObj} from "@/utils/util";
export default {
name: 'ZyStyleModuleList',
@ -186,12 +188,16 @@ export default {
importExcelUrl: "zystylemodule/zyStyleModule/importExcel",
},
//
loadRouteType:false,
id:"",
dictOptions: {},
superFieldList: [],
}
},
created() {
this.getSuperFieldList();
//this.getSuperFieldList();
this.loadParameter() ;
},
computed: {
importExcelUrl: function () {
@ -201,6 +207,58 @@ export default {
methods: {
initDictConfig() {
},
//
loadParameter() {
if (this.loadRouteType == false) {
this.id = this.$route.query.id;
console.log(this.id)
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.id=this.id;
return filterObj(param);
},
getSuperFieldList() {
let fieldList = [];
fieldList.push({type: 'string', value: 'typeId', text: '类型id', dictCode: "zy_cloths_type,id,type_name"})

@ -81,11 +81,14 @@ public class ZyStyleFabricController extends JeecgController<ZyStyleFabric, IZyS
//@AutoLog(value = "款式面料表-分页列表查询")
@ApiOperation(value="款式面料表-分页列表查询", notes="款式面料表-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<NewZyStyleFabric>> queryPageList(ZyStyleFabric zyStyleFabric,
public Result<IPage<NewZyStyleFabric>> queryPageList(ZyStyleFabric zyStyleFabric,String id,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ZyStyleFabric> queryWrapper = new QueryWrapper<>();
if(id!=null){
queryWrapper.eq("style_id",id);
}
if(zyStyleFabric.getStyleId()!=null || zyStyleFabric.getFabricId()!=null ){
if(zyStyleFabric.getStyleId()!=null){
queryWrapper.eq("style_id",zyStyleFabric.getStyleId());

@ -0,0 +1,187 @@
package org.jeecg.modules.zystylemodel.controller;
import java.util.Arrays;
import java.util.HashMap;
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.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.alibaba.fastjson.JSONObject;
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 lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModel;
import org.jeecg.modules.zystylemodel.service.IZyStyleModelService;
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.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;
/**
* @Description: zy_style_model
* @Author: jeecg-boot
* @Date: 2022-09-17
* @Version: V1.0
*/
@Api(tags="zy_style_model")
@RestController
@RequestMapping("/zystylemodel/zyStyleModel")
@Slf4j
public class ZyStyleModelController extends JeecgController<ZyStyleModel, IZyStyleModelService> {
@Autowired
private IZyStyleModelService zyStyleModelService;
/**
* 分页列表查询
*
* @param zyStyleModel
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "zy_style_model-分页列表查询")
@ApiOperation(value="zy_style_model-分页列表查询", notes="zy_style_model-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<ZyStyleModel>> queryPageList(ZyStyleModel zyStyleModel,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ZyStyleModel> queryWrapper = QueryGenerator.initQueryWrapper(zyStyleModel, req.getParameterMap());
Page<ZyStyleModel> page = new Page<ZyStyleModel>(pageNo, pageSize);
IPage<ZyStyleModel> pageList = zyStyleModelService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param zyStyleModel
* @return
*/
@AutoLog(value = "zy_style_model-添加")
@ApiOperation(value="zy_style_model-添加", notes="zy_style_model-添加")
//@RequiresPermissions("org.jeecg.modules.demo:zy_style_model:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody ZyStyleModel zyStyleModel) {
zyStyleModel.setId(null);
System.out.println(zyStyleModel);
zyStyleModelService.save(zyStyleModel);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param zyStyleModel
* @return
*/
@AutoLog(value = "zy_style_model-编辑")
@ApiOperation(value="zy_style_model-编辑", notes="zy_style_model-编辑")
//@RequiresPermissions("org.jeecg.modules.demo:zy_style_model:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody ZyStyleModel zyStyleModel) {
zyStyleModelService.updateById(zyStyleModel);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "zy_style_model-通过id删除")
@ApiOperation(value="zy_style_model-通过id删除", notes="zy_style_model-通过id删除")
//@RequiresPermissions("org.jeecg.modules.demo:zy_style_model:delete")
@RequestMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
zyStyleModelService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param
* @return
*/
@AutoLog(value = "zy_style_model-批量删除")
@ApiOperation(value="zy_style_model-批量删除", notes="zy_style_model-批量删除")
//@RequiresPermissions("org.jeecg.modules.demo:zy_style_model:deleteBatch")
@DeleteMapping(value = "/deleteBatch" )
public Result<String> deleteBatch(@RequestBody Map map) {
List<String> idList = (List<String>) map.get("id");
// List<Integer> list = Arrays.asList(ids);
zyStyleModelService.removeByIds(idList);
System.out.println(map);
//this.zyStyleModelService.removeByIds(Arrays.asList(map.get("deleteIds").split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "zy_style_model-通过id查询")
@ApiOperation(value="zy_style_model-通过id查询", notes="zy_style_model-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
ZyStyleModel zyStyleModel = zyStyleModelService.getById(id);
if(zyStyleModel==null) {
return Result.error("未找到对应数据");
}
return Result.OK(zyStyleModel);
}
/**
* 导出excel
*
* @param request
* @param zyStyleModel
*/
//@RequiresPermissions("org.jeecg.modules.demo:zy_style_model:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ZyStyleModel zyStyleModel) {
return super.exportXls(request, zyStyleModel, ZyStyleModel.class, "zy_style_model");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
//@RequiresPermissions("zy_style_model:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, ZyStyleModel.class);
}
}

@ -0,0 +1,100 @@
package org.jeecg.modules.zystylemodel.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: zy_style_model
* @Author: jeecg-boot
* @Date: 2022-09-17
* @Version: V1.0
*/
@Data
@TableName("zy_style_model")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="zy_style_model对象", description="zy_style_model")
public class ZyStyleModel implements Serializable {
private static final long serialVersionUID = 1L;
/**内部编号*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "内部编号")
private java.lang.String id;
/**款式id*/
@Excel(name = "款式id", width = 15)
@Dict(dictTable = "zy_cloths_style", dicText = "style_names", dicCode = "id")
@ApiModelProperty(value = "款式id")
private java.lang.String styleId;
/**是否默认尺码*/
@Excel(name = "是否默认尺码", width = 15)
@ApiModelProperty(value = "是否默认尺码")
private java.lang.Integer isdefault;
/**型号编码*/
@Excel(name = "型号编码", width = 15)
@ApiModelProperty(value = "型号编码")
private java.lang.Integer modelNumber;
/**码数*/
@Excel(name = "码数", width = 15)
@ApiModelProperty(value = "码数")
private java.lang.Integer size;
/**型*/
@Excel(name = "型", width = 15)
@ApiModelProperty(value = "型")
private java.lang.String anumbers;
/**号*/
@Excel(name = "号", width = 15)
@ApiModelProperty(value = "号")
private java.lang.String bnumbers;
/**领大*/
@Excel(name = "领大", width = 15)
@ApiModelProperty(value = "领大")
private java.lang.Float collarLarge;
/**胸围*/
@Excel(name = "胸围", width = 15)
@ApiModelProperty(value = "胸围")
private java.lang.Float bust;
/**袖长*/
@Excel(name = "袖长", width = 15)
@ApiModelProperty(value = "袖长")
private java.lang.Float sleeveLength;
/**连肩袖长*/
@Excel(name = "连肩袖长", width = 15)
@ApiModelProperty(value = "连肩袖长")
private java.lang.Float shslLength;
/**总肩宽*/
@Excel(name = "总肩宽", width = 15)
@ApiModelProperty(value = "总肩宽")
private java.lang.Float tsWidth;
/**袖口*/
@Excel(name = "袖口", width = 15)
@ApiModelProperty(value = "袖口")
private java.lang.Float cuff;
/**腰围*/
@Excel(name = "腰围", width = 15)
@ApiModelProperty(value = "腰围")
private java.lang.Float waistline;
/**下摆*/
@Excel(name = "下摆", width = 15)
@ApiModelProperty(value = "下摆")
private java.lang.Float hem;
/**创建时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "创建时间")
private java.util.Date createTime;
}

@ -0,0 +1,17 @@
package org.jeecg.modules.zystylemodel.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModel;
/**
* @Description: zy_style_model
* @Author: jeecg-boot
* @Date: 2022-09-17
* @Version: V1.0
*/
public interface ZyStyleModelMapper extends BaseMapper<ZyStyleModel> {
}

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.zystylemodel.mapper.ZyStyleModelMapper">
</mapper>

@ -0,0 +1,15 @@
package org.jeecg.modules.zystylemodel.service;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModel;
/**
* @Description: zy_style_model
* @Author: jeecg-boot
* @Date: 2022-09-17
* @Version: V1.0
*/
public interface IZyStyleModelService extends IService<ZyStyleModel> {
}

@ -0,0 +1,20 @@
package org.jeecg.modules.zystylemodel.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModel;
import org.jeecg.modules.zystylemodel.mapper.ZyStyleModelMapper;
import org.jeecg.modules.zystylemodel.service.IZyStyleModelService;
import org.springframework.stereotype.Service;
/**
* @Description: zy_style_model
* @Author: jeecg-boot
* @Date: 2022-09-17
* @Version: V1.0
*/
@Service
public class ZyStyleModelServiceImpl extends ServiceImpl<ZyStyleModelMapper, ZyStyleModel> implements IZyStyleModelService {
}

@ -77,13 +77,16 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS
@AutoLog(value = "款式模块表-分页列表查询")
@ApiOperation(value="款式模块表-分页列表查询", notes="款式模块表-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(ZyStyleModule zyStyleModule2,
public Result<?> queryPageList(ZyStyleModule zyStyleModule2,String id,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
System.out.println(id);
List<NewStyleModule> listNewStyleModules = new ArrayList<>();
QueryWrapper<ZyStyleModule> queryWrapper = new QueryWrapper<>();
if(id!=null){
queryWrapper.eq("style_id",id);
}
if(zyStyleModule2.getStyleId()!=null || zyStyleModule2.getModularId()!=null || zyStyleModule2.getTypeId()!=null){
if(zyStyleModule2.getStyleId()!=null){
queryWrapper.eq("style_id",zyStyleModule2.getStyleId());

Loading…
Cancel
Save