| | |
| | | import com.zy.asrs.service.WrkMastLogService; |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import com.zy.asrs.task.AbstractHandler; |
| | | import com.zy.system.entity.Config; |
| | | import com.zy.system.service.ConfigService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | private WrkDetlService wrkDetlService; |
| | | @Autowired |
| | | private WrkDetlLogService wrkDetlLogService; |
| | | @Autowired |
| | | private ConfigService configService; |
| | | |
| | | public void run(){ |
| | | |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void start() { |
| | | @Override |
| | | @Transactional |
| | | public boolean start() { |
| | | try { |
| | | WrkMast wrkMast = wrkMastService.selectToBeHistoryData(); |
| | | if (null == wrkMast) { |
| | | return; |
| | | return true; |
| | | } |
| | | // 保存工作主档历史档 |
| | | if (!wrkMastLogService.save(wrkMast.getWrkNo())) { |
| | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | Config config = new Config( |
| | | "name", // 名称[非空] |
| | | "code", // 编码[非空] |
| | | "val", // 对应值[非空] |
| | | (short)1, // 类型[非空] |
| | | (short)1 // 状态[非空] |
| | | ); |
| | | boolean insert = configService.insert(config); |
| | | System.out.println(insert); |
| | | return false; |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | |
| | | } |