|
|
|
@ -2,13 +2,16 @@ package com.dxhy.order.consumer.modules.bespoke.controller; |
|
|
|
|
|
|
|
|
|
import cn.hutool.core.date.DateUtil; |
|
|
|
|
import com.alibaba.fastjson2.JSON; |
|
|
|
|
import com.dxhy.base.common.constant.OrderManagementConstant; |
|
|
|
|
import com.dxhy.base.common.model.R; |
|
|
|
|
import com.dxhy.management.common.constant.ConfigureConstant; |
|
|
|
|
import com.dxhy.order.baseservice.annotation.SysLog; |
|
|
|
|
import com.dxhy.order.baseservice.constant.OrderValidateEnum; |
|
|
|
|
import com.dxhy.order.baseservice.utils.PageUtils; |
|
|
|
|
import com.dxhy.order.consumer.modules.bespoke.config.datasource.config.DynamicContextHolder; |
|
|
|
|
import com.dxhy.order.consumer.modules.bespoke.model.req.ReqParam; |
|
|
|
|
import com.dxhy.order.consumer.modules.bespoke.service.OrderHandleService; |
|
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
|
import io.swagger.annotations.Api; |
|
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
@ -74,5 +77,57 @@ public class OrderHandleController { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 订单列表查询 |
|
|
|
|
* |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@ApiOperation(value = "查询读入订单列表", notes = "查询读入订单列表") |
|
|
|
|
@PostMapping("/queryList") |
|
|
|
|
@SysLog(operation = "查询订单列表rest接口", operationDesc = "查询订单列表", key = "订单列表") |
|
|
|
|
public R queryList(@RequestBody ReqParam reqParam) { |
|
|
|
|
|
|
|
|
|
log.info("{}订单列表查询请求参数:{}", LOGGER_MSG, JSON.toJSONString(reqParam)); |
|
|
|
|
if (StringUtils.isNotBlank(reqParam.getStartTime()) |
|
|
|
|
&& StringUtils.isNotBlank(reqParam.getEndTime())) { |
|
|
|
|
Date starttime = DateUtil.parseDate(reqParam.getStartTime()); |
|
|
|
|
Date endtime = DateUtil.parseDate(reqParam.getEndTime()); |
|
|
|
|
if (starttime.after(endtime)) { |
|
|
|
|
log.error("{}开始时间不能大于结束时间", LOGGER_MSG); |
|
|
|
|
return R.error(OrderValidateEnum.ORDER_TIME_ERROR.getKey(), |
|
|
|
|
OrderValidateEnum.ORDER_TIME_ERROR.getMessage()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(reqParam.getReadTimeStart()) |
|
|
|
|
&& StringUtils.isNotBlank(reqParam.getReadTimeEnd())) { |
|
|
|
|
Date starttime = DateUtil.parseDate(reqParam.getReadTimeEnd()); |
|
|
|
|
Date endtime = DateUtil.parseDate(reqParam.getReadTimeEnd()); |
|
|
|
|
if (starttime.after(endtime)) { |
|
|
|
|
log.error("{}开始时间不能大于结束时间", LOGGER_MSG); |
|
|
|
|
return R.error(OrderValidateEnum.ORDER_TIME_ERROR.getKey(), |
|
|
|
|
OrderValidateEnum.ORDER_TIME_ERROR.getMessage()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (StringUtils.isBlank(reqParam.getNsrsbh())) { |
|
|
|
|
log.error("{},请求税号为空!", LOGGER_MSG); |
|
|
|
|
return R.error(OrderValidateEnum.TAXCODE_ISNULL.getKey(), OrderValidateEnum.TAXCODE_ISNULL.getMessage()); |
|
|
|
|
} |
|
|
|
|
if (StringUtils.isBlank(reqParam.getEntId())){ |
|
|
|
|
log.error("{},请求企业id为空!", LOGGER_MSG); |
|
|
|
|
return R.error(OrderValidateEnum.ENTID_ISNULL.getKey(), OrderValidateEnum.ENTID_ISNULL.getMessage()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
return orderHandleService.queryList(reqParam); |
|
|
|
|
}catch (Exception e){ |
|
|
|
|
log.error("{}查询读入订单异常", LOGGER_MSG, e); |
|
|
|
|
return R.error("查询列表异常请联系运维人员"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|