Merge remote-tracking branch 'origin/ap007' into ap007
This commit is contained in:
commit
8341f254a4
@ -71,7 +71,11 @@ public class WriteScoreResultThread extends Thread{
|
||||
JBOTransaction tx = null;
|
||||
try{
|
||||
tx = JBOFactory.createJBOTransaction();
|
||||
JSONObject resJson = resStrJson.getJSONObject("APPLICATION");//申请号
|
||||
JSONObject resJsonTransaction = resStrJson.getJSONObject("TRANSACTION");//申请号
|
||||
JSONObject resJsonMessageBody = resJsonTransaction.getJSONObject("MESSAGE_BODY");//申请号
|
||||
JSONObject resJsonRequest = resJsonMessageBody.getJSONObject("REQUEST");//申请号
|
||||
JSONObject resJson = resJsonRequest.getJSONObject("APPLICATION");//申请号
|
||||
// JSONObject resJson = resStrJson.getJSONObject("APPLICATION");//申请号
|
||||
JSONObject baseInfoJson = resJson.getJSONObject("BASE_INFO");//申请号
|
||||
String projectNo = baseInfoJson.getString("APPLICATION_NUMBER");//申请号
|
||||
String flowNo = queryProjectTemp(projectNo);
|
||||
@ -113,33 +117,68 @@ public class WriteScoreResultThread extends Thread{
|
||||
rcScoreResultDetailBizObjectList = initScoreResultDetailBizObjectList(rcScoreResultDetail, flowNo, projectNo, resultId, date);
|
||||
}
|
||||
JSONObject personListObj = resJson.getJSONObject("NCIICS");//实名认证列表
|
||||
JSONArray personList = personListObj.getJSONArray("NCIIC");//实名认证列表
|
||||
for(int i = 0; i < personList.size(); i++){
|
||||
for(BizObject scoreResBiz : rcScoreResultDetailBizObjectList){
|
||||
if(personList.getJSONObject(i).getString("APPLICANTIDNUMBER").equals(scoreResBiz.getAttribute("person_card_no").toString())){
|
||||
scoreResBiz.setAttributeValue("third_state_code", personList.getJSONObject(i).getString("THIRDSTATECODE"));
|
||||
scoreResBiz.setAttributeValue("name_result", personList.getJSONObject(i).getString("NAMERESULT"));
|
||||
scoreResBiz.setAttributeValue("cert_id_result", personList.getJSONObject(i).getString("CERTINORESULT"));
|
||||
scoreResBiz.setAttributeValue("error_message", personList.getJSONObject(i).getString("ERRORMESSAGE"));
|
||||
if(null == personListObj) {
|
||||
ARE.getLog().warn("WriteScoreResultThread#saveUpdateScoreResult:【NCIICS is null 1】 projectNo=" + projectNo);
|
||||
}else{
|
||||
JSONArray personList = null;//实名认证列表
|
||||
if(personListObj.size() > 1){
|
||||
personList = personListObj.getJSONArray("NCIIC");//评分列表
|
||||
}else if(personListObj.size() == 1){
|
||||
personList = new JSONArray();
|
||||
personList.add(personListObj.getJSONObject("NCIIC"));
|
||||
}
|
||||
if(null == personList) {
|
||||
ARE.getLog().warn("WriteScoreResultThread#saveUpdateScoreResult:【NCIICS is null 2】 projectNo=" + projectNo);
|
||||
}else {
|
||||
for(int i = 0; i < personList.size(); i++){
|
||||
for(BizObject scoreResBiz : rcScoreResultDetailBizObjectList){
|
||||
if(personList.getJSONObject(i).getString("APPLICANTIDNUMBER").equals(scoreResBiz.getAttribute("person_card_no").toString())){
|
||||
scoreResBiz.setAttributeValue("third_state_code", personList.getJSONObject(i).getString("THIRDSTATECODE"));
|
||||
scoreResBiz.setAttributeValue("name_result", personList.getJSONObject(i).getString("NAMERESULT"));
|
||||
scoreResBiz.setAttributeValue("cert_id_result", personList.getJSONObject(i).getString("CERTINORESULT"));
|
||||
scoreResBiz.setAttributeValue("error_message", personList.getJSONObject(i).getString("ERRORMESSAGE"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
JSONObject scoreResultsObj = resJson.getJSONObject("BLAZERESULT");//评分列表
|
||||
JSONObject scoreResultsObjRes = scoreResultsObj.getJSONObject("SCORERESULTS");//评分列表
|
||||
JSONArray scoreResults = scoreResultsObjRes.getJSONArray("SCORERESULT");//评分列表
|
||||
for(int i = 0; i < scoreResults.size(); i++){
|
||||
for(BizObject scoreResBiz : rcScoreResultDetailBizObjectList){
|
||||
if(scoreResults.getJSONObject(i).getString("ID_CARD_NBR").equals(scoreResBiz.getAttribute("person_card_no").toString())){
|
||||
scoreResBiz.setAttributeValue("score_level", scoreResults.getJSONObject(i).getString("SCORE_LEVEL"));
|
||||
if(null == scoreResultsObj) {
|
||||
ARE.getLog().warn("WriteScoreResultThread#saveUpdateScoreResult:【BLAZERESULT is null 1】 projectNo=" + projectNo);
|
||||
}else {
|
||||
JSONObject scoreResultsObjRes = scoreResultsObj.getJSONObject("SCORERESULTS");//评分列表
|
||||
if (null == scoreResultsObjRes) {
|
||||
ARE.getLog().warn("WriteScoreResultThread#saveUpdateScoreResult:【BLAZERESULT is null 2】 projectNo=" + projectNo);
|
||||
} else {
|
||||
JSONArray scoreResults = null;
|
||||
if(scoreResultsObjRes.size() > 1){
|
||||
scoreResults = scoreResultsObjRes.getJSONArray("SCORERESULT");//评分列表
|
||||
}else if(scoreResultsObjRes.size() == 1){
|
||||
scoreResults = new JSONArray();
|
||||
scoreResults.add(scoreResultsObjRes.getJSONObject("SCORERESULT"));
|
||||
}
|
||||
if (null == scoreResults) {
|
||||
ARE.getLog().warn("WriteScoreResultThread#saveUpdateScoreResult:【BLAZERESULT is null 3】 projectNo=" + projectNo);
|
||||
} else {
|
||||
for(int i = 0; i < scoreResults.size(); i++){
|
||||
JSONObject indexResJson = scoreResults.getJSONObject(i);
|
||||
String idCard = indexResJson.getString("ID_CARD_NBR");
|
||||
for(BizObject scoreResBiz : rcScoreResultDetailBizObjectList){
|
||||
if(idCard.equals(scoreResBiz.getAttribute("person_card_no").toString())){
|
||||
scoreResBiz.setAttributeValue("score_level", scoreResults.getJSONObject(i).getString("SCORE_LEVEL"));
|
||||
}
|
||||
}
|
||||
}
|
||||
for(BizObject scoreResBiz : rcScoreResultDetailBizObjectList){//保存评分明细
|
||||
scoreResBiz.setAttributeValue("update_time", date);
|
||||
scoreResBiz.setAttributeValue("third_result_url", "www.baidu.com");
|
||||
scoreResBiz.setAttributeValue("pboc_result_url", "www.baidu.com");
|
||||
rcScoreResultDetail.saveObject(scoreResBiz);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for(BizObject scoreResBiz : rcScoreResultDetailBizObjectList){//保存评分明细
|
||||
scoreResBiz.setAttributeValue("update_time", date);
|
||||
scoreResBiz.setAttributeValue("third_result_url", "www.baidu.com");
|
||||
scoreResBiz.setAttributeValue("pboc_result_url", "www.baidu.com");
|
||||
rcScoreResultDetail.saveObject(scoreResBiz);
|
||||
}
|
||||
}
|
||||
// 日志保存
|
||||
BizObjectManager rcScoreResultLog = JBOFactory.getBizObjectManager(RC_SCORE_RESULT_LOG.CLASS_NAME, tx);
|
||||
@ -174,11 +213,6 @@ public class WriteScoreResultThread extends Thread{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
private String queryProjectTemp(String projectNo) throws JBOException {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user