| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import cn.hutool.core.io.FileUtil; |
| | | import com.vci.constant.FrameWorkLangCodeConstant; |
| | | import com.vci.corba.common.PLException; |
| | |
| | | import com.vci.web.enumpck.PlTypetypeEnum; |
| | | import com.vci.web.other.ExportActionLogBean; |
| | | import com.vci.web.other.ExportBeans; |
| | | import com.vci.web.service.*; |
| | | import com.vci.web.util.*; |
| | | import com.vci.web.service.OsActionServiceI; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.web.util.PinyinCommon; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | Map<String, List<PLActionCls>> allDataMap = Arrays.stream(clses).collect(Collectors.groupingBy(pl -> pl.pid)); |
| | | |
| | | for (PLActionCls cls : clses) { |
| | | if (StringUtils.isBlank(cls.pid)) { |
| | | if (StringUtils.isBlank(cls.pid) || cls.pid.equals("root")) { |
| | | PLActionClsDTO parentDto = new PLActionClsDTO(); |
| | | parentDto.setId(cls.id); |
| | | parentDto.setName(cls.name); |
| | |
| | | @Override |
| | | public BaseResult getActionTableData(PLActionQueryDTO dto) throws PLException { |
| | | Constraint[] consArray ; |
| | | if(StringUtils.isNotBlank(dto.getPlactioncls())){ |
| | | //这儿要用!=null控制,查询未分类节点的时候传的"" |
| | | if(dto.getPlactioncls() != null){ |
| | | consArray = new Constraint[7]; |
| | | consArray[6] = new Constraint("plactioncls", dto.getPlactioncls().equals("root") ? "": dto.getPlactioncls()); |
| | | }else { |
| | |
| | | plAction.plModifyUser = WebUtil.getCurrentUserId(); |
| | | plAction.plActionCls = StringUtils.defaultString(dto.getPlActionCls()); |
| | | plAction.plTypeType = StringUtils.defaultString(dto.getPlTypeType()); |
| | | plAction.plImage = StringUtils.defaultString(dto.getPlImage()); |
| | | boolean b = platformClientUtil.getUIService().savePLAction(plAction); |
| | | if(!b){ |
| | | throw new PLException("500", new String[]{"保存失败!!"}); |
| | |
| | | plAction.plModifyUser = WebUtil.getCurrentUserId(); |
| | | plAction.plActionCls = StringUtils.defaultString(dto.getPlActionCls()); |
| | | plAction.plTypeType = StringUtils.defaultString(dto.getPlTypeType()); |
| | | plAction.plImage = StringUtils.defaultString(dto.getPlImage()); |
| | | boolean b = platformClientUtil.getUIService().updatePLAction(plAction); |
| | | if(!b){ |
| | | throw new PLException("500", new String[]{"修改失败!!"}); |
| | |
| | | plAction.plModifyUser = WebUtil.getCurrentUserId(); |
| | | plAction.plActionCls = StringUtils.defaultString(dto.getPlActionCls()); |
| | | plAction.plTypeType = StringUtils.defaultString(dto.getPlTypeType()); |
| | | plAction.plImage = StringUtils.defaultString(dto.getPlImage()); |
| | | boolean b = platformClientUtil.getUIService().deletePLAction(plAction); |
| | | if(!b){ |
| | | throw new PLException("500", new String[]{"删除失败!!"}); |
| | |
| | | param.name = dto.getName(); |
| | | param.defaultValue = dto.getDefaultValue(); |
| | | param.description = dto.getDescription(); |
| | | param.action = dto.getAction(); |
| | | param.action = dto.getActionOid(); |
| | | String message = platformClientUtil.getUIService().createPLActionParam(param); |
| | | |
| | | if(message.startsWith("0")) { |
| | |
| | | param.name = dto.getName(); |
| | | param.defaultValue = dto.getDefaultValue(); |
| | | param.description = dto.getDescription(); |
| | | param.action = dto.getAction(); |
| | | param.action = dto.getActionOid(); |
| | | String message = platformClientUtil.getUIService().editPLActionParam(param); |
| | | |
| | | if(message.startsWith("0")) { |
| | |
| | | List<PLActionParamDTO> dtos = new ArrayList<>(); |
| | | for (PLActionParam paramArray : paramArrays) { |
| | | PLActionParamDTO dto = new PLActionParamDTO(); |
| | | dto.setAction(paramArray.action); |
| | | dto.setActionOid(paramArray.action); |
| | | dto.setOid(paramArray.oid); |
| | | dto.setName(paramArray.name); |
| | | dto.setDescription(paramArray.description); |
| | |
| | | throw new PLException("500", new String[]{"该分类下存在子分类不能删除!\n请删除此分类下的子分类!"}); |
| | | } |
| | | // 执行删除操作 |
| | | String message = platformClientUtil.getUIService().deletePLActionClsById(dto.getId()); |
| | | PLActionCls actionCls = new PLActionCls(); |
| | | actionCls.id = dto.getId(); |
| | | actionCls.name = dto.getName(); |
| | | String message = platformClientUtil.getUIService().deletePLActionCls(actionCls); |
| | | if (message.startsWith("0")) { |
| | | throw new PLException("500", new String[]{"删除分类失败!" + message.substring(1)}); |
| | | } |
| | |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 处理参数列表 |