| | |
| | | |
| | | public void updateIoStatus(int wrkNo, String ioStatus); |
| | | |
| | | public AgvWaitPakin selectByContainerCode(String containerCode); |
| | | |
| | | } |
| | |
| | | @Override |
| | | public void combBinding(String barcode, String stationCode) { |
| | | |
| | | if(Cools.isEmpty(agvWaitPakinService.selectByContainerCode(barcode))){ |
| | | throw new CoolException("该料箱未组托,无法绑定站点"); |
| | | } |
| | | |
| | | AgvBasDevp agvBasDevp = agvBasDevpService.selectOne(new EntityWrapper<AgvBasDevp>().eq("barcode", barcode)); |
| | | |
| | | if(!Cools.isEmpty(agvBasDevp)){ |
| | |
| | | this.update(agvWaitPakin,new EntityWrapper<AgvWaitPakin>().eq("supp_code",agvWaitPakin.getZpallet())); |
| | | }); |
| | | } |
| | | |
| | | @Override |
| | | public AgvWaitPakin selectByContainerCode(String containerCode) { |
| | | return this.selectOne(new EntityWrapper<AgvWaitPakin>().eq("supp_code",containerCode)); |
| | | } |
| | | } |
| | |
| | | import com.zy.asrs.service.LocDetlService; |
| | | import com.zy.asrs.service.LocMastService; |
| | | import com.zy.asrs.service.StaDescService; |
| | | import com.zy.asrs.utils.Utils; |
| | | import com.zy.common.model.LocDto; |
| | | import com.zy.common.model.QueryStockPreDo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashSet; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | |
| | | return this.baseMapper.selectLocNo(matnr); |
| | | } |
| | | |
| | | public Set<String> selectLocNo(String matnr, String batch, String csocode, String isocode) { |
| | | |
| | | Wrapper<LocDetl> wrapper = new EntityWrapper<LocDetl>().eq("matnr", matnr); |
| | | Utils.confirmOnlyMat(wrapper,matnr,batch,csocode,isocode); |
| | | List<LocDetl> locDetls = this.selectList(wrapper); |
| | | |
| | | Set<String> locNos = new HashSet<>(); |
| | | locDetls.forEach(locDetl -> { |
| | | locNos.add(locDetl.getLocNo()); |
| | | }); |
| | | |
| | | return locNos; |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public int updateStockFreeze(String matnr, String locNo, Integer stockFreeze) { |
| | | return this.baseMapper.updateStockFreeze(matnr, locNo, stockFreeze); |
| | |
| | | import com.zy.asrs.task.handler.AutoReplenishmentHandler; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.List; |
| | |
| | | /* |
| | | 定时处理自动补货单据 |
| | | */ |
| | | //@Scheduled(cron = "0/5 * * * * ? ") |
| | | @Scheduled(cron = "0/5 * * * * ? ") |
| | | public void excute(){ |
| | | DocType docType = docTypeService.selectOne(new EntityWrapper<DocType>().eq("doc_name", "自动补货单")); |
| | | List<Order> orderList = orderService.selectList(new EntityWrapper<Order>() |
| | |
| | | } |
| | | |
| | | String matnr = orderDetl.getMatnr(); |
| | | String batch = orderDetl.getBatch(); |
| | | String csocode = orderDetl.getThreeCode(); |
| | | String isocode = orderDetl.getDeadTime(); |
| | | |
| | | Double orderAnfme = orderDetl.getAnfme(); |
| | | |
| | | List<String> locNosSearch = locDetlService.selectLocNo(matnr); |
| | | //List<String> locNosSearch = locDetlService.selectLocNo(matnr); |
| | | Set<String> locNosSearch = locDetlService.selectLocNo(matnr, batch, csocode, isocode); |
| | | |
| | | for(String locNo : locNosSearch){ |
| | | List<LocDetl> locDetls = locDetlService.selectByLocNo(locNo); |
| | |
| | | wapperSetCondition(wrapper,"isoseq",isoseq); |
| | | } |
| | | |
| | | public static void confirmOnlyMat(Wrapper wrapper, String matnr, String batch, String threeCode, String deadTime){ |
| | | wapperSetCondition(wrapper,"matnr",matnr); |
| | | wapperSetCondition(wrapper,"three_code",threeCode); |
| | | wapperSetCondition(wrapper,"dead_time",deadTime); |
| | | wapperSetCondition(wrapper,"batch",batch); |
| | | } |
| | | |
| | | } |
| | |
| | | Integer wrkNo = param.getWrkNo(); |
| | | List<WrkDetl> wrkDetls = wrkDetlService.selectByWrkNo(wrkNo); |
| | | wrkDetls.forEach(wrkDetl -> { |
| | | AgvWaitPakin agvWaitPakin = new AgvWaitPakin(); |
| | | BeanUtils.copyProperties(wrkDetl,agvWaitPakin); |
| | | agvWaitPakin.setIoStatus("Y"); |
| | | agvWaitPakin.setModiTime(now); |
| | | agvWaitPakin.setAppeTime(now); |
| | | agvWaitPakinService.insert(agvWaitPakin); |
| | | |
| | | if(!Cools.isEmpty(wrkDetl.getSuppCode()) && Cools.isEmpty(agvWaitPakinService.selectByContainerCode(wrkDetl.getSuppCode()))){ |
| | | AgvWaitPakin agvWaitPakin = new AgvWaitPakin(); |
| | | BeanUtils.copyProperties(wrkDetl,agvWaitPakin); |
| | | agvWaitPakin.setIoStatus("Y"); |
| | | agvWaitPakin.setModiTime(now); |
| | | agvWaitPakin.setAppeTime(now); |
| | | agvWaitPakinService.insert(agvWaitPakin); |
| | | } |
| | | }); |
| | | |
| | | return R.ok(); |
| | |
| | | @ResponseBody |
| | | public R start(@RequestBody ReplenishmentParam param){ |
| | | |
| | | String containerCode = param.getContainerCode(); |
| | | if(Cools.isEmpty(containerCode)){ |
| | | throw new CoolException("料箱码为空"); |
| | | } |
| | | |
| | | if(!Character.isDigit(containerCode.charAt(0))){ |
| | | containerCode = containerCode.substring(3,containerCode.length()); |
| | | } |
| | | |
| | | AgvBasDevp agvBasDevp = agvBasDevpService.getByDevNo(param.getDevNo()); |
| | | |
| | | if(Cools.isEmpty(agvBasDevp) || !"O".equals(agvBasDevp.getLocSts())){ |
| | | throw new CoolException("当前站点不存在或者站点不为空"); |
| | | } |
| | | //绑定站点 |
| | | agvBasDevpService.updateLocStsAndBarcodeByDevNo(param.getDevNo(),"F",param.getContainerCode()); |
| | | agvBasDevpService.updateLocStsAndBarcodeByDevNo(param.getDevNo(),"F",containerCode); |
| | | |
| | | //生成工作档 |
| | | List<AgvBasDevp> agvBasDevpList = agvBasDevpService.selectList(new EntityWrapper<AgvBasDevp>().eq("dev_no", param.getDevNo())); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | <!-- 待添加 --> |
| | | <div id="data-search-btn" class="layui-btn-container layui-form-item"> |
| | | <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">搜索</button> |
| | | <button id="searchByStaion" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="searchByStaion">搜索</button> |
| | | <button id="checkAll" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="checkAll">全选</button> |
| | | <button id="uncheckAll" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="uncheckAll">反选</button> |
| | | <button id="start" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="start">启动入库</button> |
| | |
| | | }); |
| | | |
| | | // 搜索 |
| | | form.on('submit(search)', function (data) { |
| | | param = null; |
| | | param = {'stationCode' : $('#rowSelect').val()}; |
| | | loadData(param); |
| | | }); |
| | | // form.on('submit(search)', function (data) { |
| | | // param = null; |
| | | // param = {'stationCode' : $('#rowSelect').val()}; |
| | | // loadData(param); |
| | | // }); |
| | | |
| | | //全选 |
| | | form.on('submit(checkAll)', function () { |
| | |
| | | } |
| | | }); |
| | | |
| | | //搜索 |
| | | form.on('submit(searchByStaion)', function () { |
| | | console.log("search.....") |
| | | param = null; |
| | | param = {'stationCode' : $('#rowSelect').val()}; |
| | | loadData(param); |
| | | }); |
| | | |
| | | //反选 |
| | | form.on('submit(uncheckAll)', function () { |
| | | var cks = document.querySelectorAll("#tb input"); |