From b0936f893a4712eebf55030bbdab159db8fe9d58 Mon Sep 17 00:00:00 2001 From: zhangchao <zc857179121@qq.com> Date: 星期五, 08 十一月 2024 15:21:53 +0800 Subject: [PATCH] 功能优化(搜索条件添加,excel导出) --- src/main/java/com/zy/asrs/controller/ReportDownloadController.java | 11 src/main/resources/mapper/ViewWorkInMapper.xml | 304 ++++++++++--------- src/main/webapp/static/js/report/workIn.js | 4 src/main/resources/application-prod.yml | 106 +++++++ src/main/webapp/views/report/viewWorkIn.html | 25 + src/main/webapp/static/js/report/workOut.js | 4 src/main/webapp/views/report/viewWorkOut.html | 25 + src/main/resources/application-loc.yml | 106 +++++++ src/main/java/com/zy/asrs/entity/ViewWorkInBean.java | 32 + src/main/resources/application-dev.yml | 106 +++++++ src/main/webapp/static/js/common.js | 8 src/main/resources/application.yml | 107 ------- src/main/java/com/zy/asrs/controller/ReportQueryController.java | 6 13 files changed, 577 insertions(+), 267 deletions(-) diff --git a/src/main/java/com/zy/asrs/controller/ReportDownloadController.java b/src/main/java/com/zy/asrs/controller/ReportDownloadController.java index e6cf1d5..9261a94 100644 --- a/src/main/java/com/zy/asrs/controller/ReportDownloadController.java +++ b/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鍙互闃叉涓枃涔辩爜 褰撶劧鍜宔asyexcel娌℃湁鍏崇郴 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鍙互闃叉涓枃涔辩爜 褰撶劧鍜宔asyexcel娌℃湁鍏崇郴 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) { diff --git a/src/main/java/com/zy/asrs/controller/ReportQueryController.java b/src/main/java/com/zy/asrs/controller/ReportQueryController.java index 5b05f15..9e69514 100644 --- a/src/main/java/com/zy/asrs/controller/ReportQueryController.java +++ b/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); diff --git a/src/main/java/com/zy/asrs/entity/ViewWorkInBean.java b/src/main/java/com/zy/asrs/entity/ViewWorkInBean.java index 96f6f30..1146b3d 100644 --- a/src/main/java/com/zy/asrs/entity/ViewWorkInBean.java +++ b/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); diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml new file mode 100644 index 0000000..6d9c552 --- /dev/null +++ b/src/main/resources/application-dev.yml @@ -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 + diff --git a/src/main/resources/application-loc.yml b/src/main/resources/application-loc.yml new file mode 100644 index 0000000..77f141b --- /dev/null +++ b/src/main/resources/application-loc.yml @@ -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 + diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml new file mode 100644 index 0000000..bb025ae --- /dev/null +++ b/src/main/resources/application-prod.yml @@ -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 + diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 7512ebf..caf4dfc 100644 --- a/src/main/resources/application.yml +++ b/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 \ No newline at end of file diff --git a/src/main/resources/mapper/ViewWorkInMapper.xml b/src/main/resources/mapper/ViewWorkInMapper.xml index d5db4e7..cc06a0e 100644 --- a/src/main/resources/mapper/ViewWorkInMapper.xml +++ b/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涓嶆敮鎸乻ql璇彞宓屽鏃讹紝閲囩敤sql鐗囨鍖呭惈鏂瑰紡锛岃В鍐硏ml鏍囩闂 --> -<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涓嶆敮鎸乻ql璇彞宓屽鏃讹紝閲囩敤sql鐗囨鍖呭惈鏂瑰紡锛岃В鍐硏ml鏍囩闂 --> + <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> diff --git a/src/main/webapp/static/js/common.js b/src/main/webapp/static/js/common.js index a4f9b7a..a744fbb 100644 --- a/src/main/webapp/static/js/common.js +++ b/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} diff --git a/src/main/webapp/static/js/report/workIn.js b/src/main/webapp/static/js/report/workIn.js index 2ca190e..f0c2b43 100644 --- a/src/main/webapp/static/js/report/workIn.js +++ b/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 = {}; diff --git a/src/main/webapp/static/js/report/workOut.js b/src/main/webapp/static/js/report/workOut.js index 5074519..8cf76cb 100644 --- a/src/main/webapp/static/js/report/workOut.js +++ b/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; diff --git a/src/main/webapp/views/report/viewWorkIn.html b/src/main/webapp/views/report/viewWorkIn.html index 31dd485..ebf05af 100644 --- a/src/main/webapp/views/report/viewWorkIn.html +++ b/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> diff --git a/src/main/webapp/views/report/viewWorkOut.html b/src/main/webapp/views/report/viewWorkOut.html index 225dfac..3bc1e73 100644 --- a/src/main/webapp/views/report/viewWorkOut.html +++ b/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> -- Gitblit v1.9.1