zhongrj
2023-11-06 c5e199a4ff251c281ac638f7230b1bcd180ca0f8
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/service/impl/TbAttResStagCharServiceImpl.java
@@ -60,9 +60,9 @@
      // 修改
      int i = addOrUpdateByGuid(detail,tbAttResStagChar);
      if (i>0){
         if (!edit) {
            tbAttResBaseService.updateFinalState(tbAttResStagChar.getResGuid(), 0);
         }
//         if (!edit) {
//            tbAttResBaseService.updateFinalState(tbAttResStagChar.getResGuid(), 0);
//         }
         return true;
      }
      return false;
@@ -91,10 +91,10 @@
      }
      // 驳回情况下将状态修改回0即已填写未提交状态
      if (tbAttResStagChar.getCheckState()==3){
         tbAttResStagChar.setCheckState(0);
         detail.setCheckState(0);
      }
      // 更新数据
      int i = baseMapper.updateById(tbAttResStagChar);
      int i = baseMapper.updateById(detail);
      if (i>0){
         if (!edit) {
            tbAttResBaseService.updateFinalState(tbAttResStagChar.getResGuid(), tbAttResStagChar.getCheckState());
@@ -115,6 +115,7 @@
         tbAttResStagChar.setGuid(oldAbAttResBase.getGuid());
         // 更新
         i = baseMapper.updateById(tbAttResStagChar);
         tbAttResBaseService.updateFinalState(tbAttResStagChar.getResGuid(),tbAttResStagChar.getCheckState());
      }else {
         tbAttResStagChar.setCreateTime(new Date());
         i = baseMapper.insert(tbAttResStagChar);
@@ -153,12 +154,12 @@
      // 判断是否存在
      if (null==oldAbAttResBase){
         // 填报
         newTbAttResStagChar.setCheckLog(builder.toString());
         oldAbAttResBase.setCheckLog(builder.toString());
      }else {
         StringBuilder stringBuilder = new StringBuilder(null==oldAbAttResBase.getCheckLog()?"":oldAbAttResBase.getCheckLog());
         stringBuilder.append(builder);
         // 填报
         newTbAttResStagChar.setCheckLog(stringBuilder.toString());
         oldAbAttResBase.setCheckLog(stringBuilder.toString());
      }
   }
@@ -183,6 +184,7 @@
      }
      if (newTbAttResStagChar.getCheckState()==4){
         fillName = "编辑";
         oldAbAttResBase.setCheckState(oldAbAttResBase.getCheckState());
         newTbAttResStagChar.setCheckState(oldAbAttResBase.getCheckState());
      }
@@ -207,6 +209,7 @@
         StringBuilder stringBuilder = new StringBuilder(null==oldAbAttResBase.getLog()?"":oldAbAttResBase.getLog());
         stringBuilder.append(builder);
         // 填报
         oldAbAttResBase.setLog(stringBuilder.toString());
         newTbAttResStagChar.setLog(stringBuilder.toString());
      }
   }