IBIZOrderResource.java 41.6 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260
package cn.ibizlab.demoapi.rest;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSONObject;
import javax.servlet.ServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.StringUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.security.access.prepost.PostAuthorize;
import org.springframework.validation.annotation.Validated;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import cn.ibizlab.demoapi.dto.*;
import cn.ibizlab.demoapi.mapping.*;
import cn.ibizlab.core.sample.domain.IBIZOrder;
import cn.ibizlab.core.sample.service.IIBIZOrderService;
import cn.ibizlab.core.sample.filter.IBIZOrderSearchContext;
import cn.ibizlab.util.annotation.VersionCheck;

@Slf4j
@Api(tags = {"订单" })
@RestController("DemoAPI-ibizorder")
@RequestMapping("")
public class IBIZOrderResource {

    @Autowired
    public IIBIZOrderService ibizorderService;

    @Autowired
    @Lazy
    public IBIZOrderMapping ibizorderMapping;

    @PreAuthorize("hasPermission(this.ibizorderMapping.toDomain(#ibizorderdto),'DemoSys-IBIZOrder-Create')")
    @ApiOperation(value = "新建订单", tags = {"订单" },  notes = "新建订单")
	@RequestMapping(method = RequestMethod.POST, value = "/ibizorders")
    public ResponseEntity<IBIZOrderDTO> create(@Validated @RequestBody IBIZOrderDTO ibizorderdto) {
        IBIZOrder domain = ibizorderMapping.toDomain(ibizorderdto);
		ibizorderService.create(domain);
        IBIZOrderDTO dto = ibizorderMapping.toDto(domain);
		return ResponseEntity.status(HttpStatus.OK).body(dto);
    }

    @PreAuthorize("hasPermission(this.ibizorderMapping.toDomain(#ibizorderdtos),'DemoSys-IBIZOrder-Create')")
    @ApiOperation(value = "批量新建订单", tags = {"订单" },  notes = "批量新建订单")
	@RequestMapping(method = RequestMethod.POST, value = "/ibizorders/batch")
    public ResponseEntity<Boolean> createBatch(@RequestBody List<IBIZOrderDTO> ibizorderdtos) {
        ibizorderService.createBatch(ibizorderMapping.toDomain(ibizorderdtos));
        return  ResponseEntity.status(HttpStatus.OK).body(true);
    }

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-CreateTemp-all')")
    @ApiOperation(value = "CreateTemp", tags = {"订单" },  notes = "CreateTemp")
	@RequestMapping(method = RequestMethod.POST, value = "/ibizorders/{ibizorder_id}/createtemp")
    public ResponseEntity<IBIZOrderDTO> createTemp(@PathVariable("ibizorder_id") String ibizorder_id, @RequestBody IBIZOrderDTO ibizorderdto) {
        IBIZOrder domain = ibizorderMapping.toDomain(ibizorderdto);
        domain.setIbizorderid(ibizorder_id);
        domain = ibizorderService.createTemp(domain);
        ibizorderdto = ibizorderMapping.toDto(domain);
        return ResponseEntity.status(HttpStatus.OK).body(ibizorderdto);
    }

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-CreateTempMajor-all')")
    @ApiOperation(value = "CreateTempMajor", tags = {"订单" },  notes = "CreateTempMajor")
	@RequestMapping(method = RequestMethod.POST, value = "/ibizorders/{ibizorder_id}/createtempmajor")
    public ResponseEntity<IBIZOrderDTO> createTempMajor(@PathVariable("ibizorder_id") String ibizorder_id, @RequestBody IBIZOrderDTO ibizorderdto) {
        IBIZOrder domain = ibizorderMapping.toDomain(ibizorderdto);
        domain.setIbizorderid(ibizorder_id);
        domain = ibizorderService.createTempMajor(domain);
        ibizorderdto = ibizorderMapping.toDto(domain);
        return ResponseEntity.status(HttpStatus.OK).body(ibizorderdto);
    }

    @VersionCheck(entity = "ibizorder" , versionfield = "updatedate")
    @PreAuthorize("hasPermission(this.ibizorderService.get(#ibizorder_id),'DemoSys-IBIZOrder-Update')")
    @ApiOperation(value = "更新订单", tags = {"订单" },  notes = "更新订单")
	@RequestMapping(method = RequestMethod.PUT, value = "/ibizorders/{ibizorder_id}")
    public ResponseEntity<IBIZOrderDTO> update(@PathVariable("ibizorder_id") String ibizorder_id, @RequestBody IBIZOrderDTO ibizorderdto) {
		IBIZOrder domain  = ibizorderMapping.toDomain(ibizorderdto);
        domain .setIbizorderid(ibizorder_id);
		ibizorderService.update(domain );
		IBIZOrderDTO dto = ibizorderMapping.toDto(domain );
        return ResponseEntity.status(HttpStatus.OK).body(dto);
    }

    @PreAuthorize("hasPermission(this.ibizorderService.getIbizorderByEntities(this.ibizorderMapping.toDomain(#ibizorderdtos)),'DemoSys-IBIZOrder-Update')")
    @ApiOperation(value = "批量更新订单", tags = {"订单" },  notes = "批量更新订单")
	@RequestMapping(method = RequestMethod.PUT, value = "/ibizorders/batch")
    public ResponseEntity<Boolean> updateBatch(@RequestBody List<IBIZOrderDTO> ibizorderdtos) {
        ibizorderService.updateBatch(ibizorderMapping.toDomain(ibizorderdtos));
        return  ResponseEntity.status(HttpStatus.OK).body(true);
    }

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-UpdateTemp-all')")
    @ApiOperation(value = "UpdateTemp", tags = {"订单" },  notes = "UpdateTemp")
	@RequestMapping(method = RequestMethod.PUT, value = "/ibizorders/{ibizorder_id}/updatetemp")
    public ResponseEntity<IBIZOrderDTO> updateTemp(@PathVariable("ibizorder_id") String ibizorder_id, @RequestBody IBIZOrderDTO ibizorderdto) {
        IBIZOrder domain = ibizorderMapping.toDomain(ibizorderdto);
        domain.setIbizorderid(ibizorder_id);
        domain = ibizorderService.updateTemp(domain);
        ibizorderdto = ibizorderMapping.toDto(domain);
        return ResponseEntity.status(HttpStatus.OK).body(ibizorderdto);
    }

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-UpdateTempMajor-all')")
    @ApiOperation(value = "UpdateTempMajor", tags = {"订单" },  notes = "UpdateTempMajor")
	@RequestMapping(method = RequestMethod.PUT, value = "/ibizorders/{ibizorder_id}/updatetempmajor")
    public ResponseEntity<IBIZOrderDTO> updateTempMajor(@PathVariable("ibizorder_id") String ibizorder_id, @RequestBody IBIZOrderDTO ibizorderdto) {
        IBIZOrder domain = ibizorderMapping.toDomain(ibizorderdto);
        domain.setIbizorderid(ibizorder_id);
        domain = ibizorderService.updateTempMajor(domain);
        ibizorderdto = ibizorderMapping.toDto(domain);
        return ResponseEntity.status(HttpStatus.OK).body(ibizorderdto);
    }

    @PreAuthorize("hasPermission(this.ibizorderService.get(#ibizorder_id),'DemoSys-IBIZOrder-Remove')")
    @ApiOperation(value = "删除订单", tags = {"订单" },  notes = "删除订单")
	@RequestMapping(method = RequestMethod.DELETE, value = "/ibizorders/{ibizorder_id}")
    public ResponseEntity<Boolean> remove(@PathVariable("ibizorder_id") String ibizorder_id) {
         return ResponseEntity.status(HttpStatus.OK).body(ibizorderService.remove(ibizorder_id));
    }

    @PreAuthorize("hasPermission(this.ibizorderService.getIbizorderByIds(#ids),'DemoSys-IBIZOrder-Remove')")
    @ApiOperation(value = "批量删除订单", tags = {"订单" },  notes = "批量删除订单")
	@RequestMapping(method = RequestMethod.DELETE, value = "/ibizorders/batch")
    public ResponseEntity<Boolean> removeBatch(@RequestBody List<String> ids) {
        ibizorderService.removeBatch(ids);
        return  ResponseEntity.status(HttpStatus.OK).body(true);
    }

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-RemoveTemp-all')")
    @ApiOperation(value = "RemoveTemp", tags = {"订单" },  notes = "RemoveTemp")
	@RequestMapping(method = RequestMethod.DELETE, value = "/ibizorders/{ibizorder_id}/removetemp")
    public ResponseEntity<IBIZOrderDTO> removeTemp(@PathVariable("ibizorder_id") String ibizorder_id, @RequestBody IBIZOrderDTO ibizorderdto) {
        IBIZOrder domain = ibizorderMapping.toDomain(ibizorderdto);
        domain.setIbizorderid(ibizorder_id);
        domain = ibizorderService.removeTemp(domain);
        ibizorderdto = ibizorderMapping.toDto(domain);
        return ResponseEntity.status(HttpStatus.OK).body(ibizorderdto);
    }

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-RemoveTempMajor-all')")
    @ApiOperation(value = "RemoveTempMajor", tags = {"订单" },  notes = "RemoveTempMajor")
	@RequestMapping(method = RequestMethod.DELETE, value = "/ibizorders/{ibizorder_id}/removetempmajor")
    public ResponseEntity<IBIZOrderDTO> removeTempMajor(@PathVariable("ibizorder_id") String ibizorder_id, @RequestBody IBIZOrderDTO ibizorderdto) {
        IBIZOrder domain = ibizorderMapping.toDomain(ibizorderdto);
        domain.setIbizorderid(ibizorder_id);
        domain = ibizorderService.removeTempMajor(domain);
        ibizorderdto = ibizorderMapping.toDto(domain);
        return ResponseEntity.status(HttpStatus.OK).body(ibizorderdto);
    }

    @PostAuthorize("hasPermission(this.ibizorderMapping.toDomain(returnObject.body),'DemoSys-IBIZOrder-Get')")
    @ApiOperation(value = "获取订单", tags = {"订单" },  notes = "获取订单")
	@RequestMapping(method = RequestMethod.GET, value = "/ibizorders/{ibizorder_id}")
    public ResponseEntity<IBIZOrderDTO> get(@PathVariable("ibizorder_id") String ibizorder_id) {
        IBIZOrder domain = ibizorderService.get(ibizorder_id);
        IBIZOrderDTO dto = ibizorderMapping.toDto(domain);
        return ResponseEntity.status(HttpStatus.OK).body(dto);
    }

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-GetTemp-all')")
    @ApiOperation(value = "GetTemp", tags = {"订单" },  notes = "GetTemp")
	@RequestMapping(method = RequestMethod.GET, value = "/ibizorders/{ibizorder_id}/gettemp")
    public ResponseEntity<IBIZOrderDTO> getTemp(@PathVariable("ibizorder_id") String ibizorder_id, @RequestBody IBIZOrderDTO ibizorderdto) {
        IBIZOrder domain = ibizorderMapping.toDomain(ibizorderdto);
        domain.setIbizorderid(ibizorder_id);
        domain = ibizorderService.getTemp(domain);
        ibizorderdto = ibizorderMapping.toDto(domain);
        return ResponseEntity.status(HttpStatus.OK).body(ibizorderdto);
    }

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-GetTempMajor-all')")
    @ApiOperation(value = "GetTempMajor", tags = {"订单" },  notes = "GetTempMajor")
	@RequestMapping(method = RequestMethod.GET, value = "/ibizorders/{ibizorder_id}/gettempmajor")
    public ResponseEntity<IBIZOrderDTO> getTempMajor(@PathVariable("ibizorder_id") String ibizorder_id, @RequestBody IBIZOrderDTO ibizorderdto) {
        IBIZOrder domain = ibizorderMapping.toDomain(ibizorderdto);
        domain.setIbizorderid(ibizorder_id);
        domain = ibizorderService.getTempMajor(domain);
        ibizorderdto = ibizorderMapping.toDto(domain);
        return ResponseEntity.status(HttpStatus.OK).body(ibizorderdto);
    }

    @ApiOperation(value = "获取订单草稿", tags = {"订单" },  notes = "获取订单草稿")
	@RequestMapping(method = RequestMethod.GET, value = "/ibizorders/getdraft")
    public ResponseEntity<IBIZOrderDTO> getDraft() {
        return ResponseEntity.status(HttpStatus.OK).body(ibizorderMapping.toDto(ibizorderService.getDraft(new IBIZOrder())));
    }

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-GetDraftTemp-all')")
    @ApiOperation(value = "GetDraftTemp", tags = {"订单" },  notes = "GetDraftTemp")
	@RequestMapping(method = RequestMethod.GET, value = "/ibizorders/getdrafttemp")
    public ResponseEntity<IBIZOrderDTO> getDraftTemp() {
        IBIZOrder domain =new IBIZOrder();
        domain = ibizorderService.getDraftTemp(domain);
        IBIZOrderDTO ibizorderdto = ibizorderMapping.toDto(domain);
        return ResponseEntity.status(HttpStatus.OK).body(ibizorderdto);
    }

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-GetDraftTempMajor-all')")
    @ApiOperation(value = "GetDraftTempMajor", tags = {"订单" },  notes = "GetDraftTempMajor")
	@RequestMapping(method = RequestMethod.GET, value = "/ibizorders/{ibizorder_id}/getdrafttempmajor")
    public ResponseEntity<IBIZOrderDTO> getDraftTempMajor(@PathVariable("ibizorder_id") String ibizorder_id, @RequestBody IBIZOrderDTO ibizorderdto) {
        IBIZOrder domain = ibizorderMapping.toDomain(ibizorderdto);
        domain.setIbizorderid(ibizorder_id);
        domain = ibizorderService.getDraftTempMajor(domain);
        ibizorderdto = ibizorderMapping.toDto(domain);
        return ResponseEntity.status(HttpStatus.OK).body(ibizorderdto);
    }

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-BUIAction-all')")
    @ApiOperation(value = "后台界面行为", tags = {"订单" },  notes = "后台界面行为")
	@RequestMapping(method = RequestMethod.POST, value = "/ibizorders/{ibizorder_id}/buiaction")
    public ResponseEntity<IBIZOrderDTO> bUIAction(@PathVariable("ibizorder_id") String ibizorder_id, @RequestBody IBIZOrderDTO ibizorderdto) {
        IBIZOrder domain = ibizorderMapping.toDomain(ibizorderdto);
        domain.setIbizorderid(ibizorder_id);
        domain = ibizorderService.bUIAction(domain);
        ibizorderdto = ibizorderMapping.toDto(domain);
        return ResponseEntity.status(HttpStatus.OK).body(ibizorderdto);
    }

    @ApiOperation(value = "检查订单", tags = {"订单" },  notes = "检查订单")
	@RequestMapping(method = RequestMethod.POST, value = "/ibizorders/checkkey")
    public ResponseEntity<Boolean> checkKey(@RequestBody IBIZOrderDTO ibizorderdto) {
        return  ResponseEntity.status(HttpStatus.OK).body(ibizorderService.checkKey(ibizorderMapping.toDomain(ibizorderdto)));
    }

    @PreAuthorize("hasPermission(this.ibizorderMapping.toDomain(#ibizorderdto),'DemoSys-IBIZOrder-Save')")
    @ApiOperation(value = "保存订单", tags = {"订单" },  notes = "保存订单")
	@RequestMapping(method = RequestMethod.POST, value = "/ibizorders/save")
    public ResponseEntity<Boolean> save(@RequestBody IBIZOrderDTO ibizorderdto) {
        return ResponseEntity.status(HttpStatus.OK).body(ibizorderService.save(ibizorderMapping.toDomain(ibizorderdto)));
    }

    @PreAuthorize("hasPermission(this.ibizorderMapping.toDomain(#ibizorderdtos),'DemoSys-IBIZOrder-Save')")
    @ApiOperation(value = "批量保存订单", tags = {"订单" },  notes = "批量保存订单")
	@RequestMapping(method = RequestMethod.POST, value = "/ibizorders/savebatch")
    public ResponseEntity<Boolean> saveBatch(@RequestBody List<IBIZOrderDTO> ibizorderdtos) {
        ibizorderService.saveBatch(ibizorderMapping.toDomain(ibizorderdtos));
        return  ResponseEntity.status(HttpStatus.OK).body(true);
    }

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-searchCSDY-all') and hasPermission(#context,'DemoSys-IBIZOrder-Get')")
	@ApiOperation(value = "获取测试打印", tags = {"订单" } ,notes = "获取测试打印")
261
    @RequestMapping(method= RequestMethod.GET , value="/ibizorders/fetchcsdy")
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282
	public ResponseEntity<List<IBIZOrderDTO>> fetchCSDY(IBIZOrderSearchContext context) {
        Page<IBIZOrder> domains = ibizorderService.searchCSDY(context) ;
        List<IBIZOrderDTO> list = ibizorderMapping.toDto(domains.getContent());
        return ResponseEntity.status(HttpStatus.OK)
                .header("x-page", String.valueOf(context.getPageable().getPageNumber()))
                .header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
                .header("x-total", String.valueOf(domains.getTotalElements()))
                .body(list);
	}

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-searchCSDY-all') and hasPermission(#context,'DemoSys-IBIZOrder-Get')")
	@ApiOperation(value = "查询测试打印", tags = {"订单" } ,notes = "查询测试打印")
    @RequestMapping(method= RequestMethod.POST , value="/ibizorders/searchcsdy")
	public ResponseEntity<Page<IBIZOrderDTO>> searchCSDY(@RequestBody IBIZOrderSearchContext context) {
        Page<IBIZOrder> domains = ibizorderService.searchCSDY(context) ;
	    return ResponseEntity.status(HttpStatus.OK)
                .body(new PageImpl(ibizorderMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
	}

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-searchCurState30-all') and hasPermission(#context,'DemoSys-IBIZOrder-Get')")
	@ApiOperation(value = "获取当前用户已审核", tags = {"订单" } ,notes = "获取当前用户已审核")
283
    @RequestMapping(method= RequestMethod.GET , value="/ibizorders/fetchcurstate30")
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304
	public ResponseEntity<List<IBIZOrderDTO>> fetchCurState30(IBIZOrderSearchContext context) {
        Page<IBIZOrder> domains = ibizorderService.searchCurState30(context) ;
        List<IBIZOrderDTO> list = ibizorderMapping.toDto(domains.getContent());
        return ResponseEntity.status(HttpStatus.OK)
                .header("x-page", String.valueOf(context.getPageable().getPageNumber()))
                .header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
                .header("x-total", String.valueOf(domains.getTotalElements()))
                .body(list);
	}

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-searchCurState30-all') and hasPermission(#context,'DemoSys-IBIZOrder-Get')")
	@ApiOperation(value = "查询当前用户已审核", tags = {"订单" } ,notes = "查询当前用户已审核")
    @RequestMapping(method= RequestMethod.POST , value="/ibizorders/searchcurstate30")
	public ResponseEntity<Page<IBIZOrderDTO>> searchCurState30(@RequestBody IBIZOrderSearchContext context) {
        Page<IBIZOrder> domains = ibizorderService.searchCurState30(context) ;
	    return ResponseEntity.status(HttpStatus.OK)
                .body(new PageImpl(ibizorderMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
	}

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-searchDDJETJBB-all') and hasPermission(#context,'DemoSys-IBIZOrder-Get')")
	@ApiOperation(value = "获取订单金额统计报表", tags = {"订单" } ,notes = "获取订单金额统计报表")
305
    @RequestMapping(method= RequestMethod.GET , value="/ibizorders/fetchddjetjbb")
306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326
	public ResponseEntity<List<IBIZOrderDTO>> fetchDDJETJBB(IBIZOrderSearchContext context) {
        Page<IBIZOrder> domains = ibizorderService.searchDDJETJBB(context) ;
        List<IBIZOrderDTO> list = ibizorderMapping.toDto(domains.getContent());
        return ResponseEntity.status(HttpStatus.OK)
                .header("x-page", String.valueOf(context.getPageable().getPageNumber()))
                .header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
                .header("x-total", String.valueOf(domains.getTotalElements()))
                .body(list);
	}

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-searchDDJETJBB-all') and hasPermission(#context,'DemoSys-IBIZOrder-Get')")
	@ApiOperation(value = "查询订单金额统计报表", tags = {"订单" } ,notes = "查询订单金额统计报表")
    @RequestMapping(method= RequestMethod.POST , value="/ibizorders/searchddjetjbb")
	public ResponseEntity<Page<IBIZOrderDTO>> searchDDJETJBB(@RequestBody IBIZOrderSearchContext context) {
        Page<IBIZOrder> domains = ibizorderService.searchDDJETJBB(context) ;
	    return ResponseEntity.status(HttpStatus.OK)
                .body(new PageImpl(ibizorderMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
	}

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-searchDDReport-all') and hasPermission(#context,'DemoSys-IBIZOrder-Get')")
	@ApiOperation(value = "获取订单报表打印", tags = {"订单" } ,notes = "获取订单报表打印")
327
    @RequestMapping(method= RequestMethod.GET , value="/ibizorders/fetchddreport")
328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348
	public ResponseEntity<List<IBIZOrderDTO>> fetchDDReport(IBIZOrderSearchContext context) {
        Page<IBIZOrder> domains = ibizorderService.searchDDReport(context) ;
        List<IBIZOrderDTO> list = ibizorderMapping.toDto(domains.getContent());
        return ResponseEntity.status(HttpStatus.OK)
                .header("x-page", String.valueOf(context.getPageable().getPageNumber()))
                .header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
                .header("x-total", String.valueOf(domains.getTotalElements()))
                .body(list);
	}

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-searchDDReport-all') and hasPermission(#context,'DemoSys-IBIZOrder-Get')")
	@ApiOperation(value = "查询订单报表打印", tags = {"订单" } ,notes = "查询订单报表打印")
    @RequestMapping(method= RequestMethod.POST , value="/ibizorders/searchddreport")
	public ResponseEntity<Page<IBIZOrderDTO>> searchDDReport(@RequestBody IBIZOrderSearchContext context) {
        Page<IBIZOrder> domains = ibizorderService.searchDDReport(context) ;
	    return ResponseEntity.status(HttpStatus.OK)
                .body(new PageImpl(ibizorderMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
	}

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-searchDYDDMXSJY-all') and hasPermission(#context,'DemoSys-IBIZOrder-Get')")
	@ApiOperation(value = "获取打印订单明细数据源", tags = {"订单" } ,notes = "获取打印订单明细数据源")
349
    @RequestMapping(method= RequestMethod.GET , value="/ibizorders/fetchdyddmxsjy")
350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370
	public ResponseEntity<List<IBIZOrderDTO>> fetchDYDDMXSJY(IBIZOrderSearchContext context) {
        Page<IBIZOrder> domains = ibizorderService.searchDYDDMXSJY(context) ;
        List<IBIZOrderDTO> list = ibizorderMapping.toDto(domains.getContent());
        return ResponseEntity.status(HttpStatus.OK)
                .header("x-page", String.valueOf(context.getPageable().getPageNumber()))
                .header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
                .header("x-total", String.valueOf(domains.getTotalElements()))
                .body(list);
	}

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-searchDYDDMXSJY-all') and hasPermission(#context,'DemoSys-IBIZOrder-Get')")
	@ApiOperation(value = "查询打印订单明细数据源", tags = {"订单" } ,notes = "查询打印订单明细数据源")
    @RequestMapping(method= RequestMethod.POST , value="/ibizorders/searchdyddmxsjy")
	public ResponseEntity<Page<IBIZOrderDTO>> searchDYDDMXSJY(@RequestBody IBIZOrderSearchContext context) {
        Page<IBIZOrder> domains = ibizorderService.searchDYDDMXSJY(context) ;
	    return ResponseEntity.status(HttpStatus.OK)
                .body(new PageImpl(ibizorderMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
	}

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-searchDefault-all') and hasPermission(#context,'DemoSys-IBIZOrder-Get')")
	@ApiOperation(value = "获取DEFAULT", tags = {"订单" } ,notes = "获取DEFAULT")
371
    @RequestMapping(method= RequestMethod.GET , value="/ibizorders/fetchdefault")
372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392
	public ResponseEntity<List<IBIZOrderDTO>> fetchDefault(IBIZOrderSearchContext context) {
        Page<IBIZOrder> domains = ibizorderService.searchDefault(context) ;
        List<IBIZOrderDTO> list = ibizorderMapping.toDto(domains.getContent());
        return ResponseEntity.status(HttpStatus.OK)
                .header("x-page", String.valueOf(context.getPageable().getPageNumber()))
                .header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
                .header("x-total", String.valueOf(domains.getTotalElements()))
                .body(list);
	}

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-searchDefault-all') and hasPermission(#context,'DemoSys-IBIZOrder-Get')")
	@ApiOperation(value = "查询DEFAULT", tags = {"订单" } ,notes = "查询DEFAULT")
    @RequestMapping(method= RequestMethod.POST , value="/ibizorders/searchdefault")
	public ResponseEntity<Page<IBIZOrderDTO>> searchDefault(@RequestBody IBIZOrderSearchContext context) {
        Page<IBIZOrder> domains = ibizorderService.searchDefault(context) ;
	    return ResponseEntity.status(HttpStatus.OK)
                .body(new PageImpl(ibizorderMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
	}

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-searchEchartsDefaultDataSource-all') and hasPermission(#context,'DemoSys-IBIZOrder-Get')")
	@ApiOperation(value = "获取图表默认数据源", tags = {"订单" } ,notes = "获取图表默认数据源")
393
    @RequestMapping(method= RequestMethod.GET , value="/ibizorders/fetchechartsdefaultdatasource")
394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414
	public ResponseEntity<List<IBIZOrderDTO>> fetchEchartsDefaultDataSource(IBIZOrderSearchContext context) {
        Page<IBIZOrder> domains = ibizorderService.searchEchartsDefaultDataSource(context) ;
        List<IBIZOrderDTO> list = ibizorderMapping.toDto(domains.getContent());
        return ResponseEntity.status(HttpStatus.OK)
                .header("x-page", String.valueOf(context.getPageable().getPageNumber()))
                .header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
                .header("x-total", String.valueOf(domains.getTotalElements()))
                .body(list);
	}

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-searchEchartsDefaultDataSource-all') and hasPermission(#context,'DemoSys-IBIZOrder-Get')")
	@ApiOperation(value = "查询图表默认数据源", tags = {"订单" } ,notes = "查询图表默认数据源")
    @RequestMapping(method= RequestMethod.POST , value="/ibizorders/searchechartsdefaultdatasource")
	public ResponseEntity<Page<IBIZOrderDTO>> searchEchartsDefaultDataSource(@RequestBody IBIZOrderSearchContext context) {
        Page<IBIZOrder> domains = ibizorderService.searchEchartsDefaultDataSource(context) ;
	    return ResponseEntity.status(HttpStatus.OK)
                .body(new PageImpl(ibizorderMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
	}

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-searchGaugeDataSource-all') and hasPermission(#context,'DemoSys-IBIZOrder-Get')")
	@ApiOperation(value = "获取仪表盘数据源", tags = {"订单" } ,notes = "获取仪表盘数据源")
415
    @RequestMapping(method= RequestMethod.GET , value="/ibizorders/fetchgaugedatasource")
416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436
	public ResponseEntity<List<IBIZOrderDTO>> fetchGaugeDataSource(IBIZOrderSearchContext context) {
        Page<IBIZOrder> domains = ibizorderService.searchGaugeDataSource(context) ;
        List<IBIZOrderDTO> list = ibizorderMapping.toDto(domains.getContent());
        return ResponseEntity.status(HttpStatus.OK)
                .header("x-page", String.valueOf(context.getPageable().getPageNumber()))
                .header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
                .header("x-total", String.valueOf(domains.getTotalElements()))
                .body(list);
	}

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-searchGaugeDataSource-all') and hasPermission(#context,'DemoSys-IBIZOrder-Get')")
	@ApiOperation(value = "查询仪表盘数据源", tags = {"订单" } ,notes = "查询仪表盘数据源")
    @RequestMapping(method= RequestMethod.POST , value="/ibizorders/searchgaugedatasource")
	public ResponseEntity<Page<IBIZOrderDTO>> searchGaugeDataSource(@RequestBody IBIZOrderSearchContext context) {
        Page<IBIZOrder> domains = ibizorderService.searchGaugeDataSource(context) ;
	    return ResponseEntity.status(HttpStatus.OK)
                .body(new PageImpl(ibizorderMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
	}

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-searchGaugeDataSourceByTime-all') and hasPermission(#context,'DemoSys-IBIZOrder-Get')")
	@ApiOperation(value = "获取仪表数据源(时间)", tags = {"订单" } ,notes = "获取仪表数据源(时间)")
437
    @RequestMapping(method= RequestMethod.GET , value="/ibizorders/fetchgaugedatasourcebytime")
438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458
	public ResponseEntity<List<IBIZOrderDTO>> fetchGaugeDataSourceByTime(IBIZOrderSearchContext context) {
        Page<IBIZOrder> domains = ibizorderService.searchGaugeDataSourceByTime(context) ;
        List<IBIZOrderDTO> list = ibizorderMapping.toDto(domains.getContent());
        return ResponseEntity.status(HttpStatus.OK)
                .header("x-page", String.valueOf(context.getPageable().getPageNumber()))
                .header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
                .header("x-total", String.valueOf(domains.getTotalElements()))
                .body(list);
	}

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-searchGaugeDataSourceByTime-all') and hasPermission(#context,'DemoSys-IBIZOrder-Get')")
	@ApiOperation(value = "查询仪表数据源(时间)", tags = {"订单" } ,notes = "查询仪表数据源(时间)")
    @RequestMapping(method= RequestMethod.POST , value="/ibizorders/searchgaugedatasourcebytime")
	public ResponseEntity<Page<IBIZOrderDTO>> searchGaugeDataSourceByTime(@RequestBody IBIZOrderSearchContext context) {
        Page<IBIZOrder> domains = ibizorderService.searchGaugeDataSourceByTime(context) ;
	    return ResponseEntity.status(HttpStatus.OK)
                .body(new PageImpl(ibizorderMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
	}

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-searchLOGIC_22-all') and hasPermission(#context,'DemoSys-IBIZOrder-Get')")
	@ApiOperation(value = "获取当前用户审核通过与全部取消", tags = {"订单" } ,notes = "获取当前用户审核通过与全部取消")
459
    @RequestMapping(method= RequestMethod.GET , value="/ibizorders/fetchlogic_22")
460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480
	public ResponseEntity<List<IBIZOrderDTO>> fetchLOGIC_22(IBIZOrderSearchContext context) {
        Page<IBIZOrder> domains = ibizorderService.searchLOGIC_22(context) ;
        List<IBIZOrderDTO> list = ibizorderMapping.toDto(domains.getContent());
        return ResponseEntity.status(HttpStatus.OK)
                .header("x-page", String.valueOf(context.getPageable().getPageNumber()))
                .header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
                .header("x-total", String.valueOf(domains.getTotalElements()))
                .body(list);
	}

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-searchLOGIC_22-all') and hasPermission(#context,'DemoSys-IBIZOrder-Get')")
	@ApiOperation(value = "查询当前用户审核通过与全部取消", tags = {"订单" } ,notes = "查询当前用户审核通过与全部取消")
    @RequestMapping(method= RequestMethod.POST , value="/ibizorders/searchlogic_22")
	public ResponseEntity<Page<IBIZOrderDTO>> searchLOGIC_22(@RequestBody IBIZOrderSearchContext context) {
        Page<IBIZOrder> domains = ibizorderService.searchLOGIC_22(context) ;
	    return ResponseEntity.status(HttpStatus.OK)
                .body(new PageImpl(ibizorderMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
	}

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-searchRadarDataSource-all') and hasPermission(#context,'DemoSys-IBIZOrder-Get')")
	@ApiOperation(value = "获取雷达图数据源", tags = {"订单" } ,notes = "获取雷达图数据源")
481
    @RequestMapping(method= RequestMethod.GET , value="/ibizorders/fetchradardatasource")
482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502
	public ResponseEntity<List<IBIZOrderDTO>> fetchRadarDataSource(IBIZOrderSearchContext context) {
        Page<IBIZOrder> domains = ibizorderService.searchRadarDataSource(context) ;
        List<IBIZOrderDTO> list = ibizorderMapping.toDto(domains.getContent());
        return ResponseEntity.status(HttpStatus.OK)
                .header("x-page", String.valueOf(context.getPageable().getPageNumber()))
                .header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
                .header("x-total", String.valueOf(domains.getTotalElements()))
                .body(list);
	}

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-searchRadarDataSource-all') and hasPermission(#context,'DemoSys-IBIZOrder-Get')")
	@ApiOperation(value = "查询雷达图数据源", tags = {"订单" } ,notes = "查询雷达图数据源")
    @RequestMapping(method= RequestMethod.POST , value="/ibizorders/searchradardatasource")
	public ResponseEntity<Page<IBIZOrderDTO>> searchRadarDataSource(@RequestBody IBIZOrderSearchContext context) {
        Page<IBIZOrder> domains = ibizorderService.searchRadarDataSource(context) ;
	    return ResponseEntity.status(HttpStatus.OK)
                .body(new PageImpl(ibizorderMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
	}

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-searchSHZOrder-all') and hasPermission(#context,'DemoSys-IBIZOrder-Get')")
	@ApiOperation(value = "获取审核中订单", tags = {"订单" } ,notes = "获取审核中订单")
503
    @RequestMapping(method= RequestMethod.GET , value="/ibizorders/fetchshzorder")
504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524
	public ResponseEntity<List<IBIZOrderDTO>> fetchSHZOrder(IBIZOrderSearchContext context) {
        Page<IBIZOrder> domains = ibizorderService.searchSHZOrder(context) ;
        List<IBIZOrderDTO> list = ibizorderMapping.toDto(domains.getContent());
        return ResponseEntity.status(HttpStatus.OK)
                .header("x-page", String.valueOf(context.getPageable().getPageNumber()))
                .header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
                .header("x-total", String.valueOf(domains.getTotalElements()))
                .body(list);
	}

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-searchSHZOrder-all') and hasPermission(#context,'DemoSys-IBIZOrder-Get')")
	@ApiOperation(value = "查询审核中订单", tags = {"订单" } ,notes = "查询审核中订单")
    @RequestMapping(method= RequestMethod.POST , value="/ibizorders/searchshzorder")
	public ResponseEntity<Page<IBIZOrderDTO>> searchSHZOrder(@RequestBody IBIZOrderSearchContext context) {
        Page<IBIZOrder> domains = ibizorderService.searchSHZOrder(context) ;
	    return ResponseEntity.status(HttpStatus.OK)
                .body(new PageImpl(ibizorderMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
	}

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-searchState10-all') and hasPermission(#context,'DemoSys-IBIZOrder-Get')")
	@ApiOperation(value = "获取订单状态10", tags = {"订单" } ,notes = "获取订单状态10")
525
    @RequestMapping(method= RequestMethod.GET , value="/ibizorders/fetchstate10")
526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546
	public ResponseEntity<List<IBIZOrderDTO>> fetchState10(IBIZOrderSearchContext context) {
        Page<IBIZOrder> domains = ibizorderService.searchState10(context) ;
        List<IBIZOrderDTO> list = ibizorderMapping.toDto(domains.getContent());
        return ResponseEntity.status(HttpStatus.OK)
                .header("x-page", String.valueOf(context.getPageable().getPageNumber()))
                .header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
                .header("x-total", String.valueOf(domains.getTotalElements()))
                .body(list);
	}

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-searchState10-all') and hasPermission(#context,'DemoSys-IBIZOrder-Get')")
	@ApiOperation(value = "查询订单状态10", tags = {"订单" } ,notes = "查询订单状态10")
    @RequestMapping(method= RequestMethod.POST , value="/ibizorders/searchstate10")
	public ResponseEntity<Page<IBIZOrderDTO>> searchState10(@RequestBody IBIZOrderSearchContext context) {
        Page<IBIZOrder> domains = ibizorderService.searchState10(context) ;
	    return ResponseEntity.status(HttpStatus.OK)
                .body(new PageImpl(ibizorderMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
	}

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-searchState30-all') and hasPermission(#context,'DemoSys-IBIZOrder-Get')")
	@ApiOperation(value = "获取订单状态30", tags = {"订单" } ,notes = "获取订单状态30")
547
    @RequestMapping(method= RequestMethod.GET , value="/ibizorders/fetchstate30")
548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568
	public ResponseEntity<List<IBIZOrderDTO>> fetchState30(IBIZOrderSearchContext context) {
        Page<IBIZOrder> domains = ibizorderService.searchState30(context) ;
        List<IBIZOrderDTO> list = ibizorderMapping.toDto(domains.getContent());
        return ResponseEntity.status(HttpStatus.OK)
                .header("x-page", String.valueOf(context.getPageable().getPageNumber()))
                .header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
                .header("x-total", String.valueOf(domains.getTotalElements()))
                .body(list);
	}

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-searchState30-all') and hasPermission(#context,'DemoSys-IBIZOrder-Get')")
	@ApiOperation(value = "查询订单状态30", tags = {"订单" } ,notes = "查询订单状态30")
    @RequestMapping(method= RequestMethod.POST , value="/ibizorders/searchstate30")
	public ResponseEntity<Page<IBIZOrderDTO>> searchState30(@RequestBody IBIZOrderSearchContext context) {
        Page<IBIZOrder> domains = ibizorderService.searchState30(context) ;
	    return ResponseEntity.status(HttpStatus.OK)
                .body(new PageImpl(ibizorderMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
	}

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-searchState40-all') and hasPermission(#context,'DemoSys-IBIZOrder-Get')")
	@ApiOperation(value = "获取订单状态40", tags = {"订单" } ,notes = "获取订单状态40")
569
    @RequestMapping(method= RequestMethod.GET , value="/ibizorders/fetchstate40")
570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590
	public ResponseEntity<List<IBIZOrderDTO>> fetchState40(IBIZOrderSearchContext context) {
        Page<IBIZOrder> domains = ibizorderService.searchState40(context) ;
        List<IBIZOrderDTO> list = ibizorderMapping.toDto(domains.getContent());
        return ResponseEntity.status(HttpStatus.OK)
                .header("x-page", String.valueOf(context.getPageable().getPageNumber()))
                .header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
                .header("x-total", String.valueOf(domains.getTotalElements()))
                .body(list);
	}

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-searchState40-all') and hasPermission(#context,'DemoSys-IBIZOrder-Get')")
	@ApiOperation(value = "查询订单状态40", tags = {"订单" } ,notes = "查询订单状态40")
    @RequestMapping(method= RequestMethod.POST , value="/ibizorders/searchstate40")
	public ResponseEntity<Page<IBIZOrderDTO>> searchState40(@RequestBody IBIZOrderSearchContext context) {
        Page<IBIZOrder> domains = ibizorderService.searchState40(context) ;
	    return ResponseEntity.status(HttpStatus.OK)
                .body(new PageImpl(ibizorderMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
	}

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-searchXECX-all') and hasPermission(#context,'DemoSys-IBIZOrder-Get')")
	@ApiOperation(value = "获取小额查询", tags = {"订单" } ,notes = "获取小额查询")
591
    @RequestMapping(method= RequestMethod.GET , value="/ibizorders/fetchxecx")
592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631
	public ResponseEntity<List<IBIZOrderDTO>> fetchXECX(IBIZOrderSearchContext context) {
        Page<IBIZOrder> domains = ibizorderService.searchXECX(context) ;
        List<IBIZOrderDTO> list = ibizorderMapping.toDto(domains.getContent());
        return ResponseEntity.status(HttpStatus.OK)
                .header("x-page", String.valueOf(context.getPageable().getPageNumber()))
                .header("x-per-page", String.valueOf(context.getPageable().getPageSize()))
                .header("x-total", String.valueOf(domains.getTotalElements()))
                .body(list);
	}

    @PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZOrder-searchXECX-all') and hasPermission(#context,'DemoSys-IBIZOrder-Get')")
	@ApiOperation(value = "查询小额查询", tags = {"订单" } ,notes = "查询小额查询")
    @RequestMapping(method= RequestMethod.POST , value="/ibizorders/searchxecx")
	public ResponseEntity<Page<IBIZOrderDTO>> searchXECX(@RequestBody IBIZOrderSearchContext context) {
        Page<IBIZOrder> domains = ibizorderService.searchXECX(context) ;
	    return ResponseEntity.status(HttpStatus.OK)
                .body(new PageImpl(ibizorderMapping.toDto(domains.getContent()), context.getPageable(), domains.getTotalElements()));
	}


    @Autowired
    cn.ibizlab.core.sample.mapping.IBIZOrderImport importImpMapping;

    @RequestMapping(method = RequestMethod.POST, value = "/ibizorders/import")
    public ResponseEntity<JSONObject> importData(@RequestParam(value = "config") String config , @RequestBody List<IBIZOrder> dtos){
        JSONObject rs=new JSONObject();
        if(dtos.size()==0){
            rs.put("rst", 1);
            rs.put("msg", "未传入内容");
            return ResponseEntity.status(HttpStatus.NO_CONTENT).body(rs);
        }
        else{
            if("Import".equals(config)){
                rs=ibizorderService.importData(importImpMapping.toDomain(dtos),1000,false);
            }
            return ResponseEntity.status(HttpStatus.OK).body(rs);
        }
    }
}