自动化立体仓库 - WMS系统
#
zhou zhou
9 小时以前 56e2544343ec595f9f5ad7c6b0457188916a9043
#
1个文件已添加
7个文件已修改
184 ■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/TaskDetlLogController.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/task/handler/WorkLogHandler.java 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/common.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/taskLog/taskLog.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/taskLog/taskDetlLog.html 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/TaskDetlLogController.java
@@ -7,6 +7,7 @@
import com.baomidou.mybatisplus.plugins.Page;
import com.core.common.DateUtils;
import com.zy.asrs.entity.TaskDetlLog;
import com.zy.asrs.entity.WrkDetlLog;
import com.zy.asrs.service.TaskDetlLogService;
import com.core.annotations.ManagerAuth;
import com.core.common.BaseRes;
@@ -24,6 +25,23 @@
    @Autowired
    private TaskDetlLogService taskDetlLogService;
    @RequestMapping(value = "/taskDetlLogByMast/list/auth")
    @ManagerAuth
    public R list1(@RequestParam(defaultValue = "1") Integer curr,
                   @RequestParam(defaultValue = "10") Integer limit,
                   @RequestParam Integer wrk_no,
                   @RequestParam String id) {
        EntityWrapper<TaskDetlLog> wrapper = new EntityWrapper<>();
        if (!Cools.isEmpty(wrk_no) && wrk_no != 0) {
            wrapper.eq("wrk_no", wrk_no);
        }
        if (!Cools.isEmpty(id)) {
            wrapper.eq("log_id",id);
        }
        return R.ok(taskDetlLogService.selectPage(new Page<>(curr, limit), wrapper));
    }
    @RequestMapping(value = "/taskDetlLog/{id}/auth")
    @ManagerAuth
    public R get(@PathVariable("id") String id) {
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -1695,8 +1695,7 @@
                throw new CoolException("明细内容不存在!!");
            }
            Double v = Math.round((stationDetl.getAnfme() - stationDetl.getWorkQty()) * 10000) / 10000.0;
            Double v = stationDetl.getAnfme() - stationDetl.getWorkQty();
            if (detlDto.getAnfme().compareTo(v) > 0) {
                throw new CoolException("组托上限为:" + stationDetl.getAnfme() + ", 已组托:" + stationDetl.getWorkQty() + ", 还可组托:" + v);
            }
@@ -1727,7 +1726,7 @@
                throw new CoolException("保存入库通知档失败");
            }
            Double v1 = Math.round((stationDetl.getWorkQty() + detlDto.getAnfme()) * 10000) / 10000.0 ;
            Double v1 = stationDetl.getWorkQty() + detlDto.getAnfme();
            stationDetl.setWorkQty(v1);
            if (!basStationDetlService.updateById(stationDetl)) {
@@ -1737,19 +1736,6 @@
            if (v1.compareTo(stationDetl.getWorkQty()) >= 0) {
                if (!basStationDetlService.deleteById(stationDetl)) {
                    throw new CoolException("原始数据移除失败!");
                }
            }
            List<BasStationDetl> devNo = basStationDetlService.selectList(new EntityWrapper<BasStationDetl>().eq("dev_no", stationDetl.getDevNo()));
            if (Objects.isNull(devNo) || devNo.isEmpty()) {
                BasStation station = basStationService.selectOne(new EntityWrapper<BasStation>()
                        .eq("loc_sts", LocStsType.LOC_STS_TYPE_F.type)
                        .eq("dev_no", stationDetl.getDevNo()));
                if (!Objects.isNull(station)) {
                    station.setLocSts(LocStsType.LOC_STS_TYPE_D.type);
                    if (!basStationService.updateById(station)) {
                        throw new CoolException("站点状态修改失败~!!");
                    }
                }
            }
@@ -1792,11 +1778,11 @@
            throw new CoolException("站点不存在!!");
        }
//        station.setLocSts(LocStsType.LOC_STS_TYPE_O.type);
//        if (!basStationService.updateById(station)) {
//            throw new CoolException("站点状态修改失败!");
//        }
//        basStationDetlService.delete(new EntityWrapper<BasStationDetl>().eq("dev_no", station.getDevNo()));
        station.setLocSts(LocStsType.LOC_STS_TYPE_O.type);
        if (!basStationService.updateById(station)) {
            throw new CoolException("站点状态修改失败!");
        }
        basStationDetlService.delete(new EntityWrapper<BasStationDetl>().eq("dev_no", station.getDevNo()));
//        // 任务完成
//        task.setWrkSts(15L);
@@ -1989,7 +1975,6 @@
        waitPakins.forEach(waitPakin -> {
            WrkDetl wrkDetl = new WrkDetl();
            wrkDetl.sync(waitPakin);
            wrkDetl.setSuppCode(waitPakin.getSuppCode());
            wrkDetl.setWrkNo(wrkMast.getWrkNo());
            wrkDetl.setIoTime(wrkMast.getIoTime());
            wrkDetl.setAppeTime(now);
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -418,7 +418,7 @@
                            .eq("loc_no", locDto.getLocNo())
                            .eq("matnr", locDto.getMatnr())
                            .eq("batch", locDto.getBatch())
                            .eq("standby1",locDto.getStandby2())
                            .eq("standby1",locDto.getStandby1())
                    ).getDiffQty().compareTo(BigDecimal.ZERO) == 0
            );
            if (!DiffQty){
src/main/java/com/zy/asrs/task/handler/WorkLogHandler.java
@@ -191,21 +191,6 @@
//                }
            }
            for (TaskDetl taskDetl :taskDetls){
                TaskDetlLog taskDetlLog = new TaskDetlLog();
                BeanUtils.copyProperties(taskDetl, taskDetlLog);
                // 保存工作明细档历史档
                if (!taskDetlLogService.insert(taskDetlLog)) {
                exceptionHandle("保存工作明细历史档[workNo={0}]失败", task.getWrkNo());
                }
                // 删除工作明细档
                if (!taskDetlService.deleteById(taskDetl)) {
                exceptionHandle("删除工作明细档[workNo={0}]失败", task.getWrkNo());
                }
            }
            TaskLog taskLog = new TaskLog();
            BeanUtils.copyProperties(task, taskLog);
            // 保存工作主档历史档
@@ -217,6 +202,22 @@
            if (!taskService.deleteById(task)) {
                exceptionHandle("删除工作主档[workNo={0}]失败", task.getWrkNo());
            }
            List<TaskDetl> taskDetls2 = taskDetlService.selectList(new EntityWrapper<TaskDetl>().eq("wrk_no", task.getWrkNo()));
            for (TaskDetl taskDetl :taskDetls2){
                TaskDetlLog taskDetlLog = new TaskDetlLog();
                BeanUtils.copyProperties(taskDetl, taskDetlLog);
                taskDetlLog.setLogId(taskLog.getId());
                taskDetlLog.setId(null);
                // 保存工作明细档历史档
                if (!taskDetlLogService.insert(taskDetlLog)) {
                exceptionHandle("保存工作明细历史档[workNo={0}]失败", task.getWrkNo());
                }
                // 删除工作明细档
                if (!taskDetlService.deleteById(taskDetl)) {
                exceptionHandle("删除工作明细档[workNo={0}]失败", task.getWrkNo());
                }
            }
        } catch (Exception e) {
            log.error("fail", e);
src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java
@@ -859,6 +859,7 @@
            if (Objects.isNull(apallet)) {
                throw new CoolException("数据错误:组托数据不存在!!");
            }
            log.info(apallet.size() + "-------------------------------------------------------------------");
            apallet.forEach(pakin -> {
                LocDetl detl = new LocDetl();
                BeanUtils.copyProperties(pakin, detl);
src/main/webapp/static/js/common.js
@@ -223,6 +223,7 @@
var cacheCols = [
    {field: 'matnr', align: 'center',title: '商品编号(品号)', sort:true}
    ,{field: 'maktx', align: 'center',title: '商品名称(品名)', sort:true}
    ,{field: 'standby1', align: 'center',title: '供应商代码', sort:true}
    ,{field: 'anfme', align: 'center',title: '数量', hide: false}
    ,{field: 'specs', align: 'center',title: '规格', hide: false}
    ,{field: 'tag$', align: 'center',title: '零件类型', hide: false}
src/main/webapp/static/js/taskLog/taskLog.js
@@ -101,6 +101,7 @@
            case 'detlShow':
                wrkNo = data.wrkNo;
                ioTime = data.ioTime;
                id = data.id;
                // 表格下方显示
                // locDetl(data.wrkNo);
                // 弹层显示
@@ -110,7 +111,7 @@
                    maxmin: true,
                    area: [top.detailWidth, top.detailHeight],
                    shadeClose: true,
                    content: 'taskLog_detail.html',
                    content: 'taskDetlLog.html',
                    success: function (layero, index) {
                    }
                });
src/main/webapp/views/taskLog/taskDetlLog.html
New file
@@ -0,0 +1,99 @@
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../static/css/cool.css" media="all">
    <link rel="stylesheet" href="../../static/css/common.css" media="all">
    <style>
    </style>
</head>
<body>
<div class="layui-inline"  style="width:20%;margin-top: 20px">
    <label class="layui-form-label">工 作 号:</label>
    <div class="layui-input-inline">
        <input id="wrkNo" class="layui-input" type="text" disabled="disabled">
    </div>
</div>
<div class="layui-inline"  style="width:20%;margin-top: 20px">
    <label class="layui-form-label">工作时间:</label>
    <div class="layui-input-inline">
        <input id="ioTime" class="layui-input" type="text" disabled="disabled">
    </div>
</div>
<table class="layui-hide" id="wrkDetlLogByMast" lay-filter="wrkDetlLogByMast"></table>
</body>
<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/cool.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/locMast/locMast.js" charset="utf-8"></script>
<script type="text/javascript">
    var pageCur;
    function getCol() {
        let cols = [
            {field: 'wrkNo', align: 'center',title: '工作号'}
            ,{field: 'ioTime$', align: 'center',title: '工作时间',width:160}
        ];
        cols.push.apply(cols, detlCols);
        return cols;
    }
    layui.use(['table','laydate', 'form'], function() {
        table = layui.table;
        var $ = layui.jquery;
        var form = layui.form;
        $('#wrkNo').val(parent.wrkNo);
        $('#ioTime').val(top.dateToStr(parent.ioTime, true));
        // 数据渲染
        tableIns1 = table.render({
            elem: '#wrkDetlLogByMast',
            headers: {token: localStorage.getItem('token')},
            url: baseUrl+'/taskDetlLogByMast/list/auth',
            where: {wrk_no: parent.wrkNo,id: parent.id},
            page: true,
            limit: 16,
            limits: [16, 30, 50, 100, 200, 500],
            even: true,
            toolbar: '#toolbar',
            cellMinWidth: 50,
            cols: [getCol()],
            request: {
                pageName: 'curr',
                pageSize: 'limit'
            },
            parseData: function (res) {
                return {
                    'code': res.code,
                    'msg': res.msg,
                    'count': res.data.total,
                    'data': res.data.records
                }
            },
            response: {
                statusCode: 200
            },
            done: function(res, curr, count) {
                if (res.code === 403) {
                    top.location.href = baseUrl+"/";
                }
                pageCur=curr;
                form.on('checkbox(tableCheckbox)', function (data) {
                    var _index = $(data.elem).attr('table-index')||0;
                    if(data.elem.checked){
                        res.data[_index][data.value] = 'Y';
                    }else{
                        res.data[_index][data.value] = 'N';
                    }
                });
            }
        });
    });
</script>
</html>