Merge remote-tracking branch 'origin/release' into release

release
yefei 2 years ago
commit cfa7df2d0b
  1. 4
      dxhy-sign/src/main/java/com/dxhy/sign/entity/QsExcelEntity.java
  2. 8
      dxhy-sign/src/main/java/com/dxhy/sign/service/fpqs/impl/SignFpqsServiceImpl.java
  3. 6
      dxhy-sign/src/main/resources/mapper/SignRecordInvoiceMapper.xml

@ -66,13 +66,13 @@ public class QsExcelEntity {
* 税额 * 税额
*/ */
@ExcelProperty("税额") @ExcelProperty("税额")
private String taxAmount; private BigDecimal taxAmount;
/** /**
* 价格合计 * 价格合计
*/ */
@ExcelProperty("价税合计金额") @ExcelProperty("价税合计金额")
private String totalAmount; private BigDecimal totalAmount;
/** /**
* 备注 * 备注
*/ */

@ -3403,7 +3403,7 @@ public class SignFpqsServiceImpl extends MpBaseServiceImpl<SignRecordInvoiceDao,
if (resultList != null && resultList.size() > 0) { if (resultList != null && resultList.size() > 0) {
for (int i = 0; i < resultList.size(); i++) { for (int i = 0; i < resultList.size(); i++) {
QsExcelEntity qsExcelEntity = new QsExcelEntity(); QsExcelEntity qsExcelEntity = new QsExcelEntity();
BeanUtils.copyProperties(qsExcelEntity,resultList.get(i)); BeanUtils.copyProperties(resultList.get(i),qsExcelEntity);
log.info("导出的发票数据魏:{}",JSONObject.toJSONString(resultList.get(i))); log.info("导出的发票数据魏:{}",JSONObject.toJSONString(resultList.get(i)));
log.info("totalAmount={}",resultList.get(i).getTotalAmount()); log.info("totalAmount={}",resultList.get(i).getTotalAmount());
@ -3428,12 +3428,12 @@ public class SignFpqsServiceImpl extends MpBaseServiceImpl<SignRecordInvoiceDao,
outputStream = new ByteArrayOutputStream(); outputStream = new ByteArrayOutputStream();
// excelWriter = EasyExcel.write(outputStream).build(); // excelWriter = EasyExcel.write(outputStream).build();
excelWriter = EasyExcel.write(outputStream,QsExcelEntity.class).build(); excelWriter = EasyExcel.write(outputStream,QsExcelEntity.class).build();
WriteSheet writeSheet = EasyExcel.writerSheet("sheet1").head(QsExcelEntity.class).build(); WriteSheet writeSheet = EasyExcel.writerSheet("sheet").head(QsExcelEntity.class).build();
excelWriter.write(excelList, writeSheet); excelWriter.write(excelList, writeSheet);
log.info("excelwrite {}",excelWriter); log.info("excelwrite {}",excelWriter);
excelWriter.finish(); excelWriter.finish();
byte[] bytes = outputStream.toByteArray(); byte[] bytes = outputStream.toByteArray();
log.info("byte数组信息为 {}",bytes); // log.info("byte数组信息为 {}",bytes);
return sendEmailByqs((String) pramsMap.get("emailAddress"),"",bytes); return sendEmailByqs((String) pramsMap.get("emailAddress"),"",bytes);
}catch(Exception e){ }catch(Exception e){
log.error("签收数据导出,错误日志:{}",e); log.error("签收数据导出,错误日志:{}",e);
@ -3488,7 +3488,7 @@ public class SignFpqsServiceImpl extends MpBaseServiceImpl<SignRecordInvoiceDao,
//附件 excel //附件 excel
List<AttachmentVo> attachmentVoList = Lists.newArrayList(); List<AttachmentVo> attachmentVoList = Lists.newArrayList();
AttachmentVo attachmentVo = new AttachmentVo(); AttachmentVo attachmentVo = new AttachmentVo();
attachmentVo.setName("发票签收"); attachmentVo.setName("发票签收.xlsx");
attachmentVo.setFileBytes(xlsxFile); attachmentVo.setFileBytes(xlsxFile);
attachmentVo.setType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); attachmentVo.setType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
// attachmentVo.setType("application/msexcel"); // attachmentVo.setType("application/msexcel");

@ -15,6 +15,9 @@
<result column="total_amount" property="totalAmount"/> <result column="total_amount" property="totalAmount"/>
<result column="qs_status" property="qsStatus"/> <result column="qs_status" property="qsStatus"/>
<result column="dept_id" property="deptId"/> <result column="dept_id" property="deptId"/>
<result column="remark" property="remark"/>
<result column="qs_date" property="qsDate"/>
<result column="qs_name" property="qsName"/>
</resultMap> </resultMap>
<resultMap id="WqshjResultMap" type="com.dxhy.sign.entity.TDxRecordInvoice"> <resultMap id="WqshjResultMap" type="com.dxhy.sign.entity.TDxRecordInvoice">
@ -78,7 +81,8 @@
<select id="selectWqsfpByQsyx" parameterType="java.util.Map" <select id="selectWqsfpByQsyx" parameterType="java.util.Map"
resultMap="BaseResultMap" databaseId="mysql"> resultMap="BaseResultMap" databaseId="mysql">
select select
t.id,t.invoice_type,t.invoice_code,t.invoice_no,t.invoice_date,t.gf_name,t.xf_name,t.invoice_amount,t.tax_amount,t.dept_id,t.qs_status t.id,t.invoice_type,t.invoice_code,t.invoice_no,t.invoice_date,t.total_amount,t.remark,t.qs_date,
t.gf_name,t.xf_name,t.invoice_amount,t.tax_amount,t.dept_id,t.qs_status,t.qs_name
from t_dx_record_invoice t left join t_dx_invoice r on t.uuid = r.uuid from t_dx_record_invoice t left join t_dx_invoice r on t.uuid = r.uuid
where 1=1 where 1=1
<if test="ids != null and ids.size()>0"> <if test="ids != null and ids.size()>0">

Loading…
Cancel
Save