根据接口平台返回内容二次优化

This commit is contained in:
ap007 2021-07-07 16:12:15 +08:00
parent 71bf132799
commit 39efcf106b
5 changed files with 14 additions and 26 deletions

View File

@ -74,7 +74,10 @@
frfBo.setAttributeValue("FC_REQUEST_ID",params.get("fcRequestId"));
frfBo.setAttributeValue("FC_FLOW_TYPE",params.get("fcFlowType"));
frfBo.setAttributeValue("FC_FILE_CODE",params.get("fcFileCode"));
frfBo.setAttributeValue("FC_FILE_TYPE",params.get("type"));
String fileType = params.get("type");
String fcFileType = fileType.substring(fileType.lastIndexOf("/")+1).toLowerCase();
frfBo.setAttributeValue("FC_FILE_TYPE",fcFileType);
frfBo.setAttributeValue("FILE_TYPE",fileType);
frfBo.setAttributeValue("FILE_NAME",params.get("name"));
frfBo.setAttributeValue("FILE_PATH",params.get("filePath"));
frfBo.setAttributeValue("FC_FILE_STS","0");

View File

@ -34,9 +34,6 @@
var sUrl = "/Tenwa/Apzl/productCorpus/LbProductCorpusUpDown.jsp";
AsDialog.PopView(sUrl,'productId='+productId,'dialogWidth=950px;dialogHeight=500px;resizable=no;scrollbars=no;status:yes;maximize:no;help:no;',function(){reloadSelf();},'新建');
},"请选择产品",'');
//将返回的产品ID传输到编辑的info页面info页面只是展示作用然后list页面新增的时候再保存。
//编辑按钮不采用在后面添加超连接形式,曾经有的页面采用这种方式数据量大时特别卡。采用系统封装按钮事件来实现。
}
function viewAndEdit(){
var sUrl = "/Tenwa/Apzl/productCorpus/LbProductCorpusUpDown.jsp";

View File

@ -3,12 +3,12 @@
<%
String fcRequestId = CurPage.getParameter("fcRequestId");
//todo 提交后将消息已读并已处理
String messageId = CurPage.getParameter("messageid");
String messageId = CurPage.getParameter("messageId");
String channelNo=CurPage.getParameter("channelNo");
String projectId=CurPage.getParameter("projectId");
String contractId=CurPage.getParameter("contractId");
String isReadOnly = CurPage.getParameter("isReadOnly");
String params="fcRequestId="+fcRequestId+"&channelNo="+channelNo+"&projectId="+projectId+"&contractId="+contractId+"&isReadOnly="+isReadOnly+"messageId"+messageId;
String params="fcRequestId="+fcRequestId+"&channelNo="+channelNo+"&projectId="+projectId+"&contractId="+contractId+"&isReadOnly="+isReadOnly+"&messageId="+messageId;
//参数0.是否显示, 1.标题2.URL3参数串, 4. Strip高度(默认600px)5. 是否有关闭按钮(默认无) 6. 是否缓存(默认是)
@ -24,6 +24,7 @@
String sTabStrip[][] = {
{"true", "业务申请资料", "/com/tenwa/apzl/CorpusSource/FcRequestFileList.jsp",params+"&fcFlowType=BusinessApplyFlow", "", "", "false"},
{"true", "放款申请资料", "/com/tenwa/apzl/CorpusSource/FcRequestFileList.jsp",params+"&fcFlowType=FundPaymentCarFlow", "", "", "false"},
{"true", "´ûºó×ÊÁÏ", "/com/tenwa/apzl/CorpusSource/FcRequestFileList.jsp",params+"&fcFlowType=PostLoanFlow", "", "", "false"},
};
%>
<%@ include file="/Resources/CodeParts/Tab01.jsp"%>

View File

@ -6,7 +6,6 @@ import com.amarsoft.are.util.StringFunction;
import jbo.com.tenwa.entity.comm.message.BT_BUSSINESS_MESSAGE;
import jbo.oti.FC_REQUEST;
import jbo.oti.FC_REQUEST_FILE;
import jbo.oti.FC_REQUEST_FILE_PUSH;
import java.util.List;
@ -67,7 +66,7 @@ public class DocListAction {
BizObjectManager FRFbom = null;
FRFbom = JBOFactory.getBizObjectManager(FC_REQUEST_FILE.CLASS_NAME);
List<BizObject> FRFBO = FRFbom.createQuery("select FC_FILE_STS from O where FC_REQUEST_ID=:fcRequestId and FC_FLOW_TYPE=:fcFlowType and FC_FILE_CODE=:fcFileCode group by FC_FILE_STS").setParameter("fcRequestId", fcRequestId).setParameter("fcFlowType", fcFlowType).setParameter("fcFileCode", fcFileCode).getResultList(false);
if (FRFBO.size() == 1 && FRFBO.get(0).getAttribute("FC_FILE_STS") != null && "0".equals(FRFBO.get(0).getAttribute("FC_FILE_STS").toString())) {
if (FRFBO.size() == 1 && FRFBO.get(0).getAttribute("FC_FILE_STS") != null && "1".equals(FRFBO.get(0).getAttribute("FC_FILE_STS").toString())) {
return "Y";
}
return "N";
@ -77,14 +76,13 @@ public class DocListAction {
try {
updateRequestFileStatus(tx);
setMessageRead(tx);
insertRequestFilePush(tx);
} catch (JBOException e) {
} catch (Exception e) {
e.printStackTrace();
return "提交出现错误";
}
return "S";
}
public void updateRequestFileStatus(JBOTransaction tx) throws JBOException {
public void updateRequestFileStatus(JBOTransaction tx) throws Exception {
BizObjectManager FRbom = null;
BizObject FRBo = null;
FRbom = JBOFactory.getBizObjectManager(FC_REQUEST.CLASS_NAME,tx);
@ -92,24 +90,13 @@ public class DocListAction {
String supplementSTS = FRBo.getAttribute("SUPPLEMENT_STS")==null?"":FRBo.getAttribute("SUPPLEMENT_STS").toString();
if("0".equals(supplementSTS)){
ARE.getLog().warn("邮储请求ID"+fcRequestId + "的合同无需补充资料,却显示了资料提交的按钮");
throw new Exception("提交出现错误!");
}else if("1".equals(supplementSTS)||"".equals(supplementSTS)){
FRBo.setAttributeValue("SUPPLEMENT_STS","2");
FRbom.saveObject(FRBo);
}
}
public void insertRequestFilePush(JBOTransaction tx) throws JBOException {
BizObjectManager FRFPbom = null;
BizObject FRFPBo = null;
FRFPbom = JBOFactory.getBizObjectManager(FC_REQUEST_FILE_PUSH.CLASS_NAME,tx);
FRFPBo = FRFPbom.newObject();
FRFPBo.setAttributeValue("FC_REQUEST_ID",fcRequestId);
FRFPBo.setAttributeValue("PUSH_STS","0");
FRFPBo.setAttributeValue("PUSH_STS_DESC","δÌá½»");
FRFPBo.setAttributeValue("CREATE_TIME",currentTime);
FRFPBo.setAttributeValue("UPDATE_TIME",currentTime);
FRFPBo.setAttributeValue("DEL_FLAG","0");
FRFPbom.saveObject(FRFPBo);
}
public void setMessageRead(JBOTransaction tx) throws JBOException {
BizObjectManager BBMbom = null;
BizObject BBMBo = null;

View File

@ -29,7 +29,7 @@ public class DocListCache {
for(BizObject bo : list){
JSONObject boJson = new JSONObject();
boJson.put("id",bo.getAttribute("id").getString());
boJson.put("FC_FILE_TYPE",bo.getAttribute("FC_FILE_TYPE").getString());
boJson.put("FILE_TYPE",bo.getAttribute("FILE_TYPE").getString());
boJson.put("FC_FLOW_TYPE",bo.getAttribute("FC_FLOW_TYPE").getString());
boJson.put("FILE_NAME",bo.getAttribute("FILE_NAME").getString());
boJson.put("FILE_PATH",bo.getAttribute("FILE_PATH").getString());
@ -47,7 +47,7 @@ public class DocListCache {
for(int i=0;i<list.size();i++){
JSONObject bo=list.get(i);
sb.append("\"" +i+"\""+":{");
String type= bo.get("FC_FILE_TYPE").toString();
String type= bo.get("FILE_TYPE").toString();
if(type.indexOf("image")>=0){
sb.append("\"image\":\""+true+"\",");
}else{