diff --git a/src_app_fresh/apx/com/amarsoft/als/apzl/flow/data/controller/FlowDataController.java b/src_app_fresh/apx/com/amarsoft/als/apzl/flow/data/controller/FlowDataController.java index 6e464b071..1c612871b 100644 --- a/src_app_fresh/apx/com/amarsoft/als/apzl/flow/data/controller/FlowDataController.java +++ b/src_app_fresh/apx/com/amarsoft/als/apzl/flow/data/controller/FlowDataController.java @@ -259,4 +259,25 @@ public class FlowDataController { return ReturnMapUtil.rollback(e); } } + + + /** + * 获取扣款卡的银行编号和名称 + */ + @Path("/get/bankInfo") + @POST + public Map getBankInfo(@Context HttpServletRequest request, + @Context HttpServletResponse response, @Context JBOTransaction tx, + @Context Transaction sqlca) throws Exception { + ReturnMapUtil ReturnMapUtil = new ReturnMapUtil(tx, sqlca); + ARE.getLog() + .info("[CONTROLLER] FlowDataController run ................."); + ARE.getLog().info( + "[Path] /flow/data/get/bankInfo" + " run ................."); + try { + return service.getBankInfo(request, response, tx, sqlca, ReturnMapUtil); + } catch (Exception e) { + return ReturnMapUtil.rollback(e); + } + } } diff --git a/src_app_fresh/apx/com/amarsoft/als/apzl/flow/data/service/FlowDataService.java b/src_app_fresh/apx/com/amarsoft/als/apzl/flow/data/service/FlowDataService.java index 6ee32a295..6bd1d8ebe 100644 --- a/src_app_fresh/apx/com/amarsoft/als/apzl/flow/data/service/FlowDataService.java +++ b/src_app_fresh/apx/com/amarsoft/als/apzl/flow/data/service/FlowDataService.java @@ -63,4 +63,8 @@ public interface FlowDataService { @Context HttpServletResponse response, @Context JBOTransaction tx, @Context Transaction sqlca, ReturnMapUtil ReturnMapUtil) throws Exception; + Map getBankInfo(@Context HttpServletRequest request, + @Context HttpServletResponse response, @Context JBOTransaction tx, + @Context Transaction sqlca, ReturnMapUtil ReturnMapUtil) + throws Exception; } diff --git a/src_app_fresh/apx/com/amarsoft/als/apzl/flow/data/service/Impl/FlowDataServiceImpl.java b/src_app_fresh/apx/com/amarsoft/als/apzl/flow/data/service/Impl/FlowDataServiceImpl.java index c69451b94..366b041d7 100644 --- a/src_app_fresh/apx/com/amarsoft/als/apzl/flow/data/service/Impl/FlowDataServiceImpl.java +++ b/src_app_fresh/apx/com/amarsoft/als/apzl/flow/data/service/Impl/FlowDataServiceImpl.java @@ -65,7 +65,7 @@ public class FlowDataServiceImpl implements FlowDataService{ .readRequestParam(request, "UTF-8"); fieldMap = (Map) testMap.get("fieldMap"); // 参数 String flowunid = fieldMap.get("flowunid") == null ? "" : fieldMap.get("flowunid").toString(); - String sql = "SELECT acc_number,bank_name,account,customerid,project_id,flowunid,mobile,certid FROM customer_account_temp WHERE flowunid='"+flowunid+"'"; + String sql = "SELECT acc_number,bank_name,account,customerid,project_id,flowunid,mobile,certid,bank_code,bank_type FROM customer_account_temp WHERE flowunid='"+flowunid+"'"; List> dataList = DataOperatorUtil.getDataBySql(sql); Map body = new HashMap(); if(dataList.size()>0){ @@ -78,6 +78,8 @@ public class FlowDataServiceImpl implements FlowDataService{ body.put("flowunid", map.get("flowunid")+""); body.put("mobile", map.get("mobile")+""); body.put("certid", map.get("certid")+""); + body.put("bank_code", map.get("bank_code")+""); + body.put("bank_type", map.get("bank_type")+""); } //获取扣款文件id String fileSql = "select * from (select * from (select lda.inputtime,lda.id as fileid ,case locate('front', FILENAME) when 0 then 'back' else 'front'end identify,FILENAME from LB_DOCRELATIVE ldra left join LB_DOCLIBRARY ldc on ldc.RELATIVE_ID=ldra.id and ldc.DOC_NAME='还款卡(正反面)' left join LB_DOCATTRIBUTE lda on lda.library_id=ldc.id where ldra.objecttype='BusinessApplyFlow' and ldra.proj_id='"+dataList.get(0).get("project_id")+"' and lda.deleteed is null ORDER BY lda.inputtime DESC) tmp where tmp.identify = 'front' limit 1) t1 union all select * from (select * from (select lda.inputtime,lda.id as fileid ,case locate('front', FILENAME) when 0 then 'back' else 'front'end identify,FILENAME from LB_DOCRELATIVE ldra left join LB_DOCLIBRARY ldc on ldc.RELATIVE_ID=ldra.id and ldc.DOC_NAME='还款卡(正反面)' left join LB_DOCATTRIBUTE lda on lda.library_id=ldc.id where ldra.objecttype='BusinessApplyFlow' and ldra.proj_id='"+dataList.get(0).get("project_id")+"' and lda.deleteed is null ORDER BY lda.inputtime DESC) tmp where tmp.identify = 'back' limit 1) t2; "; @@ -98,6 +100,8 @@ public class FlowDataServiceImpl implements FlowDataService{ body.put("flowunid", ""); body.put("mobile", ""); body.put("certid", ""); + body.put("bank_code",""); + body.put("bank_type",""); } ReturnMapUtil.setReturnMap(body, RestfullConstant.baseProperty.get("success").toString(), ""); @@ -168,6 +172,8 @@ public class FlowDataServiceImpl implements FlowDataService{ cat.setAttributeValue("account", account); cat.setAttributeValue("flowunid",flowunid); cat.setAttributeValue("mobile", mobile); + cat.setAttributeValue("bank_code", fieldMap.get("bank_code") == null ? "" : fieldMap.get("bank_code").toString()); + cat.setAttributeValue("bank_type", fieldMap.get("bank_type") == null ? "" : fieldMap.get("bank_type").toString()); catManage.saveObject(cat); //如果是业务变更流程,扣款卡信息发生变化往扣款卡中间表进行插入数据 if("BusinessChangeApply".equals(flowParms.get("ApplyType"))){ @@ -262,6 +268,8 @@ public class FlowDataServiceImpl implements FlowDataService{ data.put("project_id", dataList.get(0).get("project_id")+""); data.put("mobile", dataList.get(0).get("mobile")+""); data.put("certid", dataList.get(0).get("certid")+""); + data.put("bank_code", dataList.get(0).get("bank_code")+""); + data.put("bank_type", dataList.get(0).get("bank_type")+""); body.put("statusCode", "00"); //获取扣款文件id String fileSql = "select * from (select * from (select lda.inputtime,lda.id as fileid ,case locate('front', FILENAME) when 0 then 'back' else 'front'end identify,FILENAME from LB_DOCRELATIVE ldra left join LB_DOCLIBRARY ldc on ldc.RELATIVE_ID=ldra.id and ldc.DOC_NAME='还款卡(正反面)' left join LB_DOCATTRIBUTE lda on lda.library_id=ldc.id where ldra.objecttype='BusinessApplyFlow' and ldra.proj_id='"+dataList.get(0).get("project_id")+"' and lda.deleteed is null ORDER BY lda.inputtime DESC) tmp where tmp.identify = 'front' limit 1) t1 union all select * from (select * from (select lda.inputtime,lda.id as fileid ,case locate('front', FILENAME) when 0 then 'back' else 'front'end identify,FILENAME from LB_DOCRELATIVE ldra left join LB_DOCLIBRARY ldc on ldc.RELATIVE_ID=ldra.id and ldc.DOC_NAME='还款卡(正反面)' left join LB_DOCATTRIBUTE lda on lda.library_id=ldc.id where ldra.objecttype='BusinessApplyFlow' and ldra.proj_id='"+dataList.get(0).get("project_id")+"' and lda.deleteed is null ORDER BY lda.inputtime DESC) tmp where tmp.identify = 'back' limit 1) t2; "; @@ -276,7 +284,9 @@ public class FlowDataServiceImpl implements FlowDataService{ data.put("project_id", projectid); data.put("mobile", ""); data.put("certid", ""); - + data.put("bank_code", ""); + data.put("bank_type", ""); + body.put("statusCode", "01"); } data.put("contract_id", ContractId); @@ -355,6 +365,8 @@ public class FlowDataServiceImpl implements FlowDataService{ ca.setAttributeValue("certid", certid); ca.setAttributeValue("project_id", projectId); ca.setAttributeValue("contract_id", ContractId); + ca.setAttributeValue("bank_code", fieldMap.get("bank_code") == null ? "" : fieldMap.get("bank_code").toString()); + ca.setAttributeValue("bank_type", fieldMap.get("bank_type") == null ? "" : fieldMap.get("bank_type").toString()); ca.setAttributeValue("sign_status", this.getSigStatus(account, acc_number, bank_name, mobile)); caManage.saveObject(ca); this.savaCustomerAccountTomiddle(flowParms.get("ProjectId"), acc_number, bank_name, account, mobile, FlowUnid,ContractId, sqlca); @@ -869,4 +881,17 @@ public class FlowDataServiceImpl implements FlowDataService{ return fom.createQuery(" objectno=:objectno ").setParameter("objectno", flowUnid).getSingleResult(false); } + + @Override + public Map getBankInfo(HttpServletRequest request, + HttpServletResponse response, JBOTransaction tx, Transaction sqlca, + ReturnMapUtil ReturnMapUtil) throws Exception { + Map body = new HashMap(); + String sql = "SELECT bank_code,bank_name from bank_code"; + List> dataList = DataOperatorUtil.getDataBySql(sql); + body.put("datas", dataList); + ReturnMapUtil.setReturnMap(body, + RestfullConstant.baseProperty.get("success").toString(), ""); + return ReturnMapUtil.getReturnMap(); + } }