|
|
|
@@ -61,13 +61,10 @@ public class WxFinancePrintServiceImpl implements WxFinancePrintService { |
|
|
|
boolean isGenarated = false; |
|
|
|
if (StringUtils.isBlank(record.getContent())) { |
|
|
|
Map map = new HashMap(); |
|
|
|
map.put("title", record.getName()); |
|
|
|
map.put("type", record.getType()); |
|
|
|
map.put("width", 770); |
|
|
|
map.put("height", 500); |
|
|
|
map.put("pageWidth", 215); |
|
|
|
map.put("pageHeight", 140); |
|
|
|
map.put("id", String.valueOf(record.getId())); |
|
|
|
map.put("defaultValue", 0); |
|
|
|
record.setContent(JSON.toJSONString(map)); |
|
|
|
isGenarated = true; |
|
|
|
@@ -79,8 +76,10 @@ public class WxFinancePrintServiceImpl implements WxFinancePrintService { |
|
|
|
record.setCreateTime(date); |
|
|
|
record.setUpdateTime(date); |
|
|
|
JSONObject o = record.getContentJson(); |
|
|
|
o.put("id", String.valueOf(record.getId())); |
|
|
|
o.put("defaultValue", 0); |
|
|
|
o.put("title", record.getName()); |
|
|
|
o.put("type", record.getType()); |
|
|
|
record.setContent(JSON.toJSONString(o)); |
|
|
|
try { |
|
|
|
wxFinancePrintTemplateMapper.insert(record); |
|
|
|
@@ -91,8 +90,10 @@ public class WxFinancePrintServiceImpl implements WxFinancePrintService { |
|
|
|
} else { |
|
|
|
if (null != record.getContentJson()) { |
|
|
|
JSONObject o = record.getContentJson(); |
|
|
|
o.put("id", String.valueOf(record.getId())); |
|
|
|
o.put("defaultValue", 0); |
|
|
|
o.put("title", record.getName()); |
|
|
|
o.put("type", record.getType()); |
|
|
|
record.setContent(JSON.toJSONString(o)); |
|
|
|
} |
|
|
|
record.setUpdateTime(date); |
|
|
|
@@ -108,7 +109,7 @@ public class WxFinancePrintServiceImpl implements WxFinancePrintService { |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<Map> parseTemplateData(String tenantId, Integer type, List<Long> dataIds) { |
|
|
|
EnumFinancePrintDataType printDatatype = EnumFinancePrintDataType.getEnum(type); |
|
|
|
// EnumFinancePrintDataType printDatatype = EnumFinancePrintDataType.getEnum(type); |
|
|
|
// //付款单 |
|
|
|
// if (printDatatype.getCode().intValue() == EnumFinancePrintDataType.FINANCE_RECEIVE.getCode()) { |
|
|
|
// TenantEntity tenantEntity = new TenantEntity(); |
|
|
|
|