|
|
@@ -39,17 +39,10 @@ public abstract class GzwPushOpPlugin extends AbstractOperationServicePlugIn {
|
|
|
DynamicObject[] dataEntities = args.getDataEntities();
|
|
|
try {
|
|
|
pushGzw(dataEntities);
|
|
|
+ showSuccessMsg(args);
|
|
|
} catch (Exception e) {
|
|
|
logger.info(String.format("%s推送国资委接口内部异常:%s", this.billEntityType.getDisplayName().getLocaleValue(), e));
|
|
|
- //是否显示异常信息
|
|
|
- Boolean isShowMsg = (Boolean) ParamUtils.getSysCtrlParameter(ParamUtils.EM, "nckd_isshowmsg");
|
|
|
- if (isShowMsg) {
|
|
|
- throw new KDBizException("此提示不影响业务流程,推送国资委接口内部异常:" + Arrays.stream(e.getStackTrace())
|
|
|
- .map(StackTraceElement::toString)
|
|
|
- .collect(Collectors.joining("\n at ",
|
|
|
- e.toString() + "\n at ",
|
|
|
- "")));
|
|
|
- }
|
|
|
+ showErrorMsg(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -289,4 +282,35 @@ public abstract class GzwPushOpPlugin extends AbstractOperationServicePlugIn {
|
|
|
protected String getApiCode(Map<String, Object> sysCtrlParameter) {
|
|
|
return (String) sysCtrlParameter.get("nckd_apicode");
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 显示异常信息
|
|
|
+ * @param e
|
|
|
+ */
|
|
|
+ private void showErrorMsg(Exception e){
|
|
|
+ //是否显示异常信息
|
|
|
+ String errorMsgType = (String) ParamUtils.getSysCtrlParameter(ParamUtils.EM, "nckd_errormsgtype");
|
|
|
+ if (errorMsgType.equals("XSJLXX")) {
|
|
|
+ //提示简略信息
|
|
|
+ throw new KDBizException("此提示不影响业务流程,推送国资委接口失败:" + e.getMessage());
|
|
|
+ } else if (errorMsgType.equals("XSXXXX")) {
|
|
|
+ //提示详细信息
|
|
|
+ throw new KDBizException("此提示不影响业务流程,推送国资委接口失败:" + Arrays.stream(e.getStackTrace())
|
|
|
+ .map(StackTraceElement::toString)
|
|
|
+ .collect(Collectors.joining("\n at ",
|
|
|
+ e.toString() + "\n at ",
|
|
|
+ "")));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 显示成功信息
|
|
|
+ */
|
|
|
+ private void showSuccessMsg(AfterOperationArgs args){
|
|
|
+ if(args.getOperationKey().equals("pushgzw")){
|
|
|
+ this.getOperationResult().setSuccess(Boolean.TRUE);
|
|
|
+ this.getOperationResult().setShowMessage(Boolean.TRUE);
|
|
|
+ this.getOperationResult().setMessage("推送国资委完成");
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|