From 97f70b68f42d749e83cb042e00b3936d01bbdb06 Mon Sep 17 00:00:00 2001 From: wangjiadong <1654135867@qq.com> Date: Wed, 7 Dec 2022 09:37:21 +0800 Subject: [PATCH 01/11] =?UTF-8?q?=E9=A1=BE=E5=AE=A2=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/modules/CustomerPaymentForm.vue | 2 +- .../CustomerReceivingAddressController.java | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/customerpayment/admin/modules/CustomerPaymentForm.vue b/ant-design-vue-jeecg/src/views/customerpayment/admin/modules/CustomerPaymentForm.vue index 606f52e3..66ab7602 100644 --- a/ant-design-vue-jeecg/src/views/customerpayment/admin/modules/CustomerPaymentForm.vue +++ b/ant-design-vue-jeecg/src/views/customerpayment/admin/modules/CustomerPaymentForm.vue @@ -111,7 +111,7 @@ that.confirmLoading = false; }) } - + }) }, } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerreceivingaddress/controller/CustomerReceivingAddressController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerreceivingaddress/controller/CustomerReceivingAddressController.java index 05e0adb4..ff2747ea 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerreceivingaddress/controller/CustomerReceivingAddressController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerreceivingaddress/controller/CustomerReceivingAddressController.java @@ -9,8 +9,11 @@ import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; + +import org.apache.shiro.SecurityUtils; import org.jeecg.common.api.vo.Result; import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.system.vo.LoginUser; import org.jeecg.common.util.oConvertUtils; import org.jeecg.modules.demo.customerreceivingaddress.entity.CustomerReceivingAddress; import org.jeecg.modules.demo.customerreceivingaddress.service.ICustomerReceivingAddressService; @@ -49,7 +52,7 @@ import org.jeecg.common.aspect.annotation.AutoLog; public class CustomerReceivingAddressController extends JeecgController { @Autowired private ICustomerReceivingAddressService customerReceivingAddressService; - + /** * 分页列表查询 * @@ -71,7 +74,7 @@ public class CustomerReceivingAddressController extends JeecgController pageList = customerReceivingAddressService.page(page, queryWrapper); return Result.OK(pageList); } - + /** * 添加 * @@ -82,10 +85,14 @@ public class CustomerReceivingAddressController extends JeecgController add(@RequestBody CustomerReceivingAddress customerReceivingAddress) { + LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + if(customerReceivingAddress.getReceiver()=="" || customerReceivingAddress.getReceiver()==null ){ + customerReceivingAddress.setReceiver(loginUser.getUsername()); + } customerReceivingAddressService.save(customerReceivingAddress); return Result.OK("添加成功!"); } - + /** * 编辑 * @@ -99,7 +106,7 @@ public class CustomerReceivingAddressController extends JeecgController Date: Fri, 9 Dec 2022 15:12:17 +0800 Subject: [PATCH 02/11] =?UTF-8?q?2022-12-09=20=E4=BF=AE=E6=94=B9=E4=BA=A7?= =?UTF-8?q?=E5=93=81=E7=AE=A1=E7=90=86=E9=83=A8=E5=88=86=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/demo/base/controller/ZyClothsTypeController.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsTypeController.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsTypeController.java index e79509bf..5440da7a 100644 --- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsTypeController.java +++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsTypeController.java @@ -92,6 +92,9 @@ public class ZyClothsTypeController extends JeecgController Date: Fri, 9 Dec 2022 17:44:23 +0800 Subject: [PATCH 03/11] =?UTF-8?q?=E5=88=B6=E8=A1=A3=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/process/ZyClothsModularList.vue | 293 +++++++++--------- .../modules/ZyClothsModularListDetail.vue | 54 ++++ 2 files changed, 203 insertions(+), 144 deletions(-) create mode 100644 ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularListDetail.vue diff --git a/ant-design-vue-jeecg/src/views/process/ZyClothsModularList.vue b/ant-design-vue-jeecg/src/views/process/ZyClothsModularList.vue index 9c5815bc..f0c2537b 100644 --- a/ant-design-vue-jeecg/src/views/process/ZyClothsModularList.vue +++ b/ant-design-vue-jeecg/src/views/process/ZyClothsModularList.vue @@ -12,14 +12,14 @@
新增 - - - - - + + + + + - - + + @@ -112,158 +112,163 @@
- + + < \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularListDetail.vue b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularListDetail.vue new file mode 100644 index 00000000..1116d0eb --- /dev/null +++ b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularListDetail.vue @@ -0,0 +1,54 @@ + + \ No newline at end of file From 15072bb9b87bdc2fb37e58dde909ba58e6391906 Mon Sep 17 00:00:00 2001 From: wangjiadong <1654135867@qq.com> Date: Sat, 10 Dec 2022 09:30:57 +0800 Subject: [PATCH 04/11] =?UTF-8?q?=E6=96=B0=E7=94=A8=E6=88=B7=E6=B3=A8?= =?UTF-8?q?=E5=86=8C=E9=BB=98=E8=AE=A4=E5=88=86=E9=85=8D=E4=B8=A4=E4=B8=AA?= =?UTF-8?q?=E6=94=B6=E8=97=8F=E5=A4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/controller/SysUserController.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysUserController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysUserController.java index a581efa1..dfcf0868 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysUserController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysUserController.java @@ -26,6 +26,8 @@ import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.util.JwtUtil; import org.jeecg.common.system.vo.LoginUser; import org.jeecg.common.util.*; +import org.jeecg.modules.demo.collecttype.entity.CollectType; +import org.jeecg.modules.demo.collecttype.service.ICollectTypeService; import org.jeecg.modules.system.entity.*; import org.jeecg.modules.system.model.DepartIdModel; import org.jeecg.modules.system.model.SysUserSysDepartModel; @@ -90,6 +92,10 @@ public class SysUserController { @Autowired private RedisUtil redisUtil; + @Autowired + private ICollectTypeService collectTypeService; + + @Value("${jeecg.path.upload}") private String upLoadPath; @@ -990,6 +996,21 @@ public class SysUserController { user.setStatus(CommonConstant.USER_UNFREEZE); user.setDelFlag(CommonConstant.DEL_FLAG_0); user.setActivitiSync(CommonConstant.ACT_SYNC_0); + /*在创建一个用户之后给他分配一个默认商品收藏夹和我的设计收藏夹*/ + /*================================开始===========================*/ + CollectType collectType = new CollectType(); + collectType.setCreateBy(user.getUsername()); + collectType.setCollectTypeName("默认收藏夹"); + collectType.setPid("0"); + collectType.setHasChild("1"); + collectTypeService.save(collectType); + CollectType collectType1 = new CollectType(); + collectType1.setCreateBy(user.getUsername()); + collectType1.setCollectTypeName("我的设计"); + collectType1.setPid("0"); + collectType1.setHasChild("1"); + collectTypeService.save(collectType1); + /*================================结束===========================*/ sysUserService.addUserWithRole(user,"ee8626f80f7c2619917b6236f3a7f02b");//默认临时角色 VideoRecorder result.success("注册成功"); } catch (Exception e) { From 5b6b3817b06f924534d1b9ce28514184a3bbf8bb Mon Sep 17 00:00:00 2001 From: shenyuan Date: Sat, 10 Dec 2022 15:48:40 +0800 Subject: [PATCH 05/11] =?UTF-8?q?=E5=88=B6=E8=A1=A3=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/process/ZyClothsModularList.vue | 4 +- .../modules/ZyClothsModularListDetail.vue | 141 ++++++++++++++++-- 2 files changed, 131 insertions(+), 14 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/process/ZyClothsModularList.vue b/ant-design-vue-jeecg/src/views/process/ZyClothsModularList.vue index f0c2537b..cafcb9e0 100644 --- a/ant-design-vue-jeecg/src/views/process/ZyClothsModularList.vue +++ b/ant-design-vue-jeecg/src/views/process/ZyClothsModularList.vue @@ -263,8 +263,8 @@ fieldList.push({type: 'string', value: 'pictureUrl', text: '图片', dictCode: ''}) this.superFieldList = fieldList }, - handleDetail(){ - this.$refs.ZyClothsModularListDetail.showModal() + handleDetail(record){ + this.$refs.ZyClothsModularListDetail.showModal(record) } } } diff --git a/ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularListDetail.vue b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularListDetail.vue index 1116d0eb..552150a1 100644 --- a/ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularListDetail.vue +++ b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularListDetail.vue @@ -7,24 +7,127 @@ :width='1000' @ok="handleOk" @cancel="handleCancel"> +

制衣模块详情

- Cloud Database - Prepaid - YES + {{model.enterpriseId_dictText}} + {{model.nums}} + {{model.modularName}} + {{model.clothsTypeId_dictText}} + {{model.description}} - - - - + 无法显示 + 暂无图片 +

模块部件详情

+ + +

模块工序详情

+ + \ No newline at end of file + + \ No newline at end of file From 41c507a071610a3d72140b7717e68ca5ccc88c8f Mon Sep 17 00:00:00 2001 From: wangjiadong <1654135867@qq.com> Date: Sat, 10 Dec 2022 16:44:25 +0800 Subject: [PATCH 06/11] =?UTF-8?q?=E8=B4=AD=E7=89=A9=E8=BD=A6=EF=BC=9B?= =?UTF-8?q?=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/CustomercollectgoodsList.vue | 196 +++++++++++++ .../modules/CustomercollectgoodsForm.vue | 124 +++++++++ .../modules/CustomercollectgoodsModal.vue | 60 ++++ ...ustomercollectgoodsModal__Style#Drawer.vue | 84 ++++++ .../admin/CustomerInvoiceList.vue | 233 ++++++++++++++++ .../admin/modules/CustomerInvoiceForm.vue | 158 +++++++++++ .../admin/modules/CustomerInvoiceModal.vue | 60 ++++ .../CustomerInvoiceModal__Style#Drawer.vue | 84 ++++++ .../admin/CustomerShoppingCartList.vue | 259 ++++++++++++++++++ .../modules/CustomerShoppingCartForm.vue | 152 ++++++++++ .../modules/CustomerShoppingCartModal.vue | 60 ++++ ...ustomerShoppingCartModal__Style#Drawer.vue | 84 ++++++ 12 files changed, 1554 insertions(+) create mode 100644 ant-design-vue-jeecg/src/views/customercollectgoods/admin/CustomercollectgoodsList.vue create mode 100644 ant-design-vue-jeecg/src/views/customercollectgoods/admin/modules/CustomercollectgoodsForm.vue create mode 100644 ant-design-vue-jeecg/src/views/customercollectgoods/admin/modules/CustomercollectgoodsModal.vue create mode 100644 ant-design-vue-jeecg/src/views/customercollectgoods/admin/modules/CustomercollectgoodsModal__Style#Drawer.vue create mode 100644 ant-design-vue-jeecg/src/views/customerinvoice/admin/CustomerInvoiceList.vue create mode 100644 ant-design-vue-jeecg/src/views/customerinvoice/admin/modules/CustomerInvoiceForm.vue create mode 100644 ant-design-vue-jeecg/src/views/customerinvoice/admin/modules/CustomerInvoiceModal.vue create mode 100644 ant-design-vue-jeecg/src/views/customerinvoice/admin/modules/CustomerInvoiceModal__Style#Drawer.vue create mode 100644 ant-design-vue-jeecg/src/views/customershoppingcart/admin/CustomerShoppingCartList.vue create mode 100644 ant-design-vue-jeecg/src/views/customershoppingcart/admin/modules/CustomerShoppingCartForm.vue create mode 100644 ant-design-vue-jeecg/src/views/customershoppingcart/admin/modules/CustomerShoppingCartModal.vue create mode 100644 ant-design-vue-jeecg/src/views/customershoppingcart/admin/modules/CustomerShoppingCartModal__Style#Drawer.vue diff --git a/ant-design-vue-jeecg/src/views/customercollectgoods/admin/CustomercollectgoodsList.vue b/ant-design-vue-jeecg/src/views/customercollectgoods/admin/CustomercollectgoodsList.vue new file mode 100644 index 00000000..f33e5853 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/customercollectgoods/admin/CustomercollectgoodsList.vue @@ -0,0 +1,196 @@ + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/customercollectgoods/admin/modules/CustomercollectgoodsForm.vue b/ant-design-vue-jeecg/src/views/customercollectgoods/admin/modules/CustomercollectgoodsForm.vue new file mode 100644 index 00000000..ecec87c9 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/customercollectgoods/admin/modules/CustomercollectgoodsForm.vue @@ -0,0 +1,124 @@ + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/customercollectgoods/admin/modules/CustomercollectgoodsModal.vue b/ant-design-vue-jeecg/src/views/customercollectgoods/admin/modules/CustomercollectgoodsModal.vue new file mode 100644 index 00000000..bd182c76 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/customercollectgoods/admin/modules/CustomercollectgoodsModal.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/customercollectgoods/admin/modules/CustomercollectgoodsModal__Style#Drawer.vue b/ant-design-vue-jeecg/src/views/customercollectgoods/admin/modules/CustomercollectgoodsModal__Style#Drawer.vue new file mode 100644 index 00000000..c04821b9 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/customercollectgoods/admin/modules/CustomercollectgoodsModal__Style#Drawer.vue @@ -0,0 +1,84 @@ + + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/customerinvoice/admin/CustomerInvoiceList.vue b/ant-design-vue-jeecg/src/views/customerinvoice/admin/CustomerInvoiceList.vue new file mode 100644 index 00000000..305c1b9b --- /dev/null +++ b/ant-design-vue-jeecg/src/views/customerinvoice/admin/CustomerInvoiceList.vue @@ -0,0 +1,233 @@ + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/customerinvoice/admin/modules/CustomerInvoiceForm.vue b/ant-design-vue-jeecg/src/views/customerinvoice/admin/modules/CustomerInvoiceForm.vue new file mode 100644 index 00000000..b4cc1fdd --- /dev/null +++ b/ant-design-vue-jeecg/src/views/customerinvoice/admin/modules/CustomerInvoiceForm.vue @@ -0,0 +1,158 @@ + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/customerinvoice/admin/modules/CustomerInvoiceModal.vue b/ant-design-vue-jeecg/src/views/customerinvoice/admin/modules/CustomerInvoiceModal.vue new file mode 100644 index 00000000..cab496ec --- /dev/null +++ b/ant-design-vue-jeecg/src/views/customerinvoice/admin/modules/CustomerInvoiceModal.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/customerinvoice/admin/modules/CustomerInvoiceModal__Style#Drawer.vue b/ant-design-vue-jeecg/src/views/customerinvoice/admin/modules/CustomerInvoiceModal__Style#Drawer.vue new file mode 100644 index 00000000..e354afe6 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/customerinvoice/admin/modules/CustomerInvoiceModal__Style#Drawer.vue @@ -0,0 +1,84 @@ + + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/customershoppingcart/admin/CustomerShoppingCartList.vue b/ant-design-vue-jeecg/src/views/customershoppingcart/admin/CustomerShoppingCartList.vue new file mode 100644 index 00000000..dca7260a --- /dev/null +++ b/ant-design-vue-jeecg/src/views/customershoppingcart/admin/CustomerShoppingCartList.vue @@ -0,0 +1,259 @@ + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/customershoppingcart/admin/modules/CustomerShoppingCartForm.vue b/ant-design-vue-jeecg/src/views/customershoppingcart/admin/modules/CustomerShoppingCartForm.vue new file mode 100644 index 00000000..d711ddb4 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/customershoppingcart/admin/modules/CustomerShoppingCartForm.vue @@ -0,0 +1,152 @@ + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/customershoppingcart/admin/modules/CustomerShoppingCartModal.vue b/ant-design-vue-jeecg/src/views/customershoppingcart/admin/modules/CustomerShoppingCartModal.vue new file mode 100644 index 00000000..cb2eca2b --- /dev/null +++ b/ant-design-vue-jeecg/src/views/customershoppingcart/admin/modules/CustomerShoppingCartModal.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/customershoppingcart/admin/modules/CustomerShoppingCartModal__Style#Drawer.vue b/ant-design-vue-jeecg/src/views/customershoppingcart/admin/modules/CustomerShoppingCartModal__Style#Drawer.vue new file mode 100644 index 00000000..767f052a --- /dev/null +++ b/ant-design-vue-jeecg/src/views/customershoppingcart/admin/modules/CustomerShoppingCartModal__Style#Drawer.vue @@ -0,0 +1,84 @@ + + + + + \ No newline at end of file From 575605c925ad28ba1bb0109a5225a1df224ea069 Mon Sep 17 00:00:00 2001 From: wangjiadong <1654135867@qq.com> Date: Sat, 10 Dec 2022 16:46:05 +0800 Subject: [PATCH 07/11] =?UTF-8?q?=E8=B4=AD=E7=89=A9=E8=BD=A6=EF=BC=9B?= =?UTF-8?q?=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../collecttype/admin/CollectTypeList.vue | 347 ++++++++++++++++++ .../admin/modules/CollectTypeModal.vue | 153 ++++++++ .../controller/CollectTypeController.java | 250 +++++++++++++ .../demo/collecttype/entity/CollectType.java | 70 ++++ .../collecttype/mapper/CollectTypeMapper.java | 25 ++ .../mapper/xml/CollectTypeMapper.xml | 9 + .../service/ICollectTypeService.java | 44 +++ .../service/impl/CollectTypeServiceImpl.java | 193 ++++++++++ .../CustomercollectgoodsController.java | 171 +++++++++ .../entity/Customercollectgoods.java | 79 ++++ .../mapper/CustomercollectgoodsMapper.java | 17 + .../mapper/xml/CustomercollectgoodsMapper.xml | 5 + .../service/ICustomercollectgoodsService.java | 14 + .../impl/CustomercollectgoodsServiceImpl.java | 19 + .../controller/CustomerInvoiceController.java | 171 +++++++++ .../entity/CustomerInvoice.java | 100 +++++ .../mapper/CustomerInvoiceMapper.java | 17 + .../mapper/xml/CustomerInvoiceMapper.xml | 5 + .../service/ICustomerInvoiceService.java | 14 + .../impl/CustomerInvoiceServiceImpl.java | 19 + .../CustomerShoppingCartController.java | 180 +++++++++ .../entity/CustomerShoppingCart.java | 97 +++++ .../mapper/CustomerShoppingCartMapper.java | 17 + .../mapper/xml/CustomerShoppingCartMapper.xml | 5 + .../service/ICustomerShoppingCartService.java | 14 + .../impl/CustomerShoppingCartServiceImpl.java | 19 + 26 files changed, 2054 insertions(+) create mode 100644 ant-design-vue-jeecg/src/views/collecttype/admin/CollectTypeList.vue create mode 100644 ant-design-vue-jeecg/src/views/collecttype/admin/modules/CollectTypeModal.vue create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/collecttype/controller/CollectTypeController.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/collecttype/entity/CollectType.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/collecttype/mapper/CollectTypeMapper.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/collecttype/mapper/xml/CollectTypeMapper.xml create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/collecttype/service/ICollectTypeService.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/collecttype/service/impl/CollectTypeServiceImpl.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customercollectgoods/controller/CustomercollectgoodsController.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customercollectgoods/entity/Customercollectgoods.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customercollectgoods/mapper/CustomercollectgoodsMapper.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customercollectgoods/mapper/xml/CustomercollectgoodsMapper.xml create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customercollectgoods/service/ICustomercollectgoodsService.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customercollectgoods/service/impl/CustomercollectgoodsServiceImpl.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerinvoice/controller/CustomerInvoiceController.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerinvoice/entity/CustomerInvoice.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerinvoice/mapper/CustomerInvoiceMapper.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerinvoice/mapper/xml/CustomerInvoiceMapper.xml create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerinvoice/service/ICustomerInvoiceService.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerinvoice/service/impl/CustomerInvoiceServiceImpl.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customershoppingcart/controller/CustomerShoppingCartController.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customershoppingcart/entity/CustomerShoppingCart.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customershoppingcart/mapper/CustomerShoppingCartMapper.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customershoppingcart/mapper/xml/CustomerShoppingCartMapper.xml create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customershoppingcart/service/ICustomerShoppingCartService.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customershoppingcart/service/impl/CustomerShoppingCartServiceImpl.java diff --git a/ant-design-vue-jeecg/src/views/collecttype/admin/CollectTypeList.vue b/ant-design-vue-jeecg/src/views/collecttype/admin/CollectTypeList.vue new file mode 100644 index 00000000..699d88ba --- /dev/null +++ b/ant-design-vue-jeecg/src/views/collecttype/admin/CollectTypeList.vue @@ -0,0 +1,347 @@ + + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/collecttype/admin/modules/CollectTypeModal.vue b/ant-design-vue-jeecg/src/views/collecttype/admin/modules/CollectTypeModal.vue new file mode 100644 index 00000000..34496560 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/collecttype/admin/modules/CollectTypeModal.vue @@ -0,0 +1,153 @@ + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/collecttype/controller/CollectTypeController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/collecttype/controller/CollectTypeController.java new file mode 100644 index 00000000..a7d7a416 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/collecttype/controller/CollectTypeController.java @@ -0,0 +1,250 @@ +package org.jeecg.modules.demo.collecttype.controller; + +import java.util.Arrays; +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 org.apache.shiro.SecurityUtils; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.system.vo.LoginUser; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.demo.collecttype.entity.CollectType; +import org.jeecg.modules.demo.collecttype.mapper.CollectTypeMapper; +import org.jeecg.modules.demo.collecttype.service.ICollectTypeService; + +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.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: 收藏分类管理 + * @Author: jeecg-boot + * @Date: 2022-12-08 + * @Version: V1.0 + */ +@Api(tags="收藏分类管理") +@RestController +@RequestMapping("/collecttype/collectType") +@Slf4j +public class CollectTypeController extends JeecgController{ + @Autowired + private ICollectTypeService collectTypeService; + + + @Autowired + CollectTypeMapper collectTypeMapper; + + + + + + /** + * 分页列表查询 + * + * @param collectType + * @param pageNo + * @param pageSize + * @param req + * @return + */ + @AutoLog(value = "收藏分类管理-分页列表查询") + @ApiOperation(value="收藏分类管理-分页列表查询", notes="收藏分类管理-分页列表查询") + @GetMapping(value = "/rootList") + public Result queryPageList(CollectType collectType, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + String hasQuery = req.getParameter("hasQuery"); + if(hasQuery != null && "true".equals(hasQuery)){ + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(collectType, req.getParameterMap()); + //根据用户id得到角色id + String userole = collectTypeMapper.getuserole(sysUser.getId()); + if (userole.equals("f6817f48af4fb3af11b9e8bf182f618b")){ + + }else{ + queryWrapper.eq("createBy",sysUser.getUsername()); + } + /*queryWrapper.eq("createBy",sysUser.getUsername());*/ + List list = collectTypeService.queryTreeListNoPage(queryWrapper); + IPage pageList = new Page<>(1, 10, list.size()); + pageList.setRecords(list); + return Result.OK(pageList); + }else{ + String parentId = collectType.getPid(); + if (oConvertUtils.isEmpty(parentId)) { + parentId = "0"; + } + collectType.setPid(null); + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(collectType, req.getParameterMap()); + // 使用 eq 防止模糊查询 + queryWrapper.eq("pid", parentId); + Page page = new Page(pageNo, pageSize); + IPage pageList = collectTypeService.page(page, queryWrapper); + return Result.OK(pageList); + } + } + + /** + * 获取子数据 + * @param collectType + * @param req + * @return + */ + @AutoLog(value = "收藏分类管理-获取子数据") + @ApiOperation(value="收藏分类管理-获取子数据", notes="收藏分类管理-获取子数据") + @GetMapping(value = "/childList") + public Result queryPageList(CollectType collectType,HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(collectType, req.getParameterMap()); + List list = collectTypeService.list(queryWrapper); + IPage pageList = new Page<>(1, 10, list.size()); + pageList.setRecords(list); + return Result.OK(pageList); + } + + /** + * 批量查询子节点 + * @param parentIds 父ID(多个采用半角逗号分割) + * @return 返回 IPage + * @param parentIds + * @return + */ + @AutoLog(value = "收藏分类管理-批量获取子数据") + @ApiOperation(value="收藏分类管理-批量获取子数据", notes="收藏分类管理-批量获取子数据") + @GetMapping("/getChildListBatch") + public Result getChildListBatch(@RequestParam("parentIds") String parentIds) { + try { + QueryWrapper queryWrapper = new QueryWrapper<>(); + List parentIdList = Arrays.asList(parentIds.split(",")); + queryWrapper.in("pid", parentIdList); + List list = collectTypeService.list(queryWrapper); + IPage pageList = new Page<>(1, 10, list.size()); + pageList.setRecords(list); + return Result.OK(pageList); + } catch (Exception e) { + log.error(e.getMessage(), e); + return Result.error("批量查询子节点失败:" + e.getMessage()); + } + } + + /** + * 添加 + * + * @param collectType + * @return + */ + @AutoLog(value = "收藏分类管理-添加") + @ApiOperation(value="收藏分类管理-添加", notes="收藏分类管理-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody CollectType collectType) { + collectTypeService.addCollectType(collectType); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param collectType + * @return + */ + @AutoLog(value = "收藏分类管理-编辑") + @ApiOperation(value="收藏分类管理-编辑", notes="收藏分类管理-编辑") + @PutMapping(value = "/edit") + public Result edit(@RequestBody CollectType collectType) { + collectTypeService.updateCollectType(collectType); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "收藏分类管理-通过id删除") + @ApiOperation(value="收藏分类管理-通过id删除", notes="收藏分类管理-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + collectTypeService.deleteCollectType(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "收藏分类管理-批量删除") + @ApiOperation(value="收藏分类管理-批量删除", notes="收藏分类管理-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.collectTypeService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @AutoLog(value = "收藏分类管理-通过id查询") + @ApiOperation(value="收藏分类管理-通过id查询", notes="收藏分类管理-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + CollectType collectType = collectTypeService.getById(id); + if(collectType==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(collectType); + } + + /** + * 导出excel + * + * @param request + * @param collectType + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, CollectType collectType) { + return super.exportXls(request, collectType, CollectType.class, "收藏分类管理"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, CollectType.class); + } + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/collecttype/entity/CollectType.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/collecttype/entity/CollectType.java new file mode 100644 index 00000000..dcf48905 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/collecttype/entity/CollectType.java @@ -0,0 +1,70 @@ +package org.jeecg.modules.demo.collecttype.entity; + +import java.io.Serializable; +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 java.io.UnsupportedEncodingException; + +/** + * @Description: 收藏分类管理 + * @Author: jeecg-boot + * @Date: 2022-12-08 + * @Version: V1.0 + */ +@Data +@TableName("collect_type") +@ApiModel(value="collect_type对象", description="收藏分类管理") +public class CollectType implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + /**所属部门*/ + @ApiModelProperty(value = "所属部门") + private java.lang.String sysOrgCode; + /**用户*/ + @Excel(name = "用户", width = 15) + @ApiModelProperty(value = "用户") + private java.lang.String userId; + /**收藏分类名*/ + @Excel(name = "收藏分类名", width = 15) + @ApiModelProperty(value = "收藏分类名") + private java.lang.String collectTypeName; + /**父级节点*/ + @Excel(name = "父级节点", width = 15) + @ApiModelProperty(value = "父级节点") + private java.lang.String pid; + /**是否有子节点*/ + @Excel(name = "是否有子节点", width = 15, dicCode = "yn") + @Dict(dicCode = "yn") + @ApiModelProperty(value = "是否有子节点") + private java.lang.String hasChild; +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/collecttype/mapper/CollectTypeMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/collecttype/mapper/CollectTypeMapper.java new file mode 100644 index 00000000..475118b7 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/collecttype/mapper/CollectTypeMapper.java @@ -0,0 +1,25 @@ +package org.jeecg.modules.demo.collecttype.mapper; + +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.jeecg.modules.demo.collecttype.entity.CollectType; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 收藏分类管理 + * @Author: jeecg-boot + * @Date: 2022-12-08 + * @Version: V1.0 + */ +public interface CollectTypeMapper extends BaseMapper { + + /** + * 编辑节点状态 + * @param id + * @param status + */ + void updateTreeNodeStatus(@Param("id") String id,@Param("status") String status); + + @Select("select role_id from sys_user_role where user_id =#{id}") + String getuserole(String id); +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/collecttype/mapper/xml/CollectTypeMapper.xml b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/collecttype/mapper/xml/CollectTypeMapper.xml new file mode 100644 index 00000000..caabe508 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/collecttype/mapper/xml/CollectTypeMapper.xml @@ -0,0 +1,9 @@ + + + + + + update collect_type set has_child = #{status} where id = #{id} + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/collecttype/service/ICollectTypeService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/collecttype/service/ICollectTypeService.java new file mode 100644 index 00000000..c18714e8 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/collecttype/service/ICollectTypeService.java @@ -0,0 +1,44 @@ +package org.jeecg.modules.demo.collecttype.service; + +import org.jeecg.modules.demo.collecttype.entity.CollectType; +import com.baomidou.mybatisplus.extension.service.IService; +import org.jeecg.common.exception.JeecgBootException; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.List; + +/** + * @Description: 收藏分类管理 + * @Author: jeecg-boot + * @Date: 2022-12-08 + * @Version: V1.0 + */ +public interface ICollectTypeService extends IService { + + @Autowired + + + /**根节点父ID的值*/ + public static final String ROOT_PID_VALUE = "0"; + + /**树节点有子节点状态值*/ + public static final String HASCHILD = "1"; + + /**树节点无子节点状态值*/ + public static final String NOCHILD = "0"; + + /**新增节点*/ + void addCollectType(CollectType collectType); + + /**修改节点*/ + void updateCollectType(CollectType collectType) throws JeecgBootException; + + /**删除节点*/ + void deleteCollectType(String id) throws JeecgBootException; + + /**查询所有数据,无分页*/ + List queryTreeListNoPage(QueryWrapper queryWrapper); + + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/collecttype/service/impl/CollectTypeServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/collecttype/service/impl/CollectTypeServiceImpl.java new file mode 100644 index 00000000..e3830f4e --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/collecttype/service/impl/CollectTypeServiceImpl.java @@ -0,0 +1,193 @@ +package org.jeecg.modules.demo.collecttype.service.impl; + +import org.jeecg.common.exception.JeecgBootException; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.demo.collecttype.entity.CollectType; +import org.jeecg.modules.demo.collecttype.mapper.CollectTypeMapper; +import org.jeecg.modules.demo.collecttype.service.ICollectTypeService; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 收藏分类管理 + * @Author: jeecg-boot + * @Date: 2022-12-08 + * @Version: V1.0 + */ +@Service +public class CollectTypeServiceImpl extends ServiceImpl implements ICollectTypeService { + + @Override + public void addCollectType(CollectType collectType) { + //新增时设置hasChild为0 + collectType.setHasChild(ICollectTypeService.NOCHILD); + if(oConvertUtils.isEmpty(collectType.getPid())){ + collectType.setPid(ICollectTypeService.ROOT_PID_VALUE); + }else{ + //如果当前节点父ID不为空 则设置父节点的hasChildren 为1 + CollectType parent = baseMapper.selectById(collectType.getPid()); + if(parent!=null && !"1".equals(parent.getHasChild())){ + parent.setHasChild("1"); + baseMapper.updateById(parent); + } + } + baseMapper.insert(collectType); + } + + @Override + public void updateCollectType(CollectType collectType) { + CollectType entity = this.getById(collectType.getId()); + if(entity==null) { + throw new JeecgBootException("未找到对应实体"); + } + String old_pid = entity.getPid(); + String new_pid = collectType.getPid(); + if(!old_pid.equals(new_pid)) { + updateOldParentNode(old_pid); + if(oConvertUtils.isEmpty(new_pid)){ + collectType.setPid(ICollectTypeService.ROOT_PID_VALUE); + } + if(!ICollectTypeService.ROOT_PID_VALUE.equals(collectType.getPid())) { + baseMapper.updateTreeNodeStatus(collectType.getPid(), ICollectTypeService.HASCHILD); + } + } + baseMapper.updateById(collectType); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void deleteCollectType(String id) throws JeecgBootException { + //查询选中节点下所有子节点一并删除 + id = this.queryTreeChildIds(id); + if(id.indexOf(",")>0) { + StringBuffer sb = new StringBuffer(); + String[] idArr = id.split(","); + for (String idVal : idArr) { + if(idVal != null){ + CollectType collectType = this.getById(idVal); + String pidVal = collectType.getPid(); + //查询此节点上一级是否还有其他子节点 + List dataList = baseMapper.selectList(new QueryWrapper().eq("pid", pidVal).notIn("id",Arrays.asList(idArr))); + if((dataList == null || dataList.size()==0) && !Arrays.asList(idArr).contains(pidVal) + && !sb.toString().contains(pidVal)){ + //如果当前节点原本有子节点 现在木有了,更新状态 + sb.append(pidVal).append(","); + } + } + } + //批量删除节点 + baseMapper.deleteBatchIds(Arrays.asList(idArr)); + //修改已无子节点的标识 + String[] pidArr = sb.toString().split(","); + for(String pid : pidArr){ + this.updateOldParentNode(pid); + } + }else{ + CollectType collectType = this.getById(id); + if(collectType==null) { + throw new JeecgBootException("未找到对应实体"); + } + updateOldParentNode(collectType.getPid()); + baseMapper.deleteById(id); + } + } + + @Override + public List queryTreeListNoPage(QueryWrapper queryWrapper) { + List dataList = baseMapper.selectList(queryWrapper); + List mapList = new ArrayList<>(); + for(CollectType data : dataList){ + String pidVal = data.getPid(); + //递归查询子节点的根节点 + if(pidVal != null && !"0".equals(pidVal)){ + CollectType rootVal = this.getTreeRoot(pidVal); + if(rootVal != null && !mapList.contains(rootVal)){ + mapList.add(rootVal); + } + }else{ + if(!mapList.contains(data)){ + mapList.add(data); + } + } + } + return mapList; + } + + + + /** + * 根据所传pid查询旧的父级节点的子节点并修改相应状态值 + * @param pid + */ + private void updateOldParentNode(String pid) { + if(!ICollectTypeService.ROOT_PID_VALUE.equals(pid)) { + Integer count = baseMapper.selectCount(new QueryWrapper().eq("pid", pid)); + if(count==null || count<=1) { + baseMapper.updateTreeNodeStatus(pid, ICollectTypeService.NOCHILD); + } + } + } + + /** + * 递归查询节点的根节点 + * @param pidVal + * @return + */ + private CollectType getTreeRoot(String pidVal){ + CollectType data = baseMapper.selectById(pidVal); + if(data != null && !"0".equals(data.getPid())){ + return this.getTreeRoot(data.getPid()); + }else{ + return data; + } + } + + /** + * 根据id查询所有子节点id + * @param ids + * @return + */ + private String queryTreeChildIds(String ids) { + //获取id数组 + String[] idArr = ids.split(","); + StringBuffer sb = new StringBuffer(); + for (String pidVal : idArr) { + if(pidVal != null){ + if(!sb.toString().contains(pidVal)){ + if(sb.toString().length() > 0){ + sb.append(","); + } + sb.append(pidVal); + this.getTreeChildIds(pidVal,sb); + } + } + } + return sb.toString(); + } + + /** + * 递归查询所有子节点 + * @param pidVal + * @param sb + * @return + */ + private StringBuffer getTreeChildIds(String pidVal,StringBuffer sb){ + List dataList = baseMapper.selectList(new QueryWrapper().eq("pid", pidVal)); + if(dataList != null && dataList.size()>0){ + for(CollectType tree : dataList) { + if(!sb.toString().contains(tree.getId())){ + sb.append(",").append(tree.getId()); + } + this.getTreeChildIds(tree.getId(),sb); + } + } + return sb; + } + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customercollectgoods/controller/CustomercollectgoodsController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customercollectgoods/controller/CustomercollectgoodsController.java new file mode 100644 index 00000000..74b04c18 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customercollectgoods/controller/CustomercollectgoodsController.java @@ -0,0 +1,171 @@ +package org.jeecg.modules.demo.customercollectgoods.controller; + +import java.util.Arrays; +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 org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.demo.customercollectgoods.entity.Customercollectgoods; +import org.jeecg.modules.demo.customercollectgoods.service.ICustomercollectgoodsService; + +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.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: 收藏商品(衣橱) + * @Author: jeecg-boot + * @Date: 2022-12-08 + * @Version: V1.0 + */ +@Api(tags="收藏商品(衣橱)") +@RestController +@RequestMapping("/customercollectgoods/customercollectgoods") +@Slf4j +public class CustomercollectgoodsController extends JeecgController { + @Autowired + private ICustomercollectgoodsService customercollectgoodsService; + + /** + * 分页列表查询 + * + * @param customercollectgoods + * @param pageNo + * @param pageSize + * @param req + * @return + */ + @AutoLog(value = "收藏商品(衣橱)-分页列表查询") + @ApiOperation(value="收藏商品(衣橱)-分页列表查询", notes="收藏商品(衣橱)-分页列表查询") + @GetMapping(value = "/list") + public Result queryPageList(Customercollectgoods customercollectgoods, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(customercollectgoods, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = customercollectgoodsService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param customercollectgoods + * @return + */ + @AutoLog(value = "收藏商品(衣橱)-添加") + @ApiOperation(value="收藏商品(衣橱)-添加", notes="收藏商品(衣橱)-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody Customercollectgoods customercollectgoods) { + customercollectgoodsService.save(customercollectgoods); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param customercollectgoods + * @return + */ + @AutoLog(value = "收藏商品(衣橱)-编辑") + @ApiOperation(value="收藏商品(衣橱)-编辑", notes="收藏商品(衣橱)-编辑") + @PutMapping(value = "/edit") + public Result edit(@RequestBody Customercollectgoods customercollectgoods) { + customercollectgoodsService.updateById(customercollectgoods); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "收藏商品(衣橱)-通过id删除") + @ApiOperation(value="收藏商品(衣橱)-通过id删除", notes="收藏商品(衣橱)-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + customercollectgoodsService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "收藏商品(衣橱)-批量删除") + @ApiOperation(value="收藏商品(衣橱)-批量删除", notes="收藏商品(衣橱)-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.customercollectgoodsService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @AutoLog(value = "收藏商品(衣橱)-通过id查询") + @ApiOperation(value="收藏商品(衣橱)-通过id查询", notes="收藏商品(衣橱)-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + Customercollectgoods customercollectgoods = customercollectgoodsService.getById(id); + if(customercollectgoods==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(customercollectgoods); + } + + /** + * 导出excel + * + * @param request + * @param customercollectgoods + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, Customercollectgoods customercollectgoods) { + return super.exportXls(request, customercollectgoods, Customercollectgoods.class, "收藏商品(衣橱)"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, Customercollectgoods.class); + } + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customercollectgoods/entity/Customercollectgoods.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customercollectgoods/entity/Customercollectgoods.java new file mode 100644 index 00000000..f2c5e8f9 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customercollectgoods/entity/Customercollectgoods.java @@ -0,0 +1,79 @@ +package org.jeecg.modules.demo.customercollectgoods.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: 收藏商品(衣橱) + * @Author: jeecg-boot + * @Date: 2022-12-08 + * @Version: V1.0 + */ +@Data +@TableName("customercollectgoods") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="customercollectgoods对象", description="收藏商品(衣橱)") +public class Customercollectgoods implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + /**所属部门*/ + @ApiModelProperty(value = "所属部门") + private java.lang.String sysOrgCode; + /**用户*/ + @Excel(name = "用户", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username") + @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username") + @ApiModelProperty(value = "用户") + private java.lang.String userId; + /**商品*/ + @Excel(name = "商品", width = 15) + @ApiModelProperty(value = "商品") + private java.lang.String goodsId; + /**当前单价*/ + @Excel(name = "当前单价", width = 15) + @ApiModelProperty(value = "当前单价") + private java.lang.String price; + /**数量*/ + @Excel(name = "数量", width = 15) + @ApiModelProperty(value = "数量") + private java.lang.String number; + /**收藏夹*/ + @Excel(name = "收藏夹", width = 15, dictTable = "collect_type", dicText = "collect_type_name", dicCode = "id") + @Dict(dictTable = "collect_type", dicText = "collect_type_name", dicCode = "id") + @ApiModelProperty(value = "收藏夹") + private java.lang.String collectTypeId; +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customercollectgoods/mapper/CustomercollectgoodsMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customercollectgoods/mapper/CustomercollectgoodsMapper.java new file mode 100644 index 00000000..03a9f5b6 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customercollectgoods/mapper/CustomercollectgoodsMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.demo.customercollectgoods.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.demo.customercollectgoods.entity.Customercollectgoods; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 收藏商品(衣橱) + * @Author: jeecg-boot + * @Date: 2022-12-08 + * @Version: V1.0 + */ +public interface CustomercollectgoodsMapper extends BaseMapper { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customercollectgoods/mapper/xml/CustomercollectgoodsMapper.xml b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customercollectgoods/mapper/xml/CustomercollectgoodsMapper.xml new file mode 100644 index 00000000..01b1e90b --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customercollectgoods/mapper/xml/CustomercollectgoodsMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customercollectgoods/service/ICustomercollectgoodsService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customercollectgoods/service/ICustomercollectgoodsService.java new file mode 100644 index 00000000..d66b0c8c --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customercollectgoods/service/ICustomercollectgoodsService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.demo.customercollectgoods.service; + +import org.jeecg.modules.demo.customercollectgoods.entity.Customercollectgoods; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 收藏商品(衣橱) + * @Author: jeecg-boot + * @Date: 2022-12-08 + * @Version: V1.0 + */ +public interface ICustomercollectgoodsService extends IService { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customercollectgoods/service/impl/CustomercollectgoodsServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customercollectgoods/service/impl/CustomercollectgoodsServiceImpl.java new file mode 100644 index 00000000..2c23de77 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customercollectgoods/service/impl/CustomercollectgoodsServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.demo.customercollectgoods.service.impl; + +import org.jeecg.modules.demo.customercollectgoods.entity.Customercollectgoods; +import org.jeecg.modules.demo.customercollectgoods.mapper.CustomercollectgoodsMapper; +import org.jeecg.modules.demo.customercollectgoods.service.ICustomercollectgoodsService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 收藏商品(衣橱) + * @Author: jeecg-boot + * @Date: 2022-12-08 + * @Version: V1.0 + */ +@Service +public class CustomercollectgoodsServiceImpl extends ServiceImpl implements ICustomercollectgoodsService { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerinvoice/controller/CustomerInvoiceController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerinvoice/controller/CustomerInvoiceController.java new file mode 100644 index 00000000..9cd8c77d --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerinvoice/controller/CustomerInvoiceController.java @@ -0,0 +1,171 @@ +package org.jeecg.modules.demo.customerinvoice.controller; + +import java.util.Arrays; +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 org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.demo.customerinvoice.entity.CustomerInvoice; +import org.jeecg.modules.demo.customerinvoice.service.ICustomerInvoiceService; + +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.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: 客户发票信息 + * @Author: jeecg-boot + * @Date: 2022-12-08 + * @Version: V1.0 + */ +@Api(tags="客户发票信息") +@RestController +@RequestMapping("/customerinvoice/customerInvoice") +@Slf4j +public class CustomerInvoiceController extends JeecgController { + @Autowired + private ICustomerInvoiceService customerInvoiceService; + + /** + * 分页列表查询 + * + * @param customerInvoice + * @param pageNo + * @param pageSize + * @param req + * @return + */ + @AutoLog(value = "客户发票信息-分页列表查询") + @ApiOperation(value="客户发票信息-分页列表查询", notes="客户发票信息-分页列表查询") + @GetMapping(value = "/list") + public Result queryPageList(CustomerInvoice customerInvoice, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(customerInvoice, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = customerInvoiceService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param customerInvoice + * @return + */ + @AutoLog(value = "客户发票信息-添加") + @ApiOperation(value="客户发票信息-添加", notes="客户发票信息-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody CustomerInvoice customerInvoice) { + customerInvoiceService.save(customerInvoice); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param customerInvoice + * @return + */ + @AutoLog(value = "客户发票信息-编辑") + @ApiOperation(value="客户发票信息-编辑", notes="客户发票信息-编辑") + @PutMapping(value = "/edit") + public Result edit(@RequestBody CustomerInvoice customerInvoice) { + customerInvoiceService.updateById(customerInvoice); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "客户发票信息-通过id删除") + @ApiOperation(value="客户发票信息-通过id删除", notes="客户发票信息-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + customerInvoiceService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "客户发票信息-批量删除") + @ApiOperation(value="客户发票信息-批量删除", notes="客户发票信息-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.customerInvoiceService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @AutoLog(value = "客户发票信息-通过id查询") + @ApiOperation(value="客户发票信息-通过id查询", notes="客户发票信息-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + CustomerInvoice customerInvoice = customerInvoiceService.getById(id); + if(customerInvoice==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(customerInvoice); + } + + /** + * 导出excel + * + * @param request + * @param customerInvoice + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, CustomerInvoice customerInvoice) { + return super.exportXls(request, customerInvoice, CustomerInvoice.class, "客户发票信息"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, CustomerInvoice.class); + } + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerinvoice/entity/CustomerInvoice.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerinvoice/entity/CustomerInvoice.java new file mode 100644 index 00000000..5f06e3d9 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerinvoice/entity/CustomerInvoice.java @@ -0,0 +1,100 @@ +package org.jeecg.modules.demo.customerinvoice.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: 客户发票信息 + * @Author: jeecg-boot + * @Date: 2022-12-08 + * @Version: V1.0 + */ +@Data +@TableName("customer_invoice") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="customer_invoice对象", description="客户发票信息") +public class CustomerInvoice implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + /**所属部门*/ + @ApiModelProperty(value = "所属部门") + private java.lang.String sysOrgCode; + /**用户*/ + @Excel(name = "用户", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username") + @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username") + @ApiModelProperty(value = "用户") + private java.lang.String userId; + /**客户类型*/ + @Excel(name = "客户类型", width = 15, dicCode = "khlx") + @Dict(dicCode = "khlx") + @ApiModelProperty(value = "客户类型") + private java.lang.String customerType; + /**发票类型*/ + @Excel(name = "发票类型", width = 15, dicCode = "fplx") + @Dict(dicCode = "fplx") + @ApiModelProperty(value = "发票类型") + private java.lang.String invoiceType; + /**名称*/ + @Excel(name = "名称", width = 15) + @ApiModelProperty(value = "名称") + private java.lang.String name; + /**纳税人识别号*/ + @Excel(name = "纳税人识别号", width = 15) + @ApiModelProperty(value = "纳税人识别号") + private java.lang.String taxIdentificationNumber; + /**地址*/ + @Excel(name = "地址", width = 15) + @ApiModelProperty(value = "地址") + private java.lang.String address; + /**电话*/ + @Excel(name = "电话", width = 15) + @ApiModelProperty(value = "电话") + private java.lang.String telephone; + /**开户行*/ + @Excel(name = "开户行", width = 15) + @ApiModelProperty(value = "开户行") + private java.lang.String bankDeposit; + /**账号*/ + @Excel(name = "账号", width = 15) + @ApiModelProperty(value = "账号") + private java.lang.String accountNumber; + /**排序*/ + @Excel(name = "排序", width = 15) + @ApiModelProperty(value = "排序") + private java.lang.Integer sort; +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerinvoice/mapper/CustomerInvoiceMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerinvoice/mapper/CustomerInvoiceMapper.java new file mode 100644 index 00000000..fa0510a5 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerinvoice/mapper/CustomerInvoiceMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.demo.customerinvoice.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.demo.customerinvoice.entity.CustomerInvoice; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 客户发票信息 + * @Author: jeecg-boot + * @Date: 2022-12-08 + * @Version: V1.0 + */ +public interface CustomerInvoiceMapper extends BaseMapper { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerinvoice/mapper/xml/CustomerInvoiceMapper.xml b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerinvoice/mapper/xml/CustomerInvoiceMapper.xml new file mode 100644 index 00000000..9386c34b --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerinvoice/mapper/xml/CustomerInvoiceMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerinvoice/service/ICustomerInvoiceService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerinvoice/service/ICustomerInvoiceService.java new file mode 100644 index 00000000..9c109fc2 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerinvoice/service/ICustomerInvoiceService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.demo.customerinvoice.service; + +import org.jeecg.modules.demo.customerinvoice.entity.CustomerInvoice; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 客户发票信息 + * @Author: jeecg-boot + * @Date: 2022-12-08 + * @Version: V1.0 + */ +public interface ICustomerInvoiceService extends IService { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerinvoice/service/impl/CustomerInvoiceServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerinvoice/service/impl/CustomerInvoiceServiceImpl.java new file mode 100644 index 00000000..5d588cc2 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customerinvoice/service/impl/CustomerInvoiceServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.demo.customerinvoice.service.impl; + +import org.jeecg.modules.demo.customerinvoice.entity.CustomerInvoice; +import org.jeecg.modules.demo.customerinvoice.mapper.CustomerInvoiceMapper; +import org.jeecg.modules.demo.customerinvoice.service.ICustomerInvoiceService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 客户发票信息 + * @Author: jeecg-boot + * @Date: 2022-12-08 + * @Version: V1.0 + */ +@Service +public class CustomerInvoiceServiceImpl extends ServiceImpl implements ICustomerInvoiceService { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customershoppingcart/controller/CustomerShoppingCartController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customershoppingcart/controller/CustomerShoppingCartController.java new file mode 100644 index 00000000..a0413e49 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customershoppingcart/controller/CustomerShoppingCartController.java @@ -0,0 +1,180 @@ +package org.jeecg.modules.demo.customershoppingcart.controller; + +import java.util.Arrays; +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 org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.demo.customershoppingcart.entity.CustomerShoppingCart; +import org.jeecg.modules.demo.customershoppingcart.service.ICustomerShoppingCartService; + +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.demo.zygoods.entity.ZyGoods; +import org.jeecg.modules.demo.zygoods.service.IZyGoodsService; +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: 购物车 + * @Author: jeecg-boot + * @Date: 2022-12-08 + * @Version: V1.0 + */ +@Api(tags="购物车") +@RestController +@RequestMapping("/customershoppingcart/customerShoppingCart") +@Slf4j +public class CustomerShoppingCartController extends JeecgController { + @Autowired + private ICustomerShoppingCartService customerShoppingCartService; + + @Autowired + private IZyGoodsService zyGoodsService; + + /** + * 分页列表查询 + * + * @param customerShoppingCart + * @param pageNo + * @param pageSize + * @param req + * @return + */ + @AutoLog(value = "购物车-分页列表查询") + @ApiOperation(value="购物车-分页列表查询", notes="购物车-分页列表查询") + @GetMapping(value = "/list") + public Result queryPageList(CustomerShoppingCart customerShoppingCart, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(customerShoppingCart, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = customerShoppingCartService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param customerShoppingCart + * @return + */ + @AutoLog(value = "购物车-添加") + @ApiOperation(value="购物车-添加", notes="购物车-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody CustomerShoppingCart customerShoppingCart) { + customerShoppingCartService.save(customerShoppingCart); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param customerShoppingCart + * @return + */ + @AutoLog(value = "购物车-编辑") + @ApiOperation(value="购物车-编辑", notes="购物车-编辑") + @PutMapping(value = "/edit") + public Result edit(@RequestBody CustomerShoppingCart customerShoppingCart) { + customerShoppingCartService.updateById(customerShoppingCart); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "购物车-通过id删除") + @ApiOperation(value="购物车-通过id删除", notes="购物车-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + customerShoppingCartService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "购物车-批量删除") + @ApiOperation(value="购物车-批量删除", notes="购物车-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.customerShoppingCartService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + @AutoLog(value = "购物车-通过id查询") + @ApiOperation(value="购物车-通过id查询", notes="购物车-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + CustomerShoppingCart customerShoppingCart = customerShoppingCartService.getById(id); + if(customerShoppingCart==null) { + return Result.error("未找到对应数据"); + } +/* String goodsid = customerShoppingCart.getGoodsId(); + ZyGoods zygoods= zyGoodsService.getById(goodsid);*/ + + + return Result.OK(customerShoppingCart); + } + + /** + * 导出excel + * + * @param request + * @param customerShoppingCart + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, CustomerShoppingCart customerShoppingCart) { + return super.exportXls(request, customerShoppingCart, CustomerShoppingCart.class, "购物车"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, CustomerShoppingCart.class); + } + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customershoppingcart/entity/CustomerShoppingCart.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customershoppingcart/entity/CustomerShoppingCart.java new file mode 100644 index 00000000..4927cd6a --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customershoppingcart/entity/CustomerShoppingCart.java @@ -0,0 +1,97 @@ +package org.jeecg.modules.demo.customershoppingcart.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: 购物车 + * @Author: jeecg-boot + * @Date: 2022-12-10 + * @Version: V1.0 + */ +@Data +@TableName("customer_shopping_cart") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="customer_shopping_cart对象", description="购物车") +public class CustomerShoppingCart implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private String createBy; + /**创建日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建日期") + private Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private String updateBy; + /**更新日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新日期") + private Date updateTime; + /**所属部门*/ + @ApiModelProperty(value = "所属部门") + private String sysOrgCode; + /**用户*/ + @Excel(name = "用户", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username") + @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username") + @ApiModelProperty(value = "用户") + private String userId; + /**商品*/ + @Excel(name = "商品", width = 15, dictTable = "zy_goods", dicText = "goods_name", dicCode = "id") + @Dict(dictTable = "zy_goods", dicText = "goods_name", dicCode = "id") + @ApiModelProperty(value = "商品") + private String goodsId; + /**当前单价*/ + @Excel(name = "当前单价", width = 15) + @ApiModelProperty(value = "当前单价") + private Double price; + /**数量*/ + @Excel(name = "数量", width = 15) + @ApiModelProperty(value = "数量") + private Integer number; + /**中间字段临时存储*/ + @Excel(name = "中间字段临时存储", width = 15) + @ApiModelProperty(value = "中间字段临时存储") + private String temp1; + /**中间字段临时存储*/ + @Excel(name = "中间字段临时存储", width = 15) + @ApiModelProperty(value = "中间字段临时存储") + private String temp2; + /**中间字段临时存储*/ + @Excel(name = "中间字段临时存储", width = 15) + @ApiModelProperty(value = "中间字段临时存储") + private String temp3; + /**中间字段临时存储*/ + @Excel(name = "中间字段临时存储", width = 15) + @ApiModelProperty(value = "中间字段临时存储") + private String temp4; + /**图片字段*/ + @Excel(name = "图片字段", width = 15) + @ApiModelProperty(value = "图片字段") + private String temiimg; +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customershoppingcart/mapper/CustomerShoppingCartMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customershoppingcart/mapper/CustomerShoppingCartMapper.java new file mode 100644 index 00000000..bb914ce1 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customershoppingcart/mapper/CustomerShoppingCartMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.demo.customershoppingcart.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.demo.customershoppingcart.entity.CustomerShoppingCart; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 购物车 + * @Author: jeecg-boot + * @Date: 2022-12-08 + * @Version: V1.0 + */ +public interface CustomerShoppingCartMapper extends BaseMapper { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customershoppingcart/mapper/xml/CustomerShoppingCartMapper.xml b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customershoppingcart/mapper/xml/CustomerShoppingCartMapper.xml new file mode 100644 index 00000000..54dc40c8 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customershoppingcart/mapper/xml/CustomerShoppingCartMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customershoppingcart/service/ICustomerShoppingCartService.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customershoppingcart/service/ICustomerShoppingCartService.java new file mode 100644 index 00000000..aea8f236 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customershoppingcart/service/ICustomerShoppingCartService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.demo.customershoppingcart.service; + +import org.jeecg.modules.demo.customershoppingcart.entity.CustomerShoppingCart; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 购物车 + * @Author: jeecg-boot + * @Date: 2022-12-08 + * @Version: V1.0 + */ +public interface ICustomerShoppingCartService extends IService { + +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customershoppingcart/service/impl/CustomerShoppingCartServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customershoppingcart/service/impl/CustomerShoppingCartServiceImpl.java new file mode 100644 index 00000000..74451858 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/customershoppingcart/service/impl/CustomerShoppingCartServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.demo.customershoppingcart.service.impl; + +import org.jeecg.modules.demo.customershoppingcart.entity.CustomerShoppingCart; +import org.jeecg.modules.demo.customershoppingcart.mapper.CustomerShoppingCartMapper; +import org.jeecg.modules.demo.customershoppingcart.service.ICustomerShoppingCartService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 购物车 + * @Author: jeecg-boot + * @Date: 2022-12-08 + * @Version: V1.0 + */ +@Service +public class CustomerShoppingCartServiceImpl extends ServiceImpl implements ICustomerShoppingCartService { + +} From 2492a1935574c07a0cceaff200e4268a5a51b3d9 Mon Sep 17 00:00:00 2001 From: shenyuan Date: Sat, 10 Dec 2022 16:49:03 +0800 Subject: [PATCH 08/11] =?UTF-8?q?=E5=88=B6=E8=A1=A3=E9=83=A8=E4=BB=B6?= =?UTF-8?q?=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../process/modules/ZyClothsComponentForm.vue | 82 ++++++++++++++----- 1 file changed, 62 insertions(+), 20 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue index 5ae1cd1a..4d2a95b8 100644 --- a/ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue +++ b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue @@ -3,46 +3,88 @@ - + - - - - - - + + + - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + + + @@ -84,7 +126,7 @@ }, labelCol: { xs: { span: 24 }, - sm: { span: 5 }, + sm: { span: 4 }, }, wrapperCol: { xs: { span: 24 }, From e9dd035b758584fae994fffdee044bba503ae944 Mon Sep 17 00:00:00 2001 From: shenyuan Date: Sat, 10 Dec 2022 16:56:59 +0800 Subject: [PATCH 09/11] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/process/modules/ZyClothsComponentForm.vue | 7 ++++++- .../src/views/process/modules/ZyClothsModularForm.vue | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue index 4d2a95b8..dc5f966a 100644 --- a/ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue +++ b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentForm.vue @@ -206,4 +206,9 @@ }, } } - \ No newline at end of file + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularForm.vue b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularForm.vue index 6a197d96..e6699a8e 100644 --- a/ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularForm.vue +++ b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsModularForm.vue @@ -183,4 +183,9 @@ }, } } - \ No newline at end of file + + \ No newline at end of file From 50a690b3b8d60746e83592f6045a8e052aba1c6e Mon Sep 17 00:00:00 2001 From: shenyuan Date: Sat, 10 Dec 2022 17:11:15 +0800 Subject: [PATCH 10/11] =?UTF-8?q?=E5=88=B6=E8=A1=A3=E9=83=A8=E4=BB=B6?= =?UTF-8?q?=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/process/ZyClothsComponentList.vue | 9 +- .../modules/ZyClothsComponentListDetail.vue | 125 ++++++++++++++++++ 2 files changed, 132 insertions(+), 2 deletions(-) create mode 100644 ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentListDetail.vue diff --git a/ant-design-vue-jeecg/src/views/process/ZyClothsComponentList.vue b/ant-design-vue-jeecg/src/views/process/ZyClothsComponentList.vue index 711921fa..67c2036d 100644 --- a/ant-design-vue-jeecg/src/views/process/ZyClothsComponentList.vue +++ b/ant-design-vue-jeecg/src/views/process/ZyClothsComponentList.vue @@ -100,6 +100,7 @@ + @@ -111,14 +112,15 @@ import ZyClothsComponentModal from './modules/ZyClothsComponentModal' import ZyProcessComponentList from "@views/process/ZyProcessComponentList" import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'; - +import ZyClothsComponentListDetail from './modules/ZyClothsComponentListDetail' export default { name: 'ZyClothsComponentList', mixins:[JeecgListMixin, mixinDevice], components: { ZyProcessComponentList, - ZyClothsComponentModal + ZyClothsComponentModal, + ZyClothsComponentListDetail }, data () { return { @@ -239,6 +241,9 @@ fieldList.push({type:'string',value:'modularId',text:'模块',dictCode:'zy_cloths_modular,modular_name,id'}) fieldList.push({type:'string',value:'enterpriseId',text:'企业',dictCode:''}) this.superFieldList = fieldList + }, + handleDetail(record){ + this.$refs.ZyClothsComponentListDetail.showModal(record) } } } diff --git a/ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentListDetail.vue b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentListDetail.vue new file mode 100644 index 00000000..fc44ff34 --- /dev/null +++ b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentListDetail.vue @@ -0,0 +1,125 @@ + + + \ No newline at end of file From 13d71039f3639b8a1b821cab031086fa70ab7434 Mon Sep 17 00:00:00 2001 From: shenyuan Date: Sat, 10 Dec 2022 17:13:55 +0800 Subject: [PATCH 11/11] =?UTF-8?q?=E5=88=B6=E8=A1=A3=E9=83=A8=E4=BB=B6?= =?UTF-8?q?=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/ZyClothsComponentListDetail.vue | 21 +++++++------------ 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentListDetail.vue b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentListDetail.vue index fc44ff34..a10bb3fd 100644 --- a/ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentListDetail.vue +++ b/ant-design-vue-jeecg/src/views/process/modules/ZyClothsComponentListDetail.vue @@ -69,20 +69,13 @@ partsName:'是', createTime:'2022-12-06 19:00:07' }, - { - key: '2', - nums:'aaff', - modularId_dictText:'1-3合后育克', - partsName:'否', - createTime:'2022-12-06 18:30:49' - }, - { - key: '3', - nums:'test01', - modularId_dictText:'1-3合后育克', - partsName:'否', - createTime:'2022-12-06 09:07:05' - } + // { + // key: '2', + // nums:'aaff', + // modularId_dictText:'1-3合后育克', + // partsName:'否', + // createTime:'2022-12-06 18:30:49' + // } ] export default { name: 'ZyClothsComponentListDetail',//此处填组件名称