src/main/java/com/product/administration/controller/ConferenceManagerController.java
@@ -535,6 +535,23 @@ } @PostMapping("/cancel_and_start/{version}") @ApiVersion(1) public String CancelAndStart(HttpServletRequest request){ //获取参数 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) { return this.error(com.product.admin.config.SystemCode.SYSTEM_FORM_NODATA.getValue(), com.product.admin.config.SystemCode.SYSTEM_FORM_NODATA.getText()); } conferenceManagerService.CancelAndStart(fse); return OK(); } src/main/java/com/product/administration/service/ConferenceManagerService.java
@@ -343,6 +343,16 @@ MapValues.put("start_time",start_time_date); MapValues.put("end_time",end_time_date); } Date date = new Date(); //是否能够取消 if(date.before(fieldSetEntity.getDate("start_time"))){ MapValues.put("isCancel",true); } //是否执行开启功能 if(date.before(fieldSetEntity.getDate("start_time")) && fieldSetEntity.getString("status").equals("已取消")){ MapValues.put("isStart",true); } dataList.add(MapValues); } return dataList; @@ -430,6 +440,21 @@ return bitMatrix; } @Override public void CancelAndStart(FieldSetEntity fse) throws BaseException { String uuid = fse.getString("uuid"); String filter=" status='"+uuid+"'"; DataTableEntity product_oa_conference_apply = baseDao.listTable("product_oa_conference_apply", filter, new Object[]{}); FieldSetEntity fieldSetEntity = product_oa_conference_apply.getFieldSetEntity(0); if(fieldSetEntity.getString("status").equals("已取消")){ fieldSetEntity.setValue("status","已启用"); }else { fieldSetEntity.setValue("status","已取消"); } baseDao.update(fieldSetEntity); } /** src/main/java/com/product/administration/service/ide/IConferenceManagerService.java
@@ -44,6 +44,8 @@ BitMatrix getQrCode(String content) throws BaseException, WriterException, IOException; void CancelAndStart(FieldSetEntity fse)throws BaseException;