业务变更、合同制作、合同变更添加批量下载功能,微信订单号数据已纯在提示语

This commit is contained in:
tangfutang 2020-03-23 22:24:56 +08:00
parent a09ec8e8ca
commit adf65c7c9b
6 changed files with 97 additions and 8 deletions

View File

@ -27,6 +27,26 @@
sTempletNo="FlowPayDocList";
}
String type=CurPage.getParameter("type");
if(type==null)type="";
String docClassItemno=CurPage.getParameter("docList");
String[] itemnos=docClassItemno.split(",");
String s="";
String classItemno ="";
for(int i=0;i<itemnos.length;i++){
s+="'"+itemnos[i]+"',";
}
if(s.length()>0){
s=s.substring(0, s.length()-1);
classItemno = s.replace(",", "@");
}
if("ProjectCreditFlow".equals(sObjectType)){
sTempletNo = "FlowPayDocList" ;
}
String compClientID = request.getParameter("CompClientID");
ASObjectModel doTemp = new ASObjectModel(sTempletNo);
@ -40,7 +60,7 @@
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "0";
dwTemp.setPageSize(50);
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
if(!"BusinessChangeFlow".equals(sObjectType) && !"BContractApproveFlow".equals(sObjectType) && !"BContractChangeFlow".equals(sObjectType) && ((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true")))){
dwTemp.ReadOnly = "1";//只读模式
RightType="ReadOnly";
isShowButton=false;
@ -53,6 +73,7 @@
sButtons=new String[][]{
{"true","","Button","保存","保存所有修改","saveRecord()","","","",""},
{"true","","Button","ÅúÁ¿ÏÂÔØ","ÅúÁ¿ÏÂÔØ","downloadZipFile()","","","","btn_icon_down"},
};
%>
@ -191,5 +212,18 @@ function deleteFile(id){
heping();
}
function downloadZipFile(){
var objectType="<%=sObjectType%>";
var projectId="<%=ProjectId%>";
var classItemnos="<%=classItemno%>";
var sParams="projectId="+projectId+",classItemnos="+classItemnos+",objectType="+objectType;
var ids = RunJavaMethodTrans("com.tenwa.doc.action.DocListAction","changeFlowgetLibraryIds",sParams);
var filePath="<%=CurConfig.getConfigure("FileSavePath")%>";
var param="&flowunid=<%=flowunid%>&type=<%=type%>&ids="+ids;
if(!frames["downloadTemplate"]) $("<iframe name='downloadTemplate' style='display:none;'></iframe>").appendTo("body");
window.open(sWebRootPath+"/servlet/view/docFlowDownloadZipServlet?CompClientID=<%=sCompClientID%>&filePath="+filePath+param, "downloadTemplate");
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -85,10 +85,10 @@
dwTemp.Style="1"; //--设置为Grid风格--
dwTemp.ReadOnly = "0";
dwTemp.setPageSize(500);
if((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true"))){
if(!"BusinessApplyFlow".equals(sObjectType) && ((null!=RightType&&RightType.equals("ReadOnly"))||(null!=ishistory&&ishistory.equals("true")))){
dwTemp.ReadOnly = "1";//只读模式
RightType="ReadOnly";
isShowButton=false;
isShowButton=false;
}else{
isShowButton=true;
}

View File

@ -32,6 +32,12 @@ border-bottom:1px solid #BCBCBC;}
if("BusinessChangeFlow".equals(sObjectType)){
String ProjectId = Sqlca.getString("SELECT proj_id FROM flow_bussiness_object WHERE flow_unid='"+flowunid+"'");
otherWhere = " and rela.proj_id='"+ProjectId+"' and (O.objecttype='"+sObjectType+"' or O.objecttype='BusinessApplyFlow')";
}else if("BContractApproveFlow".equals(sObjectType)){
String ProjectId = Sqlca.getString("SELECT proj_id FROM flow_bussiness_object WHERE flow_unid='"+flowunid+"'");
otherWhere = " and rela.proj_id='"+ProjectId+"' and (O.objecttype='"+sObjectType+"' or O.objecttype='BusinessApplyFlow' or O.objecttype='BusinessChangeFlow')";
}else if ("BContractChangeFlow".equals(sObjectType)){
String ProjectId = Sqlca.getString("SELECT proj_id FROM flow_bussiness_object WHERE flow_unid='"+flowunid+"'");
otherWhere = " and rela.proj_id='"+ProjectId+"' and (O.objecttype='"+sObjectType+"' or O.objecttype='BusinessApplyFlow' or O.objecttype='BusinessChangeFlow' or O.objecttype='BContractApproveFlow' )";
}else{
BizObject flow=GetFlowAction.getFlowBussinessObject(flowunid);//Á÷³Ì¶ÔÏó
otherWhere=DocListInitAction.getFlowWhere(flow,"","rela");
@ -46,7 +52,7 @@ border-bottom:1px solid #BCBCBC;}
if("query".equals(query)){
otherWhere = otherWhere+" and rela.objecttype in ('BusinessApplyFlow','FundPaymentCarFlow','MortgageFileFlow') ";
}else{
if(!"BusinessChangeFlow".equals(sObjectType)){
if(!"BusinessChangeFlow".equals(sObjectType) && !"BContractApproveFlow".equals(sObjectType) && !"BContractChangeFlow".equals(sObjectType) ){
otherWhere = otherWhere+" and rela.objecttype='"+sObjectType+"' ";
}
}

View File

@ -38,6 +38,14 @@
sTempletNo="ChangeFlowLBDocumentList";
String ProjectId = Sqlca.getString("SELECT proj_id FROM flow_bussiness_object WHERE flow_unid='"+flowunid+"'");
otherWhere = " and O.proj_id='"+ProjectId+"' and (O.objecttype='"+sObjectType+"' or O.objecttype='BusinessApplyFlow')";
}else if("BContractApproveFlow".equals(sObjectType)){
sTempletNo="ChangeFlowLBDocumentList";
String ProjectId = Sqlca.getString("SELECT proj_id FROM flow_bussiness_object WHERE flow_unid='"+flowunid+"'");
otherWhere = " and O.proj_id='"+ProjectId+"' and (O.objecttype='"+sObjectType+"' or O.objecttype='BusinessApplyFlow' or O.objecttype='BusinessChangeFlow')";
}else if("BContractChangeFlow".equals(sObjectType)){
sTempletNo="ChangeFlowLBDocumentList";
String ProjectId = Sqlca.getString("SELECT proj_id FROM flow_bussiness_object WHERE flow_unid='"+flowunid+"'");
otherWhere = " and O.proj_id='"+ProjectId+"' and (O.objecttype='"+sObjectType+"' or O.objecttype='BusinessApplyFlow' or O.objecttype='BusinessChangeFlow' or O.objecttype='BContractApproveFlow' )";
}else{
BizObject flow=GetFlowAction.getFlowBussinessObject(flowunid);//流程对象
otherWhere= otherWhere+DocListInitAction.getFlowWhere(flow,"","O");
@ -69,7 +77,7 @@
dwTemp.genHTMLObjectWindow(sObjectType);
//0、是否展示 1、 权限控制 2、 展示类型 3、按钮显示名称 4、按钮解释文字 5、按钮触发事件代码 6、 7、 8、 9、图标CSS层叠样式 10、风格
String sButtons[][] =null;
if((RightType!=null&&RightType.equals("ReadOnly"))||(null!=isHistory&&isHistory.equals("true"))){
if(!"BusinessApplyFlow".equals(sObjectType) && !"BusinessChangeFlow".equals(sObjectType) && !"BContractApproveFlow".equals(sObjectType)&& !"BContractChangeFlow".equals(sObjectType) && ((RightType!=null&&RightType.equals("ReadOnly"))||(null!=isHistory&&isHistory.equals("true")))){
RightType="ReadOnly";
sButtons=new String[][]{
};

View File

@ -214,6 +214,45 @@ public class DocListAction {
return libId;
}
public String changeFlowgetLibraryIds(JBOTransaction tx) throws JBOException{
String itemnos = classItemnos.replace("@", ",");
String sql = "";
if("BusinessChangeFlow".equals(objectType)){
sql = "SELECT O.ID from O "
+ " left join jbo.app.tenwa.doc.LB_DOCRELATIVE rela on rela.id=O.relative_Id"
+ " where rela.proj_id='"+projectId+"' and ( rela.objecttype='"+objectType+"' or rela.objecttype='BusinessApplyFlow') "
+ " and O.doc_Class_Itemno in ("+itemnos+")"
+ " ORDER BY DOC_CLASS_ITEMNO,Serial_Num";
}else if ("BContractApproveFlow".equals(objectType)){
sql = "SELECT O.ID from O "
+ " left join jbo.app.tenwa.doc.LB_DOCRELATIVE rela on rela.id=O.relative_Id"
+ " where rela.proj_id='"+projectId+"' and ( rela.objecttype='"+objectType+"' or rela.objecttype='BusinessApplyFlow' or rela.objecttype='BusinessChangeFlow' ) "
+ " and O.doc_Class_Itemno in ("+itemnos+")"
+ " ORDER BY DOC_CLASS_ITEMNO,Serial_Num";
}else if ("BContractChangeFlow".equals(objectType)){
sql = "SELECT O.ID from O "
+ " left join jbo.app.tenwa.doc.LB_DOCRELATIVE rela on rela.id=O.relative_Id"
+ " where rela.proj_id='"+projectId+"' and ( rela.objecttype='"+objectType+"' or rela.objecttype='BusinessApplyFlow' or rela.objecttype='BusinessChangeFlow' or rela.objecttype='BContractApproveFlow') "
+ " and O.doc_Class_Itemno in ("+itemnos+")"
+ " ORDER BY DOC_CLASS_ITEMNO,Serial_Num";
}else{
sql = "SELECT O.ID from O "
+ " left join jbo.app.tenwa.doc.LB_DOCRELATIVE rela on rela.id=O.relative_Id"
+ " where rela.proj_id='"+projectId+"' and rela.objecttype='"+objectType+"'"
+ " and O.doc_Class_Itemno in ("+itemnos+")"
+ " ORDER BY DOC_CLASS_ITEMNO,Serial_Num";
}
BizObjectManager relaBm = JBOFactory
.getBizObjectManager(LB_DOCLIBRARY.CLASS_NAME);
List<BizObject> rela = relaBm.createQuery(sql).getResultList(false);
String libId = "";
for(BizObject biz : rela){
libId += biz.getAttribute("ID").toString()+"@";
}
libId = libId.substring(0, libId.length()-1);
return libId;
}
public String getProjectId() {

View File

@ -43,6 +43,7 @@ public class BillstopayImport extends BaseImportExcelCallBack{
List<Map<String, String>> list = new ArrayList<Map<String,String>>();
Map<String, String> map = new HashMap<String, String>();
List<String> arrayList = new ArrayList<String>();
List<String> exclarrayList = new ArrayList<String>();
for(BizObject bo:importObjects){
WX_order_number=bo.getAttribute("WX_order_number").getString();
arrayList.add(WX_order_number);
@ -51,13 +52,14 @@ public class BillstopayImport extends BaseImportExcelCallBack{
List<Map<String, String>> dataList = DataOperatorUtil.getDataBySql(Sqlca, sql1, null);
// Óнá¹û¼¯, ˵Ã÷ÖØ¸´
if(dataList.size()>0){
error=",【微信订单号: "+WX_order_number+"";
//error=",【微信订单号: "+WX_order_number+"";
exclarrayList.add(WX_order_number);
flag=true;
}
}
if(flag) {
error = error.substring(1);
throw new BusinessException(error+"已存在 ");
//error = error.substring(1);
throw new BusinessException("excl中的微信订单号:"+String.join(", ", exclarrayList)+"已存在 ");
}
long count = arrayList.stream().distinct().count();
boolean isRepeat = count < arrayList.size();