| | |
| | | |
| | | /** |
| | | * 目标站点状态检测 |
| | | * @param devpNo |
| | | * @param put 是否入库操作 true 是 ; false 不是 |
| | | * @param pakin 是否入库操作 true 是 ; false 不是 |
| | | */ |
| | | BasDevp checkSiteStatus(Integer devpNo, boolean put); |
| | | BasDevp checkSiteStatus(Integer devpNo, boolean pakin); |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public BasDevp checkSiteStatus(Integer devpNo, boolean put) { |
| | | public BasDevp checkSiteStatus(Integer devpNo, boolean pakin) { |
| | | BasDevp station = selectById(devpNo); |
| | | if (station == null){ |
| | | throw new CoolException(devpNo+"站点不存在"); |
| | | } |
| | | if (put) { |
| | | if (pakin) { |
| | | if(station.getAutoing()==null || !station.getAutoing().equals("Y")) { |
| | | throw new CoolException(devpNo+"站点不是自动状态"); |
| | | } |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.core.common.BaseRes; |
| | |
| | | if (Cools.isEmpty(param.getDevpNo(), param.getList())) { |
| | | throw new CoolException(BaseRes.PARAM); |
| | | } |
| | | Date now = new Date(); |
| | | // 源站点状态检测 |
| | | BasDevp sourceStaNo = basDevpService.checkSiteStatus(param.getDevpNo(), true); |
| | | // 检索库位 |
| | | LocTypeDto locTypeDto = new LocTypeDto(sourceStaNo); |
| | | log.info(JSON.toJSONString(locTypeDto)); |
| | | log.info("{}入库口尺寸检测:{}", param.getDevpNo(), locTypeDto.getLocType1()==1?"低规格库位":"高规格库位"); |
| | | List<String> matNos = param.getList().stream().map(FullStoreParam.MatCodeStore::getMatNo).distinct().collect(Collectors.toList()); |
| | | StartupDto dto = commonService.getLocNo(DEFAULT_ROW_NO_TYPE, 1, param.getDevpNo(), matNos, locTypeDto, 0); |
| | | // 生成工作号 |
| | |
| | | wrkMast.setIoTime(new Date()); |
| | | wrkMast.setWrkSts(1L); // 工作状态:生成入库ID |
| | | wrkMast.setIoType(1); // 入出库状态:1.入库 |
| | | wrkMast.setIoPri(13D); // 优先级:10 |
| | | wrkMast.setIoPri(13D); // 优先级:13 |
| | | wrkMast.setCrnNo(dto.getCrnNo()); |
| | | wrkMast.setSourceStaNo(dto.getSourceStaNo()); |
| | | wrkMast.setStaNo(dto.getStaNo()); |
| | |
| | | wrkMast.setEmptyMk("N"); // 空板 |
| | | wrkMast.setLinkMis("N"); |
| | | wrkMast.setCtnType(sourceStaNo.getCtnType()); // 容器类型 |
| | | // 操作人员数据 |
| | | wrkMast.setAppeUser(userId); |
| | | wrkMast.setAppeTime(new Date()); |
| | | wrkMast.setAppeTime(now); |
| | | wrkMast.setModiUser(userId); |
| | | wrkMast.setModiTime(new Date()); |
| | | boolean res = wrkMastService.insert(wrkMast); |
| | | if (!res) { |
| | | wrkMast.setModiTime(now); |
| | | if (!wrkMastService.insert(wrkMast)) { |
| | | throw new CoolException("保存工作档失败"); |
| | | } |
| | | // 生成工作档明细 |
| | |
| | | // 更新源站点信息 |
| | | sourceStaNo.setWrkNo(workNo); |
| | | sourceStaNo.setModiUser(userId); |
| | | sourceStaNo.setModiTime(new Date()); |
| | | sourceStaNo.setModiTime(now); |
| | | if (!basDevpService.updateById(sourceStaNo)){ |
| | | throw new CoolException("更新源站失败"); |
| | | } |
| | |
| | | if (locMast.getLocSts().equals("O")){ |
| | | locMast.setLocSts("S"); // S.入库预约 |
| | | locMast.setModiUser(userId); |
| | | locMast.setModiTime(new Date()); |
| | | locMast.setModiTime(now); |
| | | if (!locMastService.updateById(locMast)){ |
| | | throw new CoolException("改变库位状态失败"); |
| | | } |
| | |
| | | package com.zy.common.model; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.BasDevp; |
| | | import lombok.Data; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/10/19 |
| | | */ |
| | | @Slf4j |
| | | @Data |
| | | public class LocTypeDto { |
| | | |
| | |
| | | } else { |
| | | this.locType1 = 2; // 高库位 |
| | | } |
| | | log.info(JSON.toJSONString(this)); |
| | | } |
| | | |
| | | } |
| | |
| | | StartupDto startupDto = new StartupDto(); |
| | | // 生成工作号 |
| | | int workNo = getWorkNo(0); |
| | | |
| | | switch (sourceStaNo) { |
| | | case 202: |
| | | whsType = 2; |
| | | break; |
| | | case 205: |
| | | whsType = 1; |
| | | break; |
| | | case 126: |
| | | whsType = 3; |
| | | break; |
| | | case 110: |
| | | whsType = 4; |
| | | break; |
| | | case 301: |
| | | whsType = 5; |
| | | break; |
| | | default: |
| | | throw new CoolException("库位排号分配错误, 源站号:" + sourceStaNo); |
| | | } |
| | | RowLastno rowLastno = rowLastnoService.selectById(whsType); |
| | | if (Cools.isEmpty(rowLastno)) { |
| | | throw new CoolException("数据异常,请联系管理员"); |
| | |
| | | |
| | | // 显示表单弹窗 |
| | | function showEditModel(expTpe) { |
| | | var mlist=null |
| | | var inQtys=[] |
| | | admin.open({ |
| | | type: 1, |
| | | title: (expTpe ? '修改' : '添加') + '单据', |
| | |
| | | {align: 'center', title: '操作', toolbar: '#formSSXMTableBar', minWidth: 80, width: 80, fixed: 'right'} |
| | | ]], |
| | | done: function (res) { |
| | | mlist= res.data |
| | | for (let i = 0; i < mlist.length; i++) { |
| | | var waitIn=mlist[i] |
| | | inQtys.push(waitIn.qty) |
| | | } |
| | | $(layero).find('.layui-table-view').css('margin', '0'); |
| | | }, |
| | | size: '' |
| | |
| | | |
| | | var admin; |
| | | var initCountVal = 0; |
| | | var matCodeData = []; |
| | | function getCol() { |
| | | var cols = [ |
| | | {fixed: 'left', field: 'count', title: '数量(必填)', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'} |
| | | {fixed: 'left', field: 'count', title: '数量(必填)', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'}, |
| | | {field: 'batch', title: '批号(选填)', align: 'center', edit:'text', width: 200, style:'color: blue;font-weight: bold'} |
| | | ]; |
| | | cols.push.apply(cols, matCols); |
| | | cols.push({fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:80}) |
| | | cols.push({fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width: 80}) |
| | | return cols; |
| | | } |
| | | |
| | | layui.use(['table','laydate', 'form'], function() { |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['admin', 'table','laydate', 'form'], function() { |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | admin = layui.admin; |
| | | |
| | | tableIns = table.render({ |
| | | elem: '#chooseData', |
| | |
| | | |
| | | // 页面修改 |
| | | table.on('edit(chooseData)', function (obj) { |
| | | let index = obj.tr.attr("data-index"); |
| | | let data = matCodeData[index]; |
| | | if (obj.field === 'anfme'){ |
| | | let vle = Number(obj.value); |
| | | if (isNaN(vle)) { |
| | | layer.msg("请输入数字", {icon: 2}); |
| | | return false; |
| | | } else { |
| | | if (vle <= 0) { |
| | | layer.msg("数量必须大于零", {icon: 2}); |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | data[obj.field] = obj.value; |
| | | tableIns.reload({data: matCodeData}); |
| | | |
| | | updateMatCodeData(obj.data.matNo, Number(obj.value)); |
| | | }); |
| | | |
| | |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'remove': |
| | | for (var i = matCodeData.length - 1; i >= 0; i--) { |
| | | for (let i = matCodeData.length - 1; i >= 0; i--) { |
| | | if (matCodeData[i].matNo === data.matNo) { |
| | | matCodeData.splice(i, 1); |
| | | } |
| | |
| | | tableIns.reload({data: matCodeData,done:function (res) { |
| | | limit(); |
| | | getInBound(); |
| | | // 覆盖render方法的done |
| | | }}); |
| | | break; |
| | | } |
| | |
| | | tableIns.reload({data: matCodeData,done:function (res) { |
| | | limit(); |
| | | getInBound(); |
| | | // 覆盖render方法的done |
| | | }}); |
| | | } |
| | | |
| | |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }) |
| | |
| | | // 提取物料 |
| | | var matCodeLayerIdx; |
| | | function getMat() { |
| | | matCodeLayerIdx = layer.open({ |
| | | matCodeLayerIdx = admin.open({ |
| | | type: 2, |
| | | title: '提取物料', |
| | | maxmin: true, |
| | |
| | | <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/admin.css?v=318" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | <style> |
| | |
| | | </body> |
| | | <script> |
| | | function getCol() { |
| | | var cols = [ |
| | | let cols = [ |
| | | {type: 'checkbox', fixed: 'left'} |
| | | ]; |
| | | cols.push.apply(cols, matCols); |
| | |
| | | return cols; |
| | | } |
| | | var pageCurr; |
| | | layui.use(['table','laydate', 'form'], function() { |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table','laydate', 'form', 'admin'], function() { |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | var admin = layui.admin; |
| | | |
| | | // 物料查询数据表 |
| | | matQueryTable = table.render({ |
| | | elem: '#matCode', |
| | |
| | | <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/admin.css?v=318" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | <style> |