|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.mapper.EntityWrapper; | 
|---|
|  |  |  | import com.core.common.Cools; | 
|---|
|  |  |  | import com.zy.asrs.entity.WaitPakin; | 
|---|
|  |  |  | import com.zy.asrs.entity.WrkDetl; | 
|---|
|  |  |  | import com.zy.asrs.entity.WrkMast; | 
|---|
|  |  |  | import com.zy.asrs.entity.*; | 
|---|
|  |  |  | import com.zy.asrs.service.*; | 
|---|
|  |  |  | import com.zy.asrs.task.AbstractHandler; | 
|---|
|  |  |  | import com.zy.asrs.task.core.ReturnT; | 
|---|
|  |  |  | 
|---|
|  |  |  | private WaitPakinLogService waitPakinLogService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private OrderService orderService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private BasArmMastLogService basArmMastLogService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private BasArmMastService basArmMastService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Transactional | 
|---|
|  |  |  | public ReturnT<String> start(WrkMast wrkMast) { | 
|---|
|  |  |  | 
|---|
|  |  |  | return SUCCESS; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Transactional | 
|---|
|  |  |  | public ReturnT<String> startArm(BasArmMast basArmMast) { | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | BasArmMastLog basArmMastLog = new BasArmMastLog(basArmMast); | 
|---|
|  |  |  | // 保存工作主档历史档 | 
|---|
|  |  |  | if (!basArmMastLogService.insert(basArmMastLog)) { | 
|---|
|  |  |  | exceptionHandle("保存ARM工作历史档[id={0}]失败", basArmMast.getId()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 删除工作主档 | 
|---|
|  |  |  | if (!basArmMastService.deleteById(basArmMast)) { | 
|---|
|  |  |  | exceptionHandle("删除ARM工作主档[id={0}]失败", basArmMast.getId()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } catch (Exception e) { | 
|---|
|  |  |  | log.error("fail", e); | 
|---|
|  |  |  | e.printStackTrace(); | 
|---|
|  |  |  | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); | 
|---|
|  |  |  | return FAIL.setMsg(e.getMessage()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return SUCCESS; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|