导出工具类,以及代码优化
This commit is contained in:
parent
8a692ad86a
commit
0ed861468d
|
|
@ -6,6 +6,7 @@ import com.bonus.imgTool.imageUpload.dto.SafetyMeasuresReqVo;
|
|||
import com.bonus.imgTool.imageUpload.dto.SafetyMeasuresVo;
|
||||
import com.bonus.imgTool.imageUpload.service.SafetyMeasuresService;
|
||||
import com.bonus.imgTool.system.vo.EncryptedReq;
|
||||
import com.bonus.imgTool.utils.ExcelUtil;
|
||||
import com.bonus.imgTool.utils.ServerResponse;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
|
|
@ -13,6 +14,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 安全措施落实
|
||||
|
|
@ -84,4 +87,19 @@ public class SafetyMeasuresController {
|
|||
public ServerResponse getSafetyMeasuresById(EncryptedReq<SafetyMeasuresReqVo> data) {
|
||||
return safetyMeasuresService.getSafetyMeasuresById(data.getData());
|
||||
}
|
||||
|
||||
/**
|
||||
* 安全措施落实导出
|
||||
* @param data
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/safetyMeasuresExport")
|
||||
@DecryptAndVerify(decryptedClass = SafetyMeasuresReqVo.class)
|
||||
@LogAnnotation(operModul = "安全措施落实-导出", operation = "查询照片", operDesc = "系统级事件",operType="导出")
|
||||
public void safetyMeasuresExport(HttpServletResponse response, EncryptedReq<SafetyMeasuresReqVo> data) {
|
||||
|
||||
List<SafetyMeasuresVo> safetyMeasuresList = (List<SafetyMeasuresVo>) safetyMeasuresService.getSafetyMeasuresList(data.getData()).getData();
|
||||
ExcelUtil<SafetyMeasuresVo> util = new ExcelUtil<SafetyMeasuresVo>(SafetyMeasuresVo.class);
|
||||
util.exportExcel(response, safetyMeasuresList, "安全措施落实");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue