diff --git a/ant-design-vue-jeecg/src/views/goodsaccessories/GoodsAccessoriesList.vue b/ant-design-vue-jeecg/src/views/goodsaccessories/GoodsAccessoriesList.vue
index 39eb472f..c6817e6c 100644
--- a/ant-design-vue-jeecg/src/views/goodsaccessories/GoodsAccessoriesList.vue
+++ b/ant-design-vue-jeecg/src/views/goodsaccessories/GoodsAccessoriesList.vue
@@ -4,11 +4,6 @@
-
-
-
-
-
@@ -18,10 +13,6 @@
查询
重置
-
- {{ toggleSearchStatus ? '收起' : '展开' }}
-
-
@@ -32,12 +23,14 @@
新增
-
导出
+
返回
+
更新
+
-
+
删除
@@ -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
}
}
diff --git a/ant-design-vue-jeecg/src/views/goodsaccessories/modules/GoodsAccessoriesForm.vue b/ant-design-vue-jeecg/src/views/goodsaccessories/modules/GoodsAccessoriesForm.vue
index 72eb6e61..148ff6df 100644
--- a/ant-design-vue-jeecg/src/views/goodsaccessories/modules/GoodsAccessoriesForm.vue
+++ b/ant-design-vue-jeecg/src/views/goodsaccessories/modules/GoodsAccessoriesForm.vue
@@ -5,7 +5,7 @@
-
+
@@ -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",
diff --git a/ant-design-vue-jeecg/src/views/goodsfabric/GoodsFabricList.vue b/ant-design-vue-jeecg/src/views/goodsfabric/GoodsFabricList.vue
index bd10ae3c..33991483 100644
--- a/ant-design-vue-jeecg/src/views/goodsfabric/GoodsFabricList.vue
+++ b/ant-design-vue-jeecg/src/views/goodsfabric/GoodsFabricList.vue
@@ -4,11 +4,6 @@
-
-
-
-
-
@@ -18,10 +13,6 @@
查询
重置
-
- {{ toggleSearchStatus ? '收起' : '展开' }}
-
-
@@ -32,12 +23,14 @@
新增
-
导出
+
返回
+
更新
+
-
+
删除
@@ -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
}
}
diff --git a/ant-design-vue-jeecg/src/views/goodsfabric/modules/GoodsFabricForm.vue b/ant-design-vue-jeecg/src/views/goodsfabric/modules/GoodsFabricForm.vue
index f984db58..1ffa010a 100644
--- a/ant-design-vue-jeecg/src/views/goodsfabric/modules/GoodsFabricForm.vue
+++ b/ant-design-vue-jeecg/src/views/goodsfabric/modules/GoodsFabricForm.vue
@@ -5,7 +5,7 @@
-
+
@@ -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",
diff --git a/ant-design-vue-jeecg/src/views/goodsmodule/GoodsModuleList.vue b/ant-design-vue-jeecg/src/views/goodsmodule/GoodsModuleList.vue
index 1b0261e3..c243d2f5 100644
--- a/ant-design-vue-jeecg/src/views/goodsmodule/GoodsModuleList.vue
+++ b/ant-design-vue-jeecg/src/views/goodsmodule/GoodsModuleList.vue
@@ -5,30 +5,19 @@
-
-
+
+
-
-
+
+
-
-
-
-
-
-
-
查询
重置
-
- {{ toggleSearchStatus ? '收起' : '展开' }}
-
-
@@ -39,12 +28,14 @@
新增
-
导出
+
返回
+
更新
+
-
+
删除
@@ -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(){
diff --git a/ant-design-vue-jeecg/src/views/goodsmodule/modules/GoodsModuleForm.vue b/ant-design-vue-jeecg/src/views/goodsmodule/modules/GoodsModuleForm.vue
index d41103ec..2620bebe 100644
--- a/ant-design-vue-jeecg/src/views/goodsmodule/modules/GoodsModuleForm.vue
+++ b/ant-design-vue-jeecg/src/views/goodsmodule/modules/GoodsModuleForm.vue
@@ -5,7 +5,7 @@
-
+
@@ -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",
diff --git a/ant-design-vue-jeecg/src/views/zygoods/ZyGoodsList.vue b/ant-design-vue-jeecg/src/views/zygoods/ZyGoodsList.vue
index 0667f1fe..1cc9499a 100644
--- a/ant-design-vue-jeecg/src/views/zygoods/ZyGoodsList.vue
+++ b/ant-design-vue-jeecg/src/views/zygoods/ZyGoodsList.vue
@@ -119,16 +119,21 @@
type="primary"
icon="download"
size="small"
- @click="downloadFile(text)">
- 下载
+ @click="lookFile(text)">
+ 预览
-
+
+ 管理
+
+
+ 管理
+
+
+ 管理
+
编辑
-
-
- 模块
更多
@@ -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(){
diff --git a/ant-design-vue-jeecg/src/views/zygoods/modules/ZyGoodsForm.vue b/ant-design-vue-jeecg/src/views/zygoods/modules/ZyGoodsForm.vue
index ba512797..834acd7b 100644
--- a/ant-design-vue-jeecg/src/views/zygoods/modules/ZyGoodsForm.vue
+++ b/ant-design-vue-jeecg/src/views/zygoods/modules/ZyGoodsForm.vue
@@ -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) => {
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/goodsaccessories/controller/GoodsAccessoriesController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/goodsaccessories/controller/GoodsAccessoriesController.java
index 65916333..75b400f5 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/goodsaccessories/controller/GoodsAccessoriesController.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/goodsaccessories/controller/GoodsAccessoriesController.java
@@ -49,7 +49,7 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class GoodsAccessoriesController extends JeecgController {
@Autowired
private IGoodsAccessoriesService goodsAccessoriesService;
-
+
/**
* 分页列表查询
*
@@ -65,13 +65,14 @@ public class GoodsAccessoriesController extends JeecgController queryPageList(GoodsAccessories goodsAccessories,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
- HttpServletRequest req) {
+ HttpServletRequest req,String goodsid) {
QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(goodsAccessories, req.getParameterMap());
+ queryWrapper.eq("goods_id",goodsid);
Page page = new Page(pageNo, pageSize);
IPage pageList = goodsAccessoriesService.page(page, queryWrapper);
return Result.OK(pageList);
}
-
+
/**
* 添加
*
@@ -85,7 +86,7 @@ public class GoodsAccessoriesController extends JeecgController {
@Autowired
private IGoodsFabricService goodsFabricService;
-
+
/**
* 分页列表查询
*
@@ -65,13 +65,14 @@ public class GoodsFabricController extends JeecgController queryPageList(GoodsFabric goodsFabric,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
- HttpServletRequest req) {
+ HttpServletRequest req,String goodsid) {
QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(goodsFabric, req.getParameterMap());
+ queryWrapper.eq("goods_id",goodsid);
Page page = new Page(pageNo, pageSize);
IPage pageList = goodsFabricService.page(page, queryWrapper);
return Result.OK(pageList);
}
-
+
/**
* 添加
*
@@ -85,7 +86,7 @@ public class GoodsFabricController extends JeecgController
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
//goodsModule.setPlace();
goodsModuleService.save(goodsModule);
}
+ ZyStyleFabric zyStyleFabric = new ZyStyleFabric();
+ QueryWrapper queryWrapperzsf = QueryGenerator.initQueryWrapper(zyStyleFabric, req.getParameterMap());
+ queryWrapperzsf.eq("style_id",zyGoods.getStyleId());
+ List 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 queryWrapperzsa = QueryGenerator.initQueryWrapper(zyStyleAccessories, req.getParameterMap());
+ queryWrapperzsa.eq("style_id",zyGoods.getStyleId());
+ List 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
//goodsModule1.setPlace();
goodsModuleService.save(goodsModule1);
}
+ GoodsFabric goodsFabric = new GoodsFabric();
+ QueryWrapper queryWrappergf = QueryGenerator.initQueryWrapper(goodsFabric, req.getParameterMap());
+ queryWrappergf.eq("goods_id",zyGoods.getId());
+ goodsFabricService.remove(queryWrappergf);
+ ZyStyleFabric zyStyleFabric = new ZyStyleFabric();
+ QueryWrapper queryWrapperzsf = QueryGenerator.initQueryWrapper(zyStyleFabric, req.getParameterMap());
+ queryWrapperzsf.eq("style_id",zyGoods.getStyleId());
+ List 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 queryWrapperga = QueryGenerator.initQueryWrapper(goodsAccessories, req.getParameterMap());
+ queryWrapperga.eq("goods_id",zyGoods.getId());
+ goodsAccessoriesService.remove(queryWrapperga);
+ ZyStyleAccessories zyStyleAccessories = new ZyStyleAccessories();
+ QueryWrapper queryWrapperzsa = QueryGenerator.initQueryWrapper(zyStyleAccessories, req.getParameterMap());
+ queryWrapperzsa.eq("style_id",zyGoods.getStyleId());
+ List 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 queryWrapperga = QueryGenerator.initQueryWrapper(goodsAccessories, req.getParameterMap());
+ queryWrapperga.eq("goods_id",id);
+ goodsAccessoriesService.remove(queryWrapperga);
+ ZyStyleAccessories zyStyleAccessories = new ZyStyleAccessories();
+ QueryWrapper queryWrapperzsa = QueryGenerator.initQueryWrapper(zyStyleAccessories, req.getParameterMap());
+ queryWrapperzsa.eq("style_id",zyGoods.getStyleId());
+ List 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 queryWrappergm = QueryGenerator.initQueryWrapper(goodsModule, req.getParameterMap());
+ queryWrappergm.eq("goods_id",id);
+ goodsModuleService.remove(queryWrappergm);
+ ZyStyleModule zyStyleModule = new ZyStyleModule();
+ QueryWrapper queryWrapperzsm = QueryGenerator.initQueryWrapper(zyStyleModule, req.getParameterMap());
+ queryWrapperzsm.eq("style_id",zyGoods.getStyleId());
+ List 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 queryWrappergf = QueryGenerator.initQueryWrapper(goodsFabric, req.getParameterMap());
+ queryWrappergf.eq("goods_id",zyGoods.getId());
+ goodsFabricService.remove(queryWrappergf);
+ ZyStyleFabric zyStyleFabric = new ZyStyleFabric();
+ QueryWrapper queryWrapperzsf = QueryGenerator.initQueryWrapper(zyStyleFabric, req.getParameterMap());
+ queryWrapperzsf.eq("style_id",zyGoods.getStyleId());
+ List 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
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
*