| | |
| | | } else if (type == 3) { |
| | | workService.pickWrkMast(workNo, getUserId()); |
| | | return R.ok("工作档已拣料"); |
| | | } else if (type == 6) { |
| | | workService.mesLogMkWrkMast(workNo, getUserId()); |
| | | return R.ok("工作档已拣料"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | * 手动完成工作档 |
| | | */ |
| | | void completeWrkMast(String workNo, Long userId); |
| | | void mesLogMkWrkMast(String workNo, Long userId); |
| | | |
| | | /** |
| | | * 库存明细调整 |
| | |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void mesLogMkWrkMast(String workNo, Long userId) { |
| | | WrkMast wrkMast = wrkMastService.selectById(workNo); |
| | | wrkMast.setLogMk("Y"); |
| | | if (!wrkMastService.updateById(wrkMast)) { |
| | | throw new CoolException("修改工作档失败"); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void completeWrkMast(String workNo, Long userId) { |
| | | WrkMast wrkMast = wrkMastService.selectById(workNo); |
| | | if (Cools.isEmpty(wrkMast)){ |
| | |
| | | wrkMast.setModiTime(now); |
| | | wrkMast.setModiUser(userId); |
| | | wrkMast.setSheetNo("3"); |
| | | wrkMast.setLogMk("N"); |
| | | // 完成操作人员记录 |
| | | wrkMast.setManuType("手动完成"); |
| | | if (!wrkMastService.updateById(wrkMast)) { |
| | |
| | | try { |
| | | // 保存接口日志 |
| | | apiLogService.save( |
| | | "成品库入库上报", |
| | | "成品库入库上报MES", |
| | | productInventoryUrl+"/"+productInventory, |
| | | null, |
| | | "127.0.0.1", |
| | |
| | | switch (wrkMast.getIoType()) { |
| | | // 空板入库 |
| | | case 10: |
| | | wrkMast.setLogMk("Y"); |
| | | // 修改库位状态=D |
| | | if (locMast.getLocSts().equals("S") || locMast.getLocSts().equals("Q")) { |
| | | if (!Cools.isEmpty(wrkMast.getBarcode())) { |
| | |
| | | break; |
| | | // 库位移转 |
| | | case 11: |
| | | wrkMast.setLogMk("Y"); |
| | | // 默认目标库位是空板 |
| | | String locSts = "D"; |
| | | // 库位移转判断是否为空板移转 |
| | |
| | | break; |
| | | // 空板出库 |
| | | case 110: |
| | | wrkMast.setLogMk("Y"); |
| | | // 修改库位状态 R ===>> O |
| | | if (locMast.getLocSts().equals("R")) { |
| | | locMast.setLocSts("O"); |
| | |
| | | |
| | | Date now = new Date(); |
| | | if (param.getIoType() == 107 || param.getIoType() == 103) {//盘点再入库 |
| | | if (param.getIoType() == 107){ |
| | | if (!wrkMast.getLogMk().equals("Y")){ |
| | | return R.error("等待上报MES"); |
| | | } |
| | | } |
| | | try{ |
| | | // 检索库位 |
| | | try{ |
| | |
| | | wrkMast.setModiTime(now); |
| | | wrkMast.setLocNo(dto.getLocNo()); |
| | | wrkMast.setCrnNo(dto.getCrnNo()); |
| | | wrkMast.setLogMk("N"); |
| | | if (!wrkMastService.updateById(wrkMast)) { |
| | | log.error(" stnToCrnStnPick --- 更新工作档数据状态失败!" + wrkMast.getWrkNo()); |
| | | throw new CoolException("更新工作档数据状态失败"); |
| | |
| | | <select id="selectToBeHistoryData" resultMap="BaseResultMap"> |
| | | select * from asr_wrk_mast |
| | | where 1=1 |
| | | and (wrk_sts=5 |
| | | or wrk_sts=44 |
| | | and ( |
| | | ( |
| | | wrk_sts=5 |
| | | or (wrk_sts=15 and ove_mk='Y' and wrk_no not in (select wrk_no from asr_bas_devp)) |
| | | or (wrk_sts=15 and dateadd(mi,15,crn_end_time) <= getdate() and wrk_no not in (select wrk_no from asr_bas_devp)) |
| | | or (wrk_sts=15 and crn_end_time is null and wrk_no not in (select wrk_no from asr_bas_devp)) |
| | | ) |
| | | and log_mk = 'Y' |
| | | ) or ( |
| | | wrk_sts=44 |
| | | or wrk_sts=64 |
| | | or (wrk_sts=57 and wrk_no not in (select wrk_no from asr_bas_devp)) |
| | | or (wrk_sts=15 and ove_mk='Y' and wrk_no not in (select wrk_no from asr_bas_devp)) |
| | | or (wrk_sts=15 and dateadd(mi,15,crn_end_time) <= getdate() and wrk_no not in (select wrk_no from asr_bas_devp)) |
| | | or (wrk_sts=15 and crn_end_time is null and wrk_no not in (select wrk_no from asr_bas_devp))) |
| | | and log_mk = 'Y' |
| | | ) |
| | | order by io_time,wrk_no asc |
| | | </select> |
| | | |
| | |
| | | ,{field: 'locNo$', align: 'center',title: '目标库位'} |
| | | ,{field: 'barcode', align: 'center',title: '条码'} |
| | | ,{field: 'sheetNo$', align: 'center',title: '机械臂', hide: false} |
| | | ,{field: 'logMk', align: 'center',title: 'MES', hide: false} |
| | | ,{field: 'preHave', align: 'center',title: '先入品', hide: true} |
| | | ,{field: 'takeNone', align: 'center',title: '空操作', hide: true} |
| | | // ,{field: 'picking', align: 'center',title: '拣料', templet:function(row){ |
| | |
| | | } |
| | | }); |
| | | break; |
| | | case 'mesLogMk': |
| | | layer.confirm('是否跳过上报MES转为上报完成?', {title: '工作号:'+data.wrkNo, shadeClose: true}, function(){ |
| | | http.post(baseUrl+"/hand/control/wrkMast", {workNo: data.wrkNo, type:6}, function (res) { |
| | | $(".layui-laypage-btn")[0].click(); |
| | | layer.msg(data.wrkNo + res.msg); |
| | | }) |
| | | layer.closeAll(); |
| | | |
| | | }); |
| | | break; |
| | | // 明细展示 |
| | | case 'detlShow': |
| | | wrkNo = data.wrkNo; |
| | |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-error" lay-event="takeNone">空操作</a> |
| | | {{# } }} |
| | | <a class="layui-btn layui-btn-warm layui-btn-xs btn-pick" lay-event="upSheetNo">arm</a> |
| | | {{#if (d.logMk === null || d.logMk === 'N') { }} |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-complete" lay-event="mesLogMk">跳过MES</a> |
| | | {{# } }} |
| | | <a class="layui-btn layui-btn-xs btn-detlShow" lay-event="detlShow">明细</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-complete" lay-event="complete">完成</a> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs btn-cancel" lay-event="cancel">取消</a> |