This commit is contained in:
liujiaji 2018-08-15 13:27:37 +08:00
parent 729df6d552
commit 7fae9a5778
7 changed files with 101 additions and 14 deletions

View File

@ -109,7 +109,7 @@ public class BusinessDocDetailServiceImpl implements BusinessDocDetailService {
// 加载附件
// carAttributes
boolean flag = InitDocListTools.initDocList(flowUnid, fieldMap.get("userid").toString(), carAttributes);
boolean flag = InitDocListTools.initDocList(flowUnid, fieldMap.get("userid").toString(), carAttributes, "BusinessApplyFlow");
BizObjectManager businessManage = JBOFactory
.getBizObjectManager(FLOW_BUSSINESS_OBJECT.CLASS_NAME);

View File

@ -41,7 +41,7 @@ public class PayDocListServiceImpl implements PayDocListService {
fieldMap.put("FLOWUNID".toLowerCase(), objectNo);
fieldMap.put("FLOW_UNID", objectNo);
fieldMap.put("FLOW_UNID".toLowerCase(), objectNo);
InitDocListTools.initDocList(objectNo, fieldMap.get("userid").toString(), null, "BContractSupportFlow");
String otherWhere = "";
BizObject flow=GetFlowAction.getFlowBussinessObject(objectNo);//Á÷³ÌÔÏó
String productId = flow.getAttribute("productId").getString();
@ -54,7 +54,7 @@ public class PayDocListServiceImpl implements PayDocListService {
}
String s = "";
try {
s = InitDocListTools.getdocClassItemno(list);
s = InitDocListTools.getdocClassItemno(list, "BContractSupportFlow");
if (!StringX.isSpace(s)) {
s = s.split("@")[0];
}

View File

@ -0,0 +1,79 @@
package apx.com.amarsoft.als.apzl.apply.business.query.manage;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import jbo.app.tenwa.customer.CUSTOMER_INFO_TEMP;
import apx.com.amarsoft.als.base.awe.AbstractAweDoQueryManage;
import apx.com.amarsoft.als.base.awe.execute.method.BusinessCustomerMethod;
import com.amarsoft.are.jbo.BizObject;
import com.amarsoft.are.jbo.BizObjectManager;
import com.amarsoft.are.jbo.JBOFactory;
import com.amarsoft.are.jbo.JBOTransaction;
import com.amarsoft.are.lang.StringX;
import com.amarsoft.awe.util.Transaction;
import com.base.util.ReturnMapUtil;
public class CustomerInfoTempDoQueryManage extends AbstractAweDoQueryManage {
private String sAddWhere;
private String dono;
private Map<String, Object> fieldMap;
public void setFieldMap(Map<String, Object> fieldMap) {
this.fieldMap = fieldMap;
}
public void setDono(String dono) {
this.dono = dono;
}
public void getGroupId() {
sGroupId = this.dono;
}
public void getOtherWhere() {
super.sOtherWhere = StringX.isSpace(sAddWhere) ? ""
: this.sAddWhere;
}
public void setsAddWhere(String sAddWhere) {
this.sAddWhere = sAddWhere;
}
public Map<String, Object> queryDefaultDo(HttpServletRequest request,
Transaction sqlca, JBOTransaction tx, ReturnMapUtil ReturnMapUtil)
throws Exception {
String flowUnid = fieldMap.get("objectno") == null ? "" : fieldMap.get(
"objectno").toString();
fieldMap.put("flowUnid".toLowerCase(), flowUnid);
fieldMap.put("flowUnid".toUpperCase(), flowUnid);
fieldMap.put("flow_Unid".toLowerCase(), flowUnid);
fieldMap.put("flow_Unid".toUpperCase(), flowUnid);
fieldMap.put("objectno".toLowerCase(), flowUnid);
fieldMap.put("objectno".toUpperCase(), flowUnid);
BusinessCustomerMethod mm = new BusinessCustomerMethod();
String customerId = mm.getCustomerIdByFlowUnid(flowUnid);
BizObjectManager bom = JBOFactory
.getBizObjectManager(CUSTOMER_INFO_TEMP.CLASS_NAME);
String customerType = ((BizObject) bom
.createQuery("customerid=:customerid")
.setParameter("customerid", customerId).getResultList(false).get(0))
.getAttribute("CUSTOMERTYPE").toString();
fieldMap.put("customerid".toLowerCase(), customerId);
fieldMap.put("customerid".toUpperCase(), customerId);
dono = "";
if ("01".equals(customerType)) {
dono = "AppBusinessApplyInfo3";
} else if ("03".equals(customerType)) {
dono = "AppBusinessApplyInfo2";
}
setParamMap(fieldMap);
return getData(request, sqlca, tx, ReturnMapUtil);
}
}

View File

@ -21,14 +21,15 @@ import com.tenwa.doc.action.DocListInitAction;
public class InitDocListTools {
@SuppressWarnings({ "unchecked", "rawtypes" })
public static String getdocClassItemno (List<Object> list) {
public static String getdocClassItemno (List<Object> list, String flowInfo) {
String s="";
String type = "";
String docList = "";
try {
for (int i = 0; i < list.size(); i++) {
Map<String, Object> map = (Map<String, Object>) list.get(i);
if ("BusinessApplyFlow".equals(map.get("FLOW_INFO").toString())) {
// if ("BusinessApplyFlow".equals(map.get("FLOW_INFO").toString())) {
if (flowInfo.equals(map.get("FLOW_INFO").toString())) {
type = map.get("TYPE").toString();
if ("SingleRow".equals(type)) {
docList = map.get("DOCLIST").toString();
@ -54,7 +55,7 @@ public class InitDocListTools {
return "";
}
public static boolean initDocList(String flowUnid, String userId, String carAttributes) throws Exception {
public static boolean initDocList(String flowUnid, String userId, String carAttributes, String flowInfo) throws Exception {
try {
BizObjectManager objectManage = JBOFactory
.getBizObjectManager(FLOW_OBJECT.CLASS_NAME);
@ -108,7 +109,7 @@ public class InitDocListTools {
// if(s.length()>0){
// s=s.substring(0, s.length()-1);
// }
String s1 = getdocClassItemno(list);
String s1 = getdocClassItemno(list, flowInfo);
String s = "";
String docClassItemno = "";
if (s1.length() > 0) {

View File

@ -48,7 +48,7 @@ public class BusinessApplyStartServiceImpl implements BusinessApplyStartService
Map<String, String> params = bo.getParams();
// 加载附件
boolean flag = InitDocListTools.initDocList(params.get("FlowUnid"),
fieldMap.get("userid").toString(), bo.getCarAttributes());
fieldMap.get("userid").toString(), bo.getCarAttributes(), "BusinessApplyFlow");
String certType = bo.getCerttype();
String date = DateUtil.getDateTime(new Date());

View File

@ -643,7 +643,7 @@ public abstract class AbstractAweDoQueryManage extends AbstractAweDoHandler {
if (this.sJboGroup == null)
this.sJboGroup = (donoMap.get("JBOGROUP".toLowerCase()) == null ? ""
: donoMap.get("JBOGROUP".toLowerCase()).toString()).trim();
this.sJboWhere = AweDoCommUtil.whereHandle(sJboWhere, paramMap);
// this.sJboWhere = AweDoCommUtil.whereHandle(sJboWhere, paramMap);
if (this.sJboWhere.length() > 0) {
this.sJboWhere = " WHERE " + this.sJboWhere;
}
@ -657,6 +657,7 @@ public abstract class AbstractAweDoQueryManage extends AbstractAweDoHandler {
String sSql = "SELECT " + sJboQuery + " ";
sSql += "FROM " + sJboFrom + this.sJboWhere + this.sJboGroup + " "
+ this.sJboOrder;
sSql = AweDoCommUtil.whereHandle(sSql, paramMap);
sSql = sSql.replace("\r\n", " ");
sSql = sSql.replace("\n", " ");
sSql = sSql.replace("\t", " ");

View File

@ -8,11 +8,11 @@ public static void main(String[] args) throws Exception {
String str = "flowunid=:id1 and (ida>=:id2 or idb<=:id3) and idc >: id4 (idd <: id5 and ide <>:id6)";
String str = "select a.CHANGETYPE,a.memo,a.ADVANCE_DATE,b.CONTRACT_BUSSINESS_NO,b.lender,b.LOAN_MONEY,b.project_name,b.customer_name ,a.currency,calc.LOAN_AMOUNT bankmoney,a.loan_amount_over,a.advance_money,a.COMPENSATE_MONEY,a.PAY_MONEY from ( select flowunid ,getitemname('billChangeType',CHANGETYPE) CHANGETYPE ,MEMO ,ADVANCE_DATE,getitemname('Currency',currency)currency,LOAN_AMOUNT_OVER,ADVANCE_MONEY,COMPENSATE_MONEY,PAY_MONEY from LOAN_BILL_ADVANCE_INFO_TEMP where flowunid=:flowunid)a left join ( select flowunid,CONTRACT_BUSSINESS_NO,ld.lender,to_number(lo.LOAN_MONEY)LOAN_MONEY,lo.project_name,lo.customer_name from loan_contract_info_temp lo left join loan_lender ld on lo.lender_id=ld.id where flowunid=:flowunid union all select lb.flowunid,lo.contract_bussiness_no,ld.lender,to_number(lo.loan_money)LOAN_MONEY,lo.project_name,lo.customer_name from LOAN_BILL_INFO_TEMP lb left join loan_contract_info lo on lb.contract_id=lo.id left join loan_lender ld on lo.lender_id=ld.id where lb.flowunid=:flowunid )b on a.flowunid=b.flowunid left join (select flowunid,LOAN_AMOUNT from loan_calc_condition_temp where flowunid=:flowunid)calc on a.flowunid=calc.flowunid";
System.out.println(str);
Map<String, Object> map = new HashMap<String, Object>();
map.put("flowunid", "1");
map.put("flowunid", "FBO2018042500000096");
map.put("ida", "2");
map.put("idb", "3");
map.put("idc", "4");
@ -45,10 +45,16 @@ public static void main(String[] args) throws Exception {
String key = array[i - 1].trim();
String value = array[i].trim();
if (value.endsWith(")")) {
value = value.substring(0, value.length() - 1).trim();
if (value.contains(")")) {
value = value.substring(0, value.indexOf(")")).trim();
}
if (value.contains("(")) {
value = value.substring(0, value.indexOf("(")).trim();
}
if (value.contains(" ")) {
value = value.substring(0, value.indexOf(" ")).trim();
}
String sKey = "", sKeyStr = "";
if (key.endsWith("==") || key.endsWith("!=") || key.endsWith("<>") || key.endsWith(">=") || key.endsWith("<=")
|| key.equals("!<") || key.equals("!>")) {