Просмотр исходного кода

[合同][修改][开发结算单]

release_toaliyun_real
luozukai 6 лет назад
Родитель
Сommit
3609927ea7
3 измененных файлов: 12 добавлений и 25 удалений
  1. +0
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxBillSettleServiceImpl.java
  2. +6
    -17
      mallinkService/src/main/java/com/iformall/utils/WordUtil.java
  3. +6
    -6
      mallinkService/src/main/resources/mapper/WxBillAllMapper.xml

+ 0
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxBillSettleServiceImpl.java Просмотреть файл

@@ -12,8 +12,6 @@ import com.iformall.service.ExcelService;
import com.iformall.service.WxBillSettleService; import com.iformall.service.WxBillSettleService;
import com.iformall.service.WxFlowService; import com.iformall.service.WxFlowService;
import com.iformall.utils.DateUtils; import com.iformall.utils.DateUtils;
import org.apache.commons.collections.CollectionUtils;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;


+ 6
- 17
mallinkService/src/main/java/com/iformall/utils/WordUtil.java Просмотреть файл

@@ -3,14 +3,10 @@ package com.iformall.utils;
import cn.afterturn.easypoi.word.WordExportUtil; import cn.afterturn.easypoi.word.WordExportUtil;
import com.iformall.domain.vo.WordDocTableVo; import com.iformall.domain.vo.WordDocTableVo;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.xwpf.usermodel.*; import org.apache.poi.xwpf.usermodel.*;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.*;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.util.CollectionUtils;

import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.File; import java.io.File;
@@ -119,18 +115,13 @@ public class WordUtil {
*/ */
public static void addOrRemoveRow(XWPFTable table, int add,int fromRow) { public static void addOrRemoveRow(XWPFTable table, int add,int fromRow) {
XWPFTableRow row = table.getRow(fromRow-1); XWPFTableRow row = table.getRow(fromRow-1);
if(add>0)
{
while(add>0)
{
if(add>0) {
while(add>0) {
copyPro(row,table.insertNewTableRow(fromRow)); copyPro(row,table.insertNewTableRow(fromRow));
add--; add--;
} }
}
else
{
while(add<0)
{
}else {
while(add<0) {
table.removeRow(fromRow-1); table.removeRow(fromRow-1);
add++; add++;
} }
@@ -141,14 +132,12 @@ public class WordUtil {
//复制行属性 //复制行属性
targetRow.getCtRow().setTrPr(sourceRow.getCtRow().getTrPr()); targetRow.getCtRow().setTrPr(sourceRow.getCtRow().getTrPr());
List<XWPFTableCell> cellList = sourceRow.getTableCells(); List<XWPFTableCell> cellList = sourceRow.getTableCells();
if(null==cellList)
{
if(null==cellList) {
return ; return ;
} }
//添加列、复制列以及列中段落属性 //添加列、复制列以及列中段落属性
XWPFTableCell targetCell = null; XWPFTableCell targetCell = null;
for(XWPFTableCell sourceCell:cellList)
{
for(XWPFTableCell sourceCell:cellList) {
targetCell = targetRow.addNewTableCell(); targetCell = targetRow.addNewTableCell();
//列属性 //列属性
targetCell.getCTTc().setTcPr(sourceCell.getCTTc().getTcPr()); targetCell.getCTTc().setTcPr(sourceCell.getCTTc().getTcPr());


+ 6
- 6
mallinkService/src/main/resources/mapper/WxBillAllMapper.xml Просмотреть файл

@@ -56,24 +56,24 @@
shopInfo,bill.comments,bill.price_detail,updatetime,bill.freeze shopInfo,bill.comments,bill.price_detail,updatetime,bill.freeze
from ( from (
select id,merchant_id,shop_id,tenant_id,'租金' name,1 bill_type_value,'租金' select id,merchant_id,shop_id,tenant_id,'租金' name,1 bill_type_value,'租金'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,''
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,
endtime,rent_shop_type,case when shop_info is null then '[]' else shop_info end shop_info,comments,'' endtime,rent_shop_type,case when shop_info is null then '[]' else shop_info end shop_info,comments,''
price_detail,updatetime,freeze price_detail,updatetime,freeze
from wx_bill_rent where tenant_id=#{tenantId} and is_preview = 0 from wx_bill_rent where tenant_id=#{tenantId} and is_preview = 0
union all union all
select id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金' select id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,''
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,
endtime,rent_shop_type,shop_info,NULL comments,'' price_detail,updatetime,freeze from wx_bill_rent_deposit where endtime,rent_shop_type,shop_info,NULL comments,'' price_detail,updatetime,freeze from wx_bill_rent_deposit where
tenant_id=#{tenantId} tenant_id=#{tenantId}
union all union all
select id,merchant_id,shop_id,tenant_id,'物业费' name,3 bill_type_value,'物业费' select id,merchant_id,shop_id,tenant_id,'物业费' name,3 bill_type_value,'物业费'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,''
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,
endtime,rent_shop_type,case when shop_info is null then '[]' else shop_info end shop_info,comments,'' endtime,rent_shop_type,case when shop_info is null then '[]' else shop_info end shop_info,comments,''
price_detail,updatetime,freeze price_detail,updatetime,freeze
from wx_bill_property where tenant_id=#{tenantId} and is_preview = 0 from wx_bill_property where tenant_id=#{tenantId} and is_preview = 0
union all union all
select id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金' select id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金'
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,''
bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,
endtime,rent_shop_type,shop_info,NULL comments,'' price_detail,updatetime,freeze from wx_bill_property_deposit where endtime,rent_shop_type,shop_info,NULL comments,'' price_detail,updatetime,freeze from wx_bill_property_deposit where
tenant_id=#{tenantId} tenant_id=#{tenantId}
union all union all
@@ -85,13 +85,13 @@
from wx_bill_daily where tenant_id=#{tenantId} from wx_bill_daily where tenant_id=#{tenantId}
union all union all
select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,concat('其他费用-',name) as bill_type,0 as select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,concat('其他费用-',name) as bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,
rent_shop_type,'[]' shop_info,comments,'' price_detail,updatetime,freeze rent_shop_type,'[]' shop_info,comments,'' price_detail,updatetime,freeze
from wx_bill_other where tenant_id=#{tenantId} from wx_bill_other where tenant_id=#{tenantId}
union all union all
select id,merchant_id,shop_id,tenant_id,comments as name,8 bill_type_value,concat('其他押金-',comments) as select id,merchant_id,shop_id,tenant_id,comments as name,8 bill_type_value,concat('其他押金-',comments) as
bill_type,0 as bill_type,0 as
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime,
need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime,
rent_shop_type,'[]' shop_info,comments,'' price_detail,updatetime,freeze rent_shop_type,'[]' shop_info,comments,'' price_detail,updatetime,freeze
from wx_bill_other_deposit where tenant_id=#{tenantId} from wx_bill_other_deposit where tenant_id=#{tenantId}
) bill ) bill


Загрузка…
Отмена
Сохранить