|
|
|
@@ -86,21 +86,19 @@ public class WxFinancePrintServiceImpl implements WxFinancePrintService { |
|
|
|
public void update(WxFinancePrintTemplate record) { |
|
|
|
WxFinancePrintTemplate t = getTemplateById(record.getId()); |
|
|
|
Map map = new HashMap(); |
|
|
|
if (null == record.getContentJson()) { |
|
|
|
if (null == record.getContentJsonUpdate()) { |
|
|
|
map.put("width", 770); |
|
|
|
map.put("height", 500); |
|
|
|
map.put("pageWidth", 215); |
|
|
|
map.put("pageHeight", 140); |
|
|
|
map.put("id", String.valueOf(t.getId())); |
|
|
|
map.put("title", record.getName()); |
|
|
|
map.put("title", record.getTitle()); |
|
|
|
map.put("type", t.getType()); |
|
|
|
map.put("tempItems", record.getTempItems()); |
|
|
|
record.setContent(JSON.toJSONString(map)); |
|
|
|
} |
|
|
|
Date date = new Date(); |
|
|
|
JSONObject o = record.getContentJson(); |
|
|
|
o.put("title", record.getName()); |
|
|
|
o.put("tempItems", record.getTempItems()); |
|
|
|
JSONObject o = record.getContentJsonUpdate(); |
|
|
|
o.put("title", record.getTitle()); |
|
|
|
record.setContent(JSON.toJSONString(o)); |
|
|
|
record.setName(record.getTitle()); |
|
|
|
record.setUpdateTime(date); |
|
|
|
|