| File was renamed from src/main/java/com/zy/ints/task/handler/WaitMatOutLogHandler.java |
| | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.zy.asrs.task.AbstractHandler; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | |
| | | import com.zy.ints.entity.WaitMatin; |
| | | import com.zy.ints.entity.WaitMatout; |
| | | import com.zy.ints.service.WaitMatoutLogService; |
| | | import com.zy.ints.service.WaitMatoutService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | @Service |
| | | public class WaitMatOutLogHandler extends AbstractHandler<String> { |
| | | public class WaitMatoutLogHandler extends AbstractHandler<String> { |
| | | |
| | | @Autowired |
| | | private WaitMatoutLogService waitMatoutLogService; |
| | |
| | | public ReturnT<String> start(WaitMatout waitMatout) { |
| | | |
| | | try { |
| | | // 保存工作主档历史档 |
| | | // 保存出库通知历史档 |
| | | if (!waitMatoutLogService.save(waitMatout.getBillNo(),waitMatout.getSeqNo())) { |
| | | exceptionHandle("保存工作历史档[workNo={0}]失败", waitMatout.getBillNo()); |
| | | exceptionHandle("保存出库通知历史档[billNo={0},seqNo={1}]失败", waitMatout.getBillNo()); |
| | | } |
| | | // 删除工作主档 |
| | | // 删除出库通知档 |
| | | if (!waitMatoutService.delete(new EntityWrapper<WaitMatout>().eq("bill_no", waitMatout.getBillNo()).eq("seq_no", waitMatout.getSeqNo()))) { |
| | | exceptionHandle("删除工作主档[workNo={0}]失败", waitMatout.getBillNo()); |
| | | exceptionHandle("删除出库通知档[billNo={0},seqNo={1}]失败", waitMatout.getBillNo()); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |