到账通知发布-推送按钮代码调整
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.exception.DbException;
 | 
				
			||||||
import nc.jdbc.framework.processor.MapListProcessor;
 | 
					import nc.jdbc.framework.processor.MapListProcessor;
 | 
				
			||||||
import nc.jdbc.framework.processor.MapProcessor;
 | 
					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.service.ServiceLocator;
 | 
				
			||||||
import nccloud.framework.web.action.itf.ICommonAction;
 | 
					import nccloud.framework.web.action.itf.ICommonAction;
 | 
				
			||||||
import nccloud.framework.web.container.IRequest;
 | 
					import nccloud.framework.web.container.IRequest;
 | 
				
			||||||
| 
						 | 
					@ -188,18 +190,16 @@ public class myBtnClickAction extends InformerAction implements ICommonAction {
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                if ("撤回".equals(def01)) {
 | 
					                if ("撤回".equals(def01)) {
 | 
				
			||||||
                    vmao.put("publishStatus", "再次发布");
 | 
					                    vmao.put("publishStatus", "再次发布");
 | 
				
			||||||
 | 
					 | 
				
			||||||
                } else {
 | 
					                } else {
 | 
				
			||||||
                    vmao.put("publishStatus", "");
 | 
					                    vmao.put("publishStatus", "");
 | 
				
			||||||
 | 
					 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                String pjlsh;
 | 
					                String pjlsh;
 | 
				
			||||||
                if (row.get("transerial") != null) {
 | 
					                if (row.get("transerial") != null) {
 | 
				
			||||||
                    pjlsh = row.get("transerial").toString();
 | 
					                    pjlsh = row.get("transerial");
 | 
				
			||||||
                } else if (row.get("note_no") != null) {
 | 
					                } else if (row.get("note_no") != null) {
 | 
				
			||||||
                    pjlsh = row.get("note_no").toString();
 | 
					                    pjlsh = row.get("note_no");
 | 
				
			||||||
                } else {
 | 
					                } else {
 | 
				
			||||||
                    resultMap.put("flag", "false");
 | 
					                    resultMap.put("flag", "false");
 | 
				
			||||||
                    resultMap.put("message", "票据与流水号不可同时为空");
 | 
					                    resultMap.put("message", "票据与流水号不可同时为空");
 | 
				
			||||||
| 
						 | 
					@ -218,13 +218,16 @@ public class myBtnClickAction extends InformerAction implements ICommonAction {
 | 
				
			||||||
                vmao.put("oppAccountName", row.get("oppunitname"));
 | 
					                vmao.put("oppAccountName", row.get("oppunitname"));
 | 
				
			||||||
                vmao.put("oppBank", row.get("dfcode"));
 | 
					                vmao.put("oppBank", row.get("dfcode"));
 | 
				
			||||||
                vmao.put("oppBankName", row.get("dfname"));
 | 
					                vmao.put("oppBankName", row.get("dfname"));
 | 
				
			||||||
 | 
					                vmao.put("description", "--");
 | 
				
			||||||
 | 
					                if (StringUtils.isNotEmpty(row.get("memo"))) {
 | 
				
			||||||
                    vmao.put("description", row.get("memo"));
 | 
					                    vmao.put("description", row.get("memo"));
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
                vmao.put("bankTransactionNumber", pjlsh);
 | 
					                vmao.put("bankTransactionNumber", pjlsh);
 | 
				
			||||||
                vmao.put("accountType", "默认类型");
 | 
					                vmao.put("accountType", "默认类型");
 | 
				
			||||||
                vmao.put("orgCode", row.get("orgcode"));
 | 
					                vmao.put("orgCode", row.get("orgcode"));
 | 
				
			||||||
                vmao.put("billNumber", row.get("note_no"));
 | 
					                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"));
 | 
					                    vmao.put("paymentMethod", row.get("pk_balatype"));
 | 
				
			||||||
                } else {
 | 
					                } else {
 | 
				
			||||||
                    vmao.put("paymentMethod", "10");
 | 
					                    vmao.put("paymentMethod", "10");
 | 
				
			||||||
| 
						 | 
					@ -238,6 +241,10 @@ public class myBtnClickAction extends InformerAction implements ICommonAction {
 | 
				
			||||||
            Map access_token = (Map) map.get("data");
 | 
					            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");
 | 
					            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);
 | 
					            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");
 | 
					            Map datas = (Map) mapjson.get("data");
 | 
				
			||||||
            JSONArray faijsonist = (JSONArray) datas.get("failData");
 | 
					            JSONArray faijsonist = (JSONArray) datas.get("failData");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -273,17 +280,13 @@ public class myBtnClickAction extends InformerAction implements ICommonAction {
 | 
				
			||||||
            String message = datas.get("successData") + "成功" + message1 + ",失败:" + failData;
 | 
					            String message = datas.get("successData") + "成功" + message1 + ",失败:" + failData;
 | 
				
			||||||
            resultMap.put("flag", "true");
 | 
					            resultMap.put("flag", "true");
 | 
				
			||||||
            resultMap.put("message", message);
 | 
					            resultMap.put("message", message);
 | 
				
			||||||
            // 调用服务工具类的deletePrcplInterest方法,尝试删除利息计划
 | 
					 | 
				
			||||||
            System.out.println("year" + mapjson);
 | 
					 | 
				
			||||||
            ins.close();
 | 
					            ins.close();
 | 
				
			||||||
        } catch (Exception ex) {
 | 
					        } catch (Exception ex) {
 | 
				
			||||||
            // 捕获异常,并记录错误日志
 | 
					            // 捕获异常,并记录错误日志
 | 
				
			||||||
            Logger.error("123" + ex.getMessage(), ex);
 | 
					            Logger.error("myBtnClickAction-exp:" + ex.getMessage(), ex);
 | 
				
			||||||
            resultMap.put("flag", "0");
 | 
					            ExceptionUtils.wrapBusinessException(ex.getMessage());
 | 
				
			||||||
            resultMap.put("message", ex.getMessage());
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
        // 返回结果映射
 | 
					        // 返回结果映射
 | 
				
			||||||
        return resultMap;
 | 
					        return resultMap;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					@ -300,7 +303,7 @@ public class myBtnClickAction extends InformerAction implements ICommonAction {
 | 
				
			||||||
        hmacSHA256.init(secretKey);
 | 
					        hmacSHA256.init(secretKey);
 | 
				
			||||||
        byte[] hashBytes = hmacSHA256.doFinal(data.getBytes());
 | 
					        byte[] hashBytes = hmacSHA256.doFinal(data.getBytes());
 | 
				
			||||||
        String base64Hash = Base64.encodeBase64String(hashBytes);
 | 
					        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