到账通知发布-推送按钮代码调整
This commit is contained in:
		
							parent
							
								
									abf524b597
								
							
						
					
					
						commit
						9178d6123f
					
				|  | @ -9,6 +9,8 @@ import nc.jdbc.framework.PersistenceManager; | |||
| import nc.jdbc.framework.exception.DbException; | ||||
| import nc.jdbc.framework.processor.MapListProcessor; | ||||
| import nc.jdbc.framework.processor.MapProcessor; | ||||
| import nccloud.commons.lang.StringUtils; | ||||
| import nccloud.framework.core.exception.ExceptionUtils; | ||||
| import nccloud.framework.service.ServiceLocator; | ||||
| import nccloud.framework.web.action.itf.ICommonAction; | ||||
| import nccloud.framework.web.container.IRequest; | ||||
|  | @ -172,7 +174,7 @@ public class myBtnClickAction extends InformerAction implements ICommonAction { | |||
|                     "left join bd_cust_supplier df  on cmp.pk_oppunit=df.pk_cust_sup " + | ||||
|                     "left join org_financeorg org on cmp.pk_org = org.pk_financeorg " + | ||||
|                     "left join bd_balatype jstype on jstype.pk_balatype =cmp.pk_balatype " + | ||||
|                     "left join bd_currtype bz on cmp.pk_currtype=bz.pk_currtype"+ | ||||
|                     "left join bd_currtype bz on cmp.pk_currtype=bz.pk_currtype" + | ||||
|                     " where  cmp.pk_informer in(" + result + ") "; | ||||
|             List<Map<String, String>> results = (List<Map<String, String>>) getQueryService().executeQuery(sql, new MapListProcessor()); | ||||
| 
 | ||||
|  | @ -188,18 +190,16 @@ public class myBtnClickAction extends InformerAction implements ICommonAction { | |||
|                 } | ||||
|                 if ("撤回".equals(def01)) { | ||||
|                     vmao.put("publishStatus", "再次发布"); | ||||
| 
 | ||||
|                 } else { | ||||
|                     vmao.put("publishStatus", ""); | ||||
| 
 | ||||
|                 } | ||||
| 
 | ||||
| 
 | ||||
|                 String pjlsh; | ||||
|                 if (row.get("transerial") != null) { | ||||
|                     pjlsh = row.get("transerial").toString(); | ||||
|                     pjlsh = row.get("transerial"); | ||||
|                 } else if (row.get("note_no") != null) { | ||||
|                     pjlsh = row.get("note_no").toString(); | ||||
|                     pjlsh = row.get("note_no"); | ||||
|                 } else { | ||||
|                     resultMap.put("flag", "false"); | ||||
|                     resultMap.put("message", "票据与流水号不可同时为空"); | ||||
|  | @ -211,20 +211,23 @@ public class myBtnClickAction extends InformerAction implements ICommonAction { | |||
|                 vmao.put("bankNum", row.get("accnum")); | ||||
|                 vmao.put("transactionDate", row.get("infodate")); | ||||
|                 vmao.put("paymentReceiptStatus", row.get("direction")); | ||||
|                 vmao.put("currencyCode", row.get("nzcode") ); | ||||
|                 vmao.put("currencyCode", row.get("nzcode")); | ||||
|                 vmao.put("transactionAmount", row.get("moneyy")); | ||||
|                 vmao.put("pendingClaimAmount", 0); | ||||
|                 vmao.put("oppAccount", row.get("oppbankaccount")); | ||||
|                 vmao.put("oppAccountName", row.get("oppunitname")); | ||||
|                 vmao.put("oppBank", row.get("dfcode")); | ||||
|                 vmao.put("oppBankName", row.get("dfname")); | ||||
|                 vmao.put("description", row.get("memo")); | ||||
|                 vmao.put("description", "--"); | ||||
|                 if (StringUtils.isNotEmpty(row.get("memo"))) { | ||||
|                     vmao.put("description", row.get("memo")); | ||||
|                 } | ||||
|                 vmao.put("bankTransactionNumber", pjlsh); | ||||
|                 vmao.put("accountType", "默认类型"); | ||||
|                 vmao.put("orgCode", row.get("orgcode")); | ||||
|                 vmao.put("billNumber", row.get("note_no")); | ||||
| 
 | ||||
|                 if (row.get("pk_balatype") != null && row.get("pk_balatype") != "" && row.get("pk_balatype") != "~") { | ||||
|                 if (row.get("pk_balatype") != null && !Objects.equals(row.get("pk_balatype"), "") && !Objects.equals(row.get("pk_balatype"), "~")) { | ||||
|                     vmao.put("paymentMethod", row.get("pk_balatype")); | ||||
|                 } else { | ||||
|                     vmao.put("paymentMethod", "10"); | ||||
|  | @ -238,6 +241,10 @@ public class myBtnClickAction extends InformerAction implements ICommonAction { | |||
|             Map access_token = (Map) map.get("data"); | ||||
|             String urls2 = urlpath + "/iuap-api-gateway/" + tenant + "/current_yonbip_default_sys/KKAPI/paymentNotice/addBatch?access_token=" + access_token.get("access_token"); | ||||
|             Map mapjson = httpFW(urls2, jsonString1); | ||||
|             Logger.error("myBtnClickAction-mapjson = " + mapjson); | ||||
|             if (!"200".equals(mapjson.getOrDefault("code", "") + "")) { | ||||
|                 throw new Exception(mapjson.getOrDefault("message", "ÍÆËÍʧ°Ü") + ""); | ||||
|             } | ||||
|             Map datas = (Map) mapjson.get("data"); | ||||
|             JSONArray faijsonist = (JSONArray) datas.get("failData"); | ||||
| 
 | ||||
|  | @ -273,17 +280,13 @@ public class myBtnClickAction extends InformerAction implements ICommonAction { | |||
|             String message = datas.get("successData") + "成功" + message1 + ",失败:" + failData; | ||||
|             resultMap.put("flag", "true"); | ||||
|             resultMap.put("message", message); | ||||
|             // 调用服务工具类的deletePrcplInterest方法,尝试删除利息计划 | ||||
|             System.out.println("year" + mapjson); | ||||
|             ins.close(); | ||||
|         } catch (Exception ex) { | ||||
|             // 捕获异常,并记录错误日志 | ||||
|             Logger.error("123" + ex.getMessage(), ex); | ||||
|             resultMap.put("flag", "0"); | ||||
|             resultMap.put("message", ex.getMessage()); | ||||
|             Logger.error("myBtnClickAction-exp:" + ex.getMessage(), ex); | ||||
|             ExceptionUtils.wrapBusinessException(ex.getMessage()); | ||||
|         } | ||||
| 
 | ||||
| 
 | ||||
|         // 返回结果映射 | ||||
|         return resultMap; | ||||
|     } | ||||
|  | @ -300,7 +303,7 @@ public class myBtnClickAction extends InformerAction implements ICommonAction { | |||
|         hmacSHA256.init(secretKey); | ||||
|         byte[] hashBytes = hmacSHA256.doFinal(data.getBytes()); | ||||
|         String base64Hash = Base64.encodeBase64String(hashBytes); | ||||
|         return URLEncoder.encode(base64Hash, StandardCharsets.UTF_8.toString()); | ||||
|         return URLEncoder.encode(base64Hash, StandardCharsets.UTF_8); | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue