From e4b98b893b7287120018d60ee7f2d824940280e9 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期四, 04 九月 2025 09:57:47 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/entity/WrkDetlLog.java                  |  534 ++++++++++++++++++++++++++++++++++++++++++++
 src/main/resources/mapper/WrkDetlLogMapper.xml                    |   67 +++++
 src/main/java/com/zy/asrs/service/impl/WrkDetlLogServiceImpl.java |   19 +
 src/main/java/com/zy/asrs/mapper/WrkDetlLogMapper.java            |   16 +
 src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java       |   60 ++++
 src/main/java/com/zy/asrs/entity/WrkMast.java                     |    5 
 src/main/java/com/zy/asrs/service/WrkDetlLogService.java          |   12 +
 7 files changed, 710 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/zy/asrs/entity/WrkDetlLog.java b/src/main/java/com/zy/asrs/entity/WrkDetlLog.java
new file mode 100644
index 0000000..1b67259
--- /dev/null
+++ b/src/main/java/com/zy/asrs/entity/WrkDetlLog.java
@@ -0,0 +1,534 @@
+package com.zy.asrs.entity;
+
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableField;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import com.zy.asrs.service.KcztMapService;
+import org.springframework.format.annotation.DateTimeFormat;
+import com.core.common.SpringUtils;
+import com.zy.system.service.UserService;
+import com.zy.system.entity.User;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import com.core.common.SpringUtils;
+import com.zy.system.service.UserService;
+import com.zy.system.entity.User;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import com.baomidou.mybatisplus.annotations.TableName;
+import java.io.Serializable;
+
+@Data
+@TableName("asr_wrk_detl_log")
+public class WrkDetlLog implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 宸ヤ綔鍙�
+     */
+    @ApiModelProperty(value= "宸ヤ綔鍙�")
+    @TableField("wrk_no")
+    private Integer wrkNo;
+
+    /**
+     * 宸ヤ綔鏃堕棿
+     */
+    @ApiModelProperty(value= "宸ヤ綔鏃堕棿")
+    @TableField("io_time")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date ioTime;
+
+    /**
+     * 鏁伴噺
+     */
+    @ApiModelProperty(value= "鏁伴噺")
+    private Double anfme;
+
+    /**
+     * 鎵樼洏鏉$爜
+     */
+    @ApiModelProperty(value= "鎵樼洏鏉$爜")
+    private String zpallet;
+
+    /**
+     * 鍟嗗搧缂栧彿
+     */
+    @ApiModelProperty(value= "鍟嗗搧缂栧彿")
+    private String matnr;
+
+    /**
+     * 鍟嗗搧鍚嶇О
+     */
+    @ApiModelProperty(value= "鍟嗗搧鍚嶇О")
+    private String maktx;
+
+    /**
+     * 鎵瑰彿
+     */
+    @ApiModelProperty(value= "鎵瑰彿")
+    private String batch;
+
+    /**
+     * 鍗曟嵁缂栧彿
+     */
+    @ApiModelProperty(value= "鍗曟嵁缂栧彿")
+    @TableField("order_no")
+    private String orderNo;
+
+    /**
+     * 瑙勬牸
+     */
+    @ApiModelProperty(value= "瑙勬牸")
+    private String specs;
+
+    /**
+     * 鍨嬪彿
+     */
+    @ApiModelProperty(value= "鍨嬪彿")
+    private String model;
+
+    /**
+     * 棰滆壊
+     */
+    @ApiModelProperty(value= "棰滆壊")
+    private String color;
+
+    /**
+     * 鍝佺墝
+     */
+    @ApiModelProperty(value= "鍝佺墝")
+    private String brand;
+
+    /**
+     * 鍗曚綅
+     */
+    @ApiModelProperty(value= "鍗曚綅")
+    private String unit;
+
+    /**
+     * 鍗曚环
+     */
+    @ApiModelProperty(value= "鍗曚环")
+    private Double price;
+
+    /**
+     * sku
+     */
+    @ApiModelProperty(value= "sku")
+    private String sku;
+
+    /**
+     * 鍗曚綅閲�
+     */
+    @ApiModelProperty(value= "鍗曚綅閲�")
+    private Double units;
+
+    /**
+     * 鏉$爜
+     */
+    @ApiModelProperty(value= "鏉$爜")
+    private String barcode;
+
+    /**
+     * 浜у湴
+     */
+    @ApiModelProperty(value= "浜у湴")
+    private String origin;
+
+    /**
+     * 鍘傚
+     */
+    @ApiModelProperty(value= "鍘傚")
+    private String manu;
+
+    /**
+     * 鐢熶骇鏃ユ湡
+     */
+    @ApiModelProperty(value= "鐢熶骇鏃ユ湡")
+    @TableField("manu_date")
+    private String manuDate;
+
+    /**
+     * 鍝侀」鏁�
+     */
+    @ApiModelProperty(value= "鍝侀」鏁�")
+    @TableField("item_num")
+    private String itemNum;
+
+    /**
+     * 瀹夊叏搴撳瓨閲�
+     */
+    @ApiModelProperty(value= "瀹夊叏搴撳瓨閲�")
+    @TableField("safe_qty")
+    private Double safeQty;
+
+    /**
+     * 閲嶉噺
+     */
+    @ApiModelProperty(value= "閲嶉噺")
+    private Double weight;
+
+    /**
+     * 闀垮害
+     */
+    @ApiModelProperty(value= "闀垮害")
+    @TableField("man_length")
+    private Double manLength;
+
+    /**
+     * 浣撶Н
+     */
+    @ApiModelProperty(value= "浣撶Н")
+    private Double volume;
+
+    /**
+     * 涓夋柟缂栫爜
+     */
+    @ApiModelProperty(value= "涓夋柟缂栫爜")
+    @TableField("three_code")
+    private String threeCode;
+
+    /**
+     * 渚涘簲鍟�
+     */
+    @ApiModelProperty(value= "渚涘簲鍟�")
+    private String supp;
+
+    /**
+     * 渚涘簲鍟嗙紪鐮�
+     */
+    @ApiModelProperty(value= "渚涘簲鍟嗙紪鐮�")
+    @TableField("supp_code")
+    private String suppCode;
+
+    /**
+     * 鏄惁鎵规 1: 鏄�  0: 鍚�  
+     */
+    @ApiModelProperty(value= "鏄惁鎵规 1: 鏄�  0: 鍚�  ")
+    @TableField("be_batch")
+    private Integer beBatch;
+
+    /**
+     * 淇濊川鏈�
+     */
+    @ApiModelProperty(value= "淇濊川鏈�")
+    @TableField("dead_time")
+    private String deadTime;
+
+    /**
+     * 棰勮澶╂暟
+     */
+    @ApiModelProperty(value= "棰勮澶╂暟")
+    @TableField("dead_warn")
+    private Integer deadWarn;
+
+    /**
+     * 鍒惰喘 1: 鍒堕��  2: 閲囪喘  3: 澶栧崗  
+     */
+    @ApiModelProperty(value= "鍒惰喘 1: 鍒堕��  2: 閲囪喘  3: 澶栧崗  ")
+    private Integer source;
+
+    /**
+     * 瑕佹眰妫�楠� 1: 鏄�  0: 鍚�  
+     */
+    @ApiModelProperty(value= "瑕佹眰妫�楠� 1: 鏄�  0: 鍚�  ")
+    private Integer inspect;
+
+    /**
+     * 鍗遍櫓鍝� 1: 鏄�  0: 鍚�  
+     */
+    @ApiModelProperty(value= "鍗遍櫓鍝� 1: 鏄�  0: 鍚�  ")
+    private Integer danger;
+
+    /**
+     * 淇敼浜哄憳
+     */
+    @ApiModelProperty(value= "淇敼浜哄憳")
+    @TableField("modi_user")
+    private Long modiUser;
+
+    /**
+     * 淇敼鏃堕棿
+     */
+    @ApiModelProperty(value= "淇敼鏃堕棿")
+    @TableField("modi_time")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date modiTime;
+
+    /**
+     * 娣诲姞浜哄憳
+     */
+    @ApiModelProperty(value= "娣诲姞浜哄憳")
+    @TableField("appe_user")
+    private Long appeUser;
+
+    /**
+     * 娣诲姞鏃堕棿
+     */
+    @ApiModelProperty(value= "娣诲姞鏃堕棿")
+    @TableField("appe_time")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date appeTime;
+
+    /**
+     * 澶囨敞
+     */
+    @ApiModelProperty(value= "澶囨敞")
+    private String memo;
+
+    @ApiModelProperty(value= "")
+    @TableField("line_number")
+    private Long lineNumber;
+
+    @ApiModelProperty(value= "")
+    private String standby1;
+
+    @ApiModelProperty(value= "")
+    private String standby2;
+
+    @ApiModelProperty(value= "")
+    private String standby3;
+
+    @ApiModelProperty(value= "")
+    @TableField("box_type1")
+    private String boxType1;
+
+    @ApiModelProperty(value= "")
+    @TableField("box_type2")
+    private String boxType2;
+
+    @ApiModelProperty(value= "")
+    @TableField("box_type3")
+    private String boxType3;
+
+    @ApiModelProperty(value= "")
+    @TableField("stock_num")
+    private Double stockNum;
+
+    /**
+     * 寮�绁ㄥ鎴峰悕绉�
+     */
+    @ApiModelProperty(value= "寮�绁ㄥ鎴峰悕绉�")
+    @TableField("kp_cstmr_name")
+    private String kpCstmrName;
+
+    @ApiModelProperty(value= "")
+    @TableField("stock_num2")
+    private Double stockNum2;
+
+    @ApiModelProperty(value= "")
+    private String cstateid;
+
+    public WrkDetlLog() {}
+
+    public WrkDetlLog(Integer wrkNo,Date ioTime,Double anfme,String zpallet,String matnr,String maktx,String batch,String orderNo,String specs,String model,String color,String brand,String unit,Double price,String sku,Double units,String barcode,String origin,String manu,String manuDate,String itemNum,Double safeQty,Double weight,Double manLength,Double volume,String threeCode,String supp,String suppCode,Integer beBatch,String deadTime,Integer deadWarn,Integer source,Integer inspect,Integer danger,Long modiUser,Date modiTime,Long appeUser,Date appeTime,String memo,Long lineNumber,String standby1,String standby2,String standby3,String boxType1,String boxType2,String boxType3,Double stockNum,String kpCstmrName,Double stockNum2,String cstateid) {
+        this.wrkNo = wrkNo;
+        this.ioTime = ioTime;
+        this.anfme = anfme;
+        this.zpallet = zpallet;
+        this.matnr = matnr;
+        this.maktx = maktx;
+        this.batch = batch;
+        this.orderNo = orderNo;
+        this.specs = specs;
+        this.model = model;
+        this.color = color;
+        this.brand = brand;
+        this.unit = unit;
+        this.price = price;
+        this.sku = sku;
+        this.units = units;
+        this.barcode = barcode;
+        this.origin = origin;
+        this.manu = manu;
+        this.manuDate = manuDate;
+        this.itemNum = itemNum;
+        this.safeQty = safeQty;
+        this.weight = weight;
+        this.manLength = manLength;
+        this.volume = volume;
+        this.threeCode = threeCode;
+        this.supp = supp;
+        this.suppCode = suppCode;
+        this.beBatch = beBatch;
+        this.deadTime = deadTime;
+        this.deadWarn = deadWarn;
+        this.source = source;
+        this.inspect = inspect;
+        this.danger = danger;
+        this.modiUser = modiUser;
+        this.modiTime = modiTime;
+        this.appeUser = appeUser;
+        this.appeTime = appeTime;
+        this.memo = memo;
+        this.lineNumber = lineNumber;
+        this.standby1 = standby1;
+        this.standby2 = standby2;
+        this.standby3 = standby3;
+        this.boxType1 = boxType1;
+        this.boxType2 = boxType2;
+        this.boxType3 = boxType3;
+        this.stockNum = stockNum;
+        this.kpCstmrName = kpCstmrName;
+        this.stockNum2 = stockNum2;
+        this.cstateid = cstateid;
+    }
+
+//    WrkDetlLog wrkDetlLog = new WrkDetlLog(
+//            null,    // 宸ヤ綔鍙穂闈炵┖]
+//            null,    // 宸ヤ綔鏃堕棿
+//            null,    // 鏁伴噺
+//            null,    // 鎵樼洏鏉$爜
+//            null,    // 鍟嗗搧缂栧彿[闈炵┖]
+//            null,    // 鍟嗗搧鍚嶇О
+//            null,    // 鎵瑰彿
+//            null,    // 鍗曟嵁缂栧彿
+//            null,    // 瑙勬牸
+//            null,    // 鍨嬪彿
+//            null,    // 棰滆壊
+//            null,    // 鍝佺墝
+//            null,    // 鍗曚綅
+//            null,    // 鍗曚环
+//            null,    // sku
+//            null,    // 鍗曚綅閲�
+//            null,    // 鏉$爜
+//            null,    // 浜у湴
+//            null,    // 鍘傚
+//            null,    // 鐢熶骇鏃ユ湡
+//            null,    // 鍝侀」鏁�
+//            null,    // 瀹夊叏搴撳瓨閲�
+//            null,    // 閲嶉噺
+//            null,    // 闀垮害
+//            null,    // 浣撶Н
+//            null,    // 涓夋柟缂栫爜
+//            null,    // 渚涘簲鍟�
+//            null,    // 渚涘簲鍟嗙紪鐮�
+//            null,    // 鏄惁鎵规
+//            null,    // 淇濊川鏈�
+//            null,    // 棰勮澶╂暟
+//            null,    // 鍒惰喘
+//            null,    // 瑕佹眰妫�楠�
+//            null,    // 鍗遍櫓鍝�
+//            null,    // 淇敼浜哄憳
+//            null,    // 淇敼鏃堕棿
+//            null,    // 娣诲姞浜哄憳
+//            null,    // 娣诲姞鏃堕棿
+//            null,    // 澶囨敞
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 
+//            null,    // 寮�绁ㄥ鎴峰悕绉�
+//            null,    // 
+//            null    // 
+//    );
+
+    public String getIoTime$(){
+        if (Cools.isEmpty(this.ioTime)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.ioTime);
+    }
+
+    public String getBeBatch$(){
+        if (null == this.beBatch){ return null; }
+        switch (this.beBatch){
+            case 1:
+                return "鏄�";
+            case 0:
+                return "鍚�";
+            default:
+                return String.valueOf(this.beBatch);
+        }
+    }
+
+    public String getSource$(){
+        if (null == this.source){ return null; }
+        switch (this.source){
+            case 1:
+                return "鍒堕��";
+            case 2:
+                return "閲囪喘";
+            case 3:
+                return "澶栧崗";
+            default:
+                return String.valueOf(this.source);
+        }
+    }
+
+    public String getInspect$(){
+        if (null == this.inspect){ return null; }
+        switch (this.inspect){
+            case 1:
+                return "鏄�";
+            case 0:
+                return "鍚�";
+            default:
+                return String.valueOf(this.inspect);
+        }
+    }
+
+    public String getDanger$(){
+        if (null == this.danger){ return null; }
+        switch (this.danger){
+            case 1:
+                return "鏄�";
+            case 0:
+                return "鍚�";
+            default:
+                return String.valueOf(this.danger);
+        }
+    }
+
+    public String getModiUser$(){
+        UserService service = SpringUtils.getBean(UserService.class);
+        User user = service.selectById(this.modiUser);
+        if (!Cools.isEmpty(user)){
+            return String.valueOf(user.getUsername());
+        }
+        return null;
+    }
+
+    public String getModiTime$(){
+        if (Cools.isEmpty(this.modiTime)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime);
+    }
+
+    public String getAppeUser$(){
+        UserService service = SpringUtils.getBean(UserService.class);
+        User user = service.selectById(this.appeUser);
+        if (!Cools.isEmpty(user)){
+            return String.valueOf(user.getUsername());
+        }
+        return null;
+    }
+
+    public String getAppeTime$(){
+        if (Cools.isEmpty(this.appeTime)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime);
+    }
+
+    public String getCstateid$() {
+        KcztMapService service = SpringUtils.getBean(KcztMapService.class);
+        KcztMap kcztMap = service.selectOne(new EntityWrapper<KcztMap>().eq("cstateid", this.cstateid));
+        if (!Cools.isEmpty(kcztMap)){
+            return String.valueOf(kcztMap.getVname());
+        }
+        return String.valueOf(this.cstateid);
+    }
+
+}
diff --git a/src/main/java/com/zy/asrs/entity/WrkMast.java b/src/main/java/com/zy/asrs/entity/WrkMast.java
index e896efc..e1b047f 100644
--- a/src/main/java/com/zy/asrs/entity/WrkMast.java
+++ b/src/main/java/com/zy/asrs/entity/WrkMast.java
@@ -9,6 +9,7 @@
 import com.zy.asrs.mapper.BasWrkIotypeMapper;
 import com.zy.asrs.mapper.BasWrkStatusMapper;
 import com.zy.asrs.service.*;
+import com.zy.common.utils.Synchro;
 import com.zy.system.entity.User;
 import com.zy.system.service.UserService;
 import io.swagger.annotations.ApiModelProperty;
@@ -484,4 +485,8 @@
         return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.logErrTime);
     }
 
+    public void sync(Object source) {
+        Synchro.Copy(source, this);
+    }
+
 }
diff --git a/src/main/java/com/zy/asrs/mapper/WrkDetlLogMapper.java b/src/main/java/com/zy/asrs/mapper/WrkDetlLogMapper.java
new file mode 100644
index 0000000..b40d318
--- /dev/null
+++ b/src/main/java/com/zy/asrs/mapper/WrkDetlLogMapper.java
@@ -0,0 +1,16 @@
+package com.zy.asrs.mapper;
+
+import com.zy.asrs.entity.WrkDetlLog;
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Mapper
+@Repository
+public interface WrkDetlLogMapper extends BaseMapper<WrkDetlLog> {
+
+    List<WrkDetlLog> selectTodayByWrkNo(Integer wrkNo);
+
+}
diff --git a/src/main/java/com/zy/asrs/service/WrkDetlLogService.java b/src/main/java/com/zy/asrs/service/WrkDetlLogService.java
new file mode 100644
index 0000000..f08df35
--- /dev/null
+++ b/src/main/java/com/zy/asrs/service/WrkDetlLogService.java
@@ -0,0 +1,12 @@
+package com.zy.asrs.service;
+
+import com.zy.asrs.entity.WrkDetlLog;
+import com.baomidou.mybatisplus.service.IService;
+
+import java.util.List;
+
+public interface WrkDetlLogService extends IService<WrkDetlLog> {
+
+    List<WrkDetlLog> selectTodayByWrkNo(Integer wrkNo);
+
+}
diff --git a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
index 44a69da..596db23 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -72,7 +72,11 @@
     @Autowired
     private WrkMastMapper wrkMastMapper;
     @Autowired
+    private WrkMastLogService wrkMastLogService;
+    @Autowired
     private WrkDetlService wrkDetlService;
+    @Autowired
+    private WrkDetlLogService wrkDetlLogService;
     @Autowired
     private WaitPakinMapper waitPakinMapper;
     @Autowired
@@ -91,8 +95,6 @@
     private BasCrnErrorMapper basCrnErrorMapper;
     @Autowired
     private WrkMastService wrkMastService;
-    @Autowired
-    private WrkMastLogService wrkMastLogService;
     @Autowired
     private ConfigService configService;
     @Autowired
@@ -2081,7 +2083,17 @@
                 WrkMast wrkMast = wrkMastMapper.selectById(staProtocol.getWorkNo());
 //                if (null == wrkMast || wrkMast.getWrkSts() < 14 || wrkMast.getIoType() < 100) { continue; }
                 if (null == wrkMast) {
-                    continue;
+                    List<WrkMastLog> wrkMastLogs = wrkMastLogService.selectList(new EntityWrapper<WrkMastLog>()
+                            .eq("wrk_no", staProtocol.getWorkNo())
+                            .orderBy("modi_time", false)
+                    );
+                    if (wrkMastLogs.isEmpty()) {
+                        continue;
+                    }
+
+                    WrkMastLog wrkMastLog = wrkMastLogs.get(0);
+                    wrkMast = new WrkMast();
+                    wrkMast.sync(wrkMastLog);
                 }
                 News.warnNoLog("" + mark + " - 0" + " - 寮�濮嬫墽琛�:鍑哄簱  ===>> 宸ヤ綔妗d俊鎭啓鍏ed鏄剧ず鍣�");
                 wrkMasts.add(wrkMast);
@@ -2203,6 +2215,48 @@
 //                                , wrkDetl.getOrderNo()
 //                                , wrkDetl.getCstateid$()
 //                        )));
+                    }else {
+                        List<WrkDetlLog> wrkDetlLogs = wrkDetlLogService.selectTodayByWrkNo(wrkMast.getWrkNo());
+                        if(!wrkDetlLogs.isEmpty()) {
+                            WrkDetlLog wrkDetlLog = wrkDetlLogs.get(0);
+
+                            double anfme = 0D;
+                            double weight = 0D;
+                            for (WrkDetlLog detl : wrkDetlLogs) {
+                                anfme += detl.getAnfme();
+                                weight += detl.getWeight();
+                                wrkDetlLog.setAnfme(anfme);
+                                wrkDetlLog.setWeight(weight);
+                            }
+
+                            List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>()
+                                    .eq("loc_no", wrkMast.getSourceLocNo()));
+                            double totalAnfme = 0D;
+                            double totalWeight = 0D;
+                            for (LocDetl locDetl : locDetls) {
+                                totalAnfme += locDetl.getAnfme();
+                                totalWeight += locDetl.getWeight();
+                            }
+                            wrkDetlLog.setStockNum(totalAnfme);
+                            wrkDetlLog.setStockNum2(totalWeight);
+
+                            ledCommand.getMatDtos().add(new MatDto(
+                                    wrkDetlLog.getMatnr()
+                                    , wrkDetlLog.getMaktx()
+                                    , wrkDetlLog.getAnfme()
+                                    , wrkDetlLog.getWeight()
+                                    , wrkDetlLog.getStockNum()
+                                    , wrkDetlLog.getStockNum2()
+                                    , wrkDetlLog.getSpecs()
+                                    , wrkDetlLog.getSku()
+                                    , wrkDetlLog.getZpallet()
+                                    , wrkDetlLog.getModel()
+                                    , wrkDetlLog.getSupp()
+                                    , wrkDetlLog.getKpCstmrName()
+                                    , wrkDetlLog.getOrderNo()
+                                    , wrkDetlLog.getCstateid$()
+                            ));
+                        }
                     }
 
                 }
diff --git a/src/main/java/com/zy/asrs/service/impl/WrkDetlLogServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/WrkDetlLogServiceImpl.java
new file mode 100644
index 0000000..c161c75
--- /dev/null
+++ b/src/main/java/com/zy/asrs/service/impl/WrkDetlLogServiceImpl.java
@@ -0,0 +1,19 @@
+package com.zy.asrs.service.impl;
+
+import com.zy.asrs.mapper.WrkDetlLogMapper;
+import com.zy.asrs.entity.WrkDetlLog;
+import com.zy.asrs.service.WrkDetlLogService;
+import com.baomidou.mybatisplus.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+import java.util.Collections;
+import java.util.List;
+
+@Service("wrkDetlLogService")
+public class WrkDetlLogServiceImpl extends ServiceImpl<WrkDetlLogMapper, WrkDetlLog> implements WrkDetlLogService {
+
+    @Override
+    public List<WrkDetlLog> selectTodayByWrkNo(Integer wrkNo) {
+        return this.baseMapper.selectTodayByWrkNo(wrkNo);
+    }
+}
diff --git a/src/main/resources/mapper/WrkDetlLogMapper.xml b/src/main/resources/mapper/WrkDetlLogMapper.xml
new file mode 100644
index 0000000..8da4f7d
--- /dev/null
+++ b/src/main/resources/mapper/WrkDetlLogMapper.xml
@@ -0,0 +1,67 @@
+<?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">
+<mapper namespace="com.zy.asrs.mapper.WrkDetlLogMapper">
+
+    <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 -->
+    <resultMap id="BaseResultMap" type="com.zy.asrs.entity.WrkDetlLog">
+        <result column="wrk_no" property="wrkNo" />
+        <result column="io_time" property="ioTime" />
+        <result column="anfme" property="anfme" />
+        <result column="zpallet" property="zpallet" />
+        <result column="matnr" property="matnr" />
+        <result column="maktx" property="maktx" />
+        <result column="batch" property="batch" />
+        <result column="order_no" property="orderNo" />
+        <result column="specs" property="specs" />
+        <result column="model" property="model" />
+        <result column="color" property="color" />
+        <result column="brand" property="brand" />
+        <result column="unit" property="unit" />
+        <result column="price" property="price" />
+        <result column="sku" property="sku" />
+        <result column="units" property="units" />
+        <result column="barcode" property="barcode" />
+        <result column="origin" property="origin" />
+        <result column="manu" property="manu" />
+        <result column="manu_date" property="manuDate" />
+        <result column="item_num" property="itemNum" />
+        <result column="safe_qty" property="safeQty" />
+        <result column="weight" property="weight" />
+        <result column="man_length" property="manLength" />
+        <result column="volume" property="volume" />
+        <result column="three_code" property="threeCode" />
+        <result column="supp" property="supp" />
+        <result column="supp_code" property="suppCode" />
+        <result column="be_batch" property="beBatch" />
+        <result column="dead_time" property="deadTime" />
+        <result column="dead_warn" property="deadWarn" />
+        <result column="source" property="source" />
+        <result column="inspect" property="inspect" />
+        <result column="danger" property="danger" />
+        <result column="modi_user" property="modiUser" />
+        <result column="modi_time" property="modiTime" />
+        <result column="appe_user" property="appeUser" />
+        <result column="appe_time" property="appeTime" />
+        <result column="memo" property="memo" />
+        <result column="line_number" property="lineNumber" />
+        <result column="standby1" property="standby1" />
+        <result column="standby2" property="standby2" />
+        <result column="standby3" property="standby3" />
+        <result column="box_type1" property="boxType1" />
+        <result column="box_type2" property="boxType2" />
+        <result column="box_type3" property="boxType3" />
+        <result column="stock_num" property="stockNum" />
+        <result column="kp_cstmr_name" property="kpCstmrName" />
+        <result column="stock_num2" property="stockNum2" />
+        <result column="cstateid" property="cstateid" />
+
+    </resultMap>
+
+    <select id="selectTodayByWrkNo" resultMap="BaseResultMap">
+        SELECT * FROM asr_wrk_detl_log
+        WHERE
+            wrk_no = #{wrkNo}
+          AND DATEDIFF( DAY, modi_time, GETDATE( ) ) = 0
+    </select>
+
+</mapper>

--
Gitblit v1.9.1