|
|
@@ -20,7 +20,6 @@ import com.iformall.domain.po.WxFinanceReceive; |
|
|
import com.iformall.domain.po.WxFinanceReceiveBill; |
|
|
import com.iformall.domain.po.WxFinanceReceiveBill; |
|
|
import com.iformall.domain.po.WxMerchant; |
|
|
import com.iformall.domain.po.WxMerchant; |
|
|
import com.iformall.domain.po.base.BaseEntity; |
|
|
import com.iformall.domain.po.base.BaseEntity; |
|
|
import com.iformall.domain.po.base.TenantEntity; |
|
|
|
|
|
import com.iformall.domain.vo.PrintMerchantSettleVo; |
|
|
import com.iformall.domain.vo.PrintMerchantSettleVo; |
|
|
import com.iformall.domain.vo.PrintVo; |
|
|
import com.iformall.domain.vo.PrintVo; |
|
|
import com.iformall.enums.EnumFinancePrintDataType; |
|
|
import com.iformall.enums.EnumFinancePrintDataType; |
|
|
@@ -30,6 +29,7 @@ import com.iformall.mapper.WxFinancePrintDataMapper; |
|
|
import com.iformall.mapper.WxFinancePrintTemplateMapper; |
|
|
import com.iformall.mapper.WxFinancePrintTemplateMapper; |
|
|
import com.iformall.print.PrintComponentHandler; |
|
|
import com.iformall.print.PrintComponentHandler; |
|
|
import com.iformall.print.data.PrintBillDataHandler; |
|
|
import com.iformall.print.data.PrintBillDataHandler; |
|
|
|
|
|
import com.iformall.print.data.PrintCustomedTableDataHandler; |
|
|
import com.iformall.print.data.PrintFinanceReceiveDataHandler; |
|
|
import com.iformall.print.data.PrintFinanceReceiveDataHandler; |
|
|
import com.iformall.print.data.PrintMerchantSettleDataHandler; |
|
|
import com.iformall.print.data.PrintMerchantSettleDataHandler; |
|
|
import com.iformall.service.WxAllBillService; |
|
|
import com.iformall.service.WxAllBillService; |
|
|
@@ -77,6 +77,9 @@ public class WxFinancePrintServiceImpl implements WxFinancePrintService { |
|
|
@Autowired |
|
|
@Autowired |
|
|
PrintMerchantSettleDataHandler printMerchantSettleDataHandler; |
|
|
PrintMerchantSettleDataHandler printMerchantSettleDataHandler; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
PrintCustomedTableDataHandler printCustomedTableDataHandler; |
|
|
|
|
|
|
|
|
@Lazy |
|
|
@Lazy |
|
|
@Autowired |
|
|
@Autowired |
|
|
WxMerchantService wxMerchantService; |
|
|
WxMerchantService wxMerchantService; |
|
|
@@ -229,7 +232,17 @@ public class WxFinancePrintServiceImpl implements WxFinancePrintService { |
|
|
if (null != items) { |
|
|
if (null != items) { |
|
|
for (int j = 0 ; j < items.size() ; j ++) { |
|
|
for (int j = 0 ; j < items.size() ; j ++) { |
|
|
JSONObject ov = items.getJSONObject(j); |
|
|
JSONObject ov = items.getJSONObject(j); |
|
|
ov.put("value", printFinanceReceiveDataHandler.getObjectValue(ov.getString("name"),re,merchantMap,feesMap,shopNumber,billList)); |
|
|
|
|
|
|
|
|
//是否是定制化的表格 |
|
|
|
|
|
Integer isCustomedTable = ov.getInteger("isFmCustomizedTable"); |
|
|
|
|
|
if (null != isCustomedTable && EnumYesOrNo.YES.getCode().intValue() == isCustomedTable.intValue()) { |
|
|
|
|
|
//表格解析 |
|
|
|
|
|
String componentContent = ov.getString("value"); |
|
|
|
|
|
if (null != billList) { |
|
|
|
|
|
printCustomedTableDataHandler.getTableContent(componentContent, JSON.parseArray(JSON.toJSONString(billList))); |
|
|
|
|
|
} |
|
|
|
|
|
}else { |
|
|
|
|
|
ov.put("value", printFinanceReceiveDataHandler.getObjectValue(ov.getString("name"),re,merchantMap,feesMap,shopNumber)); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
vo.setTemplate(o); |
|
|
vo.setTemplate(o); |
|
|
@@ -252,7 +265,18 @@ public class WxFinancePrintServiceImpl implements WxFinancePrintService { |
|
|
if (null != items) { |
|
|
if (null != items) { |
|
|
for (int j = 0 ; j < items.size() ; j ++) { |
|
|
for (int j = 0 ; j < items.size() ; j ++) { |
|
|
JSONObject ov = items.getJSONObject(j); |
|
|
JSONObject ov = items.getJSONObject(j); |
|
|
ov.put("value", printBillDataHandler.getObjectValue(ov.getString("name"),re,merchantMap,feesMap)); |
|
|
|
|
|
|
|
|
//是否是定制化的表格 |
|
|
|
|
|
Integer isCustomedTable = ov.getInteger("isFmCustomizedTable"); |
|
|
|
|
|
if (null != isCustomedTable && EnumYesOrNo.YES.getCode().intValue() == isCustomedTable.intValue()) { |
|
|
|
|
|
//表格解析 |
|
|
|
|
|
String componentContent = ov.getString("value"); |
|
|
|
|
|
//if (null != billList) { |
|
|
|
|
|
// printCustomedTableDataHandler.getTableContent(componentContent, JSON.parseArray(JSON.toJSONString(billList))); |
|
|
|
|
|
//} |
|
|
|
|
|
}else { |
|
|
|
|
|
ov.put("value", printBillDataHandler.getObjectValue(ov.getString("name"),re,merchantMap,feesMap)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
vo.setTemplate(o); |
|
|
vo.setTemplate(o); |
|
|
@@ -275,7 +299,18 @@ public class WxFinancePrintServiceImpl implements WxFinancePrintService { |
|
|
if (null != items) { |
|
|
if (null != items) { |
|
|
for (int j = 0 ; j < items.size() ; j ++) { |
|
|
for (int j = 0 ; j < items.size() ; j ++) { |
|
|
JSONObject ov = items.getJSONObject(j); |
|
|
JSONObject ov = items.getJSONObject(j); |
|
|
ov.put("value", printMerchantSettleDataHandler.getObjectValue(ov.getString("name"),sv,merchantMap,feesMap)); |
|
|
|
|
|
|
|
|
//是否是定制化的表格 |
|
|
|
|
|
Integer isCustomedTable = ov.getInteger("isFmCustomizedTable"); |
|
|
|
|
|
if (null != isCustomedTable && EnumYesOrNo.YES.getCode().intValue() == isCustomedTable.intValue()) { |
|
|
|
|
|
//表格解析 |
|
|
|
|
|
String componentContent = ov.getString("value"); |
|
|
|
|
|
//if (null != billList) { |
|
|
|
|
|
// printCustomedTableDataHandler.getTableContent(componentContent, JSON.parseArray(JSON.toJSONString(billList))); |
|
|
|
|
|
//} |
|
|
|
|
|
}else { |
|
|
|
|
|
ov.put("value", printMerchantSettleDataHandler.getObjectValue(ov.getString("name"),sv,merchantMap,feesMap)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
vo.setTemplate(o); |
|
|
vo.setTemplate(o); |
|
|
|