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 1/5] =?UTF-8?q?[fix]=20=E5=93=81=E8=B4=A8=E7=AE=A1?= =?UTF-8?q?=E7=90=86=20=E7=94=9F=E4=BA=A7=E7=AE=A1=E7=90=86=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=20=E5=A7=94=E5=86=85=E5=85=A5=E5=BA=93=E5=8D=95?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=20=E6=96=B0=E5=A2=9E=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BF=9D=E5=AD=98=E5=A7=94=E5=86=85=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E5=8D=95=E8=AF=A6=E6=83=85=E6=8E=A5=E5=8F=A3=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=20=E5=93=81=E8=B4=A8=E5=8D=95=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=8E=A5=E5=8F=A3=E6=9F=A5=E8=AF=A2=E5=85=A5=E5=BA=93?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E4=B8=BA=E5=A7=94=E5=86=85=E5=92=8C=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E7=9A=84=E6=95=B0=E6=8D=AE=20=E5=A7=94=E5=86=85?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E5=8D=95=E5=92=8C=E7=94=9F=E4=BA=A7=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E5=89=8D=E7=AB=AF=E5=88=97=E8=A1=A8=E5=AF=B9=E5=A7=94?= =?UTF-8?q?=E5=86=85=E5=8A=A0=E5=B7=A5=E8=B4=B9=E6=80=BB=E4=BB=B7=E8=BF=9B?= =?UTF-8?q?=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 From 824fdbd64afc3914c413e7d6f7d55cdb4d52bb11 Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Mon, 8 Jul 2024 10:24:13 +0800 Subject: [PATCH 2/5] =?UTF-8?q?[fix]=20=E7=94=9F=E4=BA=A7=E7=AE=A1?= =?UTF-8?q?=E7=90=86=20=E4=BB=93=E5=BA=93=E7=AE=A1=E7=90=86=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=20=E7=94=9F=E4=BA=A7=E3=80=81=E5=A7=94=E5=86=85?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E5=8D=95=E9=A1=B5=E9=9D=A2=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=85=A5=E5=BA=93=E6=95=B0=E5=AD=97=E6=AE=B5=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E5=93=81=E8=B4=A8=E5=8D=95=E5=AE=9E?= =?UTF-8?q?=E4=BD=93=E7=B1=BB=E6=96=B0=E5=A2=9E=20=E5=85=A5=E5=BA=93?= =?UTF-8?q?=E6=95=B0=E5=AD=97=E6=AE=B5=20=E4=BF=AE=E6=94=B9=E5=93=81?= =?UTF-8?q?=E8=B4=A8mapper=E5=B1=82=E6=9F=A5=E8=AF=A2=E6=96=B9=E6=B3=95=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=93=E5=BA=93=E5=85=A5=E5=BA=93=E6=9A=82?= =?UTF-8?q?=E6=94=B6=20=E7=89=A9=E6=96=99=E5=85=A5=E5=BA=93=E9=83=A8?= =?UTF-8?q?=E9=97=A8=E4=B8=BA=E4=BB=93=E5=BA=93=E7=9A=84=E5=90=8E=E7=AB=AF?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/quality/domain/QualityOrder.java | 12 +++++ .../WarehouseStorageOrderController.java | 2 +- .../IWarehouseStorageOrderService.java | 5 ++ .../WarehouseStorageOrderServiceImpl.java | 52 +++++++++++++++++++ .../mapper/quality/QualityOrderMapper.xml | 6 ++- .../erp/inboundOrder/inboundOrder.html | 2 +- 6 files changed, 76 insertions(+), 3 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityOrder.java b/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityOrder.java index 1f2e4166..755250f3 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityOrder.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/quality/domain/QualityOrder.java @@ -59,6 +59,9 @@ public class QualityOrder extends BaseEntity @Excel(name = "品质不合格数") private Integer qualityUnqualifiedNum; + /** 入库数 */ + private Integer storageNum; + /** 委内加工费总价 */ private BigDecimal makeInTotalPrice; @@ -224,6 +227,14 @@ public class QualityOrder extends BaseEntity this.qualityOrderDetailList = qualityOrderDetailList; } + public Integer getStorageNum() { + return storageNum; + } + + public void setStorageNum(Integer storageNum) { + this.storageNum = storageNum; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) @@ -248,6 +259,7 @@ public class QualityOrder extends BaseEntity .append("createTime", getCreateTime()) .append("updateBy", getUpdateBy()) .append("updateTime", getUpdateTime()) + .append("storageNum",getStorageNum()) .toString(); } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseStorageOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseStorageOrderController.java index 871d0a8a..4a0941fa 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseStorageOrderController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/controller/WarehouseStorageOrderController.java @@ -139,7 +139,7 @@ public class WarehouseStorageOrderController extends BaseController @ResponseBody public AjaxResult temporaryPurchaseWarehouseSave(@RequestBody WarehouseStorageOrder warehouseStorageOrder) { - return toAjax(warehouseStorageOrderService.updateWarehouseStorageOrder(warehouseStorageOrder)); + return toAjax(warehouseStorageOrderService.updateTemporaryPurchaseWarehouse(warehouseStorageOrder)); } 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 506ecf85..5f78b31d 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 @@ -118,4 +118,9 @@ public interface IWarehouseStorageOrderService * 修改保存入库-生产订单(委内入库) * */ int updateStorageMakeIn(WarehouseStorageOrder warehouseStorageOrder); + + /** + * 修改保存暂收-采购单(仓库入库) + */ + int updateTemporaryPurchaseWarehouse(WarehouseStorageOrder warehouseStorageOrder); } 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 e2352fc5..26aeb414 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 @@ -523,6 +523,58 @@ public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderS } + /** + * 修改保存暂收-采购单(仓库入库) + */ + @Transactional(rollbackFor = Exception.class) + @Override + public int updateTemporaryPurchaseWarehouse(WarehouseStorageOrder warehouseStorageOrder) { + String loginName = ShiroUtils.getLoginName(); + warehouseStorageOrder.setUpdateBy(loginName); + warehouseStorageOrder.setUpdateTime(DateUtils.getNowDate()); + //改变状态为已暂收 + warehouseStorageOrder.setWarehouseStorageStatus("1"); + //设置品质状态,为待品质 + warehouseStorageOrder.setWarehouseQualityStatus("0"); + warehouseStorageOrder.setWarehouseEmployee(loginName); + List warehouseStorageOrderDetailList = warehouseStorageOrder.getWarehouseStorageOrderDetailList(); + //入库单主表的实际到货数为子表的合计 + int actualArriveNum = warehouseStorageOrderDetailList.stream().mapToInt(WarehouseStorageOrderDetail::getActualArriveNum).sum(); + //入库单主表的暂收合格数为子表的合计 + int temporaryQualifiedNum = warehouseStorageOrderDetailList.stream().mapToInt(WarehouseStorageOrderDetail::getTemporaryQualifiedNum).sum(); + if (actualArriveNum < temporaryQualifiedNum) { + throw new BusinessException("暂收合格数不能大于实际到货数"); + } + + //插入实际到货数 + warehouseStorageOrder.setActualArrivedNum(actualArriveNum); + //插入暂收合格数 + warehouseStorageOrder.setTemporaryQualifiedNum(temporaryQualifiedNum); + //插入暂收不合格数 + warehouseStorageOrder.setTemporaryUnqualifiedNum(Math.max(0, actualArriveNum - temporaryQualifiedNum)); + //设置暂存时间 + warehouseStorageOrder.setTemporaryTime(new Date()); + int updateDetailResult = updateTemporaryPurchaseDetails(warehouseStorageOrder); + if (updateDetailResult != warehouseStorageOrder.getWarehouseStorageOrderDetailList().size()) { + throw new BusinessException("更新入库单明细记录失败"); + } + int updateResult = warehouseStorageOrderMapper.updateWarehouseStorageOrder(warehouseStorageOrder); + if (updateResult <= 0) { + throw new BusinessException("更新入库单主记录失败"); + } + + try { + qualityOrderService.insertQualityOrderByWarehouseStorageOrder(warehouseStorageOrder, warehouseStorageOrder.getWarehouseStorageOrderDetailList()); + } catch (Exception e) { + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + log.error("生成品质单时发生错误", e); + throw new BusinessException("生成品质单时发生错误"); + } + + return updateResult; + + } + /** * 修改保存暂收-采购单(采购入库) 子表数据 * */ diff --git a/ruoyi-admin/src/main/resources/mapper/quality/QualityOrderMapper.xml b/ruoyi-admin/src/main/resources/mapper/quality/QualityOrderMapper.xml index b69ad95c..33ec0f68 100644 --- a/ruoyi-admin/src/main/resources/mapper/quality/QualityOrderMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/quality/QualityOrderMapper.xml @@ -15,6 +15,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -98,8 +99,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" qo.create_time, qo.update_by, qo.update_time, - qo.make_in_total_price + qo.make_in_total_price, + wso.storage_num from quality_order qo + left join warehouse_storage_order wso on wso.related_order_code = qo.related_order_code + and qo.quality_order_code = #{qualityOrderCode} and qo.in_storage_code = #{inStorageCode} 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 c272a366..0124655d 100644 --- a/ruoyi-admin/src/main/resources/templates/erp/inboundOrder/inboundOrder.html +++ b/ruoyi-admin/src/main/resources/templates/erp/inboundOrder/inboundOrder.html @@ -165,7 +165,7 @@ { title: '入库数', - field: 'storage_num', + field: 'storageNum', }, // { From 7baf242ae2047848eb86df911db9f387f4897ed6 Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Mon, 8 Jul 2024 16:11:51 +0800 Subject: [PATCH 3/5] =?UTF-8?q?[fix]=20=E7=94=9F=E4=BA=A7=E7=AE=A1?= =?UTF-8?q?=E7=90=86=20=E4=BB=93=E5=BA=93=E7=AE=A1=E7=90=86=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E7=94=9F=E4=BA=A7=E7=AE=A1=E7=90=86=E6=89=80=E6=9C=89?= =?UTF-8?q?=E7=9A=84=E6=8D=9F=E8=80=97=E7=8E=87=E6=95=B0=E6=8D=AE=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=20=E4=BF=AE=E6=94=B9=E9=A2=86=E6=96=99=E5=8D=95?= =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E9=80=9A=E8=BF=87=E5=90=8E=E7=94=9F=E6=88=90?= =?UTF-8?q?=E5=87=BA=E5=BA=93=E5=8D=95=E8=AF=A6=E6=83=85=E7=9A=84=E6=96=B9?= =?UTF-8?q?=E6=B3=95=EF=BC=9A=E6=B7=BB=E5=8A=A0=E8=BF=87=E6=BB=A4=EF=BC=8C?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E6=98=AF=E4=B8=A4=E4=B8=AA=E7=9B=B8=E5=90=8C?= =?UTF-8?q?=E7=9A=84=E7=89=A9=E6=96=99=EF=BC=8C=E9=A2=86=E6=96=99=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=BF=9B=E8=A1=8C=E7=B4=AF=E5=8A=A0=EF=BC=8C=E5=B9=B6?= =?UTF-8?q?=E4=B8=94=E5=8F=AA=E4=BF=9D=E7=95=99=E4=B8=80=E6=9D=A1=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=EF=BC=9B=E6=96=B0=E5=A2=9E=E8=AE=A2=E5=8D=95=E6=95=B0?= =?UTF-8?q?=E9=87=8F=E4=B8=BA=E6=9C=AC=E6=AC=A1=E9=A2=86=E6=96=99=E6=95=B0?= =?UTF-8?q?=20=E4=BF=AE=E4=BF=AE=E6=94=B9=E5=A7=94=E5=86=85=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E5=93=81=E8=B4=A8=E5=90=8E=E7=94=9F=E6=88=90=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E5=8D=95=E7=9A=84=E6=96=B9=E6=B3=95=EF=BC=9A=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=85=A5=E5=BA=93=E5=8D=95=E5=8F=B7=E7=9A=84=E7=94=9F?= =?UTF-8?q?=E6=88=90=E6=96=B9=E5=BC=8F=EF=BC=9B=E6=96=B0=E5=A2=9E=20?= =?UTF-8?q?=E5=93=81=E8=B4=A8=E5=B7=B2=E5=90=88=E6=A0=BC=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/QualityOrderServiceImpl.java | 1 + .../system/domain/SysMakeorderPickDetail.java | 6 +- .../mapper/WarehouseOutOrderDetailMapper.java | 6 ++ .../impl/WarehouseOutOrderServiceImpl.java | 77 +++++++++++-------- .../WarehouseStorageOrderServiceImpl.java | 8 +- .../WarehouseOutOrderDetailMapper.xml | 9 +++ .../templates/erp/inboundOrder/add.html | 14 ++-- .../inboundOrder/processInboundDetail.html | 14 ++-- .../inboundOrder/produceInboundDetail.html | 14 ++-- .../qualityOrder/makeInStartingQuality.html | 1 + .../system/makeorder/addProduceInbound.html | 9 +-- .../templates/system/makeorder/addpick.html | 7 -- .../templates/system/makeorder/bmps.html | 14 ++-- .../templates/system/makeorder/bmzgqr.html | 14 ++-- .../templates/system/makeorder/detail.html | 14 ++-- .../templates/system/makeorder/gcsh.html | 14 ++-- .../system/makeorderpick/detail.html | 14 ++-- .../templates/system/makeorderpick/edit.html | 14 ++-- .../system/makeorderpick/taskModifyApply.html | 14 ++-- .../system/makeorderpick/taskScjlVerify.html | 14 ++-- .../system/makeorderpick/taskSczgVerify.html | 14 ++-- 21 files changed, 156 insertions(+), 136 deletions(-) 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 3660684f..410a2932 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 @@ -349,6 +349,7 @@ public class QualityOrderServiceImpl implements IQualityOrderService //根据品质单号从数据库查询 用于更新入库单 QualityOrder tempQualityOrder = qualityOrderMapper.selectQualityOrderByCode(qualityOrder.getQualityOrderCode()); + tempQualityOrder.setWarehouseCode(warehouseStorageCode); String qualityStatus = tempQualityOrder.getQualityStatus(); String qualityStorageStatus = tempQualityOrder.getQualityStorageStatus(); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysMakeorderPickDetail.java b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysMakeorderPickDetail.java index 6fafaaf2..475566ec 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysMakeorderPickDetail.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysMakeorderPickDetail.java @@ -66,7 +66,7 @@ public class SysMakeorderPickDetail extends BaseEntity /** 用量 */ private Long useNum; /** 损耗率 */ - private BigDecimal lossRate; + private String lossRate; /** 层级 */ private Long level; /** 排序 */ @@ -216,11 +216,11 @@ public class SysMakeorderPickDetail extends BaseEntity this.useNum = useNum; } - public BigDecimal getLossRate() { + public String getLossRate() { return lossRate; } - public void setLossRate(BigDecimal lossRate) { + public void setLossRate(String lossRate) { this.lossRate = lossRate; } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseOutOrderDetailMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseOutOrderDetailMapper.java index a7955417..e857f643 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseOutOrderDetailMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/mapper/WarehouseOutOrderDetailMapper.java @@ -83,6 +83,12 @@ public interface WarehouseOutOrderDetailMapper */ List selectOutOrderDetailListByCode(String outOrderCode); + + /** + * 根据物料号、出库单号、关联单号查询出库单详情数据 + */ + public WarehouseOutOrderDetail selectOutOrderDetailListByThreeCode(WarehouseOutOrderDetail warehouseOutOrderDetail); + /** * 销售单-出库 物料信息关联设备信息 */ diff --git a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderServiceImpl.java index 38e3e236..eb5431d5 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/warehouse/service/impl/WarehouseOutOrderServiceImpl.java @@ -311,7 +311,7 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService throw new BusinessException("添加出库单信息失败"); } //生成出库单详情相关信息 - generateWarehouseOutOrder(sysMakeorderPickVo, tempSysMakeorderPickVo, outOrderCode,mergeMakeorderPickDetails); + generateWarehouseOutOrder(sysMakeorderPickVo, tempSysMakeorderPickVo, outOrderCode,sysMakeorderPickDetails); return insertResult; } @@ -343,44 +343,59 @@ public class WarehouseOutOrderServiceImpl implements IWarehouseOutOrderService //生成出库单详情相关信息 - private void generateWarehouseOutOrder(SysMakeorderPickVo sysMakeorderPickVo, SysMakeorderPickVo tempSysMakeorderPickVo, String outOrderCode,List mergeMakeorderPickDetails) { + private void generateWarehouseOutOrder(SysMakeorderPickVo sysMakeorderPickVo, SysMakeorderPickVo tempSysMakeorderPickVo, String outOrderCode,List sysMakeorderPickDetails) { - for (SysMakeorderPickDetail sysMakeorderPickDetail : mergeMakeorderPickDetails) { + for (SysMakeorderPickDetail sysMakeorderPickDetail : sysMakeorderPickDetails) { WarehouseOutOrderDetail warehouseOutOrderDetail = new WarehouseOutOrderDetail(); warehouseOutOrderDetail.setOutOrderCode(outOrderCode); - warehouseOutOrderDetail.setWarehouseOutStatus("4"); warehouseOutOrderDetail.setRelatedOrderCode(tempSysMakeorderPickVo.getMakeNo()); - warehouseOutOrderDetail.setMakeNo(tempSysMakeorderPickVo.getMakeNo()); - //标明来源是生产订单 - warehouseOutOrderDetail.setWarehouseOrderType("1"); - warehouseOutOrderDetail.setWarehouseOutType("1"); - warehouseOutOrderDetail.setMaterialSum(tempSysMakeorderPickVo.getMaterialSum()); - warehouseOutOrderDetail.setEnterpriseSum(tempSysMakeorderPickVo.getEnterpriseSum()); - - warehouseOutOrderDetail.setCreateBy(ShiroUtils.getLoginName()); - warehouseOutOrderDetail.setCreateTime(new Date()); - warehouseOutOrderDetail.setApplyName(sysMakeorderPickVo.getApplyUser()); //物料相关信息 warehouseOutOrderDetail.setMaterialNo(sysMakeorderPickDetail.getMaterialNo()); - warehouseOutOrderDetail.setMaterialName(sysMakeorderPickDetail.getMaterialName()); - warehouseOutOrderDetail.setMaterialDescribe(sysMakeorderPickDetail.getDescribe()); - warehouseOutOrderDetail.setMaterialUnit(sysMakeorderPickDetail.getUnit()); - warehouseOutOrderDetail.setMaterialBrand(sysMakeorderPickDetail.getBrand()); - warehouseOutOrderDetail.setMaterialProcessMethod(sysMakeorderPickDetail.getProcessMethod()); - warehouseOutOrderDetail.setMakeNum(tempSysMakeorderPickVo.getMaterialSum()); + //根据出库单号和关联单号以及物料号查找出库单详情数据 + WarehouseOutOrderDetail tempWarehouseOutOrderDetail = outOrderDetailMapper.selectOutOrderDetailListByThreeCode(warehouseOutOrderDetail); + if (tempWarehouseOutOrderDetail != null){ + warehouseOutOrderDetail.setOutOrderDetailId(tempWarehouseOutOrderDetail.getOutOrderDetailId()); + Integer applyOutOrderSum = (int) (sysMakeorderPickDetail.getPickNum()+tempWarehouseOutOrderDetail.getApplyOutOrderSum()); + Integer makeNum = (int) (sysMakeorderPickDetail.getPickNum() + tempWarehouseOutOrderDetail.getMakeNum()); + warehouseOutOrderDetail.setApplyOutOrderSum(applyOutOrderSum); + warehouseOutOrderDetail.setMakeNum(makeNum); + int updateWarehouseOutOrderDetailResult = outOrderDetailMapper.updateWarehouseOutOrderDetail(warehouseOutOrderDetail); + if (updateWarehouseOutOrderDetailResult <= 0){ + throw new BusinessException("更新出库单详情失败"); + } + }else { + warehouseOutOrderDetail.setWarehouseOutStatus("4"); + warehouseOutOrderDetail.setMakeNo(tempSysMakeorderPickVo.getMakeNo()); + //标明来源是生产订单 + warehouseOutOrderDetail.setWarehouseOrderType("1"); + warehouseOutOrderDetail.setWarehouseOutType("1"); + warehouseOutOrderDetail.setMaterialSum(tempSysMakeorderPickVo.getMaterialSum()); + warehouseOutOrderDetail.setEnterpriseSum(tempSysMakeorderPickVo.getEnterpriseSum()); + + warehouseOutOrderDetail.setCreateBy(ShiroUtils.getLoginName()); + warehouseOutOrderDetail.setCreateTime(new Date()); + warehouseOutOrderDetail.setApplyName(sysMakeorderPickVo.getApplyUser()); + warehouseOutOrderDetail.setMaterialName(sysMakeorderPickDetail.getMaterialName()); + warehouseOutOrderDetail.setMaterialDescribe(sysMakeorderPickDetail.getDescribe()); + warehouseOutOrderDetail.setMaterialUnit(sysMakeorderPickDetail.getUnit()); + warehouseOutOrderDetail.setMaterialBrand(sysMakeorderPickDetail.getBrand()); + warehouseOutOrderDetail.setMaterialProcessMethod(sysMakeorderPickDetail.getProcessMethod()); + //订单数量为本次领料数量 + warehouseOutOrderDetail.setMakeNum(Math.toIntExact(sysMakeorderPickDetail.getPickNum())); //添加申请出库数量 - warehouseOutOrderDetail.setApplyOutOrderSum(Math.toIntExact(sysMakeorderPickDetail.getPickNum())); - - if (StringUtils.isNotEmpty(sysMakeorderPickDetail.getDescribe())) { - String[] splitDescribe = sysMakeorderPickDetail.getDescribe().split(","); - if (splitDescribe.length >= 2) { - warehouseOutOrderDetail.setMaterialModel(splitDescribe[0]); - warehouseOutOrderDetail.setMaterialSpecification(splitDescribe[1]); + warehouseOutOrderDetail.setApplyOutOrderSum(Math.toIntExact(sysMakeorderPickDetail.getPickNum())); + + if (StringUtils.isNotEmpty(sysMakeorderPickDetail.getDescribe())) { + String[] splitDescribe = sysMakeorderPickDetail.getDescribe().split(","); + if (splitDescribe.length >= 2) { + warehouseOutOrderDetail.setMaterialModel(splitDescribe[0]); + warehouseOutOrderDetail.setMaterialSpecification(splitDescribe[1]); + } + } + int insertOutOrderDetailResult = outOrderDetailMapper.insertWarehouseOutOrderDetail(warehouseOutOrderDetail); + if (insertOutOrderDetailResult <= 0){ + throw new BusinessException("新增出库单详情数据失败"); } - } - int insertOutOrderDetailResult = outOrderDetailMapper.insertWarehouseOutOrderDetail(warehouseOutOrderDetail); - if (insertOutOrderDetailResult <= 0){ - throw new BusinessException("新增出库单详情数据失败"); } } } 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 26aeb414..90b65d19 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 @@ -403,8 +403,8 @@ public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderS public int insertWarehouseStorageOrderByMakeInQualityOrder(QualityOrder tempQualityOrder, List qualityOrderDetailList) { WarehouseStorageOrder warehouseStorageOrder = new WarehouseStorageOrder(); String loginName = ShiroUtils.getLoginName(); - String warehouseStorageCode = redisCache.generateBillNo("RK"); - warehouseStorageOrder.setWarehouseStorageCode(warehouseStorageCode); + + warehouseStorageOrder.setWarehouseStorageCode(tempQualityOrder.getWarehouseCode()); warehouseStorageOrder.setRelatedOrderCode(tempQualityOrder.getRelatedOrderCode()); //暂收设置为全部品质 warehouseStorageOrder.setWarehouseQualityStatus("2"); @@ -423,7 +423,7 @@ public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderS for (QualityOrderDetail qualityOrderDetail : qualityOrderDetailList) { WarehouseStorageOrderDetail warehouseStorageOrderDetail = new WarehouseStorageOrderDetail(); - warehouseStorageOrderDetail.setWarehouseStorageCode(warehouseStorageCode); + warehouseStorageOrderDetail.setWarehouseStorageCode(tempQualityOrder.getWarehouseCode()); warehouseStorageOrderDetail.setRelatedOrderCode(tempQualityOrder.getRelatedOrderCode()); warehouseStorageOrderDetail.setWarehouseQualityStatus("2"); warehouseStorageOrderDetail.setWarehouseStorageStatus("2"); @@ -433,6 +433,8 @@ public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderS warehouseStorageOrderDetail.setMakeStorageNum(qualityOrderDetail.getMakeInNum()); //设置委内加工费单价 warehouseStorageOrderDetail.setMakeInUnitPrice(qualityOrderDetail.getMakeInUnitPrice()); + //设置品质已合格数 + warehouseStorageOrderDetail.setQualityHasQualifiedNum(qualityOrderDetail.getQualityHasqualifiedNum()); warehouseStorageOrderDetail.setMaterialNo(qualityOrderDetail.getMaterialNo()); warehouseStorageOrderDetail.setMaterialName(qualityOrderDetail.getMaterialName()); warehouseStorageOrderDetail.setMaterialBrand(qualityOrderDetail.getMaterialBrand()); diff --git a/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseOutOrderDetailMapper.xml b/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseOutOrderDetailMapper.xml index 86072cf3..e9bf857e 100644 --- a/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseOutOrderDetailMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseOutOrderDetailMapper.xml @@ -77,6 +77,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where out_order_code = #{outOrderCode} + + + + '; - } + // formatter: function (value,row,index){ + // var curIndex = index; + // return ''; + // } }, { field: 'materialName', @@ -393,7 +393,7 @@ var materialDataList = table.map(function(item) { // 根据实际字段名调整 return { - "materialCode":item.materialCode, + "materialNo":item.materialCode, "materialName": item.materialName, "unit": item.unit, "brand": item.brand, @@ -409,7 +409,7 @@ }); // 合并表单数据和表格数据 - const combinedData = Object.assign({}, makeorderData, { sysEquipDetailDtos: materialDataList }); + const combinedData = Object.assign({}, makeorderData, { inboundDetails: materialDataList }); console.log(combinedData) // 使用 JSON.stringify() 序列化数据 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 5/5] =?UTF-8?q?[feat]=20=E7=94=9F=E4=BA=A7=E7=AE=A1?= =?UTF-8?q?=E7=90=86=20=E5=93=81=E8=B4=A8=E7=AE=A1=E7=90=86=20=E4=BB=93?= =?UTF-8?q?=E5=BA=93=E7=AE=A1=E7=90=86=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=E5=89=8D=E7=AB=AF=E9=A1=B5=E9=9D=A2=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=20=E7=94=9F=E4=BA=A7=E5=85=A5=E5=BA=93=E5=93=81?= =?UTF-8?q?=E8=B4=A8=E5=8D=95=E6=8A=A5=E5=91=8A=E5=89=8D=E7=AB=AF=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=20=E6=96=B0=E5=A2=9E=20=E7=94=9F=E4=BA=A7=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E5=93=81=E8=B4=A8=E5=8D=95=E5=93=81=E8=B4=A8=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E6=8C=89=E7=85=A7=E4=B8=80=E5=AE=9A=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E6=98=BE=E7=A4=BA=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?=E8=AF=A6=E6=83=85=E6=8C=89=E9=92=AE=E6=8C=89=E7=85=A7=E4=B8=80?= =?UTF-8?q?=E5=AE=9A=E6=9D=A1=E4=BB=B6=E8=BF=9B=E8=A1=8C=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=20=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