From cda92cb47ccce5aea9b2511a11cb87c749b589e8 Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Mon, 8 Jul 2024 20:10:24 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=20=E7=94=9F=E4=BA=A7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=20=E5=93=81=E8=B4=A8=E7=AE=A1=E7=90=86=20=E4=BB=93=E5=BA=93?= =?UTF-8?q?=E7=AE=A1=E7=90=86=20=E6=96=B0=E5=A2=9E=20=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E5=93=81=E8=B4=A8=E5=8D=95=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=E9=A1=B5=E9=9D=A2=20=E6=96=B0=E5=A2=9E=20?= =?UTF-8?q?=E7=94=9F=E4=BA=A7=E5=85=A5=E5=BA=93=E5=93=81=E8=B4=A8=E5=8D=95?= =?UTF-8?q?=E6=8A=A5=E5=91=8A=E5=89=8D=E7=AB=AF=E9=A1=B5=E9=9D=A2=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=20=E7=94=9F=E4=BA=A7=E5=85=A5=E5=BA=93?= =?UTF-8?q?=E5=93=81=E8=B4=A8=E5=8D=95=E5=93=81=E8=B4=A8=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E6=8C=89=E7=85=A7=E4=B8=80=E5=AE=9A=E6=9D=A1=E4=BB=B6=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E6=98=BE=E7=A4=BA=20=E6=96=B0=E5=A2=9E=20=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E5=85=A5=E5=BA=93=E5=93=81=E8=B4=A8=E5=8D=95=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E6=8C=89=E9=92=AE=E6=8C=89=E7=85=A7=E4=B8=80=E5=AE=9A?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E8=BF=9B=E8=A1=8C=E6=98=BE=E7=A4=BA=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BF=AE=E6=94=B9=E4=BF=9D=E5=AD=98=20?= =?UTF-8?q?=E7=94=9F=E4=BA=A7=E5=85=A5=E5=BA=93=E5=93=81=E8=B4=A8=E5=8D=95?= =?UTF-8?q?=E5=93=81=E8=B4=A8=E5=90=8E=E7=AB=AF=E6=8E=A5=E5=8F=A3=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BF=AE=E6=94=B9=E4=BF=9D=E5=AD=98=20?= =?UTF-8?q?=E7=94=9F=E4=BA=A7=E5=85=A5=E5=BA=93=E5=93=81=E8=B4=A8=E5=8D=95?= =?UTF-8?q?=E5=93=81=E8=B4=A8=E6=8A=A5=E5=91=8A=E5=90=8E=E7=AB=AF=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=20=E6=96=B0=E5=A2=9E=20=E5=93=81=E8=B4=A8=E5=8D=95?= =?UTF-8?q?=E5=93=81=E8=B4=A8=E5=90=8E=E7=94=9F=E4=BA=A7=E4=BB=93=E5=BA=93?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E5=8D=95=E5=90=8E=E7=AB=AF=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=20=E6=96=B0=E5=A2=9E=20=E7=94=9F=E4=BA=A7=E5=85=A5=E5=BA=93?= =?UTF-8?q?=E6=97=B6=E6=9B=B4=E6=96=B0=E7=94=9F=E4=BA=A7=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E6=9C=AC=E6=AC=A1=E5=B7=B2=E5=AE=8C=E6=88=90=E6=95=B0=E5=90=8E?= =?UTF-8?q?=E7=AB=AF=E6=8E=A5=E5=8F=A3=20=E5=8E=BB=E6=8E=89=E5=A7=94?= =?UTF-8?q?=E5=86=85=E5=85=A5=E5=BA=93=E6=96=B0=E5=A2=9E=E5=93=81=E8=B4=A8?= =?UTF-8?q?=E4=B8=8D=E5=90=88=E6=A0=BC=E5=88=86=E7=B1=BB=20=E5=8E=BB?= =?UTF-8?q?=E6=8E=89=E8=87=B3=E5=B0=91=E6=B7=BB=E5=8A=A0=E4=B8=80=E6=9D=A1?= =?UTF-8?q?=E4=B8=8D=E5=90=88=E6=A0=BC=E6=95=B0=E7=9A=84=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=20=E5=8E=BB=E6=8E=89=E7=94=9F=E4=BA=A7=E5=85=A5=E5=BA=93?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=93=81=E8=B4=A8=E4=B8=8D=E5=90=88=E6=A0=BC?= =?UTF-8?q?=E5=88=86=E7=B1=BB=20=E5=8E=BB=E6=8E=89=E8=87=B3=E5=B0=91?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=80=E6=9D=A1=E4=B8=8D=E5=90=88=E6=A0=BC?= =?UTF-8?q?=E6=95=B0=E7=9A=84=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/QualityOrderController.java | 78 ++++- .../quality/service/IQualityOrderService.java | 7 +- .../service/impl/QualityOrderServiceImpl.java | 118 +++++++ .../service/impl/SysMakeOrderServiceImpl.java | 8 + .../IWarehouseStorageOrderService.java | 5 + .../WarehouseStorageOrderServiceImpl.java | 56 ++++ .../qualityOrder/makeInOrderReport.html | 8 +- .../makeInStartingQualityDetail.html | 2 +- .../quality/qualityOrder/makeOrderReport.html | 311 ++++++++++++++++++ .../qualityOrder/makeStartingQuality.html | 255 ++++++++++++++ .../quality/qualityOrder/qualityOrder.html | 25 ++ 11 files changed, 864 insertions(+), 9 deletions(-) create mode 100644 ruoyi-admin/src/main/resources/templates/quality/qualityOrder/makeOrderReport.html create mode 100644 ruoyi-admin/src/main/resources/templates/quality/qualityOrder/makeStartingQuality.html diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityOrderController.java index d77b37b4..ddc0b264 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityOrderController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/controller/QualityOrderController.java @@ -265,7 +265,7 @@ public class QualityOrderController extends BaseController /** - * 委内加工品质单开始品质 物料相关信息 + * 委内加工品质单开始品质 物料相关信息 (生产订单也适用) */ @PostMapping("/getMaterialListByQualityOrderCode") @ResponseBody @@ -303,4 +303,80 @@ public class QualityOrderController extends BaseController } + /*1111111111*/ + /** + * 生产入库品质单开始品质 + */ + @GetMapping("/makeStartingQuality/{qualityOrderId}") + public String makeStartingQuality(@PathVariable("qualityOrderId") Long qualityOrderId, ModelMap mmap) + { + QualityOrder qualityOrder = qualityOrderService.selectQualityOrderById(qualityOrderId); + mmap.put("qualityOrder", qualityOrder); + return prefix + "/makeStartingQuality"; + } + + /** + * 修改保存生产入库品质单开始品质 + */ + @RequiresPermissions("quality:qualityOrder:makeStartingQuality") + @Log(title = "品质管理品质单", businessType = BusinessType.UPDATE) + @PostMapping("/makeStartingQuality") + @ResponseBody + public AjaxResult makeStartingQualitySave(@RequestBody QualityOrder qualityOrder) + { + return toAjax(qualityOrderService.updateMakeStartingQuality(qualityOrder)); + } + + + + /** + * 生产入库品质单开始品质列表详情接口 + */ + @GetMapping("/makeStartingQualityDetail/{qualityOrderId}") + public String makeStartingQualityDetail(@PathVariable("qualityOrderId") Long qualityOrderId, ModelMap mmap) + { + QualityOrder qualityOrder = qualityOrderService.selectQualityOrderById(qualityOrderId); + mmap.put("qualityOrder", qualityOrder); + return prefix + "/makeInStartingQualityDetail"; + } + + /** + * 修改保存生产入库品质单开始品质详情 + */ + @RequiresPermissions("quality:qualityOrder:makeStartingQualityDetail") + @Log(title = "品质管理品质单", businessType = BusinessType.UPDATE) + @PostMapping("/makeStartingQualityDetail") + @ResponseBody + public AjaxResult makeStartingQualityDetailSave(QualityOrder qualityOrder) + { + return toAjax(qualityOrderService.qualityOrderDetailSave(qualityOrder)); + } + + + + /** + * 修改委生产入库品质报告按钮 + */ + @GetMapping("/makeOrderReport") + public String makeOrderReport( @RequestParam("materialNo") String materialNo, + @RequestParam("qualityOrderCode") String qualityOrderCode, + ModelMap mmap) + { + QualityOrderReport qualityOrderReport = orderReportService.selectMakeInOrderReportByNoAndCode(materialNo,qualityOrderCode); + mmap.put("qualityOrderReport", qualityOrderReport); + mmap.put("qualityOrderCode",qualityOrderCode); + return prefix + "/makeOrderReport"; + } + + /** + * 修改保存生产入库品质报告按钮 + */ + @Log(title = "品质管理品质单", businessType = BusinessType.UPDATE) + @PostMapping("/makeOrderReport") + @ResponseBody + public AjaxResult makeOrderReportSave(@RequestBody QualityOrderReport qualityOrderReport) + { + return toAjax(orderReportService.updateMakeInOrderReport(qualityOrderReport)); + } + } 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 083603e6..dfa0fa4f 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 @@ -78,7 +78,7 @@ public interface IQualityOrderService int restoreQualityOrderById(Long qualityOrderId); /* - * + * 仓库->品质 * */ void insertQualityOrderByWarehouseStorageOrder(WarehouseStorageOrder warehouseStorageOrder, List warehouseStorageOrderDetailList); @@ -101,4 +101,9 @@ public interface IQualityOrderService * 生产入库和委内入库相关品质单数据 * */ List selectAllMakeQualityOrderList(QualityOrder qualityOrder); + + /** + * 修改保存生产入库品质单开始品质 + */ + int updateMakeStartingQuality(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 410a2932..bcb3eec9 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 @@ -460,6 +460,124 @@ public class QualityOrderServiceImpl implements IQualityOrderService return qualityOrderMapper.selectAllMakeQualityOrderList(qualityOrder); } + /** + * 修改保存生产入库品质单开始品质 + */ + @Override + public int updateMakeStartingQuality(QualityOrder qualityOrder) { + + String loginName = ShiroUtils.getLoginName(); + qualityOrder.setUpdateBy(loginName); + qualityOrder.setUpdateTime(new Date()); + qualityOrder.setQualityEmployee(loginName); + //生成入库单号 + String warehouseStorageCode = redisCache.generateBillNo("RK"); + qualityOrder.setInStorageCode(warehouseStorageCode); + List qualityOrderDetailList = qualityOrder.getQualityOrderDetailList(); + + if (CollectionUtils.isEmpty(qualityOrderDetailList)){ + throw new BusinessException("品质单详情数据为空"); + } + + for (QualityOrderDetail qualityOrderDetail : qualityOrderDetailList) { + qualityOrderDetail.setUpdateBy(loginName); + qualityOrderDetail.setUpdateTime(new Date()); + Long qualityOrderDetailId = qualityOrderDetail.getQualityOrderDetailId(); + QualityOrderDetail tempQualityOrderDetail = orderDetailMapper.selectQualityOrderDetailById(qualityOrderDetailId); + Integer qualifiedNum = tempQualityOrderDetail.getQualityQualifiedNum(); + Integer unqualifiedNum = tempQualityOrderDetail.getQualityUnqualifiedNum(); + if (qualifiedNum == null || unqualifiedNum == null){ + throw new BusinessException("请先进行品质报告操作"); + } + //更新品质单详情数据 + int updateQualityOrderDetailResult = orderDetailMapper.updateQualityOrderDetail(qualityOrderDetail); + if (updateQualityOrderDetailResult <= 0){ + throw new BusinessException("更新品质单详情数据失败"); + } + } + + + //根据品质单号从数据库查询 用于更新入库单 + QualityOrder tempQualityOrder = qualityOrderMapper.selectQualityOrderByCode(qualityOrder.getQualityOrderCode()); + tempQualityOrder.setWarehouseCode(warehouseStorageCode); + String qualityStatus = tempQualityOrder.getQualityStatus(); + String qualityStorageStatus = tempQualityOrder.getQualityStorageStatus(); + + Integer thisArrivedNumSum = 0; + Integer qualityQualifiedNumSum = 0; + Integer qualityUnqualifiedNumSum = 0; + +// 检查thisArrivedNum是否含有null值 + boolean hasThisArrivedNumNull = qualityOrderDetailList.stream() + .anyMatch(item -> item.getThisArrivedNum() == null); + +// 检查qualityQualifiedNum是否含有null值 + boolean hasQualityQualifiedNumNull = qualityOrderDetailList.stream() + .anyMatch(item -> item.getQualityQualifiedNum() == null); + +// 检查qualityUnqualifiedNum是否含有null值 + boolean hasQualityUnqualifiedNumNull = qualityOrderDetailList.stream() + .anyMatch(item -> item.getQualityUnqualifiedNum() == null); + + if (hasThisArrivedNumNull) { + throw new BusinessException("存在本次到货数为空,请检查!"); + } + if (hasQualityQualifiedNumNull) { + throw new BusinessException("存在品质已合格数为空,请检查!"); + } + if (hasQualityUnqualifiedNumNull) { + throw new BusinessException("存在品质不合格数为空,请检查!"); + } +// 计算各个字段的总和 + thisArrivedNumSum = qualityOrderDetailList.stream() + .mapToInt(QualityOrderDetail::getThisArrivedNum) + .sum(); + + qualityQualifiedNumSum = qualityOrderDetailList.stream() + .mapToInt(QualityOrderDetail::getQualityQualifiedNum) + .sum(); + + qualityUnqualifiedNumSum = qualityOrderDetailList.stream() + .mapToInt(QualityOrderDetail::getQualityUnqualifiedNum) + .sum(); + //插入主表中本次到货数 + qualityOrder.setThisArrivedNum(thisArrivedNumSum); + //插入主表中品质合格数 + qualityOrder.setQualityQualifiedNum(qualityQualifiedNumSum); + //插入主表中品质不合格数 + qualityOrder.setQualityUnqualifiedNum(qualityUnqualifiedNumSum); + +// if (thisArrivedNum == qualityQualifiedNum){ + //全部品质 + qualityOrder.setQualityStatus("2"); + tempQualityOrder.setQualityStatus("2"); +// }else { +// //部分品质 +// qualityOrder.setQualityStatus("1"); +// tempQualityOrder.setQualityStatus("1"); +// } + + + //如果品质时修改交检时间 + tempQualityOrder.setDeliveryInspectionTime(qualityOrder.getDeliveryInspectionTime()); + tempQualityOrder.setQualityQualifiedNum(qualityQualifiedNumSum); + tempQualityOrder.setQualityUnqualifiedNum(qualityUnqualifiedNumSum); + tempQualityOrder.setThisArrivedNum(thisArrivedNumSum); + + + //数据生成到入库单中,后续进行入库操作 + int updateStorageOrderResult = warehouseStorageOrderService.insertWarehouseStorageOrderByMakeQualityOrder(tempQualityOrder, qualityOrderDetailList); + if (updateStorageOrderResult <= 0){ + throw new BusinessException("更新入库单数据失败"); + } + + int updateResult = qualityOrderMapper.updateQualityOrder(qualityOrder); + if (updateResult <= 0){ + log.warn("更新品质单失败,未影响任何行"); + } + return updateResult; + } + //品质单不合格分类表 private void insertQualityOrderUnqualifiedByWarehouseStorageOrder(WarehouseStorageOrderDetail warehouseStorageOrderDetail) { QualityOrderReportUnqualified qualityOrderReportUnqualified = new QualityOrderReportUnqualified(); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysMakeOrderServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysMakeOrderServiceImpl.java index f78b04fc..6cfd4908 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysMakeOrderServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysMakeOrderServiceImpl.java @@ -439,6 +439,14 @@ public class SysMakeOrderServiceImpl implements ISysMakeOrderService erpInboundOrder.setCreateTime(DateUtils.getNowDate()); String qualityOrderCode = redisCache.generateBillNo("PZ"); QualityOrder qualityOrder = createQualityOrder(qualityOrderCode, erpInboundOrder, loginName); + //更新生产订单的本次完成数 + long finishNum = erpInboundOrder.getInboundDetails().stream().mapToLong(ErpInboundOrderDetail::getCurrentNum).sum(); + SysMakeOrder sysMakeOrder = sysMakeOrderMapper.selectMakeOrderByMakeNo(erpInboundOrder.getMakeNo()); + sysMakeOrder.setFinishNum(finishNum); + int updateSysMakeOrderResult = sysMakeOrderMapper.updateSysMakeOrder(sysMakeOrder); + if (updateSysMakeOrderResult <= 0){ + throw new BusinessException("更新生产订单失败"); + } Map materialInfoMap = fetchMaterialInfoMap(erpInboundOrder); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseStorageOrderService.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseStorageOrderService.java index 5f78b31d..6aaaec00 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseStorageOrderService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/IWarehouseStorageOrderService.java @@ -123,4 +123,9 @@ public interface IWarehouseStorageOrderService * 修改保存暂收-采购单(仓库入库) */ int updateTemporaryPurchaseWarehouse(WarehouseStorageOrder warehouseStorageOrder); + + /** + * 通过生产入库单品质后生成入库单 + * */ + int insertWarehouseStorageOrderByMakeQualityOrder(QualityOrder tempQualityOrder, List qualityOrderDetailList); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseStorageOrderServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseStorageOrderServiceImpl.java index 90b65d19..a26478ae 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseStorageOrderServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseStorageOrderServiceImpl.java @@ -577,6 +577,62 @@ public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderS } + /** + * 通过生产入库单品质后生成入库单 + * */ + @Override + public int insertWarehouseStorageOrderByMakeQualityOrder(QualityOrder tempQualityOrder, List qualityOrderDetailList) { + + WarehouseStorageOrder warehouseStorageOrder = new WarehouseStorageOrder(); + String loginName = ShiroUtils.getLoginName(); + + warehouseStorageOrder.setWarehouseStorageCode(tempQualityOrder.getWarehouseCode()); + warehouseStorageOrder.setRelatedOrderCode(tempQualityOrder.getRelatedOrderCode()); + //暂收设置为全部品质 + warehouseStorageOrder.setWarehouseQualityStatus("2"); + warehouseStorageOrder.setWarehouseStorageStatus("2"); + warehouseStorageOrder.setWarehouseStorageType("5"); + warehouseStorageOrder.setWarehouseOrderType("1"); + warehouseStorageOrder.setDeliveryInspectionTime(tempQualityOrder.getDeliveryInspectionTime()); + warehouseStorageOrder.setQualityUnqualifiedNum(tempQualityOrder.getQualityUnqualifiedNum()); + warehouseStorageOrder.setQualityQualifiedNum(tempQualityOrder.getQualityQualifiedNum()); + warehouseStorageOrder.setCreateBy(loginName); + warehouseStorageOrder.setQualityTime(new Date()); + warehouseStorageOrder.setCreateTime(new Date()); + //设置委内完成数总价 + warehouseStorageOrder.setMakeInTotalPrice(tempQualityOrder.getMakeInTotalPrice()); + //插入入库单详情数据 + for (QualityOrderDetail qualityOrderDetail : qualityOrderDetailList) { + + WarehouseStorageOrderDetail warehouseStorageOrderDetail = new WarehouseStorageOrderDetail(); + warehouseStorageOrderDetail.setWarehouseStorageCode(tempQualityOrder.getWarehouseCode()); + warehouseStorageOrderDetail.setRelatedOrderCode(tempQualityOrder.getRelatedOrderCode()); + warehouseStorageOrderDetail.setWarehouseQualityStatus("2"); + warehouseStorageOrderDetail.setWarehouseStorageStatus("2"); + warehouseStorageOrderDetail.setWarehouseStorageType("5"); + warehouseStorageOrderDetail.setWarehouseOrderType("1"); + //设置生产订单数 + warehouseStorageOrderDetail.setMakeTotal(qualityOrderDetail.getMakeTotal()); + //生产入库数 + warehouseStorageOrderDetail.setMakeStorageNum(qualityOrderDetail.getMakeCompletionNum()); + //设置品质已合格数 + warehouseStorageOrderDetail.setQualityHasQualifiedNum(qualityOrderDetail.getQualityHasqualifiedNum()); + warehouseStorageOrderDetail.setMaterialNo(qualityOrderDetail.getMaterialNo()); + warehouseStorageOrderDetail.setMaterialName(qualityOrderDetail.getMaterialName()); + warehouseStorageOrderDetail.setMaterialBrand(qualityOrderDetail.getMaterialBrand()); + warehouseStorageOrderDetail.setMaterialDescribe(qualityOrderDetail.getMaterialDescribe()); + warehouseStorageOrderDetail.setMaterialPhotourl(qualityOrderDetail.getMaterialPhotourl()); + warehouseStorageOrderDetail.setMaterialProcessMethod(qualityOrderDetail.getMaterialProcessMethod()); + warehouseStorageOrderDetail.setMaterialType(qualityOrderDetail.getMaterialType()); + warehouseStorageOrderDetail.setMaterialUnit(qualityOrderDetail.getMaterialUnit()); + warehouseStorageOrderDetail.setCreateBy(loginName); + warehouseStorageOrderDetail.setCreateTime(new Date()); + storageOrderDetailMapper.insertWarehouseStorageOrderDetail(warehouseStorageOrderDetail); + } + + return warehouseStorageOrderMapper.insertWarehouseStorageOrder(warehouseStorageOrder); + } + /** * 修改保存暂收-采购单(采购入库) 子表数据 * */ diff --git a/ruoyi-admin/src/main/resources/templates/quality/qualityOrder/makeInOrderReport.html b/ruoyi-admin/src/main/resources/templates/quality/qualityOrder/makeInOrderReport.html index c0ed25ac..9c4c2209 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/qualityOrder/makeInOrderReport.html +++ b/ruoyi-admin/src/main/resources/templates/quality/qualityOrder/makeInOrderReport.html @@ -1,7 +1,7 @@ - + @@ -119,11 +119,7 @@ }, {}); // 获取bootstrap-table的数据,这里假设你使用bootstrap-table的API获取所有数据 var table = $('#bootstrap-unqualified-table').bootstrapTable('getData'); - // 检查表格数据是否为空 - if (table.length === 0) { - $.modal.alertWarning("请至少添加一条不合格数再保存!"); - return; - } + console.log(JSON.stringify(table)); // 将表数据转换成与qualityReportData格式一致的数组 var unqualifiedDataList = table.map(function (item) { diff --git a/ruoyi-admin/src/main/resources/templates/quality/qualityOrder/makeInStartingQualityDetail.html b/ruoyi-admin/src/main/resources/templates/quality/qualityOrder/makeInStartingQualityDetail.html index ef4ebdec..ec5c6e9b 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/qualityOrder/makeInStartingQualityDetail.html +++ b/ruoyi-admin/src/main/resources/templates/quality/qualityOrder/makeInStartingQualityDetail.html @@ -1,7 +1,7 @@ - + diff --git a/ruoyi-admin/src/main/resources/templates/quality/qualityOrder/makeOrderReport.html b/ruoyi-admin/src/main/resources/templates/quality/qualityOrder/makeOrderReport.html new file mode 100644 index 00000000..dbe23e6a --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/quality/qualityOrder/makeOrderReport.html @@ -0,0 +1,311 @@ + + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+

合格数

+
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+
+ +
+
+
+ 不合格数 + + 添加 + +
+
+
+
+
+
+
+
+ +
+ + +
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+
+ + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/quality/qualityOrder/makeStartingQuality.html b/ruoyi-admin/src/main/resources/templates/quality/qualityOrder/makeStartingQuality.html new file mode 100644 index 00000000..8928404c --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/quality/qualityOrder/makeStartingQuality.html @@ -0,0 +1,255 @@ + + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+
+
+
+
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/quality/qualityOrder/qualityOrder.html b/ruoyi-admin/src/main/resources/templates/quality/qualityOrder/qualityOrder.html index 17b19d5d..466f2c22 100644 --- a/ruoyi-admin/src/main/resources/templates/quality/qualityOrder/qualityOrder.html +++ b/ruoyi-admin/src/main/resources/templates/quality/qualityOrder/qualityOrder.html @@ -59,6 +59,9 @@ var qualityFlag = [[${@permission.hasPermi('quality:qualityOrder:startingQuality')}]]; var makeInStartingQualityFlag = [[${@permission.hasPermi('quality:qualityOrder:makeInStartingQuality')}]]; var makeInStartingQualityDetailFlag = [[${@permission.hasPermi('quality:qualityOrder:makeInStartingQualityDetail')}]]; + var makeStartingQualityFlag = [[${@permission.hasPermi('quality:qualityOrder:makeStartingQuality')}]]; + var makeStartingQualityDetailFlag = [[${@permission.hasPermi('quality:qualityOrder:makeStartingQualityDetail')}]]; + var qualityStatusDatas = [[${@dict.getType('qualityStatus')}]]; @@ -176,6 +179,15 @@ if (row.qualityStorageStatus == 1 ){ actions.push('详情 '); } + + //生产订单品质 + if (row.qualityStatus != 2 && row.qualityStorageStatus == 4 ){ + actions.push('品质 '); + } + //生产订单品质详情 + if (row.qualityStorageStatus == 4 ){ + actions.push('详情 '); + } return actions.join(''); } }] @@ -208,6 +220,19 @@ $.modal.open("进行品质详情",url) } + //生产入库品质 + function makeStartingQuality(qualityOrderId){ + var url = ctx +'quality/qualityOrder/makeStartingQuality/' + qualityOrderId; + $.modal.open("进行品质",url) + } + + //生产入库品质详情 + function makeStartingQualityDetail(qualityOrderId){ + var url = ctx +'quality/qualityOrder/makeStartingQualityDetail/' + qualityOrderId; + $.modal.open("进行品质详情",url) + } + + \ No newline at end of file