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 8ebba522..2b139df8 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 @@ -1,11 +1,16 @@ package com.ruoyi.erp.controller; import java.util.List; +import java.util.stream.Collectors; import com.ruoyi.common.utils.ShiroUtils; +import com.ruoyi.quality.domain.QualityOrder; +import com.ruoyi.quality.service.IQualityOrderService; import com.ruoyi.system.domain.SysSalesOrderChild; import com.ruoyi.system.dto.SysEquipMaterialDto; import com.ruoyi.system.service.ISysSalesOrderChildService; +import com.ruoyi.warehouse.domain.WarehouseStorageOrder; +import com.ruoyi.warehouse.service.IWarehouseStorageOrderService; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -36,6 +41,8 @@ public class ErpInboundOrderController extends BaseController @Autowired private IErpInboundOrderService erpInboundOrderService; + @Autowired + private IQualityOrderService qualityOrderService; @Autowired private ISysSalesOrderChildService salesOrderChildService; @@ -52,11 +59,12 @@ public class ErpInboundOrderController extends BaseController @RequiresPermissions("erp:inboundOrder:list") @PostMapping("/list") @ResponseBody - public TableDataInfo list(ErpInboundOrder erpInboundOrder) + public TableDataInfo list(QualityOrder qualityOrder) { startPage(); - List list = erpInboundOrderService.selectErpInboundOrderList(erpInboundOrder); - return getDataTable(list); + 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); } /** @@ -66,11 +74,12 @@ public class ErpInboundOrderController extends BaseController @Log(title = "入库单", businessType = BusinessType.EXPORT) @PostMapping("/export") @ResponseBody - public AjaxResult export(ErpInboundOrder erpInboundOrder) + public AjaxResult export(QualityOrder qualityOrder) { - List list = erpInboundOrderService.selectErpInboundOrderList(erpInboundOrder); - ExcelUtil util = new ExcelUtil(ErpInboundOrder.class); - return util.exportExcel(list, "入库单数据"); + List list = qualityOrderService.selectQualityOrderList(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, "入库单数据"); } /** @@ -117,40 +126,18 @@ public class ErpInboundOrderController extends BaseController return toAjax(erpInboundOrderService.updateErpInboundOrder(erpInboundOrder)); } - /** - * 删除入库单 - */ - @RequiresPermissions("erp:inboundOrder:remove") - @Log(title = "入库单", businessType = BusinessType.DELETE) - @PostMapping( "/remove") - @ResponseBody - public AjaxResult remove(String ids) - { - return toAjax(erpInboundOrderService.deleteErpInboundOrderByIds(ids)); - } - /** - * 作废入库单 - */ - @RequiresPermissions("erp:inboundOrder:cancel") - @Log(title = "入库单", businessType = BusinessType.CANCEL) - @GetMapping( "/cancel/{id}") - @ResponseBody - public AjaxResult cancel(@PathVariable("id") Long id){ - return toAjax(erpInboundOrderService.cancelErpInboundOrderById(id)); - } +// /** +// * 委内入库单详情页面 +// */ +// @GetMapping("/detail/{qualityOrderId}") +// public String detail(@PathVariable("qualityOrderId") Long qualityOrderId, ModelMap mmap) +// { +// QualityOrder qualityOrder = qualityOrderService.selectQualityOrderById(qualityOrderId); +// mmap.put("qualityOrder", qualityOrder); +// return prefix + "/edit"; +// } - /** - * 恢复入库单 - */ - @RequiresPermissions("erp:inboundOrder:restore") - @Log(title = "入库单", businessType = BusinessType.RESTORE) - @GetMapping( "/restore/{id}") - @ResponseBody - public AjaxResult restore(@PathVariable("id")Long id) - { - return toAjax(erpInboundOrderService.restoreErpInboundOrderById(id)); - } @GetMapping("/detail/{id}") public String detail(@PathVariable("id") Long id, ModelMap mmap) 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 314cbcc7..32a8e759 100644 --- a/ruoyi-admin/src/main/resources/templates/erp/inboundOrder/inboundOrder.html +++ b/ruoyi-admin/src/main/resources/templates/erp/inboundOrder/inboundOrder.html @@ -11,48 +11,27 @@
  • - - -
  • -
  • - - + +
  • - -
  • -
  • - - +
  • - - -
  • -
  • - -
  • - - + +
  • - - + +
  • @@ -70,15 +49,6 @@
- 导出 @@ -94,11 +64,11 @@ var removeFlag = [[${@permission.hasPermi('erp:inboundOrder:remove')}]]; var cancelFlag = [[${@permission.hasPermi('erp:inboundOrder:cancel')}]]; var restoreFlag = [[${@permission.hasPermi('erp:inboundOrder:restore')}]]; - var inboundStatusDatas = [[${@dict.getType('erp_inbound_status')}]]; - var inboundTypeDatas = [[${@dict.getType('erp_inbound_type')}]]; - var warehouseQualityStatusDatas = [[${@dict.getType('warehouse_quality_status')}]]; - var orderTypeDatas = [[${@dict.getType('sys_order_type')}]]; + + var qualityStatusDatas = [[${@dict.getType('qualityStatus')}]]; + var qualityOrderTypeDatas = [[${@dict.getType('quality_order_type')}]]; + var qualityStorageStatusDatas = [[${@dict.getType('quality_storage_status')}]]; var prefix = ctx + "erp/inboundOrder"; @@ -115,94 +85,84 @@ modalName: "入库单", columns: [ {checkbox: true}, - {title: '主键ID',field: 'id',visible: false}, { - title: '品质单号', - field: 'qualityOrderCode', + title: '品质单Id', + field: 'qualityOrderId', + visible: false }, { - title: '生产订单号', - field: 'makeNo', + title: '品质单号', + field: 'qualityOrderCode', }, { - title: '仓库品质状态', - field: 'warehouseQualityStatus', + title: '品质状态', + field: 'qualityStatus', formatter: function(value, row, index) { - return $.table.selectDictLabel(warehouseQualityStatusDatas, value); + return $.table.selectDictLabel(qualityStatusDatas, value); } }, - {title: '入库状态',field: 'inboundStatus', - formatter: function(value, row, index) { - return $.table.selectDictLabel(inboundStatusDatas, value); - } + { + title: '入库单号', + field: 'inStorageCode', }, - {title: '入库单号',field: 'inboundOrderNo',}, - {title: '关联生产订单号',field: 'makeNo',}, - {title: '关联销售订单号',field: 'saleNo',visible: false,}, { - title: '工程员', - field: 'engineerName', + title: '关联订单号', + field: 'relatedOrderCode', }, - {title: '生产订单类型',field: 'orderType', + + { + title: '订单类型', + field: 'qualityOrderType', formatter: function(value, row, index) { - return $.table.selectDictLabel(orderTypeDatas, value); + return $.table.selectDictLabel(qualityOrderTypeDatas, value); } }, - {title: '入库类型',field: 'inboundType', + { + title: '入库类型', + field: 'qualityStorageStatus', formatter: function(value, row, index) { - return $.table.selectDictLabel(inboundTypeDatas, value); + return $.table.selectDictLabel(qualityStorageStatusDatas, value); } }, { - title: '客户Id', - field: 'customerId', + title: '本次到货数量', + field: 'thisArrivedNum', }, { - title: '客户公司名称', - field: 'customerName', + title: '品质合格数', + field: 'qualityQualifiedNum', }, { - title: '客户订单号', - field: 'salesOrderNumber', + title: '品质不合格数', + field: 'qualityUnqualifiedNum', }, { - title: '物料合计', - field: 'materialTotal', + title: '交检时间', + field: 'deliveryInspectionTime', }, { - title: '数量合计', - field: 'numTotal', + title: '品质员', + field: 'qualityEmployee', }, { - title: '委内加工费总价', - field: 'processingFeeTotal', + title: '录入人', + field: 'createBy', }, { - title: '品质合格数量', - field: 'qualityQualifiedNum', + title: '录入时间', + field: 'createTime', }, { - title: '品质不合格数量', - field: 'qualityUnqualifiedNum', + title: '更新人', + field: 'updateBy', }, { - title: '入库数量', - field: 'storageNum', + title: '上次更新时间', + field: 'updateTime', }, - {title: '录入人',field: 'inboundUser',}, - {title: '录入时间',field: 'inboundTime',}, - {title: '更新人',field: '',}, - {title: '上次更新时间',field: '',}, {title: '操作', align: 'center',formatter: function(value, row, index) { var actions = []; - /*actions.push('编辑 '); - actions.push('删除 '); - if(row.delFlag == '0'){ - actions.push('作废 '); - }else{ - actions.push('恢复 '); - }*/ - actions.push('详情 '); + actions.push('详情 '); return actions.join(''); } } @@ -210,6 +170,13 @@ }; $.table.init(options); }); + + + //详情 + function detail(qualityOrderId){ + var url = prefix +'/detail/' + qualityOrderId; + $.modal.open("品质单详情",url) + } \ No newline at end of file