Merge branch 'gzynasrs' of http://47.97.1.152:5880/r/zy-asrs into gzynasrs
| | |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.entity.param.CombParam; |
| | | import com.zy.asrs.entity.param.MobileAdjustParam; |
| | | import com.zy.asrs.entity.param.Review; |
| | | import com.zy.asrs.entity.result.MobileAdjustResult; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.task.handler.WorkLogHandler; |
| | |
| | | mobileService.startUpTestPACK(testMast); //提交测试系统 |
| | | return R.ok(); |
| | | } |
| | | @PostMapping("/test/transplant/auth") |
| | | @ManagerAuth(memo = "移库确认") |
| | | public synchronized R transplant(@RequestBody Review review) { |
| | | if (Cools.isEmpty(review)) { |
| | | return R.parse(BaseRes.PARAM); |
| | | } |
| | | mobileService.transplant(review); //移库确认 |
| | | return R.ok(); |
| | | } |
| | | @PostMapping("/test/suspend/auth") |
| | | // @ManagerAuth(memo = "暂停测试") |
| | | public synchronized R suspendTestPACK() { |
| | |
| | | @TableField("fire_status") |
| | | private Integer fireStatus; |
| | | |
| | | // 产品状态{0:无,1:待测,2:测试中;3.静置中;4:静置完成} |
| | | // 产品状态{0:无,1:待测,2:测试中;3.测试完成;4.静置中;5:静置完成} |
| | | @ApiModelProperty(value= "") |
| | | @TableField("pack_status") |
| | | private Integer packStatus; |
| | |
| | | case 2: |
| | | return "测试中"; |
| | | case 3: |
| | | return "静置中"; |
| | | return "测试完成"; |
| | | case 4: |
| | | return "静置中"; |
| | | case 5: |
| | | return "静置完成"; |
| | | default: |
| | | return String.valueOf(this.packStatus); |
| | |
| | | import com.zy.asrs.entity.TestMast; |
| | | import com.zy.asrs.entity.param.CombParam; |
| | | import com.zy.asrs.entity.param.MobileAdjustParam; |
| | | import com.zy.asrs.entity.param.Review; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | |
| | | import java.util.Date; |
| | | |
| | |
| | | void startUpTestPACK(TestMast testMast); |
| | | //暂停测试 |
| | | void suspendTestPACK(); |
| | | //移库确认 |
| | | void transplant(Review review); |
| | | |
| | | } |
| | |
| | | @Autowired |
| | | private TestMastService testMastService; |
| | | @Autowired |
| | | private WorkLogHandler workLogHandler; |
| | | private WorkService workService; |
| | | |
| | | @Value("${mes.url}") |
| | | private String mesUrl; |
| | |
| | | |
| | | @Value("${mes.startUpTestPACK}") |
| | | private String suspendTestPACK; |
| | | |
| | | |
| | | |
| | | @Override |
| | |
| | | } |
| | | return SUCCESS; |
| | | } |
| | | @Transactional |
| | | public void transplant(Review review){ |
| | | //移库开始,查询目标库位 |
| | | LocMast targetLocNo = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("row1",2) |
| | | .eq("loc_sts","O") |
| | | .eq("fire_status", 0) |
| | | .eq("pack_status",0)); |
| | | if (targetLocNo != null){ |
| | | workService.locMove(review.getLocNo(),targetLocNo.getLocNo(),(long)Integer.parseInt(review.getUserId())); |
| | | }else { |
| | | throw new CoolException("没有空库位"); |
| | | } |
| | | } |
| | | /*...........................赣州新增..............以上.............赣州新增...........................*/ |
| | | } |
| | |
| | | if (!testMastService.update(testMast,wrapper)){ |
| | | throw new CoolException("更改测试状态失败"); |
| | | } |
| | | locMast.setPackStatus(3); |
| | | if (!locMastService.update(locMast, wrapper)){ |
| | | throw new CoolException("更改产品状态失败"); |
| | | } |
| | | }else if (Cools.isEmpty(testMast.getStatus())){ |
| | | throw new CoolException("状态异常"); |
| | | }else { |
| | |
| | | } else { |
| | | throw new CoolException("状态异常"); |
| | | } |
| | | LocMast targetLocNo = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("row1",2) |
| | | .eq("loc_sts","O") |
| | | .eq("fire_status", 0) |
| | | .eq("pack_status",0)); |
| | | if (targetLocNo != null){ |
| | | workService.locMove(review.getLocNo(),targetLocNo.getLocNo(),(long)Integer.parseInt(review.getUserId())); |
| | | }else { |
| | | throw new CoolException("没有空库位"); |
| | | } |
| | | |
| | | return success; |
| | | } |
| | | |
| | |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("fire_status", 1) |
| | | .eq("loc_sts", "F")); |
| | | |
| | | Integer ioType = 101; //入出库类型 |
| | | Date now = new Date(); |
| | | //优先级99,出库站109:消防箱,101 |
| | | for(LocMast locMast : locMasts){ |
| | | if (locMast.getPackStatus()==2){ |
| | | //向显示屏发信息 |
| | | }else { |
| | | //向显示屏发信息 |
| | | } |
| | | // 生成工作号 |
| | | int workNo = commonService.getWorkNo(WorkNoType.getWorkNoType(ioType)); |
| | | // 生成工作档 |
| | |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("fire_status", 0) |
| | | .eq("loc_sts", "F") |
| | | .eq("pack_status", 3)); |
| | | .eq("pack_status", 4)); |
| | | Integer ioType = 101; //入出库类型 |
| | | //静置完成出库站104 |
| | | for(LocMast locMast : locMasts){ |
| | | LocDetl locDetl=locDetlService.selectOne(new EntityWrapper<LocDetl>().eq("loc_no",locMast.getLocNo())); |
| | | |
| | | if (Cools.isEmpty(locDetl)){ |
| | | log.error("库位:"+locMast.getLocNo()+"没有明细"); |
| | | } else if (Cools.isEmpty(locDetl.getDeadWarn())){ |
| | |
| | | if (locMast.getLocSts().equals("F")) { |
| | | locMast.setLocSts("R"); |
| | | locMast.setModiTime(now); |
| | | locMast.setPackStatus(5); //5:静置完成 |
| | | if (!locMastService.updateById(locMast)) { |
| | | throw new CoolException("预约库位状态失败,库位号:"+locMast.getLocNo()); |
| | | } |
| | |
| | | locMast.setIoTime(now); |
| | | locMast.setModiTime(now); |
| | | locMast.setFireStatus(0); |
| | | locMast.setPackStatus(3); //3:静置中 |
| | | locMast.setPackStatus(4); //4:静置中 |
| | | if (!locMastService.updateById(locMast)) { |
| | | // exceptionHandle("库位移转 ===>> 修改目标库位状态失败;[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |