lidongdong
2022-10-13 d63453b5a1c52e44b957471035e2232d1b3d2da9
flower_city/src/main/java/com/dg/core/controller/TransactionEventController.java
@@ -15,6 +15,7 @@
import com.dg.core.util.TableDataInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.*;
@@ -41,7 +42,7 @@
     */
    @ApiOperation("查询导办事务详情")
    @GetMapping("/getData")
    @Authorization
    public ResultData selectConfigData(@RequestParam("Id") String Id,@CurrentUser SysUser sysUser)
    {
        Assert.notNull(Id, "Id 不能为空");
@@ -94,6 +95,22 @@
    @Authorization
    public ResultData insertConfig(@RequestBody TransactionEvent entity)
    {
        if(StringUtils.isEmpty(entity.getDepartmentId()))
        {
            return ResultData.error("部门id不能为空");
        }
        if(StringUtils.isEmpty(entity.getMatterName()))
        {
            return ResultData.error("事件名称不能为空");
        }
        String id=iTransactionEventService.selectDataIfExist(entity.getDepartmentId(),entity.getMatterName());
        if(!StringUtils.isEmpty(id))
        {
            return ResultData.error("事件名称已存在");
        }
        return toAjax(iTransactionEventService.insertConfig(entity));
    }
@@ -107,6 +124,16 @@
    @Authorization
    public ResultData updateConfig(@RequestBody TransactionEvent entity)
    {
        if(StringUtils.isEmpty(entity.getDepartmentId()))
        {
            return ResultData.error("部门id不能为空");
        }
        if(StringUtils.isEmpty(entity.getMatterName()))
        {
            return ResultData.error("事件名称不能为空");
        }
        return toAjax(iTransactionEventService.updateConfig(entity));
    }
@@ -132,7 +159,6 @@
     */
    @ApiOperation(value = "导办事务搜索",response = QueryResults.class)
    @GetMapping("/queryKeyWordList")
    @Authorization
    public QueryResults queryMatterNameList(@RequestParam(value = "pageNum",required = false) Integer pageNum,
                                            @RequestParam(value = "pageSize",required = false) Integer pageSize,
                                            @RequestParam(value = "recommendSize",required = false) Integer recommendSize,