商务条件 租金计划
业务发起照片预警 加载 资料清单
This commit is contained in:
parent
e013b37b6c
commit
7fea1c816c
@ -776,7 +776,7 @@ public class ProductCondition {
|
||||
}
|
||||
ProductBaseLoanTools.addAppList(appList, "SETTLE_METHOD", "colreadonly", "1");
|
||||
ProductBaseLoanTools.addAppList(appList, "SETTLE_METHOD", "coleditsource", "jbo.sys.CODE_LIBRARY,itemno,itemname,codeno='settle_method' and itemno in ("+s+") order by sortno");
|
||||
ProductBaseLoanTools.addAppList(appList, "coldefaultvalue", "colreadonly", s.replaceAll("'", ""));
|
||||
ProductBaseLoanTools.addAppList(appList, "SETTLE_METHOD", "coldefaultvalue", s.replaceAll("'", ""));
|
||||
|
||||
return "{"+sJson+"}";
|
||||
}
|
||||
|
||||
@ -14,6 +14,7 @@ import jbo.app.tenwa.doc.LB_DOCRELATIVE;
|
||||
import jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT;
|
||||
import net.sf.json.JSONObject;
|
||||
import apx.com.amarsoft.als.apzl.apply.business.doc.detail.service.BusinessDocDetailService;
|
||||
import apx.com.amarsoft.als.apzl.apply.business.start.init.InitDocListTools;
|
||||
|
||||
import com.amarsoft.are.ARE;
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
@ -85,7 +86,31 @@ public class BusinessDocDetailServiceImpl implements BusinessDocDetailService {
|
||||
if (StringX.isSpace(flowUnid)) { // »ñÈ¡ËùÓÐÅäÖÃdocName
|
||||
return docDetail(ReturnMapUtil);
|
||||
}
|
||||
|
||||
BizObjectManager fboM = JBOFactory
|
||||
.getBizObjectManager(FLOW_BUSSINESS_OBJECT.CLASS_NAME);
|
||||
BizObject fbo = fboM.createQuery("flow_unid=:flow_unid")
|
||||
.setParameter("flow_unid", flowUnid).getSingleResult(false);
|
||||
if (null == fbo) {
|
||||
ReturnMapUtil.setReturnMap(null, RestfullConstant.baseProperty.get("fail").toString(), "未找到流程实例!");
|
||||
return ReturnMapUtil.getReturnMap();
|
||||
}
|
||||
String carAttributes = "";
|
||||
try {
|
||||
String flowPara = fbo.getAttribute("FixedFlowParam") == null ? ""
|
||||
: fbo.getAttribute("FixedFlowParam").toString();
|
||||
JSONObject jo = JsonUtil.str2JSONObject(flowPara.trim());
|
||||
carAttributes = jo.get("carAttributes") == null ? "" : jo
|
||||
.getString("carAttributes");
|
||||
} catch (Exception e) {
|
||||
ARE.getLog().error(e);
|
||||
ReturnMapUtil.setReturnMap(null, RestfullConstant.baseProperty.get("fail").toString(), "获取车辆属性信息失败!");
|
||||
return ReturnMapUtil.getReturnMap();
|
||||
}
|
||||
// 加载附件
|
||||
|
||||
// carAttributes
|
||||
boolean flag = InitDocListTools.initDocList(flowUnid, fieldMap.get("userid").toString(), carAttributes);
|
||||
|
||||
BizObjectManager businessManage = JBOFactory
|
||||
.getBizObjectManager(FLOW_BUSSINESS_OBJECT.CLASS_NAME);
|
||||
BizObject business = businessManage.createQuery("flow_unid=:flow_unid")
|
||||
|
||||
@ -53,6 +53,23 @@ public class LoanSimulationBasicInfoController {
|
||||
}
|
||||
}
|
||||
|
||||
@Path("/rent")
|
||||
@POST
|
||||
public Map<String, Object> rent(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
||||
@Context JBOTransaction tx, @Context Transaction sqlca) throws Exception {
|
||||
ReturnMapUtil ReturnMapUtil = new ReturnMapUtil(tx, sqlca);
|
||||
ARE.getLog().info(
|
||||
"[CONTROLLER] LoanSimulationBasicInfo run .................");
|
||||
ARE.getLog().info("[Path] /loan/simulation/basic/rent" + " run .................");
|
||||
|
||||
LoanSimulationBasicService service = new LoanSimulationBasicServiceImpl();
|
||||
try {
|
||||
return service.queryInfo(request, response, tx, sqlca, ReturnMapUtil);
|
||||
} catch (Exception e) {
|
||||
return ReturnMapUtil.rollback(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Path("/save")
|
||||
@POST
|
||||
public Map<String, Object> saveInfo(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
||||
|
||||
@ -0,0 +1,46 @@
|
||||
package apx.com.amarsoft.als.apzl.apply.business.loan.manage;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import apx.com.amarsoft.als.base.awe.AbstractAweDoQueryManage;
|
||||
|
||||
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 LCRentPlanTempDoQueryManage 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 {
|
||||
setParamMap(fieldMap);
|
||||
return getData(request, sqlca, tx, ReturnMapUtil);
|
||||
}
|
||||
}
|
||||
@ -28,11 +28,6 @@ public class ProductBaseLoanTools {
|
||||
@SuppressWarnings("unchecked")
|
||||
public static Map<String, Object> checkSource(Map<String, Object> app,
|
||||
String colName, String operation, Object value) {
|
||||
|
||||
if ("finatype01".equals(value)) {
|
||||
ARE.getLog().info("finatype01");
|
||||
}
|
||||
|
||||
if (operation.contains("defaultValue")) {
|
||||
app.put("coldefaultvalue", value);
|
||||
} else {
|
||||
@ -45,7 +40,7 @@ public class ProductBaseLoanTools {
|
||||
List<Map<String, Object>> libarary = (List<Map<String, Object>>) (donoTemp.get("library"));
|
||||
String source = "";
|
||||
String sourceType = "";
|
||||
|
||||
app.put("coldefaultitemno", value);
|
||||
for (Map<String, Object> col : libarary) {
|
||||
String sColName = col.get("colname") == null ? "" : col.get("colname").toString();
|
||||
if (sColName.equals(colName)) {
|
||||
@ -57,12 +52,10 @@ public class ProductBaseLoanTools {
|
||||
source = app.get("coleditsource") == null ? source : app.get("coleditsource").toString();
|
||||
sourceType = app.get("coleditsourcetype") == null ? sourceType : app.get("coleditsourcetype").toString();
|
||||
if (StringX.isSpace(source)) {
|
||||
app.put("coldefaultitemno", value);
|
||||
return app;
|
||||
}
|
||||
|
||||
if (StringX.isSpace(sourceType)) {
|
||||
app.put("coldefaultitemno", value);
|
||||
return app;
|
||||
}
|
||||
|
||||
@ -74,14 +67,12 @@ public class ProductBaseLoanTools {
|
||||
.setParameter("CODENO", source).setParameter("itemno", itemno)
|
||||
.getSingleResult(false);
|
||||
if (null == bo) {
|
||||
app.put("coldefaultitemno", value);
|
||||
return app;
|
||||
}
|
||||
app.put("coldefaultitemno", bo.getAttribute("itemname").getValue());
|
||||
app.put("coldefaultvalue", bo.getAttribute("itemname").getValue());
|
||||
return app;
|
||||
} catch (JBOException e) {
|
||||
ARE.getLog().error(e);
|
||||
app.put("coldefaultitemno", value);
|
||||
return app;
|
||||
}
|
||||
|
||||
@ -95,17 +86,12 @@ public class ProductBaseLoanTools {
|
||||
if (i!=0 && i + 1 > size) break;
|
||||
String itemno2 = array[i];
|
||||
if (itemno2.equalsIgnoreCase(itemno)) {
|
||||
app.put("coldefaultitemno", array[i+1]);
|
||||
app.put("coldefaultvalue", array[i+1]);
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
if (null == app.get("coldefaultitemno")) {
|
||||
app.put("coldefaultitemno", value);
|
||||
return app;
|
||||
}
|
||||
} else {
|
||||
app.put("coldefaultitemno", value);
|
||||
return app;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@ -139,20 +125,15 @@ public class ProductBaseLoanTools {
|
||||
// sDefult
|
||||
if (itemno.equals(bo.getAttribute(sKey)
|
||||
.getValue())) {
|
||||
app.put("coldefaultitemno", bo.getAttribute(sValue)
|
||||
app.put("coldefaultvalue", bo.getAttribute(sValue)
|
||||
.getValue());
|
||||
return app;
|
||||
}
|
||||
}
|
||||
if (null == app.get("coldefaultitemno")) {
|
||||
app.put("coldefaultitemno", value);
|
||||
return app;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (JBOException e) {
|
||||
ARE.getLog().error(e);
|
||||
app.put("coldefaultitemno", value);
|
||||
return app;
|
||||
}
|
||||
|
||||
@ -169,23 +150,20 @@ public class ProductBaseLoanTools {
|
||||
int iin = Integer.valueOf(itemno);
|
||||
|
||||
if(min <= iin && iin <= max) {
|
||||
app.put("coldefaultitemno", iin);
|
||||
app.put("coldefaultvalue", iin);
|
||||
return app;
|
||||
} else {
|
||||
app.put("coldefaultitemno", value);
|
||||
app.put("coldefaultvalue", value);
|
||||
return app;
|
||||
}
|
||||
} else {
|
||||
app.put("coldefaultitemno", value);
|
||||
return app;
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
ARE.getLog().error(e);
|
||||
app.put("coldefaultitemno", value);
|
||||
return app;
|
||||
}
|
||||
}
|
||||
|
||||
return app;
|
||||
}
|
||||
|
||||
|
||||
@ -20,6 +20,12 @@ public interface LoanSimulationBasicService {
|
||||
@Context HttpServletResponse response, @Context JBOTransaction tx,
|
||||
@Context Transaction sqlca, ReturnMapUtil ReturnMapUtil)
|
||||
throws Exception;
|
||||
|
||||
Map<String, Object> rent(@Context HttpServletRequest request,
|
||||
@Context HttpServletResponse response, @Context JBOTransaction tx,
|
||||
@Context Transaction sqlca, ReturnMapUtil ReturnMapUtil)
|
||||
throws Exception;
|
||||
|
||||
|
||||
Map<String, Object> saveInfo(@Context HttpServletRequest request,
|
||||
@Context HttpServletResponse response, @Context JBOTransaction tx,
|
||||
|
||||
@ -8,6 +8,7 @@ import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import apx.com.amarsoft.als.apzl.apply.business.loan.manage.LCRentPlanTempDoQueryManage;
|
||||
import apx.com.amarsoft.als.apzl.apply.business.loan.manage.LoanSimulationBasicInfoAppInfoDoManage;
|
||||
import apx.com.amarsoft.als.apzl.apply.business.loan.manage.LoanSimulationBasicInfoAppInfoSaveDoManage;
|
||||
import apx.com.amarsoft.als.apzl.apply.business.loan.product.ProductBaseLoanTools;
|
||||
@ -49,19 +50,19 @@ public class LoanSimulationBasicServiceImpl implements
|
||||
Map<String, Object> baseMap = ProductBaseLoanTools.deadWork(null, null,
|
||||
null, null, null, flowunid, tx);
|
||||
// ·ÑÓùæÔò
|
||||
List<Map<String, Object>> appList = new ArrayList<Map<String,Object>>();
|
||||
|
||||
String calcRules = ProductBaseLoanTools
|
||||
.getProductFundRules(appList, baseMap.get("productId").toString());
|
||||
List<Map<String, Object>> appList = new ArrayList<Map<String, Object>>();
|
||||
|
||||
String calcRules = ProductBaseLoanTools.getProductFundRules(appList,
|
||||
baseMap.get("productId").toString());
|
||||
|
||||
Map<String, Object> calcRulesMap = JsonUtil.str2JSONObject(calcRules);
|
||||
|
||||
|
||||
Map<String, Object> body = new HashMap<String, Object>();
|
||||
body.put("planCName", baseMap.get("planCName"));
|
||||
body.put("plannumber", baseMap.get("plannumber"));
|
||||
body.put("tb", baseMap.get("tb"));
|
||||
body.put("calType", baseMap.get("calType"));
|
||||
|
||||
|
||||
body.put("productId", baseMap.get("productId"));
|
||||
body.put("productDatas", appList);
|
||||
body.put("productFundRules", calcRulesMap);
|
||||
@ -123,6 +124,9 @@ public class LoanSimulationBasicServiceImpl implements
|
||||
fieldMap.put("flow_unid".toLowerCase(), flowunid);
|
||||
fieldMap.put("flow_unid".toUpperCase(), flowunid);
|
||||
|
||||
fieldMap.put(planCName.toLowerCase(), plannumber);
|
||||
fieldMap.put(planCName.toUpperCase(), plannumber);
|
||||
|
||||
LoanSimulationBasicInfoAppInfoSaveDoManage manage = new LoanSimulationBasicInfoAppInfoSaveDoManage();
|
||||
manage.setDono("LoanSimulationBasicInfoApp2");
|
||||
manage.setAddWhere(" and " + planCName + "='" + plannumber + "'");
|
||||
@ -165,16 +169,55 @@ public class LoanSimulationBasicServiceImpl implements
|
||||
calType = "proj_process";
|
||||
}
|
||||
|
||||
CreateTransactionExecutor cte = new CreateTransactionExecutor();
|
||||
cte.setCalType(calType);
|
||||
cte.setFlowunid(flowunid);
|
||||
cte.setPlannumber(plannumber);
|
||||
cte.setProductId(productId);
|
||||
String result = cte.run();
|
||||
ReturnMapUtil
|
||||
.setReturnMap(null, RestfullConstant.baseProperty
|
||||
.get("success").toString(), result);
|
||||
return ReturnMapUtil.getReturnMap();
|
||||
try {
|
||||
CreateTransactionExecutor cte = new CreateTransactionExecutor();
|
||||
cte.setCalType(calType);
|
||||
cte.setFlowunid(flowunid);
|
||||
cte.setPlannumber(plannumber);
|
||||
cte.setProductId(productId);
|
||||
String result = cte.run();
|
||||
|
||||
Map<String, Object> body = JsonUtil.str2JSONObject(result);
|
||||
|
||||
ReturnMapUtil.setReturnMap(body,
|
||||
RestfullConstant.baseProperty.get("success").toString(),
|
||||
"");
|
||||
return ReturnMapUtil.getReturnMap();
|
||||
} catch (Exception e) {
|
||||
ReturnMapUtil.setReturnMap(null,
|
||||
RestfullConstant.baseProperty.get("fail").toString(),
|
||||
"后台异常,请联系管理员!");
|
||||
return ReturnMapUtil.getReturnMap();
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Map<String, Object> rent(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");
|
||||
|
||||
String flowunid = fieldMap.get("objectNo".toLowerCase()) == null ? ""
|
||||
: fieldMap.get("objectNo".toLowerCase()).toString();
|
||||
String planCName = fieldMap.get("planCName".toLowerCase()) == null ? null
|
||||
: fieldMap.get("planCName".toLowerCase()).toString(); // 方案编号
|
||||
String plannumber = fieldMap.get("plannumber".toLowerCase()) == null ? null
|
||||
: fieldMap.get("plannumber".toLowerCase()).toString(); // 方案编号
|
||||
|
||||
fieldMap.put("flowunid".toLowerCase(), flowunid);
|
||||
fieldMap.put("flowunid".toUpperCase(), flowunid);
|
||||
fieldMap.put("flow_unid".toLowerCase(), flowunid);
|
||||
fieldMap.put("flow_unid".toUpperCase(), flowunid);
|
||||
|
||||
LCRentPlanTempDoQueryManage manage = new LCRentPlanTempDoQueryManage();
|
||||
manage.setDono("LCRentPlanTempApp2");
|
||||
manage.setsAddWhere(" and " + planCName + "='" + plannumber + "'");
|
||||
// manage.setsJboClass(conditionTB);
|
||||
manage.setFieldMap(fieldMap);
|
||||
return manage.queryDefaultDo(request, sqlca, tx, ReturnMapUtil);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -30,6 +30,10 @@ public class ApplyListQueryController {
|
||||
ARE.getLog().info("[Path] /apply/list" + " run .................");
|
||||
|
||||
ApplyListQueryService service = new ApplyListQueryServiceImpl();
|
||||
return service.queryList(request, response, tx, sqlca, ReturnMapUtil);
|
||||
try {
|
||||
return service.queryList(request, response, tx, sqlca, ReturnMapUtil);
|
||||
} catch (Exception e) {
|
||||
return ReturnMapUtil.rollback(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,13 +2,26 @@ package apx.com.amarsoft.als.apzl.apply.business.start.bo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import jbo.app.LB_DOCLIBRARY;
|
||||
import jbo.app.tenwa.doc.LB_DOCATTRIBUTE;
|
||||
import jbo.app.tenwa.doc.LB_DOCRELATIVE;
|
||||
import jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT;
|
||||
import net.sf.json.JSON;
|
||||
import net.sf.json.JSONObject;
|
||||
|
||||
import com.amarsoft.are.ARE;
|
||||
import com.amarsoft.are.jbo.BizObject;
|
||||
import com.amarsoft.are.jbo.BizObjectManager;
|
||||
import com.amarsoft.are.jbo.BizObjectQuery;
|
||||
import com.amarsoft.are.jbo.JBOException;
|
||||
import com.amarsoft.are.jbo.JBOFactory;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.are.lang.StringX;
|
||||
import com.base.constant.RestfullConstant;
|
||||
import com.base.util.JsonUtil;
|
||||
import com.tenwa.lease.flow.project.projectapproval.BusinessApprovalStartAction;
|
||||
|
||||
public class BusinessBO implements Serializable {
|
||||
@ -39,8 +52,13 @@ public class BusinessBO implements Serializable {
|
||||
|
||||
private String fixedFlowParam;
|
||||
|
||||
private String serialNo;
|
||||
private String objectNo;
|
||||
private String projectId;
|
||||
|
||||
private String msg;
|
||||
private Map<String, String> params;
|
||||
|
||||
public void setParam(Map<String, Object> fieldMap, String param, Object obj) {
|
||||
obj = fieldMap.get(param.toLowerCase()) == null ? null : fieldMap.get(
|
||||
param.toLowerCase()).toString();
|
||||
@ -91,6 +109,13 @@ public class BusinessBO implements Serializable {
|
||||
|
||||
public BusinessBO(Map<String, Object> fieldMap, JBOTransaction tx)
|
||||
throws Exception {
|
||||
this.objectNo = fieldMap.get("objectNo".toLowerCase()) == null ? ""
|
||||
: fieldMap.get("objectNo".toLowerCase()).toString(); // 流程实例号
|
||||
this.projectId = fieldMap.get("projectId".toLowerCase()) == null ? ""
|
||||
: fieldMap.get("projectId".toLowerCase()).toString(); // 项目编号
|
||||
this.serialNo = fieldMap.get("serialNo".toLowerCase()) == null ? ""
|
||||
: fieldMap.get("serialNo".toLowerCase()).toString(); // 流程实例流水号
|
||||
|
||||
this.carAttributes = fieldMap.get("carAttributes".toLowerCase()) == null ? ""
|
||||
: fieldMap.get("carAttributes".toLowerCase()).toString(); // 车辆属性
|
||||
// 1,新车,2,二手车
|
||||
@ -139,9 +164,12 @@ public class BusinessBO implements Serializable {
|
||||
this.geartype = fieldMap.get("geartype".toLowerCase()) == null ? ""
|
||||
: fieldMap.get("geartype".toLowerCase()).toString(); // 档位
|
||||
|
||||
}
|
||||
|
||||
public void businessAppStart(JBOTransaction tx) throws Exception {
|
||||
if (!checkKeyField()) // 校验非空字段
|
||||
return;
|
||||
|
||||
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
BusinessApprovalStartAction action = new BusinessApprovalStartAction();
|
||||
|
||||
@ -191,6 +219,101 @@ public class BusinessBO implements Serializable {
|
||||
action.setFixedFlowParam(fixedFlowParam);
|
||||
msg = action.initFLow(tx); // 定义流程中需要的参数
|
||||
params = action.getFlowParam();
|
||||
|
||||
objectNo = params.get("FlowUnid");
|
||||
projectId = params.get("ProjectId");
|
||||
if (msg.startsWith("success")) {
|
||||
serialNo = msg.split("@")[1];
|
||||
}
|
||||
}
|
||||
|
||||
public String getSerialNo() {
|
||||
return serialNo;
|
||||
}
|
||||
|
||||
public void setSerialNo(String serialNo) {
|
||||
this.serialNo = serialNo;
|
||||
}
|
||||
|
||||
public String getObjectNo() {
|
||||
return objectNo;
|
||||
}
|
||||
|
||||
public void setObjectNo(String objectNo) {
|
||||
this.objectNo = objectNo;
|
||||
}
|
||||
|
||||
public String getProjectId() {
|
||||
return projectId;
|
||||
}
|
||||
|
||||
public void setProjectId(String projectId) {
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public boolean checkDoc() throws JBOException {
|
||||
BizObjectManager fboM = JBOFactory
|
||||
.getBizObjectManager(FLOW_BUSSINESS_OBJECT.CLASS_NAME);
|
||||
|
||||
BizObject fbo = fboM.createQuery("flow_unid=:flow_unid")
|
||||
.setParameter("flow_unid", objectNo).getSingleResult(false);
|
||||
if (null == fbo) {
|
||||
msg = "未找到流程实例!";
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
String flowPara = fbo.getAttribute("FixedFlowParam") == null ? ""
|
||||
: fbo.getAttribute("FixedFlowParam").toString();
|
||||
JSONObject jo = JsonUtil.str2JSONObject(flowPara.trim());
|
||||
customerType = jo.get("CustomerType") == null ? "" : jo
|
||||
.getString("CustomerType");
|
||||
} catch (Exception e) {
|
||||
ARE.getLog().error(e);
|
||||
msg = "获取客户信息失败!";
|
||||
return false;
|
||||
}
|
||||
|
||||
String sql = "";
|
||||
sql = "SELECT DISTINCT O.ID, O.DOC_NAME,r.id " + "FROM O, "
|
||||
+ LB_DOCRELATIVE.CLASS_NAME + " R "
|
||||
+ "WHERE O.RELATIVE_ID = R.ID "
|
||||
+ "AND O.ID NOT IN (SELECT A.LIBRARY_ID FROM "
|
||||
+ LB_DOCATTRIBUTE.CLASS_NAME + " A) "
|
||||
+ "AND R.FLOW_UNID=:FLOW_UNID " + "AND o.DOC_NATURE='01' "
|
||||
+ "ORDER BY SERIAL_NUM";
|
||||
|
||||
BizObjectManager libraryManage = JBOFactory
|
||||
.getBizObjectManager(LB_DOCLIBRARY.CLASS_NAME);
|
||||
BizObjectQuery query = libraryManage.createQuery(sql).setParameter(
|
||||
"FLOW_UNID", objectNo);
|
||||
List<BizObject> librarys = query.getResultList(false);
|
||||
|
||||
String docNameConfig = "01".equals(customerType) ? RestfullConstant.baseProperty
|
||||
.get("COMPANY_DOC_NAME").toString()
|
||||
: "03".equals(customerType) ? RestfullConstant.baseProperty
|
||||
.get("PERSON_DOC_NAME").toString() : "";
|
||||
String[] array = docNameConfig.trim().split(",");
|
||||
String docName = "";
|
||||
for (String str : array) {
|
||||
String[] array2 = str.trim().split("@");
|
||||
docName += array2[0].trim() + ",";
|
||||
}
|
||||
String[] docArr = docName.split(",");
|
||||
msg = "";
|
||||
for (String doc : docArr) {
|
||||
for (BizObject library : librarys) {
|
||||
if (doc.trim().equals(
|
||||
library.getAttribute("DOC_NAME").toString().trim())) {
|
||||
msg += docName + " 必备 为上传资料照片,";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (msg.equals("")) {
|
||||
return true;
|
||||
}
|
||||
msg = msg.substring(0, msg.length() - 1);
|
||||
return false;
|
||||
}
|
||||
|
||||
public String getCarAttributes() {
|
||||
|
||||
@ -29,6 +29,27 @@ public class BusinessApplyStartController {
|
||||
ARE.getLog().info("[Path] /apply/business/start" + " run .................");
|
||||
|
||||
BusinessApplyStartService service = new BusinessApplyStartServiceImpl();
|
||||
return service.applyStart(request, response, tx, sqlca, ReturnMapUtil);
|
||||
try {
|
||||
return service.applyStart(request, response, tx, sqlca, ReturnMapUtil);
|
||||
} catch (Exception e) {
|
||||
return ReturnMapUtil.rollback(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Path("/action/submit/risk/warning")
|
||||
@POST
|
||||
public Map<String, Object> riskWarning(@Context HttpServletRequest request,
|
||||
@Context HttpServletResponse response, @Context JBOTransaction tx,
|
||||
@Context Transaction sqlca) throws Exception {
|
||||
ReturnMapUtil ReturnMapUtil = new ReturnMapUtil(tx, sqlca);
|
||||
ARE.getLog().info(
|
||||
"[CONTROLLER] BusinessApplyStartController run .................");
|
||||
ARE.getLog().info("[Path] /apply/action/submit/risk/warning" + " run .................");
|
||||
BusinessApplyStartService service = new BusinessApplyStartServiceImpl();
|
||||
try {
|
||||
return service.riskWarning(request, response, tx, sqlca, ReturnMapUtil);
|
||||
} catch (Exception e) {
|
||||
return ReturnMapUtil.rollback(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,6 +31,10 @@ public class ContractInformationSupplementController {
|
||||
+ " run .................");
|
||||
|
||||
ContractInformationSupplementService service = new ContractInformationSupplementServiceImpl();
|
||||
return service.applyStart(request, response, tx, sqlca, ReturnMapUtil);
|
||||
try {
|
||||
return service.applyStart(request, response, tx, sqlca, ReturnMapUtil);
|
||||
} catch (Exception e) {
|
||||
return ReturnMapUtil.rollback(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,4 +14,8 @@ public interface BusinessApplyStartService {
|
||||
Map<String, Object> applyStart(@Context HttpServletRequest request,
|
||||
@Context HttpServletResponse response, @Context JBOTransaction tx,
|
||||
@Context Transaction sqlca, ReturnMapUtil ReturnMapUtil) throws Exception;
|
||||
|
||||
Map<String, Object> riskWarning(@Context HttpServletRequest request,
|
||||
@Context HttpServletResponse response, @Context JBOTransaction tx,
|
||||
@Context Transaction sqlca, ReturnMapUtil ReturnMapUtil) throws Exception;
|
||||
}
|
||||
|
||||
@ -34,6 +34,7 @@ public class BusinessApplyStartServiceImpl implements BusinessApplyStartService
|
||||
fieldMap = (Map<String, Object>) testMap.get("fieldMap");
|
||||
fileList = (List<Map<String, Object>>) testMap.get("fileList");
|
||||
BusinessBO bo = new BusinessBO(fieldMap, tx);
|
||||
bo.businessAppStart(tx);
|
||||
tx.commit();
|
||||
String sReturnInfo = bo.getMsg();
|
||||
if (sReturnInfo.startsWith("success")) {
|
||||
@ -65,11 +66,11 @@ public class BusinessApplyStartServiceImpl implements BusinessApplyStartService
|
||||
}
|
||||
// 返回前台的数据
|
||||
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);
|
||||
body.put("flowUnid", bo.getObjectNo());
|
||||
body.put("objectNo", bo.getObjectNo());
|
||||
body.put("projectId", bo.getProjectId());
|
||||
body.put("taskNo", bo.getSerialNo());
|
||||
body.put("serialNo", bo.getSerialNo());
|
||||
ReturnMapUtil.setReturnMap(body,
|
||||
RestfullConstant.baseProperty.get("success").toString(),
|
||||
"发起成功");
|
||||
@ -85,4 +86,24 @@ public class BusinessApplyStartServiceImpl implements BusinessApplyStartService
|
||||
return ReturnMapUtil.getReturnMap();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Map<String, Object> riskWarning(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");
|
||||
fileList = (List<Map<String, Object>>) testMap.get("fileList");
|
||||
BusinessBO bo = new BusinessBO(fieldMap, tx);
|
||||
boolean flag = bo.checkDoc();
|
||||
|
||||
if(flag) {
|
||||
ReturnMapUtil.setReturnMap(null, RestfullConstant.baseProperty.get("success").toString(), "");
|
||||
} else {
|
||||
String msg = bo.getMsg();
|
||||
ReturnMapUtil.setReturnMap(null, RestfullConstant.baseProperty.get("fale").toString(), msg);
|
||||
}
|
||||
return ReturnMapUtil.getReturnMap();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user