实现机构认证功能
This commit is contained in:
+46
@@ -10,9 +10,11 @@ import com.ruoyi.common.exception.EsignDemoException;
|
||||
import com.ruoyi.common.utils.file.SaaSAPIFileUtils;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseAttach;
|
||||
import com.ruoyi.wisdomarbitrate.domain.DeptIdentify;
|
||||
import com.ruoyi.wisdomarbitrate.domain.SealSignRecord;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.CaseApplicationMapper;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.CaseAttachMapper;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.DeptIdentifyMapper;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.SealSignRecordMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
@@ -32,6 +34,8 @@ public class FixSelectFlowDetailUtils {
|
||||
private SealSignRecordMapper sealSignRecordMapper;
|
||||
@Autowired
|
||||
private CaseAttachMapper caseAttachMapper;
|
||||
@Autowired
|
||||
private DeptIdentifyMapper deptIdentifyMapper;
|
||||
|
||||
@Scheduled(cron = "0/3 * * * * ?")
|
||||
@Transactional
|
||||
@@ -121,6 +125,48 @@ public class FixSelectFlowDetailUtils {
|
||||
}
|
||||
|
||||
|
||||
@Scheduled(cron = "0/10 * * * * ?")
|
||||
@Transactional
|
||||
public void fixExecuteSelectDeptIndentifyUtils() throws EsignDemoException {
|
||||
Gson gson = new Gson();
|
||||
DeptIdentify deptIdentify = new DeptIdentify();
|
||||
deptIdentify.setIdentifyStatus(0);
|
||||
List<DeptIdentify> deptIdentifysnew = deptIdentifyMapper.selectDeptIdentifylist(deptIdentify);
|
||||
if(deptIdentifysnew!=null&&deptIdentifysnew.size()>0){
|
||||
for (int i = 0; i < deptIdentifysnew.size(); i++) {
|
||||
EsignHttpResponse identifyInfo = SignAward.getDeptIdentifyInfo(deptIdentifysnew.get(i));
|
||||
JsonObject identifyInfoJsonObject = gson.fromJson(identifyInfo.getBody(), JsonObject.class);
|
||||
JsonObject identifyInfoData = identifyInfoJsonObject.getAsJsonObject("data");
|
||||
int realnameStatus = identifyInfoData.get("realnameStatus").getAsInt();
|
||||
String orgId = identifyInfoData.get("orgId").getAsString();
|
||||
if(realnameStatus==1){
|
||||
EsignHttpResponse identifyInfo1 = SignAward.deptIdentifySealList(orgId);
|
||||
JsonObject identifyInfoJsonObject1 = gson.fromJson(identifyInfo1.getBody(), JsonObject.class);
|
||||
JsonObject identifyInfoData1 = identifyInfoJsonObject1.getAsJsonObject("data");
|
||||
JsonArray sealArray = identifyInfoData1.get("seals").getAsJsonArray();
|
||||
String sealNames = "";
|
||||
if(sealArray.size()>0){
|
||||
for (int j = 0; j < sealArray.size(); j++) {
|
||||
JsonObject sealObject = (JsonObject)sealArray.get(j);
|
||||
String sealName = sealObject.get("sealName").toString();
|
||||
String sealNamenew = sealName.substring(1,sealName.length()-1);
|
||||
sealNames += sealNamenew +",";
|
||||
}
|
||||
}
|
||||
String sealName = sealNames.substring(0,sealNames.length()-1);
|
||||
DeptIdentify deptIdentifynew = deptIdentifysnew.get(i);
|
||||
deptIdentifynew.setIdentifyStatus(1);
|
||||
deptIdentifynew.setSealName(sealName);
|
||||
int row = deptIdentifyMapper.updateDeptIdentify(deptIdentifynew);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user