From 48bb1cfb3ea60090d1b0110e02e22ec24dc7287e Mon Sep 17 00:00:00 2001 From: zhangsiqi <2825463979@qq.com> Date: Fri, 14 Jun 2024 13:50:38 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=E7=94=9F=E4=BA=A7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=EF=BC=9A=E7=94=9F=E6=88=90=E8=AE=A2=E5=8D=95=E5=85=B3=E8=81=94?= =?UTF-8?q?=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95=EF=BC=8C=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E4=BF=A1=E6=81=AF=EF=BC=8C=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E9=A1=B5=E9=9D=A2=E4=BF=AE=E6=94=B9=E9=94=80?= =?UTF-8?q?=E5=94=AE=E8=AE=A2=E5=8D=95=E7=B1=BB=E5=9E=8B=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/SysMakeOrderController.java | 56 ++++++++++++++++++- .../mapper/system/SysMakeOrderMapper.xml | 8 ++- .../templates/system/customerQuote/add.html | 3 +- .../system/makeorder/addProcessInbound.html | 2 - .../system/makeorder/addProduceInbound.html | 2 +- .../templates/system/makeorder/addpick.html | 2 +- .../templates/system/makeorder/bmps.html | 2 +- .../templates/system/makeorder/bmzgqr.html | 36 ++++++------ .../templates/system/makeorder/gcsh.html | 2 +- .../templates/system/makeorder/makeorder.html | 9 ++- 10 files changed, 94 insertions(+), 28 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMakeOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMakeOrderController.java index 2a1aabbb..c15c513f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMakeOrderController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMakeOrderController.java @@ -77,6 +77,14 @@ public class SysMakeOrderController extends BaseController public String bmps(@PathVariable("id") Long id, ModelMap mmap) { SysMakeOrder sysMakeOrder = sysMakeOrderService.selectSysMakeOrderById(id); + SysSalesOrder sysSalesOrder = salesOrderService.selectSysSalesOrderBySalesOrderCode(sysMakeOrder.getSaleNo()); + if(StringUtils.isNotNull(sysSalesOrder)){ + sysMakeOrder.setOrderType(sysSalesOrder.getSalesOrderType()); + sysMakeOrder.setSalesman(sysSalesOrder.getBusinessMembers()); + sysMakeOrder.setCustomerName(sysSalesOrder.getEnterpriseName()); + sysMakeOrder.setCustomerId(sysSalesOrder.getEnterpriseCode()); + sysMakeOrder.setCustomerOderCode(sysSalesOrder.getSalesOrderNumber()); + } mmap.put("sysMakeOrder", sysMakeOrder); return prefix + "/bmps"; } @@ -89,6 +97,14 @@ public class SysMakeOrderController extends BaseController { mmap.put("currentUser", ShiroUtils.getSysUser()); SysMakeOrder sysMakeOrder = sysMakeOrderService.selectSysMakeOrderById(id); + SysSalesOrder sysSalesOrder = salesOrderService.selectSysSalesOrderBySalesOrderCode(sysMakeOrder.getSaleNo()); + if(StringUtils.isNotNull(sysSalesOrder)){ + sysMakeOrder.setOrderType(sysSalesOrder.getSalesOrderType()); + sysMakeOrder.setSalesman(sysSalesOrder.getBusinessMembers()); + sysMakeOrder.setCustomerName(sysSalesOrder.getEnterpriseName()); + sysMakeOrder.setCustomerId(sysSalesOrder.getEnterpriseCode()); + sysMakeOrder.setCustomerOderCode(sysSalesOrder.getSalesOrderNumber()); + } mmap.put("sysMakeOrder", sysMakeOrder); return prefix + "/bmzgqr"; } @@ -101,6 +117,14 @@ public class SysMakeOrderController extends BaseController { mmap.put("currentUser", ShiroUtils.getSysUser()); SysMakeOrder sysMakeOrder = sysMakeOrderService.selectSysMakeOrderById(id); + SysSalesOrder sysSalesOrder = salesOrderService.selectSysSalesOrderBySalesOrderCode(sysMakeOrder.getSaleNo()); + if(StringUtils.isNotNull(sysSalesOrder)){ + sysMakeOrder.setOrderType(sysSalesOrder.getSalesOrderType()); + sysMakeOrder.setSalesman(sysSalesOrder.getBusinessMembers()); + sysMakeOrder.setCustomerName(sysSalesOrder.getEnterpriseName()); + sysMakeOrder.setCustomerId(sysSalesOrder.getEnterpriseCode()); + sysMakeOrder.setCustomerOderCode(sysSalesOrder.getSalesOrderNumber()); + } mmap.put("sysMakeOrder", sysMakeOrder); return prefix + "/gcsh"; } @@ -116,6 +140,10 @@ public class SysMakeOrderController extends BaseController SysSalesOrder sysSalesOrder = salesOrderService.selectSysSalesOrderBySalesOrderCode(sysMakeOrder.getSaleNo()); if(StringUtils.isNotNull(sysSalesOrder)){ sysMakeOrder.setOrderType(sysSalesOrder.getSalesOrderType()); + sysMakeOrder.setSalesman(sysSalesOrder.getBusinessMembers()); + sysMakeOrder.setCustomerName(sysSalesOrder.getEnterpriseName()); + sysMakeOrder.setCustomerId(sysSalesOrder.getEnterpriseCode()); + sysMakeOrder.setCustomerOderCode(sysSalesOrder.getSalesOrderNumber()); } mmap.put("sysMakeOrder", sysMakeOrder); return prefix + "/addPick"; @@ -132,6 +160,10 @@ public class SysMakeOrderController extends BaseController SysSalesOrder sysSalesOrder = salesOrderService.selectSysSalesOrderBySalesOrderCode(sysMakeOrder.getSaleNo()); if(StringUtils.isNotNull(sysSalesOrder)){ sysMakeOrder.setOrderType(sysSalesOrder.getSalesOrderType()); + sysMakeOrder.setSalesman(sysSalesOrder.getBusinessMembers()); + sysMakeOrder.setCustomerName(sysSalesOrder.getEnterpriseName()); + sysMakeOrder.setCustomerId(sysSalesOrder.getEnterpriseCode()); + sysMakeOrder.setCustomerOderCode(sysSalesOrder.getSalesOrderNumber()); } mmap.put("sysMakeOrder", sysMakeOrder); return prefix + "/addProcessInbound"; @@ -145,6 +177,14 @@ public class SysMakeOrderController extends BaseController { mmap.put("currentUser", ShiroUtils.getSysUser()); SysMakeOrder sysMakeOrder = sysMakeOrderService.selectSysMakeOrderById(id); + SysSalesOrder sysSalesOrder = salesOrderService.selectSysSalesOrderBySalesOrderCode(sysMakeOrder.getSaleNo()); + if(StringUtils.isNotNull(sysSalesOrder)){ + sysMakeOrder.setOrderType(sysSalesOrder.getSalesOrderType()); + sysMakeOrder.setSalesman(sysSalesOrder.getBusinessMembers()); + sysMakeOrder.setCustomerName(sysSalesOrder.getEnterpriseName()); + sysMakeOrder.setCustomerId(sysSalesOrder.getEnterpriseCode()); + sysMakeOrder.setCustomerOderCode(sysSalesOrder.getSalesOrderNumber()); + } mmap.put("sysMakeOrder", sysMakeOrder); return prefix + "/addProduceInbound"; } @@ -220,13 +260,27 @@ public class SysMakeOrderController extends BaseController @RequiresPermissions("system:makeorder:list") @PostMapping("/list") @ResponseBody - public TableDataInfo list(SysMakeOrder sysMakeOrder) + public TableDataInfo list(SysMakeOrder sysMakeOrder) throws RuntimeException,NumberFormatException { SysUser sysUser = ShiroUtils.getSysUser(); String deptNumber = sysUser.getDept().getDeptNumber(); sysMakeOrder.setDeptNumber(deptNumber); startPage(); List list = sysMakeOrderService.selectSysMakeOrderList(sysMakeOrder); + for(SysMakeOrder makeOrder:list){ + if(StringUtils.isNotNull(makeOrder.getSaleNo())){ + SysSalesOrder sysSalesOrder = salesOrderService.selectSysSalesOrderBySalesOrderCode(makeOrder.getSaleNo()); + if(StringUtils.isNotNull(sysSalesOrder)){ + makeOrder.setOrderType(sysSalesOrder.getSalesOrderType()); + makeOrder.setSalesman(sysSalesOrder.getBusinessMembers()); + makeOrder.setCustomerName(sysSalesOrder.getEnterpriseName()); + makeOrder.setCustomerId(sysSalesOrder.getEnterpriseCode()); + makeOrder.setCustomerOderCode(sysSalesOrder.getSalesOrderNumber()); + makeOrder.setMaterial(String.valueOf(sysSalesOrder.getMaterialSum())); + makeOrder.setMaterialSum(sysSalesOrder.getEnterpriseSum()); + } + } + } return getDataTable(list); } diff --git a/ruoyi-admin/src/main/resources/mapper/system/SysMakeOrderMapper.xml b/ruoyi-admin/src/main/resources/mapper/system/SysMakeOrderMapper.xml index 489cd7f7..f982a194 100644 --- a/ruoyi-admin/src/main/resources/mapper/system/SysMakeOrderMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/system/SysMakeOrderMapper.xml @@ -13,6 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -41,7 +42,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + diff --git a/ruoyi-admin/src/main/resources/templates/system/makeorder/makeorder.html b/ruoyi-admin/src/main/resources/templates/system/makeorder/makeorder.html index 39ab1bad..aa622b12 100644 --- a/ruoyi-admin/src/main/resources/templates/system/makeorder/makeorder.html +++ b/ruoyi-admin/src/main/resources/templates/system/makeorder/makeorder.html @@ -107,7 +107,7 @@ var qualityStatusDatas = [[${@dict.getType('qualityStatus')}]]; var useStatusDatas = [[${@dict.getType('useStatus')}]]; var prefix = ctx + "system/makeorder"; - + var orderTypeDatas = [[${@dict.getType('sys_order_type')}]]; $(function() { var options = { url: prefix + "/list", @@ -167,6 +167,13 @@ { field: 'Salesman', title: '业务员' + }, + { + field: 'orderType', + title: '订单类型', + formatter: function(value, row, index) { + return $.table.selectDictLabel(orderTypeDatas, value); + } }, { field: 'customerId',