yzt-20250303-问题清单序号351-接口报错问题

ht
yangzt 3 months ago
parent 4104fa75b9
commit 6de34de6b4

@ -527,18 +527,20 @@ public class ZOA_SL_GNCC_Action extends BaseBean implements Action, EsbServerles
if (str.length() > 150) {
str = str.substring(0, 150);
}
// String sql = "insert into chuchai_qingjia_log(requestId,gh,lbbh,kssj,jssj,message,state,qjss) values('" + reid + "','','A11','" + beginDateTime + "','" + endDateTime + "','" + str + "','" + hrstate + "','" + qjss + "')";
long generate = IdGenerator.generate();
String sql = "insert into e10_common.dbo.chuchai_qingjia_log(id,requestId,gh,lbbh,kssj,jssj,message,state,qjss) values("+generate + ",'" + reid + "','','A11','" + beginDateTime + "','" + endDateTime + "','" + str + "','" + hrstate + "','" + qjss + "')";
// String poolname = CONN_TYPE.workflow.getType();
// /* *TODO 检测到insert语句 -> E9插入sql迁移到E10需要特殊处理请参考文档进行调整 https://www.e-cology.com.cn/sp/doc/docShare/1027709301045985331?tenantKey=t7akvdnf84
// TODO E10执行sql方法第二参数必须指定源默认使用流程源单体客户无需修改微服务/组合客户需根据查询表所属服务切换源,或使用外部数据源*/
// long generate = IdGenerator.generate();
// rs.executeSql(sql, poolname,generate);
Long uf_CustomFlow_formId1 = commonDevUtil.getObjId("chuchai_qingjia_log");
logger_5e8d517a.error("uf_CustomFlow_formId = " + uf_CustomFlow_formId1);
SimpleEmployee currentEmployee = HrmContextUtil.getCurrentUser();
Long recodId = ebFormDataDubboService.addEmptyData(uf_CustomFlow_formId1, currentEmployee);// 获取插入的空的建模id
// Long uf_CustomFlow_formId1 = commonDevUtil.getObjId("chuchai_qingjia_log");
// logger_5e8d517a.error("uf_CustomFlow_formId = " + uf_CustomFlow_formId1);
// SimpleEmployee currentEmployee = HrmContextUtil.getCurrentUser();
// Long recodId = ebFormDataDubboService.addEmptyData(uf_CustomFlow_formId1, currentEmployee);// 获取插入的空的建模id
String poolname1 = CONN_TYPE.workflow.getType();
String sql = "update e10_common.dbo.sync_eas_log set requestId = '" + reid + "',gh = '',lbbh='A11',kssj='" + beginDateTime + "',jssj='" + endDateTime + "',message='" + str + "',state='" + hrstate + "',qjss='" + qjss + "' where id = " + recodId + " and delete_type = 0 ";
// String sql = "update e10_common.dbo.sync_eas_log set requestId = '" + reid + "',gh = '',lbbh='A11',kssj='" + beginDateTime + "',jssj='" + endDateTime + "',message='" + str + "',state='" + hrstate + "',qjss='" + qjss + "' where id = " + recodId + " and delete_type = 0 ";
boolean b = rs.executeSql(sql, poolname1);
logger_5e8d517a.error("sql3 = " + sql);
logger_5e8d517a.error("添加 = " + b);
@ -763,43 +765,67 @@ public class ZOA_SL_GNCC_Action extends BaseBean implements Action, EsbServerles
String[] result = callTravelApply.call();
sta = result[0];
message = result[1];
// String sql_log = "insert into sync_eas_log(requestId,lcbh,kssj,jssj,sqrq,ccmdd,gh,name,sxrgh,sxrxm,reason,title,sqbm,sqdw,status,message) " + "values('" + reid + "','" + sourceKey + "','" + kssj + "','" + jssj + "','" + sqrq + "','" + attribute8 + "','" + errandEmpNum + "','" + attribute3 + "','" + synergeticNumbers + "'" + ",'" + synergeticNames + "','" + reason + "','" + title + "','" + attribute4 + "','" + attribute5 + "','" + sta + "','" + message + "')";
// String poolname_ui = CONN_TYPE.workflow.getType();
String poolname_ui = CONN_TYPE.workflow.getType();
//generate过长 新id=获取id最大值+1
String newIdSql = "SELECT ISNULL((SELECT TOP 1 id FROM e10_common.dbo.sync_eas_log ORDER BY id DESC), 0) + 1 AS id";
boolean flag = rs.executeSql(newIdSql, poolname_ui);
logger_5e8d517a.error("flag---"+flag);
long newId = 0;
if (rs.next()) {
newId = Long.parseLong(rs.getString("id"));
}
String sql3 = "insert into e10_common.dbo.sync_eas_log(id,requestId,lcbh,kssj,jssj,sqrq,ccmdd,gh,name,sxrgh,sxrxm,reason,title,sqbm,sqdw,status,message) " + "values(" + newId + ",'" + reid + "','" + sourceKey + "','" + kssj + "','" + jssj + "','" + sqrq + "','" + attribute8 + "','" + errandEmpNum + "','" + attribute3 + "','" + synergeticNumbers + "'" + ",'" + synergeticNames + "','" + reason + "','" + title + "','" + attribute4 + "','" + attribute5 + "','" + sta + "','" + message + "')";
// /* *TODO 检测到insert语句 -> E9插入sql迁移到E10需要特殊处理请参考文档进行调整 https://www.e-cology.com.cn/sp/doc/docShare/1027709301045985331?tenantKey=t7akvdnf84
// TODO E10执行sql方法第二参数必须指定源默认使用流程源单体客户无需修改微服务/组合客户需根据查询表所属服务切换源,或使用外部数据源*/
// generate = IdGenerator.generate();
// rs1.executeSql(sql_log, poolname_ui,generate);
Long uf_CustomFlow_formId = commonDevUtil.getObjId("sync_eas_log");
logger_5e8d517a.error("uf_CustomFlow_formId = " + uf_CustomFlow_formId);
String poolname_5v = CONN_TYPE.workflow.getType();
Long recodId1 = ebFormDataDubboService.addEmptyData(uf_CustomFlow_formId, currentEmployee);// 获取插入的空的建模id
String sql3 = "update e10_common.dbo.sync_eas_log set requestId = '" + reid + "',lcbh = '" + sourceKey + "',kssj='" + kssj + "',jssj='" + jssj + "',sqrq='" + sqrq + "',ccmdd='" + attribute8 + "',gh='" + errandEmpNum + "',name='" + attribute3 + "',sxrgh='" + synergeticNumbers + "' " + ",sxrxm='" + synergeticNames + "',reason='" + reason + "',title='" + title + "',sqbm='" + attribute4 + "',sqdw='" + attribute5 + "',status='" + sta + "',message='" + message + "' where id = " + recodId1 + " and delete_type = 0 ";
boolean b1 = rs.executeSql(sql3, poolname_5v);
// Long uf_CustomFlow_formId = commonDevUtil.getObjId("sync_eas_log");
// logger_5e8d517a.error("uf_CustomFlow_formId = " + uf_CustomFlow_formId);
// String poolname_5v = CONN_TYPE.workflow.getType();
// Long recodId1 = ebFormDataDubboService.addEmptyData(uf_CustomFlow_formId, currentEmployee);// 获取插入的空的建模id
// String sql3 = "update e10_common.dbo.sync_eas_log set requestId = '" + reid + "',lcbh = '" + sourceKey + "',kssj='" + kssj + "',jssj='" + jssj + "',sqrq='" + sqrq + "',ccmdd='" + attribute8 + "',gh='" + errandEmpNum + "',name='" + attribute3 + "',sxrgh='" + synergeticNumbers + "' " + ",sxrxm='" + synergeticNames + "',reason='" + reason + "',title='" + title + "',sqbm='" + attribute4 + "',sqdw='" + attribute5 + "',status='" + sta + "',message='" + message + "' where id = " + recodId1 + " and delete_type = 0 ";
boolean b1 = rs.executeSql(sql3, poolname_ui);
logger_5e8d517a.error("rs = " + rs.getExecuteResult());
logger_5e8d517a.error("sql3 = " + sql3);
logger_5e8d517a.error(String.valueOf("b1:" + b1));
logger_5e8d517a.error(String.valueOf(reid + "同步数据到EAS完成"));
} catch (Exception e) {
message = e.getMessage();
// String sql_log = "insert into sync_eas_log(requestId,lcbh,kssj,jssj,sqrq,ccmdd,gh,name,sxrgh,sxrxm,reason,title,sqbm,sqdw,status,message) " + "values('" + reid + "','" + sourceKey + "','" + kssj + "','" + jssj + "','" + sqrq + "','" + attribute8 + "','" + errandEmpNum + "','" + attribute3 + "','" + synergeticNumbers + "'" + ",'" + synergeticNames + "','" + reason + "','" + title + "','" + attribute4 + "','" + attribute5 + "','" + sta + "','" + message + "')";
String poolname_5v = CONN_TYPE.workflow.getType();
//generate过长 新id=获取id最大值+1
String newIdSql = "SELECT ISNULL((SELECT TOP 1 id FROM e10_common.dbo.sync_eas_log ORDER BY id DESC), 0) + 1 AS id";
boolean flag = rs.executeSql(newIdSql, poolname_5v);
logger_5e8d517a.error("flag---"+flag);
long newId = 0;
if (rs.next()) {
newId = Long.parseLong(rs.getString("id"));
}
String sql3 = "insert into e10_common.dbo.sync_eas_log(id,requestId,lcbh,kssj,jssj,sqrq,ccmdd,gh,name,sxrgh,sxrxm,reason,title,sqbm,sqdw,status,message) " + "values(" + newId + ",'" + reid + "','" + sourceKey + "','" + kssj + "','" + jssj + "','" + sqrq + "','" + attribute8 + "','" + errandEmpNum + "','" + attribute3 + "','" + synergeticNumbers + "'" + ",'" + synergeticNames + "','" + reason + "','" + title + "','" + attribute4 + "','" + attribute5 + "','" + sta + "','" + message + "')";
// String poolname_5v = CONN_TYPE.workflow.getType();
// /* *TODO 检测到insert语句 -> E9插入sql迁移到E10需要特殊处理请参考文档进行调整 https://www.e-cology.com.cn/sp/doc/docShare/1027709301045985331?tenantKey=t7akvdnf84
// TODO E10执行sql方法第二参数必须指定源默认使用流程源单体客户无需修改微服务/组合客户需根据查询表所属服务切换源,或使用外部数据源*/
// generate = IdGenerator.generate();
// rs1.executeSql(sql_log, poolname_5v,generate);
Long uf_CustomFlow_formId = commonDevUtil.getObjId("sync_eas_log");
logger_5e8d517a.error("uf_CustomFlow_formId = " + uf_CustomFlow_formId);
String poolname_5v = CONN_TYPE.workflow.getType();
Long recodId2 = ebFormDataDubboService.addEmptyData(uf_CustomFlow_formId, currentEmployee);// 获取插入的空的建模id
String sql3 = "update e10_common.dbo.sync_eas_log set requestId = '" + reid + "',lcbh = '" + sourceKey + "',kssj='" + kssj + "',jssj='" + jssj + "',sqrq='" + sqrq + "',ccmdd='" + attribute8 + "',gh='" + errandEmpNum + "',name='" + attribute3 + "',sxrgh='" + synergeticNumbers + "' " + ",sxrxm='" + synergeticNames + "',reason='" + reason + "',title='" + title + "',sqbm='" + attribute4 + "',sqdw='" + attribute5 + "',status='" + sta + "',message='" + message + "' where id = " + recodId2 + " and delete_type = 0 ";
// Long uf_CustomFlow_formId = commonDevUtil.getObjId("sync_eas_log");
// logger_5e8d517a.error("uf_CustomFlow_formId = " + uf_CustomFlow_formId);
// String poolname_5v = CONN_TYPE.workflow.getType();
// Long recodId2 = ebFormDataDubboService.addEmptyData(uf_CustomFlow_formId, currentEmployee);// 获取插入的空的建模id
// String sql3 = "update e10_common.dbo.sync_eas_log set requestId = '" + reid + "',lcbh = '" + sourceKey + "',kssj='" + kssj + "',jssj='" + jssj + "',sqrq='" + sqrq + "',ccmdd='" + attribute8 + "',gh='" + errandEmpNum + "',name='" + attribute3 + "',sxrgh='" + synergeticNumbers + "' " + ",sxrxm='" + synergeticNames + "',reason='" + reason + "',title='" + title + "',sqbm='" + attribute4 + "',sqdw='" + attribute5 + "',status='" + sta + "',message='" + message + "' where id = " + recodId2 + " and delete_type = 0 ";
boolean b1 = rs.executeSql(sql3, poolname_5v);
logger_5e8d517a.error("rs = " + rs.getExecuteResult());
logger_5e8d517a.error("sql3 = " + sql3);
logger_5e8d517a.error("添加 = " + b1);
logger_5e8d517a.error(String.valueOf(reid + "同步数据到EAS异常:" + e.toString()));
return WeaResult.fail(500, reid + "同步数据到EAS异常:" + e, getResultMapForAction(weaverResultMap, "result", "", request.getRequestManager()));
return WeaResult.fail(500, reid + "同步数据到EAS异常:" + e.toString(), getResultMapForAction(weaverResultMap, "result", "", request.getRequestManager()));
}
} catch (Exception e) {
logger_5e8d517a.error(String.valueOf(reid + "Exception:" + e.toString()));
return WeaResult.fail(500, reid + "Exception:" + e, getResultMapForAction(weaverResultMap, "result", "", request.getRequestManager()));
return WeaResult.fail(500, reid + "Exception:" + e.toString(), getResultMapForAction(weaverResultMap, "result", "", request.getRequestManager()));
// e.printStackTrace();
}

Loading…
Cancel
Save