Source/plt-web/plt-web-parent/plt-web-api/src/main/java/com/vci/dto/PLActionParamDTO.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,37 @@ package com.vci.dto; import lombok.Data; /** * Actionåæ°åè¡¨ä¼ è¾å¯¹è±¡ * @author yuxc * @date 2024/8/28 16:40 */ @Data public class PLActionParamDTO implements java.io.Serializable{ /** * ç¦æ¢ä¿®æ¹è¿ä¸ªå¼ */ private static final long serialVersionUID = 2009350578651813260L; /** * ä¸»é® */ public String oid; /** * åæ°åç§° */ public String name; /** * é»è®¤å¼ */ public String defaultValue; /** * æç¤ºä¿¡æ¯ */ public String description; /** * ç¶actionçID */ public String action; } Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsActionController.java
@@ -1,10 +1,7 @@ package com.vci.web.controller; import com.vci.corba.common.PLException; import com.vci.dto.PLActionClsDTO; import com.vci.dto.PLActionDTO; import com.vci.dto.PLActionExpDTO; import com.vci.dto.PLActionQueryDTO; import com.vci.dto.*; import com.vci.starter.web.exception.VciBaseException; import com.vci.starter.web.pagemodel.BaseResult; import com.vci.starter.web.util.VciBaseUtil; @@ -185,6 +182,56 @@ osActionServiceI.exportAction(plActionExpDTO, response); }catch (Throwable e) { throw new VciBaseException(VciBaseUtil.getExceptionMessage(e),new String[0],e); } } /** * ä¿åActionåæ°æ°æ® * dto actionä¼ è¾å¯¹è±¡ * @return ä¿åç»æ */ @PostMapping("/savePLActionParam") public BaseResult savePLActionParam(@RequestBody PLActionParamDTO dto){ try { return osActionServiceI.savePLActionParam(dto); } catch (PLException e) { BaseResult objectBaseResult = new BaseResult<>(); objectBaseResult.setCode(Integer.parseInt(e.code)); objectBaseResult.setMsg(Arrays.toString(e.messages)); return objectBaseResult; } } /** * ä¿®æ¹Actionåæ°æ°æ® * dto actionä¼ è¾å¯¹è±¡ * @return ä¿åç»æ */ @PostMapping("/updatePLActionParam") public BaseResult updatePLActionParam(@RequestBody PLActionParamDTO dto){ try { return osActionServiceI.updatePLActionParam(dto); } catch (PLException e) { BaseResult objectBaseResult = new BaseResult<>(); objectBaseResult.setCode(Integer.parseInt(e.code)); objectBaseResult.setMsg(Arrays.toString(e.messages)); return objectBaseResult; } } /** * å é¤Actionåæ°æ°æ® * oid åæ°ä¸»é® * @return ä¿åç»æ */ @DeleteMapping("/deletePLActionParam") public BaseResult deletePLActionParam(String oid){ try { return osActionServiceI.deletePLActionParam(oid); } catch (PLException e) { BaseResult objectBaseResult = new BaseResult<>(); objectBaseResult.setCode(Integer.parseInt(e.code)); objectBaseResult.setMsg(Arrays.toString(e.messages)); return objectBaseResult; } } } Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsLinkTypeController.java
@@ -279,4 +279,28 @@ throw new VciBaseException(VciBaseUtil.getExceptionMessage(e),new String[0],e); } } /** * è·å设置æåºå段çæåºå段 * @param linkType 龿¥ç±»åçç¼å· * @param btmType ä¸å¡ç±»åçç¼å· * @param direction æ£/åå * @return 屿§çä¿¡æ¯ */ @GetMapping("/getAllOrderbyAttributeByLink") public BaseResult<List<String>> getAllOrderbyAttributeByLink(String linkType, String btmType, String direction){ try { List<String> osLinkTypeAttributes = linkTypeService.getAllOrderbyAttributeByLink(linkType, btmType, direction); return BaseResult.dataList(osLinkTypeAttributes); } catch (PLException e) { BaseResult objectBaseResult = new BaseResult<>(); objectBaseResult.setCode(Integer.parseInt(e.code)); objectBaseResult.setMsg(Arrays.toString(e.messages)); return objectBaseResult; } catch (ParseException e) { throw new RuntimeException(e); } } } Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsActionServiceI.java
@@ -1,10 +1,7 @@ package com.vci.web.service; import com.vci.corba.common.PLException; import com.vci.dto.PLActionClsDTO; import com.vci.dto.PLActionDTO; import com.vci.dto.PLActionExpDTO; import com.vci.dto.PLActionQueryDTO; import com.vci.dto.*; import com.vci.starter.web.pagemodel.BaseResult; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.multipart.MultipartFile; @@ -78,4 +75,22 @@ * @param plActionExpDTO 导åºå±æ§è®¾ç½®å¯¹è±¡ */ void exportAction(PLActionExpDTO plActionExpDTO, HttpServletResponse response) throws PLException, IOException; /** * ä¿åActionåæ°æ°æ® * dto actionä¼ è¾å¯¹è±¡ * @return ä¿åç»æ */ BaseResult savePLActionParam(PLActionParamDTO dto) throws PLException; /** * ä¿®æ¹Actionåæ°æ°æ® * dto actionä¼ è¾å¯¹è±¡ * @return ä¿åç»æ */ BaseResult updatePLActionParam(PLActionParamDTO dto) throws PLException; /** * å é¤Actionåæ°æ°æ® * oid åæ°ä¸»é® * @return ä¿åç»æ */ BaseResult deletePLActionParam(String oid) throws PLException; } Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/OsLinkTypeServiceI.java
@@ -173,4 +173,13 @@ * @return 屿§çä¿¡æ¯ */ List<OsLinkTypeAttributeVO> getAllAttributeByLink(String name) throws PLException, ParseException; /** * è·å设置æåºå段çæåºå段 * @param linkType 龿¥ç±»åçç¼å· * @param btmType ä¸å¡ç±»åçç¼å· * @param direction æ£/åå * @return 屿§çä¿¡æ¯ */ List<String> getAllOrderbyAttributeByLink(String linkType, String btmType, String direction) throws PLException, ParseException; } Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsActionServiceImpl.java
@@ -6,11 +6,7 @@ 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; @@ -503,6 +499,72 @@ 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 { Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/service/impl/OsLinkTypeServiceImpl.java
@@ -4,6 +4,7 @@ import cn.hutool.core.util.ZipUtil; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import com.vci.common.qt.object.QTConstants; import com.vci.constant.FrameWorkLangCodeConstant; import com.vci.corba.common.PLException; import com.vci.corba.omd.atm.AttributeDef; @@ -752,6 +753,31 @@ } return links; } /** * è·å设置æåºå段çæåºå段 * @param linkType 龿¥ç±»åçç¼å· * @param btmType ä¸å¡ç±»åçç¼å· * @param direction æ£/åå * @return 屿§çä¿¡æ¯ */ @Override public List<String> getAllOrderbyAttributeByLink(String linkType, String btmType, String direction) throws PLException, ParseException { List<String> abNames = new ArrayList<>(Arrays.asList("OID", "Creator", "CreateTime", "LastModifier", "LASTMODIFYTIME", "F_OID", "F_REVISIONOID", "F_NAMEOID", "F_BtwName", "T_OID", "T_REVISIONOID", "T_NAMEOID", "T_BtwName", "TS" )); AttributeDef[] attributes = platformClientUtil.getLinkTypeService().getAttributes(linkType); for (AttributeDef attribute : attributes) { abNames.add(String.valueOf(attribute.name)); } String wrapper = "T_OID."; if(direction.equals(QTConstants.DIRECTION_OPPOSITE)){ wrapper = "F_OID."; } List<OsBtmTypeAttributeVO> bizTypeQTDs = btmService.getBizTypeQTDs(btmType); for (OsBtmTypeAttributeVO bizTypeQTD : bizTypeQTDs) { abNames.add(wrapper + bizTypeQTD.getId()); } return abNames; } /** * ä¿®å¤é¾æ¥ç±»åçxmlæä»¶