插件备注
This commit is contained in:
parent
f1fb81e980
commit
f6687bcc03
|
@ -56,6 +56,10 @@ import javax.annotation.Resource;
|
|||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 开票申请(中台蓝字,红字推送有度)
|
||||
* 这个插件从中台下发开票申请到有度
|
||||
*/
|
||||
public class InvoiceDistributePluginInitializer extends PluginBaseEntity {
|
||||
Logger logger = LoggerFactory.getLogger(getClass());
|
||||
|
||||
|
@ -1226,10 +1230,10 @@ public class InvoiceDistributePluginInitializer extends PluginBaseEntity {
|
|||
*/
|
||||
private void updateOAForm(JsonResultEntity jsonResultEntity, JSONObject data) {
|
||||
try {
|
||||
logger.info("准备更新开票结果到OA单据返回参数:{},data_id:{}",JSONObject.toJSONString(jsonResultEntity),data.getString("data_id"));
|
||||
logger.info("d准备更新开票结果到OA单ata_id:{}",data.getString("data_id"));
|
||||
if (null != jsonResultEntity && null != data && StrUtil.isNotEmpty(data.getString("data_id"))){
|
||||
String data_id = data.getString("data_id");
|
||||
String attrStr = (String) jsonResultEntity.getAttribute();
|
||||
String attrStr = jsonResultEntity.getAttribute().toString();
|
||||
JSONObject attrObj = JSONObject.parseObject(attrStr);
|
||||
JSONObject attribute = attrObj.getJSONObject("attribute");
|
||||
if (null != attribute && !"0".equals(attribute.getString("code"))){
|
||||
|
@ -1246,10 +1250,11 @@ public class InvoiceDistributePluginInitializer extends PluginBaseEntity {
|
|||
ApplyInvoiceEntity applyInvoice = new ApplyInvoiceEntity();
|
||||
applyInvoice.setId(data_id);
|
||||
applyInvoice.setDataSourceCode("HT-OA");
|
||||
//暂时先不退回,还不稳定 等稳定了再说
|
||||
ApplyInvoiceEntity applyInvoiceEntity = applyInvoiceService.queryAffair(applyInvoice);
|
||||
if (null != applyInvoiceEntity){
|
||||
String stepBack = applyInvoiceService.stepBackValueOf(applyInvoiceEntity.getWorkitem_id(), message);
|
||||
applyInvoiceService.process(stepBack,"8000590006","ZZZH");
|
||||
// String stepBack = applyInvoiceService.stepBackValueOf(applyInvoiceEntity.getWorkitem_id(), message);
|
||||
// applyInvoiceService.process(stepBack,"8000590006","ZZZH");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1259,15 +1264,15 @@ public class InvoiceDistributePluginInitializer extends PluginBaseEntity {
|
|||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
String resultStr = "{\"attribute\":\"{\\\"msg\\\":\\\"转发成功\\\",\\\"type\\\":null,\\\"flag\\\":true,\\\"status\\\":\\\"200\\\",\\\"attribute\\\":{\\\"result\\\":{\\\"businessNo\\\":\\\"KP202506170028\\\",\\\"applicationNumber\\\":\\\"LZ250617000004\\\",\\\"applicationId\\\":\\\"1384530530992742657\\\"},\\\"code\\\":\\\"0\\\",\\\"cause\\\":null,\\\"message\\\":\\\"成功\\\"}}\",\"flag\":true,\"msg\":\"转发成功\",\"status\":\"200\"}";
|
||||
String resultStr = "{\"attribute\":\"{\\\"msg\\\":\\\"转发失败\\\",\\\"type\\\":null,\\\"flag\\\":false,\\\"status\\\":\\\"500\\\",\\\"attribute\\\":{\\\"result\\\":null,\\\"code\\\":\\\"101\\\",\\\"cause\\\":null,\\\"message\\\":\\\"开放接口保存申请单异常,异常信息:当前企业没有该开票模板的使用权限\\\"}}\",\"flag\":false,\"msg\":\"转发失败\",\"status\":\"500\"}";
|
||||
JsonResultEntity jsonResultEntity = JSON.parseObject(resultStr,JsonResultEntity.class);
|
||||
JSONObject data = new JSONObject();
|
||||
data.put("data_id","2076813022629089234");
|
||||
data.put("data_id","512751445550907568");
|
||||
InvoiceDistributePluginInitializer plugin = new InvoiceDistributePluginInitializer();
|
||||
String attrStr = (String) jsonResultEntity.getAttribute();
|
||||
JSONObject attrObj = JSONObject.parseObject(attrStr);
|
||||
plugin.updateOAForm(jsonResultEntity,data);
|
||||
|
||||
System.out.println("111");
|
||||
}
|
||||
|
||||
private void saveMdmModuleSendLogEntity(Long mdmCode,String distributeId,String dataType,String remark,String dbname,String formmain_id, String target_app, String appId, String target_api,String apiID, String source_data, String option_type) throws Exception {
|
||||
|
|
|
@ -9,6 +9,9 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
* 查询开票申请结果
|
||||
*/
|
||||
public class QueryInvoiceResultPluginInitializer extends PluginBaseEntity {
|
||||
Logger logger = LoggerFactory.getLogger(ZxBankResultPluginInitializer.class);
|
||||
|
||||
|
|
Loading…
Reference in New Issue