diff --git a/WebContent/AppFresh/AppPage/AppLibraryTemplateList.jsp b/WebContent/AppFresh/AppPage/AppLibraryTemplateList.jsp index 21765e072..fd570ec0f 100644 --- a/WebContent/AppFresh/AppPage/AppLibraryTemplateList.jsp +++ b/WebContent/AppFresh/AppPage/AppLibraryTemplateList.jsp @@ -1,64 +1,64 @@ - <%@ page contentType="text/html; charset=GBK"%><%@ - include file="/Frame/resources/include/include_begin_list.jspf"%><% - String GROUP_CODE = CurPage.getParameter("GROUP_CODE"); - if (GROUP_CODE == null) - GROUP_CODE = ""; - - ASObjectModel doTemp = new ASObjectModel("APP_BUSINESS_TEMPLATE_LIST"); - doTemp.setLockCount(2); //锁定两列 - ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); - - dwTemp.Style="1"; //设置为Grid风格 - dwTemp.ReadOnly = "1";//编辑模式 - dwTemp.setPageSize(10); - dwTemp.ConvertCode2Title = "1"; - dwTemp.genHTMLObjectWindow(GROUP_CODE); - - String sButtons[][] = { - {"true","","Button","新增字段","新增字段","newRecord()","","","","btn_icon_add"}, - {"true","","Button","删除字段","删除字段","if(confirm('确实要删除吗?'))as_delete(0,'')","","","","btn_icon_delete"}, - {"true","","Button","编辑字段","编辑字段","viewAndEdit()","","","","btn_icon_edit"}, - }; -%><%@include file="/Frame/resources/include/ui/include_list.jspf"%> - + <%@ page contentType="text/html; charset=GBK"%><%@ + include file="/Frame/resources/include/include_begin_list.jspf"%><% + String GROUP_CODE = CurPage.getParameter("GROUP_CODE"); + if (GROUP_CODE == null) + GROUP_CODE = ""; + + ASObjectModel doTemp = new ASObjectModel("APP_BUSINESS_TEMPLATE_LIST"); + doTemp.setLockCount(2); //锁定两列 + ASObjectWindow dwTemp = new ASObjectWindow(CurPage,doTemp,request); + + dwTemp.Style="1"; //设置为Grid风格 + dwTemp.ReadOnly = "1";//编辑模式 + dwTemp.setPageSize(10); + dwTemp.ConvertCode2Title = "1"; + dwTemp.genHTMLObjectWindow(GROUP_CODE); + + String sButtons[][] = { + {"true","","Button","新增字段","新增字段","newRecord()","","","","btn_icon_add"}, + {"true","","Button","删除字段","删除字段","if(confirm('确实要删除吗?'))as_delete(0,'')","","","","btn_icon_delete"}, + {"true","","Button","编辑字段","编辑字段","viewAndEdit()","","","","btn_icon_edit"}, + }; +%><%@include file="/Frame/resources/include/ui/include_list.jspf"%> + <%@ include file="/Frame/resources/include/include_end.jspf"%> \ No newline at end of file diff --git a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/start/service/impl/BusinessApplyStartServiceImpl.java b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/start/service/impl/BusinessApplyStartServiceImpl.java index 52b50d26c..a2cef5a3a 100644 --- a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/start/service/impl/BusinessApplyStartServiceImpl.java +++ b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/start/service/impl/BusinessApplyStartServiceImpl.java @@ -1,85 +1,88 @@ -package apx.com.amarsoft.als.apzl.apply.business.start.service.impl; - -import java.util.HashMap; -import java.util.Map; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import apx.com.amarsoft.als.apzl.apply.business.start.bo.BusinessBO; -import apx.com.amarsoft.als.apzl.apply.business.start.service.BusinessApplyStartService; - -import com.amarsoft.are.jbo.JBOTransaction; -import com.amarsoft.awe.util.Transaction; -import com.base.constant.RestfullConstant; -import com.base.util.MultipartDataUtil; -import com.base.util.ReturnMapUtil; -import com.tenwa.lease.flow.project.projectapproval.BusinessApprovalStartAction; - -public class BusinessApplyStartServiceImpl implements BusinessApplyStartService { - private Map fieldMap; - - @SuppressWarnings("unchecked") - public Map applyStart(HttpServletRequest request, - HttpServletResponse response, JBOTransaction tx, Transaction sqlca, - ReturnMapUtil ReturnMapUtil) throws Exception { - - Map testMap = (Map) MultipartDataUtil - .readRequestParam(request, "UTF-8"); - fieldMap = (Map) testMap.get("fieldMap"); - BusinessBO bo = new BusinessBO(fieldMap); - - String applyType = "BusinessApplyApply"; - String uid = fieldMap.get("userid") == null ? "" : fieldMap.get( - "userid").toString(); - BusinessApprovalStartAction BusinessApprovalStartAction = new BusinessApprovalStartAction(); - - BusinessApprovalStartAction.setApplyType(applyType); - BusinessApprovalStartAction.setCurUserID(uid); - - BusinessApprovalStartAction.setFixedFlowParam(bo.getFixedFlowParam()); - - // 产品租赁信息 - BusinessApprovalStartAction.setBusinessType(bo.getBusinessType()); - BusinessApprovalStartAction.setVersionid(bo.getVersionId()); - BusinessApprovalStartAction.setProductID(bo.getProductId()); - BusinessApprovalStartAction.setProductId(bo.getProductId()); - BusinessApprovalStartAction.setLeasehold(bo.getLeasehold()); - - // 车辆信息 - BusinessApprovalStartAction.setModelid(bo.getModelId()); - BusinessApprovalStartAction.setCarAttributes(bo.getCarAttributes()); - BusinessApprovalStartAction.setProductModel(bo.getProductModel()); - BusinessApprovalStartAction.setCarSystem(bo.getCarSystem()); - BusinessApprovalStartAction.setCarSeries(bo.getCarSeries()); - - // 用户信息 - BusinessApprovalStartAction.setCertid(bo.getCertid()); - BusinessApprovalStartAction.setCerttype(bo.getCerttype()); - BusinessApprovalStartAction.setCustname(bo.getCUSTOMERNAME()); - BusinessApprovalStartAction.setCustomerType(bo.getCustomerType()); - - String sReturnInfo = BusinessApprovalStartAction.initFLow(tx); - if (sReturnInfo.startsWith("success")) { - String serialNo = sReturnInfo.split("@")[1]; - // 获取当前申请的相关参数,包含FlowUnid - Map params = BusinessApprovalStartAction - .getFlowParam(); - // 返回前台的数据 - Map body = new HashMap(); - body.put("flowUnid", params.get("FlowUnid")); - body.put("objectNo", params.get("FlowUnid")); - body.put("taskNo", serialNo); - body.put("serialNo", serialNo); - ReturnMapUtil.setReturnMap(body, - RestfullConstant.baseProperty.get("success").toString(), - "发起成功"); - } else - ReturnMapUtil.setReturnMap(null, - RestfullConstant.baseProperty.get("FAIL").toString(), - "发起失败"); - - return ReturnMapUtil.getReturnMap(); - } - -} +package apx.com.amarsoft.als.apzl.apply.business.start.service.impl; + +import java.util.HashMap; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.amarsoft.are.jbo.JBOTransaction; +import com.amarsoft.awe.Configure; +import com.amarsoft.awe.util.Transaction; +import com.base.constant.RestfullConstant; +import com.base.util.MultipartDataUtil; +import com.base.util.ReturnMapUtil; +import com.tenwa.doc.action.DocListInitAction; +import com.tenwa.lease.flow.project.projectapproval.BusinessApprovalStartAction; + +import apx.com.amarsoft.als.apzl.apply.business.start.bo.BusinessBO; +import apx.com.amarsoft.als.apzl.apply.business.start.service.BusinessApplyStartService; + +public class BusinessApplyStartServiceImpl implements BusinessApplyStartService { + private Map fieldMap; + + @SuppressWarnings("unchecked") + public Map applyStart(HttpServletRequest request, + HttpServletResponse response, JBOTransaction tx, Transaction sqlca, + ReturnMapUtil ReturnMapUtil) throws Exception { + + Map testMap = (Map) MultipartDataUtil + .readRequestParam(request, "UTF-8"); + fieldMap = (Map) testMap.get("fieldMap"); + BusinessBO bo = new BusinessBO(fieldMap); + + String applyType = "BusinessApplyApply"; + String uid = fieldMap.get("userid") == null ? "" : fieldMap.get( + "userid").toString(); + BusinessApprovalStartAction BusinessApprovalStartAction = new BusinessApprovalStartAction(); + + BusinessApprovalStartAction.setApplyType(applyType); + BusinessApprovalStartAction.setCurUserID(uid); + + BusinessApprovalStartAction.setFixedFlowParam(bo.getFixedFlowParam()); + + // 产品租赁信息 + BusinessApprovalStartAction.setBusinessType(bo.getBusinessType()); + BusinessApprovalStartAction.setVersionid(bo.getVersionId()); + BusinessApprovalStartAction.setProductID(bo.getProductId()); + BusinessApprovalStartAction.setProductId(bo.getProductId()); + BusinessApprovalStartAction.setLeasehold(bo.getLeasehold()); + + // 车辆信息 + BusinessApprovalStartAction.setModelid(bo.getModelId()); + BusinessApprovalStartAction.setCarAttributes(bo.getCarAttributes()); + BusinessApprovalStartAction.setProductModel(bo.getProductModel()); + BusinessApprovalStartAction.setCarSystem(bo.getCarSystem()); + BusinessApprovalStartAction.setCarSeries(bo.getCarSeries()); + + // 用户信息 + BusinessApprovalStartAction.setCertid(bo.getCertid()); + BusinessApprovalStartAction.setCerttype(bo.getCerttype()); + BusinessApprovalStartAction.setCustname(bo.getCUSTOMERNAME()); + BusinessApprovalStartAction.setCustomerType(bo.getCustomerType()); + + String sReturnInfo = BusinessApprovalStartAction.initFLow(tx); + if (sReturnInfo.startsWith("success")) { + String serialNo = sReturnInfo.split("@")[1]; + // 获取当前申请的相关参数,包含FlowUnid + Map params = BusinessApprovalStartAction + .getFlowParam(); + // 返回前台的数据 + Map body = new HashMap(); + body.put("flowUnid", params.get("FlowUnid")); + body.put("objectNo", params.get("FlowUnid")); + body.put("projectId", params.get("ProjectId")); + body.put("taskNo", serialNo); + body.put("serialNo", serialNo); + ReturnMapUtil.setReturnMap(body, + RestfullConstant.baseProperty.get("success").toString(), + "发起成功"); + } else + ReturnMapUtil.setReturnMap(null, + RestfullConstant.baseProperty.get("FAIL").toString(), + "发起失败"); + + return ReturnMapUtil.getReturnMap(); + } + +} diff --git a/src_app_fresh/apx/com/amarsoft/als/base/awe/controller/AweDoQueryController.java b/src_app_fresh/apx/com/amarsoft/als/base/awe/controller/AweDoQueryController.java index 5ae695490..3b805cca1 100644 --- a/src_app_fresh/apx/com/amarsoft/als/base/awe/controller/AweDoQueryController.java +++ b/src_app_fresh/apx/com/amarsoft/als/base/awe/controller/AweDoQueryController.java @@ -283,6 +283,13 @@ public class AweDoQueryController { else continue; + }else { + //filedMap中有参数则赋值 x = :x + String strParam = fieldMap.get(str.toLowerCase()).toString(); + otherWhere = otherWhere.replace(":" + + str,"'" + strParam + "'"); + continue; + } } } @@ -372,16 +379,16 @@ public class AweDoQueryController { int i = 0; for (String str : array1) { str = str.trim(); - if (fieldMap.get(param.toLowerCase()) == null) { + if (fieldMap.get(str.toLowerCase()) == null) { return "continue"; } - aSet[i] = fieldMap.get(param.toLowerCase()).toString(); + aSet[i] = fieldMap.get(str.toLowerCase()).toString(); i++; } - if (fieldMap.get(param.toLowerCase()) == null) { - return "continue"; - } +// if (fieldMap.get(param.toLowerCase()) == null) { +// return "continue"; +// } String value = executeMethod(classStr, aSet); fieldMap.put(paramStr.toLowerCase(), value);