Commit 4dfe6ef0 authored by sherlock's avatar sherlock

import template with formula/ export output-invoice

parent 34e82a7f
package pwc.taxtech.atms.constant.enums;
public enum EnumOutputInvoiceType {
Normal(0, "普通发票"),
Special(1, "专用发票"),
MotorVehicle(2, "机动车销售发票");
Normal(7, "普通发票"),
Special(4, "专用发票"),
MotorVehicle(26, "机动车销售发票");
private int code;
private String name;
......
......@@ -7,6 +7,7 @@ import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import pwc.taxtech.atms.common.util.BeanUtil;
import pwc.taxtech.atms.constant.enums.EnumModule;
import pwc.taxtech.atms.dpo.PagingResultDto;
import pwc.taxtech.atms.dto.vatdto.ImportOutputInvoiceDto;
......@@ -23,11 +24,7 @@ import pwc.taxtech.atms.vat.service.impl.OutputInvoiceServiceImpl;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.*;
import static javax.servlet.http.HttpServletResponse.SC_NO_CONTENT;
import static javax.servlet.http.HttpServletResponse.SC_OK;
......@@ -38,6 +35,8 @@ import static pwc.taxtech.atms.constant.Constant.TEMP_FILE_NAME;
@RequestMapping(value = "api/v1/outputInvoiceImport")
public class OutputInvoiceController {
@Autowired
private BeanUtil beanUtil;
@Autowired
OutputInvoiceServiceImpl outputInvoiceService;
@Autowired
......@@ -87,6 +86,14 @@ public class OutputInvoiceController {
if (list.size() == 0) {
return 0;
}
List<pwc.taxtech.atms.dto.vatdto.OutputVATInvoiceInfoDto> list2 = new ArrayList<>();
list.stream().forEach(x -> {
pwc.taxtech.atms.dto.vatdto.OutputVATInvoiceInfoDto d =
new pwc.taxtech.atms.dto.vatdto.OutputVATInvoiceInfoDto();
d = beanUtil.copyProperties(x,d);
d.setInvoiceTypeName(d.getInvoiceTypeName());
list2.add(d);
});
Map<String, String> header = new HashMap<>();
header.put("InvoiceTypeName", "发票类型");
header.put("ClassCode", "发票代码");
......@@ -107,7 +114,7 @@ public class OutputInvoiceController {
header.put("TaxRate", "税率");
header.put("TaxAmount", "税额");
header.put("TaxClassCode", "税收分类编码");
ExcelUtil.exportExcel(header, list, outputStream);
ExcelUtil.exportExcel(header, list2, outputStream);
return list.size();
}
......
......@@ -2,6 +2,7 @@ package pwc.taxtech.atms.dto.vatdto;
import com.fasterxml.jackson.annotation.JsonProperty;
import pwc.taxtech.atms.constant.enums.EnumOutputInvoiceType;
import pwc.taxtech.atms.thirdparty.ExcelCell;
import java.math.BigDecimal;
import java.util.Date;
......@@ -9,31 +10,55 @@ import java.util.Date;
public class OutputVATInvoiceInfoDto {
@JsonProperty("invoiceID")
private String invoiceId;
private Integer invoiceType;
@ExcelCell(index=13)
private String invoiceTypeName;
@ExcelCell(index=11)
private String classCode;
@ExcelCell(index=18)
private String invoiceNumber;
@ExcelCell(index=17)
private String buyerName;
@ExcelCell(index=1)
private String buyerTaxNumber;
@ExcelCell(index=5)
private String bankAccount;
@ExcelCell(index=12)
private String phoneNum;
@ExcelCell(index=19)
private Date invoiceDate;
@ExcelCell(index=16)
private String codeVersion;
@ExcelCell(index=2)
private String productName;
@ExcelCell(index=14)
private String documentNum;
@ExcelCell(index=7)
private String productStandard;
@ExcelCell(index=6)
private String unit;
@ExcelCell(index=4)
private Integer quantity;
@ExcelCell(index=9)
private Double unitPrice;
@ExcelCell(index=3)
private BigDecimal amount;
@ExcelCell(index=15)
private BigDecimal taxRate;
@ExcelCell(index=10)
private BigDecimal taxAmount;
@ExcelCell(index=8)
private String taxClassCode;
@JsonProperty("periodID")
private int periodId;
private boolean isDuplicate;
private BigDecimal amountDifference;
public void setInvoiceTypeName(String invoiceTypeName) {
this.invoiceTypeName = invoiceTypeName;
}
public String getInvoiceId() {
return invoiceId;
}
......@@ -202,11 +227,11 @@ public class OutputVATInvoiceInfoDto {
this.periodId = periodId;
}
public boolean isDuplicate() {
public boolean getIsDuplicate() {
return isDuplicate;
}
public void setDuplicate(boolean duplicate) {
public void setIsDuplicate(boolean duplicate) {
isDuplicate = duplicate;
}
......@@ -219,6 +244,19 @@ public class OutputVATInvoiceInfoDto {
}
public String getInvoiceTypeName() {
return EnumOutputInvoiceType.values()[this.invoiceType].getName();
if(this.invoiceType == null){
return "";
}
switch (this.invoiceType) {
case 4:
return "专用发票";
case 8:
return "普通发票";
case 26:
return "机动车销售发票";
default: return "";
}
// return EnumOutputInvoiceType.values()[this.invoiceType].getName();
}
}
......@@ -5,11 +5,7 @@ import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory;
import org.apache.poi.ss.usermodel.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
......@@ -267,17 +263,19 @@ public class TemplateGroupServiceImpl extends AbstractService {
cellTemplate.setIsReadOnly(cell.getCellStyle().getLocked());
cellTemplateList.add(cellTemplate);
//todo: 这里没有Config数据只有在上传模板以后,在界面里面可以配置公式
// CellTemplateConfig config = new CellTemplateConfig();
// config.setId(distributedIdService.nextId());
// config.setCellTemplateId(cellTemplate.getId());
// config.setReportTemplateId(template.getId());
// config.setDataSourceType(1);//todo 枚举
// config.setFormula(POIUtil.getCellFormulaString(cell));
// //config.setFormula(cell.getCellFormula());
//// config.setFormulaDataSource(); //todo KV相关
// config.setUpdateTime(now);
// config.setUpdateBy(authUserHelper.getCurrentUserId());
// cellTemplateConfigList.add(config);
if(!cell.getCellStyle().getLocked() && StringUtils.isNotBlank(POIUtil.getCellFormulaString(cell))) {
CellTemplateConfig config = new CellTemplateConfig();
config.setId(distributedIdService.nextId());
config.setCellTemplateId(cellTemplate.getId());
config.setReportTemplateId(template.getId());
config.setDataSourceType(1);//todo 枚举
config.setFormula(POIUtil.getCellFormulaString(cell));
// config.setFormula(cell.getCellFormula());
// config.setFormulaDataSource(); //todo KV相关
config.setUpdateTime(now);
config.setUpdateBy(authUserHelper.getCurrentUserId());
cellTemplateConfigList.add(config);
}
}
}
List<List<CellTemplate>> tmpList = CommonUtils.subListWithLen(cellTemplateList, CommonUtils.BATCH_NUM);
......
......@@ -56,6 +56,7 @@ public class OutputInvoiceServiceImpl {
private ImportFileMapper importFileMapper;
private static final String _tableName = "OutputVATInvoice";
private static final String _itemTableName = "OutputVATInvoiceItem";
private static final Calendar CAL = Calendar.getInstance();
@Autowired
private SqlSessionTemplate dynamicSqlSessionTemplate;
@Autowired
......@@ -148,28 +149,28 @@ public class OutputInvoiceServiceImpl {
private List<OutputVATInvoiceInfoDto> getOutputDetailInfoList(List<OutputVATInvoiceInfoDto> query) {
List<OutputVATInvoiceInfoDto> list = new ArrayList<>();
List<OutputVatInvoiceItem> outItem = outputVATInvoiceItemMapper.selectByExample(new OutputVatInvoiceItemExample());
List<OutputInvoiceDetail> outItem = outputInvoiceDetailMapper.selectByExample(new OutputInvoiceDetailExample());
if (query != null && query.size() > 0) {
for (OutputVATInvoiceInfoDto dto : query) {
List<OutputVatInvoiceItem> itemList = outItem.stream()
.filter(a -> a.getInvoiceId().equals(dto.getInvoiceId()))
.sorted(Comparator.comparing(OutputVatInvoiceItem::getSeqNo))
List<OutputInvoiceDetail> itemList = outItem.stream()
.filter(a -> a.getFPQQLSH().equals(dto.getFpqqlsh()))
// .sorted(Comparator.comparing(OutputVatInvoiceItem::getSeqNo))
.collect(Collectors.toList());
if (itemList != null && itemList.size() > 0) {
OutputVATInvoiceInfoDto newDto = new OutputVATInvoiceInfoDto();
CommonUtils.copyProperties(dto, newDto);
newDto.setCodeVersion(itemList.get(0).getCodeVersion());
newDto.setProductName(itemList.get(0).getProductName());
newDto.setDocumentNum(itemList.get(0).getDocumentNum());
newDto.setProductStandard(itemList.get(0).getProductStandard());
newDto.setUnit(itemList.get(0).getUnit());
newDto.setQuantity(itemList.get(0).getQuantity());
newDto.setUnitPrice(itemList.get(0).getUnitPrice());
newDto.setAmount(itemList.get(0).getAmount());
newDto.setTaxRate(itemList.get(0).getTaxRate());
newDto.setTaxAmount(itemList.get(0).getTaxAmount());
newDto.setTaxClassCode(itemList.get(0).getTaxClassCode());
// newDto.setCodeVersion(itemList.get(0).getCodeVersion());
newDto.setProductName(itemList.get(0).getSPMC());
// newDto.setDocumentNum(itemList.get(0).getDocumentNum());
// newDto.setProductStandard(itemList.get(0).getProductStandard());
newDto.setUnit(itemList.get(0).getDW());
newDto.setQuantity(itemList.get(0).getSL() == null ? null : new Double(itemList.get(0).getSL()).intValue());
newDto.setUnitPrice(itemList.get(0).getDJ() == null ? null : new Double(itemList.get(0).getDJ()));
newDto.setAmount(new BigDecimal(itemList.get(0).getJE()));
newDto.setTaxRate(new BigDecimal(itemList.get(0).getSLV()));
newDto.setTaxAmount(new BigDecimal(itemList.get(0).getSE()));
// newDto.setTaxClassCode(itemList.get(0).getTaxClassCode());
list.add(newDto);
if (itemList.size() > 1) {
for (int i = 1; i < itemList.size(); i++) {
......@@ -183,17 +184,17 @@ public class OutputInvoiceServiceImpl {
invoiceDto.setBankAccount(StringUtils.EMPTY);
invoiceDto.setPhoneNum(StringUtils.EMPTY);
invoiceDto.setInvoiceDate(null);
invoiceDto.setCodeVersion(itemList.get(i).getCodeVersion());
invoiceDto.setProductName(itemList.get(i).getProductName());
invoiceDto.setDocumentNum(itemList.get(i).getDocumentNum());
invoiceDto.setProductStandard(itemList.get(i).getProductStandard());
invoiceDto.setUnit(itemList.get(i).getUnit());
invoiceDto.setQuantity(itemList.get(i).getQuantity());
invoiceDto.setUnitPrice(itemList.get(i).getUnitPrice());
invoiceDto.setAmount(itemList.get(i).getAmount());
invoiceDto.setTaxRate(itemList.get(i).getTaxRate());
invoiceDto.setTaxAmount(itemList.get(i).getTaxAmount());
invoiceDto.setTaxClassCode(itemList.get(i).getTaxClassCode());
// invoiceDto.setCodeVersion(itemList.get(i).getCodeVersion());
invoiceDto.setProductName(itemList.get(i).getSPMC());
// invoiceDto.setDocumentNum(itemList.get(i).getDocumentNum());
// invoiceDto.setProductStandard(itemList.get(i).getProductStandard());
invoiceDto.setUnit(itemList.get(i).getDW());
invoiceDto.setQuantity(itemList.get(i).getSL() == null ? null : new Double(itemList.get(i).getSL()).intValue());
invoiceDto.setUnitPrice(itemList.get(i).getDJ() == null ? null : new Double(itemList.get(i).getDJ()));
invoiceDto.setAmount(new BigDecimal(itemList.get(i).getJE()));
invoiceDto.setTaxRate(new BigDecimal(itemList.get(i).getSLV()));
invoiceDto.setTaxAmount(new BigDecimal(itemList.get(i).getSE()));
// invoiceDto.setTaxClassCode(itemList.get(i).getTaxClassCode());
list.add(invoiceDto);
}
}
......@@ -203,8 +204,64 @@ public class OutputInvoiceServiceImpl {
return list;
}
// private List<OutputVATInvoiceInfoDto> getQueryList2(QueryOutputDto queryDto) {
// List<OutputVATInvoiceInfoDto> rList = outputInvoiceMapper.selectOutputVATInvoiceInfoLeftJoinItem(queryDto);
// Function<OutputVATInvoiceInfoDto, List<Object>> compositeKey = outputVATInvoiceInfoDto ->
// Arrays.asList(outputVATInvoiceInfoDto.getInvoiceId()
// , outputVATInvoiceInfoDto.getClassCode()
// , outputVATInvoiceInfoDto.getInvoiceNumber());
// List<OutputVATInvoiceInfoDto> groupedList = new ArrayList<>();
// rList.stream().collect(Collectors.groupingBy(compositeKey, Collectors.toList())).forEach((k, v) -> {
// if (v.stream().findFirst().isPresent()) {
// OutputVATInvoiceInfoDto fItem = v.stream().findFirst().get();
// OutputVATInvoiceInfoDto outputVATInvoiceInfoDto = new OutputVATInvoiceInfoDto();
// CommonUtils.copyProperties(fItem, outputVATInvoiceInfoDto);
// outputVATInvoiceInfoDto.setAmount(new BigDecimal(v.stream().mapToDouble(a -> a.getAmount().doubleValue()).sum()));
// outputVATInvoiceInfoDto.setTaxAmount(new BigDecimal(v.stream().mapToDouble(a -> a.getTaxAmount().doubleValue()).sum()));
// groupedList.add(outputVATInvoiceInfoDto);
// }
// });
//
// Stream<OutputVATInvoiceInfoDto> stream = groupedList.stream();
// if (queryDto.getInvoiceType() != null && queryDto.getInvoiceType() != 999) {
// stream = stream.filter(a -> a.getInvoiceType().equals(queryDto.getInvoiceType()));
// }
// if (queryDto.getStartInvoiceDate() != null) {
// stream = stream.filter(a -> a.getInvoiceDate().after(queryDto.getStartInvoiceDate()));
// }
// if (queryDto.getEndInvoiceDate() != null) {
// stream = stream.filter(a -> a.getInvoiceDate().before(queryDto.getEndInvoiceDate()));
// }
// if (StringUtils.isNotBlank(queryDto.getClassCode())) {
// stream = stream.filter(a -> a.getClassCode().contains(queryDto.getClassCode()));
// }
// if (StringUtils.isNotBlank(queryDto.getInvoiceNumber())) {
// stream = stream.filter(a -> a.getInvoiceNumber().contains(queryDto.getInvoiceNumber()));
// }
// if (StringUtils.isNotBlank(queryDto.getBuyerName())) {
// stream = stream.filter(a -> a.getBuyerName().contains(queryDto.getBuyerName()));
// }
// if (queryDto.getAmountStart() != null) {
// stream = stream.filter(a -> a.getAmount().compareTo(queryDto.getAmountStart()) > 0);
// }
// if (queryDto.getAmountEnd() != null) {
// stream = stream.filter(a -> a.getAmount().compareTo(queryDto.getAmountEnd()) < 0);
// }
// if (queryDto.getTaxAmountStart() != null) {
// stream = stream.filter(a -> a.getTaxAmount().compareTo(queryDto.getTaxAmountStart()) > 0);
// }
// if (queryDto.getTaxAmountEnd() != null) {
// stream = stream.filter(a -> a.getTaxAmount().compareTo(queryDto.getTaxAmountEnd()) < 0);
// }
// return stream.sorted(Comparator.comparing(OutputVATInvoiceInfoDto::getInvoiceDate)).collect(Collectors.toList());
// }
private List<OutputVATInvoiceInfoDto> getQueryList(QueryOutputDto queryDto) {
List<OutputVATInvoiceInfoDto> rList = outputVATInvoiceMapper.selectOutputVATInvoiceInfoLeftJoinItem(queryDto);
List<OutputVATInvoiceInfoDto> rList = outputInvoiceMapper.selectOutputInvoiceInfoLeftJoinItem(queryDto);
rList.stream().forEach(x -> {
CAL.setTime(x.getInvoiceDate());
x.setPeriodId(CAL.get(Calendar.MONTH) + 1);
});
Function<OutputVATInvoiceInfoDto, List<Object>> compositeKey = outputVATInvoiceInfoDto ->
Arrays.asList(outputVATInvoiceInfoDto.getInvoiceId()
, outputVATInvoiceInfoDto.getClassCode()
......
......@@ -51,7 +51,8 @@
<property name="patterns">
<list>
<value>pwc.taxtech.atms.dao.*</value>
<value>pwc.taxtech.atms.vatDao.*</value>
<value>pwc.taxtech.atms.vat.dao.*</value>
<value>pwc.taxtech.atms.invoice.*</value>
</list>
</property>
</bean>
......
package pwc.taxtech.atms.invoice;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
......@@ -8,10 +7,13 @@ import org.apache.ibatis.session.RowBounds;
import pwc.taxtech.atms.MyVatMapper;
import pwc.taxtech.atms.vat.dpo.OutputInvoiceDto;
import pwc.taxtech.atms.vat.dpo.OutputVATInvoiceInfoDto;
import pwc.taxtech.atms.vat.dpo.QueryOutputDto;
import pwc.taxtech.atms.vat.entity.OutputInvoice;
import pwc.taxtech.atms.vat.entity.OutputInvoiceExample;
import pwc.taxtech.atms.vat.entity.OutputInvoiceKey;
import java.util.List;
@Mapper
public interface OutputInvoiceMapper extends MyVatMapper {
/**
......@@ -183,4 +185,6 @@ public interface OutputInvoiceMapper extends MyVatMapper {
List<OutputInvoiceDto> getOutputInvoiceWithDetail();
List<OutputVATInvoiceInfoDto> selectOutputInvoiceInfoLeftJoinItem(QueryOutputDto queryDto);
}
\ No newline at end of file
......@@ -9,6 +9,7 @@ public class OutputVATInvoiceInfoDto {
private Integer invoiceType;
private String invoiceTypeName;
private String classCode;
private String invoiceNumber;
private String buyerName;
private String buyerTaxNumber;
......@@ -21,6 +22,7 @@ public class OutputVATInvoiceInfoDto {
private String productStandard;
private String unit;
private Integer quantity;
private String fpqqlsh;
private Double unitPrice;
private BigDecimal amount;
private BigDecimal taxRate;
......@@ -30,6 +32,18 @@ public class OutputVATInvoiceInfoDto {
private boolean isDuplicate;
private BigDecimal amountDifference;
public void setInvoiceTypeName(String invoiceTypeName) {
this.invoiceTypeName = invoiceTypeName;
}
public String getFpqqlsh() {
return fpqqlsh;
}
public void setFpqqlsh(String fpqqlsh) {
this.fpqqlsh = fpqqlsh;
}
public String getInvoiceId() {
return invoiceId;
}
......@@ -198,13 +212,19 @@ public class OutputVATInvoiceInfoDto {
this.periodId = periodId;
}
public boolean isDuplicate() {
public boolean getIsDuplicate() {
return isDuplicate;
}
public boolean isDuplicate() {
return isDuplicate;
}
public void setDuplicate(boolean duplicate) {
isDuplicate = duplicate;
}
public void setIsDuplicate(boolean duplicate) {
isDuplicate = duplicate;
}
public BigDecimal getAmountDifference() {
return amountDifference;
......
......@@ -131,7 +131,7 @@
#{item.createTime,jdbcType=TIMESTAMP},
</when>
<otherwise>
'1970-01-01 08:00:00',
TO_DATE('1970-01-01 08:00:00','yyyy-mm-dd hh24:mi:ss'),
</otherwise>
</choose>
<choose>
......@@ -147,7 +147,7 @@
#{item.updateTime,jdbcType=TIMESTAMP},
</when>
<otherwise>
'1970-01-01 08:00:00',
TO_DATE('1970-01-01 08:00:00','yyyy-mm-dd hh24:mi:ss'),
</otherwise>
</choose>
<choose>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="pwc.taxtech.atms.invoice.OutputInvoiceMapper">
<resultMap id="OutputVATInvoiceInfoDto" type="pwc.taxtech.atms.dto.vatdto.OutputVATInvoiceInfoDto">
<id column="InvoiceID" jdbcType="VARCHAR" property="invoiceID"/>
<resultMap id="OutputInvoiceInfoDto" type="pwc.taxtech.atms.vat.dpo.OutputVATInvoiceInfoDto">
<id column="Invoice_ID" jdbcType="VARCHAR" property="invoiceId"/>
<result column="INVOICE_TYPE" jdbcType="INTEGER" property="invoiceType"/>
<result column="INVOICE_TYPE_NAME" jdbcType="VARCHAR" property="invoiceTypeName"/>
<result column="CLASS_CODE" jdbcType="VARCHAR" property="classCode"/>
<result column="INVOICE_NUMBER" jdbcType="VARCHAR" property="invoiceNumber"/>
<result column="FPQQLSH" jdbcType="VARCHAR" property="fpqqlsh"/>
<result column="BUYER_NAME" jdbcType="VARCHAR" property="buyerName"/>
<result column="BUYER_TAX_NUMBER" jdbcType="VARCHAR" property="buyerTaxNumber"/>
<result column="BANK_ACCOUNT" jdbcType="VARCHAR" property="bankAccount"/>
......@@ -28,68 +29,68 @@
<result column="AMOUNT_DIFFERENCE" jdbcType="DECIMAL" property="amountDifference"/>
</resultMap>
<select id="selectOutputVATInvoiceInfoLeftJoinItem" parameterType="pwc.taxtech.atms.dto.vatdto.QueryOutputDto" resultMap="OutputVATInvoiceInfoDto">
<select id="selectOutputInvoiceInfoLeftJoinItem" parameterType="pwc.taxtech.atms.vat.dpo.QueryOutputDto" resultMap="OutputInvoiceInfoDto">
SELECT
O.ID AS INVOICE_ID,
O.FPLX AS INVOICE_TYPE,
O.CLASS_CODE,
O.FPLXDM AS INVOICE_TYPE,
O.FPDM AS CLASS_CODE,
O.FPHM AS INVOICE_NUMBER,
O.FPQQLSH,
O.GFMC AS BUYER_NAME,
O.GFSH AS BUYER_TAX_NUMBER,
O.GFYHZH AS BANK_ACCOUNT,
O.GFDZDH AS PHONE_NUM,
O.INVOICE_DATE,
IFNULL (
O.KPRQ AS INVOICE_DATE,
/*nvl (
OI.CODE_VERSION,
''
)
AS CODE_VERSION,
IFNULL (
AS CODE_VERSION,*/
nvl (
OI.SPMC,
''
)
AS PRODUCT_NAME,
IFNULL (
nvl (
OI.MXXH,
''
)
AS DOCUMENT_NUM,
IFNULL (
nvl (
OI.GGXH,
''
)
AS PRODUCT_STANDARD,
IFNULL (
nvl (
OI.DW,
''
)
AS UNIT,
IFNULL (
nvl (
OI.SL,
''
)
AS QUANTITY,
IFNULL (
nvl (
OI.DJ,
''
)
AS UNIT_PRICE,
IFNULL (
nvl (
OI.JE,
''
)
AS AMOUNT,
IFNULL (
nvl (
OI.SE,
''
)
AS TAX_AMOUNT,
IFNULL (
nvl (
OI.SSFLDM,
''
)
AS TAX_CLASS_CODE,
O.PERIOD_ID
AS TAX_CLASS_CODE
FROM
OUTPUT_INVOICE O
LEFT JOIN
......@@ -104,10 +105,10 @@
<!--<if test="queryDto.periodEnd">-->
<!--AND O.PERIOD_ID &lt;= #{queryDto.periodEnd,jdbcType=VARCHAR}-->
<!--</if>-->
<if test="queryDto.productName!=null and queryDto.productName!=''">
AND PRODUCT_NAME LIKE concat (
<if test="productName!=null and productName!=''">
AND OI.SPMC LIKE concat (
'%',
#{query.productName,jdbcType=VARCHAR,'%'}
#{ productName,jdbcType=VARCHAR,'%'}
)
</if>
</select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment