提交人:陈绍鑫

日期:2025/01/09 17:30
内容:推送共享优化
This commit is contained in:
陈绍鑫 2026-01-19 09:45:06 +08:00
parent 8a4754cd70
commit 5f0b1da583
1 changed files with 5 additions and 4 deletions

View File

@ -9,6 +9,7 @@ import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
import kd.bos.entity.plugin.AddValidatorsEventArgs; import kd.bos.entity.plugin.AddValidatorsEventArgs;
import kd.bos.entity.plugin.PreparePropertysEventArgs; import kd.bos.entity.plugin.PreparePropertysEventArgs;
import kd.bos.entity.validate.AbstractValidator; import kd.bos.entity.validate.AbstractValidator;
import kd.bos.entity.validate.ErrorLevel;
import kd.bos.logging.Log; import kd.bos.logging.Log;
import kd.bos.logging.LogFactory; import kd.bos.logging.LogFactory;
import kd.bos.orm.query.QCP; import kd.bos.orm.query.QCP;
@ -54,7 +55,7 @@ public class ShareOPPlugin extends AbstractOperationServicePlugIn {
String shkd_lctszt = dynamicObject.getString("shkd_lctszt"); String shkd_lctszt = dynamicObject.getString("shkd_lctszt");
if (zts.contains(shkd_lctszt)){ if (zts.contains(shkd_lctszt)){
if (shkd_apimappingid == null) { if (shkd_apimappingid == null) {
this.addMessage(dataEntity, "未找到对应的推送接口映射"); this.addMessage(dataEntity, "未找到对应的推送接口映射", ErrorLevel.Error);
continue; continue;
} }
DynamicObject shkd_apimapping = BusinessDataServiceHelper.loadSingle(shkd_apimappingid.getLong("id"), "shkd_apimapping"); DynamicObject shkd_apimapping = BusinessDataServiceHelper.loadSingle(shkd_apimappingid.getLong("id"), "shkd_apimapping");
@ -80,7 +81,7 @@ public class ShareOPPlugin extends AbstractOperationServicePlugIn {
try { try {
otherIsJsonRS = JSONObject.parseObject(res); otherIsJsonRS = JSONObject.parseObject(res);
} catch (Exception e) { } catch (Exception e) {
logger.info("单据" + dynamicObject.getString("billno") + "转换json出错" + res); this.addMessage(dataEntity,"单据" + dynamicObject.getString("billno") + "返回res转换json出错" + res, ErrorLevel.Error);
continue; continue;
} }
String flag = otherIsJsonRS.getString("flag"); String flag = otherIsJsonRS.getString("flag");
@ -107,7 +108,7 @@ public class ShareOPPlugin extends AbstractOperationServicePlugIn {
try { try {
otherIsJsonRS = JSONObject.parseObject(res); otherIsJsonRS = JSONObject.parseObject(res);
} catch (Exception e) { } catch (Exception e) {
logger.info("单据" + dynamicObject.getString("billno") + "转换json出错" + res); this.addMessage(dataEntity,"单据" + dynamicObject.getString("billno") + "返回res转换json出错" + res, ErrorLevel.Error);
continue; continue;
} }
String flag = otherIsJsonRS.getString("flag"); String flag = otherIsJsonRS.getString("flag");
@ -137,7 +138,7 @@ public class ShareOPPlugin extends AbstractOperationServicePlugIn {
try { try {
otherIsJsonRS = JSONObject.parseObject(res); otherIsJsonRS = JSONObject.parseObject(res);
} catch (Exception e) { } catch (Exception e) {
logger.info("单据" + dynamicObject.getString("billno") + "转换json出错" + res); this.addMessage(dataEntity,"单据" + dynamicObject.getString("billno") + "返回res转换json出错" + res, ErrorLevel.Error);
continue; continue;
} }
String flag = otherIsJsonRS.getString("flag"); String flag = otherIsJsonRS.getString("flag");