From eb2ce6e95c43b87aa109526a1fcb40d8477cc689 Mon Sep 17 00:00:00 2001 From: "kuang.yife" Date: Sat, 25 Feb 2023 23:41:41 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=A8=A1=E7=89=88=E4=B8=8A=E6=9E=B6?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../goods/GoodsStandardController.java | 12 + .../templates/goods/standard/addTemplate.html | 445 ++++++++++++++++-- 2 files changed, 428 insertions(+), 29 deletions(-) diff --git a/ghy-admin/src/main/java/com/ghy/web/controller/goods/GoodsStandardController.java b/ghy-admin/src/main/java/com/ghy/web/controller/goods/GoodsStandardController.java index 2940d218..363a2a0b 100644 --- a/ghy-admin/src/main/java/com/ghy/web/controller/goods/GoodsStandardController.java +++ b/ghy-admin/src/main/java/com/ghy/web/controller/goods/GoodsStandardController.java @@ -5,7 +5,10 @@ import com.ghy.common.core.domain.AjaxResult; import com.ghy.common.core.page.TableDataInfo; import com.ghy.goods.domain.GoodsStandard; import com.ghy.goods.service.GoodsStandardService; +import com.ghy.order.domain.OrderTemplate; +import com.ghy.order.service.OrderTemplateService; import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.*; @@ -22,11 +25,20 @@ public class GoodsStandardController extends BaseController { @Resource private GoodsStandardService goodsStandardService; + @Autowired + private OrderTemplateService orderTemplateService; @GetMapping("/addTemplate") public String addTemplate(ModelMap modelMap){ return PREFIX + "/addTemplate"; } + + @GetMapping("getByTemplateId/{id}") + public String getByTemplateId(ModelMap modelMap, @PathVariable("id") Long templateId) { + OrderTemplate orderTemplate = orderTemplateService.selectById(templateId); + modelMap.put("template", orderTemplate); + return PREFIX + "/addTemplate"; + } @RequiresPermissions("goods:standard:view") @GetMapping public String goodsStandard(Long goodsId, ModelMap mmap) { diff --git a/ghy-admin/src/main/resources/templates/goods/standard/addTemplate.html b/ghy-admin/src/main/resources/templates/goods/standard/addTemplate.html index 91f0cb5a..ccfb03e3 100644 --- a/ghy-admin/src/main/resources/templates/goods/standard/addTemplate.html +++ b/ghy-admin/src/main/resources/templates/goods/standard/addTemplate.html @@ -2,22 +2,91 @@ + + + + -
+
+
商品信息
-
+
-

MR1234

-

快速发布

+
MR1234
+
- +
@@ -41,46 +110,364 @@
-
- + +
+
+ +
+
+ +
+
+ +
- + +
+ +
+
+ + +
+
+
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+ +
+ +
+
+ +
+
+ +
+
+ +
+
+
+ +
+ +
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+ + + + + + +
+
+
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+
需提供可搬货人员,楼层
+
+
层(费用另行计算);
+
+
+
+
+
+
+
+
+
+
+ 合计金额: + ¥ + 0 +
+
+
+
+ +
+
+
+ +
+
+ +
+
+
+
+
+ + + From 5162a348300535133dfa49a6fed842b83b6945d7 Mon Sep 17 00:00:00 2001 From: "kuang.yife" Date: Sat, 25 Feb 2023 23:46:55 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=A8=A1=E7=89=88=E4=B8=8A=E6=9E=B6?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/templates/goods/standard/addTemplate.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghy-admin/src/main/resources/templates/goods/standard/addTemplate.html b/ghy-admin/src/main/resources/templates/goods/standard/addTemplate.html index ccfb03e3..b87b2321 100644 --- a/ghy-admin/src/main/resources/templates/goods/standard/addTemplate.html +++ b/ghy-admin/src/main/resources/templates/goods/standard/addTemplate.html @@ -388,7 +388,7 @@ if (result != null) { result.forEach(function(item) { $('#template-grid').append('
' + - '
' + item.id + '
' + + '
模版' + item.id + '
' + ' ' + '
'); }); From d0e377328d8d45d6d256e1215dea85a411fd263d Mon Sep 17 00:00:00 2001 From: "kuang.yife" Date: Sun, 26 Feb 2023 00:50:52 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=AF=81=E4=B9=A6+=E4=BF=9D=E9=99=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../order/OrderDetailController.java | 16 +++++++++++++ .../templates/goods/deptcategory/edit.html | 24 +++++++++++++++++++ .../ghy/goods/domain/DeptGoodsCategory.java | 6 +++++ .../mapper/goods/DeptGoodsCategoryMapper.xml | 8 +++++-- 4 files changed, 52 insertions(+), 2 deletions(-) diff --git a/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderDetailController.java b/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderDetailController.java index 73944642..5f7e7bab 100644 --- a/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderDetailController.java +++ b/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderDetailController.java @@ -804,8 +804,24 @@ public class OrderDetailController extends BaseController { OrderDetail detailInfo = this.orderDetailService.selectById(orderDetail.getId()); // 删除子单 orderDetailService.deleteOrderDetailByIds(orderDetail.getId().toString()); + FinancialDetail financialDetail = financialDetailService.selectByOrderDetailId(detailInfo.getId()); + // 财务子单金额返还给主单 + FinancialMaster financialMaster = financialMasterService.selectByOrderMasterId(detailInfo.getOrderMasterId()); + financialMaster.setServerMoney(financialMaster.getServerMoney().add(financialDetail.getPayMoney())); + financialMasterService.updateFinancialMaster(financialMaster); // 删除子财务单 financialDetailService.deleteFinancialDetailByOrderDetailId(orderDetail.getId()); + // 退回旧商品 +// List goodsList = orderGoodsService.selectByOrderDetailId(orderDetail.getId()); +// goodsList.forEach(orderGoods -> { +// List masterGoods = orderGoodsService.selectByOrderMasterId(detailInfo.getOrderMasterId()); +// masterGoods.forEach(master->{ +// if(master.getGoodsStandardId().equals(orderGoods.getGoodsStandardId())){ +// master.setServerGoodsNum(master.getServerGoodsNum()-orderGoods.getGoodsNum()); +// } +// orderGoodsService.updateOrderGoods(master); +// }); +// }); // 删除派单记录 orderGoodsService.deleteByOrderDetailId(orderDetail.getId()); OrderMaster orderMaster2Update = new OrderMaster(); diff --git a/ghy-admin/src/main/resources/templates/goods/deptcategory/edit.html b/ghy-admin/src/main/resources/templates/goods/deptcategory/edit.html index b5cea0ec..cbd8bbe0 100644 --- a/ghy-admin/src/main/resources/templates/goods/deptcategory/edit.html +++ b/ghy-admin/src/main/resources/templates/goods/deptcategory/edit.html @@ -137,6 +137,30 @@
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
diff --git a/ghy-goods/src/main/java/com/ghy/goods/domain/DeptGoodsCategory.java b/ghy-goods/src/main/java/com/ghy/goods/domain/DeptGoodsCategory.java index 682b4ae5..b36fa7cc 100644 --- a/ghy-goods/src/main/java/com/ghy/goods/domain/DeptGoodsCategory.java +++ b/ghy-goods/src/main/java/com/ghy/goods/domain/DeptGoodsCategory.java @@ -71,4 +71,10 @@ public class DeptGoodsCategory extends GoodsCategory { private String hotCategoryName; + // 是否需要保险 1.需要 + private Integer isSure; + + // 是否需要证书 1.需要 + private Integer isCert; + } diff --git a/ghy-goods/src/main/resources/mapper/goods/DeptGoodsCategoryMapper.xml b/ghy-goods/src/main/resources/mapper/goods/DeptGoodsCategoryMapper.xml index 0d6971c9..ad1162bb 100644 --- a/ghy-goods/src/main/resources/mapper/goods/DeptGoodsCategoryMapper.xml +++ b/ghy-goods/src/main/resources/mapper/goods/DeptGoodsCategoryMapper.xml @@ -24,6 +24,8 @@ + + @@ -32,7 +34,7 @@ - SELECT dept_goods_category_id, dept_id, goods_category_id, category_sort, is_hot, cover, hot_name, + SELECT dept_goods_category_id, dept_id, goods_category_id, category_sort, is_hot, cover, hot_name, is_sure, is_cert, one_rate, two_rate, three_rate, dept_rate, dept_money, retain_rate, retain_money, create_by, create_time, remark FROM dept_goods_category @@ -40,7 +42,7 @@ SELECT dgc.dept_goods_category_id, dgc.dept_id, dgc.goods_category_id, dgc.category_sort, dgc.one_rate, dgc.two_rate, dgc.three_rate, dgc.create_by, dgc.create_time, dgc.remark, - dgc.is_hot, dgc.cover, dgc.hot_name, dgc.dept_rate, dgc.dept_money, dgc.retain_rate, dgc.retain_money, + dgc.is_hot, dgc.cover, dgc.hot_name, dgc.is_sure, dgc.is_cert, dgc.dept_rate, dgc.dept_money, dgc.retain_rate, dgc.retain_money, dgc.dept_category_name, gc.goods_category_name, gc.level, gc.parent_category_id, gc.type, gc.status, gc.simple_goods_category_name FROM dept_goods_category dgc LEFT JOIN goods_category gc ON dgc.goods_category_id = gc.goods_category_id @@ -70,6 +72,8 @@ is_hot = #{isHot}, cover = #{cover}, hot_name = #{hotName}, + is_sure = #{isSure}, + is_cert = #{isCert}, dept_rate = #{deptRate}, dept_money = #{deptMoney}, retain_rate = #{retainRate},