获取路由人为null
初始化docList
This commit is contained in:
parent
6900337194
commit
2b83ad6a21
@ -0,0 +1,98 @@
|
||||
package apx.com.amarsoft.als.apzl.apply.business.start.init;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT;
|
||||
import jbo.sys.FLOW_OBJECT;
|
||||
|
||||
import com.amarsoft.app.lc.workflow.action.GetFlowAction;
|
||||
import com.amarsoft.app.util.ProductParamUtil;
|
||||
import com.amarsoft.are.ARE;
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.util.StringFunction;
|
||||
import com.amarsoft.awe.Configure;
|
||||
import com.amarsoft.context.ASUser;
|
||||
import com.tenwa.doc.action.DocListInitAction;
|
||||
|
||||
public class InitDocListTools {
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
public static void initDocList(String flowUnid, String userId, String carAttributes) throws Exception {
|
||||
BizObjectManager objectManage = JBOFactory
|
||||
.getBizObjectManager(FLOW_OBJECT.CLASS_NAME);
|
||||
BizObject object = objectManage.createQuery("OBJECTNO=:OBJECTNO")
|
||||
.setParameter("OBJECTNO", flowUnid).getSingleResult(false);
|
||||
if (null == object)
|
||||
return;
|
||||
String flowNo = object.getAttribute("flowno") == null ? "" : object
|
||||
.getAttribute("flowno").toString();
|
||||
String sObjectType = object.getAttribute("ObjectType") == null ? ""
|
||||
: object.getAttribute("ObjectType").toString();
|
||||
String productId = "";
|
||||
BizObject flow = GetFlowAction.getFlowBussinessObject(flowUnid);
|
||||
if (null == flow)
|
||||
return;
|
||||
productId = flow.getAttribute("productId").getString();
|
||||
|
||||
BizObjectManager businessManage = JBOFactory
|
||||
.getBizObjectManager(FLOW_BUSSINESS_OBJECT.CLASS_NAME);
|
||||
BizObject business = businessManage.createQuery("flow_unid=:flow_unid")
|
||||
.setParameter("flow_unid", flowUnid).getSingleResult(false);
|
||||
if (null == business)
|
||||
return;
|
||||
List<Object> list;
|
||||
try {
|
||||
list = ProductParamUtil.getProductDocInfo(productId, "PRD0412");
|
||||
} catch (Exception e) {
|
||||
ARE.getLog().error(e);
|
||||
return;
|
||||
}
|
||||
String type = "";
|
||||
String docList = "";
|
||||
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())) {
|
||||
type = map.get("TYPE").toString();
|
||||
if ("SingleRow".equals(type)) {
|
||||
docList = map.get("DOCLIST").toString();
|
||||
} else {
|
||||
List l = (List) map.get("DOCCONFIG");
|
||||
docList = l.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
String docClassItemno = docList;// CurPage.getParameter("docList");
|
||||
String[] itemnos=docClassItemno.split(",");
|
||||
String s="";
|
||||
for(int i=0;i<itemnos.length;i++){
|
||||
s+="'"+itemnos[i]+"',";
|
||||
}
|
||||
if(s.length()>0){
|
||||
s=s.substring(0, s.length()-1);
|
||||
}
|
||||
|
||||
try {
|
||||
ASUser CurUser = new ASUser(userId);
|
||||
Map<String,String> docParam=new HashMap<String,String>();
|
||||
Map<String,String> other=new HashMap<String,String>();
|
||||
other.put("carAttributes", carAttributes);
|
||||
docParam.put("ObjectType",sObjectType);
|
||||
docParam.put("proj_id", flow.getAttribute("proj_id").getString());
|
||||
docParam.put("contract_id", flow.getAttribute("contract_id").getString());
|
||||
docParam.put("flow_unid", flowUnid);
|
||||
docParam.put("inputtime", StringFunction.getTodayNow());
|
||||
docParam.put("inputuserid", CurUser.getUserID());
|
||||
docParam.put("inputorgid", CurUser.getOrgID());
|
||||
@SuppressWarnings("deprecation")
|
||||
Configure CurConfig = Configure.getInstance();
|
||||
//判断是否存在,不存在就从配置表倒到临时表
|
||||
DocListInitAction.initDocList(docParam,other,docClassItemno,CurConfig);
|
||||
} catch (Exception e) {
|
||||
ARE.getLog().error(e);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -8,6 +8,7 @@ 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 apx.com.amarsoft.als.apzl.apply.business.start.init.InitDocListTools;
|
||||
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
@ -27,7 +28,7 @@ public class BusinessApplyStartServiceImpl implements BusinessApplyStartService
|
||||
.readRequestParam(request, "UTF-8");
|
||||
fieldMap = (Map<String, Object>) testMap.get("fieldMap");
|
||||
BusinessBO bo = new BusinessBO(fieldMap, tx);
|
||||
|
||||
tx.commit();
|
||||
String sReturnInfo = bo.getMsg();
|
||||
if (sReturnInfo.startsWith("success")) {
|
||||
String serialNo = sReturnInfo.split("@")[1];
|
||||
@ -43,6 +44,7 @@ public class BusinessApplyStartServiceImpl implements BusinessApplyStartService
|
||||
ReturnMapUtil.setReturnMap(body,
|
||||
RestfullConstant.baseProperty.get("success").toString(),
|
||||
"·¢Æð³É¹¦");
|
||||
InitDocListTools.initDocList(params.get("FlowUnid"), fieldMap.get("userid").toString(), bo.getCarAttributes());
|
||||
} else if (sReturnInfo.startsWith("failed")) {
|
||||
ReturnMapUtil.setReturnMap(null,
|
||||
RestfullConstant.baseProperty.get("FAIL").toString(),
|
||||
|
||||
@ -363,20 +363,31 @@ public class DoSubmitService {
|
||||
mMap.put("nodeType", joNodeType);
|
||||
mMap.put("headMessage", headMessage);
|
||||
mMap.put("flowUserOperatorType", joFlowUserOperatorType);
|
||||
String [] vUser = joUserInfo.split("@");
|
||||
|
||||
if (!"01".equals(joFlowUserOperatorType)) {
|
||||
type = "checkBox";
|
||||
}
|
||||
mMap.put("type", type);
|
||||
List<Map<String, Object>> list = new ArrayList<Map<String,Object>>();
|
||||
for (int i=0; i < vUser.length; i ++) {
|
||||
if(StringX.isSpace(joUserInfo.trim())) {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String [] vUserinfo=vUser[i].split(" ");
|
||||
map.put("userId", vUser[i]);
|
||||
map.put("userName", vUserinfo[1]);
|
||||
map.put("userId", "");
|
||||
map.put("userName", "");
|
||||
list.add(map);
|
||||
} else {
|
||||
String [] vUser = joUserInfo.split("@");
|
||||
|
||||
|
||||
|
||||
for (int i=0; i < vUser.length; i ++) {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String [] vUserinfo=vUser[i].split(" ");
|
||||
map.put("userId", vUser[i]);
|
||||
map.put("userName", vUserinfo[1]);
|
||||
list.add(map);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
mMap.put("userInfo", list);
|
||||
list2.add(mMap);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user