bug修复
This commit is contained in:
parent
60df60b520
commit
0b21f5c3f0
@ -12,21 +12,22 @@ import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.util.FileCopyUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* @Title: Controller
|
||||
* @Description: 企业文件资料
|
||||
* @author: pds
|
||||
* @date: 2020-08-07
|
||||
* @date: 2020-08-07
|
||||
* @version: V1.0
|
||||
*/
|
||||
@RestController
|
||||
@ -34,101 +35,84 @@ import java.util.Map;
|
||||
@Slf4j
|
||||
@Api(tags = "企业文件资料")
|
||||
public class CompanyFileController {
|
||||
@Autowired
|
||||
private ICompanyFileService companyFileService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询企业的文件资料记录", notes = "分页查询企业的文件资料记录")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "fileName", value = "文件名称", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "companySn", value = "企业总部sn", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"),
|
||||
})
|
||||
@PostMapping("/list")
|
||||
public Result<Map<String,Object>> selectCompanyFileList(@RequestBody Map<String, Object> map) {
|
||||
return Result.success(companyFileService.selectCompanyFileList(map));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
* @param companyFile
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "企业文件资料管理",operType = "添加企业文件资料信息",operDesc = "添加企业文件资料信息")
|
||||
@ApiOperation(value = " 添加企业文件资料信息", notes = "添加企业文件资料信息" , httpMethod="POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<CompanyFile> add(@RequestBody CompanyFile companyFile) {
|
||||
Result<CompanyFile> result = new Result<CompanyFile>();
|
||||
try {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
companyFile.setCreateTime(sdf.format(new Date()));
|
||||
companyFileService.save(companyFile);
|
||||
result.successMsg(MessageUtil.get("addSucess"));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.info(e.getMessage());
|
||||
result.error500(MessageUtil.get("failErr"));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param companyFile
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "企业文件资料管理",operType = "编辑企业文件资料信息",operDesc = "编辑企业文件资料信息")
|
||||
@ApiOperation(value = "编辑企业文件资料信息", notes = "编辑企业文件资料信息" , httpMethod="POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<CompanyFile> edit(@RequestBody CompanyFile companyFile) {
|
||||
Result<CompanyFile> result = new Result<CompanyFile>();
|
||||
CompanyFile companyFileEntity = companyFileService.getById(companyFile.getId());
|
||||
if(companyFileEntity==null) {
|
||||
result.error500(MessageUtil.get("notFindErr"));
|
||||
}else {
|
||||
boolean ok = companyFileService.updateById(companyFile);
|
||||
//TODO 返回false说明什么?
|
||||
if(ok) {
|
||||
result.successMsg(MessageUtil.get("editSucess"));
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "企业文件资料管理",operType = "删除企业文件资料信息",operDesc = "删除企业文件资料信息")
|
||||
@ApiOperation(value = "删除企业文件资料信息", notes = "删除企业文件资料信息" , httpMethod="POST")
|
||||
@ApiImplicitParam(name = "id", value = "企业文件资料ID", paramType = "query", required = true, dataType = "Integer")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<CompanyFile> delete(@RequestBody Map<String,Object> map) {
|
||||
Result<CompanyFile> result = new Result<CompanyFile>();
|
||||
CompanyFile companyFile = companyFileService.getById(MapUtils.getString(map,"id"));
|
||||
if(companyFile==null) {
|
||||
result.error500(MessageUtil.get("notFindErr"));
|
||||
}else {
|
||||
boolean ok = companyFileService.removeById(MapUtils.getString(map,"id"));
|
||||
if(ok) {
|
||||
result.successMsg(MessageUtil.get("deleteSucess"));
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
@Autowired
|
||||
private ICompanyFileService companyFileService;
|
||||
|
||||
@ApiOperation(value = "增加文件资料下载次数", notes = "增加文件资料下载次数" , httpMethod="POST")
|
||||
@ApiImplicitParam(name = "id", value = "企业文件资料ID", paramType = "query", required = true, dataType = "Integer")
|
||||
@PostMapping(value = "/updateFileDownloadNum")
|
||||
public Result updateFileDownloadNum(@RequestBody Map<String,Object> map) {
|
||||
companyFileService.updateFileDownloadNum(map);
|
||||
return Result.ok();
|
||||
}
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询企业的文件资料记录", notes = "分页查询企业的文件资料记录")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "fileName", value = "文件名称", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "companySn", value = "企业总部sn", paramType = "query", required = false, dataType = "String"),
|
||||
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"),
|
||||
})
|
||||
@PostMapping("/list")
|
||||
public Result<Map<String, Object>> selectCompanyFileList(@RequestBody Map<String, Object> map) {
|
||||
return Result.success(companyFileService.selectCompanyFileList(map));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param companyFile
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "企业文件资料管理", operType = "添加企业文件资料信息", operDesc = "添加企业文件资料信息")
|
||||
@ApiOperation(value = " 添加企业文件资料信息", notes = "添加企业文件资料信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<CompanyFile> add(@RequestBody CompanyFile companyFile) {
|
||||
companyFileService.add(companyFile);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param companyFile
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "企业文件资料管理", operType = "编辑企业文件资料信息", operDesc = "编辑企业文件资料信息")
|
||||
@ApiOperation(value = "编辑企业文件资料信息", notes = "编辑企业文件资料信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<CompanyFile> edit(@RequestBody CompanyFile companyFile) {
|
||||
companyFileService.edit(companyFile);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "企业文件资料管理", operType = "删除企业文件资料信息", operDesc = "删除企业文件资料信息")
|
||||
@ApiOperation(value = "删除企业文件资料信息", notes = "删除企业文件资料信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "企业文件资料ID", paramType = "query", required = true, dataType = "Integer")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<CompanyFile> delete(@RequestBody Map<String, Object> map) {
|
||||
Result<CompanyFile> result = new Result<CompanyFile>();
|
||||
CompanyFile companyFile = companyFileService.getById(MapUtils.getString(map, "id"));
|
||||
if (companyFile == null) {
|
||||
result.error500(MessageUtil.get("notFindErr"));
|
||||
} else {
|
||||
boolean ok = companyFileService.removeById(MapUtils.getString(map, "id"));
|
||||
if (ok) {
|
||||
result.successMsg(MessageUtil.get("deleteSucess"));
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "增加文件资料下载次数", notes = "增加文件资料下载次数", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "企业文件资料ID", paramType = "query", required = true, dataType = "Integer")
|
||||
@PostMapping(value = "/updateFileDownloadNum")
|
||||
public Result updateFileDownloadNum(@RequestBody Map<String, Object> map) {
|
||||
companyFileService.updateFileDownloadNum(map);
|
||||
return Result.ok();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,16 +1,21 @@
|
||||
package com.zhgd.xmgl.modules.basicdata.controller;
|
||||
|
||||
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.vo.UploadImageVo;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.UploadFileService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.util.FileCopyUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@ -21,7 +26,7 @@ import java.util.Map;
|
||||
* @create: 2020-02-18 13:13
|
||||
**/
|
||||
@RestController
|
||||
@RequestMapping(value = "/upload")
|
||||
@RequestMapping(value = {"/upload", "/xmgl/upload"})
|
||||
@Slf4j
|
||||
@Api(tags = "文件")
|
||||
public class UploadFileController {
|
||||
@ -69,4 +74,41 @@ public class UploadFileController {
|
||||
}
|
||||
return resultMap;
|
||||
}*/
|
||||
|
||||
/**
|
||||
* 通过http下载文件,并修改名称
|
||||
*
|
||||
* @param fileUrl 下载地址
|
||||
* @param fileName 修改名称
|
||||
* @param response 返回修改后的文件
|
||||
*/
|
||||
@RequestMapping(value = "/getRenameFile", method = RequestMethod.GET)
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "fileUrl", value = "下载地址", paramType = "query", required = true, dataType = "String"),
|
||||
@ApiImplicitParam(name = "fileName", value = "修改名称", paramType = "query", required = true, dataType = "String")
|
||||
})
|
||||
public void getRenameFile(@RequestParam("fileUrl") String fileUrl, @RequestParam("fileName") String fileName, HttpServletResponse response) {
|
||||
try {
|
||||
URL url = new URL(fileUrl);
|
||||
int index = fileUrl.indexOf("?");//第一个问号的位置
|
||||
if (index > -1) {
|
||||
fileUrl = fileUrl.substring(0, index);
|
||||
}
|
||||
String[] split = fileUrl.split("\\.");
|
||||
// 不同文件的MimeType参考后续链接
|
||||
response.setContentType("application/x-download");//下面三行是关键代码,处理乱码问题
|
||||
response.setCharacterEncoding("utf-8");
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + new String(fileName.getBytes("utf-8"), "iso8859-1") + "." + split[split.length - 1]);
|
||||
URLConnection conn = url.openConnection();
|
||||
InputStream inStream = conn.getInputStream();
|
||||
OutputStream fos = response.getOutputStream();
|
||||
// 读取路径下面的文件
|
||||
FileCopyUtils.copy(inStream, fos);
|
||||
response.getOutputStream().flush();
|
||||
response.getOutputStream().close();
|
||||
response.flushBuffer();
|
||||
} catch (Exception e) {
|
||||
log.error("err:", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,12 +8,16 @@ import java.util.Map;
|
||||
/**
|
||||
* @Description: 企业文件资料
|
||||
* @author: pds
|
||||
* @date: 2020-08-07
|
||||
* @date: 2020-08-07
|
||||
* @version: V1.0
|
||||
*/
|
||||
public interface ICompanyFileService extends IService<CompanyFile> {
|
||||
|
||||
Map<String,Object> selectCompanyFileList(Map<String, Object> map);
|
||||
Map<String, Object> selectCompanyFileList(Map<String, Object> map);
|
||||
|
||||
void updateFileDownloadNum(Map<String, Object> map);
|
||||
|
||||
void add(CompanyFile companyFile);
|
||||
|
||||
void edit(CompanyFile companyFile);
|
||||
}
|
||||
|
||||
@ -1,15 +1,24 @@
|
||||
package com.zhgd.xmgl.modules.basicdata.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.lang.UUID;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.CompanyFile;
|
||||
import com.zhgd.xmgl.modules.basicdata.mapper.CompanyFileMapper;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.ICompanyFileService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -17,7 +26,7 @@ import java.util.Map;
|
||||
/**
|
||||
* @Description: 企业文件资料
|
||||
* @author: pds
|
||||
* @date: 2020-08-07
|
||||
* @date: 2020-08-07
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@ -27,16 +36,16 @@ public class CompanyFileServiceImpl extends ServiceImpl<CompanyFileMapper, Compa
|
||||
private CompanyFileMapper companyFileMapper;
|
||||
|
||||
@Override
|
||||
public Map<String,Object> selectCompanyFileList(Map<String, Object> map) {
|
||||
Map<String,Object> data=new HashMap<>();
|
||||
public Map<String, Object> selectCompanyFileList(Map<String, Object> map) {
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
int pageNo = Integer.parseInt(map.getOrDefault("pageNo", 1).toString());
|
||||
int pageSize = Integer.parseInt(map.getOrDefault("pageSize", 10).toString());
|
||||
Page<EntityMap> page = new Page<>(pageNo, pageSize);
|
||||
List<EntityMap> list=companyFileMapper.selectCompanyFileList(page, map);
|
||||
List<EntityMap> list = companyFileMapper.selectCompanyFileList(page, map);
|
||||
page.setRecords(list);
|
||||
Map<String,Object> result=companyFileMapper.getTotleFileGroup(map);
|
||||
data.put("page",page);
|
||||
data.put("totalNum",result);
|
||||
Map<String, Object> result = companyFileMapper.getTotleFileGroup(map);
|
||||
data.put("page", page);
|
||||
data.put("totalNum", result);
|
||||
return data;
|
||||
}
|
||||
|
||||
@ -44,4 +53,36 @@ public class CompanyFileServiceImpl extends ServiceImpl<CompanyFileMapper, Compa
|
||||
public void updateFileDownloadNum(Map<String, Object> map) {
|
||||
companyFileMapper.updateFileDownloadNum(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(CompanyFile companyFile) {
|
||||
checkParam(companyFile);
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
companyFile.setCreateTime(sdf.format(new Date()));
|
||||
save(companyFile);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void edit(CompanyFile companyFile) {
|
||||
checkParamUnique(companyFile);
|
||||
//文件重命名
|
||||
updateById(companyFile);
|
||||
}
|
||||
|
||||
private void checkParamUnique(CompanyFile companyFile) {
|
||||
List<CompanyFile> list = companyFileMapper.selectList(new LambdaQueryWrapper<CompanyFile>().eq(CompanyFile::getCompanySn, companyFile.getCompanySn())
|
||||
.eq(CompanyFile::getFileName, companyFile.getFileName())
|
||||
.ne(CompanyFile::getId, companyFile.getId())
|
||||
);
|
||||
if (CollectionUtil.isNotEmpty(list)) {
|
||||
throw new OpenAlertException("该文件名已存在");
|
||||
}
|
||||
}
|
||||
|
||||
private void checkParam(CompanyFile companyFile) {
|
||||
List<CompanyFile> list = companyFileMapper.selectList(new LambdaQueryWrapper<CompanyFile>().eq(CompanyFile::getCompanySn, companyFile.getCompanySn()).eq(CompanyFile::getFileName, companyFile.getFileName()));
|
||||
if (CollectionUtil.isNotEmpty(list)) {
|
||||
throw new OpenAlertException("上传失败,该文件名已存在");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,205 @@
|
||||
package com.zhgd.xmgl.modules.led.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.xmgl.modules.led.entity.LedBigScreen;
|
||||
import com.zhgd.xmgl.modules.led.service.ILedBigScreenService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @Title: Controller
|
||||
* @Description: led大屏
|
||||
* @author: pds
|
||||
* @date: 2023-07-04
|
||||
* @version: V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/xmgl/led/ledBigScreen")
|
||||
@Slf4j
|
||||
@Api(tags = "LedBigScreenController相关Api")
|
||||
public class LedBigScreenController {
|
||||
@Autowired
|
||||
private ILedBigScreenService ledBigScreenService;
|
||||
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param ledBigScreen
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = " 分页列表查询led大屏信息", notes = "分页列表查询led大屏信息", httpMethod = "GET")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<IPage<LedBigScreen>> queryPageList(LedBigScreen ledBigScreen,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
Result<IPage<LedBigScreen>> result = new Result<IPage<LedBigScreen>>();
|
||||
QueryWrapper<LedBigScreen> queryWrapper = QueryGenerator.initQueryWrapper(ledBigScreen, req.getParameterMap());
|
||||
Page<LedBigScreen> page = new Page<LedBigScreen>(pageNo, pageSize);
|
||||
IPage<LedBigScreen> pageList = ledBigScreenService.page(page, queryWrapper);
|
||||
result.setSuccess(true);
|
||||
result.setResult(pageList);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param ledBigScreen
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = " 列表查询led大屏信息", notes = "列表查询led大屏信息", httpMethod = "GET")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<LedBigScreen>> queryList(LedBigScreen ledBigScreen,
|
||||
HttpServletRequest req) {
|
||||
|
||||
QueryWrapper<LedBigScreen> queryWrapper = QueryGenerator.initQueryWrapper(ledBigScreen, req.getParameterMap());
|
||||
return Result.success(ledBigScreenService.list(queryWrapper));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param ledBigScreen
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = " 添加led大屏信息", notes = "添加led大屏信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<LedBigScreen> add(@RequestBody LedBigScreen ledBigScreen) {
|
||||
Result<LedBigScreen> result = new Result<LedBigScreen>();
|
||||
try {
|
||||
ledBigScreenService.save(ledBigScreen);
|
||||
result.success("添加成功!");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.info(e.getMessage());
|
||||
result.error500("操作失败");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param ledBigScreen
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "编辑led大屏信息", notes = "编辑led大屏信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<LedBigScreen> edit(@RequestBody LedBigScreen ledBigScreen) {
|
||||
Result<LedBigScreen> result = new Result<LedBigScreen>();
|
||||
LedBigScreen ledBigScreenEntity = ledBigScreenService.getById(ledBigScreen.getId());
|
||||
if (ledBigScreenEntity == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
ledBigScreenService.updateById(ledBigScreen);
|
||||
result.success("修改成功!");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "删除led大屏信息", notes = "删除led大屏信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<LedBigScreen> delete(@RequestBody String id) {
|
||||
JSONObject jsonObject = JSON.parseObject(id, JSONObject.class);
|
||||
id = String.valueOf(jsonObject.get("id"));
|
||||
Result<LedBigScreen> result = new Result<LedBigScreen>();
|
||||
LedBigScreen ledBigScreen = ledBigScreenService.getById(id);
|
||||
if (ledBigScreen == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
boolean ok = ledBigScreenService.removeById(id);
|
||||
if (ok) {
|
||||
result.success("删除成功!");
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "批量删除led大屏信息", notes = "批量删除led大屏信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "led大屏ID字符串", paramType = "query", required = true, dataType = "String")
|
||||
@PostMapping(value = "/deleteBatch")
|
||||
public Result<LedBigScreen> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||
Result<LedBigScreen> result = new Result<LedBigScreen>();
|
||||
if (ids == null || "".equals(ids.trim())) {
|
||||
result.error500("参数不识别!");
|
||||
} else {
|
||||
this.ledBigScreenService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
result.success("删除成功!");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询led大屏信息", notes = "通过id查询led大屏信息", httpMethod = "GET")
|
||||
@ApiImplicitParam(name = "id", value = "led大屏ID", paramType = "query", required = true, dataType = "Integer")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<LedBigScreen> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
Result<LedBigScreen> result = new Result<LedBigScreen>();
|
||||
LedBigScreen ledBigScreen = ledBigScreenService.getById(id);
|
||||
if (ledBigScreen == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
result.setResult(ledBigScreen);
|
||||
result.setSuccess(true);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@ApiOperation(value = " 保存led大屏信息", notes = "保存led大屏信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/saveDetail")
|
||||
public Result saveDetail(@RequestBody LedBigScreen ledBigScreen) {
|
||||
ledBigScreenService.saveDetail(ledBigScreen);
|
||||
return Result.ok();
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "查询led大屏信息", notes = "查询led大屏信息", httpMethod = "GET")
|
||||
@ApiImplicitParam(name = "projectSn", value = "项目SN", paramType = "query", required = true, dataType = "String")
|
||||
@GetMapping(value = "/queryDetail")
|
||||
public Result<LedBigScreen> queryDetail(@RequestParam HashMap<String, Object> map) {
|
||||
return Result.success(ledBigScreenService.queryDetail(map));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,204 @@
|
||||
package com.zhgd.xmgl.modules.led.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.zhgd.xmgl.modules.led.entity.LedBigScreenRegion;
|
||||
import com.zhgd.xmgl.modules.led.service.ILedBigScreenRegionService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.system.query.QueryGenerator;
|
||||
import com.zhgd.jeecg.common.util.oConvertUtils;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* @Title: Controller
|
||||
* @Description: led大屏-区域
|
||||
* @author: pds
|
||||
* @date: 2023-07-04
|
||||
* @version: V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/xmgl/led/ledBigScreenRegion")
|
||||
@Slf4j
|
||||
@Api(tags = "LedBigScreenRegionController相关Api")
|
||||
public class LedBigScreenRegionController {
|
||||
@Autowired
|
||||
private ILedBigScreenRegionService ledBigScreenRegionService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param ledBigScreenRegion
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = " 分页列表查询led大屏-区域信息", notes = "分页列表查询led大屏-区域信息", httpMethod = "GET")
|
||||
@GetMapping(value = "/page")
|
||||
public Result<IPage<LedBigScreenRegion>> queryPageList(LedBigScreenRegion ledBigScreenRegion,
|
||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
Result<IPage<LedBigScreenRegion>> result = new Result<IPage<LedBigScreenRegion>>();
|
||||
QueryWrapper<LedBigScreenRegion> queryWrapper = QueryGenerator.initQueryWrapper(ledBigScreenRegion, req.getParameterMap());
|
||||
Page<LedBigScreenRegion> page = new Page<LedBigScreenRegion>(pageNo, pageSize);
|
||||
IPage<LedBigScreenRegion> pageList = ledBigScreenRegionService.page(page, queryWrapper);
|
||||
result.setSuccess(true);
|
||||
result.setResult(pageList);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param ledBigScreenRegion
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = " 列表查询led大屏-区域信息", notes = "列表查询led大屏-区域信息", httpMethod = "GET")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<List<LedBigScreenRegion>> queryList(LedBigScreenRegion ledBigScreenRegion,
|
||||
HttpServletRequest req) {
|
||||
|
||||
QueryWrapper<LedBigScreenRegion> queryWrapper = QueryGenerator.initQueryWrapper(ledBigScreenRegion, req.getParameterMap());
|
||||
return Result.success(ledBigScreenRegionService.list(queryWrapper));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param ledBigScreenRegion
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = " 添加led大屏-区域信息", notes = "添加led大屏-区域信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<LedBigScreenRegion> add(@RequestBody LedBigScreenRegion ledBigScreenRegion) {
|
||||
Result<LedBigScreenRegion> result = new Result<LedBigScreenRegion>();
|
||||
try {
|
||||
ledBigScreenRegionService.save(ledBigScreenRegion);
|
||||
result.success("添加成功!");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.info(e.getMessage());
|
||||
result.error500("操作失败");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param ledBigScreenRegion
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "编辑led大屏-区域信息", notes = "编辑led大屏-区域信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/edit")
|
||||
public Result<LedBigScreenRegion> edit(@RequestBody LedBigScreenRegion ledBigScreenRegion) {
|
||||
Result<LedBigScreenRegion> result = new Result<LedBigScreenRegion>();
|
||||
LedBigScreenRegion ledBigScreenRegionEntity = ledBigScreenRegionService.getById(ledBigScreenRegion.getId());
|
||||
if (ledBigScreenRegionEntity == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
ledBigScreenRegionService.updateById(ledBigScreenRegion);
|
||||
result.success("修改成功!");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "删除led大屏-区域信息", notes = "删除led大屏-区域信息", httpMethod = "POST")
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<LedBigScreenRegion> delete(@RequestBody String id) {
|
||||
JSONObject jsonObject = JSON.parseObject(id, JSONObject.class);
|
||||
id = String.valueOf(jsonObject.get("id"));
|
||||
Result<LedBigScreenRegion> result = new Result<LedBigScreenRegion>();
|
||||
LedBigScreenRegion ledBigScreenRegion = ledBigScreenRegionService.getById(id);
|
||||
if (ledBigScreenRegion == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
boolean ok = ledBigScreenRegionService.removeById(id);
|
||||
if (ok) {
|
||||
result.success("删除成功!");
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "批量删除led大屏-区域信息", notes = "批量删除led大屏-区域信息", httpMethod = "POST")
|
||||
@ApiImplicitParam(name = "id", value = "led大屏-区域ID字符串", paramType = "query", required = true, dataType = "String")
|
||||
@PostMapping(value = "/deleteBatch")
|
||||
public Result<LedBigScreenRegion> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||
Result<LedBigScreenRegion> result = new Result<LedBigScreenRegion>();
|
||||
if (ids == null || "".equals(ids.trim())) {
|
||||
result.error500("参数不识别!");
|
||||
} else {
|
||||
this.ledBigScreenRegionService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
result.success("删除成功!");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "通过id查询led大屏-区域信息", notes = "通过id查询led大屏-区域信息", httpMethod = "GET")
|
||||
@ApiImplicitParam(name = "id", value = "led大屏-区域ID", paramType = "query", required = true, dataType = "Integer")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<LedBigScreenRegion> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||
Result<LedBigScreenRegion> result = new Result<LedBigScreenRegion>();
|
||||
LedBigScreenRegion ledBigScreenRegion = ledBigScreenRegionService.getById(id);
|
||||
if (ledBigScreenRegion == null) {
|
||||
result.error500("未找到对应实体");
|
||||
} else {
|
||||
result.setResult(ledBigScreenRegion);
|
||||
result.setSuccess(true);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,72 @@
|
||||
package com.zhgd.xmgl.modules.led.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: led大屏
|
||||
* @author: pds
|
||||
* @date: 2023-07-04
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("led_big_screen")
|
||||
@ApiModel(value = "LedBigScreen实体类", description = "LedBigScreen")
|
||||
public class LedBigScreen implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键id")
|
||||
private java.lang.Long id;
|
||||
/**
|
||||
* 宽(px)
|
||||
*/
|
||||
@Excel(name = "宽(px)", width = 15)
|
||||
@ApiModelProperty(value = "宽(px)")
|
||||
private java.lang.Integer wide;
|
||||
/**
|
||||
* 高(px)
|
||||
*/
|
||||
@Excel(name = "高(px)", width = 15)
|
||||
@ApiModelProperty(value = "高(px)")
|
||||
private java.lang.Integer high;
|
||||
/**
|
||||
* 项目sn
|
||||
*/
|
||||
@Excel(name = "项目sn", width = 15)
|
||||
@ApiModelProperty(value = "项目sn")
|
||||
private java.lang.String projectSn;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private java.util.Date createTime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Excel(name = "更新时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private java.util.Date updateTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<LedBigScreenRegion> ledBigScreenRegions;
|
||||
}
|
||||
@ -0,0 +1,109 @@
|
||||
package com.zhgd.xmgl.modules.led.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: led大屏-区域
|
||||
* @author: pds
|
||||
* @date: 2023-07-04
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("led_big_screen_region")
|
||||
@ApiModel(value = "LedBigScreenRegion实体类", description = "LedBigScreenRegion")
|
||||
public class LedBigScreenRegion implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键id")
|
||||
private java.lang.Long id;
|
||||
/**
|
||||
* led大屏id
|
||||
*/
|
||||
@Excel(name = "led大屏id", width = 15)
|
||||
@ApiModelProperty(value = "led大屏id")
|
||||
private java.lang.Integer ledBigScreenId;
|
||||
/**
|
||||
* 区域内容
|
||||
*/
|
||||
@Excel(name = "区域内容", width = 15)
|
||||
@ApiModelProperty(value = "区域内容")
|
||||
private java.lang.Object regionContent;
|
||||
/**
|
||||
* 区域高度
|
||||
*/
|
||||
@Excel(name = "区域高度", width = 15)
|
||||
@ApiModelProperty(value = "区域高度")
|
||||
private java.lang.Integer regionHeight;
|
||||
/**
|
||||
* 区域滚动效果(1左到右2下到上3无)
|
||||
*/
|
||||
@Excel(name = "区域滚动效果(1左到右2下到上3无)", width = 15)
|
||||
@ApiModelProperty(value = "区域滚动效果(1左到右2下到上3无)")
|
||||
private java.lang.Integer regionScrollEffect;
|
||||
/**
|
||||
* 滚动时长(s)
|
||||
*/
|
||||
@Excel(name = "滚动时长(s)", width = 15)
|
||||
@ApiModelProperty(value = "滚动时长(s)")
|
||||
private java.lang.Integer scrollDuration;
|
||||
/**
|
||||
* 字号大小(px)
|
||||
*/
|
||||
@Excel(name = "字号大小(px)", width = 15)
|
||||
@ApiModelProperty(value = "字号大小(px)")
|
||||
private java.lang.Integer fontSize;
|
||||
/**
|
||||
* 数据模块(1工种情况2班组情况3考情情况)
|
||||
*/
|
||||
@Excel(name = "数据模块(1工种情况2班组情况3考情情况)", width = 15)
|
||||
@ApiModelProperty(value = "数据模块(1工种情况2班组情况3考情情况)")
|
||||
private java.lang.Integer dataModule;
|
||||
/**
|
||||
* 自定义行数
|
||||
*/
|
||||
@Excel(name = "自定义行数", width = 15)
|
||||
@ApiModelProperty(value = "自定义行数")
|
||||
private java.lang.Integer customRowNum;
|
||||
/**
|
||||
* 自定义列数
|
||||
*/
|
||||
@Excel(name = "自定义列数", width = 15)
|
||||
@ApiModelProperty(value = "自定义列数")
|
||||
private java.lang.Integer customColumnNum;
|
||||
/**
|
||||
* 项目sn
|
||||
*/
|
||||
@Excel(name = "项目sn", width = 15)
|
||||
@ApiModelProperty(value = "项目sn")
|
||||
private java.lang.String projectSn;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private java.util.Date createTime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Excel(name = "更新时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private java.util.Date updateTime;
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.zhgd.xmgl.modules.led.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.zhgd.xmgl.modules.led.entity.LedBigScreen;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: led大屏
|
||||
* @author: pds
|
||||
* @date: 2023-07-04
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface LedBigScreenMapper extends BaseMapper<LedBigScreen> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.zhgd.xmgl.modules.led.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.zhgd.xmgl.modules.led.entity.LedBigScreenRegion;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: led大屏-区域
|
||||
* @author: pds
|
||||
* @date: 2023-07-04
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface LedBigScreenRegionMapper extends BaseMapper<LedBigScreenRegion> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.led.mapper.LedBigScreenMapper">
|
||||
</mapper>
|
||||
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.led.mapper.LedBigScreenRegionMapper">
|
||||
</mapper>
|
||||
@ -0,0 +1,14 @@
|
||||
package com.zhgd.xmgl.modules.led.service;
|
||||
|
||||
import com.zhgd.xmgl.modules.led.entity.LedBigScreenRegion;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: led大屏-区域
|
||||
* @author: pds
|
||||
* @date: 2023-07-04
|
||||
* @version: V1.0
|
||||
*/
|
||||
public interface ILedBigScreenRegionService extends IService<LedBigScreenRegion> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.zhgd.xmgl.modules.led.service;
|
||||
|
||||
import com.zhgd.xmgl.modules.led.entity.LedBigScreen;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* @Description: led大屏
|
||||
* @author: pds
|
||||
* @date: 2023-07-04
|
||||
* @version: V1.0
|
||||
*/
|
||||
public interface ILedBigScreenService extends IService<LedBigScreen> {
|
||||
|
||||
LedBigScreen queryDetail(HashMap<String, Object> map);
|
||||
|
||||
void saveDetail(LedBigScreen ledBigScreen);
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.zhgd.xmgl.modules.led.service.impl;
|
||||
|
||||
import com.zhgd.xmgl.modules.led.entity.LedBigScreenRegion;
|
||||
import com.zhgd.xmgl.modules.led.mapper.LedBigScreenRegionMapper;
|
||||
import com.zhgd.xmgl.modules.led.service.ILedBigScreenRegionService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: led大屏-区域
|
||||
* @author: pds
|
||||
* @date: 2023-07-04
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class LedBigScreenRegionServiceImpl extends ServiceImpl<LedBigScreenRegionMapper, LedBigScreenRegion> implements ILedBigScreenRegionService {
|
||||
|
||||
}
|
||||
@ -0,0 +1,57 @@
|
||||
package com.zhgd.xmgl.modules.led.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||
import com.zhgd.xmgl.modules.led.entity.LedBigScreen;
|
||||
import com.zhgd.xmgl.modules.led.entity.LedBigScreenRegion;
|
||||
import com.zhgd.xmgl.modules.led.mapper.LedBigScreenMapper;
|
||||
import com.zhgd.xmgl.modules.led.mapper.LedBigScreenRegionMapper;
|
||||
import com.zhgd.xmgl.modules.led.service.ILedBigScreenService;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: led大屏
|
||||
* @author: pds
|
||||
* @date: 2023-07-04
|
||||
* @version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class LedBigScreenServiceImpl extends ServiceImpl<LedBigScreenMapper, LedBigScreen> implements ILedBigScreenService {
|
||||
@Autowired
|
||||
private LedBigScreenRegionMapper ledBigScreenRegionMapper;
|
||||
|
||||
@Override
|
||||
public LedBigScreen queryDetail(HashMap<String, Object> map) {
|
||||
String projectSn = MapUtils.getString(map, "projectSn");
|
||||
if (StrUtil.isBlank(projectSn)) {
|
||||
throw new OpenAlertException("projectSn不能为空");
|
||||
}
|
||||
LedBigScreen ledBigScreen = getOne(new LambdaQueryWrapper<LedBigScreen>().eq(LedBigScreen::getProjectSn, projectSn));
|
||||
List<LedBigScreenRegion> ledBigScreenRegions = ledBigScreenRegionMapper.selectList(new LambdaQueryWrapper<LedBigScreenRegion>().eq(LedBigScreenRegion::getProjectSn, projectSn));
|
||||
ledBigScreen.setLedBigScreenRegions(ledBigScreenRegions);
|
||||
return ledBigScreen;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveDetail(LedBigScreen ledBigScreen) {
|
||||
String projectSn = ledBigScreen.getProjectSn();
|
||||
LedBigScreen lbs = getOne(new LambdaQueryWrapper<LedBigScreen>().eq(LedBigScreen::getProjectSn, projectSn));
|
||||
if (lbs == null) {
|
||||
save(ledBigScreen);
|
||||
} else {
|
||||
updateById(ledBigScreen);
|
||||
}
|
||||
ledBigScreenRegionMapper.delete(new LambdaQueryWrapper<LedBigScreenRegion>().eq(LedBigScreenRegion::getProjectSn, projectSn));
|
||||
for (LedBigScreenRegion ledBigScreenRegion : ledBigScreen.getLedBigScreenRegions()) {
|
||||
ledBigScreenRegion.setProjectSn(projectSn);
|
||||
ledBigScreenRegionMapper.insert(ledBigScreenRegion);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2,6 +2,7 @@ package com.zhgd.xmgl.modules.project.controller;
|
||||
|
||||
import com.zhgd.jeecg.common.api.vo.Result;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.project.entity.vo.KeyNodeEarlyWarningStatisticsVo;
|
||||
import com.zhgd.xmgl.modules.project.service.PanoramaNodePlanStatisticsService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
@ -53,12 +54,12 @@ public class PanoramaNodePlanStatisticsController {
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "关键里程碑延期告警", notes = "关键里程碑延期告警")
|
||||
@ApiOperation(value = "关键里程碑延期告警(全景计划)", notes = "关键里程碑延期告警")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "sn", value = "公司sn", paramType = "query", required = true, dataType = "String"),
|
||||
})
|
||||
@PostMapping("/selectKeyNodeEarlyWarningStatistics")
|
||||
public Result<Map<String,Object>> selectKeyNodeEarlyWarningStatistics(@RequestBody Map<String, Object> map) {
|
||||
public Result<KeyNodeEarlyWarningStatisticsVo> selectKeyNodeEarlyWarningStatistics(@RequestBody Map<String, Object> map) {
|
||||
return Result.success(panoramaNodePlanStatisticsService.selectKeyNodeEarlyWarningStatistics(map));
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,20 @@
|
||||
package com.zhgd.xmgl.modules.project.entity.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class KeyNodeEarlyWarningStatisticsVo {
|
||||
@ApiModelProperty(value = "招标逾期数量")
|
||||
private Integer zbNum;
|
||||
@ApiModelProperty(value = "出图逾期数量")
|
||||
private Integer ctNum;
|
||||
@ApiModelProperty(value = "交付逾期数量")
|
||||
private Integer jfNum;
|
||||
@ApiModelProperty(value = "开工逾期数量")
|
||||
private Integer kgNum;
|
||||
@ApiModelProperty(value = "竣备逾期数量")
|
||||
private Integer jbNum;
|
||||
@ApiModelProperty(value = "预售逾期数量")
|
||||
private Integer ysNum;
|
||||
}
|
||||
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.project.entity.ProgressPanoramaNodePlan;
|
||||
import com.zhgd.xmgl.modules.project.entity.vo.KeyNodeEarlyWarningStatisticsVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@ -30,7 +31,7 @@ public interface ProgressPanoramaNodePlanMapper extends BaseMapper<ProgressPanor
|
||||
|
||||
List<Map<String, Object>> selectRegionDelayStatisticsList(Map<String, Object> map);
|
||||
|
||||
Map<String, Object> selectKeyNodeEarlyWarningStatistics(Map<String, Object> map);
|
||||
KeyNodeEarlyWarningStatisticsVo selectKeyNodeEarlyWarningStatistics(Map<String, Object> map);
|
||||
|
||||
List<Map<String, Object>> selectRegionDelayComparisonList(Map<String, Object> map);
|
||||
|
||||
|
||||
@ -175,7 +175,8 @@
|
||||
</if>
|
||||
order by totalDelayProjectNum desc
|
||||
</select>
|
||||
<select id="selectKeyNodeEarlyWarningStatistics" resultType="java.util.Map">
|
||||
<select id="selectKeyNodeEarlyWarningStatistics"
|
||||
resultType="com.zhgd.xmgl.modules.project.entity.vo.KeyNodeEarlyWarningStatisticsVo">
|
||||
select IFNULL(SUM(IFNULL(zbNum, 0)), 0) zbNum,
|
||||
IFNULL(SUM(IFNULL(ctNum, 0)), 0) ctNum,
|
||||
IFNULL(SUM(IFNULL(jfNum, 0)), 0) jfNum,
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.zhgd.xmgl.modules.project.service;
|
||||
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.project.entity.vo.KeyNodeEarlyWarningStatisticsVo;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -11,7 +12,7 @@ public interface PanoramaNodePlanStatisticsService {
|
||||
|
||||
List<Map<String,Object>> selectRegionDelayStatisticsList(Map<String, Object> map);
|
||||
|
||||
Map<String,Object> selectKeyNodeEarlyWarningStatistics(Map<String, Object> map);
|
||||
KeyNodeEarlyWarningStatisticsVo selectKeyNodeEarlyWarningStatistics(Map<String, Object> map);
|
||||
|
||||
List<Map<String, Object>> selectRegionDelayComparisonList(Map<String, Object> map);
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.zhgd.xmgl.modules.project.service.impl;
|
||||
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
package com.zhgd.xmgl.modules.project.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.zhgd.jeecg.common.mybatis.EntityMap;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.Company;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.ICompanyService;
|
||||
import com.zhgd.xmgl.modules.project.entity.vo.KeyNodeEarlyWarningStatisticsVo;
|
||||
import com.zhgd.xmgl.modules.project.mapper.ProgressPanoramaNodePlanMapper;
|
||||
import com.zhgd.xmgl.modules.project.service.PanoramaNodePlanStatisticsService;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
@ -40,13 +42,15 @@ public class PanoramaNodePlanStatisticsServiceImpl implements PanoramaNodePlanSt
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> selectKeyNodeEarlyWarningStatistics(Map<String, Object> param) {
|
||||
Map<String,Object> map=companyService.getCompanyType(param);
|
||||
return progressPanoramaNodePlanMapper.selectKeyNodeEarlyWarningStatistics(map);
|
||||
public KeyNodeEarlyWarningStatisticsVo selectKeyNodeEarlyWarningStatistics(Map<String, Object> param) {
|
||||
Map<String, Object> map = companyService.getCompanyType(param);
|
||||
KeyNodeEarlyWarningStatisticsVo vo = progressPanoramaNodePlanMapper.selectKeyNodeEarlyWarningStatistics(map);
|
||||
return vo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> selectRegionDelayComparisonList(Map<String, Object> param) {
|
||||
Map<String,Object> map=companyService.getCompanyType(param);
|
||||
Map<String, Object> map = companyService.getCompanyType(param);
|
||||
return progressPanoramaNodePlanMapper.selectRegionDelayComparisonList(map);
|
||||
}
|
||||
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhgd.xxx.mapper.sjImageProgressMapper">
|
||||
|
||||
</mapper>
|
||||
<mapper namespace="com.zhgd.led.mapper.sjImageProgressMapper">
|
||||
</mapper>
|
||||
|
||||
@ -1402,9 +1402,9 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
||||
if (list == null || list.size() == 0) {
|
||||
throw new OpenAlertException(MessageUtil.get("excelNotDataErr"));
|
||||
}
|
||||
checkParams(list);
|
||||
Map<String, Object> teamMap = teamInfoMapper.getTeamInfoMapBySn(projectSn);
|
||||
Map<String, Object> departmentMap = departmentInfoMapper.getDepartmentInfoMapBySn(projectSn);
|
||||
checkParams(list, teamMap, departmentMap);
|
||||
for (Map<String, String> importInfo : list) {
|
||||
if (CharSequenceUtil.isBlank(importInfo.get("*姓名")) && CharSequenceUtil.isBlank(importInfo.get("*身份证号码")) && CharSequenceUtil.isBlank(importInfo.get("*人员类型"))) {
|
||||
continue;
|
||||
@ -1438,23 +1438,25 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
||||
workerInfo.setLongTerm(0);
|
||||
}
|
||||
if (workerInfo.getPersonType() == 2) {
|
||||
if (!"".equals(importInfo.get("*部门(管理人员填)")) && !"#N/A".equals(importInfo.get("*部门(管理人员填)"))) {
|
||||
String department = importInfo.get("*部门/班组");
|
||||
if (!"".equals(department) && !"#N/A".equals(department)) {
|
||||
/*String depId=importInfo.get("部门ID");
|
||||
workerInfo.setDepartmentId(Integer.valueOf(depId.split("-")[1]));
|
||||
workerInfo.setEnterpriseId(Integer.valueOf(depId.split("-")[0]));*/
|
||||
if (departmentMap.containsKey(importInfo.get("*部门(管理人员填)"))) {
|
||||
Map<String, Object> map = (Map<String, Object>) departmentMap.get(importInfo.get("*部门(管理人员填)"));
|
||||
if (departmentMap.containsKey(department)) {
|
||||
Map<String, Object> map = (Map<String, Object>) departmentMap.get(department);
|
||||
workerInfo.setDepartmentId(MapUtils.getLong(map, "id"));
|
||||
workerInfo.setEnterpriseId(MapUtils.getLong(map, "enterpriseId"));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!"".equals(importInfo.get("*班组(劳务人员填)")) && !"#N/A".equals(importInfo.get("*班组(劳务人员填)"))) {
|
||||
String team = importInfo.get("*部门/班组");
|
||||
if (!"".equals(team) && !"#N/A".equals(team)) {
|
||||
/*String depId=importInfo.get("班组ID");
|
||||
workerInfo.setTeamId(Integer.valueOf(depId.split("-")[1]));
|
||||
workerInfo.setEnterpriseId(Integer.valueOf(depId.split("-")[0]));*/
|
||||
if (teamMap.containsKey(importInfo.get("*班组(劳务人员填)"))) {
|
||||
Map<String, Object> map = (Map<String, Object>) teamMap.get(importInfo.get("*班组(劳务人员填)"));
|
||||
if (teamMap.containsKey(team)) {
|
||||
Map<String, Object> map = (Map<String, Object>) teamMap.get(team);
|
||||
workerInfo.setTeamId(MapUtils.getLong(map, "id"));
|
||||
workerInfo.setEnterpriseId(MapUtils.getLong(map, "enterpriseId"));
|
||||
}
|
||||
@ -1535,15 +1537,17 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
||||
return result;
|
||||
}
|
||||
|
||||
private void checkParams(List<Map<String, String>> list) {
|
||||
private void checkParams(List<Map<String, String>> list, Map<String, Object> teamMap, Map<String, Object> departmentMap) {
|
||||
for (Map<String, String> importInfo : list) {
|
||||
if (StringUtils.isBlank(importInfo.get("*姓名"))) {
|
||||
String name = importInfo.get("*姓名");
|
||||
if (StringUtils.isBlank(name)) {
|
||||
throw new OpenAlertException("有姓名未填写");
|
||||
}
|
||||
if (StringUtils.isBlank(importInfo.get("*身份证号码"))) {
|
||||
throw new OpenAlertException("有身份证号码未填写");
|
||||
}
|
||||
if (StringUtils.isBlank(importInfo.get("*人员类型"))) {
|
||||
String personTypeStr = importInfo.get("*人员类型");
|
||||
if (StringUtils.isBlank(personTypeStr)) {
|
||||
throw new OpenAlertException("有人员类型未填写");
|
||||
}
|
||||
if (StringUtils.isBlank(importInfo.get("*民族"))) {
|
||||
@ -1567,13 +1571,14 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
|
||||
if (StringUtils.isBlank(importInfo.get("*紧急联系人电话"))) {
|
||||
throw new OpenAlertException("有紧急联系人电话未填写");
|
||||
}
|
||||
//if (StringUtils.isBlank(importInfo.get("*部门(管理人员填)"))) {
|
||||
// throw new OpenAlertException("有部门(管理人员填)未填写");
|
||||
//}
|
||||
//if (StringUtils.isBlank(importInfo.get("*班组(劳务人员填)"))) {
|
||||
// throw new OpenAlertException("有班组(劳务人员填)未填写");
|
||||
//}
|
||||
if (StringUtils.isBlank(importInfo.get("*部门/班组"))) {
|
||||
throw new OpenAlertException("有部门/班组未填写");
|
||||
}
|
||||
|
||||
String department = importInfo.get("*部门/班组");
|
||||
if ((!departmentMap.containsKey(department) && "管理人员".equals(personTypeStr)) || (!teamMap.containsKey(department)) && "劳务人员".equals(personTypeStr)) {
|
||||
throw new OpenAlertException("姓名叫" + name + "的”*部门/班组“列选择错误");
|
||||
}
|
||||
}
|
||||
|
||||
//身份证判重
|
||||
|
||||
@ -227,7 +227,8 @@ public class ExcelUtils {
|
||||
InputStream inputStream = classPathResource.getInputStream();
|
||||
XSSFWorkbook workbook = new XSSFWorkbook(inputStream);
|
||||
if (teamList.size() > 0) {
|
||||
XSSFSheet sheet2 = workbook.getSheet("班组");
|
||||
//部门/班组下拉列
|
||||
XSSFSheet sheet2 = workbook.getSheet("部门");
|
||||
for (int i = 0; i < teamList.size(); i++) {
|
||||
XSSFRow row1 = sheet2.createRow(i);
|
||||
XSSFCell cell1 = row1.createCell(0);
|
||||
@ -237,17 +238,16 @@ public class ExcelUtils {
|
||||
cell2.setCellType(CellType.STRING);
|
||||
cell2.setCellValue(MapUtils.getString(teamList.get(i), "enterpriseTeamId"));
|
||||
}
|
||||
}
|
||||
if (departmentList.size() > 0) {
|
||||
XSSFSheet sheet2 = workbook.getSheet("部门");
|
||||
for (int i = 0; i < departmentList.size(); i++) {
|
||||
XSSFRow row1 = sheet2.createRow(i);
|
||||
XSSFCell cell1 = row1.createCell(0);
|
||||
cell1.setCellType(CellType.STRING);
|
||||
cell1.setCellValue(MapUtils.getString(departmentList.get(i), "enterpriseDepartmentName"));
|
||||
XSSFCell cell2 = row1.createCell(1);
|
||||
cell2.setCellType(CellType.STRING);
|
||||
cell2.setCellValue(MapUtils.getString(departmentList.get(i), "enterpriseDepartmentId"));
|
||||
if (departmentList.size() > 0) {
|
||||
for (int i = 0; i < departmentList.size(); i++) {
|
||||
XSSFRow row1 = sheet2.createRow(i);
|
||||
XSSFCell cell1 = row1.createCell(0);
|
||||
cell1.setCellType(CellType.STRING);
|
||||
cell1.setCellValue(MapUtils.getString(departmentList.get(i), "enterpriseDepartmentName"));
|
||||
XSSFCell cell2 = row1.createCell(1);
|
||||
cell2.setCellType(CellType.STRING);
|
||||
cell2.setCellValue(MapUtils.getString(departmentList.get(i), "enterpriseDepartmentId"));
|
||||
}
|
||||
}
|
||||
}
|
||||
downLoadExcel("人员导入模板.xlsx", response, workbook);
|
||||
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user