Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/web/controller/OsActionController.java
@@ -1,13 +1,14 @@
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.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;
import com.vci.web.service.OsActionServiceI;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@@ -149,7 +150,7 @@
    }
    /**
     * 导出Action
     * 导出Action分类
     * @return
     */
    @PostMapping("/exportBeans")
@@ -157,4 +158,80 @@
        osActionServiceI.exportBeans(actionOid, response);
    }
    /**
     * 导入Action
     * @param file 上传的文件
     * @return
     */
    @PostMapping("/impData")
    public BaseResult impData(MultipartFile file){
        try {
            return osActionServiceI.impData(file);
        }catch (Throwable e) {
            throw new VciBaseException(VciBaseUtil.getExceptionMessage(e),new String[0],e);
        }
    }
    /**
     * 导出Action
     * @param plActionExpDTO 导出属性设置对象
     */
    @PostMapping("/exportAction")
    public void exportAction(@RequestBody PLActionExpDTO plActionExpDTO, HttpServletResponse response) throws PLException {
        try {
            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;
        }
    }
}