发票二维码解析

pro
wangwei 2 years ago
parent 69ea52be42
commit 842fb00813

@ -2,6 +2,7 @@ package com.glxp.api.controller.inout;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageInfo;
@ -27,6 +28,7 @@ import com.glxp.api.entity.thrsys.ThrOrderDetailEntity;
import com.glxp.api.entity.thrsys.ThrOrderEntity;
import com.glxp.api.entity.thrsys.ThrSystemBusApiEntity;
import com.glxp.api.req.inout.*;
import com.glxp.api.req.inv.FilterInvoiceRequest;
import com.glxp.api.req.system.DeleteRequest;
import com.glxp.api.req.thrsys.FilterThrOrderDetailRequest;
import com.glxp.api.res.PageSimpleResponse;
@ -54,6 +56,7 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
@ -653,6 +656,23 @@ public class IoOrderDetailBizController extends BaseController {
}
@GetMapping("/udiwms/inout/biz/parseInvoice")
public BaseResponse parseInvoice(String code) {
List<String> list = Arrays.asList(code.split(","));
FilterInvoiceRequest filterInvoiceRequest = new FilterInvoiceRequest();
filterInvoiceRequest.setType(list.get(1));
filterInvoiceRequest.setInvoiceCode(list.get(2));
filterInvoiceRequest.setInvoiceEncode(list.get(3));
filterInvoiceRequest.setPrice(new BigDecimal(list.get(4)));
filterInvoiceRequest.setInvoiceDate(DateUtil.formatDateTime(DateUtil.parse(list.get(5), "yyyyMMdd")));
return ResultVOUtils.success(filterInvoiceRequest);
}
@PostMapping("/udiwms/inout/biz/updateorderBiz")
public BaseResponse updateorderBiz(@RequestBody List<IoOrderDetailCodeEntity> list) {
String billNo = null;

@ -0,0 +1,41 @@
package com.glxp.api.req.inv;
import com.glxp.api.util.page.ListPageRequest;
import lombok.Data;
import java.math.BigDecimal;
/**
*
*/
@Data
public class FilterInvoiceRequest extends ListPageRequest {
/**
* 10010432()31()
*/
private String type;
/**
*
*/
private String invoiceCode;
/**
*
*/
private String invoiceEncode;
/**
*
*/
private String invoiceDate;
/**
*
*/
private BigDecimal price;
}
Loading…
Cancel
Save