| | |
| | | } |
| | | //4.10作业抽查管理(删除记录) |
| | | public ServiceModel deletePro(User_battmaint_check ucheck) { |
| | | ServiceModel model=new ServiceModel(); |
| | | ServiceModel model = new ServiceModel(); |
| | | TransactionStatus transactionStatus = dataSourceTransactionManager.getTransaction(transactionDefinition); |
| | | //TODO perry待查 |
| | | boolean bl=true; |
| | | //删除对应的User_battmaint_check_process |
| | | User_battmaint_check_process uprocess=new User_battmaint_check_process(); |
| | | uprocess.setTask_rec_id(ucheck.getNum()); |
| | | //删除User_battmaint_check表 |
| | | bl=mapper.delPro(ucheck)>0; |
| | | //删除User_battmaint_check_process表中task_rec_id对应的记录 |
| | | bl=processMapper.delPro(uprocess)>0; |
| | | //Boolean bl= DateUtil.makeManualCommit(DBUtil.getConn(), str_sql); |
| | | if(bl){ |
| | | boolean bl = true; |
| | | //删除对应的User_battmaint_check_process |
| | | User_battmaint_check_process uprocess = new User_battmaint_check_process(); |
| | | uprocess.setTask_rec_id(ucheck.getNum()); |
| | | //删除User_battmaint_check表 |
| | | bl = mapper.delPro(ucheck) > 0; |
| | | //删除User_battmaint_check_process表中task_rec_id对应的记录 |
| | | if (bl) { |
| | | bl = processMapper.delPro(uprocess) > 0; |
| | | } |
| | | if (bl) { |
| | | dataSourceTransactionManager.commit(transactionStatus); //手动提交 |
| | | model.setCode(1); |
| | | model.setMsg("修改成功!"); |
| | | } |
| | | else{ |
| | | } else { |
| | | dataSourceTransactionManager.rollback(transactionStatus); //事务回滚 |
| | | model.setMsg("修改失败!"); |
| | | } |
| | | return model; |
| | | return model; |
| | | } |
| | | //TODO 数据不足待测试 |
| | | //4.10作业抽查管理 |