| | |
| | | import com.vci.corba.portal.data.PLAction; |
| | | import com.vci.corba.portal.data.PLActionCls; |
| | | import com.vci.corba.portal.data.PLActionParam; |
| | | import com.vci.dto.PLActionClsDTO; |
| | | import com.vci.dto.PLActionDTO; |
| | | import com.vci.dto.PLActionExpDTO; |
| | | import com.vci.dto.PLActionQueryDTO; |
| | | import com.vci.pagemodel.OsAttributeVO; |
| | | import com.vci.dto.*; |
| | | import com.vci.starter.poi.bo.WriteExcelData; |
| | | import com.vci.starter.poi.bo.WriteExcelOption; |
| | | import com.vci.starter.poi.util.ExcelUtil; |
| | |
| | | ControllerUtil.writeFileToResponse(response,excelPath); |
| | | FileUtil.del(defaultTempFolder + File.separator); |
| | | } |
| | | /** |
| | | * 保存Action参数数据 |
| | | * dto action传输对象 |
| | | * @return 保存结果 |
| | | */ |
| | | @Override |
| | | public BaseResult savePLActionParam(PLActionParamDTO dto) throws PLException { |
| | | if(dto.getName() == null || dto.getName().equals("")) { |
| | | throw new PLException("500",new String[]{"参数名称不能为空"}); |
| | | } |
| | | PLActionParam param = new PLActionParam(); |
| | | param.oid = ""; |
| | | param.name = dto.getName(); |
| | | param.defaultValue = dto.getDefaultValue(); |
| | | param.description = dto.getDescription(); |
| | | param.action = dto.getAction(); |
| | | String message = platformClientUtil.getUIService().createPLActionParam(param); |
| | | |
| | | if(message.startsWith("0")) { |
| | | if(message.equals("01")) { |
| | | throw new PLException("500",new String[]{"参数名已经存在!"}); |
| | | } else { |
| | | throw new PLException("500",new String[]{"添加按钮参数时发生异常:" + message.substring(1)}); |
| | | } |
| | | } |
| | | return BaseResult.success(); |
| | | } |
| | | |
| | | @Override |
| | | public BaseResult updatePLActionParam(PLActionParamDTO dto) throws PLException { |
| | | if(dto.getName() == null || dto.getName().equals("")) { |
| | | throw new PLException("500",new String[]{"参数名称不能为空"}); |
| | | } |
| | | PLActionParam param = new PLActionParam(); |
| | | param.oid = dto.getOid(); |
| | | param.name = dto.getName(); |
| | | param.defaultValue = dto.getDefaultValue(); |
| | | param.description = dto.getDescription(); |
| | | param.action = dto.getAction(); |
| | | String message = platformClientUtil.getUIService().editPLActionParam(param); |
| | | |
| | | if(message.startsWith("0")) { |
| | | if(message.equals("01")) { |
| | | throw new PLException("500",new String[]{"参数名已经存在!"}); |
| | | } else { |
| | | throw new PLException("500",new String[]{"添加按钮参数时发生异常:" + message.substring(1)}); |
| | | } |
| | | } |
| | | return BaseResult.success(); |
| | | } |
| | | /** |
| | | * 删除Action参数数据 |
| | | * oid 参数主键 |
| | | * @return 保存结果 |
| | | */ |
| | | @Override |
| | | public BaseResult deletePLActionParam(String oid) throws PLException { |
| | | if(StringUtils.isBlank(oid)){ |
| | | throw new PLException("500", new String[]{"参数主键不能为空"}); |
| | | } |
| | | String message = platformClientUtil.getUIService().deletePLActionParam(oid); |
| | | if (message.startsWith("0")) { |
| | | throw new PLException("500", new String[]{"删除按钮参数时发生异常:" + message.substring(1)}); |
| | | } |
| | | return BaseResult.success(); |
| | | } |
| | | |
| | | public boolean isValidPageForamt(PLActionExpDTO plActionExpDTO) throws PLException { |
| | | |