From 3e1906dd185748a1c4818e6618e23bb39c7e2876 Mon Sep 17 00:00:00 2001
From: xqs <ddxk91@qq.com>
Date: Thu, 23 Jul 2020 11:26:23 +0800
Subject: [PATCH] 库存汇总页面

---
 src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/controller/InventoryMaterialSummaryController.java    | 157 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/domain/InventoryMaterialSummary.java                  | 317 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/mapper/InventoryMaterialSummaryMapper.java            |  20 ++++++++++++++++++++
 src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/service/InventoryMaterialSummaryChildService.java     |  15 +++++++++++++++
 src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/service/InventoryMaterialSummaryChildServiceImpl.java |  19 +++++++++++++++++++
 src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/service/InventoryMaterialSummaryService.java          |  17 +++++++++++++++++
 src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/service/InventoryMaterialSummaryServiceImpl.java      |  45 +++++++++++++++++++++++++++++++++++++++++++++
 src/main/resources/templates/inventory/inventoryMaterialSummary/inventoryMaterialSummary.html                         | 269 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 8 files changed, 859 insertions(+), 0 deletions(-)
 create mode 100644 src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/controller/InventoryMaterialSummaryController.java
 create mode 100644 src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/domain/InventoryMaterialSummary.java
 create mode 100644 src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/mapper/InventoryMaterialSummaryMapper.java
 create mode 100644 src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/service/InventoryMaterialSummaryChildService.java
 create mode 100644 src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/service/InventoryMaterialSummaryChildServiceImpl.java
 create mode 100644 src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/service/InventoryMaterialSummaryService.java
 create mode 100644 src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/service/InventoryMaterialSummaryServiceImpl.java
 create mode 100644 src/main/resources/templates/inventory/inventoryMaterialSummary/inventoryMaterialSummary.html

diff --git a/src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/controller/InventoryMaterialSummaryController.java b/src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/controller/InventoryMaterialSummaryController.java
new file mode 100644
index 0000000..6f8cea2
--- /dev/null
+++ b/src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/controller/InventoryMaterialSummaryController.java
@@ -0,0 +1,157 @@
+package com.huaheng.pc.inventory.InventoryMaterialSummary.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.huaheng.common.utils.StringUtils;
+import com.huaheng.common.utils.security.ShiroUtils;
+import com.huaheng.framework.aspectj.lang.annotation.Log;
+import com.huaheng.framework.aspectj.lang.constant.BusinessType;
+import com.huaheng.framework.web.controller.BaseController;
+import com.huaheng.framework.web.page.PageDomain;
+import com.huaheng.framework.web.page.TableDataInfo;
+import com.huaheng.framework.web.page.TableSupport;
+
+import com.huaheng.pc.inventory.InventoryMaterialSummary.domain.InventoryMaterialSummary;
+import com.huaheng.pc.inventory.InventoryMaterialSummary.service.InventoryMaterialSummaryService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import javax.annotation.Resource;
+import java.util.Collections;
+import java.util.List;
+
+
+/**
+ *库存物料汇总,
+ * 父子页面表
+ *
+ * 无表,查询筛选数据后直接展示到页面
+ *
+ *
+ * */
+@Controller
+@RequestMapping("/inventory/inventoryMaterialSummary")
+public class InventoryMaterialSummaryController extends BaseController {
+
+
+    @Resource
+    private InventoryMaterialSummaryService inventoryMaterialSummaryService;
+
+
+
+
+
+
+    private String prefix = "inventory/inventoryMaterialSummary";
+
+
+
+    /**
+     * 页面
+     * */
+    @RequiresPermissions("inventory:inventoryMaterialSummary:view")
+    @GetMapping()
+    public String inventoryMaterialSummary( ModelMap m)
+    {
+        m.put("warehouseCode",ShiroUtils.getWarehouseCode());
+        return prefix + "/inventoryMaterialSummary";
+    }
+
+    /**
+     * 库存汇总列表
+     */
+    @RequiresPermissions("inventory:cycleCountDetail:list")
+    @PostMapping("/list")
+    @Log(title = "库存-盘点",operating = "查看盘点明细", action = BusinessType.GRANT)
+    @ResponseBody
+    public TableDataInfo list(InventoryMaterialSummary inventoryMaterialSummary, String createdBegin, String createdEnd)  {
+
+        LambdaQueryWrapper<InventoryMaterialSummary> lambdaQueryWrapper = Wrappers.lambdaQuery();
+        PageDomain pageDomain = TableSupport.buildPageRequest();
+        Integer pageNum = pageDomain.getPageNum();
+        Integer pageSize = pageDomain.getPageSize();
+            lambdaQueryWrapper
+                    //仓库
+                    .eq(InventoryMaterialSummary::getWarehouseCode, ShiroUtils.getWarehouseCode())
+                    //物料编码
+                    .eq(StringUtils.isNotEmpty(inventoryMaterialSummary.getMaterialCode()),InventoryMaterialSummary::getMaterialCode,inventoryMaterialSummary.getMaterialCode())
+                    //物料名称
+                    .eq(StringUtils.isNotEmpty(inventoryMaterialSummary.getMaterialName()),InventoryMaterialSummary::getMaterialName,inventoryMaterialSummary.getMaterialName());
+                    //.orderByAsc(InventoryMaterialSummary::getMaterialCode);
+
+            if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) {
+                //分页查询
+                Page<InventoryMaterialSummary> page = new Page<>(pageNum, pageSize);
+                IPage<InventoryMaterialSummary> iPage = inventoryMaterialSummaryService.page(page, lambdaQueryWrapper);
+                //筛选库存汇总数据的专用方法
+                List<InventoryMaterialSummary> ipages = inventoryMaterialSummaryService.inventoryMaterialSummarySelect(iPage.getRecords()) ;
+                return getMpDataTable(ipages, iPage.getTotal());
+            } else {
+                List<InventoryMaterialSummary> list  = inventoryMaterialSummaryService.list(lambdaQueryWrapper);
+                //筛选库存汇总数据的专用方法
+                List<InventoryMaterialSummary> details = inventoryMaterialSummaryService.inventoryMaterialSummarySelect(list) ;
+                if(details == null){
+                    details = Collections.emptyList();
+                }
+                return getDataTable(details);
+            }
+        //空List
+        //return getDataTable(Collections.emptyList());
+    }
+
+
+    /**
+     * 库存汇总子单列表
+     */
+    @PostMapping("/cycleCountDetailChild")
+    @Log(title = "库存-盘点",operating = "查看盘点明细子单", action = BusinessType.GRANT)
+    @ResponseBody
+    public TableDataInfo cycleCountDetailChild(InventoryMaterialSummary inventoryMaterialSummaryChild, String createdBegin, String createdEnd)  {
+
+        LambdaQueryWrapper<InventoryMaterialSummary> lambdaQueryWrapper = Wrappers.lambdaQuery();
+        PageDomain pageDomain = TableSupport.buildPageRequest();
+        Integer pageNum = pageDomain.getPageNum();
+        Integer pageSize = pageDomain.getPageSize();
+        lambdaQueryWrapper
+                //仓库
+                .eq(InventoryMaterialSummary::getWarehouseCode, ShiroUtils.getWarehouseCode())
+                //物料编码
+                .eq(InventoryMaterialSummary::getMaterialCode,inventoryMaterialSummaryChild.getMaterialCode());
+                //.orderByDesc(InventoryMaterialSummary::getId);
+
+        if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) {
+            //分页查询
+            Page<InventoryMaterialSummary> page = new Page<>(pageNum, pageSize);
+            IPage<InventoryMaterialSummary> iPage = inventoryMaterialSummaryService.page(page, lambdaQueryWrapper);
+            return getMpDataTable(iPage.getRecords(), iPage.getTotal());
+        } else {
+            List<InventoryMaterialSummary> list  = inventoryMaterialSummaryService.list(lambdaQueryWrapper);
+            return getDataTable(list);
+        }
+
+    }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
diff --git a/src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/domain/InventoryMaterialSummary.java b/src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/domain/InventoryMaterialSummary.java
new file mode 100644
index 0000000..284c52a
--- /dev/null
+++ b/src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/domain/InventoryMaterialSummary.java
@@ -0,0 +1,317 @@
+package com.huaheng.pc.inventory.InventoryMaterialSummary.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+@ApiModel(value="com.huaheng.pc.inventory.InventoryMaterialSummary.domain.InventoryDetail")
+@Data
+@TableName(value = "inventory_detail")
+public class InventoryMaterialSummary implements Serializable {
+
+
+    /**
+     * ID
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    @ApiModelProperty(value="ID")
+    private Integer id;
+
+    /**
+     * 库存头ID
+     */
+    @TableField(value = "inventoryHeaderId")
+    @ApiModelProperty(value="库存头ID")
+    private Integer inventoryHeaderId;
+
+    /**
+     * 仓库
+     */
+    @TableField(value = "warehouseCode")
+    @ApiModelProperty(value="仓库")
+    private String warehouseCode;
+
+    /**
+     * 货主
+     */
+    @TableField(value = "companyCode")
+    @ApiModelProperty(value="货主")
+    private String companyCode;
+
+    /**
+     * 货位
+     */
+    @TableField(value = "locationCode")
+    @ApiModelProperty(value="货位")
+    private String locationCode;
+
+    /**
+     * 容器
+     */
+    @TableField(value = "containerCode")
+    @ApiModelProperty(value="容器")
+    private String containerCode;
+
+    /**
+     * 商品编码
+     */
+    @TableField(value = "materialCode")
+    @ApiModelProperty(value="商品编码")
+    private String materialCode;
+
+    /**
+     * 商品名称
+     */
+    @TableField(value = "materialName")
+    @ApiModelProperty(value="商品名称")
+    private String materialName;
+
+    /**
+     * 商品规格
+     */
+    @TableField(value = "materialSpec")
+    @ApiModelProperty(value="商品规格")
+    private String materialSpec;
+
+    /**
+     * 商品单位
+     */
+    @TableField(value = "materialUnit")
+    @ApiModelProperty(value="商品单位")
+    private String materialUnit;
+
+    /**
+     * 在库数量
+     */
+    @TableField(value = "qty")
+    @ApiModelProperty(value="在库数量")
+    private BigDecimal qty;
+
+    /**
+     * 任务数量
+     */
+    @TableField(value = "taskQty")
+    @ApiModelProperty(value="任务数量")
+    private BigDecimal taskQty;
+
+    /**
+     * 冻结数量
+     */
+    @TableField(value = "lockedQty")
+    @ApiModelProperty(value="冻结数量")
+    private BigDecimal lockedQty;
+
+    /**
+     * 库存状态
+     */
+    @TableField(value = "inventorySts")
+    @ApiModelProperty(value="库存状态")
+    private String inventorySts;
+
+    /**
+     * 供应商编码
+     */
+    @TableField(value = "supplierCode")
+    @ApiModelProperty(value="供应商编码")
+    private String supplierCode;
+
+    /**
+     * 关联上游单号
+     */
+    @TableField(value = "referCode")
+    @ApiModelProperty(value="关联上游单号")
+    private String referCode;
+
+    /**
+     * 关联上游单号的行号
+     */
+    @TableField(value = "referDetailId")
+    @ApiModelProperty(value="关联上游单号的行号")
+    private String referDetailId;
+
+    /**
+     * 批次
+     */
+    @TableField(value = "batch")
+    @ApiModelProperty(value="批次")
+    private String batch;
+
+    /**
+     * 批号
+     */
+    @TableField(value = "lot")
+    @ApiModelProperty(value="批号")
+    private String lot;
+
+    /**
+     * 项目号
+     */
+    @TableField(value = "projectNo")
+    @ApiModelProperty(value="项目号")
+    private String projectNo;
+
+    /**
+     * 质检
+     */
+    @TableField(value = "qcCheck")
+    @ApiModelProperty(value="质检")
+    private String qcCheck;
+
+    /**
+     * 重量
+     */
+    @TableField(value = "weight")
+    @ApiModelProperty(value="重量")
+    private String weight;
+
+    /**
+     * 生产日期
+     */
+    @TableField(value = "manufactureDate")
+    @ApiModelProperty(value="生产日期")
+    private Date manufactureDate;
+
+    /**
+     * 失效日期
+     */
+    @TableField(value = "expirationDate")
+    @ApiModelProperty(value="失效日期")
+    private Date expirationDate;
+
+    /**
+     * 入库日期
+     */
+    @TableField(value = "agingDate")
+    @ApiModelProperty(value="入库日期")
+    private Date agingDate;
+
+    /**
+     * 属性号
+     */
+    @TableField(value = "attributeId")
+    @ApiModelProperty(value="属性号")
+    private String attributeId;
+
+    /**
+     * 属性1
+     */
+    @TableField(value = "attribute1")
+    @ApiModelProperty(value="属性1")
+    private String attribute1;
+
+    /**
+     * 属性2
+     */
+    @TableField(value = "attribute2")
+    @ApiModelProperty(value="属性2")
+    private String attribute2;
+
+    /**
+     * 属性3
+     */
+    @TableField(value = "attribute3")
+    @ApiModelProperty(value="属性3")
+    private String attribute3;
+
+    /**
+     * 锁 (质检、出库、盘点这三个都可能锁定库存)
+     */
+    @TableField(value = "lockCode")
+    @ApiModelProperty(value="锁 (质检、出库、盘点这三个都可能锁定库存)")
+    private String lockCode;
+
+    /**
+     * 上次盘点日期
+     */
+    @TableField(value = "lastCycleCountDate")
+    @ApiModelProperty(value="上次盘点日期")
+    private Date lastCycleCountDate;
+
+    /**
+     * 创建时间
+     */
+    @TableField(value = "created")
+    @ApiModelProperty(value="创建时间")
+    private Date created;
+
+    /**
+     * 创建用户
+     */
+    @TableField(value = "createdBy")
+    @ApiModelProperty(value="创建用户")
+    private String createdBy;
+
+    /**
+     * 创建时间
+     */
+    @TableField(value = "lastUpdated")
+    @ApiModelProperty(value="创建时间")
+    private Date lastUpdated;
+
+    /**
+     * 更新用户
+     */
+    @TableField(value = "lastUpdatedBy")
+    @ApiModelProperty(value="更新用户")
+    private String lastUpdatedBy;
+
+    /**
+     * 自定义字段1
+     */
+    @TableField(value = "userDef1")
+    @ApiModelProperty(value="自定义字段1")
+    private String userDef1;
+
+    /**
+     * 自定义字段2
+     */
+    @TableField(value = "userDef2")
+    @ApiModelProperty(value="自定义字段2")
+    private String userDef2;
+
+    /**
+     * 自定义字段3
+     */
+    @TableField(value = "userDef3")
+    @ApiModelProperty(value="自定义字段3")
+    private String userDef3;
+
+    /**
+     * 处理标记
+     */
+    @TableField(value = "processStamp")
+    @ApiModelProperty(value="处理标记")
+    private String processStamp;
+
+    /**
+     * 入库单编码
+     */
+    @TableField(value = "receiptCode")
+    @ApiModelProperty(value="入库单编码")
+    private String receiptCode;
+
+    /**
+     * 入库单明细ID
+     */
+    @TableField(value = "receiptDetailId")
+    @ApiModelProperty(value="入库单明细ID")
+    private Integer receiptDetailId;
+
+    /**
+     * 总数
+     * 非数据库表字段
+     * */
+    @TableField(exist = false)
+    private BigDecimal total;
+
+
+    private static final long serialVersionUID = 1L;
+}
\ No newline at end of file
diff --git a/src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/mapper/InventoryMaterialSummaryMapper.java b/src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/mapper/InventoryMaterialSummaryMapper.java
new file mode 100644
index 0000000..58bc766
--- /dev/null
+++ b/src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/mapper/InventoryMaterialSummaryMapper.java
@@ -0,0 +1,20 @@
+package com.huaheng.pc.inventory.InventoryMaterialSummary.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.huaheng.pc.inventory.InventoryMaterialSummary.domain.InventoryMaterialSummary;
+
+public interface InventoryMaterialSummaryMapper extends BaseMapper<InventoryMaterialSummary> {
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
diff --git a/src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/service/InventoryMaterialSummaryChildService.java b/src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/service/InventoryMaterialSummaryChildService.java
new file mode 100644
index 0000000..e1e5ba8
--- /dev/null
+++ b/src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/service/InventoryMaterialSummaryChildService.java
@@ -0,0 +1,15 @@
+package com.huaheng.pc.inventory.InventoryMaterialSummary.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.huaheng.pc.inventory.InventoryMaterialSummary.domain.InventoryMaterialSummary;
+
+public interface InventoryMaterialSummaryChildService extends IService<InventoryMaterialSummary> {
+
+
+
+
+
+
+
+
+}
diff --git a/src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/service/InventoryMaterialSummaryChildServiceImpl.java b/src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/service/InventoryMaterialSummaryChildServiceImpl.java
new file mode 100644
index 0000000..f4c0e40
--- /dev/null
+++ b/src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/service/InventoryMaterialSummaryChildServiceImpl.java
@@ -0,0 +1,19 @@
+package com.huaheng.pc.inventory.InventoryMaterialSummary.service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.huaheng.pc.inventory.InventoryMaterialSummary.domain.InventoryMaterialSummary;
+import com.huaheng.pc.inventory.InventoryMaterialSummary.mapper.InventoryMaterialSummaryMapper;
+import org.springframework.stereotype.Service;
+
+
+@Service
+public class InventoryMaterialSummaryChildServiceImpl extends ServiceImpl<InventoryMaterialSummaryMapper, InventoryMaterialSummary> implements InventoryMaterialSummaryChildService{
+
+
+
+
+
+
+
+
+}
diff --git a/src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/service/InventoryMaterialSummaryService.java b/src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/service/InventoryMaterialSummaryService.java
new file mode 100644
index 0000000..e5f7986
--- /dev/null
+++ b/src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/service/InventoryMaterialSummaryService.java
@@ -0,0 +1,17 @@
+package com.huaheng.pc.inventory.InventoryMaterialSummary.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.huaheng.pc.inventory.InventoryMaterialSummary.domain.InventoryMaterialSummary;
+
+import java.util.List;
+
+public interface InventoryMaterialSummaryService extends IService<InventoryMaterialSummary> {
+
+    /**
+     * 查询库存汇总数据的专用方法
+     * */
+    List<InventoryMaterialSummary> inventoryMaterialSummarySelect(List<InventoryMaterialSummary> inventoryMaterialSummaryList);
+
+
+
+}
diff --git a/src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/service/InventoryMaterialSummaryServiceImpl.java b/src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/service/InventoryMaterialSummaryServiceImpl.java
new file mode 100644
index 0000000..0a48537
--- /dev/null
+++ b/src/main/java/com/huaheng/pc/inventory/InventoryMaterialSummary/service/InventoryMaterialSummaryServiceImpl.java
@@ -0,0 +1,45 @@
+package com.huaheng.pc.inventory.InventoryMaterialSummary.service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.huaheng.pc.inventory.InventoryMaterialSummary.domain.InventoryMaterialSummary;
+import com.huaheng.pc.inventory.InventoryMaterialSummary.mapper.InventoryMaterialSummaryMapper;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+
+@Service
+public class InventoryMaterialSummaryServiceImpl extends ServiceImpl<InventoryMaterialSummaryMapper, InventoryMaterialSummary>  implements InventoryMaterialSummaryService{
+
+
+
+
+
+
+    /**
+     * 筛选库存汇总数据的专用方法
+     * */
+    @Override
+    public List<InventoryMaterialSummary> inventoryMaterialSummarySelect(List<InventoryMaterialSummary> inventoryMaterialSummaryList) {
+
+
+
+        return null;
+    }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
diff --git a/src/main/resources/templates/inventory/inventoryMaterialSummary/inventoryMaterialSummary.html b/src/main/resources/templates/inventory/inventoryMaterialSummary/inventoryMaterialSummary.html
new file mode 100644
index 0000000..b0d06d2
--- /dev/null
+++ b/src/main/resources/templates/inventory/inventoryMaterialSummary/inventoryMaterialSummary.html
@@ -0,0 +1,269 @@
+<!DOCTYPE HTML>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+<meta charset="utf-8">
+<head th:include="include :: header"></head>
+<body class="gray-bg">
+<div class="container-div">
+<div class="row">
+    <div class="col-sm-12">
+        <div class="col-sm-12 select-info">
+            <form id="inventoryMaterialSummary-form">
+            <div class="select-list">
+                <ul>
+                    <li>
+                        仓库:<input  id="warehouseCode" type="text" name="warehouseCode" th:value="${warehouseCode}" readonly="readonly" />
+                    </li>
+                    <li>
+                        物料编码:<input id="materialCode" type="text" name="materialCode" />
+                    </li>
+                    <li>
+                        物料名称:<input id="materialName" type="text" name="materialName" />
+                    </li>
+                    <li>
+                    <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
+                    </li>
+                </ul>
+            </div>
+            </form>
+        </div>
+        <div class="btn-group hidden-xs" id="toolbar" role="group">
+            <a class="btn btn-outline btn-danger btn-rounded" onclick="batRemove()">
+                <i class="fa fa-trash-o"></i> 删除
+            </a>
+        </div>
+        <div class="col-sm-12 select-info">
+        <table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered table-hover"></table>
+        </div>
+    </div>
+</div>
+</div>
+<div th:include="include :: footer"></div>
+<script th:inline="javascript">
+    var prefix = ctx + "inventory/inventoryMaterialSummary";
+
+        $(function () {
+                var options = {
+                    url: prefix + "/list",
+                    modalName: "库存汇总",
+                    sortName: "materialCode",
+                    sortOrder: "asc",
+                    pagination: true,  //是否分页
+                    search: false,
+                    showSearch: false,
+                    showRefresh: true,
+                    refresh:true,
+                    detailView: true,
+
+                    queryParams : {
+                        //传值
+                        warehouseCode : $('#warehouseCode').val(),
+
+                    },
+                    onExpandRow : function(index, row, $detail) {
+                        detailChildTable(index, row, $detail);
+                    },
+                    columns: [
+                        {
+                            radio: true
+                        },
+                        {
+                            field: 'warehouseCode',
+                            title: '仓库 ',
+                            visible: true
+                        },
+                        /*{
+                            field: 'companyCode',
+                            title: '货主编码'
+                        },*/
+                        {
+                            field: 'total',
+                            title: '库存总数量'
+                        },
+                        {
+                            field: 'materialCode',
+                            title: '物料编码'
+                        },
+                        {
+                            field: 'materialName',
+                            title: '物料名称'
+                        },
+                        {
+                            field: 'materialSpec',
+                            title: '物料规格'
+                        },
+                        {
+                            field: 'materialUnit',
+                            title: '物料单位'
+                        },
+                        /*{
+                            field: 'weight',
+                            title: '总重量'
+                        },*/
+                        {
+                            title: '操作',
+                            align: 'center',
+                            formatter: function (value, row, index) {
+                                var actions = [];
+                                if(row.enableStatus  === 1 ){
+                                    //actions.push('<a class="btn btn-primary btn-xs ' + createTaskFalg + '" href="#" onclick="outcheck(\'' + row.id + '\')"><i class="fa fa-gbp"></i>生成盘点单</a> ');
+                            }
+                                return actions.join('');
+                            }
+                        }
+                    ]
+                };
+                $.table.init(options);
+            });
+
+        //子表
+        detailChildTable = function(index, row, $detail) {
+            let childTable = $detail.html('<table style="table-layout:fixed"></table>').find('table');
+            $(childTable).bootstrapTable({
+                url: prefix + "/inventoryMaterialSummaryChild",
+                method: 'post',
+                sortName: "id",
+                sortOrder: "desc",
+
+                contentType: "application/x-www-form-urlencoded",
+                //页面渲染
+                responseHandler: responseHandler,
+                queryParams : {
+                    //传值
+                    warehouseCode : $('#warehouseCode').val(),
+                    materialCode: row.materialCode,
+                    //materialName: row.materialName,
+                },
+                columns: [
+                    {
+                        field: 'id',
+                        title: '库存ID',
+                        sortable: true,
+                        width: 80
+                    },
+                    {
+                        field: 'locationCode',
+                        title: '库位编号',
+                        visible: true,
+                        width: 200
+                    },
+                    {
+                        field: 'containerCode',
+                        title: '容器编号',
+                        visible: true,
+                        width: 150
+                    },
+                    {
+                        field: 'companyCode',
+                        title: '货主编码',
+                        visible: true,
+                        width: 80
+                    },
+                    {
+                        field: 'materialCode',
+                        title: '物料编码',
+                        width: 200
+                    },
+                    {
+                        field: 'materialName',
+                        title: '物料名称',
+                        width: 200
+                    },
+                    {
+                        field: 'materialSpec',
+                        title: '物料规格',
+                        visible: false
+                    },
+                    {
+                        field: 'qty',
+                        title: '库存数量'
+                    },
+                    {
+                        field: 'materialUnit',
+                        title: '物料单位',
+                        visible: false,
+
+                    },
+                    {
+                        field: 'projectNo',
+                        title: '项目号',
+                        visible: true,
+                        sortable: true
+                    },
+                    {
+                        field: 'batch',
+                        title: '批次',
+                        sortable: true,
+                        visible: true
+                    },
+                    {
+                        field: 'lot',
+                        title: '批号',
+                        sortable: true,
+                        visible: false
+                    },
+                    {
+                        field: 'receiptCode',
+                        title: '入库单编码',
+                        visible: false
+                    },
+                    /*{
+                        title: '操作',
+                        align: 'center',
+                        width: 200,
+                        formatter: function (value, row, index) {
+                            var actions = [];
+                                actions.push('<a class="btn btn-success btn-xs ' + confirmFlag + '" href="#" onclick="confirmGapQty(\'' + row.id + '\')"><i class="fa fa-comment"></i>实盘登记</a> ');
+                            return actions.join('');
+                        }
+                    }*/
+
+                ]
+            });
+        };
+
+    /*__________*/
+
+    function open(title, url, width, height){
+        if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {
+            width = 'auto';
+            height = 'auto';
+        }
+        if (title==null){
+            title = false;
+        }
+        if (url==null){
+            url="404.html";
+        }
+        if ($.common.isEmpty(width)) {
+            width = 800;
+            // width = ($(window).width() - 100);
+        }
+        if ($.common.isEmpty(height)) {
+            height = ($(window).height() - 50);
+        }
+        layer.open({
+            type: 2,
+            area: [width + 'px', height + 'px'],
+            fix: false,
+            //不固定
+            maxmin: true,
+            shade: 0.3,
+            title: title,
+            content: url
+            // shadeClose: true, //点击遮罩关闭层
+        })
+    }
+
+    function responseHandler(res) {
+        if (res.code == 200) {
+            return { rows: res.data, total: res.total, code: 0};
+        } else {
+            $.modal.alertWarning(res.msg);
+            return { rows: [], total: 0 };
+        }
+    }
+
+
+</script>
+</body>
+</html>
\ No newline at end of file
--
libgit2 0.22.2