|
|
|
@ -6,9 +6,12 @@ import com.glxp.api.annotation.Log;
|
|
|
|
|
import com.glxp.api.common.res.BaseResponse;
|
|
|
|
|
import com.glxp.api.common.util.ResultVOUtils;
|
|
|
|
|
import com.glxp.api.constant.BusinessType;
|
|
|
|
|
import com.glxp.api.entity.inout.IoOrderDetailCodeEntity;
|
|
|
|
|
import com.glxp.api.entity.inout.IoOrderInvoiceEntity;
|
|
|
|
|
import com.glxp.api.req.inout.IoOrderInvoiceRequest;
|
|
|
|
|
import com.glxp.api.req.inout.RefreshInoiceRequest;
|
|
|
|
|
import com.glxp.api.res.inout.RefreshInoiceResponse;
|
|
|
|
|
import com.glxp.api.service.inout.IoOrderDetailCodeService;
|
|
|
|
|
import com.glxp.api.service.inout.IoOrderInvoiceService;
|
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
@ -23,6 +26,8 @@ public class IoOrderInvoiceController {
|
|
|
|
|
@Resource
|
|
|
|
|
IoOrderInvoiceService ioOrderInvoiceService;
|
|
|
|
|
RefreshInoiceRequest refreshInoiceRequest;
|
|
|
|
|
@Resource
|
|
|
|
|
IoOrderDetailCodeService orderDetailCodeService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@AuthRuleAnnotation("")
|
|
|
|
@ -33,8 +38,13 @@ public class IoOrderInvoiceController {
|
|
|
|
|
IoOrderInvoiceRequest orderInvoiceRequest = new IoOrderInvoiceRequest();
|
|
|
|
|
BeanUtils.copyProperties(refreshInoiceRequest, orderInvoiceRequest);
|
|
|
|
|
List<IoOrderInvoiceEntity> orderInvoiceEntities = ioOrderInvoiceService.selectOrderInvoice(orderInvoiceRequest);
|
|
|
|
|
List<IoOrderDetailCodeEntity> orderDetailCodeEntities = orderDetailCodeService.findByOrderId(orderInvoiceRequest.getOrderIdFk());
|
|
|
|
|
|
|
|
|
|
RefreshInoiceResponse response = new RefreshInoiceResponse();
|
|
|
|
|
response.setOrderInvoiceEntities(orderInvoiceEntities);
|
|
|
|
|
response.setOrderDetailCodeEntities(orderDetailCodeEntities);
|
|
|
|
|
if (CollUtil.isEmpty(orderInvoiceEntities))
|
|
|
|
|
return ResultVOUtils.error(500, "查无发票信息!");
|
|
|
|
|
return ResultVOUtils.success(orderInvoiceEntities);
|
|
|
|
|
return ResultVOUtils.success(response);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|