| | |
| | | } |
| | | |
| | | /** |
| | | * 贴标机贴标完成 |
| | | */ |
| | | @PostMapping("/small/containers/auth/v1") |
| | | @AppAuth(memo = "贴标机贴标完成") //old需要修改 |
| | | public synchronized R smallContainers(@RequestHeader(required = false) String appkey, |
| | | @RequestBody LabellerCompleteParam param, |
| | | HttpServletRequest request) { |
| | | auth(appkey, param, request); |
| | | openService.labellerComplete(param); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 中控(2楼):码垛完成下发入库信息 |
| | | */ |
| | | @PostMapping("/palletizing/complete/auth/v1") |
New file |
| | |
| | | package com.zy.asrs.entity.param; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/6/28 |
| | | */ |
| | | @Data |
| | | public class SmallContainersParam { |
| | | |
| | | // 单据编号 |
| | | private String orderNo; |
| | | |
| | | // 托盘条码 |
| | | private String barcode; |
| | | |
| | | private List<CombMat> combMats; |
| | | |
| | | @Data |
| | | public static class CombMat { |
| | | |
| | | // 物料编号 |
| | | private String matnr; |
| | | |
| | | // 序列码 |
| | | private String batch; |
| | | |
| | | // 物料数量 |
| | | private Double anfme; |
| | | |
| | | // 商品名称 |
| | | private String maktx; |
| | | |
| | | // 规格 |
| | | private String specs; |
| | | |
| | | private Double weight; |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | // } |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | private void execute(){//自动调空板出库 煜星二楼小料箱 172 |
| | | private void execute1(){//自动调空板出库 煜星二楼小料箱 172 |
| | | if (slaveWmsParameterProperties.isAutomaticFillingBoardStaNosBoolean()){ |
| | | Config config = configService.selectOne(new EntityWrapper<Config>().eq("code","bareBoard172")); |
| | | if (!Cools.isEmpty(config) && !Cools.isEmpty(config.getValue()) && config.getValue().equals("Y")){ |
| | | int loadIngCount = basDevpService.selectCount(new EntityWrapper<BasDevp>().ge("dev_no", 160).le("dev_no", 172).eq("loading", "Y")); |
| | | if (loadIngCount<=10){ |
| | | bareBoardHandler.startYx(172); |
| | | int count = 10; |
| | | if (loadIngCount<=count){ |
| | | bareBoardHandler.startYx(172,count); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | private void execute2(){//自动调空板出库 煜星一楼 |
| | | if (slaveWmsParameterProperties.isAutomaticFillingBoardStaNosBoolean()){ |
| | | Config config = configService.selectOne(new EntityWrapper<Config>().eq("code","bareBoard445")); |
| | | if (!Cools.isEmpty(config) && !Cools.isEmpty(config.getValue()) && config.getValue().equals("Y")){ |
| | | int loadIngCount = basDevpService.selectCount(new EntityWrapper<BasDevp>().ge("dev_no", 421).le("dev_no", 465).eq("loading", "Y")); |
| | | int count = 10; |
| | | if (loadIngCount<=count){ |
| | | bareBoardHandler.start(445,count); |
| | | } |
| | | } |
| | | } |
| | |
| | | @Autowired |
| | | private WorkService workService; |
| | | |
| | | public ReturnT<String> start(Integer staNo) { |
| | | public ReturnT<String> start(Integer staNo,Integer count) { |
| | | try { |
| | | if (!Cools.isEmpty(wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("io_type", 110).eq("sta_no", staNo)))){ |
| | | // if (!Cools.isEmpty(wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("io_type", 110).eq("sta_no", staNo)))){ |
| | | // return null; |
| | | // } |
| | | int wrkCount = wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("io_type", 110).eq("sta_no", staNo)); |
| | | if (wrkCount>count){ |
| | | return null; |
| | | } |
| | | // 获取工作号 |
| | |
| | | crns.add(4); |
| | | crns.add(5); |
| | | crns.add(6); |
| | | crns.add(7); |
| | | boolean sign = true; |
| | | for (Integer crnNo : crns){ |
| | | BasCrnp basCrnp = basCrnpService.selectById(crnNo); |
| | |
| | | return SUCCESS; |
| | | } |
| | | |
| | | public ReturnT<String> startYx(Integer staNo) { |
| | | public ReturnT<String> startYx(Integer staNo,Integer count) { |
| | | try { |
| | | // if (!Cools.isEmpty(wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("io_type", 110).eq("sta_no", staNo)))){ |
| | | // return null; |
| | | // } |
| | | int wrkCount = wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("io_type", 110).eq("sta_no", staNo)); |
| | | if (wrkCount>10){ |
| | | if (wrkCount>count){ |
| | | return null; |
| | | } |
| | | ArrayList<Integer> crns =new ArrayList<>(); |
| | | crns.add(1); |
| | | crns.add(2); |
| | | crns.add(3); |
| | | crns.add(4); |
| | | crns.add(5); |
| | | crns.add(6); |
| | | crns.add(7); |
| | | boolean sign = true; |
| | | for (Integer crnNo : crns){ |
| | | List<String> locNoList = new ArrayList<>(); |
| | |
| | | } |
| | | if (sign) { |
| | | EmptyPlateOutParam param = new EmptyPlateOutParam(); |
| | | param.setOutSite(172); |
| | | param.setOutSite(staNo); |
| | | param.setLocNos(locNoList); |
| | | try{ |
| | | workService.emptyPlateOut(param, 9999L); |