| | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 在线制图 |
| | | * @author WWW |
| | | */ |
| | | @Service |
| | | @SuppressWarnings("ALL") |
| | | public class ExportService { |
| | | @Value("${sys.exportServer}") |
| | | private String exportServer; |
| | |
| | | @Autowired |
| | | DownloadService downloadService; |
| | | |
| | | /** |
| | | * POST请求出图服务 |
| | | * |
| | | * @param ue 用户类 |
| | | * @param entity 在线制图类 |
| | | * @return 成功 |
| | | * @throws Exception |
| | | */ |
| | | public String post(UserEntity ue, ExportEntity entity) throws Exception { |
| | | Map<String, Object> map = getMapData(entity); |
| | | String url = exportServer + "/Export/Start"; |
| | |
| | | return rows > 0 ? de.getGuid() : null; |
| | | } |
| | | |
| | | /** |
| | | * 获取Map数据 |
| | | */ |
| | | private Map<String, Object> getMapData(ExportEntity entity) { |
| | | Map<String, Object> map = new HashMap<String, Object>(3); |
| | | |
| | |
| | | return map; |
| | | } |
| | | |
| | | /** |
| | | * 获取下载实体类 |
| | | */ |
| | | private DownloadEntity getDownloadEntity(UserEntity ue, ExportEntity entity, String file) throws Exception { |
| | | DownloadEntity de = new DownloadEntity(); |
| | | de.setName(FileHelper.getFileName(file)); |