Commit b56439fd by xiaoyj

提交导出限制

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@22036 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent b17bcd7f
......@@ -39,7 +39,7 @@ public enum ResultCodeEnum {
ORDER_AFTER_SALEING_CAN_NOT_CANCEL(30013, "检修进行中不能取消订单"),
ORDER_ACTIVE_OR_CANCEL(30014, "订单被取消或已被激活"),
EXPORT_UNKOWN_OEDER_OUTOF_NUMBER(30015,"导出未知订单超过10000条请修改搜索条件"),
EXPORT_OEDER_OUTOF_NUMBER(30016,"导出订单超过10000条请修改搜索条件"),
EXPORT_OEDER_OUTOF_NUMBER(30016,"导出超过10000条请修改搜索条件"),
/**
* 渠道订单相关状态码
*/
......
......@@ -101,6 +101,9 @@ public class ReportController extends BaseReportController{
@RequestMapping(value="/exporRepertoryList",method={RequestMethod.GET, RequestMethod.POST})
public void exportIndent(HttpServletRequest request, HttpServletResponse response, Integer sortType, String name, String deviceType){
List<DeviceRepertoryReq> list = deviceRepertoryService.getRepertoryList(sortType, name, deviceType);
if(list.size()>10000){
throw SysException.create(ResultCodeEnum.EXPORT_OEDER_OUTOF_NUMBER.getCode(),ResultCodeEnum.EXPORT_OEDER_OUTOF_NUMBER.getMsg());
}
try {
exportObject(response,list,"导出库存列表");
} catch (IOException e) {
......@@ -113,6 +116,9 @@ public class ReportController extends BaseReportController{
public void exporRepertoryList(HttpServletRequest request, HttpServletResponse response,SysIndent indent){
List<IndentExport> exports=new ArrayList<>();
List<SysIndent> list=indentService.getIndentListByPage(null,indent);
if(list.size()>10000){
throw SysException.create(ResultCodeEnum.EXPORT_OEDER_OUTOF_NUMBER.getCode(),ResultCodeEnum.EXPORT_OEDER_OUTOF_NUMBER.getMsg());
}
for(SysIndent sysIndent:list){
IndentExport indentExport=new IndentExport();
BeanUtils.copyProperties(sysIndent,indentExport);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!