|  |  | 
 |  |  |     private WaitPakinService waitPakinService; | 
 |  |  |     @Autowired | 
 |  |  |     private OrderDetlService orderDetlService; | 
 |  |  |     @Autowired | 
 |  |  |     private InOutService inOutService; | 
 |  |  |  | 
 |  |  |     public ReturnT<String> start(WrkMast wrkMast) { | 
 |  |  |         // 4.入库完成 | 
 |  |  | 
 |  |  |                             locDetl.setZpallet(wrkDetl.getZpallet()); // 托盘条码 | 
 |  |  |                             locDetl.setModiTime(now); | 
 |  |  |                             locDetl.setAppeTime(now); | 
 |  |  |                             locDetl.setModel(wrkDetl.getModel()); | 
 |  |  |  | 
 |  |  |                             InOut inOut=inOutService.selectByMatnr(wrkDetl.getMatnr()); | 
 |  |  |                             if (inOut != null){ | 
 |  |  |                                 inOut.setTemp1("在库"); | 
 |  |  | //                                inOut.setModiTime(now.toString()); | 
 |  |  |                             } | 
 |  |  |                             if (!inOutService.updateById(inOut)){ | 
 |  |  |                                 return FAIL.setMsg("更新模具属性失败"); | 
 |  |  |                             } | 
 |  |  |  | 
 |  |  |                             if (!locDetlService.insert(locDetl)) { | 
 |  |  | //                                exceptionHandle("全板入库 ===>> 添加库存明细失败;[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); | 
 |  |  |                                 TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); | 
 |  |  | 
 |  |  |                         LocDetl locDetl = locDetlService.selectItem(locMast.getLocNo(), wrkDetl); | 
 |  |  |  | 
 |  |  |                         if (locDetl != null) { | 
 |  |  |  | 
 |  |  |                             InOut inOut=inOutService.selectByMatnr(wrkDetl.getMatnr()); | 
 |  |  |                             if (inOut != null){ | 
 |  |  |                                 inOut.setTemp1("不在库"); | 
 |  |  | //                                inOut.setModiTime(now.toString()); | 
 |  |  |                             } | 
 |  |  |                             if (!inOutService.updateById(inOut)){ | 
 |  |  |                                 return FAIL.setMsg("更新模具属性失败"); | 
 |  |  |                             } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |                             if (!locDetlService.updateAnfme(locDetl.getAnfme() - wrkDetl.getAnfme(), locMast.getLocNo(), wrkDetl)) { | 
 |  |  | //                                exceptionHandle("拣料入库 ===>> 修改库存明细数量失败;[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo()); | 
 |  |  |                                 TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); | 
 |  |  | 
 |  |  |                                 return FAIL.setMsg("并板入库 ===>> 修改库存明细数量失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]"); | 
 |  |  |                             } | 
 |  |  |                         } else { | 
 |  |  |  | 
 |  |  |                             InOut inOut=inOutService.selectByMatnr(wrkDetl.getMatnr()); | 
 |  |  |                             if (inOut != null){ | 
 |  |  |                                 inOut.setTemp1("在库"); | 
 |  |  | //                                inOut.setModiTime(now.toString()); | 
 |  |  |                             } | 
 |  |  |                             if (!inOutService.updateById(inOut)){ | 
 |  |  |                                 return FAIL.setMsg("更新模具属性失败"); | 
 |  |  |                             } | 
 |  |  |  | 
 |  |  |                             locDetl = new LocDetl(); | 
 |  |  |                             locDetl.sync(wrkDetl); | 
 |  |  |                             locDetl.setLocNo(wrkMast.getLocNo()); // 库位号 | 
 |  |  | 
 |  |  |                         TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); | 
 |  |  |                         return FAIL.setMsg("全板出库 ===>> 工作明细档为空; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getSourceLocNo() + "]"); | 
 |  |  |                     } | 
 |  |  |  | 
 |  |  |                     for (WrkDetl wrkDetl : wrkDetls101) { | 
 |  |  |                         InOut inOut=inOutService.selectByMatnr(wrkDetl.getMatnr()); | 
 |  |  |                         if (inOut != null){ | 
 |  |  |                             inOut.setTemp1("不在库"); | 
 |  |  | //                            inOut.setModiTime(now.toString()); | 
 |  |  |                         } | 
 |  |  |                         if (!inOutService.updateById(inOut)){ | 
 |  |  |                             return FAIL.setMsg("更新模具属性失败"); | 
 |  |  |                         } | 
 |  |  |                     } | 
 |  |  |  | 
 |  |  |                     for (WrkDetl wrkDetl : wrkDetls101) { | 
 |  |  |                         // 更新订单完成数量 | 
 |  |  |                         OrderDetl orderDetl = orderDetlService.selectItem(wrkDetl); |