| | |
| | | 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; |
| | |
| | | |
| | | /** |
| | | * Copyright LX |
| | | * |
| | | * |
| | | * @Title: CooperateController |
| | | * @Project: product-server |
| | | * @date: 2021年03月23日 14:53 |
| | |
| | | return this.error(SystemCode.SYSTEM_TABLE_NODATA.getValue(), SystemCode.SYSTEM_TABLE_NODATA.getText()); |
| | | } |
| | | cooperatesService.sendCooperate(fse); |
| | | |
| | | |
| | | return OK(); |
| | | } catch (BaseException e) { |
| | | e.printStackTrace(); |
| | |
| | | } |
| | | } |
| | | /** |
| | | * @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 |