diff --git a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/mapper/AftersalesOutOrderMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/mapper/AftersalesOutOrderMapper.java index 703d8d25..fccd1060 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/aftersales/mapper/AftersalesOutOrderMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/aftersales/mapper/AftersalesOutOrderMapper.java @@ -43,6 +43,16 @@ public interface AftersalesOutOrderMapper */ public int updateAftersalesOutOrder(AftersalesOutOrder aftersalesOutOrder); + + /** + * 通过出库单号修改售后维护设备出库 + * + * @param aftersalesOutOrder 售后维护设备出库 + * @return 结果 + */ + + public int updateAftersalesOutOrderByOutOrderCode(AftersalesOutOrder aftersalesOutOrder); + /** * 删除售后维护设备出库 * diff --git a/ruoyi-admin/src/main/java/com/ruoyi/sales/controller/SalesShippingInformationController.java b/ruoyi-admin/src/main/java/com/ruoyi/sales/controller/SalesShippingInformationController.java index 18476f00..fc6f416e 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/sales/controller/SalesShippingInformationController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/sales/controller/SalesShippingInformationController.java @@ -50,8 +50,26 @@ public class SalesShippingInformationController extends BaseController return getDataTable(list); } + + /** + * 导出所有销售出货资料列表 + */ + @RequiresPermissions("sales:salesShippingInformation:export") + @Log(title = "销售出货资料", businessType = BusinessType.EXPORT) + @PostMapping("/exportAll") + @ResponseBody + public AjaxResult exportAll(SalesShippingInformation salesShippingInformation) + { + List list = salesShippingInformationService.selectSalesShippingInformationList(salesShippingInformation); + ExcelUtil util = new ExcelUtil(SalesShippingInformation.class); + return util.exportExcel(list, "销售出货资料数据"); + } + + + + /** - * 导出销售出货资料列表 + * 导出选择销售出货资料列表 */ @RequiresPermissions("sales:salesShippingInformation:export") @Log(title = "销售出货资料", businessType = BusinessType.EXPORT) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesShippingInformServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesShippingInformServiceImpl.java index bded2fda..1cda2ade 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesShippingInformServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSalesShippingInformServiceImpl.java @@ -14,7 +14,9 @@ import com.alibaba.excel.util.MapUtils; import com.alibaba.excel.write.metadata.WriteSheet; import com.alibaba.excel.write.metadata.fill.FillConfig; import com.ruoyi.aftersales.domain.AfterSalesShippingDevice; +import com.ruoyi.aftersales.domain.AftersalesOutOrder; import com.ruoyi.aftersales.mapper.AfterSalesShippingDeviceMapper; +import com.ruoyi.aftersales.mapper.AftersalesOutOrderMapper; import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.exception.BusinessException; import com.ruoyi.common.utils.DateUtils; @@ -79,6 +81,9 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor private SalesShippingInformationMapper salesShippingInformationMapper; + @Autowired + private AftersalesOutOrderMapper aftersalesOutOrderMapper; + /** * 查询销售出货通知 @@ -325,18 +330,31 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor warehouseOutOrder.setUpdateBy(loginName); warehouseOutOrder.setUpdateTime(new Date()); + + //更新售后维护设备出库单数据 + AftersalesOutOrder aftersalesOutOrder = new AftersalesOutOrder(); + aftersalesOutOrder.setOutOrderCode(outOrderCode); + //设置出库状态为 待设备维护2 + aftersalesOutOrder.setWarehouseOutStatus("3"); + aftersalesOutOrder.setUpdateBy(loginName); + aftersalesOutOrder.setUpdateTime(new Date()); + int updateAftersalesOutOrderResult = aftersalesOutOrderMapper.updateAftersalesOutOrderByOutOrderCode(aftersalesOutOrder); + if (updateAftersalesOutOrderResult <= 0){ + throw new BusinessException("更新售后出库单数据失败"); + } + //更新销售订单的出货状态 // SysSalesShippingInform tempShippingInform = sysSalesShippingInformMapper.selectSysSalesShippingInformByCode(outOrderCode); - SysSalesOrder sysSalesOrder = new SysSalesOrder(); - sysSalesOrder.setUpdateBy(loginName); - sysSalesOrder.setUpdateTime(new Date()); - sysSalesOrder.setSalesOrderCode(warehouseOutOrder.getSalesOrderCode()); - //暂收设置为全部出货 - sysSalesOrder.setDeliveryStatus("6"); - int updateSysSalesOrderResult = sysSalesOrderMapper.updateSysSalesOrderBySalesOrderCode(sysSalesOrder); - if (updateSysSalesOrderResult <= 0){ - throw new BusinessException("更新销售订单数据失败"); - } +// SysSalesOrder sysSalesOrder = new SysSalesOrder(); +// sysSalesOrder.setUpdateBy(loginName); +// sysSalesOrder.setUpdateTime(new Date()); +// sysSalesOrder.setSalesOrderCode(warehouseOutOrder.getSalesOrderCode()); +// //暂收设置为全部出货 +// sysSalesOrder.setDeliveryStatus("6"); +// int updateSysSalesOrderResult = sysSalesOrderMapper.updateSysSalesOrderBySalesOrderCode(sysSalesOrder); +// if (updateSysSalesOrderResult <= 0){ +// throw new BusinessException("更新销售订单数据失败"); +// } int updateWarehouseOutOrderResult = warehouseOutOrderMapper.updateWarehouseOutOrder(warehouseOutOrder); if (updateWarehouseOutOrderResult <= 0){ diff --git a/ruoyi-admin/src/main/resources/mapper/aftersales/AftersalesOutOrderMapper.xml b/ruoyi-admin/src/main/resources/mapper/aftersales/AftersalesOutOrderMapper.xml index ebe762cb..7a796d30 100644 --- a/ruoyi-admin/src/main/resources/mapper/aftersales/AftersalesOutOrderMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/aftersales/AftersalesOutOrderMapper.xml @@ -190,6 +190,52 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where out_order_id = #{outOrderId} + + + + update aftersales_out_order + + out_order_code = #{outOrderCode}, + make_no = #{makeNo}, + warehouse_out_status = #{warehouseOutStatus}, + related_order_code = #{relatedOrderCode}, + sales_order_code = #{salesOrderCode}, + warehouse_order_type = #{warehouseOrderType}, + out_make_code = #{outMakeCode}, + requisitioning_code = #{requisitioningCode}, + warehouse_out_type = #{warehouseOutType}, + business_name = #{businessName}, + aftersales_name = #{aftersalesName}, + warehouse_name = #{warehouseName}, + shipping_device_id = #{shippingDeviceId}, + material_no = #{materialNo}, + material_name = #{materialName}, + material_sum = #{materialSum}, + enterprise_sum = #{enterpriseSum}, + out_order_sum = #{outOrderSum}, + out_order_name = #{outOrderName}, + out_order_time = #{outOrderTime}, + supplier_code = #{supplierCode}, + supplier_name = #{supplierName}, + customer_id = #{customerId}, + customer_name = #{customerName}, + plan_delivery_time = #{planDeliveryTime}, + delivery_date = #{deliveryDate}, + delivery_condition = #{deliveryCondition}, + apply_name = #{applyName}, + delivery_address = #{deliveryAddress}, + delivery_name = #{deliveryName}, + delivery_number = #{deliveryNumber}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where out_order_code = #{outOrderCode} + + + delete from aftersales_out_order where out_order_id = #{outOrderId} diff --git a/ruoyi-admin/src/main/resources/mapper/sales/SalesAftersalesNoticeMapper.xml b/ruoyi-admin/src/main/resources/mapper/sales/SalesAftersalesNoticeMapper.xml index 3e297514..593e04ba 100644 --- a/ruoyi-admin/src/main/resources/mapper/sales/SalesAftersalesNoticeMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/sales/SalesAftersalesNoticeMapper.xml @@ -45,14 +45,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  • - +
  • @@ -261,17 +261,18 @@ var todoUserIdList = row.todoUserId.split(","); if(todoUserIdList.includes(loginName) || loginName == 'admin'){ var nodeName = row.taskName=='驳回调整'?' 调整申请':' 审批'; - actions.push(' '+nodeName+' '); + actions.push(' '+nodeName+' '); } } // 审批历史 - actions.push(' 审批历史 '); + actions.push(' 审批历史 '); // 进度查看 - actions.push(' 进度查看 '); + actions.push(' 进度查看 '); } // 详情 - actions.push('详情 '); - return actions.join(''); + actions.push('详情 '); + var actionLinks = actions.join(''); + return $.table.dropdownToggle(actionLinks); } }] }; diff --git a/ruoyi-admin/src/main/resources/templates/system/requisitioning/requisitioning.html b/ruoyi-admin/src/main/resources/templates/system/requisitioning/requisitioning.html index 04c1d4f1..3df6c9e1 100644 --- a/ruoyi-admin/src/main/resources/templates/system/requisitioning/requisitioning.html +++ b/ruoyi-admin/src/main/resources/templates/system/requisitioning/requisitioning.html @@ -211,9 +211,9 @@ actions.push(' 作废'); // 已作废 } - else{ - actions.push(' 编辑 '); - } + // else{ + // actions.push(' 编辑 '); + // } // if(row.auditStatus == "2" && row.useStatus == "1"){ // // 编辑 // actions.push(' 编辑 '); diff --git a/ruoyi-admin/src/main/resources/templates/system/salesShippingInform/cancelShipping.html b/ruoyi-admin/src/main/resources/templates/system/salesShippingInform/cancelShipping.html index 03eee16b..78d2b43c 100644 --- a/ruoyi-admin/src/main/resources/templates/system/salesShippingInform/cancelShipping.html +++ b/ruoyi-admin/src/main/resources/templates/system/salesShippingInform/cancelShipping.html @@ -6,12 +6,12 @@
    -
    +
    - +
    - +
    @@ -20,13 +20,13 @@