| | |
| | | private WrkMastStaService wrkMastStaService; |
| | | @Autowired |
| | | private WrkMastStaLogService wrkMastStaLogService; |
| | | @Autowired |
| | | private StaDescService staDescService; |
| | | |
| | | @Override |
| | | @Transactional |
| | |
| | | //判断param参数 |
| | | if (Cools.isEmpty(param.getPalletizingNo())){ |
| | | throw new CoolException("参数:码垛位编号 palletizingNo为空"); |
| | | }else if (Cools.isEmpty(param.getMatLists()) || param.getMatLists().size()==0){ |
| | | }else if (Cools.isEmpty(param.getMatList()) || param.getMatList().size()==0){ |
| | | throw new CoolException("参数:物料明细 matLists为空"); |
| | | } |
| | | |
| | | ArrayList<WrkDetl> wrkDetlsNew = new ArrayList<>(); |
| | | ArrayList<WrkDetlSingle> wrkDetlsOld = new ArrayList<>(); |
| | | //判断matLists参数 |
| | | for (SingleUnstackingCompleteParam.MatList matList:param.getMatLists()){ |
| | | for (SingleUnstackingCompleteParam.MatList matList:param.getMatList()){ |
| | | if (Cools.isEmpty(matList.getPosition())){ |
| | | throw new CoolException("参数:码垛位置 position为空"); |
| | | }else if (Cools.isEmpty(matList.getBoxNo())){ |
| | |
| | | wrkMast.setIoType(202); // 入出库状态:202.拆垛后出库 |
| | | wrkMast.setIoPri(99D); // 优先级 |
| | | wrkMast.setSourceStaNo(param.getDevNo$()); |
| | | wrkMast.setStaNo(140); //贴标站点 |
| | | wrkMast.setStaNo(144); //贴标站点 直接到尾端 |
| | | // 操作人员数据 |
| | | wrkMast.setAppeUser(userId); |
| | | wrkMast.setAppeTime(now); |
| | |
| | | @Override |
| | | @Transactional |
| | | public void cs2() { |
| | | BasDevp basDevp = basDevpService.selectById(216); |
| | | basDevp.setWrkNo(0); |
| | | basDevp.setBarcode(""); |
| | | basDevpService.updateById(basDevp); |
| | | // int[] staNos =new int[]{122}; |
| | | // for (Integer staNo:staNos){ |
| | | // int[] crnNos =new int[]{6}; |
| | | // for (Integer crnNo:crnNos){ |
| | | // descSta(staNo,crnNo); |
| | | // } |
| | | // } |
| | | |
| | | } |
| | | |
| | | /* |
| | | private void descSta(Integer staNo,Integer crnNo){ |
| | | // int[] typeNos =new int[]{1,10,53,101,103,110}; |
| | | int[] typeNos =new int[]{10,110}; |
| | | for (Integer typeNo:typeNos){ |
| | | descSta3(staNo,crnNo,typeNo); |
| | | } |
| | | } |
| | | |
| | | private void descSta3(Integer staNo,Integer crnNo,Integer typeNo){ |
| | | StaDesc staDesc = new StaDesc(); |
| | | staDesc.setTypeNo(typeNo); |
| | | staDesc.setStnNo(staNo); |
| | | staDesc.setCrnNo(crnNo); |
| | | staDesc.setCrnStn(CrnNoRC(crnNo,staDesc.getTypeNo()>100)); |
| | | descSta2(staDesc); |
| | | } |
| | | |
| | | private void descSta2(StaDesc staDesc){ |
| | | Date now = new Date(); |
| | | //入库 |
| | | int sameRes = staDescService.selectCount(new EntityWrapper<StaDesc>() |
| | | .eq("type_no", staDesc.getTypeNo()) |
| | | .eq("stn_no", staDesc.getStnNo()) |
| | | .eq("crn_no", staDesc.getCrnNo()) |
| | | .eq("crn_stn", staDesc.getCrnStn())); |
| | | if (sameRes == 0) { |
| | | staDesc.setModiUser(9527L); |
| | | staDesc.setModiTime(now); |
| | | staDesc.setAppeUser(9527L); |
| | | staDesc.setAppeTime(now); |
| | | staDescService.insert(staDesc); |
| | | } |
| | | } |
| | | |
| | | private Integer CrnNoRC(Integer crnNo,boolean sign){ |
| | | Integer crnStn = 0; |
| | | switch (crnNo){ |
| | | case 1: |
| | | crnStn = 102; |
| | | break; |
| | | case 2: |
| | | crnStn = 105; |
| | | break; |
| | | case 3: |
| | | crnStn = 108; |
| | | break; |
| | | case 4: |
| | | crnStn = 111; |
| | | break; |
| | | case 5: |
| | | crnStn = 114; |
| | | break; |
| | | case 6: |
| | | crnStn = 117; |
| | | break; |
| | | } |
| | | if (sign){ |
| | | return crnStn-2; |
| | | } |
| | | return crnStn; |
| | | } |
| | | |
| | | |
| | | /* |
| | | * |
| | | * */ |
| | | @Override |