xieb
2024-03-17 6de28f3d62a4f77267628eaba28fecaebec8cb27
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sjztmd/service/impl/TbResGeneralInvestigationServiceImpl.java
@@ -93,31 +93,31 @@
      state.setCheckState(tbResGeneralInvestigationParam.getCheckState());
      tbResGeneralInvestigationStateService.saveOrUpdate(state);
      //先把数据移除
      QueryWrapper delete = new QueryWrapper();
      delete.eq("\"tb_state_id\"",state.getGuid());
      boolean remove = remove(delete);
//      //先把数据移除
//      QueryWrapper delete = new QueryWrapper();
//      delete.eq("\"tb_state_id\"",state.getGuid());
//      boolean remove = remove(delete);
//
//      if (remove){
//
//      }
      if (remove){
         for (int i = 0; i < list.size(); i++) {
            TbResGeneralInvestigation tbResGeneralInvestigation = list.get(i);
            //id清空方便批量新增
            tbResGeneralInvestigation.setGuid("");
      for (int i = 0; i < list.size(); i++) {
         TbResGeneralInvestigation tbResGeneralInvestigation = list.get(i);
         //id清空方便批量新增
//         tbResGeneralInvestigation.setGuid("");
            if (tbResGeneralInvestigation.getCreateTime() == null){
               tbResGeneralInvestigation.setCreateTime(DateUtil.now());
            }
            if (tbResGeneralInvestigation.getCreateUser() == null){
               tbResGeneralInvestigation.setCreateUser(AuthUtil.getUserId().toString());
            }
            //设置状态表id
            tbResGeneralInvestigation.setTbStateId(state.getGuid());
         if (tbResGeneralInvestigation.getCreateTime() == null){
            tbResGeneralInvestigation.setCreateTime(DateUtil.now());
         }
         return R.status(saveOrUpdateBatch(list));
      }
      return R.fail("操作失败");
         if (tbResGeneralInvestigation.getCreateUser() == null){
            tbResGeneralInvestigation.setCreateUser(AuthUtil.getUserId().toString());
         }
         //设置状态表id
         tbResGeneralInvestigation.setTbStateId(state.getGuid());
      }
      return R.status(saveOrUpdateBatch(list));
   }
}