修改资料清单历史显示问题

This commit is contained in:
tangfutang 2020-06-03 14:02:00 +08:00
parent c90e24bf83
commit 69a6a7e00e
2 changed files with 43 additions and 7 deletions

View File

@ -69,18 +69,24 @@
String projectId = flow.getAttribute("proj_id").getString();
//判断是否存在,不存在就从配置表倒到临时表
DocListInitAction.initDocList(docParam,other,docClassItemno,CurConfig);
//DocListInitAction.initDocList(docParam,other,docClassItemno,CurConfig);
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
String otherWhere=DocListInitAction.getFlowWhere(flow,"","rela");
doTemp.appendJboWhere(otherWhere);
doTemp.appendJboWhere(" and O.doc_Class_Itemno in ("+s+")");
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
doTemp.setVisible("operation", false);
String otherWhere=DocListInitAction.getHistoryFlowWhere(flow,"rela");
System.out.println(otherWhere);
doTemp.appendJboWhere(DocListInitAction.getHistoryFlowWhere(flow,"rela"));
}else{
//判断是否存在,不存在就从配置表倒到临时表
DocListInitAction.initDocList(docParam,other,docClassItemno,CurConfig);
String otherWhere=DocListInitAction.getFlowWhere(flow,"","rela");
doTemp.appendJboWhere(otherWhere);
doTemp.appendJboWhere(" and O.doc_Class_Itemno in ("+s+")");
}
doTemp.setLockCount(2);
if("ContractSupportApply".equals(apply)&&"0010".equals(phaseNo)){
RightType = "false";
}
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
doTemp.setVisible("operation", false);
}
ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request);
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "0";

View File

@ -11,8 +11,10 @@ import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.UUID;
import com.amarsoft.awe.Configure;
import com.amarsoft.awe.util.Transaction;
import jbo.app.tenwa.doc.LB_DOCATTRIBUTE;
import jbo.app.tenwa.doc.LB_DOCCONFIG;
import jbo.app.tenwa.doc.LB_DOCLIBRARY;
@ -20,9 +22,12 @@ import jbo.app.tenwa.doc.LB_DOCRELATIVE;
import jbo.app.tenwa.doc.LM_MAILONLINE_DOC;
import jbo.app.tenwa.doc.LM_MAILONLINE_DOC_TEMP;
import jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT;
import jbo.sys.FLOW_OBJECT;
import com.amarsoft.are.ARE;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.BizObjectQuery;
import com.amarsoft.are.jbo.JBOException;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
@ -587,4 +592,29 @@ public class DocListInitAction {
}
return list;
}
public static String getHistoryFlowWhere(BizObject flow, String value)
throws Exception {
String table = "";
if (value.length() > 0) {
table = value + ".";
}
String FlowName = flow.getAttribute("flow_name").getString();
String proj_id = flow.getAttribute("proj_id").getString();
String contract_id = flow.getAttribute("contract_id").getString();
String flowunid = flow.getAttribute("flow_unid").getString();
String otherWhere = "";
if("ºÏÍ¬ÖÆ×÷Á÷³Ì".equals(FlowName)){
otherWhere = " and "+table +"contract_id='"+contract_id+"' and "+table+"objecttype is null";
}else{
BizObject fo = JBOFactory.getBizObjectManager(FLOW_OBJECT.CLASS_NAME).createQuery(" objectno=:objectno ").setParameter("objectno", flowunid).getSingleResult(false);
otherWhere = " and "+table +"proj_id='"+proj_id+"' and "+table+"objecttype='"+fo.getAttribute("flowno")+"'";
}
return otherWhere;
}
}