diff --git a/src/com/ap/CorpusSourceCheck.java b/src/com/ap/CorpusSourceCheck.java index cdaa30927..0e48faa77 100644 --- a/src/com/ap/CorpusSourceCheck.java +++ b/src/com/ap/CorpusSourceCheck.java @@ -87,6 +87,9 @@ public class CorpusSourceCheck { return sResult; } String fcStage = this.getFcStageByProjectId(); + if("-2".equals(fcStage)){ + return "获取状态信息出现错误,请联系系统管理员!"; + } if ("AP".equals(fcStage)||"1".equals(fcStage)) { sResult = "S"; } else { @@ -106,9 +109,12 @@ public class CorpusSourceCheck { String sResult = null; try { String fcStage = this.getFcStageByProjectId(); + if("-2".equals(fcStage)){ + return "获取状态信息出现错误,请联系系统管理员!"; + } if("2".equals(fcStage)||"AP".equals(fcStage)){ return "S"; - }else{ + } else { sResult = "客户还未和资方签署合同"; } } catch (JBOException e) { @@ -135,7 +141,7 @@ public class CorpusSourceCheck { fcStage = "AP" ; }else{ BizObjectManager bomFR = JBOFactory.getBizObjectManager(FC_REQUEST.CLASS_NAME); - BizObject boFR = bomFR.createQuery("id=:projectId and del_flag='0'").setParameter("projectId", projectId).getSingleResult(false); + BizObject boFR = bomFR.createQuery("PROJECT_ID=:projectId and del_flag='0'").setParameter("projectId", projectId).getSingleResult(false); if(boFR!=null){ fcStage = boFR.getAttribute("FC_STAGE").toString(); } diff --git a/src_core/com/ample/fundchannel/doc/action/DocListAction.java b/src_core/com/ample/fundchannel/doc/action/DocListAction.java index 4af31a106..fa1a5ab20 100644 --- a/src_core/com/ample/fundchannel/doc/action/DocListAction.java +++ b/src_core/com/ample/fundchannel/doc/action/DocListAction.java @@ -101,12 +101,18 @@ public class DocListAction { BizObjectManager BBMbom = null; BizObject BBMBo = null; BBMbom = JBOFactory.getBizObjectManager(BT_BUSSINESS_MESSAGE.CLASS_NAME,tx); - BBMBo = BBMbom.createQuery("ID=:id").setParameter("id",messageId).getSingleResult(true); - BBMBo.setAttributeValue("is_read","has_read"); - BBMBo.setAttributeValue("message_status","has_process"); - BBMBo.setAttributeValue("read_time",currentTime); - BBMBo.setAttributeValue("finish_time",currentTime); - BBMbom.saveObject(BBMBo); + if(messageId!=null&&!"".equals(messageId)){ + BBMBo = BBMbom.createQuery("ID=:id").setParameter("id",messageId).getSingleResult(true); + }else { + BBMBo = BBMbom.createQuery("cparam like '%fcRequestId="+fcRequestId+"%'").getSingleResult(true); + } + if(BBMBo!=null){ + BBMBo.setAttributeValue("is_read","has_read"); + BBMBo.setAttributeValue("message_status","has_process"); + BBMBo.setAttributeValue("read_time",currentTime); + BBMBo.setAttributeValue("finish_time",currentTime); + BBMbom.saveObject(BBMBo); + } } public String getFrfId() {