到账通知发布-推送按钮代码调整

This commit is contained in:
mzr 2025-04-16 14:22:57 +08:00
parent abf524b597
commit 9178d6123f
1 changed files with 18 additions and 15 deletions

View File

@ -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;
@ -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", "票据与流水号不可同时为空");
@ -218,13 +218,16 @@ public class myBtnClickAction extends InformerAction implements ICommonAction {
vmao.put("oppAccountName", row.get("oppunitname"));
vmao.put("oppBank", row.get("dfcode"));
vmao.put("oppBankName", row.get("dfname"));
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);
}