自动化立体仓库 - WMS系统
zhangchao
2024-11-08 b0936f893a4712eebf55030bbdab159db8fe9d58
功能优化(搜索条件添加,excel导出)
10个文件已修改
3个文件已添加
844 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/ReportDownloadController.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/ReportQueryController.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/ViewWorkInBean.java 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application-dev.yml 106 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application-loc.yml 106 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application-prod.yml 106 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application.yml 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/ViewWorkInMapper.xml 304 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/common.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/report/workIn.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/report/workOut.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/report/viewWorkIn.html 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/report/viewWorkOut.html 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/ReportDownloadController.java
@@ -11,6 +11,7 @@
import com.zy.asrs.mapper.ReportQueryMapper;
import com.zy.asrs.service.AgvWrkMastLogService;
import com.zy.common.web.BaseController;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -22,6 +23,7 @@
import java.util.List;
import java.util.Map;
@Slf4j
@RestController
@RequestMapping("/report/download")
public class ReportDownloadController extends BaseController {
@@ -182,14 +184,14 @@
     * @since 2.1.1
     */
    @RequestMapping("/out")
    public void out(HttpServletResponse response, @RequestParam(required = false) ViewWorkInBean bean) throws IOException {
    public void out(HttpServletResponse response, @RequestParam(required = false) Map<String, Object> bean) throws IOException {
        try {
            response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
            response.setCharacterEncoding("utf-8");
            // 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系
            String fileName = URLEncoder.encode("日出库明细统计", "UTF-8").replaceAll("\\+", "%20");
            response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
            List<ViewWorkInBean> list = reportQueryMapper.queryViewWorkOutList(bean);
            List<ViewWorkInBean> list = reportQueryMapper.queryViewWorkOutList(JSON.parseObject(JSON.toJSONString(bean), ViewWorkInBean.class));
            // 这里需要设置不关闭流
            EasyExcel.write(response.getOutputStream(), ViewWorkInBean.class).autoCloseStream(Boolean.FALSE).sheet("sheet1").doWrite(list);
        } catch (Exception e) {
@@ -211,14 +213,15 @@
     * @since 2.1.1
     */
    @RequestMapping("/in")
    public void in(HttpServletResponse response, @RequestParam(required = false) ViewWorkInBean bean) throws IOException {
    public void in(HttpServletResponse response, @RequestParam(required = false) Map<String, Object> bean) throws IOException {
        try {
            response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
            response.setCharacterEncoding("utf-8");
            // 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系
            String fileName = URLEncoder.encode("日入库明细统计", "UTF-8").replaceAll("\\+", "%20");
            response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
            List<ViewWorkInBean> list = reportQueryMapper.queryViewWorkInList(bean);
            ViewWorkInBean viewWorkInBean = JSON.parseObject(JSON.toJSONString(bean), ViewWorkInBean.class);
            List<ViewWorkInBean> list = reportQueryMapper.queryViewWorkInList(viewWorkInBean);
            // 这里需要设置不关闭流
            EasyExcel.write(response.getOutputStream(), ViewWorkInBean.class).autoCloseStream(Boolean.FALSE).sheet("sheet1").doWrite(list);
        } catch (Exception e) {
src/main/java/com/zy/asrs/controller/ReportQueryController.java
@@ -169,6 +169,9 @@
    @RequestMapping("/viewWorkInList.action")
    public Map<String,Object> viewWorkInList(ViewWorkInBean bean){
        List<ViewWorkInBean> list = reportQueryMapper.queryViewWorkInList(bean);
        for (ViewWorkInBean viewWorkInBean : list) {
            viewWorkInBean.sype();
        }
        int count = reportQueryMapper.getViewWorkInCount(bean);
        Page<ViewWorkInBean> page = new Page<>();
        page.setRecords(list);
@@ -247,6 +250,9 @@
    @RequestMapping("/viewWorkOutList.action")
    public R viewWorkOutList(ViewWorkInBean bean){
        List<ViewWorkInBean> list = reportQueryMapper.queryViewWorkOutList(bean);
        for (ViewWorkInBean viewWorkInBean : list) {
            viewWorkInBean.sype();
        }
        int count = reportQueryMapper.getViewWorkOutCount(bean);
        Page<ViewWorkInBean> page = new Page<>();
        page.setRecords(list);
src/main/java/com/zy/asrs/entity/ViewWorkInBean.java
@@ -6,6 +6,7 @@
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.core.common.Cools;
import com.core.common.SpringUtils;
import com.zy.asrs.service.BasLocType1Service;
import com.zy.system.entity.User;
import com.zy.system.service.UserService;
import lombok.Data;
@@ -22,11 +23,12 @@
@Data
public class ViewWorkInBean {
    @ExcelIgnore
    private int pageNumber;
    @ExcelIgnore
    private int pageSize;
    private Integer pageNumber;
    @ExcelIgnore
    private Integer pageSize;
    @ExcelIgnore
    private int stay_time;
@@ -65,11 +67,22 @@
    @ExcelProperty(value = "库位号")
    private String loc_no;
    @ExcelProperty(value = "货站码")
    @ExcelProperty(value = "货架条码")
    private String supp_code;
    @ExcelProperty(value = "货架条码")
    private String zpallet;
    @ExcelIgnore
    private Long loc_type1;
    @ExcelProperty(value = "库位类型")
    private String loc_type1$;
    @ExcelProperty(value = "楼层")
    private Integer floor;
    @ExcelProperty(value = "数量")
    private Double anfme;
@@ -141,10 +154,8 @@
    private Double volume;
    @ExcelProperty(value = "供应商")
    private String supp;
    @ExcelIgnore
@@ -269,6 +280,15 @@
        appeTime = appe_time;
    }
    public String getLoc_type1$() {
        BasLocType1Service service = SpringUtils.getBean(BasLocType1Service.class);
        BasLocType1 basLocType1 = service.selectById(this.loc_type1);
        if (!Cools.isEmpty(basLocType1)) {
            return String.valueOf(basLocType1.getLocDesc());
        }
        return null;
    }
    public String getModiUser$() {
        UserService service = SpringUtils.getBean(UserService.class);
        User user = service.selectById(this.modi_user);
src/main/resources/application-dev.yml
New file
@@ -0,0 +1,106 @@
server:
  port: 8080
  servlet:
    context-path: /@pom.build.finalName@
spring:
  application:
    name: @pom.build.finalName@
  jmx:
    enabled: false
  datasource:
    driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
    #url: jdbc:sqlserver://127.0.0.1:1433;databasename=phyzasrs
    url: jdbc:sqlserver://127.0.0.1:1433;databasename=phyzasrs
    username: sa
    password: sa@123
  mvc:
    static-path-pattern: /**
  redis:
    host: 127.0.0.1
    port: 6379
    database: 0
  #    password: xltys1995
  servlet:
    multipart:
      maxFileSize: 100MB
      maxRequestSize: 100MB
mybatis-plus:
  mapper-locations: classpath:mapper/*.xml
#  global-config:
#    field-strategy: 0
#  configuration:
#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
logging:
  path: /stock/out/@pom.build.finalName@/logs
super:
  pwd: xltys1995
swagger:
  enable: false
#License相关配置
license:
  subject: phyzasrs
  publicAlias: publicCert
  storePass: public_zhongyang_123456789
  licensePath: license.lic
  publicKeysStorePath: publicCerts.keystore
# 下位机配置
wcs-slave:
  # 双深
  doubleDeep: true
  # 双深库位排号
  doubleLocs: 32
  # 一个堆垛机负责的货架排数
  groupCount: 2
  url: http://127.0.0.1:9090/tzskwcs
#入库暂存数
store:
  bufferCount: 2
erp:
  db:
    driver_class_name: com.microsoft.sqlserver.jdbc.SQLServerDriver
    ur: jdbc:sqlserver://192.168.1.55:1433;databasename=ufdata_998_2022
    username: WMS
    password: Wlzh44338
agv:
  #  url: localhost:8080
  #  taskCreatePath: /agv/task/create
  #  containerMoveInPath: /agv/container/moveIn
  #  containerMoveOutPath: /agv/container/moveOut
  #  containerArrivedPath: /agv/containerArrived
  url: 192.168.103.12:8182
  taskCreatePath: /rcms/services/rest/hikRpcService/genAgvSchedulingTask
  taskCancelPath: /rcms/services/rest/hikRpcService/cancelTask
  containerMoveInPath: /expand/api/moveIn/container
  containerMoveOutPath: /expand/api/moveOut/container
  containerArrivedPath: /conveyor/containerArrived
u8:
  url: http://192.168.9.3:8877
  orderReportPath: /DBMS/U8/CM/add
#ERP:
#  url: http://39.184.149.30:8877
#  orderReportPath: /DBMS/U8/CM/add
mes:
  url: https://v3-ali.blacklake.cn/api/openapi/domain/web/v1/route
  orderReportPath: /inventory/open/v2/transfer_order/ordinary/_execute
  pakinReportPath: /inventory/open/v2/inbound_order/execute/_inbound
  buyPakinReportPath: /schedule-for-yinzuo/open/yinzuo/inboundOrder
  pakoutReportPath: /inventory/open/v2/outbound_order/_outbound_by_suggest
  getTokenUrl: https://v3-ali.blacklake.cn
  getTokenPath: /api/openapi/domain/api/v1/access_token/_get_access_token
  appKey: cli_1712644281065780
  appSecret: 6710d24e31e64adc963d4c213b2c9b8e
agvBasDev:
  maxWorkNum: 1
src/main/resources/application-loc.yml
New file
@@ -0,0 +1,106 @@
server:
  port: 8080
  servlet:
    context-path: /@pom.build.finalName@
spring:
  application:
    name: @pom.build.finalName@
  jmx:
    enabled: false
  datasource:
    driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
    #url: jdbc:sqlserver://127.0.0.1:1433;databasename=phyzasrs
    url: jdbc:sqlserver://192.168.108.248:1433;databasename=phyzasrs
    username: sa
    password: sa@123
  mvc:
    static-path-pattern: /**
  redis:
    host: 127.0.0.1
    port: 6379
    database: 0
  #    password: xltys1995
  servlet:
    multipart:
      maxFileSize: 100MB
      maxRequestSize: 100MB
mybatis-plus:
  mapper-locations: classpath:mapper/*.xml
#  global-config:
#    field-strategy: 0
#  configuration:
#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
logging:
  path: stock/out/@pom.build.finalName@/logs
super:
  pwd: xltys1995
swagger:
  enable: false
#License相关配置
license:
  subject: phyzasrs
  publicAlias: publicCert
  storePass: public_zhongyang_123456789
  licensePath: license.lic
  publicKeysStorePath: publicCerts.keystore
# 下位机配置
wcs-slave:
  # 双深
  doubleDeep: true
  # 双深库位排号
  doubleLocs: 32
  # 一个堆垛机负责的货架排数
  groupCount: 2
  url: http://127.0.0.1:9090/tzskwcs
#入库暂存数
store:
  bufferCount: 2
erp:
  db:
    driver_class_name: com.microsoft.sqlserver.jdbc.SQLServerDriver
    ur: jdbc:sqlserver://192.168.1.55:1433;databasename=ufdata_998_2022
    username: WMS
    password: Wlzh44338
agv:
  #  url: localhost:8080
  #  taskCreatePath: /agv/task/create
  #  containerMoveInPath: /agv/container/moveIn
  #  containerMoveOutPath: /agv/container/moveOut
  #  containerArrivedPath: /agv/containerArrived
  url: 192.168.103.12:8182
  taskCreatePath: /rcms/services/rest/hikRpcService/genAgvSchedulingTask
  taskCancelPath: /rcms/services/rest/hikRpcService/cancelTask
  containerMoveInPath: /expand/api/moveIn/container
  containerMoveOutPath: /expand/api/moveOut/container
  containerArrivedPath: /conveyor/containerArrived
u8:
  url: http://192.168.9.3:8877
  orderReportPath: /DBMS/U8/CM/add
#ERP:
#  url: http://39.184.149.30:8877
#  orderReportPath: /DBMS/U8/CM/add
mes:
  url: https://v3-ali.blacklake.cn/api/openapi/domain/web/v1/route
  orderReportPath: /inventory/open/v2/transfer_order/ordinary/_execute
  pakinReportPath: /inventory/open/v2/inbound_order/execute/_inbound
  buyPakinReportPath: /schedule-for-yinzuo/open/yinzuo/inboundOrder
  pakoutReportPath: /inventory/open/v2/outbound_order/_outbound_by_suggest
  getTokenUrl: https://v3-ali.blacklake.cn
  getTokenPath: /api/openapi/domain/api/v1/access_token/_get_access_token
  appKey: cli_1712644281065780
  appSecret: 6710d24e31e64adc963d4c213b2c9b8e
agvBasDev:
  maxWorkNum: 1
src/main/resources/application-prod.yml
New file
@@ -0,0 +1,106 @@
server:
  port: 8080
  servlet:
    context-path: /@pom.build.finalName@
spring:
  application:
    name: @pom.build.finalName@
  jmx:
    enabled: false
  datasource:
    driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
    url: jdbc:sqlserver://127.0.0.1:1433;databasename=phyzasrs
    #url: jdbc:sqlserver://192.168.108.248:1433;databasename=phyzasrs
    username: sa
    password: sa@123
  mvc:
    static-path-pattern: /**
  redis:
    host: 127.0.0.1
    port: 6379
    database: 0
  #    password: xltys1995
  servlet:
    multipart:
      maxFileSize: 100MB
      maxRequestSize: 100MB
mybatis-plus:
  mapper-locations: classpath:mapper/*.xml
#  global-config:
#    field-strategy: 0
#  configuration:
#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
logging:
  path: /stock/out/@pom.build.finalName@/logs
super:
  pwd: xltys1995
swagger:
  enable: false
#License相关配置
license:
  subject: phyzasrs
  publicAlias: publicCert
  storePass: public_zhongyang_123456789
  licensePath: license.lic
  publicKeysStorePath: publicCerts.keystore
# 下位机配置
wcs-slave:
  # 双深
  doubleDeep: true
  # 双深库位排号
  doubleLocs: 32
  # 一个堆垛机负责的货架排数
  groupCount: 2
  url: http://127.0.0.1:9090/tzskwcs
#入库暂存数
store:
  bufferCount: 2
erp:
  db:
    driver_class_name: com.microsoft.sqlserver.jdbc.SQLServerDriver
    ur: jdbc:sqlserver://192.168.1.55:1433;databasename=ufdata_998_2022
    username: WMS
    password: Wlzh44338
agv:
  #  url: localhost:8080
  #  taskCreatePath: /agv/task/create
  #  containerMoveInPath: /agv/container/moveIn
  #  containerMoveOutPath: /agv/container/moveOut
  #  containerArrivedPath: /agv/containerArrived
  url: 192.168.103.12:8182
  taskCreatePath: /rcms/services/rest/hikRpcService/genAgvSchedulingTask
  taskCancelPath: /rcms/services/rest/hikRpcService/cancelTask
  containerMoveInPath: /expand/api/moveIn/container
  containerMoveOutPath: /expand/api/moveOut/container
  containerArrivedPath: /conveyor/containerArrived
u8:
  url: http://192.168.9.3:8877
  orderReportPath: /DBMS/U8/CM/add
#ERP:
#  url: http://39.184.149.30:8877
#  orderReportPath: /DBMS/U8/CM/add
mes:
  url: https://v3-ali.blacklake.cn/api/openapi/domain/web/v1/route
  orderReportPath: /inventory/open/v2/transfer_order/ordinary/_execute
  pakinReportPath: /inventory/open/v2/inbound_order/execute/_inbound
  buyPakinReportPath: /schedule-for-yinzuo/open/yinzuo/inboundOrder
  pakoutReportPath: /inventory/open/v2/outbound_order/_outbound_by_suggest
  getTokenUrl: https://v3-ali.blacklake.cn
  getTokenPath: /api/openapi/domain/api/v1/access_token/_get_access_token
  appKey: cli_1712644281065780
  appSecret: 6710d24e31e64adc963d4c213b2c9b8e
agvBasDev:
  maxWorkNum: 1
src/main/resources/application.yml
@@ -1,106 +1,3 @@
server:
  port: 8080
  servlet:
    context-path: /@pom.build.finalName@
spring:
  application:
    name: @pom.build.finalName@
  jmx:
    enabled: false
  datasource:
    driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
    #url: jdbc:sqlserver://127.0.0.1:1433;databasename=phyzasrs
    url: jdbc:sqlserver://192.168.108.248:1433;databasename=phyzasrs
    username: sa
    password: sa@123
  mvc:
    static-path-pattern: /**
  redis:
    host: 127.0.0.1
    port: 6379
    database: 0
  #    password: xltys1995
  servlet:
    multipart:
      maxFileSize: 100MB
      maxRequestSize: 100MB
mybatis-plus:
  mapper-locations: classpath:mapper/*.xml
#  global-config:
#    field-strategy: 0
#  configuration:
#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
logging:
  path: /stock/out/@pom.build.finalName@/logs
super:
  pwd: xltys1995
swagger:
  enable: false
#License相关配置
license:
  subject: phyzasrs
  publicAlias: publicCert
  storePass: public_zhongyang_123456789
  licensePath: license.lic
  publicKeysStorePath: publicCerts.keystore
# 下位机配置
wcs-slave:
  # 双深
  doubleDeep: true
  # 双深库位排号
  doubleLocs: 32
  # 一个堆垛机负责的货架排数
  groupCount: 2
  url: http://127.0.0.1:9090/tzskwcs
#入库暂存数
store:
  bufferCount: 2
erp:
  db:
    driver_class_name: com.microsoft.sqlserver.jdbc.SQLServerDriver
    ur: jdbc:sqlserver://192.168.1.55:1433;databasename=ufdata_998_2022
    username: WMS
    password: Wlzh44338
agv:
  #  url: localhost:8080
  #  taskCreatePath: /agv/task/create
  #  containerMoveInPath: /agv/container/moveIn
  #  containerMoveOutPath: /agv/container/moveOut
  #  containerArrivedPath: /agv/containerArrived
  url: 192.168.103.12:8182
  taskCreatePath: /rcms/services/rest/hikRpcService/genAgvSchedulingTask
  taskCancelPath: /rcms/services/rest/hikRpcService/cancelTask
  containerMoveInPath: /expand/api/moveIn/container
  containerMoveOutPath: /expand/api/moveOut/container
  containerArrivedPath: /conveyor/containerArrived
u8:
  url: http://192.168.9.3:8877
  orderReportPath: /DBMS/U8/CM/add
#ERP:
#  url: http://39.184.149.30:8877
#  orderReportPath: /DBMS/U8/CM/add
mes:
  url: https://v3-ali.blacklake.cn/api/openapi/domain/web/v1/route
  orderReportPath: /inventory/open/v2/transfer_order/ordinary/_execute
  pakinReportPath: /inventory/open/v2/inbound_order/execute/_inbound
  buyPakinReportPath: /schedule-for-yinzuo/open/yinzuo/inboundOrder
  pakoutReportPath: /inventory/open/v2/outbound_order/_outbound_by_suggest
  getTokenUrl: https://v3-ali.blacklake.cn
  getTokenPath: /api/openapi/domain/api/v1/access_token/_get_access_token
  appKey: cli_1712644281065780
  appSecret: 6710d24e31e64adc963d4c213b2c9b8e
agvBasDev:
  maxWorkNum: 1
  profiles:
    active: dev
src/main/resources/mapper/ViewWorkInMapper.xml
@@ -1,167 +1,187 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zy.asrs.mapper.ReportQueryMapper">
<!-- mapper不支持sql语句嵌套时,采用sql片段包含方式,解决xml标签问题 -->
<sql id="viewWorkInConditionSql">
        <if test="loc_no!=null and loc_no!='' ">
            and loc_no like '%' + #{loc_no} + '%'
        </if>
        <if test="matnr!=null and matnr!='' ">
            and matnr like '%' + #{matnr} + '%'
        </if>
        <if test="maktx!=null and maktx!='' ">
            and (maktx like '%' + #{maktx} + '%'
            or matnr like '%' + #{maktx} + '%'
            or lgnum like '%' + #{maktx} + '%'
            or tbnum like '%' + #{maktx} + '%'
            or tbpos like '%' + #{maktx} + '%'
            or zmatid like '%' + #{maktx} + '%'
            or maktx like '%' + #{maktx} + '%'
            or werks like '%' + #{maktx} + '%'
            or anfme like '%' + #{maktx} + '%'
            or altme like '%' + #{maktx} + '%'
            or zpallet like '%' + #{maktx} + '%'
            or bname like '%' + #{maktx} + '%'
            )
        </if>
        <if test="begin_date!=null and begin_date!='' ">
            <![CDATA[
    <!-- mapper不支持sql语句嵌套时,采用sql片段包含方式,解决xml标签问题 -->
    <sql id="viewWorkInConditionSql">
        <if test="loc_no!=null and loc_no!='' ">
            and loc_no like '%' + #{loc_no} + '%'
        </if>
        <if test="matnr!=null and matnr!='' ">
            and matnr like '%' + #{matnr} + '%'
        </if>
        <if test="maktx!=null and maktx!='' ">
            and (maktx like '%' + #{maktx} + '%'
            or matnr like '%' + #{maktx} + '%'
            or lgnum like '%' + #{maktx} + '%'
            or tbnum like '%' + #{maktx} + '%'
            or tbpos like '%' + #{maktx} + '%'
            or zmatid like '%' + #{maktx} + '%'
            or maktx like '%' + #{maktx} + '%'
            or werks like '%' + #{maktx} + '%'
            or anfme like '%' + #{maktx} + '%'
            or altme like '%' + #{maktx} + '%'
            or zpallet like '%' + #{maktx} + '%'
            or bname like '%' + #{maktx} + '%'
            )
        </if>
        <if test="begin_date!=null and begin_date!='' ">
            <![CDATA[
            and io_time >= #{begin_date}
            ]]>
        </if>
        <if test="end_date!=null and end_date!='' ">
            <![CDATA[
        </if>
        <if test="end_date!=null and end_date!='' ">
            <![CDATA[
            and io_time <= #{end_date}
            ]]>
        </if>
</sql>
        </if>
        <if test="loc_type1!=null ">
            and loc_type1 =#{loc_type1}
        </if>
        <if test="floor!=null">
            and floor =#{floor}
        </if>
    </sql>
<sql id="viewWorkOutConditionSql">
        <if test="loc_no!=null and loc_no!='' ">
            and loc_no like '%' + #{loc_no} + '%'
        </if>
        <if test="matnr!=null and matnr!='' ">
            and matnr like '%' + #{matnr} + '%'
        </if>
        <if test="maktx!=null and maktx!='' ">
            and (maktx like '%' + #{maktx} + '%'
            or matnr like '%' + #{maktx} + '%'
            or lgnum like '%' + #{maktx} + '%'
            or tbnum like '%' + #{maktx} + '%'
            or tbpos like '%' + #{maktx} + '%'
            or zmatid like '%' + #{maktx} + '%'
            or maktx like '%' + #{maktx} + '%'
            or werks like '%' + #{maktx} + '%'
            or anfme like '%' + #{maktx} + '%'
            or altme like '%' + #{maktx} + '%'
            or zpallet like '%' + #{maktx} + '%'
            or bname like '%' + #{maktx} + '%'
            )
        </if>
        <if test="begin_date!=null and begin_date!='' ">
            <![CDATA[
    <sql id="viewWorkOutConditionSql">
        <if test="loc_no!=null and loc_no!='' ">
            and loc_no like '%' + #{loc_no} + '%'
        </if>
        <if test="matnr!=null and matnr!='' ">
            and matnr like '%' + #{matnr} + '%'
        </if>
        <if test="maktx!=null and maktx!='' ">
            and (maktx like '%' + #{maktx} + '%'
            or matnr like '%' + #{maktx} + '%'
            or lgnum like '%' + #{maktx} + '%'
            or tbnum like '%' + #{maktx} + '%'
            or tbpos like '%' + #{maktx} + '%'
            or zmatid like '%' + #{maktx} + '%'
            or maktx like '%' + #{maktx} + '%'
            or werks like '%' + #{maktx} + '%'
            or anfme like '%' + #{maktx} + '%'
            or altme like '%' + #{maktx} + '%'
            or zpallet like '%' + #{maktx} + '%'
            or bname like '%' + #{maktx} + '%'
            )
        </if>
        <if test="begin_date!=null and begin_date!='' ">
            <![CDATA[
            and crn_str_time >= #{begin_date}
            ]]>
        </if>
        <if test="end_date!=null and end_date!='' ">
            <![CDATA[
        </if>
        <if test="end_date!=null and end_date!='' ">
            <![CDATA[
            and crn_str_time <= #{end_date}
            ]]>
        </if>
</sql>
        </if>
        <if test="loc_type1!=null ">
            and loc_type1 =#{loc_type1}
        </if>
        <if test="floor!=null">
            and floor =#{floor}
        </if>
    </sql>
<!-- 入库统计 -->
<!-- 分页查询所有信息 -->
<select id="queryViewWorkInList" parameterType="com.zy.asrs.entity.ViewWorkInBean" resultType="com.zy.asrs.entity.ViewWorkInBean">
    select
    *
    from (
        select
        ROW_NUMBER() OVER(Order by t.io_time desc) as row
        , *
        from (
            select *
            from asr_wrkin_view
            where 1=1
            <include refid="viewWorkInConditionSql"></include>
        ) t
    ) a where 1=1
        <if test="pageNumber!=null and pageSize!=null">
            and a.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
        </if>
</select>
    <!-- 入库统计 -->
    <!-- 分页查询所有信息 -->
    <select id="queryViewWorkInList" parameterType="com.zy.asrs.entity.ViewWorkInBean"
            resultType="com.zy.asrs.entity.ViewWorkInBean">
        select
        *
        from (
        select
        ROW_NUMBER() OVER(Order by t.io_time desc) as row
        , *
        from (
        select *
        from asr_wrkin_view
        where 1=1
        <include refid="viewWorkInConditionSql"></include>
        ) t
        ) a where 1=1
        <if test="pageNumber!=null and pageSize!=null">
            and a.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
        </if>
    </select>
<select id="getViewWorkInCount" parameterType="com.zy.asrs.entity.ViewWorkInBean"    resultType="Integer">
    select count(1)
    from asr_wrkin_view a
    where 1=1
    <include refid="viewWorkInConditionSql"></include>
</select>
    <select id="getViewWorkInCount" parameterType="com.zy.asrs.entity.ViewWorkInBean" resultType="Integer">
        select count(1)
        from asr_wrkin_view a
        where 1=1
        <include refid="viewWorkInConditionSql"></include>
    </select>
<!-- 不分页查询所有信息,用于excel导出 -->
<select id="getViewWorkInAll" parameterType="com.zy.asrs.entity.ViewWorkInBean" resultType="com.zy.asrs.entity.ViewWorkInBean">
<!--    select count(1)-->
<!--    from asr_wrkin_view a-->
<!--    where 1=1-->
<!--    <include refid="viewWorkInConditionSql"></include>-->
    select * from asr_wrkin_view
    where 1=1
    <include refid="viewWorkInConditionSql"></include>
</select>
    <!-- 不分页查询所有信息,用于excel导出 -->
    <select id="getViewWorkInAll" parameterType="com.zy.asrs.entity.ViewWorkInBean"
            resultType="com.zy.asrs.entity.ViewWorkInBean">
        <!--    select count(1)-->
        <!--    from asr_wrkin_view a-->
        <!--    where 1=1-->
        <!--    <include refid="viewWorkInConditionSql"></include>-->
        select * from asr_wrkin_view
        where 1=1
        <include refid="viewWorkInConditionSql"></include>
    </select>
<!-- 不分页查询所有信息,ERP调用 -->
<select id="getViewWorkInERP" parameterType="com.zy.asrs.entity.ViewWorkInBean" resultType="com.zy.asrs.entity.ViewWorkInBean">
    select top 100 * from asr_wrkin_view
    where 1=1
    Order by io_time desc
</select>
    <!-- 不分页查询所有信息,ERP调用 -->
    <select id="getViewWorkInERP" parameterType="com.zy.asrs.entity.ViewWorkInBean"
            resultType="com.zy.asrs.entity.ViewWorkInBean">
        select top 100 *
        from asr_wrkin_view
        where 1 = 1
        Order by io_time desc
    </select>
<!-- 出库统计 -->
<!-- 分页查询所有信息 -->
<select id="queryViewWorkOutList" parameterType="com.zy.asrs.entity.ViewWorkInBean" resultType="com.zy.asrs.entity.ViewWorkInBean">
    <!-- 出库统计 -->
    <!-- 分页查询所有信息 -->
    <select id="queryViewWorkOutList" parameterType="com.zy.asrs.entity.ViewWorkInBean"
            resultType="com.zy.asrs.entity.ViewWorkInBean">
    select
    *
    from (
        select
        ROW_NUMBER() OVER(Order by t.io_time desc) as row
        , *
        from (
            select *
            from asr_wrkout_view
            where 1=1
            <include refid="viewWorkInConditionSql"></include>
        ) t
    ) a where 1=1
    <if test="pageNumber!=null and pageSize!=null">
        and a.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
    </if>
</select>
        select
        *
        from (
        select
        ROW_NUMBER() OVER(Order by t.io_time desc) as row
        , *
        from (
        select *
        from asr_wrkout_view
        where 1=1
        <include refid="viewWorkInConditionSql"></include>
        ) t
        ) a where 1=1
        <if test="pageNumber!=null and pageSize!=null">
            and a.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
        </if>
    </select>
<select id="getViewWorkOutCount" parameterType="com.zy.asrs.entity.ViewWorkInBean"    resultType="Integer">
    select count(1)
    from asr_wrkout_view a
    where 1=1
    <include refid="viewWorkInConditionSql"></include>
</select>
    <select id="getViewWorkOutCount" parameterType="com.zy.asrs.entity.ViewWorkInBean" resultType="Integer">
        select count(1)
        from asr_wrkout_view a
        where 1=1
        <include refid="viewWorkInConditionSql"></include>
    </select>
<!-- 不分页查询所有信息,用于excel导出 -->
<select id="getViewWorkOutAll" parameterType="com.zy.asrs.entity.ViewWorkInBean" resultType="com.zy.asrs.entity.ViewWorkInBean">
    select *
    from asr_wrkout_view a
    where 1=1
    <include refid="viewWorkInConditionSql"></include>
    Order by a.io_time desc
</select>
    <!-- 不分页查询所有信息,用于excel导出 -->
    <select id="getViewWorkOutAll" parameterType="com.zy.asrs.entity.ViewWorkInBean"
            resultType="com.zy.asrs.entity.ViewWorkInBean">
        select *
        from asr_wrkout_view a
        where 1=1
        <include refid="viewWorkInConditionSql"></include>
        Order by a.io_time desc
    </select>
<!-- 不分页查询所有信息,ERP调用 -->
<select id="getViewWorkOutERP" parameterType="com.zy.asrs.entity.ViewWorkInBean" resultType="com.zy.asrs.entity.ViewWorkInBean">
    select top 100 * from asr_wrkout_view
    where 1=1
    Order by io_time desc
</select>
    <!-- 不分页查询所有信息,ERP调用 -->
    <select id="getViewWorkOutERP" parameterType="com.zy.asrs.entity.ViewWorkInBean"
            resultType="com.zy.asrs.entity.ViewWorkInBean">
        select top 100 *
        from asr_wrkout_view
        where 1 = 1
        Order by io_time desc
    </select>
</mapper>
src/main/webapp/static/js/common.js
@@ -230,14 +230,14 @@
    ,{field: 'suppCode', align: 'center',title: '货架码', hide: false}
    ,{field: 'matnr', align: 'center',title: '商品编码'}
    ,{field: 'anfme', align: 'center',title: '数量'}
    ,{field: 'batch', align: 'center',title: '序列码', width: 300, sort:true, hide: true}
    ,{field: 'batch', align: 'center',title: '批次自由项'}
    ,{field: 'maktx', align: 'center',title: '商品名称'}
    ,{field: 'orderNo', align: 'center',title: '单据编号', hide: false}
    ,{field: 'threeCode', align: 'center',title: '销售订单号'}
    ,{field: 'deadTime', align: 'center',title: '销售订单行号' ,hide: true}
    ,{field: 'specs', align: 'center',title: '规格型号', hide: false}
    ,{field: 'model', align: 'center',title: '通用型号', hide: false}
    ,{field: 'processSts$', align: 'center',title: '工序', hide: false}
    ,{field: 'specs', align: 'center',title: '规格型号', hide: true}
    ,{field: 'model', align: 'center',title: '通用型号', hide: true}
    ,{field: 'processSts$', align: 'center',title: '工序', hide: true}
    ,{field: 'brand', align: 'center',title: '商品分类编码', hide: true}
    ,{field: 'color', align: 'center',title: '商品分类名称', hide: true}
src/main/webapp/static/js/report/workIn.js
@@ -3,6 +3,9 @@
    var cols = [
        {field: 'ioTime$', align: 'center', title: '入库日期', width: 200}
        ,{field: 'loc_no', align: 'center',title: '库位号'}
        ,{field: 'floor', align: 'center',title: '楼层'}
        ,{field: 'loc_type1$', align: 'center',title: '库位类型'}
    ];
    cols.push.apply(cols, detlCols);
    return cols;
@@ -92,6 +95,7 @@
                    $.each($('#search-box [name]').serializeArray(), function() {
                        param += this.name + '=' + this.value + '&';
                    });
                    console.log(param);
                    window.location.href = baseUrl + "/report/download/in" + param;
                    layer.closeAll();
                    // var exportData = {};
src/main/webapp/static/js/report/workOut.js
@@ -3,8 +3,8 @@
    var cols = [
        {field: 'ioTime$', align: 'center', title: '出库日期', width: 200}
        ,{field: 'loc_no', align: 'center',title: '库位号'}
        ,{field: 'crn_str_time', align: 'center',title: '堆垛机启动时间'}
        ,{field: 'crn_end_time', align: 'center',title: '堆垛机停止时间'}
        ,{field: 'floor', align: 'center',title: '楼层'}
        ,{field: 'loc_type1$', align: 'center',title: '库位类型'}
    ];
    cols.push.apply(cols, detlCols);
    return cols;
src/main/webapp/views/report/viewWorkIn.html
@@ -29,6 +29,27 @@
            <input class="layui-input" type="text" name="matnr" placeholder="物料号" autocomplete="off">
        </div>
    </div>
    <div class="layui-inline">
        <div class="layui-input-inline">
            <input class="layui-input" type="text" name="supp_code" placeholder="货架码" autocomplete="off">
        </div>
    </div>
    <div class="layui-inline">
        <div class="layui-input-inline">
            <input class="layui-input" type="text" name="floor" placeholder="楼层" autocomplete="off">
        </div>
    </div>
    <div class="layui-inline">
        <div class="layui-input-inline cool-auto-complete">
            <input id="locType1" class="layui-input" type="text" style="display: none" name="loc_type1">
            <input id="locType1$" placeholder="库位类型" class="layui-input cool-auto-complete-div"  onclick="autoShow(this.id)" type="text" onfocus=this.blur()>
            <div class="cool-auto-complete-window">
                <input class="cool-auto-complete-window-input" data-key="basLocType1QueryBylocType1" onkeyup="autoLoad(this.getAttribute('data-key'))">
                <select class="cool-auto-complete-window-select" data-key="basLocType1QueryBylocType1Select" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple">
                </select>
            </div>
        </div>
    </div>
    <div class="layui-inline" style="width: 300px">
        <div class="layui-input-inline">
            <input class="layui-input layui-laydate-range" name="query_date" type="text" placeholder="入库起始时间 - 入库终止时间" autocomplete="off" style="width: 300px">
@@ -53,9 +74,9 @@
<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/common.js?v=3" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/report/workIn.js?v=2" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/report/workIn.js?v=6" charset="utf-8"></script>
</body>
</html>
src/main/webapp/views/report/viewWorkOut.html
@@ -29,6 +29,27 @@
            <input class="layui-input" type="text" name="matnr" placeholder="物料号" autocomplete="off">
        </div>
    </div>
    <div class="layui-inline">
        <div class="layui-input-inline">
            <input class="layui-input" type="text" name="supp_code" placeholder="货架码" autocomplete="off">
        </div>
    </div>
    <div class="layui-inline">
        <div class="layui-input-inline">
            <input class="layui-input" type="text" name="floor" placeholder="楼层" autocomplete="off">
        </div>
    </div>
    <div class="layui-inline">
        <div class="layui-input-inline cool-auto-complete">
            <input id="locType1" class="layui-input" type="text" style="display: none" name="loc_type1">
            <input id="locType1$" placeholder="库位类型" class="layui-input cool-auto-complete-div"  onclick="autoShow(this.id)" type="text" onfocus=this.blur()>
            <div class="cool-auto-complete-window">
                <input class="cool-auto-complete-window-input" data-key="basLocType1QueryBylocType1" onkeyup="autoLoad(this.getAttribute('data-key'))">
                <select class="cool-auto-complete-window-select" data-key="basLocType1QueryBylocType1Select" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple">
                </select>
            </div>
        </div>
    </div>
    <div class="layui-inline" style="width: 300px">
        <div class="layui-input-inline">
            <input class="layui-input layui-laydate-range" name="query_date" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px">
@@ -53,9 +74,9 @@
<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/common.js?v=5" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/report/workOut.js?v=1" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/report/workOut.js?v=4" charset="utf-8"></script>
</body>
</html>