| | |
| | | import com.zy.asrs.entity.param.*; |
| | | import com.zy.asrs.entity.result.OpenOrderCompeteResult; |
| | | import com.zy.asrs.entity.result.StockVo; |
| | | import com.zy.asrs.entity.vo.JarMastTableVo; |
| | | import com.zy.asrs.mapper.TagMapper; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.task.handler.BareBoardHandler; |
| | | import com.zy.asrs.utils.CodeDetectionUtil; |
| | | import com.zy.asrs.utils.MatUtils; |
| | | import com.zy.asrs.utils.PostMesDataUtils; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | |
| | | private LocMastService locMastService; |
| | | @Autowired |
| | | private WorkService workService; |
| | | @Autowired |
| | | private BareBoardHandler bareBoardHandler; |
| | | @Autowired |
| | | private BasJarMastService basJarMastService; |
| | | |
| | | @Override |
| | | @Transactional |
| | |
| | | smallContainersJar(param); |
| | | } else if (param.getType()==3){//直供产线 |
| | | smallContainersSta(param); |
| | | } else if (param.getType()==99){//库内供产线 //出库 测试 |
| | | smallContainersBig99(param); |
| | | } |
| | | } catch (Exception e){ |
| | | throw new CoolException("失败!!!原因:"+e.getMessage()); |
| | |
| | | } |
| | | } |
| | | |
| | | /* |
| | | * 出库 |
| | | * 直供产线 |
| | | * */ |
| | | public void smallContainersBig99(SmallCompleteParam param) {//直供产线//出库 |
| | | Long userId = 7777L;//mes |
| | | //判断param参数 |
| | | if (Cools.isEmpty(param.getType())){ |
| | | throw new CoolException("参数:类型 type为空"); |
| | | // }else if (Cools.isEmpty(param.getStaNo())){ |
| | | // throw new CoolException("参数:投料点位 staNo为空"); |
| | | }else if (Cools.isEmpty(param.getDevNo())){ |
| | | throw new CoolException("参数:产线点位 devNo为空"); |
| | | }else if (Cools.isEmpty(param.getMatnr())){ |
| | | throw new CoolException("参数:品号 matnr为空"); |
| | | }else if (Cools.isEmpty(param.getWeight())){ |
| | | throw new CoolException("参数:物料重量 wright为空"); |
| | | }else if (Cools.isEmpty(param.getBatchNum())){ |
| | | throw new CoolException("参数:出库数量 batchNum为空"); |
| | | } |
| | | Integer devNo = param.getDevNo(); |
| | | Integer batchNum = param.getBatchNum(); |
| | | |
| | | |
| | | for (int i =0;i<batchNum;i++){ |
| | | bareBoardHandler.startYx(devNo,99); |
| | | } |
| | | } |
| | | |
| | | /* |
| | | * 获取硫化罐任务信息 // |
| | | * */ |
| | | @Override |
| | | @Transactional |
| | | public List<JarMastTableVo> getJatIdList(Integer id) { |
| | | List<BasJarMast> jarMasts = basJarMastService.selectList(new EntityWrapper<BasJarMast>().eq("jar_id", id)); |
| | | if (Cools.isEmpty(jarMasts)){ |
| | | return new ArrayList<JarMastTableVo>(); |
| | | } |
| | | ArrayList<JarMastTableVo> jarMastTableVos = new ArrayList<>(); |
| | | for (BasJarMast jarMast : jarMasts) { |
| | | JarMastTableVo jarMastTableVo = new JarMastTableVo(); |
| | | WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_no", jarMast.getWrkNo())); |
| | | List<WrkDetl> wrkDetls = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("wrk_no", jarMast.getWrkNo())); |
| | | if (wrkDetls.isEmpty()){ |
| | | WrkDetl wrkDetl = new WrkDetl(); |
| | | wrkDetls.add(wrkDetl); |
| | | } |
| | | if (Cools.isEmpty(wrkMast) || Cools.isEmpty(wrkDetls)){ |
| | | continue; |
| | | } |
| | | jarMastTableVo.setJarId(jarMast.getJarId()); |
| | | jarMastTableVo.setJarWrkNo(jarMast.getWrkNo().toString()); |
| | | jarMastTableVo.setStatus(jarMast.getStatus()); |
| | | jarMastTableVo.setStatus$(jarMast.getStatus$()); |
| | | jarMastTableVo.setMatnr(wrkDetls.get(0).getMatnr()); |
| | | jarMastTableVo.setMaktx(wrkDetls.get(0).getMaktx()); |
| | | jarMastTableVo.setWeight(wrkDetls.get(0).getWeight()); |
| | | jarMastTableVos.add(jarMastTableVo); |
| | | } |
| | | return jarMastTableVos; |
| | | } |
| | | |
| | | /*...........................亳州煜星..............以上.............亳州煜星...........................*/ |
| | | } |