|
|
@@ -38,7 +38,7 @@ public class Create_by_fileOSFService implements IHRMsfService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Object process(Context context, Map<String, Object> map) throws EASBizException, BOSException {
|
|
|
+ public Object process(Context context, Map map) throws EASBizException, BOSException {
|
|
|
String mack = (String) map.get("mack");
|
|
|
String data = (String) map.get("data");
|
|
|
Map<String, Object> resul = Maps.newHashMap();
|
|
|
@@ -49,6 +49,16 @@ public class Create_by_fileOSFService implements IHRMsfService {
|
|
|
EsignHttpResponse response = this.previewFile(context, jsonObject, "预览");
|
|
|
if (response.getStatus() >= 200 && response.getStatus() < 300) {
|
|
|
JSONObject body = JSON.parseObject(response.getBody());
|
|
|
+ if("0".equals(String.valueOf(body.get("code")))) {
|
|
|
+ JSONObject jsonData = body.getJSONObject("data");
|
|
|
+ String fileId = jsonData.getString("fileId");
|
|
|
+ for (int i = 10; i > 0; i--) {
|
|
|
+ EsignHttpResponse response1 = EsignHttpUtil.getFileStatus(context,fileId,"预览");
|
|
|
+ if (response1.getStatus() >= 200 && response1.getStatus() < 300) {
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
resul.putAll(body);
|
|
|
} else {
|
|
|
resul.put("code", response.getStatus());
|
|
|
@@ -394,6 +404,8 @@ public class Create_by_fileOSFService implements IHRMsfService {
|
|
|
map.put("components", components);
|
|
|
EsignHttpResponse response = EsignHttpUtil.createByDocTemplate(context, JSON.toJSONString(map), sourceId);
|
|
|
//html 文件需要等待转换完成
|
|
|
+
|
|
|
+
|
|
|
return response;
|
|
|
}
|
|
|
|