package com.product.administration.controller; import com.product.administration.config.CmnConst; import com.product.administration.config.SystemCode; import com.product.administration.service.CooperatesService; import com.product.administration.service.ide.ICooperatesService; import com.product.common.lang.StringUtils; import com.product.core.config.CoreConst; import com.product.core.controller.support.AbstractBaseController; import com.product.core.entity.DataTableEntity; import com.product.core.entity.FieldSetEntity; import com.product.core.entity.RequestParameterEntity; import com.product.core.exception.BaseException; 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.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest; /** * Copyright LX * * @Title: CooperateController * @Project: product-server * @date: 2021年03月23日 14:53 * @author: ZhouJie * @Description: 协同办公 */ @RequestMapping("/api/cooperates") @RestController public class CooperateController extends AbstractBaseController { @Autowired CooperatesService cooperatesService; /** * @Date: 2020-03-23 18:00 * @Author: ZhouJie * @Description: 查询协同办公列表 */ @RequestMapping(value = "/list-cooperates/{version}", method = RequestMethod.POST) public String getCooperatesList(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()); } // 判断分页参数 if (fse.getString(CmnConst.PAGESIZE) == null || fse.getString(CmnConst.CPAGE) == null) { return this.error(SystemCode.SYSTEM_CPAGES_NOT_NULL.getValue(), SystemCode.SYSTEM_CPAGES_NOT_NULL.getText()); } DataTableEntity dt = cooperatesService.getCooperateList(fse); return OK_List(dt); } 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_GET_COOPERATES_LIST_FAIL.getValue(), SystemCode.SYSTEM_GET_COOPERATES_LIST_FAIL.getText()); } } /** * @Date: 2020-03-23 17:32 * @Author: ZhouJie * @Description: 协同办公详情查询 */ @RequestMapping(value = "/find-cooperate/{version}", method = RequestMethod.POST) @ApiVersion(1) public String getCooperateInfo(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()); } // 判断uuid是否为空 if (com.alibaba.druid.util.StringUtils.isEmpty(fse.getString("uuid"))) { SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); return this.error(SystemCode.SYSTEM_FORM_COUNT.getValue(), SystemCode.SYSTEM_FORM_COUNT.getText()); } return cooperatesService.getCooperateInfo(fse); } 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_GET_COOPERATES_INFO_FAIL.getValue(), SystemCode.SYSTEM_GET_COOPERATES_INFO_FAIL.getText()); } } /** * @Date: 2020-04-16 15:06 * @Author: zm * @Description: 发布协同办公 */ @RequestMapping(value = "/release-cooperate/{version}", method = RequestMethod.POST) public String releaseCooperate(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()); } fse.setValue("type",4); cooperatesService.sendCooperate(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_ADD_COOPERATES_FAIL.getValue(), SystemCode.SYSTEM_ADD_COOPERATES_FAIL.getText()); } } /** * @Date: 2020-03-23 15:06 * @Author: ZhouJie * @Description: 新增协同办公 */ @RequestMapping(value = "/add-cooperate/{version}", method = RequestMethod.POST) public String addCooperate(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()); } ICooperatesService service = (ICooperatesService) getProxyInstance( cooperatesService); String uuid = service.addCooperate(fse); if (!StringUtils.isEmpty(uuid)) { return OK_Add(uuid); } SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_ADD_COOPERATES_FAIL.getValue(), SystemCode.SYSTEM_ADD_COOPERATES_FAIL.getText()); return error(SystemCode.SYSTEM_ADD_COOPERATES_FAIL.getValue(), SystemCode.SYSTEM_ADD_COOPERATES_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_ADD_COOPERATES_FAIL.getValue(), SystemCode.SYSTEM_ADD_COOPERATES_FAIL.getText()); } } /** * @Date: 2020-03-23 16:31 * @Author: ZhouJie * @Description: 修改协同 */ @RequestMapping(value = "/update-cooperate/{version}", method = RequestMethod.POST) @ApiVersion(1) public String updateCooperate(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()); } // 判断uuid是否为空 if (com.alibaba.druid.util.StringUtils.isEmpty(fse.getString("uuid"))) { SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_FORM_COUNT.getValue(), SystemCode.SYSTEM_FORM_COUNT.getText()); return this.error(SystemCode.SYSTEM_FORM_COUNT.getValue(), SystemCode.SYSTEM_FORM_COUNT.getText()); } ICooperatesService service = (ICooperatesService) getProxyInstance( cooperatesService); boolean succ = service.updateCooperate(fse); if (succ) { return OK(); } SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_UPDATE_COOPERATES_FAIL.getValue(), SystemCode.SYSTEM_UPDATE_COOPERATES_FAIL.getText()); return error(SystemCode.SYSTEM_UPDATE_COOPERATES_FAIL.getValue(), SystemCode.SYSTEM_UPDATE_COOPERATES_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_UPDATE_COOPERATES_FAIL.getValue(), SystemCode.SYSTEM_UPDATE_COOPERATES_FAIL.getText()); } } /** * @Date: 2020-03-23 17:13 * @Author: ZhouJie * @Description: 删除协同 */ @RequestMapping(value = "/delete-cooperate/{version}", method = RequestMethod.POST) @ApiVersion(1) public String deleteCooperate(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()); } // 判断uuid是否为空 if (com.alibaba.druid.util.StringUtils.isEmpty(fse.getString("uuid"))) { SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_FORM_COUNT.getValue(), SystemCode.SYSTEM_FORM_COUNT.getText()); return this.error(SystemCode.SYSTEM_FORM_COUNT.getValue(), SystemCode.SYSTEM_FORM_COUNT.getText()); } ICooperatesService service = (ICooperatesService) getProxyInstance( cooperatesService); boolean success = service.deleteCooperate(fse); if (success) { return OK(); } SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_DELETE_COOPERATES_FAIL.getValue(), SystemCode.SYSTEM_DELETE_COOPERATES_FAIL.getText()); return error(SystemCode.SYSTEM_DELETE_COOPERATES_FAIL.getValue(), SystemCode.SYSTEM_DELETE_COOPERATES_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_DELETE_COOPERATES_FAIL.getValue(), SystemCode.SYSTEM_DELETE_COOPERATES_FAIL.getText()); } } /** * @Date: 2020-04-01 16:06 * @Author: ZhouJie * @Description: 协同办公送办 */ @RequestMapping(value = "/send-cooperate/{version}", method = RequestMethod.POST) public String sendCooperate(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()); } cooperatesService.sendCooperate(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 */ @RequestMapping(value = "/save-todo/{version}", method = RequestMethod.POST) public String saveTodo(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_FLOW_NODE.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()); } cooperatesService.saveTodo(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_COOPERATE_TODO_FAIL.getValue(), SystemCode.SYSTEM_SEND_COOPERATE_TODO_FAIL.getText()); } } /** * @description: 协同补充正文 * @author: ZhouJie * @date: 2021-06-02 17:23 */ @RequestMapping(value = "/add-supply/{version}", method = RequestMethod.POST) public String addSupplyText(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); String uuid = service.addSupplyText(fse); if (!StringUtils.isEmpty(uuid)) { return OK_Add(uuid); } 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 */ @RequestMapping(value = "/send-urge/{version}", method = RequestMethod.POST) public String urging(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()); } cooperatesService.urging(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_URGING_FAIL.getValue(), SystemCode.SYSTEM_URGING_FAIL.getText()); } } /** * @description: 消息状态改为“已收未办” * @author: ZhouJie * @date: 2021-06-11 10:59 */ @RequestMapping(value = "/modify-state/{version}", method = RequestMethod.POST) public String modifyState(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_FLOW_NODE.equals(fse.getTableName())) { SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), com.product.core.websocket.config.SystemCode.SYSTEM_MESSAGE_ACQUIRE_PARAM_FAIL.getText()); return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); } boolean sucess = cooperatesService.modifyState(fse.getUUID()); if (sucess) { return OK(); } SpringMVCContextHolder.getSystemLogger().error(SystemCode.SYSTEM_READ_NEWS_FAIL.getValue(), SystemCode.SYSTEM_READ_NEWS_FAIL.getText()); return error(SystemCode.SYSTEM_READ_NEWS_FAIL.getValue(), SystemCode.SYSTEM_READ_NEWS_FAIL.getText()); } catch (BaseException e) { e.printStackTrace(); return error(e); } catch (Exception e) { e.printStackTrace(); return this.error(SystemCode.SYSTEM_READ_NEWS_FAIL.getValue(),SystemCode.SYSTEM_READ_NEWS_FAIL.getText()); } } /** * @description: 消息状态改为“已收未办” * @author: ZhouJie * @date: 2021-06-11 10:59 */ @RequestMapping(value = "/user-list/{version}", method = RequestMethod.POST) public String getNowUserList(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(), com.product.core.websocket.config.SystemCode.SYSTEM_MESSAGE_ACQUIRE_PARAM_FAIL.getText()); return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); } DataTableEntity dt = cooperatesService.getNowUserList(fse); return OK_List(dt); } catch (BaseException e) { e.printStackTrace(); return error(e); } catch (Exception e) { e.printStackTrace(); return this.error(SystemCode.SYSTEM_GET_COOPERATES_LIST_FAIL.getValue(),SystemCode.SYSTEM_GET_COOPERATES_LIST_FAIL.getText()); } } }