diff --git a/WebContent/Tenwa/Comm/Document/LBDocumentUpload.jsp b/WebContent/Tenwa/Comm/Document/LBDocumentUpload.jsp index 68f05a08a..c5e84aa39 100644 --- a/WebContent/Tenwa/Comm/Document/LBDocumentUpload.jsp +++ b/WebContent/Tenwa/Comm/Document/LBDocumentUpload.jsp @@ -12,6 +12,7 @@ myAmarsoftUpload.upload(); String oneClassify=(String)myAmarsoftUpload.getRequest().getParameter("ONE_CLASSIFY");//一级分类 + oneClassify = oneClassify==null?"004001":oneClassify; String docId=(String)myAmarsoftUpload.getRequest().getParameter("DOC_NAME"); //二级分类 String sFileName = myAmarsoftUpload.getFiles().getFile(0).getFileName(); //文件名称 String Remark= (String)myAmarsoftUpload.getRequest().getParameter("REMARK"); //备注 diff --git a/src_core/com/tenwa/doc/action/DocListInitAction.java b/src_core/com/tenwa/doc/action/DocListInitAction.java index 3a7ad773e..7569b87f7 100644 --- a/src_core/com/tenwa/doc/action/DocListInitAction.java +++ b/src_core/com/tenwa/doc/action/DocListInitAction.java @@ -218,12 +218,11 @@ public class DocListInitAction { String otherWhere=""; if(idlst.length()>0){ - //otherWhere=" and "+table+"flow_unid='"+flowunid+"'"; otherWhere=" and O.id in("+idlst+")"; - }else if(contract_id.length()>0&&"".equals(getDocType(FlowName))){ + }else if(contract_id.length()>0&&!"flow".equals(getDocType(FlowName))){ otherWhere=" and "+table+"proj_id='"+proj_id+"' and ("+table+"contract_id='' or "+table+"contract_id is null or "+table+"contract_id='"+contract_id+"') "; - }else if(proj_id.length()>0&&"".equals(getDocType(FlowName))){ - otherWhere=" and "+table+"proj_id='"+proj_id+"'"; + }else if(proj_id.length()>0&&!"flow".equals(getDocType(FlowName))){ + otherWhere=" and "+table+"proj_id='"+proj_id+"' and "+table+"objecttype='"+getDocType(FlowName)+"'"; }else{ otherWhere=" and "+table+"flow_unid='"+flowunid+"'"; } @@ -248,7 +247,7 @@ public class DocListInitAction { if(flowno!=null){ return "flow"; } - return ""; + return ds.get(0).get("FLOWNO"); } //根据Key读取Value public static String GetValueByKey(String filePath, String key) { diff --git a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/SaveBusinessStatus.java b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/SaveBusinessStatus.java index ae39dc8ed..743045c6e 100644 --- a/src_tenwa/com/tenwa/lease/flow/project/commbusiness/SaveBusinessStatus.java +++ b/src_tenwa/com/tenwa/lease/flow/project/commbusiness/SaveBusinessStatus.java @@ -1,6 +1,7 @@ package com.tenwa.lease.flow.project.commbusiness; import jbo.com.tenwa.lease.carbrand.BUSINESS_STATUS; +import jbo.com.tenwa.lease.comm.LB_CONTRACT_INFO; import com.amarsoft.are.jbo.BizObject; import com.amarsoft.are.jbo.BizObjectManager; @@ -24,9 +25,18 @@ public class SaveBusinessStatus extends BaseBussiness { String userid = this.getAttribute("CurUserID").toString(); String ContractNumberOrProjectNo = ""; if(Integer.parseInt(Status)<11){ - ContractNumberOrProjectNo = this.getAttribute("ProjectName").toString(); + String pname = this.getAttribute("ProjectName").toString(); + ContractNumberOrProjectNo = pname.substring(0, pname.indexOf("-")); + }else if(this.getAttribute("ContractNo")==null){ + if(this.getAttribute("contract_number")!=null){ + ContractNumberOrProjectNo = this.getAttribute("contract_number").toString(); + }else{ + String ContractId = this.getAttribute("ContractId").toString(); + BizObject cibo = JBOFactory.getBizObjectManager(LB_CONTRACT_INFO.CLASS_NAME).createQuery("ID=:ID").setParameter("ID", ContractId).getSingleResult(false); + ContractNumberOrProjectNo = cibo.getAttribute(LB_CONTRACT_INFO.CONTRACT_NUMBER).getString(); + } }else{ - ContractNumberOrProjectNo = this.getAttribute("ContractNo")==null?this.getAttribute("contract_number").toString():this.getAttribute("ContractNo").toString(); + ContractNumberOrProjectNo = this.getAttribute("ContractNo").toString(); } ASUser user = ASUser.getUser(userid, Sqlca); BizObjectManager bsbom = JBOFactory.getBizObjectManager(BUSINESS_STATUS.CLASS_NAME, Sqlca);