shichongfu
2023-06-02 bc0e6504f935fe54a3a68160db313f6d4f089b17
src/main/java/com/product/administration/controller/CooperateController.java
@@ -14,6 +14,7 @@
import com.product.core.spring.context.SpringMVCContextHolder;
import com.product.module.sys.version.ApiVersion;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@@ -21,7 +22,7 @@
/**
 * Copyright LX
 *
 *
 * @Title: CooperateController
 * @Project: product-server
 * @date: 2021年03月23日 14:53
@@ -359,7 +360,7 @@
            return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText());
         }
         cooperatesService.sendCooperate(fse);
         return OK();
      } catch (BaseException e) {
         e.printStackTrace();
@@ -461,6 +462,55 @@
      }
   }
   /**
    * @description: 协同补充正文删除
    * @author: ZhouJie
    * @date: 2021-06-02 17:23
    */
   @PostMapping("/delete-supply/{version}")
   @ApiVersion(1)
   public String delSupplyText(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_COOPERATE_SUB.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());
         }
         ICooperatesService service = (ICooperatesService) getProxyInstance(
               cooperatesService);
         boolean success = service.delSupplyText(fse);
         if (success) {
            return OK();
         }
         SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_AND_COOPERATE_SUPPLY_FAIL.getValue(),
               SystemCode.SYSTEM_AND_COOPERATE_SUPPLY_FAIL.getText());
         return error(SystemCode.SYSTEM_AND_COOPERATE_SUPPLY_FAIL.getValue(),
               SystemCode.SYSTEM_AND_COOPERATE_SUPPLY_FAIL.getText());
      } 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_AND_COOPERATE_SUPPLY_FAIL.getValue(),
               SystemCode.SYSTEM_AND_COOPERATE_SUPPLY_FAIL.getText());
      }
   }
   /**
    * @description: 协同办公催办
    * @author: ZhouJie
    * @date: 2021-06-03 17:03