| | |
| | | import com.zy.common.model.OutLocDto; |
| | | import com.zy.common.model.StartupDto; |
| | | import com.zy.common.service.CommonService; |
| | | import com.zy.ints.entity.IoComplete; |
| | | import com.zy.ints.entity.WaitMatchk; |
| | | import com.zy.ints.entity.WaitMatout; |
| | | import com.zy.ints.service.IoCompleteService; |
| | | import com.zy.ints.service.WaitMatchkService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | private WrkMastLogService wrkMastLogService; |
| | | @Autowired |
| | | private WrkDetlLogService wrkDetlLogService; |
| | | |
| | | @Autowired |
| | | private WaitMatchkService waitMatchkService; |
| | | @Autowired |
| | | private IoCompleteService ioCompleteService; |
| | | |
| | | @Override |
| | | @Transactional |
| | |
| | | } else if (wrkMast.getWrkSts() > 10) { |
| | | wrkMast.setWrkSts(14L); |
| | | } |
| | | //查询明细 |
| | | List<WrkDetl> detls = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("wrk_no", workNo)); |
| | | int i=1; |
| | | for (WrkDetl detl : detls) { |
| | | //生成回报档 |
| | | IoComplete ioComplete = new IoComplete(); |
| | | ioComplete.setBillNo(detl.getBillNo()); |
| | | ioComplete.setMatNo(detl.getMatNo()); |
| | | ioComplete.setMatName(detl.getMatName()); |
| | | ioComplete.setSeqNo(i); |
| | | ioComplete.setQty(detl.getQty()); |
| | | ioComplete.setZpallet(detl.getZpallet()); |
| | | ioComplete.setAppeUser(userId); |
| | | if (wrkMast.getWrkSts()==4L){ |
| | | ioComplete.setTaskType(1); |
| | | ioComplete.setLocNo(wrkMast.getLocNo()); |
| | | }else if (wrkMast.getWrkSts()==14L){ |
| | | ioComplete.setTaskType(2); |
| | | ioComplete.setLocNo(wrkMast.getSourceLocNo()); |
| | | } |
| | | ioComplete.setAppeTime(new Date()); |
| | | if (!ioCompleteService.insert(ioComplete)){ |
| | | throw new CoolException("生成回报档失败"); |
| | | } |
| | | i++; |
| | | } |
| | | // 完成操作人员记录 |
| | | wrkMast.setManuType("手动完成"); |
| | | Date now = new Date(); |
| | |
| | | if (Cools.isEmpty(locMast)) { |
| | | throw new CoolException("库位不存在"); |
| | | } |
| | | //查询库位状态 |
| | | if (locMast.getLocSts().equals("O")){ |
| | | //更新库位状态 |
| | | locMast.setLocSts("F"); |
| | | // boolean b = locMastService.updateById(locMast); |
| | | if (!locMastService.updateById(locMast)){ |
| | | throw new CoolException("更新库位状态失败"); |
| | | } |
| | | } |
| | | |
| | | for (LocDetlAdjustParam.LocDetlAdjust adjust : param.getList()) { |
| | | if (Cools.isEmpty(adjust.getMatNo())) { |