18756
2024-08-20 069faaad2f86e570842e4717ea0419e2daef9924
src/main/java/com/product/administration/controller/CooperateController.java
@@ -13,6 +13,7 @@
import com.product.core.exception.BaseException;
import com.product.core.spring.context.SpringMVCContextHolder;
import com.product.module.sys.version.ApiVersion;
import com.product.tool.flow.service.FlowCoordinationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -35,7 +36,8 @@
   @Autowired
   CooperatesService cooperatesService;
   @Autowired
   public FlowCoordinationService flowCoordinationService;
   /**
    * @Date: 2020-03-23 18:00
    * @Author: ZhouJie
@@ -331,7 +333,6 @@
               SystemCode.SYSTEM_DELETE_COOPERATES_FAIL.getText());
      }
   }
   /**
    * @Date: 2020-04-01 16:06
    * @Author: ZhouJie
@@ -374,6 +375,46 @@
      }
   }
   /**
    * @Date: 2020-04-01 16:06
    * @Author: ZhouJie
    * @Description: 协同办公撤回或者中止 type 5中止 6 撤回
    */
   @RequestMapping(value = "/recession-stop-cooperate/{version}", method = RequestMethod.POST)
   public String recessionOrStopCooperate(HttpServletRequest request) {
      try {
         // 获取参数
         FieldSetEntity fse = null;
         Object bean = request.getAttribute(CoreConst.API_POST_REQUEST_DATA);
         if (bean != null) {
            RequestParameterEntity reqp = (RequestParameterEntity) bean;
            fse = reqp.getFormData();
         }
         // 判断参数是否为空
         if (bean == null || fse == null) {
            SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_FORM_NODATA.getValue(),
                  SystemCode.SYSTEM_FORM_NODATA.getText());
            return this.error(SystemCode.SYSTEM_FORM_NODATA.getValue(), SystemCode.SYSTEM_FORM_NODATA.getText());
         }
         // 判断表名是否正常
         if (!CmnConst.PRODUCT_OA_COOPERATES.equals(fse.getTableName())) {
            SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_TABLE_NODATA.getValue(),
                  SystemCode.SYSTEM_TABLE_NODATA.getText());
            return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText());
         }
         flowCoordinationService.saveCoordinationStartFlow(fse);
         return OK();
      } catch (BaseException e) {
         e.printStackTrace();
         SpringMVCContextHolder.getSystemLogger().error(e);
         return this.error(e);
      } catch (Exception e) {
         e.printStackTrace();
         SpringMVCContextHolder.getSystemLogger().error(e);
         return this.error(SystemCode.SYSTEM_SEND_COOPERATES_FAIL.getValue(),
               SystemCode.SYSTEM_SEND_COOPERATES_FAIL.getText());
      }
   }
   /**
    * @description: 暂存待办
    * @author: ZhouJie
    * @date: 2021-05-26 16:44