package com.zy.ints.task.handler;
|
|
import com.zy.asrs.task.AbstractHandler;
|
import com.zy.asrs.task.core.ReturnT;
|
import com.zy.ints.entity.WaitMatin;
|
import com.zy.ints.service.WaitMatinLogService;
|
import com.zy.ints.service.WaitMatinService;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Service;
|
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
|
/**
|
* 入库通知档转历史档
|
* Created by TQS on 2021/8/31
|
*/
|
@Service
|
public class WaitMatinLogHandler extends AbstractHandler<String> {
|
|
@Autowired
|
WaitMatinService waitMatinService;
|
@Autowired
|
WaitMatinLogService waitMatinLogService;
|
|
@Transactional
|
public ReturnT<String> start(WaitMatin waitMatin){
|
try {
|
// 保存工作主档历史档
|
// if (!WaitMatinLogService.save(waitMatin.getBillNo(),waitMatin.getSeqNo())) {
|
// exceptionHandle("保存工作历史档[workNo={0}]失败", wrkMast.getWrkNo());
|
// }
|
// // 删除工作主档
|
// if (!wrkMastService.deleteById(wrkMast)) {
|
// exceptionHandle("删除工作主档[workNo={0}]失败", wrkMast.getWrkNo());
|
// }
|
} catch (Exception e) {
|
e.printStackTrace();
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
return FAIL.setMsg(e.getMessage());
|
}
|
return SUCCESS;
|
}
|
}
|