增加查询字段,合同编号和本次开票金额
This commit is contained in:
parent
74f5d0c1bb
commit
99e32b0c9e
base-buildpackage/src/main/java/com/hzya/frame/plugin/serviceData/plugin
base-service/src/main/java/com/hzya/frame/sysnew/comparison/serviceData/service/impl
|
@ -1055,6 +1055,7 @@ public class ServiceDataDistributePluginInitializer extends PluginBaseEntity{
|
|||
}
|
||||
|
||||
for (int i = 0; i < doObjects.size(); i++) {
|
||||
logger.info("=========需要下发的数据有{}条,单据编号为:{}======",doObjects.size(),doObjects.get(i).getString("vdef1"));
|
||||
//查询是否已经手动发送过。只有新增校验,查询发送日志是否已经有这条数据
|
||||
MdmModuleSendLogEntity mdmModuleSendLogEntity = new MdmModuleSendLogEntity();
|
||||
mdmModuleSendLogEntity.setTableName(mainDb+"_send_log");
|
||||
|
@ -1154,7 +1155,7 @@ public class ServiceDataDistributePluginInitializer extends PluginBaseEntity{
|
|||
//组装数据发送
|
||||
logger.info("=========开始执行正常业务数据下发脚本,第二次==============");
|
||||
JsonResultEntity jsonResultEntity = sendData(apiEntity,headers,bodys,querys);
|
||||
logger.info("=====业务数据下发重试调用BIP付款申请返回结果为:{}",JSONObject.parseObject(jsonResultEntity.getAttribute().toString()).toJSONString());
|
||||
logger.info("=====业务数据下发调用BIP付款申请返回结果为:{}",JSONObject.parseObject(jsonResultEntity.getAttribute().toString()).toJSONString());
|
||||
if(jsonResultEntity.isFlag()){
|
||||
if (scriptEntity != null && scriptEntity.getId() != null && scriptEntity.getBackScriptData() != null ) {
|
||||
logger.info("=========开始执行正常业务返回脚本==============");
|
||||
|
@ -1203,6 +1204,12 @@ public class ServiceDataDistributePluginInitializer extends PluginBaseEntity{
|
|||
serviceDataEntity.setId(query.get(0).getId());
|
||||
serviceDataDao.updateBipPaymentNumber(serviceDataEntity);
|
||||
logger.info("===正常下发时候,根据OA单据编号:{}更新BIP付款申请单号:{}完毕",jsonObjectParent.getString("vdef1"),backJsonResultEntity.getString("vbillno"));
|
||||
Map<String, Object> updateMap = new HashMap<>();
|
||||
updateMap.put("tableName",mainDb);
|
||||
//updateMap.put("dataStatus", "Y");
|
||||
updateMap.put("addStatus", "1");
|
||||
updateMap.put("id", objects.get(i).getString("id"));
|
||||
mdmModuleDao.updateMdmSTs(updateMap);
|
||||
}else{
|
||||
logger.info("======正常下发时候根据单据编号:{}未能在三维OA查询到数据,Bip付款申请单号不回写",jsonObjectParent.getString("vdef1"));
|
||||
}
|
||||
|
@ -1217,27 +1224,28 @@ public class ServiceDataDistributePluginInitializer extends PluginBaseEntity{
|
|||
//保存日志
|
||||
saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"1","发送成功",mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
|
||||
objects.get(i).put("sendsanfzt123",true);
|
||||
logger.info("========业务数据下发完成,日志保存为成功============");
|
||||
continue;
|
||||
}else {
|
||||
//保存日志
|
||||
saveMdmModuleSendLogEntity(mainCode,mdmModuleDistributeEntities.get(i1).getId(),"2","转发失败:"+jsonResultEntity.getAttribute(),mainDb,objects.get(i).getString("id"),sysApplicationEntity.getName(),sysApplicationEntity.getId(),apiEntity.getApiName(),apiEntity.getId(),doObjects.get(i).toJSONString(),"1");
|
||||
objects.get(i).put("sendsanfzt123",false);
|
||||
logger.info("========业务数据下发完成,日志保存为失败============");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//所有下发发送完成,修改数据状态
|
||||
for (int i = 0; i < objects.size(); i++) {
|
||||
if(objects.get(i).getBoolean("sendsanfzt123")){
|
||||
/* //所有下发发送完成,修改数据状态
|
||||
for (int ii = 0; ii < objects.size(); ii++) {
|
||||
if(objects.get(ii).getBoolean("sendsanfzt123")){
|
||||
Map<String, Object> updateMap = new HashMap<>();
|
||||
updateMap.put("tableName",mainDb);
|
||||
//updateMap.put("dataStatus", "Y");
|
||||
updateMap.put("addStatus", "1");
|
||||
updateMap.put("id", objects.get(i).getString("id"));
|
||||
updateMap.put("id", objects.get(ii).getString("id"));
|
||||
mdmModuleDao.updateMdmSTs(updateMap);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
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 {
|
||||
|
|
|
@ -304,7 +304,7 @@ public class ServiceDataServiceImpl extends BaseService<ComparisonEntity,String>
|
|||
"push_status_field,summary_id,bip_payment_number_field,bip_amount_field,\n" +
|
||||
"vdef1,pk_acceptorg,creator,pk_group,pk_org,applydate,pk_trantypecode,pk_busitype,vdef2,pk_currtype,\n" +
|
||||
"pk_supplier,pk_bankacc_r,pk_bankacc_p,pk_decidedept,vdef10,vdef12,vdef3,vdef4,vdef5,vdef6,applysum,\n" +
|
||||
"vdef7,vdef8,vdef9 from v_cmp_apply where 1=1 and vdef1 is not null and push_status is null and applysum >0");
|
||||
"vdef7,vdef8,vdef9,vdef21 from v_cmp_apply where 1=1 and vdef1 is not null and push_status is null and applysum >0");
|
||||
mdmModuleSourceEntity.setDataSourceCode(dbCode);
|
||||
List<HashMap<String, Object>> hashMaps = serviceDataDao.queryListBySWSource(stringBuffer.toString(), mdmModuleSourceEntity);
|
||||
int i = 0;
|
||||
|
@ -321,7 +321,7 @@ public class ServiceDataServiceImpl extends BaseService<ComparisonEntity,String>
|
|||
StringBuffer stringBufferDetails = new StringBuffer();
|
||||
stringBufferDetails.append("select d_id as data_id,tab_name,pk_balatype,pk_acceptorg,pk_org,pk_group,pk_busitype,rowno,\n" +
|
||||
"pk_supplier,pk_bankacc_r,customer,pk_currtype,pk_decidedept,gllcrate,applysum,applymny,vdef1,pk_project,vdef2,vdef3,\n" +
|
||||
"vdef4 from v_cmp_apply_b where formmain_id= '"+formmainId+"' " );
|
||||
"vdef4,vdef10 from v_cmp_apply_b where formmain_id= '"+formmainId+"' " );
|
||||
List<HashMap<String, Object>> hashMapsDetails = serviceDataDao.queryListBySWSource(stringBufferDetails.toString(),mdmModuleSourceEntity);
|
||||
JSONArray cmp_apply_b = new JSONArray();
|
||||
if(CollectionUtils.isNotEmpty(hashMapsDetails)){
|
||||
|
|
Loading…
Reference in New Issue