1,附件清单初始化。
2,向前端传入projectId。
3,通用查询,附加参数获取。
4,APP配置页面alert除去。
This commit is contained in:
fengys 2018-07-14 17:00:54 +08:00
parent 3b16f91fe2
commit 0208342c17
3 changed files with 163 additions and 153 deletions

View File

@ -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"%>
<script type="text/javascript">
function newRecord() {
var GROUP_CODE = getItemValue(0, getRow(0), 'GROUP_CODE');
var sUrl = "/AppFresh/AppPage/AppLibraryTemplateInfo.jsp";
AsDialog.PopView(sUrl,"GROUP_CODE="+GROUP_CODE,
"dialogWidth=600px;dialogHeight=450px;", function(message) {
reloadSelf();
}, "新模板分组配置");
}
function viewAndEdit() {
var sUrl = "/AppFresh/AppPage/AppLibraryTemplateInfo.jsp";
var GROUP_CODE = getItemValue(0, getRow(0), 'GROUP_CODE');
var DATA_CODE = getItemValue(0, getRow(0), 'DATA_CODE');
alert(DATA_CODE);
if (DATA_CODE == "" || typeof (DATA_CODE) == "undefined") {
alert("请选择一条分组字段!");
return false;
}
AsDialog.PopView(sUrl,"GROUP_CODE="+GROUP_CODE+"&DATA_CODE="+DATA_CODE,
"dialogWidth=600px;dialogHeight=450px;", function(message) {
reloadSelf();
}, "模板分组配置");
}
function middleConfig() {
var id = getItemValue(0, getRow(0), 'id');
if (id == "" || typeof(id) == "undefined") {
alert("请选择一条阶段!");
return false;
}
var flowNo = getItemValue(0, getRow(0), 'flowno');
var phaseNo = getItemValue(0, getRow(0), 'phaseno');
var sUrl = "/AppFresh/AppFlow/MiddleList.jsp";
AsControl.OpenTab(sUrl,"id="+id + "&flowNo="+flowNo+"&phaseNo="+phaseNo, {title:"流程页签配置"});
}
</script>
<%@ 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"%>
<script type="text/javascript">
function newRecord() {
var GROUP_CODE = getItemValue(0, getRow(0), 'GROUP_CODE');
var sUrl = "/AppFresh/AppPage/AppLibraryTemplateInfo.jsp";
AsDialog.PopView(sUrl,"GROUP_CODE="+GROUP_CODE,
"dialogWidth=600px;dialogHeight=450px;", function(message) {
reloadSelf();
}, "新模板分组配置");
}
function viewAndEdit() {
var sUrl = "/AppFresh/AppPage/AppLibraryTemplateInfo.jsp";
var GROUP_CODE = getItemValue(0, getRow(0), 'GROUP_CODE');
var DATA_CODE = getItemValue(0, getRow(0), 'DATA_CODE');
//alert(DATA_CODE);
if (DATA_CODE == "" || typeof (DATA_CODE) == "undefined") {
alert("请选择一条分组字段!");
return false;
}
AsDialog.PopView(sUrl,"GROUP_CODE="+GROUP_CODE+"&DATA_CODE="+DATA_CODE,
"dialogWidth=600px;dialogHeight=450px;", function(message) {
reloadSelf();
}, "模板分组配置");
}
function middleConfig() {
var id = getItemValue(0, getRow(0), 'id');
if (id == "" || typeof(id) == "undefined") {
alert("请选择一条阶段!");
return false;
}
var flowNo = getItemValue(0, getRow(0), 'flowno');
var phaseNo = getItemValue(0, getRow(0), 'phaseno');
var sUrl = "/AppFresh/AppFlow/MiddleList.jsp";
AsControl.OpenTab(sUrl,"id="+id + "&flowNo="+flowNo+"&phaseNo="+phaseNo, {title:"流程页签配置"});
}
</script>
<%@ include file="/Frame/resources/include/include_end.jspf"%>

View File

@ -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<String, Object> fieldMap;
@SuppressWarnings("unchecked")
public Map<String, Object> applyStart(HttpServletRequest request,
HttpServletResponse response, JBOTransaction tx, Transaction sqlca,
ReturnMapUtil ReturnMapUtil) throws Exception {
Map<String, Object> testMap = (Map<String, Object>) MultipartDataUtil
.readRequestParam(request, "UTF-8");
fieldMap = (Map<String, Object>) 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<String, String> params = BusinessApprovalStartAction
.getFlowParam();
// 返回前台的数据
Map<String, Object> body = new HashMap<String, Object>();
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<String, Object> fieldMap;
@SuppressWarnings("unchecked")
public Map<String, Object> applyStart(HttpServletRequest request,
HttpServletResponse response, JBOTransaction tx, Transaction sqlca,
ReturnMapUtil ReturnMapUtil) throws Exception {
Map<String, Object> testMap = (Map<String, Object>) MultipartDataUtil
.readRequestParam(request, "UTF-8");
fieldMap = (Map<String, Object>) 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<String, String> params = BusinessApprovalStartAction
.getFlowParam();
// 返回前台的数据
Map<String, Object> body = new HashMap<String, Object>();
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();
}
}

View File

@ -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);