package com.philisense.www.controller.web;

import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.philisense.www.annotation.log.OperateLog;

import com.philisense.www.common.config.CommonConst;
import com.philisense.www.controller.BaseUtilController;

import com.philisense.www.service.SystemNoticeFileService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.*;

@RestController
@RequestMapping(CommonConst.WEB_REST_SERVICE_PREFICX + "systemnoticefile")
@Api(tags = "SystemNoticeFileControllerForWeb|一个用来操作-{系统公告附件}-业务模块的控制器")
public class SystemNoticeFileControllerForWeb extends BaseUtilController {



    @Autowired
    private SystemNoticeFileService systemNoticeFileService;

    @GetMapping("/delete")
    @ApiOperation(value = "根据-{系统公告附件}-主键删除记录", notes = "成功返回:{\"success\":true,\"message\",\"数据删除成功\"},失败返回:{\"success\":false,\"message\",\"数据删除失败\"}")
    @ApiImplicitParam(paramType = "query", name = "recordid", value = "记录主键", required = true,  dataTypeClass = String.class)
    @OperateLog(name = "根据-{系统公告附件}-主键删除记录", value = "delete", type = "PC")
    public Map<String, Object> deleteByPrimaryKeyForSystemNoticeFileForWeb(HttpServletRequest request, HttpServletResponse response, @RequestParam String recordid) {
        Map<String, Object> result = new HashMap<String, Object>();
        try {
            Map<String, Object> param = new HashMap<>();
            param.put("id", recordid);
            Map<String, Object> oneMap = systemNoticeFileService.getOne(param);
            if(null == oneMap) {
                result.put(DATASUCCESS, ERRORFLAG);
                result.put(DATAMESSAGE, DELETE_FAIL_MSG + "业务Id不存在");
                return result;
            }
         
            int flag = systemNoticeFileService.deleteByPrimaryKey(recordid);
            if (1 <= flag) {
                result.put(DATASUCCESS, SUCCESSFLAG);
                result.put(DATAMESSAGE, DELETE_SUCCESS_MSG);
            } else {
                result.put(DATASUCCESS, ERRORFLAG);
                result.put(DATAMESSAGE, DELETE_FAIL_MSG);
            }

        } catch (Exception e) {
            result.put(DATASUCCESS, ERRORFLAG);
            result.put(DATAMESSAGE, DELETE_FAIL_MSG + e.getMessage());
        }
        return result;
    }

    @GetMapping("/get")
    @ApiOperation(value = "根据-{系统公告附件}-主键查询记录", notes = "成功返回:{\"success\":true,\"message\",\"数据查询成功\",\"datarecord\":\"{}\"},失败返回:{\"success\":false,\"message\",\"数据查询失败\"}")
    @ApiImplicitParam(paramType = "body", name = "recordid", value = "记录主键", required = true,  dataTypeClass = String.class)
    @OperateLog(name = "根据-{系统公告附件}-主键查询记录", value = "query", type = "PC")
    public Map<String, Object> selectByPrimaryKeyForSystemNoticeFileForWeb(HttpServletRequest request, HttpServletResponse response, @RequestParam String recordid) {
        Map<String, Object> result = new HashMap<String, Object>();
        try {
            Map<String, Object> stringObjectMap = systemNoticeFileService.selectByPrimaryKey(recordid);
           
            result.put(DATASUCCESS, SUCCESSFLAG);
            result.put(DATAMESSAGE, QUERY_SUCCESS_MSG);
            result.put(DATARECORD, stringObjectMap);
        } catch (Exception e) {
            result.put(DATASUCCESS, ERRORFLAG);
            result.put(DATAMESSAGE, QUERY_FAIL_MSG + e.getMessage());
        }
        return result;
    }

    @PostMapping("/insert")
    @ApiOperation(value = "根据-{系统公告附件}-对象插入记录", notes = "成功返回:{\"success\":true,\"message\",\"数据插入成功\"},失败返回:{\"success\":false,\"message\",\"数据插入失败\"}")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "body", name = "id", value = "id", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "noticeid", value = "主表外键ID", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filename", value = "文件名称", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "newfilename", value = "新文件名称", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filepath", value = "filepath", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "fileurl", value = "附件地址", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filetype", value = "文件类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filesuffix", value = "文件后缀名", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filesize", value = "文件大小 单位b", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "mimetype", value = "MIME 类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "uploadtime", value = "上传时间", required = true,  dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "businessfiletype", value = "业务附件类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "storagetype", value = "存储类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "apply_user_id", value = "上传用户id", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "apply_user", value = "上传用户", required = true,  dataTypeClass = String.class)
    })
    @OperateLog(name = "根据-{系统公告附件}-对象插入记录", value = "insert", type = "PC")
    public Map<String, Object> insertForSystemNoticeFileForWeb(HttpServletRequest request, HttpServletResponse response, @RequestBody Map<String, Object> map) {
        Map<String, Object> result = new HashMap<String, Object>();
        try {
            map.put("id", UUID.randomUUID().toString().replaceAll("-", ""));

            systemNoticeFileService.insert(map);
            result.put(DATASUCCESS, SUCCESSFLAG);
            result.put(DATAMESSAGE, INSERT_SUCCESS_MSG);
            result.put(DATARECORD, map);
        } catch (Exception e) {
            result.put(DATASUCCESS, ERRORFLAG);
            result.put(DATAMESSAGE, INSERT_FAIL_MSG + e.getMessage());
        }
        return result;
    }

    @PostMapping("/update")
    @ApiOperation(value = "根据-{系统公告附件}-对象更新记录", notes = "成功返回:{\"success\":true,\"message\",\"数据更新成功\"},失败返回:{\"success\":false,\"message\",\"数据更新失败\"}")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "body", name = "id", value = "id", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "noticeid", value = "主表外键ID", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filename", value = "文件名称", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "newfilename", value = "新文件名称", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filepath", value = "filepath", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "fileurl", value = "附件地址", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filetype", value = "文件类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filesuffix", value = "文件后缀名", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filesize", value = "文件大小 单位b", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "mimetype", value = "MIME 类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "uploadtime", value = "上传时间", required = true,  dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "businessfiletype", value = "业务附件类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "storagetype", value = "存储类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "apply_user_id", value = "上传用户id", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "apply_user", value = "上传用户", required = true,  dataTypeClass = String.class)
    })
    @OperateLog(name = "根据-{系统公告附件}-对象更新记录", value = "update", type = "PC")
    public Map<String, Object> updateForSystemNoticeFileForWeb(HttpServletRequest request, HttpServletResponse response, @RequestBody Map<String, Object> map) {
        Map<String, Object> result = new HashMap<String, Object>();
        try {


            int flag = systemNoticeFileService.update(map);
            if (1 <= flag) {
                result.put(DATASUCCESS, SUCCESSFLAG);
                result.put(DATAMESSAGE, UPDATE_SUCCESS_MSG);
            } else {
                result.put(DATASUCCESS, ERRORFLAG);
                result.put(DATAMESSAGE, UPDATE_FAIL_MSG);
            }

        } catch (Exception e) {
            result.put(DATASUCCESS, ERRORFLAG);
            result.put(DATAMESSAGE, UPDATE_FAIL_MSG + e.getMessage());
        }
        return result;
    }

    @PostMapping("/deleteByMap")
    @ApiOperation(value = "根据-{系统公告附件}-对象Map删除记录", notes = "成功返回:{\"success\":true,\"message\",\"数据删除成功\"},失败返回:{\"success\":false,\"message\",\"数据删除失败\"}")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "body", name = "id", value = "id", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "noticeid", value = "主表外键ID", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filename", value = "文件名称", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "newfilename", value = "新文件名称", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filepath", value = "filepath", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "fileurl", value = "附件地址", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filetype", value = "文件类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filesuffix", value = "文件后缀名", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filesize", value = "文件大小 单位b", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "mimetype", value = "MIME 类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "uploadtime", value = "上传时间", required = true,  dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "businessfiletype", value = "业务附件类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "storagetype", value = "存储类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "apply_user_id", value = "上传用户id", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "apply_user", value = "上传用户", required = true,  dataTypeClass = String.class)
    })
    @OperateLog(name = "根据-{系统公告附件}-对象Map删除记录", value = "delete", type = "PC")
    public Map<String, Object> deleteByMapForSystemNoticeFileForWeb(HttpServletRequest request, HttpServletResponse response, @RequestBody Map<String, Object> map) {
        Map<String, Object> result = new HashMap<String, Object>();
        try {
            Map<String, Object> oneMap = systemNoticeFileService.getOne(map);
            if(null == oneMap) {
                result.put(DATASUCCESS, ERRORFLAG);
                result.put(DATAMESSAGE, DELETE_FAIL_MSG + "业务Id不存在");
                return result;
            }
           
            int flag = systemNoticeFileService.deleteByMap(map);
            if (1 <= flag) {
                result.put(DATASUCCESS, SUCCESSFLAG);
                result.put(DATAMESSAGE, DELETE_SUCCESS_MSG);
            } else {
                result.put(DATASUCCESS, ERRORFLAG);
                result.put(DATAMESSAGE, DELETE_FAIL_MSG);
            }

        } catch (Exception e) {
            result.put(DATASUCCESS, ERRORFLAG);
            result.put(DATAMESSAGE, DELETE_FAIL_MSG + e.getMessage());
        }
        return result;
    }

    @PostMapping("/updateByMap")
    @ApiOperation(value = "根据-{系统公告附件}-对象Map更新记录", notes = "成功返回:{\"success\":true,\"message\",\"数据更新成功\"},失败返回:{\"success\":false,\"message\",\"数据更新失败\"}")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "body", name = "id", value = "id", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "noticeid", value = "主表外键ID", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filename", value = "文件名称", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "newfilename", value = "新文件名称", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filepath", value = "filepath", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "fileurl", value = "附件地址", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filetype", value = "文件类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filesuffix", value = "文件后缀名", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filesize", value = "文件大小 单位b", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "mimetype", value = "MIME 类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "uploadtime", value = "上传时间", required = true,  dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "businessfiletype", value = "业务附件类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "storagetype", value = "存储类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "apply_user_id", value = "上传用户id", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "apply_user", value = "上传用户", required = true,  dataTypeClass = String.class)
    })
    @OperateLog(name = "根据-{系统公告附件}-对象Map更新记录", value = "update", type = "PC")
    public Map<String, Object> updateByMapForSystemNoticeFileForWeb(HttpServletRequest request, HttpServletResponse response, @RequestBody Map<String, Object> map) {
        Map<String, Object> result = new HashMap<String, Object>();
        try {


            int flag = systemNoticeFileService.updateByMap(map);
            if (1 <= flag) {
                result.put(DATASUCCESS, SUCCESSFLAG);
                result.put(DATAMESSAGE, UPDATE_SUCCESS_MSG);
            } else {
                result.put(DATASUCCESS, ERRORFLAG);
                result.put(DATAMESSAGE, UPDATE_FAIL_MSG);
            }

        } catch (Exception e) {
            result.put(DATASUCCESS, ERRORFLAG);
            result.put(DATAMESSAGE, UPDATE_FAIL_MSG + e.getMessage());
        }
        return result;
    }

    @PostMapping("/getOne")
    @ApiOperation(value = "根据-{系统公告附件}-对象Map查询记录", notes = "成功返回:{\"success\":true,\"message\",\"数据查询成功\",\"datarecord\":\"{}\"},失败返回:{\"success\":false,\"message\",\"数据查询失败\"}")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "body", name = "id", value = "id", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "noticeid", value = "主表外键ID", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filename", value = "文件名称", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "newfilename", value = "新文件名称", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filepath", value = "filepath", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "fileurl", value = "附件地址", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filetype", value = "文件类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filesuffix", value = "文件后缀名", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filesize", value = "文件大小 单位b", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "mimetype", value = "MIME 类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "uploadtime", value = "上传时间", required = true,  dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "businessfiletype", value = "业务附件类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "storagetype", value = "存储类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "apply_user_id", value = "上传用户id", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "apply_user", value = "上传用户", required = true,  dataTypeClass = String.class)
    })
    @OperateLog(name = "根据-{系统公告附件}-对象Map查询记录", value = "query", type = "PC")
    public Map<String, Object> getOneForSystemNoticeFileForWeb(HttpServletRequest request, HttpServletResponse response, @RequestBody Map<String, Object> map) {
        Map<String, Object> result = new HashMap<String, Object>();
        try {
            Map<String, Object> one = systemNoticeFileService.getOne(map);
            
            result.put(DATASUCCESS, SUCCESSFLAG);
            result.put(DATAMESSAGE, QUERY_SUCCESS_MSG);
            result.put(DATARECORD, one);
        } catch (Exception e) {
            result.put(DATASUCCESS, ERRORFLAG);
            result.put(DATAMESSAGE, QUERY_FAIL_MSG + e.getMessage());
        }
        return result;
    }

    @PostMapping("/getAll")
    @ApiOperation(value = "根据-{系统公告附件}-对象Map查询所有记录", notes = "成功返回:{\"success\":true,\"message\",\"数据查询成功\",\"data\":\"[]\"},失败返回:{\"success\":false,\"message\",\"数据查询失败\"}")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "body", name = "id", value = "id", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "noticeid", value = "主表外键ID", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filename", value = "文件名称", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "newfilename", value = "新文件名称", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filepath", value = "filepath", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "fileurl", value = "附件地址", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filetype", value = "文件类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filesuffix", value = "文件后缀名", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filesize", value = "文件大小 单位b", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "mimetype", value = "MIME 类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "uploadtime", value = "上传时间", required = true,  dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "businessfiletype", value = "业务附件类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "storagetype", value = "存储类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "apply_user_id", value = "上传用户id", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "apply_user", value = "上传用户", required = true,  dataTypeClass = String.class)
    })
    @OperateLog(name = "根据-{系统公告附件}-对象Map查询所有记录", value = "query", type = "PC")
    public Map<String, Object> getAllForSystemNoticeFileForWeb(HttpServletRequest request, HttpServletResponse response, @RequestBody Map<String, Object> map) {
        Map<String, Object> result = new HashMap<String, Object>();
        try {
            List<Map<String, Object>> all = systemNoticeFileService.getAll(map);
            
            result.put(DATASUCCESS, SUCCESSFLAG);
            result.put(DATAMESSAGE, QUERY_SUCCESS_MSG);
            result.put(DATALIST_VUE, all);
        } catch (Exception e) {
            result.put(DATASUCCESS, ERRORFLAG);
            result.put(DATAMESSAGE, QUERY_FAIL_MSG + e.getMessage());
        }
        return result;
    }

    @PostMapping( "/queryPage")
    @ApiOperation(value="根据-{系统公告附件}-对象Map分页记录", notes="成功返回:{\"success\":true,\"message\",\"数据查询成功\",\"data\":\"[]\"},失败返回:{\"success\":false,\"message\",\"数据查询失败\"}")
    @ApiImplicitParams({
        @ApiImplicitParam(paramType = "body", name = "id", value = "id", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "noticeid", value = "主表外键ID", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "filename", value = "文件名称", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "newfilename", value = "新文件名称", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "filepath", value = "filepath", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "fileurl", value = "附件地址", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "filetype", value = "文件类型", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "filesuffix", value = "文件后缀名", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "filesize", value = "文件大小 单位b", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "mimetype", value = "MIME 类型", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "uploadtime", value = "上传时间", required = true,  dataTypeClass = Date.class),
        @ApiImplicitParam(paramType = "body", name = "businessfiletype", value = "业务附件类型", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "storagetype", value = "存储类型", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "apply_user_id", value = "上传用户id", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "apply_user", value = "上传用户", required = true,  dataTypeClass = String.class)
    })
    @OperateLog(name = "根据-{系统公告附件}-对象Map分页记录",value = "query",type = "PC")
    public Map<String, Object>  queryPageForSystemNoticeFileForWeb(HttpServletRequest request , HttpServletResponse response,@RequestBody Map<String, Object> map)
    {
            Map<String, Object> result = new HashMap<String, Object>();
            try {

            int currentPage = map.get(DATACURRENT)!=null?Integer.parseInt(map.get(DATACURRENT)+"")-1:0;
            int pageSize = map.get(PAGESIZE)!=null?Integer.parseInt(map.get(PAGESIZE)+""):10;
            int pageStart = currentPage*pageSize ;


            map.put(PAGESIZE,pageSize);
            map.put(PAGESTART,pageStart);

            int total = systemNoticeFileService.count(map);
            List<Map<String, Object>> datalist = new ArrayList<Map<String, Object>>();
            if(total>0){
            datalist = systemNoticeFileService.queryPage(map);
            }
            result.put(DATASUCCESS, SUCCESSFLAG);
            result.put(DATAMESSAGE, QUERY_SUCCESS_MSG);
            result.put(DATALIST,datalist);
            Map<String, Object> pagemode = new HashMap<String, Object>();
            pagemode.put(DATATOTAL,total);
            pagemode.put(PAGESIZE,map.get(PAGESIZE)!=null?map.get(PAGESIZE):10);
            pagemode.put(DATACURRENT,map.get(DATACURRENT)!=null?map.get(DATACURRENT):0);
            result.put(PAGINATION,pagemode);
            }catch(Exception e){
            result.put(DATASUCCESS, ERRORFLAG);
            result.put(DATAMESSAGE, QUERY_FAIL_MSG+e.getMessage());
            }
            return result;
    }


    @PostMapping( "/queryPageVue")
    @ApiOperation(value="根据-{系统公告附件}-对象Map分页记录", notes="成功返回:{\"success\":true,\"message\",\"数据查询成功\",\"data\":\"[]\"},失败返回:{\"success\":false,\"message\",\"数据查询失败\"}")
    @ApiImplicitParams({
        @ApiImplicitParam(paramType = "body", name = "id", value = "id", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "noticeid", value = "主表外键ID", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "filename", value = "文件名称", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "newfilename", value = "新文件名称", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "filepath", value = "filepath", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "fileurl", value = "附件地址", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "filetype", value = "文件类型", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "filesuffix", value = "文件后缀名", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "filesize", value = "文件大小 单位b", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "mimetype", value = "MIME 类型", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "uploadtime", value = "上传时间", required = true,  dataTypeClass = Date.class),
        @ApiImplicitParam(paramType = "body", name = "businessfiletype", value = "业务附件类型", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "storagetype", value = "存储类型", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "apply_user_id", value = "上传用户id", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "apply_user", value = "上传用户", required = true,  dataTypeClass = String.class)
    })
    @OperateLog(name = "根据-{系统公告附件}-对象Map分页记录",value = "query",type = "PC")
    public Map<String, Object>  queryPageVueForSystemNoticeFileForWeb(HttpServletRequest request , HttpServletResponse response,@RequestBody Map<String, Object> map)
    {
            Map<String, Object> result = new HashMap<String, Object>();
            try {

            int currentPage = map.get(DATACURRENT_VUE)!=null?Integer.parseInt(map.get(DATACURRENT_VUE)+"")-1:0;
            int pageSize = map.get(PAGESIZE_VUE)!=null?Integer.parseInt(map.get(PAGESIZE_VUE)+""):10;
            int pageStart = currentPage*pageSize ;


            map.put(PAGESIZE_VUE,pageSize);
            map.put(PAGESTART,pageStart);

            int total = systemNoticeFileService.count(map);
            List<Map<String, Object>> datalist = new ArrayList<Map<String, Object>>();
            if(total>0){
            datalist = systemNoticeFileService.queryPage(map);
            }
            Map<String, Object> tempresult = new HashMap<String, Object>();
            tempresult.put(DATASUCCESS, SUCCESSFLAG);
            tempresult.put(DATAMESSAGE, QUERY_SUCCESS_MSG);
            tempresult.put(DATALIST_VUE,datalist);
            tempresult.put(DATATOTAL_VUE,total);
            tempresult.put(PAGESIZE_VUE,map.get(PAGESIZE_VUE)!=null?map.get(PAGESIZE_VUE):10);
            tempresult.put(DATACURRENT_VUE,map.get(DATACURRENT_VUE)!=null?map.get(DATACURRENT_VUE):0);
            result.put(DATARESULT, tempresult);
            }catch(Exception e){
            result.put(DATASUCCESS, ERRORFLAG);
            result.put(DATAMESSAGE, QUERY_FAIL_MSG+e.getMessage());
            }
            return result;
    }



    @PostMapping( "/queryPageOracle")
    @ApiOperation(value="根据-{系统公告附件}-对象Map分页记录", notes="成功返回:{\"success\":true,\"message\",\"数据查询成功\",\"data\":\"[]\"},失败返回:{\"success\":false,\"message\",\"数据查询失败\"}")
    @ApiImplicitParams({
        @ApiImplicitParam(paramType = "body", name = "id", value = "id", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "noticeid", value = "主表外键ID", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "filename", value = "文件名称", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "newfilename", value = "新文件名称", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "filepath", value = "filepath", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "fileurl", value = "附件地址", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "filetype", value = "文件类型", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "filesuffix", value = "文件后缀名", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "filesize", value = "文件大小 单位b", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "mimetype", value = "MIME 类型", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "uploadtime", value = "上传时间", required = true,  dataTypeClass = Date.class),
        @ApiImplicitParam(paramType = "body", name = "businessfiletype", value = "业务附件类型", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "storagetype", value = "存储类型", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "apply_user_id", value = "上传用户id", required = true,  dataTypeClass = String.class),
        @ApiImplicitParam(paramType = "body", name = "apply_user", value = "上传用户", required = true,  dataTypeClass = String.class)
    })
    @OperateLog(name = "根据-{系统公告附件}-对象Map分页记录",value = "query",type = "PC")
    public Map<String, Object>  queryPageOracleForSystemNoticeFileForWeb(HttpServletRequest request , HttpServletResponse response,@RequestBody Map<String, Object> map)
    {
            Map<String, Object> result = new HashMap<String, Object>();
            try {

            int currentPage = map.get(DATACURRENT)!=null?Integer.parseInt(map.get(DATACURRENT)+""):1;
            int pageSize = map.get(PAGESIZE)!=null?Integer.parseInt(map.get(PAGESIZE)+""):10;
            int pageStart = currentPage*pageSize ;


            map.put(PAGESTART,(currentPage-1)*pageSize);
            map.put(PAGEEND,currentPage*pageSize);

            int total = systemNoticeFileService.count(map);
            List<Map<String, Object>> datalist = new ArrayList<Map<String, Object>>();
            if(total>0){
            datalist = systemNoticeFileService.queryPage(map);
            }
            result.put(DATASUCCESS, SUCCESSFLAG);
            result.put(DATAMESSAGE, QUERY_SUCCESS_MSG);
            result.put(DATALIST,datalist);
            Map<String, Object> pagemode = new HashMap<String, Object>();
            pagemode.put(DATATOTAL,total);
            pagemode.put(PAGESIZE,map.get(PAGESIZE)!=null?map.get(PAGESIZE):10);
            pagemode.put(DATACURRENT,map.get(DATACURRENT)!=null?map.get(DATACURRENT):0);
            result.put(PAGINATION,pagemode);
            }catch(Exception e){
            result.put(DATASUCCESS, ERRORFLAG);
            result.put(DATAMESSAGE, QUERY_FAIL_MSG+e.getMessage());
            }
            return result;
    }

    @PostMapping("/count")
    @ApiOperation(value = "根据-{系统公告附件}-对象Map统计查询总数记录", notes = "成功返回:{\"success\":true,\"message\",\"数据查询成功\",\"data\":\"[]\"},失败返回:{\"success\":false,\"message\",\"数据查询失败\"}")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "body", name = "id", value = "id", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "noticeid", value = "主表外键ID", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filename", value = "文件名称", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "newfilename", value = "新文件名称", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filepath", value = "filepath", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "fileurl", value = "附件地址", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filetype", value = "文件类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filesuffix", value = "文件后缀名", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filesize", value = "文件大小 单位b", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "mimetype", value = "MIME 类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "uploadtime", value = "上传时间", required = true,  dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "businessfiletype", value = "业务附件类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "storagetype", value = "存储类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "apply_user_id", value = "上传用户id", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "apply_user", value = "上传用户", required = true,  dataTypeClass = String.class)
    })
    @OperateLog(name = "根据-{系统公告附件}-对象Map统计查询总数记录", value = "query", type = "PC")
    public Map<String, Object> countForSystemNoticeFileForWeb(HttpServletRequest request, HttpServletResponse response, @RequestBody Map<String, Object> map) {
        Map<String, Object> result = new HashMap<String, Object>();
        try {

            result.put(DATASUCCESS, SUCCESSFLAG);
            result.put(DATAMESSAGE, QUERY_SUCCESS_MSG);
            result.put(DATATOTAL_VUE, systemNoticeFileService.count(map));
        } catch (Exception e) {
            result.put(DATASUCCESS, ERRORFLAG);
            result.put(DATAMESSAGE, QUERY_FAIL_MSG + e.getMessage());
        }
        return result;
    }

    @PostMapping("/insertBatch")
    @ApiOperation(value = "根据-{系统公告附件}-对象Map批量插入记录", notes = "成功返回:{\"success\":true,\"message\",\"数据插入成功\"},失败返回:{\"success\":false,\"message\",\"数据插入失败\"}")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "body", name = "id", value = "id", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "noticeid", value = "主表外键ID", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filename", value = "文件名称", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "newfilename", value = "新文件名称", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filepath", value = "filepath", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "fileurl", value = "附件地址", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filetype", value = "文件类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filesuffix", value = "文件后缀名", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filesize", value = "文件大小 单位b", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "mimetype", value = "MIME 类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "uploadtime", value = "上传时间", required = true,  dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "businessfiletype", value = "业务附件类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "storagetype", value = "存储类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "apply_user_id", value = "上传用户id", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "apply_user", value = "上传用户", required = true,  dataTypeClass = String.class)
    })
    @OperateLog(name = "根据-{系统公告附件}-对象Map批量插入记录", value = "insert", type = "PC")
    public Map<String, Object> insertBatchForSystemNoticeFileForWeb(HttpServletRequest request, HttpServletResponse response, @RequestBody List<Map<String, Object>> list) {
        Map<String, Object> result = new HashMap<String, Object>();
        try {

            for (Map<String, Object> map : list) {
                map.put("id", UUID.randomUUID().toString().replaceAll("-", ""));
            }

            systemNoticeFileService.insertBatch(list);
            result.put(DATASUCCESS, SUCCESSFLAG);
            result.put(DATAMESSAGE, INSERT_SUCCESS_MSG);
        } catch (Exception e) {
            result.put(DATASUCCESS, ERRORFLAG);
            result.put(DATAMESSAGE, INSERT_FAIL_MSG + e.getMessage());
        }
        return result;
    }

    @PostMapping("/deleteBatch")
    @ApiOperation(value = "根据-{系统公告附件}-对象Map批量删除记录", notes = "成功返回:{\"success\":true,\"message\",\"数据删除成功\"},失败返回:{\"success\":false,\"message\",\"数据删除失败\"}")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "body", name = "id", value = "id", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "noticeid", value = "主表外键ID", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filename", value = "文件名称", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "newfilename", value = "新文件名称", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filepath", value = "filepath", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "fileurl", value = "附件地址", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filetype", value = "文件类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filesuffix", value = "文件后缀名", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filesize", value = "文件大小 单位b", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "mimetype", value = "MIME 类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "uploadtime", value = "上传时间", required = true,  dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "businessfiletype", value = "业务附件类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "storagetype", value = "存储类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "apply_user_id", value = "上传用户id", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "apply_user", value = "上传用户", required = true,  dataTypeClass = String.class)
    })
    @OperateLog(name = "根据-{系统公告附件}-对象Map批量删除记录", value = "delete", type = "PC")
    public Map<String, Object> deleteBatchForSystemNoticeFileForWeb(HttpServletRequest request, HttpServletResponse response, @RequestBody List<Map<String, Object>> list) {
        Map<String, Object> result = new HashMap<String, Object>();
        try {

        

            systemNoticeFileService.deleteBatch(list);
            result.put(DATASUCCESS, SUCCESSFLAG);
            result.put(DATAMESSAGE, DELETE_SUCCESS_MSG);

        } catch (Exception e) {
            result.put(DATASUCCESS, ERRORFLAG);
            result.put(DATAMESSAGE, DELETE_FAIL_MSG + e.getMessage());
        }
        return result;
    }

    @PostMapping("/updateBatch")
    @ApiOperation(value = "根据-{系统公告附件}-对象Map批量更新记录", notes = "成功返回:{\"success\":true,\"message\",\"数据更新成功\"},失败返回:{\"success\":false,\"message\",\"数据更新失败\"}")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "body", name = "id", value = "id", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "noticeid", value = "主表外键ID", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filename", value = "文件名称", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "newfilename", value = "新文件名称", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filepath", value = "filepath", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "fileurl", value = "附件地址", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filetype", value = "文件类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filesuffix", value = "文件后缀名", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filesize", value = "文件大小 单位b", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "mimetype", value = "MIME 类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "uploadtime", value = "上传时间", required = true,  dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "businessfiletype", value = "业务附件类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "storagetype", value = "存储类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "apply_user_id", value = "上传用户id", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "apply_user", value = "上传用户", required = true,  dataTypeClass = String.class)
    })
    @OperateLog(name = "根据-{系统公告附件}-对象Map批量更新记录", value = "update", type = "PC")
    public Map<String, Object> updateBatchForSystemNoticeFileForWeb(HttpServletRequest request, HttpServletResponse response, @RequestBody List<Map<String, Object>> list) {
        Map<String, Object> result = new HashMap<String, Object>();
        try {


            systemNoticeFileService.updateBatch(list);
            result.put(DATASUCCESS, SUCCESSFLAG);
            result.put(DATAMESSAGE, UPDATE_SUCCESS_MSG);

        } catch (Exception e) {
            result.put(DATASUCCESS, ERRORFLAG);
            result.put(DATAMESSAGE, UPDATE_FAIL_MSG + e.getMessage());
        }
        return result;
    }

    @PostMapping("/insertBatchByNoticeIds")
    @ApiOperation(value = "根据-{系统公告附件}-对象Map批量插入记录", notes = "成功返回:{\"success\":true,\"message\",\"数据插入成功\"},失败返回:{\"success\":false,\"message\",\"数据插入失败\"}")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "body", name = "id", value = "id", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "noticeid", value = "主表外键ID", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filename", value = "文件名称", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "newfilename", value = "新文件名称", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filepath", value = "filepath", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "fileurl", value = "附件地址", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filetype", value = "文件类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filesuffix", value = "文件后缀名", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "filesize", value = "文件大小 单位b", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "mimetype", value = "MIME 类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "uploadtime", value = "上传时间", required = true,  dataTypeClass = Date.class),
            @ApiImplicitParam(paramType = "body", name = "businessfiletype", value = "业务附件类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "storagetype", value = "存储类型", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "apply_user_id", value = "上传用户id", required = true,  dataTypeClass = String.class),
            @ApiImplicitParam(paramType = "body", name = "apply_user", value = "上传用户", required = true,  dataTypeClass = String.class)
    })
    @OperateLog(name = "根据-{系统公告附件}-对象Map批量插入记录", value = "insert", type = "PC")
    public Map<String, Object> insertBatchByNoticeIdsForSystemNoticeFileForWeb(HttpServletRequest request, HttpServletResponse response, @RequestBody Map<String, Object> map) {
        Map<String, Object> result = new HashMap<String, Object>();
        try {
            Object ids = map.get("noticeids");
            if (ids == null) {
                result.put(DATASUCCESS, ERRORFLAG);
                result.put(DATAMESSAGE, "业务Id不能为空");
                return result;
            }
            JSONArray objects = JSONArray.parseArray(JSONObject.toJSONString(ids));
            List<Map<String, Object>> list = new ArrayList<>();
            Map<String, Object> parmsMap = null;
            List<String> idStr = new ArrayList<>();
            for (Object o : objects) {
                String id = UUID.randomUUID().toString().replace("-", "");
                parmsMap = new HashMap<>();
                parmsMap.putAll(map);
                parmsMap.put("noticeid", o);
                parmsMap.put("id", id);
                list.add(parmsMap);
                idStr.add(id);
            }

            if (null == list || list.size() == 0) {
                result.put(DATASUCCESS, ERRORFLAG);
                result.put(DATAMESSAGE, "业务Id不能为空");
                return result;
            }
            Map<String, Object> parmMap = new HashMap<>();
            parmMap.put("ids", idStr);
            parmMap.putAll(map);
            systemNoticeFileService.insertBatch(list);
            result.put(DATASUCCESS, SUCCESSFLAG);
            result.put(DATAMESSAGE, INSERT_SUCCESS_MSG);
            result.put(DATARECORD, parmMap);
        } catch (Exception e) {
            result.put(DATASUCCESS, ERRORFLAG);
            result.put(DATAMESSAGE, INSERT_FAIL_MSG + e.getMessage());
        }
        return result;
    }

}