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