自动化立体仓库 - WMS系统
1
zhang
4 天以前 40254eb1fc7ad9bef6e820c0ffc0cc5a63e9e53e
1
4个文件已修改
53 ■■■■■ 已修改文件
src/main/java/com/zy/asrs/entity/LocDetl.java 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/task/OverYearLogScheduler.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/locDetl/locDetl.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/locDetl/locDetl.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/LocDetl.java
@@ -7,6 +7,7 @@
import com.core.common.Cools;
import com.core.common.SpringUtils;
import com.zy.asrs.service.LocMastService;
import com.zy.asrs.task.OverYearLogScheduler;
import com.zy.common.utils.Synchro;
import com.zy.system.entity.User;
import com.zy.system.service.UserService;
@@ -177,7 +178,9 @@
    }
    public String getBeBatch$(){
        if (null == this.beBatch){ return null; }
        if (null == this.beBatch) {
            return null;
        }
        switch (this.beBatch){
            case 1:
                return "是";
@@ -189,7 +192,9 @@
    }
    public String getSource$(){
        if (null == this.source){ return null; }
        if (null == this.source) {
            return null;
        }
        switch (this.source){
            case 1:
                return "制造";
@@ -203,7 +208,9 @@
    }
    public String getInspect$(){
        if (null == this.inspect){ return null; }
        if (null == this.inspect) {
            return null;
        }
        switch (this.inspect){
            case 1:
                return "是";
@@ -215,7 +222,9 @@
    }
    public String getDanger$(){
        if (null == this.danger){ return null; }
        if (null == this.danger) {
            return null;
        }
        switch (this.danger){
            case 1:
                return "是";
@@ -269,6 +278,16 @@
        return (timeNow - timeCreate) /24/60/60/1000;
    }
    public boolean getAlarmStatus() {
        if (Cools.isEmpty(this.appeTime)) {
            this.appeTime = new Date();
        }
        long timeNow = new Date().getTime();
        long timeCreate = this.appeTime.getTime();
        return OverYearLogScheduler.days > ((timeNow - timeCreate) / 24 / 60 / 60 / 1000);
    }
    public void sync(Object source) {
        Synchro.Copy(source, this);
    }
src/main/java/com/zy/asrs/task/OverYearLogScheduler.java
@@ -2,6 +2,8 @@
import com.zy.asrs.task.core.ReturnT;
import com.zy.asrs.task.handler.OverYearLogHandler;
import com.zy.system.entity.Config;
import com.zy.system.service.ConfigService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -16,8 +18,13 @@
    private static final Logger log = LoggerFactory.getLogger(OverYearLogScheduler.class);
    public static Integer days = 60;
    @Autowired
    private OverYearLogHandler overYearLogHandler;
    @Autowired
    private ConfigService configService;
    @Scheduled(cron = "0/3 * * * * ? ")
    private void execute(){
@@ -27,4 +34,12 @@
        }
    }
    @Scheduled(cron = "0/2 * * * * ? ")
    private void execute2() {
        Config config = configService.selectConfigByCode("AlarmDays");
        if (config != null && config.getValue() != null && config.getStatus() == 1) {
            days = Integer.parseInt(config.getValue());
        }
    }
}
src/main/webapp/static/js/locDetl/locDetl.js
@@ -74,6 +74,15 @@
                    res.data[_index][data.value] = 'N';
                }
            });
            var that = this.elem.next();
            res.data.forEach(function (item, index) {
                if (item.alarmStatus) {
                    var tr = that.find(".layui-table-box tbody tr[data-index='" + index + "']");
                    tr.css("background-color", "#FF5722");
                    tr.css("color", "white");
                }
            });
        }
    });
src/main/webapp/views/locDetl/locDetl.html
@@ -73,7 +73,7 @@
<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/cool.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/locDetl/locDetl.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/locDetl/locDetl.js?v=1" charset="utf-8"></script>
<iframe id="detail-iframe" scrolling="auto" style="display:none;"></iframe>