|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package com.glxp.api.controller.inout;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
|
import com.glxp.api.annotation.AuthRuleAnnotation;
|
|
|
|
@ -11,10 +12,7 @@ import com.glxp.api.dao.inout.IoOrderInvoiceMapper;
|
|
|
|
|
import com.glxp.api.entity.inout.IoOrderInvoiceEntity;
|
|
|
|
|
import com.glxp.api.http.sync.SpGetHttpClient;
|
|
|
|
|
import com.glxp.api.idc.service.FileService;
|
|
|
|
|
import com.glxp.api.req.inout.AddBizProductReqeust;
|
|
|
|
|
import com.glxp.api.req.inout.RefreshInoiceRequest;
|
|
|
|
|
import com.glxp.api.service.inout.IoOrderInvoiceService;
|
|
|
|
|
import com.glxp.api.service.inout.IoOrderService;
|
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
@ -36,9 +34,9 @@ public class IoOrderInvoiceController {
|
|
|
|
|
@PostMapping("/udiwms/inout/order/refrshInvoice")
|
|
|
|
|
@Log(title = "发票", businessType = BusinessType.INSERT)
|
|
|
|
|
public BaseResponse addBizProduct(@RequestBody RefreshInoiceRequest refreshInoiceRequest) {
|
|
|
|
|
BaseResponse<List<IoOrderInvoiceEntity>> baseResponse = spGetHttpClient.getIoOrderInvoices(refreshInoiceRequest);
|
|
|
|
|
BaseResponse baseResponse = spGetHttpClient.getIoOrderInvoices(refreshInoiceRequest);
|
|
|
|
|
if (baseResponse.getCode() == 20000) {
|
|
|
|
|
List<IoOrderInvoiceEntity> orderInvoiceEntities = baseResponse.getData();
|
|
|
|
|
List<IoOrderInvoiceEntity> orderInvoiceEntities = BeanUtil.toBean(baseResponse.getData(),List.class);
|
|
|
|
|
if (CollUtil.isNotEmpty(orderInvoiceEntities)) {
|
|
|
|
|
List<String> syncFiles = new ArrayList<>();
|
|
|
|
|
for (IoOrderInvoiceEntity orderInvoiceEntity : orderInvoiceEntities) {
|
|
|
|
|