Merge remote-tracking branch 'origin/master'

zhc4dev
赵玉瑞 2 years ago
commit 0643cac9f4
  1. 10
      ant-design-vue-jeecg/src/config/router.config.js
  2. 2
      ant-design-vue-jeecg/src/permission.js
  3. 32
      ant-design-vue-jeecg/src/views/shopping/pages/clothDetail.vue
  4. 237
      ant-design-vue-jeecg/src/views/shopping/pages/clothType.vue
  5. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdaccessories/mapper/ProductAccessoriesMapper.java
  6. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdaccessories/service/IProductAccessoriesService.java
  7. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdaccessories/service/impl/ProductAccessoriesServiceImpl.java
  8. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdfabric/mapper/ProductFabricMapper.java
  9. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdfabric/service/IProductFabricService.java
  10. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdfabric/service/impl/ProductFabricServiceImpl.java
  11. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdmachine/service/IProductMachineService.java
  12. 9
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdmachine/service/impl/ProductMachineServiceImpl.java
  13. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdoperationtool/mapper/ProductOperationtoolMapper.java
  14. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdoperationtool/service/IProductOperationtoolService.java
  15. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdoperationtool/service/impl/ProductOperationtoolServiceImpl.java
  16. 30
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/zyproductprocess/controller/ZyProductProcessController.java

@ -587,6 +587,12 @@ export const constantRouterMap = [
name: 'register', name: 'register',
component: () => import(/* webpackChunkName: "user" */ '@/views/user/register/Register') component: () => import(/* webpackChunkName: "user" */ '@/views/user/register/Register')
}, },
{
path: 'sgin',
name: 'sgin',
component: () => import(/* webpackChunkName: "user" */ '@/views/personalCenter/SignInView')
},
{ {
path: 'register-result', path: 'register-result',
name: 'registerResult', name: 'registerResult',
@ -632,4 +638,8 @@ export const constantRouterMap = [
path: '/shopping/views/sirendingzhi',//这里是你需要设置新窗口打开的页面的路径s path: '/shopping/views/sirendingzhi',//这里是你需要设置新窗口打开的页面的路径s
component: () => import('@/views/shopping/pages/sirendingzhi'), component: () => import('@/views/shopping/pages/sirendingzhi'),
}, },
{
path: '/shopping/views/ClothDetail',//这里是你需要设置新窗口打开的页面的路径s
component: () => import('@/views/shopping/pages/clothDetail'),
},
] ]

@ -9,7 +9,7 @@ import { generateIndexRouter } from "@/utils/util"
NProgress.configure({ showSpinner: false }) // NProgress Configuration NProgress.configure({ showSpinner: false }) // NProgress Configuration
const whiteList = ['/user/login','/userequip/loginequip', const whiteList = ['/user/login','/userequip/loginequip','/user/sgin',
'/userschedule/loginschedule','/usersimulation/loginsimulation','/userdroduction/logindroduction', '/userschedule/loginschedule','/usersimulation/loginsimulation','/userdroduction/logindroduction',
'/userfitting/loginfitting','/userglobal/loginglobal','/userworkmanship/loginworkmanship','/userworkorder/loginworkorder', '/userfitting/loginfitting','/userglobal/loginglobal','/userworkmanship/loginworkmanship','/userworkorder/loginworkorder',
'/usermall/loginmall','/userbigdata/loginbigdata','/loginbx/loginbx','/userattendance/loginattendance','/userdata/logindata', '/usermall/loginmall','/userbigdata/loginbigdata','/loginbx/loginbx','/userattendance/loginattendance','/userdata/logindata',

@ -0,0 +1,32 @@
<template>
<div class="clothDetails">
<Header fontColor="#000"></Header>
<div class="detailDiv">
详情页衣服id{{ this.$route.query.id }} 详情页衣服title{{
this.$route.query.title
}}
</div>
</div>
</template>
<script>
import Header from "../components/Header/HeaderView";
export default {
name: "clothDetail",
components: { Header },
data() {
return {};
},
};
</script>
<style>
.clothDetails .top .middle .router-link-exact-active.router-link-active {
border-bottom: 2px solid #000;
}
</style>
<style lang="less" scoped>
.clothDetails {
.detailDiv {
padding-top: 100px;
}
}
</style>

@ -5,58 +5,44 @@
<div class="main"> <div class="main">
<div class="jz d-flex"> <div class="jz d-flex">
<el-menu <el-menu
default-active="2"
class="el-menu-vertical-demo" class="el-menu-vertical-demo"
@open="handleOpen" @select="handleSelet"
@close="handleClose"
style="width: 10%; min-width: 140px" style="width: 10%; min-width: 140px"
:unique-opened="true" :unique-opened="true"
> >
<el-submenu v-for="(item, i) in typeData" :key="i" index="i+1"> <el-submenu v-for="(item, i) in typeData" :key="i" :index="item.id">
<template slot="title"> <template slot="title">
<i class="el-icon-male"></i> <i class="el-icon-male"></i>
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
</template> </template>
<el-menu-item-group v-for="(j, i2) in item.childrens" :key="i2"> <el-submenu v-for="(j, i2) in item.childrens" :key="i2" :index="j.id">
<template slot="title">{{ j.name }}</template> <template slot="title">{{ j.name }}</template>
<el-menu-item <el-menu-item v-for="(k, i3) in j.childrens" :key="i3" :index="k.id">{{ k.name }}</el-menu-item>
index="1-1" </el-submenu>
v-for="(k, i3) in j.childrens"
:key="i3"
>{{ k.name }}</el-menu-item
>
</el-menu-item-group>
</el-submenu> </el-submenu>
<!-- <el-menu-item index="2">
<i class="el-icon-female"></i>
<span slot="title">女装</span>
</el-menu-item>
<el-menu-item index="3">
<i class="el-icon-lollipop"></i>
<span slot="title">童装</span>
</el-menu-item> -->
</el-menu> </el-menu>
<div class="right"> <div class="right">
<div class="name d-flex"> <div class="name d-flex">
<span>Polo衫</span> <span>{{this.current.name}}</span>
<div class="d-flex"> <div class="d-flex">
<el-dropdown> <el-dropdown @command="handleCommand">
<span class="el-dropdown-link"> <span class="el-dropdown-link">
综合<i class="el-icon-arrow-down el-icon--right"></i> 排序<i class="el-icon-arrow-down el-icon--right"></i>
</span> </span>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item>按销量排序</el-dropdown-item> <el-dropdown-item command="heat">热度</el-dropdown-item>
<el-dropdown-item>按评分排序</el-dropdown-item> <!-- <el-dropdown-item command="esteem">评分</el-dropdown-item>-->
<el-dropdown-item>按价格排序</el-dropdown-item> <el-dropdown-item command="high">价格降序</el-dropdown-item>
<el-dropdown-item command="low">价格升序</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<div class="iconDiv d-flex"> <!-- <div class="iconDiv d-flex">-->
<span>价格</span> <!-- <span>价格</span>-->
<div class="icon d-flex"> <!-- <div class="icon d-flex">-->
<i class="el-icon-arrow-up"></i> <!-- <i class="el-icon-arrow-up"></i>-->
<i class="el-icon-arrow-down"></i> <!-- <i class="el-icon-arrow-down"></i>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
</div> </div>
</div> </div>
<div class="clothDiv d-flex"> <div class="clothDiv d-flex">
@ -68,9 +54,6 @@
> >
<div class="imgDiv"> <div class="imgDiv">
<img :src="item.imgUrl" alt="" /> <img :src="item.imgUrl" alt="" />
<!-- <div class="button c_000 f_16" @click="clothChoice(item)">
点击选择
</div> -->
</div> </div>
<div class="clothTitle"> <div class="clothTitle">
<p class="price d-flex"> <p class="price d-flex">
@ -90,6 +73,32 @@
</template> </template>
<script> <script>
import Header from '../components/Header/HeaderView' import Header from '../components/Header/HeaderView'
let compareDown = function (prop) {
return function (obj1, obj2) {
var val1 = obj1[prop];
var val2 = obj2[prop];
if (val1 < val2) {
return 1;
} else if (val1 > val2) {
return -1;
} else {
return 0;
}
}
}
let compareUp = function (prop) {
return function (obj1, obj2) {
var val1 = obj1[prop];
var val2 = obj2[prop];
if (val1 < val2) {
return -1;
} else if (val1 > val2) {
return 1;
} else {
return 0;
}
}
}
export default { export default {
name:"clothType", name:"clothType",
components: {Header}, components: {Header},
@ -100,15 +109,15 @@
{ {
id: 1, id: 1,
imgUrl: require("../assets/cloth.png"), imgUrl: require("../assets/cloth.png"),
currentPrice: 599, currentPrice: 199,
historicalPrice: 799, historicalPrice: 799,
title: "HOODIE 运动长袖连帽卫衣套头衫", title: "HOODIE 运动长袖连帽卫衣套头衫",
heat: 3200, heat: 3100,
}, },
{ {
id: 2, id: 2,
imgUrl: require("../assets/cloth.png"), imgUrl: require("../assets/cloth.png"),
currentPrice: 599, currentPrice: 299,
historicalPrice: 799, historicalPrice: 799,
title: "HOODIE 运动长袖连帽卫衣套头衫", title: "HOODIE 运动长袖连帽卫衣套头衫",
heat: 3200, heat: 3200,
@ -116,18 +125,18 @@
{ {
id: 3, id: 3,
imgUrl: require("../assets/cloth.png"), imgUrl: require("../assets/cloth.png"),
currentPrice: 599, currentPrice: 399,
historicalPrice: 799, historicalPrice: 799,
title: "HOODIE 运动长袖连帽卫衣套头衫", title: "HOODIE 运动长袖连帽卫衣套头衫",
heat: 3200, heat: 3300,
}, },
{ {
id: 4, id: 4,
imgUrl: require("../assets/cloth.png"), imgUrl: require("../assets/cloth.png"),
currentPrice: 599, currentPrice: 499,
historicalPrice: 799, historicalPrice: 799,
title: "HOODIE 运动长袖连帽卫衣套头衫", title: "HOODIE 运动长袖连帽卫衣套头衫",
heat: 3200, heat: 3400,
}, },
{ {
id: 5, id: 5,
@ -135,15 +144,15 @@
currentPrice: 599, currentPrice: 599,
historicalPrice: 799, historicalPrice: 799,
title: "HOODIE 运动长袖连帽卫衣套头衫", title: "HOODIE 运动长袖连帽卫衣套头衫",
heat: 3200, heat: 3500,
}, },
{ {
id: 6, id: 6,
imgUrl: require("../assets/cloth.png"), imgUrl: require("../assets/cloth.png"),
currentPrice: 599, currentPrice: 699,
historicalPrice: 799, historicalPrice: 799,
title: "HOODIE 运动长袖连帽卫衣套头衫", title: "HOODIE 运动长袖连帽卫衣套头衫",
heat: 3200, heat: 3600,
}, },
{ {
id: 7, id: 7,
@ -151,7 +160,7 @@
currentPrice: 599, currentPrice: 599,
historicalPrice: 799, historicalPrice: 799,
title: "HOODIE 运动长袖连帽卫衣套头衫", title: "HOODIE 运动长袖连帽卫衣套头衫",
heat: 3200, heat: 3700,
}, },
{ {
id: 8, id: 8,
@ -159,7 +168,7 @@
currentPrice: 599, currentPrice: 599,
historicalPrice: 799, historicalPrice: 799,
title: "HOODIE 运动长袖连帽卫衣套头衫", title: "HOODIE 运动长袖连帽卫衣套头衫",
heat: 3200, heat: 3800,
}, },
{ {
id: 9, id: 9,
@ -167,7 +176,7 @@
currentPrice: 599, currentPrice: 599,
historicalPrice: 799, historicalPrice: 799,
title: "HOODIE 运动长袖连帽卫衣套头衫", title: "HOODIE 运动长袖连帽卫衣套头衫",
heat: 3200, heat: 3900,
}, },
{ {
id: 10, id: 10,
@ -175,89 +184,89 @@
currentPrice: 599, currentPrice: 599,
historicalPrice: 799, historicalPrice: 799,
title: "HOODIE 运动长袖连帽卫衣套头衫", title: "HOODIE 运动长袖连帽卫衣套头衫",
heat: 3200, heat:4000,
}, },
], ],
// //
typeData: [ typeData: [
{ {
id: 1, id: '1',
name: "男装", name: "男装",
childrens: [ childrens: [
{ {
id: 1 - 1, id: '11',
name: "上衣", name: "上衣",
childrens: [ childrens: [
{ {
id: 1 - 1 - 1, id: '111',
name: "衬衫", name: "衬衫",
}, },
{ {
id: 1 - 1 - 2, id: '112',
name: "卫衣", name: "卫衣",
}, },
{ {
id: 1 - 1 - 3, id: '113',
name: "Polo衫", name: "Polo衫",
}, },
{ {
id: 1 - 1 - 4, id: '114',
name: "针织衫", name: "针织衫",
}, },
], ],
}, },
{ {
id: 1 - 2, id: '12',
name: "外套", name: "外套",
childrens: [ childrens: [
{ {
id: 1 - 2 - 1, id: '121',
name: "夹克", name: "夹克",
}, },
{ {
id: 1 - 2 - 2, id: '122',
name: "羽绒服", name: "羽绒服",
}, },
{ {
id: 1 - 2 - 3, id: '123',
name: "风衣", name: "风衣",
}, },
], ],
}, },
{ {
id: 1 - 3, id: '13',
name: "裤子", name: "裤子",
childrens: [ childrens: [
{ {
id: 1 - 3 - 1, id: '131',
name: "休闲裤", name: "休闲裤",
}, },
{ {
id: 1 - 3 - 2, id: '132',
name: "西裤", name: "西裤",
}, },
{ {
id: 1 - 3 - 3, id: '133',
name: "工装裤", name: "工装裤",
}, },
{ {
id: 1 - 3 - 4, id: '134',
name: "运动裤", name: "运动裤",
}, },
{ {
id: 1 - 3 - 5, id: '135',
name: "卫裤", name: "卫裤",
}, },
{ {
id: 1 - 3 - 6, id: '136',
name: "九分裤", name: "九分裤",
}, },
{ {
id: 1 - 3 - 7, id: '137',
name: "短裤", name: "短裤",
}, },
{ {
id: 1 - 3 - 8, id: '138',
name: "哈伦裤", name: "哈伦裤",
}, },
], ],
@ -265,83 +274,83 @@
], ],
}, },
{ {
id: 2, id: '2',
name: "女装", name: "女装",
childrens: [ childrens: [
{ {
id: 2 - 1, id: '21',
name: "上衣", name: "上衣",
childrens: [ childrens: [
{ {
id: 2 - 1 - 1, id: '211',
name: "衬衫", name: "衬衫",
}, },
{ {
id: 2 - 1 - 2, id: '212',
name: "卫衣", name: "卫衣",
}, },
{ {
id: 2 - 1 - 3, id: '213',
name: "Polo衫", name: "Polo衫",
}, },
{ {
id: 2 - 1 - 4, id: '214',
name: "针织衫", name: "针织衫",
}, },
], ],
}, },
{ {
id: 2 - 2, id: '22',
name: "外套", name: "外套",
childrens: [ childrens: [
{ {
id: 2 - 2 - 1, id: '221',
name: "夹克", name: "夹克",
}, },
{ {
id: 2 - 2 - 2, id: '222',
name: "羽绒服", name: "羽绒服",
}, },
{ {
id: 2 - 2 - 3, id: '223',
name: "风衣", name: "风衣",
}, },
], ],
}, },
{ {
id: 2 - 3, id: '23',
name: "裤子", name: "裤子",
childrens: [ childrens: [
{ {
id: 2 - 3 - 1, id: '231',
name: "休闲裤", name: "休闲裤",
}, },
{ {
id: 2 - 3 - 2, id: '232',
name: "西裤", name: "西裤",
}, },
{ {
id: 2 - 3 - 3, id: '233',
name: "工装裤", name: "工装裤",
}, },
{ {
id: 2 - 3 - 4, id: '234',
name: "运动裤", name: "运动裤",
}, },
{ {
id: 2 - 3 - 5, id: '235',
name: "卫裤", name: "卫裤",
}, },
{ {
id: 2 - 3 - 6, id: '236',
name: "九分裤", name: "九分裤",
}, },
{ {
id: 2 - 3 - 7, id: '237',
name: "短裤", name: "短裤",
}, },
{ {
id: 2 - 3 - 8, id: '238',
name: "哈伦裤", name: "哈伦裤",
}, },
], ],
@ -349,25 +358,51 @@
], ],
}, },
], ],
//
current:{
id:'',
name:''
}
}; };
}, },
methods: { methods: {
handleOpen(key, keyPath) { findIndex(indexPath){
console.log(key, keyPath); const indexa = this.typeData.findIndex((value, keys, arr) => {
}, return value.id == indexPath[0]
handleClose(key, keyPath) { })
console.log(key, keyPath); const indexb = this.typeData[indexa].childrens.findIndex((value, keys, arr) => {
return value.id == indexPath[1]
})
const indexc = this.typeData[indexa].childrens[indexb].childrens.findIndex((value, keys, arr) => {
return value.id == indexPath[2]
})
this.current.name = this.typeData[indexa].childrens[indexb].childrens[indexc].name
this.current.id = this.typeData[indexa].childrens[indexb].childrens[indexc].id
}, },
clothChoice(item) { handleSelet(index,indexPath){
this.dialogModel.imgUrl = item.imgUrl; this.findIndex(indexPath)
this.dialogModel.name = item.title;
this.dialogModel.price = item.currentPrice;
this.dialogVisible = true;
}, },
dialogSure() { clothDetails(item) {
this.dialogVisible = false; this.$router.push({
this.current = 1; path: "/shopping/views/ClothDetail",
query: { id: item.id, title: item.title },
});
}, },
handleCommand(command){
if(command == 'heat'){//
this.clothsList.sort(compareDown("heat"))
}
else if(command == 'high'){//
this.clothsList.sort(compareDown("currentPrice"))
}
// else if(command == 'esteem'){//
// this.clothsList.sort(compare("heat"))
// }
else if(command == 'low'){//
this.clothsList.sort(compareUp("currentPrice"))
}
}
}, },
} }
</script> </script>

@ -4,6 +4,7 @@ package org.jeecg.modules.product.pdaccessories.mapper;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@ -20,4 +21,7 @@ public interface ProductAccessoriesMapper extends BaseMapper<ProductAccessories>
@Select("select id from zy_accessories where contents like #{s}") @Select("select id from zy_accessories where contents like #{s}")
List<String> find(String s); List<String> find(String s);
@Delete("delete from product_accessories where product_id=#{pd} and accessories_id=#{access}")
void deleteAccessories(@Param("pd") String productId, @Param("access") String listAccessory);
} }

@ -15,4 +15,6 @@ import java.util.List;
public interface IProductAccessoriesService extends IService<ProductAccessories> { public interface IProductAccessoriesService extends IService<ProductAccessories> {
List<String> findAll(String s); List<String> findAll(String s);
void deleteAccessories(String productId, String listAccessory);
} }

@ -26,4 +26,9 @@ public class ProductAccessoriesServiceImpl extends ServiceImpl<ProductAccessorie
public List<String> findAll(String s) { public List<String> findAll(String s) {
return productAccessoriesMapper.find(s); return productAccessoriesMapper.find(s);
} }
@Override
public void deleteAccessories(String productId, String listAccessory) {
productAccessoriesMapper.deleteAccessories(productId,listAccessory);
}
} }

@ -4,6 +4,7 @@ package org.jeecg.modules.product.pdfabric.mapper;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@ -20,4 +21,7 @@ public interface ProductFabricMapper extends BaseMapper<ProductFabric> {
@Select("select id from zy_fabric where name like #{s}") @Select("select id from zy_fabric where name like #{s}")
List<String> find(String s); List<String> find(String s);
@Delete("delete from product_fabric where product_id=#{productId} and fabric_id=#{s1}")
void deleteFabric(@Param("productId") String productId, @Param("s1") String s1);
} }

@ -14,4 +14,6 @@ import java.util.List;
public interface IProductFabricService extends IService<ProductFabric> { public interface IProductFabricService extends IService<ProductFabric> {
List<String> findAll(String s); List<String> findAll(String s);
void deleteFabric(String productId, String s1);
} }

@ -26,4 +26,9 @@ public class ProductFabricServiceImpl extends ServiceImpl<ProductFabricMapper, P
public List<String> findAll(String s) { public List<String> findAll(String s) {
return productFabricMapper.find(s); return productFabricMapper.find(s);
} }
@Override
public void deleteFabric(String productId, String s1) {
productFabricMapper.deleteFabric(productId,s1);
}
} }

@ -19,4 +19,6 @@ public interface IProductMachineService extends IService<ProductMachine> {
void up(String id); void up(String id);
void down(String id); void down(String id);
void deleteMachine(String productId, String s1);
} }

@ -1,6 +1,7 @@
package org.jeecg.modules.product.pdmachine.service.impl; package org.jeecg.modules.product.pdmachine.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.jeecg.modules.product.pdmachine.entity.ProductMachine; import org.jeecg.modules.product.pdmachine.entity.ProductMachine;
import org.jeecg.modules.product.pdmachine.mapper.ProductMachineMapper; import org.jeecg.modules.product.pdmachine.mapper.ProductMachineMapper;
import org.jeecg.modules.product.pdmachine.service.IProductMachineService; import org.jeecg.modules.product.pdmachine.service.IProductMachineService;
@ -36,4 +37,12 @@ public class ProductMachineServiceImpl extends ServiceImpl<ProductMachineMapper,
public void down(String id) { public void down(String id) {
productMachineMapper.down(id); productMachineMapper.down(id);
} }
@Override
public void deleteMachine(String productId, String s1) {
QueryWrapper queryWrapper=new QueryWrapper();
queryWrapper.eq("product_id",productId);
queryWrapper.eq("machine_id",s1);
productMachineMapper.delete(queryWrapper);
}
} }

@ -3,6 +3,7 @@ package org.jeecg.modules.product.pdoperationtool.mapper;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@ -25,4 +26,7 @@ public interface ProductOperationtoolMapper extends BaseMapper<ProductOperationt
void up(String id); void up(String id);
@Update("update product_operationtool set sort=sort-1 where id=#{id}") @Update("update product_operationtool set sort=sort-1 where id=#{id}")
void down(String id); void down(String id);
@Delete("delete from product_operationtool where product_id=#{pd} and operationtool_id=#{s1}")
void deteleTool(@Param("pd") String productId, @Param("s1") String s1);
} }

@ -19,4 +19,6 @@ public interface IProductOperationtoolService extends IService<ProductOperationt
void up(String id); void up(String id);
void down(String id); void down(String id);
void deteleTool(String productId, String s1);
} }

@ -34,4 +34,9 @@ public class ProductOperationtoolServiceImpl extends ServiceImpl<ProductOperatio
public void down(String s) { public void down(String s) {
productOperationtoolMapper.down(s); productOperationtoolMapper.down(s);
} }
@Override
public void deteleTool(String productId, String s1) {
productOperationtoolMapper.deteleTool(productId,s1);
}
} }

@ -185,6 +185,36 @@ public class ZyProductProcessController extends JeecgController<ZyProductProcess
@ApiOperation(value="产品工序-通过id删除", notes="产品工序-通过id删除") @ApiOperation(value="产品工序-通过id删除", notes="产品工序-通过id删除")
@DeleteMapping(value = "/delete") @DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) { public Result<?> delete(@RequestParam(name="id",required=true) String id) {
ZyProductProcess Zp=zyProductProcessService.getById(id);
String processId=Zp.getProcessId();
/*
* 首先根据id查到对应的工序id然后根据对应的工序id查到他所包含的对应所有属性属性集合根据商品id和属性集合进行删除
*
* */
//面料
List<String> listfabric =zyProductProcessService.findAllFabric(processId);
if(listfabric!=null&&listfabric.size()>0)
for (String s1 : listfabric) {
productFabricService.deleteFabric(Zp.getProductId(),s1);
}
//辅料
List<String> listAccessories =zyProductProcessService.findAllAccessories(processId);
if(listAccessories!=null&&listAccessories.size()>0)
for (String listAccessory : listAccessories) {
productAccessoriesService.deleteAccessories(Zp.getProductId(),listAccessory);
}
//工具
List<String> listOperationtool =zyProductProcessService.findAllOperationtool(processId);
if(listOperationtool!=null&&listOperationtool.size()>0)
for (String s1 : listOperationtool) {
productOperationtoolService.deteleTool(Zp.getProductId(),s1);
}
//设备
List<String> listMachine =zyProductProcessService.findAllMachine(processId);
if(listMachine!=null&&listMachine.size()>0)
for (String s1 : listMachine) {
productMachineService.deleteMachine(Zp.getProductId(),s1);
}
zyProductProcessService.removeById(id); zyProductProcessService.removeById(id);
return Result.OK("删除成功!"); return Result.OK("删除成功!");
} }

Loading…
Cancel
Save