From 59f80df1e377e8775969ca4acadfa2eadd6e37ae Mon Sep 17 00:00:00 2001
From: zhangchao <zc857179121@qq.com>
Date: 星期一, 04 十一月 2024 19:01:38 +0800
Subject: [PATCH] excel导出优化

---
 src/main/java/com/zy/asrs/controller/ReportDownloadController.java |   40 +---
 src/main/java/com/zy/asrs/controller/AgvMobileController.java      |    3 
 src/main/resources/mapper/ViewWorkInMapper.xml                     |   11 +
 src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java        |    3 
 src/main/java/com/zy/asrs/entity/ViewWorkInBean.java               |  412 ++++++++++++++++++++++++++++-----------------------
 src/main/java/com/zy/asrs/service/impl/AgvWorkServiceImpl.java     |    3 
 pom.xml                                                            |    2 
 src/main/java/com/zy/asrs/entity/AdjDetl.java                      |    5 
 8 files changed, 265 insertions(+), 214 deletions(-)

diff --git a/pom.xml b/pom.xml
index c4eda78..d27ad5a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -93,7 +93,7 @@
         <dependency>
             <groupId>com.alibaba</groupId>
             <artifactId>easyexcel</artifactId>
-            <version>2.2.6</version>
+            <version>3.1.0</version>
         </dependency>
         <dependency>
             <groupId>org.projectlombok</groupId>
diff --git a/src/main/java/com/zy/asrs/controller/AgvMobileController.java b/src/main/java/com/zy/asrs/controller/AgvMobileController.java
index 1b80143..bcd4567 100644
--- a/src/main/java/com/zy/asrs/controller/AgvMobileController.java
+++ b/src/main/java/com/zy/asrs/controller/AgvMobileController.java
@@ -406,6 +406,9 @@
                 agvLocMastByContainerCode.setBarcode(barcode1);
                 agvLocMastService.updateById(agvLocMastByContainerCode);
             }
+            // 淇濆瓨璋冩暣璁板綍
+            AdjDetl adjDetl = new AdjDetl();
+
 
             return R.ok("缁存姢鎴愬姛");
         }
diff --git a/src/main/java/com/zy/asrs/controller/ReportDownloadController.java b/src/main/java/com/zy/asrs/controller/ReportDownloadController.java
index e36cb0c..d95f358 100644
--- a/src/main/java/com/zy/asrs/controller/ReportDownloadController.java
+++ b/src/main/java/com/zy/asrs/controller/ReportDownloadController.java
@@ -7,10 +7,7 @@
 import com.core.common.Cools;
 import com.core.common.DateUtils;
 import com.core.common.R;
-import com.zy.asrs.entity.AgvWrkMastLog;
-import com.zy.asrs.entity.ViewInOutBean;
-import com.zy.asrs.entity.ViewWorkCountInView;
-import com.zy.asrs.entity.ViewWorkInBean;
+import com.zy.asrs.entity.*;
 import com.zy.asrs.mapper.ReportQueryMapper;
 import com.zy.asrs.service.AgvWrkMastLogService;
 import com.zy.common.web.BaseController;
@@ -18,6 +15,7 @@
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletResponse;
+import javax.xml.soap.SAAJResult;
 import java.io.IOException;
 import java.net.URLEncoder;
 import java.util.HashMap;
@@ -44,8 +42,7 @@
      * @since 2.1.1
      */
     @GetMapping("/countIn")
-    public void download1(HttpServletResponse response,
-                          @RequestParam Map<String, Object> param) throws IOException {
+    public void download1(HttpServletResponse response, @RequestParam Map<String, Object> param) throws IOException {
         try {
             response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
             response.setCharacterEncoding("utf-8");
@@ -53,8 +50,7 @@
             String fileName = URLEncoder.encode("鏃ュ叆搴撴眹鎬�", "UTF-8").replaceAll("\\+", "%20");
             response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
             // 杩欓噷闇�瑕佽缃笉鍏抽棴娴�
-            EasyExcel.write(response.getOutputStream(), ViewWorkCountInView.class).autoCloseStream(Boolean.FALSE).sheet("sheet1")
-                    .doWrite(getInData(param));
+            EasyExcel.write(response.getOutputStream(), ViewWorkCountInView.class).autoCloseStream(Boolean.FALSE).sheet("sheet1").doWrite(getInData(param));
         } catch (Exception e) {
             // 閲嶇疆response
             response.reset();
@@ -88,17 +84,16 @@
      * @since 2.1.1
      */
     @RequestMapping("/countOut")
-    public void download2(HttpServletResponse response,
-                          @RequestParam Map<String, Object> param) throws IOException {
+    public void download2(HttpServletResponse response, @RequestParam Map<String, Object> param) 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<ViewWorkCountInView> outData = getOutData(param);
             // 杩欓噷闇�瑕佽缃笉鍏抽棴娴�
-            EasyExcel.write(response.getOutputStream(), ViewWorkCountInView.class).autoCloseStream(Boolean.FALSE).sheet("sheet1")
-                    .doWrite(getOutData(param));
+            EasyExcel.write(response.getOutputStream(), ViewWorkCountInView.class).autoCloseStream(Boolean.FALSE).sheet("sheet1").doWrite(outData);
         } catch (Exception e) {
             // 閲嶇疆response
             response.reset();
@@ -121,7 +116,7 @@
             startTime = split[0].split(" ")[0].replace("-", ".");
             endTime = split[1].split(" ")[0].replace("-", ".");
         }
-        List<ViewWorkCountInView> allCountIn = reportQueryMapper.selectWorkCountOut(Integer.valueOf((String) param.get("pageNumber")), Integer.valueOf((String) param.get("pageSize")), (String) param.get("matnr"), startTime, endTime);
+        List<ViewWorkCountInView> allCountIn = reportQueryMapper.selectWorkCountOut(null,null, (String) param.get("matnr"), startTime, endTime);
         return allCountIn;
     }
 
@@ -133,8 +128,7 @@
      * @since 2.1.1
      */
     @RequestMapping("/wrkMastLog")
-    public void wrkMastLog(HttpServletResponse response,
-                           @RequestParam Map<String, Object> param) throws IOException {
+    public void wrkMastLog(HttpServletResponse response, @RequestParam Map<String, Object> param) throws IOException {
         try {
             response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
             response.setCharacterEncoding("utf-8");
@@ -142,8 +136,7 @@
             String fileName = URLEncoder.encode("宸ヤ綔妗g淮鎶ゆ棩蹇�", "UTF-8").replaceAll("\\+", "%20");
             response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
             // 杩欓噷闇�瑕佽缃笉鍏抽棴娴�
-            EasyExcel.write(response.getOutputStream(), ViewWorkCountInView.class).autoCloseStream(Boolean.FALSE).sheet("sheet1")
-                    .doWrite(getWrkMastLogData(param));
+            EasyExcel.write(response.getOutputStream(), ViewWorkCountInView.class).autoCloseStream(Boolean.FALSE).sheet("sheet1").doWrite(getWrkMastLogData(param));
         } catch (Exception e) {
             // 閲嶇疆response
             response.reset();
@@ -189,8 +182,7 @@
      * @since 2.1.1
      */
     @RequestMapping("/out")
-    public void out(HttpServletResponse response,
-                          @RequestParam ViewWorkInBean bean) throws IOException {
+    public void out(HttpServletResponse response, @RequestParam(required = false) ViewWorkInBean bean) throws IOException {
         try {
             response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
             response.setCharacterEncoding("utf-8");
@@ -199,8 +191,7 @@
             response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
             List<ViewWorkInBean> list = reportQueryMapper.queryViewWorkOutList(bean);
             // 杩欓噷闇�瑕佽缃笉鍏抽棴娴�
-            EasyExcel.write(response.getOutputStream(), ViewWorkCountInView.class).autoCloseStream(Boolean.FALSE).sheet("sheet1")
-                    .doWrite(list);
+            EasyExcel.write(response.getOutputStream(), ViewWorkInBean.class).autoCloseStream(Boolean.FALSE).sheet("sheet1").doWrite(list);
         } catch (Exception e) {
             // 閲嶇疆response
             response.reset();
@@ -220,8 +211,7 @@
      * @since 2.1.1
      */
     @RequestMapping("/in")
-    public void in(HttpServletResponse response,
-                    @RequestParam ViewWorkInBean bean) throws IOException {
+    public void in(HttpServletResponse response, @RequestParam(required = false) ViewWorkInBean bean) throws IOException {
         try {
             response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
             response.setCharacterEncoding("utf-8");
@@ -229,9 +219,9 @@
             String fileName = URLEncoder.encode("鏃ュ叆搴撴槑缁嗙粺璁�", "UTF-8").replaceAll("\\+", "%20");
             response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
             List<ViewWorkInBean> list = reportQueryMapper.queryViewWorkInList(bean);
+            String s = "1";
             // 杩欓噷闇�瑕佽缃笉鍏抽棴娴�
-            EasyExcel.write(response.getOutputStream(), ViewWorkCountInView.class).autoCloseStream(Boolean.FALSE).sheet("sheet1")
-                    .doWrite(list);
+            EasyExcel.write(response.getOutputStream(), ViewWorkInBean.class).autoCloseStream(Boolean.FALSE).sheet("sheet1").doWrite(list);
         } catch (Exception e) {
             // 閲嶇疆response
             response.reset();
diff --git a/src/main/java/com/zy/asrs/entity/AdjDetl.java b/src/main/java/com/zy/asrs/entity/AdjDetl.java
index 385e3ba..471cbc0 100644
--- a/src/main/java/com/zy/asrs/entity/AdjDetl.java
+++ b/src/main/java/com/zy/asrs/entity/AdjDetl.java
@@ -42,6 +42,11 @@
      */
     @ApiModelProperty(value= "鐗╂枡鍙�")
     private String matnr;
+    /**
+     * 鐗╂枡鍚嶇О
+     */
+    @ApiModelProperty(value= "鐗╂枡鍚嶇О")
+    private String maktx;
 
     /**
      * 搴忓垪鐮�
diff --git a/src/main/java/com/zy/asrs/entity/ViewWorkInBean.java b/src/main/java/com/zy/asrs/entity/ViewWorkInBean.java
index 1d26c21..bed53c0 100644
--- a/src/main/java/com/zy/asrs/entity/ViewWorkInBean.java
+++ b/src/main/java/com/zy/asrs/entity/ViewWorkInBean.java
@@ -1,10 +1,12 @@
 package com.zy.asrs.entity;
 
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.format.DateTimeFormat;
 import com.core.common.Cools;
 import com.core.common.SpringUtils;
 import com.zy.system.entity.User;
 import com.zy.system.service.UserService;
-import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.text.SimpleDateFormat;
@@ -12,237 +14,277 @@
 
 /**
  * 鍏ュ簱鏄庣粏缁熻
+ *
  * @author admin
  * @date 2018骞�11鏈�26鏃�
  */
 @Data
 public class ViewWorkInBean {
 
+    @ExcelIgnore
+    private int pageNumber;
+    @ExcelIgnore
+    private int pageSize;
+    @ExcelIgnore
 
-	private int pageNumber;
-	private int pageSize;
+    private int stay_time;
+    @ExcelIgnore
 
-	private int stay_time;
+    private String begin_date;
+    @ExcelIgnore
+    private String end_date;
+    @ExcelIgnore
+    private String query_date;
+    @ExcelIgnore
 
-	private String begin_date;
-	private String end_date;
-	private String query_date;
+    private Integer row;
+    @ExcelIgnore
 
-	private Integer row;
+    private String crn_str_time;
+    @ExcelIgnore
+    private String crn_end_time;
+    @ExcelIgnore
 
-	private String crn_str_time;
-	private String crn_end_time;
+    @ExcelProperty(value = "宸ヤ綔鍙�")
+    private Integer wrk_no;
 
-	@ApiModelProperty(value= "宸ヤ綔鍙�")
-	private Integer wrk_no;
+    @ExcelProperty(value = "宸ヤ綔鏃堕棿")
+    private Date io_time;
 
-	@ApiModelProperty(value= "宸ヤ綔鏃堕棿")
-	private Date io_time;
+    @ExcelProperty(value = "搴撲綅鍙�")
+    private String loc_no;
 
-	@ApiModelProperty(value= "搴撲綅鍙�")
-	private String loc_no;
+    @ExcelProperty(value = "璐ф灦鏉$爜")
+    private String zpallet;
 
-	@ApiModelProperty(value= "璐ф灦鏉$爜")
-	private String zpallet;
+    @ExcelProperty(value = "鏁伴噺")
+    private Double anfme;
 
-	@ApiModelProperty(value= "鏁伴噺")
-	private Double anfme;
+    @ExcelProperty(value = "鐗╂枡鍙�")
+    private String matnr;
 
-	@ApiModelProperty(value= "鐗╂枡鍙�")
-	private String matnr;
+    @ExcelProperty(value = "鐗╂枡鍙�")
+    private String maktx;
 
-	@ApiModelProperty(value= "鐗╂枡鍙�")
-	private String maktx;
+    @ExcelProperty(value = "搴忓垪鐮�")
+    private String batch;
 
-	@ApiModelProperty(value= "搴忓垪鐮�")
-	private String batch;
+    @ExcelProperty(value = "鍗曟嵁缂栧彿")
+    private String order_no;
 
-	@ApiModelProperty(value= "鍗曟嵁缂栧彿")
-	private String order_no;
+    @ExcelProperty(value = "瑙勬牸")
+    private String specs;
 
-	@ApiModelProperty(value= "瑙勬牸")
-	private String specs;
+    @ExcelProperty(value = "鎵规")
+    private String model;
 
-	@ApiModelProperty(value= "鎵规")
-	private String model;
+    @ExcelProperty(value = "棰滆壊")
+    private String color;
 
-	@ApiModelProperty(value= "棰滆壊")
-	private String color;
+    @ExcelProperty(value = "鍝佺墝")
+    private String brand;
 
-	@ApiModelProperty(value= "鍝佺墝")
-	private String brand;
+    @ExcelProperty(value = "鍗曚綅")
+    private String unit;
 
-	@ApiModelProperty(value= "鍗曚綅")
-	private String unit;
+    @ExcelProperty(value = "鍗曚环")
+    private Double price;
 
-	@ApiModelProperty(value= "鍗曚环")
-	private Double price;
+    @ExcelProperty(value = "sku")
+    private String sku;
 
-	@ApiModelProperty(value= "sku")
-	private String sku;
+    @ExcelProperty(value = "鍖呮暟")
+    private Double units;
 
-	@ApiModelProperty(value= "鍖呮暟")
-	private Double units;
+    @ExcelProperty(value = "鏉$爜")
+    private String barcode;
 
-	@ApiModelProperty(value= "鏉$爜")
-	private String barcode;
+    @ExcelProperty(value = "鐗╂枡鐘舵��")
+    private String origin;
+    @ExcelIgnore
+    @ExcelProperty(value = "鍘傚")
+    private String manu;
 
-	@ApiModelProperty(value= "鐗╂枡鐘舵��")
-	private String origin;
+    @ExcelProperty(value = "鍗曟嵁鏃堕棿")
+    private String manu_date;
 
-	@ApiModelProperty(value= "鍘傚")
-	private String manu;
+    @ExcelProperty(value = "鍝侀」鏁�")
+    private String item_num;
 
-	@ApiModelProperty(value= "鍗曟嵁鏃堕棿")
-	private String manu_date;
+    @ExcelProperty(value = "瀹夊叏搴撳瓨閲�")
+    private Double safe_qty;
 
-	@ApiModelProperty(value= "鍝侀」鏁�")
-	private String item_num;
+    @ExcelProperty(value = "閲嶉噺")
+    private Double weight;
+    @ExcelIgnore
+    @ExcelProperty(value = "闀垮害")
+    private Double length;
+    @ExcelIgnore
+    @ExcelProperty(value = "浣撶Н")
+    private Double volume;
 
-	@ApiModelProperty(value= "瀹夊叏搴撳瓨閲�")
-	private Double safe_qty;
+    @ExcelProperty(value = "閿�鍞崟鍙�")
+    private String three_code;
 
-	@ApiModelProperty(value= "閲嶉噺")
-	private Double weight;
+    @ExcelProperty(value = "渚涘簲鍟�")
+    private String supp;
 
-	@ApiModelProperty(value= "闀垮害")
-	private Double length;
+    @ExcelProperty(value = "璐х珯鐮�")
+    private String supp_code;
+    @ExcelIgnore
+    @ExcelProperty(value = "鏄惁鎵规 1: 鏄�  0: 鍚�  ")
+    private Integer be_batch;
+    @ExcelIgnore
+    @ExcelProperty(value = "淇濊川鏈�")
+    private String dead_time;
+    @ExcelIgnore
+    private String deadTime = dead_time;
+    @ExcelIgnore
+    @ExcelProperty(value = "棰勮澶╂暟")
+    private Integer dead_warn;
+    @ExcelIgnore
+    private Integer deadWarn = this.dead_warn;
+    @ExcelIgnore
+    @ExcelProperty(value = "鍒惰喘 1: 鍒堕��  2: 閲囪喘  3: 澶栧崗  ")
+    private Integer source;
+    @ExcelIgnore
+    @ExcelProperty(value = "瑕佹眰妫�楠� 1: 鏄�  0: 鍚�  ")
+    private Integer inspect;
+    @ExcelIgnore
+    @ExcelProperty(value = "鍗遍櫓鍝� 1: 鏄�  0: 鍚�  ")
+    private Integer danger;
 
-	@ApiModelProperty(value= "浣撶Н")
-	private Double volume;
+    @ExcelProperty(value = "淇敼浜哄憳")
+    private Long modi_user;
 
-	@ApiModelProperty(value= "涓夋柟缂栫爜")
-	private String three_code;
+    @ExcelProperty(value = "淇敼鏃堕棿")
+    private Date modi_time;
 
-	@ApiModelProperty(value= "渚涘簲鍟�")
-	private String supp;
+    @ExcelProperty(value = "鍒涘缓鑰�")
+    private Long appe_user;
 
-	@ApiModelProperty(value= "渚涘簲鍟嗙紪鐮�")
-	private String supp_code;
+    @ExcelProperty(value = "娣诲姞鏃堕棿")
+    private Date appe_time;
 
-	@ApiModelProperty(value= "鏄惁鎵规 1: 鏄�  0: 鍚�  ")
-	private Integer be_batch;
+    @ExcelProperty(value = "澶囨敞")
+    private String memo;
 
-	@ApiModelProperty(value= "淇濊川鏈�")
-	private String dead_time;
-	private String deadTime=dead_time;
+    @ExcelIgnore
+    @ExcelProperty(value = "宸ヤ綔鍙�")
+    //	宸ヤ綔鍙�
+    private Integer wrkNo;
+    @ExcelIgnore
+    @DateTimeFormat(value = "yyyy-MM-dd HH:mm:ss")
+    @ExcelProperty(value = "宸ヤ綔鏃堕棿")
+    //	宸ヤ綔鏃堕棿
+    private Date ioTime;
+    @ExcelIgnore
+    @ExcelProperty(value = "鍗曟嵁缂栧彿")
+    //鍗曟嵁缂栧彿
+    private String orderNo;
+    @ExcelIgnore
+    @ExcelProperty(value = "鍗曟嵁鏃堕棿")
+    //鍗曟嵁鏃堕棿
+    private String manuDate;
+    @ExcelIgnore
+    @ExcelProperty(value = "鍝侀」鏁�")
+    //鍝侀」鏁�
+    private String itemNum;
+    @ExcelIgnore
+    @ExcelProperty(value = "瀹夊叏搴撳瓨閲�")
+    //瀹夊叏搴撳瓨閲�
+    private Double safeQty;
+    @ExcelIgnore
+    @ExcelProperty(value = "閿�鍞崟鍙�")
+    //涓夋柟缂栫爜
+    private String threeCode;
+    @ExcelIgnore
+    @ExcelProperty(value = "渚涘簲鍟嗙紪鐮�")
+    //渚涘簲鍟嗙紪鐮�
+    private String suppCode;
+    @ExcelIgnore
+    @ExcelProperty(value = "甯堝倕鎵规")
+    //鏄惁鎵规 1: 鏄�  0: 鍚�
+    private Integer beBatch;
+    @ExcelIgnore
+    @ExcelProperty(value = "淇敼浜哄憳")
+    //	淇敼浜哄憳
+    private Long modiUser;
+    @ExcelIgnore
+    @ExcelProperty(value = "淇敼鏃堕棿")
+    //	淇敼鏃堕棿
+    private Date modiTime;
+    @ExcelIgnore
+    @ExcelProperty(value = "鍒涘缓鑰�")
+    //	鍒涘缓鑰�
+    private Long appeUser;
+    @ExcelIgnore
+    @ExcelProperty(value = "娣诲姞鏃堕棿")
+    //	娣诲姞鏃堕棿
+    private Date appeTime;
 
-	@ApiModelProperty(value= "棰勮澶╂暟")
-	private Integer dead_warn;
-	private Integer deadWarn=this.dead_warn;
+    public void sype() {
+        //	宸ヤ綔鍙�
+        wrkNo = wrk_no;
+        //	宸ヤ綔鏃堕棿
+        ioTime = io_time;
+        //鍗曟嵁缂栧彿
+        orderNo = order_no;
+        //鍗曟嵁鏃堕棿
+        manuDate = manu_date;
+        //鍝侀」鏁�
+        itemNum = item_num;
+        //瀹夊叏搴撳瓨閲�
+        safeQty = safe_qty;
+        //涓夋柟缂栫爜
+        threeCode = three_code;
+        //渚涘簲鍟嗙紪鐮�
+        suppCode = supp_code;
+        //鏄惁鎵规 1: 鏄�  0: 鍚�
+        beBatch = be_batch;
+        //	淇敼浜哄憳
+        modiUser = modi_user;
+        //	淇敼鏃堕棿
+        modiTime = modi_time;
+        //	鍒涘缓鑰�
+        appeUser = appe_user;
+        //	娣诲姞鏃堕棿
+        appeTime = appe_time;
+    }
 
-	@ApiModelProperty(value= "鍒惰喘 1: 鍒堕��  2: 閲囪喘  3: 澶栧崗  ")
-	private Integer source;
+    public String getModiUser$() {
+        UserService service = SpringUtils.getBean(UserService.class);
+        User user = service.selectById(this.modi_user);
+        if (!Cools.isEmpty(user)) {
+            return String.valueOf(user.getUsername());
+        }
+        return null;
+    }
 
-	@ApiModelProperty(value= "瑕佹眰妫�楠� 1: 鏄�  0: 鍚�  ")
-	private Integer inspect;
+    public String getAppeUser$() {
+        UserService service = SpringUtils.getBean(UserService.class);
+        User user = service.selectById(this.appe_user);
+        if (!Cools.isEmpty(user)) {
+            return String.valueOf(user.getUsername());
+        }
+        return null;
+    }
 
-	@ApiModelProperty(value= "鍗遍櫓鍝� 1: 鏄�  0: 鍚�  ")
-	private Integer danger;
+    public String getIoTime$() {
+        if (Cools.isEmpty(this.io_time)) {
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.io_time);
+    }
 
-	@ApiModelProperty(value= "淇敼浜哄憳")
-	private Long modi_user;
+    public void setQuery_date(String query_date) {
+        this.query_date = query_date;
+        if (query_date.contains(" - ")) {
+            String[] dates = query_date.split(" - ");
+            this.begin_date = dates[0];
+            this.end_date = dates[1];
 
-	@ApiModelProperty(value= "淇敼鏃堕棿")
-	private Object modi_time;
-
-	@ApiModelProperty(value= "鍒涘缓鑰�")
-	private Long appe_user;
-
-	@ApiModelProperty(value= "娣诲姞鏃堕棿")
-	private Object appe_time;
-
-	@ApiModelProperty(value= "澶囨敞")
-	private String memo;
-
-	//	宸ヤ綔鍙�
-	private Integer wrkNo;
-	//	宸ヤ綔鏃堕棿
-	private Date ioTime;
-	//鍗曟嵁缂栧彿
-	private String orderNo;
-	//鍗曟嵁鏃堕棿
-	private String manuDate;
-	//鍝侀」鏁�
-	private String itemNum;
-	//瀹夊叏搴撳瓨閲�
-	private Double safeQty;
-	//涓夋柟缂栫爜
-	private String threeCode;
-	//渚涘簲鍟嗙紪鐮�
-	private String suppCode;
-	//鏄惁鎵规 1: 鏄�  0: 鍚�
-	private Integer beBatch;
-	//	淇敼浜哄憳
-	private Long modiUser;
-	//	淇敼鏃堕棿
-	private Object modiTime;
-	//	鍒涘缓鑰�
-	private Long appeUser;
-	//	娣诲姞鏃堕棿
-	private Object appeTime;
-	public void sype(){
-		//	宸ヤ綔鍙�
-		wrkNo=wrk_no;
-		//	宸ヤ綔鏃堕棿
-		ioTime=io_time;
-		//鍗曟嵁缂栧彿
-		orderNo=order_no;
-		//鍗曟嵁鏃堕棿
-		manuDate=manu_date;
-		//鍝侀」鏁�
-		itemNum=item_num;
-		//瀹夊叏搴撳瓨閲�
-		safeQty=safe_qty;
-		//涓夋柟缂栫爜
-		threeCode=three_code;
-		//渚涘簲鍟嗙紪鐮�
-		suppCode=supp_code;
-		//鏄惁鎵规 1: 鏄�  0: 鍚�
-		beBatch=be_batch;
-		//	淇敼浜哄憳
-		modiUser=modi_user;
-		//	淇敼鏃堕棿
-		modiTime=modi_time;
-		//	鍒涘缓鑰�
-		appeUser=appe_user;
-		//	娣诲姞鏃堕棿
-		appeTime=appe_time;
-	}
-
-	public String getModiUser$(){
-		UserService service = SpringUtils.getBean(UserService.class);
-		User user = service.selectById(this.modi_user);
-		if (!Cools.isEmpty(user)){
-			return String.valueOf(user.getUsername());
-		}
-		return null;
-	}
-
-	public String getAppeUser$(){
-		UserService service = SpringUtils.getBean(UserService.class);
-		User user = service.selectById(this.appe_user);
-		if (!Cools.isEmpty(user)){
-			return String.valueOf(user.getUsername());
-		}
-		return null;
-	}
-
-	public String getIoTime$(){
-		if (Cools.isEmpty(this.io_time)){
-			return "";
-		}
-		return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.io_time);
-	}
-
-	public void setQuery_date(String query_date) {
-		this.query_date = query_date;
-		if (query_date.contains(" - ")) {
-			String[] dates = query_date.split(" - ");
-			this.begin_date = dates[0];
-			this.end_date = dates[1];
-
-		}
-	}
+        }
+    }
 
 }
diff --git a/src/main/java/com/zy/asrs/service/impl/AgvWorkServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/AgvWorkServiceImpl.java
index 02adbc8..c714da8 100644
--- a/src/main/java/com/zy/asrs/service/impl/AgvWorkServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/AgvWorkServiceImpl.java
@@ -689,6 +689,7 @@
                         adjDetl.setLocNo(locDetl.getLocNo());
                         adjDetl.setMatnr(locDetl.getMatnr());
                         adjDetl.setBatch(locDetl.getBatch());
+                        adjDetl.setMaktx(locDetl.getMaktx());
                         adjDetl.setOriQty(locDetl.getAnfme());
                         adjDetl.setAdjQty(adjust.getCount());
                         adjDetl.setModiTime(now);
@@ -720,6 +721,7 @@
             adjDetl.setLocNo(locDetl.getLocNo());
             adjDetl.setMatnr(locDetl.getMatnr());
             adjDetl.setBatch(locDetl.getBatch());
+            adjDetl.setMaktx(locDetl.getMaktx());
             adjDetl.setOriQty(locDetl.getAnfme());
             adjDetl.setAdjQty(0.0D);
             adjDetl.setModiTime(now);
@@ -756,6 +758,7 @@
             adjDetl.setLocNo(locMast.getLocNo());
             adjDetl.setMatnr(adjust.getMatnr());
             adjDetl.setBatch(adjust.getBatch());
+            adjDetl.setMaktx(locDetl.getMaktx());
             adjDetl.setOriQty(0.0D);
             adjDetl.setAdjQty(adjust.getCount());
             adjDetl.setModiTime(now);
diff --git a/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
index 31f28f8..ca66f9c 100644
--- a/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -970,6 +970,7 @@
                         adjDetl.setLocNo(locDetl.getLocNo());
                         adjDetl.setMatnr(locDetl.getMatnr());
                         adjDetl.setBatch(locDetl.getBatch());
+                        adjDetl.setMaktx(locDetl.getMaktx());
                         adjDetl.setOriQty(locDetl.getAnfme());
                         adjDetl.setAdjQty(adjust.getCount());
                         adjDetl.setModiTime(now);
@@ -999,6 +1000,7 @@
             adjDetl.setLocNo(locDetl.getLocNo());
             adjDetl.setMatnr(locDetl.getMatnr());
             adjDetl.setBatch(locDetl.getBatch());
+            adjDetl.setMaktx(locDetl.getMaktx());
             adjDetl.setOriQty(locDetl.getAnfme());
             adjDetl.setAdjQty(0.0D);
             adjDetl.setModiTime(now);
@@ -1032,6 +1034,7 @@
             adjDetl.setLocNo(locMast.getLocNo());
             adjDetl.setMatnr(adjust.getMatnr());
             adjDetl.setBatch(adjust.getBatch());
+            adjDetl.setMaktx(locDetl.getMaktx());
             adjDetl.setOriQty(0.0D);
             adjDetl.setAdjQty(adjust.getCount());
             adjDetl.setModiTime(now);
diff --git a/src/main/resources/mapper/ViewWorkInMapper.xml b/src/main/resources/mapper/ViewWorkInMapper.xml
index 6b3d6d5..d5db4e7 100644
--- a/src/main/resources/mapper/ViewWorkInMapper.xml
+++ b/src/main/resources/mapper/ViewWorkInMapper.xml
@@ -87,7 +87,10 @@
 			where 1=1
 			<include refid="viewWorkInConditionSql"></include>
 		) t
-	) a where 1=1 and a.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
+	) 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">
@@ -132,8 +135,10 @@
 			where 1=1
 			<include refid="viewWorkInConditionSql"></include>
 		) t
-	) a where 1=1 and a.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
-
+	) 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">

--
Gitblit v1.9.1