From fadb13d55726251ab1ab8b2ced752543b8ababae Mon Sep 17 00:00:00 2001 From: Gitea Date: Thu, 19 Jan 2023 09:38:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E7=AE=A1=E7=90=86BUG?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../goodsaccessories/GoodsAccessoriesList.vue | 13 +- .../src/views/goodsfabric/GoodsFabricList.vue | 14 +- .../src/views/goodsmodule/GoodsModuleList.vue | 22 +- .../src/views/ordergoods/OrderGoodsList.vue | 106 +++++----- .../src/views/zygoods/ZyGoodsList.vue | 3 + .../src/views/zygoods/modules/ZyGoodsForm.vue | 2 +- .../src/views/zyorders/ZyOrdersList.vue | 92 ++++----- .../demo/ordergoods/entity/OrderGoodsJk.java | 44 ++++ .../controller/ZyOrdersController.java | 188 +++++++++++++++++- .../demo/zyorders/entity/ZyOrdersJk.java | 85 ++++++++ 10 files changed, 436 insertions(+), 133 deletions(-) create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/ordergoods/entity/OrderGoodsJk.java create mode 100644 jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/entity/ZyOrdersJk.java diff --git a/ant-design-vue-jeecg/src/views/goodsaccessories/GoodsAccessoriesList.vue b/ant-design-vue-jeecg/src/views/goodsaccessories/GoodsAccessoriesList.vue index c856a740..c19ece6d 100644 --- a/ant-design-vue-jeecg/src/views/goodsaccessories/GoodsAccessoriesList.vue +++ b/ant-design-vue-jeecg/src/views/goodsaccessories/GoodsAccessoriesList.vue @@ -1,5 +1,6 @@ + 详情 +
@@ -81,6 +82,8 @@ + 详情 +
@@ -86,22 +87,11 @@ - 编辑 - + 详情 - - 更多 - - - 详情 - - - - 删除 - - - - + + 删除 + @@ -130,6 +120,7 @@ return { description: '商品模块表管理页面', // 表头 + biaoTi: '', columns: [ { title: '#', @@ -185,6 +176,7 @@ }, created() { this.getSuperFieldList(); + this.biaoTi = this.$route.query.goodsname+"商品模块管理"; }, computed: { importExcelUrl: function(){ diff --git a/ant-design-vue-jeecg/src/views/ordergoods/OrderGoodsList.vue b/ant-design-vue-jeecg/src/views/ordergoods/OrderGoodsList.vue index 6bfa784a..2677c4df 100644 --- a/ant-design-vue-jeecg/src/views/ordergoods/OrderGoodsList.vue +++ b/ant-design-vue-jeecg/src/views/ordergoods/OrderGoodsList.vue @@ -4,56 +4,50 @@
- + - + + - + - + - - - - - - - - - - - + - - - + + + + + + + + + + + + + - 查询 重置 - - {{ toggleSearchStatus ? '收起' : '展开' }} - - @@ -63,18 +57,18 @@
- 新增 + 导出 导入 - + - +
@@ -120,22 +114,12 @@ - 编辑 - - - - 更多 - - - 详情 - - - - 删除 - - - - + + 详情 + @@ -179,16 +163,11 @@ align:"center", dataIndex: 'ordersId_dictText' }, - { +/* { title:'商品', align:"center", dataIndex: 'goodsId_dictText' - }, - { - title:'商品数量', - align:"center", - dataIndex: 'goodsNum' - }, + },*/ { title:'商品编号', align:"center", @@ -200,21 +179,26 @@ dataIndex: 'goodsName' }, { + title:'商品数量', + align:"center", + dataIndex: 'goodsNum' + }, +/* { title:'商品描述', align:"center", dataIndex: 'goodsIntr' - }, + },*/ { title:'是否定制', align:"center", dataIndex: 'customized_dictText' }, { - title:'顾客量体', + title:'顾客', align:"center", dataIndex: 'measureId_dictText' }, - { +/* { title:'商品图片', align:"center", dataIndex: 'goodsPicture' @@ -229,21 +213,21 @@ align:"center", dataIndex: 'goodsVideo', scopedSlots: {customRender: 'fileSlot'} - }, + },*/ { title:'服装类型', align:"center", - dataIndex: 'clothsTypeId' + dataIndex: 'clothsTypeId_dictText' }, { title:'款式', align:"center", - dataIndex: 'styleId' + dataIndex: 'styleId_dictText' }, { title:'型号', align:"center", - dataIndex: 'modelId' + dataIndex: 'modelId_dictText' }, { title:'单位', @@ -336,7 +320,7 @@ fieldList.push({type:'string',value:'goodsName',text:'商品名称',dictCode:''}) fieldList.push({type:'string',value:'goodsIntr',text:'商品描述',dictCode:''}) fieldList.push({type:'int',value:'customized',text:'是否定制',dictCode:'yn'}) - fieldList.push({type:'string',value:'measureId',text:'顾客量体',dictCode:'customer_measure,username,id'}) + fieldList.push({type:'string',value:'measureId',text:'顾客',dictCode:'customer_measure,username,id'}) fieldList.push({type:'string',value:'goodsPicture',text:'商品图片',dictCode:''}) fieldList.push({type:'string',value:'defaultPicture',text:'默认图片',dictCode:''}) fieldList.push({type:'string',value:'goodsVideo',text:'商品视频',dictCode:''}) diff --git a/ant-design-vue-jeecg/src/views/zygoods/ZyGoodsList.vue b/ant-design-vue-jeecg/src/views/zygoods/ZyGoodsList.vue index e3a6e36e..2645e6c0 100644 --- a/ant-design-vue-jeecg/src/views/zygoods/ZyGoodsList.vue +++ b/ant-design-vue-jeecg/src/views/zygoods/ZyGoodsList.vue @@ -334,6 +334,7 @@ path: '/goodsmodule/GoodsModuleList', query: { // 路由携带参数 'goodsid': record.id, + 'goodsname':record.goodsName, } }); }, @@ -343,6 +344,7 @@ path: '/goodsfabric/GoodsFabricList', query: { // 路由携带参数 'goodsid': record.id, + 'goodsname':record.goodsName, } }); }, @@ -352,6 +354,7 @@ path: '/goodsaccessories/GoodsAccessoriesList', query: { // 路由携带参数 'goodsid': record.id, + 'goodsname':record.goodsName, } }); }, diff --git a/ant-design-vue-jeecg/src/views/zygoods/modules/ZyGoodsForm.vue b/ant-design-vue-jeecg/src/views/zygoods/modules/ZyGoodsForm.vue index e38292ea..6d546d64 100644 --- a/ant-design-vue-jeecg/src/views/zygoods/modules/ZyGoodsForm.vue +++ b/ant-design-vue-jeecg/src/views/zygoods/modules/ZyGoodsForm.vue @@ -35,7 +35,7 @@ - + diff --git a/ant-design-vue-jeecg/src/views/zyorders/ZyOrdersList.vue b/ant-design-vue-jeecg/src/views/zyorders/ZyOrdersList.vue index a47256a5..355cc426 100644 --- a/ant-design-vue-jeecg/src/views/zyorders/ZyOrdersList.vue +++ b/ant-design-vue-jeecg/src/views/zyorders/ZyOrdersList.vue @@ -4,62 +4,62 @@
- + - + + + + + + + + + + - - - - - - + + - + + - - - - - - - - - - - + + + @@ -77,13 +77,13 @@
- 新增 + 导出 导入 - + 删除 @@ -141,12 +141,12 @@ 生产 - 编辑 - + 详情 - - 删除 + + 撤销订单 @@ -251,17 +251,17 @@ align:"center", dataIndex: 'goodsQuantity' }, - { +/* { title:'支付方式', align:"center", dataIndex: 'paymentMethod_dictText' - }, + },*/ { title:'支付状态', align:"center", dataIndex: 'paymentStatus_dictText' }, - { +/* { title:'账号/卡号', align:"center", dataIndex: 'accountNo' @@ -270,7 +270,7 @@ title:'开户银行', align:"center", dataIndex: 'bankDeposit' - }, + },*/ { title:'支付时间', align:"center", @@ -285,7 +285,7 @@ dataIndex: 'cityId', scopedSlots: {customRender: 'pcaSlot'} }, - { +/* { title:'地址', align:"center", dataIndex: 'address' @@ -294,7 +294,7 @@ title:'邮编', align:"center", dataIndex: 'zipCode' - }, + },*/ { title:'收货人', align:"center", @@ -305,7 +305,7 @@ align:"center", dataIndex: 'mobile' }, - { +/* { title:'发票客户类型', align:"center", dataIndex: 'invoiceCustomerType_dictText' @@ -324,13 +324,13 @@ title:'开票地址', align:"center", dataIndex: 'addressBilling' - }, + },*/ { title:'电话', align:"center", dataIndex: 'telephone' }, - { +/* { title:'公户开户行', align:"center", dataIndex: 'bankPublic' @@ -339,7 +339,7 @@ title:'公户账号', align:"center", dataIndex: 'accountNumber' - }, + },*/ { title:'销售门店', align:"center", @@ -350,11 +350,11 @@ align:"center", dataIndex: 'salespersonId_dictText' }, - { +/* { title:'物流企业', align:"center", dataIndex: 'logisticsEnterprisesId_dictText' - }, + },*/ { title:'交付状态', align:"center", diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/ordergoods/entity/OrderGoodsJk.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/ordergoods/entity/OrderGoodsJk.java new file mode 100644 index 00000000..b2866fb4 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/ordergoods/entity/OrderGoodsJk.java @@ -0,0 +1,44 @@ +package org.jeecg.modules.demo.ordergoods.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-28 + * @Version: V1.0 + */ +@Data +public class OrderGoodsJk implements Serializable { + private static final long serialVersionUID = 1L; + + /**商品id*/ + @Excel(name = "商品id", width = 15, dictTable = "zy_goods", dicText = "goods_name", dicCode = "id") + @Dict(dictTable = "zy_goods", dicText = "goods_name", dicCode = "id") + @ApiModelProperty(value = "商品id") + private java.lang.String goodsId; + /**商品数量*/ + @Excel(name = "商品数量", width = 15) + @ApiModelProperty(value = "商品数量") + private java.lang.Integer goodsNum; + /**顾客量体id*/ + @Excel(name = "顾客量体id", width = 15, dictTable = "customer_measure", dicText = "username", dicCode = "id") + @Dict(dictTable = "customer_measure", dicText = "username", dicCode = "id") + @ApiModelProperty(value = "顾客量体id") + private java.lang.String measureId; +} diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/controller/ZyOrdersController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/controller/ZyOrdersController.java index ebb6cc66..512cf415 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/controller/ZyOrdersController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/controller/ZyOrdersController.java @@ -1,6 +1,7 @@ package org.jeecg.modules.demo.zyorders.controller; import java.util.Arrays; +import java.util.Date; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -12,9 +13,31 @@ 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 org.jeecg.modules.demo.customerreceivingaddress.entity.CustomerReceivingAddress; +import org.jeecg.modules.demo.customerreceivingaddress.service.ICustomerReceivingAddressService; +import org.jeecg.modules.demo.goodsaccessories.entity.GoodsAccessories; +import org.jeecg.modules.demo.goodsaccessories.service.IGoodsAccessoriesService; +import org.jeecg.modules.demo.goodsfabric.entity.GoodsFabric; +import org.jeecg.modules.demo.goodsfabric.service.IGoodsFabricService; +import org.jeecg.modules.demo.goodsmodule.entity.GoodsModule; +import org.jeecg.modules.demo.goodsmodule.service.IGoodsModuleService; import org.jeecg.modules.demo.ordergoods.entity.OrderGoods; +import org.jeecg.modules.demo.ordergoods.entity.OrderGoodsJk; import org.jeecg.modules.demo.ordergoods.service.IOrderGoodsService; +import org.jeecg.modules.demo.ordergoodsaccessories.entity.OrderGoodsAccessories; +import org.jeecg.modules.demo.ordergoodsaccessories.service.IOrderGoodsAccessoriesService; +import org.jeecg.modules.demo.ordergoodsfabric.entity.OrderGoodsFabric; +import org.jeecg.modules.demo.ordergoodsfabric.service.IOrderGoodsFabricService; +import org.jeecg.modules.demo.ordergoodsmodule.entity.OrderGoodsModule; +import org.jeecg.modules.demo.ordergoodsmodule.service.IOrderGoodsModuleService; +import org.jeecg.modules.demo.zyaccessories.entity.ZyStyleAccessories; +import org.jeecg.modules.demo.zyaccessories.service.IZyStyleAccessoriesService; +import org.jeecg.modules.demo.zygoods.entity.ZyGoods; +import org.jeecg.modules.demo.zygoods.service.IZyGoodsService; import org.jeecg.modules.demo.zyorders.entity.ZyOrders; +import org.jeecg.modules.demo.zyorders.entity.ZyOrdersJk; import org.jeecg.modules.demo.zyorders.service.IZyOrdersService; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; @@ -22,6 +45,10 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import lombok.extern.slf4j.Slf4j; +import org.jeecg.modules.zystylefabric.entity.ZyStyleFabric; +import org.jeecg.modules.zystylefabric.service.IZyStyleFabricService; +import org.jeecg.modules.zystylemodule.entity.ZyStyleModule; +import org.jeecg.modules.zystylemodule.service.IZyStyleModuleService; import org.jeecgframework.poi.excel.ExcelImportUtil; import org.jeecgframework.poi.excel.def.NormalExcelConstants; import org.jeecgframework.poi.excel.entity.ExportParams; @@ -49,10 +76,147 @@ import org.jeecg.common.aspect.annotation.AutoLog; @RequestMapping("/zyorders/zyOrders") @Slf4j public class ZyOrdersController extends JeecgController { - @Autowired - private IZyOrdersService zyOrdersService; + @Autowired + private IZyOrdersService zyOrdersService; @Autowired private IOrderGoodsService orderGoodsService; + @Autowired + private ICustomerReceivingAddressService iCustomerReceivingAddressService; + @Autowired + private ICustomerInvoiceService iCustomerInvoiceService; + @Autowired + private IZyGoodsService zyGoodsService; + @Autowired + private IOrderGoodsModuleService orderGoodsModuleService; + @Autowired + private IOrderGoodsFabricService orderGoodsFabricService; + @Autowired + private IOrderGoodsAccessoriesService orderGoodsAccessoriesService; + @Autowired + private IGoodsModuleService goodsModuleService; + @Autowired + private IGoodsFabricService goodsFabricService; + @Autowired + private IGoodsAccessoriesService goodsAccessoriesService; + + /** + * 订单和订单商品接口 + * + * @param + * @return + */ + @AutoLog(value = "订单和订单商品接口") + @ApiOperation(value="订单和订单商品接口", notes="订单和订单商品接口") + @GetMapping(value = "/orderJk") + public Result orderJk(ZyOrdersJk zyOrdersJk,List orderGoodsJkList,HttpServletRequest req) { + Double actual_payment = 0.00; + Double money = 0.00; + for(int i = 0 ; i < orderGoodsJkList.size() ; i++){ + ZyGoods zyGoods = zyGoodsService.getById(orderGoodsJkList.get(i).getGoodsId()); + money = money + zyGoods.getUnitPrice()*orderGoodsJkList.get(i).getGoodsNum(); + actual_payment = actual_payment + zyGoods.getPromotionPrice()*orderGoodsJkList.get(i).getGoodsNum(); + } + ZyOrders zyOrders = new ZyOrders(); + zyOrders.setIschild(0); + zyOrders.setOrderTime(new Date()); + zyOrders.setOrdersNum(getOrdersNum()); + zyOrders.setMoney(money); + zyOrders.setFreight(zyOrdersJk.getFreight()); + zyOrders.setPromotionPrice(money-actual_payment); + zyOrders.setActualPayment(actual_payment); + zyOrders.setDeliveryTime(zyOrdersJk.getDeliveryTime()); + zyOrders.setOrdersType(zyOrdersJk.getOrdersType()); + zyOrders.setUserId(zyOrdersJk.getUserId()); + zyOrders.setGoodsQuantity(zyOrdersJk.getGoodsQuantity()); + CustomerReceivingAddress customerReceivingAddress = iCustomerReceivingAddressService.getById(zyOrdersJk.getAddressId()); + zyOrders.setCityId(customerReceivingAddress.getCityId()); + zyOrders.setAddress(customerReceivingAddress.getAddress()); + zyOrders.setZipCode(customerReceivingAddress.getZipCode()); + zyOrders.setReceiver(zyOrdersJk.getReceiver()); + zyOrders.setMobile(customerReceivingAddress.getMobile()); + CustomerInvoice customerInvoice = iCustomerInvoiceService.getById(zyOrdersJk.getInvoiceId()); + zyOrders.setInvoiceCustomerType(Integer.parseInt(customerInvoice.getCustomerType())); + zyOrders.setInvoiceType(Integer.parseInt(customerInvoice.getInvoiceType())); + zyOrders.setTaxIdentificationNumber(customerInvoice.getTaxIdentificationNumber()); + zyOrders.setAddressBilling(customerInvoice.getAddress()); + zyOrders.setTelephone(customerInvoice.getTelephone()); + zyOrders.setBankPublic(customerInvoice.getBankDeposit()); + zyOrders.setAccountNumber(customerInvoice.getAccountNumber()); + zyOrders.setSalesEnterpriseId(zyOrdersJk.getSalesEnterpriseId()); + zyOrders.setSalespersonId(zyOrdersJk.getSalespersonId()); + zyOrders.setLogisticsEnterprisesId(zyOrdersJk.getLogisticsEnterprisesId()); + zyOrders.setDeliveryStatus(0); + zyOrdersService.save(zyOrders); + for(int j = 0 ; j < orderGoodsJkList.size() ; j++){ + ZyGoods zyGoods = zyGoodsService.getById(orderGoodsJkList.get(j).getGoodsId()); + OrderGoods orderGoods = new OrderGoods(); + orderGoods.setOrdersId(zyOrders.getId()); + orderGoods.setGoodsId(orderGoodsJkList.get(j).getGoodsId()); + orderGoods.setGoodsNum(orderGoodsJkList.get(j).getGoodsNum()); + orderGoods.setGoodsCode(zyGoods.getGoodsCode()); + orderGoods.setGoodsName(zyGoods.getGoodsName()); + orderGoods.setGoodsIntr(zyGoods.getGoodsIntr()); + orderGoods.setCustomized(zyGoods.getCustomized()); + orderGoods.setMeasureId(orderGoodsJkList.get(j).getMeasureId()); + orderGoods.setGoodsPicture(zyGoods.getGoodsPicture()); + orderGoods.setDefaultPicture(zyGoods.getDefaultPicture()); + orderGoods.setGoodsVideo(zyGoods.getGoodsVideo()); + orderGoods.setClothsTypeId(zyGoods.getClothsTypeId()); + orderGoods.setStyleId(zyGoods.getStyleId()); + orderGoods.setModelId(zyGoods.getModelId()); + orderGoods.setUnit(zyGoods.getUnit()); + orderGoods.setNumber(zyGoods.getNumber()); + orderGoods.setUnitPrice(zyGoods.getUnitPrice()); + orderGoods.setDiscount(zyGoods.getDiscount()); + orderGoods.setPromotionPrice(zyGoods.getPromotionPrice()); + orderGoods.setRecommend(zyGoods.getRecommend()); + orderGoods.setPlaceOrigin(zyGoods.getPlaceOrigin()); + orderGoods.setStatus(zyGoods.getStatus()); + orderGoods.setTotalPrice(zyGoods.getUnitPrice()*orderGoodsJkList.get(j).getGoodsNum()); + orderGoods.setPayTotalPrice(zyGoods.getPromotionPrice()*orderGoodsJkList.get(j).getGoodsNum()); + orderGoodsService.save(orderGoods); + GoodsModule goodsModule = new GoodsModule(); + QueryWrapper queryWrapperzsm = QueryGenerator.initQueryWrapper(goodsModule, req.getParameterMap()); + queryWrapperzsm.eq("goods_id",zyGoods.getId()); + queryWrapperzsm.eq("style_id",zyGoods.getStyleId()); + List listzsm = goodsModuleService.list(queryWrapperzsm); + for (int k = 0 ; k < listzsm.size() ; k++){ + OrderGoodsModule orderGoodsModule = new OrderGoodsModule(); + orderGoodsModule.setOrderGoodsId(orderGoods.getId()); + orderGoodsModule.setGoodsId(zyGoods.getId()); + orderGoodsModule.setStyleId(zyGoods.getStyleId()); + orderGoodsModule.setStyleModuleId(listzsm.get(k).getStyleModuleId()); + orderGoodsModule.setModuleId(listzsm.get(k).getModuleId()); + orderGoodsModuleService.save(orderGoodsModule); + } + GoodsFabric goodsFabric = new GoodsFabric(); + QueryWrapper queryWrapperzsf = QueryGenerator.initQueryWrapper(goodsFabric, req.getParameterMap()); + queryWrapperzsf.eq("goods_id",zyGoods.getId()); + List listzsf = goodsFabricService.list(queryWrapperzsf); + for (int o = 0 ; o < listzsf.size() ; o++){ + OrderGoodsFabric orderGoodsFabric = new OrderGoodsFabric(); + orderGoodsFabric.setOrderGoodsId(orderGoods.getId()); + orderGoodsFabric.setGoodsId(zyGoods.getId()); + orderGoodsFabric.setFabricId(listzsf.get(o).getFabricId()); + orderGoodsFabricService.save(orderGoodsFabric); + } + GoodsAccessories goodsAccessories = new GoodsAccessories(); + QueryWrapper queryWrapperzsa = QueryGenerator.initQueryWrapper(goodsAccessories, req.getParameterMap()); + queryWrapperzsa.eq("goods_id",zyGoods.getId()); + List listzsa = goodsAccessoriesService.list(queryWrapperzsa); + for (int p = 0 ; p < listzsa.size() ; p++){ + OrderGoodsAccessories orderGoodsAccessories = new OrderGoodsAccessories(); + orderGoodsAccessories.setOrderGoodsId(orderGoods.getId()); + orderGoodsAccessories.setGoodsId(zyGoods.getId()); + orderGoodsAccessories.setAccessoriesId(listzsa.get(p).getAccessoriesId()); + orderGoodsAccessoriesService.save(orderGoodsAccessories); + } + + + } + return Result.OK("成功"); + } + /** * 分页列表查询 @@ -114,8 +278,10 @@ public class ZyOrdersController extends JeecgController delete(@RequestParam(name="id",required=true) String id) { - zyOrdersService.removeById(id); - return Result.OK("删除成功!"); + ZyOrders zyOrders = zyOrdersService.getById(id); + zyOrders.setDeliveryStatus(9); + zyOrdersService.updateById(zyOrders); + return Result.OK("撤销订单成功!"); } /** @@ -128,8 +294,13 @@ public class ZyOrdersController extends JeecgController deleteBatch(@RequestParam(name="ids",required=true) String ids) { - this.zyOrdersService.removeByIds(Arrays.asList(ids.split(","))); - return Result.OK("批量删除成功!"); + String str[] = ids.split(","); + for (int i = 0 ; i < str.length ; i ++){ + ZyOrders zyOrders = zyOrdersService.getById(str[i]); + zyOrders.setDeliveryStatus(9); + zyOrdersService.updateById(zyOrders); + } + return Result.OK("批量撤销订单成功!"); } /** @@ -175,7 +346,7 @@ public class ZyOrdersController extends JeecgController getOrdersNum() { + public String getOrdersNum() { String mrstr = "000000000000000000"; int listsize = zyOrdersService.count(); int strsize = listsize+1; @@ -183,7 +354,7 @@ public class ZyOrdersController extends JeecgController