增加动态表单自动排版配置界面的保存回显逻辑

This commit is contained in:
cuibaocheng 2021-08-14 19:33:17 +08:00
parent 29d63fb701
commit e6c6426200

View File

@ -1,5 +1,6 @@
package cn.com.tenlion.systemcard.service.cardtemplateuse.impl;
import cn.com.tenlion.buildingpictures.pojo.dtos.picturestemplate.PicturesTemplateDTO;
import cn.com.tenlion.buildingpictures.pojo.dtos.picturestemplatearea.PicturesTemplateAreaBuildingDTO;
import cn.com.tenlion.buildingpictures.service.picturestemplatebuilding.IPicturesTemplateBuildingService;
import cn.com.tenlion.buildingpictures.util.CreateImageBean;
@ -24,6 +25,7 @@ import ink.wgink.exceptions.SaveException;
import ink.wgink.exceptions.UpdateException;
import ink.wgink.module.dictionary.pojo.dtos.DataDTO;
import ink.wgink.module.dictionary.service.IDataService;
import ink.wgink.module.file.service.IFileService;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.app.AppTokenUser;
import ink.wgink.pojo.bos.UserInfoBO;
@ -92,6 +94,9 @@ public class CardTemplateUseServiceImpl extends DefaultBaseService implements IC
@Autowired
private IDataService iDataService;
@Autowired
private IFileService iFileService;
private static BufferedImage viewButtonBuffer;
static {
@ -422,6 +427,12 @@ public class CardTemplateUseServiceImpl extends DefaultBaseService implements IC
BufferedImage bufferedImage = base64ToBufferedImage(cardTemplateUsePhoto);
// cardTemplateUseDispatchPhoto = thumbnailImage(bufferedImage, 220 , 176);
cardTemplateUseDispatchPhoto = wXDispatchImage(bufferedImage);
/**
* 删除旧的名片预览图
*/
if(!StringUtils.isEmpty(useDTO.getCardTemplateUsePhotoUrl())) {
iFileService.delete(useDTO.getCardTemplateUsePhotoUrl());
}
cardTemplateUsePhotoUrl = iPicturesTemplateBuildingService.saveBase64ToFile(cardTemplateUsePhoto);
} catch (Exception e) {
e.printStackTrace();