Merge remote-tracking branch 'origin/master'

zhc4dev
赵玉瑞 2 years ago
commit db3a336c36
  1. 45
      ant-design-vue-jeecg/src/views/goodsaccessories/GoodsAccessoriesList.vue
  2. 9
      ant-design-vue-jeecg/src/views/goodsaccessories/modules/GoodsAccessoriesForm.vue
  3. 45
      ant-design-vue-jeecg/src/views/goodsfabric/GoodsFabricList.vue
  4. 9
      ant-design-vue-jeecg/src/views/goodsfabric/modules/GoodsFabricForm.vue
  5. 49
      ant-design-vue-jeecg/src/views/goodsmodule/GoodsModuleList.vue
  6. 12
      ant-design-vue-jeecg/src/views/goodsmodule/modules/GoodsModuleForm.vue
  7. 63
      ant-design-vue-jeecg/src/views/zygoods/ZyGoodsList.vue
  8. 13
      ant-design-vue-jeecg/src/views/zygoods/modules/ZyGoodsForm.vue
  9. 3
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/goodsaccessories/controller/GoodsAccessoriesController.java
  10. 3
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/goodsfabric/controller/GoodsFabricController.java
  11. 164
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zygoods/controller/ZyGoodsController.java

@ -4,11 +4,6 @@
<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 placeholder="请选择商品" v-model="queryParam.goodsId" dictCode="zy_goods,goods_name,id"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="辅料">
<j-dict-select-tag placeholder="请选择辅料" v-model="queryParam.accessoriesId" dictCode="zy_accessories,contents,id"/>
@ -18,10 +13,6 @@
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</span>
</a-col>
</a-row>
@ -32,12 +23,14 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('商品辅料表')">导出</a-button>
<a-button type="primary" icon="rollback" @click="fanHui()">返回</a-button>
<a-button type="primary" icon="reload" @click="gx()">更新</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-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>
@ -120,6 +113,7 @@
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import GoodsAccessoriesModal from './modules/GoodsAccessoriesModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import { getAction,postAction } from '@/api/manage'
export default {
name: 'GoodsAccessoriesList',
@ -162,11 +156,12 @@
}
],
url: {
list: "/goodsaccessories/goodsAccessories/list",
list: "/goodsaccessories/goodsAccessories/list?goodsid="+this.$route.query.goodsid,
delete: "/goodsaccessories/goodsAccessories/delete",
deleteBatch: "/goodsaccessories/goodsAccessories/deleteBatch",
exportXlsUrl: "/goodsaccessories/goodsAccessories/exportXls",
importExcelUrl: "goodsaccessories/goodsAccessories/importExcel",
upfl:"/zygoods/zyGoods/upfl",
},
dictOptions:{},
@ -182,12 +177,32 @@
},
},
methods: {
fanHui() {
this.$router.push({
path: '/zygoods/ZyGoodsList',
// query: { //
// 'id': record.id,
// 'typeId': record.typeId,
// }
// });
});
},
gx(){
getAction(this.url.upfl, {id: this.$route.query.goodsid}).then((res) => {
if (res.success) {
this.$message.success(res.result);
this.loadData();
} else {
this.$message.error(res.message);
}
});
},
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'goodsId',text:'商品id',dictCode:'zy_goods,goods_name,id'})
fieldList.push({type:'string',value:'accessoriesId',text:'辅料id',dictCode:'zy_accessories,contents,id'})
fieldList.push({type:'string',value:'goodsId',text:'商品',dictCode:'zy_goods,goods_name,id'})
fieldList.push({type:'string',value:'accessoriesId',text:'辅料',dictCode:'zy_accessories,contents,id'})
this.superFieldList = fieldList
}
}

@ -5,7 +5,7 @@
<a-row>
<a-col :span="24">
<a-form-model-item label="商品" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="goodsId">
<j-dict-select-tag type="list" v-model="model.goodsId" dictCode="zy_goods,goods_name,id" placeholder="请选择商品" />
<j-dict-select-tag type="list" v-model="model.goodsId" :dictCode="goods" placeholder="请选择商品" />
</a-form-model-item>
</a-col>
<a-col :span="24">
@ -38,6 +38,7 @@
},
data () {
return {
goods:"zy_goods,goods_name,id,id="+this.$route.query.goodsid,
model:{
},
labelCol: {
@ -50,6 +51,12 @@
},
confirmLoading: false,
validatorRules: {
goodsId: [
{ required: true, message: '请选择商品!'},
],
accessoriesId: [
{ required: true, message: '请选择辅料!'},
],
},
url: {
add: "/goodsaccessories/goodsAccessories/add",

@ -4,11 +4,6 @@
<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 placeholder="请选择商品" v-model="queryParam.goodsId" dictCode="zy_goods,goods_name,id"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="面料">
<j-dict-select-tag placeholder="请选择面料" v-model="queryParam.fabricId" dictCode="zy_fabric,name,id"/>
@ -18,10 +13,6 @@
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</span>
</a-col>
</a-row>
@ -32,12 +23,14 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('商品面料表')">导出</a-button>
<a-button type="primary" icon="rollback" @click="fanHui()">返回</a-button>
<a-button type="primary" icon="reload" @click="gx()">更新</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-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>
@ -120,6 +113,7 @@
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import GoodsFabricModal from './modules/GoodsFabricModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import { getAction,postAction } from '@/api/manage'
export default {
name: 'GoodsFabricList',
@ -162,11 +156,12 @@
}
],
url: {
list: "/goodsfabric/goodsFabric/list",
list: "/goodsfabric/goodsFabric/list?goodsid="+this.$route.query.goodsid,
delete: "/goodsfabric/goodsFabric/delete",
deleteBatch: "/goodsfabric/goodsFabric/deleteBatch",
exportXlsUrl: "/goodsfabric/goodsFabric/exportXls",
importExcelUrl: "goodsfabric/goodsFabric/importExcel",
upml:"/zygoods/zyGoods/upml",
},
dictOptions:{},
@ -182,12 +177,32 @@
},
},
methods: {
fanHui() {
this.$router.push({
path: '/zygoods/ZyGoodsList',
// query: { //
// 'id': record.id,
// 'typeId': record.typeId,
// }
// });
});
},
gx(){
getAction(this.url.upml, {id: this.$route.query.goodsid}).then((res) => {
if (res.success) {
this.$message.success(res.result);
this.loadData();
} else {
this.$message.error(res.message);
}
});
},
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'goodsId',text:'商品id',dictCode:'zy_goods,goods_name,id'})
fieldList.push({type:'string',value:'fabricId',text:'面料id',dictCode:'zy_fabric,name,id'})
fieldList.push({type:'string',value:'goodsId',text:'商品',dictCode:'zy_goods,goods_name,id'})
fieldList.push({type:'string',value:'fabricId',text:'面料',dictCode:'zy_fabric,name,id'})
this.superFieldList = fieldList
}
}

@ -5,7 +5,7 @@
<a-row>
<a-col :span="24">
<a-form-model-item label="商品" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="goodsId">
<j-dict-select-tag type="list" v-model="model.goodsId" dictCode="zy_goods,goods_name,id" placeholder="请选择商品" />
<j-dict-select-tag type="list" v-model="model.goodsId" :dictCode="goods" placeholder="请选择商品" />
</a-form-model-item>
</a-col>
<a-col :span="24">
@ -38,6 +38,7 @@
},
data () {
return {
goods:"zy_goods,goods_name,id,id="+this.$route.query.goodsid,
model:{
},
labelCol: {
@ -50,6 +51,12 @@
},
confirmLoading: false,
validatorRules: {
goodsId: [
{ required: true, message: '请选择商品!'},
],
fabricId: [
{ required: true, message: '请选择面料!'},
],
},
url: {
add: "/goodsfabric/goodsFabric/add",

@ -5,30 +5,19 @@
<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 placeholder="请选择商品" v-model="queryParam.goodsId" dictCode="zy_goods,goods_name,id"/>
<a-form-item label="款式">
<j-dict-select-tag placeholder="请选择款式" v-model="queryParam.styleId" dictCode="zy_cloths_style,style_names,id"/>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="款式">
<j-dict-select-tag placeholder="请选择款式" v-model="queryParam.styleId" dictCode="zy_cloths_style,style_names,id"/>
<a-form-item label="模块">
<j-dict-select-tag placeholder="请选择模块" v-model="queryParam.moduleId" dictCode="zy_cloths_modular ,modular_name,id"/>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="模块">
<j-dict-select-tag placeholder="请选择模块" v-model="queryParam.moduleId" dictCode="zy_cloths_modular ,modular_name,id"/>
</a-form-item>
</a-col>
</template>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</span>
</a-col>
</a-row>
@ -39,12 +28,14 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('商品模块表')">导出</a-button>
<a-button type="primary" icon="rollback" @click="fanHui()">返回</a-button>
<a-button type="primary" icon="reload" @click="gx()">更新</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-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>
@ -127,6 +118,7 @@
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import GoodsModuleModal from './modules/GoodsModuleModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import { getAction,postAction } from '@/api/manage'
export default {
name: 'GoodsModuleList',
@ -184,6 +176,7 @@
deleteBatch: "/goodsmodule/goodsModule/deleteBatch",
exportXlsUrl: "/goodsmodule/goodsModule/exportXls",
importExcelUrl: "goodsmodule/goodsModule/importExcel",
upmk:"/zygoods/zyGoods/upmk",
},
dictOptions:{},
@ -199,6 +192,26 @@
},
},
methods: {
fanHui() {
this.$router.push({
path: '/zygoods/ZyGoodsList',
// query: { //
// 'id': record.id,
// 'typeId': record.typeId,
// }
// });
});
},
gx(){
getAction(this.url.upmk, {id: this.$route.query.goodsid}).then((res) => {
if (res.success) {
this.$message.success(res.result);
this.loadData();
} else {
this.$message.error(res.message);
}
});
},
initDictConfig(){
},
getSuperFieldList(){

@ -5,7 +5,7 @@
<a-row>
<a-col :span="24">
<a-form-model-item label="商品" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="goodsId">
<j-dict-select-tag type="list" v-model="model.goodsId" dictCode="zy_goods,goods_name,id" placeholder="请选择商品" />
<j-dict-select-tag type="list" v-model="model.goodsId" :dictCode="goods" placeholder="请选择商品" />
</a-form-model-item>
</a-col>
<a-col :span="24">
@ -43,6 +43,7 @@
},
data () {
return {
goods:"zy_goods,goods_name,id,id="+this.$route.query.goodsid,
model:{
},
labelCol: {
@ -55,6 +56,15 @@
},
confirmLoading: false,
validatorRules: {
goodsId: [
{ required: true, message: '请选择商品!'},
],
styleId: [
{ required: true, message: '请选择款式!'},
],
moduleId: [
{ required: true, message: '请选择模块!'},
],
},
url: {
add: "/goodsmodule/goodsModule/add",

@ -119,16 +119,21 @@
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
@click="lookFile(text)">
预览
</a-button>
</template>
<template slot="mk" slot-scope="text, record">
<a @click="goodsModule(record)">管理</a>
</template>
<template slot="ml" slot-scope="text, record">
<a @click="goodsModule2(record)">管理</a>
</template>
<template slot="fl" slot-scope="text, record">
<a @click="goodsModule3(record)">管理</a>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a @click="goodsModule(record)">模块</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
@ -279,6 +284,21 @@
align:"center",
dataIndex: 'enterprisesId_dictText'
},
{
title: '商品模块',
align: "center",
scopedSlots: {customRender: 'mk'}
},
{
title: '商品面料',
align: "center",
scopedSlots: {customRender: 'ml'}
},
{
title: '商品辅料',
align: "center",
scopedSlots: {customRender: 'fl'}
},
{
title: '操作',
dataIndex: 'action',
@ -309,6 +329,19 @@
},
},
methods: {
lookFile (fileUrl) {
let file=window._CONFIG['domianURL']+"/sys/common/static/"+fileUrl
let Base64 = require('js-base64').Base64;
let url =window._CONFIG['onlinePreviewDomainURL']+ '/onlinePreview?url=' + encodeURIComponent(Base64.encode(file))
window.open(url);
// var url = 'http://10.100.200.112/jeecg-boot/sys/common/static/'+text; //访
// window.open('http://10.100.200.112/KKFileView/onlinePreview?url='+encodeURIComponent(url));//
// var url = text; //访
// window.open('http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(Base64.encode(url)));
},
goodsModule(record)
{
this.$router.push({
@ -318,6 +351,24 @@
}
});
},
goodsModule2(record)
{
this.$router.push({
path: '/goodsfabric/GoodsFabricList',
query: { //
'goodsid': record.id,
}
});
},
goodsModule3(record)
{
this.$router.push({
path: '/goodsaccessories/GoodsAccessoriesList',
query: { //
'goodsid': record.id,
}
});
},
initDictConfig(){
},
getSuperFieldList(){

@ -178,7 +178,8 @@
add: "/zygoods/zyGoods/add",
edit: "/zygoods/zyGoods/edit",
queryById: "/zygoods/zyGoods/queryById",
zy:"/zygoods/zyGoods/getspbh"
zy:"/zygoods/zyGoods/getspbh",
zystyle:"/zygoods/zyGoods/getzystyle",
}
}
},
@ -200,6 +201,16 @@
},
getxh(){
this.xh ="zy_style_model,model_number,id,style_id='" + this.model.styleId + "'";
getAction(this.url.zystyle, {ksid:this.model.styleId}).then((res) => {
if (res.success) {
// this.$forceUpdate();
this.$set(this.model,'goodsIntr',res.result.productOverview);
this.$set(this.model,'goodsPicture',res.result.designSketch);
this.$set(this.model,'defaultPicture',res.result.designSketch);
} else {
}
});
},
getspbh(){
getAction(this.url.zy, {lxid:this.model.clothsTypeId,xhid:this.model.modelId}).then((res) => {

@ -65,8 +65,9 @@ public class GoodsAccessoriesController extends JeecgController<GoodsAccessories
public Result<?> queryPageList(GoodsAccessories goodsAccessories,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
HttpServletRequest req,String goodsid) {
QueryWrapper<GoodsAccessories> queryWrapper = QueryGenerator.initQueryWrapper(goodsAccessories, req.getParameterMap());
queryWrapper.eq("goods_id",goodsid);
Page<GoodsAccessories> page = new Page<GoodsAccessories>(pageNo, pageSize);
IPage<GoodsAccessories> pageList = goodsAccessoriesService.page(page, queryWrapper);
return Result.OK(pageList);

@ -65,8 +65,9 @@ public class GoodsFabricController extends JeecgController<GoodsFabric, IGoodsFa
public Result<?> queryPageList(GoodsFabric goodsFabric,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
HttpServletRequest req,String goodsid) {
QueryWrapper<GoodsFabric> queryWrapper = QueryGenerator.initQueryWrapper(goodsFabric, req.getParameterMap());
queryWrapper.eq("goods_id",goodsid);
Page<GoodsFabric> page = new Page<GoodsFabric>(pageNo, pageSize);
IPage<GoodsFabric> pageList = goodsFabricService.page(page, queryWrapper);
return Result.OK(pageList);

@ -15,8 +15,14 @@ import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.base.entity.ZyClothsType;
import org.jeecg.modules.demo.base.service.IZyClothsModularService;
import org.jeecg.modules.demo.base.service.IZyClothsTypeService;
import org.jeecg.modules.demo.goodsaccessories.entity.GoodsAccessories;
import org.jeecg.modules.demo.goodsaccessories.service.IGoodsAccessoriesService;
import org.jeecg.modules.demo.goodsfabric.entity.GoodsFabric;
import org.jeecg.modules.demo.goodsfabric.service.IGoodsFabricService;
import org.jeecg.modules.demo.goodsmodule.entity.GoodsModule;
import org.jeecg.modules.demo.goodsmodule.service.IGoodsModuleService;
import org.jeecg.modules.demo.zyaccessories.entity.ZyStyleAccessories;
import org.jeecg.modules.demo.zyaccessories.service.IZyStyleAccessoriesService;
import org.jeecg.modules.demo.zygoods.entity.ZyGoods;
import org.jeecg.modules.demo.zygoods.service.IZyGoodsService;
@ -25,7 +31,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService;
import org.jeecg.modules.zystylefabric.entity.ZyStyleFabric;
import org.jeecg.modules.zystylefabric.service.IZyStyleFabricService;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModel;
import org.jeecg.modules.zystylemodel.service.IZyStyleModelService;
import org.jeecg.modules.zystylemodule.entity.ZyStyleModule;
@ -71,6 +80,14 @@ public class ZyGoodsController extends JeecgController<ZyGoods, IZyGoodsService>
private IZyStyleModelService zyStyleModelService;
@Autowired
private IZyClothsTypeService zyClothsTypeService;
@Autowired
private IZyStyleFabricService zyStyleFabricService;
@Autowired
private IZyStyleAccessoriesService zyStyleAccessoriesService;
@Autowired
private IGoodsAccessoriesService goodsAccessoriesService;
@Autowired
private IGoodsFabricService goodsFabricService;
/**
* 分页列表查询
@ -119,6 +136,26 @@ public class ZyGoodsController extends JeecgController<ZyGoods, IZyGoodsService>
//goodsModule.setPlace();
goodsModuleService.save(goodsModule);
}
ZyStyleFabric zyStyleFabric = new ZyStyleFabric();
QueryWrapper<ZyStyleFabric> queryWrapperzsf = QueryGenerator.initQueryWrapper(zyStyleFabric, req.getParameterMap());
queryWrapperzsf.eq("style_id",zyGoods.getStyleId());
List<ZyStyleFabric> listzsf = zyStyleFabricService.list(queryWrapperzsf);
for (int j = 0 ; j < listzsf.size() ; j++){
GoodsFabric goodsFabric = new GoodsFabric();
goodsFabric.setGoodsId(zyGoods.getId());
goodsFabric.setFabricId(listzsf.get(j).getFabricId());
goodsFabricService.save(goodsFabric);
}
ZyStyleAccessories zyStyleAccessories = new ZyStyleAccessories();
QueryWrapper<ZyStyleAccessories> queryWrapperzsa = QueryGenerator.initQueryWrapper(zyStyleAccessories, req.getParameterMap());
queryWrapperzsa.eq("style_id",zyGoods.getStyleId());
List<ZyStyleAccessories> listzsa = zyStyleAccessoriesService.list(queryWrapperzsa);
for (int k = 0 ; k < listzsa.size() ; k++){
GoodsAccessories goodsAccessories = new GoodsAccessories();
goodsAccessories.setGoodsId(zyGoods.getId());
goodsAccessories.setAccessoriesId(listzsa.get(k).getAccessoriesId());
goodsAccessoriesService.save(goodsAccessories);
}
return Result.OK("添加成功!");
}
@ -151,8 +188,121 @@ public class ZyGoodsController extends JeecgController<ZyGoods, IZyGoodsService>
//goodsModule1.setPlace();
goodsModuleService.save(goodsModule1);
}
GoodsFabric goodsFabric = new GoodsFabric();
QueryWrapper<GoodsFabric> queryWrappergf = QueryGenerator.initQueryWrapper(goodsFabric, req.getParameterMap());
queryWrappergf.eq("goods_id",zyGoods.getId());
goodsFabricService.remove(queryWrappergf);
ZyStyleFabric zyStyleFabric = new ZyStyleFabric();
QueryWrapper<ZyStyleFabric> queryWrapperzsf = QueryGenerator.initQueryWrapper(zyStyleFabric, req.getParameterMap());
queryWrapperzsf.eq("style_id",zyGoods.getStyleId());
List<ZyStyleFabric> listzsf = zyStyleFabricService.list(queryWrapperzsf);
for (int j = 0 ; j < listzsf.size() ; j++){
GoodsFabric goodsFabric1 = new GoodsFabric();
goodsFabric1.setGoodsId(zyGoods.getId());
goodsFabric1.setFabricId(listzsf.get(j).getFabricId());
goodsFabricService.save(goodsFabric1);
}
GoodsAccessories goodsAccessories = new GoodsAccessories();
QueryWrapper<GoodsAccessories> queryWrapperga = QueryGenerator.initQueryWrapper(goodsAccessories, req.getParameterMap());
queryWrapperga.eq("goods_id",zyGoods.getId());
goodsAccessoriesService.remove(queryWrapperga);
ZyStyleAccessories zyStyleAccessories = new ZyStyleAccessories();
QueryWrapper<ZyStyleAccessories> queryWrapperzsa = QueryGenerator.initQueryWrapper(zyStyleAccessories, req.getParameterMap());
queryWrapperzsa.eq("style_id",zyGoods.getStyleId());
List<ZyStyleAccessories> listzsa = zyStyleAccessoriesService.list(queryWrapperzsa);
for (int k = 0 ; k < listzsa.size() ; k++){
GoodsAccessories goodsAccessories1 = new GoodsAccessories();
goodsAccessories1.setGoodsId(zyGoods.getId());
goodsAccessories1.setAccessoriesId(listzsa.get(k).getAccessoriesId());
goodsAccessoriesService.save(goodsAccessories1);
}
return Result.OK("编辑成功!");
}
/**
* 更新商品辅料
*
* @param id
* @return
*/
@AutoLog(value = "更新商品辅料")
@ApiOperation(value="更新商品辅料", notes="更新商品辅料")
@GetMapping(value = "/upfl")
public Result<?> upfl(@RequestParam(name="id",required=true) String id,HttpServletRequest req) {
ZyGoods zyGoods = zyGoodsService.getById(id);
GoodsAccessories goodsAccessories = new GoodsAccessories();
QueryWrapper<GoodsAccessories> queryWrapperga = QueryGenerator.initQueryWrapper(goodsAccessories, req.getParameterMap());
queryWrapperga.eq("goods_id",id);
goodsAccessoriesService.remove(queryWrapperga);
ZyStyleAccessories zyStyleAccessories = new ZyStyleAccessories();
QueryWrapper<ZyStyleAccessories> queryWrapperzsa = QueryGenerator.initQueryWrapper(zyStyleAccessories, req.getParameterMap());
queryWrapperzsa.eq("style_id",zyGoods.getStyleId());
List<ZyStyleAccessories> listzsa = zyStyleAccessoriesService.list(queryWrapperzsa);
for (int k = 0 ; k < listzsa.size() ; k++){
GoodsAccessories goodsAccessories1 = new GoodsAccessories();
goodsAccessories1.setGoodsId(id);
goodsAccessories1.setAccessoriesId(listzsa.get(k).getAccessoriesId());
goodsAccessoriesService.save(goodsAccessories1);
}
return Result.OK("更新成功!");
}
/**
* 更新商品模块
*
* @param id
* @return
*/
@AutoLog(value = "更新商品模块")
@ApiOperation(value="更新商品模块", notes="更新商品模块")
@GetMapping(value = "/upmk")
public Result<?> upmk(@RequestParam(name="id",required=true) String id,HttpServletRequest req) {
ZyGoods zyGoods = zyGoodsService.getById(id);
GoodsModule goodsModule = new GoodsModule();
QueryWrapper<GoodsModule> queryWrappergm = QueryGenerator.initQueryWrapper(goodsModule, req.getParameterMap());
queryWrappergm.eq("goods_id",id);
goodsModuleService.remove(queryWrappergm);
ZyStyleModule zyStyleModule = new ZyStyleModule();
QueryWrapper<ZyStyleModule> queryWrapperzsm = QueryGenerator.initQueryWrapper(zyStyleModule, req.getParameterMap());
queryWrapperzsm.eq("style_id",zyGoods.getStyleId());
List<ZyStyleModule> listzsm = zyStyleModuleService.list(queryWrapperzsm);
for (int i = 0 ; i < listzsm.size() ; i++){
GoodsModule goodsModule1 = new GoodsModule();
goodsModule1.setGoodsId(id);
goodsModule1.setStyleId(zyGoods.getStyleId());
goodsModule1.setStyleModuleId(listzsm.get(i).getId());
goodsModule1.setModuleId(listzsm.get(i).getModularId());
//部位暂时没有字段,zy_cloths_modular的place
//goodsModule1.setPlace();
goodsModuleService.save(goodsModule1);
}
return Result.OK("更新成功!");
}
/**
* 更新商品面料
*
* @param id
* @return
*/
@AutoLog(value = "更新商品面料")
@ApiOperation(value="更新商品面料", notes="更新商品面料")
@GetMapping(value = "/upml")
public Result<?> upml(@RequestParam(name="id",required=true) String id,HttpServletRequest req) {
ZyGoods zyGoods = zyGoodsService.getById(id);
GoodsFabric goodsFabric = new GoodsFabric();
QueryWrapper<GoodsFabric> queryWrappergf = QueryGenerator.initQueryWrapper(goodsFabric, req.getParameterMap());
queryWrappergf.eq("goods_id",zyGoods.getId());
goodsFabricService.remove(queryWrappergf);
ZyStyleFabric zyStyleFabric = new ZyStyleFabric();
QueryWrapper<ZyStyleFabric> queryWrapperzsf = QueryGenerator.initQueryWrapper(zyStyleFabric, req.getParameterMap());
queryWrapperzsf.eq("style_id",zyGoods.getStyleId());
List<ZyStyleFabric> listzsf = zyStyleFabricService.list(queryWrapperzsf);
for (int j = 0 ; j < listzsf.size() ; j++){
GoodsFabric goodsFabric1 = new GoodsFabric();
goodsFabric1.setGoodsId(zyGoods.getId());
goodsFabric1.setFabricId(listzsf.get(j).getFabricId());
goodsFabricService.save(goodsFabric1);
}
return Result.OK("更新成功!");
}
/**
* 通过id删除
@ -239,6 +389,20 @@ public class ZyGoodsController extends JeecgController<ZyGoods, IZyGoodsService>
return Result.OK(spbh);
}
/**
* 动态服装款式
*
* @param
* @return
*/
@AutoLog(value = "商品表-通过id查询")
@ApiOperation(value="商品表-通过id查询", notes="商品表-通过id查询")
@GetMapping(value = "/getzystyle")
public Result<?> getzystyle(@RequestParam(name="ksid",required=true) String ksid) {
ZyClothsStyle zyClothsStyle = zyClothsStyleService.getById(ksid);
return Result.OK(zyClothsStyle);
}
/**
* 导出excel
*

Loading…
Cancel
Save