| | |
| | | HttpServletRequest request) { |
| | | auth(appkey, param, request); |
| | | openService.palletizingComplete(param); |
| | | return R.ok(); |
| | | return R.ok(param); |
| | | } |
| | | |
| | | |
| | |
| | | @ApiModelProperty(value= "单价") |
| | | private Double price; |
| | | |
| | | /* |
| | | * 徐工汉云上饶江铜:木箱编码 |
| | | * */ |
| | | @ApiModelProperty(value= "sku") |
| | | private String sku; |
| | | |
| | |
| | | @ApiModelProperty(value= "条码") |
| | | private String barcode; |
| | | |
| | | /* |
| | | * 徐工汉云上饶江铜:木箱位置 |
| | | * */ |
| | | @ApiModelProperty(value= "产地") |
| | | private String origin; |
| | | |
| | |
| | | package com.zy.asrs.entity.param; |
| | | |
| | | import com.core.common.Cools; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | |
| | | private String specs;// (是否需要) 字符串 规格 |
| | | } |
| | | |
| | | public Integer getDevNo$(){ |
| | | if (!Cools.isEmpty(this.palletizingNo)){ |
| | | switch (this.palletizingNo){ |
| | | case "1": |
| | | return 220; |
| | | case "2": |
| | | return 216; |
| | | case "3": |
| | | return 118; |
| | | default: |
| | | return null; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | } |
| | |
| | | private BasDevpService basDevpService; |
| | | @Autowired |
| | | private WrkDetlService wrkDetlService; |
| | | @Autowired |
| | | private WaitPakinService waitPakinService; |
| | | |
| | | @Override |
| | | @Transactional |
| | |
| | | } |
| | | BasDevp basDevp = basDevpService.selectById(param.getDevNo()); |
| | | if (Cools.isEmpty(basDevp)){ |
| | | throw new CoolException("参数:站点号 devNo不存在"); |
| | | throw new CoolException("参数:站点号 devNo="+param.getDevNo()+"不存在"); |
| | | }else if (Cools.isEmpty(basDevp.getWrkNo()) || basDevp.getWrkNo()==0 ){ |
| | | throw new CoolException("站点:"+param.getDevNo()+" 不存在工作中任务"); |
| | | }else if(!basDevp.getWrkNo().toString().equals(param.getWrkNo())){ |
| | |
| | | @Override |
| | | @Transactional |
| | | public void palletizingComplete(PalletizingCompleteParam param) { |
| | | Long userId = 7777L;//中控 |
| | | //判断param参数 |
| | | if (Cools.isEmpty(param.getBarcode())){ |
| | | throw new CoolException("参数:托盘码 barcode为空"); |
| | | }else if (Cools.isEmpty(param.getPalletizingNo())){ |
| | | throw new CoolException("参数:码垛位编号 palletizingNo为空"); |
| | | }else if (Cools.isEmpty(param.getMatLists()) || param.getMatLists().size()==0){ |
| | | throw new CoolException("参数:物料明细 matLists为空"); |
| | | } |
| | | //判断matLists参数 |
| | | for (PalletizingCompleteParam.MatList matList:param.getMatLists()){ |
| | | if (Cools.isEmpty(matList.getMatnr())){ |
| | | throw new CoolException("参数:物料编码 matnr为空"); |
| | | }else if (Cools.isEmpty(matList.getPosition())){ |
| | | throw new CoolException("物料编码:"+matList.getMatnr()+"、参数:码垛位置 position为空"); |
| | | }else if (Cools.isEmpty(matList.getBoxNo())){ |
| | | throw new CoolException("物料编码:"+matList.getMatnr()+"、参数:木箱编号 boxNo为空"); |
| | | }else if (Cools.isEmpty(matList.getAnfme()) || matList.getAnfme().equals(0)){ |
| | | throw new CoolException("物料编码:"+matList.getMatnr()+"、参数:木箱中铜箔数量 anfme为空"); |
| | | }else if (Cools.isEmpty(matList.getWeight()) || matList.getWeight().equals(0D)){ |
| | | throw new CoolException("物料编码:"+matList.getMatnr()+"、参数:重量 weight为空"); |
| | | } |
| | | } |
| | | |
| | | // BasDevp basDevp = basDevpService.selectById(Integer.parseInt(param.getDevNo$())); |
| | | // if (Cools.isEmpty(basDevp)){ |
| | | // throw new CoolException("参数:码垛位编号 palletizingNo="+param.getPalletizingNo()+"不存在"); |
| | | // } |
| | | // if (Cools.isEmpty(basDevp.getAutoing()) || !basDevp.getAutoing().equals("Y")){ |
| | | // throw new CoolException("码垛位编号 palletizingNo="+param.getPalletizingNo()+" 所处站点不是自动状态"); |
| | | // } |
| | | // if (Cools.isEmpty(basDevp.getLoading()) || !basDevp.getLoading().equals("Y")){ |
| | | // throw new CoolException("码垛位编号 palletizingNo="+param.getPalletizingNo()+" 所处站点不是有物状态"); |
| | | // } |
| | | // if (Cools.isEmpty(basDevp.getCanining()) || !basDevp.getCanining().equals("Y")){ |
| | | // throw new CoolException("码垛位编号 palletizingNo="+param.getPalletizingNo()+" 所处站点不是能入状态"); |
| | | // } |
| | | |
| | | |
| | | WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("io_type",201).eq("barcode", param.getBarcode()).eq("sta_no",param.getDevNo$())); |
| | | if (Cools.isEmpty(wrkMast) || !wrkMast.getWrkSts().equals(42L)){ |
| | | throw new CoolException("查询托盘失败"); |
| | | }else { |
| | | wrkMast.setWrkSts(wrkMast.getWrkSts()+1); |
| | | } |
| | | |
| | | |
| | | if (locDetlService.selectCount(new EntityWrapper<LocDetl>().eq("zpallet", param.getBarcode()))!=0 |
| | | || wrkDetlService.selectCount(new EntityWrapper<WrkDetl>().eq("zpallet", param.getBarcode()))!=0 |
| | | || waitPakinService.selectCount(new EntityWrapper<WaitPakin>().eq("zpallet", param.getBarcode()))!=0){ |
| | | throw new CoolException("托盘条码:"+param.getBarcode()+"已存在,请勿重复组托"); |
| | | } |
| | | |
| | | |
| | | Date now = new Date(); |
| | | for (PalletizingCompleteParam.MatList matList:param.getMatLists()){ |
| | | Mat mat = matService.selectByMatnr(matList.getMatnr()); |
| | | if (Cools.isEmpty(mat)) { |
| | | throw new CoolException(matList.getMatnr() + "商品档案不存在"); |
| | | } |
| | | WaitPakin waitPakin = new WaitPakin(); |
| | | waitPakin.sync(mat); |
| | | waitPakin.setBatch(matList.getBatch()); //批次 |
| | | waitPakin.setSpecs(matList.getSpecs()); //规格 |
| | | waitPakin.setSku(matList.getBoxNo()); //木箱编码 |
| | | waitPakin.setZpallet(param.getBarcode()); //托盘码 |
| | | waitPakin.setOrigin(matList.getPosition()); //木箱在托盘上的位置 |
| | | waitPakin.setIoStatus("N"); // 入出状态 |
| | | waitPakin.setAnfme(matList.getAnfme().doubleValue()); // 木箱中铜箔数量 |
| | | waitPakin.setStatus("Y"); // 状态 |
| | | waitPakin.setAppeUser(userId); |
| | | waitPakin.setAppeTime(now); |
| | | waitPakin.setModiUser(userId); |
| | | waitPakin.setModiTime(now); |
| | | if (!waitPakinService.insert(waitPakin)) { |
| | | throw new CoolException("保存入库通知档失败"); |
| | | } |
| | | } |
| | | if (!wrkMastService.updateById(wrkMast)){ |
| | | throw new CoolException("异常,请重新申请"); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | ,{field: 'brand', align: 'center',title: '品牌', hide: true} |
| | | ,{field: 'unit', align: 'center',title: '单位', hide: false} |
| | | ,{field: 'price', align: 'center',title: '单价', hide: true} |
| | | ,{field: 'sku', align: 'center',title: 'sku', hide: true} |
| | | ,{field: 'sku', align: 'center',title: '木箱编码', hide: false} |
| | | ,{field: 'units', align: 'center',title: '单位量', hide: true} |
| | | ,{field: 'barcode', align: 'center',title: '条码', hide: true} |
| | | ,{field: 'origin', align: 'center',title: '产地', hide: true} |
| | | ,{field: 'origin', align: 'center',title: '木箱位置', hide: false} |
| | | ,{field: 'manu', align: 'center',title: '厂家', hide: true} |
| | | ,{field: 'manuDate', align: 'center',title: '生产日期', hide: true} |
| | | ,{field: 'itemNum', align: 'center',title: '品项数', hide: true} |
| | |
| | | ,{field: 'brand', align: 'center',title: '品牌', hide: true} |
| | | ,{field: 'unit', align: 'center',title: '单位', hide: false} |
| | | ,{field: 'price', align: 'center',title: '单价', hide: true} |
| | | ,{field: 'sku', align: 'center',title: 'sku', hide: true} |
| | | ,{field: 'sku', align: 'center',title: '木箱编码', hide: false} |
| | | ,{field: 'units', align: 'center',title: '单位量', hide: true} |
| | | ,{field: 'barcode', align: 'center',title: '条码', hide: true} |
| | | ,{field: 'origin', align: 'center',title: '产地', hide: true} |
| | | ,{field: 'origin', align: 'center',title: '木箱位置', hide: false} |
| | | ,{field: 'manu', align: 'center',title: '厂家', hide: true} |
| | | ,{field: 'manuDate', align: 'center',title: '生产日期', hide: true} |
| | | ,{field: 'itemNum', align: 'center',title: '品项数', hide: true} |
| | |
| | | ,{field: 'brand', align: 'center',title: '品牌', hide: true} |
| | | ,{field: 'unit', align: 'center',title: '单位', hide: true} |
| | | ,{field: 'price', align: 'center',title: '单价', hide: true} |
| | | ,{field: 'sku', align: 'center',title: 'sku', hide: true} |
| | | ,{field: 'sku', align: 'center',title: '木箱编码', hide: false} |
| | | ,{field: 'units', align: 'center',title: '单位量', hide: true} |
| | | ,{field: 'barcode', align: 'center',title: '条码', hide: true} |
| | | ,{field: 'origin', align: 'center',title: '产地', hide: true} |
| | | ,{field: 'origin', align: 'center',title: '木箱位置', hide: false} |
| | | ,{field: 'manu', align: 'center',title: '厂家', hide: true} |
| | | ,{field: 'manuDate', align: 'center',title: '生产日期', hide: true} |
| | | ,{field: 'itemNum', align: 'center',title: '品项数', hide: true} |
| | |
| | | ,{field: 'brand', align: 'center',title: '品牌', hide: true} |
| | | ,{field: 'unit', align: 'center',title: '单位', hide: true} |
| | | ,{field: 'price', align: 'center',title: '单价', hide: true} |
| | | ,{field: 'sku', align: 'center',title: 'sku', hide: true} |
| | | ,{field: 'sku', align: 'center',title: '木箱编码', hide: false} |
| | | ,{field: 'units', align: 'center',title: '单位量', hide: true} |
| | | ,{field: 'barcode', align: 'center',title: '条码', hide: true} |
| | | ,{field: 'origin', align: 'center',title: '产地', hide: true} |
| | | ,{field: 'origin', align: 'center',title: '木箱位置', hide: false} |
| | | ,{field: 'manu', align: 'center',title: '厂家', hide: true} |
| | | ,{field: 'manuDate', align: 'center',title: '生产日期', hide: true} |
| | | ,{field: 'itemNum', align: 'center',title: '品项数', hide: true} |
| | |
| | | {field: 'locNo', align: 'center',title: '库位号'}, |
| | | {field: 'matnr', align: 'center',title: '商品编号', sort:true} |
| | | ,{field: 'maktx', align: 'center',title: '商品名称', sort:true} |
| | | ,{field: 'orderNo', align: 'center',title: '单据编号', hide: false, hide: true} |
| | | ,{field: 'orderNo', align: 'center',title: '单据编号', hide: false} |
| | | ,{field: 'batch', align: 'center',title: '批号', width: 300, sort:true , hide: true} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | ,{field: 'zpallet', align: 'center',title: '托盘条码', hide: true} |
| | |
| | | ,{field: 'brand', align: 'center',title: '品牌', hide: true} |
| | | ,{field: 'unit', align: 'center',title: '单位', hide: true} |
| | | ,{field: 'price', align: 'center',title: '单价', hide: true} |
| | | ,{field: 'sku', align: 'center',title: 'sku', hide: true} |
| | | ,{field: 'sku', align: 'center',title: '木箱编码', hide: false} |
| | | ,{field: 'units', align: 'center',title: '单位量', hide: true} |
| | | ,{field: 'barcode', align: 'center',title: '条码', hide: true} |
| | | ,{field: 'origin', align: 'center',title: '产地', hide: true} |
| | | ,{field: 'origin', align: 'center',title: '木箱位置', hide: false} |
| | | ,{field: 'manu', align: 'center',title: '厂家', hide: true} |
| | | ,{field: 'manuDate', align: 'center',title: '生产日期', hide: true} |
| | | ,{field: 'itemNum', align: 'center',title: '品项数', hide: true} |
| | |
| | | return html; |
| | | }} |
| | | ,{field: 'modiUser$', align: 'center',title: '修改人员', hide:true} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间', hide:true}) |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间', hide:false}) |
| | | return cols; |
| | | } |
| | | |
| | |
| | | return html; |
| | | }} |
| | | ,{field: 'modiUser$', align: 'center',title: '修改人员', hide:true} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间', hide:true}) |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间', hide:false}) |
| | | return cols; |
| | | } |
| | | layui.use(['table','laydate', 'form'], function(){ |
| | |
| | | <div class="layui-body"></div> |
| | | <!-- 底部 --> |
| | | <div class="layui-footer layui-text"> |
| | | copyright © 2022 <a href="https://www.superton.cn/" target="_blank">浙江中扬立库有限公司</a> all rights reserved. |
| | | copyright © 2022 <a href="https://zoneyung.com/" target="_blank">浙江中扬立库有限公司</a> all rights reserved. |
| | | <span class="pull-right">Version 1.0.0</span> |
| | | </div> |
| | | |