diff --git a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/data/service/impl/BusinessDataServiceImpl.java b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/data/service/impl/BusinessDataServiceImpl.java index 9fabfbb16..e1b78a651 100644 --- a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/data/service/impl/BusinessDataServiceImpl.java +++ b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/data/service/impl/BusinessDataServiceImpl.java @@ -36,7 +36,7 @@ public class BusinessDataServiceImpl implements BusinessDataService { Map body = new HashMap(); if(dataList.size()>0){ for (Map map : dataList) { - body.putIfAbsent(map.get("flowname"), map.get("number")); + body.put(map.get("flowname"), map.get("number")); } } ReturnMapUtil.setReturnMap(body, diff --git a/src_app_fresh/apx/com/amarsoft/als/user/change/initiate/controller/ApplyChangeController.java b/src_app_fresh/apx/com/amarsoft/als/user/change/initiate/controller/ApplyChangeController.java new file mode 100644 index 000000000..74865817c --- /dev/null +++ b/src_app_fresh/apx/com/amarsoft/als/user/change/initiate/controller/ApplyChangeController.java @@ -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 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); + } + } +} diff --git a/src_app_fresh/apx/com/amarsoft/als/user/change/initiate/controller/ApplyGuarantorController.java b/src_app_fresh/apx/com/amarsoft/als/user/change/initiate/controller/ApplyGuarantorController.java new file mode 100644 index 000000000..873c1145e --- /dev/null +++ b/src_app_fresh/apx/com/amarsoft/als/user/change/initiate/controller/ApplyGuarantorController.java @@ -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 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); + } + } +} diff --git a/src_app_fresh/apx/com/amarsoft/als/user/change/initiate/service/impl/ApplyGuarantorServiceImpl.java b/src_app_fresh/apx/com/amarsoft/als/user/change/initiate/service/impl/ApplyGuarantorServiceImpl.java new file mode 100644 index 000000000..2a78cdcb3 --- /dev/null +++ b/src_app_fresh/apx/com/amarsoft/als/user/change/initiate/service/impl/ApplyGuarantorServiceImpl.java @@ -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 fieldMap; + @SuppressWarnings("unchecked") + @Override + public Map applyGuarantor(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"); + String flowUnid = fieldMap.get("flowunid") == null ? "" : fieldMap.get( + "flowunid").toString(); + Map body = new HashMap(); + BizObjectManager objectManage = JBOFactory + .getBizObjectManager(LB_GUARANTEE_UNIT_TEMP.CLASS_NAME); + List 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(); + } + +}