|  | @@ -13,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  |  import org.springframework.stereotype.Service;
 | 
	
		
			
				|  |  |  import com.ruoyi.sim.mapper.RealExamFaultMapper;
 | 
	
		
			
				|  |  |  import com.ruoyi.sim.domain.RealExamFault;
 | 
	
		
			
				|  |  | +import org.springframework.transaction.annotation.Transactional;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  /**
 | 
	
		
			
				|  |  |   * 考试故障关联Service业务层处理
 | 
	
	
		
			
				|  | @@ -64,6 +65,7 @@ public class RealExamFaultService {
 | 
	
		
			
				|  |  |       * @param realExamFault 考试故障关联
 | 
	
		
			
				|  |  |       * @return 结果
 | 
	
		
			
				|  |  |       */
 | 
	
		
			
				|  |  | +    @Transactional
 | 
	
		
			
				|  |  |      public int updateRealExamFault(RealExamFault realExamFault) {
 | 
	
		
			
				|  |  |          realExamFault.setUpdateTime(DateUtils.getNowDate());
 | 
	
		
			
				|  |  |          return realExamFaultMapper.updateRealExamFault(realExamFault);
 | 
	
	
		
			
				|  | @@ -107,6 +109,11 @@ public class RealExamFaultService {
 | 
	
		
			
				|  |  |          return realExamFaultMapper.selectRealExamFaultList(q);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    /**
 | 
	
		
			
				|  |  | +     * reset real_exam_fault 表中关联数据
 | 
	
		
			
				|  |  | +     * @param examId
 | 
	
		
			
				|  |  | +     */
 | 
	
		
			
				|  |  | +    @Transactional
 | 
	
		
			
				|  |  |      public void resetAllType2(Long examId) {
 | 
	
		
			
				|  |  |          listAllType2(examId)
 | 
	
		
			
				|  |  |                  .stream()
 | 
	
	
		
			
				|  | @@ -148,7 +155,7 @@ public class RealExamFaultService {
 | 
	
		
			
				|  |  |          for (RealExamFault ref : list) {
 | 
	
		
			
				|  |  |              String state = ref.getRefState();
 | 
	
		
			
				|  |  |              if (RealExamFault.State.WRITTEN.equals(state) || RealExamFault.State.LOOP_READ.equals(state)) {
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +                continue;
 | 
	
		
			
				|  |  |              } else {
 | 
	
		
			
				|  |  |                  return false;
 | 
	
		
			
				|  |  |              }
 | 
	
	
		
			
				|  | @@ -164,6 +171,7 @@ public class RealExamFaultService {
 | 
	
		
			
				|  |  |          return state.equals(f.getRefState());
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    @Transactional
 | 
	
		
			
				|  |  |      public void calculateMinusByRealExamId(long examId) {
 | 
	
		
			
				|  |  |          l.info("calculateMinusByRealExamId realExamId : {}", examId);
 | 
	
		
			
				|  |  |          RealExamFault q = new RealExamFault();
 | 
	
	
		
			
				|  | @@ -178,6 +186,7 @@ public class RealExamFaultService {
 | 
	
		
			
				|  |  |       *
 | 
	
		
			
				|  |  |       * @param refId
 | 
	
		
			
				|  |  |       */
 | 
	
		
			
				|  |  | +    @Transactional
 | 
	
		
			
				|  |  |      public void calculateMinus(Long refId) {
 | 
	
		
			
				|  |  |          l.info("calculate refId : {}", refId);
 | 
	
		
			
				|  |  |          RealExamFault f = selectRealExamFaultByRefId(refId);
 |