diff --git a/ant-design-vue-jeecg/src/config/router.config.js b/ant-design-vue-jeecg/src/config/router.config.js index eb93e038..ad108f89 100644 --- a/ant-design-vue-jeecg/src/config/router.config.js +++ b/ant-design-vue-jeecg/src/config/router.config.js @@ -587,6 +587,12 @@ export const constantRouterMap = [ name: 'register', component: () => import(/* webpackChunkName: "user" */ '@/views/user/register/Register') }, + + { + path: 'sgin', + name: 'sgin', + component: () => import(/* webpackChunkName: "user" */ '@/views/personalCenter/SignInView') + }, { path: 'register-result', name: 'registerResult', diff --git a/ant-design-vue-jeecg/src/permission.js b/ant-design-vue-jeecg/src/permission.js index 5f647edc..255bc2dd 100644 --- a/ant-design-vue-jeecg/src/permission.js +++ b/ant-design-vue-jeecg/src/permission.js @@ -9,7 +9,7 @@ import { generateIndexRouter } from "@/utils/util" 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', '/userfitting/loginfitting','/userglobal/loginglobal','/userworkmanship/loginworkmanship','/userworkorder/loginworkorder', '/usermall/loginmall','/userbigdata/loginbigdata','/loginbx/loginbx','/userattendance/loginattendance','/userdata/logindata', diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdaccessories/mapper/ProductAccessoriesMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdaccessories/mapper/ProductAccessoriesMapper.java index f7b96eaf..fba9f874 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdaccessories/mapper/ProductAccessoriesMapper.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdaccessories/mapper/ProductAccessoriesMapper.java @@ -4,6 +4,7 @@ package org.jeecg.modules.product.pdaccessories.mapper; import java.util.List; +import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Param; import com.baomidou.mybatisplus.core.mapper.BaseMapper; @@ -20,4 +21,7 @@ public interface ProductAccessoriesMapper extends BaseMapper @Select("select id from zy_accessories where contents like #{s}") List 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); } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdaccessories/service/IProductAccessoriesService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdaccessories/service/IProductAccessoriesService.java index cd2cda64..1d63d862 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdaccessories/service/IProductAccessoriesService.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdaccessories/service/IProductAccessoriesService.java @@ -15,4 +15,6 @@ import java.util.List; public interface IProductAccessoriesService extends IService { List findAll(String s); + + void deleteAccessories(String productId, String listAccessory); } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdaccessories/service/impl/ProductAccessoriesServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdaccessories/service/impl/ProductAccessoriesServiceImpl.java index 26573738..0310a358 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdaccessories/service/impl/ProductAccessoriesServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdaccessories/service/impl/ProductAccessoriesServiceImpl.java @@ -26,4 +26,9 @@ public class ProductAccessoriesServiceImpl extends ServiceImpl findAll(String s) { return productAccessoriesMapper.find(s); } + + @Override + public void deleteAccessories(String productId, String listAccessory) { + productAccessoriesMapper.deleteAccessories(productId,listAccessory); + } } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdfabric/mapper/ProductFabricMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdfabric/mapper/ProductFabricMapper.java index 1abfe6bd..ac597696 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdfabric/mapper/ProductFabricMapper.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdfabric/mapper/ProductFabricMapper.java @@ -4,6 +4,7 @@ package org.jeecg.modules.product.pdfabric.mapper; import java.util.List; +import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Param; import com.baomidou.mybatisplus.core.mapper.BaseMapper; @@ -20,4 +21,7 @@ public interface ProductFabricMapper extends BaseMapper { @Select("select id from zy_fabric where name like #{s}") List 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); } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdfabric/service/IProductFabricService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdfabric/service/IProductFabricService.java index 2b942921..e2db1039 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdfabric/service/IProductFabricService.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdfabric/service/IProductFabricService.java @@ -14,4 +14,6 @@ import java.util.List; public interface IProductFabricService extends IService { List findAll(String s); + + void deleteFabric(String productId, String s1); } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdfabric/service/impl/ProductFabricServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdfabric/service/impl/ProductFabricServiceImpl.java index 2910365c..84a3ff88 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdfabric/service/impl/ProductFabricServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdfabric/service/impl/ProductFabricServiceImpl.java @@ -26,4 +26,9 @@ public class ProductFabricServiceImpl extends ServiceImpl findAll(String s) { return productFabricMapper.find(s); } + + @Override + public void deleteFabric(String productId, String s1) { + productFabricMapper.deleteFabric(productId,s1); + } } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdmachine/service/IProductMachineService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdmachine/service/IProductMachineService.java index 79c7ad40..f280b691 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdmachine/service/IProductMachineService.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdmachine/service/IProductMachineService.java @@ -19,4 +19,6 @@ public interface IProductMachineService extends IService { void up(String id); void down(String id); + + void deleteMachine(String productId, String s1); } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdmachine/service/impl/ProductMachineServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdmachine/service/impl/ProductMachineServiceImpl.java index 929178c6..2c08c1fb 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdmachine/service/impl/ProductMachineServiceImpl.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/product/pdmachine/service/impl/ProductMachineServiceImpl.java @@ -1,6 +1,7 @@ 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.mapper.ProductMachineMapper; import org.jeecg.modules.product.pdmachine.service.IProductMachineService; @@ -36,4 +37,12 @@ public class ProductMachineServiceImpl extends ServiceImpl delete(@RequestParam(name="id",required=true) String id) { + ZyProductProcess Zp=zyProductProcessService.getById(id); + String processId=Zp.getProcessId(); + /* + * 首先根据id查到对应的工序id,然后根据对应的工序id,查到他所包含的对应所有属性,属性集合,根据商品id和属性集合进行删除 + * + * */ + //面料 + List listfabric =zyProductProcessService.findAllFabric(processId); + if(listfabric!=null&&listfabric.size()>0) + for (String s1 : listfabric) { + productFabricService.deleteFabric(Zp.getProductId(),s1); + } + //辅料 + List listAccessories =zyProductProcessService.findAllAccessories(processId); + if(listAccessories!=null&&listAccessories.size()>0) + for (String listAccessory : listAccessories) { + productAccessoriesService.deleteAccessories(Zp.getProductId(),listAccessory); + } + //工具 + List listOperationtool =zyProductProcessService.findAllOperationtool(processId); + if(listOperationtool!=null&&listOperationtool.size()>0) + for (String s1 : listOperationtool) { + productOperationtoolService.deteleTool(Zp.getProductId(),s1); + } + //设备 + List listMachine =zyProductProcessService.findAllMachine(processId); + if(listMachine!=null&&listMachine.size()>0) + for (String s1 : listMachine) { + productMachineService.deleteMachine(Zp.getProductId(),s1); + } zyProductProcessService.removeById(id); return Result.OK("删除成功!"); }