| | |
| | | import com.zy.asrs.task.AbstractHandler; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.ints.entity.IoComplete; |
| | | import com.zy.ints.entity.WaitMatin; |
| | | import com.zy.ints.service.IoCompleteLogService; |
| | | import com.zy.ints.service.IoCompleteService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | import javax.xml.ws.ServiceMode; |
| | | |
| | | @Service |
| | | public class IoCompleteLogHandler extends AbstractHandler<String> { |
| | |
| | | public ReturnT<String> start(IoComplete ioComplete) { |
| | | try { |
| | | // 保存工作主档历史档 |
| | | if (!ioCompleteLogService.save(ioComplete.getBillNo(),ioComplete.getSeqNo())) { |
| | | exceptionHandle("保存工作历史档[workNo={0}]失败", ioComplete.getBillNo()); |
| | | if (!ioCompleteLogService.save(ioComplete.getId())) { |
| | | exceptionHandle("保存回报历史档[id={0}]失败", ioComplete.getId()); |
| | | } |
| | | // 删除工作主档 |
| | | if (!ioCompleteService.delete(new EntityWrapper<IoComplete>().eq("bill_no", ioComplete.getBillNo()).eq("seq_no", ioComplete.getSeqNo()))) { |
| | | exceptionHandle("删除工作主档[workNo={0}]失败", ioComplete.getBillNo()); |
| | | if (!ioCompleteService.delete(new EntityWrapper<IoComplete>().eq("id", ioComplete.getId()))) { |
| | | exceptionHandle("删除回报档[id={0}]失败", ioComplete.getId()); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |