/*** 调用XXX市接口推送银行开户信息
* ywguid 即为 projectguid
*@exception/throws [违例类型] [违例说明]
*@see[类、类#方法、类#成员]*/
public voidpushToSZOpenAcountApplyinfo(String projectguid) {try{
YzyhEntityServiceImpl yzyhEntityServiceImpl= newYzyhEntityServiceImpl();
System.out.println("===================引入银行印章流程得实体service" +yzyhEntityServiceImpl);
YzyhEntity yzyhEntity=yzyhEntityServiceImpl.getYzyhEntityByProjectguid(projectguid);//时间格式化
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd 00:00:00");if (yzyhEntity != null) {
RestfulService restfulservice= newRestfulService();
JSONObject jobparasjson= newJSONObject();
JSONObject jobjparas= newJSONObject();
jobparasjson.put("token", "xxx_WebSerivce_**##0601");//业务标识
jobjparas.put("ywguid", projectguid);//存款人名称
jobjparas.put("acctna", StringUtil.isBlank(yzyhEntity.getAcctna()) ? "": yzyhEntity.getAcctna());//证明文件种类
if(StringUtil.isNotBlank(yzyhEntity.getIdtftp())) {
jobjparas.put("idtftp", yzyhEntity.getIdtftp());
}else{
jobjparas.put("idtftp", "M");
}
String areacode= "";//证明文件编号
jobjparas.put("idtfno", StringUtil.isBlank(yzyhEntity.getIdtfno()) ? "": yzyhEntity.getIdtfno());//证明文件有效期
jobjparas.put("matudt", StringUtil.isBlank(yzyhEntity.getMatudt()) ? "2099-12-30 00:00:00": sdf2.format(yzyhEntity.getMatudt()));//地址//String address = yzyhEntity.get("Ctrl66") + "省(市/区)";//address += yzyhEntity.get("Ctrl67") + "市(区/盟/州)";//address += yzyhEntity.get("Ctrl68") + "县";//address += yzyhEntity.get("Ctrl69") + "乡(镇/街道)";//address += yzyhEntity.get("Ctrl70") + "村(路)";//address += yzyhEntity.get("Ctrl71") + "号";//id有效期
jobjparas.put("lwiddt", StringUtil.isBlank(yzyhEntity.getLwiddt()) ? "2099-12-30 00:00:00": sdf2.format(yzyhEntity.getLwiddt()));//证件编号
jobjparas.put("lwidno", yzyhEntity.getLwidno());//基本账户开户许可核准号
jobjparas.put("dtittp", "ACO1");//代理人证件有效期
jobjparas.put("pxmudt", StringUtil.isBlank(yzyhEntity.getPxmudt()) ? "2099-12-30 00:00:00": sdf2.format(yzyhEntity.getPxmudt()));//业务代码
jobjparas.put("qxcode", yzyhEntity.getQxcode());
jobparasjson.put("params", jobjparas);
System.out.println("开户申请参数:" +jobparasjson);//调用市政上报接口
String result =restfulservice.getTaskinfo(jobparasjson.toString());
System.out.println("===============开户申请信息返回值:" +result);if(StringUtil.isBlank(result)) {
System.out.println("=============开户申请信息推送失败=====================");
}
JSONObject jsonresult=(JSONObject) JSONObject.parse(result);
String custom= jsonresult.getString("custom");
JSONObject jsoncustom=(JSONObject) JSONObject.parse(custom);
String code= jsoncustom.getString("code");if ("1".equals(code)) {
System.out.println("==============开户申请返回结果:" + jsoncustom.getString("text"));
}else{
System.out.println("==============开户申请返回结果:" + jsoncustom.getString("text"));
}
}
}catch(Exception e) {
e.printStackTrace();
System.out.print(e.toString());
}
}