| | |
| | | int w = 64; |
| | | for (int i = 17; i <= 37; i++) { |
| | | for (int j = 1;j<=3;j++){ |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("row1", i).eq("bay1", 7).eq("lev1", j)); |
| | | // LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("row1", i).eq("bay1", 7).eq("lev1", j)); |
| | | LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>().eq("row1", i).eq("bay1", 12).eq("lev1", j)); |
| | | LocMast locMast3 = locMastService.selectOne(new EntityWrapper<LocMast>().eq("row1", i).eq("bay1", 14).eq("lev1", j)); |
| | | // LocMast locMast4 = locMastService.selectOne(new EntityWrapper<LocMast>().eq("row1", 26).eq("bay1", i).eq("lev1", 1)); |
| | | if (locMast.getGro1() == 999){ |
| | | continue; |
| | | } |
| | | // if (locMast.getGro1() == 999){ |
| | | // continue; |
| | | // } |
| | | // locMast.setGro1(w); |
| | | locMast.setGro1(locMast.getGro1()+1000); |
| | | locMast2.setGro1(locMast.getGro1()+1000); |
| | | locMast3.setGro1(locMast.getGro1()+1000); |
| | | // locMast.setGro1(locMast.getGro1()+1000); |
| | | locMast2.setGro1(locMast2.getGro1()+10000); |
| | | locMast3.setGro1(locMast3.getGro1()+2000); |
| | | // locMast4.setGro1(w); |
| | | locMastService.updateById(locMast); |
| | | // locMastService.updateById(locMast); |
| | | locMastService.updateById(locMast2); |
| | | locMastService.updateById(locMast3); |
| | | // locMastService.updateById(locMast4); |
| | |
| | | |
| | | |
| | | // 相似工作档案 --- 同天同规格物料 |
| | | if (!Cools.isEmpty(matnr) && (staDescId == 1 || staDescId == 11 || staDescId == 111) ) { |
| | | if (!Cools.isEmpty(matnr) && (staDescId == 1 || staDescId == 11 || staDescId == 111) && !mixture ) { |
| | | //查询相似工作档案 |
| | | List<WrkMast> wrkMasts = wrkMastService.selectWrkMastWrkDetlMatnrBatch(staDescId, matnr, batch,grade, crnNo); |
| | | int nearbay = 0; //相似工作档案 目标库位列 |
| | |
| | | continue; |
| | | } |
| | | for (LocMast locMastGro1 : locMasts) { |
| | | if (mixture){ //混料只允许放 7 12 14 |
| | | if (locMastGro1.getBay1() != 7 && locMastGro1.getBay1() != 12 && locMastGro1.getBay1() != 14){ |
| | | continue; |
| | | } |
| | | }else { //不混料不允许放 7 12 14 |
| | | if (locMastGro1.getBay1() == 7 || locMastGro1.getBay1() == 12 || locMastGro1.getBay1() == 14){ |
| | | continue; |
| | | } |
| | | } |
| | | |
| | | if (locMastGro1.getBay1() == 2){ //wcs问题限制 |
| | | continue; |
| | |
| | | continue; |
| | | } |
| | | for (LocMast locMastGro1 : locMasts1) { |
| | | if (mixture){ //混料只允许放 7 12 14 |
| | | if (locMastGro1.getBay1() != 7 && locMastGro1.getBay1() != 12 && locMastGro1.getBay1() != 14){ |
| | | continue; |
| | | } |
| | | }else { //不混料不允许放 7 12 14 |
| | | if (locMastGro1.getBay1() == 7 || locMastGro1.getBay1() == 12 || locMastGro1.getBay1() == 14){ |
| | | continue; |
| | | } |
| | | } |
| | | if (locMastGro1.getLocSts().equals("F")){ |
| | | LocDetl locDetl = locDetlService.selectOne(new EntityWrapper<LocDetl>().eq("loc_No", locMastGro1.getLocNo())); |
| | | if (!locDetl.getMatnr().equals(matnr) || !locDetl.getBatch().equals(batch)){ |
| | |
| | | String sta = param.get("sta"); |
| | | // 命令集合 |
| | | List<LedCommand> commands = new ArrayList<>(); |
| | | if ("0".equals(sta)) { |
| | | if (!"0".equals(taskNo)) { |
| | | |
| | | // 工作档集合 |
| | | List<WrkMast> wrkMasts = new ArrayList<>(); |
| | |
| | | for (WrkMast wrkMast1 : wrkMasts) { |
| | | wrkMast1.setOveMk("Y"); |
| | | wrkMast1.setModiTime(new Date()); |
| | | if (wrkMastService.updateById(wrkMast1)) { |
| | | if (!wrkMastService.update(wrkMast1,new EntityWrapper<WrkMast>().eq("wrk_No",wrkMast1.getWrkNo()))) { |
| | | throw new CoolException("更新工作档失败"); |
| | | } |
| | | } |
| | |
| | | public synchronized R getledError(@RequestBody Map<String, String> param) { |
| | | String sta = param.get("sta"); |
| | | String message = param.get("msg"); |
| | | if (Cools.isEmpty(sta) || Cools.isEmpty(message)) { |
| | | if (Cools.isEmpty(sta) ) { |
| | | return R.error(); |
| | | } |
| | | Map<String,Object> map=new HashMap<String, Object>(); |
| | |
| | | if (Cools.isEmpty(staDesc)){ |
| | | throw new CoolException("未找到站点路径"); |
| | | } |
| | | if (wrkMast.getWrkSts() == 14 && wrkMast.getIoType() == 103){ |
| | | if (wrkMast.getWrkSts() == 14 && (wrkMast.getIoType() == 103 || wrkMast.getIoType() == 107)){ |
| | | try { |
| | | // 保存工作明细档历史档 |
| | | if (wrkMastService.saveWrkDetlLog(wrkMast.getWrkNo()) == 0) { |
| | |
| | | } |
| | | WrkMast wrkMastPakin = wrkMastService.selectOne(new EntityWrapper<WrkMast>() |
| | | .eq("barcode", param.getBarcode()) |
| | | .in("io_type", 103,53) |
| | | .in("io_type", 103,53,107,57) |
| | | .eq("wrk_sts",14)); |
| | | if (!Cools.isEmpty(wrkMastPakin)){ |
| | | StartupDto locNo3 = getLocNo3(param); |
| | |
| | | url: "" |
| | | taskCreatePath: "" |
| | | shuttleWcs: |
| | | url: "10.200.50.222:9090/wcs" |
| | | url: "10.0.100.140:8088/wcs" |
| | |
| | | <select id="selectToBeHistoryData" resultMap="BaseResultMap"> |
| | | select * from asr_wrk_mast |
| | | where wrk_sts=5 |
| | | or (wrk_sts=15 and ove_mk='Y' and wrk_no not in (select wrk_no from asr_bas_devp)) |
| | | or (wrk_sts=15 and (dateadd(mi,15,crn_end_time) <= getdate()) and wrk_no not in (select wrk_no from asr_bas_devp)) |
| | | or (wrk_sts=15 and (dateadd(mi,15,crn_end_time) <= getdate()) and crn_end_time is null and wrk_no not in (select wrk_no from asr_bas_devp)) |
| | | or (wrk_sts=15 and ove_mk='Y' and wrk_no not in (select wrk_no from asr_bas_devp)) |
| | | or (wrk_sts=15 and (dateadd(mi,5,crn_end_time) <= getdate() or dateadd(mi,1,modi_time) <= getdate()) and wrk_no not in (select wrk_no from asr_bas_devp)) |
| | | or (wrk_sts=15 and (dateadd(mi,5,crn_end_time) <= getdate() or dateadd(mi,1,modi_time) <= getdate()) and crn_end_time is null and wrk_no not in (select wrk_no from asr_bas_devp)) |
| | | order by io_time,wrk_no asc |
| | | </select> |
| | | |