担保人接口
This commit is contained in:
parent
e99b0b5cb8
commit
143dc371eb
@ -36,7 +36,7 @@ public class BusinessDataServiceImpl implements BusinessDataService {
|
||||
Map<String, Object> body = new HashMap<String, Object>();
|
||||
if(dataList.size()>0){
|
||||
for (Map<String, String> map : dataList) {
|
||||
body.putIfAbsent(map.get("flowname"), map.get("number"));
|
||||
body.put(map.get("flowname"), map.get("number"));
|
||||
}
|
||||
}
|
||||
ReturnMapUtil.setReturnMap(body,
|
||||
|
||||
@ -0,0 +1,38 @@
|
||||
package apx.com.amarsoft.als.user.change.initiate.controller;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.core.Context;
|
||||
|
||||
import com.amarsoft.are.ARE;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
import com.base.util.ReturnMapUtil;
|
||||
|
||||
import apx.com.amarsoft.als.user.change.initiate.service.impl.ApplyChangeService;
|
||||
import apx.com.amarsoft.als.user.change.initiate.service.impl.ApplyChangeServiceImpl;
|
||||
@Path("/change")
|
||||
public class ApplyChangeController {
|
||||
//ÒµÎñ±ä¸ü·¢Æð
|
||||
@Path("/business/change")
|
||||
@POST
|
||||
public Map<String, Object> applyChange(@Context HttpServletRequest request,
|
||||
@Context HttpServletResponse response, @Context JBOTransaction tx,
|
||||
@Context Transaction sqlca) throws Exception {
|
||||
ReturnMapUtil ReturnMapUtil = new ReturnMapUtil(tx, sqlca);
|
||||
ARE.getLog().info(
|
||||
"[CONTROLLER] ApplyCancelController run .................");
|
||||
ARE.getLog().info("[Path] /change/business/change" + " run .................");
|
||||
|
||||
ApplyChangeService service = new ApplyChangeServiceImpl();
|
||||
try {
|
||||
return service.applyChange(request, response, tx, sqlca, ReturnMapUtil);
|
||||
} catch (Exception e) {
|
||||
return ReturnMapUtil.rollback(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package apx.com.amarsoft.als.user.change.initiate.controller;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.core.Context;
|
||||
|
||||
import com.amarsoft.are.ARE;
|
||||
import com.amarsoft.are.jbo.JBOTransaction;
|
||||
import com.amarsoft.awe.util.Transaction;
|
||||
import com.base.util.ReturnMapUtil;
|
||||
|
||||
import apx.com.amarsoft.als.user.change.initiate.service.ApplyGuarantorService;
|
||||
import apx.com.amarsoft.als.user.change.initiate.service.impl.ApplyGuarantorServiceImpl;
|
||||
|
||||
@Path("/change/initiate")
|
||||
public class ApplyGuarantorController {
|
||||
|
||||
//µ£±£ÈËÐÅÏ¢
|
||||
@Path("/business/Guarantor")
|
||||
@POST
|
||||
public Map<String, Object> applyGuarantor(@Context HttpServletRequest request,
|
||||
@Context HttpServletResponse response, @Context JBOTransaction tx,
|
||||
@Context Transaction sqlca) throws Exception {
|
||||
ReturnMapUtil ReturnMapUtil = new ReturnMapUtil(tx, sqlca);
|
||||
ARE.getLog().info(
|
||||
"[CONTROLLER] ApplyCancelController run .................");
|
||||
ARE.getLog().info("[Path] /change/initiate/business/Guarantor" + " run .................");
|
||||
|
||||
ApplyGuarantorService service = new ApplyGuarantorServiceImpl();
|
||||
try {
|
||||
return service.applyGuarantor(request, response, tx, sqlca, ReturnMapUtil);
|
||||
} catch (Exception e) {
|
||||
return ReturnMapUtil.rollback(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,55 @@
|
||||
package apx.com.amarsoft.als.user.change.initiate.service.impl;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
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.awe.util.Transaction;
|
||||
import com.base.constant.RestfullConstant;
|
||||
import com.base.util.MultipartDataUtil;
|
||||
import com.base.util.ReturnMapUtil;
|
||||
|
||||
import apx.com.amarsoft.als.user.change.initiate.service.ApplyGuarantorService;
|
||||
import jbo.com.tenwa.lease.comm.LB_GUARANTEE_UNIT_TEMP;
|
||||
//±ä¸üµ£±£ÈËÐÅϢҳǩ
|
||||
public class ApplyGuarantorServiceImpl implements ApplyGuarantorService {
|
||||
private Map<String, Object> fieldMap;
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public Map<String, Object> applyGuarantor(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("flowunid") == null ? "" : fieldMap.get(
|
||||
"flowunid").toString();
|
||||
Map<String, Object> body = new HashMap<String, Object>();
|
||||
BizObjectManager objectManage = JBOFactory
|
||||
.getBizObjectManager(LB_GUARANTEE_UNIT_TEMP.CLASS_NAME);
|
||||
List<BizObject> lgutList = objectManage.createQuery("flowunid=:flowunid")
|
||||
.setParameter("flowunid", flowUnid).getResultList(false);
|
||||
|
||||
if(lgutList.size()>0){
|
||||
for (BizObject map : lgutList) {
|
||||
body.put("aid",map.getAttribute("ID"));
|
||||
body.put("bst",map.getAttribute("STATUS"));
|
||||
body.put("cfu",map.getAttribute("FULLNAME"));
|
||||
body.put("das",map.getAttribute("ASSURE_RELATION"));
|
||||
body.put("emo",map.getAttribute("MOBILE"));
|
||||
body.put("fce",map.getAttribute("CERTID"));
|
||||
body.put("gad",map.getAttribute("ADDRESS"));
|
||||
body.put("has",map.getAttribute("ASSURE_METHOD"));
|
||||
}
|
||||
}
|
||||
ReturnMapUtil.setReturnMap(body,RestfullConstant.baseProperty.get("success").toString(), "");
|
||||
return ReturnMapUtil.getReturnMap();
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user