|
@@ -15,7 +15,10 @@ import org.jeecg.modules.app.esign.fileAndTemplate.FileDemo;
|
|
|
import org.jeecg.modules.app.esign.sign.SignDemo;
|
|
|
import org.jeecg.modules.app.service.IESignService;
|
|
|
import org.jeecg.modules.system.app.dto.AppContractInfoDTO;
|
|
|
-import org.jeecg.modules.system.app.entity.*;
|
|
|
+import org.jeecg.modules.system.app.entity.AppContractInfo;
|
|
|
+import org.jeecg.modules.system.app.entity.AppContractSign;
|
|
|
+import org.jeecg.modules.system.app.entity.AppOrder;
|
|
|
+import org.jeecg.modules.system.app.entity.FamilyMembers;
|
|
|
import org.jeecg.modules.system.app.mapper.*;
|
|
|
import org.jeecg.modules.system.entity.SysDepart;
|
|
|
import org.jeecg.modules.system.mapper.SysDepartMapper;
|
|
@@ -509,7 +512,7 @@ public class ESignServiceImpl implements IESignService {
|
|
|
List<SealInfoDTO> sealInfoDTOLists = new ArrayList<>();
|
|
|
List<SysDepart> sysDeparts = sysDepartMapper.selectList(Wrappers.<SysDepart>lambdaQuery().like(SysDepart::getOrgCode, orgCode));
|
|
|
sysDeparts.forEach(sysDepart -> {
|
|
|
- try {
|
|
|
+ if(sysDepart.getEsignOrgId() != null){
|
|
|
// 调用API获取响应
|
|
|
EsignHttpResponse response = orgOwnSealList(sysDepart.getEsignOrgId());
|
|
|
|
|
@@ -520,7 +523,9 @@ public class ESignServiceImpl implements IESignService {
|
|
|
if (!result.has("data")) {
|
|
|
throw new JeecgBootException("响应数据中缺少'data'字段");
|
|
|
}
|
|
|
-
|
|
|
+ if(result.get("code").getAsInt() != 0){
|
|
|
+ return;
|
|
|
+ }
|
|
|
JsonObject data = result.getAsJsonObject("data");
|
|
|
|
|
|
if (!data.has("seals")) {
|
|
@@ -538,7 +543,7 @@ public class ESignServiceImpl implements IESignService {
|
|
|
}
|
|
|
List<SealInfoDTO> sealInfoDTOList = gson.fromJson(filteredSeals, new TypeToken<List<SealInfoDTO>>(){}.getType());
|
|
|
sealInfoDTOList.forEach(a ->{
|
|
|
- a.setOrgCode(orgCode);
|
|
|
+ a.setOrgCode(sysDepart.getOrgCode());
|
|
|
try {
|
|
|
// 调用接口获取授权信息
|
|
|
EsignHttpResponse response1 = orgSealsExternalAuth(sysDepart.getEsignOrgId(), a.getSealId());
|
|
@@ -582,11 +587,6 @@ public class ESignServiceImpl implements IESignService {
|
|
|
}
|
|
|
});
|
|
|
sealInfoDTOLists.addAll(sealInfoDTOList);
|
|
|
-
|
|
|
- } catch (JsonSyntaxException e) {
|
|
|
- throw new JeecgBootException("JSON解析失败: " + e.getMessage(), e);
|
|
|
- } catch (Exception e) {
|
|
|
- throw new JeecgBootException("获取印章列表失败: " + e.getMessage(), e);
|
|
|
}
|
|
|
});
|
|
|
return sealInfoDTOLists;
|