From 16f7aa60e7eeec0d67ebd1460f88157cc2edd04c Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Mon, 8 Jul 2024 08:20:30 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=20=E5=93=81=E8=B4=A8=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?=E7=94=9F=E4=BA=A7=E7=AE=A1=E7=90=86=20=E6=96=B0=E5=A2=9E=20?= =?UTF-8?q?=E5=A7=94=E5=86=85=E5=85=A5=E5=BA=93=E5=8D=95=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=20=E6=96=B0=E5=A2=9E=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E5=A7=94=E5=86=85=E5=85=A5=E5=BA=93=E5=8D=95?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E6=8E=A5=E5=8F=A3=20=E6=96=B0=E5=A2=9E=20?= =?UTF-8?q?=E5=93=81=E8=B4=A8=E5=8D=95=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=85=A5=E5=BA=93=E7=B1=BB=E5=9E=8B=E4=B8=BA?= =?UTF-8?q?=E5=A7=94=E5=86=85=E5=92=8C=E7=94=9F=E4=BA=A7=E7=9A=84=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=20=E5=A7=94=E5=86=85=E5=85=A5=E5=BA=93=E5=8D=95?= =?UTF-8?q?=E5=92=8C=E7=94=9F=E4=BA=A7=E8=AE=A2=E5=8D=95=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=AF=B9=E5=A7=94=E5=86=85=E5=8A=A0=E5=B7=A5?= =?UTF-8?q?=E8=B4=B9=E6=80=BB=E4=BB=B7=E8=BF=9B=E8=A1=8C=E5=90=88=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ErpInboundOrderController.java | 106 +++++---- .../quality/mapper/QualityOrderMapper.java | 4 + .../quality/service/IQualityOrderService.java | 5 + .../service/impl/QualityOrderServiceImpl.java | 10 + .../mapper/quality/QualityOrderMapper.xml | 39 ++++ .../erp/inboundOrder/inboundOrder.html | 56 ++++- .../erp/inboundOrder/inboundOrderDetail.html | 207 ++++++++++++++++++ 7 files changed, 367 insertions(+), 60 deletions(-) create mode 100644 ruoyi-admin/src/main/resources/templates/erp/inboundOrder/inboundOrderDetail.html diff --git a/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpInboundOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpInboundOrderController.java index 2b139df8..21ed7e6a 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpInboundOrderController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpInboundOrderController.java @@ -62,9 +62,8 @@ public class ErpInboundOrderController extends BaseController public TableDataInfo list(QualityOrder qualityOrder) { startPage(); - List list = qualityOrderService.selectQualityOrderList(qualityOrder); - List qualityOrderList = list.stream().filter(q -> q.getQualityStorageStatus().equals("1") || q.getQualityStorageStatus().equals("4")).collect(Collectors.toList()); - return getDataTable(qualityOrderList); + List list = qualityOrderService.selectAllMakeQualityOrderList(qualityOrder); + return getDataTable(list); } /** @@ -76,10 +75,9 @@ public class ErpInboundOrderController extends BaseController @ResponseBody public AjaxResult export(QualityOrder qualityOrder) { - List list = qualityOrderService.selectQualityOrderList(qualityOrder); + List list = qualityOrderService.selectAllMakeQualityOrderList(qualityOrder); ExcelUtil util = new ExcelUtil(QualityOrder.class); - List qualityOrderList = list.stream().filter(q -> q.getQualityStorageStatus().equals("1") || q.getQualityStorageStatus().equals("4")).collect(Collectors.toList()); - return util.exportExcel(qualityOrderList, "入库单数据"); + return util.exportExcel(list, "入库单数据"); } /** @@ -127,55 +125,67 @@ public class ErpInboundOrderController extends BaseController } -// /** -// * 委内入库单详情页面 -// */ -// @GetMapping("/detail/{qualityOrderId}") -// public String detail(@PathVariable("qualityOrderId") Long qualityOrderId, ModelMap mmap) -// { -// QualityOrder qualityOrder = qualityOrderService.selectQualityOrderById(qualityOrderId); -// mmap.put("qualityOrder", qualityOrder); -// return prefix + "/edit"; -// } - - - @GetMapping("/detail/{id}") - public String detail(@PathVariable("id") Long id, ModelMap mmap) + /** + * 委内入库单详情页面 + */ + @GetMapping("/inboundOrderDetail/{qualityOrderId}") + public String inboundOrderDetail(@PathVariable("qualityOrderId") Long qualityOrderId, ModelMap mmap) { - mmap.put("currentUser", ShiroUtils.getSysUser()); - ErpInboundOrder erpInboundOrder = erpInboundOrderService.selectErpInboundOrderById(id); - String inboundType = erpInboundOrder.getInboundType(); - mmap.put("erpInboundOrder", erpInboundOrder); - // 生产入库 - if("0".equals(inboundType)){ - return prefix + "/produceInboundDetail"; - } - // 委内入库 - else if("1".equals(inboundType)){ - return prefix + "/processInboundDetail"; - } - return ""; + QualityOrder qualityOrder = qualityOrderService.selectQualityOrderById(qualityOrderId); + mmap.put("qualityOrder", qualityOrder); + return prefix + "/inboundOrderDetail"; } - @GetMapping("/detailEquipmentResume") - public String detailEquipmentResume(@RequestParam("curIndex")Integer curIndex - ,@RequestParam("makeNo")String makeNo - ,@RequestParam("saleNo")String saleNo - ,@RequestParam("materialNo")String materialNo - ,@RequestParam("inboundOrderNo")String inboundOrderNo, ModelMap mmap) + + + /** + * 委内入库单详情页面 + */ + @ResponseBody + @GetMapping("/inboundOrderDetail") + public AjaxResult inboundOrderDetailSave(QualityOrder qualityOrder) { - SysEquipMaterialDto equipMaterialDto = new SysEquipMaterialDto(); - mmap.put("currentUser", ShiroUtils.getSysUser()); - SysSalesOrderChild salesOrderChild = salesOrderChildService.selectOneByQuoteIdAndMaterialCode(saleNo, materialNo); - BeanUtils.copyProperties(salesOrderChild,equipMaterialDto); - equipMaterialDto.setMakeNo(makeNo); - equipMaterialDto.setCurIndex(curIndex); - equipMaterialDto.setInboundOrderNo(inboundOrderNo); - mmap.put("equipMaterial", equipMaterialDto); - return prefix + "/equipmentResumeDetail"; + return toAjax(qualityOrderService.qualityOrderDetailSave(qualityOrder)); } +// @GetMapping("/detail/{id}") +// public String detail(@PathVariable("id") Long id, ModelMap mmap) +// { +// mmap.put("currentUser", ShiroUtils.getSysUser()); +// ErpInboundOrder erpInboundOrder = erpInboundOrderService.selectErpInboundOrderById(id); +// String inboundType = erpInboundOrder.getInboundType(); +// mmap.put("erpInboundOrder", erpInboundOrder); +// // 生产入库 +// if("0".equals(inboundType)){ +// return prefix + "/produceInboundDetail"; +// } +// // 委内入库 +// else if("1".equals(inboundType)){ +// return prefix + "/processInboundDetail"; +// } +// return ""; +// } +// +// @GetMapping("/detailEquipmentResume") +// public String detailEquipmentResume(@RequestParam("curIndex")Integer curIndex +// ,@RequestParam("makeNo")String makeNo +// ,@RequestParam("saleNo")String saleNo +// ,@RequestParam("materialNo")String materialNo +// ,@RequestParam("inboundOrderNo")String inboundOrderNo, ModelMap mmap) +// { +// SysEquipMaterialDto equipMaterialDto = new SysEquipMaterialDto(); +// mmap.put("currentUser", ShiroUtils.getSysUser()); +// SysSalesOrderChild salesOrderChild = salesOrderChildService.selectOneByQuoteIdAndMaterialCode(saleNo, materialNo); +// BeanUtils.copyProperties(salesOrderChild,equipMaterialDto); +// equipMaterialDto.setMakeNo(makeNo); +// equipMaterialDto.setCurIndex(curIndex); +// equipMaterialDto.setInboundOrderNo(inboundOrderNo); +// mmap.put("equipMaterial", equipMaterialDto); +// return prefix + "/equipmentResumeDetail"; +// } + + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityOrderMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityOrderMapper.java index b15cb088..c918a90c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityOrderMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/mapper/QualityOrderMapper.java @@ -85,4 +85,8 @@ public interface QualityOrderMapper */ public QualityOrder selectQualityOrderByCode(String qualityOrderCode); + /** + * 生产入库和委内入库相关品质单数据 + * */ + List selectAllMakeQualityOrderList(QualityOrder qualityOrder); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityOrderService.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityOrderService.java index 2388ccb4..083603e6 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityOrderService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/IQualityOrderService.java @@ -96,4 +96,9 @@ public interface IQualityOrderService * 品质单详情通用保存方法 * */ int qualityOrderDetailSave(QualityOrder qualityOrder); + + /** + * 生产入库和委内入库相关品质单数据 + * */ + List selectAllMakeQualityOrderList(QualityOrder qualityOrder); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityOrderServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityOrderServiceImpl.java index 40bf8c58..3660684f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityOrderServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/service/impl/QualityOrderServiceImpl.java @@ -413,6 +413,7 @@ public class QualityOrderServiceImpl implements IQualityOrderService tempQualityOrder.setQualityUnqualifiedNum(qualityUnqualifiedNumSum); tempQualityOrder.setThisArrivedNum(thisArrivedNumSum); + //数据生成到入库单中,后续进行入库操作 int updateStorageOrderResult = warehouseStorageOrderService.insertWarehouseStorageOrderByMakeInQualityOrder(tempQualityOrder, qualityOrderDetailList); if (updateStorageOrderResult <= 0){ @@ -449,6 +450,15 @@ public class QualityOrderServiceImpl implements IQualityOrderService return 1; } + /** + * 生产入库和委内入库相关品质单数据 + * */ + @Override + public List selectAllMakeQualityOrderList(QualityOrder qualityOrder) { + + return qualityOrderMapper.selectAllMakeQualityOrderList(qualityOrder); + } + //品质单不合格分类表 private void insertQualityOrderUnqualifiedByWarehouseStorageOrder(WarehouseStorageOrderDetail warehouseStorageOrderDetail) { QualityOrderReportUnqualified qualityOrderReportUnqualified = new QualityOrderReportUnqualified(); diff --git a/ruoyi-admin/src/main/resources/mapper/quality/QualityOrderMapper.xml b/ruoyi-admin/src/main/resources/mapper/quality/QualityOrderMapper.xml index 3ebdf1d7..b69ad95c 100644 --- a/ruoyi-admin/src/main/resources/mapper/quality/QualityOrderMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/quality/QualityOrderMapper.xml @@ -76,6 +76,45 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + insert into quality_order diff --git a/ruoyi-admin/src/main/resources/templates/erp/inboundOrder/inboundOrder.html b/ruoyi-admin/src/main/resources/templates/erp/inboundOrder/inboundOrder.html index 32a8e759..c272a366 100644 --- a/ruoyi-admin/src/main/resources/templates/erp/inboundOrder/inboundOrder.html +++ b/ruoyi-admin/src/main/resources/templates/erp/inboundOrder/inboundOrder.html @@ -83,6 +83,7 @@ restoreUrl: prefix + "/restore/{id}", exportUrl: prefix + "/export", modalName: "入库单", + showFooter: true, columns: [ {checkbox: true}, { @@ -125,9 +126,34 @@ } }, { - title: '本次到货数量', - field: 'thisArrivedNum', + title: '委内加工费总价', + field: 'makeInTotalPrice', + footerFormatter: function (value) { + const total = value.reduce((accumulator, currentValue) => { + // 直接访问makeInTotalPrice,如果它是null或undefined,则使用0 + const makeInTotalPrice = currentValue.makeInTotalPrice || 0; + return accumulator + parseFloat(makeInTotalPrice); + }, 0); + return total; + } }, + + + // { + // field: 'entrysalary', + // title: '入职薪资', + // sortable: true, + // footerFormatter: function (value) { + // var count = 0; + // console.log(value); + // for (var i=0; i详情 '); + actions.push('详情 '); return actions.join(''); } } @@ -173,9 +205,9 @@ //详情 - function detail(qualityOrderId){ - var url = prefix +'/detail/' + qualityOrderId; - $.modal.open("品质单详情",url) + function inboundOrderDetail(qualityOrderId){ + var url = prefix +'/inboundOrderDetail/' + qualityOrderId; + $.modal.open("委内入库单详情",url) } diff --git a/ruoyi-admin/src/main/resources/templates/erp/inboundOrder/inboundOrderDetail.html b/ruoyi-admin/src/main/resources/templates/erp/inboundOrder/inboundOrderDetail.html new file mode 100644 index 00000000..f26a257f --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/erp/inboundOrder/inboundOrderDetail.html @@ -0,0 +1,207 @@ + + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+
+
+
+
+
+
+
+ + + + + + + \ No newline at end of file